arky-sdk 0.7.85 → 0.7.87
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 +9 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -282,7 +282,7 @@ var createStorefrontApi = (apiConfig) => {
|
|
|
282
282
|
const targetBusinessId = businessId || apiConfig.businessId;
|
|
283
283
|
return apiConfig.httpClient.post(
|
|
284
284
|
`${base(targetBusinessId)}/forms/${formId}/submissions`,
|
|
285
|
-
{ ...payload, formId,
|
|
285
|
+
{ ...payload, form_id: formId, business_id: targetBusinessId },
|
|
286
286
|
options
|
|
287
287
|
);
|
|
288
288
|
}
|
|
@@ -357,10 +357,11 @@ var createStorefrontApi = (apiConfig) => {
|
|
|
357
357
|
);
|
|
358
358
|
},
|
|
359
359
|
checkout(params, options) {
|
|
360
|
-
const businessId = params
|
|
360
|
+
const { businessId, ...rest } = params;
|
|
361
|
+
const target = businessId || apiConfig.businessId;
|
|
361
362
|
return apiConfig.httpClient.post(
|
|
362
|
-
`${base(
|
|
363
|
-
{ ...
|
|
363
|
+
`${base(target)}/orders/checkout`,
|
|
364
|
+
{ ...rest, business_id: target, market: apiConfig.market },
|
|
364
365
|
options
|
|
365
366
|
);
|
|
366
367
|
},
|
|
@@ -510,7 +511,7 @@ var createStorefrontApi = (apiConfig) => {
|
|
|
510
511
|
const businessId = params.businessId || apiConfig.businessId;
|
|
511
512
|
return apiConfig.httpClient.post(
|
|
512
513
|
`${base(businessId)}/customers/connect`,
|
|
513
|
-
{ email: params.email, businessId },
|
|
514
|
+
{ email: params.email, business_id: businessId },
|
|
514
515
|
options
|
|
515
516
|
);
|
|
516
517
|
},
|
|
@@ -518,7 +519,7 @@ var createStorefrontApi = (apiConfig) => {
|
|
|
518
519
|
const businessId = params.businessId || apiConfig.businessId;
|
|
519
520
|
return apiConfig.httpClient.post(
|
|
520
521
|
`${base(businessId)}/customers/auth/code`,
|
|
521
|
-
{ email: params.email, businessId },
|
|
522
|
+
{ email: params.email, business_id: businessId },
|
|
522
523
|
options
|
|
523
524
|
);
|
|
524
525
|
},
|
|
@@ -526,7 +527,7 @@ var createStorefrontApi = (apiConfig) => {
|
|
|
526
527
|
const businessId = params.businessId || apiConfig.businessId;
|
|
527
528
|
return apiConfig.httpClient.post(
|
|
528
529
|
`${base(businessId)}/customers/auth/verify`,
|
|
529
|
-
{ email: params.email, code: params.code, businessId },
|
|
530
|
+
{ email: params.email, code: params.code, business_id: businessId },
|
|
530
531
|
options
|
|
531
532
|
);
|
|
532
533
|
},
|
|
@@ -818,6 +819,7 @@ function createHttpClient(cfg) {
|
|
|
818
819
|
fetchOpts.headers = headers;
|
|
819
820
|
return request(method, path, body, { ...options, _retried: true });
|
|
820
821
|
} catch (refreshError) {
|
|
822
|
+
throw refreshError;
|
|
821
823
|
}
|
|
822
824
|
}
|
|
823
825
|
try {
|