arky-sdk 0.5.81 → 0.5.83
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 +6 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -26
- package/dist/index.js.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +2 -2
- package/dist/types.d.ts +2 -2
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -881,36 +881,16 @@ var createEshopApi = (apiConfig) => {
|
|
|
881
881
|
);
|
|
882
882
|
},
|
|
883
883
|
async getQuote(params, options) {
|
|
884
|
-
const payload = {
|
|
885
|
-
market: apiConfig.market,
|
|
886
|
-
items: params.items,
|
|
887
|
-
blocks: params.blocks || [],
|
|
888
|
-
paymentMethodId: params.paymentMethodId,
|
|
889
|
-
shippingMethodId: params.shippingMethodId,
|
|
890
|
-
promoCode: params.promoCode,
|
|
891
|
-
location: params.location
|
|
892
|
-
};
|
|
893
884
|
return apiConfig.httpClient.post(
|
|
894
885
|
`/v1/businesses/${apiConfig.businessId}/orders/quote`,
|
|
895
|
-
|
|
886
|
+
{ ...params, market: apiConfig.market },
|
|
896
887
|
options
|
|
897
888
|
);
|
|
898
889
|
},
|
|
899
890
|
async checkout(params, options) {
|
|
900
|
-
const payload = {
|
|
901
|
-
businessId: apiConfig.businessId,
|
|
902
|
-
market: apiConfig.market,
|
|
903
|
-
items: params.items,
|
|
904
|
-
blocks: params.blocks || [],
|
|
905
|
-
paymentMethodId: params.paymentMethodId,
|
|
906
|
-
shippingMethodId: params.shippingMethodId,
|
|
907
|
-
promoCodeId: params.promoCodeId,
|
|
908
|
-
shippingAddress: params.shippingAddress,
|
|
909
|
-
billingAddress: params.billingAddress
|
|
910
|
-
};
|
|
911
891
|
return apiConfig.httpClient.post(
|
|
912
892
|
`/v1/businesses/${apiConfig.businessId}/orders/checkout`,
|
|
913
|
-
|
|
893
|
+
{ ...params, businessId: apiConfig.businessId, market: apiConfig.market },
|
|
914
894
|
options
|
|
915
895
|
);
|
|
916
896
|
}
|
|
@@ -1145,7 +1125,7 @@ var createLocationApi = (apiConfig) => {
|
|
|
1145
1125
|
};
|
|
1146
1126
|
};
|
|
1147
1127
|
|
|
1148
|
-
// src/api/
|
|
1128
|
+
// src/api/crm.ts
|
|
1149
1129
|
var createCustomerApi = (apiConfig) => {
|
|
1150
1130
|
return {
|
|
1151
1131
|
async create(params, options) {
|
|
@@ -1353,7 +1333,7 @@ var createAudienceApi = (apiConfig) => {
|
|
|
1353
1333
|
return apiConfig.httpClient.post(
|
|
1354
1334
|
`/v1/businesses/${apiConfig.businessId}/audiences/${params.id}/subscribe`,
|
|
1355
1335
|
{
|
|
1356
|
-
|
|
1336
|
+
customerId: params.customerId,
|
|
1357
1337
|
...params.priceId && { priceId: params.priceId },
|
|
1358
1338
|
...params.successUrl && { successUrl: params.successUrl },
|
|
1359
1339
|
...params.cancelUrl && { cancelUrl: params.cancelUrl },
|
|
@@ -1383,7 +1363,7 @@ var createAudienceApi = (apiConfig) => {
|
|
|
1383
1363
|
async addSubscriber(params, options) {
|
|
1384
1364
|
return apiConfig.httpClient.post(
|
|
1385
1365
|
`/v1/businesses/${apiConfig.businessId}/audiences/${params.id}/subscribers`,
|
|
1386
|
-
{
|
|
1366
|
+
{ customerId: params.customerId },
|
|
1387
1367
|
options
|
|
1388
1368
|
);
|
|
1389
1369
|
},
|
|
@@ -2065,7 +2045,7 @@ async function createArkySDK(config) {
|
|
|
2065
2045
|
eshop: createEshopApi(apiConfig),
|
|
2066
2046
|
booking: createBookingApi(apiConfig),
|
|
2067
2047
|
location: createLocationApi(apiConfig),
|
|
2068
|
-
|
|
2048
|
+
crm: createCustomerApi(apiConfig),
|
|
2069
2049
|
network: createNetworkApi(apiConfig),
|
|
2070
2050
|
workflow: createWorkflowApi(apiConfig),
|
|
2071
2051
|
audience: createAudienceApi(apiConfig),
|