@sudoplatform/sudo-email
    Preparing search index...

    Class DefaultSudoEmailClient

    Implements

    Index

    Constructors

    Methods

    • Delete a single email message identified by id.

      Parameters

      • id: string

        The identifier of the email message to be deleted.

      Returns Promise<DeleteEmailMessageSuccessResult | undefined>

      Result object containing the identifier of the email message that was deleted, or undefined if the email message could not be deleted.

      NotRegisteredError

      LimitExceededError

      ServiceError

    • Delete the email messages identified by the list of ids.

      Email messages can only be deleted in batches of 100. Anything greater will throw a LimitExceededError.

      Parameters

      • ids: string[]

        A list of one or more identifiers of the email messages to be deleted. There is a limit of 100 email message ids per API request. Exceeding this will cause an error to be thrown.

      Returns Promise<
          BatchOperationResult<
              DeleteEmailMessageSuccessResult,
              EmailMessageOperationFailureResult,
          >,
      >

      The status of the delete: Success - All email messages succeeded to delete. Partial - Only a partial amount of messages succeeded to delete. Includes a list of the identifiers of the email messages that failed and succeeded to delete. Failure - All email messages failed to delete.

      NotRegisteredError

      InvalidArgumentError

      LimitExceededError

      ServiceError

    • Delete all messages for in an email folder. Deletion will be processed asynchronously since it may take a substantial amount of time. This method does not wait for deletion to complete. To check for completion, listen for subscriptions or check list endpoints.

      Parameters

      Returns Promise<string>

      The id of the folder

    • Export the cryptographic keys to a key archive.

      Returns Promise<ArrayBuffer>

      Key archive data.

    • Get a list of all of the email domains for which end-to-end encryption is supported.

      Returns Promise<string[]>

      A list of all configured domains.

      NotRegisteredError

      ServiceError

    • Get a list of all of the email domains on which email masks may be provisioned.

      Returns Promise<string[]>

      A list of email mask domains.

      NotRegisteredError

      ServiceError

    • Get a list of all of the email domains on which emails may be provisioned.

      Returns Promise<string[]>

      A list of supported domains.

      NotRegisteredError

      ServiceError

    • Imports cryptographic keys from a key archive.

      Parameters

      • archiveData: ArrayBuffer

        Key archive data to import the keys from.

      Returns Promise<void>

    • Returns Promise<DraftEmailMessage[]>

      An array of draft email messages or an empty array if no matching draft email messages can be found.

      The method should not be used. Instead use listDraftEmailMessageMetadataForEmailAddressId. Lists the metadata and content of all draft email messages for the user.

    • Lists the metadata and content of all draft messages for the specified email address identifier.

      Parameters

      • emailAddressId: string

        The identifier of the email address associated with the draft email messages.

      Returns Promise<DraftEmailMessage[]>

      An array of draft email messages or an empty array if no matching draft email messages can be found.

    • Removes any cached data maintained by this client.

      Returns Promise<void>

    • Subscribe to email message events.

      Parameters

      • subscriptionId: string

        unique identifier to differentiate subscriptions; note that specifying a duplicate subscription id will replace the previous subscription.

      • subscriber: EmailMessageSubscriber

        implementation of callback to be invoked when email message event occurs

      Returns Promise<void>

    • Unsubscribe from email message events.

      Parameters

      • subscriptionId: string

        unique identifier to differentiate subscription

      Returns void