arky-sdk 0.3.80 → 0.3.82
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/dist/index.cjs +17 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -2
- package/dist/index.d.ts +20 -2
- package/dist/index.js +17 -1
- package/dist/index.js.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +0 -1
- package/dist/types.d.ts +0 -1
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -23,6 +23,20 @@ interface HttpClientConfig {
|
|
|
23
23
|
isAuthenticated?: () => boolean;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
interface LocationState {
|
|
27
|
+
code: string;
|
|
28
|
+
name: string;
|
|
29
|
+
}
|
|
30
|
+
interface LocationCountry {
|
|
31
|
+
code: string;
|
|
32
|
+
name: string;
|
|
33
|
+
states: LocationState[];
|
|
34
|
+
}
|
|
35
|
+
interface GetCountriesResponse {
|
|
36
|
+
items: LocationCountry[];
|
|
37
|
+
cursor: string | null;
|
|
38
|
+
}
|
|
39
|
+
|
|
26
40
|
interface ScanDataParams {
|
|
27
41
|
key: string;
|
|
28
42
|
}
|
|
@@ -73,7 +87,7 @@ interface ReservationEngineConfig {
|
|
|
73
87
|
timezone?: string;
|
|
74
88
|
}
|
|
75
89
|
|
|
76
|
-
declare const SDK_VERSION = "0.3.
|
|
90
|
+
declare const SDK_VERSION = "0.3.82";
|
|
77
91
|
declare const SUPPORTED_FRAMEWORKS: readonly ["astro", "react", "vue", "svelte", "vanilla"];
|
|
78
92
|
interface ApiConfig {
|
|
79
93
|
httpClient: any;
|
|
@@ -236,6 +250,10 @@ declare function createArkySDK(config: HttpClientConfig & {
|
|
|
236
250
|
activateFlag(id: string): Promise<FeatureFlag>;
|
|
237
251
|
archiveFlag(id: string): Promise<FeatureFlag>;
|
|
238
252
|
};
|
|
253
|
+
location: {
|
|
254
|
+
getCountries(options?: RequestOptions): Promise<GetCountriesResponse>;
|
|
255
|
+
getCountryStates(countryCode: string, options?: RequestOptions): Promise<LocationCountry>;
|
|
256
|
+
};
|
|
239
257
|
reservationEngine: (engineConfig?: ReservationEngineConfig) => {
|
|
240
258
|
setTimezone(tz: string): void;
|
|
241
259
|
setService(serviceId: string): Promise<void>;
|
|
@@ -308,4 +326,4 @@ declare function createArkySDK(config: HttpClientConfig & {
|
|
|
308
326
|
};
|
|
309
327
|
}>;
|
|
310
328
|
|
|
311
|
-
export { type ApiConfig, type CalendarDay, type HttpClientConfig, ProviderWithTimeline, type ReservationEngineConfig, type ReservationEngineState, SDK_VERSION, SUPPORTED_FRAMEWORKS, Slot, createArkySDK };
|
|
329
|
+
export { type ApiConfig, type CalendarDay, type GetCountriesResponse, type HttpClientConfig, type LocationCountry, type LocationState, ProviderWithTimeline, type ReservationEngineConfig, type ReservationEngineState, SDK_VERSION, SUPPORTED_FRAMEWORKS, Slot, createArkySDK };
|
package/dist/index.d.ts
CHANGED
|
@@ -23,6 +23,20 @@ interface HttpClientConfig {
|
|
|
23
23
|
isAuthenticated?: () => boolean;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
interface LocationState {
|
|
27
|
+
code: string;
|
|
28
|
+
name: string;
|
|
29
|
+
}
|
|
30
|
+
interface LocationCountry {
|
|
31
|
+
code: string;
|
|
32
|
+
name: string;
|
|
33
|
+
states: LocationState[];
|
|
34
|
+
}
|
|
35
|
+
interface GetCountriesResponse {
|
|
36
|
+
items: LocationCountry[];
|
|
37
|
+
cursor: string | null;
|
|
38
|
+
}
|
|
39
|
+
|
|
26
40
|
interface ScanDataParams {
|
|
27
41
|
key: string;
|
|
28
42
|
}
|
|
@@ -73,7 +87,7 @@ interface ReservationEngineConfig {
|
|
|
73
87
|
timezone?: string;
|
|
74
88
|
}
|
|
75
89
|
|
|
76
|
-
declare const SDK_VERSION = "0.3.
|
|
90
|
+
declare const SDK_VERSION = "0.3.82";
|
|
77
91
|
declare const SUPPORTED_FRAMEWORKS: readonly ["astro", "react", "vue", "svelte", "vanilla"];
|
|
78
92
|
interface ApiConfig {
|
|
79
93
|
httpClient: any;
|
|
@@ -236,6 +250,10 @@ declare function createArkySDK(config: HttpClientConfig & {
|
|
|
236
250
|
activateFlag(id: string): Promise<FeatureFlag>;
|
|
237
251
|
archiveFlag(id: string): Promise<FeatureFlag>;
|
|
238
252
|
};
|
|
253
|
+
location: {
|
|
254
|
+
getCountries(options?: RequestOptions): Promise<GetCountriesResponse>;
|
|
255
|
+
getCountryStates(countryCode: string, options?: RequestOptions): Promise<LocationCountry>;
|
|
256
|
+
};
|
|
239
257
|
reservationEngine: (engineConfig?: ReservationEngineConfig) => {
|
|
240
258
|
setTimezone(tz: string): void;
|
|
241
259
|
setService(serviceId: string): Promise<void>;
|
|
@@ -308,4 +326,4 @@ declare function createArkySDK(config: HttpClientConfig & {
|
|
|
308
326
|
};
|
|
309
327
|
}>;
|
|
310
328
|
|
|
311
|
-
export { type ApiConfig, type CalendarDay, type HttpClientConfig, ProviderWithTimeline, type ReservationEngineConfig, type ReservationEngineState, SDK_VERSION, SUPPORTED_FRAMEWORKS, Slot, createArkySDK };
|
|
329
|
+
export { type ApiConfig, type CalendarDay, type GetCountriesResponse, type HttpClientConfig, type LocationCountry, type LocationState, ProviderWithTimeline, type ReservationEngineConfig, type ReservationEngineState, SDK_VERSION, SUPPORTED_FRAMEWORKS, Slot, createArkySDK };
|
package/dist/index.js
CHANGED
|
@@ -1343,6 +1343,21 @@ var createFeatureFlagsApi = (apiConfig) => {
|
|
|
1343
1343
|
};
|
|
1344
1344
|
};
|
|
1345
1345
|
|
|
1346
|
+
// src/api/location.ts
|
|
1347
|
+
var createLocationApi = (apiConfig) => {
|
|
1348
|
+
return {
|
|
1349
|
+
async getCountries(options) {
|
|
1350
|
+
return apiConfig.httpClient.get(`/v1/operations/location/countries`, options);
|
|
1351
|
+
},
|
|
1352
|
+
async getCountryStates(countryCode, options) {
|
|
1353
|
+
return apiConfig.httpClient.get(
|
|
1354
|
+
`/v1/operations/location/countries/${countryCode}/states`,
|
|
1355
|
+
options
|
|
1356
|
+
);
|
|
1357
|
+
}
|
|
1358
|
+
};
|
|
1359
|
+
};
|
|
1360
|
+
|
|
1346
1361
|
// src/utils/currency.ts
|
|
1347
1362
|
function getCurrencySymbol(currency) {
|
|
1348
1363
|
const currencySymbols = {
|
|
@@ -1999,7 +2014,7 @@ var createReservationEngine = (api, config = {}) => {
|
|
|
1999
2014
|
};
|
|
2000
2015
|
|
|
2001
2016
|
// src/index.ts
|
|
2002
|
-
var SDK_VERSION = "0.3.
|
|
2017
|
+
var SDK_VERSION = "0.3.82";
|
|
2003
2018
|
var SUPPORTED_FRAMEWORKS = [
|
|
2004
2019
|
"astro",
|
|
2005
2020
|
"react",
|
|
@@ -2049,6 +2064,7 @@ async function createArkySDK(config) {
|
|
|
2049
2064
|
reservation: createReservationApi(apiConfig),
|
|
2050
2065
|
database: createDatabaseApi(apiConfig),
|
|
2051
2066
|
featureFlags: createFeatureFlagsApi(apiConfig),
|
|
2067
|
+
location: createLocationApi(apiConfig),
|
|
2052
2068
|
// High-level reservation engine
|
|
2053
2069
|
reservationEngine: (engineConfig) => {
|
|
2054
2070
|
const reservationApi = createReservationApi(apiConfig);
|