start the path to rust

This commit is contained in:
2026-02-10 15:54:09 +00:00
parent 237dba3bab
commit 8bd8c295b0
318 changed files with 28352 additions and 428 deletions

View File

@@ -0,0 +1,28 @@
/**
* SMTP Client Error Handler
* Error classification and recovery strategies
*/
import { SmtpErrorType } from './constants.js';
import type { ISmtpResponse, ISmtpErrorContext, ISmtpClientOptions } from './interfaces.js';
export declare class SmtpErrorHandler {
private options;
constructor(options: ISmtpClientOptions);
/**
* Classify error type based on response or error
*/
classifyError(error: Error | ISmtpResponse, context?: ISmtpErrorContext): SmtpErrorType;
/**
* Determine if error is retryable
*/
isRetryable(errorType: SmtpErrorType, response?: ISmtpResponse): boolean;
/**
* Get retry delay for error type
*/
getRetryDelay(attempt: number, errorType: SmtpErrorType): number;
/**
* Create enhanced error with context
*/
createError(message: string, errorType: SmtpErrorType, context?: ISmtpErrorContext, originalError?: Error): Error;
private classifyErrorByMessage;
private classifyErrorByCode;
}