@voyantjs/storefront 0.28.1 → 0.29.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.
@@ -28,7 +28,7 @@ export declare function createStorefrontPublicRoutes(options?: StorefrontService
28
28
  fields: {
29
29
  key: string;
30
30
  label: string;
31
- type: "date" | "select" | "email" | "text" | "country" | "tel" | "textarea" | "checkbox";
31
+ type: "text" | "date" | "select" | "email" | "country" | "tel" | "textarea" | "checkbox";
32
32
  required: boolean;
33
33
  placeholder: string | null;
34
34
  description: string | null;
@@ -43,7 +43,7 @@ export declare function createStorefrontPublicRoutes(options?: StorefrontService
43
43
  fields: {
44
44
  key: string;
45
45
  label: string;
46
- type: "date" | "select" | "email" | "text" | "country" | "tel" | "textarea" | "checkbox";
46
+ type: "text" | "date" | "select" | "email" | "country" | "tel" | "textarea" | "checkbox";
47
47
  required: boolean;
48
48
  placeholder: string | null;
49
49
  description: string | null;
@@ -97,7 +97,7 @@ export declare function createStorefrontPublicRoutes(options?: StorefrontService
97
97
  meetingPoint: string | null;
98
98
  capacity: number | null;
99
99
  remaining: number | null;
100
- departureStatus: "open" | "closed" | "sold_out" | "cancelled" | "on_request";
100
+ departureStatus: "cancelled" | "open" | "closed" | "sold_out" | "on_request";
101
101
  nights: number | null;
102
102
  days: number | null;
103
103
  ratePlans: {
@@ -167,7 +167,7 @@ export declare function createStorefrontPublicRoutes(options?: StorefrontService
167
167
  meetingPoint: string | null;
168
168
  capacity: number | null;
169
169
  remaining: number | null;
170
- departureStatus: "open" | "closed" | "sold_out" | "cancelled" | "on_request";
170
+ departureStatus: "cancelled" | "open" | "closed" | "sold_out" | "on_request";
171
171
  nights: number | null;
172
172
  days: number | null;
173
173
  ratePlans: {
@@ -312,7 +312,7 @@ export declare function createStorefrontPublicRoutes(options?: StorefrontService
312
312
  output: {
313
313
  data: {
314
314
  productId: string;
315
- availabilityState: "closed" | "sold_out" | "cancelled" | "past_cutoff" | "too_early" | "unavailable" | "on_request" | "available";
315
+ availabilityState: "cancelled" | "closed" | "sold_out" | "past_cutoff" | "too_early" | "unavailable" | "on_request" | "available";
316
316
  counts: {
317
317
  total: number;
318
318
  open: number;
@@ -332,8 +332,8 @@ export declare function createStorefrontPublicRoutes(options?: StorefrontService
332
332
  startAt: string | null;
333
333
  endAt: string | null;
334
334
  timezone: string;
335
- status: "open" | "closed" | "sold_out" | "cancelled" | "on_request";
336
- availabilityState: "closed" | "sold_out" | "cancelled" | "past_cutoff" | "too_early" | "unavailable" | "on_request" | "available";
335
+ status: "cancelled" | "open" | "closed" | "sold_out" | "on_request";
336
+ availabilityState: "cancelled" | "closed" | "sold_out" | "past_cutoff" | "too_early" | "unavailable" | "on_request" | "available";
337
337
  capacity: number | null;
338
338
  remaining: number | null;
339
339
  pastCutoff: boolean;
@@ -18,7 +18,7 @@ export declare function getStorefrontDeparture(db: PostgresJsDatabase, departure
18
18
  meetingPoint: string | null;
19
19
  capacity: number | null;
20
20
  remaining: number | null;
21
- departureStatus: "open" | "closed" | "sold_out" | "cancelled" | "on_request";
21
+ departureStatus: "cancelled" | "open" | "closed" | "sold_out" | "on_request";
22
22
  nights: number | null;
23
23
  days: number | null;
24
24
  ratePlans: {
@@ -64,7 +64,7 @@ export declare function listStorefrontProductDepartures(db: PostgresJsDatabase,
64
64
  meetingPoint: string | null;
65
65
  capacity: number | null;
66
66
  remaining: number | null;
67
- departureStatus: "open" | "closed" | "sold_out" | "cancelled" | "on_request";
67
+ departureStatus: "cancelled" | "open" | "closed" | "sold_out" | "on_request";
68
68
  nights: number | null;
69
69
  days: number | null;
70
70
  ratePlans: {
@@ -118,7 +118,7 @@ export declare function getStorefrontProductAvailabilitySummary(db: PostgresJsDa
118
118
  startAt: string | null;
119
119
  endAt: string | null;
120
120
  timezone: string;
121
- status: "open" | "closed" | "sold_out" | "cancelled" | "on_request";
121
+ status: "cancelled" | "open" | "closed" | "sold_out" | "on_request";
122
122
  availabilityState: StorefrontProductAvailabilityState;
123
123
  capacity: number | null;
124
124
  remaining: number | null;
package/dist/service.d.ts CHANGED
@@ -44,7 +44,7 @@ export declare function createStorefrontService(options?: StorefrontServiceOptio
44
44
  fields: {
45
45
  key: string;
46
46
  label: string;
47
- type: "date" | "select" | "email" | "text" | "country" | "tel" | "textarea" | "checkbox";
47
+ type: "text" | "date" | "select" | "email" | "country" | "tel" | "textarea" | "checkbox";
48
48
  required: boolean;
49
49
  placeholder: string | null;
50
50
  description: string | null;
@@ -59,7 +59,7 @@ export declare function createStorefrontService(options?: StorefrontServiceOptio
59
59
  fields: {
60
60
  key: string;
61
61
  label: string;
62
- type: "date" | "select" | "email" | "text" | "country" | "tel" | "textarea" | "checkbox";
62
+ type: "text" | "date" | "select" | "email" | "country" | "tel" | "textarea" | "checkbox";
63
63
  required: boolean;
64
64
  placeholder: string | null;
65
65
  description: string | null;
@@ -99,7 +99,7 @@ export declare function createStorefrontService(options?: StorefrontServiceOptio
99
99
  meetingPoint: string | null;
100
100
  capacity: number | null;
101
101
  remaining: number | null;
102
- departureStatus: "open" | "closed" | "sold_out" | "cancelled" | "on_request";
102
+ departureStatus: "cancelled" | "open" | "closed" | "sold_out" | "on_request";
103
103
  nights: number | null;
104
104
  days: number | null;
105
105
  ratePlans: {
@@ -145,7 +145,7 @@ export declare function createStorefrontService(options?: StorefrontServiceOptio
145
145
  meetingPoint: string | null;
146
146
  capacity: number | null;
147
147
  remaining: number | null;
148
- departureStatus: "open" | "closed" | "sold_out" | "cancelled" | "on_request";
148
+ departureStatus: "cancelled" | "open" | "closed" | "sold_out" | "on_request";
149
149
  nights: number | null;
150
150
  days: number | null;
151
151
  ratePlans: {
@@ -238,7 +238,7 @@ export declare function createStorefrontService(options?: StorefrontServiceOptio
238
238
  }>;
239
239
  getProductAvailabilitySummary(db: PostgresJsDatabase, productId: string, query: StorefrontProductAvailabilitySummaryQuery): Promise<{
240
240
  productId: string;
241
- availabilityState: "closed" | "sold_out" | "cancelled" | "past_cutoff" | "too_early" | "unavailable" | "on_request" | "available";
241
+ availabilityState: "cancelled" | "closed" | "sold_out" | "past_cutoff" | "too_early" | "unavailable" | "on_request" | "available";
242
242
  counts: {
243
243
  total: number;
244
244
  open: number;
@@ -258,8 +258,8 @@ export declare function createStorefrontService(options?: StorefrontServiceOptio
258
258
  startAt: string | null;
259
259
  endAt: string | null;
260
260
  timezone: string;
261
- status: "open" | "closed" | "sold_out" | "cancelled" | "on_request";
262
- availabilityState: "closed" | "sold_out" | "cancelled" | "past_cutoff" | "too_early" | "unavailable" | "on_request" | "available";
261
+ status: "cancelled" | "open" | "closed" | "sold_out" | "on_request";
262
+ availabilityState: "cancelled" | "closed" | "sold_out" | "past_cutoff" | "too_early" | "unavailable" | "on_request" | "available";
263
263
  capacity: number | null;
264
264
  remaining: number | null;
265
265
  pastCutoff: boolean;
@@ -7,10 +7,10 @@ export declare const storefrontPaymentMethodCodeSchema: z.ZodEnum<{
7
7
  invoice: "invoice";
8
8
  }>;
9
9
  export declare const storefrontFormFieldTypeSchema: z.ZodEnum<{
10
+ text: "text";
10
11
  date: "date";
11
12
  select: "select";
12
13
  email: "email";
13
- text: "text";
14
14
  country: "country";
15
15
  tel: "tel";
16
16
  textarea: "textarea";
@@ -24,10 +24,10 @@ export declare const storefrontFormFieldInputSchema: z.ZodObject<{
24
24
  key: z.ZodString;
25
25
  label: z.ZodString;
26
26
  type: z.ZodDefault<z.ZodEnum<{
27
+ text: "text";
27
28
  date: "date";
28
29
  select: "select";
29
30
  email: "email";
30
- text: "text";
31
31
  country: "country";
32
32
  tel: "tel";
33
33
  textarea: "textarea";
@@ -46,10 +46,10 @@ export declare const storefrontFormFieldSchema: z.ZodObject<{
46
46
  key: z.ZodString;
47
47
  label: z.ZodString;
48
48
  type: z.ZodEnum<{
49
+ text: "text";
49
50
  date: "date";
50
51
  select: "select";
51
52
  email: "email";
52
- text: "text";
53
53
  country: "country";
54
54
  tel: "tel";
55
55
  textarea: "textarea";
@@ -108,10 +108,10 @@ export declare const storefrontSettingsInputSchema: z.ZodObject<{
108
108
  key: z.ZodString;
109
109
  label: z.ZodString;
110
110
  type: z.ZodDefault<z.ZodEnum<{
111
+ text: "text";
111
112
  date: "date";
112
113
  select: "select";
113
114
  email: "email";
114
- text: "text";
115
115
  country: "country";
116
116
  tel: "tel";
117
117
  textarea: "textarea";
@@ -132,10 +132,10 @@ export declare const storefrontSettingsInputSchema: z.ZodObject<{
132
132
  key: z.ZodString;
133
133
  label: z.ZodString;
134
134
  type: z.ZodDefault<z.ZodEnum<{
135
+ text: "text";
135
136
  date: "date";
136
137
  select: "select";
137
138
  email: "email";
138
- text: "text";
139
139
  country: "country";
140
140
  tel: "tel";
141
141
  textarea: "textarea";
@@ -194,10 +194,10 @@ export declare const storefrontSettingsSchema: z.ZodObject<{
194
194
  key: z.ZodString;
195
195
  label: z.ZodString;
196
196
  type: z.ZodEnum<{
197
+ text: "text";
197
198
  date: "date";
198
199
  select: "select";
199
200
  email: "email";
200
- text: "text";
201
201
  country: "country";
202
202
  tel: "tel";
203
203
  textarea: "textarea";
@@ -218,10 +218,10 @@ export declare const storefrontSettingsSchema: z.ZodObject<{
218
218
  key: z.ZodString;
219
219
  label: z.ZodString;
220
220
  type: z.ZodEnum<{
221
+ text: "text";
221
222
  date: "date";
222
223
  select: "select";
223
224
  email: "email";
224
- text: "text";
225
225
  country: "country";
226
226
  tel: "tel";
227
227
  textarea: "textarea";
@@ -261,10 +261,10 @@ export declare const storefrontSettingsSchema: z.ZodObject<{
261
261
  }, z.core.$strip>;
262
262
  }, z.core.$strip>;
263
263
  export declare const storefrontDepartureStatusSchema: z.ZodEnum<{
264
+ cancelled: "cancelled";
264
265
  open: "open";
265
266
  closed: "closed";
266
267
  sold_out: "sold_out";
267
- cancelled: "cancelled";
268
268
  on_request: "on_request";
269
269
  }>;
270
270
  export declare const storefrontDepartureRoomOccupancySchema: z.ZodObject<{
@@ -333,10 +333,10 @@ export declare const storefrontDepartureSchema: z.ZodObject<{
333
333
  capacity: z.ZodNullable<z.ZodNumber>;
334
334
  remaining: z.ZodNullable<z.ZodNumber>;
335
335
  departureStatus: z.ZodEnum<{
336
+ cancelled: "cancelled";
336
337
  open: "open";
337
338
  closed: "closed";
338
339
  sold_out: "sold_out";
339
- cancelled: "cancelled";
340
340
  on_request: "on_request";
341
341
  }>;
342
342
  nights: z.ZodNullable<z.ZodNumber>;
@@ -367,12 +367,12 @@ export declare const storefrontDepartureSchema: z.ZodObject<{
367
367
  }, z.core.$strip>;
368
368
  export declare const storefrontDepartureListQuerySchema: z.ZodObject<{
369
369
  optionId: z.ZodOptional<z.ZodString>;
370
- status: z.ZodOptional<z.ZodEnum<{
370
+ status: z.ZodOptional<z.ZodLazy<z.ZodEnum<{
371
+ cancelled: "cancelled";
371
372
  open: "open";
372
373
  closed: "closed";
373
374
  sold_out: "sold_out";
374
- cancelled: "cancelled";
375
- }>>;
375
+ }>>>;
376
376
  dateFrom: z.ZodOptional<z.ZodString>;
377
377
  dateTo: z.ZodOptional<z.ZodString>;
378
378
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
@@ -398,10 +398,10 @@ export declare const storefrontDepartureListResponseSchema: z.ZodObject<{
398
398
  capacity: z.ZodNullable<z.ZodNumber>;
399
399
  remaining: z.ZodNullable<z.ZodNumber>;
400
400
  departureStatus: z.ZodEnum<{
401
+ cancelled: "cancelled";
401
402
  open: "open";
402
403
  closed: "closed";
403
404
  sold_out: "sold_out";
404
- cancelled: "cancelled";
405
405
  on_request: "on_request";
406
406
  }>;
407
407
  nights: z.ZodNullable<z.ZodNumber>;
@@ -435,9 +435,9 @@ export declare const storefrontDepartureListResponseSchema: z.ZodObject<{
435
435
  offset: z.ZodNumber;
436
436
  }, z.core.$strip>;
437
437
  export declare const storefrontProductAvailabilityStateSchema: z.ZodEnum<{
438
+ cancelled: "cancelled";
438
439
  closed: "closed";
439
440
  sold_out: "sold_out";
440
- cancelled: "cancelled";
441
441
  past_cutoff: "past_cutoff";
442
442
  too_early: "too_early";
443
443
  unavailable: "unavailable";
@@ -447,10 +447,10 @@ export declare const storefrontProductAvailabilityStateSchema: z.ZodEnum<{
447
447
  export declare const storefrontProductAvailabilitySummaryQuerySchema: z.ZodObject<{
448
448
  optionId: z.ZodOptional<z.ZodString>;
449
449
  status: z.ZodOptional<z.ZodEnum<{
450
+ cancelled: "cancelled";
450
451
  open: "open";
451
452
  closed: "closed";
452
453
  sold_out: "sold_out";
453
- cancelled: "cancelled";
454
454
  on_request: "on_request";
455
455
  }>>;
456
456
  dateFrom: z.ZodOptional<z.ZodString>;
@@ -468,16 +468,16 @@ export declare const storefrontProductAvailabilitySlotSchema: z.ZodObject<{
468
468
  endAt: z.ZodNullable<z.ZodString>;
469
469
  timezone: z.ZodString;
470
470
  status: z.ZodEnum<{
471
+ cancelled: "cancelled";
471
472
  open: "open";
472
473
  closed: "closed";
473
474
  sold_out: "sold_out";
474
- cancelled: "cancelled";
475
475
  on_request: "on_request";
476
476
  }>;
477
477
  availabilityState: z.ZodEnum<{
478
+ cancelled: "cancelled";
478
479
  closed: "closed";
479
480
  sold_out: "sold_out";
480
- cancelled: "cancelled";
481
481
  past_cutoff: "past_cutoff";
482
482
  too_early: "too_early";
483
483
  unavailable: "unavailable";
@@ -492,9 +492,9 @@ export declare const storefrontProductAvailabilitySlotSchema: z.ZodObject<{
492
492
  export declare const storefrontProductAvailabilitySummarySchema: z.ZodObject<{
493
493
  productId: z.ZodString;
494
494
  availabilityState: z.ZodEnum<{
495
+ cancelled: "cancelled";
495
496
  closed: "closed";
496
497
  sold_out: "sold_out";
497
- cancelled: "cancelled";
498
498
  past_cutoff: "past_cutoff";
499
499
  too_early: "too_early";
500
500
  unavailable: "unavailable";
@@ -521,16 +521,16 @@ export declare const storefrontProductAvailabilitySummarySchema: z.ZodObject<{
521
521
  endAt: z.ZodNullable<z.ZodString>;
522
522
  timezone: z.ZodString;
523
523
  status: z.ZodEnum<{
524
+ cancelled: "cancelled";
524
525
  open: "open";
525
526
  closed: "closed";
526
527
  sold_out: "sold_out";
527
- cancelled: "cancelled";
528
528
  on_request: "on_request";
529
529
  }>;
530
530
  availabilityState: z.ZodEnum<{
531
+ cancelled: "cancelled";
531
532
  closed: "closed";
532
533
  sold_out: "sold_out";
533
- cancelled: "cancelled";
534
534
  past_cutoff: "past_cutoff";
535
535
  too_early: "too_early";
536
536
  unavailable: "unavailable";
@@ -550,9 +550,9 @@ export declare const storefrontProductAvailabilitySummaryResponseSchema: z.ZodOb
550
550
  data: z.ZodObject<{
551
551
  productId: z.ZodString;
552
552
  availabilityState: z.ZodEnum<{
553
+ cancelled: "cancelled";
553
554
  closed: "closed";
554
555
  sold_out: "sold_out";
555
- cancelled: "cancelled";
556
556
  past_cutoff: "past_cutoff";
557
557
  too_early: "too_early";
558
558
  unavailable: "unavailable";
@@ -579,16 +579,16 @@ export declare const storefrontProductAvailabilitySummaryResponseSchema: z.ZodOb
579
579
  endAt: z.ZodNullable<z.ZodString>;
580
580
  timezone: z.ZodString;
581
581
  status: z.ZodEnum<{
582
+ cancelled: "cancelled";
582
583
  open: "open";
583
584
  closed: "closed";
584
585
  sold_out: "sold_out";
585
- cancelled: "cancelled";
586
586
  on_request: "on_request";
587
587
  }>;
588
588
  availabilityState: z.ZodEnum<{
589
+ cancelled: "cancelled";
589
590
  closed: "closed";
590
591
  sold_out: "sold_out";
591
- cancelled: "cancelled";
592
592
  past_cutoff: "past_cutoff";
593
593
  too_early: "too_early";
594
594
  unavailable: "unavailable";
@@ -669,14 +669,14 @@ export declare const storefrontProductExtensionSchema: z.ZodObject<{
669
669
  thumb: z.ZodNullable<z.ZodString>;
670
670
  pricePerPerson: z.ZodNullable<z.ZodNumber>;
671
671
  currencyCode: z.ZodString;
672
- pricingMode: z.ZodEnum<{
672
+ pricingMode: z.ZodLazy<z.ZodEnum<{
673
673
  included: "included";
674
674
  per_person: "per_person";
675
675
  per_booking: "per_booking";
676
676
  quantity_based: "quantity_based";
677
677
  on_request: "on_request";
678
678
  free: "free";
679
- }>;
679
+ }>>;
680
680
  defaultQuantity: z.ZodNullable<z.ZodNumber>;
681
681
  minQuantity: z.ZodNullable<z.ZodNumber>;
682
682
  maxQuantity: z.ZodNullable<z.ZodNumber>;
@@ -693,14 +693,14 @@ export declare const storefrontProductExtensionsResponseSchema: z.ZodObject<{
693
693
  thumb: z.ZodNullable<z.ZodString>;
694
694
  pricePerPerson: z.ZodNullable<z.ZodNumber>;
695
695
  currencyCode: z.ZodString;
696
- pricingMode: z.ZodEnum<{
696
+ pricingMode: z.ZodLazy<z.ZodEnum<{
697
697
  included: "included";
698
698
  per_person: "per_person";
699
699
  per_booking: "per_booking";
700
700
  quantity_based: "quantity_based";
701
701
  on_request: "on_request";
702
702
  free: "free";
703
- }>;
703
+ }>>;
704
704
  defaultQuantity: z.ZodNullable<z.ZodNumber>;
705
705
  minQuantity: z.ZodNullable<z.ZodNumber>;
706
706
  maxQuantity: z.ZodNullable<z.ZodNumber>;
@@ -716,14 +716,14 @@ export declare const storefrontProductExtensionsResponseSchema: z.ZodObject<{
716
716
  thumb: z.ZodNullable<z.ZodString>;
717
717
  pricePerPerson: z.ZodNullable<z.ZodNumber>;
718
718
  currencyCode: z.ZodString;
719
- pricingMode: z.ZodEnum<{
719
+ pricingMode: z.ZodLazy<z.ZodEnum<{
720
720
  included: "included";
721
721
  per_person: "per_person";
722
722
  per_booking: "per_booking";
723
723
  quantity_based: "quantity_based";
724
724
  on_request: "on_request";
725
725
  free: "free";
726
- }>;
726
+ }>>;
727
727
  defaultQuantity: z.ZodNullable<z.ZodNumber>;
728
728
  minQuantity: z.ZodNullable<z.ZodNumber>;
729
729
  maxQuantity: z.ZodNullable<z.ZodNumber>;
@@ -1 +1 @@
1
- {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../src/validation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAQvB,eAAO,MAAM,iCAAiC;;;;;;EAM5C,CAAA;AAEF,eAAO,MAAM,6BAA6B;;;;;;;;;EAS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AAC,CAAA;AACnF,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAA;AAC3F,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAA;AACnF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA;AACzE,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAA;AAC7F,MAAM,MAAM,yCAAyC,GAAG,CAAC,CAAC,KAAK,CAC7D,OAAO,+CAA+C,CACvD,CAAA;AACD,MAAM,MAAM,oCAAoC,GAAG,CAAC,CAAC,KAAK,CACxD,OAAO,0CAA0C,CAClD,CAAA;AACD,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAA"}
@@ -185,7 +185,8 @@ export const storefrontDepartureSchema = z.object({
185
185
  });
186
186
  export const storefrontDepartureListQuerySchema = z.object({
187
187
  optionId: z.string().optional(),
188
- status: availabilitySlotStatusSchema.optional(),
188
+ // `z.lazy(() => …)` for cross-package init-cycle protection — see #501.
189
+ status: z.lazy(() => availabilitySlotStatusSchema).optional(),
189
190
  dateFrom: z.string().date().optional(),
190
191
  dateTo: z.string().date().optional(),
191
192
  limit: z.coerce.number().int().min(1).max(250).default(100),
@@ -315,7 +316,8 @@ export const storefrontProductExtensionSchema = z.object({
315
316
  thumb: z.string().nullable(),
316
317
  pricePerPerson: z.number().nullable(),
317
318
  currencyCode: z.string(),
318
- pricingMode: extraPricingModeSchema,
319
+ // `z.lazy(() => …)` for cross-package init-cycle protection — see #501.
320
+ pricingMode: z.lazy(() => extraPricingModeSchema),
319
321
  defaultQuantity: z.number().int().nullable(),
320
322
  minQuantity: z.number().int().nullable(),
321
323
  maxQuantity: z.number().int().nullable(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voyantjs/storefront",
3
- "version": "0.28.1",
3
+ "version": "0.29.0",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "exports": {
@@ -29,18 +29,18 @@
29
29
  "drizzle-orm": "^0.45.2",
30
30
  "hono": "^4.12.10",
31
31
  "zod": "^4.3.6",
32
- "@voyantjs/availability": "0.28.1",
33
- "@voyantjs/core": "0.28.1",
34
- "@voyantjs/extras": "0.28.1",
35
- "@voyantjs/hono": "0.28.1",
36
- "@voyantjs/pricing": "0.28.1",
37
- "@voyantjs/products": "0.28.1",
38
- "@voyantjs/sellability": "0.28.1"
32
+ "@voyantjs/availability": "0.29.0",
33
+ "@voyantjs/core": "0.29.0",
34
+ "@voyantjs/extras": "0.29.0",
35
+ "@voyantjs/hono": "0.29.0",
36
+ "@voyantjs/pricing": "0.29.0",
37
+ "@voyantjs/products": "0.29.0",
38
+ "@voyantjs/sellability": "0.29.0"
39
39
  },
40
40
  "devDependencies": {
41
41
  "typescript": "^6.0.2",
42
42
  "vitest": "^4.1.2",
43
- "@voyantjs/db": "0.28.1",
43
+ "@voyantjs/db": "0.29.0",
44
44
  "@voyantjs/voyant-typescript-config": "0.1.0"
45
45
  },
46
46
  "files": [