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