@voyantjs/bookings 0.20.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
package/dist/routes.d.ts
CHANGED
|
@@ -6,9 +6,11 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, ({
|
|
|
6
6
|
input: {};
|
|
7
7
|
output: {
|
|
8
8
|
data: {
|
|
9
|
+
startsAt: string | null;
|
|
10
|
+
endsAt: string | null;
|
|
9
11
|
id: string;
|
|
10
12
|
bookingNumber: string;
|
|
11
|
-
status: "cancelled" | "draft" | "on_hold" | "confirmed" | "in_progress" | "completed" | "expired";
|
|
13
|
+
status: "cancelled" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress" | "completed" | "expired";
|
|
12
14
|
personId: string | null;
|
|
13
15
|
organizationId: string | null;
|
|
14
16
|
sourceType: "internal" | "reseller" | "direct" | "manual" | "affiliate" | "ota" | "api_partner";
|
|
@@ -36,11 +38,14 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, ({
|
|
|
36
38
|
endDate: string | null;
|
|
37
39
|
pax: number | null;
|
|
38
40
|
internalNotes: string | null;
|
|
41
|
+
customerPaymentPolicy: import("hono/utils/types").JSONValue;
|
|
39
42
|
holdExpiresAt: string | null;
|
|
40
43
|
confirmedAt: string | null;
|
|
41
44
|
expiredAt: string | null;
|
|
42
45
|
cancelledAt: string | null;
|
|
43
46
|
completedAt: string | null;
|
|
47
|
+
awaitingPaymentAt: string | null;
|
|
48
|
+
paidAt: string | null;
|
|
44
49
|
redeemedAt: string | null;
|
|
45
50
|
createdAt: string;
|
|
46
51
|
updatedAt: string;
|
|
@@ -150,7 +155,7 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, ({
|
|
|
150
155
|
data: {
|
|
151
156
|
bookingId: string;
|
|
152
157
|
bookingNumber: string;
|
|
153
|
-
status: "cancelled" | "draft" | "on_hold" | "confirmed" | "in_progress" | "completed" | "expired";
|
|
158
|
+
status: "cancelled" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress" | "completed" | "expired";
|
|
154
159
|
sellCurrency: string;
|
|
155
160
|
sellAmountCents: number | null;
|
|
156
161
|
startDate: string | null;
|
|
@@ -207,7 +212,7 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, ({
|
|
|
207
212
|
travelerId: string | null;
|
|
208
213
|
fulfillmentType: "other" | "voucher" | "ticket" | "pdf" | "qr_code" | "barcode" | "mobile";
|
|
209
214
|
deliveryChannel: "email" | "other" | "download" | "api" | "wallet";
|
|
210
|
-
status: "pending" | "
|
|
215
|
+
status: "pending" | "failed" | "issued" | "reissued" | "revoked";
|
|
211
216
|
artifactUrl: string | null;
|
|
212
217
|
}[];
|
|
213
218
|
};
|
|
@@ -239,7 +244,7 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, ({
|
|
|
239
244
|
data: {
|
|
240
245
|
id: string;
|
|
241
246
|
bookingNumber: string;
|
|
242
|
-
status: "cancelled" | "draft" | "on_hold" | "confirmed" | "in_progress" | "completed" | "expired";
|
|
247
|
+
status: "cancelled" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress" | "completed" | "expired";
|
|
243
248
|
personId: string | null;
|
|
244
249
|
organizationId: string | null;
|
|
245
250
|
sourceType: "internal" | "reseller" | "direct" | "manual" | "affiliate" | "ota" | "api_partner";
|
|
@@ -267,11 +272,14 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, ({
|
|
|
267
272
|
endDate: string | null;
|
|
268
273
|
pax: number | null;
|
|
269
274
|
internalNotes: string | null;
|
|
275
|
+
customerPaymentPolicy: import("hono/utils/types").JSONValue;
|
|
270
276
|
holdExpiresAt: string | null;
|
|
271
277
|
confirmedAt: string | null;
|
|
272
278
|
expiredAt: string | null;
|
|
273
279
|
cancelledAt: string | null;
|
|
274
280
|
completedAt: string | null;
|
|
281
|
+
awaitingPaymentAt: string | null;
|
|
282
|
+
paidAt: string | null;
|
|
275
283
|
redeemedAt: string | null;
|
|
276
284
|
createdAt: string;
|
|
277
285
|
updatedAt: string;
|
|
@@ -288,7 +296,7 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, ({
|
|
|
288
296
|
output: {
|
|
289
297
|
data: {
|
|
290
298
|
id: string;
|
|
291
|
-
status: "cancelled" | "draft" | "on_hold" | "confirmed" | "in_progress" | "completed" | "expired";
|
|
299
|
+
status: "cancelled" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress" | "completed" | "expired";
|
|
292
300
|
createdAt: string;
|
|
293
301
|
updatedAt: string;
|
|
294
302
|
organizationId: string | null;
|
|
@@ -320,11 +328,14 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, ({
|
|
|
320
328
|
marginPercent: number | null;
|
|
321
329
|
pax: number | null;
|
|
322
330
|
internalNotes: string | null;
|
|
331
|
+
customerPaymentPolicy: import("hono/utils/types").JSONValue;
|
|
323
332
|
holdExpiresAt: string | null;
|
|
324
333
|
confirmedAt: string | null;
|
|
325
334
|
expiredAt: string | null;
|
|
326
335
|
cancelledAt: string | null;
|
|
327
336
|
completedAt: string | null;
|
|
337
|
+
awaitingPaymentAt: string | null;
|
|
338
|
+
paidAt: string | null;
|
|
328
339
|
};
|
|
329
340
|
};
|
|
330
341
|
outputFormat: "json";
|
|
@@ -366,7 +377,7 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, ({
|
|
|
366
377
|
output: {
|
|
367
378
|
data: {
|
|
368
379
|
id: string;
|
|
369
|
-
status: "cancelled" | "draft" | "on_hold" | "confirmed" | "in_progress" | "completed" | "expired";
|
|
380
|
+
status: "cancelled" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress" | "completed" | "expired";
|
|
370
381
|
createdAt: string;
|
|
371
382
|
updatedAt: string;
|
|
372
383
|
organizationId: string | null;
|
|
@@ -398,11 +409,14 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, ({
|
|
|
398
409
|
marginPercent: number | null;
|
|
399
410
|
pax: number | null;
|
|
400
411
|
internalNotes: string | null;
|
|
412
|
+
customerPaymentPolicy: import("hono/utils/types").JSONValue;
|
|
401
413
|
holdExpiresAt: string | null;
|
|
402
414
|
confirmedAt: string | null;
|
|
403
415
|
expiredAt: string | null;
|
|
404
416
|
cancelledAt: string | null;
|
|
405
417
|
completedAt: string | null;
|
|
418
|
+
awaitingPaymentAt: string | null;
|
|
419
|
+
paidAt: string | null;
|
|
406
420
|
};
|
|
407
421
|
};
|
|
408
422
|
outputFormat: "json";
|
|
@@ -512,7 +526,7 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, ({
|
|
|
512
526
|
output: {
|
|
513
527
|
data: {
|
|
514
528
|
id: string;
|
|
515
|
-
status: "cancelled" | "draft" | "on_hold" | "confirmed" | "in_progress" | "completed" | "expired";
|
|
529
|
+
status: "cancelled" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress" | "completed" | "expired";
|
|
516
530
|
createdAt: string;
|
|
517
531
|
updatedAt: string;
|
|
518
532
|
organizationId: string | null;
|
|
@@ -544,11 +558,14 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, ({
|
|
|
544
558
|
marginPercent: number | null;
|
|
545
559
|
pax: number | null;
|
|
546
560
|
internalNotes: string | null;
|
|
561
|
+
customerPaymentPolicy: import("hono/utils/types").JSONValue;
|
|
547
562
|
holdExpiresAt: string | null;
|
|
548
563
|
confirmedAt: string | null;
|
|
549
564
|
expiredAt: string | null;
|
|
550
565
|
cancelledAt: string | null;
|
|
551
566
|
completedAt: string | null;
|
|
567
|
+
awaitingPaymentAt: string | null;
|
|
568
|
+
paidAt: string | null;
|
|
552
569
|
} | null;
|
|
553
570
|
};
|
|
554
571
|
outputFormat: "json";
|
|
@@ -586,7 +603,7 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, ({
|
|
|
586
603
|
data: {
|
|
587
604
|
id: string;
|
|
588
605
|
bookingNumber: string;
|
|
589
|
-
status: "cancelled" | "draft" | "on_hold" | "confirmed" | "in_progress" | "completed" | "expired";
|
|
606
|
+
status: "cancelled" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress" | "completed" | "expired";
|
|
590
607
|
personId: string | null;
|
|
591
608
|
organizationId: string | null;
|
|
592
609
|
sourceType: "internal" | "reseller" | "direct" | "manual" | "affiliate" | "ota" | "api_partner";
|
|
@@ -614,11 +631,14 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, ({
|
|
|
614
631
|
endDate: string | null;
|
|
615
632
|
pax: number | null;
|
|
616
633
|
internalNotes: string | null;
|
|
634
|
+
customerPaymentPolicy: import("hono/utils/types").JSONValue;
|
|
617
635
|
holdExpiresAt: string | null;
|
|
618
636
|
confirmedAt: string | null;
|
|
619
637
|
expiredAt: string | null;
|
|
620
638
|
cancelledAt: string | null;
|
|
621
639
|
completedAt: string | null;
|
|
640
|
+
awaitingPaymentAt: string | null;
|
|
641
|
+
paidAt: string | null;
|
|
622
642
|
redeemedAt: string | null;
|
|
623
643
|
createdAt: string;
|
|
624
644
|
updatedAt: string;
|
|
@@ -688,7 +708,7 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, ({
|
|
|
688
708
|
data: {
|
|
689
709
|
id: string;
|
|
690
710
|
bookingNumber: string;
|
|
691
|
-
status: "cancelled" | "draft" | "on_hold" | "confirmed" | "in_progress" | "completed" | "expired";
|
|
711
|
+
status: "cancelled" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress" | "completed" | "expired";
|
|
692
712
|
personId: string | null;
|
|
693
713
|
organizationId: string | null;
|
|
694
714
|
sourceType: "internal" | "reseller" | "direct" | "manual" | "affiliate" | "ota" | "api_partner";
|
|
@@ -716,11 +736,14 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, ({
|
|
|
716
736
|
endDate: string | null;
|
|
717
737
|
pax: number | null;
|
|
718
738
|
internalNotes: string | null;
|
|
739
|
+
customerPaymentPolicy: import("hono/utils/types").JSONValue;
|
|
719
740
|
holdExpiresAt: string | null;
|
|
720
741
|
confirmedAt: string | null;
|
|
721
742
|
expiredAt: string | null;
|
|
722
743
|
cancelledAt: string | null;
|
|
723
744
|
completedAt: string | null;
|
|
745
|
+
awaitingPaymentAt: string | null;
|
|
746
|
+
paidAt: string | null;
|
|
724
747
|
redeemedAt: string | null;
|
|
725
748
|
createdAt: string;
|
|
726
749
|
updatedAt: string;
|
|
@@ -775,7 +798,7 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, ({
|
|
|
775
798
|
data: {
|
|
776
799
|
id: string;
|
|
777
800
|
bookingNumber: string;
|
|
778
|
-
status: "cancelled" | "draft" | "on_hold" | "confirmed" | "in_progress" | "completed" | "expired";
|
|
801
|
+
status: "cancelled" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress" | "completed" | "expired";
|
|
779
802
|
personId: string | null;
|
|
780
803
|
organizationId: string | null;
|
|
781
804
|
sourceType: "internal" | "reseller" | "direct" | "manual" | "affiliate" | "ota" | "api_partner";
|
|
@@ -803,11 +826,14 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, ({
|
|
|
803
826
|
endDate: string | null;
|
|
804
827
|
pax: number | null;
|
|
805
828
|
internalNotes: string | null;
|
|
829
|
+
customerPaymentPolicy: import("hono/utils/types").JSONValue;
|
|
806
830
|
holdExpiresAt: string | null;
|
|
807
831
|
confirmedAt: string | null;
|
|
808
832
|
expiredAt: string | null;
|
|
809
833
|
cancelledAt: string | null;
|
|
810
834
|
completedAt: string | null;
|
|
835
|
+
awaitingPaymentAt: string | null;
|
|
836
|
+
paidAt: string | null;
|
|
811
837
|
redeemedAt: string | null;
|
|
812
838
|
createdAt: string;
|
|
813
839
|
updatedAt: string;
|
|
@@ -862,7 +888,7 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, ({
|
|
|
862
888
|
data: {
|
|
863
889
|
id: string;
|
|
864
890
|
bookingNumber: string;
|
|
865
|
-
status: "cancelled" | "draft" | "on_hold" | "confirmed" | "in_progress" | "completed" | "expired";
|
|
891
|
+
status: "cancelled" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress" | "completed" | "expired";
|
|
866
892
|
personId: string | null;
|
|
867
893
|
organizationId: string | null;
|
|
868
894
|
sourceType: "internal" | "reseller" | "direct" | "manual" | "affiliate" | "ota" | "api_partner";
|
|
@@ -890,11 +916,14 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, ({
|
|
|
890
916
|
endDate: string | null;
|
|
891
917
|
pax: number | null;
|
|
892
918
|
internalNotes: string | null;
|
|
919
|
+
customerPaymentPolicy: import("hono/utils/types").JSONValue;
|
|
893
920
|
holdExpiresAt: string | null;
|
|
894
921
|
confirmedAt: string | null;
|
|
895
922
|
expiredAt: string | null;
|
|
896
923
|
cancelledAt: string | null;
|
|
897
924
|
completedAt: string | null;
|
|
925
|
+
awaitingPaymentAt: string | null;
|
|
926
|
+
paidAt: string | null;
|
|
898
927
|
redeemedAt: string | null;
|
|
899
928
|
createdAt: string;
|
|
900
929
|
updatedAt: string;
|
|
@@ -962,7 +991,7 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, ({
|
|
|
962
991
|
data: {
|
|
963
992
|
id: string;
|
|
964
993
|
bookingNumber: string;
|
|
965
|
-
status: "cancelled" | "draft" | "on_hold" | "confirmed" | "in_progress" | "completed" | "expired";
|
|
994
|
+
status: "cancelled" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress" | "completed" | "expired";
|
|
966
995
|
personId: string | null;
|
|
967
996
|
organizationId: string | null;
|
|
968
997
|
sourceType: "internal" | "reseller" | "direct" | "manual" | "affiliate" | "ota" | "api_partner";
|
|
@@ -990,11 +1019,14 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, ({
|
|
|
990
1019
|
endDate: string | null;
|
|
991
1020
|
pax: number | null;
|
|
992
1021
|
internalNotes: string | null;
|
|
1022
|
+
customerPaymentPolicy: import("hono/utils/types").JSONValue;
|
|
993
1023
|
holdExpiresAt: string | null;
|
|
994
1024
|
confirmedAt: string | null;
|
|
995
1025
|
expiredAt: string | null;
|
|
996
1026
|
cancelledAt: string | null;
|
|
997
1027
|
completedAt: string | null;
|
|
1028
|
+
awaitingPaymentAt: string | null;
|
|
1029
|
+
paidAt: string | null;
|
|
998
1030
|
redeemedAt: string | null;
|
|
999
1031
|
createdAt: string;
|
|
1000
1032
|
updatedAt: string;
|
|
@@ -1049,7 +1081,7 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, ({
|
|
|
1049
1081
|
data: {
|
|
1050
1082
|
id: string;
|
|
1051
1083
|
bookingNumber: string;
|
|
1052
|
-
status: "cancelled" | "draft" | "on_hold" | "confirmed" | "in_progress" | "completed" | "expired";
|
|
1084
|
+
status: "cancelled" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress" | "completed" | "expired";
|
|
1053
1085
|
personId: string | null;
|
|
1054
1086
|
organizationId: string | null;
|
|
1055
1087
|
sourceType: "internal" | "reseller" | "direct" | "manual" | "affiliate" | "ota" | "api_partner";
|
|
@@ -1077,11 +1109,14 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, ({
|
|
|
1077
1109
|
endDate: string | null;
|
|
1078
1110
|
pax: number | null;
|
|
1079
1111
|
internalNotes: string | null;
|
|
1112
|
+
customerPaymentPolicy: import("hono/utils/types").JSONValue;
|
|
1080
1113
|
holdExpiresAt: string | null;
|
|
1081
1114
|
confirmedAt: string | null;
|
|
1082
1115
|
expiredAt: string | null;
|
|
1083
1116
|
cancelledAt: string | null;
|
|
1084
1117
|
completedAt: string | null;
|
|
1118
|
+
awaitingPaymentAt: string | null;
|
|
1119
|
+
paidAt: string | null;
|
|
1085
1120
|
redeemedAt: string | null;
|
|
1086
1121
|
createdAt: string;
|
|
1087
1122
|
updatedAt: string;
|
|
@@ -1136,7 +1171,7 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, ({
|
|
|
1136
1171
|
data: {
|
|
1137
1172
|
id: string;
|
|
1138
1173
|
bookingNumber: string;
|
|
1139
|
-
status: "cancelled" | "draft" | "on_hold" | "confirmed" | "in_progress" | "completed" | "expired";
|
|
1174
|
+
status: "cancelled" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress" | "completed" | "expired";
|
|
1140
1175
|
personId: string | null;
|
|
1141
1176
|
organizationId: string | null;
|
|
1142
1177
|
sourceType: "internal" | "reseller" | "direct" | "manual" | "affiliate" | "ota" | "api_partner";
|
|
@@ -1164,11 +1199,14 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, ({
|
|
|
1164
1199
|
endDate: string | null;
|
|
1165
1200
|
pax: number | null;
|
|
1166
1201
|
internalNotes: string | null;
|
|
1202
|
+
customerPaymentPolicy: import("hono/utils/types").JSONValue;
|
|
1167
1203
|
holdExpiresAt: string | null;
|
|
1168
1204
|
confirmedAt: string | null;
|
|
1169
1205
|
expiredAt: string | null;
|
|
1170
1206
|
cancelledAt: string | null;
|
|
1171
1207
|
completedAt: string | null;
|
|
1208
|
+
awaitingPaymentAt: string | null;
|
|
1209
|
+
paidAt: string | null;
|
|
1172
1210
|
redeemedAt: string | null;
|
|
1173
1211
|
createdAt: string;
|
|
1174
1212
|
updatedAt: string;
|
|
@@ -1212,7 +1250,7 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, ({
|
|
|
1212
1250
|
data: {
|
|
1213
1251
|
id: string;
|
|
1214
1252
|
bookingNumber: string;
|
|
1215
|
-
status: "cancelled" | "draft" | "on_hold" | "confirmed" | "in_progress" | "completed" | "expired";
|
|
1253
|
+
status: "cancelled" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress" | "completed" | "expired";
|
|
1216
1254
|
personId: string | null;
|
|
1217
1255
|
organizationId: string | null;
|
|
1218
1256
|
sourceType: "internal" | "reseller" | "direct" | "manual" | "affiliate" | "ota" | "api_partner";
|
|
@@ -1240,11 +1278,14 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, ({
|
|
|
1240
1278
|
endDate: string | null;
|
|
1241
1279
|
pax: number | null;
|
|
1242
1280
|
internalNotes: string | null;
|
|
1281
|
+
customerPaymentPolicy: import("hono/utils/types").JSONValue;
|
|
1243
1282
|
holdExpiresAt: string | null;
|
|
1244
1283
|
confirmedAt: string | null;
|
|
1245
1284
|
expiredAt: string | null;
|
|
1246
1285
|
cancelledAt: string | null;
|
|
1247
1286
|
completedAt: string | null;
|
|
1287
|
+
awaitingPaymentAt: string | null;
|
|
1288
|
+
paidAt: string | null;
|
|
1248
1289
|
redeemedAt: string | null;
|
|
1249
1290
|
createdAt: string;
|
|
1250
1291
|
updatedAt: string;
|
|
@@ -1330,6 +1371,21 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, ({
|
|
|
1330
1371
|
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
1331
1372
|
};
|
|
1332
1373
|
};
|
|
1374
|
+
} & {
|
|
1375
|
+
"/:id/travelers/:travelerId/reveal": {
|
|
1376
|
+
$get: {
|
|
1377
|
+
input: {
|
|
1378
|
+
param: {
|
|
1379
|
+
id: string;
|
|
1380
|
+
} & {
|
|
1381
|
+
travelerId: string;
|
|
1382
|
+
};
|
|
1383
|
+
};
|
|
1384
|
+
output: {};
|
|
1385
|
+
outputFormat: string;
|
|
1386
|
+
status: import("hono/utils/http-status").StatusCode;
|
|
1387
|
+
};
|
|
1388
|
+
};
|
|
1333
1389
|
} & {
|
|
1334
1390
|
"/:id/travelers/:travelerId/travel-details": {
|
|
1335
1391
|
$get: {
|
|
@@ -1900,7 +1956,7 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, ({
|
|
|
1900
1956
|
travelerId: string | null;
|
|
1901
1957
|
fulfillmentType: "other" | "voucher" | "ticket" | "pdf" | "qr_code" | "barcode" | "mobile";
|
|
1902
1958
|
deliveryChannel: "email" | "other" | "download" | "api" | "wallet";
|
|
1903
|
-
status: "pending" | "
|
|
1959
|
+
status: "pending" | "failed" | "issued" | "reissued" | "revoked";
|
|
1904
1960
|
artifactUrl: string | null;
|
|
1905
1961
|
payload: {
|
|
1906
1962
|
[x: string]: import("hono/utils/types").JSONValue;
|
|
@@ -1937,7 +1993,7 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, ({
|
|
|
1937
1993
|
output: {
|
|
1938
1994
|
data: {
|
|
1939
1995
|
id: string;
|
|
1940
|
-
status: "pending" | "
|
|
1996
|
+
status: "pending" | "failed" | "issued" | "reissued" | "revoked";
|
|
1941
1997
|
createdAt: string;
|
|
1942
1998
|
updatedAt: string;
|
|
1943
1999
|
bookingId: string;
|
|
@@ -1988,7 +2044,7 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, ({
|
|
|
1988
2044
|
travelerId: string | null;
|
|
1989
2045
|
fulfillmentType: "other" | "voucher" | "ticket" | "pdf" | "qr_code" | "barcode" | "mobile";
|
|
1990
2046
|
deliveryChannel: "email" | "other" | "download" | "api" | "wallet";
|
|
1991
|
-
status: "pending" | "
|
|
2047
|
+
status: "pending" | "failed" | "issued" | "reissued" | "revoked";
|
|
1992
2048
|
artifactUrl: string | null;
|
|
1993
2049
|
payload: {
|
|
1994
2050
|
[x: string]: import("hono/utils/types").JSONValue;
|
|
@@ -2083,7 +2139,7 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, ({
|
|
|
2083
2139
|
id: string;
|
|
2084
2140
|
bookingId: string;
|
|
2085
2141
|
actorId: string | null;
|
|
2086
|
-
activityType: "booking_created" | "booking_reserved" | "booking_converted" | "booking_confirmed" | "booking_started" | "booking_completed" | "hold_extended" | "hold_expired" | "status_change" | "status_overridden" | "item_update" | "allocation_released" | "fulfillment_issued" | "fulfillment_updated" | "redemption_recorded" | "supplier_update" | "passenger_update" | "note_added";
|
|
2142
|
+
activityType: "booking_created" | "booking_reserved" | "booking_converted" | "booking_confirmed" | "booking_started" | "booking_completed" | "hold_extended" | "hold_expired" | "status_change" | "status_overridden" | "item_update" | "allocation_released" | "fulfillment_issued" | "fulfillment_updated" | "redemption_recorded" | "supplier_update" | "passenger_update" | "note_added" | "system_action";
|
|
2087
2143
|
description: string;
|
|
2088
2144
|
metadata: {
|
|
2089
2145
|
[x: string]: import("hono/utils/types").JSONValue;
|
|
@@ -2381,7 +2437,7 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, ({
|
|
|
2381
2437
|
groupId: string;
|
|
2382
2438
|
booking: {
|
|
2383
2439
|
id: string;
|
|
2384
|
-
status: "cancelled" | "draft" | "on_hold" | "confirmed" | "in_progress" | "completed" | "expired";
|
|
2440
|
+
status: "cancelled" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress" | "completed" | "expired";
|
|
2385
2441
|
createdAt: string;
|
|
2386
2442
|
updatedAt: string;
|
|
2387
2443
|
organizationId: string | null;
|
|
@@ -2413,11 +2469,14 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, ({
|
|
|
2413
2469
|
marginPercent: number | null;
|
|
2414
2470
|
pax: number | null;
|
|
2415
2471
|
internalNotes: string | null;
|
|
2472
|
+
customerPaymentPolicy: import("hono/utils/types").JSONValue;
|
|
2416
2473
|
holdExpiresAt: string | null;
|
|
2417
2474
|
confirmedAt: string | null;
|
|
2418
2475
|
expiredAt: string | null;
|
|
2419
2476
|
cancelledAt: string | null;
|
|
2420
2477
|
completedAt: string | null;
|
|
2478
|
+
awaitingPaymentAt: string | null;
|
|
2479
|
+
paidAt: string | null;
|
|
2421
2480
|
} | null;
|
|
2422
2481
|
}[];
|
|
2423
2482
|
id: string;
|
|
@@ -2518,7 +2577,7 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, ({
|
|
|
2518
2577
|
groupId: string;
|
|
2519
2578
|
booking: {
|
|
2520
2579
|
id: string;
|
|
2521
|
-
status: "cancelled" | "draft" | "on_hold" | "confirmed" | "in_progress" | "completed" | "expired";
|
|
2580
|
+
status: "cancelled" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress" | "completed" | "expired";
|
|
2522
2581
|
createdAt: string;
|
|
2523
2582
|
updatedAt: string;
|
|
2524
2583
|
organizationId: string | null;
|
|
@@ -2550,11 +2609,14 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, ({
|
|
|
2550
2609
|
marginPercent: number | null;
|
|
2551
2610
|
pax: number | null;
|
|
2552
2611
|
internalNotes: string | null;
|
|
2612
|
+
customerPaymentPolicy: import("hono/utils/types").JSONValue;
|
|
2553
2613
|
holdExpiresAt: string | null;
|
|
2554
2614
|
confirmedAt: string | null;
|
|
2555
2615
|
expiredAt: string | null;
|
|
2556
2616
|
cancelledAt: string | null;
|
|
2557
2617
|
completedAt: string | null;
|
|
2618
|
+
awaitingPaymentAt: string | null;
|
|
2619
|
+
paidAt: string | null;
|
|
2558
2620
|
} | null;
|
|
2559
2621
|
}[];
|
|
2560
2622
|
};
|
package/dist/routes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../src/routes.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAC7D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAA;AAwM7C,eAAO,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../src/routes.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAC7D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAA;AAwM7C,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iDAo/Ba,CAAA;AAEvC,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAA;AAChD,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAA"}
|
package/dist/routes.js
CHANGED
|
@@ -449,6 +449,56 @@ export const bookingRoutes = new Hono()
|
|
|
449
449
|
if (reveal)
|
|
450
450
|
return c.json({ data: travelers });
|
|
451
451
|
return c.json({ data: travelers.map((row) => redactTravelerIdentity(row)) });
|
|
452
|
+
})
|
|
453
|
+
/**
|
|
454
|
+
* GET /:id/travelers/:travelerId/reveal
|
|
455
|
+
*
|
|
456
|
+
* Per-traveler unmasked read. The list endpoint masks PII for
|
|
457
|
+
* non-superuser staff; this endpoint reveals on a single click so
|
|
458
|
+
* the operator can confirm a phone / email when actually needed,
|
|
459
|
+
* with the access logged as `traveler_reveal`. Authorization uses
|
|
460
|
+
* the same policy as `/travel-details` (staff or `bookings-pii:read`
|
|
461
|
+
* scope), so it Just Works for the dashboard's normal staff session.
|
|
462
|
+
*
|
|
463
|
+
* Returns 404 when the traveler isn't found, 403 when the caller
|
|
464
|
+
* isn't authorized to see PII.
|
|
465
|
+
*/
|
|
466
|
+
.get("/:id/travelers/:travelerId/reveal", async (c) => {
|
|
467
|
+
const bookingId = c.req.param("id");
|
|
468
|
+
const travelerId = c.req.param("travelerId");
|
|
469
|
+
const auth = await authorizeBookingPiiAccess(c, {
|
|
470
|
+
bookingId,
|
|
471
|
+
travelerId,
|
|
472
|
+
action: "read",
|
|
473
|
+
});
|
|
474
|
+
if (!auth.allowed)
|
|
475
|
+
return auth.response;
|
|
476
|
+
const traveler = await bookingsService.getTravelerRecordById(c.get("db"), bookingId, travelerId);
|
|
477
|
+
if (!traveler) {
|
|
478
|
+
await logBookingPiiAccess(c, {
|
|
479
|
+
bookingId,
|
|
480
|
+
travelerId,
|
|
481
|
+
action: "read",
|
|
482
|
+
outcome: "denied",
|
|
483
|
+
reason: "traveler_not_found",
|
|
484
|
+
});
|
|
485
|
+
return c.json({ error: "Traveler not found" }, 404);
|
|
486
|
+
}
|
|
487
|
+
try {
|
|
488
|
+
const pii = await createAuditedBookingPiiService(c, traveler.bookingId);
|
|
489
|
+
const travelDetails = await pii.getTravelerTravelDetails(c.get("db"), traveler.id, c.get("userId"));
|
|
490
|
+
await logBookingPiiAccess(c, {
|
|
491
|
+
bookingId,
|
|
492
|
+
travelerId,
|
|
493
|
+
action: "read",
|
|
494
|
+
outcome: "allowed",
|
|
495
|
+
reason: "traveler_reveal",
|
|
496
|
+
});
|
|
497
|
+
return c.json({ data: { ...traveler, travelDetails } });
|
|
498
|
+
}
|
|
499
|
+
catch (error) {
|
|
500
|
+
return handleKmsConfigError(c, error);
|
|
501
|
+
}
|
|
452
502
|
})
|
|
453
503
|
.get("/:id/travelers/:travelerId/travel-details", async (c) => {
|
|
454
504
|
const auth = await authorizeBookingPiiAccess(c, {
|
package/dist/schema-core.d.ts
CHANGED
|
@@ -41,14 +41,14 @@ export declare const bookings: import("drizzle-orm/pg-core").PgTableWithColumns<
|
|
|
41
41
|
tableName: "bookings";
|
|
42
42
|
dataType: "string";
|
|
43
43
|
columnType: "PgEnumColumn";
|
|
44
|
-
data: "cancelled" | "draft" | "on_hold" | "confirmed" | "in_progress" | "completed" | "expired";
|
|
44
|
+
data: "cancelled" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress" | "completed" | "expired";
|
|
45
45
|
driverParam: string;
|
|
46
46
|
notNull: true;
|
|
47
47
|
hasDefault: true;
|
|
48
48
|
isPrimaryKey: false;
|
|
49
49
|
isAutoincrement: false;
|
|
50
50
|
hasRuntimeDefault: false;
|
|
51
|
-
enumValues: ["draft", "on_hold", "confirmed", "in_progress", "completed", "expired", "cancelled"];
|
|
51
|
+
enumValues: ["draft", "on_hold", "awaiting_payment", "confirmed", "in_progress", "completed", "expired", "cancelled"];
|
|
52
52
|
baseColumn: never;
|
|
53
53
|
identity: undefined;
|
|
54
54
|
generated: undefined;
|
|
@@ -512,6 +512,23 @@ export declare const bookings: import("drizzle-orm/pg-core").PgTableWithColumns<
|
|
|
512
512
|
identity: undefined;
|
|
513
513
|
generated: undefined;
|
|
514
514
|
}, {}, {}>;
|
|
515
|
+
customerPaymentPolicy: import("drizzle-orm/pg-core").PgColumn<{
|
|
516
|
+
name: "customer_payment_policy";
|
|
517
|
+
tableName: "bookings";
|
|
518
|
+
dataType: "json";
|
|
519
|
+
columnType: "PgJsonb";
|
|
520
|
+
data: unknown;
|
|
521
|
+
driverParam: unknown;
|
|
522
|
+
notNull: false;
|
|
523
|
+
hasDefault: false;
|
|
524
|
+
isPrimaryKey: false;
|
|
525
|
+
isAutoincrement: false;
|
|
526
|
+
hasRuntimeDefault: false;
|
|
527
|
+
enumValues: undefined;
|
|
528
|
+
baseColumn: never;
|
|
529
|
+
identity: undefined;
|
|
530
|
+
generated: undefined;
|
|
531
|
+
}, {}, {}>;
|
|
515
532
|
holdExpiresAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
516
533
|
name: "hold_expires_at";
|
|
517
534
|
tableName: "bookings";
|
|
@@ -597,6 +614,40 @@ export declare const bookings: import("drizzle-orm/pg-core").PgTableWithColumns<
|
|
|
597
614
|
identity: undefined;
|
|
598
615
|
generated: undefined;
|
|
599
616
|
}, {}, {}>;
|
|
617
|
+
awaitingPaymentAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
618
|
+
name: "awaiting_payment_at";
|
|
619
|
+
tableName: "bookings";
|
|
620
|
+
dataType: "date";
|
|
621
|
+
columnType: "PgTimestamp";
|
|
622
|
+
data: Date;
|
|
623
|
+
driverParam: string;
|
|
624
|
+
notNull: false;
|
|
625
|
+
hasDefault: false;
|
|
626
|
+
isPrimaryKey: false;
|
|
627
|
+
isAutoincrement: false;
|
|
628
|
+
hasRuntimeDefault: false;
|
|
629
|
+
enumValues: undefined;
|
|
630
|
+
baseColumn: never;
|
|
631
|
+
identity: undefined;
|
|
632
|
+
generated: undefined;
|
|
633
|
+
}, {}, {}>;
|
|
634
|
+
paidAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
635
|
+
name: "paid_at";
|
|
636
|
+
tableName: "bookings";
|
|
637
|
+
dataType: "date";
|
|
638
|
+
columnType: "PgTimestamp";
|
|
639
|
+
data: Date;
|
|
640
|
+
driverParam: string;
|
|
641
|
+
notNull: false;
|
|
642
|
+
hasDefault: false;
|
|
643
|
+
isPrimaryKey: false;
|
|
644
|
+
isAutoincrement: false;
|
|
645
|
+
hasRuntimeDefault: false;
|
|
646
|
+
enumValues: undefined;
|
|
647
|
+
baseColumn: never;
|
|
648
|
+
identity: undefined;
|
|
649
|
+
generated: undefined;
|
|
650
|
+
}, {}, {}>;
|
|
600
651
|
redeemedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
601
652
|
name: "redeemed_at";
|
|
602
653
|
tableName: "bookings";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-core.d.ts","sourceRoot":"","sources":["../src/schema-core.ts"],"names":[],"mappings":"AAuBA,eAAO,MAAM,QAAQ
|
|
1
|
+
{"version":3,"file":"schema-core.d.ts","sourceRoot":"","sources":["../src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;;;;;;;;;;;;;;EAoC5B,CAAA;AAED,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqB/B,CAAA;AAED,MAAM,MAAM,OAAO,GAAG,OAAO,QAAQ,CAAC,YAAY,CAAA;AAClD,MAAM,MAAM,UAAU,GAAG,OAAO,QAAQ,CAAC,YAAY,CAAA;AACrD,MAAM,MAAM,eAAe,GAAG,OAAO,gBAAgB,CAAC,YAAY,CAAA;AAClE,MAAM,MAAM,kBAAkB,GAAG,OAAO,gBAAgB,CAAC,YAAY,CAAA;AACrE,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAC,YAAY,CAAA;AACzE,MAAM,MAAM,sBAAsB,GAAG,OAAO,mBAAmB,CAAC,YAAY,CAAA"}
|
package/dist/schema-core.js
CHANGED
|
@@ -33,11 +33,26 @@ export const bookings = pgTable("bookings", {
|
|
|
33
33
|
endDate: date("end_date"),
|
|
34
34
|
pax: integer("pax"),
|
|
35
35
|
internalNotes: text("internal_notes"),
|
|
36
|
+
/**
|
|
37
|
+
* Booking-level customer payment policy override. When set, this
|
|
38
|
+
* booking's payment schedule uses these terms instead of the
|
|
39
|
+
* cascade default. Wins over listing / category / supplier /
|
|
40
|
+
* operator default. Shape mirrors `PaymentPolicy` from
|
|
41
|
+
* `@voyantjs/finance`.
|
|
42
|
+
*
|
|
43
|
+
* `null` means "use the resolved cascade policy" — most bookings
|
|
44
|
+
* never set this; it's reserved for ops adjustments where a
|
|
45
|
+
* specific deal warrants different terms (goodwill, channel-
|
|
46
|
+
* specific deal, etc.).
|
|
47
|
+
*/
|
|
48
|
+
customerPaymentPolicy: jsonb("customer_payment_policy"),
|
|
36
49
|
holdExpiresAt: timestamp("hold_expires_at", { withTimezone: true }),
|
|
37
50
|
confirmedAt: timestamp("confirmed_at", { withTimezone: true }),
|
|
38
51
|
expiredAt: timestamp("expired_at", { withTimezone: true }),
|
|
39
52
|
cancelledAt: timestamp("cancelled_at", { withTimezone: true }),
|
|
40
53
|
completedAt: timestamp("completed_at", { withTimezone: true }),
|
|
54
|
+
awaitingPaymentAt: timestamp("awaiting_payment_at", { withTimezone: true }),
|
|
55
|
+
paidAt: timestamp("paid_at", { withTimezone: true }),
|
|
41
56
|
redeemedAt: timestamp("redeemed_at", { withTimezone: true }),
|
|
42
57
|
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
43
58
|
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
|
package/dist/schema-items.d.ts
CHANGED
|
@@ -858,7 +858,7 @@ export declare const bookingFulfillments: import("drizzle-orm/pg-core").PgTableW
|
|
|
858
858
|
tableName: "booking_fulfillments";
|
|
859
859
|
dataType: "string";
|
|
860
860
|
columnType: "PgEnumColumn";
|
|
861
|
-
data: "pending" | "
|
|
861
|
+
data: "pending" | "failed" | "issued" | "reissued" | "revoked";
|
|
862
862
|
driverParam: string;
|
|
863
863
|
notNull: true;
|
|
864
864
|
hasDefault: true;
|