diff --git a/packages/checkout/src/api/data.ts b/packages/checkout/src/api/data.ts index 179f71a5..99f32ed5 100644 --- a/packages/checkout/src/api/data.ts +++ b/packages/checkout/src/api/data.ts @@ -255,3 +255,107 @@ export const fetchSardineOrderStatus = async (orderId: string, isDev: boolean) = console.log('json:', json) return json } + +export interface Country { + code: string, +} + +export const fetchSupportedCountryCodes = async (): Promise => { + // Can also be fetches from sardine api + const supportedCountries = [ + 'AL', + 'AO', + 'AT', + 'BB', + 'BE', + 'BZ', + 'BJ', + 'BO', + 'BR', + 'BG', + 'KH', + 'KY', + 'CL', + 'CO', + 'KM', + 'CR', + 'HR', + 'CY', + 'CZ', + 'DK', + 'DM', + 'DO', + 'EC', + 'EG', + 'SV', + 'GQ', + 'EE', + 'FO', + 'FI', + 'FR', + 'GF', + 'DE', + 'GR', + 'GN', + 'GW', + 'GY', + 'HT', + 'HN', + 'HU', + 'IS', + 'ID', + 'IE', + 'IL', + 'IT', + 'JM', + 'JP', + 'KG', + 'LA', + 'LV', + 'LI', + 'LT', + 'LU', + 'MG', + 'MY', + 'MV', + 'MT', + 'MR', + 'MX', + 'MN', + 'MZ', + 'NL', + 'NO', + 'OM', + 'PA', + 'PY', + 'PE', + 'PH', + 'PL', + 'PT', + 'RO', + 'KN', + 'MF', + 'SA', + 'SC', + 'SG', + 'SK', + 'SI', + 'KR', + 'ES', + 'LK', + 'SE', + 'CH', + 'TZ', + 'TH', + 'TT', + 'TR', + 'AE', + 'GB', + 'UY', + 'UZ', + 'VU', + 'VN', + ] + + return supportedCountries.map(countryCode => ({ code: countryCode })) +} \ No newline at end of file diff --git a/packages/checkout/src/index.tsx b/packages/checkout/src/index.tsx index 64be7bb2..6606c1dc 100644 --- a/packages/checkout/src/index.tsx +++ b/packages/checkout/src/index.tsx @@ -1,3 +1,4 @@ export * from './hooks' export * from './contexts' export * from './shared/components' +export * from './api' \ No newline at end of file