/** * Validation-table ingestion — stores a raw validation table into MongoDB. * * Each document is identified by `(domain, version)` and contains the full * raw_table.json structure. There are no changelogs — every call replaces the * existing document for that build. * * Usage: * ```ts * import { ingestValidationTable } from "@ondc/build-tools/store"; * * await ingestValidationTable(db, { * domain: "ONDC:RET10", * version: "2.0.0", * table: rawTableJson, * }); * ``` */ import type { Db } from "mongodb"; import type { ValidationTableAction } from "./schemas.js"; export interface IngestValidationTableInput { domain: string; version: string; /** The raw_table.json content — a map from action name → action table. */ table: Record; } export interface IngestValidationTableResult { domain: string; version: string; /** Number of actions stored in the table. */ actionCount: number; } /** * Upserts a validation table document into `build_validation_table`. * Identified by `(domain, version)` — always replaces any existing document. * * @param db - A connected MongoDB `Db` instance. The caller owns the connection. * @param input - The domain, version, and raw table to store. * @returns Summary of what was ingested. */ export declare function ingestValidationTable(db: Db, input: IngestValidationTableInput): Promise; //# sourceMappingURL=ingest.d.ts.map