DefaultSudoDIRelayClient
public class DefaultSudoDIRelayClient : SudoDIRelayClient
Default Client API Endpoint for interacting with the Relay Service.
-
Configuration parameter names.
Declaration
Swift
public struct Config
-
Initialize an instance of
DefaultSudoDIRelayClient
. It uses configuration parameters defined insudoplatformconfig.json
file located in the app bundle.Declaration
Swift
public convenience init(sudoUserClient: SudoUserClient) throws
Parameters
sudoUserClient
SudoUserClient instance used for authenticating to the backend.. Throws:
-
Declaration
Swift
public func reset() throws
-
listPostboxes(limit:
AsynchronousnextToken: ) Declaration
Swift
public func listPostboxes(limit: Int? = nil, nextToken: String? = nil) async throws -> ListOutput<Postbox>
-
listMessages(limit:
AsynchronousnextToken: ) Declaration
Swift
public func listMessages(limit: Int? = nil, nextToken: String? = nil) async throws -> ListOutput<Message>
-
Declaration
Swift
public func createPostbox(withConnectionId connectionId: String, ownershipProofToken: String, isEnabled: Bool? = true) async throws -> Postbox
-
updatePostbox(withPostboxId:
AsynchronousisEnabled: ) Declaration
Swift
public func updatePostbox(withPostboxId postboxId: String, isEnabled: Bool? = nil) async throws -> Postbox
-
deletePostbox(withPostboxId:
Asynchronous) Declaration
Swift
public func deletePostbox(withPostboxId postboxId: String) async throws -> String
-
deleteMessage(withMessageId:
Asynchronous) Declaration
Swift
public func deleteMessage(withMessageId messageId: String) async throws -> String
-
bulkDeleteMessage(withMessageIds:
Asynchronous) Declaration
Swift
public func bulkDeleteMessage(withMessageIds messageIds: [String]) async throws -> [String]
-
Declaration
Swift
public func subscribeToMessageCreated( statusChangeHandler: SudoSubscriptionStatusChangeHandler?, resultHandler: @escaping ClientCompletion<Message> ) async throws -> SubscriptionToken?
-
Declaration
Swift
public func unsubscribeAll()