import type { IdempotencyConfig, IdempotencyStore } from './types.js'; import type { DB } from '../../data/db/index.js'; import type { Manifold } from '../../core/pipework.js'; export interface IdempotencyMiddleware { readonly store: IdempotencyStore; readonly config: Required; check(db: DB, tenantId: string, key: string, method: string, path: string): Promise<{ status: 'new'; } | { status: 'locked'; } | { status: 'completed'; statusCode: number; body: unknown; }>; complete(db: DB, tenantId: string, key: string, statusCode: number, body: unknown): Promise; fail(db: DB, tenantId: string, key: string): Promise; cleanup(db: DB): Promise; } export declare function createIdempotency(instance: Manifold, config: IdempotencyConfig): IdempotencyMiddleware; //# sourceMappingURL=middleware.d.ts.map