import { AdaptiveConfig, RateLimiter } from "./limiter.cjs"; //#region src/utils/rate-limit.d.ts interface RateLimitConfig { /** * Maximum number of MAPI requests to start per second. * Defaults to 6. Capped at 1000. */ requestsPerSecond?: number; /** * @deprecated Use `requestsPerSecond` instead. * @todo(next-major): Remove this field. */ maxConcurrency?: number; /** * Adapt the rate to what the API actually sustains: back off multiplicatively * whenever a request is throttled, recover additively while none is. * * Rate limits are enforced per token, but each client instance paces itself * alone, so parallel builds or workers sharing a token overrun the quota * between them. Adaptation lets them settle at a rate the token sustains. * The limit never rises above the one the client would have used anyway. * * Pass an object to tune it, or `false` to pin the rate to `requestsPerSecond`. * @default true */ adaptive?: boolean | AdaptiveConfig; /** * Replaces the in-memory limiter, which paces each instance independently. * * Supply one backed by shared storage (Redis, Upstash, …) to hold a fleet of * instances to a single quota proactively rather than by reacting to 429s. * `requestsPerSecond` and `adaptive` do not apply to a custom limiter; the * rate the client would have used is passed to it as `context.limit`. */ limiter?: RateLimiter; } //#endregion export { RateLimitConfig }; //# sourceMappingURL=rate-limit.d.cts.map