DefaultSudoEmailClient
public class DefaultSudoEmailClient : SudoEmailClient
Default Client API Endpoint for interacting with the Email Service.
-
Initialize an instance of
DefaultSudoEmailClient
. It uses configuration parameters defined insudoplatformconfig.json
file located in the app bundle.Declaration
Swift
public convenience init(keyNamespace: String = SudoEmail.Constants.defaultKeyNamespace, userClient: SudoUserClient) throws
Parameters
keyNamespace
Namespace to use for the keys and passwords. This should be left as the default property.
userClient
SudoUserClient instance used for authentication. Throws:
-
Declaration
Swift
public func reset() throws
-
provisionEmailAddress(withInput:
Asynchronous) Declaration
Swift
public func provisionEmailAddress( withInput input: ProvisionEmailAddressInput ) async throws -> EmailAddress
-
deprovisionEmailAddress(_:
Asynchronous) Declaration
Swift
public func deprovisionEmailAddress(_ id: String) async throws -> EmailAddress
-
updateEmailAddressMetadata(withInput:
Asynchronous) Declaration
Swift
public func updateEmailAddressMetadata(withInput input: UpdateEmailAddressMetadataInput) async throws -> String
-
sendEmailMessage(withInput:
Asynchronous) Declaration
Swift
public func sendEmailMessage(withInput input: SendEmailMessageInput) async throws -> SendEmailMessageResult
-
deleteEmailMessages(withIds:
Asynchronous) Declaration
Swift
public func deleteEmailMessages(withIds ids: [String]) async throws -> BatchOperationResult<DeleteEmailMessageSuccessResult, EmailMessageOperationFailureResult>
-
deleteEmailMessage(withId:
Asynchronous) Declaration
Swift
public func deleteEmailMessage(withId id: String) async throws -> DeleteEmailMessageSuccessResult?
-
updateEmailMessages(withInput:
Asynchronous) Declaration
Swift
public func updateEmailMessages( withInput input: UpdateEmailMessagesInput ) async throws -> BatchOperationResult<UpdatedEmailMessageSuccess, EmailMessageOperationFailureResult>
-
createDraftEmailMessage(withInput:
Asynchronous) Declaration
Swift
public func createDraftEmailMessage( withInput input: CreateDraftEmailMessageInput ) async throws -> DraftEmailMessageMetadata
-
updateDraftEmailMessage(withInput:
Asynchronous) Declaration
Swift
public func updateDraftEmailMessage( withInput input: UpdateDraftEmailMessageInput ) async throws -> DraftEmailMessageMetadata
-
deleteDraftEmailMessages(withInput:
Asynchronous) Declaration
Swift
public func deleteDraftEmailMessages( withInput input: DeleteDraftEmailMessagesInput ) async throws -> BatchOperationResult<DeleteEmailMessageSuccessResult, EmailMessageOperationFailureResult>
-
createCustomEmailFolder(withInput:
Asynchronous) Declaration
Swift
public func createCustomEmailFolder(withInput input: CreateCustomEmailFolderInput) async throws -> EmailFolder
-
Declaration
Swift
public func importKeys(archiveData: Data) throws
-
Declaration
Swift
public func exportKeys() throws -> Data
-
checkEmailAddressAvailability(withInput:
Asynchronous) Declaration
Swift
public func checkEmailAddressAvailability(withInput input: CheckEmailAddressAvailabilityInput) async throws -> [String]
-
getSupportedEmailDomains(_:
Asynchronous) Declaration
Swift
public func getSupportedEmailDomains(_ cachePolicy: CachePolicy) async throws -> [String]
-
getConfiguredEmailDomains(_:
Asynchronous) Declaration
Swift
public func getConfiguredEmailDomains(_ cachePolicy: CachePolicy) async throws -> [String]
-
getEmailAddress(withInput:
Asynchronous) Declaration
Swift
public func getEmailAddress(withInput input: GetEmailAddressInput) async throws -> EmailAddress?
-
listEmailAddresses(withInput:
Asynchronous) Declaration
Swift
public func listEmailAddresses(withInput input: ListEmailAddressesInput) async throws -> ListOutput<EmailAddress>
-
listEmailAddressesForSudoId(withInput:
Asynchronous) Declaration
Swift
public func listEmailAddressesForSudoId( withInput input: ListEmailAddressesForSudoIdInput ) async throws -> ListOutput<EmailAddress>
-
lookupEmailAddressesPublicInfo(withInput:
Asynchronous) Declaration
Swift
public func lookupEmailAddressesPublicInfo(withInput input: LookupEmailAddressesPublicInfoInput) async throws -> [EmailAddressPublicInfo]
-
blockEmailAddresses(addresses:
Asynchronous) Declaration
Swift
public func blockEmailAddresses(addresses: [String]) async throws -> BatchOperationResult<String, String>
-
unblockEmailAddresses(addresses:
Asynchronous) Declaration
Swift
public func unblockEmailAddresses(addresses: [String]) async throws -> BatchOperationResult<String, String>
-
unblockEmailAddressesByHashedValue(hashedValues:
Asynchronous) Declaration
Swift
public func unblockEmailAddressesByHashedValue(hashedValues: [String]) async throws -> BatchOperationResult<String, String>
-
getEmailAddressBlocklist()
AsynchronousDeclaration
Swift
public func getEmailAddressBlocklist() async throws -> [UnsealedBlockedAddress]
-
listEmailFoldersForEmailAddressId(withInput:
Asynchronous) Declaration
Swift
public func listEmailFoldersForEmailAddressId( withInput input: ListEmailFoldersForEmailAddressIdInput ) async throws -> ListOutput<EmailFolder>
-
getEmailMessage(withInput:
Asynchronous) Declaration
Swift
public func getEmailMessage(withInput input: GetEmailMessageInput) async throws -> EmailMessage?
-
listEmailMessages(withInput:
Asynchronous) Declaration
Swift
public func listEmailMessages( withInput input: ListEmailMessagesInput ) async throws -> ListAPIResult<EmailMessage, PartialEmailMessage>
-
listEmailMessagesForEmailAddressId(withInput:
Asynchronous) Declaration
Swift
public func listEmailMessagesForEmailAddressId( withInput input: ListEmailMessagesForEmailAddressInput ) async throws -> ListAPIResult<EmailMessage, PartialEmailMessage>
-
listEmailMessagesForEmailFolderId(withInput:
Asynchronous) Declaration
Swift
public func listEmailMessagesForEmailFolderId( withInput input: ListEmailMessagesForEmailFolderIdInput ) async throws -> ListAPIResult<EmailMessage, PartialEmailMessage>
-
getEmailMessageRfc822Data(withInput:
Asynchronous) Declaration
Swift
@available(*, deprecated, message: "Use getEmailMessageWithBody instead to retrieve email message data") public func getEmailMessageRfc822Data(withInput input: GetEmailMessageRfc822DataInput) async throws -> Data
-
getEmailMessageWithBody(withInput:
Asynchronous) Declaration
Swift
public func getEmailMessageWithBody(withInput input: GetEmailMessageWithBodyInput) async throws -> EmailMessageWithBody?
-
listDraftEmailMessages()
AsynchronousDeclaration
Swift
public func listDraftEmailMessages() async throws -> [DraftEmailMessage]
-
Declaration
Swift
public func listDraftEmailMessagesForEmailAddressId(emailAddressId: String) async throws -> [DraftEmailMessage]
-
listDraftEmailMessageMetadata()
AsynchronousDeclaration
Swift
public func listDraftEmailMessageMetadata() async throws -> [DraftEmailMessageMetadata]
-
Declaration
Swift
public func listDraftEmailMessageMetadataForEmailAddressId(emailAddressId: String) async throws -> [DraftEmailMessageMetadata]
-
getDraftEmailMessage(withInput:
Asynchronous) Declaration
Swift
public func getDraftEmailMessage( withInput input: GetDraftEmailMessageInput ) async throws -> DraftEmailMessage?
-
getConfigurationData()
AsynchronousDeclaration
Swift
public func getConfigurationData() async throws -> ConfigurationData
-
Declaration
Swift
public func subscribeToEmailMessageCreated( withDirection direction: EmailMessage.Direction? = nil, resultHandler: @escaping ClientCompletion<EmailMessage> ) async throws -> SubscriptionToken?
-
Declaration
Swift
public func subscribeToEmailMessageDeleted( withId id: String? = nil, resultHandler: @escaping ClientCompletion<EmailMessage> ) async throws -> SubscriptionToken?
-
Declaration
Swift
public func subscribeToEmailMessageUpdated(withId id: String? = nil, resultHandler: @escaping ClientCompletion<EmailMessage>) async throws -> (any SubscriptionToken)?
-
Declaration
Swift
public func unsubscribeAll()