@voyantjs/bookings 0.19.0 → 0.21.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.
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/pii-redaction.d.ts +3 -6
- package/dist/pii-redaction.d.ts.map +1 -1
- package/dist/pii-redaction.js +5 -6
- package/dist/products-ref.d.ts +75 -0
- package/dist/products-ref.d.ts.map +1 -1
- package/dist/products-ref.js +6 -0
- package/dist/routes-groups.d.ts +8 -2
- package/dist/routes-groups.d.ts.map +1 -1
- package/dist/routes-public.d.ts +4 -4
- package/dist/routes.d.ts +83 -21
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +50 -0
- package/dist/schema-core.d.ts +53 -2
- package/dist/schema-core.d.ts.map +1 -1
- package/dist/schema-core.js +15 -0
- package/dist/schema-items.d.ts +1 -1
- package/dist/schema-operations.d.ts +2 -2
- package/dist/schema-shared.d.ts +2 -2
- package/dist/schema-shared.d.ts.map +1 -1
- package/dist/schema-shared.js +11 -0
- package/dist/service-public.d.ts +10 -10
- package/dist/service.d.ts +140 -27
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +313 -31
- package/dist/state-machine.d.ts +11 -2
- package/dist/state-machine.d.ts.map +1 -1
- package/dist/state-machine.js +9 -3
- package/dist/tasks/expire-stale-holds.d.ts +2 -1
- package/dist/tasks/expire-stale-holds.d.ts.map +1 -1
- package/dist/tasks/expire-stale-holds.js +2 -2
- package/dist/validation-public.d.ts +6 -3
- package/dist/validation-public.d.ts.map +1 -1
- package/dist/validation-public.js +1 -1
- package/dist/validation-shared.d.ts +2 -1
- package/dist/validation-shared.d.ts.map +1 -1
- package/dist/validation-shared.js +1 -0
- package/dist/validation.d.ts +69 -8
- package/dist/validation.d.ts.map +1 -1
- package/dist/validation.js +14 -2
- package/package.json +6 -7
|
@@ -70,7 +70,7 @@ export declare const publicCreateBookingSessionSchema: z.ZodObject<{
|
|
|
70
70
|
startDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
71
71
|
endDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
72
72
|
pax: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
73
|
-
holdMinutes: z.
|
|
73
|
+
holdMinutes: z.ZodOptional<z.ZodNumber>;
|
|
74
74
|
holdExpiresAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
75
75
|
items: z.ZodArray<z.ZodObject<{
|
|
76
76
|
title: z.ZodString;
|
|
@@ -333,6 +333,7 @@ export declare const publicBookingSessionSchema: z.ZodObject<{
|
|
|
333
333
|
cancelled: "cancelled";
|
|
334
334
|
draft: "draft";
|
|
335
335
|
on_hold: "on_hold";
|
|
336
|
+
awaiting_payment: "awaiting_payment";
|
|
336
337
|
confirmed: "confirmed";
|
|
337
338
|
in_progress: "in_progress";
|
|
338
339
|
completed: "completed";
|
|
@@ -537,6 +538,7 @@ export declare const publicBookingSessionRepriceResultSchema: z.ZodObject<{
|
|
|
537
538
|
cancelled: "cancelled";
|
|
538
539
|
draft: "draft";
|
|
539
540
|
on_hold: "on_hold";
|
|
541
|
+
awaiting_payment: "awaiting_payment";
|
|
540
542
|
confirmed: "confirmed";
|
|
541
543
|
in_progress: "in_progress";
|
|
542
544
|
completed: "completed";
|
|
@@ -719,10 +721,10 @@ export declare const publicBookingOverviewFulfillmentSchema: z.ZodObject<{
|
|
|
719
721
|
}>;
|
|
720
722
|
status: z.ZodEnum<{
|
|
721
723
|
pending: "pending";
|
|
724
|
+
failed: "failed";
|
|
722
725
|
issued: "issued";
|
|
723
726
|
reissued: "reissued";
|
|
724
727
|
revoked: "revoked";
|
|
725
|
-
failed: "failed";
|
|
726
728
|
}>;
|
|
727
729
|
artifactUrl: z.ZodNullable<z.ZodString>;
|
|
728
730
|
}, z.core.$strip>;
|
|
@@ -733,6 +735,7 @@ export declare const publicBookingOverviewSchema: z.ZodObject<{
|
|
|
733
735
|
cancelled: "cancelled";
|
|
734
736
|
draft: "draft";
|
|
735
737
|
on_hold: "on_hold";
|
|
738
|
+
awaiting_payment: "awaiting_payment";
|
|
736
739
|
confirmed: "confirmed";
|
|
737
740
|
in_progress: "in_progress";
|
|
738
741
|
completed: "completed";
|
|
@@ -843,10 +846,10 @@ export declare const publicBookingOverviewSchema: z.ZodObject<{
|
|
|
843
846
|
}>;
|
|
844
847
|
status: z.ZodEnum<{
|
|
845
848
|
pending: "pending";
|
|
849
|
+
failed: "failed";
|
|
846
850
|
issued: "issued";
|
|
847
851
|
reissued: "reissued";
|
|
848
852
|
revoked: "revoked";
|
|
849
|
-
failed: "failed";
|
|
850
853
|
}>;
|
|
851
854
|
artifactUrl: z.ZodNullable<z.ZodString>;
|
|
852
855
|
}, z.core.$strip>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation-public.d.ts","sourceRoot":"","sources":["../src/validation-public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAqBvB,eAAO,MAAM,uCAAuC;;;;;;;;;;;;;;;;;;;;;iBAYlD,CAAA;AAEF,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoB/C,CAAA;AAEF,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAsB3C,CAAA;AAEF,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAa3C,CAAA;AAEF,eAAO,MAAM,kCAAkC;;iBAE7C,CAAA;AAEF,eAAO,MAAM,+BAA+B;;;;;;;;;iBAS1C,CAAA;AAEF,eAAO,MAAM,qCAAqC;;;;;iBAKhD,CAAA;AAEF,eAAO,MAAM,0CAA0C;;;;;;iBAMrD,CAAA;AAEF,eAAO,MAAM,iCAAiC;;;;;;;;;;i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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAgBtC,CAAA;AAEF,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAA;AAC9F,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAA;AAC9F,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAA;AAClG,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAA;AACvF,MAAM,MAAM,oCAAoC,GAAG,CAAC,CAAC,KAAK,CACxD,OAAO,qCAAqC,CAC7C,CAAA;AACD,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAA;AAChG,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CACpD,OAAO,sCAAsC,CAC9C,CAAA;AACD,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CACtD,OAAO,wCAAwC,CAChD,CAAA"}
|
|
@@ -56,7 +56,7 @@ export const publicCreateBookingSessionSchema = z.object({
|
|
|
56
56
|
.int()
|
|
57
57
|
.positive()
|
|
58
58
|
.max(24 * 60)
|
|
59
|
-
.
|
|
59
|
+
.optional(),
|
|
60
60
|
holdExpiresAt: isoDateTimeSchema.nullable().optional(),
|
|
61
61
|
items: z.array(publicCreateBookingSessionItemSchema).min(1),
|
|
62
62
|
travelers: z.array(publicBookingSessionTravelerInputSchema).optional(),
|
|
@@ -3,6 +3,7 @@ export declare const bookingStatusSchema: z.ZodEnum<{
|
|
|
3
3
|
cancelled: "cancelled";
|
|
4
4
|
draft: "draft";
|
|
5
5
|
on_hold: "on_hold";
|
|
6
|
+
awaiting_payment: "awaiting_payment";
|
|
6
7
|
confirmed: "confirmed";
|
|
7
8
|
in_progress: "in_progress";
|
|
8
9
|
completed: "completed";
|
|
@@ -96,10 +97,10 @@ export declare const bookingFulfillmentDeliveryChannelSchema: z.ZodEnum<{
|
|
|
96
97
|
}>;
|
|
97
98
|
export declare const bookingFulfillmentStatusSchema: z.ZodEnum<{
|
|
98
99
|
pending: "pending";
|
|
100
|
+
failed: "failed";
|
|
99
101
|
issued: "issued";
|
|
100
102
|
reissued: "reissued";
|
|
101
103
|
revoked: "revoked";
|
|
102
|
-
failed: "failed";
|
|
103
104
|
}>;
|
|
104
105
|
export declare const bookingRedemptionMethodSchema: z.ZodEnum<{
|
|
105
106
|
other: "other";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation-shared.d.ts","sourceRoot":"","sources":["../src/validation-shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,mBAAmB
|
|
1
|
+
{"version":3,"file":"validation-shared.d.ts","sourceRoot":"","sources":["../src/validation-shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,mBAAmB;;;;;;;;;EAS9B,CAAA;AAEF,eAAO,MAAM,gCAAgC;;;;;EAK3C,CAAA;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;EAQlC,CAAA;AAEF,eAAO,MAAM,4BAA4B;;;;EAA4C,CAAA;AAErF,eAAO,MAAM,6BAA6B;;;;;;EAA0D,CAAA;AAEpG,eAAO,MAAM,qBAAqB;;;;;;;;;;;EAWhC,CAAA;AAEF,eAAO,MAAM,uBAAuB;;;;;;;EAOlC,CAAA;AAEF,eAAO,MAAM,gCAAgC;;;;;EAK3C,CAAA;AAEF,eAAO,MAAM,gCAAgC;;;EAAwC,CAAA;AAErF,eAAO,MAAM,2BAA2B;;;;EAAyC,CAAA;AAEjF,eAAO,MAAM,6BAA6B;;;;;;;EAOxC,CAAA;AAEF,eAAO,MAAM,4BAA4B;;;;;;;;EAQvC,CAAA;AAEF,eAAO,MAAM,uCAAuC;;;;;;EAMlD,CAAA;AAEF,eAAO,MAAM,8BAA8B;;;;;;EAMzC,CAAA;AAEF,eAAO,MAAM,6BAA6B;;;;;EAA6C,CAAA;AAEvF,eAAO,MAAM,yBAAyB;;;;;;EAMpC,CAAA"}
|
package/dist/validation.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export declare const insertBookingSchema: z.ZodObject<{
|
|
|
5
5
|
cancelled: "cancelled";
|
|
6
6
|
draft: "draft";
|
|
7
7
|
on_hold: "on_hold";
|
|
8
|
+
awaiting_payment: "awaiting_payment";
|
|
8
9
|
confirmed: "confirmed";
|
|
9
10
|
in_progress: "in_progress";
|
|
10
11
|
completed: "completed";
|
|
@@ -44,6 +45,20 @@ export declare const insertBookingSchema: z.ZodObject<{
|
|
|
44
45
|
endDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
45
46
|
pax: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
46
47
|
internalNotes: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
48
|
+
customerPaymentPolicy: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
49
|
+
deposit: z.ZodObject<{
|
|
50
|
+
kind: z.ZodEnum<{
|
|
51
|
+
percent: "percent";
|
|
52
|
+
none: "none";
|
|
53
|
+
fixed_cents: "fixed_cents";
|
|
54
|
+
}>;
|
|
55
|
+
percent: z.ZodOptional<z.ZodNumber>;
|
|
56
|
+
amountCents: z.ZodOptional<z.ZodNumber>;
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
minDaysBeforeDepartureForDeposit: z.ZodNumber;
|
|
59
|
+
balanceDueDaysBeforeDeparture: z.ZodNumber;
|
|
60
|
+
balanceDueMinDaysFromNow: z.ZodNumber;
|
|
61
|
+
}, z.core.$strip>>>;
|
|
47
62
|
holdExpiresAt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
48
63
|
confirmedAt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
49
64
|
expiredAt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
@@ -57,6 +72,7 @@ export declare const updateBookingSchema: z.ZodObject<{
|
|
|
57
72
|
cancelled: "cancelled";
|
|
58
73
|
draft: "draft";
|
|
59
74
|
on_hold: "on_hold";
|
|
75
|
+
awaiting_payment: "awaiting_payment";
|
|
60
76
|
confirmed: "confirmed";
|
|
61
77
|
in_progress: "in_progress";
|
|
62
78
|
completed: "completed";
|
|
@@ -96,6 +112,20 @@ export declare const updateBookingSchema: z.ZodObject<{
|
|
|
96
112
|
endDate: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
97
113
|
pax: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>;
|
|
98
114
|
internalNotes: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
115
|
+
customerPaymentPolicy: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
116
|
+
deposit: z.ZodObject<{
|
|
117
|
+
kind: z.ZodEnum<{
|
|
118
|
+
percent: "percent";
|
|
119
|
+
none: "none";
|
|
120
|
+
fixed_cents: "fixed_cents";
|
|
121
|
+
}>;
|
|
122
|
+
percent: z.ZodOptional<z.ZodNumber>;
|
|
123
|
+
amountCents: z.ZodOptional<z.ZodNumber>;
|
|
124
|
+
}, z.core.$strip>;
|
|
125
|
+
minDaysBeforeDepartureForDeposit: z.ZodNumber;
|
|
126
|
+
balanceDueDaysBeforeDeparture: z.ZodNumber;
|
|
127
|
+
balanceDueMinDaysFromNow: z.ZodNumber;
|
|
128
|
+
}, z.core.$strip>>>>;
|
|
99
129
|
holdExpiresAt: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
100
130
|
confirmedAt: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
101
131
|
expiredAt: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
@@ -109,6 +139,7 @@ export declare const createBookingSchema: z.ZodObject<{
|
|
|
109
139
|
cancelled: "cancelled";
|
|
110
140
|
draft: "draft";
|
|
111
141
|
on_hold: "on_hold";
|
|
142
|
+
awaiting_payment: "awaiting_payment";
|
|
112
143
|
confirmed: "confirmed";
|
|
113
144
|
in_progress: "in_progress";
|
|
114
145
|
completed: "completed";
|
|
@@ -139,6 +170,20 @@ export declare const createBookingSchema: z.ZodObject<{
|
|
|
139
170
|
endDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
140
171
|
pax: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
141
172
|
internalNotes: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
173
|
+
customerPaymentPolicy: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
174
|
+
deposit: z.ZodObject<{
|
|
175
|
+
kind: z.ZodEnum<{
|
|
176
|
+
percent: "percent";
|
|
177
|
+
none: "none";
|
|
178
|
+
fixed_cents: "fixed_cents";
|
|
179
|
+
}>;
|
|
180
|
+
percent: z.ZodOptional<z.ZodNumber>;
|
|
181
|
+
amountCents: z.ZodOptional<z.ZodNumber>;
|
|
182
|
+
}, z.core.$strip>;
|
|
183
|
+
minDaysBeforeDepartureForDeposit: z.ZodNumber;
|
|
184
|
+
balanceDueDaysBeforeDeparture: z.ZodNumber;
|
|
185
|
+
balanceDueMinDaysFromNow: z.ZodNumber;
|
|
186
|
+
}, z.core.$strip>>>;
|
|
142
187
|
holdExpiresAt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
143
188
|
confirmedAt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
144
189
|
expiredAt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
@@ -155,6 +200,7 @@ export declare const bookingListQuerySchema: z.ZodObject<{
|
|
|
155
200
|
cancelled: "cancelled";
|
|
156
201
|
draft: "draft";
|
|
157
202
|
on_hold: "on_hold";
|
|
203
|
+
awaiting_payment: "awaiting_payment";
|
|
158
204
|
confirmed: "confirmed";
|
|
159
205
|
in_progress: "in_progress";
|
|
160
206
|
completed: "completed";
|
|
@@ -264,7 +310,21 @@ export declare const reserveBookingSchema: z.ZodObject<{
|
|
|
264
310
|
marginPercent: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
265
311
|
pax: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
266
312
|
internalNotes: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
267
|
-
|
|
313
|
+
customerPaymentPolicy: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
314
|
+
deposit: z.ZodObject<{
|
|
315
|
+
kind: z.ZodEnum<{
|
|
316
|
+
percent: "percent";
|
|
317
|
+
none: "none";
|
|
318
|
+
fixed_cents: "fixed_cents";
|
|
319
|
+
}>;
|
|
320
|
+
percent: z.ZodOptional<z.ZodNumber>;
|
|
321
|
+
amountCents: z.ZodOptional<z.ZodNumber>;
|
|
322
|
+
}, z.core.$strip>;
|
|
323
|
+
minDaysBeforeDepartureForDeposit: z.ZodNumber;
|
|
324
|
+
balanceDueDaysBeforeDeparture: z.ZodNumber;
|
|
325
|
+
balanceDueMinDaysFromNow: z.ZodNumber;
|
|
326
|
+
}, z.core.$strip>>>;
|
|
327
|
+
holdMinutes: z.ZodOptional<z.ZodNumber>;
|
|
268
328
|
holdExpiresAt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
269
329
|
items: z.ZodArray<z.ZodObject<{
|
|
270
330
|
title: z.ZodString;
|
|
@@ -338,6 +398,7 @@ export declare const overrideBookingStatusSchema: z.ZodObject<{
|
|
|
338
398
|
cancelled: "cancelled";
|
|
339
399
|
draft: "draft";
|
|
340
400
|
on_hold: "on_hold";
|
|
401
|
+
awaiting_payment: "awaiting_payment";
|
|
341
402
|
confirmed: "confirmed";
|
|
342
403
|
in_progress: "in_progress";
|
|
343
404
|
completed: "completed";
|
|
@@ -368,7 +429,7 @@ export declare const reserveBookingFromTransactionSchema: z.ZodObject<{
|
|
|
368
429
|
ota: "ota";
|
|
369
430
|
api_partner: "api_partner";
|
|
370
431
|
}>>;
|
|
371
|
-
holdMinutes: z.
|
|
432
|
+
holdMinutes: z.ZodOptional<z.ZodNumber>;
|
|
372
433
|
holdExpiresAt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
373
434
|
note: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
374
435
|
includeParticipants: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -679,10 +740,10 @@ export declare const insertBookingFulfillmentSchema: z.ZodPipe<z.ZodObject<{
|
|
|
679
740
|
}>;
|
|
680
741
|
status: z.ZodDefault<z.ZodEnum<{
|
|
681
742
|
pending: "pending";
|
|
743
|
+
failed: "failed";
|
|
682
744
|
issued: "issued";
|
|
683
745
|
reissued: "reissued";
|
|
684
746
|
revoked: "revoked";
|
|
685
|
-
failed: "failed";
|
|
686
747
|
}>>;
|
|
687
748
|
artifactUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
688
749
|
payload: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
@@ -692,7 +753,7 @@ export declare const insertBookingFulfillmentSchema: z.ZodPipe<z.ZodObject<{
|
|
|
692
753
|
travelerId: string | null;
|
|
693
754
|
fulfillmentType: "other" | "voucher" | "ticket" | "pdf" | "qr_code" | "barcode" | "mobile";
|
|
694
755
|
deliveryChannel: "email" | "other" | "download" | "api" | "wallet";
|
|
695
|
-
status: "pending" | "
|
|
756
|
+
status: "pending" | "failed" | "issued" | "reissued" | "revoked";
|
|
696
757
|
bookingItemId?: string | null | undefined;
|
|
697
758
|
artifactUrl?: string | null | undefined;
|
|
698
759
|
payload?: Record<string, unknown> | null | undefined;
|
|
@@ -701,7 +762,7 @@ export declare const insertBookingFulfillmentSchema: z.ZodPipe<z.ZodObject<{
|
|
|
701
762
|
}, {
|
|
702
763
|
fulfillmentType: "other" | "voucher" | "ticket" | "pdf" | "qr_code" | "barcode" | "mobile";
|
|
703
764
|
deliveryChannel: "email" | "other" | "download" | "api" | "wallet";
|
|
704
|
-
status: "pending" | "
|
|
765
|
+
status: "pending" | "failed" | "issued" | "reissued" | "revoked";
|
|
705
766
|
bookingItemId?: string | null | undefined;
|
|
706
767
|
travelerId?: string | null | undefined;
|
|
707
768
|
artifactUrl?: string | null | undefined;
|
|
@@ -730,10 +791,10 @@ export declare const updateBookingFulfillmentSchema: z.ZodPipe<z.ZodObject<{
|
|
|
730
791
|
}>>;
|
|
731
792
|
status: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
732
793
|
pending: "pending";
|
|
794
|
+
failed: "failed";
|
|
733
795
|
issued: "issued";
|
|
734
796
|
reissued: "reissued";
|
|
735
797
|
revoked: "revoked";
|
|
736
|
-
failed: "failed";
|
|
737
798
|
}>>>;
|
|
738
799
|
artifactUrl: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
739
800
|
payload: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
|
|
@@ -744,7 +805,7 @@ export declare const updateBookingFulfillmentSchema: z.ZodPipe<z.ZodObject<{
|
|
|
744
805
|
bookingItemId?: string | null | undefined;
|
|
745
806
|
fulfillmentType?: "other" | "voucher" | "ticket" | "pdf" | "qr_code" | "barcode" | "mobile" | undefined;
|
|
746
807
|
deliveryChannel?: "email" | "other" | "download" | "api" | "wallet" | undefined;
|
|
747
|
-
status?: "pending" | "
|
|
808
|
+
status?: "pending" | "failed" | "issued" | "reissued" | "revoked" | undefined;
|
|
748
809
|
artifactUrl?: string | null | undefined;
|
|
749
810
|
payload?: Record<string, unknown> | null | undefined;
|
|
750
811
|
issuedAt?: string | null | undefined;
|
|
@@ -754,7 +815,7 @@ export declare const updateBookingFulfillmentSchema: z.ZodPipe<z.ZodObject<{
|
|
|
754
815
|
travelerId?: string | null | undefined;
|
|
755
816
|
fulfillmentType?: "other" | "voucher" | "ticket" | "pdf" | "qr_code" | "barcode" | "mobile" | undefined;
|
|
756
817
|
deliveryChannel?: "email" | "other" | "download" | "api" | "wallet" | undefined;
|
|
757
|
-
status?: "pending" | "
|
|
818
|
+
status?: "pending" | "failed" | "issued" | "reissued" | "revoked" | undefined;
|
|
758
819
|
artifactUrl?: string | null | undefined;
|
|
759
820
|
payload?: Record<string, unknown> | null | undefined;
|
|
760
821
|
issuedAt?: string | null | undefined;
|
package/dist/validation.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../src/validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../src/validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAyEvB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAoB,CAAA;AACpD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAA8B,CAAA;AAE9D,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAW5B,CAAA;AAEJ,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;iBASjC,CAAA;AAEF,eAAO,MAAM,4BAA4B;;;iBAGvC,CAAA;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;iBAQ/B,CAAA;AAEF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;;;;iBAI/B,CAAA;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;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ED
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { bookingAllocationStatusSchema, bookingAllocationTypeSchema, bookingDocumentTypeSchema, bookingFulfillmentDeliveryChannelSchema, bookingFulfillmentStatusSchema, bookingFulfillmentTypeSchema, bookingItemParticipantRoleSchema, bookingItemStatusSchema, bookingItemTypeSchema, bookingParticipantTypeSchema, bookingRedemptionMethodSchema, bookingSourceTypeSchema, bookingStatusSchema, bookingTravelerCategorySchema, supplierConfirmationStatusSchema, } from "./validation-shared.js";
|
|
3
3
|
// ---------- bookings ----------
|
|
4
|
+
const bookingDepositRuleSchema = z.object({
|
|
5
|
+
kind: z.enum(["none", "percent", "fixed_cents"]),
|
|
6
|
+
percent: z.number().min(0).max(100).optional(),
|
|
7
|
+
amountCents: z.number().int().min(0).optional(),
|
|
8
|
+
});
|
|
9
|
+
const bookingCustomerPaymentPolicySchema = z.object({
|
|
10
|
+
deposit: bookingDepositRuleSchema,
|
|
11
|
+
minDaysBeforeDepartureForDeposit: z.number().int().min(0),
|
|
12
|
+
balanceDueDaysBeforeDeparture: z.number().int().min(0),
|
|
13
|
+
balanceDueMinDaysFromNow: z.number().int().min(0),
|
|
14
|
+
});
|
|
4
15
|
const bookingCoreSchema = z.object({
|
|
5
16
|
bookingNumber: z.string().min(1).max(50),
|
|
6
17
|
status: bookingStatusSchema.default("draft"),
|
|
@@ -30,6 +41,7 @@ const bookingCoreSchema = z.object({
|
|
|
30
41
|
endDate: z.string().optional().nullable(),
|
|
31
42
|
pax: z.number().int().positive().optional().nullable(),
|
|
32
43
|
internalNotes: z.string().optional().nullable(),
|
|
44
|
+
customerPaymentPolicy: bookingCustomerPaymentPolicySchema.optional().nullable(),
|
|
33
45
|
holdExpiresAt: z.string().datetime().optional().nullable(),
|
|
34
46
|
confirmedAt: z.string().datetime().optional().nullable(),
|
|
35
47
|
expiredAt: z.string().datetime().optional().nullable(),
|
|
@@ -122,7 +134,7 @@ export const reserveBookingSchema = bookingCoreSchema
|
|
|
122
134
|
.int()
|
|
123
135
|
.positive()
|
|
124
136
|
.max(24 * 60)
|
|
125
|
-
.
|
|
137
|
+
.optional(),
|
|
126
138
|
holdExpiresAt: z.string().datetime().optional().nullable(),
|
|
127
139
|
items: z.array(reserveBookingItemSchema).min(1),
|
|
128
140
|
});
|
|
@@ -192,7 +204,7 @@ export const reserveBookingFromTransactionSchema = bookingCoreSchema
|
|
|
192
204
|
.int()
|
|
193
205
|
.positive()
|
|
194
206
|
.max(24 * 60)
|
|
195
|
-
.
|
|
207
|
+
.optional(),
|
|
196
208
|
holdExpiresAt: z.string().datetime().optional().nullable(),
|
|
197
209
|
note: z.string().optional().nullable(),
|
|
198
210
|
includeParticipants: z.boolean().default(true),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyantjs/bookings",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -59,15 +59,14 @@
|
|
|
59
59
|
"drizzle-orm": "^0.45.2",
|
|
60
60
|
"hono": "^4.12.10",
|
|
61
61
|
"zod": "^4.3.6",
|
|
62
|
-
"@voyantjs/core": "0.
|
|
63
|
-
"@voyantjs/db": "0.
|
|
64
|
-
"@voyantjs/hono": "0.
|
|
65
|
-
"@voyantjs/utils": "0.
|
|
62
|
+
"@voyantjs/core": "0.21.0",
|
|
63
|
+
"@voyantjs/db": "0.21.0",
|
|
64
|
+
"@voyantjs/hono": "0.21.0",
|
|
65
|
+
"@voyantjs/utils": "0.21.0"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"typescript": "^6.0.2",
|
|
69
|
-
"@voyantjs/
|
|
70
|
-
"@voyantjs/products": "0.19.0",
|
|
69
|
+
"@voyantjs/products": "0.21.0",
|
|
71
70
|
"@voyantjs/voyant-typescript-config": "0.1.0"
|
|
72
71
|
},
|
|
73
72
|
"files": [
|