/** * Provider-agnostic external cruise catalog refresh. * * Reconciles both local browse/search projections (`cruise_search_index`) and, * when catalog runtime dependencies are supplied, catalog sourced entries plus * catalog search slices. The service never imports a concrete provider. */ import type { DocumentBuilder, FieldPolicyRegistry, IndexerService } from "@voyant-travel/catalog"; import { type SourceAdapterRegistry, type SyncProgressEvent, type SyncSourcesSummary } from "@voyant-travel/catalog/booking-engine"; import type { PostgresJsDatabase } from "drizzle-orm/postgres-js"; import { type ExternalAdapterRefreshResult } from "./service-search.js"; export interface ExternalCruiseCatalogRefreshOptions { db: PostgresJsDatabase; /** * Optional catalog source registry. Supplying it lets the refresh update * `catalog_sourced_entries` and catalog search slices from cruise shims. */ sourceAdapterRegistry?: SourceAdapterRegistry; indexerService?: IndexerService; fieldPolicyRegistries?: ReadonlyMap; wrapCatalogBuilder?: (builder: DocumentBuilder) => DocumentBuilder; onCatalogProgress?: (event: SyncProgressEvent) => void; } export interface ExternalCruiseCatalogRefreshResult { cruiseSearchIndex: { adapters: Array<{ adapter: string; } & ExternalAdapterRefreshResult>; upserted: number; removed: number; errors: Array<{ adapter: string; error: string; }>; }; catalog?: SyncSourcesSummary; } export declare function refreshExternalCruiseCatalog(options: ExternalCruiseCatalogRefreshOptions): Promise;