/** * @module RateLimiter */ import { type RateLimiterBlockedState } from "../../rate-limiter/contracts/rate-limiter-state.contract.js"; import { type InferInstance } from "../../utilities/_module.js"; /** * The error is throw when rate limiter blocks the attempts. * * IMPORT_PATH: `"@daiso-tech/core/rate-limiter/contracts"` * @group Errors */ export declare class BlockedRateLimiterError extends Error { readonly state: Omit; static create(state: Omit, key: string, cause?: unknown): BlockedRateLimiterError; /** * Note: Do not instantiate `BlockedRateLimiterError` directly via the constructor. Use the static `create()` factory method instead. * The constructor remains public only to maintain compatibility with errorPolicy types and prevent type errors. * @internal */ constructor(state: Omit, message?: string, cause?: unknown); } /** * IMPORT_PATH: `"@daiso-tech/core/rate-limiter/contracts"` * @group Errors */ export declare const RATE_LIMITER_ERRORS: { readonly Blocked: typeof BlockedRateLimiterError; }; /** * IMPORT_PATH: `"@daiso-tech/core/rate-limiter/contracts"` * @group Errors */ export type AllRateLimiterErrors = InferInstance<(typeof RATE_LIMITER_ERRORS)[keyof typeof RATE_LIMITER_ERRORS]>; /** * IMPORT_PATH: `"@daiso-tech/core/rate-limiter/contracts"` * @group Errors */ export declare function isRateLimiterError(value: unknown): value is AllRateLimiterErrors;