import { type CanonicalRow, type CorpusAdapter } from "#types"; /** * Registry id for this adapter, and the source directory its fetcher writes. */ export declare const FR_LAPOSTE_POINCONT_ADAPTER_ID = "fr-laposte-poincont"; /** * The license the publisher's dataset record states. */ export declare const FR_LAPOSTE_POINCONT_LICENSE = "Licence Ouverte 2.0"; /** * The credit Licence Ouverte 2.0 requires: the licensor's name, beside the date of the data's last update. */ export declare const FR_LAPOSTE_POINCONT_ATTRIBUTION = "La Poste - Branche R\u00E9seau, Liste des bureaux de poste, agences postales et relais poste (laposte-poincont2), via data.laposte.fr"; /** * The file the fetcher writes and the adapter reads, one row per line. */ export declare const LAPOSTE_POINCONT_FILENAME = "laposte-poincont2.jsonl"; /** * The dataset fields the fetcher keeps, in the publisher's spelling. */ export declare const LAPOSTE_POINCONT_FIELDS: readonly ["identifiant_a", "libelle_du_site", "caracteristique_du_site", "adresse", "complement_d_adresse", "lieu_dit", "code_postal", "localite", "code_insee", "pays", "latitude", "longitude", "precision_du_geocodage"]; /** * One row as the fetcher writes it. * A field the publisher left empty is `null`. */ export type LaPostePoincontRecord = Readonly>>; /** * Why a row yielded no corpus row. */ export declare const LaPosteRefusal: { /** * The site is outside France (`pays` isn't `FRANCE`). */ readonly NotFrance: "row:not-france"; /** * The row has no identifier. */ readonly IdentifierAbsent: "row:identifier-absent"; /** * The label is empty once its type code is dropped. */ readonly NameAbsent: "row:name-absent"; /** * `code_postal` isn't five digits. */ readonly PostcodeAbsent: "row:postcode-absent"; readonly LocalityAbsent: "row:locality-absent"; /** * `adresse` is empty. */ readonly StreetLineAbsent: "row:street-line-absent"; /** * `adresse` holds a digit the line reader cannot place, or a street-type word with no name. */ readonly StreetLineUnread: "row:street-line-unread"; /** * The complement identifies the site's keeper by an honorific (`MME CHAMBARD`). */ readonly KeeperNamed: "row:keeper-named"; /** * The jurisdiction's layout doesn't print every component the row holds. */ readonly Unrenderable: "row:unrenderable"; }; export type LaPosteRefusal = (typeof LaPosteRefusal)[keyof typeof LaPosteRefusal]; /** * Why an admitted row left out a field the record holds. */ export declare const LaPosteTrim: { /** * `complement_d_adresse` was left out. */ readonly Complement: "component:complement:unread"; }; /** * The site's name: its label without the trailing type code, or `null` when the label held only the code. */ export declare function laPosteSiteName(record: Pick): string | null; /** * Whether the row's complement identifies the site's keeper by an honorific. */ export declare function laPosteNamesKeeper(record: Pick): boolean; /** * Whether the site is a post office rather than a parcel partner. */ export declare function isLaPostePostOffice(record: Pick): boolean; /** * One row's address as labeled components with its jurisdiction, or the reason it has none. */ export declare function readLaPosteAddress(record: LaPostePoincontRecord): { readonly country: string; readonly components: CanonicalRow["components"]; } | { readonly refused: LaPosteRefusal; }; /** * Read one row into a corpus row, or report why it yielded none. */ export declare function readLaPosteRecord(record: LaPostePoincontRecord): { readonly admitted: CanonicalRow; readonly trimmed: boolean; } | { readonly refused: LaPosteRefusal; }; export declare function createLaPostePoincontAdapter(): CorpusAdapter; /** * The configured adapter instance registered with the corpus builder. */ export declare const laPostePoincontAdapter: CorpusAdapter; //# sourceMappingURL=adapter.d.ts.map