@zenky/storefront-vue 0.9.42 → 0.9.43

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/cjs/index.js CHANGED
@@ -2592,10 +2592,16 @@ function useCheckoutSummary(emit) {
2592
2592
  const saving = vue.ref(false);
2593
2593
  const save = async () => {
2594
2594
  if (!credentials.value) {
2595
- return;
2595
+ return {
2596
+ type: exports.OrderCheckoutResultType.Failed,
2597
+ reason: exports.OrderCheckoutResultReason.OrderNotReady,
2598
+ };
2596
2599
  }
2597
2600
  else if (saving.value) {
2598
- return;
2601
+ return {
2602
+ type: exports.OrderCheckoutResultType.Failed,
2603
+ reason: exports.OrderCheckoutResultReason.InProgress,
2604
+ };
2599
2605
  }
2600
2606
  const payload = {
2601
2607
  notes: form.value.notes,
package/dist/esm/index.js CHANGED
@@ -2584,10 +2584,16 @@ function useCheckoutSummary(emit) {
2584
2584
  const saving = ref(false);
2585
2585
  const save = async () => {
2586
2586
  if (!credentials.value) {
2587
- return;
2587
+ return {
2588
+ type: OrderCheckoutResultType.Failed,
2589
+ reason: OrderCheckoutResultReason.OrderNotReady,
2590
+ };
2588
2591
  }
2589
2592
  else if (saving.value) {
2590
- return;
2593
+ return {
2594
+ type: OrderCheckoutResultType.Failed,
2595
+ reason: OrderCheckoutResultReason.InProgress,
2596
+ };
2591
2597
  }
2592
2598
  const payload = {
2593
2599
  notes: form.value.notes,
package/dist/zenky.d.ts CHANGED
@@ -4899,15 +4899,7 @@ declare function useCheckoutSummary(emit: (event: string, payload?: any) => any)
4899
4899
  }>;
4900
4900
  hasPersonsCount: vue.ComputedRef<boolean>;
4901
4901
  saving: vue.Ref<boolean>;
4902
- save: () => Promise<{
4903
- type: OrderCheckoutResultType;
4904
- reason?: undefined;
4905
- error?: undefined;
4906
- } | {
4907
- type: OrderCheckoutResultType;
4908
- reason: OrderCheckoutResultReason;
4909
- error: _zenky_api.ZenkyError | null;
4910
- } | undefined>;
4902
+ save: () => Promise<OrderCheckoutResult>;
4911
4903
  };
4912
4904
 
4913
4905
  declare function useCheckoutTotal(): {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenky/storefront-vue",
3
- "version": "0.9.42",
3
+ "version": "0.9.43",
4
4
  "description": "Zenky Storefront library for Vue 3.",
5
5
  "author": "Timur Zurbaev <hello@zurbaev.ru>",
6
6
  "license": "MIT",