/** * Emits BAN, the French national address register, as address records for the address layer's key tables. */ import { type BANAddrRecord } from "@mailwoman/ban/sdk/extract"; import { type AddressName, type AddressRecord } from "@mailwoman/resolver-wof-sqlite/address/record"; import type { PathBuilderLike } from "path-ts"; /** * The wire source id the BAN address-point database writes on every row. */ export declare const BAN_ADDRESS_SOURCE = "ban:fr"; /** * The city an arrondissement's commune belongs to, or `null` for a commune that's not an arrondissement. */ export declare function arrondissementCity(commune: string): string | null; /** * The ISO 3166-2 code of a metropolitan commune's région, such as `FR-IDF` for INSEE * `75103`, read from the département its code opens with. * * An overseas commune lies in its own ISO 3166-1 country, so it has none. */ export declare function banSubdivision(country: string, codeInsee: string | null): string | null; /** * Every place name in a BAN row, by level. * * `nom_commune` is the written locality, with the city beside it when the commune is an arrondissement. * `libelle_acheminement` is the postal locality and `nom_ancienne_commune` a written locality, * since a letter may still be addressed to a merged commune's former name. * * A cleaned `nom_ld` is a dependent locality. * A pair of level and key is kept once, under the first form that produced it. */ export declare function banAddressNames(record: BANAddrRecord): AddressName[]; /** * The address record for one BAN row. * * The house number joins `numero` and `rep` (`8 bis`), so it keys the way a parsed number does. * The country is the commune's own ISO 3166-1 code, so a Guadeloupe address lies in `GP`. */ export declare function banAddressRecord(record: BANAddrRecord): AddressRecord | null; /** * Streams the address records of one BAN département dump, `adresses-.csv` or its `.csv.gz`. */ export declare function readBANAddressRecords(csvPath: PathBuilderLike): AsyncGenerator; //# sourceMappingURL=ban.d.ts.map