import { type CanonicalRow, type CorpusAdapter } from "#types"; /** * Registry id for this adapter, and the source directory its fetcher writes. */ export declare const NC_OPT_AGENCES_ADAPTER_ID = "nc-opt-agences"; /** * The license the publisher's dataset record states. */ export declare const NC_OPT_AGENCES_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 NC_OPT_AGENCES_ATTRIBUTION = "Office des postes et t\u00E9l\u00E9communications de Nouvelle-Cal\u00E9donie (OPT-NC), Localisation des agences OPT-NC, via data.gouv.nc"; /** * The file the fetcher writes and the adapter reads, one GeoJSON feature per line. */ export declare const NC_OPT_AGENCES_FILENAME = "agences.geojsonl"; /** * The properties of one agency as the fetcher writes them: the service's fields in * lower case, a field the service left empty written as `null`. */ export interface OPTNCAgencyProperties { objectid: number; id: number | null; texte: string | null; type: string | null; nom: string | null; adresse: string | null; code_postal: string | null; ville: string | null; globalid: string | null; } /** * One agency as the fetcher writes it. */ export interface OPTNCAgencyFeature { type: "Feature"; geometry: { type: "Point"; coordinates: [longitude: number, latitude: number]; } | null; properties: OPTNCAgencyProperties; } /** * Why a feature yielded no row. */ export declare const OPTNCRefusal: { readonly IdentifierAbsent: "row:identifier-absent"; readonly NameAbsent: "row:name-absent"; /** * `code_postal` isn't New Caledonia's five digits beginning `988`. */ readonly PostcodeAbsent: "row:postcode-absent"; readonly LocalityAbsent: "row:locality-absent"; readonly StreetLineAbsent: "row:street-line-absent"; /** * The street line holds a digit the line reader cannot place, or a street-type word with no name. */ readonly StreetLineUnread: "row:street-line-unread"; readonly Unrenderable: "row:unrenderable"; }; export type OPTNCRefusal = (typeof OPTNCRefusal)[keyof typeof OPTNCRefusal]; /** * An agency's address as labeled components, or the reason it has none. */ export declare function readOPTNCAddress(properties: Pick): { readonly components: CanonicalRow["components"]; } | { readonly refused: OPTNCRefusal; }; /** * Read one feature into a corpus row, or report why it yielded none. */ export declare function readOPTNCAgency(feature: OPTNCAgencyFeature): { admitted: CanonicalRow; } | { refused: OPTNCRefusal; }; export declare function createOPTNCAgencesAdapter(): CorpusAdapter; /** * The configured adapter instance registered with the corpus builder. */ export declare const optNCAgencesAdapter: CorpusAdapter; //# sourceMappingURL=adapter.d.ts.map