/** * Idempotency keys store the response of a previously-handled request keyed * by `(scope, key)`. Replays of the same key with the same body hash return * the stored response; replays with a *different* body hash conflict (409). * * Designed for non-idempotent POST endpoints — primarily booking creation, * payment intent issuance, and similar money-affecting flows where a * client retry must not produce duplicate side effects. * * Rows expire after `expiresAt`. Cleanup is the deployment's responsibility * (typically a daily cron sweep). * * `scope` namespaces keys per endpoint family so that two unrelated * endpoints can safely accept overlapping keys without colliding. * * `bodyHash` is a SHA-256 of the canonical request body — when the same * key replays with the same hash, we return `responseStatus` / * `responseBody` verbatim. Different hash → 409. * * `referenceId` (optional) lets callers point at the resource the original * request created — typically a booking id — so that operational queries * can correlate replays with the underlying entity. */ export declare const infraIdempotencyKeysTable: Omit; scope: import("drizzle-orm/pg-core").PgColumn<{ name: "scope"; tableName: "idempotency_keys"; dataType: "string"; columnType: "PgText"; data: string; driverParam: string; notNull: true; hasDefault: false; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: [string, ...string[]]; baseColumn: never; identity: undefined; generated: undefined; }, {}, {}>; key: import("drizzle-orm/pg-core").PgColumn<{ name: "key"; tableName: "idempotency_keys"; dataType: "string"; columnType: "PgText"; data: string; driverParam: string; notNull: true; hasDefault: false; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: [string, ...string[]]; baseColumn: never; identity: undefined; generated: undefined; }, {}, {}>; bodyHash: import("drizzle-orm/pg-core").PgColumn<{ name: "body_hash"; tableName: "idempotency_keys"; dataType: "string"; columnType: "PgText"; data: string; driverParam: string; notNull: true; hasDefault: false; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: [string, ...string[]]; baseColumn: never; identity: undefined; generated: undefined; }, {}, {}>; responseStatus: import("drizzle-orm/pg-core").PgColumn<{ name: "response_status"; tableName: "idempotency_keys"; dataType: "number"; columnType: "PgInteger"; data: number; driverParam: string | number; notNull: true; hasDefault: false; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: undefined; baseColumn: never; identity: undefined; generated: undefined; }, {}, {}>; responseBody: import("drizzle-orm/pg-core").PgColumn<{ name: "response_body"; tableName: "idempotency_keys"; dataType: "json"; columnType: "PgJsonb"; data: unknown; driverParam: unknown; notNull: true; hasDefault: false; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: undefined; baseColumn: never; identity: undefined; generated: undefined; }, {}, {}>; referenceId: import("drizzle-orm/pg-core").PgColumn<{ name: "reference_id"; tableName: "idempotency_keys"; dataType: "string"; columnType: "PgText"; data: string; driverParam: string; notNull: false; hasDefault: false; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: [string, ...string[]]; baseColumn: never; identity: undefined; generated: undefined; }, {}, {}>; createdAt: import("drizzle-orm/pg-core").PgColumn<{ name: "created_at"; tableName: "idempotency_keys"; dataType: "date"; columnType: "PgTimestamp"; data: Date; driverParam: string; notNull: true; hasDefault: true; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: undefined; baseColumn: never; identity: undefined; generated: undefined; }, {}, {}>; expiresAt: import("drizzle-orm/pg-core").PgColumn<{ name: "expires_at"; tableName: "idempotency_keys"; dataType: "date"; columnType: "PgTimestamp"; data: Date; driverParam: string; notNull: true; hasDefault: false; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: undefined; baseColumn: never; identity: undefined; generated: undefined; }, {}, {}>; }; dialect: "pg"; }>, "enableRLS">; export type InsertInfraIdempotencyKey = typeof infraIdempotencyKeysTable.$inferInsert; export type SelectInfraIdempotencyKey = typeof infraIdempotencyKeysTable.$inferSelect; //# sourceMappingURL=idempotency_keys.d.ts.map