import { type PathBuilderLike } from "path-ts"; /** * One parsed record: the raw column strings, in the authority's declared order. */ export type TabularRow = ReadonlyArray; /** * Maps each table to a file and to its column positions, as recorded in the archive's dictionary. */ export interface TabularDictionary { /** * Logical table name → file base name, from `mstab.txt`. */ files: ReadonlyMap; /** * Logical table name → column name → zero-based position, from `mstabcol.txt`. */ columns: ReadonlyMap>; } /** * Read the archive's table and column dictionaries. * * @throws {Error} When either bootstrap file is missing or isn't the declared width. */ export declare function readTabularDictionary(tabularDirectory: PathBuilderLike): Promise; /** * A reader over one logical table, projecting the columns a caller names. * * The projection selects columns by name and throws when a name is missing. * This prevents a silently dropped column from appearing downstream as an empty dataset, * the failure behind the repository's worst measurement bugs. */ export interface TabularTable { /** * One record per row, already projected to the requested columns. */ rows: ReadonlyArray>; /** * The count of records the file held, before projection. */ recordCount: number; } /** * Read a logical ssurgo table, projecting `wanted` columns. * * @throws {Error} When the archive declares no file for the table, when a requested column isn't in * the shipped dictionary, or when a record is narrower than the position a requested column sits at. */ export declare function readTable(tabularDirectory: PathBuilderLike, dictionary: TabularDictionary, table: string, wanted: ReadonlyArray): Promise; /** * One declared domain member, with the authority's own definition. */ export interface DomainMember { domain: string; code: string; definition: string; sequence: number; } /** * Read the authority's declared domains out of the archive. * * @throws {Error} When the file isn't the declared width. */ export declare function readDeclaredDomains(tabularDirectory: PathBuilderLike): Promise; /** * The declared members of one domain, keyed by code. */ export declare function domainCodes(members: ReadonlyArray, domain: string): Set; /** * `M/D/yyyy H:MM:SS` (and the `MM/DD/yyyy HH:MM:SS` the tabular export writes) to an ISO date. * * Soil Data Access writes `9/9/2025 1:57:25 PM`. * The shipped `sacatlog.txt` writes the same instant as `09/09/2025 13:57:25`. * * The download URL needs `2025-09-09`. * Both channels agree only when the code parses the value as a date instead of slicing the string. * * @throws {Error} When the value isn't one of those shapes. * An incorrect freshness date requests a nonexistent file. * The host returns 400 for the request. * A 404 would identify a missing file. */ export declare function saverestToISODate(value: string): string; //# sourceMappingURL=tabular.d.ts.map