hububb-models 1.0.78 → 1.0.80
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/models/reservation.d.ts +4 -2
- package/dist/schemas/apaleo/offer.d.ts +88 -88
- package/dist/schemas/apaleo/reservation.d.ts +6 -6
- package/dist/schemas/channex/booking.d.ts +6 -6
- package/dist/schemas/channex/thread.d.ts +10 -10
- package/dist/schemas/reservation.d.ts +121 -0
- package/dist/schemas/reservation.js +31 -1
- package/dist/schemas/thread.d.ts +8 -0
- package/dist/schemas/thread.js +1 -0
- package/package.json +1 -1
@@ -1,3 +1,5 @@
|
|
1
|
-
import { z } from "zod";
|
2
|
-
import { ReservationSchema } from "../schemas/reservation";
|
1
|
+
import { infer, z } from "zod";
|
2
|
+
import { ReservationSchema, reservationCreateSchema } from "../schemas/reservation";
|
3
3
|
export type Reservation = z.infer<typeof ReservationSchema>;
|
4
|
+
export interface ReservationCreateSchema extends infer<typeof reservationCreateSchema> {
|
5
|
+
}
|
@@ -304,29 +304,8 @@ export declare const ApaleoOfferSchema: import("zod").ZodObject<{
|
|
304
304
|
amount: number;
|
305
305
|
}>;
|
306
306
|
}, "strip", import("zod").ZodTypeAny, {
|
307
|
-
availableUnits: number;
|
308
|
-
totalGrossAmount: {
|
309
|
-
currency: string;
|
310
|
-
amount: number;
|
311
|
-
};
|
312
307
|
arrival: string;
|
313
308
|
departure: string;
|
314
|
-
unitGroup: {
|
315
|
-
type: string;
|
316
|
-
code: string;
|
317
|
-
id: string;
|
318
|
-
name: string;
|
319
|
-
description: string;
|
320
|
-
maxPersons: number;
|
321
|
-
};
|
322
|
-
minGuaranteeType: string;
|
323
|
-
ratePlan: {
|
324
|
-
code: string;
|
325
|
-
id: string;
|
326
|
-
name: string;
|
327
|
-
description: string;
|
328
|
-
isSubjectToCityTax: boolean;
|
329
|
-
};
|
330
309
|
timeSlices: {
|
331
310
|
from: string;
|
332
311
|
to: string;
|
@@ -343,11 +322,32 @@ export declare const ApaleoOfferSchema: import("zod").ZodObject<{
|
|
343
322
|
amount: number;
|
344
323
|
};
|
345
324
|
}[];
|
346
|
-
isCorporate: boolean;
|
347
325
|
prePaymentAmount: {
|
348
326
|
currency: string;
|
349
327
|
amount: number;
|
350
328
|
};
|
329
|
+
availableUnits: number;
|
330
|
+
totalGrossAmount: {
|
331
|
+
currency: string;
|
332
|
+
amount: number;
|
333
|
+
};
|
334
|
+
unitGroup: {
|
335
|
+
type: string;
|
336
|
+
code: string;
|
337
|
+
id: string;
|
338
|
+
name: string;
|
339
|
+
description: string;
|
340
|
+
maxPersons: number;
|
341
|
+
};
|
342
|
+
minGuaranteeType: string;
|
343
|
+
ratePlan: {
|
344
|
+
code: string;
|
345
|
+
id: string;
|
346
|
+
name: string;
|
347
|
+
description: string;
|
348
|
+
isSubjectToCityTax: boolean;
|
349
|
+
};
|
350
|
+
isCorporate: boolean;
|
351
351
|
cancellationFee?: {
|
352
352
|
code: string;
|
353
353
|
name: string;
|
@@ -392,29 +392,8 @@ export declare const ApaleoOfferSchema: import("zod").ZodObject<{
|
|
392
392
|
};
|
393
393
|
}[] | undefined;
|
394
394
|
}, {
|
395
|
-
availableUnits: number;
|
396
|
-
totalGrossAmount: {
|
397
|
-
currency: string;
|
398
|
-
amount: number;
|
399
|
-
};
|
400
395
|
arrival: string;
|
401
396
|
departure: string;
|
402
|
-
unitGroup: {
|
403
|
-
type: string;
|
404
|
-
code: string;
|
405
|
-
id: string;
|
406
|
-
name: string;
|
407
|
-
description: string;
|
408
|
-
maxPersons: number;
|
409
|
-
};
|
410
|
-
minGuaranteeType: string;
|
411
|
-
ratePlan: {
|
412
|
-
code: string;
|
413
|
-
id: string;
|
414
|
-
name: string;
|
415
|
-
description: string;
|
416
|
-
isSubjectToCityTax: boolean;
|
417
|
-
};
|
418
397
|
timeSlices: {
|
419
398
|
from: string;
|
420
399
|
to: string;
|
@@ -431,11 +410,32 @@ export declare const ApaleoOfferSchema: import("zod").ZodObject<{
|
|
431
410
|
amount: number;
|
432
411
|
};
|
433
412
|
}[];
|
434
|
-
isCorporate: boolean;
|
435
413
|
prePaymentAmount: {
|
436
414
|
currency: string;
|
437
415
|
amount: number;
|
438
416
|
};
|
417
|
+
availableUnits: number;
|
418
|
+
totalGrossAmount: {
|
419
|
+
currency: string;
|
420
|
+
amount: number;
|
421
|
+
};
|
422
|
+
unitGroup: {
|
423
|
+
type: string;
|
424
|
+
code: string;
|
425
|
+
id: string;
|
426
|
+
name: string;
|
427
|
+
description: string;
|
428
|
+
maxPersons: number;
|
429
|
+
};
|
430
|
+
minGuaranteeType: string;
|
431
|
+
ratePlan: {
|
432
|
+
code: string;
|
433
|
+
id: string;
|
434
|
+
name: string;
|
435
|
+
description: string;
|
436
|
+
isSubjectToCityTax: boolean;
|
437
|
+
};
|
438
|
+
isCorporate: boolean;
|
439
439
|
cancellationFee?: {
|
440
440
|
code: string;
|
441
441
|
name: string;
|
@@ -488,29 +488,8 @@ export declare const ApaleoOfferSchema: import("zod").ZodObject<{
|
|
488
488
|
description: string;
|
489
489
|
};
|
490
490
|
offers: {
|
491
|
-
availableUnits: number;
|
492
|
-
totalGrossAmount: {
|
493
|
-
currency: string;
|
494
|
-
amount: number;
|
495
|
-
};
|
496
491
|
arrival: string;
|
497
492
|
departure: string;
|
498
|
-
unitGroup: {
|
499
|
-
type: string;
|
500
|
-
code: string;
|
501
|
-
id: string;
|
502
|
-
name: string;
|
503
|
-
description: string;
|
504
|
-
maxPersons: number;
|
505
|
-
};
|
506
|
-
minGuaranteeType: string;
|
507
|
-
ratePlan: {
|
508
|
-
code: string;
|
509
|
-
id: string;
|
510
|
-
name: string;
|
511
|
-
description: string;
|
512
|
-
isSubjectToCityTax: boolean;
|
513
|
-
};
|
514
493
|
timeSlices: {
|
515
494
|
from: string;
|
516
495
|
to: string;
|
@@ -527,11 +506,32 @@ export declare const ApaleoOfferSchema: import("zod").ZodObject<{
|
|
527
506
|
amount: number;
|
528
507
|
};
|
529
508
|
}[];
|
530
|
-
isCorporate: boolean;
|
531
509
|
prePaymentAmount: {
|
532
510
|
currency: string;
|
533
511
|
amount: number;
|
534
512
|
};
|
513
|
+
availableUnits: number;
|
514
|
+
totalGrossAmount: {
|
515
|
+
currency: string;
|
516
|
+
amount: number;
|
517
|
+
};
|
518
|
+
unitGroup: {
|
519
|
+
type: string;
|
520
|
+
code: string;
|
521
|
+
id: string;
|
522
|
+
name: string;
|
523
|
+
description: string;
|
524
|
+
maxPersons: number;
|
525
|
+
};
|
526
|
+
minGuaranteeType: string;
|
527
|
+
ratePlan: {
|
528
|
+
code: string;
|
529
|
+
id: string;
|
530
|
+
name: string;
|
531
|
+
description: string;
|
532
|
+
isSubjectToCityTax: boolean;
|
533
|
+
};
|
534
|
+
isCorporate: boolean;
|
535
535
|
cancellationFee?: {
|
536
536
|
code: string;
|
537
537
|
name: string;
|
@@ -584,29 +584,8 @@ export declare const ApaleoOfferSchema: import("zod").ZodObject<{
|
|
584
584
|
description: string;
|
585
585
|
};
|
586
586
|
offers: {
|
587
|
-
availableUnits: number;
|
588
|
-
totalGrossAmount: {
|
589
|
-
currency: string;
|
590
|
-
amount: number;
|
591
|
-
};
|
592
587
|
arrival: string;
|
593
588
|
departure: string;
|
594
|
-
unitGroup: {
|
595
|
-
type: string;
|
596
|
-
code: string;
|
597
|
-
id: string;
|
598
|
-
name: string;
|
599
|
-
description: string;
|
600
|
-
maxPersons: number;
|
601
|
-
};
|
602
|
-
minGuaranteeType: string;
|
603
|
-
ratePlan: {
|
604
|
-
code: string;
|
605
|
-
id: string;
|
606
|
-
name: string;
|
607
|
-
description: string;
|
608
|
-
isSubjectToCityTax: boolean;
|
609
|
-
};
|
610
589
|
timeSlices: {
|
611
590
|
from: string;
|
612
591
|
to: string;
|
@@ -623,11 +602,32 @@ export declare const ApaleoOfferSchema: import("zod").ZodObject<{
|
|
623
602
|
amount: number;
|
624
603
|
};
|
625
604
|
}[];
|
626
|
-
isCorporate: boolean;
|
627
605
|
prePaymentAmount: {
|
628
606
|
currency: string;
|
629
607
|
amount: number;
|
630
608
|
};
|
609
|
+
availableUnits: number;
|
610
|
+
totalGrossAmount: {
|
611
|
+
currency: string;
|
612
|
+
amount: number;
|
613
|
+
};
|
614
|
+
unitGroup: {
|
615
|
+
type: string;
|
616
|
+
code: string;
|
617
|
+
id: string;
|
618
|
+
name: string;
|
619
|
+
description: string;
|
620
|
+
maxPersons: number;
|
621
|
+
};
|
622
|
+
minGuaranteeType: string;
|
623
|
+
ratePlan: {
|
624
|
+
code: string;
|
625
|
+
id: string;
|
626
|
+
name: string;
|
627
|
+
description: string;
|
628
|
+
isSubjectToCityTax: boolean;
|
629
|
+
};
|
630
|
+
isCorporate: boolean;
|
631
631
|
cancellationFee?: {
|
632
632
|
code: string;
|
633
633
|
name: string;
|
@@ -247,12 +247,13 @@ declare const apaleoReservationSchema: import("zod").ZodObject<{
|
|
247
247
|
status: string;
|
248
248
|
modified: string;
|
249
249
|
adults: number;
|
250
|
+
arrival: string;
|
251
|
+
departure: string;
|
252
|
+
channelCode: string;
|
250
253
|
totalGrossAmount: {
|
251
254
|
currency: string;
|
252
255
|
amount: number;
|
253
256
|
};
|
254
|
-
arrival: string;
|
255
|
-
departure: string;
|
256
257
|
unitGroup: {
|
257
258
|
type: string;
|
258
259
|
code: string;
|
@@ -287,7 +288,6 @@ declare const apaleoReservationSchema: import("zod").ZodObject<{
|
|
287
288
|
};
|
288
289
|
bookingId: string;
|
289
290
|
created: string;
|
290
|
-
channelCode: string;
|
291
291
|
primaryGuest: {
|
292
292
|
lastName: string;
|
293
293
|
email?: string | undefined;
|
@@ -335,12 +335,13 @@ declare const apaleoReservationSchema: import("zod").ZodObject<{
|
|
335
335
|
status: string;
|
336
336
|
modified: string;
|
337
337
|
adults: number;
|
338
|
+
arrival: string;
|
339
|
+
departure: string;
|
340
|
+
channelCode: string;
|
338
341
|
totalGrossAmount: {
|
339
342
|
currency: string;
|
340
343
|
amount: number;
|
341
344
|
};
|
342
|
-
arrival: string;
|
343
|
-
departure: string;
|
344
345
|
unitGroup: {
|
345
346
|
type: string;
|
346
347
|
code: string;
|
@@ -375,7 +376,6 @@ declare const apaleoReservationSchema: import("zod").ZodObject<{
|
|
375
376
|
};
|
376
377
|
bookingId: string;
|
377
378
|
created: string;
|
378
|
-
channelCode: string;
|
379
379
|
primaryGuest: {
|
380
380
|
lastName: string;
|
381
381
|
email?: string | undefined;
|
@@ -42,8 +42,8 @@ export declare const ChannexBookingSchema: import("zod").ZodObject<{
|
|
42
42
|
address?: string | null | undefined;
|
43
43
|
language?: string | null | undefined;
|
44
44
|
country?: string | null | undefined;
|
45
|
-
city?: string | null | undefined;
|
46
45
|
phone?: string | null | undefined;
|
46
|
+
city?: string | null | undefined;
|
47
47
|
zip?: string | null | undefined;
|
48
48
|
mail?: string | null | undefined;
|
49
49
|
}, {
|
@@ -52,8 +52,8 @@ export declare const ChannexBookingSchema: import("zod").ZodObject<{
|
|
52
52
|
address?: string | null | undefined;
|
53
53
|
language?: string | null | undefined;
|
54
54
|
country?: string | null | undefined;
|
55
|
-
city?: string | null | undefined;
|
56
55
|
phone?: string | null | undefined;
|
56
|
+
city?: string | null | undefined;
|
57
57
|
zip?: string | null | undefined;
|
58
58
|
mail?: string | null | undefined;
|
59
59
|
}>;
|
@@ -220,8 +220,8 @@ export declare const ChannexBookingSchema: import("zod").ZodObject<{
|
|
220
220
|
address?: string | null | undefined;
|
221
221
|
language?: string | null | undefined;
|
222
222
|
country?: string | null | undefined;
|
223
|
-
city?: string | null | undefined;
|
224
223
|
phone?: string | null | undefined;
|
224
|
+
city?: string | null | undefined;
|
225
225
|
zip?: string | null | undefined;
|
226
226
|
mail?: string | null | undefined;
|
227
227
|
};
|
@@ -297,8 +297,8 @@ export declare const ChannexBookingSchema: import("zod").ZodObject<{
|
|
297
297
|
address?: string | null | undefined;
|
298
298
|
language?: string | null | undefined;
|
299
299
|
country?: string | null | undefined;
|
300
|
-
city?: string | null | undefined;
|
301
300
|
phone?: string | null | undefined;
|
301
|
+
city?: string | null | undefined;
|
302
302
|
zip?: string | null | undefined;
|
303
303
|
mail?: string | null | undefined;
|
304
304
|
};
|
@@ -378,8 +378,8 @@ export declare const ChannexBookingSchema: import("zod").ZodObject<{
|
|
378
378
|
address?: string | null | undefined;
|
379
379
|
language?: string | null | undefined;
|
380
380
|
country?: string | null | undefined;
|
381
|
-
city?: string | null | undefined;
|
382
381
|
phone?: string | null | undefined;
|
382
|
+
city?: string | null | undefined;
|
383
383
|
zip?: string | null | undefined;
|
384
384
|
mail?: string | null | undefined;
|
385
385
|
};
|
@@ -459,8 +459,8 @@ export declare const ChannexBookingSchema: import("zod").ZodObject<{
|
|
459
459
|
address?: string | null | undefined;
|
460
460
|
language?: string | null | undefined;
|
461
461
|
country?: string | null | undefined;
|
462
|
-
city?: string | null | undefined;
|
463
462
|
phone?: string | null | undefined;
|
463
|
+
city?: string | null | undefined;
|
464
464
|
zip?: string | null | undefined;
|
465
465
|
mail?: string | null | undefined;
|
466
466
|
};
|
@@ -13,13 +13,13 @@ export declare const ChannexMessageThreadSchema: import("zod").ZodObject<{
|
|
13
13
|
sender: import("zod").ZodString;
|
14
14
|
}, "strip", import("zod").ZodTypeAny, {
|
15
15
|
message: string;
|
16
|
-
inserted_at: string;
|
17
16
|
attachments: string[];
|
17
|
+
inserted_at: string;
|
18
18
|
sender: string;
|
19
19
|
}, {
|
20
20
|
message: string;
|
21
|
-
inserted_at: string;
|
22
21
|
attachments: string[];
|
22
|
+
inserted_at: string;
|
23
23
|
sender: string;
|
24
24
|
}>>;
|
25
25
|
last_message_received_at: import("zod").ZodString;
|
@@ -35,8 +35,8 @@ export declare const ChannexMessageThreadSchema: import("zod").ZodObject<{
|
|
35
35
|
updated_at: string;
|
36
36
|
last_message?: {
|
37
37
|
message: string;
|
38
|
-
inserted_at: string;
|
39
38
|
attachments: string[];
|
39
|
+
inserted_at: string;
|
40
40
|
sender: string;
|
41
41
|
} | undefined;
|
42
42
|
}, {
|
@@ -49,8 +49,8 @@ export declare const ChannexMessageThreadSchema: import("zod").ZodObject<{
|
|
49
49
|
updated_at: string;
|
50
50
|
last_message?: {
|
51
51
|
message: string;
|
52
|
-
inserted_at: string;
|
53
52
|
attachments: string[];
|
53
|
+
inserted_at: string;
|
54
54
|
sender: string;
|
55
55
|
} | undefined;
|
56
56
|
}>;
|
@@ -173,8 +173,8 @@ export declare const ChannexMessageThreadSchema: import("zod").ZodObject<{
|
|
173
173
|
updated_at: string;
|
174
174
|
last_message?: {
|
175
175
|
message: string;
|
176
|
-
inserted_at: string;
|
177
176
|
attachments: string[];
|
177
|
+
inserted_at: string;
|
178
178
|
sender: string;
|
179
179
|
} | undefined;
|
180
180
|
};
|
@@ -211,8 +211,8 @@ export declare const ChannexMessageThreadSchema: import("zod").ZodObject<{
|
|
211
211
|
updated_at: string;
|
212
212
|
last_message?: {
|
213
213
|
message: string;
|
214
|
-
inserted_at: string;
|
215
214
|
attachments: string[];
|
215
|
+
inserted_at: string;
|
216
216
|
sender: string;
|
217
217
|
} | undefined;
|
218
218
|
};
|
@@ -255,9 +255,9 @@ export declare const WebhookChannexMessageSchema: import("zod").ZodObject<{
|
|
255
255
|
}, "strip", import("zod").ZodTypeAny, {
|
256
256
|
message: string;
|
257
257
|
id: string;
|
258
|
+
attachments: string[];
|
258
259
|
property_id: string;
|
259
260
|
booking_id: string;
|
260
|
-
attachments: string[];
|
261
261
|
sender: string;
|
262
262
|
message_thread_id: string;
|
263
263
|
live_feed_event_id: string;
|
@@ -266,9 +266,9 @@ export declare const WebhookChannexMessageSchema: import("zod").ZodObject<{
|
|
266
266
|
}, {
|
267
267
|
message: string;
|
268
268
|
id: string;
|
269
|
+
attachments: string[];
|
269
270
|
property_id: string;
|
270
271
|
booking_id: string;
|
271
|
-
attachments: string[];
|
272
272
|
sender: string;
|
273
273
|
message_thread_id: string;
|
274
274
|
live_feed_event_id: string;
|
@@ -281,9 +281,9 @@ export declare const WebhookChannexMessageSchema: import("zod").ZodObject<{
|
|
281
281
|
payload: {
|
282
282
|
message: string;
|
283
283
|
id: string;
|
284
|
+
attachments: string[];
|
284
285
|
property_id: string;
|
285
286
|
booking_id: string;
|
286
|
-
attachments: string[];
|
287
287
|
sender: string;
|
288
288
|
message_thread_id: string;
|
289
289
|
live_feed_event_id: string;
|
@@ -298,9 +298,9 @@ export declare const WebhookChannexMessageSchema: import("zod").ZodObject<{
|
|
298
298
|
payload: {
|
299
299
|
message: string;
|
300
300
|
id: string;
|
301
|
+
attachments: string[];
|
301
302
|
property_id: string;
|
302
303
|
booking_id: string;
|
303
|
-
attachments: string[];
|
304
304
|
sender: string;
|
305
305
|
message_thread_id: string;
|
306
306
|
live_feed_event_id: string;
|
@@ -149,3 +149,124 @@ export declare const ReservationSchema: import("zod").ZodObject<{
|
|
149
149
|
adults?: number | undefined;
|
150
150
|
inboxId?: number | undefined;
|
151
151
|
}>;
|
152
|
+
export declare const reservationCreateSchema: import("zod").ZodObject<{
|
153
|
+
booker: import("zod").ZodObject<{
|
154
|
+
firstName: import("zod").ZodString;
|
155
|
+
lastName: import("zod").ZodString;
|
156
|
+
email: import("zod").ZodString;
|
157
|
+
phone: import("zod").ZodString;
|
158
|
+
}, "strip", import("zod").ZodTypeAny, {
|
159
|
+
email: string;
|
160
|
+
firstName: string;
|
161
|
+
lastName: string;
|
162
|
+
phone: string;
|
163
|
+
}, {
|
164
|
+
email: string;
|
165
|
+
firstName: string;
|
166
|
+
lastName: string;
|
167
|
+
phone: string;
|
168
|
+
}>;
|
169
|
+
reservations: import("zod").ZodObject<{
|
170
|
+
arrival: import("zod").ZodString;
|
171
|
+
departure: import("zod").ZodString;
|
172
|
+
adults: import("zod").ZodNumber;
|
173
|
+
channelCode: import("zod").ZodLiteral<"Direct">;
|
174
|
+
guarenteeType: import("zod").ZodLiteral<"Prepayment">;
|
175
|
+
timeSlices: import("zod").ZodArray<import("zod").ZodObject<{
|
176
|
+
ratePlanId: import("zod").ZodString;
|
177
|
+
}, "strip", import("zod").ZodTypeAny, {
|
178
|
+
ratePlanId: string;
|
179
|
+
}, {
|
180
|
+
ratePlanId: string;
|
181
|
+
}>, "atleastone">;
|
182
|
+
prePaymentAmount: import("zod").ZodObject<{
|
183
|
+
amount: import("zod").ZodNumber;
|
184
|
+
currency: import("zod").ZodString;
|
185
|
+
}, "strip", import("zod").ZodTypeAny, {
|
186
|
+
currency: string;
|
187
|
+
amount: number;
|
188
|
+
}, {
|
189
|
+
currency: string;
|
190
|
+
amount: number;
|
191
|
+
}>;
|
192
|
+
}, "strip", import("zod").ZodTypeAny, {
|
193
|
+
adults: number;
|
194
|
+
arrival: string;
|
195
|
+
departure: string;
|
196
|
+
channelCode: "Direct";
|
197
|
+
guarenteeType: "Prepayment";
|
198
|
+
timeSlices: [{
|
199
|
+
ratePlanId: string;
|
200
|
+
}, ...{
|
201
|
+
ratePlanId: string;
|
202
|
+
}[]];
|
203
|
+
prePaymentAmount: {
|
204
|
+
currency: string;
|
205
|
+
amount: number;
|
206
|
+
};
|
207
|
+
}, {
|
208
|
+
adults: number;
|
209
|
+
arrival: string;
|
210
|
+
departure: string;
|
211
|
+
channelCode: "Direct";
|
212
|
+
guarenteeType: "Prepayment";
|
213
|
+
timeSlices: [{
|
214
|
+
ratePlanId: string;
|
215
|
+
}, ...{
|
216
|
+
ratePlanId: string;
|
217
|
+
}[]];
|
218
|
+
prePaymentAmount: {
|
219
|
+
currency: string;
|
220
|
+
amount: number;
|
221
|
+
};
|
222
|
+
}>;
|
223
|
+
transactionReference: import("zod").ZodString;
|
224
|
+
}, "strip", import("zod").ZodTypeAny, {
|
225
|
+
booker: {
|
226
|
+
email: string;
|
227
|
+
firstName: string;
|
228
|
+
lastName: string;
|
229
|
+
phone: string;
|
230
|
+
};
|
231
|
+
reservations: {
|
232
|
+
adults: number;
|
233
|
+
arrival: string;
|
234
|
+
departure: string;
|
235
|
+
channelCode: "Direct";
|
236
|
+
guarenteeType: "Prepayment";
|
237
|
+
timeSlices: [{
|
238
|
+
ratePlanId: string;
|
239
|
+
}, ...{
|
240
|
+
ratePlanId: string;
|
241
|
+
}[]];
|
242
|
+
prePaymentAmount: {
|
243
|
+
currency: string;
|
244
|
+
amount: number;
|
245
|
+
};
|
246
|
+
};
|
247
|
+
transactionReference: string;
|
248
|
+
}, {
|
249
|
+
booker: {
|
250
|
+
email: string;
|
251
|
+
firstName: string;
|
252
|
+
lastName: string;
|
253
|
+
phone: string;
|
254
|
+
};
|
255
|
+
reservations: {
|
256
|
+
adults: number;
|
257
|
+
arrival: string;
|
258
|
+
departure: string;
|
259
|
+
channelCode: "Direct";
|
260
|
+
guarenteeType: "Prepayment";
|
261
|
+
timeSlices: [{
|
262
|
+
ratePlanId: string;
|
263
|
+
}, ...{
|
264
|
+
ratePlanId: string;
|
265
|
+
}[]];
|
266
|
+
prePaymentAmount: {
|
267
|
+
currency: string;
|
268
|
+
amount: number;
|
269
|
+
};
|
270
|
+
};
|
271
|
+
transactionReference: string;
|
272
|
+
}>;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.ReservationSchema = void 0;
|
3
|
+
exports.reservationCreateSchema = exports.ReservationSchema = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
5
|
const helpers_1 = require("../helpers");
|
6
6
|
const GuestSchema = (0, zod_1.object)({
|
@@ -45,3 +45,33 @@ exports.ReservationSchema = (0, zod_1.object)({
|
|
45
45
|
children: (0, zod_1.optional)((0, zod_1.number)()),
|
46
46
|
inboxId: (0, zod_1.optional)((0, zod_1.number)()),
|
47
47
|
});
|
48
|
+
const bookerSchema = (0, zod_1.object)({
|
49
|
+
firstName: (0, zod_1.string)().min(1, "First name is required"),
|
50
|
+
lastName: (0, zod_1.string)().min(1, "Last name is required"),
|
51
|
+
email: (0, zod_1.string)().email("Invalid email address"),
|
52
|
+
phone: (0, zod_1.string)().min(1, "Phone number is required"),
|
53
|
+
});
|
54
|
+
// Time Slice Schema
|
55
|
+
const timeSliceSchema = (0, zod_1.object)({
|
56
|
+
ratePlanId: (0, zod_1.string)().min(1, "Rate Plan ID is required"),
|
57
|
+
});
|
58
|
+
// PrePayment Amount Schema
|
59
|
+
const prePaymentAmountSchema = (0, zod_1.object)({
|
60
|
+
amount: (0, zod_1.number)().positive("Amount must be a positive number"),
|
61
|
+
currency: (0, zod_1.string)().length(3, "Currency code must be 3 characters long"),
|
62
|
+
});
|
63
|
+
// Reservation Schema
|
64
|
+
const reservationSchema = (0, zod_1.object)({
|
65
|
+
arrival: (0, zod_1.string)().min(1, "Arrival date is required"),
|
66
|
+
departure: (0, zod_1.string)().min(1, "Departure date is required"),
|
67
|
+
adults: (0, zod_1.number)().min(1, "At least one adult is required"),
|
68
|
+
channelCode: (0, zod_1.literal)("Direct"),
|
69
|
+
guarenteeType: (0, zod_1.literal)("Prepayment"),
|
70
|
+
timeSlices: (0, zod_1.array)(timeSliceSchema).nonempty("At least one time slice is required"),
|
71
|
+
prePaymentAmount: prePaymentAmountSchema,
|
72
|
+
});
|
73
|
+
exports.reservationCreateSchema = (0, zod_1.object)({
|
74
|
+
booker: bookerSchema,
|
75
|
+
reservations: reservationSchema,
|
76
|
+
transactionReference: (0, zod_1.string)().min(1, "Transaction reference is required"),
|
77
|
+
});
|
package/dist/schemas/thread.d.ts
CHANGED
@@ -157,6 +157,7 @@ export declare const ChatMessageSchema: import("zod").ZodObject<{
|
|
157
157
|
lastSeen: import("zod").ZodOptional<import("zod").ZodType<FirebaseFirestore.Timestamp, import("zod").ZodTypeDef, FirebaseFirestore.Timestamp>>;
|
158
158
|
source: import("zod").ZodOptional<import("zod").ZodString>;
|
159
159
|
externalMessageId: import("zod").ZodOptional<import("zod").ZodString>;
|
160
|
+
attachments: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
160
161
|
}, "strip", import("zod").ZodTypeAny, {
|
161
162
|
id: string;
|
162
163
|
body: string;
|
@@ -198,6 +199,7 @@ export declare const ChatMessageSchema: import("zod").ZodObject<{
|
|
198
199
|
} | undefined;
|
199
200
|
lastSeen?: FirebaseFirestore.Timestamp | undefined;
|
200
201
|
externalMessageId?: string | undefined;
|
202
|
+
attachments?: string[] | undefined;
|
201
203
|
}, {
|
202
204
|
id: string;
|
203
205
|
body: string;
|
@@ -239,6 +241,7 @@ export declare const ChatMessageSchema: import("zod").ZodObject<{
|
|
239
241
|
} | undefined;
|
240
242
|
lastSeen?: FirebaseFirestore.Timestamp | undefined;
|
241
243
|
externalMessageId?: string | undefined;
|
244
|
+
attachments?: string[] | undefined;
|
242
245
|
}>;
|
243
246
|
export declare const ChatThreadSchema: import("zod").ZodObject<{
|
244
247
|
id: import("zod").ZodOptional<import("zod").ZodString>;
|
@@ -403,6 +406,7 @@ export declare const ChatThreadSchema: import("zod").ZodObject<{
|
|
403
406
|
lastSeen: import("zod").ZodOptional<import("zod").ZodType<FirebaseFirestore.Timestamp, import("zod").ZodTypeDef, FirebaseFirestore.Timestamp>>;
|
404
407
|
source: import("zod").ZodOptional<import("zod").ZodString>;
|
405
408
|
externalMessageId: import("zod").ZodOptional<import("zod").ZodString>;
|
409
|
+
attachments: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
406
410
|
}, "strip", import("zod").ZodTypeAny, {
|
407
411
|
id: string;
|
408
412
|
body: string;
|
@@ -444,6 +448,7 @@ export declare const ChatThreadSchema: import("zod").ZodObject<{
|
|
444
448
|
} | undefined;
|
445
449
|
lastSeen?: FirebaseFirestore.Timestamp | undefined;
|
446
450
|
externalMessageId?: string | undefined;
|
451
|
+
attachments?: string[] | undefined;
|
447
452
|
}, {
|
448
453
|
id: string;
|
449
454
|
body: string;
|
@@ -485,6 +490,7 @@ export declare const ChatThreadSchema: import("zod").ZodObject<{
|
|
485
490
|
} | undefined;
|
486
491
|
lastSeen?: FirebaseFirestore.Timestamp | undefined;
|
487
492
|
externalMessageId?: string | undefined;
|
493
|
+
attachments?: string[] | undefined;
|
488
494
|
}>>;
|
489
495
|
participantIds: import("zod").ZodArray<import("zod").ZodString, "many">;
|
490
496
|
participants: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
@@ -689,6 +695,7 @@ export declare const ChatThreadSchema: import("zod").ZodObject<{
|
|
689
695
|
} | undefined;
|
690
696
|
lastSeen?: FirebaseFirestore.Timestamp | undefined;
|
691
697
|
externalMessageId?: string | undefined;
|
698
|
+
attachments?: string[] | undefined;
|
692
699
|
} | undefined;
|
693
700
|
participants?: {
|
694
701
|
id: string;
|
@@ -771,6 +778,7 @@ export declare const ChatThreadSchema: import("zod").ZodObject<{
|
|
771
778
|
} | undefined;
|
772
779
|
lastSeen?: FirebaseFirestore.Timestamp | undefined;
|
773
780
|
externalMessageId?: string | undefined;
|
781
|
+
attachments?: string[] | undefined;
|
774
782
|
} | undefined;
|
775
783
|
participants?: {
|
776
784
|
id: string;
|
package/dist/schemas/thread.js
CHANGED
@@ -17,6 +17,7 @@ exports.ChatMessageSchema = (0, zod_1.object)({
|
|
17
17
|
lastSeen: (0, zod_1.optional)(helpers_1.firestoreTimestampSchema),
|
18
18
|
source: (0, zod_1.optional)((0, zod_1.string)()),
|
19
19
|
externalMessageId: (0, zod_1.optional)((0, zod_1.string)()),
|
20
|
+
attachments: (0, zod_1.optional)((0, zod_1.array)((0, zod_1.string)())),
|
20
21
|
});
|
21
22
|
exports.ChatThreadSchema = (0, zod_1.object)({
|
22
23
|
id: (0, zod_1.optional)((0, zod_1.string)()),
|