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.js CHANGED
@@ -280,7 +280,7 @@ var createStorefrontApi = (apiConfig) => {
280
280
  const targetBusinessId = businessId || apiConfig.businessId;
281
281
  return apiConfig.httpClient.post(
282
282
  `${base(targetBusinessId)}/forms/${formId}/submissions`,
283
- { ...payload, formId, businessId: targetBusinessId },
283
+ { ...payload, form_id: formId, business_id: targetBusinessId },
284
284
  options
285
285
  );
286
286
  }
@@ -355,10 +355,11 @@ var createStorefrontApi = (apiConfig) => {
355
355
  );
356
356
  },
357
357
  checkout(params, options) {
358
- const businessId = params.businessId || apiConfig.businessId;
358
+ const { businessId, ...rest } = params;
359
+ const target = businessId || apiConfig.businessId;
359
360
  return apiConfig.httpClient.post(
360
- `${base(businessId)}/orders/checkout`,
361
- { ...params, businessId, market: apiConfig.market },
361
+ `${base(target)}/orders/checkout`,
362
+ { ...rest, business_id: target, market: apiConfig.market },
362
363
  options
363
364
  );
364
365
  },
@@ -508,7 +509,7 @@ var createStorefrontApi = (apiConfig) => {
508
509
  const businessId = params.businessId || apiConfig.businessId;
509
510
  return apiConfig.httpClient.post(
510
511
  `${base(businessId)}/customers/connect`,
511
- { email: params.email, businessId },
512
+ { email: params.email, business_id: businessId },
512
513
  options
513
514
  );
514
515
  },
@@ -516,7 +517,7 @@ var createStorefrontApi = (apiConfig) => {
516
517
  const businessId = params.businessId || apiConfig.businessId;
517
518
  return apiConfig.httpClient.post(
518
519
  `${base(businessId)}/customers/auth/code`,
519
- { email: params.email, businessId },
520
+ { email: params.email, business_id: businessId },
520
521
  options
521
522
  );
522
523
  },
@@ -524,7 +525,7 @@ var createStorefrontApi = (apiConfig) => {
524
525
  const businessId = params.businessId || apiConfig.businessId;
525
526
  return apiConfig.httpClient.post(
526
527
  `${base(businessId)}/customers/auth/verify`,
527
- { email: params.email, code: params.code, businessId },
528
+ { email: params.email, code: params.code, business_id: businessId },
528
529
  options
529
530
  );
530
531
  },
@@ -816,6 +817,7 @@ function createHttpClient(cfg) {
816
817
  fetchOpts.headers = headers;
817
818
  return request(method, path, body, { ...options, _retried: true });
818
819
  } catch (refreshError) {
820
+ throw refreshError;
819
821
  }
820
822
  }
821
823
  try {