import { Class, Logger, RetryConfig } from '@boostercloud/framework-types'; /** * Retries an async function if it fails with an error that matches the given class. * * @param logicToRetry Async function to retry * @param errorClassThatRetries Error class. If the async function fails with an error that matches this class, it will be retried. * @param logger Logger to use for logging. If not provided, no logging will be performed. * @param maxRetries Maximum number of retries. If not provided, the default is 1000. * @returns The result of the first successful retry. */ export declare function retryIfError(logicToRetry: (tryNumber?: number) => Promise, errorClassThatRetries: Class, logger?: Logger, maxRetries?: number): Promise; /** * Retries an async function with exponential backoff and jitter. * @param logicToRetry Async function to retry * @param config Retry configuration * @param logger Optional logger for retry attempts * @returns The result of the first successful retry */ export declare function retryWithBackoff(logicToRetry: () => Promise, config: RetryConfig, logger?: Logger): Promise; /** * Calculates the delay for a retry attempt using exponential backoff with jitter. * @param attempt Current attempt number (1-based) * @param config Retry configuration * @returns Delay in milliseconds */ export declare function calculateRetryDelay(attempt: number, config: RetryConfig): number;