/** * Sourced-entry store — durable provenance + projection capture for every * non-owned entity that lands in the catalog plane via `discover()`. * * This is the load-bearing prerequisite for the content cache, the read * service, drift invalidation, and snapshot capture. All of them assume * there's a durable local row per sourced entity that records *what we * know about it locally* — provenance (which adapter, which connection, * which upstream id), lifecycle (when first seen, when last seen, whether * still active), and the canonical local copy of the indexed projection. * * Owned entities do NOT have a row here — `provenance.source_kind === * "owned"` reads provenance from the vertical's owned schema. The * sourced-entry store is sourced-only. * * See `docs/architecture/catalog-sourced-content.md` §2.5 for the full * design. */ import type { SourceFreshness } from "./contract.js"; /** * Lifecycle status for a sourced entry. Independent of any drift / hold * the booking engine might apply — this tracks whether the upstream still * advertises the entity, not whether it's bookable right now. */ export type SourcedEntryStatus = "active" | "withdrawn" | "delisted"; /** * `catalog_sourced_entries` — single durable record per sourced entity, * keyed two ways: by Voyant-side `(entity_module, entity_id)` for * read-path lookup, and by upstream-side `(source_kind, * source_connection_id, source_ref)` for discover-time idempotency. * * The `projection` JSONB column is the canonical local copy of what * `adapter.discover()` returned. Read it for thin-content synthesis (when * the adapter declares `supportsContentFetch: false`) and for * provenance-aware dispatch — never the search index. Search indexes are * optimized for full-text/facet queries, not point-reads of rich detail. */ export declare const catalogSourcedEntriesTable: import("drizzle-orm/pg-core").PgTableWithColumns<{ name: "catalog_sourced_entries"; schema: undefined; columns: { id: import("drizzle-orm/pg-core").PgColumn<{ name: string; tableName: "catalog_sourced_entries"; dataType: "string"; columnType: "PgText"; data: string; driverParam: string; notNull: true; hasDefault: true; isPrimaryKey: true; isAutoincrement: false; hasRuntimeDefault: true; enumValues: [string, ...string[]]; baseColumn: never; identity: undefined; generated: undefined; }, {}, {}>; entity_module: import("drizzle-orm/pg-core").PgColumn<{ name: "entity_module"; tableName: "catalog_sourced_entries"; 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; }, {}, {}>; entity_id: import("drizzle-orm/pg-core").PgColumn<{ name: "entity_id"; tableName: "catalog_sourced_entries"; 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; }, {}, {}>; source_kind: import("drizzle-orm/pg-core").PgColumn<{ name: "source_kind"; tableName: "catalog_sourced_entries"; 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; }, {}, { $type: string; }>; source_provider: import("drizzle-orm/pg-core").PgColumn<{ name: "source_provider"; tableName: "catalog_sourced_entries"; 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; }, {}, {}>; source_connection_id: import("drizzle-orm/pg-core").PgColumn<{ name: "source_connection_id"; tableName: "catalog_sourced_entries"; 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; }, {}, {}>; source_ref: import("drizzle-orm/pg-core").PgColumn<{ name: "source_ref"; tableName: "catalog_sourced_entries"; 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; }, {}, {}>; source_freshness: import("drizzle-orm/pg-core").PgColumn<{ name: "source_freshness"; tableName: "catalog_sourced_entries"; dataType: "string"; columnType: "PgText"; data: SourceFreshness; driverParam: string; notNull: true; hasDefault: false; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: [string, ...string[]]; baseColumn: never; identity: undefined; generated: undefined; }, {}, { $type: SourceFreshness; }>; last_sourced_at: import("drizzle-orm/pg-core").PgColumn<{ name: "last_sourced_at"; tableName: "catalog_sourced_entries"; 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; }, {}, {}>; status: import("drizzle-orm/pg-core").PgColumn<{ name: "status"; tableName: "catalog_sourced_entries"; dataType: "string"; columnType: "PgText"; data: SourcedEntryStatus; driverParam: string; notNull: true; hasDefault: true; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: [string, ...string[]]; baseColumn: never; identity: undefined; generated: undefined; }, {}, { $type: SourcedEntryStatus; }>; first_seen_at: import("drizzle-orm/pg-core").PgColumn<{ name: "first_seen_at"; tableName: "catalog_sourced_entries"; 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; }, {}, {}>; last_seen_at: import("drizzle-orm/pg-core").PgColumn<{ name: "last_seen_at"; tableName: "catalog_sourced_entries"; 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; }, {}, {}>; projection: import("drizzle-orm/pg-core").PgColumn<{ name: "projection"; tableName: "catalog_sourced_entries"; dataType: "json"; columnType: "PgJsonb"; data: Record; driverParam: unknown; notNull: true; hasDefault: false; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: undefined; baseColumn: never; identity: undefined; generated: undefined; }, {}, { $type: Record; }>; projection_etag: import("drizzle-orm/pg-core").PgColumn<{ name: "projection_etag"; tableName: "catalog_sourced_entries"; 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; }, {}, {}>; projection_seen_at: import("drizzle-orm/pg-core").PgColumn<{ name: "projection_seen_at"; tableName: "catalog_sourced_entries"; 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; }, {}, {}>; created_at: import("drizzle-orm/pg-core").PgColumn<{ name: "created_at"; tableName: "catalog_sourced_entries"; 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; }, {}, {}>; updated_at: import("drizzle-orm/pg-core").PgColumn<{ name: "updated_at"; tableName: "catalog_sourced_entries"; 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; }, {}, {}>; }; dialect: "pg"; }>; export type InsertCatalogSourcedEntry = typeof catalogSourcedEntriesTable.$inferInsert; export type SelectCatalogSourcedEntry = typeof catalogSourcedEntriesTable.$inferSelect; //# sourceMappingURL=schema-sourced-entries.d.ts.map