arky-sdk 0.3.79 → 0.3.80

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 CHANGED
@@ -1027,13 +1027,11 @@ var createReservationApi = (apiConfig) => {
1027
1027
  ...params,
1028
1028
  items
1029
1029
  };
1030
- const result = await apiConfig.httpClient.post(
1030
+ return apiConfig.httpClient.post(
1031
1031
  `/v1/reservations/checkout`,
1032
1032
  payload,
1033
1033
  options
1034
1034
  );
1035
- cart = [];
1036
- return result;
1037
1035
  },
1038
1036
  async getReservation(params, options) {
1039
1037
  return apiConfig.httpClient.get(`/v1/reservations/${params.id}`, {
@@ -1967,7 +1965,7 @@ var createReservationEngine = (api, config = {}) => {
1967
1965
  if (!state.cart.length) throw new Error("Cart is empty");
1968
1966
  store.setKey("loading", true);
1969
1967
  try {
1970
- const result = await api.checkout({
1968
+ return api.checkout({
1971
1969
  items: state.cart.map((s) => ({
1972
1970
  serviceId: s.serviceId,
1973
1971
  providerId: s.providerId,
@@ -1979,8 +1977,6 @@ var createReservationEngine = (api, config = {}) => {
1979
1977
  promoCode: options.promoCode ?? null,
1980
1978
  blocks: options.blocks || []
1981
1979
  });
1982
- store.setKey("cart", []);
1983
- return result;
1984
1980
  } finally {
1985
1981
  store.setKey("loading", false);
1986
1982
  }