@voyantjs/products 0.1.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.
@@ -0,0 +1,2395 @@
1
+ import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
2
+ import type { z } from "zod";
3
+ import type { insertProductMediaSchema, productMediaListQuerySchema, reorderProductMediaSchema, updateProductMediaSchema, insertDaySchema, insertDayServiceSchema, insertOptionUnitSchema, insertOptionUnitTranslationSchema, insertProductActivationSettingSchema, insertProductCapabilitySchema, insertProductCategorySchema, insertProductDeliveryFormatSchema, insertProductFaqSchema, insertProductFeatureSchema, insertProductLocationSchema, insertProductNoteSchema, insertProductOptionSchema, insertProductOptionTranslationSchema, insertProductSchema, insertProductTagSchema, insertProductTicketSettingSchema, insertProductTranslationSchema, insertProductTypeSchema, insertProductVisibilitySettingSchema, insertVersionSchema, optionUnitListQuerySchema, optionUnitTranslationListQuerySchema, productActivationSettingListQuerySchema, productCapabilityListQuerySchema, productCategoryListQuerySchema, productDeliveryFormatListQuerySchema, productFaqListQuerySchema, productFeatureListQuerySchema, productListQuerySchema, productLocationListQuerySchema, productOptionListQuerySchema, productOptionTranslationListQuerySchema, productTagListQuerySchema, productTicketSettingListQuerySchema, productTranslationListQuerySchema, productTypeListQuerySchema, productVisibilitySettingListQuerySchema, updateDaySchema, updateDayServiceSchema, updateOptionUnitSchema, updateOptionUnitTranslationSchema, updateProductActivationSettingSchema, updateProductCapabilitySchema, updateProductCategorySchema, updateProductDeliveryFormatSchema, updateProductFaqSchema, updateProductFeatureSchema, updateProductLocationSchema, updateProductOptionSchema, updateProductOptionTranslationSchema, updateProductSchema, updateProductTagSchema, updateProductTicketSettingSchema, updateProductTranslationSchema, updateProductTypeSchema, updateProductVisibilitySettingSchema } from "./validation.js";
4
+ type ProductListQuery = z.infer<typeof productListQuerySchema>;
5
+ type CreateProductInput = z.infer<typeof insertProductSchema>;
6
+ type UpdateProductInput = z.infer<typeof updateProductSchema>;
7
+ type ProductOptionListQuery = z.infer<typeof productOptionListQuerySchema>;
8
+ type CreateProductOptionInput = z.infer<typeof insertProductOptionSchema>;
9
+ type UpdateProductOptionInput = z.infer<typeof updateProductOptionSchema>;
10
+ type OptionUnitListQuery = z.infer<typeof optionUnitListQuerySchema>;
11
+ type CreateOptionUnitInput = z.infer<typeof insertOptionUnitSchema>;
12
+ type UpdateOptionUnitInput = z.infer<typeof updateOptionUnitSchema>;
13
+ type ProductTranslationListQuery = z.infer<typeof productTranslationListQuerySchema>;
14
+ type CreateProductTranslationInput = z.infer<typeof insertProductTranslationSchema>;
15
+ type UpdateProductTranslationInput = z.infer<typeof updateProductTranslationSchema>;
16
+ type ProductOptionTranslationListQuery = z.infer<typeof productOptionTranslationListQuerySchema>;
17
+ type CreateProductOptionTranslationInput = z.infer<typeof insertProductOptionTranslationSchema>;
18
+ type UpdateProductOptionTranslationInput = z.infer<typeof updateProductOptionTranslationSchema>;
19
+ type OptionUnitTranslationListQuery = z.infer<typeof optionUnitTranslationListQuerySchema>;
20
+ type CreateOptionUnitTranslationInput = z.infer<typeof insertOptionUnitTranslationSchema>;
21
+ type UpdateOptionUnitTranslationInput = z.infer<typeof updateOptionUnitTranslationSchema>;
22
+ type ProductActivationSettingListQuery = z.infer<typeof productActivationSettingListQuerySchema>;
23
+ type CreateProductActivationSettingInput = z.infer<typeof insertProductActivationSettingSchema>;
24
+ type UpdateProductActivationSettingInput = z.infer<typeof updateProductActivationSettingSchema>;
25
+ type ProductTicketSettingListQuery = z.infer<typeof productTicketSettingListQuerySchema>;
26
+ type CreateProductTicketSettingInput = z.infer<typeof insertProductTicketSettingSchema>;
27
+ type UpdateProductTicketSettingInput = z.infer<typeof updateProductTicketSettingSchema>;
28
+ type ProductVisibilitySettingListQuery = z.infer<typeof productVisibilitySettingListQuerySchema>;
29
+ type CreateProductVisibilitySettingInput = z.infer<typeof insertProductVisibilitySettingSchema>;
30
+ type UpdateProductVisibilitySettingInput = z.infer<typeof updateProductVisibilitySettingSchema>;
31
+ type ProductCapabilityListQuery = z.infer<typeof productCapabilityListQuerySchema>;
32
+ type CreateProductCapabilityInput = z.infer<typeof insertProductCapabilitySchema>;
33
+ type UpdateProductCapabilityInput = z.infer<typeof updateProductCapabilitySchema>;
34
+ type ProductDeliveryFormatListQuery = z.infer<typeof productDeliveryFormatListQuerySchema>;
35
+ type CreateProductDeliveryFormatInput = z.infer<typeof insertProductDeliveryFormatSchema>;
36
+ type UpdateProductDeliveryFormatInput = z.infer<typeof updateProductDeliveryFormatSchema>;
37
+ type ProductFeatureListQuery = z.infer<typeof productFeatureListQuerySchema>;
38
+ type CreateProductFeatureInput = z.infer<typeof insertProductFeatureSchema>;
39
+ type UpdateProductFeatureInput = z.infer<typeof updateProductFeatureSchema>;
40
+ type ProductFaqListQuery = z.infer<typeof productFaqListQuerySchema>;
41
+ type CreateProductFaqInput = z.infer<typeof insertProductFaqSchema>;
42
+ type UpdateProductFaqInput = z.infer<typeof updateProductFaqSchema>;
43
+ type ProductLocationListQuery = z.infer<typeof productLocationListQuerySchema>;
44
+ type CreateProductLocationInput = z.infer<typeof insertProductLocationSchema>;
45
+ type UpdateProductLocationInput = z.infer<typeof updateProductLocationSchema>;
46
+ type CreateDayInput = z.infer<typeof insertDaySchema>;
47
+ type UpdateDayInput = z.infer<typeof updateDaySchema>;
48
+ type CreateDayServiceInput = z.infer<typeof insertDayServiceSchema>;
49
+ type UpdateDayServiceInput = z.infer<typeof updateDayServiceSchema>;
50
+ type CreateVersionInput = z.infer<typeof insertVersionSchema>;
51
+ type CreateProductNoteInput = z.infer<typeof insertProductNoteSchema>;
52
+ type ProductTypeListQuery = z.infer<typeof productTypeListQuerySchema>;
53
+ type CreateProductTypeInput = z.infer<typeof insertProductTypeSchema>;
54
+ type UpdateProductTypeInput = z.infer<typeof updateProductTypeSchema>;
55
+ type ProductCategoryListQuery = z.infer<typeof productCategoryListQuerySchema>;
56
+ type CreateProductCategoryInput = z.infer<typeof insertProductCategorySchema>;
57
+ type UpdateProductCategoryInput = z.infer<typeof updateProductCategorySchema>;
58
+ type ProductTagListQuery = z.infer<typeof productTagListQuerySchema>;
59
+ type CreateProductTagInput = z.infer<typeof insertProductTagSchema>;
60
+ type UpdateProductTagInput = z.infer<typeof updateProductTagSchema>;
61
+ type ProductMediaListQuery = z.infer<typeof productMediaListQuerySchema>;
62
+ type CreateProductMediaInput = z.infer<typeof insertProductMediaSchema>;
63
+ type UpdateProductMediaInput = z.infer<typeof updateProductMediaSchema>;
64
+ type ReorderProductMediaInput = z.infer<typeof reorderProductMediaSchema>;
65
+ export declare const productsService: {
66
+ listProducts(db: PostgresJsDatabase, query: ProductListQuery): Promise<{
67
+ data: {
68
+ id: string;
69
+ name: string;
70
+ status: "draft" | "active" | "archived";
71
+ description: string | null;
72
+ bookingMode: "date" | "other" | "date_time" | "open" | "stay" | "transfer" | "itinerary";
73
+ capacityMode: "free_sale" | "limited" | "on_request";
74
+ timezone: string | null;
75
+ visibility: "public" | "private" | "hidden";
76
+ activated: boolean;
77
+ reservationTimeoutMinutes: number | null;
78
+ sellCurrency: string;
79
+ sellAmountCents: number | null;
80
+ costAmountCents: number | null;
81
+ marginPercent: number | null;
82
+ facilityId: string | null;
83
+ startDate: string | null;
84
+ endDate: string | null;
85
+ pax: number | null;
86
+ productTypeId: string | null;
87
+ tags: string[] | null;
88
+ createdAt: Date;
89
+ updatedAt: Date;
90
+ }[];
91
+ total: number;
92
+ limit: number;
93
+ offset: number;
94
+ }>;
95
+ getProductById(db: PostgresJsDatabase, id: string): Promise<{
96
+ id: string;
97
+ name: string;
98
+ status: "draft" | "active" | "archived";
99
+ description: string | null;
100
+ bookingMode: "date" | "other" | "date_time" | "open" | "stay" | "transfer" | "itinerary";
101
+ capacityMode: "free_sale" | "limited" | "on_request";
102
+ timezone: string | null;
103
+ visibility: "public" | "private" | "hidden";
104
+ activated: boolean;
105
+ reservationTimeoutMinutes: number | null;
106
+ sellCurrency: string;
107
+ sellAmountCents: number | null;
108
+ costAmountCents: number | null;
109
+ marginPercent: number | null;
110
+ facilityId: string | null;
111
+ startDate: string | null;
112
+ endDate: string | null;
113
+ pax: number | null;
114
+ productTypeId: string | null;
115
+ tags: string[] | null;
116
+ createdAt: Date;
117
+ updatedAt: Date;
118
+ } | null>;
119
+ createProduct(db: PostgresJsDatabase, data: CreateProductInput): Promise<{
120
+ name: string;
121
+ createdAt: Date;
122
+ updatedAt: Date;
123
+ description: string | null;
124
+ id: string;
125
+ status: "draft" | "active" | "archived";
126
+ bookingMode: "date" | "other" | "date_time" | "open" | "stay" | "transfer" | "itinerary";
127
+ capacityMode: "free_sale" | "limited" | "on_request";
128
+ timezone: string | null;
129
+ visibility: "public" | "private" | "hidden";
130
+ activated: boolean;
131
+ reservationTimeoutMinutes: number | null;
132
+ sellCurrency: string;
133
+ sellAmountCents: number | null;
134
+ costAmountCents: number | null;
135
+ marginPercent: number | null;
136
+ facilityId: string | null;
137
+ startDate: string | null;
138
+ endDate: string | null;
139
+ pax: number | null;
140
+ productTypeId: string | null;
141
+ tags: string[] | null;
142
+ } | undefined>;
143
+ updateProduct(db: PostgresJsDatabase, id: string, data: UpdateProductInput): Promise<{
144
+ id: string;
145
+ name: string;
146
+ status: "draft" | "active" | "archived";
147
+ description: string | null;
148
+ bookingMode: "date" | "other" | "date_time" | "open" | "stay" | "transfer" | "itinerary";
149
+ capacityMode: "free_sale" | "limited" | "on_request";
150
+ timezone: string | null;
151
+ visibility: "public" | "private" | "hidden";
152
+ activated: boolean;
153
+ reservationTimeoutMinutes: number | null;
154
+ sellCurrency: string;
155
+ sellAmountCents: number | null;
156
+ costAmountCents: number | null;
157
+ marginPercent: number | null;
158
+ facilityId: string | null;
159
+ startDate: string | null;
160
+ endDate: string | null;
161
+ pax: number | null;
162
+ productTypeId: string | null;
163
+ tags: string[] | null;
164
+ createdAt: Date;
165
+ updatedAt: Date;
166
+ } | null>;
167
+ deleteProduct(db: PostgresJsDatabase, id: string): Promise<{
168
+ id: string;
169
+ } | null>;
170
+ listActivationSettings(db: PostgresJsDatabase, query: ProductActivationSettingListQuery): Promise<{
171
+ data: {
172
+ id: string;
173
+ productId: string;
174
+ activationMode: "manual" | "scheduled" | "channel_controlled";
175
+ activateAt: Date | null;
176
+ deactivateAt: Date | null;
177
+ sellAt: Date | null;
178
+ stopSellAt: Date | null;
179
+ createdAt: Date;
180
+ updatedAt: Date;
181
+ }[];
182
+ total: number;
183
+ limit: number;
184
+ offset: number;
185
+ }>;
186
+ getActivationSettingById(db: PostgresJsDatabase, id: string): Promise<{
187
+ id: string;
188
+ productId: string;
189
+ activationMode: "manual" | "scheduled" | "channel_controlled";
190
+ activateAt: Date | null;
191
+ deactivateAt: Date | null;
192
+ sellAt: Date | null;
193
+ stopSellAt: Date | null;
194
+ createdAt: Date;
195
+ updatedAt: Date;
196
+ } | null>;
197
+ upsertActivationSetting(db: PostgresJsDatabase, productId: string, data: CreateProductActivationSettingInput): Promise<{
198
+ productId: string;
199
+ createdAt: Date;
200
+ updatedAt: Date;
201
+ id: string;
202
+ activationMode: "manual" | "scheduled" | "channel_controlled";
203
+ activateAt: Date | null;
204
+ deactivateAt: Date | null;
205
+ sellAt: Date | null;
206
+ stopSellAt: Date | null;
207
+ } | null>;
208
+ updateActivationSetting(db: PostgresJsDatabase, id: string, data: UpdateProductActivationSettingInput): Promise<{
209
+ id: string;
210
+ productId: string;
211
+ activationMode: "manual" | "scheduled" | "channel_controlled";
212
+ activateAt: Date | null;
213
+ deactivateAt: Date | null;
214
+ sellAt: Date | null;
215
+ stopSellAt: Date | null;
216
+ createdAt: Date;
217
+ updatedAt: Date;
218
+ } | null>;
219
+ deleteActivationSetting(db: PostgresJsDatabase, id: string): Promise<{
220
+ id: string;
221
+ } | null>;
222
+ listTicketSettings(db: PostgresJsDatabase, query: ProductTicketSettingListQuery): Promise<{
223
+ data: {
224
+ id: string;
225
+ productId: string;
226
+ fulfillmentMode: "none" | "per_booking" | "per_participant" | "per_item";
227
+ defaultDeliveryFormat: "none" | "voucher" | "ticket" | "pdf" | "qr_code" | "barcode" | "email" | "mobile";
228
+ ticketPerUnit: boolean;
229
+ barcodeFormat: string | null;
230
+ voucherMessage: string | null;
231
+ ticketMessage: string | null;
232
+ createdAt: Date;
233
+ updatedAt: Date;
234
+ }[];
235
+ total: number;
236
+ limit: number;
237
+ offset: number;
238
+ }>;
239
+ getTicketSettingById(db: PostgresJsDatabase, id: string): Promise<{
240
+ id: string;
241
+ productId: string;
242
+ fulfillmentMode: "none" | "per_booking" | "per_participant" | "per_item";
243
+ defaultDeliveryFormat: "none" | "voucher" | "ticket" | "pdf" | "qr_code" | "barcode" | "email" | "mobile";
244
+ ticketPerUnit: boolean;
245
+ barcodeFormat: string | null;
246
+ voucherMessage: string | null;
247
+ ticketMessage: string | null;
248
+ createdAt: Date;
249
+ updatedAt: Date;
250
+ } | null>;
251
+ upsertTicketSetting(db: PostgresJsDatabase, productId: string, data: CreateProductTicketSettingInput): Promise<{
252
+ productId: string;
253
+ createdAt: Date;
254
+ updatedAt: Date;
255
+ id: string;
256
+ fulfillmentMode: "none" | "per_booking" | "per_participant" | "per_item";
257
+ defaultDeliveryFormat: "none" | "voucher" | "ticket" | "pdf" | "qr_code" | "barcode" | "email" | "mobile";
258
+ ticketPerUnit: boolean;
259
+ barcodeFormat: string | null;
260
+ voucherMessage: string | null;
261
+ ticketMessage: string | null;
262
+ } | null>;
263
+ updateTicketSetting(db: PostgresJsDatabase, id: string, data: UpdateProductTicketSettingInput): Promise<{
264
+ id: string;
265
+ productId: string;
266
+ fulfillmentMode: "none" | "per_booking" | "per_participant" | "per_item";
267
+ defaultDeliveryFormat: "none" | "voucher" | "ticket" | "pdf" | "qr_code" | "barcode" | "email" | "mobile";
268
+ ticketPerUnit: boolean;
269
+ barcodeFormat: string | null;
270
+ voucherMessage: string | null;
271
+ ticketMessage: string | null;
272
+ createdAt: Date;
273
+ updatedAt: Date;
274
+ } | null>;
275
+ deleteTicketSetting(db: PostgresJsDatabase, id: string): Promise<{
276
+ id: string;
277
+ } | null>;
278
+ listVisibilitySettings(db: PostgresJsDatabase, query: ProductVisibilitySettingListQuery): Promise<{
279
+ data: {
280
+ id: string;
281
+ productId: string;
282
+ isSearchable: boolean;
283
+ isBookable: boolean;
284
+ isFeatured: boolean;
285
+ requiresAuthentication: boolean;
286
+ createdAt: Date;
287
+ updatedAt: Date;
288
+ }[];
289
+ total: number;
290
+ limit: number;
291
+ offset: number;
292
+ }>;
293
+ getVisibilitySettingById(db: PostgresJsDatabase, id: string): Promise<{
294
+ id: string;
295
+ productId: string;
296
+ isSearchable: boolean;
297
+ isBookable: boolean;
298
+ isFeatured: boolean;
299
+ requiresAuthentication: boolean;
300
+ createdAt: Date;
301
+ updatedAt: Date;
302
+ } | null>;
303
+ upsertVisibilitySetting(db: PostgresJsDatabase, productId: string, data: CreateProductVisibilitySettingInput): Promise<{
304
+ productId: string;
305
+ createdAt: Date;
306
+ updatedAt: Date;
307
+ id: string;
308
+ isSearchable: boolean;
309
+ isBookable: boolean;
310
+ isFeatured: boolean;
311
+ requiresAuthentication: boolean;
312
+ } | null>;
313
+ updateVisibilitySetting(db: PostgresJsDatabase, id: string, data: UpdateProductVisibilitySettingInput): Promise<{
314
+ id: string;
315
+ productId: string;
316
+ isSearchable: boolean;
317
+ isBookable: boolean;
318
+ isFeatured: boolean;
319
+ requiresAuthentication: boolean;
320
+ createdAt: Date;
321
+ updatedAt: Date;
322
+ } | null>;
323
+ deleteVisibilitySetting(db: PostgresJsDatabase, id: string): Promise<{
324
+ id: string;
325
+ } | null>;
326
+ listCapabilities(db: PostgresJsDatabase, query: ProductCapabilityListQuery): Promise<{
327
+ data: {
328
+ id: string;
329
+ productId: string;
330
+ capability: "on_request" | "private" | "instant_confirmation" | "pickup_available" | "dropoff_available" | "guided" | "shared" | "digital_ticket" | "voucher_required" | "external_inventory" | "multi_day" | "accommodation" | "transport";
331
+ enabled: boolean;
332
+ notes: string | null;
333
+ createdAt: Date;
334
+ updatedAt: Date;
335
+ }[];
336
+ total: number;
337
+ limit: number;
338
+ offset: number;
339
+ }>;
340
+ getCapabilityById(db: PostgresJsDatabase, id: string): Promise<{
341
+ id: string;
342
+ productId: string;
343
+ capability: "on_request" | "private" | "instant_confirmation" | "pickup_available" | "dropoff_available" | "guided" | "shared" | "digital_ticket" | "voucher_required" | "external_inventory" | "multi_day" | "accommodation" | "transport";
344
+ enabled: boolean;
345
+ notes: string | null;
346
+ createdAt: Date;
347
+ updatedAt: Date;
348
+ } | null>;
349
+ createCapability(db: PostgresJsDatabase, productId: string, data: CreateProductCapabilityInput): Promise<{
350
+ enabled: boolean;
351
+ productId: string;
352
+ createdAt: Date;
353
+ updatedAt: Date;
354
+ id: string;
355
+ capability: "on_request" | "private" | "instant_confirmation" | "pickup_available" | "dropoff_available" | "guided" | "shared" | "digital_ticket" | "voucher_required" | "external_inventory" | "multi_day" | "accommodation" | "transport";
356
+ notes: string | null;
357
+ } | null>;
358
+ updateCapability(db: PostgresJsDatabase, id: string, data: UpdateProductCapabilityInput): Promise<{
359
+ id: string;
360
+ productId: string;
361
+ capability: "on_request" | "private" | "instant_confirmation" | "pickup_available" | "dropoff_available" | "guided" | "shared" | "digital_ticket" | "voucher_required" | "external_inventory" | "multi_day" | "accommodation" | "transport";
362
+ enabled: boolean;
363
+ notes: string | null;
364
+ createdAt: Date;
365
+ updatedAt: Date;
366
+ } | null>;
367
+ deleteCapability(db: PostgresJsDatabase, id: string): Promise<{
368
+ id: string;
369
+ } | null>;
370
+ listDeliveryFormats(db: PostgresJsDatabase, query: ProductDeliveryFormatListQuery): Promise<{
371
+ data: {
372
+ id: string;
373
+ productId: string;
374
+ format: "none" | "voucher" | "ticket" | "pdf" | "qr_code" | "barcode" | "email" | "mobile";
375
+ isDefault: boolean;
376
+ createdAt: Date;
377
+ updatedAt: Date;
378
+ }[];
379
+ total: number;
380
+ limit: number;
381
+ offset: number;
382
+ }>;
383
+ getDeliveryFormatById(db: PostgresJsDatabase, id: string): Promise<{
384
+ id: string;
385
+ productId: string;
386
+ format: "none" | "voucher" | "ticket" | "pdf" | "qr_code" | "barcode" | "email" | "mobile";
387
+ isDefault: boolean;
388
+ createdAt: Date;
389
+ updatedAt: Date;
390
+ } | null>;
391
+ createDeliveryFormat(db: PostgresJsDatabase, productId: string, data: CreateProductDeliveryFormatInput): Promise<{
392
+ productId: string;
393
+ createdAt: Date;
394
+ updatedAt: Date;
395
+ format: "none" | "voucher" | "ticket" | "pdf" | "qr_code" | "barcode" | "email" | "mobile";
396
+ id: string;
397
+ isDefault: boolean;
398
+ } | null>;
399
+ updateDeliveryFormat(db: PostgresJsDatabase, id: string, data: UpdateProductDeliveryFormatInput): Promise<{
400
+ id: string;
401
+ productId: string;
402
+ format: "none" | "voucher" | "ticket" | "pdf" | "qr_code" | "barcode" | "email" | "mobile";
403
+ isDefault: boolean;
404
+ createdAt: Date;
405
+ updatedAt: Date;
406
+ } | null>;
407
+ deleteDeliveryFormat(db: PostgresJsDatabase, id: string): Promise<{
408
+ id: string;
409
+ } | null>;
410
+ listFeatures(db: PostgresJsDatabase, query: ProductFeatureListQuery): Promise<{
411
+ data: {
412
+ id: string;
413
+ productId: string;
414
+ featureType: "other" | "inclusion" | "exclusion" | "highlight" | "important_information";
415
+ title: string;
416
+ description: string | null;
417
+ sortOrder: number;
418
+ createdAt: Date;
419
+ updatedAt: Date;
420
+ }[];
421
+ total: number;
422
+ limit: number;
423
+ offset: number;
424
+ }>;
425
+ getFeatureById(db: PostgresJsDatabase, id: string): Promise<{
426
+ id: string;
427
+ productId: string;
428
+ featureType: "other" | "inclusion" | "exclusion" | "highlight" | "important_information";
429
+ title: string;
430
+ description: string | null;
431
+ sortOrder: number;
432
+ createdAt: Date;
433
+ updatedAt: Date;
434
+ } | null>;
435
+ createFeature(db: PostgresJsDatabase, productId: string, data: CreateProductFeatureInput): Promise<{
436
+ productId: string;
437
+ createdAt: Date;
438
+ updatedAt: Date;
439
+ description: string | null;
440
+ id: string;
441
+ sortOrder: number;
442
+ featureType: "other" | "inclusion" | "exclusion" | "highlight" | "important_information";
443
+ title: string;
444
+ } | null>;
445
+ updateFeature(db: PostgresJsDatabase, id: string, data: UpdateProductFeatureInput): Promise<{
446
+ id: string;
447
+ productId: string;
448
+ featureType: "other" | "inclusion" | "exclusion" | "highlight" | "important_information";
449
+ title: string;
450
+ description: string | null;
451
+ sortOrder: number;
452
+ createdAt: Date;
453
+ updatedAt: Date;
454
+ } | null>;
455
+ deleteFeature(db: PostgresJsDatabase, id: string): Promise<{
456
+ id: string;
457
+ } | null>;
458
+ listFaqs(db: PostgresJsDatabase, query: ProductFaqListQuery): Promise<{
459
+ data: {
460
+ id: string;
461
+ productId: string;
462
+ question: string;
463
+ answer: string;
464
+ sortOrder: number;
465
+ createdAt: Date;
466
+ updatedAt: Date;
467
+ }[];
468
+ total: number;
469
+ limit: number;
470
+ offset: number;
471
+ }>;
472
+ getFaqById(db: PostgresJsDatabase, id: string): Promise<{
473
+ id: string;
474
+ productId: string;
475
+ question: string;
476
+ answer: string;
477
+ sortOrder: number;
478
+ createdAt: Date;
479
+ updatedAt: Date;
480
+ } | null>;
481
+ createFaq(db: PostgresJsDatabase, productId: string, data: CreateProductFaqInput): Promise<{
482
+ productId: string;
483
+ createdAt: Date;
484
+ updatedAt: Date;
485
+ id: string;
486
+ sortOrder: number;
487
+ question: string;
488
+ answer: string;
489
+ } | null>;
490
+ updateFaq(db: PostgresJsDatabase, id: string, data: UpdateProductFaqInput): Promise<{
491
+ id: string;
492
+ productId: string;
493
+ question: string;
494
+ answer: string;
495
+ sortOrder: number;
496
+ createdAt: Date;
497
+ updatedAt: Date;
498
+ } | null>;
499
+ deleteFaq(db: PostgresJsDatabase, id: string): Promise<{
500
+ id: string;
501
+ } | null>;
502
+ listLocations(db: PostgresJsDatabase, query: ProductLocationListQuery): Promise<{
503
+ data: {
504
+ id: string;
505
+ productId: string;
506
+ locationType: "other" | "start" | "end" | "meeting_point" | "pickup" | "dropoff" | "point_of_interest";
507
+ title: string;
508
+ address: string | null;
509
+ city: string | null;
510
+ countryCode: string | null;
511
+ latitude: number | null;
512
+ longitude: number | null;
513
+ googlePlaceId: string | null;
514
+ applePlaceId: string | null;
515
+ tripadvisorLocationId: string | null;
516
+ sortOrder: number;
517
+ createdAt: Date;
518
+ updatedAt: Date;
519
+ }[];
520
+ total: number;
521
+ limit: number;
522
+ offset: number;
523
+ }>;
524
+ getLocationById(db: PostgresJsDatabase, id: string): Promise<{
525
+ id: string;
526
+ productId: string;
527
+ locationType: "other" | "start" | "end" | "meeting_point" | "pickup" | "dropoff" | "point_of_interest";
528
+ title: string;
529
+ address: string | null;
530
+ city: string | null;
531
+ countryCode: string | null;
532
+ latitude: number | null;
533
+ longitude: number | null;
534
+ googlePlaceId: string | null;
535
+ applePlaceId: string | null;
536
+ tripadvisorLocationId: string | null;
537
+ sortOrder: number;
538
+ createdAt: Date;
539
+ updatedAt: Date;
540
+ } | null>;
541
+ createLocation(db: PostgresJsDatabase, productId: string, data: CreateProductLocationInput): Promise<{
542
+ productId: string;
543
+ createdAt: Date;
544
+ updatedAt: Date;
545
+ id: string;
546
+ sortOrder: number;
547
+ title: string;
548
+ locationType: "other" | "start" | "end" | "meeting_point" | "pickup" | "dropoff" | "point_of_interest";
549
+ address: string | null;
550
+ city: string | null;
551
+ countryCode: string | null;
552
+ latitude: number | null;
553
+ longitude: number | null;
554
+ googlePlaceId: string | null;
555
+ applePlaceId: string | null;
556
+ tripadvisorLocationId: string | null;
557
+ } | null>;
558
+ updateLocation(db: PostgresJsDatabase, id: string, data: UpdateProductLocationInput): Promise<{
559
+ id: string;
560
+ productId: string;
561
+ locationType: "other" | "start" | "end" | "meeting_point" | "pickup" | "dropoff" | "point_of_interest";
562
+ title: string;
563
+ address: string | null;
564
+ city: string | null;
565
+ countryCode: string | null;
566
+ latitude: number | null;
567
+ longitude: number | null;
568
+ googlePlaceId: string | null;
569
+ applePlaceId: string | null;
570
+ tripadvisorLocationId: string | null;
571
+ sortOrder: number;
572
+ createdAt: Date;
573
+ updatedAt: Date;
574
+ } | null>;
575
+ deleteLocation(db: PostgresJsDatabase, id: string): Promise<{
576
+ id: string;
577
+ } | null>;
578
+ listOptions(db: PostgresJsDatabase, query: ProductOptionListQuery): Promise<{
579
+ data: {
580
+ id: string;
581
+ productId: string;
582
+ name: string;
583
+ code: string | null;
584
+ description: string | null;
585
+ status: "draft" | "active" | "archived";
586
+ isDefault: boolean;
587
+ sortOrder: number;
588
+ availableFrom: string | null;
589
+ availableTo: string | null;
590
+ createdAt: Date;
591
+ updatedAt: Date;
592
+ }[];
593
+ total: number;
594
+ limit: number;
595
+ offset: number;
596
+ }>;
597
+ getOptionById(db: PostgresJsDatabase, id: string): Promise<{
598
+ id: string;
599
+ productId: string;
600
+ name: string;
601
+ code: string | null;
602
+ description: string | null;
603
+ status: "draft" | "active" | "archived";
604
+ isDefault: boolean;
605
+ sortOrder: number;
606
+ availableFrom: string | null;
607
+ availableTo: string | null;
608
+ createdAt: Date;
609
+ updatedAt: Date;
610
+ } | null>;
611
+ createOption(db: PostgresJsDatabase, productId: string, data: CreateProductOptionInput): Promise<{
612
+ productId: string;
613
+ name: string;
614
+ createdAt: Date;
615
+ updatedAt: Date;
616
+ description: string | null;
617
+ id: string;
618
+ status: "draft" | "active" | "archived";
619
+ code: string | null;
620
+ isDefault: boolean;
621
+ sortOrder: number;
622
+ availableFrom: string | null;
623
+ availableTo: string | null;
624
+ } | null | undefined>;
625
+ updateOption(db: PostgresJsDatabase, id: string, data: UpdateProductOptionInput): Promise<{
626
+ id: string;
627
+ productId: string;
628
+ name: string;
629
+ code: string | null;
630
+ description: string | null;
631
+ status: "draft" | "active" | "archived";
632
+ isDefault: boolean;
633
+ sortOrder: number;
634
+ availableFrom: string | null;
635
+ availableTo: string | null;
636
+ createdAt: Date;
637
+ updatedAt: Date;
638
+ } | null>;
639
+ deleteOption(db: PostgresJsDatabase, id: string): Promise<{
640
+ id: string;
641
+ } | null>;
642
+ listUnits(db: PostgresJsDatabase, query: OptionUnitListQuery): Promise<{
643
+ data: {
644
+ id: string;
645
+ optionId: string;
646
+ name: string;
647
+ code: string | null;
648
+ description: string | null;
649
+ unitType: "person" | "group" | "room" | "vehicle" | "service" | "other";
650
+ minQuantity: number | null;
651
+ maxQuantity: number | null;
652
+ minAge: number | null;
653
+ maxAge: number | null;
654
+ occupancyMin: number | null;
655
+ occupancyMax: number | null;
656
+ isRequired: boolean;
657
+ isHidden: boolean;
658
+ sortOrder: number;
659
+ createdAt: Date;
660
+ updatedAt: Date;
661
+ }[];
662
+ total: number;
663
+ limit: number;
664
+ offset: number;
665
+ }>;
666
+ getUnitById(db: PostgresJsDatabase, id: string): Promise<{
667
+ id: string;
668
+ optionId: string;
669
+ name: string;
670
+ code: string | null;
671
+ description: string | null;
672
+ unitType: "person" | "group" | "room" | "vehicle" | "service" | "other";
673
+ minQuantity: number | null;
674
+ maxQuantity: number | null;
675
+ minAge: number | null;
676
+ maxAge: number | null;
677
+ occupancyMin: number | null;
678
+ occupancyMax: number | null;
679
+ isRequired: boolean;
680
+ isHidden: boolean;
681
+ sortOrder: number;
682
+ createdAt: Date;
683
+ updatedAt: Date;
684
+ } | null>;
685
+ createUnit(db: PostgresJsDatabase, optionId: string, data: CreateOptionUnitInput): Promise<{
686
+ name: string;
687
+ optionId: string;
688
+ createdAt: Date;
689
+ updatedAt: Date;
690
+ description: string | null;
691
+ id: string;
692
+ code: string | null;
693
+ sortOrder: number;
694
+ unitType: "person" | "group" | "room" | "vehicle" | "service" | "other";
695
+ minQuantity: number | null;
696
+ maxQuantity: number | null;
697
+ minAge: number | null;
698
+ maxAge: number | null;
699
+ occupancyMin: number | null;
700
+ occupancyMax: number | null;
701
+ isRequired: boolean;
702
+ isHidden: boolean;
703
+ } | null | undefined>;
704
+ updateUnit(db: PostgresJsDatabase, id: string, data: UpdateOptionUnitInput): Promise<{
705
+ id: string;
706
+ optionId: string;
707
+ name: string;
708
+ code: string | null;
709
+ description: string | null;
710
+ unitType: "person" | "group" | "room" | "vehicle" | "service" | "other";
711
+ minQuantity: number | null;
712
+ maxQuantity: number | null;
713
+ minAge: number | null;
714
+ maxAge: number | null;
715
+ occupancyMin: number | null;
716
+ occupancyMax: number | null;
717
+ isRequired: boolean;
718
+ isHidden: boolean;
719
+ sortOrder: number;
720
+ createdAt: Date;
721
+ updatedAt: Date;
722
+ } | null>;
723
+ deleteUnit(db: PostgresJsDatabase, id: string): Promise<{
724
+ id: string;
725
+ } | null>;
726
+ listProductTranslations(db: PostgresJsDatabase, query: ProductTranslationListQuery): Promise<{
727
+ data: {
728
+ id: string;
729
+ productId: string;
730
+ languageTag: string;
731
+ slug: string | null;
732
+ name: string;
733
+ shortDescription: string | null;
734
+ description: string | null;
735
+ seoTitle: string | null;
736
+ seoDescription: string | null;
737
+ createdAt: Date;
738
+ updatedAt: Date;
739
+ }[];
740
+ total: number;
741
+ limit: number;
742
+ offset: number;
743
+ }>;
744
+ getProductTranslationById(db: PostgresJsDatabase, id: string): Promise<{
745
+ id: string;
746
+ productId: string;
747
+ languageTag: string;
748
+ slug: string | null;
749
+ name: string;
750
+ shortDescription: string | null;
751
+ description: string | null;
752
+ seoTitle: string | null;
753
+ seoDescription: string | null;
754
+ createdAt: Date;
755
+ updatedAt: Date;
756
+ } | null>;
757
+ createProductTranslation(db: PostgresJsDatabase, productId: string, data: CreateProductTranslationInput): Promise<{
758
+ productId: string;
759
+ name: string;
760
+ createdAt: Date;
761
+ updatedAt: Date;
762
+ description: string | null;
763
+ id: string;
764
+ languageTag: string;
765
+ slug: string | null;
766
+ shortDescription: string | null;
767
+ seoTitle: string | null;
768
+ seoDescription: string | null;
769
+ } | null>;
770
+ updateProductTranslation(db: PostgresJsDatabase, id: string, data: UpdateProductTranslationInput): Promise<{
771
+ id: string;
772
+ productId: string;
773
+ languageTag: string;
774
+ slug: string | null;
775
+ name: string;
776
+ shortDescription: string | null;
777
+ description: string | null;
778
+ seoTitle: string | null;
779
+ seoDescription: string | null;
780
+ createdAt: Date;
781
+ updatedAt: Date;
782
+ } | null>;
783
+ deleteProductTranslation(db: PostgresJsDatabase, id: string): Promise<{
784
+ id: string;
785
+ } | null>;
786
+ listOptionTranslations(db: PostgresJsDatabase, query: ProductOptionTranslationListQuery): Promise<{
787
+ data: {
788
+ id: string;
789
+ optionId: string;
790
+ languageTag: string;
791
+ name: string;
792
+ shortDescription: string | null;
793
+ description: string | null;
794
+ createdAt: Date;
795
+ updatedAt: Date;
796
+ }[];
797
+ total: number;
798
+ limit: number;
799
+ offset: number;
800
+ }>;
801
+ getOptionTranslationById(db: PostgresJsDatabase, id: string): Promise<{
802
+ id: string;
803
+ optionId: string;
804
+ languageTag: string;
805
+ name: string;
806
+ shortDescription: string | null;
807
+ description: string | null;
808
+ createdAt: Date;
809
+ updatedAt: Date;
810
+ } | null>;
811
+ createOptionTranslation(db: PostgresJsDatabase, optionId: string, data: CreateProductOptionTranslationInput): Promise<{
812
+ name: string;
813
+ optionId: string;
814
+ createdAt: Date;
815
+ updatedAt: Date;
816
+ description: string | null;
817
+ id: string;
818
+ languageTag: string;
819
+ shortDescription: string | null;
820
+ } | null>;
821
+ updateOptionTranslation(db: PostgresJsDatabase, id: string, data: UpdateProductOptionTranslationInput): Promise<{
822
+ id: string;
823
+ optionId: string;
824
+ languageTag: string;
825
+ name: string;
826
+ shortDescription: string | null;
827
+ description: string | null;
828
+ createdAt: Date;
829
+ updatedAt: Date;
830
+ } | null>;
831
+ deleteOptionTranslation(db: PostgresJsDatabase, id: string): Promise<{
832
+ id: string;
833
+ } | null>;
834
+ listUnitTranslations(db: PostgresJsDatabase, query: OptionUnitTranslationListQuery): Promise<{
835
+ data: {
836
+ id: string;
837
+ unitId: string;
838
+ languageTag: string;
839
+ name: string;
840
+ shortDescription: string | null;
841
+ description: string | null;
842
+ createdAt: Date;
843
+ updatedAt: Date;
844
+ }[];
845
+ total: number;
846
+ limit: number;
847
+ offset: number;
848
+ }>;
849
+ getUnitTranslationById(db: PostgresJsDatabase, id: string): Promise<{
850
+ id: string;
851
+ unitId: string;
852
+ languageTag: string;
853
+ name: string;
854
+ shortDescription: string | null;
855
+ description: string | null;
856
+ createdAt: Date;
857
+ updatedAt: Date;
858
+ } | null>;
859
+ createUnitTranslation(db: PostgresJsDatabase, unitId: string, data: CreateOptionUnitTranslationInput): Promise<{
860
+ name: string;
861
+ createdAt: Date;
862
+ updatedAt: Date;
863
+ unitId: string;
864
+ description: string | null;
865
+ id: string;
866
+ languageTag: string;
867
+ shortDescription: string | null;
868
+ } | null>;
869
+ updateUnitTranslation(db: PostgresJsDatabase, id: string, data: UpdateOptionUnitTranslationInput): Promise<{
870
+ id: string;
871
+ unitId: string;
872
+ languageTag: string;
873
+ name: string;
874
+ shortDescription: string | null;
875
+ description: string | null;
876
+ createdAt: Date;
877
+ updatedAt: Date;
878
+ } | null>;
879
+ deleteUnitTranslation(db: PostgresJsDatabase, id: string): Promise<{
880
+ id: string;
881
+ } | null>;
882
+ listDays(db: PostgresJsDatabase, productId: string): Omit<import("drizzle-orm/pg-core").PgSelectBase<"product_days", {
883
+ id: import("drizzle-orm/pg-core").PgColumn<{
884
+ name: string;
885
+ tableName: "product_days";
886
+ dataType: "string";
887
+ columnType: "PgText";
888
+ data: string;
889
+ driverParam: string;
890
+ notNull: true;
891
+ hasDefault: true;
892
+ isPrimaryKey: true;
893
+ isAutoincrement: false;
894
+ hasRuntimeDefault: true;
895
+ enumValues: [string, ...string[]];
896
+ baseColumn: never;
897
+ identity: undefined;
898
+ generated: undefined;
899
+ }, {}, {}>;
900
+ productId: import("drizzle-orm/pg-core").PgColumn<{
901
+ name: string;
902
+ tableName: "product_days";
903
+ dataType: "string";
904
+ columnType: "PgText";
905
+ data: string;
906
+ driverParam: string;
907
+ notNull: true;
908
+ hasDefault: false;
909
+ isPrimaryKey: false;
910
+ isAutoincrement: false;
911
+ hasRuntimeDefault: false;
912
+ enumValues: [string, ...string[]];
913
+ baseColumn: never;
914
+ identity: undefined;
915
+ generated: undefined;
916
+ }, {}, {}>;
917
+ dayNumber: import("drizzle-orm/pg-core").PgColumn<{
918
+ name: "day_number";
919
+ tableName: "product_days";
920
+ dataType: "number";
921
+ columnType: "PgInteger";
922
+ data: number;
923
+ driverParam: string | number;
924
+ notNull: true;
925
+ hasDefault: false;
926
+ isPrimaryKey: false;
927
+ isAutoincrement: false;
928
+ hasRuntimeDefault: false;
929
+ enumValues: undefined;
930
+ baseColumn: never;
931
+ identity: undefined;
932
+ generated: undefined;
933
+ }, {}, {}>;
934
+ title: import("drizzle-orm/pg-core").PgColumn<{
935
+ name: "title";
936
+ tableName: "product_days";
937
+ dataType: "string";
938
+ columnType: "PgText";
939
+ data: string;
940
+ driverParam: string;
941
+ notNull: false;
942
+ hasDefault: false;
943
+ isPrimaryKey: false;
944
+ isAutoincrement: false;
945
+ hasRuntimeDefault: false;
946
+ enumValues: [string, ...string[]];
947
+ baseColumn: never;
948
+ identity: undefined;
949
+ generated: undefined;
950
+ }, {}, {}>;
951
+ description: import("drizzle-orm/pg-core").PgColumn<{
952
+ name: "description";
953
+ tableName: "product_days";
954
+ dataType: "string";
955
+ columnType: "PgText";
956
+ data: string;
957
+ driverParam: string;
958
+ notNull: false;
959
+ hasDefault: false;
960
+ isPrimaryKey: false;
961
+ isAutoincrement: false;
962
+ hasRuntimeDefault: false;
963
+ enumValues: [string, ...string[]];
964
+ baseColumn: never;
965
+ identity: undefined;
966
+ generated: undefined;
967
+ }, {}, {}>;
968
+ location: import("drizzle-orm/pg-core").PgColumn<{
969
+ name: "location";
970
+ tableName: "product_days";
971
+ dataType: "string";
972
+ columnType: "PgText";
973
+ data: string;
974
+ driverParam: string;
975
+ notNull: false;
976
+ hasDefault: false;
977
+ isPrimaryKey: false;
978
+ isAutoincrement: false;
979
+ hasRuntimeDefault: false;
980
+ enumValues: [string, ...string[]];
981
+ baseColumn: never;
982
+ identity: undefined;
983
+ generated: undefined;
984
+ }, {}, {}>;
985
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
986
+ name: "created_at";
987
+ tableName: "product_days";
988
+ dataType: "date";
989
+ columnType: "PgTimestamp";
990
+ data: Date;
991
+ driverParam: string;
992
+ notNull: true;
993
+ hasDefault: true;
994
+ isPrimaryKey: false;
995
+ isAutoincrement: false;
996
+ hasRuntimeDefault: false;
997
+ enumValues: undefined;
998
+ baseColumn: never;
999
+ identity: undefined;
1000
+ generated: undefined;
1001
+ }, {}, {}>;
1002
+ updatedAt: import("drizzle-orm/pg-core").PgColumn<{
1003
+ name: "updated_at";
1004
+ tableName: "product_days";
1005
+ dataType: "date";
1006
+ columnType: "PgTimestamp";
1007
+ data: Date;
1008
+ driverParam: string;
1009
+ notNull: true;
1010
+ hasDefault: true;
1011
+ isPrimaryKey: false;
1012
+ isAutoincrement: false;
1013
+ hasRuntimeDefault: false;
1014
+ enumValues: undefined;
1015
+ baseColumn: never;
1016
+ identity: undefined;
1017
+ generated: undefined;
1018
+ }, {}, {}>;
1019
+ }, "single", Record<"product_days", "not-null">, false, "where" | "orderBy", {
1020
+ id: string;
1021
+ productId: string;
1022
+ dayNumber: number;
1023
+ title: string | null;
1024
+ description: string | null;
1025
+ location: string | null;
1026
+ createdAt: Date;
1027
+ updatedAt: Date;
1028
+ }[], {
1029
+ id: import("drizzle-orm/pg-core").PgColumn<{
1030
+ name: string;
1031
+ tableName: "product_days";
1032
+ dataType: "string";
1033
+ columnType: "PgText";
1034
+ data: string;
1035
+ driverParam: string;
1036
+ notNull: true;
1037
+ hasDefault: true;
1038
+ isPrimaryKey: true;
1039
+ isAutoincrement: false;
1040
+ hasRuntimeDefault: true;
1041
+ enumValues: [string, ...string[]];
1042
+ baseColumn: never;
1043
+ identity: undefined;
1044
+ generated: undefined;
1045
+ }, {}, {}>;
1046
+ productId: import("drizzle-orm/pg-core").PgColumn<{
1047
+ name: string;
1048
+ tableName: "product_days";
1049
+ dataType: "string";
1050
+ columnType: "PgText";
1051
+ data: string;
1052
+ driverParam: string;
1053
+ notNull: true;
1054
+ hasDefault: false;
1055
+ isPrimaryKey: false;
1056
+ isAutoincrement: false;
1057
+ hasRuntimeDefault: false;
1058
+ enumValues: [string, ...string[]];
1059
+ baseColumn: never;
1060
+ identity: undefined;
1061
+ generated: undefined;
1062
+ }, {}, {}>;
1063
+ dayNumber: import("drizzle-orm/pg-core").PgColumn<{
1064
+ name: "day_number";
1065
+ tableName: "product_days";
1066
+ dataType: "number";
1067
+ columnType: "PgInteger";
1068
+ data: number;
1069
+ driverParam: string | number;
1070
+ notNull: true;
1071
+ hasDefault: false;
1072
+ isPrimaryKey: false;
1073
+ isAutoincrement: false;
1074
+ hasRuntimeDefault: false;
1075
+ enumValues: undefined;
1076
+ baseColumn: never;
1077
+ identity: undefined;
1078
+ generated: undefined;
1079
+ }, {}, {}>;
1080
+ title: import("drizzle-orm/pg-core").PgColumn<{
1081
+ name: "title";
1082
+ tableName: "product_days";
1083
+ dataType: "string";
1084
+ columnType: "PgText";
1085
+ data: string;
1086
+ driverParam: string;
1087
+ notNull: false;
1088
+ hasDefault: false;
1089
+ isPrimaryKey: false;
1090
+ isAutoincrement: false;
1091
+ hasRuntimeDefault: false;
1092
+ enumValues: [string, ...string[]];
1093
+ baseColumn: never;
1094
+ identity: undefined;
1095
+ generated: undefined;
1096
+ }, {}, {}>;
1097
+ description: import("drizzle-orm/pg-core").PgColumn<{
1098
+ name: "description";
1099
+ tableName: "product_days";
1100
+ dataType: "string";
1101
+ columnType: "PgText";
1102
+ data: string;
1103
+ driverParam: string;
1104
+ notNull: false;
1105
+ hasDefault: false;
1106
+ isPrimaryKey: false;
1107
+ isAutoincrement: false;
1108
+ hasRuntimeDefault: false;
1109
+ enumValues: [string, ...string[]];
1110
+ baseColumn: never;
1111
+ identity: undefined;
1112
+ generated: undefined;
1113
+ }, {}, {}>;
1114
+ location: import("drizzle-orm/pg-core").PgColumn<{
1115
+ name: "location";
1116
+ tableName: "product_days";
1117
+ dataType: "string";
1118
+ columnType: "PgText";
1119
+ data: string;
1120
+ driverParam: string;
1121
+ notNull: false;
1122
+ hasDefault: false;
1123
+ isPrimaryKey: false;
1124
+ isAutoincrement: false;
1125
+ hasRuntimeDefault: false;
1126
+ enumValues: [string, ...string[]];
1127
+ baseColumn: never;
1128
+ identity: undefined;
1129
+ generated: undefined;
1130
+ }, {}, {}>;
1131
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
1132
+ name: "created_at";
1133
+ tableName: "product_days";
1134
+ dataType: "date";
1135
+ columnType: "PgTimestamp";
1136
+ data: Date;
1137
+ driverParam: string;
1138
+ notNull: true;
1139
+ hasDefault: true;
1140
+ isPrimaryKey: false;
1141
+ isAutoincrement: false;
1142
+ hasRuntimeDefault: false;
1143
+ enumValues: undefined;
1144
+ baseColumn: never;
1145
+ identity: undefined;
1146
+ generated: undefined;
1147
+ }, {}, {}>;
1148
+ updatedAt: import("drizzle-orm/pg-core").PgColumn<{
1149
+ name: "updated_at";
1150
+ tableName: "product_days";
1151
+ dataType: "date";
1152
+ columnType: "PgTimestamp";
1153
+ data: Date;
1154
+ driverParam: string;
1155
+ notNull: true;
1156
+ hasDefault: true;
1157
+ isPrimaryKey: false;
1158
+ isAutoincrement: false;
1159
+ hasRuntimeDefault: false;
1160
+ enumValues: undefined;
1161
+ baseColumn: never;
1162
+ identity: undefined;
1163
+ generated: undefined;
1164
+ }, {}, {}>;
1165
+ }>, "where" | "orderBy">;
1166
+ createDay(db: PostgresJsDatabase, productId: string, data: CreateDayInput): Promise<{
1167
+ productId: string;
1168
+ createdAt: Date;
1169
+ updatedAt: Date;
1170
+ description: string | null;
1171
+ id: string;
1172
+ title: string | null;
1173
+ dayNumber: number;
1174
+ location: string | null;
1175
+ } | null | undefined>;
1176
+ updateDay(db: PostgresJsDatabase, dayId: string, data: UpdateDayInput): Promise<{
1177
+ id: string;
1178
+ productId: string;
1179
+ dayNumber: number;
1180
+ title: string | null;
1181
+ description: string | null;
1182
+ location: string | null;
1183
+ createdAt: Date;
1184
+ updatedAt: Date;
1185
+ } | null>;
1186
+ deleteDay(db: PostgresJsDatabase, dayId: string): Promise<{
1187
+ id: string;
1188
+ } | null>;
1189
+ listDayServices(db: PostgresJsDatabase, dayId: string): Omit<import("drizzle-orm/pg-core").PgSelectBase<"product_day_services", {
1190
+ id: import("drizzle-orm/pg-core").PgColumn<{
1191
+ name: string;
1192
+ tableName: "product_day_services";
1193
+ dataType: "string";
1194
+ columnType: "PgText";
1195
+ data: string;
1196
+ driverParam: string;
1197
+ notNull: true;
1198
+ hasDefault: true;
1199
+ isPrimaryKey: true;
1200
+ isAutoincrement: false;
1201
+ hasRuntimeDefault: true;
1202
+ enumValues: [string, ...string[]];
1203
+ baseColumn: never;
1204
+ identity: undefined;
1205
+ generated: undefined;
1206
+ }, {}, {}>;
1207
+ dayId: import("drizzle-orm/pg-core").PgColumn<{
1208
+ name: string;
1209
+ tableName: "product_day_services";
1210
+ dataType: "string";
1211
+ columnType: "PgText";
1212
+ data: string;
1213
+ driverParam: string;
1214
+ notNull: true;
1215
+ hasDefault: false;
1216
+ isPrimaryKey: false;
1217
+ isAutoincrement: false;
1218
+ hasRuntimeDefault: false;
1219
+ enumValues: [string, ...string[]];
1220
+ baseColumn: never;
1221
+ identity: undefined;
1222
+ generated: undefined;
1223
+ }, {}, {}>;
1224
+ supplierServiceId: import("drizzle-orm/pg-core").PgColumn<{
1225
+ name: "supplier_service_id";
1226
+ tableName: "product_day_services";
1227
+ dataType: "string";
1228
+ columnType: "PgText";
1229
+ data: string;
1230
+ driverParam: string;
1231
+ notNull: false;
1232
+ hasDefault: false;
1233
+ isPrimaryKey: false;
1234
+ isAutoincrement: false;
1235
+ hasRuntimeDefault: false;
1236
+ enumValues: [string, ...string[]];
1237
+ baseColumn: never;
1238
+ identity: undefined;
1239
+ generated: undefined;
1240
+ }, {}, {}>;
1241
+ serviceType: import("drizzle-orm/pg-core").PgColumn<{
1242
+ name: "service_type";
1243
+ tableName: "product_day_services";
1244
+ dataType: "string";
1245
+ columnType: "PgEnumColumn";
1246
+ data: "other" | "transfer" | "accommodation" | "experience" | "guide" | "meal";
1247
+ driverParam: string;
1248
+ notNull: true;
1249
+ hasDefault: false;
1250
+ isPrimaryKey: false;
1251
+ isAutoincrement: false;
1252
+ hasRuntimeDefault: false;
1253
+ enumValues: ["accommodation", "transfer", "experience", "guide", "meal", "other"];
1254
+ baseColumn: never;
1255
+ identity: undefined;
1256
+ generated: undefined;
1257
+ }, {}, {}>;
1258
+ name: import("drizzle-orm/pg-core").PgColumn<{
1259
+ name: "name";
1260
+ tableName: "product_day_services";
1261
+ dataType: "string";
1262
+ columnType: "PgText";
1263
+ data: string;
1264
+ driverParam: string;
1265
+ notNull: true;
1266
+ hasDefault: false;
1267
+ isPrimaryKey: false;
1268
+ isAutoincrement: false;
1269
+ hasRuntimeDefault: false;
1270
+ enumValues: [string, ...string[]];
1271
+ baseColumn: never;
1272
+ identity: undefined;
1273
+ generated: undefined;
1274
+ }, {}, {}>;
1275
+ description: import("drizzle-orm/pg-core").PgColumn<{
1276
+ name: "description";
1277
+ tableName: "product_day_services";
1278
+ dataType: "string";
1279
+ columnType: "PgText";
1280
+ data: string;
1281
+ driverParam: string;
1282
+ notNull: false;
1283
+ hasDefault: false;
1284
+ isPrimaryKey: false;
1285
+ isAutoincrement: false;
1286
+ hasRuntimeDefault: false;
1287
+ enumValues: [string, ...string[]];
1288
+ baseColumn: never;
1289
+ identity: undefined;
1290
+ generated: undefined;
1291
+ }, {}, {}>;
1292
+ costCurrency: import("drizzle-orm/pg-core").PgColumn<{
1293
+ name: "cost_currency";
1294
+ tableName: "product_day_services";
1295
+ dataType: "string";
1296
+ columnType: "PgText";
1297
+ data: string;
1298
+ driverParam: string;
1299
+ notNull: true;
1300
+ hasDefault: false;
1301
+ isPrimaryKey: false;
1302
+ isAutoincrement: false;
1303
+ hasRuntimeDefault: false;
1304
+ enumValues: [string, ...string[]];
1305
+ baseColumn: never;
1306
+ identity: undefined;
1307
+ generated: undefined;
1308
+ }, {}, {}>;
1309
+ costAmountCents: import("drizzle-orm/pg-core").PgColumn<{
1310
+ name: "cost_amount_cents";
1311
+ tableName: "product_day_services";
1312
+ dataType: "number";
1313
+ columnType: "PgInteger";
1314
+ data: number;
1315
+ driverParam: string | number;
1316
+ notNull: true;
1317
+ hasDefault: false;
1318
+ isPrimaryKey: false;
1319
+ isAutoincrement: false;
1320
+ hasRuntimeDefault: false;
1321
+ enumValues: undefined;
1322
+ baseColumn: never;
1323
+ identity: undefined;
1324
+ generated: undefined;
1325
+ }, {}, {}>;
1326
+ quantity: import("drizzle-orm/pg-core").PgColumn<{
1327
+ name: "quantity";
1328
+ tableName: "product_day_services";
1329
+ dataType: "number";
1330
+ columnType: "PgInteger";
1331
+ data: number;
1332
+ driverParam: string | number;
1333
+ notNull: true;
1334
+ hasDefault: true;
1335
+ isPrimaryKey: false;
1336
+ isAutoincrement: false;
1337
+ hasRuntimeDefault: false;
1338
+ enumValues: undefined;
1339
+ baseColumn: never;
1340
+ identity: undefined;
1341
+ generated: undefined;
1342
+ }, {}, {}>;
1343
+ sortOrder: import("drizzle-orm/pg-core").PgColumn<{
1344
+ name: "sort_order";
1345
+ tableName: "product_day_services";
1346
+ dataType: "number";
1347
+ columnType: "PgInteger";
1348
+ data: number;
1349
+ driverParam: string | number;
1350
+ notNull: false;
1351
+ hasDefault: false;
1352
+ isPrimaryKey: false;
1353
+ isAutoincrement: false;
1354
+ hasRuntimeDefault: false;
1355
+ enumValues: undefined;
1356
+ baseColumn: never;
1357
+ identity: undefined;
1358
+ generated: undefined;
1359
+ }, {}, {}>;
1360
+ notes: import("drizzle-orm/pg-core").PgColumn<{
1361
+ name: "notes";
1362
+ tableName: "product_day_services";
1363
+ dataType: "string";
1364
+ columnType: "PgText";
1365
+ data: string;
1366
+ driverParam: string;
1367
+ notNull: false;
1368
+ hasDefault: false;
1369
+ isPrimaryKey: false;
1370
+ isAutoincrement: false;
1371
+ hasRuntimeDefault: false;
1372
+ enumValues: [string, ...string[]];
1373
+ baseColumn: never;
1374
+ identity: undefined;
1375
+ generated: undefined;
1376
+ }, {}, {}>;
1377
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
1378
+ name: "created_at";
1379
+ tableName: "product_day_services";
1380
+ dataType: "date";
1381
+ columnType: "PgTimestamp";
1382
+ data: Date;
1383
+ driverParam: string;
1384
+ notNull: true;
1385
+ hasDefault: true;
1386
+ isPrimaryKey: false;
1387
+ isAutoincrement: false;
1388
+ hasRuntimeDefault: false;
1389
+ enumValues: undefined;
1390
+ baseColumn: never;
1391
+ identity: undefined;
1392
+ generated: undefined;
1393
+ }, {}, {}>;
1394
+ }, "single", Record<"product_day_services", "not-null">, false, "where" | "orderBy", {
1395
+ id: string;
1396
+ dayId: string;
1397
+ supplierServiceId: string | null;
1398
+ serviceType: "other" | "transfer" | "accommodation" | "experience" | "guide" | "meal";
1399
+ name: string;
1400
+ description: string | null;
1401
+ costCurrency: string;
1402
+ costAmountCents: number;
1403
+ quantity: number;
1404
+ sortOrder: number | null;
1405
+ notes: string | null;
1406
+ createdAt: Date;
1407
+ }[], {
1408
+ id: import("drizzle-orm/pg-core").PgColumn<{
1409
+ name: string;
1410
+ tableName: "product_day_services";
1411
+ dataType: "string";
1412
+ columnType: "PgText";
1413
+ data: string;
1414
+ driverParam: string;
1415
+ notNull: true;
1416
+ hasDefault: true;
1417
+ isPrimaryKey: true;
1418
+ isAutoincrement: false;
1419
+ hasRuntimeDefault: true;
1420
+ enumValues: [string, ...string[]];
1421
+ baseColumn: never;
1422
+ identity: undefined;
1423
+ generated: undefined;
1424
+ }, {}, {}>;
1425
+ dayId: import("drizzle-orm/pg-core").PgColumn<{
1426
+ name: string;
1427
+ tableName: "product_day_services";
1428
+ dataType: "string";
1429
+ columnType: "PgText";
1430
+ data: string;
1431
+ driverParam: string;
1432
+ notNull: true;
1433
+ hasDefault: false;
1434
+ isPrimaryKey: false;
1435
+ isAutoincrement: false;
1436
+ hasRuntimeDefault: false;
1437
+ enumValues: [string, ...string[]];
1438
+ baseColumn: never;
1439
+ identity: undefined;
1440
+ generated: undefined;
1441
+ }, {}, {}>;
1442
+ supplierServiceId: import("drizzle-orm/pg-core").PgColumn<{
1443
+ name: "supplier_service_id";
1444
+ tableName: "product_day_services";
1445
+ dataType: "string";
1446
+ columnType: "PgText";
1447
+ data: string;
1448
+ driverParam: string;
1449
+ notNull: false;
1450
+ hasDefault: false;
1451
+ isPrimaryKey: false;
1452
+ isAutoincrement: false;
1453
+ hasRuntimeDefault: false;
1454
+ enumValues: [string, ...string[]];
1455
+ baseColumn: never;
1456
+ identity: undefined;
1457
+ generated: undefined;
1458
+ }, {}, {}>;
1459
+ serviceType: import("drizzle-orm/pg-core").PgColumn<{
1460
+ name: "service_type";
1461
+ tableName: "product_day_services";
1462
+ dataType: "string";
1463
+ columnType: "PgEnumColumn";
1464
+ data: "other" | "transfer" | "accommodation" | "experience" | "guide" | "meal";
1465
+ driverParam: string;
1466
+ notNull: true;
1467
+ hasDefault: false;
1468
+ isPrimaryKey: false;
1469
+ isAutoincrement: false;
1470
+ hasRuntimeDefault: false;
1471
+ enumValues: ["accommodation", "transfer", "experience", "guide", "meal", "other"];
1472
+ baseColumn: never;
1473
+ identity: undefined;
1474
+ generated: undefined;
1475
+ }, {}, {}>;
1476
+ name: import("drizzle-orm/pg-core").PgColumn<{
1477
+ name: "name";
1478
+ tableName: "product_day_services";
1479
+ dataType: "string";
1480
+ columnType: "PgText";
1481
+ data: string;
1482
+ driverParam: string;
1483
+ notNull: true;
1484
+ hasDefault: false;
1485
+ isPrimaryKey: false;
1486
+ isAutoincrement: false;
1487
+ hasRuntimeDefault: false;
1488
+ enumValues: [string, ...string[]];
1489
+ baseColumn: never;
1490
+ identity: undefined;
1491
+ generated: undefined;
1492
+ }, {}, {}>;
1493
+ description: import("drizzle-orm/pg-core").PgColumn<{
1494
+ name: "description";
1495
+ tableName: "product_day_services";
1496
+ dataType: "string";
1497
+ columnType: "PgText";
1498
+ data: string;
1499
+ driverParam: string;
1500
+ notNull: false;
1501
+ hasDefault: false;
1502
+ isPrimaryKey: false;
1503
+ isAutoincrement: false;
1504
+ hasRuntimeDefault: false;
1505
+ enumValues: [string, ...string[]];
1506
+ baseColumn: never;
1507
+ identity: undefined;
1508
+ generated: undefined;
1509
+ }, {}, {}>;
1510
+ costCurrency: import("drizzle-orm/pg-core").PgColumn<{
1511
+ name: "cost_currency";
1512
+ tableName: "product_day_services";
1513
+ dataType: "string";
1514
+ columnType: "PgText";
1515
+ data: string;
1516
+ driverParam: string;
1517
+ notNull: true;
1518
+ hasDefault: false;
1519
+ isPrimaryKey: false;
1520
+ isAutoincrement: false;
1521
+ hasRuntimeDefault: false;
1522
+ enumValues: [string, ...string[]];
1523
+ baseColumn: never;
1524
+ identity: undefined;
1525
+ generated: undefined;
1526
+ }, {}, {}>;
1527
+ costAmountCents: import("drizzle-orm/pg-core").PgColumn<{
1528
+ name: "cost_amount_cents";
1529
+ tableName: "product_day_services";
1530
+ dataType: "number";
1531
+ columnType: "PgInteger";
1532
+ data: number;
1533
+ driverParam: string | number;
1534
+ notNull: true;
1535
+ hasDefault: false;
1536
+ isPrimaryKey: false;
1537
+ isAutoincrement: false;
1538
+ hasRuntimeDefault: false;
1539
+ enumValues: undefined;
1540
+ baseColumn: never;
1541
+ identity: undefined;
1542
+ generated: undefined;
1543
+ }, {}, {}>;
1544
+ quantity: import("drizzle-orm/pg-core").PgColumn<{
1545
+ name: "quantity";
1546
+ tableName: "product_day_services";
1547
+ dataType: "number";
1548
+ columnType: "PgInteger";
1549
+ data: number;
1550
+ driverParam: string | number;
1551
+ notNull: true;
1552
+ hasDefault: true;
1553
+ isPrimaryKey: false;
1554
+ isAutoincrement: false;
1555
+ hasRuntimeDefault: false;
1556
+ enumValues: undefined;
1557
+ baseColumn: never;
1558
+ identity: undefined;
1559
+ generated: undefined;
1560
+ }, {}, {}>;
1561
+ sortOrder: import("drizzle-orm/pg-core").PgColumn<{
1562
+ name: "sort_order";
1563
+ tableName: "product_day_services";
1564
+ dataType: "number";
1565
+ columnType: "PgInteger";
1566
+ data: number;
1567
+ driverParam: string | number;
1568
+ notNull: false;
1569
+ hasDefault: false;
1570
+ isPrimaryKey: false;
1571
+ isAutoincrement: false;
1572
+ hasRuntimeDefault: false;
1573
+ enumValues: undefined;
1574
+ baseColumn: never;
1575
+ identity: undefined;
1576
+ generated: undefined;
1577
+ }, {}, {}>;
1578
+ notes: import("drizzle-orm/pg-core").PgColumn<{
1579
+ name: "notes";
1580
+ tableName: "product_day_services";
1581
+ dataType: "string";
1582
+ columnType: "PgText";
1583
+ data: string;
1584
+ driverParam: string;
1585
+ notNull: false;
1586
+ hasDefault: false;
1587
+ isPrimaryKey: false;
1588
+ isAutoincrement: false;
1589
+ hasRuntimeDefault: false;
1590
+ enumValues: [string, ...string[]];
1591
+ baseColumn: never;
1592
+ identity: undefined;
1593
+ generated: undefined;
1594
+ }, {}, {}>;
1595
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
1596
+ name: "created_at";
1597
+ tableName: "product_day_services";
1598
+ dataType: "date";
1599
+ columnType: "PgTimestamp";
1600
+ data: Date;
1601
+ driverParam: string;
1602
+ notNull: true;
1603
+ hasDefault: true;
1604
+ isPrimaryKey: false;
1605
+ isAutoincrement: false;
1606
+ hasRuntimeDefault: false;
1607
+ enumValues: undefined;
1608
+ baseColumn: never;
1609
+ identity: undefined;
1610
+ generated: undefined;
1611
+ }, {}, {}>;
1612
+ }>, "where" | "orderBy">;
1613
+ createDayService(db: PostgresJsDatabase, productId: string, dayId: string, data: CreateDayServiceInput): Promise<{
1614
+ name: string;
1615
+ createdAt: Date;
1616
+ supplierServiceId: string | null;
1617
+ description: string | null;
1618
+ id: string;
1619
+ costAmountCents: number;
1620
+ sortOrder: number | null;
1621
+ notes: string | null;
1622
+ dayId: string;
1623
+ serviceType: "other" | "transfer" | "accommodation" | "experience" | "guide" | "meal";
1624
+ costCurrency: string;
1625
+ quantity: number;
1626
+ } | null | undefined>;
1627
+ updateDayService(db: PostgresJsDatabase, productId: string, serviceId: string, data: UpdateDayServiceInput): Promise<{
1628
+ id: string;
1629
+ dayId: string;
1630
+ supplierServiceId: string | null;
1631
+ serviceType: "other" | "transfer" | "accommodation" | "experience" | "guide" | "meal";
1632
+ name: string;
1633
+ description: string | null;
1634
+ costCurrency: string;
1635
+ costAmountCents: number;
1636
+ quantity: number;
1637
+ sortOrder: number | null;
1638
+ notes: string | null;
1639
+ createdAt: Date;
1640
+ } | null>;
1641
+ deleteDayService(db: PostgresJsDatabase, productId: string, serviceId: string): Promise<{
1642
+ id: string;
1643
+ } | null>;
1644
+ listVersions(db: PostgresJsDatabase, productId: string): Omit<import("drizzle-orm/pg-core").PgSelectBase<"product_versions", {
1645
+ id: import("drizzle-orm/pg-core").PgColumn<{
1646
+ name: string;
1647
+ tableName: "product_versions";
1648
+ dataType: "string";
1649
+ columnType: "PgText";
1650
+ data: string;
1651
+ driverParam: string;
1652
+ notNull: true;
1653
+ hasDefault: true;
1654
+ isPrimaryKey: true;
1655
+ isAutoincrement: false;
1656
+ hasRuntimeDefault: true;
1657
+ enumValues: [string, ...string[]];
1658
+ baseColumn: never;
1659
+ identity: undefined;
1660
+ generated: undefined;
1661
+ }, {}, {}>;
1662
+ productId: import("drizzle-orm/pg-core").PgColumn<{
1663
+ name: string;
1664
+ tableName: "product_versions";
1665
+ dataType: "string";
1666
+ columnType: "PgText";
1667
+ data: string;
1668
+ driverParam: string;
1669
+ notNull: true;
1670
+ hasDefault: false;
1671
+ isPrimaryKey: false;
1672
+ isAutoincrement: false;
1673
+ hasRuntimeDefault: false;
1674
+ enumValues: [string, ...string[]];
1675
+ baseColumn: never;
1676
+ identity: undefined;
1677
+ generated: undefined;
1678
+ }, {}, {}>;
1679
+ versionNumber: import("drizzle-orm/pg-core").PgColumn<{
1680
+ name: "version_number";
1681
+ tableName: "product_versions";
1682
+ dataType: "number";
1683
+ columnType: "PgInteger";
1684
+ data: number;
1685
+ driverParam: string | number;
1686
+ notNull: true;
1687
+ hasDefault: false;
1688
+ isPrimaryKey: false;
1689
+ isAutoincrement: false;
1690
+ hasRuntimeDefault: false;
1691
+ enumValues: undefined;
1692
+ baseColumn: never;
1693
+ identity: undefined;
1694
+ generated: undefined;
1695
+ }, {}, {}>;
1696
+ snapshot: import("drizzle-orm/pg-core").PgColumn<{
1697
+ name: "snapshot";
1698
+ tableName: "product_versions";
1699
+ dataType: "json";
1700
+ columnType: "PgJsonb";
1701
+ data: unknown;
1702
+ driverParam: unknown;
1703
+ notNull: true;
1704
+ hasDefault: false;
1705
+ isPrimaryKey: false;
1706
+ isAutoincrement: false;
1707
+ hasRuntimeDefault: false;
1708
+ enumValues: undefined;
1709
+ baseColumn: never;
1710
+ identity: undefined;
1711
+ generated: undefined;
1712
+ }, {}, {}>;
1713
+ authorId: import("drizzle-orm/pg-core").PgColumn<{
1714
+ name: "author_id";
1715
+ tableName: "product_versions";
1716
+ dataType: "string";
1717
+ columnType: "PgText";
1718
+ data: string;
1719
+ driverParam: string;
1720
+ notNull: true;
1721
+ hasDefault: false;
1722
+ isPrimaryKey: false;
1723
+ isAutoincrement: false;
1724
+ hasRuntimeDefault: false;
1725
+ enumValues: [string, ...string[]];
1726
+ baseColumn: never;
1727
+ identity: undefined;
1728
+ generated: undefined;
1729
+ }, {}, {}>;
1730
+ notes: import("drizzle-orm/pg-core").PgColumn<{
1731
+ name: "notes";
1732
+ tableName: "product_versions";
1733
+ dataType: "string";
1734
+ columnType: "PgText";
1735
+ data: string;
1736
+ driverParam: string;
1737
+ notNull: false;
1738
+ hasDefault: false;
1739
+ isPrimaryKey: false;
1740
+ isAutoincrement: false;
1741
+ hasRuntimeDefault: false;
1742
+ enumValues: [string, ...string[]];
1743
+ baseColumn: never;
1744
+ identity: undefined;
1745
+ generated: undefined;
1746
+ }, {}, {}>;
1747
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
1748
+ name: "created_at";
1749
+ tableName: "product_versions";
1750
+ dataType: "date";
1751
+ columnType: "PgTimestamp";
1752
+ data: Date;
1753
+ driverParam: string;
1754
+ notNull: true;
1755
+ hasDefault: true;
1756
+ isPrimaryKey: false;
1757
+ isAutoincrement: false;
1758
+ hasRuntimeDefault: false;
1759
+ enumValues: undefined;
1760
+ baseColumn: never;
1761
+ identity: undefined;
1762
+ generated: undefined;
1763
+ }, {}, {}>;
1764
+ }, "single", Record<"product_versions", "not-null">, false, "where" | "orderBy", {
1765
+ id: string;
1766
+ productId: string;
1767
+ versionNumber: number;
1768
+ snapshot: unknown;
1769
+ authorId: string;
1770
+ notes: string | null;
1771
+ createdAt: Date;
1772
+ }[], {
1773
+ id: import("drizzle-orm/pg-core").PgColumn<{
1774
+ name: string;
1775
+ tableName: "product_versions";
1776
+ dataType: "string";
1777
+ columnType: "PgText";
1778
+ data: string;
1779
+ driverParam: string;
1780
+ notNull: true;
1781
+ hasDefault: true;
1782
+ isPrimaryKey: true;
1783
+ isAutoincrement: false;
1784
+ hasRuntimeDefault: true;
1785
+ enumValues: [string, ...string[]];
1786
+ baseColumn: never;
1787
+ identity: undefined;
1788
+ generated: undefined;
1789
+ }, {}, {}>;
1790
+ productId: import("drizzle-orm/pg-core").PgColumn<{
1791
+ name: string;
1792
+ tableName: "product_versions";
1793
+ dataType: "string";
1794
+ columnType: "PgText";
1795
+ data: string;
1796
+ driverParam: string;
1797
+ notNull: true;
1798
+ hasDefault: false;
1799
+ isPrimaryKey: false;
1800
+ isAutoincrement: false;
1801
+ hasRuntimeDefault: false;
1802
+ enumValues: [string, ...string[]];
1803
+ baseColumn: never;
1804
+ identity: undefined;
1805
+ generated: undefined;
1806
+ }, {}, {}>;
1807
+ versionNumber: import("drizzle-orm/pg-core").PgColumn<{
1808
+ name: "version_number";
1809
+ tableName: "product_versions";
1810
+ dataType: "number";
1811
+ columnType: "PgInteger";
1812
+ data: number;
1813
+ driverParam: string | number;
1814
+ notNull: true;
1815
+ hasDefault: false;
1816
+ isPrimaryKey: false;
1817
+ isAutoincrement: false;
1818
+ hasRuntimeDefault: false;
1819
+ enumValues: undefined;
1820
+ baseColumn: never;
1821
+ identity: undefined;
1822
+ generated: undefined;
1823
+ }, {}, {}>;
1824
+ snapshot: import("drizzle-orm/pg-core").PgColumn<{
1825
+ name: "snapshot";
1826
+ tableName: "product_versions";
1827
+ dataType: "json";
1828
+ columnType: "PgJsonb";
1829
+ data: unknown;
1830
+ driverParam: unknown;
1831
+ notNull: true;
1832
+ hasDefault: false;
1833
+ isPrimaryKey: false;
1834
+ isAutoincrement: false;
1835
+ hasRuntimeDefault: false;
1836
+ enumValues: undefined;
1837
+ baseColumn: never;
1838
+ identity: undefined;
1839
+ generated: undefined;
1840
+ }, {}, {}>;
1841
+ authorId: import("drizzle-orm/pg-core").PgColumn<{
1842
+ name: "author_id";
1843
+ tableName: "product_versions";
1844
+ dataType: "string";
1845
+ columnType: "PgText";
1846
+ data: string;
1847
+ driverParam: string;
1848
+ notNull: true;
1849
+ hasDefault: false;
1850
+ isPrimaryKey: false;
1851
+ isAutoincrement: false;
1852
+ hasRuntimeDefault: false;
1853
+ enumValues: [string, ...string[]];
1854
+ baseColumn: never;
1855
+ identity: undefined;
1856
+ generated: undefined;
1857
+ }, {}, {}>;
1858
+ notes: import("drizzle-orm/pg-core").PgColumn<{
1859
+ name: "notes";
1860
+ tableName: "product_versions";
1861
+ dataType: "string";
1862
+ columnType: "PgText";
1863
+ data: string;
1864
+ driverParam: string;
1865
+ notNull: false;
1866
+ hasDefault: false;
1867
+ isPrimaryKey: false;
1868
+ isAutoincrement: false;
1869
+ hasRuntimeDefault: false;
1870
+ enumValues: [string, ...string[]];
1871
+ baseColumn: never;
1872
+ identity: undefined;
1873
+ generated: undefined;
1874
+ }, {}, {}>;
1875
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
1876
+ name: "created_at";
1877
+ tableName: "product_versions";
1878
+ dataType: "date";
1879
+ columnType: "PgTimestamp";
1880
+ data: Date;
1881
+ driverParam: string;
1882
+ notNull: true;
1883
+ hasDefault: true;
1884
+ isPrimaryKey: false;
1885
+ isAutoincrement: false;
1886
+ hasRuntimeDefault: false;
1887
+ enumValues: undefined;
1888
+ baseColumn: never;
1889
+ identity: undefined;
1890
+ generated: undefined;
1891
+ }, {}, {}>;
1892
+ }>, "where" | "orderBy">;
1893
+ createVersion(db: PostgresJsDatabase, productId: string, userId: string, data: CreateVersionInput): Promise<{
1894
+ productId: string;
1895
+ createdAt: Date;
1896
+ id: string;
1897
+ notes: string | null;
1898
+ versionNumber: number;
1899
+ snapshot: unknown;
1900
+ authorId: string;
1901
+ } | null | undefined>;
1902
+ listNotes(db: PostgresJsDatabase, productId: string): Omit<import("drizzle-orm/pg-core").PgSelectBase<"product_notes", {
1903
+ id: import("drizzle-orm/pg-core").PgColumn<{
1904
+ name: string;
1905
+ tableName: "product_notes";
1906
+ dataType: "string";
1907
+ columnType: "PgText";
1908
+ data: string;
1909
+ driverParam: string;
1910
+ notNull: true;
1911
+ hasDefault: true;
1912
+ isPrimaryKey: true;
1913
+ isAutoincrement: false;
1914
+ hasRuntimeDefault: true;
1915
+ enumValues: [string, ...string[]];
1916
+ baseColumn: never;
1917
+ identity: undefined;
1918
+ generated: undefined;
1919
+ }, {}, {}>;
1920
+ productId: import("drizzle-orm/pg-core").PgColumn<{
1921
+ name: string;
1922
+ tableName: "product_notes";
1923
+ dataType: "string";
1924
+ columnType: "PgText";
1925
+ data: string;
1926
+ driverParam: string;
1927
+ notNull: true;
1928
+ hasDefault: false;
1929
+ isPrimaryKey: false;
1930
+ isAutoincrement: false;
1931
+ hasRuntimeDefault: false;
1932
+ enumValues: [string, ...string[]];
1933
+ baseColumn: never;
1934
+ identity: undefined;
1935
+ generated: undefined;
1936
+ }, {}, {}>;
1937
+ authorId: import("drizzle-orm/pg-core").PgColumn<{
1938
+ name: "author_id";
1939
+ tableName: "product_notes";
1940
+ dataType: "string";
1941
+ columnType: "PgText";
1942
+ data: string;
1943
+ driverParam: string;
1944
+ notNull: true;
1945
+ hasDefault: false;
1946
+ isPrimaryKey: false;
1947
+ isAutoincrement: false;
1948
+ hasRuntimeDefault: false;
1949
+ enumValues: [string, ...string[]];
1950
+ baseColumn: never;
1951
+ identity: undefined;
1952
+ generated: undefined;
1953
+ }, {}, {}>;
1954
+ content: import("drizzle-orm/pg-core").PgColumn<{
1955
+ name: "content";
1956
+ tableName: "product_notes";
1957
+ dataType: "string";
1958
+ columnType: "PgText";
1959
+ data: string;
1960
+ driverParam: string;
1961
+ notNull: true;
1962
+ hasDefault: false;
1963
+ isPrimaryKey: false;
1964
+ isAutoincrement: false;
1965
+ hasRuntimeDefault: false;
1966
+ enumValues: [string, ...string[]];
1967
+ baseColumn: never;
1968
+ identity: undefined;
1969
+ generated: undefined;
1970
+ }, {}, {}>;
1971
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
1972
+ name: "created_at";
1973
+ tableName: "product_notes";
1974
+ dataType: "date";
1975
+ columnType: "PgTimestamp";
1976
+ data: Date;
1977
+ driverParam: string;
1978
+ notNull: true;
1979
+ hasDefault: true;
1980
+ isPrimaryKey: false;
1981
+ isAutoincrement: false;
1982
+ hasRuntimeDefault: false;
1983
+ enumValues: undefined;
1984
+ baseColumn: never;
1985
+ identity: undefined;
1986
+ generated: undefined;
1987
+ }, {}, {}>;
1988
+ }, "single", Record<"product_notes", "not-null">, false, "where" | "orderBy", {
1989
+ id: string;
1990
+ productId: string;
1991
+ authorId: string;
1992
+ content: string;
1993
+ createdAt: Date;
1994
+ }[], {
1995
+ id: import("drizzle-orm/pg-core").PgColumn<{
1996
+ name: string;
1997
+ tableName: "product_notes";
1998
+ dataType: "string";
1999
+ columnType: "PgText";
2000
+ data: string;
2001
+ driverParam: string;
2002
+ notNull: true;
2003
+ hasDefault: true;
2004
+ isPrimaryKey: true;
2005
+ isAutoincrement: false;
2006
+ hasRuntimeDefault: true;
2007
+ enumValues: [string, ...string[]];
2008
+ baseColumn: never;
2009
+ identity: undefined;
2010
+ generated: undefined;
2011
+ }, {}, {}>;
2012
+ productId: import("drizzle-orm/pg-core").PgColumn<{
2013
+ name: string;
2014
+ tableName: "product_notes";
2015
+ dataType: "string";
2016
+ columnType: "PgText";
2017
+ data: string;
2018
+ driverParam: string;
2019
+ notNull: true;
2020
+ hasDefault: false;
2021
+ isPrimaryKey: false;
2022
+ isAutoincrement: false;
2023
+ hasRuntimeDefault: false;
2024
+ enumValues: [string, ...string[]];
2025
+ baseColumn: never;
2026
+ identity: undefined;
2027
+ generated: undefined;
2028
+ }, {}, {}>;
2029
+ authorId: import("drizzle-orm/pg-core").PgColumn<{
2030
+ name: "author_id";
2031
+ tableName: "product_notes";
2032
+ dataType: "string";
2033
+ columnType: "PgText";
2034
+ data: string;
2035
+ driverParam: string;
2036
+ notNull: true;
2037
+ hasDefault: false;
2038
+ isPrimaryKey: false;
2039
+ isAutoincrement: false;
2040
+ hasRuntimeDefault: false;
2041
+ enumValues: [string, ...string[]];
2042
+ baseColumn: never;
2043
+ identity: undefined;
2044
+ generated: undefined;
2045
+ }, {}, {}>;
2046
+ content: import("drizzle-orm/pg-core").PgColumn<{
2047
+ name: "content";
2048
+ tableName: "product_notes";
2049
+ dataType: "string";
2050
+ columnType: "PgText";
2051
+ data: string;
2052
+ driverParam: string;
2053
+ notNull: true;
2054
+ hasDefault: false;
2055
+ isPrimaryKey: false;
2056
+ isAutoincrement: false;
2057
+ hasRuntimeDefault: false;
2058
+ enumValues: [string, ...string[]];
2059
+ baseColumn: never;
2060
+ identity: undefined;
2061
+ generated: undefined;
2062
+ }, {}, {}>;
2063
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
2064
+ name: "created_at";
2065
+ tableName: "product_notes";
2066
+ dataType: "date";
2067
+ columnType: "PgTimestamp";
2068
+ data: Date;
2069
+ driverParam: string;
2070
+ notNull: true;
2071
+ hasDefault: true;
2072
+ isPrimaryKey: false;
2073
+ isAutoincrement: false;
2074
+ hasRuntimeDefault: false;
2075
+ enumValues: undefined;
2076
+ baseColumn: never;
2077
+ identity: undefined;
2078
+ generated: undefined;
2079
+ }, {}, {}>;
2080
+ }>, "where" | "orderBy">;
2081
+ createNote(db: PostgresJsDatabase, productId: string, userId: string, data: CreateProductNoteInput): Promise<{
2082
+ productId: string;
2083
+ createdAt: Date;
2084
+ id: string;
2085
+ authorId: string;
2086
+ content: string;
2087
+ } | null | undefined>;
2088
+ recalculate(db: PostgresJsDatabase, productId: string): Promise<{
2089
+ costAmountCents: number;
2090
+ marginPercent: number;
2091
+ } | null>;
2092
+ listProductTypes(db: PostgresJsDatabase, query: ProductTypeListQuery): Promise<{
2093
+ data: {
2094
+ id: string;
2095
+ name: string;
2096
+ code: string;
2097
+ description: string | null;
2098
+ sortOrder: number;
2099
+ active: boolean;
2100
+ metadata: Record<string, unknown> | null;
2101
+ createdAt: Date;
2102
+ updatedAt: Date;
2103
+ }[];
2104
+ total: number;
2105
+ limit: number;
2106
+ offset: number;
2107
+ }>;
2108
+ getProductTypeById(db: PostgresJsDatabase, id: string): Promise<{
2109
+ id: string;
2110
+ name: string;
2111
+ code: string;
2112
+ description: string | null;
2113
+ sortOrder: number;
2114
+ active: boolean;
2115
+ metadata: Record<string, unknown> | null;
2116
+ createdAt: Date;
2117
+ updatedAt: Date;
2118
+ } | null>;
2119
+ createProductType(db: PostgresJsDatabase, data: CreateProductTypeInput): Promise<{
2120
+ name: string;
2121
+ createdAt: Date;
2122
+ updatedAt: Date;
2123
+ description: string | null;
2124
+ id: string;
2125
+ active: boolean;
2126
+ code: string;
2127
+ sortOrder: number;
2128
+ metadata: Record<string, unknown> | null;
2129
+ } | undefined>;
2130
+ updateProductType(db: PostgresJsDatabase, id: string, data: UpdateProductTypeInput): Promise<{
2131
+ id: string;
2132
+ name: string;
2133
+ code: string;
2134
+ description: string | null;
2135
+ sortOrder: number;
2136
+ active: boolean;
2137
+ metadata: Record<string, unknown> | null;
2138
+ createdAt: Date;
2139
+ updatedAt: Date;
2140
+ } | null>;
2141
+ deleteProductType(db: PostgresJsDatabase, id: string): Promise<{
2142
+ id: string;
2143
+ } | null>;
2144
+ listProductCategories(db: PostgresJsDatabase, query: ProductCategoryListQuery): Promise<{
2145
+ data: {
2146
+ id: string;
2147
+ parentId: string | null;
2148
+ name: string;
2149
+ slug: string;
2150
+ description: string | null;
2151
+ sortOrder: number;
2152
+ active: boolean;
2153
+ metadata: Record<string, unknown> | null;
2154
+ createdAt: Date;
2155
+ updatedAt: Date;
2156
+ }[];
2157
+ total: number;
2158
+ limit: number;
2159
+ offset: number;
2160
+ }>;
2161
+ getProductCategoryById(db: PostgresJsDatabase, id: string): Promise<{
2162
+ id: string;
2163
+ parentId: string | null;
2164
+ name: string;
2165
+ slug: string;
2166
+ description: string | null;
2167
+ sortOrder: number;
2168
+ active: boolean;
2169
+ metadata: Record<string, unknown> | null;
2170
+ createdAt: Date;
2171
+ updatedAt: Date;
2172
+ } | null>;
2173
+ createProductCategory(db: PostgresJsDatabase, data: CreateProductCategoryInput): Promise<{
2174
+ name: string;
2175
+ createdAt: Date;
2176
+ updatedAt: Date;
2177
+ description: string | null;
2178
+ id: string;
2179
+ active: boolean;
2180
+ sortOrder: number;
2181
+ slug: string;
2182
+ metadata: Record<string, unknown> | null;
2183
+ parentId: string | null;
2184
+ } | undefined>;
2185
+ updateProductCategory(db: PostgresJsDatabase, id: string, data: UpdateProductCategoryInput): Promise<{
2186
+ id: string;
2187
+ parentId: string | null;
2188
+ name: string;
2189
+ slug: string;
2190
+ description: string | null;
2191
+ sortOrder: number;
2192
+ active: boolean;
2193
+ metadata: Record<string, unknown> | null;
2194
+ createdAt: Date;
2195
+ updatedAt: Date;
2196
+ } | null>;
2197
+ deleteProductCategory(db: PostgresJsDatabase, id: string): Promise<{
2198
+ id: string;
2199
+ } | null>;
2200
+ listProductTags(db: PostgresJsDatabase, query: ProductTagListQuery): Promise<{
2201
+ data: {
2202
+ id: string;
2203
+ name: string;
2204
+ createdAt: Date;
2205
+ updatedAt: Date;
2206
+ }[];
2207
+ total: number;
2208
+ limit: number;
2209
+ offset: number;
2210
+ }>;
2211
+ getProductTagById(db: PostgresJsDatabase, id: string): Promise<{
2212
+ id: string;
2213
+ name: string;
2214
+ createdAt: Date;
2215
+ updatedAt: Date;
2216
+ } | null>;
2217
+ createProductTag(db: PostgresJsDatabase, data: CreateProductTagInput): Promise<{
2218
+ name: string;
2219
+ createdAt: Date;
2220
+ updatedAt: Date;
2221
+ id: string;
2222
+ } | undefined>;
2223
+ updateProductTag(db: PostgresJsDatabase, id: string, data: UpdateProductTagInput): Promise<{
2224
+ id: string;
2225
+ name: string;
2226
+ createdAt: Date;
2227
+ updatedAt: Date;
2228
+ } | null>;
2229
+ deleteProductTag(db: PostgresJsDatabase, id: string): Promise<{
2230
+ id: string;
2231
+ } | null>;
2232
+ addProductToCategory(db: PostgresJsDatabase, productId: string, categoryId: string, sortOrder?: number): Promise<{
2233
+ productId: string;
2234
+ createdAt: Date;
2235
+ updatedAt: Date;
2236
+ sortOrder: number;
2237
+ categoryId: string;
2238
+ } | null>;
2239
+ removeProductFromCategory(db: PostgresJsDatabase, productId: string, categoryId: string): Promise<{
2240
+ productId: string;
2241
+ } | null>;
2242
+ listProductCategories_(db: PostgresJsDatabase, productId: string): Promise<{
2243
+ id: string;
2244
+ parentId: string | null;
2245
+ name: string;
2246
+ slug: string;
2247
+ description: string | null;
2248
+ sortOrder: number;
2249
+ active: boolean;
2250
+ metadata: Record<string, unknown> | null;
2251
+ createdAt: Date;
2252
+ updatedAt: Date;
2253
+ }[]>;
2254
+ addProductTag(db: PostgresJsDatabase, productId: string, tagId: string): Promise<{
2255
+ productId: string;
2256
+ createdAt: Date;
2257
+ tagId: string;
2258
+ } | null>;
2259
+ removeProductTag(db: PostgresJsDatabase, productId: string, tagId: string): Promise<{
2260
+ productId: string;
2261
+ } | null>;
2262
+ listProductTags_(db: PostgresJsDatabase, productId: string): Promise<{
2263
+ id: string;
2264
+ name: string;
2265
+ createdAt: Date;
2266
+ updatedAt: Date;
2267
+ }[]>;
2268
+ listMedia(db: PostgresJsDatabase, productId: string, query: ProductMediaListQuery): Promise<{
2269
+ data: {
2270
+ id: string;
2271
+ productId: string;
2272
+ dayId: string | null;
2273
+ mediaType: "image" | "video" | "document";
2274
+ name: string;
2275
+ url: string;
2276
+ storageKey: string | null;
2277
+ mimeType: string | null;
2278
+ fileSize: number | null;
2279
+ altText: string | null;
2280
+ sortOrder: number;
2281
+ isCover: boolean;
2282
+ createdAt: Date;
2283
+ updatedAt: Date;
2284
+ }[];
2285
+ total: number;
2286
+ limit: number;
2287
+ offset: number;
2288
+ }>;
2289
+ listProductLevelMedia(db: PostgresJsDatabase, productId: string, query: ProductMediaListQuery): Promise<{
2290
+ data: {
2291
+ id: string;
2292
+ productId: string;
2293
+ dayId: string | null;
2294
+ mediaType: "image" | "video" | "document";
2295
+ name: string;
2296
+ url: string;
2297
+ storageKey: string | null;
2298
+ mimeType: string | null;
2299
+ fileSize: number | null;
2300
+ altText: string | null;
2301
+ sortOrder: number;
2302
+ isCover: boolean;
2303
+ createdAt: Date;
2304
+ updatedAt: Date;
2305
+ }[];
2306
+ total: number;
2307
+ limit: number;
2308
+ offset: number;
2309
+ }>;
2310
+ getMediaById(db: PostgresJsDatabase, id: string): Promise<{
2311
+ id: string;
2312
+ productId: string;
2313
+ dayId: string | null;
2314
+ mediaType: "image" | "video" | "document";
2315
+ name: string;
2316
+ url: string;
2317
+ storageKey: string | null;
2318
+ mimeType: string | null;
2319
+ fileSize: number | null;
2320
+ altText: string | null;
2321
+ sortOrder: number;
2322
+ isCover: boolean;
2323
+ createdAt: Date;
2324
+ updatedAt: Date;
2325
+ } | null>;
2326
+ createMedia(db: PostgresJsDatabase, productId: string, data: CreateProductMediaInput): Promise<{
2327
+ productId: string;
2328
+ name: string;
2329
+ createdAt: Date;
2330
+ updatedAt: Date;
2331
+ id: string;
2332
+ sortOrder: number;
2333
+ dayId: string | null;
2334
+ mediaType: "image" | "video" | "document";
2335
+ url: string;
2336
+ storageKey: string | null;
2337
+ mimeType: string | null;
2338
+ fileSize: number | null;
2339
+ altText: string | null;
2340
+ isCover: boolean;
2341
+ } | null>;
2342
+ updateMedia(db: PostgresJsDatabase, id: string, data: UpdateProductMediaInput): Promise<{
2343
+ id: string;
2344
+ productId: string;
2345
+ dayId: string | null;
2346
+ mediaType: "image" | "video" | "document";
2347
+ name: string;
2348
+ url: string;
2349
+ storageKey: string | null;
2350
+ mimeType: string | null;
2351
+ fileSize: number | null;
2352
+ altText: string | null;
2353
+ sortOrder: number;
2354
+ isCover: boolean;
2355
+ createdAt: Date;
2356
+ updatedAt: Date;
2357
+ } | null>;
2358
+ deleteMedia(db: PostgresJsDatabase, id: string): Promise<{
2359
+ productId: string;
2360
+ name: string;
2361
+ createdAt: Date;
2362
+ updatedAt: Date;
2363
+ id: string;
2364
+ sortOrder: number;
2365
+ dayId: string | null;
2366
+ mediaType: "image" | "video" | "document";
2367
+ url: string;
2368
+ storageKey: string | null;
2369
+ mimeType: string | null;
2370
+ fileSize: number | null;
2371
+ altText: string | null;
2372
+ isCover: boolean;
2373
+ } | null>;
2374
+ setCoverMedia(db: PostgresJsDatabase, productId: string, mediaId: string, dayId?: string | null): Promise<{
2375
+ id: string;
2376
+ productId: string;
2377
+ dayId: string | null;
2378
+ mediaType: "image" | "video" | "document";
2379
+ name: string;
2380
+ url: string;
2381
+ storageKey: string | null;
2382
+ mimeType: string | null;
2383
+ fileSize: number | null;
2384
+ altText: string | null;
2385
+ sortOrder: number;
2386
+ isCover: boolean;
2387
+ createdAt: Date;
2388
+ updatedAt: Date;
2389
+ } | null>;
2390
+ reorderMedia(db: PostgresJsDatabase, data: ReorderProductMediaInput): Promise<{
2391
+ id: string;
2392
+ }[]>;
2393
+ };
2394
+ export {};
2395
+ //# sourceMappingURL=service.d.ts.map