import type { Config } from "../config.js"; import type { JobPayload } from "../types.js"; /** * Server middleware that catches OverLimitError and reschedules jobs. * Follows Sidekiq Enterprise behavior: * - Linear backoff starting at ~5 minutes * - Maximum 20 reschedules (~1 day total) * - After max reschedules, job fails normally */ export declare class RateLimitMiddleware { config?: Config; call(_instance: unknown, payload: JobPayload, _queue: string, next: () => Promise | unknown): Promise; private handleOverLimit; private calculateBackoff; } /** * Ensures the RateLimitMiddleware is registered. * Call this in your configuration if using rate limiters in jobs. */ export declare const ensureRateLimitMiddleware: (config: Config) => void; //# sourceMappingURL=middleware.d.ts.map