@voyant-travel/storefront-react 0.120.1 → 0.121.0

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.
@@ -33,7 +33,7 @@ export declare function getStorefrontSettings(client: FetchWithValidationOptions
33
33
  fields: {
34
34
  key: string;
35
35
  label: string;
36
- type: "select" | "textarea" | "text" | "date" | "email" | "tel" | "checkbox" | "country";
36
+ type: "date" | "select" | "text" | "email" | "textarea" | "country" | "tel" | "checkbox";
37
37
  required: boolean;
38
38
  placeholder: string | null;
39
39
  description: string | null;
@@ -48,7 +48,7 @@ export declare function getStorefrontSettings(client: FetchWithValidationOptions
48
48
  fields: {
49
49
  key: string;
50
50
  label: string;
51
- type: "select" | "textarea" | "text" | "date" | "email" | "tel" | "checkbox" | "country";
51
+ type: "date" | "select" | "text" | "email" | "textarea" | "country" | "tel" | "checkbox";
52
52
  required: boolean;
53
53
  placeholder: string | null;
54
54
  description: string | null;
@@ -61,9 +61,9 @@ export declare function getStorefrontSettings(client: FetchWithValidationOptions
61
61
  };
62
62
  };
63
63
  payment: {
64
- defaultMethod: "card" | "bank_transfer" | "cash" | "voucher" | "invoice" | null;
64
+ defaultMethod: "voucher" | "bank_transfer" | "cash" | "invoice" | "card" | null;
65
65
  methods: {
66
- code: "card" | "bank_transfer" | "cash" | "voucher" | "invoice";
66
+ code: "voucher" | "bank_transfer" | "cash" | "invoice" | "card";
67
67
  label: string;
68
68
  description: string | null;
69
69
  enabled: boolean;
@@ -130,7 +130,7 @@ export declare function getAdminStorefrontSettings(client: FetchWithValidationOp
130
130
  fields: {
131
131
  key: string;
132
132
  label: string;
133
- type: "select" | "textarea" | "text" | "date" | "email" | "tel" | "checkbox" | "country";
133
+ type: "date" | "select" | "text" | "email" | "textarea" | "country" | "tel" | "checkbox";
134
134
  required: boolean;
135
135
  placeholder: string | null;
136
136
  description: string | null;
@@ -145,7 +145,7 @@ export declare function getAdminStorefrontSettings(client: FetchWithValidationOp
145
145
  fields: {
146
146
  key: string;
147
147
  label: string;
148
- type: "select" | "textarea" | "text" | "date" | "email" | "tel" | "checkbox" | "country";
148
+ type: "date" | "select" | "text" | "email" | "textarea" | "country" | "tel" | "checkbox";
149
149
  required: boolean;
150
150
  placeholder: string | null;
151
151
  description: string | null;
@@ -158,9 +158,9 @@ export declare function getAdminStorefrontSettings(client: FetchWithValidationOp
158
158
  };
159
159
  };
160
160
  payment: {
161
- defaultMethod: "card" | "bank_transfer" | "cash" | "voucher" | "invoice" | null;
161
+ defaultMethod: "voucher" | "bank_transfer" | "cash" | "invoice" | "card" | null;
162
162
  methods: {
163
- code: "card" | "bank_transfer" | "cash" | "voucher" | "invoice";
163
+ code: "voucher" | "bank_transfer" | "cash" | "invoice" | "card";
164
164
  label: string;
165
165
  description: string | null;
166
166
  enabled: boolean;
@@ -227,7 +227,7 @@ export declare function updateAdminStorefrontSettings(client: FetchWithValidatio
227
227
  fields: {
228
228
  key: string;
229
229
  label: string;
230
- type: "select" | "textarea" | "text" | "date" | "email" | "tel" | "checkbox" | "country";
230
+ type: "date" | "select" | "text" | "email" | "textarea" | "country" | "tel" | "checkbox";
231
231
  required: boolean;
232
232
  placeholder: string | null;
233
233
  description: string | null;
@@ -242,7 +242,7 @@ export declare function updateAdminStorefrontSettings(client: FetchWithValidatio
242
242
  fields: {
243
243
  key: string;
244
244
  label: string;
245
- type: "select" | "textarea" | "text" | "date" | "email" | "tel" | "checkbox" | "country";
245
+ type: "date" | "select" | "text" | "email" | "textarea" | "country" | "tel" | "checkbox";
246
246
  required: boolean;
247
247
  placeholder: string | null;
248
248
  description: string | null;
@@ -255,9 +255,9 @@ export declare function updateAdminStorefrontSettings(client: FetchWithValidatio
255
255
  };
256
256
  };
257
257
  payment: {
258
- defaultMethod: "card" | "bank_transfer" | "cash" | "voucher" | "invoice" | null;
258
+ defaultMethod: "voucher" | "bank_transfer" | "cash" | "invoice" | "card" | null;
259
259
  methods: {
260
- code: "card" | "bank_transfer" | "cash" | "voucher" | "invoice";
260
+ code: "voucher" | "bank_transfer" | "cash" | "invoice" | "card";
261
261
  label: string;
262
262
  description: string | null;
263
263
  enabled: boolean;
@@ -518,8 +518,8 @@ export declare function previewStorefrontDeparturePrice(client: FetchWithValidat
518
518
  kind: "code" | "slug";
519
519
  value: string;
520
520
  result: {
521
- status: "applied" | "not_applicable" | "conflict" | "invalid";
522
- reason: "currency" | "scope" | "conflict" | "min_pax" | "eligibility" | "no_discount" | "offer_not_found" | "offer_expired" | "offer_not_yet_valid" | "code_not_found" | "code_required" | "code_expired" | "code_not_yet_valid" | "booking_mismatch" | "session_mismatch" | null;
521
+ status: "applied" | "not_applicable" | "invalid" | "conflict";
522
+ reason: "scope" | "currency" | "booking_mismatch" | "conflict" | "offer_not_found" | "offer_expired" | "offer_not_yet_valid" | "code_not_found" | "code_required" | "code_expired" | "code_not_yet_valid" | "min_pax" | "eligibility" | "no_discount" | "session_mismatch" | null;
523
523
  offer: {
524
524
  id: string;
525
525
  name: string;
@@ -714,8 +714,8 @@ export declare function getStorefrontOfferBySlug(client: FetchWithValidationOpti
714
714
  }>;
715
715
  export declare function applyStorefrontOffer(client: FetchWithValidationOptions, slug: string, input: StorefrontOfferApplyInput): Promise<{
716
716
  data: {
717
- status: "applied" | "not_applicable" | "conflict" | "invalid";
718
- reason: "currency" | "scope" | "conflict" | "min_pax" | "eligibility" | "no_discount" | "offer_not_found" | "offer_expired" | "offer_not_yet_valid" | "code_not_found" | "code_required" | "code_expired" | "code_not_yet_valid" | "booking_mismatch" | "session_mismatch" | null;
717
+ status: "applied" | "not_applicable" | "invalid" | "conflict";
718
+ reason: "scope" | "currency" | "booking_mismatch" | "conflict" | "offer_not_found" | "offer_expired" | "offer_not_yet_valid" | "code_not_found" | "code_required" | "code_expired" | "code_not_yet_valid" | "min_pax" | "eligibility" | "no_discount" | "session_mismatch" | null;
719
719
  offer: {
720
720
  id: string;
721
721
  name: string;
@@ -770,8 +770,8 @@ export declare function applyStorefrontOffer(client: FetchWithValidationOptions,
770
770
  }>;
771
771
  export declare function redeemStorefrontOffer(client: FetchWithValidationOptions, input: StorefrontOfferRedeemInput): Promise<{
772
772
  data: {
773
- status: "applied" | "not_applicable" | "conflict" | "invalid";
774
- reason: "currency" | "scope" | "conflict" | "min_pax" | "eligibility" | "no_discount" | "offer_not_found" | "offer_expired" | "offer_not_yet_valid" | "code_not_found" | "code_required" | "code_expired" | "code_not_yet_valid" | "booking_mismatch" | "session_mismatch" | null;
773
+ status: "applied" | "not_applicable" | "invalid" | "conflict";
774
+ reason: "scope" | "currency" | "booking_mismatch" | "conflict" | "offer_not_found" | "offer_expired" | "offer_not_yet_valid" | "code_not_found" | "code_required" | "code_expired" | "code_not_yet_valid" | "min_pax" | "eligibility" | "no_discount" | "session_mismatch" | null;
775
775
  offer: {
776
776
  id: string;
777
777
  name: string;
@@ -33,7 +33,7 @@ export declare function getStorefrontSettingsQueryOptions(client: FetchWithValid
33
33
  fields: {
34
34
  key: string;
35
35
  label: string;
36
- type: "select" | "textarea" | "text" | "date" | "email" | "tel" | "checkbox" | "country";
36
+ type: "date" | "select" | "text" | "email" | "textarea" | "country" | "tel" | "checkbox";
37
37
  required: boolean;
38
38
  placeholder: string | null;
39
39
  description: string | null;
@@ -48,7 +48,7 @@ export declare function getStorefrontSettingsQueryOptions(client: FetchWithValid
48
48
  fields: {
49
49
  key: string;
50
50
  label: string;
51
- type: "select" | "textarea" | "text" | "date" | "email" | "tel" | "checkbox" | "country";
51
+ type: "date" | "select" | "text" | "email" | "textarea" | "country" | "tel" | "checkbox";
52
52
  required: boolean;
53
53
  placeholder: string | null;
54
54
  description: string | null;
@@ -61,9 +61,9 @@ export declare function getStorefrontSettingsQueryOptions(client: FetchWithValid
61
61
  };
62
62
  };
63
63
  payment: {
64
- defaultMethod: "card" | "bank_transfer" | "cash" | "voucher" | "invoice" | null;
64
+ defaultMethod: "voucher" | "bank_transfer" | "cash" | "invoice" | "card" | null;
65
65
  methods: {
66
- code: "card" | "bank_transfer" | "cash" | "voucher" | "invoice";
66
+ code: "voucher" | "bank_transfer" | "cash" | "invoice" | "card";
67
67
  label: string;
68
68
  description: string | null;
69
69
  enabled: boolean;
@@ -129,7 +129,7 @@ export declare function getStorefrontSettingsQueryOptions(client: FetchWithValid
129
129
  fields: {
130
130
  key: string;
131
131
  label: string;
132
- type: "select" | "textarea" | "text" | "date" | "email" | "tel" | "checkbox" | "country";
132
+ type: "date" | "select" | "text" | "email" | "textarea" | "country" | "tel" | "checkbox";
133
133
  required: boolean;
134
134
  placeholder: string | null;
135
135
  description: string | null;
@@ -144,7 +144,7 @@ export declare function getStorefrontSettingsQueryOptions(client: FetchWithValid
144
144
  fields: {
145
145
  key: string;
146
146
  label: string;
147
- type: "select" | "textarea" | "text" | "date" | "email" | "tel" | "checkbox" | "country";
147
+ type: "date" | "select" | "text" | "email" | "textarea" | "country" | "tel" | "checkbox";
148
148
  required: boolean;
149
149
  placeholder: string | null;
150
150
  description: string | null;
@@ -157,9 +157,9 @@ export declare function getStorefrontSettingsQueryOptions(client: FetchWithValid
157
157
  };
158
158
  };
159
159
  payment: {
160
- defaultMethod: "card" | "bank_transfer" | "cash" | "voucher" | "invoice" | null;
160
+ defaultMethod: "voucher" | "bank_transfer" | "cash" | "invoice" | "card" | null;
161
161
  methods: {
162
- code: "card" | "bank_transfer" | "cash" | "voucher" | "invoice";
162
+ code: "voucher" | "bank_transfer" | "cash" | "invoice" | "card";
163
163
  label: string;
164
164
  description: string | null;
165
165
  enabled: boolean;
@@ -226,7 +226,7 @@ export declare function getStorefrontSettingsQueryOptions(client: FetchWithValid
226
226
  fields: {
227
227
  key: string;
228
228
  label: string;
229
- type: "select" | "textarea" | "text" | "date" | "email" | "tel" | "checkbox" | "country";
229
+ type: "date" | "select" | "text" | "email" | "textarea" | "country" | "tel" | "checkbox";
230
230
  required: boolean;
231
231
  placeholder: string | null;
232
232
  description: string | null;
@@ -241,7 +241,7 @@ export declare function getStorefrontSettingsQueryOptions(client: FetchWithValid
241
241
  fields: {
242
242
  key: string;
243
243
  label: string;
244
- type: "select" | "textarea" | "text" | "date" | "email" | "tel" | "checkbox" | "country";
244
+ type: "date" | "select" | "text" | "email" | "textarea" | "country" | "tel" | "checkbox";
245
245
  required: boolean;
246
246
  placeholder: string | null;
247
247
  description: string | null;
@@ -254,9 +254,9 @@ export declare function getStorefrontSettingsQueryOptions(client: FetchWithValid
254
254
  };
255
255
  };
256
256
  payment: {
257
- defaultMethod: "card" | "bank_transfer" | "cash" | "voucher" | "invoice" | null;
257
+ defaultMethod: "voucher" | "bank_transfer" | "cash" | "invoice" | "card" | null;
258
258
  methods: {
259
- code: "card" | "bank_transfer" | "cash" | "voucher" | "invoice";
259
+ code: "voucher" | "bank_transfer" | "cash" | "invoice" | "card";
260
260
  label: string;
261
261
  description: string | null;
262
262
  enabled: boolean;
@@ -325,7 +325,7 @@ export declare function getStorefrontSettingsQueryOptions(client: FetchWithValid
325
325
  fields: {
326
326
  key: string;
327
327
  label: string;
328
- type: "select" | "textarea" | "text" | "date" | "email" | "tel" | "checkbox" | "country";
328
+ type: "date" | "select" | "text" | "email" | "textarea" | "country" | "tel" | "checkbox";
329
329
  required: boolean;
330
330
  placeholder: string | null;
331
331
  description: string | null;
@@ -340,7 +340,7 @@ export declare function getStorefrontSettingsQueryOptions(client: FetchWithValid
340
340
  fields: {
341
341
  key: string;
342
342
  label: string;
343
- type: "select" | "textarea" | "text" | "date" | "email" | "tel" | "checkbox" | "country";
343
+ type: "date" | "select" | "text" | "email" | "textarea" | "country" | "tel" | "checkbox";
344
344
  required: boolean;
345
345
  placeholder: string | null;
346
346
  description: string | null;
@@ -353,9 +353,9 @@ export declare function getStorefrontSettingsQueryOptions(client: FetchWithValid
353
353
  };
354
354
  };
355
355
  payment: {
356
- defaultMethod: "card" | "bank_transfer" | "cash" | "voucher" | "invoice" | null;
356
+ defaultMethod: "voucher" | "bank_transfer" | "cash" | "invoice" | "card" | null;
357
357
  methods: {
358
- code: "card" | "bank_transfer" | "cash" | "voucher" | "invoice";
358
+ code: "voucher" | "bank_transfer" | "cash" | "invoice" | "card";
359
359
  label: string;
360
360
  description: string | null;
361
361
  enabled: boolean;
@@ -425,7 +425,7 @@ export declare function getAdminStorefrontSettingsQueryOptions(client: FetchWith
425
425
  fields: {
426
426
  key: string;
427
427
  label: string;
428
- type: "select" | "textarea" | "text" | "date" | "email" | "tel" | "checkbox" | "country";
428
+ type: "date" | "select" | "text" | "email" | "textarea" | "country" | "tel" | "checkbox";
429
429
  required: boolean;
430
430
  placeholder: string | null;
431
431
  description: string | null;
@@ -440,7 +440,7 @@ export declare function getAdminStorefrontSettingsQueryOptions(client: FetchWith
440
440
  fields: {
441
441
  key: string;
442
442
  label: string;
443
- type: "select" | "textarea" | "text" | "date" | "email" | "tel" | "checkbox" | "country";
443
+ type: "date" | "select" | "text" | "email" | "textarea" | "country" | "tel" | "checkbox";
444
444
  required: boolean;
445
445
  placeholder: string | null;
446
446
  description: string | null;
@@ -453,9 +453,9 @@ export declare function getAdminStorefrontSettingsQueryOptions(client: FetchWith
453
453
  };
454
454
  };
455
455
  payment: {
456
- defaultMethod: "card" | "bank_transfer" | "cash" | "voucher" | "invoice" | null;
456
+ defaultMethod: "voucher" | "bank_transfer" | "cash" | "invoice" | "card" | null;
457
457
  methods: {
458
- code: "card" | "bank_transfer" | "cash" | "voucher" | "invoice";
458
+ code: "voucher" | "bank_transfer" | "cash" | "invoice" | "card";
459
459
  label: string;
460
460
  description: string | null;
461
461
  enabled: boolean;
@@ -521,7 +521,7 @@ export declare function getAdminStorefrontSettingsQueryOptions(client: FetchWith
521
521
  fields: {
522
522
  key: string;
523
523
  label: string;
524
- type: "select" | "textarea" | "text" | "date" | "email" | "tel" | "checkbox" | "country";
524
+ type: "date" | "select" | "text" | "email" | "textarea" | "country" | "tel" | "checkbox";
525
525
  required: boolean;
526
526
  placeholder: string | null;
527
527
  description: string | null;
@@ -536,7 +536,7 @@ export declare function getAdminStorefrontSettingsQueryOptions(client: FetchWith
536
536
  fields: {
537
537
  key: string;
538
538
  label: string;
539
- type: "select" | "textarea" | "text" | "date" | "email" | "tel" | "checkbox" | "country";
539
+ type: "date" | "select" | "text" | "email" | "textarea" | "country" | "tel" | "checkbox";
540
540
  required: boolean;
541
541
  placeholder: string | null;
542
542
  description: string | null;
@@ -549,9 +549,9 @@ export declare function getAdminStorefrontSettingsQueryOptions(client: FetchWith
549
549
  };
550
550
  };
551
551
  payment: {
552
- defaultMethod: "card" | "bank_transfer" | "cash" | "voucher" | "invoice" | null;
552
+ defaultMethod: "voucher" | "bank_transfer" | "cash" | "invoice" | "card" | null;
553
553
  methods: {
554
- code: "card" | "bank_transfer" | "cash" | "voucher" | "invoice";
554
+ code: "voucher" | "bank_transfer" | "cash" | "invoice" | "card";
555
555
  label: string;
556
556
  description: string | null;
557
557
  enabled: boolean;
@@ -618,7 +618,7 @@ export declare function getAdminStorefrontSettingsQueryOptions(client: FetchWith
618
618
  fields: {
619
619
  key: string;
620
620
  label: string;
621
- type: "select" | "textarea" | "text" | "date" | "email" | "tel" | "checkbox" | "country";
621
+ type: "date" | "select" | "text" | "email" | "textarea" | "country" | "tel" | "checkbox";
622
622
  required: boolean;
623
623
  placeholder: string | null;
624
624
  description: string | null;
@@ -633,7 +633,7 @@ export declare function getAdminStorefrontSettingsQueryOptions(client: FetchWith
633
633
  fields: {
634
634
  key: string;
635
635
  label: string;
636
- type: "select" | "textarea" | "text" | "date" | "email" | "tel" | "checkbox" | "country";
636
+ type: "date" | "select" | "text" | "email" | "textarea" | "country" | "tel" | "checkbox";
637
637
  required: boolean;
638
638
  placeholder: string | null;
639
639
  description: string | null;
@@ -646,9 +646,9 @@ export declare function getAdminStorefrontSettingsQueryOptions(client: FetchWith
646
646
  };
647
647
  };
648
648
  payment: {
649
- defaultMethod: "card" | "bank_transfer" | "cash" | "voucher" | "invoice" | null;
649
+ defaultMethod: "voucher" | "bank_transfer" | "cash" | "invoice" | "card" | null;
650
650
  methods: {
651
- code: "card" | "bank_transfer" | "cash" | "voucher" | "invoice";
651
+ code: "voucher" | "bank_transfer" | "cash" | "invoice" | "card";
652
652
  label: string;
653
653
  description: string | null;
654
654
  enabled: boolean;
@@ -717,7 +717,7 @@ export declare function getAdminStorefrontSettingsQueryOptions(client: FetchWith
717
717
  fields: {
718
718
  key: string;
719
719
  label: string;
720
- type: "select" | "textarea" | "text" | "date" | "email" | "tel" | "checkbox" | "country";
720
+ type: "date" | "select" | "text" | "email" | "textarea" | "country" | "tel" | "checkbox";
721
721
  required: boolean;
722
722
  placeholder: string | null;
723
723
  description: string | null;
@@ -732,7 +732,7 @@ export declare function getAdminStorefrontSettingsQueryOptions(client: FetchWith
732
732
  fields: {
733
733
  key: string;
734
734
  label: string;
735
- type: "select" | "textarea" | "text" | "date" | "email" | "tel" | "checkbox" | "country";
735
+ type: "date" | "select" | "text" | "email" | "textarea" | "country" | "tel" | "checkbox";
736
736
  required: boolean;
737
737
  placeholder: string | null;
738
738
  description: string | null;
@@ -745,9 +745,9 @@ export declare function getAdminStorefrontSettingsQueryOptions(client: FetchWith
745
745
  };
746
746
  };
747
747
  payment: {
748
- defaultMethod: "card" | "bank_transfer" | "cash" | "voucher" | "invoice" | null;
748
+ defaultMethod: "voucher" | "bank_transfer" | "cash" | "invoice" | "card" | null;
749
749
  methods: {
750
- code: "card" | "bank_transfer" | "cash" | "voucher" | "invoice";
750
+ code: "voucher" | "bank_transfer" | "cash" | "invoice" | "card";
751
751
  label: string;
752
752
  description: string | null;
753
753
  enabled: boolean;
package/dist/schemas.d.ts CHANGED
@@ -45,14 +45,14 @@ export declare const storefrontSettingsResponseSchema: z.ZodObject<{
45
45
  key: z.ZodString;
46
46
  label: z.ZodString;
47
47
  type: z.ZodEnum<{
48
+ date: "date";
48
49
  select: "select";
49
- textarea: "textarea";
50
50
  text: "text";
51
- date: "date";
52
51
  email: "email";
52
+ textarea: "textarea";
53
+ country: "country";
53
54
  tel: "tel";
54
55
  checkbox: "checkbox";
55
- country: "country";
56
56
  }>;
57
57
  required: z.ZodBoolean;
58
58
  placeholder: z.ZodNullable<z.ZodString>;
@@ -69,14 +69,14 @@ export declare const storefrontSettingsResponseSchema: z.ZodObject<{
69
69
  key: z.ZodString;
70
70
  label: z.ZodString;
71
71
  type: z.ZodEnum<{
72
+ date: "date";
72
73
  select: "select";
73
- textarea: "textarea";
74
74
  text: "text";
75
- date: "date";
76
75
  email: "email";
76
+ textarea: "textarea";
77
+ country: "country";
77
78
  tel: "tel";
78
79
  checkbox: "checkbox";
79
- country: "country";
80
80
  }>;
81
81
  required: z.ZodBoolean;
82
82
  placeholder: z.ZodNullable<z.ZodString>;
@@ -91,19 +91,19 @@ export declare const storefrontSettingsResponseSchema: z.ZodObject<{
91
91
  }, z.core.$strip>;
92
92
  payment: z.ZodObject<{
93
93
  defaultMethod: z.ZodNullable<z.ZodEnum<{
94
- card: "card";
94
+ voucher: "voucher";
95
95
  bank_transfer: "bank_transfer";
96
96
  cash: "cash";
97
- voucher: "voucher";
98
97
  invoice: "invoice";
98
+ card: "card";
99
99
  }>>;
100
100
  methods: z.ZodArray<z.ZodObject<{
101
101
  code: z.ZodEnum<{
102
- card: "card";
102
+ voucher: "voucher";
103
103
  bank_transfer: "bank_transfer";
104
104
  cash: "cash";
105
- voucher: "voucher";
106
105
  invoice: "invoice";
106
+ card: "card";
107
107
  }>;
108
108
  label: z.ZodString;
109
109
  description: z.ZodNullable<z.ZodString>;
@@ -368,16 +368,14 @@ export declare const storefrontDeparturePricePreviewResponseSchema: z.ZodObject<
368
368
  status: z.ZodEnum<{
369
369
  applied: "applied";
370
370
  not_applicable: "not_applicable";
371
- conflict: "conflict";
372
371
  invalid: "invalid";
372
+ conflict: "conflict";
373
373
  }>;
374
374
  reason: z.ZodNullable<z.ZodEnum<{
375
- currency: "currency";
376
375
  scope: "scope";
376
+ currency: "currency";
377
+ booking_mismatch: "booking_mismatch";
377
378
  conflict: "conflict";
378
- min_pax: "min_pax";
379
- eligibility: "eligibility";
380
- no_discount: "no_discount";
381
379
  offer_not_found: "offer_not_found";
382
380
  offer_expired: "offer_expired";
383
381
  offer_not_yet_valid: "offer_not_yet_valid";
@@ -385,7 +383,9 @@ export declare const storefrontDeparturePricePreviewResponseSchema: z.ZodObject<
385
383
  code_required: "code_required";
386
384
  code_expired: "code_expired";
387
385
  code_not_yet_valid: "code_not_yet_valid";
388
- booking_mismatch: "booking_mismatch";
386
+ min_pax: "min_pax";
387
+ eligibility: "eligibility";
388
+ no_discount: "no_discount";
389
389
  session_mismatch: "session_mismatch";
390
390
  }>>;
391
391
  offer: z.ZodNullable<z.ZodObject<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voyant-travel/storefront-react",
3
- "version": "0.120.1",
3
+ "version": "0.121.0",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -85,7 +85,7 @@
85
85
  "react": "^19.0.0",
86
86
  "react-dom": "^19.0.0",
87
87
  "zod": "^4.0.0",
88
- "@voyant-travel/storefront": "^0.120.1",
88
+ "@voyant-travel/storefront": "^0.121.0",
89
89
  "@voyant-travel/ui": "^0.106.1"
90
90
  },
91
91
  "peerDependenciesMeta": {
@@ -109,9 +109,9 @@
109
109
  "typescript": "^6.0.2",
110
110
  "vitest": "^4.1.2",
111
111
  "zod": "^4.3.6",
112
+ "@voyant-travel/storefront": "^0.121.0",
112
113
  "@voyant-travel/ui": "^0.106.1",
113
114
  "@voyant-travel/react": "^0.104.1",
114
- "@voyant-travel/storefront": "^0.120.1",
115
115
  "@voyant-travel/voyant-typescript-config": "^0.1.0"
116
116
  },
117
117
  "files": [
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=operations.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"operations.test.d.ts","sourceRoot":"","sources":["../src/operations.test.ts"],"names":[],"mappings":""}
@@ -1,77 +0,0 @@
1
- import { describe, expect, it, vi } from "vitest";
2
- import { getAdminStorefrontSettings, updateAdminStorefrontSettings } from "./operations.js";
3
- const storefrontSettingsResponse = {
4
- data: {
5
- branding: {
6
- logoUrl: null,
7
- faviconUrl: null,
8
- brandMarkUrl: null,
9
- primaryColor: null,
10
- accentColor: null,
11
- supportedLanguages: [],
12
- },
13
- support: {
14
- email: null,
15
- phone: null,
16
- links: [],
17
- },
18
- legal: {
19
- termsUrl: null,
20
- privacyUrl: null,
21
- cancellationUrl: null,
22
- defaultContractTemplateId: null,
23
- },
24
- localization: {
25
- defaultLocale: null,
26
- currencyDisplay: "code",
27
- },
28
- forms: {
29
- billing: { fields: [] },
30
- travelers: { fields: [] },
31
- },
32
- payment: {
33
- defaultMethod: null,
34
- methods: [],
35
- structure: "full",
36
- schedule: [],
37
- defaultSchedule: null,
38
- bankTransfer: null,
39
- },
40
- },
41
- };
42
- describe("admin storefront settings operations", () => {
43
- it("reads admin storefront settings from the admin endpoint", async () => {
44
- const fetcher = vi
45
- .fn()
46
- .mockResolvedValueOnce(Response.json(storefrontSettingsResponse));
47
- await expect(getAdminStorefrontSettings({ baseUrl: "https://operator.example/api", fetcher })).resolves.toEqual(storefrontSettingsResponse);
48
- expect(fetcher).toHaveBeenCalledWith("https://operator.example/api/v1/admin/storefront/settings", { headers: expect.any(Headers) });
49
- });
50
- it("validates and sends settings updates as PATCH requests", async () => {
51
- const fetcher = vi
52
- .fn()
53
- .mockResolvedValueOnce(Response.json(storefrontSettingsResponse));
54
- await updateAdminStorefrontSettings({ baseUrl: "https://operator.example/api", fetcher }, {
55
- support: {
56
- email: "support@example.com",
57
- links: [{ label: "Help", url: "https://example.com/help" }],
58
- },
59
- payment: {
60
- defaultMethod: "card",
61
- methods: [{ code: "card" }],
62
- },
63
- });
64
- const [, init] = fetcher.mock.calls[0] ?? [];
65
- expect(init?.method).toBe("PATCH");
66
- expect(init?.body).toBe(JSON.stringify({
67
- support: {
68
- email: "support@example.com",
69
- links: [{ label: "Help", url: "https://example.com/help" }],
70
- },
71
- payment: {
72
- defaultMethod: "card",
73
- methods: [{ code: "card", enabled: true }],
74
- },
75
- }));
76
- });
77
- });