import { type CanonicalRow, type CorpusAdapter } from "#types"; /** * Registry id for this adapter. * * Stamped into every row it emits, so a corpus record can be traced back to the dataset it came from. */ export declare const FR_FINESS_ADAPTER_ID = "fr-finess-overseas"; /** * The license data.gouv.fr states for the dataset: `fr-lo`, Licence Ouverte / Open Licence version 1.0. */ export declare const FR_FINESS_LICENSE = "Licence Ouverte 1.0"; /** * The credit Licence Ouverte requires: the producer's name, beside the date of the data's last update. */ export declare const FR_FINESS_ATTRIBUTION = "FINESS, Minist\u00E8re des Solidarit\u00E9s et de la Sant\u00E9, via data.gouv.fr (finess-extraction-du-fichier-des-etablissements)"; /** * The jurisdiction each overseas `departement` code belongs to. * * `9A` also holds Saint-Barthélemy and Saint-Martin. {@linkcode FINESS_COUNTRY_BY_POSTCODE} separates them. */ export declare const FINESS_COUNTRY_BY_DEPARTEMENT: Readonly>; /** * The two Guadeloupe-coded postcodes that belong to separate jurisdictions. */ export declare const FINESS_COUNTRY_BY_POSTCODE: Readonly>; /** * Every jurisdiction this adapter can emit. */ export declare const FR_FINESS_COUNTRIES: readonly string[]; /** * The establishment categories whose address can be a private dwelling: FINESS * categories `462` (lieux de vie et d'accueil), `238` (specialized family reception) * and `236` (services de placement familial). */ export declare const FINESS_FAMILY_PLACEMENT_CATEGORIES: ReadonlySet; /** * The positions, counted from 0, of the columns this adapter reads. * * Each entry gives the publisher's column name and what the column holds. */ export declare const FinessColumn: { /** * `section`, which is `structureet` on every establishment line. */ readonly Section: 0; /** * `rs`, the establishment's name, truncated by the publisher to 38 characters. */ readonly Name: 3; /** * `rslongue`, the establishment's name up to 60 characters. */ readonly LongName: 4; /** * `numvoie`. */ readonly StreetNumber: 7; /** * `typvoie`, a TRE-R35 code. */ readonly StreetType: 8; /** * `voie`. */ readonly StreetName: 9; /** * `compvoie`. */ readonly RepetitionIndex: 10; /** * `lieuditbp`. */ readonly LieuDitOrBox: 11; /** * `departement`. */ readonly Departement: 13; /** * `ligneacheminement`. */ readonly RoutingLine: 15; /** * `categetab`. */ readonly Category: 18; }; export type FinessColumn = (typeof FinessColumn)[keyof typeof FinessColumn]; /** * Why a line didn't become a row. */ export declare const FinessRefusal: { /** * The line isn't a `structureet` record, as the comment on line 1 isn't. */ readonly NotEstablishment: "row:not-establishment"; /** * The establishment's `departement` is metropolitan. */ readonly NotOverseas: "row:not-overseas"; /** * The establishment's category places people in a private dwelling. */ readonly FamilyPlacement: "row:family-placement"; /** * The address is written care of a person. */ readonly CareOfPerson: "row:care-of-person"; /** * The routing line isn't a five-digit postcode followed by a locality and an optional `CEDEX`. */ readonly RoutingLineUnparsed: "row:routing-line-unparsed"; /** * `typvoie` holds a code neither the codex nor TRE-R35's local transcription resolves. */ readonly VoieTypeUnknown: "row:voie-type-unknown"; /** * `compvoie` is `C`, which the publisher's coding reads as quinquies and the data reads as a letter. */ readonly RepetitionIndexAmbiguous: "row:repetition-index-ambiguous"; /** * A house number with no street name. */ readonly NumberWithoutStreet: "row:number-without-street"; /** * A street type with no name after it. */ readonly StreetNameAbsent: "row:street-name-absent"; /** * The street name holds a digit that doesn't name the street. */ readonly StreetDigitUnplaced: "row:street-digit-unplaced"; /** * The lieu-dit holds a digit, as a floor, a building or a lot does and a place doesn't. */ readonly LieuDitDigitUnplaced: "row:lieu-dit-digit-unplaced"; /** * The address gives a locality and a venue without a street, a lieu-dit or a box. */ readonly DeliveryLineAbsent: "row:delivery-line-absent"; /** * The jurisdiction's layout doesn't print every component the row holds. */ readonly Unrenderable: "row:unrenderable"; /** * Another establishment already produced this exact row. */ readonly Duplicate: "row:duplicate"; }; export type FinessRefusal = (typeof FinessRefusal)[keyof typeof FinessRefusal]; /** * Why an admitted row left out a value the record holds. */ export declare const FinessTrim: { /** * The lieu-dit line names part of a building or a landmark (`IMMEUBLE SEMAFA`), which isn't a place. */ readonly LieuDitPremiseDescriptor: "component:dependent_locality:premise-descriptor"; }; export type FinessTrim = (typeof FinessTrim)[keyof typeof FinessTrim]; /** * What one record yielded: a row with the values it left out, or the reason it yielded none. */ export type FinessReading = { readonly admitted: CanonicalRow; readonly trimmed: readonly FinessTrim[]; } | { readonly refused: FinessRefusal; }; /** * The jurisdiction of an establishment, from its `departement` code and, under `9A`, its postcode. */ export declare function finessCountry(departement: string, postcode: string): string | null; /** * Read one CSV record into a row, or report why it yielded none. * * Exported because the refusal reasons are what this adapter is measured by: a caller reading the * whole extract counts them per reason rather than observing a row count it cannot account for. */ export declare function readFinessRecord(cells: readonly string[]): FinessReading; export declare function createFinessAdapter(): CorpusAdapter; /** * The configured adapter instance registered with the corpus builder. */ export declare const finessAdapter: CorpusAdapter; //# sourceMappingURL=adapter.d.ts.map