/** * Copyright © 2025 Anonyome Labs, Inc. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 */ import type { EmailAddress } from './typings/emailAddress'; declare class EmailError extends Error { constructor(msg?: string); } export declare class InternalError extends Error { constructor(msg: string); } export declare class InvalidAddressError extends EmailError { constructor(msg?: string); } export declare class InvalidEmailDomainError extends EmailError { constructor(msg?: string); } export declare class InvalidKeyRingIdError extends EmailError { constructor(msg?: string); } export declare class MissingKeyError extends EmailError { constructor(msg?: string); } export declare class UnsupportedKeyTypeError extends EmailError { constructor(msg?: string); } export declare class AddressUnavailableError extends EmailError { constructor(msg?: string); } export declare class AddressNotFoundError extends EmailError { constructor(msg?: string); } export declare class InNetworkAddressNotFoundError extends EmailError { constructor(msg?: string); } export declare class LimitExceededError extends EmailError { constructor(msg?: string); } export declare class MessageSizeLimitExceededError extends EmailError { constructor(msg?: string); } export declare class InvalidArgumentError extends EmailError { constructor(msg?: string); } export declare class UnauthorizedAddressError extends EmailError { constructor(msg?: string); } export declare class InvalidEmailContentsError extends EmailError { constructor(msg?: string); } export declare class MessageNotFoundError extends EmailError { constructor(msg?: string); } export declare class EmailServiceConfigNotFoundError extends EmailError { constructor(msg?: string); } export declare class S3UploadError extends EmailError { constructor(message: string); } export declare class EmailFolderNotFoundError extends EmailError { constructor(msg?: string); } export declare class RecordNotFoundError extends EmailError { constructor(msg?: string); } export declare class EmailAliasNotFoundError extends EmailError { constructor(msg?: string); } export declare class EmailAliasAlreadyExistsError extends EmailError { constructor(msg?: string); } export declare class EmailAliasLockedError extends EmailError { constructor(msg?: string); } /** * Thrown when the client's configuration doesn't support the operation * called. For example, `createSingletonKeysIfAbsent` when the client doesn't * enforce a singleton key pair. */ export declare class InvalidConfigError extends EmailError { constructor(msg?: string); } /** * Thrown when the client enforces a singleton key pair (see * `SudoEmailClientConfig.enforceSingletonPublicKey`), but it isn't in this * client's key store. Create it with `createSingletonKeysIfAbsent`, or import * the user's key backup with `importKeys`. */ export declare class SingletonKeyPairNotFoundError extends EmailError { constructor(msg?: string); } /** * Thrown by `importKeys` when the key archive contains keys that this client * can't import, usually because they were exported under a different key * namespace, for example by another app or platform. Nothing was imported. */ export declare class KeyArchiveNotImportableError extends EmailError { constructor(msg?: string); } /** * Thrown by `importKeys` when the key archive can't be read, for example * because it is corrupt or of an unsupported type or version. The client's * keys are unchanged. */ export declare class InvalidKeyArchiveError extends EmailError { constructor(msg?: string); } /** * Thrown by `deprovisionEmailAddress` when the service deprovisioned the email * address, but some of its key pairs couldn't be removed from the key store. * * Treat the email address as deprovisioned: `emailAddress` carries it. The key * pairs stay in the key store until `reset`. */ export declare class KeyPairRemovalFailedError extends EmailError { /** The email address that was deprovisioned. */ readonly emailAddress: EmailAddress; /** Identifiers of the key pairs that couldn't be removed. */ readonly keyIds: string[]; constructor(emailAddress: EmailAddress, keyIds: string[]); } export {};