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.jsonfile located in the app bundle.Declaration
Swift
public convenience init(keyNamespace: String = SudoEmailCommon.Constants.defaultKeyNamespace, userClient: SudoUserClient) throwsParameters
keyNamespaceNamespace to use for the keys and passwords. This should be left as the default property.
userClientSudoUserClient instance used for authentication. Throws:
-
reset()AsynchronousDeclaration
Swift
public func reset() async 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> -
scheduleSendDraftMessage(withInput:Asynchronous) Declaration
Swift
public func scheduleSendDraftMessage( withInput input: ScheduleSendDraftMessageInput ) async throws -> ScheduledDraftMessage -
cancelScheduledDraftMessage(withInput:Asynchronous) Declaration
Swift
public func cancelScheduledDraftMessage( withInput input: CancelScheduledDraftMessageInput ) async throws -> String -
Declaration
Swift
public func listScheduledDraftMessagesForEmailAddressId( withInput input: ListScheduledDraftMessagesForEmailAddressIdInput ) async throws -> ListOutput<ScheduledDraftMessage> -
createCustomEmailFolder(withInput:Asynchronous) Declaration
Swift
public func createCustomEmailFolder(withInput input: CreateCustomEmailFolderInput) async throws -> EmailFolder -
deleteCustomEmailFolder(withInput:Asynchronous) Declaration
Swift
public func deleteCustomEmailFolder(withInput input: DeleteCustomEmailFolderInput) async throws -> EmailFolder? -
updateCustomEmailFolder(withInput:Asynchronous) Declaration
Swift
public func updateCustomEmailFolder(withInput input: UpdateCustomEmailFolderInput) 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()AsynchronousDeclaration
Swift
public func getSupportedEmailDomains() async throws -> [String] -
getConfiguredEmailDomains()AsynchronousDeclaration
Swift
public func getConfiguredEmailDomains() 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] -
Declaration
Swift
public func blockEmailAddresses( addresses: [String], action: UnsealedBlockedAddress.BlockedAddressAction, emailAddressId: String?, blockLevel: BlockedEmailAddressLevel, ) 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
@available(*, deprecated, message: "Use listDraftEmailMessageForEmailAddressId instead to reduce unneccessary network calls.") public func listDraftEmailMessages() async throws -> [DraftEmailMessage] -
Declaration
Swift
public func listDraftEmailMessagesForEmailAddressId(emailAddressId: String) async throws -> [DraftEmailMessage] -
listDraftEmailMessageMetadata()AsynchronousDeclaration
Swift
@available(*, deprecated, message: "Use listDraftEmailMessageMetadataForEmailAddressId instead to reduce unneccessary network calls.") 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? -
deleteMessagesForFolderId(withInput:Asynchronous) Declaration
Swift
public func deleteMessagesForFolderId(withInput input: DeleteMessagesForFolderIdInput) async throws -> String -
getConfigurationData()AsynchronousDeclaration
Swift
public func getConfigurationData() async throws -> ConfigurationData -
subscribe(id:AsynchronousnotificationType: subscriber: ) Declaration
Swift
public func subscribe(id: String, notificationType: SubscriptionNotificationType, subscriber: Subscriber) async throws -
unsubscribe(id:Asynchronous) Declaration
Swift
public func unsubscribe(id: String) async -
unsubscribeAll()AsynchronousDeclaration
Swift
public func unsubscribeAll() async
DefaultSudoEmailClient Class Reference