/**
 * SMTP Client Constants and Error Codes
 * All constants, error codes, and enums for SMTP client operations
 */
/**
 * SMTP response codes
 */
export const SMTP_CODES = {
    // Positive completion replies
    SERVICE_READY: 220,
    SERVICE_CLOSING: 221,
    AUTHENTICATION_SUCCESSFUL: 235,
    REQUESTED_ACTION_OK: 250,
    USER_NOT_LOCAL: 251,
    CANNOT_VERIFY_USER: 252,
    // Positive intermediate replies
    START_MAIL_INPUT: 354,
    // Transient negative completion replies
    SERVICE_NOT_AVAILABLE: 421,
    MAILBOX_BUSY: 450,
    LOCAL_ERROR: 451,
    INSUFFICIENT_STORAGE: 452,
    UNABLE_TO_ACCOMMODATE: 455,
    // Permanent negative completion replies
    SYNTAX_ERROR: 500,
    SYNTAX_ERROR_PARAMETERS: 501,
    COMMAND_NOT_IMPLEMENTED: 502,
    BAD_SEQUENCE: 503,
    PARAMETER_NOT_IMPLEMENTED: 504,
    MAILBOX_UNAVAILABLE: 550,
    USER_NOT_LOCAL_TRY_FORWARD: 551,
    EXCEEDED_STORAGE: 552,
    MAILBOX_NAME_NOT_ALLOWED: 553,
    TRANSACTION_FAILED: 554
};
/**
 * SMTP command names
 */
export const SMTP_COMMANDS = {
    HELO: 'HELO',
    EHLO: 'EHLO',
    MAIL_FROM: 'MAIL FROM',
    RCPT_TO: 'RCPT TO',
    DATA: 'DATA',
    RSET: 'RSET',
    NOOP: 'NOOP',
    QUIT: 'QUIT',
    STARTTLS: 'STARTTLS',
    AUTH: 'AUTH'
};
/**
 * Authentication methods
 */
export const AUTH_METHODS = {
    PLAIN: 'PLAIN',
    LOGIN: 'LOGIN',
    OAUTH2: 'XOAUTH2',
    CRAM_MD5: 'CRAM-MD5'
};
/**
 * Common SMTP extensions
 */
export const SMTP_EXTENSIONS = {
    PIPELINING: 'PIPELINING',
    SIZE: 'SIZE',
    STARTTLS: 'STARTTLS',
    AUTH: 'AUTH',
    EIGHT_BIT_MIME: '8BITMIME',
    CHUNKING: 'CHUNKING',
    ENHANCED_STATUS_CODES: 'ENHANCEDSTATUSCODES',
    DSN: 'DSN'
};
/**
 * Default configuration values
 */
export const DEFAULTS = {
    CONNECTION_TIMEOUT: 60000, // 60 seconds
    SOCKET_TIMEOUT: 300000, // 5 minutes
    COMMAND_TIMEOUT: 30000, // 30 seconds
    MAX_CONNECTIONS: 5,
    MAX_MESSAGES: 100,
    PORT_SMTP: 25,
    PORT_SUBMISSION: 587,
    PORT_SMTPS: 465,
    RETRY_ATTEMPTS: 3,
    RETRY_DELAY: 1000,
    POOL_IDLE_TIMEOUT: 30000 // 30 seconds
};
/**
 * Error types for classification
 */
export var SmtpErrorType;
(function (SmtpErrorType) {
    SmtpErrorType["CONNECTION_ERROR"] = "CONNECTION_ERROR";
    SmtpErrorType["AUTHENTICATION_ERROR"] = "AUTHENTICATION_ERROR";
    SmtpErrorType["PROTOCOL_ERROR"] = "PROTOCOL_ERROR";
    SmtpErrorType["TIMEOUT_ERROR"] = "TIMEOUT_ERROR";
    SmtpErrorType["TLS_ERROR"] = "TLS_ERROR";
    SmtpErrorType["SYNTAX_ERROR"] = "SYNTAX_ERROR";
    SmtpErrorType["MAILBOX_ERROR"] = "MAILBOX_ERROR";
    SmtpErrorType["QUOTA_ERROR"] = "QUOTA_ERROR";
    SmtpErrorType["UNKNOWN_ERROR"] = "UNKNOWN_ERROR";
})(SmtpErrorType || (SmtpErrorType = {}));
/**
 * Regular expressions for parsing
 */
export const REGEX_PATTERNS = {
    EMAIL_ADDRESS: /^[^\s@]+@[^\s@]+\.[^\s@]+$/,
    RESPONSE_CODE: /^(\d{3})([ -])(.*)/,
    ENHANCED_STATUS: /^(\d\.\d\.\d)\s/,
    AUTH_CAPABILITIES: /AUTH\s+(.+)/i,
    SIZE_EXTENSION: /SIZE\s+(\d+)/i
};
/**
 * Line endings and separators
 */
export const LINE_ENDINGS = {
    CRLF: '\r\n',
    LF: '\n',
    CR: '\r'
};
/**
 * Connection states for internal use
 */
export const CONNECTION_STATES = {
    DISCONNECTED: 'disconnected',
    CONNECTING: 'connecting',
    CONNECTED: 'connected',
    AUTHENTICATED: 'authenticated',
    READY: 'ready',
    BUSY: 'busy',
    CLOSING: 'closing',
    ERROR: 'error'
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vdHMvbWFpbC9kZWxpdmVyeS9zbXRwY2xpZW50L2NvbnN0YW50cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7O0dBR0c7QUFFSDs7R0FFRztBQUNILE1BQU0sQ0FBQyxNQUFNLFVBQVUsR0FBRztJQUN4Qiw4QkFBOEI7SUFDOUIsYUFBYSxFQUFFLEdBQUc7SUFDbEIsZUFBZSxFQUFFLEdBQUc7SUFDcEIseUJBQXlCLEVBQUUsR0FBRztJQUM5QixtQkFBbUIsRUFBRSxHQUFHO0lBQ3hCLGNBQWMsRUFBRSxHQUFHO0lBQ25CLGtCQUFrQixFQUFFLEdBQUc7SUFFdkIsZ0NBQWdDO0lBQ2hDLGdCQUFnQixFQUFFLEdBQUc7SUFFckIsd0NBQXdDO0lBQ3hDLHFCQUFxQixFQUFFLEdBQUc7SUFDMUIsWUFBWSxFQUFFLEdBQUc7SUFDakIsV0FBVyxFQUFFLEdBQUc7SUFDaEIsb0JBQW9CLEVBQUUsR0FBRztJQUN6QixxQkFBcUIsRUFBRSxHQUFHO0lBRTFCLHdDQUF3QztJQUN4QyxZQUFZLEVBQUUsR0FBRztJQUNqQix1QkFBdUIsRUFBRSxHQUFHO0lBQzVCLHVCQUF1QixFQUFFLEdBQUc7SUFDNUIsWUFBWSxFQUFFLEdBQUc7SUFDakIseUJBQXlCLEVBQUUsR0FBRztJQUM5QixtQkFBbUIsRUFBRSxHQUFHO0lBQ3hCLDBCQUEwQixFQUFFLEdBQUc7SUFDL0IsZ0JBQWdCLEVBQUUsR0FBRztJQUNyQix3QkFB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