fetchIsoCodesStateDefinitions
fetchIsoCodesStateDefinitions(
options):Promise<IsoCodesStateDefinitions>
Defined in: packages/simply-settings-core/src/address/isoCodes/index.ts:77
Downloads ISO 3166-2 data from a source and converts it to state definitions. Nothing is cached or written to disk.
Parameters
Section titled “Parameters”options
Section titled “options”FetchIsoCodesStateDefinitionsOptions
The source, an optional version, allLevels, and HTTP settings.
Returns
Section titled “Returns”Promise<IsoCodesStateDefinitions>
The definitions, with the source, version, and URL they came from.
Throws
Section titled “Throws”SfError (UnsupportedIsoCodesSourceError) for an unknown source; otherwise whatever the
source’s adapter throws, or (InvalidIsoCodesDataError) when its data fails validation.