import { type ProductionDataset, type RawProductionRecord } from "./schemas.js"; export interface ProductionRecordConnectorContext { signal?: AbortSignal; } export interface ProductionConnectorProvenance { connectorId: string; connectorKind: "api" | "database" | "file" | "memory" | "custom"; sourceId?: string; retrievedAt: string; rowCount: number; endpoint?: string; table?: string; queryRef?: string; contentSha256?: string; redactedConfig?: unknown; } export interface ProductionConnectorFetchResult { records: RawProductionRecord[]; provenance?: ProductionConnectorProvenance; } export interface ProductionRecordConnector { connectorId: string; connectorKind: "api" | "database" | "file" | "memory" | "custom"; fetchProductionRecords: (context?: ProductionRecordConnectorContext) => Promise | RawProductionRecord[] | ProductionConnectorFetchResult; } export type ProductionRecordSource = { kind: "records"; records: RawProductionRecord[]; sourcePackId?: string; } | { kind: "dataset"; dataset: ProductionDataset; } | { kind: "connector"; connector: ProductionRecordConnector; sourcePackId?: string; } | { kind: "file"; path: string; sourcePackId?: string; defaultSourceId?: string; }; export interface LoadProductionDatasetFromFileOptions { sourcePackId?: string; defaultSourceId?: string; } export interface LoadedProductionDataset { dataset: ProductionDataset; provenance?: ProductionConnectorProvenance; } export declare function productionDatasetFromRecords(records: RawProductionRecord[], sourcePackId?: string): ProductionDataset; export declare function loadProductionDatasetFromSource(source: ProductionRecordSource, context?: ProductionRecordConnectorContext): Promise; export declare function loadProductionDatasetWithProvenance(source: ProductionRecordSource, context?: ProductionRecordConnectorContext): Promise; export declare function loadProductionDatasetFromFile(path: string, options?: LoadProductionDatasetFromFileOptions): Promise; export declare function normalizeCsvHeader(value: string): string; export declare function parseCsvRows(csv: string): Record[]; export declare function csvPick(row: Record, ...names: string[]): string | undefined; export declare function csvNumeric(row: Record, ...names: string[]): number | undefined; export declare function parseProductionCsv(csv: string, defaultSourceId?: string): RawProductionRecord[]; export declare function redactSecrets(value: unknown): unknown; export declare function stableContentHash(value: unknown): string; export interface ConnectorProvenanceInput { connectorId: string; connectorKind: ProductionConnectorProvenance["connectorKind"]; rowCount: number; sourceId?: string; endpoint?: string; table?: string; queryRef?: string; records?: unknown; redactedConfig?: unknown; } export declare function connectorProvenance(input: ConnectorProvenanceInput): ProductionConnectorProvenance; //# sourceMappingURL=ingestion.d.ts.map