/** * Base class for all errors emitted by the idempotency middleware. * * The error carries the intended HTTP status on both `statusCode` and `status` * so that any Express error handler — including the framework's built-in * `finalhandler`, which reads `err.status || err.statusCode` — derives the * correct response code instead of falling back to a generic `500`. * * Consumers can branch on the concrete subclass with `instanceof`. */ export declare class IdempotencyError extends Error { /** Intended HTTP status code (e.g. 409, 417). */ readonly statusCode: number; /** Alias of {@link statusCode} for error handlers that read `status`. */ readonly status: number; /** * @param message Human-readable error message. * @param statusCode HTTP status code to surface to the caller. */ constructor(message: string, statusCode: number); } /** * Raised when a request reuses an idempotency key whose previous request is * still in progress (no response cached yet). Surfaces as HTTP `409 Conflict`, * signalling the caller to retry later. */ export declare class IdempotencyConflictError extends IdempotencyError { constructor(message?: string); } /** * Raised when an idempotency key is reused on a request that does not match the * original one (intent mismatch). Surfaces as HTTP `417 Expectation Failed`, * signalling the caller to correct the request. */ export declare class IdempotencyIntentMismatchError extends IdempotencyError { constructor(message?: string); }