/** * Structured, app-friendly address. Field semantics match the AlfaDocs * Italian patient-address model: `province` is the 2-letter IT province * code (UPPERCASED) and `country` is the ISO 3166-1 alpha-2 code * (lowercased), matching how the platform stores them. */ export interface StructuredAddress { /** Street line — route, with the street number joined when present. */ street: string; /** Town / city (locality, falling back to postal_town / admin level 3). */ city: string; /** Postal / ZIP code. */ postcode: string; /** Province — admin level 2 short code, UPPERCASED (e.g. "MI", "RM"). */ province: string; /** Country — ISO alpha-2, lowercased (e.g. "it", "gb"). */ country: string; /** Google's human-readable formatted address (whole line). */ formatted: string; } /** * Loosened address-component shape accepted by {@link parseAddressComponents}. * Mirrors both Places-API (`longText`/`shortText`) and classic Geocoder * (`long_name`/`short_name`) field names so either source parses without a * pre-pass. `types` is required; the text fields are individually optional. */ export interface RawAddressComponent { types: string[]; longText?: string | null; shortText?: string | null; long_name?: string | null; short_name?: string | null; } /** * Maps an array of Google address components to a {@link StructuredAddress}. * * Pure: no SDK calls, no DOM, no I/O. `formatted` is passed through from the * caller (Google's `formattedAddress` / `formatted_address`) because it is * not derivable from the component list. * * Mapping rules: * - `street` = `route`, prefixed with `street_number` when present * (e.g. "Via Roma 12"). Either part alone is used if the * other is missing. * - `city` = `locality`, falling back to `postal_town`, then * `administrative_area_level_3`. * - `postcode` = `postal_code`. * - `province` = `administrative_area_level_2` SHORT text, UPPERCASED. * - `country` = `country` SHORT text (ISO alpha-2), lowercased. */ export declare function parseAddressComponents(components: readonly RawAddressComponent[], formatted?: string): StructuredAddress; //# sourceMappingURL=parse-address.d.ts.map