@voyantjs/storefront-react 0.49.0 → 0.50.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.
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/use-admin-storefront-settings.d.ts +248 -0
- package/dist/hooks/use-admin-storefront-settings.d.ts.map +1 -0
- package/dist/hooks/use-admin-storefront-settings.js +29 -0
- package/dist/hooks/use-storefront-departure-price-preview-mutation.d.ts +209 -0
- package/dist/hooks/use-storefront-departure-price-preview-mutation.d.ts.map +1 -1
- package/dist/hooks/use-storefront-offer-apply-mutation.d.ts +2 -2
- package/dist/hooks/use-storefront-offer-redeem-mutation.d.ts +2 -2
- package/dist/hooks/use-storefront-product-extensions.d.ts +2 -2
- package/dist/hooks/use-storefront-settings.d.ts +27 -2
- package/dist/hooks/use-storefront-settings.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/operations.d.ts +403 -9
- package/dist/operations.d.ts.map +1 -1
- package/dist/operations.js +8 -1
- package/dist/operations.test.d.ts +2 -0
- package/dist/operations.test.d.ts.map +1 -0
- package/dist/operations.test.js +75 -0
- package/dist/query-keys.d.ts +1 -0
- package/dist/query-keys.d.ts.map +1 -1
- package/dist/query-keys.js +1 -0
- package/dist/query-options.d.ts +452 -16
- package/dist/query-options.d.ts.map +1 -1
- package/dist/query-options.js +7 -1
- package/dist/schemas.d.ts +310 -4
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +2 -2
- package/package.json +5 -5
package/dist/schemas.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { storefrontDepartureItinerarySchema, storefrontDepartureListQuerySchema, storefrontDepartureListResponseSchema, storefrontDeparturePricePreviewInputSchema, storefrontDeparturePricePreviewSchema, storefrontDepartureSchema, storefrontOfferApplyInputSchema, storefrontOfferMutationResponseSchema, storefrontOfferMutationResultSchema, storefrontOfferRedeemInputSchema, storefrontProductExtensionsQuerySchema, storefrontProductExtensionsResponseSchema, storefrontPromotionalOfferListQuerySchema, storefrontPromotionalOfferSchema, storefrontSettingsSchema } from "@voyantjs/storefront";
|
|
1
|
+
import { storefrontDepartureItinerarySchema, storefrontDepartureListQuerySchema, storefrontDepartureListResponseSchema, storefrontDeparturePriceAllocationSchema, storefrontDeparturePriceExtraImpactSchema, storefrontDeparturePriceLineItemSchema, storefrontDeparturePriceOfferImpactSchema, storefrontDeparturePriceOffersSchema, storefrontDeparturePricePaxSchema, storefrontDeparturePricePreviewInputSchema, storefrontDeparturePricePreviewSchema, storefrontDeparturePriceRequestedOfferSchema, storefrontDeparturePriceRoomRowSchema, storefrontDeparturePriceSlotSchema, storefrontDeparturePriceTotalsSchema, storefrontDeparturePriceUnitRowSchema, storefrontDepartureSchema, storefrontOfferApplyInputSchema, storefrontOfferMutationResponseSchema, storefrontOfferMutationResultSchema, storefrontOfferRedeemInputSchema, storefrontProductExtensionsQuerySchema, storefrontProductExtensionsResponseSchema, storefrontPromotionalOfferListQuerySchema, storefrontPromotionalOfferSchema, storefrontSettingsInputSchema, storefrontSettingsPatchSchema, storefrontSettingsSchema } from "@voyantjs/storefront";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
export declare const singleEnvelope: <T extends z.ZodTypeAny>(item: T) => z.ZodObject<{
|
|
4
4
|
data: T;
|
|
@@ -6,22 +6,39 @@ export declare const singleEnvelope: <T extends z.ZodTypeAny>(item: T) => z.ZodO
|
|
|
6
6
|
export declare const arrayEnvelope: <T extends z.ZodTypeAny>(item: T) => z.ZodObject<{
|
|
7
7
|
data: z.ZodArray<T>;
|
|
8
8
|
}, z.core.$strip>;
|
|
9
|
-
export { storefrontDepartureItinerarySchema, storefrontDepartureListQuerySchema, storefrontDepartureListResponseSchema, storefrontDeparturePricePreviewInputSchema, storefrontDeparturePricePreviewSchema, storefrontDepartureSchema, storefrontOfferApplyInputSchema, storefrontOfferMutationResponseSchema, storefrontOfferMutationResultSchema, storefrontOfferRedeemInputSchema, storefrontProductExtensionsQuerySchema, storefrontProductExtensionsResponseSchema, storefrontPromotionalOfferListQuerySchema, storefrontPromotionalOfferSchema, storefrontSettingsSchema, };
|
|
9
|
+
export { storefrontDepartureItinerarySchema, storefrontDepartureListQuerySchema, storefrontDepartureListResponseSchema, storefrontDeparturePriceAllocationSchema, storefrontDeparturePriceExtraImpactSchema, storefrontDeparturePriceLineItemSchema, storefrontDeparturePriceOfferImpactSchema, storefrontDeparturePriceOffersSchema, storefrontDeparturePricePaxSchema, storefrontDeparturePricePreviewInputSchema, storefrontDeparturePricePreviewSchema, storefrontDeparturePriceRequestedOfferSchema, storefrontDeparturePriceRoomRowSchema, storefrontDeparturePriceSlotSchema, storefrontDeparturePriceTotalsSchema, storefrontDeparturePriceUnitRowSchema, storefrontDepartureSchema, storefrontOfferApplyInputSchema, storefrontOfferMutationResponseSchema, storefrontOfferMutationResultSchema, storefrontOfferRedeemInputSchema, storefrontProductExtensionsQuerySchema, storefrontProductExtensionsResponseSchema, storefrontPromotionalOfferListQuerySchema, storefrontPromotionalOfferSchema, storefrontSettingsInputSchema, storefrontSettingsPatchSchema, storefrontSettingsSchema, };
|
|
10
10
|
export declare const storefrontSettingsResponseSchema: z.ZodObject<{
|
|
11
11
|
data: z.ZodObject<{
|
|
12
12
|
branding: z.ZodObject<{
|
|
13
13
|
logoUrl: z.ZodNullable<z.ZodURL>;
|
|
14
|
+
faviconUrl: z.ZodNullable<z.ZodURL>;
|
|
15
|
+
brandMarkUrl: z.ZodNullable<z.ZodURL>;
|
|
16
|
+
primaryColor: z.ZodNullable<z.ZodString>;
|
|
17
|
+
accentColor: z.ZodNullable<z.ZodString>;
|
|
14
18
|
supportedLanguages: z.ZodArray<z.ZodString>;
|
|
15
19
|
}, z.core.$strip>;
|
|
16
20
|
support: z.ZodObject<{
|
|
17
21
|
email: z.ZodNullable<z.ZodEmail>;
|
|
18
22
|
phone: z.ZodNullable<z.ZodString>;
|
|
23
|
+
links: z.ZodArray<z.ZodObject<{
|
|
24
|
+
label: z.ZodString;
|
|
25
|
+
url: z.ZodURL;
|
|
26
|
+
}, z.core.$strip>>;
|
|
19
27
|
}, z.core.$strip>;
|
|
20
28
|
legal: z.ZodObject<{
|
|
21
29
|
termsUrl: z.ZodNullable<z.ZodURL>;
|
|
22
30
|
privacyUrl: z.ZodNullable<z.ZodURL>;
|
|
31
|
+
cancellationUrl: z.ZodNullable<z.ZodURL>;
|
|
23
32
|
defaultContractTemplateId: z.ZodNullable<z.ZodString>;
|
|
24
33
|
}, z.core.$strip>;
|
|
34
|
+
localization: z.ZodObject<{
|
|
35
|
+
defaultLocale: z.ZodNullable<z.ZodString>;
|
|
36
|
+
currencyDisplay: z.ZodEnum<{
|
|
37
|
+
symbol: "symbol";
|
|
38
|
+
name: "name";
|
|
39
|
+
code: "code";
|
|
40
|
+
}>;
|
|
41
|
+
}, z.core.$strip>;
|
|
25
42
|
forms: z.ZodObject<{
|
|
26
43
|
billing: z.ZodObject<{
|
|
27
44
|
fields: z.ZodArray<z.ZodObject<{
|
|
@@ -76,22 +93,34 @@ export declare const storefrontSettingsResponseSchema: z.ZodObject<{
|
|
|
76
93
|
defaultMethod: z.ZodNullable<z.ZodEnum<{
|
|
77
94
|
voucher: "voucher";
|
|
78
95
|
bank_transfer: "bank_transfer";
|
|
79
|
-
card: "card";
|
|
80
96
|
cash: "cash";
|
|
81
97
|
invoice: "invoice";
|
|
98
|
+
card: "card";
|
|
82
99
|
}>>;
|
|
83
100
|
methods: z.ZodArray<z.ZodObject<{
|
|
84
101
|
code: z.ZodEnum<{
|
|
85
102
|
voucher: "voucher";
|
|
86
103
|
bank_transfer: "bank_transfer";
|
|
87
|
-
card: "card";
|
|
88
104
|
cash: "cash";
|
|
89
105
|
invoice: "invoice";
|
|
106
|
+
card: "card";
|
|
90
107
|
}>;
|
|
91
108
|
label: z.ZodString;
|
|
92
109
|
description: z.ZodNullable<z.ZodString>;
|
|
93
110
|
enabled: z.ZodBoolean;
|
|
94
111
|
}, z.core.$strip>>;
|
|
112
|
+
defaultSchedule: z.ZodNullable<z.ZodObject<{
|
|
113
|
+
depositPercent: z.ZodNullable<z.ZodNumber>;
|
|
114
|
+
balanceDueDaysBeforeDeparture: z.ZodNullable<z.ZodNumber>;
|
|
115
|
+
}, z.core.$strip>>;
|
|
116
|
+
bankTransfer: z.ZodNullable<z.ZodObject<{
|
|
117
|
+
accountHolder: z.ZodNullable<z.ZodString>;
|
|
118
|
+
bankName: z.ZodNullable<z.ZodString>;
|
|
119
|
+
iban: z.ZodNullable<z.ZodString>;
|
|
120
|
+
bic: z.ZodNullable<z.ZodString>;
|
|
121
|
+
paymentReference: z.ZodNullable<z.ZodString>;
|
|
122
|
+
instructions: z.ZodNullable<z.ZodString>;
|
|
123
|
+
}, z.core.$strip>>;
|
|
95
124
|
}, z.core.$strip>;
|
|
96
125
|
}, z.core.$strip>;
|
|
97
126
|
}, z.core.$strip>;
|
|
@@ -164,6 +193,281 @@ export declare const storefrontDeparturePricePreviewResponseSchema: z.ZodObject<
|
|
|
164
193
|
quantity: z.ZodNumber;
|
|
165
194
|
unitPrice: z.ZodNumber;
|
|
166
195
|
}, z.core.$strip>>;
|
|
196
|
+
allocation: z.ZodObject<{
|
|
197
|
+
slot: z.ZodObject<{
|
|
198
|
+
id: z.ZodString;
|
|
199
|
+
productId: z.ZodString;
|
|
200
|
+
optionId: z.ZodNullable<z.ZodString>;
|
|
201
|
+
dateLocal: z.ZodNullable<z.ZodString>;
|
|
202
|
+
startAt: z.ZodNullable<z.ZodString>;
|
|
203
|
+
endAt: z.ZodNullable<z.ZodString>;
|
|
204
|
+
timezone: z.ZodString;
|
|
205
|
+
status: z.ZodEnum<{
|
|
206
|
+
cancelled: "cancelled";
|
|
207
|
+
open: "open";
|
|
208
|
+
closed: "closed";
|
|
209
|
+
sold_out: "sold_out";
|
|
210
|
+
on_request: "on_request";
|
|
211
|
+
}>;
|
|
212
|
+
availabilityState: z.ZodEnum<{
|
|
213
|
+
cancelled: "cancelled";
|
|
214
|
+
closed: "closed";
|
|
215
|
+
sold_out: "sold_out";
|
|
216
|
+
past_cutoff: "past_cutoff";
|
|
217
|
+
too_early: "too_early";
|
|
218
|
+
on_request: "on_request";
|
|
219
|
+
unavailable: "unavailable";
|
|
220
|
+
available: "available";
|
|
221
|
+
}>;
|
|
222
|
+
capacity: z.ZodNullable<z.ZodNumber>;
|
|
223
|
+
remaining: z.ZodNullable<z.ZodNumber>;
|
|
224
|
+
pastCutoff: z.ZodBoolean;
|
|
225
|
+
tooEarly: z.ZodBoolean;
|
|
226
|
+
}, z.core.$strip>;
|
|
227
|
+
pax: z.ZodObject<{
|
|
228
|
+
adults: z.ZodNumber;
|
|
229
|
+
children: z.ZodNumber;
|
|
230
|
+
infants: z.ZodNumber;
|
|
231
|
+
total: z.ZodNumber;
|
|
232
|
+
}, z.core.$strip>;
|
|
233
|
+
requestedUnits: z.ZodArray<z.ZodObject<{
|
|
234
|
+
unitId: z.ZodNullable<z.ZodString>;
|
|
235
|
+
requestRef: z.ZodNullable<z.ZodString>;
|
|
236
|
+
name: z.ZodString;
|
|
237
|
+
unitType: z.ZodNullable<z.ZodString>;
|
|
238
|
+
quantity: z.ZodNumber;
|
|
239
|
+
pricingMode: z.ZodNullable<z.ZodString>;
|
|
240
|
+
unitPrice: z.ZodNumber;
|
|
241
|
+
total: z.ZodNumber;
|
|
242
|
+
currencyCode: z.ZodString;
|
|
243
|
+
tierId: z.ZodNullable<z.ZodString>;
|
|
244
|
+
}, z.core.$strip>>;
|
|
245
|
+
rooms: z.ZodArray<z.ZodObject<{
|
|
246
|
+
unitId: z.ZodString;
|
|
247
|
+
name: z.ZodString;
|
|
248
|
+
occupancy: z.ZodNumber;
|
|
249
|
+
quantity: z.ZodNumber;
|
|
250
|
+
pax: z.ZodNumber;
|
|
251
|
+
pricingMode: z.ZodNullable<z.ZodString>;
|
|
252
|
+
unitPrice: z.ZodNumber;
|
|
253
|
+
total: z.ZodNumber;
|
|
254
|
+
currencyCode: z.ZodString;
|
|
255
|
+
tierId: z.ZodNullable<z.ZodString>;
|
|
256
|
+
}, z.core.$strip>>;
|
|
257
|
+
}, z.core.$strip>;
|
|
258
|
+
units: z.ZodArray<z.ZodObject<{
|
|
259
|
+
unitId: z.ZodNullable<z.ZodString>;
|
|
260
|
+
requestRef: z.ZodNullable<z.ZodString>;
|
|
261
|
+
name: z.ZodString;
|
|
262
|
+
unitType: z.ZodNullable<z.ZodString>;
|
|
263
|
+
quantity: z.ZodNumber;
|
|
264
|
+
pricingMode: z.ZodNullable<z.ZodString>;
|
|
265
|
+
unitPrice: z.ZodNumber;
|
|
266
|
+
total: z.ZodNumber;
|
|
267
|
+
currencyCode: z.ZodString;
|
|
268
|
+
tierId: z.ZodNullable<z.ZodString>;
|
|
269
|
+
}, z.core.$strip>>;
|
|
270
|
+
rooms: z.ZodArray<z.ZodObject<{
|
|
271
|
+
unitId: z.ZodString;
|
|
272
|
+
name: z.ZodString;
|
|
273
|
+
occupancy: z.ZodNumber;
|
|
274
|
+
quantity: z.ZodNumber;
|
|
275
|
+
pax: z.ZodNumber;
|
|
276
|
+
pricingMode: z.ZodNullable<z.ZodString>;
|
|
277
|
+
unitPrice: z.ZodNumber;
|
|
278
|
+
total: z.ZodNumber;
|
|
279
|
+
currencyCode: z.ZodString;
|
|
280
|
+
tierId: z.ZodNullable<z.ZodString>;
|
|
281
|
+
}, z.core.$strip>>;
|
|
282
|
+
extras: z.ZodArray<z.ZodObject<{
|
|
283
|
+
extraId: z.ZodString;
|
|
284
|
+
name: z.ZodString;
|
|
285
|
+
required: z.ZodBoolean;
|
|
286
|
+
selectable: z.ZodBoolean;
|
|
287
|
+
selected: z.ZodBoolean;
|
|
288
|
+
pricingMode: z.ZodLazy<z.ZodEnum<{
|
|
289
|
+
per_booking: "per_booking";
|
|
290
|
+
free: "free";
|
|
291
|
+
included: "included";
|
|
292
|
+
on_request: "on_request";
|
|
293
|
+
per_person: "per_person";
|
|
294
|
+
quantity_based: "quantity_based";
|
|
295
|
+
}>>;
|
|
296
|
+
quantity: z.ZodNumber;
|
|
297
|
+
unitPrice: z.ZodNumber;
|
|
298
|
+
total: z.ZodNumber;
|
|
299
|
+
currencyCode: z.ZodString;
|
|
300
|
+
}, z.core.$strip>>;
|
|
301
|
+
offers: z.ZodObject<{
|
|
302
|
+
available: z.ZodArray<z.ZodObject<{
|
|
303
|
+
offer: z.ZodLazy<z.ZodObject<{
|
|
304
|
+
id: z.ZodString;
|
|
305
|
+
name: z.ZodString;
|
|
306
|
+
slug: z.ZodNullable<z.ZodString>;
|
|
307
|
+
description: z.ZodNullable<z.ZodString>;
|
|
308
|
+
discountType: z.ZodEnum<{
|
|
309
|
+
percentage: "percentage";
|
|
310
|
+
fixed_amount: "fixed_amount";
|
|
311
|
+
}>;
|
|
312
|
+
discountValue: z.ZodString;
|
|
313
|
+
currency: z.ZodNullable<z.ZodString>;
|
|
314
|
+
applicableProductIds: z.ZodArray<z.ZodString>;
|
|
315
|
+
applicableDepartureIds: z.ZodArray<z.ZodString>;
|
|
316
|
+
validFrom: z.ZodNullable<z.ZodString>;
|
|
317
|
+
validTo: z.ZodNullable<z.ZodString>;
|
|
318
|
+
minTravelers: z.ZodNullable<z.ZodNumber>;
|
|
319
|
+
imageMobileUrl: z.ZodNullable<z.ZodString>;
|
|
320
|
+
imageDesktopUrl: z.ZodNullable<z.ZodString>;
|
|
321
|
+
stackable: z.ZodBoolean;
|
|
322
|
+
createdAt: z.ZodString;
|
|
323
|
+
updatedAt: z.ZodString;
|
|
324
|
+
}, z.core.$strip>>;
|
|
325
|
+
status: z.ZodEnum<{
|
|
326
|
+
applied: "applied";
|
|
327
|
+
not_applicable: "not_applicable";
|
|
328
|
+
conflict: "conflict";
|
|
329
|
+
}>;
|
|
330
|
+
reason: z.ZodNullable<z.ZodEnum<{
|
|
331
|
+
currency: "currency";
|
|
332
|
+
conflict: "conflict";
|
|
333
|
+
min_pax: "min_pax";
|
|
334
|
+
no_discount: "no_discount";
|
|
335
|
+
}>>;
|
|
336
|
+
selected: z.ZodBoolean;
|
|
337
|
+
discountAppliedCents: z.ZodNumber;
|
|
338
|
+
discountedPriceCents: z.ZodNumber;
|
|
339
|
+
}, z.core.$strip>>;
|
|
340
|
+
requested: z.ZodArray<z.ZodObject<{
|
|
341
|
+
kind: z.ZodEnum<{
|
|
342
|
+
slug: "slug";
|
|
343
|
+
code: "code";
|
|
344
|
+
}>;
|
|
345
|
+
value: z.ZodString;
|
|
346
|
+
result: z.ZodNullable<z.ZodLazy<z.ZodObject<{
|
|
347
|
+
status: z.ZodEnum<{
|
|
348
|
+
applied: "applied";
|
|
349
|
+
not_applicable: "not_applicable";
|
|
350
|
+
conflict: "conflict";
|
|
351
|
+
invalid: "invalid";
|
|
352
|
+
}>;
|
|
353
|
+
reason: z.ZodNullable<z.ZodEnum<{
|
|
354
|
+
scope: "scope";
|
|
355
|
+
currency: "currency";
|
|
356
|
+
booking_mismatch: "booking_mismatch";
|
|
357
|
+
conflict: "conflict";
|
|
358
|
+
min_pax: "min_pax";
|
|
359
|
+
no_discount: "no_discount";
|
|
360
|
+
offer_not_found: "offer_not_found";
|
|
361
|
+
offer_expired: "offer_expired";
|
|
362
|
+
offer_not_yet_valid: "offer_not_yet_valid";
|
|
363
|
+
code_not_found: "code_not_found";
|
|
364
|
+
code_required: "code_required";
|
|
365
|
+
code_expired: "code_expired";
|
|
366
|
+
code_not_yet_valid: "code_not_yet_valid";
|
|
367
|
+
session_mismatch: "session_mismatch";
|
|
368
|
+
}>>;
|
|
369
|
+
offer: z.ZodNullable<z.ZodObject<{
|
|
370
|
+
id: z.ZodString;
|
|
371
|
+
name: z.ZodString;
|
|
372
|
+
slug: z.ZodNullable<z.ZodString>;
|
|
373
|
+
description: z.ZodNullable<z.ZodString>;
|
|
374
|
+
discountType: z.ZodEnum<{
|
|
375
|
+
percentage: "percentage";
|
|
376
|
+
fixed_amount: "fixed_amount";
|
|
377
|
+
}>;
|
|
378
|
+
discountValue: z.ZodString;
|
|
379
|
+
currency: z.ZodNullable<z.ZodString>;
|
|
380
|
+
applicableProductIds: z.ZodArray<z.ZodString>;
|
|
381
|
+
applicableDepartureIds: z.ZodArray<z.ZodString>;
|
|
382
|
+
validFrom: z.ZodNullable<z.ZodString>;
|
|
383
|
+
validTo: z.ZodNullable<z.ZodString>;
|
|
384
|
+
minTravelers: z.ZodNullable<z.ZodNumber>;
|
|
385
|
+
imageMobileUrl: z.ZodNullable<z.ZodString>;
|
|
386
|
+
imageDesktopUrl: z.ZodNullable<z.ZodString>;
|
|
387
|
+
stackable: z.ZodBoolean;
|
|
388
|
+
createdAt: z.ZodString;
|
|
389
|
+
updatedAt: z.ZodString;
|
|
390
|
+
}, z.core.$strip>>;
|
|
391
|
+
target: z.ZodObject<{
|
|
392
|
+
bookingId: z.ZodNullable<z.ZodString>;
|
|
393
|
+
sessionId: z.ZodNullable<z.ZodString>;
|
|
394
|
+
productId: z.ZodString;
|
|
395
|
+
departureId: z.ZodNullable<z.ZodString>;
|
|
396
|
+
}, z.core.$strip>;
|
|
397
|
+
pricing: z.ZodObject<{
|
|
398
|
+
basePriceCents: z.ZodNumber;
|
|
399
|
+
currency: z.ZodString;
|
|
400
|
+
discountAppliedCents: z.ZodNumber;
|
|
401
|
+
discountedPriceCents: z.ZodNumber;
|
|
402
|
+
}, z.core.$strip>;
|
|
403
|
+
appliedOffers: z.ZodArray<z.ZodObject<{
|
|
404
|
+
offerId: z.ZodString;
|
|
405
|
+
offerName: z.ZodString;
|
|
406
|
+
discountAppliedCents: z.ZodNumber;
|
|
407
|
+
discountedPriceCents: z.ZodNumber;
|
|
408
|
+
currency: z.ZodString;
|
|
409
|
+
discountKind: z.ZodEnum<{
|
|
410
|
+
percentage: "percentage";
|
|
411
|
+
fixed_amount: "fixed_amount";
|
|
412
|
+
}>;
|
|
413
|
+
discountPercent: z.ZodNullable<z.ZodNumber>;
|
|
414
|
+
discountAmountCents: z.ZodNullable<z.ZodNumber>;
|
|
415
|
+
appliedCode: z.ZodNullable<z.ZodString>;
|
|
416
|
+
stackable: z.ZodBoolean;
|
|
417
|
+
}, z.core.$strip>>;
|
|
418
|
+
conflict: z.ZodNullable<z.ZodObject<{
|
|
419
|
+
policy: z.ZodEnum<{
|
|
420
|
+
best_discount_wins: "best_discount_wins";
|
|
421
|
+
stackable_compose: "stackable_compose";
|
|
422
|
+
}>;
|
|
423
|
+
autoAppliedOfferIds: z.ZodArray<z.ZodString>;
|
|
424
|
+
manualOfferId: z.ZodNullable<z.ZodString>;
|
|
425
|
+
selectedOfferIds: z.ZodArray<z.ZodString>;
|
|
426
|
+
message: z.ZodString;
|
|
427
|
+
}, z.core.$strip>>;
|
|
428
|
+
}, z.core.$strip>>>;
|
|
429
|
+
}, z.core.$strip>>;
|
|
430
|
+
applied: z.ZodArray<z.ZodLazy<z.ZodObject<{
|
|
431
|
+
offerId: z.ZodString;
|
|
432
|
+
offerName: z.ZodString;
|
|
433
|
+
discountAppliedCents: z.ZodNumber;
|
|
434
|
+
discountedPriceCents: z.ZodNumber;
|
|
435
|
+
currency: z.ZodString;
|
|
436
|
+
discountKind: z.ZodEnum<{
|
|
437
|
+
percentage: "percentage";
|
|
438
|
+
fixed_amount: "fixed_amount";
|
|
439
|
+
}>;
|
|
440
|
+
discountPercent: z.ZodNullable<z.ZodNumber>;
|
|
441
|
+
discountAmountCents: z.ZodNullable<z.ZodNumber>;
|
|
442
|
+
appliedCode: z.ZodNullable<z.ZodString>;
|
|
443
|
+
stackable: z.ZodBoolean;
|
|
444
|
+
}, z.core.$strip>>>;
|
|
445
|
+
conflict: z.ZodNullable<z.ZodLazy<z.ZodObject<{
|
|
446
|
+
policy: z.ZodEnum<{
|
|
447
|
+
best_discount_wins: "best_discount_wins";
|
|
448
|
+
stackable_compose: "stackable_compose";
|
|
449
|
+
}>;
|
|
450
|
+
autoAppliedOfferIds: z.ZodArray<z.ZodString>;
|
|
451
|
+
manualOfferId: z.ZodNullable<z.ZodString>;
|
|
452
|
+
selectedOfferIds: z.ZodArray<z.ZodString>;
|
|
453
|
+
message: z.ZodString;
|
|
454
|
+
}, z.core.$strip>>>;
|
|
455
|
+
discountTotal: z.ZodNumber;
|
|
456
|
+
discountTotalCents: z.ZodNumber;
|
|
457
|
+
totalAfterDiscount: z.ZodNumber;
|
|
458
|
+
currencyCode: z.ZodString;
|
|
459
|
+
}, z.core.$strip>;
|
|
460
|
+
totals: z.ZodObject<{
|
|
461
|
+
currencyCode: z.ZodString;
|
|
462
|
+
base: z.ZodNumber;
|
|
463
|
+
extras: z.ZodNumber;
|
|
464
|
+
subtotal: z.ZodNumber;
|
|
465
|
+
discount: z.ZodNumber;
|
|
466
|
+
tax: z.ZodNumber;
|
|
467
|
+
total: z.ZodNumber;
|
|
468
|
+
perPerson: z.ZodNumber;
|
|
469
|
+
perBooking: z.ZodNumber;
|
|
470
|
+
}, z.core.$strip>;
|
|
167
471
|
}, z.core.$strip>;
|
|
168
472
|
}, z.core.$strip>;
|
|
169
473
|
export declare const storefrontDepartureItineraryResponseSchema: z.ZodObject<{
|
|
@@ -234,6 +538,8 @@ export declare const storefrontPromotionalOfferResponseSchema: z.ZodObject<{
|
|
|
234
538
|
}, z.core.$strip>;
|
|
235
539
|
}, z.core.$strip>;
|
|
236
540
|
export type StorefrontSettingsRecord = z.infer<typeof storefrontSettingsSchema>;
|
|
541
|
+
export type StorefrontSettingsInput = z.input<typeof storefrontSettingsInputSchema>;
|
|
542
|
+
export type StorefrontSettingsPatchInput = z.input<typeof storefrontSettingsPatchSchema>;
|
|
237
543
|
export type StorefrontDepartureRecord = z.infer<typeof storefrontDepartureSchema>;
|
|
238
544
|
export type StorefrontDepartureListQuery = z.input<typeof storefrontDepartureListQuerySchema>;
|
|
239
545
|
export type StorefrontDeparturePricePreviewInput = z.input<typeof storefrontDeparturePricePreviewInputSchema>;
|
package/dist/schemas.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kCAAkC,EAClC,kCAAkC,EAClC,qCAAqC,EACrC,0CAA0C,EAC1C,qCAAqC,EACrC,yBAAyB,EACzB,+BAA+B,EAC/B,qCAAqC,EACrC,mCAAmC,EACnC,gCAAgC,EAChC,sCAAsC,EACtC,yCAAyC,EACzC,yCAAyC,EACzC,gCAAgC,EAChC,wBAAwB,EACzB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC;;iBAA6B,CAAA;AAC3F,eAAO,MAAM,aAAa,GAAI,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC;;iBAAsC,CAAA;AAEnG,OAAO,EACL,kCAAkC,EAClC,kCAAkC,EAClC,qCAAqC,EACrC,0CAA0C,EAC1C,qCAAqC,EACrC,yBAAyB,EACzB,+BAA+B,EAC/B,qCAAqC,EACrC,mCAAmC,EACnC,gCAAgC,EAChC,sCAAsC,EACtC,yCAAyC,EACzC,yCAAyC,EACzC,gCAAgC,EAChC,wBAAwB,GACzB,CAAA;AAED,eAAO,MAAM,gCAAgC
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kCAAkC,EAClC,kCAAkC,EAClC,qCAAqC,EACrC,wCAAwC,EACxC,yCAAyC,EACzC,sCAAsC,EACtC,yCAAyC,EACzC,oCAAoC,EACpC,iCAAiC,EACjC,0CAA0C,EAC1C,qCAAqC,EACrC,4CAA4C,EAC5C,qCAAqC,EACrC,kCAAkC,EAClC,oCAAoC,EACpC,qCAAqC,EACrC,yBAAyB,EACzB,+BAA+B,EAC/B,qCAAqC,EACrC,mCAAmC,E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C,CAAC,KAAK,CACvD,OAAO,yCAAyC,CACjD,CAAA;AACD,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAA;AAC/F,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAA;AACvF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAA;AACzF,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAA"}
|
package/dist/schemas.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { storefrontDepartureItinerarySchema, storefrontDepartureListQuerySchema, storefrontDepartureListResponseSchema, storefrontDeparturePricePreviewInputSchema, storefrontDeparturePricePreviewSchema, storefrontDepartureSchema, storefrontOfferApplyInputSchema, storefrontOfferMutationResponseSchema, storefrontOfferMutationResultSchema, storefrontOfferRedeemInputSchema, storefrontProductExtensionsQuerySchema, storefrontProductExtensionsResponseSchema, storefrontPromotionalOfferListQuerySchema, storefrontPromotionalOfferSchema, storefrontSettingsSchema, } from "@voyantjs/storefront";
|
|
1
|
+
import { storefrontDepartureItinerarySchema, storefrontDepartureListQuerySchema, storefrontDepartureListResponseSchema, storefrontDeparturePriceAllocationSchema, storefrontDeparturePriceExtraImpactSchema, storefrontDeparturePriceLineItemSchema, storefrontDeparturePriceOfferImpactSchema, storefrontDeparturePriceOffersSchema, storefrontDeparturePricePaxSchema, storefrontDeparturePricePreviewInputSchema, storefrontDeparturePricePreviewSchema, storefrontDeparturePriceRequestedOfferSchema, storefrontDeparturePriceRoomRowSchema, storefrontDeparturePriceSlotSchema, storefrontDeparturePriceTotalsSchema, storefrontDeparturePriceUnitRowSchema, storefrontDepartureSchema, storefrontOfferApplyInputSchema, storefrontOfferMutationResponseSchema, storefrontOfferMutationResultSchema, storefrontOfferRedeemInputSchema, storefrontProductExtensionsQuerySchema, storefrontProductExtensionsResponseSchema, storefrontPromotionalOfferListQuerySchema, storefrontPromotionalOfferSchema, storefrontSettingsInputSchema, storefrontSettingsPatchSchema, storefrontSettingsSchema, } from "@voyantjs/storefront";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
export const singleEnvelope = (item) => z.object({ data: item });
|
|
4
4
|
export const arrayEnvelope = (item) => z.object({ data: z.array(item) });
|
|
5
|
-
export { storefrontDepartureItinerarySchema, storefrontDepartureListQuerySchema, storefrontDepartureListResponseSchema, storefrontDeparturePricePreviewInputSchema, storefrontDeparturePricePreviewSchema, storefrontDepartureSchema, storefrontOfferApplyInputSchema, storefrontOfferMutationResponseSchema, storefrontOfferMutationResultSchema, storefrontOfferRedeemInputSchema, storefrontProductExtensionsQuerySchema, storefrontProductExtensionsResponseSchema, storefrontPromotionalOfferListQuerySchema, storefrontPromotionalOfferSchema, storefrontSettingsSchema, };
|
|
5
|
+
export { storefrontDepartureItinerarySchema, storefrontDepartureListQuerySchema, storefrontDepartureListResponseSchema, storefrontDeparturePriceAllocationSchema, storefrontDeparturePriceExtraImpactSchema, storefrontDeparturePriceLineItemSchema, storefrontDeparturePriceOfferImpactSchema, storefrontDeparturePriceOffersSchema, storefrontDeparturePricePaxSchema, storefrontDeparturePricePreviewInputSchema, storefrontDeparturePricePreviewSchema, storefrontDeparturePriceRequestedOfferSchema, storefrontDeparturePriceRoomRowSchema, storefrontDeparturePriceSlotSchema, storefrontDeparturePriceTotalsSchema, storefrontDeparturePriceUnitRowSchema, storefrontDepartureSchema, storefrontOfferApplyInputSchema, storefrontOfferMutationResponseSchema, storefrontOfferMutationResultSchema, storefrontOfferRedeemInputSchema, storefrontProductExtensionsQuerySchema, storefrontProductExtensionsResponseSchema, storefrontPromotionalOfferListQuerySchema, storefrontPromotionalOfferSchema, storefrontSettingsInputSchema, storefrontSettingsPatchSchema, storefrontSettingsSchema, };
|
|
6
6
|
export const storefrontSettingsResponseSchema = singleEnvelope(storefrontSettingsSchema);
|
|
7
7
|
export const storefrontDepartureResponseSchema = singleEnvelope(storefrontDepartureSchema);
|
|
8
8
|
export const storefrontDeparturePricePreviewResponseSchema = singleEnvelope(storefrontDeparturePricePreviewSchema);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyantjs/storefront-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.50.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"react": "^19.0.0",
|
|
42
42
|
"react-dom": "^19.0.0",
|
|
43
43
|
"zod": "^4.0.0",
|
|
44
|
-
"@voyantjs/storefront": "0.
|
|
44
|
+
"@voyantjs/storefront": "0.50.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@tanstack/react-query": "^5.96.2",
|
|
@@ -52,12 +52,12 @@
|
|
|
52
52
|
"typescript": "^6.0.2",
|
|
53
53
|
"vitest": "^4.1.2",
|
|
54
54
|
"zod": "^4.3.6",
|
|
55
|
-
"@voyantjs/react": "0.
|
|
56
|
-
"@voyantjs/storefront": "0.
|
|
55
|
+
"@voyantjs/react": "0.50.0",
|
|
56
|
+
"@voyantjs/storefront": "0.50.0",
|
|
57
57
|
"@voyantjs/voyant-typescript-config": "0.1.0"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@voyantjs/react": "0.
|
|
60
|
+
"@voyantjs/react": "0.50.0"
|
|
61
61
|
},
|
|
62
62
|
"files": [
|
|
63
63
|
"dist"
|