@voyantjs/products 0.3.0 → 0.4.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.
Files changed (55) hide show
  1. package/dist/index.d.ts +9 -1
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +10 -1
  4. package/dist/routes-public.d.ts +492 -0
  5. package/dist/routes-public.d.ts.map +1 -0
  6. package/dist/routes-public.js +44 -0
  7. package/dist/routes.d.ts +669 -0
  8. package/dist/routes.d.ts.map +1 -1
  9. package/dist/routes.js +117 -1
  10. package/dist/schema-itinerary.d.ts +51 -0
  11. package/dist/schema-itinerary.d.ts.map +1 -1
  12. package/dist/schema-itinerary.js +3 -0
  13. package/dist/schema-relations.d.ts +14 -0
  14. package/dist/schema-relations.d.ts.map +1 -1
  15. package/dist/schema-relations.js +28 -1
  16. package/dist/schema-taxonomy.d.ts +435 -0
  17. package/dist/schema-taxonomy.d.ts.map +1 -1
  18. package/dist/schema-taxonomy.js +47 -0
  19. package/dist/service-catalog.d.ts +237 -0
  20. package/dist/service-catalog.d.ts.map +1 -0
  21. package/dist/service-catalog.js +478 -0
  22. package/dist/service-public.d.ts +383 -0
  23. package/dist/service-public.d.ts.map +1 -0
  24. package/dist/service-public.js +365 -0
  25. package/dist/service.d.ts +292 -1
  26. package/dist/service.d.ts.map +1 -1
  27. package/dist/service.js +388 -2
  28. package/dist/tasks/brochure-printers.d.ts +29 -0
  29. package/dist/tasks/brochure-printers.d.ts.map +1 -0
  30. package/dist/tasks/brochure-printers.js +94 -0
  31. package/dist/tasks/brochure-templates.d.ts +36 -0
  32. package/dist/tasks/brochure-templates.d.ts.map +1 -0
  33. package/dist/tasks/brochure-templates.js +98 -0
  34. package/dist/tasks/brochures.d.ts +42 -0
  35. package/dist/tasks/brochures.d.ts.map +1 -0
  36. package/dist/tasks/brochures.js +69 -0
  37. package/dist/tasks/index.d.ts +3 -0
  38. package/dist/tasks/index.d.ts.map +1 -1
  39. package/dist/tasks/index.js +3 -0
  40. package/dist/validation-catalog.d.ts +388 -0
  41. package/dist/validation-catalog.d.ts.map +1 -0
  42. package/dist/validation-catalog.js +54 -0
  43. package/dist/validation-content.d.ts +109 -0
  44. package/dist/validation-content.d.ts.map +1 -1
  45. package/dist/validation-content.js +63 -1
  46. package/dist/validation-public.d.ts +643 -0
  47. package/dist/validation-public.d.ts.map +1 -0
  48. package/dist/validation-public.js +167 -0
  49. package/dist/validation-shared.d.ts +11 -0
  50. package/dist/validation-shared.d.ts.map +1 -1
  51. package/dist/validation-shared.js +2 -0
  52. package/dist/validation.d.ts +1 -0
  53. package/dist/validation.d.ts.map +1 -1
  54. package/dist/validation.js +1 -0
  55. package/package.json +14 -4
@@ -0,0 +1,383 @@
1
+ import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
2
+ import type { PublicCatalogCategoryListQuery, PublicCatalogDestinationListQuery, PublicCatalogProductListQuery, PublicCatalogProductLookupBySlugQuery, PublicCatalogTagListQuery } from "./validation-public.js";
3
+ export declare const publicProductsService: {
4
+ listCatalogProducts(db: PostgresJsDatabase, query: PublicCatalogProductListQuery): Promise<{
5
+ data: ({
6
+ id: string;
7
+ name: string;
8
+ description: string | null;
9
+ contentLanguageTag: string | null;
10
+ slug: string | null;
11
+ shortDescription: string | null;
12
+ seoTitle: string | null;
13
+ seoDescription: string | null;
14
+ bookingMode: "date" | "other" | "date_time" | "open" | "stay" | "transfer" | "itinerary";
15
+ capacityMode: "free_sale" | "limited" | "on_request";
16
+ visibility: "public" | "private" | "hidden";
17
+ sellCurrency: string;
18
+ sellAmountCents: number | null;
19
+ startDate: string | null;
20
+ endDate: string | null;
21
+ pax: number | null;
22
+ productType: {
23
+ id: string;
24
+ code: string;
25
+ name: string;
26
+ description: string | null;
27
+ } | null;
28
+ categories: {
29
+ id: string;
30
+ parentId: string | null;
31
+ name: string;
32
+ slug: string;
33
+ description: string | null;
34
+ sortOrder: number;
35
+ }[];
36
+ tags: {
37
+ id: string;
38
+ name: string;
39
+ }[];
40
+ capabilities: string[];
41
+ destinations: {
42
+ id: string;
43
+ parentId: string | null;
44
+ slug: string;
45
+ name: string;
46
+ description: string | null;
47
+ seoTitle: string | null;
48
+ seoDescription: string | null;
49
+ destinationType: string;
50
+ sortOrder: number;
51
+ }[];
52
+ locations: {
53
+ id: string;
54
+ locationType: "other" | "start" | "end" | "meeting_point" | "pickup" | "dropoff" | "point_of_interest";
55
+ title: string;
56
+ address: string | null;
57
+ city: string | null;
58
+ countryCode: string | null;
59
+ latitude: number | null;
60
+ longitude: number | null;
61
+ sortOrder: number;
62
+ }[];
63
+ coverMedia: {
64
+ id: string;
65
+ mediaType: "image" | "video" | "document";
66
+ name: string;
67
+ url: string;
68
+ mimeType: string | null;
69
+ altText: string | null;
70
+ sortOrder: number;
71
+ isCover: boolean;
72
+ isBrochure: boolean;
73
+ isBrochureCurrent: boolean;
74
+ brochureVersion: number | null;
75
+ } | null;
76
+ isFeatured: boolean;
77
+ } | {
78
+ brochure: {
79
+ id: string;
80
+ mediaType: "image" | "video" | "document";
81
+ name: string;
82
+ url: string;
83
+ mimeType: string | null;
84
+ altText: string | null;
85
+ sortOrder: number;
86
+ isCover: boolean;
87
+ isBrochure: boolean;
88
+ isBrochureCurrent: boolean;
89
+ brochureVersion: number | null;
90
+ } | null;
91
+ media: {
92
+ id: string;
93
+ mediaType: "image" | "video" | "document";
94
+ name: string;
95
+ url: string;
96
+ mimeType: string | null;
97
+ altText: string | null;
98
+ sortOrder: number;
99
+ isCover: boolean;
100
+ isBrochure: boolean;
101
+ isBrochureCurrent: boolean;
102
+ brochureVersion: number | null;
103
+ }[];
104
+ features: {
105
+ id: string;
106
+ featureType: "other" | "inclusion" | "exclusion" | "highlight" | "important_information";
107
+ title: string;
108
+ description: string | null;
109
+ sortOrder: number;
110
+ }[];
111
+ faqs: {
112
+ id: string;
113
+ question: string;
114
+ answer: string;
115
+ sortOrder: number;
116
+ }[];
117
+ id: string;
118
+ name: string;
119
+ description: string | null;
120
+ contentLanguageTag: string | null;
121
+ slug: string | null;
122
+ shortDescription: string | null;
123
+ seoTitle: string | null;
124
+ seoDescription: string | null;
125
+ bookingMode: "date" | "other" | "date_time" | "open" | "stay" | "transfer" | "itinerary";
126
+ capacityMode: "free_sale" | "limited" | "on_request";
127
+ visibility: "public" | "private" | "hidden";
128
+ sellCurrency: string;
129
+ sellAmountCents: number | null;
130
+ startDate: string | null;
131
+ endDate: string | null;
132
+ pax: number | null;
133
+ productType: {
134
+ id: string;
135
+ code: string;
136
+ name: string;
137
+ description: string | null;
138
+ } | null;
139
+ categories: {
140
+ id: string;
141
+ parentId: string | null;
142
+ name: string;
143
+ slug: string;
144
+ description: string | null;
145
+ sortOrder: number;
146
+ }[];
147
+ tags: {
148
+ id: string;
149
+ name: string;
150
+ }[];
151
+ capabilities: string[];
152
+ destinations: {
153
+ id: string;
154
+ parentId: string | null;
155
+ slug: string;
156
+ name: string;
157
+ description: string | null;
158
+ seoTitle: string | null;
159
+ seoDescription: string | null;
160
+ destinationType: string;
161
+ sortOrder: number;
162
+ }[];
163
+ locations: {
164
+ id: string;
165
+ locationType: "other" | "start" | "end" | "meeting_point" | "pickup" | "dropoff" | "point_of_interest";
166
+ title: string;
167
+ address: string | null;
168
+ city: string | null;
169
+ countryCode: string | null;
170
+ latitude: number | null;
171
+ longitude: number | null;
172
+ sortOrder: number;
173
+ }[];
174
+ coverMedia: {
175
+ id: string;
176
+ mediaType: "image" | "video" | "document";
177
+ name: string;
178
+ url: string;
179
+ mimeType: string | null;
180
+ altText: string | null;
181
+ sortOrder: number;
182
+ isCover: boolean;
183
+ isBrochure: boolean;
184
+ isBrochureCurrent: boolean;
185
+ brochureVersion: number | null;
186
+ } | null;
187
+ isFeatured: boolean;
188
+ })[];
189
+ total: number;
190
+ limit: number;
191
+ offset: number;
192
+ }>;
193
+ getCatalogProductById(db: PostgresJsDatabase, id: string, query?: {
194
+ languageTag?: string | null;
195
+ }): Promise<{
196
+ id: string;
197
+ name: string;
198
+ description: string | null;
199
+ contentLanguageTag: string | null;
200
+ slug: string | null;
201
+ shortDescription: string | null;
202
+ seoTitle: string | null;
203
+ seoDescription: string | null;
204
+ bookingMode: "date" | "other" | "date_time" | "open" | "stay" | "transfer" | "itinerary";
205
+ capacityMode: "free_sale" | "limited" | "on_request";
206
+ visibility: "public" | "private" | "hidden";
207
+ sellCurrency: string;
208
+ sellAmountCents: number | null;
209
+ startDate: string | null;
210
+ endDate: string | null;
211
+ pax: number | null;
212
+ productType: {
213
+ id: string;
214
+ code: string;
215
+ name: string;
216
+ description: string | null;
217
+ } | null;
218
+ categories: {
219
+ id: string;
220
+ parentId: string | null;
221
+ name: string;
222
+ slug: string;
223
+ description: string | null;
224
+ sortOrder: number;
225
+ }[];
226
+ tags: {
227
+ id: string;
228
+ name: string;
229
+ }[];
230
+ capabilities: string[];
231
+ destinations: {
232
+ id: string;
233
+ parentId: string | null;
234
+ slug: string;
235
+ name: string;
236
+ description: string | null;
237
+ seoTitle: string | null;
238
+ seoDescription: string | null;
239
+ destinationType: string;
240
+ sortOrder: number;
241
+ }[];
242
+ locations: {
243
+ id: string;
244
+ locationType: "other" | "start" | "end" | "meeting_point" | "pickup" | "dropoff" | "point_of_interest";
245
+ title: string;
246
+ address: string | null;
247
+ city: string | null;
248
+ countryCode: string | null;
249
+ latitude: number | null;
250
+ longitude: number | null;
251
+ sortOrder: number;
252
+ }[];
253
+ coverMedia: {
254
+ id: string;
255
+ mediaType: "image" | "video" | "document";
256
+ name: string;
257
+ url: string;
258
+ mimeType: string | null;
259
+ altText: string | null;
260
+ sortOrder: number;
261
+ isCover: boolean;
262
+ isBrochure: boolean;
263
+ isBrochureCurrent: boolean;
264
+ brochureVersion: number | null;
265
+ } | null;
266
+ isFeatured: boolean;
267
+ } | null>;
268
+ getCatalogProductBySlug(db: PostgresJsDatabase, slug: string, query?: PublicCatalogProductLookupBySlugQuery): Promise<{
269
+ id: string;
270
+ name: string;
271
+ description: string | null;
272
+ contentLanguageTag: string | null;
273
+ slug: string | null;
274
+ shortDescription: string | null;
275
+ seoTitle: string | null;
276
+ seoDescription: string | null;
277
+ bookingMode: "date" | "other" | "date_time" | "open" | "stay" | "transfer" | "itinerary";
278
+ capacityMode: "free_sale" | "limited" | "on_request";
279
+ visibility: "public" | "private" | "hidden";
280
+ sellCurrency: string;
281
+ sellAmountCents: number | null;
282
+ startDate: string | null;
283
+ endDate: string | null;
284
+ pax: number | null;
285
+ productType: {
286
+ id: string;
287
+ code: string;
288
+ name: string;
289
+ description: string | null;
290
+ } | null;
291
+ categories: {
292
+ id: string;
293
+ parentId: string | null;
294
+ name: string;
295
+ slug: string;
296
+ description: string | null;
297
+ sortOrder: number;
298
+ }[];
299
+ tags: {
300
+ id: string;
301
+ name: string;
302
+ }[];
303
+ capabilities: string[];
304
+ destinations: {
305
+ id: string;
306
+ parentId: string | null;
307
+ slug: string;
308
+ name: string;
309
+ description: string | null;
310
+ seoTitle: string | null;
311
+ seoDescription: string | null;
312
+ destinationType: string;
313
+ sortOrder: number;
314
+ }[];
315
+ locations: {
316
+ id: string;
317
+ locationType: "other" | "start" | "end" | "meeting_point" | "pickup" | "dropoff" | "point_of_interest";
318
+ title: string;
319
+ address: string | null;
320
+ city: string | null;
321
+ countryCode: string | null;
322
+ latitude: number | null;
323
+ longitude: number | null;
324
+ sortOrder: number;
325
+ }[];
326
+ coverMedia: {
327
+ id: string;
328
+ mediaType: "image" | "video" | "document";
329
+ name: string;
330
+ url: string;
331
+ mimeType: string | null;
332
+ altText: string | null;
333
+ sortOrder: number;
334
+ isCover: boolean;
335
+ isBrochure: boolean;
336
+ isBrochureCurrent: boolean;
337
+ brochureVersion: number | null;
338
+ } | null;
339
+ isFeatured: boolean;
340
+ } | null>;
341
+ getCatalogProductBrochure(db: PostgresJsDatabase, productId: string, query?: {
342
+ languageTag?: string | null;
343
+ }): Promise<unknown>;
344
+ listCatalogCategories(db: PostgresJsDatabase, query: PublicCatalogCategoryListQuery): Promise<{
345
+ data: {
346
+ parentId: string | null;
347
+ description: string | null;
348
+ id: string;
349
+ name: string;
350
+ slug: string;
351
+ sortOrder: number;
352
+ }[];
353
+ total: number;
354
+ limit: number;
355
+ offset: number;
356
+ }>;
357
+ listCatalogTags(db: PostgresJsDatabase, query: PublicCatalogTagListQuery): Promise<{
358
+ data: {
359
+ id: string;
360
+ name: string;
361
+ }[];
362
+ total: number;
363
+ limit: number;
364
+ offset: number;
365
+ }>;
366
+ listCatalogDestinations(db: PostgresJsDatabase, query: PublicCatalogDestinationListQuery): Promise<{
367
+ data: {
368
+ id: string;
369
+ parentId: string | null;
370
+ slug: string;
371
+ name: string;
372
+ description: string | null;
373
+ seoTitle: string | null;
374
+ seoDescription: string | null;
375
+ destinationType: string;
376
+ sortOrder: number;
377
+ }[];
378
+ total: number;
379
+ limit: number;
380
+ offset: number;
381
+ }>;
382
+ };
383
+ //# sourceMappingURL=service-public.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service-public.d.ts","sourceRoot":"","sources":["../src/service-public.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAgBjE,OAAO,KAAK,EACV,8BAA8B,EAC9B,iCAAiC,EACjC,6BAA6B,EAC7B,qCAAqC,EACrC,yBAAyB,EAC1B,MAAM,wBAAwB,CAAA;AAgI/B,eAAO,MAAM,qBAAqB;4BACF,kBAAkB,SAAS,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BA2HhF,kBAAkB,MAClB,MAAM,UACH;QAAE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCA2BlC,kBAAkB,QAChB,MAAM,UACL,qCAAqC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCAoCxC,kBAAkB,aACX,MAAM,UACV;QAAE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE;8BAMR,kBAAkB,SAAS,8BAA8B;;;;;;;;;;;;;wBAkD/D,kBAAkB,SAAS,yBAAyB;;;;;;;;;gCA+B5C,kBAAkB,SAAS,iCAAiC;;;;;;;;;;;;;;;;CA8F/F,CAAA"}