/** * Joins each US address-layer source id to the register rows its data comes from, * and reads each row's terms for redistribution. * * The join goes through `us-situs-sources.json`, the table the situs databases already read: * `overture:`, `openaddresses:` and `usgov-nad` each map to register rows. * A source the table doesn't map is returned with no rows, so a reader reports it as uncovered. */ import type { PathBuilderLike } from "path-ts"; import { type RegisterRowTerms, type RegisterTermsInput } from "#source-register/terms"; /** * The register rows one layer source maps to, each with its terms for redistribution. */ export interface USAddressSourceTerms { source: string; /** * The rows in the table's order: the publishing body's own row first, * then any aggregator it reached the layer through. * * Empty when the table maps the source to no row. */ rows: readonly RegisterRowTerms[]; } /** * Reads a layer source's register terms. */ export type USAddressSourceTermsReader = (source: string) => USAddressSourceTerms; /** * Reads the register and the source table once, and returns a reader over both. * * @param register The committed register when absent. * @param tablePath The committed `us-situs-sources.json` when absent. * @throws When the table doesn't exist, naming it. */ export declare function readUSAddressSourceTerms(register?: RegisterTermsInput, tablePath?: PathBuilderLike): Promise; //# sourceMappingURL=source-terms.d.ts.map