/**
 * Error injection utilities for testing retry middleware behavior e2e.
 *
 * Provides pre-defined error scenarios that can be injected into mock streams
 * to test how the retry middleware handles different provider errors.
 */
/**
 * Error scenario configuration.
 *
 * Defines how errors should be injected into the stream and whether
 * the stream should eventually succeed.
 */
export interface ErrorScenario {
    /** Human-readable name for the scenario */
    name: string;
    /** Description of what this scenario tests */
    description: string;
    /** Errors to inject (one per retry attempt) */
    errors: Array<{
        type: string;
        message: string;
        /** Optional delay before this error (simulates network latency) */
        delayMs?: number;
        /** If true, throw the error instead of sending an error chunk (tests catch block) */
        shouldThrow?: boolean;
    }>;
    /** Whether the stream should succeed after all errors */
    eventuallySucceeds: boolean;
    /** Mock content to return on success (if eventuallySucceeds is true) */
    successContent?: string;
}
/**
 * Pre-defined error scenarios for testing.
 */
export declare const ERROR_SCENARIOS: Record<string, ErrorScenario>;
/**
 * Generates an error chunk in the AI SDK format.
 *
 * @param errorType - Standardized error type (e.g., "rate_limit_error")
 * @param message - Error message
 * @returns Error chunk ready to be injected into a stream
 */
export declare function createErrorChunk(errorType: string, message: string): {
    type: string;
    error: {
        statusCode?: number | undefined;
        headers?: {
            "retry-after": string;
        } | undefined;
        type: string;
        message: string;
    };
};
/**
 * Generates mock chunks for an error scenario.
 *
 * Creates a sequence of chunks that includes:
 * - Initial step-start
 * - Text content (if partial success before error)
 * - Error chunk
 * - Success chunks (if eventuallySucceeds is true)
 * - Final step-finish/finish chunks
 *
 * @param scenario - The error scenario to generate chunks for
 * @param attemptNumber - Current retry attempt (0-indexed, 0 = first attempt)
 * @returns Array of chunks ready to be streamed
 */
export declare function generateErrorScenarioChunks(scenario: ErrorScenario, attemptNumber: number): any[];
//# sourceMappingURL=error-mocks.d.ts.map