import { DataSource } from "../storage.mjs"; import { TenantCtx } from "@gscdump/contracts"; interface IndexingMetadataRecord { url: string; capturedAt: string; /** ISO-8601 notifyTime of the latest `URL_UPDATED` notification we've seen. */ latestUpdateAt?: string; /** ISO-8601 notifyTime of the latest `URL_REMOVED` notification we've seen. */ latestRemoveAt?: string; raw?: unknown; } interface IndexingMetadataIndex { version: 1; records: Record; } interface IndexingMetadataStore { writeBatch: (ctx: TenantCtx, records: readonly IndexingMetadataRecord[]) => Promise; loadIndex: (ctx: TenantCtx) => Promise; getLatest: (ctx: TenantCtx, url: string) => Promise; } interface CreateIndexingMetadataStoreOptions { dataSource: DataSource; hash?: (url: string) => string; } declare function createIndexingMetadataStore(opts: CreateIndexingMetadataStoreOptions): IndexingMetadataStore; export { CreateIndexingMetadataStoreOptions, IndexingMetadataIndex, IndexingMetadataRecord, IndexingMetadataStore, createIndexingMetadataStore };