arky-sdk 0.7.34 → 0.7.36
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 +48 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -3
- package/dist/index.d.ts +12 -3
- package/dist/index.js +48 -7
- package/dist/index.js.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +26 -22
- package/dist/types.d.ts +26 -22
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -917,7 +917,7 @@ var createBookingApi = (apiConfig) => {
|
|
|
917
917
|
const targetBusinessId = businessId || apiConfig.businessId;
|
|
918
918
|
return apiConfig.httpClient.post(
|
|
919
919
|
`/v1/businesses/${targetBusinessId}/bookings`,
|
|
920
|
-
{ market:
|
|
920
|
+
{ market: "booking", ...payload },
|
|
921
921
|
options
|
|
922
922
|
);
|
|
923
923
|
},
|
|
@@ -935,7 +935,7 @@ var createBookingApi = (apiConfig) => {
|
|
|
935
935
|
const items = paramItems || groupCartToItems(cart);
|
|
936
936
|
return apiConfig.httpClient.post(
|
|
937
937
|
`/v1/businesses/${targetBusinessId}/bookings/checkout`,
|
|
938
|
-
{ market:
|
|
938
|
+
{ market: "booking", ...payload, items },
|
|
939
939
|
options
|
|
940
940
|
);
|
|
941
941
|
},
|
|
@@ -962,7 +962,7 @@ var createBookingApi = (apiConfig) => {
|
|
|
962
962
|
const targetBusinessId = businessId || apiConfig.businessId;
|
|
963
963
|
return apiConfig.httpClient.post(
|
|
964
964
|
`/v1/businesses/${targetBusinessId}/bookings/quote`,
|
|
965
|
-
{ market:
|
|
965
|
+
{ market: "booking", ...payload },
|
|
966
966
|
options
|
|
967
967
|
);
|
|
968
968
|
},
|
|
@@ -1159,6 +1159,44 @@ var createLocationApi = (apiConfig) => {
|
|
|
1159
1159
|
};
|
|
1160
1160
|
};
|
|
1161
1161
|
|
|
1162
|
+
// src/api/market.ts
|
|
1163
|
+
var createMarketApi = (apiConfig) => {
|
|
1164
|
+
return {
|
|
1165
|
+
async list(options) {
|
|
1166
|
+
return apiConfig.httpClient.get(
|
|
1167
|
+
`/v1/businesses/${apiConfig.businessId}/markets`,
|
|
1168
|
+
options
|
|
1169
|
+
);
|
|
1170
|
+
},
|
|
1171
|
+
async get(id, options) {
|
|
1172
|
+
return apiConfig.httpClient.get(
|
|
1173
|
+
`/v1/businesses/${apiConfig.businessId}/markets/${id}`,
|
|
1174
|
+
options
|
|
1175
|
+
);
|
|
1176
|
+
},
|
|
1177
|
+
async create(params, options) {
|
|
1178
|
+
return apiConfig.httpClient.post(
|
|
1179
|
+
`/v1/businesses/${apiConfig.businessId}/markets`,
|
|
1180
|
+
{ ...params, businessId: apiConfig.businessId },
|
|
1181
|
+
options
|
|
1182
|
+
);
|
|
1183
|
+
},
|
|
1184
|
+
async update(params, options) {
|
|
1185
|
+
return apiConfig.httpClient.put(
|
|
1186
|
+
`/v1/businesses/${apiConfig.businessId}/markets/${params.id}`,
|
|
1187
|
+
{ ...params, businessId: apiConfig.businessId },
|
|
1188
|
+
options
|
|
1189
|
+
);
|
|
1190
|
+
},
|
|
1191
|
+
async delete(params, options) {
|
|
1192
|
+
return apiConfig.httpClient.delete(
|
|
1193
|
+
`/v1/businesses/${apiConfig.businessId}/markets/${params.id}`,
|
|
1194
|
+
options
|
|
1195
|
+
);
|
|
1196
|
+
}
|
|
1197
|
+
};
|
|
1198
|
+
};
|
|
1199
|
+
|
|
1162
1200
|
// src/api/zone.ts
|
|
1163
1201
|
var createZoneApi = (apiConfig) => {
|
|
1164
1202
|
return {
|
|
@@ -2239,10 +2277,12 @@ async function createArkySDK(config) {
|
|
|
2239
2277
|
const businessApi = createBusinessApi(apiConfig);
|
|
2240
2278
|
const platformApi = createPlatformApi(apiConfig);
|
|
2241
2279
|
if (typeof window !== "undefined" && apiConfig.businessId) {
|
|
2242
|
-
businessApi.
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2280
|
+
businessApi.getIntegrationConfig({ businessId: apiConfig.businessId, type: "analytics" }).then((configs) => {
|
|
2281
|
+
if (!configs) return;
|
|
2282
|
+
for (const c of Array.isArray(configs) ? configs : [configs]) {
|
|
2283
|
+
if (c.measurementId) {
|
|
2284
|
+
injectGA4Script(c.measurementId);
|
|
2285
|
+
}
|
|
2246
2286
|
}
|
|
2247
2287
|
}).catch(() => {
|
|
2248
2288
|
});
|
|
@@ -2259,6 +2299,7 @@ async function createArkySDK(config) {
|
|
|
2259
2299
|
eshop: createEshopApi(apiConfig),
|
|
2260
2300
|
booking: createBookingApi(apiConfig),
|
|
2261
2301
|
location: createLocationApi(apiConfig),
|
|
2302
|
+
market: createMarketApi(apiConfig),
|
|
2262
2303
|
zone: createZoneApi(apiConfig),
|
|
2263
2304
|
crm: createCustomerApi(apiConfig),
|
|
2264
2305
|
reaction: createReactionApi(apiConfig),
|