229 lines
3.8 KiB
TypeScript
229 lines
3.8 KiB
TypeScript
/**
|
||
* Static options for GET /users filters (`country`, `region`).
|
||
* Country: common English short names (ISO-style), sorted A–Z.
|
||
* Region: Ethiopia — federal regions & chartered cities (typical `users.region` values).
|
||
*/
|
||
|
||
const COUNTRY_NAMES_RAW = [
|
||
"Afghanistan",
|
||
"Albania",
|
||
"Algeria",
|
||
"Andorra",
|
||
"Angola",
|
||
"Antigua and Barbuda",
|
||
"Argentina",
|
||
"Armenia",
|
||
"Australia",
|
||
"Austria",
|
||
"Azerbaijan",
|
||
"Bahamas",
|
||
"Bahrain",
|
||
"Bangladesh",
|
||
"Barbados",
|
||
"Belarus",
|
||
"Belgium",
|
||
"Belize",
|
||
"Benin",
|
||
"Bhutan",
|
||
"Bolivia",
|
||
"Bosnia and Herzegovina",
|
||
"Botswana",
|
||
"Brazil",
|
||
"Brunei",
|
||
"Bulgaria",
|
||
"Burkina Faso",
|
||
"Burundi",
|
||
"Cabo Verde",
|
||
"Cambodia",
|
||
"Cameroon",
|
||
"Canada",
|
||
"Central African Republic",
|
||
"Chad",
|
||
"Chile",
|
||
"China",
|
||
"Colombia",
|
||
"Comoros",
|
||
"Congo",
|
||
"Costa Rica",
|
||
"Croatia",
|
||
"Cuba",
|
||
"Cyprus",
|
||
"Czechia",
|
||
"Democratic Republic of the Congo",
|
||
"Denmark",
|
||
"Djibouti",
|
||
"Dominica",
|
||
"Dominican Republic",
|
||
"Ecuador",
|
||
"Egypt",
|
||
"El Salvador",
|
||
"Equatorial Guinea",
|
||
"Eritrea",
|
||
"Estonia",
|
||
"Eswatini",
|
||
"Ethiopia",
|
||
"Fiji",
|
||
"Finland",
|
||
"France",
|
||
"Gabon",
|
||
"Gambia",
|
||
"Georgia",
|
||
"Germany",
|
||
"Ghana",
|
||
"Greece",
|
||
"Grenada",
|
||
"Guatemala",
|
||
"Guinea",
|
||
"Guinea-Bissau",
|
||
"Guyana",
|
||
"Haiti",
|
||
"Honduras",
|
||
"Hungary",
|
||
"Iceland",
|
||
"India",
|
||
"Indonesia",
|
||
"Iran",
|
||
"Iraq",
|
||
"Ireland",
|
||
"Israel",
|
||
"Italy",
|
||
"Jamaica",
|
||
"Japan",
|
||
"Jordan",
|
||
"Kazakhstan",
|
||
"Kenya",
|
||
"Kiribati",
|
||
"Kuwait",
|
||
"Kyrgyzstan",
|
||
"Laos",
|
||
"Latvia",
|
||
"Lebanon",
|
||
"Lesotho",
|
||
"Liberia",
|
||
"Libya",
|
||
"Liechtenstein",
|
||
"Lithuania",
|
||
"Luxembourg",
|
||
"Madagascar",
|
||
"Malawi",
|
||
"Malaysia",
|
||
"Maldives",
|
||
"Mali",
|
||
"Malta",
|
||
"Marshall Islands",
|
||
"Mauritania",
|
||
"Mauritius",
|
||
"Mexico",
|
||
"Micronesia",
|
||
"Moldova",
|
||
"Monaco",
|
||
"Mongolia",
|
||
"Montenegro",
|
||
"Morocco",
|
||
"Mozambique",
|
||
"Myanmar",
|
||
"Namibia",
|
||
"Nauru",
|
||
"Nepal",
|
||
"Netherlands",
|
||
"New Zealand",
|
||
"Nicaragua",
|
||
"Niger",
|
||
"Nigeria",
|
||
"North Korea",
|
||
"North Macedonia",
|
||
"Norway",
|
||
"Oman",
|
||
"Pakistan",
|
||
"Palau",
|
||
"Panama",
|
||
"Papua New Guinea",
|
||
"Paraguay",
|
||
"Peru",
|
||
"Philippines",
|
||
"Poland",
|
||
"Portugal",
|
||
"Qatar",
|
||
"Romania",
|
||
"Russia",
|
||
"Rwanda",
|
||
"Saint Kitts and Nevis",
|
||
"Saint Lucia",
|
||
"Saint Vincent and the Grenadines",
|
||
"Samoa",
|
||
"San Marino",
|
||
"Sao Tome and Principe",
|
||
"Saudi Arabia",
|
||
"Senegal",
|
||
"Serbia",
|
||
"Seychelles",
|
||
"Sierra Leone",
|
||
"Singapore",
|
||
"Slovakia",
|
||
"Slovenia",
|
||
"Solomon Islands",
|
||
"Somalia",
|
||
"South Africa",
|
||
"South Korea",
|
||
"South Sudan",
|
||
"Spain",
|
||
"Sri Lanka",
|
||
"Sudan",
|
||
"Suriname",
|
||
"Sweden",
|
||
"Switzerland",
|
||
"Syria",
|
||
"Tajikistan",
|
||
"Tanzania",
|
||
"Thailand",
|
||
"Timor-Leste",
|
||
"Togo",
|
||
"Tonga",
|
||
"Trinidad and Tobago",
|
||
"Tunisia",
|
||
"Turkey",
|
||
"Turkmenistan",
|
||
"Tuvalu",
|
||
"Uganda",
|
||
"Ukraine",
|
||
"United Arab Emirates",
|
||
"United Kingdom",
|
||
"United States",
|
||
"Uruguay",
|
||
"Uzbekistan",
|
||
"Vanuatu",
|
||
"Vatican City",
|
||
"Venezuela",
|
||
"Vietnam",
|
||
"Yemen",
|
||
"Zambia",
|
||
"Zimbabwe",
|
||
] as const
|
||
|
||
/** English short names, A–Z (for `<select>` options). */
|
||
export const USER_FILTER_COUNTRIES: readonly string[] = [...COUNTRY_NAMES_RAW].sort((a, b) =>
|
||
a.localeCompare(b, "en"),
|
||
)
|
||
|
||
/**
|
||
* Ethiopia — regions & chartered cities (canonical spelling for filters).
|
||
* Backend matches case-insensitively; use these labels so UI aligns with stored data.
|
||
*/
|
||
export const USER_FILTER_ETHIOPIA_REGIONS = [
|
||
"Addis Ababa",
|
||
"Afar",
|
||
"Amhara",
|
||
"Benishangul-Gumuz",
|
||
"Dire Dawa",
|
||
"Gambela Peoples' Region",
|
||
"Harari",
|
||
"Oromia",
|
||
"Sidama",
|
||
"Somali",
|
||
"Southern Nations, Nationalities, and Peoples' Region",
|
||
"South West Ethiopia Peoples' Region",
|
||
"Tigray",
|
||
] as const satisfies readonly string[]
|
||
|
||
export type UserFilterEthiopiaRegion = (typeof USER_FILTER_ETHIOPIA_REGIONS)[number]
|