UNPKG

@humanmark/sdk-js

Version:

Browser-native JavaScript SDK for Humanmark human verification challenges

43 lines 1.33 kB
/** * Retry configuration constants * Controls retry behavior for API requests */ /** * Time unit conversion constants */ export declare const TIME_UNITS: { /** Milliseconds per second */ readonly MS_PER_SECOND: 1000; /** Milliseconds per minute */ readonly MS_PER_MINUTE: 60000; }; export declare const RETRY_CONFIG: { /** Maximum number of retry attempts */ readonly MAX_RETRIES: 20; /** Initial delay before first retry in milliseconds */ readonly INITIAL_DELAY_MS: 1000; /** Factor by which to multiply the delay for each retry */ readonly BACKOFF_FACTOR: 2; /** Random jitter factor to prevent thundering herd (±10%) */ readonly JITTER_FACTOR: 0.1; }; /** * Timeout configuration constants * Different timeout values for various operations */ export declare const TIMEOUT_CONFIG: { /** Total timeout for wait challenge operation (10 minutes) */ readonly WAIT_CHALLENGE_TOTAL_MS: number; /** Single request timeout (must be > 25s server timeout) */ readonly SINGLE_REQUEST_MS: number; }; /** * Special timeout values */ export declare const SPECIAL_VALUES: { /** Return value indicating no expiry is set */ readonly NO_EXPIRY: -1; /** Minimum value for time calculations */ readonly MIN_TIME: 0; }; //# sourceMappingURL=retry.d.ts.map