@autobusal/providers 1.37.11 → 1.37.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/types/locations.ts +47 -4
package/package.json
CHANGED
package/types/locations.ts
CHANGED
|
@@ -17,12 +17,28 @@ export interface CountryStats {
|
|
|
17
17
|
|
|
18
18
|
export interface CountryData {
|
|
19
19
|
id: number
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The name in the caller's language, already resolved server-side.
|
|
23
|
+
*
|
|
24
|
+
* Edited: Claude - Date: 2026-08-21
|
|
25
|
+
* Comes from ICU/CLDR keyed by `iso2`, so all 15 locales are answered
|
|
26
|
+
* without anybody storing anything - `translations` below is only for the
|
|
27
|
+
* handful CLDR cannot serve (England, Scotland and Wales are not ISO
|
|
28
|
+
* countries) or where a brand overrules it.
|
|
29
|
+
*/
|
|
20
30
|
name: string
|
|
21
|
-
|
|
22
|
-
|
|
31
|
+
|
|
32
|
+
/** Hand-written overrides only, and almost always empty. ADMIN READS ONLY. */
|
|
33
|
+
translations?: Record<string, string>
|
|
34
|
+
|
|
23
35
|
slug?: string
|
|
24
36
|
cities?: CityData[]
|
|
25
37
|
iso_code: string
|
|
38
|
+
|
|
39
|
+
/** ISO 3166-1 alpha-2 - what the CLDR name lookup is keyed by */
|
|
40
|
+
iso2?: string | null
|
|
41
|
+
|
|
26
42
|
available?: number
|
|
27
43
|
stats?: CountryStats
|
|
28
44
|
|
|
@@ -64,9 +80,36 @@ export interface CityDestination {
|
|
|
64
80
|
|
|
65
81
|
export interface CityData {
|
|
66
82
|
id: number
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* The name in the caller's language, already resolved server-side.
|
|
86
|
+
*
|
|
87
|
+
* Edited: Claude - Date: 2026-08-21
|
|
88
|
+
* This used to be an SQL alias for `name_en`/`name_sq`, the only two
|
|
89
|
+
* columns the table had, so 13 of the 15 UI locales silently read English.
|
|
90
|
+
* It is now resolved from a per-locale map with the English column as the
|
|
91
|
+
* fallback - the field is the same, the answer is right in every language.
|
|
92
|
+
* The ADMIN endpoints deliberately still answer with English here: it is
|
|
93
|
+
* the canonical value their form edits.
|
|
94
|
+
*/
|
|
67
95
|
name: string
|
|
68
|
-
|
|
69
|
-
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* {locale: name} for the other 14 languages. ADMIN READS ONLY - the public
|
|
99
|
+
* endpoints resolve `name` and omit this.
|
|
100
|
+
*/
|
|
101
|
+
translations?: Record<string, string>
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Every name this place is known by, in any language or script, for
|
|
105
|
+
* MATCHING what a visitor types - never for display. Served only by
|
|
106
|
+
* /api/cities/browse, the one list the search box filters against.
|
|
107
|
+
*/
|
|
108
|
+
aliases?: string[]
|
|
109
|
+
|
|
110
|
+
/** e.g. "Q17151" - what the admin picker stores so the backfill can re-run */
|
|
111
|
+
wikidata_id?: string | null
|
|
112
|
+
|
|
70
113
|
location: string[]
|
|
71
114
|
slug: string
|
|
72
115
|
douane?: number
|