@voyantjs/hospitality 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,1578 @@
1
+ import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
2
+ import type { z } from "zod";
3
+ import type { housekeepingTaskListQuerySchema, insertHousekeepingTaskSchema, insertMaintenanceBlockSchema, insertMealPlanSchema, insertRatePlanInventoryOverrideSchema, insertRatePlanRoomTypeSchema, insertRatePlanSchema, insertRoomBlockSchema, insertRoomInventorySchema, insertRoomTypeBedConfigSchema, insertRoomTypeRateSchema, insertRoomTypeSchema, insertRoomUnitSchema, insertRoomUnitStatusEventSchema, insertStayBookingItemSchema, insertStayCheckpointSchema, insertStayDailyRateSchema, insertStayFolioLineSchema, insertStayFolioSchema, insertStayOperationSchema, insertStayRuleSchema, insertStayServicePostSchema, maintenanceBlockListQuerySchema, mealPlanListQuerySchema, ratePlanInventoryOverrideListQuerySchema, ratePlanListQuerySchema, ratePlanRoomTypeListQuerySchema, roomBlockListQuerySchema, roomInventoryListQuerySchema, roomTypeBedConfigListQuerySchema, roomTypeListQuerySchema, roomTypeRateListQuerySchema, roomUnitListQuerySchema, roomUnitStatusEventListQuerySchema, stayBookingItemListQuerySchema, stayCheckpointListQuerySchema, stayDailyRateListQuerySchema, stayFolioLineListQuerySchema, stayFolioListQuerySchema, stayOperationListQuerySchema, stayRuleListQuerySchema, stayServicePostListQuerySchema, updateHousekeepingTaskSchema, updateMaintenanceBlockSchema, updateMealPlanSchema, updateRatePlanInventoryOverrideSchema, updateRatePlanRoomTypeSchema, updateRatePlanSchema, updateRoomBlockSchema, updateRoomInventorySchema, updateRoomTypeBedConfigSchema, updateRoomTypeRateSchema, updateRoomTypeSchema, updateRoomUnitSchema, updateRoomUnitStatusEventSchema, updateStayBookingItemSchema, updateStayCheckpointSchema, updateStayDailyRateSchema, updateStayFolioLineSchema, updateStayFolioSchema, updateStayOperationSchema, updateStayRuleSchema, updateStayServicePostSchema } from "./validation.js";
4
+ type RoomTypeListQuery = z.infer<typeof roomTypeListQuerySchema>;
5
+ type CreateRoomTypeInput = z.infer<typeof insertRoomTypeSchema>;
6
+ type UpdateRoomTypeInput = z.infer<typeof updateRoomTypeSchema>;
7
+ type RoomTypeBedConfigListQuery = z.infer<typeof roomTypeBedConfigListQuerySchema>;
8
+ type CreateRoomTypeBedConfigInput = z.infer<typeof insertRoomTypeBedConfigSchema>;
9
+ type UpdateRoomTypeBedConfigInput = z.infer<typeof updateRoomTypeBedConfigSchema>;
10
+ type RoomUnitListQuery = z.infer<typeof roomUnitListQuerySchema>;
11
+ type CreateRoomUnitInput = z.infer<typeof insertRoomUnitSchema>;
12
+ type UpdateRoomUnitInput = z.infer<typeof updateRoomUnitSchema>;
13
+ type MealPlanListQuery = z.infer<typeof mealPlanListQuerySchema>;
14
+ type CreateMealPlanInput = z.infer<typeof insertMealPlanSchema>;
15
+ type UpdateMealPlanInput = z.infer<typeof updateMealPlanSchema>;
16
+ type RatePlanListQuery = z.infer<typeof ratePlanListQuerySchema>;
17
+ type CreateRatePlanInput = z.infer<typeof insertRatePlanSchema>;
18
+ type UpdateRatePlanInput = z.infer<typeof updateRatePlanSchema>;
19
+ type RatePlanRoomTypeListQuery = z.infer<typeof ratePlanRoomTypeListQuerySchema>;
20
+ type CreateRatePlanRoomTypeInput = z.infer<typeof insertRatePlanRoomTypeSchema>;
21
+ type UpdateRatePlanRoomTypeInput = z.infer<typeof updateRatePlanRoomTypeSchema>;
22
+ type StayRuleListQuery = z.infer<typeof stayRuleListQuerySchema>;
23
+ type CreateStayRuleInput = z.infer<typeof insertStayRuleSchema>;
24
+ type UpdateStayRuleInput = z.infer<typeof updateStayRuleSchema>;
25
+ type RoomInventoryListQuery = z.infer<typeof roomInventoryListQuerySchema>;
26
+ type CreateRoomInventoryInput = z.infer<typeof insertRoomInventorySchema>;
27
+ type UpdateRoomInventoryInput = z.infer<typeof updateRoomInventorySchema>;
28
+ type RatePlanInventoryOverrideListQuery = z.infer<typeof ratePlanInventoryOverrideListQuerySchema>;
29
+ type CreateRatePlanInventoryOverrideInput = z.infer<typeof insertRatePlanInventoryOverrideSchema>;
30
+ type UpdateRatePlanInventoryOverrideInput = z.infer<typeof updateRatePlanInventoryOverrideSchema>;
31
+ type StayBookingItemListQuery = z.infer<typeof stayBookingItemListQuerySchema>;
32
+ type CreateStayBookingItemInput = z.infer<typeof insertStayBookingItemSchema>;
33
+ type UpdateStayBookingItemInput = z.infer<typeof updateStayBookingItemSchema>;
34
+ type StayDailyRateListQuery = z.infer<typeof stayDailyRateListQuerySchema>;
35
+ type CreateStayDailyRateInput = z.infer<typeof insertStayDailyRateSchema>;
36
+ type UpdateStayDailyRateInput = z.infer<typeof updateStayDailyRateSchema>;
37
+ type RoomBlockListQuery = z.infer<typeof roomBlockListQuerySchema>;
38
+ type CreateRoomBlockInput = z.infer<typeof insertRoomBlockSchema>;
39
+ type UpdateRoomBlockInput = z.infer<typeof updateRoomBlockSchema>;
40
+ type RoomUnitStatusEventListQuery = z.infer<typeof roomUnitStatusEventListQuerySchema>;
41
+ type CreateRoomUnitStatusEventInput = z.infer<typeof insertRoomUnitStatusEventSchema>;
42
+ type UpdateRoomUnitStatusEventInput = z.infer<typeof updateRoomUnitStatusEventSchema>;
43
+ type MaintenanceBlockListQuery = z.infer<typeof maintenanceBlockListQuerySchema>;
44
+ type CreateMaintenanceBlockInput = z.infer<typeof insertMaintenanceBlockSchema>;
45
+ type UpdateMaintenanceBlockInput = z.infer<typeof updateMaintenanceBlockSchema>;
46
+ type HousekeepingTaskListQuery = z.infer<typeof housekeepingTaskListQuerySchema>;
47
+ type CreateHousekeepingTaskInput = z.infer<typeof insertHousekeepingTaskSchema>;
48
+ type UpdateHousekeepingTaskInput = z.infer<typeof updateHousekeepingTaskSchema>;
49
+ type StayOperationListQuery = z.infer<typeof stayOperationListQuerySchema>;
50
+ type CreateStayOperationInput = z.infer<typeof insertStayOperationSchema>;
51
+ type UpdateStayOperationInput = z.infer<typeof updateStayOperationSchema>;
52
+ type StayCheckpointListQuery = z.infer<typeof stayCheckpointListQuerySchema>;
53
+ type CreateStayCheckpointInput = z.infer<typeof insertStayCheckpointSchema>;
54
+ type UpdateStayCheckpointInput = z.infer<typeof updateStayCheckpointSchema>;
55
+ type StayServicePostListQuery = z.infer<typeof stayServicePostListQuerySchema>;
56
+ type CreateStayServicePostInput = z.infer<typeof insertStayServicePostSchema>;
57
+ type UpdateStayServicePostInput = z.infer<typeof updateStayServicePostSchema>;
58
+ type StayFolioListQuery = z.infer<typeof stayFolioListQuerySchema>;
59
+ type CreateStayFolioInput = z.infer<typeof insertStayFolioSchema>;
60
+ type UpdateStayFolioInput = z.infer<typeof updateStayFolioSchema>;
61
+ type RoomTypeRateListQuery = z.infer<typeof roomTypeRateListQuerySchema>;
62
+ type CreateRoomTypeRateInput = z.infer<typeof insertRoomTypeRateSchema>;
63
+ type UpdateRoomTypeRateInput = z.infer<typeof updateRoomTypeRateSchema>;
64
+ type StayFolioLineListQuery = z.infer<typeof stayFolioLineListQuerySchema>;
65
+ type CreateStayFolioLineInput = z.infer<typeof insertStayFolioLineSchema>;
66
+ type UpdateStayFolioLineInput = z.infer<typeof updateStayFolioLineSchema>;
67
+ export declare const hospitalityService: {
68
+ listRoomTypes(db: PostgresJsDatabase, query: RoomTypeListQuery): Promise<{
69
+ data: {
70
+ id: string;
71
+ propertyId: string;
72
+ code: string | null;
73
+ name: string;
74
+ description: string | null;
75
+ inventoryMode: "virtual" | "pooled" | "serialized";
76
+ roomClass: string | null;
77
+ maxAdults: number | null;
78
+ maxChildren: number | null;
79
+ maxInfants: number | null;
80
+ standardOccupancy: number | null;
81
+ maxOccupancy: number | null;
82
+ minOccupancy: number | null;
83
+ bedroomCount: number | null;
84
+ bathroomCount: number | null;
85
+ areaValue: number | null;
86
+ areaUnit: string | null;
87
+ accessibilityNotes: string | null;
88
+ smokingAllowed: boolean;
89
+ active: boolean;
90
+ sortOrder: number;
91
+ metadata: Record<string, unknown> | null;
92
+ createdAt: Date;
93
+ updatedAt: Date;
94
+ }[];
95
+ total: number;
96
+ limit: number;
97
+ offset: number;
98
+ }>;
99
+ getRoomTypeById(db: PostgresJsDatabase, id: string): Promise<{
100
+ id: string;
101
+ propertyId: string;
102
+ code: string | null;
103
+ name: string;
104
+ description: string | null;
105
+ inventoryMode: "virtual" | "pooled" | "serialized";
106
+ roomClass: string | null;
107
+ maxAdults: number | null;
108
+ maxChildren: number | null;
109
+ maxInfants: number | null;
110
+ standardOccupancy: number | null;
111
+ maxOccupancy: number | null;
112
+ minOccupancy: number | null;
113
+ bedroomCount: number | null;
114
+ bathroomCount: number | null;
115
+ areaValue: number | null;
116
+ areaUnit: string | null;
117
+ accessibilityNotes: string | null;
118
+ smokingAllowed: boolean;
119
+ active: boolean;
120
+ sortOrder: number;
121
+ metadata: Record<string, unknown> | null;
122
+ createdAt: Date;
123
+ updatedAt: Date;
124
+ } | null>;
125
+ createRoomType(db: PostgresJsDatabase, data: CreateRoomTypeInput): Promise<{
126
+ id: string;
127
+ name: string;
128
+ createdAt: Date;
129
+ updatedAt: Date;
130
+ metadata: Record<string, unknown> | null;
131
+ description: string | null;
132
+ active: boolean;
133
+ code: string | null;
134
+ sortOrder: number;
135
+ propertyId: string;
136
+ inventoryMode: "virtual" | "pooled" | "serialized";
137
+ roomClass: string | null;
138
+ maxAdults: number | null;
139
+ maxChildren: number | null;
140
+ maxInfants: number | null;
141
+ standardOccupancy: number | null;
142
+ maxOccupancy: number | null;
143
+ minOccupancy: number | null;
144
+ bedroomCount: number | null;
145
+ bathroomCount: number | null;
146
+ areaValue: number | null;
147
+ areaUnit: string | null;
148
+ accessibilityNotes: string | null;
149
+ smokingAllowed: boolean;
150
+ } | null>;
151
+ updateRoomType(db: PostgresJsDatabase, id: string, data: UpdateRoomTypeInput): Promise<{
152
+ id: string;
153
+ propertyId: string;
154
+ code: string | null;
155
+ name: string;
156
+ description: string | null;
157
+ inventoryMode: "virtual" | "pooled" | "serialized";
158
+ roomClass: string | null;
159
+ maxAdults: number | null;
160
+ maxChildren: number | null;
161
+ maxInfants: number | null;
162
+ standardOccupancy: number | null;
163
+ maxOccupancy: number | null;
164
+ minOccupancy: number | null;
165
+ bedroomCount: number | null;
166
+ bathroomCount: number | null;
167
+ areaValue: number | null;
168
+ areaUnit: string | null;
169
+ accessibilityNotes: string | null;
170
+ smokingAllowed: boolean;
171
+ active: boolean;
172
+ sortOrder: number;
173
+ metadata: Record<string, unknown> | null;
174
+ createdAt: Date;
175
+ updatedAt: Date;
176
+ } | null>;
177
+ deleteRoomType(db: PostgresJsDatabase, id: string): Promise<{
178
+ id: string;
179
+ } | null>;
180
+ listRoomTypeBedConfigs(db: PostgresJsDatabase, query: RoomTypeBedConfigListQuery): Promise<{
181
+ data: {
182
+ id: string;
183
+ roomTypeId: string;
184
+ bedType: string;
185
+ quantity: number;
186
+ isPrimary: boolean;
187
+ notes: string | null;
188
+ createdAt: Date;
189
+ updatedAt: Date;
190
+ }[];
191
+ total: number;
192
+ limit: number;
193
+ offset: number;
194
+ }>;
195
+ getRoomTypeBedConfigById(db: PostgresJsDatabase, id: string): Promise<{
196
+ id: string;
197
+ roomTypeId: string;
198
+ bedType: string;
199
+ quantity: number;
200
+ isPrimary: boolean;
201
+ notes: string | null;
202
+ createdAt: Date;
203
+ updatedAt: Date;
204
+ } | null>;
205
+ createRoomTypeBedConfig(db: PostgresJsDatabase, data: CreateRoomTypeBedConfigInput): Promise<{
206
+ id: string;
207
+ notes: string | null;
208
+ createdAt: Date;
209
+ updatedAt: Date;
210
+ isPrimary: boolean;
211
+ quantity: number;
212
+ roomTypeId: string;
213
+ bedType: string;
214
+ } | null>;
215
+ updateRoomTypeBedConfig(db: PostgresJsDatabase, id: string, data: UpdateRoomTypeBedConfigInput): Promise<{
216
+ id: string;
217
+ roomTypeId: string;
218
+ bedType: string;
219
+ quantity: number;
220
+ isPrimary: boolean;
221
+ notes: string | null;
222
+ createdAt: Date;
223
+ updatedAt: Date;
224
+ } | null>;
225
+ deleteRoomTypeBedConfig(db: PostgresJsDatabase, id: string): Promise<{
226
+ id: string;
227
+ } | null>;
228
+ listRoomUnits(db: PostgresJsDatabase, query: RoomUnitListQuery): Promise<{
229
+ data: {
230
+ id: string;
231
+ propertyId: string;
232
+ roomTypeId: string;
233
+ code: string | null;
234
+ roomNumber: string | null;
235
+ floor: string | null;
236
+ wing: string | null;
237
+ status: "active" | "inactive" | "archived" | "out_of_order";
238
+ viewCode: string | null;
239
+ accessibilityCode: string | null;
240
+ genderRestriction: string | null;
241
+ notes: string | null;
242
+ metadata: Record<string, unknown> | null;
243
+ createdAt: Date;
244
+ updatedAt: Date;
245
+ }[];
246
+ total: number;
247
+ limit: number;
248
+ offset: number;
249
+ }>;
250
+ getRoomUnitById(db: PostgresJsDatabase, id: string): Promise<{
251
+ id: string;
252
+ propertyId: string;
253
+ roomTypeId: string;
254
+ code: string | null;
255
+ roomNumber: string | null;
256
+ floor: string | null;
257
+ wing: string | null;
258
+ status: "active" | "inactive" | "archived" | "out_of_order";
259
+ viewCode: string | null;
260
+ accessibilityCode: string | null;
261
+ genderRestriction: string | null;
262
+ notes: string | null;
263
+ metadata: Record<string, unknown> | null;
264
+ createdAt: Date;
265
+ updatedAt: Date;
266
+ } | null>;
267
+ createRoomUnit(db: PostgresJsDatabase, data: CreateRoomUnitInput): Promise<{
268
+ id: string;
269
+ status: "active" | "inactive" | "archived" | "out_of_order";
270
+ notes: string | null;
271
+ createdAt: Date;
272
+ updatedAt: Date;
273
+ metadata: Record<string, unknown> | null;
274
+ code: string | null;
275
+ propertyId: string;
276
+ roomTypeId: string;
277
+ roomNumber: string | null;
278
+ floor: string | null;
279
+ wing: string | null;
280
+ viewCode: string | null;
281
+ accessibilityCode: string | null;
282
+ genderRestriction: string | null;
283
+ } | null>;
284
+ updateRoomUnit(db: PostgresJsDatabase, id: string, data: UpdateRoomUnitInput): Promise<{
285
+ id: string;
286
+ propertyId: string;
287
+ roomTypeId: string;
288
+ code: string | null;
289
+ roomNumber: string | null;
290
+ floor: string | null;
291
+ wing: string | null;
292
+ status: "active" | "inactive" | "archived" | "out_of_order";
293
+ viewCode: string | null;
294
+ accessibilityCode: string | null;
295
+ genderRestriction: string | null;
296
+ notes: string | null;
297
+ metadata: Record<string, unknown> | null;
298
+ createdAt: Date;
299
+ updatedAt: Date;
300
+ } | null>;
301
+ deleteRoomUnit(db: PostgresJsDatabase, id: string): Promise<{
302
+ id: string;
303
+ } | null>;
304
+ listMealPlans(db: PostgresJsDatabase, query: MealPlanListQuery): Promise<{
305
+ data: {
306
+ id: string;
307
+ propertyId: string;
308
+ code: string;
309
+ name: string;
310
+ description: string | null;
311
+ includesBreakfast: boolean;
312
+ includesLunch: boolean;
313
+ includesDinner: boolean;
314
+ includesDrinks: boolean;
315
+ active: boolean;
316
+ sortOrder: number;
317
+ metadata: Record<string, unknown> | null;
318
+ createdAt: Date;
319
+ updatedAt: Date;
320
+ }[];
321
+ total: number;
322
+ limit: number;
323
+ offset: number;
324
+ }>;
325
+ getMealPlanById(db: PostgresJsDatabase, id: string): Promise<{
326
+ id: string;
327
+ propertyId: string;
328
+ code: string;
329
+ name: string;
330
+ description: string | null;
331
+ includesBreakfast: boolean;
332
+ includesLunch: boolean;
333
+ includesDinner: boolean;
334
+ includesDrinks: boolean;
335
+ active: boolean;
336
+ sortOrder: number;
337
+ metadata: Record<string, unknown> | null;
338
+ createdAt: Date;
339
+ updatedAt: Date;
340
+ } | null>;
341
+ createMealPlan(db: PostgresJsDatabase, data: CreateMealPlanInput): Promise<{
342
+ id: string;
343
+ name: string;
344
+ createdAt: Date;
345
+ updatedAt: Date;
346
+ metadata: Record<string, unknown> | null;
347
+ description: string | null;
348
+ active: boolean;
349
+ code: string;
350
+ sortOrder: number;
351
+ propertyId: string;
352
+ includesBreakfast: boolean;
353
+ includesLunch: boolean;
354
+ includesDinner: boolean;
355
+ includesDrinks: boolean;
356
+ } | null>;
357
+ updateMealPlan(db: PostgresJsDatabase, id: string, data: UpdateMealPlanInput): Promise<{
358
+ id: string;
359
+ propertyId: string;
360
+ code: string;
361
+ name: string;
362
+ description: string | null;
363
+ includesBreakfast: boolean;
364
+ includesLunch: boolean;
365
+ includesDinner: boolean;
366
+ includesDrinks: boolean;
367
+ active: boolean;
368
+ sortOrder: number;
369
+ metadata: Record<string, unknown> | null;
370
+ createdAt: Date;
371
+ updatedAt: Date;
372
+ } | null>;
373
+ deleteMealPlan(db: PostgresJsDatabase, id: string): Promise<{
374
+ id: string;
375
+ } | null>;
376
+ listRatePlans(db: PostgresJsDatabase, query: RatePlanListQuery): Promise<{
377
+ data: {
378
+ id: string;
379
+ propertyId: string;
380
+ code: string;
381
+ name: string;
382
+ description: string | null;
383
+ mealPlanId: string | null;
384
+ priceCatalogId: string | null;
385
+ cancellationPolicyId: string | null;
386
+ marketId: string | null;
387
+ currencyCode: string;
388
+ chargeFrequency: "per_night" | "per_stay" | "per_person_per_night" | "per_person_per_stay";
389
+ guaranteeMode: "none" | "card_hold" | "deposit" | "full_prepay" | "on_request";
390
+ commissionable: boolean;
391
+ refundable: boolean;
392
+ active: boolean;
393
+ sortOrder: number;
394
+ metadata: Record<string, unknown> | null;
395
+ createdAt: Date;
396
+ updatedAt: Date;
397
+ }[];
398
+ total: number;
399
+ limit: number;
400
+ offset: number;
401
+ }>;
402
+ getRatePlanById(db: PostgresJsDatabase, id: string): Promise<{
403
+ id: string;
404
+ propertyId: string;
405
+ code: string;
406
+ name: string;
407
+ description: string | null;
408
+ mealPlanId: string | null;
409
+ priceCatalogId: string | null;
410
+ cancellationPolicyId: string | null;
411
+ marketId: string | null;
412
+ currencyCode: string;
413
+ chargeFrequency: "per_night" | "per_stay" | "per_person_per_night" | "per_person_per_stay";
414
+ guaranteeMode: "none" | "card_hold" | "deposit" | "full_prepay" | "on_request";
415
+ commissionable: boolean;
416
+ refundable: boolean;
417
+ active: boolean;
418
+ sortOrder: number;
419
+ metadata: Record<string, unknown> | null;
420
+ createdAt: Date;
421
+ updatedAt: Date;
422
+ } | null>;
423
+ createRatePlan(db: PostgresJsDatabase, data: CreateRatePlanInput): Promise<{
424
+ id: string;
425
+ name: string;
426
+ createdAt: Date;
427
+ updatedAt: Date;
428
+ metadata: Record<string, unknown> | null;
429
+ description: string | null;
430
+ active: boolean;
431
+ code: string;
432
+ sortOrder: number;
433
+ propertyId: string;
434
+ mealPlanId: string | null;
435
+ priceCatalogId: string | null;
436
+ cancellationPolicyId: string | null;
437
+ marketId: string | null;
438
+ currencyCode: string;
439
+ chargeFrequency: "per_night" | "per_stay" | "per_person_per_night" | "per_person_per_stay";
440
+ guaranteeMode: "none" | "card_hold" | "deposit" | "full_prepay" | "on_request";
441
+ commissionable: boolean;
442
+ refundable: boolean;
443
+ } | null>;
444
+ updateRatePlan(db: PostgresJsDatabase, id: string, data: UpdateRatePlanInput): Promise<{
445
+ id: string;
446
+ propertyId: string;
447
+ code: string;
448
+ name: string;
449
+ description: string | null;
450
+ mealPlanId: string | null;
451
+ priceCatalogId: string | null;
452
+ cancellationPolicyId: string | null;
453
+ marketId: string | null;
454
+ currencyCode: string;
455
+ chargeFrequency: "per_night" | "per_stay" | "per_person_per_night" | "per_person_per_stay";
456
+ guaranteeMode: "none" | "card_hold" | "deposit" | "full_prepay" | "on_request";
457
+ commissionable: boolean;
458
+ refundable: boolean;
459
+ active: boolean;
460
+ sortOrder: number;
461
+ metadata: Record<string, unknown> | null;
462
+ createdAt: Date;
463
+ updatedAt: Date;
464
+ } | null>;
465
+ deleteRatePlan(db: PostgresJsDatabase, id: string): Promise<{
466
+ id: string;
467
+ } | null>;
468
+ listRatePlanRoomTypes(db: PostgresJsDatabase, query: RatePlanRoomTypeListQuery): Promise<{
469
+ data: {
470
+ id: string;
471
+ ratePlanId: string;
472
+ roomTypeId: string;
473
+ productId: string | null;
474
+ optionId: string | null;
475
+ unitId: string | null;
476
+ active: boolean;
477
+ sortOrder: number;
478
+ createdAt: Date;
479
+ updatedAt: Date;
480
+ }[];
481
+ total: number;
482
+ limit: number;
483
+ offset: number;
484
+ }>;
485
+ getRatePlanRoomTypeById(db: PostgresJsDatabase, id: string): Promise<{
486
+ id: string;
487
+ ratePlanId: string;
488
+ roomTypeId: string;
489
+ productId: string | null;
490
+ optionId: string | null;
491
+ unitId: string | null;
492
+ active: boolean;
493
+ sortOrder: number;
494
+ createdAt: Date;
495
+ updatedAt: Date;
496
+ } | null>;
497
+ createRatePlanRoomType(db: PostgresJsDatabase, data: CreateRatePlanRoomTypeInput): Promise<{
498
+ id: string;
499
+ productId: string | null;
500
+ optionId: string | null;
501
+ createdAt: Date;
502
+ updatedAt: Date;
503
+ active: boolean;
504
+ sortOrder: number;
505
+ roomTypeId: string;
506
+ ratePlanId: string;
507
+ unitId: string | null;
508
+ } | null>;
509
+ updateRatePlanRoomType(db: PostgresJsDatabase, id: string, data: UpdateRatePlanRoomTypeInput): Promise<{
510
+ id: string;
511
+ ratePlanId: string;
512
+ roomTypeId: string;
513
+ productId: string | null;
514
+ optionId: string | null;
515
+ unitId: string | null;
516
+ active: boolean;
517
+ sortOrder: number;
518
+ createdAt: Date;
519
+ updatedAt: Date;
520
+ } | null>;
521
+ deleteRatePlanRoomType(db: PostgresJsDatabase, id: string): Promise<{
522
+ id: string;
523
+ } | null>;
524
+ listStayRules(db: PostgresJsDatabase, query: StayRuleListQuery): Promise<{
525
+ data: {
526
+ id: string;
527
+ propertyId: string;
528
+ ratePlanId: string | null;
529
+ roomTypeId: string | null;
530
+ validFrom: string | null;
531
+ validTo: string | null;
532
+ minNights: number | null;
533
+ maxNights: number | null;
534
+ minAdvanceDays: number | null;
535
+ maxAdvanceDays: number | null;
536
+ closedToArrival: boolean;
537
+ closedToDeparture: boolean;
538
+ arrivalWeekdays: string[] | null;
539
+ departureWeekdays: string[] | null;
540
+ releaseDays: number | null;
541
+ active: boolean;
542
+ priority: number;
543
+ notes: string | null;
544
+ metadata: Record<string, unknown> | null;
545
+ createdAt: Date;
546
+ updatedAt: Date;
547
+ }[];
548
+ total: number;
549
+ limit: number;
550
+ offset: number;
551
+ }>;
552
+ getStayRuleById(db: PostgresJsDatabase, id: string): Promise<{
553
+ id: string;
554
+ propertyId: string;
555
+ ratePlanId: string | null;
556
+ roomTypeId: string | null;
557
+ validFrom: string | null;
558
+ validTo: string | null;
559
+ minNights: number | null;
560
+ maxNights: number | null;
561
+ minAdvanceDays: number | null;
562
+ maxAdvanceDays: number | null;
563
+ closedToArrival: boolean;
564
+ closedToDeparture: boolean;
565
+ arrivalWeekdays: string[] | null;
566
+ departureWeekdays: string[] | null;
567
+ releaseDays: number | null;
568
+ active: boolean;
569
+ priority: number;
570
+ notes: string | null;
571
+ metadata: Record<string, unknown> | null;
572
+ createdAt: Date;
573
+ updatedAt: Date;
574
+ } | null>;
575
+ createStayRule(db: PostgresJsDatabase, data: CreateStayRuleInput): Promise<{
576
+ id: string;
577
+ notes: string | null;
578
+ createdAt: Date;
579
+ updatedAt: Date;
580
+ metadata: Record<string, unknown> | null;
581
+ active: boolean;
582
+ validFrom: string | null;
583
+ validTo: string | null;
584
+ propertyId: string;
585
+ roomTypeId: string | null;
586
+ ratePlanId: string | null;
587
+ minNights: number | null;
588
+ maxNights: number | null;
589
+ minAdvanceDays: number | null;
590
+ maxAdvanceDays: number | null;
591
+ closedToArrival: boolean;
592
+ closedToDeparture: boolean;
593
+ arrivalWeekdays: string[] | null;
594
+ departureWeekdays: string[] | null;
595
+ releaseDays: number | null;
596
+ priority: number;
597
+ } | null>;
598
+ updateStayRule(db: PostgresJsDatabase, id: string, data: UpdateStayRuleInput): Promise<{
599
+ id: string;
600
+ propertyId: string;
601
+ ratePlanId: string | null;
602
+ roomTypeId: string | null;
603
+ validFrom: string | null;
604
+ validTo: string | null;
605
+ minNights: number | null;
606
+ maxNights: number | null;
607
+ minAdvanceDays: number | null;
608
+ maxAdvanceDays: number | null;
609
+ closedToArrival: boolean;
610
+ closedToDeparture: boolean;
611
+ arrivalWeekdays: string[] | null;
612
+ departureWeekdays: string[] | null;
613
+ releaseDays: number | null;
614
+ active: boolean;
615
+ priority: number;
616
+ notes: string | null;
617
+ metadata: Record<string, unknown> | null;
618
+ createdAt: Date;
619
+ updatedAt: Date;
620
+ } | null>;
621
+ deleteStayRule(db: PostgresJsDatabase, id: string): Promise<{
622
+ id: string;
623
+ } | null>;
624
+ listRoomInventory(db: PostgresJsDatabase, query: RoomInventoryListQuery): Promise<{
625
+ data: {
626
+ id: string;
627
+ propertyId: string;
628
+ roomTypeId: string;
629
+ date: string;
630
+ totalUnits: number;
631
+ availableUnits: number;
632
+ heldUnits: number;
633
+ soldUnits: number;
634
+ outOfOrderUnits: number;
635
+ overbookLimit: number | null;
636
+ stopSell: boolean;
637
+ notes: string | null;
638
+ createdAt: Date;
639
+ updatedAt: Date;
640
+ }[];
641
+ total: number;
642
+ limit: number;
643
+ offset: number;
644
+ }>;
645
+ getRoomInventoryById(db: PostgresJsDatabase, id: string): Promise<{
646
+ id: string;
647
+ propertyId: string;
648
+ roomTypeId: string;
649
+ date: string;
650
+ totalUnits: number;
651
+ availableUnits: number;
652
+ heldUnits: number;
653
+ soldUnits: number;
654
+ outOfOrderUnits: number;
655
+ overbookLimit: number | null;
656
+ stopSell: boolean;
657
+ notes: string | null;
658
+ createdAt: Date;
659
+ updatedAt: Date;
660
+ } | null>;
661
+ createRoomInventory(db: PostgresJsDatabase, data: CreateRoomInventoryInput): Promise<{
662
+ id: string;
663
+ date: string;
664
+ notes: string | null;
665
+ createdAt: Date;
666
+ updatedAt: Date;
667
+ propertyId: string;
668
+ roomTypeId: string;
669
+ totalUnits: number;
670
+ availableUnits: number;
671
+ heldUnits: number;
672
+ soldUnits: number;
673
+ outOfOrderUnits: number;
674
+ overbookLimit: number | null;
675
+ stopSell: boolean;
676
+ } | null>;
677
+ updateRoomInventory(db: PostgresJsDatabase, id: string, data: UpdateRoomInventoryInput): Promise<{
678
+ id: string;
679
+ propertyId: string;
680
+ roomTypeId: string;
681
+ date: string;
682
+ totalUnits: number;
683
+ availableUnits: number;
684
+ heldUnits: number;
685
+ soldUnits: number;
686
+ outOfOrderUnits: number;
687
+ overbookLimit: number | null;
688
+ stopSell: boolean;
689
+ notes: string | null;
690
+ createdAt: Date;
691
+ updatedAt: Date;
692
+ } | null>;
693
+ deleteRoomInventory(db: PostgresJsDatabase, id: string): Promise<{
694
+ id: string;
695
+ } | null>;
696
+ listRatePlanInventoryOverrides(db: PostgresJsDatabase, query: RatePlanInventoryOverrideListQuery): Promise<{
697
+ data: {
698
+ id: string;
699
+ ratePlanId: string;
700
+ roomTypeId: string;
701
+ date: string;
702
+ stopSell: boolean;
703
+ closedToArrival: boolean;
704
+ closedToDeparture: boolean;
705
+ minNightsOverride: number | null;
706
+ maxNightsOverride: number | null;
707
+ notes: string | null;
708
+ createdAt: Date;
709
+ updatedAt: Date;
710
+ }[];
711
+ total: number;
712
+ limit: number;
713
+ offset: number;
714
+ }>;
715
+ getRatePlanInventoryOverrideById(db: PostgresJsDatabase, id: string): Promise<{
716
+ id: string;
717
+ ratePlanId: string;
718
+ roomTypeId: string;
719
+ date: string;
720
+ stopSell: boolean;
721
+ closedToArrival: boolean;
722
+ closedToDeparture: boolean;
723
+ minNightsOverride: number | null;
724
+ maxNightsOverride: number | null;
725
+ notes: string | null;
726
+ createdAt: Date;
727
+ updatedAt: Date;
728
+ } | null>;
729
+ createRatePlanInventoryOverride(db: PostgresJsDatabase, data: CreateRatePlanInventoryOverrideInput): Promise<{
730
+ id: string;
731
+ date: string;
732
+ notes: string | null;
733
+ createdAt: Date;
734
+ updatedAt: Date;
735
+ roomTypeId: string;
736
+ ratePlanId: string;
737
+ closedToArrival: boolean;
738
+ closedToDeparture: boolean;
739
+ stopSell: boolean;
740
+ minNightsOverride: number | null;
741
+ maxNightsOverride: number | null;
742
+ } | null>;
743
+ updateRatePlanInventoryOverride(db: PostgresJsDatabase, id: string, data: UpdateRatePlanInventoryOverrideInput): Promise<{
744
+ id: string;
745
+ ratePlanId: string;
746
+ roomTypeId: string;
747
+ date: string;
748
+ stopSell: boolean;
749
+ closedToArrival: boolean;
750
+ closedToDeparture: boolean;
751
+ minNightsOverride: number | null;
752
+ maxNightsOverride: number | null;
753
+ notes: string | null;
754
+ createdAt: Date;
755
+ updatedAt: Date;
756
+ } | null>;
757
+ deleteRatePlanInventoryOverride(db: PostgresJsDatabase, id: string): Promise<{
758
+ id: string;
759
+ } | null>;
760
+ listRoomTypeRates(db: PostgresJsDatabase, query: RoomTypeRateListQuery): Promise<{
761
+ data: {
762
+ id: string;
763
+ ratePlanId: string;
764
+ roomTypeId: string;
765
+ priceScheduleId: string | null;
766
+ currencyCode: string;
767
+ baseAmountCents: number | null;
768
+ extraAdultAmountCents: number | null;
769
+ extraChildAmountCents: number | null;
770
+ extraInfantAmountCents: number | null;
771
+ active: boolean;
772
+ notes: string | null;
773
+ createdAt: Date;
774
+ updatedAt: Date;
775
+ }[];
776
+ total: number;
777
+ limit: number;
778
+ offset: number;
779
+ }>;
780
+ getRoomTypeRateById(db: PostgresJsDatabase, id: string): Promise<{
781
+ id: string;
782
+ ratePlanId: string;
783
+ roomTypeId: string;
784
+ priceScheduleId: string | null;
785
+ currencyCode: string;
786
+ baseAmountCents: number | null;
787
+ extraAdultAmountCents: number | null;
788
+ extraChildAmountCents: number | null;
789
+ extraInfantAmountCents: number | null;
790
+ active: boolean;
791
+ notes: string | null;
792
+ createdAt: Date;
793
+ updatedAt: Date;
794
+ } | null>;
795
+ createRoomTypeRate(db: PostgresJsDatabase, data: CreateRoomTypeRateInput): Promise<{
796
+ id: string;
797
+ notes: string | null;
798
+ createdAt: Date;
799
+ updatedAt: Date;
800
+ active: boolean;
801
+ roomTypeId: string;
802
+ currencyCode: string;
803
+ ratePlanId: string;
804
+ priceScheduleId: string | null;
805
+ baseAmountCents: number | null;
806
+ extraAdultAmountCents: number | null;
807
+ extraChildAmountCents: number | null;
808
+ extraInfantAmountCents: number | null;
809
+ } | null>;
810
+ updateRoomTypeRate(db: PostgresJsDatabase, id: string, data: UpdateRoomTypeRateInput): Promise<{
811
+ id: string;
812
+ ratePlanId: string;
813
+ roomTypeId: string;
814
+ priceScheduleId: string | null;
815
+ currencyCode: string;
816
+ baseAmountCents: number | null;
817
+ extraAdultAmountCents: number | null;
818
+ extraChildAmountCents: number | null;
819
+ extraInfantAmountCents: number | null;
820
+ active: boolean;
821
+ notes: string | null;
822
+ createdAt: Date;
823
+ updatedAt: Date;
824
+ } | null>;
825
+ deleteRoomTypeRate(db: PostgresJsDatabase, id: string): Promise<{
826
+ id: string;
827
+ } | null>;
828
+ listStayBookingItems(db: PostgresJsDatabase, query: StayBookingItemListQuery): Promise<{
829
+ data: {
830
+ id: string;
831
+ bookingItemId: string;
832
+ propertyId: string;
833
+ roomTypeId: string;
834
+ roomUnitId: string | null;
835
+ ratePlanId: string;
836
+ checkInDate: string;
837
+ checkOutDate: string;
838
+ nightCount: number;
839
+ roomCount: number;
840
+ adults: number;
841
+ children: number;
842
+ infants: number;
843
+ mealPlanId: string | null;
844
+ confirmationCode: string | null;
845
+ voucherCode: string | null;
846
+ status: "cancelled" | "reserved" | "checked_in" | "checked_out" | "no_show";
847
+ notes: string | null;
848
+ metadata: Record<string, unknown> | null;
849
+ createdAt: Date;
850
+ updatedAt: Date;
851
+ }[];
852
+ total: number;
853
+ limit: number;
854
+ offset: number;
855
+ }>;
856
+ getStayBookingItemById(db: PostgresJsDatabase, id: string): Promise<{
857
+ id: string;
858
+ bookingItemId: string;
859
+ propertyId: string;
860
+ roomTypeId: string;
861
+ roomUnitId: string | null;
862
+ ratePlanId: string;
863
+ checkInDate: string;
864
+ checkOutDate: string;
865
+ nightCount: number;
866
+ roomCount: number;
867
+ adults: number;
868
+ children: number;
869
+ infants: number;
870
+ mealPlanId: string | null;
871
+ confirmationCode: string | null;
872
+ voucherCode: string | null;
873
+ status: "cancelled" | "reserved" | "checked_in" | "checked_out" | "no_show";
874
+ notes: string | null;
875
+ metadata: Record<string, unknown> | null;
876
+ createdAt: Date;
877
+ updatedAt: Date;
878
+ } | null>;
879
+ createStayBookingItem(db: PostgresJsDatabase, data: CreateStayBookingItemInput): Promise<{
880
+ id: string;
881
+ status: "cancelled" | "reserved" | "checked_in" | "checked_out" | "no_show";
882
+ notes: string | null;
883
+ createdAt: Date;
884
+ updatedAt: Date;
885
+ metadata: Record<string, unknown> | null;
886
+ bookingItemId: string;
887
+ propertyId: string;
888
+ roomTypeId: string;
889
+ mealPlanId: string | null;
890
+ ratePlanId: string;
891
+ roomUnitId: string | null;
892
+ checkInDate: string;
893
+ checkOutDate: string;
894
+ nightCount: number;
895
+ roomCount: number;
896
+ adults: number;
897
+ children: number;
898
+ infants: number;
899
+ confirmationCode: string | null;
900
+ voucherCode: string | null;
901
+ } | null>;
902
+ updateStayBookingItem(db: PostgresJsDatabase, id: string, data: UpdateStayBookingItemInput): Promise<{
903
+ id: string;
904
+ bookingItemId: string;
905
+ propertyId: string;
906
+ roomTypeId: string;
907
+ roomUnitId: string | null;
908
+ ratePlanId: string;
909
+ checkInDate: string;
910
+ checkOutDate: string;
911
+ nightCount: number;
912
+ roomCount: number;
913
+ adults: number;
914
+ children: number;
915
+ infants: number;
916
+ mealPlanId: string | null;
917
+ confirmationCode: string | null;
918
+ voucherCode: string | null;
919
+ status: "cancelled" | "reserved" | "checked_in" | "checked_out" | "no_show";
920
+ notes: string | null;
921
+ metadata: Record<string, unknown> | null;
922
+ createdAt: Date;
923
+ updatedAt: Date;
924
+ } | null>;
925
+ deleteStayBookingItem(db: PostgresJsDatabase, id: string): Promise<{
926
+ id: string;
927
+ } | null>;
928
+ listStayDailyRates(db: PostgresJsDatabase, query: StayDailyRateListQuery): Promise<{
929
+ data: {
930
+ id: string;
931
+ stayBookingItemId: string;
932
+ date: string;
933
+ sellCurrency: string;
934
+ sellAmountCents: number | null;
935
+ costCurrency: string | null;
936
+ costAmountCents: number | null;
937
+ taxAmountCents: number | null;
938
+ feeAmountCents: number | null;
939
+ commissionAmountCents: number | null;
940
+ createdAt: Date;
941
+ updatedAt: Date;
942
+ }[];
943
+ total: number;
944
+ limit: number;
945
+ offset: number;
946
+ }>;
947
+ getStayDailyRateById(db: PostgresJsDatabase, id: string): Promise<{
948
+ id: string;
949
+ stayBookingItemId: string;
950
+ date: string;
951
+ sellCurrency: string;
952
+ sellAmountCents: number | null;
953
+ costCurrency: string | null;
954
+ costAmountCents: number | null;
955
+ taxAmountCents: number | null;
956
+ feeAmountCents: number | null;
957
+ commissionAmountCents: number | null;
958
+ createdAt: Date;
959
+ updatedAt: Date;
960
+ } | null>;
961
+ createStayDailyRate(db: PostgresJsDatabase, data: CreateStayDailyRateInput): Promise<{
962
+ id: string;
963
+ date: string;
964
+ createdAt: Date;
965
+ updatedAt: Date;
966
+ sellCurrency: string;
967
+ sellAmountCents: number | null;
968
+ costAmountCents: number | null;
969
+ costCurrency: string | null;
970
+ stayBookingItemId: string;
971
+ taxAmountCents: number | null;
972
+ feeAmountCents: number | null;
973
+ commissionAmountCents: number | null;
974
+ } | null>;
975
+ updateStayDailyRate(db: PostgresJsDatabase, id: string, data: UpdateStayDailyRateInput): Promise<{
976
+ id: string;
977
+ stayBookingItemId: string;
978
+ date: string;
979
+ sellCurrency: string;
980
+ sellAmountCents: number | null;
981
+ costCurrency: string | null;
982
+ costAmountCents: number | null;
983
+ taxAmountCents: number | null;
984
+ feeAmountCents: number | null;
985
+ commissionAmountCents: number | null;
986
+ createdAt: Date;
987
+ updatedAt: Date;
988
+ } | null>;
989
+ deleteStayDailyRate(db: PostgresJsDatabase, id: string): Promise<{
990
+ id: string;
991
+ } | null>;
992
+ listRoomBlocks(db: PostgresJsDatabase, query: RoomBlockListQuery): Promise<{
993
+ data: {
994
+ id: string;
995
+ propertyId: string;
996
+ roomTypeId: string | null;
997
+ roomUnitId: string | null;
998
+ startsOn: string;
999
+ endsOn: string;
1000
+ status: "cancelled" | "draft" | "confirmed" | "held" | "released";
1001
+ blockReason: string | null;
1002
+ quantity: number;
1003
+ releaseAt: Date | null;
1004
+ notes: string | null;
1005
+ metadata: Record<string, unknown> | null;
1006
+ createdAt: Date;
1007
+ updatedAt: Date;
1008
+ }[];
1009
+ total: number;
1010
+ limit: number;
1011
+ offset: number;
1012
+ }>;
1013
+ getRoomBlockById(db: PostgresJsDatabase, id: string): Promise<{
1014
+ id: string;
1015
+ propertyId: string;
1016
+ roomTypeId: string | null;
1017
+ roomUnitId: string | null;
1018
+ startsOn: string;
1019
+ endsOn: string;
1020
+ status: "cancelled" | "draft" | "confirmed" | "held" | "released";
1021
+ blockReason: string | null;
1022
+ quantity: number;
1023
+ releaseAt: Date | null;
1024
+ notes: string | null;
1025
+ metadata: Record<string, unknown> | null;
1026
+ createdAt: Date;
1027
+ updatedAt: Date;
1028
+ } | null>;
1029
+ createRoomBlock(db: PostgresJsDatabase, data: CreateRoomBlockInput): Promise<{
1030
+ id: string;
1031
+ status: "cancelled" | "draft" | "confirmed" | "held" | "released";
1032
+ notes: string | null;
1033
+ createdAt: Date;
1034
+ updatedAt: Date;
1035
+ metadata: Record<string, unknown> | null;
1036
+ quantity: number;
1037
+ propertyId: string;
1038
+ roomTypeId: string | null;
1039
+ roomUnitId: string | null;
1040
+ startsOn: string;
1041
+ endsOn: string;
1042
+ blockReason: string | null;
1043
+ releaseAt: Date | null;
1044
+ } | null>;
1045
+ updateRoomBlock(db: PostgresJsDatabase, id: string, data: UpdateRoomBlockInput): Promise<{
1046
+ id: string;
1047
+ propertyId: string;
1048
+ roomTypeId: string | null;
1049
+ roomUnitId: string | null;
1050
+ startsOn: string;
1051
+ endsOn: string;
1052
+ status: "cancelled" | "draft" | "confirmed" | "held" | "released";
1053
+ blockReason: string | null;
1054
+ quantity: number;
1055
+ releaseAt: Date | null;
1056
+ notes: string | null;
1057
+ metadata: Record<string, unknown> | null;
1058
+ createdAt: Date;
1059
+ updatedAt: Date;
1060
+ } | null>;
1061
+ deleteRoomBlock(db: PostgresJsDatabase, id: string): Promise<{
1062
+ id: string;
1063
+ } | null>;
1064
+ listRoomUnitStatusEvents(db: PostgresJsDatabase, query: RoomUnitStatusEventListQuery): Promise<{
1065
+ data: {
1066
+ id: string;
1067
+ roomUnitId: string;
1068
+ statusCode: string;
1069
+ housekeepingStatus: string | null;
1070
+ effectiveFrom: Date;
1071
+ effectiveTo: Date | null;
1072
+ notes: string | null;
1073
+ metadata: Record<string, unknown> | null;
1074
+ createdAt: Date;
1075
+ }[];
1076
+ total: number;
1077
+ limit: number;
1078
+ offset: number;
1079
+ }>;
1080
+ getRoomUnitStatusEventById(db: PostgresJsDatabase, id: string): Promise<{
1081
+ id: string;
1082
+ roomUnitId: string;
1083
+ statusCode: string;
1084
+ housekeepingStatus: string | null;
1085
+ effectiveFrom: Date;
1086
+ effectiveTo: Date | null;
1087
+ notes: string | null;
1088
+ metadata: Record<string, unknown> | null;
1089
+ createdAt: Date;
1090
+ } | null>;
1091
+ createRoomUnitStatusEvent(db: PostgresJsDatabase, data: CreateRoomUnitStatusEventInput): Promise<{
1092
+ id: string;
1093
+ notes: string | null;
1094
+ createdAt: Date;
1095
+ metadata: Record<string, unknown> | null;
1096
+ roomUnitId: string;
1097
+ statusCode: string;
1098
+ housekeepingStatus: string | null;
1099
+ effectiveFrom: Date;
1100
+ effectiveTo: Date | null;
1101
+ } | null>;
1102
+ updateRoomUnitStatusEvent(db: PostgresJsDatabase, id: string, data: UpdateRoomUnitStatusEventInput): Promise<{
1103
+ id: string;
1104
+ roomUnitId: string;
1105
+ statusCode: string;
1106
+ housekeepingStatus: string | null;
1107
+ effectiveFrom: Date;
1108
+ effectiveTo: Date | null;
1109
+ notes: string | null;
1110
+ metadata: Record<string, unknown> | null;
1111
+ createdAt: Date;
1112
+ } | null>;
1113
+ deleteRoomUnitStatusEvent(db: PostgresJsDatabase, id: string): Promise<{
1114
+ id: string;
1115
+ } | null>;
1116
+ listMaintenanceBlocks(db: PostgresJsDatabase, query: MaintenanceBlockListQuery): Promise<{
1117
+ data: {
1118
+ id: string;
1119
+ propertyId: string;
1120
+ roomTypeId: string | null;
1121
+ roomUnitId: string | null;
1122
+ startsOn: string;
1123
+ endsOn: string;
1124
+ status: "open" | "cancelled" | "in_progress" | "resolved";
1125
+ reason: string | null;
1126
+ notes: string | null;
1127
+ metadata: Record<string, unknown> | null;
1128
+ createdAt: Date;
1129
+ updatedAt: Date;
1130
+ }[];
1131
+ total: number;
1132
+ limit: number;
1133
+ offset: number;
1134
+ }>;
1135
+ getMaintenanceBlockById(db: PostgresJsDatabase, id: string): Promise<{
1136
+ id: string;
1137
+ propertyId: string;
1138
+ roomTypeId: string | null;
1139
+ roomUnitId: string | null;
1140
+ startsOn: string;
1141
+ endsOn: string;
1142
+ status: "open" | "cancelled" | "in_progress" | "resolved";
1143
+ reason: string | null;
1144
+ notes: string | null;
1145
+ metadata: Record<string, unknown> | null;
1146
+ createdAt: Date;
1147
+ updatedAt: Date;
1148
+ } | null>;
1149
+ createMaintenanceBlock(db: PostgresJsDatabase, data: CreateMaintenanceBlockInput): Promise<{
1150
+ id: string;
1151
+ status: "open" | "cancelled" | "in_progress" | "resolved";
1152
+ notes: string | null;
1153
+ createdAt: Date;
1154
+ updatedAt: Date;
1155
+ reason: string | null;
1156
+ metadata: Record<string, unknown> | null;
1157
+ propertyId: string;
1158
+ roomTypeId: string | null;
1159
+ roomUnitId: string | null;
1160
+ startsOn: string;
1161
+ endsOn: string;
1162
+ } | null>;
1163
+ updateMaintenanceBlock(db: PostgresJsDatabase, id: string, data: UpdateMaintenanceBlockInput): Promise<{
1164
+ id: string;
1165
+ propertyId: string;
1166
+ roomTypeId: string | null;
1167
+ roomUnitId: string | null;
1168
+ startsOn: string;
1169
+ endsOn: string;
1170
+ status: "open" | "cancelled" | "in_progress" | "resolved";
1171
+ reason: string | null;
1172
+ notes: string | null;
1173
+ metadata: Record<string, unknown> | null;
1174
+ createdAt: Date;
1175
+ updatedAt: Date;
1176
+ } | null>;
1177
+ deleteMaintenanceBlock(db: PostgresJsDatabase, id: string): Promise<{
1178
+ id: string;
1179
+ } | null>;
1180
+ listHousekeepingTasks(db: PostgresJsDatabase, query: HousekeepingTaskListQuery): Promise<{
1181
+ data: {
1182
+ id: string;
1183
+ propertyId: string;
1184
+ roomUnitId: string;
1185
+ stayBookingItemId: string | null;
1186
+ taskType: string;
1187
+ status: "open" | "cancelled" | "in_progress" | "completed";
1188
+ priority: number;
1189
+ dueAt: Date | null;
1190
+ startedAt: Date | null;
1191
+ completedAt: Date | null;
1192
+ assignedTo: string | null;
1193
+ notes: string | null;
1194
+ metadata: Record<string, unknown> | null;
1195
+ createdAt: Date;
1196
+ updatedAt: Date;
1197
+ }[];
1198
+ total: number;
1199
+ limit: number;
1200
+ offset: number;
1201
+ }>;
1202
+ getHousekeepingTaskById(db: PostgresJsDatabase, id: string): Promise<{
1203
+ id: string;
1204
+ propertyId: string;
1205
+ roomUnitId: string;
1206
+ stayBookingItemId: string | null;
1207
+ taskType: string;
1208
+ status: "open" | "cancelled" | "in_progress" | "completed";
1209
+ priority: number;
1210
+ dueAt: Date | null;
1211
+ startedAt: Date | null;
1212
+ completedAt: Date | null;
1213
+ assignedTo: string | null;
1214
+ notes: string | null;
1215
+ metadata: Record<string, unknown> | null;
1216
+ createdAt: Date;
1217
+ updatedAt: Date;
1218
+ } | null>;
1219
+ createHousekeepingTask(db: PostgresJsDatabase, data: CreateHousekeepingTaskInput): Promise<{
1220
+ id: string;
1221
+ status: "open" | "cancelled" | "in_progress" | "completed";
1222
+ notes: string | null;
1223
+ createdAt: Date;
1224
+ updatedAt: Date;
1225
+ completedAt: Date | null;
1226
+ metadata: Record<string, unknown> | null;
1227
+ propertyId: string;
1228
+ priority: number;
1229
+ roomUnitId: string;
1230
+ stayBookingItemId: string | null;
1231
+ taskType: string;
1232
+ dueAt: Date | null;
1233
+ startedAt: Date | null;
1234
+ assignedTo: string | null;
1235
+ } | null>;
1236
+ updateHousekeepingTask(db: PostgresJsDatabase, id: string, data: UpdateHousekeepingTaskInput): Promise<{
1237
+ id: string;
1238
+ propertyId: string;
1239
+ roomUnitId: string;
1240
+ stayBookingItemId: string | null;
1241
+ taskType: string;
1242
+ status: "open" | "cancelled" | "in_progress" | "completed";
1243
+ priority: number;
1244
+ dueAt: Date | null;
1245
+ startedAt: Date | null;
1246
+ completedAt: Date | null;
1247
+ assignedTo: string | null;
1248
+ notes: string | null;
1249
+ metadata: Record<string, unknown> | null;
1250
+ createdAt: Date;
1251
+ updatedAt: Date;
1252
+ } | null>;
1253
+ deleteHousekeepingTask(db: PostgresJsDatabase, id: string): Promise<{
1254
+ id: string;
1255
+ } | null>;
1256
+ listStayOperations(db: PostgresJsDatabase, query: StayOperationListQuery): Promise<{
1257
+ data: {
1258
+ id: string;
1259
+ stayBookingItemId: string;
1260
+ propertyId: string;
1261
+ roomUnitId: string | null;
1262
+ operationStatus: "cancelled" | "reserved" | "checked_in" | "checked_out" | "no_show" | "expected_arrival";
1263
+ expectedArrivalAt: Date | null;
1264
+ expectedDepartureAt: Date | null;
1265
+ checkedInAt: Date | null;
1266
+ checkedOutAt: Date | null;
1267
+ noShowRecordedAt: Date | null;
1268
+ notes: string | null;
1269
+ metadata: Record<string, unknown> | null;
1270
+ createdAt: Date;
1271
+ updatedAt: Date;
1272
+ }[];
1273
+ total: number;
1274
+ limit: number;
1275
+ offset: number;
1276
+ }>;
1277
+ getStayOperationById(db: PostgresJsDatabase, id: string): Promise<{
1278
+ id: string;
1279
+ stayBookingItemId: string;
1280
+ propertyId: string;
1281
+ roomUnitId: string | null;
1282
+ operationStatus: "cancelled" | "reserved" | "checked_in" | "checked_out" | "no_show" | "expected_arrival";
1283
+ expectedArrivalAt: Date | null;
1284
+ expectedDepartureAt: Date | null;
1285
+ checkedInAt: Date | null;
1286
+ checkedOutAt: Date | null;
1287
+ noShowRecordedAt: Date | null;
1288
+ notes: string | null;
1289
+ metadata: Record<string, unknown> | null;
1290
+ createdAt: Date;
1291
+ updatedAt: Date;
1292
+ } | null>;
1293
+ createStayOperation(db: PostgresJsDatabase, data: CreateStayOperationInput): Promise<{
1294
+ id: string;
1295
+ notes: string | null;
1296
+ createdAt: Date;
1297
+ updatedAt: Date;
1298
+ metadata: Record<string, unknown> | null;
1299
+ propertyId: string;
1300
+ roomUnitId: string | null;
1301
+ stayBookingItemId: string;
1302
+ operationStatus: "cancelled" | "reserved" | "checked_in" | "checked_out" | "no_show" | "expected_arrival";
1303
+ expectedArrivalAt: Date | null;
1304
+ expectedDepartureAt: Date | null;
1305
+ checkedInAt: Date | null;
1306
+ checkedOutAt: Date | null;
1307
+ noShowRecordedAt: Date | null;
1308
+ } | null>;
1309
+ updateStayOperation(db: PostgresJsDatabase, id: string, data: UpdateStayOperationInput): Promise<{
1310
+ id: string;
1311
+ stayBookingItemId: string;
1312
+ propertyId: string;
1313
+ roomUnitId: string | null;
1314
+ operationStatus: "cancelled" | "reserved" | "checked_in" | "checked_out" | "no_show" | "expected_arrival";
1315
+ expectedArrivalAt: Date | null;
1316
+ expectedDepartureAt: Date | null;
1317
+ checkedInAt: Date | null;
1318
+ checkedOutAt: Date | null;
1319
+ noShowRecordedAt: Date | null;
1320
+ notes: string | null;
1321
+ metadata: Record<string, unknown> | null;
1322
+ createdAt: Date;
1323
+ updatedAt: Date;
1324
+ } | null>;
1325
+ deleteStayOperation(db: PostgresJsDatabase, id: string): Promise<{
1326
+ id: string;
1327
+ } | null>;
1328
+ listStayCheckpoints(db: PostgresJsDatabase, query: StayCheckpointListQuery): Promise<{
1329
+ data: {
1330
+ id: string;
1331
+ stayOperationId: string;
1332
+ checkpointType: "no_show" | "arrival" | "room_assigned" | "check_in" | "room_move" | "charge_posted" | "check_out" | "note";
1333
+ occurredAt: Date;
1334
+ roomUnitId: string | null;
1335
+ notes: string | null;
1336
+ metadata: Record<string, unknown> | null;
1337
+ createdAt: Date;
1338
+ }[];
1339
+ total: number;
1340
+ limit: number;
1341
+ offset: number;
1342
+ }>;
1343
+ getStayCheckpointById(db: PostgresJsDatabase, id: string): Promise<{
1344
+ id: string;
1345
+ stayOperationId: string;
1346
+ checkpointType: "no_show" | "arrival" | "room_assigned" | "check_in" | "room_move" | "charge_posted" | "check_out" | "note";
1347
+ occurredAt: Date;
1348
+ roomUnitId: string | null;
1349
+ notes: string | null;
1350
+ metadata: Record<string, unknown> | null;
1351
+ createdAt: Date;
1352
+ } | null>;
1353
+ createStayCheckpoint(db: PostgresJsDatabase, data: CreateStayCheckpointInput): Promise<{
1354
+ id: string;
1355
+ notes: string | null;
1356
+ createdAt: Date;
1357
+ metadata: Record<string, unknown> | null;
1358
+ roomUnitId: string | null;
1359
+ stayOperationId: string;
1360
+ checkpointType: "no_show" | "arrival" | "room_assigned" | "check_in" | "room_move" | "charge_posted" | "check_out" | "note";
1361
+ occurredAt: Date;
1362
+ } | null>;
1363
+ updateStayCheckpoint(db: PostgresJsDatabase, id: string, data: UpdateStayCheckpointInput): Promise<{
1364
+ id: string;
1365
+ stayOperationId: string;
1366
+ checkpointType: "no_show" | "arrival" | "room_assigned" | "check_in" | "room_move" | "charge_posted" | "check_out" | "note";
1367
+ occurredAt: Date;
1368
+ roomUnitId: string | null;
1369
+ notes: string | null;
1370
+ metadata: Record<string, unknown> | null;
1371
+ createdAt: Date;
1372
+ } | null>;
1373
+ deleteStayCheckpoint(db: PostgresJsDatabase, id: string): Promise<{
1374
+ id: string;
1375
+ } | null>;
1376
+ listStayServicePosts(db: PostgresJsDatabase, query: StayServicePostListQuery): Promise<{
1377
+ data: {
1378
+ id: string;
1379
+ stayOperationId: string;
1380
+ bookingItemId: string | null;
1381
+ serviceDate: string;
1382
+ kind: "other" | "fee" | "adjustment" | "lodging" | "meal" | "minibar";
1383
+ description: string;
1384
+ quantity: number;
1385
+ currencyCode: string;
1386
+ sellAmountCents: number;
1387
+ costAmountCents: number | null;
1388
+ notes: string | null;
1389
+ metadata: Record<string, unknown> | null;
1390
+ createdAt: Date;
1391
+ updatedAt: Date;
1392
+ }[];
1393
+ total: number;
1394
+ limit: number;
1395
+ offset: number;
1396
+ }>;
1397
+ getStayServicePostById(db: PostgresJsDatabase, id: string): Promise<{
1398
+ id: string;
1399
+ stayOperationId: string;
1400
+ bookingItemId: string | null;
1401
+ serviceDate: string;
1402
+ kind: "other" | "fee" | "adjustment" | "lodging" | "meal" | "minibar";
1403
+ description: string;
1404
+ quantity: number;
1405
+ currencyCode: string;
1406
+ sellAmountCents: number;
1407
+ costAmountCents: number | null;
1408
+ notes: string | null;
1409
+ metadata: Record<string, unknown> | null;
1410
+ createdAt: Date;
1411
+ updatedAt: Date;
1412
+ } | null>;
1413
+ createStayServicePost(db: PostgresJsDatabase, data: CreateStayServicePostInput): Promise<{
1414
+ id: string;
1415
+ notes: string | null;
1416
+ createdAt: Date;
1417
+ updatedAt: Date;
1418
+ sellAmountCents: number;
1419
+ costAmountCents: number | null;
1420
+ metadata: Record<string, unknown> | null;
1421
+ description: string;
1422
+ serviceDate: string;
1423
+ quantity: number;
1424
+ bookingItemId: string | null;
1425
+ kind: "other" | "fee" | "adjustment" | "lodging" | "meal" | "minibar";
1426
+ currencyCode: string;
1427
+ stayOperationId: string;
1428
+ } | null>;
1429
+ updateStayServicePost(db: PostgresJsDatabase, id: string, data: UpdateStayServicePostInput): Promise<{
1430
+ id: string;
1431
+ stayOperationId: string;
1432
+ bookingItemId: string | null;
1433
+ serviceDate: string;
1434
+ kind: "other" | "fee" | "adjustment" | "lodging" | "meal" | "minibar";
1435
+ description: string;
1436
+ quantity: number;
1437
+ currencyCode: string;
1438
+ sellAmountCents: number;
1439
+ costAmountCents: number | null;
1440
+ notes: string | null;
1441
+ metadata: Record<string, unknown> | null;
1442
+ createdAt: Date;
1443
+ updatedAt: Date;
1444
+ } | null>;
1445
+ deleteStayServicePost(db: PostgresJsDatabase, id: string): Promise<{
1446
+ id: string;
1447
+ } | null>;
1448
+ listStayFolios(db: PostgresJsDatabase, query: StayFolioListQuery): Promise<{
1449
+ data: {
1450
+ id: string;
1451
+ stayOperationId: string;
1452
+ currencyCode: string;
1453
+ status: "open" | "closed" | "transferred" | "void";
1454
+ openedAt: Date;
1455
+ closedAt: Date | null;
1456
+ notes: string | null;
1457
+ metadata: Record<string, unknown> | null;
1458
+ createdAt: Date;
1459
+ updatedAt: Date;
1460
+ }[];
1461
+ total: number;
1462
+ limit: number;
1463
+ offset: number;
1464
+ }>;
1465
+ getStayFolioById(db: PostgresJsDatabase, id: string): Promise<{
1466
+ id: string;
1467
+ stayOperationId: string;
1468
+ currencyCode: string;
1469
+ status: "open" | "closed" | "transferred" | "void";
1470
+ openedAt: Date;
1471
+ closedAt: Date | null;
1472
+ notes: string | null;
1473
+ metadata: Record<string, unknown> | null;
1474
+ createdAt: Date;
1475
+ updatedAt: Date;
1476
+ } | null>;
1477
+ createStayFolio(db: PostgresJsDatabase, data: CreateStayFolioInput): Promise<{
1478
+ id: string;
1479
+ status: "open" | "closed" | "transferred" | "void";
1480
+ notes: string | null;
1481
+ createdAt: Date;
1482
+ updatedAt: Date;
1483
+ metadata: Record<string, unknown> | null;
1484
+ currencyCode: string;
1485
+ stayOperationId: string;
1486
+ openedAt: Date;
1487
+ closedAt: Date | null;
1488
+ } | null>;
1489
+ updateStayFolio(db: PostgresJsDatabase, id: string, data: UpdateStayFolioInput): Promise<{
1490
+ id: string;
1491
+ stayOperationId: string;
1492
+ currencyCode: string;
1493
+ status: "open" | "closed" | "transferred" | "void";
1494
+ openedAt: Date;
1495
+ closedAt: Date | null;
1496
+ notes: string | null;
1497
+ metadata: Record<string, unknown> | null;
1498
+ createdAt: Date;
1499
+ updatedAt: Date;
1500
+ } | null>;
1501
+ deleteStayFolio(db: PostgresJsDatabase, id: string): Promise<{
1502
+ id: string;
1503
+ } | null>;
1504
+ listStayFolioLines(db: PostgresJsDatabase, query: StayFolioLineListQuery): Promise<{
1505
+ data: {
1506
+ id: string;
1507
+ stayFolioId: string;
1508
+ servicePostId: string | null;
1509
+ postedAt: Date;
1510
+ lineType: string;
1511
+ description: string;
1512
+ quantity: number;
1513
+ amountCents: number;
1514
+ taxAmountCents: number | null;
1515
+ feeAmountCents: number | null;
1516
+ notes: string | null;
1517
+ metadata: Record<string, unknown> | null;
1518
+ createdAt: Date;
1519
+ updatedAt: Date;
1520
+ }[];
1521
+ total: number;
1522
+ limit: number;
1523
+ offset: number;
1524
+ }>;
1525
+ getStayFolioLineById(db: PostgresJsDatabase, id: string): Promise<{
1526
+ id: string;
1527
+ stayFolioId: string;
1528
+ servicePostId: string | null;
1529
+ postedAt: Date;
1530
+ lineType: string;
1531
+ description: string;
1532
+ quantity: number;
1533
+ amountCents: number;
1534
+ taxAmountCents: number | null;
1535
+ feeAmountCents: number | null;
1536
+ notes: string | null;
1537
+ metadata: Record<string, unknown> | null;
1538
+ createdAt: Date;
1539
+ updatedAt: Date;
1540
+ } | null>;
1541
+ createStayFolioLine(db: PostgresJsDatabase, data: CreateStayFolioLineInput): Promise<{
1542
+ id: string;
1543
+ notes: string | null;
1544
+ createdAt: Date;
1545
+ updatedAt: Date;
1546
+ metadata: Record<string, unknown> | null;
1547
+ description: string;
1548
+ quantity: number;
1549
+ taxAmountCents: number | null;
1550
+ feeAmountCents: number | null;
1551
+ stayFolioId: string;
1552
+ servicePostId: string | null;
1553
+ postedAt: Date;
1554
+ lineType: string;
1555
+ amountCents: number;
1556
+ } | null>;
1557
+ updateStayFolioLine(db: PostgresJsDatabase, id: string, data: UpdateStayFolioLineInput): Promise<{
1558
+ id: string;
1559
+ stayFolioId: string;
1560
+ servicePostId: string | null;
1561
+ postedAt: Date;
1562
+ lineType: string;
1563
+ description: string;
1564
+ quantity: number;
1565
+ amountCents: number;
1566
+ taxAmountCents: number | null;
1567
+ feeAmountCents: number | null;
1568
+ notes: string | null;
1569
+ metadata: Record<string, unknown> | null;
1570
+ createdAt: Date;
1571
+ updatedAt: Date;
1572
+ } | null>;
1573
+ deleteStayFolioLine(db: PostgresJsDatabase, id: string): Promise<{
1574
+ id: string;
1575
+ } | null>;
1576
+ };
1577
+ export {};
1578
+ //# sourceMappingURL=service.d.ts.map