@voyantjs/products 0.3.0 → 0.3.1

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.
@@ -0,0 +1,454 @@
1
+ import { z } from "zod";
2
+ export declare const publicCatalogProductListQuerySchema: z.ZodObject<{
3
+ search: z.ZodOptional<z.ZodString>;
4
+ languageTag: z.ZodOptional<z.ZodString>;
5
+ bookingMode: z.ZodOptional<z.ZodEnum<{
6
+ date: "date";
7
+ other: "other";
8
+ date_time: "date_time";
9
+ open: "open";
10
+ stay: "stay";
11
+ transfer: "transfer";
12
+ itinerary: "itinerary";
13
+ }>>;
14
+ capacityMode: z.ZodOptional<z.ZodEnum<{
15
+ free_sale: "free_sale";
16
+ limited: "limited";
17
+ on_request: "on_request";
18
+ }>>;
19
+ productTypeId: z.ZodOptional<z.ZodString>;
20
+ categoryId: z.ZodOptional<z.ZodString>;
21
+ tagId: z.ZodOptional<z.ZodString>;
22
+ featured: z.ZodOptional<z.ZodPipe<z.ZodEnum<{
23
+ 0: "0";
24
+ 1: "1";
25
+ true: "true";
26
+ false: "false";
27
+ }>, z.ZodTransform<boolean, "0" | "1" | "true" | "false">>>;
28
+ sort: z.ZodDefault<z.ZodEnum<{
29
+ name: "name";
30
+ createdAt: "createdAt";
31
+ startDate: "startDate";
32
+ price: "price";
33
+ }>>;
34
+ direction: z.ZodDefault<z.ZodEnum<{
35
+ asc: "asc";
36
+ desc: "desc";
37
+ }>>;
38
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
39
+ offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
40
+ }, z.core.$strip>;
41
+ export declare const publicCatalogCategoryListQuerySchema: z.ZodObject<{
42
+ search: z.ZodOptional<z.ZodString>;
43
+ parentId: z.ZodOptional<z.ZodString>;
44
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
45
+ offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
46
+ }, z.core.$strip>;
47
+ export declare const publicCatalogTagListQuerySchema: z.ZodObject<{
48
+ search: z.ZodOptional<z.ZodString>;
49
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
50
+ offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
51
+ }, z.core.$strip>;
52
+ export declare const publicCatalogProductLookupBySlugQuerySchema: z.ZodObject<{
53
+ languageTag: z.ZodOptional<z.ZodString>;
54
+ }, z.core.$strip>;
55
+ export declare const publicCatalogProductCategorySchema: z.ZodObject<{
56
+ id: z.ZodString;
57
+ parentId: z.ZodNullable<z.ZodString>;
58
+ name: z.ZodString;
59
+ slug: z.ZodString;
60
+ description: z.ZodNullable<z.ZodString>;
61
+ sortOrder: z.ZodNumber;
62
+ }, z.core.$strip>;
63
+ export declare const publicCatalogProductTagSchema: z.ZodObject<{
64
+ id: z.ZodString;
65
+ name: z.ZodString;
66
+ }, z.core.$strip>;
67
+ export declare const publicCatalogProductTypeSchema: z.ZodObject<{
68
+ id: z.ZodString;
69
+ code: z.ZodString;
70
+ name: z.ZodString;
71
+ description: z.ZodNullable<z.ZodString>;
72
+ }, z.core.$strip>;
73
+ export declare const publicCatalogProductMediaSchema: z.ZodObject<{
74
+ id: z.ZodString;
75
+ mediaType: z.ZodEnum<{
76
+ image: "image";
77
+ video: "video";
78
+ document: "document";
79
+ }>;
80
+ name: z.ZodString;
81
+ url: z.ZodString;
82
+ mimeType: z.ZodNullable<z.ZodString>;
83
+ altText: z.ZodNullable<z.ZodString>;
84
+ sortOrder: z.ZodNumber;
85
+ isCover: z.ZodBoolean;
86
+ }, z.core.$strip>;
87
+ export declare const publicCatalogProductFeatureSchema: z.ZodObject<{
88
+ id: z.ZodString;
89
+ featureType: z.ZodEnum<{
90
+ other: "other";
91
+ inclusion: "inclusion";
92
+ exclusion: "exclusion";
93
+ highlight: "highlight";
94
+ important_information: "important_information";
95
+ }>;
96
+ title: z.ZodString;
97
+ description: z.ZodNullable<z.ZodString>;
98
+ sortOrder: z.ZodNumber;
99
+ }, z.core.$strip>;
100
+ export declare const publicCatalogProductFaqSchema: z.ZodObject<{
101
+ id: z.ZodString;
102
+ question: z.ZodString;
103
+ answer: z.ZodString;
104
+ sortOrder: z.ZodNumber;
105
+ }, z.core.$strip>;
106
+ export declare const publicCatalogProductLocationSchema: z.ZodObject<{
107
+ id: z.ZodString;
108
+ locationType: z.ZodEnum<{
109
+ other: "other";
110
+ start: "start";
111
+ end: "end";
112
+ meeting_point: "meeting_point";
113
+ pickup: "pickup";
114
+ dropoff: "dropoff";
115
+ point_of_interest: "point_of_interest";
116
+ }>;
117
+ title: z.ZodString;
118
+ address: z.ZodNullable<z.ZodString>;
119
+ city: z.ZodNullable<z.ZodString>;
120
+ countryCode: z.ZodNullable<z.ZodString>;
121
+ latitude: z.ZodNullable<z.ZodNumber>;
122
+ longitude: z.ZodNullable<z.ZodNumber>;
123
+ sortOrder: z.ZodNumber;
124
+ }, z.core.$strip>;
125
+ export declare const publicCatalogProductSummarySchema: z.ZodObject<{
126
+ id: z.ZodString;
127
+ name: z.ZodString;
128
+ description: z.ZodNullable<z.ZodString>;
129
+ contentLanguageTag: z.ZodNullable<z.ZodString>;
130
+ slug: z.ZodNullable<z.ZodString>;
131
+ shortDescription: z.ZodNullable<z.ZodString>;
132
+ seoTitle: z.ZodNullable<z.ZodString>;
133
+ seoDescription: z.ZodNullable<z.ZodString>;
134
+ bookingMode: z.ZodEnum<{
135
+ date: "date";
136
+ other: "other";
137
+ date_time: "date_time";
138
+ open: "open";
139
+ stay: "stay";
140
+ transfer: "transfer";
141
+ itinerary: "itinerary";
142
+ }>;
143
+ capacityMode: z.ZodEnum<{
144
+ free_sale: "free_sale";
145
+ limited: "limited";
146
+ on_request: "on_request";
147
+ }>;
148
+ visibility: z.ZodEnum<{
149
+ public: "public";
150
+ private: "private";
151
+ hidden: "hidden";
152
+ }>;
153
+ sellCurrency: z.ZodString;
154
+ sellAmountCents: z.ZodNullable<z.ZodNumber>;
155
+ startDate: z.ZodNullable<z.ZodString>;
156
+ endDate: z.ZodNullable<z.ZodString>;
157
+ pax: z.ZodNullable<z.ZodNumber>;
158
+ productType: z.ZodNullable<z.ZodObject<{
159
+ id: z.ZodString;
160
+ code: z.ZodString;
161
+ name: z.ZodString;
162
+ description: z.ZodNullable<z.ZodString>;
163
+ }, z.core.$strip>>;
164
+ categories: z.ZodArray<z.ZodObject<{
165
+ id: z.ZodString;
166
+ parentId: z.ZodNullable<z.ZodString>;
167
+ name: z.ZodString;
168
+ slug: z.ZodString;
169
+ description: z.ZodNullable<z.ZodString>;
170
+ sortOrder: z.ZodNumber;
171
+ }, z.core.$strip>>;
172
+ tags: z.ZodArray<z.ZodObject<{
173
+ id: z.ZodString;
174
+ name: z.ZodString;
175
+ }, z.core.$strip>>;
176
+ capabilities: z.ZodArray<z.ZodEnum<{
177
+ on_request: "on_request";
178
+ private: "private";
179
+ instant_confirmation: "instant_confirmation";
180
+ pickup_available: "pickup_available";
181
+ dropoff_available: "dropoff_available";
182
+ guided: "guided";
183
+ shared: "shared";
184
+ digital_ticket: "digital_ticket";
185
+ voucher_required: "voucher_required";
186
+ external_inventory: "external_inventory";
187
+ multi_day: "multi_day";
188
+ accommodation: "accommodation";
189
+ transport: "transport";
190
+ }>>;
191
+ coverMedia: z.ZodNullable<z.ZodObject<{
192
+ id: z.ZodString;
193
+ mediaType: z.ZodEnum<{
194
+ image: "image";
195
+ video: "video";
196
+ document: "document";
197
+ }>;
198
+ name: z.ZodString;
199
+ url: z.ZodString;
200
+ mimeType: z.ZodNullable<z.ZodString>;
201
+ altText: z.ZodNullable<z.ZodString>;
202
+ sortOrder: z.ZodNumber;
203
+ isCover: z.ZodBoolean;
204
+ }, z.core.$strip>>;
205
+ isFeatured: z.ZodBoolean;
206
+ }, z.core.$strip>;
207
+ export declare const publicCatalogProductDetailSchema: z.ZodObject<{
208
+ id: z.ZodString;
209
+ name: z.ZodString;
210
+ description: z.ZodNullable<z.ZodString>;
211
+ contentLanguageTag: z.ZodNullable<z.ZodString>;
212
+ slug: z.ZodNullable<z.ZodString>;
213
+ shortDescription: z.ZodNullable<z.ZodString>;
214
+ seoTitle: z.ZodNullable<z.ZodString>;
215
+ seoDescription: z.ZodNullable<z.ZodString>;
216
+ bookingMode: z.ZodEnum<{
217
+ date: "date";
218
+ other: "other";
219
+ date_time: "date_time";
220
+ open: "open";
221
+ stay: "stay";
222
+ transfer: "transfer";
223
+ itinerary: "itinerary";
224
+ }>;
225
+ capacityMode: z.ZodEnum<{
226
+ free_sale: "free_sale";
227
+ limited: "limited";
228
+ on_request: "on_request";
229
+ }>;
230
+ visibility: z.ZodEnum<{
231
+ public: "public";
232
+ private: "private";
233
+ hidden: "hidden";
234
+ }>;
235
+ sellCurrency: z.ZodString;
236
+ sellAmountCents: z.ZodNullable<z.ZodNumber>;
237
+ startDate: z.ZodNullable<z.ZodString>;
238
+ endDate: z.ZodNullable<z.ZodString>;
239
+ pax: z.ZodNullable<z.ZodNumber>;
240
+ productType: z.ZodNullable<z.ZodObject<{
241
+ id: z.ZodString;
242
+ code: z.ZodString;
243
+ name: z.ZodString;
244
+ description: z.ZodNullable<z.ZodString>;
245
+ }, z.core.$strip>>;
246
+ categories: z.ZodArray<z.ZodObject<{
247
+ id: z.ZodString;
248
+ parentId: z.ZodNullable<z.ZodString>;
249
+ name: z.ZodString;
250
+ slug: z.ZodString;
251
+ description: z.ZodNullable<z.ZodString>;
252
+ sortOrder: z.ZodNumber;
253
+ }, z.core.$strip>>;
254
+ tags: z.ZodArray<z.ZodObject<{
255
+ id: z.ZodString;
256
+ name: z.ZodString;
257
+ }, z.core.$strip>>;
258
+ capabilities: z.ZodArray<z.ZodEnum<{
259
+ on_request: "on_request";
260
+ private: "private";
261
+ instant_confirmation: "instant_confirmation";
262
+ pickup_available: "pickup_available";
263
+ dropoff_available: "dropoff_available";
264
+ guided: "guided";
265
+ shared: "shared";
266
+ digital_ticket: "digital_ticket";
267
+ voucher_required: "voucher_required";
268
+ external_inventory: "external_inventory";
269
+ multi_day: "multi_day";
270
+ accommodation: "accommodation";
271
+ transport: "transport";
272
+ }>>;
273
+ coverMedia: z.ZodNullable<z.ZodObject<{
274
+ id: z.ZodString;
275
+ mediaType: z.ZodEnum<{
276
+ image: "image";
277
+ video: "video";
278
+ document: "document";
279
+ }>;
280
+ name: z.ZodString;
281
+ url: z.ZodString;
282
+ mimeType: z.ZodNullable<z.ZodString>;
283
+ altText: z.ZodNullable<z.ZodString>;
284
+ sortOrder: z.ZodNumber;
285
+ isCover: z.ZodBoolean;
286
+ }, z.core.$strip>>;
287
+ isFeatured: z.ZodBoolean;
288
+ media: z.ZodArray<z.ZodObject<{
289
+ id: z.ZodString;
290
+ mediaType: z.ZodEnum<{
291
+ image: "image";
292
+ video: "video";
293
+ document: "document";
294
+ }>;
295
+ name: z.ZodString;
296
+ url: z.ZodString;
297
+ mimeType: z.ZodNullable<z.ZodString>;
298
+ altText: z.ZodNullable<z.ZodString>;
299
+ sortOrder: z.ZodNumber;
300
+ isCover: z.ZodBoolean;
301
+ }, z.core.$strip>>;
302
+ features: z.ZodArray<z.ZodObject<{
303
+ id: z.ZodString;
304
+ featureType: z.ZodEnum<{
305
+ other: "other";
306
+ inclusion: "inclusion";
307
+ exclusion: "exclusion";
308
+ highlight: "highlight";
309
+ important_information: "important_information";
310
+ }>;
311
+ title: z.ZodString;
312
+ description: z.ZodNullable<z.ZodString>;
313
+ sortOrder: z.ZodNumber;
314
+ }, z.core.$strip>>;
315
+ faqs: z.ZodArray<z.ZodObject<{
316
+ id: z.ZodString;
317
+ question: z.ZodString;
318
+ answer: z.ZodString;
319
+ sortOrder: z.ZodNumber;
320
+ }, z.core.$strip>>;
321
+ locations: z.ZodArray<z.ZodObject<{
322
+ id: z.ZodString;
323
+ locationType: z.ZodEnum<{
324
+ other: "other";
325
+ start: "start";
326
+ end: "end";
327
+ meeting_point: "meeting_point";
328
+ pickup: "pickup";
329
+ dropoff: "dropoff";
330
+ point_of_interest: "point_of_interest";
331
+ }>;
332
+ title: z.ZodString;
333
+ address: z.ZodNullable<z.ZodString>;
334
+ city: z.ZodNullable<z.ZodString>;
335
+ countryCode: z.ZodNullable<z.ZodString>;
336
+ latitude: z.ZodNullable<z.ZodNumber>;
337
+ longitude: z.ZodNullable<z.ZodNumber>;
338
+ sortOrder: z.ZodNumber;
339
+ }, z.core.$strip>>;
340
+ }, z.core.$strip>;
341
+ export declare const publicCatalogProductListResponseSchema: z.ZodObject<{
342
+ data: z.ZodArray<z.ZodObject<{
343
+ id: z.ZodString;
344
+ name: z.ZodString;
345
+ description: z.ZodNullable<z.ZodString>;
346
+ contentLanguageTag: z.ZodNullable<z.ZodString>;
347
+ slug: z.ZodNullable<z.ZodString>;
348
+ shortDescription: z.ZodNullable<z.ZodString>;
349
+ seoTitle: z.ZodNullable<z.ZodString>;
350
+ seoDescription: z.ZodNullable<z.ZodString>;
351
+ bookingMode: z.ZodEnum<{
352
+ date: "date";
353
+ other: "other";
354
+ date_time: "date_time";
355
+ open: "open";
356
+ stay: "stay";
357
+ transfer: "transfer";
358
+ itinerary: "itinerary";
359
+ }>;
360
+ capacityMode: z.ZodEnum<{
361
+ free_sale: "free_sale";
362
+ limited: "limited";
363
+ on_request: "on_request";
364
+ }>;
365
+ visibility: z.ZodEnum<{
366
+ public: "public";
367
+ private: "private";
368
+ hidden: "hidden";
369
+ }>;
370
+ sellCurrency: z.ZodString;
371
+ sellAmountCents: z.ZodNullable<z.ZodNumber>;
372
+ startDate: z.ZodNullable<z.ZodString>;
373
+ endDate: z.ZodNullable<z.ZodString>;
374
+ pax: z.ZodNullable<z.ZodNumber>;
375
+ productType: z.ZodNullable<z.ZodObject<{
376
+ id: z.ZodString;
377
+ code: z.ZodString;
378
+ name: z.ZodString;
379
+ description: z.ZodNullable<z.ZodString>;
380
+ }, z.core.$strip>>;
381
+ categories: z.ZodArray<z.ZodObject<{
382
+ id: z.ZodString;
383
+ parentId: z.ZodNullable<z.ZodString>;
384
+ name: z.ZodString;
385
+ slug: z.ZodString;
386
+ description: z.ZodNullable<z.ZodString>;
387
+ sortOrder: z.ZodNumber;
388
+ }, z.core.$strip>>;
389
+ tags: z.ZodArray<z.ZodObject<{
390
+ id: z.ZodString;
391
+ name: z.ZodString;
392
+ }, z.core.$strip>>;
393
+ capabilities: z.ZodArray<z.ZodEnum<{
394
+ on_request: "on_request";
395
+ private: "private";
396
+ instant_confirmation: "instant_confirmation";
397
+ pickup_available: "pickup_available";
398
+ dropoff_available: "dropoff_available";
399
+ guided: "guided";
400
+ shared: "shared";
401
+ digital_ticket: "digital_ticket";
402
+ voucher_required: "voucher_required";
403
+ external_inventory: "external_inventory";
404
+ multi_day: "multi_day";
405
+ accommodation: "accommodation";
406
+ transport: "transport";
407
+ }>>;
408
+ coverMedia: z.ZodNullable<z.ZodObject<{
409
+ id: z.ZodString;
410
+ mediaType: z.ZodEnum<{
411
+ image: "image";
412
+ video: "video";
413
+ document: "document";
414
+ }>;
415
+ name: z.ZodString;
416
+ url: z.ZodString;
417
+ mimeType: z.ZodNullable<z.ZodString>;
418
+ altText: z.ZodNullable<z.ZodString>;
419
+ sortOrder: z.ZodNumber;
420
+ isCover: z.ZodBoolean;
421
+ }, z.core.$strip>>;
422
+ isFeatured: z.ZodBoolean;
423
+ }, z.core.$strip>>;
424
+ total: z.ZodNumber;
425
+ limit: z.ZodNumber;
426
+ offset: z.ZodNumber;
427
+ }, z.core.$strip>;
428
+ export declare const publicCatalogCategoryListResponseSchema: z.ZodObject<{
429
+ data: z.ZodArray<z.ZodObject<{
430
+ id: z.ZodString;
431
+ parentId: z.ZodNullable<z.ZodString>;
432
+ name: z.ZodString;
433
+ slug: z.ZodString;
434
+ description: z.ZodNullable<z.ZodString>;
435
+ sortOrder: z.ZodNumber;
436
+ }, z.core.$strip>>;
437
+ total: z.ZodNumber;
438
+ limit: z.ZodNumber;
439
+ offset: z.ZodNumber;
440
+ }, z.core.$strip>;
441
+ export declare const publicCatalogTagListResponseSchema: z.ZodObject<{
442
+ data: z.ZodArray<z.ZodObject<{
443
+ id: z.ZodString;
444
+ name: z.ZodString;
445
+ }, z.core.$strip>>;
446
+ total: z.ZodNumber;
447
+ limit: z.ZodNumber;
448
+ offset: z.ZodNumber;
449
+ }, z.core.$strip>;
450
+ export type PublicCatalogProductListQuery = z.infer<typeof publicCatalogProductListQuerySchema>;
451
+ export type PublicCatalogCategoryListQuery = z.infer<typeof publicCatalogCategoryListQuerySchema>;
452
+ export type PublicCatalogTagListQuery = z.infer<typeof publicCatalogTagListQuerySchema>;
453
+ export type PublicCatalogProductLookupBySlugQuery = z.infer<typeof publicCatalogProductLookupBySlugQuerySchema>;
454
+ //# sourceMappingURL=validation-public.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation-public.d.ts","sourceRoot":"","sources":["../src/validation-public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAcvB,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAa9C,CAAA;AAEF,eAAO,MAAM,oCAAoC;;;;;iBAK/C,CAAA;AAEF,eAAO,MAAM,+BAA+B;;;;iBAI1C,CAAA;AAEF,eAAO,MAAM,2CAA2C;;iBAEtD,CAAA;AAEF,eAAO,MAAM,kCAAkC;;;;;;;iBAO7C,CAAA;AAEF,eAAO,MAAM,6BAA6B;;;iBAGxC,CAAA;AAEF,eAAO,MAAM,8BAA8B;;;;;iBAKzC,CAAA;AAEF,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;iBAS1C,CAAA;AAEF,eAAO,MAAM,iCAAiC;;;;;;;;;;;;iBAM5C,CAAA;AAEF,eAAO,MAAM,6BAA6B;;;;;iBAKxC,CAAA;AAEF,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;iBAU7C,CAAA;AAEF,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuB5C,CAAA;AAEF,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAK3C,CAAA;AAEF,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAKjD,CAAA;AAEF,eAAO,MAAM,uCAAuC;;;;;;;;;;;;iBAKlD,CAAA;AAEF,eAAO,MAAM,kCAAkC;;;;;;;;iBAK7C,CAAA;AAEF,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAA;AAC/F,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAA;AACjG,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAA;AACvF,MAAM,MAAM,qCAAqC,GAAG,CAAC,CAAC,KAAK,CACzD,OAAO,2CAA2C,CACnD,CAAA"}
@@ -0,0 +1,130 @@
1
+ import { z } from "zod";
2
+ import { booleanQueryParam, languageTagSchema, productBookingModeSchema, productCapabilitySchema, productCapacityModeSchema, productFeatureTypeSchema, productLocationTypeSchema, productMediaTypeSchema, productVisibilitySchema, } from "./validation-shared.js";
3
+ export const publicCatalogProductListQuerySchema = z.object({
4
+ search: z.string().optional(),
5
+ languageTag: languageTagSchema.optional(),
6
+ bookingMode: productBookingModeSchema.optional(),
7
+ capacityMode: productCapacityModeSchema.optional(),
8
+ productTypeId: z.string().optional(),
9
+ categoryId: z.string().optional(),
10
+ tagId: z.string().optional(),
11
+ featured: booleanQueryParam.optional(),
12
+ sort: z.enum(["name", "createdAt", "startDate", "price"]).default("name"),
13
+ direction: z.enum(["asc", "desc"]).default("asc"),
14
+ limit: z.coerce.number().int().min(1).max(100).default(24),
15
+ offset: z.coerce.number().int().min(0).default(0),
16
+ });
17
+ export const publicCatalogCategoryListQuerySchema = z.object({
18
+ search: z.string().optional(),
19
+ parentId: z.string().optional(),
20
+ limit: z.coerce.number().int().min(1).max(100).default(100),
21
+ offset: z.coerce.number().int().min(0).default(0),
22
+ });
23
+ export const publicCatalogTagListQuerySchema = z.object({
24
+ search: z.string().optional(),
25
+ limit: z.coerce.number().int().min(1).max(100).default(100),
26
+ offset: z.coerce.number().int().min(0).default(0),
27
+ });
28
+ export const publicCatalogProductLookupBySlugQuerySchema = z.object({
29
+ languageTag: languageTagSchema.optional(),
30
+ });
31
+ export const publicCatalogProductCategorySchema = z.object({
32
+ id: z.string(),
33
+ parentId: z.string().nullable(),
34
+ name: z.string(),
35
+ slug: z.string(),
36
+ description: z.string().nullable(),
37
+ sortOrder: z.number().int(),
38
+ });
39
+ export const publicCatalogProductTagSchema = z.object({
40
+ id: z.string(),
41
+ name: z.string(),
42
+ });
43
+ export const publicCatalogProductTypeSchema = z.object({
44
+ id: z.string(),
45
+ code: z.string(),
46
+ name: z.string(),
47
+ description: z.string().nullable(),
48
+ });
49
+ export const publicCatalogProductMediaSchema = z.object({
50
+ id: z.string(),
51
+ mediaType: productMediaTypeSchema,
52
+ name: z.string(),
53
+ url: z.string(),
54
+ mimeType: z.string().nullable(),
55
+ altText: z.string().nullable(),
56
+ sortOrder: z.number().int(),
57
+ isCover: z.boolean(),
58
+ });
59
+ export const publicCatalogProductFeatureSchema = z.object({
60
+ id: z.string(),
61
+ featureType: productFeatureTypeSchema,
62
+ title: z.string(),
63
+ description: z.string().nullable(),
64
+ sortOrder: z.number().int(),
65
+ });
66
+ export const publicCatalogProductFaqSchema = z.object({
67
+ id: z.string(),
68
+ question: z.string(),
69
+ answer: z.string(),
70
+ sortOrder: z.number().int(),
71
+ });
72
+ export const publicCatalogProductLocationSchema = z.object({
73
+ id: z.string(),
74
+ locationType: productLocationTypeSchema,
75
+ title: z.string(),
76
+ address: z.string().nullable(),
77
+ city: z.string().nullable(),
78
+ countryCode: z.string().nullable(),
79
+ latitude: z.number().nullable(),
80
+ longitude: z.number().nullable(),
81
+ sortOrder: z.number().int(),
82
+ });
83
+ export const publicCatalogProductSummarySchema = z.object({
84
+ id: z.string(),
85
+ name: z.string(),
86
+ description: z.string().nullable(),
87
+ contentLanguageTag: z.string().nullable(),
88
+ slug: z.string().nullable(),
89
+ shortDescription: z.string().nullable(),
90
+ seoTitle: z.string().nullable(),
91
+ seoDescription: z.string().nullable(),
92
+ bookingMode: productBookingModeSchema,
93
+ capacityMode: productCapacityModeSchema,
94
+ visibility: productVisibilitySchema,
95
+ sellCurrency: z.string(),
96
+ sellAmountCents: z.number().int().nullable(),
97
+ startDate: z.string().nullable(),
98
+ endDate: z.string().nullable(),
99
+ pax: z.number().int().nullable(),
100
+ productType: publicCatalogProductTypeSchema.nullable(),
101
+ categories: z.array(publicCatalogProductCategorySchema),
102
+ tags: z.array(publicCatalogProductTagSchema),
103
+ capabilities: z.array(productCapabilitySchema),
104
+ coverMedia: publicCatalogProductMediaSchema.nullable(),
105
+ isFeatured: z.boolean(),
106
+ });
107
+ export const publicCatalogProductDetailSchema = publicCatalogProductSummarySchema.extend({
108
+ media: z.array(publicCatalogProductMediaSchema),
109
+ features: z.array(publicCatalogProductFeatureSchema),
110
+ faqs: z.array(publicCatalogProductFaqSchema),
111
+ locations: z.array(publicCatalogProductLocationSchema),
112
+ });
113
+ export const publicCatalogProductListResponseSchema = z.object({
114
+ data: z.array(publicCatalogProductSummarySchema),
115
+ total: z.number().int(),
116
+ limit: z.number().int(),
117
+ offset: z.number().int(),
118
+ });
119
+ export const publicCatalogCategoryListResponseSchema = z.object({
120
+ data: z.array(publicCatalogProductCategorySchema),
121
+ total: z.number().int(),
122
+ limit: z.number().int(),
123
+ offset: z.number().int(),
124
+ });
125
+ export const publicCatalogTagListResponseSchema = z.object({
126
+ data: z.array(publicCatalogProductTagSchema),
127
+ total: z.number().int(),
128
+ limit: z.number().int(),
129
+ offset: z.number().int(),
130
+ });
@@ -91,6 +91,11 @@ export declare const productLocationTypeSchema: z.ZodEnum<{
91
91
  dropoff: "dropoff";
92
92
  point_of_interest: "point_of_interest";
93
93
  }>;
94
+ export declare const productMediaTypeSchema: z.ZodEnum<{
95
+ image: "image";
96
+ video: "video";
97
+ document: "document";
98
+ }>;
94
99
  export declare const languageTagSchema: z.ZodString;
95
100
  export declare const serviceTypeSchema: z.ZodEnum<{
96
101
  other: "other";
@@ -1 +1 @@
1
- {"version":3,"file":"validation-shared.d.ts","sourceRoot":"","sources":["../src/validation-shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,CAAC,EAAE,CAAA;AAE7C,eAAO,MAAM,mBAAmB;;;;EAA0C,CAAA;AAC1E,eAAO,MAAM,yBAAyB;;;;EAA0C,CAAA;AAChF,eAAO,MAAM,oBAAoB;;;;;;;EAO/B,CAAA;AACF,eAAO,MAAM,wBAAwB;;;;;;;;EAQnC,CAAA;AACF,eAAO,MAAM,yBAAyB;;;;EAAiD,CAAA;AACvF,eAAO,MAAM,uBAAuB;;;;EAA0C,CAAA;AAC9E,eAAO,MAAM,2BAA2B;;;;EAAwD,CAAA;AAChG,eAAO,MAAM,8BAA8B;;;;;EAKzC,CAAA;AACF,eAAO,MAAM,2BAA2B;;;;;;;;;EAStC,CAAA;AACF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;EAclC,CAAA;AACF,eAAO,MAAM,wBAAwB;;;;;;EAMnC,CAAA;AACF,eAAO,MAAM,yBAAyB;;;;;;;;EAQpC,CAAA;AACF,eAAO,MAAM,iBAAiB,aAIiB,CAAA;AAC/C,eAAO,MAAM,iBAAiB;;;;;;;EAO5B,CAAA"}
1
+ {"version":3,"file":"validation-shared.d.ts","sourceRoot":"","sources":["../src/validation-shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,CAAC,EAAE,CAAA;AAE7C,eAAO,MAAM,mBAAmB;;;;EAA0C,CAAA;AAC1E,eAAO,MAAM,yBAAyB;;;;EAA0C,CAAA;AAChF,eAAO,MAAM,oBAAoB;;;;;;;EAO/B,CAAA;AACF,eAAO,MAAM,wBAAwB;;;;;;;;EAQnC,CAAA;AACF,eAAO,MAAM,yBAAyB;;;;EAAiD,CAAA;AACvF,eAAO,MAAM,uBAAuB;;;;EAA0C,CAAA;AAC9E,eAAO,MAAM,2BAA2B;;;;EAAwD,CAAA;AAChG,eAAO,MAAM,8BAA8B;;;;;EAKzC,CAAA;AACF,eAAO,MAAM,2BAA2B;;;;;;;;;EAStC,CAAA;AACF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;EAclC,CAAA;AACF,eAAO,MAAM,wBAAwB;;;;;;EAMnC,CAAA;AACF,eAAO,MAAM,yBAAyB;;;;;;;;EAQpC,CAAA;AACF,eAAO,MAAM,sBAAsB;;;;EAAyC,CAAA;AAC5E,eAAO,MAAM,iBAAiB,aAIiB,CAAA;AAC/C,eAAO,MAAM,iBAAiB;;;;;;;EAO5B,CAAA"}
@@ -71,6 +71,7 @@ export const productLocationTypeSchema = z.enum([
71
71
  "point_of_interest",
72
72
  "other",
73
73
  ]);
74
+ export const productMediaTypeSchema = z.enum(["image", "video", "document"]);
74
75
  export const languageTagSchema = z
75
76
  .string()
76
77
  .min(2)
@@ -1,5 +1,6 @@
1
1
  export * from "./validation-config.js";
2
2
  export * from "./validation-content.js";
3
3
  export * from "./validation-core.js";
4
+ export * from "./validation-public.js";
4
5
  export * from "./validation-shared.js";
5
6
  //# sourceMappingURL=validation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../src/validation.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAA;AACtC,cAAc,yBAAyB,CAAA;AACvC,cAAc,sBAAsB,CAAA;AACpC,cAAc,wBAAwB,CAAA"}
1
+ {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../src/validation.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAA;AACtC,cAAc,yBAAyB,CAAA;AACvC,cAAc,sBAAsB,CAAA;AACpC,cAAc,wBAAwB,CAAA;AACtC,cAAc,wBAAwB,CAAA"}
@@ -1,4 +1,5 @@
1
1
  export * from "./validation-config.js";
2
2
  export * from "./validation-content.js";
3
3
  export * from "./validation-core.js";
4
+ export * from "./validation-public.js";
4
5
  export * from "./validation-shared.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voyantjs/products",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "license": "FSL-1.1-Apache-2.0",
5
5
  "type": "module",
6
6
  "exports": {
@@ -20,6 +20,14 @@
20
20
  "types": "./dist/routes.d.ts",
21
21
  "import": "./dist/routes.js"
22
22
  },
23
+ "./public-routes": {
24
+ "types": "./dist/routes-public.d.ts",
25
+ "import": "./dist/routes-public.js"
26
+ },
27
+ "./public-validation": {
28
+ "types": "./dist/validation-public.d.ts",
29
+ "import": "./dist/validation-public.js"
30
+ },
23
31
  "./tasks": {
24
32
  "types": "./dist/tasks/index.d.ts",
25
33
  "import": "./dist/tasks/index.js"
@@ -34,9 +42,9 @@
34
42
  "hono": "^4.12.10",
35
43
  "pdf-lib": "^1.17.1",
36
44
  "zod": "^4.3.6",
37
- "@voyantjs/core": "0.3.0",
38
- "@voyantjs/db": "0.3.0",
39
- "@voyantjs/hono": "0.3.0"
45
+ "@voyantjs/core": "0.3.1",
46
+ "@voyantjs/db": "0.3.1",
47
+ "@voyantjs/hono": "0.3.1"
40
48
  },
41
49
  "devDependencies": {
42
50
  "typescript": "^6.0.2",