Skip to content

Commit

Permalink
generate new iOS proto code for pushes
Browse files Browse the repository at this point in the history
  • Loading branch information
nplasterer committed Mar 12, 2024
1 parent c179116 commit ecd7c87
Show file tree
Hide file tree
Showing 2 changed files with 550 additions and 324 deletions.
80 changes: 53 additions & 27 deletions Sources/XMTPiOS/Push/service.connect.swift
Original file line number Diff line number Diff line change
@@ -1,83 +1,109 @@
// Code generated by protoc-gen-connect-swift. DO NOT EDIT.
//
// Source: service.proto
// Source: notifications/v1/service.proto
//

import Connect
import Foundation
import SwiftProtobuf

public protocol Notifications_V1_NotificationsClientInterface {
public protocol Notifications_V1_NotificationsClientInterface: Sendable {

@discardableResult
func registerInstallation(request: Notifications_V1_RegisterInstallationRequest, headers: Connect.Headers, completion: @escaping (ResponseMessage<Notifications_V1_RegisterInstallationResponse>) -> Void) -> Connect.Cancelable
func `registerInstallation`(request: Notifications_V1_RegisterInstallationRequest, headers: Connect.Headers, completion: @escaping @Sendable (ResponseMessage<Notifications_V1_RegisterInstallationResponse>) -> Void) -> Connect.Cancelable

func registerInstallation(request: Notifications_V1_RegisterInstallationRequest, headers: Connect.Headers) async -> ResponseMessage<Notifications_V1_RegisterInstallationResponse>
@available(iOS 13, *)
func `registerInstallation`(request: Notifications_V1_RegisterInstallationRequest, headers: Connect.Headers) async -> ResponseMessage<Notifications_V1_RegisterInstallationResponse>

@discardableResult
func deleteInstallation(request: Notifications_V1_DeleteInstallationRequest, headers: Connect.Headers, completion: @escaping (ResponseMessage<SwiftProtobuf.Google_Protobuf_Empty>) -> Void) -> Connect.Cancelable
func `deleteInstallation`(request: Notifications_V1_DeleteInstallationRequest, headers: Connect.Headers, completion: @escaping @Sendable (ResponseMessage<SwiftProtobuf.Google_Protobuf_Empty>) -> Void) -> Connect.Cancelable

func deleteInstallation(request: Notifications_V1_DeleteInstallationRequest, headers: Connect.Headers) async -> ResponseMessage<SwiftProtobuf.Google_Protobuf_Empty>
@available(iOS 13, *)
func `deleteInstallation`(request: Notifications_V1_DeleteInstallationRequest, headers: Connect.Headers) async -> ResponseMessage<SwiftProtobuf.Google_Protobuf_Empty>

@discardableResult
func subscribe(request: Notifications_V1_SubscribeRequest, headers: Connect.Headers, completion: @escaping (ResponseMessage<SwiftProtobuf.Google_Protobuf_Empty>) -> Void) -> Connect.Cancelable
func `subscribe`(request: Notifications_V1_SubscribeRequest, headers: Connect.Headers, completion: @escaping @Sendable (ResponseMessage<SwiftProtobuf.Google_Protobuf_Empty>) -> Void) -> Connect.Cancelable

func subscribe(request: Notifications_V1_SubscribeRequest, headers: Connect.Headers) async -> ResponseMessage<SwiftProtobuf.Google_Protobuf_Empty>
@available(iOS 13, *)
func `subscribe`(request: Notifications_V1_SubscribeRequest, headers: Connect.Headers) async -> ResponseMessage<SwiftProtobuf.Google_Protobuf_Empty>

@discardableResult
func unsubscribe(request: Notifications_V1_UnsubscribeRequest, headers: Connect.Headers, completion: @escaping (ResponseMessage<SwiftProtobuf.Google_Protobuf_Empty>) -> Void) -> Connect.Cancelable
func `subscribeWithMetadata`(request: Notifications_V1_SubscribeWithMetadataRequest, headers: Connect.Headers, completion: @escaping @Sendable (ResponseMessage<SwiftProtobuf.Google_Protobuf_Empty>) -> Void) -> Connect.Cancelable

@available(iOS 13, *)
func `subscribeWithMetadata`(request: Notifications_V1_SubscribeWithMetadataRequest, headers: Connect.Headers) async -> ResponseMessage<SwiftProtobuf.Google_Protobuf_Empty>

func unsubscribe(request: Notifications_V1_UnsubscribeRequest, headers: Connect.Headers) async -> ResponseMessage<SwiftProtobuf.Google_Protobuf_Empty>
@discardableResult
func `unsubscribe`(request: Notifications_V1_UnsubscribeRequest, headers: Connect.Headers, completion: @escaping @Sendable (ResponseMessage<SwiftProtobuf.Google_Protobuf_Empty>) -> Void) -> Connect.Cancelable

@available(iOS 13, *)
func `unsubscribe`(request: Notifications_V1_UnsubscribeRequest, headers: Connect.Headers) async -> ResponseMessage<SwiftProtobuf.Google_Protobuf_Empty>
}

/// Concrete implementation of `Notifications_V1_NotificationsClientInterface`.
public final class Notifications_V1_NotificationsClient: Notifications_V1_NotificationsClientInterface {
public final class Notifications_V1_NotificationsClient: Notifications_V1_NotificationsClientInterface, Sendable {
private let client: Connect.ProtocolClientInterface

public init(client: Connect.ProtocolClientInterface) {
self.client = client
}

@discardableResult
public func registerInstallation(request: Notifications_V1_RegisterInstallationRequest, headers: Connect.Headers = [:], completion: @escaping (ResponseMessage<Notifications_V1_RegisterInstallationResponse>) -> Void) -> Connect.Cancelable {
return client.unary(path: "notifications.v1.Notifications/RegisterInstallation", request: request, headers: headers, completion: completion)
public func `registerInstallation`(request: Notifications_V1_RegisterInstallationRequest, headers: Connect.Headers = [:], completion: @escaping @Sendable (ResponseMessage<Notifications_V1_RegisterInstallationResponse>) -> Void) -> Connect.Cancelable {
return self.client.unary(path: "/notifications.v1.Notifications/RegisterInstallation", idempotencyLevel: .unknown, request: request, headers: headers, completion: completion)
}

@available(iOS 13, *)
public func `registerInstallation`(request: Notifications_V1_RegisterInstallationRequest, headers: Connect.Headers = [:]) async -> ResponseMessage<Notifications_V1_RegisterInstallationResponse> {
return await self.client.unary(path: "/notifications.v1.Notifications/RegisterInstallation", idempotencyLevel: .unknown, request: request, headers: headers)
}

@discardableResult
public func `deleteInstallation`(request: Notifications_V1_DeleteInstallationRequest, headers: Connect.Headers = [:], completion: @escaping @Sendable (ResponseMessage<SwiftProtobuf.Google_Protobuf_Empty>) -> Void) -> Connect.Cancelable {
return self.client.unary(path: "/notifications.v1.Notifications/DeleteInstallation", idempotencyLevel: .unknown, request: request, headers: headers, completion: completion)
}

public func registerInstallation(request: Notifications_V1_RegisterInstallationRequest, headers: Connect.Headers = [:]) async -> ResponseMessage<Notifications_V1_RegisterInstallationResponse> {
return await client.unary(path: "notifications.v1.Notifications/RegisterInstallation", request: request, headers: headers)
@available(iOS 13, *)
public func `deleteInstallation`(request: Notifications_V1_DeleteInstallationRequest, headers: Connect.Headers = [:]) async -> ResponseMessage<SwiftProtobuf.Google_Protobuf_Empty> {
return await self.client.unary(path: "/notifications.v1.Notifications/DeleteInstallation", idempotencyLevel: .unknown, request: request, headers: headers)
}

@discardableResult
public func deleteInstallation(request: Notifications_V1_DeleteInstallationRequest, headers: Connect.Headers = [:], completion: @escaping (ResponseMessage<SwiftProtobuf.Google_Protobuf_Empty>) -> Void) -> Connect.Cancelable {
return client.unary(path: "notifications.v1.Notifications/DeleteInstallation", request: request, headers: headers, completion: completion)
public func `subscribe`(request: Notifications_V1_SubscribeRequest, headers: Connect.Headers = [:], completion: @escaping @Sendable (ResponseMessage<SwiftProtobuf.Google_Protobuf_Empty>) -> Void) -> Connect.Cancelable {
return self.client.unary(path: "/notifications.v1.Notifications/Subscribe", idempotencyLevel: .unknown, request: request, headers: headers, completion: completion)
}

public func deleteInstallation(request: Notifications_V1_DeleteInstallationRequest, headers: Connect.Headers = [:]) async -> ResponseMessage<SwiftProtobuf.Google_Protobuf_Empty> {
return await client.unary(path: "notifications.v1.Notifications/DeleteInstallation", request: request, headers: headers)
@available(iOS 13, *)
public func `subscribe`(request: Notifications_V1_SubscribeRequest, headers: Connect.Headers = [:]) async -> ResponseMessage<SwiftProtobuf.Google_Protobuf_Empty> {
return await self.client.unary(path: "/notifications.v1.Notifications/Subscribe", idempotencyLevel: .unknown, request: request, headers: headers)
}

@discardableResult
public func subscribe(request: Notifications_V1_SubscribeRequest, headers: Connect.Headers = [:], completion: @escaping (ResponseMessage<SwiftProtobuf.Google_Protobuf_Empty>) -> Void) -> Connect.Cancelable {
return client.unary(path: "notifications.v1.Notifications/Subscribe", request: request, headers: headers, completion: completion)
public func `subscribeWithMetadata`(request: Notifications_V1_SubscribeWithMetadataRequest, headers: Connect.Headers = [:], completion: @escaping @Sendable (ResponseMessage<SwiftProtobuf.Google_Protobuf_Empty>) -> Void) -> Connect.Cancelable {
return self.client.unary(path: "/notifications.v1.Notifications/SubscribeWithMetadata", idempotencyLevel: .unknown, request: request, headers: headers, completion: completion)
}

public func subscribe(request: Notifications_V1_SubscribeRequest, headers: Connect.Headers = [:]) async -> ResponseMessage<SwiftProtobuf.Google_Protobuf_Empty> {
return await client.unary(path: "notifications.v1.Notifications/Subscribe", request: request, headers: headers)
@available(iOS 13, *)
public func `subscribeWithMetadata`(request: Notifications_V1_SubscribeWithMetadataRequest, headers: Connect.Headers = [:]) async -> ResponseMessage<SwiftProtobuf.Google_Protobuf_Empty> {
return await self.client.unary(path: "/notifications.v1.Notifications/SubscribeWithMetadata", idempotencyLevel: .unknown, request: request, headers: headers)
}

@discardableResult
public func unsubscribe(request: Notifications_V1_UnsubscribeRequest, headers: Connect.Headers = [:], completion: @escaping (ResponseMessage<SwiftProtobuf.Google_Protobuf_Empty>) -> Void) -> Connect.Cancelable {
return client.unary(path: "notifications.v1.Notifications/Unsubscribe", request: request, headers: headers, completion: completion)
public func `unsubscribe`(request: Notifications_V1_UnsubscribeRequest, headers: Connect.Headers = [:], completion: @escaping @Sendable (ResponseMessage<SwiftProtobuf.Google_Protobuf_Empty>) -> Void) -> Connect.Cancelable {
return self.client.unary(path: "/notifications.v1.Notifications/Unsubscribe", idempotencyLevel: .unknown, request: request, headers: headers, completion: completion)
}

public func unsubscribe(request: Notifications_V1_UnsubscribeRequest, headers: Connect.Headers = [:]) async -> ResponseMessage<SwiftProtobuf.Google_Protobuf_Empty> {
return await client.unary(path: "notifications.v1.Notifications/Unsubscribe", request: request, headers: headers)
@available(iOS 13, *)
public func `unsubscribe`(request: Notifications_V1_UnsubscribeRequest, headers: Connect.Headers = [:]) async -> ResponseMessage<SwiftProtobuf.Google_Protobuf_Empty> {
return await self.client.unary(path: "/notifications.v1.Notifications/Unsubscribe", idempotencyLevel: .unknown, request: request, headers: headers)
}

public enum Metadata {
public enum Methods {
public static let registerInstallation = Connect.MethodSpec(name: "RegisterInstallation", service: "notifications.v1.Notifications", type: .unary)
public static let deleteInstallation = Connect.MethodSpec(name: "DeleteInstallation", service: "notifications.v1.Notifications", type: .unary)
public static let subscribe = Connect.MethodSpec(name: "Subscribe", service: "notifications.v1.Notifications", type: .unary)
public static let subscribeWithMetadata = Connect.MethodSpec(name: "SubscribeWithMetadata", service: "notifications.v1.Notifications", type: .unary)
public static let unsubscribe = Connect.MethodSpec(name: "Unsubscribe", service: "notifications.v1.Notifications", type: .unary)
}
}
Expand Down
Loading

0 comments on commit ecd7c87

Please sign in to comment.