/**
 * AWS SES (Simple Email Service) Operations
 * Direct API calls without AWS SDK dependency
 */
import type { AWSCredentials } from './client';
export interface EmailIdentity {
    IdentityType?: 'EMAIL_ADDRESS' | 'DOMAIN' | 'MANAGED_DOMAIN';
    IdentityName?: string;
    SendingEnabled?: boolean;
    VerificationStatus?: 'PENDING' | 'SUCCESS' | 'FAILED' | 'TEMPORARY_FAILURE' | 'NOT_STARTED';
    DkimAttributes?: {
        SigningEnabled?: boolean;
        Status?: 'PENDING' | 'SUCCESS' | 'FAILED' | 'TEMPORARY_FAILURE' | 'NOT_STARTED';
        Tokens?: string[];
        SigningAttributesOrigin?: 'AWS_SES' | 'EXTERNAL';
    };
    MailFromAttributes?: {
        MailFromDomain?: string;
        MailFromDomainStatus?: 'PENDING' | 'SUCCESS' | 'FAILED' | 'TEMPORARY_FAILURE';
        BehaviorOnMxFailure?: 'USE_DEFAULT_VALUE' | 'REJECT_MESSAGE';
    };
}
export interface SendEmailResult {
    MessageId?: string;
}
/**
 * SES email service management using direct API calls
 */
export declare class SESClient {
    private client;
    private region;
    /**
     * @param region - AWS region (defaults to `us-east-1`)
     * @param credentials - Optional explicit credentials. When omitted, AWSClient
     *   falls back to the env-var chain (`AWS_ACCESS_KEY_ID`, etc.) and then to
     *   `~/.aws/credentials`. Pass explicit creds when the caller has them
     *   under a non-default config key (e.g. `services.ses.credentials`) so a
     *   per-service identity doesn't have to overload the global env vars.
     */
    constructor(region?: string, credentials?: AWSCredentials);
    /**
     * Create email identity (domain or email address)
     * Uses SES v2 API
     */
    createEmailIdentity(params: {
        EmailIdentity: string;
        DkimSigningAttributes?: {
            DomainSigningSelector?: string;
            DomainSigningPrivateKey?: string;
        };
        Tags?: Array<{
            Key: string;
            Value: string;
        }>;
    }): Promise<{
        IdentityType?: string;
        VerifiedForSendingStatus?: boolean;
        DkimAttributes?: {
            SigningEnabled?: boolean;
            Status?: string;
            Tokens?: string[];
            SigningAttributesOrigin?: string;
        };
    }>;
    /**
     * Get email identity details
     */
    getEmailIdentity(emailIdentity: string): Promise<EmailIdentity>;
    /**
     * Configure MAIL FROM domain for an email identity
     */
    putEmailIdentityMailFromAttributes(emailIdentity: string, params: {
        MailFromDomain?: string;
        BehaviorOnMxFailure?: 'USE_DEFAULT_VALUE' | 'REJECT_MESSAGE';
    }): Promise<void>;
    /**
     * List email identities
     */
    listEmailIdentities(params?: {
        PageSize?: number;
        NextToken?: string;
    }): Promise<{
        EmailIdentities?: Array<{
            IdentityType?: string;
            IdentityName?: string;
            SendingEnabled?: boolean;
        }>;
        NextToken?: string;
    }>;
    /**
     * Delete email identity
     */
    deleteEmailIdentity(emailIdentity: string): Promise<void>;
    /**
     * Enable/disable DKIM signing for identity
     */
    putEmailIdentityDkimAttributes(params: {
        EmailIdentity: string;
        SigningEnabled: boolean;
    }): Promise<void>;
    /**
     * Send email
     */
    sendEmail(params: {
        FromEmailAddress: string;
        Destination: {
            ToAddresses?: string[];
            CcAddresses?: string[];
            BccAddresses?: string[];
        };
        Content: {
            Simple?: {
                Subject: {
                    Data: string;
                    Charset?: string;
                };
                Body: {
                    Text?: {
                        Data: string;
                        Charset?: string;
                    };
                    Html?: {
                        Data: string;
                        Charset?: string;
                    };
                };
            };
            Raw?: {
                Data: string;
            };
            Template?: {
                TemplateName: string;
                TemplateData?: string;
            };
        };
        ReplyToAddresses?: string[];
        ConfigurationSetName?: string;
    }): Promise<SendEmailResult>;
    /**
     * Send bulk email
     */
    sendBulkEmail(params: {
        FromEmailAddress: string;
        BulkEmailEntries: Array<{
            Destination: {
                ToAddresses?: string[];
                CcAddresses?: string[];
                BccAddresses?: string[];
            };
            ReplacementEmailContent?: {
                ReplacementTemplate?: {
                    ReplacementTemplateData?: string;
                };
            };
        }>;
        DefaultContent: {
            Template: {
                TemplateName: string;
                TemplateData?: string;
            };
        };
        ConfigurationSetName?: string;
    }): Promise<{
        BulkEmailEntryResults?: Array<{
            Status?: string;
            Error?: string;
            MessageId?: string;
        }>;
    }>;
    /**
     * Create email template
     */
    createEmailTemplate(params: {
        TemplateName: string;
        TemplateContent: {
            Subject?: string;
            Text?: string;
            Html?: string;
        };
    }): Promise<void>;
    /**
     * Get email template
     */
    getEmailTemplate(templateName: string): Promise<{
        TemplateName?: string;
        TemplateContent?: {
            Subject?: string;
            Text?: string;
            Html?: string;
        };
    }>;
    /**
     * Delete email template
     */
    deleteEmailTemplate(templateName: string): Promise<void>;
    /**
     * List email templates
     */
    listEmailTemplates(params?: {
        PageSize?: number;
        NextToken?: string;
    }): Promise<{
        TemplatesMetadata?: Array<{
            TemplateName?: string;
            CreatedTimestamp?: string;
        }>;
        NextToken?: string;
    }>;
    /**
     * Get sending statistics
     */
    getSendStatistics(): Promise<{
        SendDataPoints?: Array<{
            Timestamp?: string;
            DeliveryAttempts?: number;
            Bounces?: number;
            Complaints?: number;
            Rejects?: number;
        }>;
    }>;
    /**
     * Get sending quota
     */
    getSendQuota(): Promise<{
        Max24HourSend?: number;
        MaxSendRate?: number;
        SentLast24Hours?: number;
    }>;
    /**
     * Verify a domain identity
     */
    verifyDomain(domain: string): Promise<{
        dkimTokens?: string[];
        verificationStatus?: string;
    }>;
    /**
     * Send a simple text email
     */
    sendSimpleEmail(params: {
        from: string;
        to: string | string[];
        subject: string;
        text?: string;
        html?: string;
        replyTo?: string | string[];
    }): Promise<SendEmailResult>;
    /**
     * Send a templated email
     */
    sendTemplatedEmail(params: {
        from: string;
        to: string | string[];
        templateName: string;
        templateData: Record<string, any>;
        replyTo?: string | string[];
    }): Promise<SendEmailResult>;
    /**
     * Get DKIM DNS records for a domain
     */
    getDkimRecords(domain: string): Promise<Array<{
        name: string;
        type: string;
        value: string;
    }>>;
    /**
     * Check if domain is verified
     */
    isDomainVerified(domain: string): Promise<boolean>;
    /**
     * Wait for domain verification
     */
    waitForDomainVerification(domain: string, maxAttempts?: number, delayMs?: number): Promise<boolean>;
    /**
     * Build form-encoded body for SES v1 API
     */
    private buildFormBody;
    /**
     * Create a receipt rule set
     * Uses SES v1 API
     */
    createReceiptRuleSet(ruleSetName: string): Promise<void>;
    /**
     * Delete a receipt rule set
     */
    deleteReceiptRuleSet(ruleSetName: string): Promise<void>;
    /**
     * Set the active receipt rule set
     */
    setActiveReceiptRuleSet(ruleSetName: string): Promise<void>;
    /**
     * List receipt rule sets
     */
    listReceiptRuleSets(nextToken?: string): Promise<{
        RuleSets?: Array<{
            Name?: string;
            CreatedTimestamp?: string;
        }>;
        NextToken?: string;
    }>;
    /**
     * Describe a receipt rule set
     */
    describeReceiptRuleSet(ruleSetName: string): Promise<{
        Metadata?: {
            Name?: string;
            CreatedTimestamp?: string;
        };
        Rules?: Array<{
            Name?: string;
            Enabled?: boolean;
            Recipients?: string[];
            Actions?: Array<{
                S3Action?: {
                    BucketName?: string;
                    ObjectKeyPrefix?: string;
                };
                LambdaAction?: {
                    FunctionArn?: string;
                    InvocationType?: string;
                };
                SNSAction?: {
                    TopicArn?: string;
                };
            }>;
        }>;
    }>;
    /**
     * Create a receipt rule
     */
    createReceiptRule(params: {
        RuleSetName: string;
        Rule: {
            Name: string;
            Enabled?: boolean;
            TlsPolicy?: 'Require' | 'Optional';
            Recipients?: string[];
            ScanEnabled?: boolean;
            Actions: Array<{
                S3Action?: {
                    BucketName: string;
                    ObjectKeyPrefix?: string;
                    KmsKeyArn?: string;
                };
                LambdaAction?: {
                    FunctionArn: string;
                    InvocationType?: 'Event' | 'RequestResponse';
                };
                SNSAction?: {
                    TopicArn: string;
                    Encoding?: 'UTF-8' | 'Base64';
                };
                StopAction?: {
                    Scope: 'RuleSet';
                    TopicArn?: string;
                };
            }>;
        };
        After?: string;
    }): Promise<void>;
    /**
     * Delete a receipt rule
     */
    deleteReceiptRule(ruleSetName: string, ruleName: string): Promise<void>;
    /**
     * Check if receipt rule set exists
     */
    receiptRuleSetExists(ruleSetName: string): Promise<boolean>;
    /**
     * Get the active receipt rule set
     */
    getActiveReceiptRuleSet(): Promise<{
        Metadata?: {
            Name?: string;
            CreatedTimestamp?: string;
        };
        Rules?: Array<{
            Name?: string;
            Enabled?: boolean;
            Recipients?: string[];
            Actions?: Array<{
                S3Action?: {
                    BucketName?: string;
                    ObjectKeyPrefix?: string;
                };
                LambdaAction?: {
                    FunctionArn?: string;
                    InvocationType?: string;
                };
                SNSAction?: {
                    TopicArn?: string;
                };
            }>;
        }>;
    } | null>;
    /**
     * Update a receipt rule
     */
    updateReceiptRule(params: {
        RuleSetName: string;
        Rule: {
            Name: string;
            Enabled?: boolean;
            TlsPolicy?: 'Require' | 'Optional';
            Recipients?: string[];
            ScanEnabled?: boolean;
            Actions: Array<{
                S3Action?: {
                    BucketName: string;
                    ObjectKeyPrefix?: string;
                    KmsKeyArn?: string;
                };
                LambdaAction?: {
                    FunctionArn: string;
                    InvocationType?: 'Event' | 'RequestResponse';
                };
                SNSAction?: {
                    TopicArn: string;
                    Encoding?: 'UTF-8' | 'Base64';
                };
                StopAction?: {
                    Scope: 'RuleSet';
                    TopicArn?: string;
                };
            }>;
        };
    }): Promise<void>;
    /**
     * Send raw email (for SMTP relay)
     * Uses SES v1 API SendRawEmail action
     */
    sendRawEmail(params: {
        source: string;
        destinations: string[];
        rawMessage: string;
    }): Promise<{
        MessageId?: string;
    }>;
    /**
     * Get a suppressed destination from the account suppression list (SESv2)
     */
    getSuppressedDestination(emailAddress: string): Promise<{
        EmailAddress: string;
        Reason: string;
        LastUpdateTime: string;
    } | null>;
    /**
     * Remove an email address from the account suppression list (SESv2)
     */
    deleteSuppressedDestination(emailAddress: string): Promise<void>;
}
