/** * Async write intents (RFC voyant#1687 Phase 3.2 — the queued write * pipeline's result mailbox). * * An intent is "a write the caller asked for but didn't wait for": the * route validates the payload, stores it here, durably emits a * `.requested` event (transactional outbox), and answers * **202 + a status URL**. The outbox delivers the event to the intent's * handler — with the outbox's at-least-once retries, backoff, and * dead-lettering — and the handler writes the outcome back onto the * row. Under a payday spike, callers get instant 202s and the work * drains at the outbox's controlled pace instead of thundering-herding * the booking transaction. * * Dedup: `idempotency_key` is unique — a retried POST with the same key * returns the SAME intent rather than enqueueing twice. * * Status semantics: `pending` until a handler settles it. Handlers * distinguish FINAL business outcomes (capacity conflict → `failed` * with a result payload, never retried) from infra errors (thrown → * the outbox retries). A stale sweep fails intents whose event * dead-lettered. */ export declare const writeIntentsTable: Omit; kind: import("drizzle-orm/pg-core").PgColumn<{ name: "kind"; tableName: "write_intents"; 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; }, {}, {}>; payload: import("drizzle-orm/pg-core").PgColumn<{ name: "payload"; tableName: "write_intents"; 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; }, {}, {}>; idempotencyKey: import("drizzle-orm/pg-core").PgColumn<{ name: "idempotency_key"; tableName: "write_intents"; 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; }, {}, {}>; status: import("drizzle-orm/pg-core").PgColumn<{ name: "status"; tableName: "write_intents"; dataType: "string"; columnType: "PgText"; data: "failed" | "pending" | "succeeded"; driverParam: string; notNull: true; hasDefault: true; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: ["pending", "succeeded", "failed"]; baseColumn: never; identity: undefined; generated: undefined; }, {}, {}>; result: import("drizzle-orm/pg-core").PgColumn<{ name: "result"; tableName: "write_intents"; dataType: "json"; columnType: "PgJsonb"; data: unknown; driverParam: unknown; notNull: false; hasDefault: false; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: undefined; baseColumn: never; identity: undefined; generated: undefined; }, {}, {}>; error: import("drizzle-orm/pg-core").PgColumn<{ name: "error"; tableName: "write_intents"; 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: "write_intents"; 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; }, {}, {}>; completedAt: import("drizzle-orm/pg-core").PgColumn<{ name: "completed_at"; tableName: "write_intents"; dataType: "date"; columnType: "PgTimestamp"; data: Date; driverParam: string; notNull: false; hasDefault: false; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: undefined; baseColumn: never; identity: undefined; generated: undefined; }, {}, {}>; }; dialect: "pg"; }>, "enableRLS">; export type WriteIntentRow = typeof writeIntentsTable.$inferSelect; //# sourceMappingURL=write_intents.d.ts.map