@voyantjs/bookings 0.52.2 → 0.52.4
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/README.md +16 -0
- package/dist/action-ledger-capabilities.d.ts +306 -0
- package/dist/action-ledger-capabilities.d.ts.map +1 -0
- package/dist/action-ledger-capabilities.js +92 -0
- package/dist/action-ledger-drift-remediation.d.ts +30 -0
- package/dist/action-ledger-drift-remediation.d.ts.map +1 -0
- package/dist/action-ledger-drift-remediation.js +85 -0
- package/dist/action-ledger-drift.d.ts +29 -0
- package/dist/action-ledger-drift.d.ts.map +1 -0
- package/dist/action-ledger-drift.js +217 -0
- package/dist/availability-ref.d.ts +2 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/routes-groups.d.ts +13 -13
- package/dist/routes-public.d.ts +9 -9
- package/dist/routes-shared.d.ts +13 -4
- package/dist/routes-shared.d.ts.map +1 -1
- package/dist/routes.d.ts +347 -663
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +1191 -49
- package/dist/schema-core.d.ts +3 -3
- package/dist/schema-items.d.ts +3 -3
- package/dist/service-public.d.ts +24 -24
- package/dist/service.d.ts +53 -45
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +93 -7
- package/dist/validation-public.d.ts +12 -12
- package/dist/validation-shared.d.ts +4 -4
- package/dist/validation.d.ts +20 -20
- package/package.json +22 -6
package/dist/schema-core.d.ts
CHANGED
|
@@ -50,7 +50,7 @@ export declare const bookings: import("drizzle-orm/pg-core").PgTableWithColumns<
|
|
|
50
50
|
tableName: "bookings";
|
|
51
51
|
dataType: "string";
|
|
52
52
|
columnType: "PgEnumColumn";
|
|
53
|
-
data: "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress"
|
|
53
|
+
data: "expired" | "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress";
|
|
54
54
|
driverParam: string;
|
|
55
55
|
notNull: true;
|
|
56
56
|
hasDefault: true;
|
|
@@ -1103,7 +1103,7 @@ export declare const bookingPiiAccessLog: import("drizzle-orm/pg-core").PgTableW
|
|
|
1103
1103
|
tableName: "booking_pii_access_log";
|
|
1104
1104
|
dataType: "string";
|
|
1105
1105
|
columnType: "PgEnumColumn";
|
|
1106
|
-
data: "
|
|
1106
|
+
data: "update" | "delete" | "read";
|
|
1107
1107
|
driverParam: string;
|
|
1108
1108
|
notNull: true;
|
|
1109
1109
|
hasDefault: false;
|
|
@@ -1120,7 +1120,7 @@ export declare const bookingPiiAccessLog: import("drizzle-orm/pg-core").PgTableW
|
|
|
1120
1120
|
tableName: "booking_pii_access_log";
|
|
1121
1121
|
dataType: "string";
|
|
1122
1122
|
columnType: "PgEnumColumn";
|
|
1123
|
-
data: "
|
|
1123
|
+
data: "denied" | "allowed";
|
|
1124
1124
|
driverParam: string;
|
|
1125
1125
|
notNull: true;
|
|
1126
1126
|
hasDefault: false;
|
package/dist/schema-items.d.ts
CHANGED
|
@@ -92,7 +92,7 @@ export declare const bookingItems: import("drizzle-orm/pg-core").PgTableWithColu
|
|
|
92
92
|
tableName: "booking_items";
|
|
93
93
|
dataType: "string";
|
|
94
94
|
columnType: "PgEnumColumn";
|
|
95
|
-
data: "
|
|
95
|
+
data: "expired" | "cancelled" | "draft" | "on_hold" | "confirmed" | "fulfilled";
|
|
96
96
|
driverParam: string;
|
|
97
97
|
notNull: true;
|
|
98
98
|
hasDefault: true;
|
|
@@ -628,7 +628,7 @@ export declare const bookingAllocations: import("drizzle-orm/pg-core").PgTableWi
|
|
|
628
628
|
tableName: "booking_allocations";
|
|
629
629
|
dataType: "string";
|
|
630
630
|
columnType: "PgEnumColumn";
|
|
631
|
-
data: "
|
|
631
|
+
data: "expired" | "cancelled" | "confirmed" | "fulfilled" | "held" | "released";
|
|
632
632
|
driverParam: string;
|
|
633
633
|
notNull: true;
|
|
634
634
|
hasDefault: true;
|
|
@@ -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: "
|
|
861
|
+
data: "failed" | "pending" | "issued" | "reissued" | "revoked";
|
|
862
862
|
driverParam: string;
|
|
863
863
|
notNull: true;
|
|
864
864
|
hasDefault: true;
|
package/dist/service-public.d.ts
CHANGED
|
@@ -63,7 +63,7 @@ export declare const publicBookingsService: {
|
|
|
63
63
|
session: {
|
|
64
64
|
sessionId: string;
|
|
65
65
|
bookingNumber: string;
|
|
66
|
-
status: "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress"
|
|
66
|
+
status: "expired" | "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress";
|
|
67
67
|
externalBookingRef: string | null;
|
|
68
68
|
communicationLanguage: string | null;
|
|
69
69
|
sellCurrency: string;
|
|
@@ -94,7 +94,7 @@ export declare const publicBookingsService: {
|
|
|
94
94
|
title: string;
|
|
95
95
|
description: string | null;
|
|
96
96
|
itemType: "service" | "other" | "unit" | "extra" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
|
|
97
|
-
status: "
|
|
97
|
+
status: "expired" | "cancelled" | "draft" | "on_hold" | "confirmed" | "fulfilled";
|
|
98
98
|
serviceDate: string | null;
|
|
99
99
|
startsAt: string | null;
|
|
100
100
|
endsAt: string | null;
|
|
@@ -127,7 +127,7 @@ export declare const publicBookingsService: {
|
|
|
127
127
|
availabilitySlotId: string | null;
|
|
128
128
|
quantity: number;
|
|
129
129
|
allocationType: "resource" | "unit" | "pickup";
|
|
130
|
-
status: "
|
|
130
|
+
status: "expired" | "cancelled" | "confirmed" | "fulfilled" | "held" | "released";
|
|
131
131
|
holdExpiresAt: string | null;
|
|
132
132
|
confirmedAt: string | null;
|
|
133
133
|
releasedAt: string | null;
|
|
@@ -154,7 +154,7 @@ export declare const publicBookingsService: {
|
|
|
154
154
|
getSessionById(db: PostgresJsDatabase, bookingId: string): Promise<{
|
|
155
155
|
sessionId: string;
|
|
156
156
|
bookingNumber: string;
|
|
157
|
-
status: "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress"
|
|
157
|
+
status: "expired" | "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress";
|
|
158
158
|
externalBookingRef: string | null;
|
|
159
159
|
communicationLanguage: string | null;
|
|
160
160
|
sellCurrency: string;
|
|
@@ -185,7 +185,7 @@ export declare const publicBookingsService: {
|
|
|
185
185
|
title: string;
|
|
186
186
|
description: string | null;
|
|
187
187
|
itemType: "service" | "other" | "unit" | "extra" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
|
|
188
|
-
status: "
|
|
188
|
+
status: "expired" | "cancelled" | "draft" | "on_hold" | "confirmed" | "fulfilled";
|
|
189
189
|
serviceDate: string | null;
|
|
190
190
|
startsAt: string | null;
|
|
191
191
|
endsAt: string | null;
|
|
@@ -218,7 +218,7 @@ export declare const publicBookingsService: {
|
|
|
218
218
|
availabilitySlotId: string | null;
|
|
219
219
|
quantity: number;
|
|
220
220
|
allocationType: "resource" | "unit" | "pickup";
|
|
221
|
-
status: "
|
|
221
|
+
status: "expired" | "cancelled" | "confirmed" | "fulfilled" | "held" | "released";
|
|
222
222
|
holdExpiresAt: string | null;
|
|
223
223
|
confirmedAt: string | null;
|
|
224
224
|
releasedAt: string | null;
|
|
@@ -274,7 +274,7 @@ export declare const publicBookingsService: {
|
|
|
274
274
|
session: {
|
|
275
275
|
sessionId: string;
|
|
276
276
|
bookingNumber: string;
|
|
277
|
-
status: "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress"
|
|
277
|
+
status: "expired" | "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress";
|
|
278
278
|
externalBookingRef: string | null;
|
|
279
279
|
communicationLanguage: string | null;
|
|
280
280
|
sellCurrency: string;
|
|
@@ -305,7 +305,7 @@ export declare const publicBookingsService: {
|
|
|
305
305
|
title: string;
|
|
306
306
|
description: string | null;
|
|
307
307
|
itemType: "service" | "other" | "unit" | "extra" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
|
|
308
|
-
status: "
|
|
308
|
+
status: "expired" | "cancelled" | "draft" | "on_hold" | "confirmed" | "fulfilled";
|
|
309
309
|
serviceDate: string | null;
|
|
310
310
|
startsAt: string | null;
|
|
311
311
|
endsAt: string | null;
|
|
@@ -338,7 +338,7 @@ export declare const publicBookingsService: {
|
|
|
338
338
|
availabilitySlotId: string | null;
|
|
339
339
|
quantity: number;
|
|
340
340
|
allocationType: "resource" | "unit" | "pickup";
|
|
341
|
-
status: "
|
|
341
|
+
status: "expired" | "cancelled" | "confirmed" | "fulfilled" | "held" | "released";
|
|
342
342
|
holdExpiresAt: string | null;
|
|
343
343
|
confirmedAt: string | null;
|
|
344
344
|
releasedAt: string | null;
|
|
@@ -406,7 +406,7 @@ export declare const publicBookingsService: {
|
|
|
406
406
|
session: {
|
|
407
407
|
sessionId: string;
|
|
408
408
|
bookingNumber: string;
|
|
409
|
-
status: "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress"
|
|
409
|
+
status: "expired" | "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress";
|
|
410
410
|
externalBookingRef: string | null;
|
|
411
411
|
communicationLanguage: string | null;
|
|
412
412
|
sellCurrency: string;
|
|
@@ -437,7 +437,7 @@ export declare const publicBookingsService: {
|
|
|
437
437
|
title: string;
|
|
438
438
|
description: string | null;
|
|
439
439
|
itemType: "service" | "other" | "unit" | "extra" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
|
|
440
|
-
status: "
|
|
440
|
+
status: "expired" | "cancelled" | "draft" | "on_hold" | "confirmed" | "fulfilled";
|
|
441
441
|
serviceDate: string | null;
|
|
442
442
|
startsAt: string | null;
|
|
443
443
|
endsAt: string | null;
|
|
@@ -470,7 +470,7 @@ export declare const publicBookingsService: {
|
|
|
470
470
|
availabilitySlotId: string | null;
|
|
471
471
|
quantity: number;
|
|
472
472
|
allocationType: "resource" | "unit" | "pickup";
|
|
473
|
-
status: "
|
|
473
|
+
status: "expired" | "cancelled" | "confirmed" | "fulfilled" | "held" | "released";
|
|
474
474
|
holdExpiresAt: string | null;
|
|
475
475
|
confirmedAt: string | null;
|
|
476
476
|
releasedAt: string | null;
|
|
@@ -501,7 +501,7 @@ export declare const publicBookingsService: {
|
|
|
501
501
|
session: {
|
|
502
502
|
sessionId: string;
|
|
503
503
|
bookingNumber: string;
|
|
504
|
-
status: "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress"
|
|
504
|
+
status: "expired" | "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress";
|
|
505
505
|
externalBookingRef: string | null;
|
|
506
506
|
communicationLanguage: string | null;
|
|
507
507
|
sellCurrency: string;
|
|
@@ -532,7 +532,7 @@ export declare const publicBookingsService: {
|
|
|
532
532
|
title: string;
|
|
533
533
|
description: string | null;
|
|
534
534
|
itemType: "service" | "other" | "unit" | "extra" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
|
|
535
|
-
status: "
|
|
535
|
+
status: "expired" | "cancelled" | "draft" | "on_hold" | "confirmed" | "fulfilled";
|
|
536
536
|
serviceDate: string | null;
|
|
537
537
|
startsAt: string | null;
|
|
538
538
|
endsAt: string | null;
|
|
@@ -565,7 +565,7 @@ export declare const publicBookingsService: {
|
|
|
565
565
|
availabilitySlotId: string | null;
|
|
566
566
|
quantity: number;
|
|
567
567
|
allocationType: "resource" | "unit" | "pickup";
|
|
568
|
-
status: "
|
|
568
|
+
status: "expired" | "cancelled" | "confirmed" | "fulfilled" | "held" | "released";
|
|
569
569
|
holdExpiresAt: string | null;
|
|
570
570
|
confirmedAt: string | null;
|
|
571
571
|
releasedAt: string | null;
|
|
@@ -596,7 +596,7 @@ export declare const publicBookingsService: {
|
|
|
596
596
|
session: {
|
|
597
597
|
sessionId: string;
|
|
598
598
|
bookingNumber: string;
|
|
599
|
-
status: "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress"
|
|
599
|
+
status: "expired" | "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress";
|
|
600
600
|
externalBookingRef: string | null;
|
|
601
601
|
communicationLanguage: string | null;
|
|
602
602
|
sellCurrency: string;
|
|
@@ -627,7 +627,7 @@ export declare const publicBookingsService: {
|
|
|
627
627
|
title: string;
|
|
628
628
|
description: string | null;
|
|
629
629
|
itemType: "service" | "other" | "unit" | "extra" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
|
|
630
|
-
status: "
|
|
630
|
+
status: "expired" | "cancelled" | "draft" | "on_hold" | "confirmed" | "fulfilled";
|
|
631
631
|
serviceDate: string | null;
|
|
632
632
|
startsAt: string | null;
|
|
633
633
|
endsAt: string | null;
|
|
@@ -660,7 +660,7 @@ export declare const publicBookingsService: {
|
|
|
660
660
|
availabilitySlotId: string | null;
|
|
661
661
|
quantity: number;
|
|
662
662
|
allocationType: "resource" | "unit" | "pickup";
|
|
663
|
-
status: "
|
|
663
|
+
status: "expired" | "cancelled" | "confirmed" | "fulfilled" | "held" | "released";
|
|
664
664
|
holdExpiresAt: string | null;
|
|
665
665
|
confirmedAt: string | null;
|
|
666
666
|
releasedAt: string | null;
|
|
@@ -687,7 +687,7 @@ export declare const publicBookingsService: {
|
|
|
687
687
|
getOverview(db: PostgresJsDatabase, query: PublicBookingOverviewLookupQuery): Promise<{
|
|
688
688
|
bookingId: string;
|
|
689
689
|
bookingNumber: string;
|
|
690
|
-
status: "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress"
|
|
690
|
+
status: "expired" | "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress";
|
|
691
691
|
sellCurrency: string;
|
|
692
692
|
sellAmountCents: number | null;
|
|
693
693
|
startDate: string | null;
|
|
@@ -708,7 +708,7 @@ export declare const publicBookingsService: {
|
|
|
708
708
|
title: string;
|
|
709
709
|
description: string | null;
|
|
710
710
|
itemType: "service" | "other" | "unit" | "extra" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
|
|
711
|
-
status: "
|
|
711
|
+
status: "expired" | "cancelled" | "draft" | "on_hold" | "confirmed" | "fulfilled";
|
|
712
712
|
serviceDate: string | null;
|
|
713
713
|
startsAt: string | null;
|
|
714
714
|
endsAt: string | null;
|
|
@@ -744,14 +744,14 @@ export declare const publicBookingsService: {
|
|
|
744
744
|
travelerId: string | null;
|
|
745
745
|
fulfillmentType: "other" | "voucher" | "ticket" | "pdf" | "qr_code" | "barcode" | "mobile";
|
|
746
746
|
deliveryChannel: "api" | "email" | "other" | "download" | "wallet";
|
|
747
|
-
status: "
|
|
747
|
+
status: "failed" | "pending" | "issued" | "reissued" | "revoked";
|
|
748
748
|
artifactUrl: string | null;
|
|
749
749
|
}[];
|
|
750
750
|
} | null>;
|
|
751
751
|
getOverviewByLookup(db: PostgresJsDatabase, query: InternalBookingOverviewLookupQuery): Promise<{
|
|
752
752
|
bookingId: string;
|
|
753
753
|
bookingNumber: string;
|
|
754
|
-
status: "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress"
|
|
754
|
+
status: "expired" | "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress";
|
|
755
755
|
sellCurrency: string;
|
|
756
756
|
sellAmountCents: number | null;
|
|
757
757
|
startDate: string | null;
|
|
@@ -772,7 +772,7 @@ export declare const publicBookingsService: {
|
|
|
772
772
|
title: string;
|
|
773
773
|
description: string | null;
|
|
774
774
|
itemType: "service" | "other" | "unit" | "extra" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
|
|
775
|
-
status: "
|
|
775
|
+
status: "expired" | "cancelled" | "draft" | "on_hold" | "confirmed" | "fulfilled";
|
|
776
776
|
serviceDate: string | null;
|
|
777
777
|
startsAt: string | null;
|
|
778
778
|
endsAt: string | null;
|
|
@@ -808,7 +808,7 @@ export declare const publicBookingsService: {
|
|
|
808
808
|
travelerId: string | null;
|
|
809
809
|
fulfillmentType: "other" | "voucher" | "ticket" | "pdf" | "qr_code" | "barcode" | "mobile";
|
|
810
810
|
deliveryChannel: "api" | "email" | "other" | "download" | "wallet";
|
|
811
|
-
status: "
|
|
811
|
+
status: "failed" | "pending" | "issued" | "reissued" | "revoked";
|
|
812
812
|
artifactUrl: string | null;
|
|
813
813
|
}[];
|
|
814
814
|
} | null>;
|
package/dist/service.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ActionLedgerRequestContextValues } from "@voyantjs/action-ledger";
|
|
1
2
|
import type { EventBus } from "@voyantjs/core";
|
|
2
3
|
import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
|
|
3
4
|
import type { z } from "zod";
|
|
@@ -86,6 +87,13 @@ export interface ConvertProductData {
|
|
|
86
87
|
*/
|
|
87
88
|
export interface BookingServiceRuntime {
|
|
88
89
|
eventBus?: EventBus;
|
|
90
|
+
actionLedgerContext?: ActionLedgerRequestContextValues;
|
|
91
|
+
actionLedgerAuthorizationSource?: string | null;
|
|
92
|
+
actionLedgerCausationActionId?: string | null;
|
|
93
|
+
actionLedgerApprovalId?: string | null;
|
|
94
|
+
actionLedgerIdempotencyScope?: string | null;
|
|
95
|
+
actionLedgerIdempotencyKey?: string | null;
|
|
96
|
+
actionLedgerIdempotencyFingerprint?: string | null;
|
|
89
97
|
expirePaymentSessionsForBooking?: (db: PostgresJsDatabase, bookingId: string) => Promise<void> | void;
|
|
90
98
|
}
|
|
91
99
|
/**
|
|
@@ -307,7 +315,7 @@ export declare const bookingsService: {
|
|
|
307
315
|
}[];
|
|
308
316
|
id: string;
|
|
309
317
|
bookingNumber: string;
|
|
310
|
-
status: "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress"
|
|
318
|
+
status: "expired" | "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress";
|
|
311
319
|
personId: string | null;
|
|
312
320
|
organizationId: string | null;
|
|
313
321
|
sourceType: "internal" | "direct" | "manual" | "affiliate" | "ota" | "reseller" | "api_partner";
|
|
@@ -354,10 +362,10 @@ export declare const bookingsService: {
|
|
|
354
362
|
}>;
|
|
355
363
|
convertProductToBooking(db: PostgresJsDatabase, data: ConvertProductInput, productData: ConvertProductData, userId?: string): Promise<{
|
|
356
364
|
id: string;
|
|
357
|
-
status: "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress"
|
|
365
|
+
status: "expired" | "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress";
|
|
366
|
+
organizationId: string | null;
|
|
358
367
|
createdAt: Date;
|
|
359
368
|
updatedAt: Date;
|
|
360
|
-
organizationId: string | null;
|
|
361
369
|
redeemedAt: Date | null;
|
|
362
370
|
startDate: string | null;
|
|
363
371
|
endDate: string | null;
|
|
@@ -399,7 +407,7 @@ export declare const bookingsService: {
|
|
|
399
407
|
getBookingById(db: PostgresJsDatabase, id: string): Promise<{
|
|
400
408
|
id: string;
|
|
401
409
|
bookingNumber: string;
|
|
402
|
-
status: "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress"
|
|
410
|
+
status: "expired" | "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress";
|
|
403
411
|
personId: string | null;
|
|
404
412
|
organizationId: string | null;
|
|
405
413
|
sourceType: "internal" | "direct" | "manual" | "affiliate" | "ota" | "reseller" | "api_partner";
|
|
@@ -442,10 +450,10 @@ export declare const bookingsService: {
|
|
|
442
450
|
} | null>;
|
|
443
451
|
createBookingFromProduct(db: PostgresJsDatabase, data: ConvertProductInput, userId?: string): Promise<{
|
|
444
452
|
id: string;
|
|
445
|
-
status: "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress"
|
|
453
|
+
status: "expired" | "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress";
|
|
454
|
+
organizationId: string | null;
|
|
446
455
|
createdAt: Date;
|
|
447
456
|
updatedAt: Date;
|
|
448
|
-
organizationId: string | null;
|
|
449
457
|
redeemedAt: Date | null;
|
|
450
458
|
startDate: string | null;
|
|
451
459
|
endDate: string | null;
|
|
@@ -660,7 +668,7 @@ export declare const bookingsService: {
|
|
|
660
668
|
tableName: "booking_allocations";
|
|
661
669
|
dataType: "string";
|
|
662
670
|
columnType: "PgEnumColumn";
|
|
663
|
-
data: "
|
|
671
|
+
data: "expired" | "cancelled" | "confirmed" | "fulfilled" | "held" | "released";
|
|
664
672
|
driverParam: string;
|
|
665
673
|
notNull: true;
|
|
666
674
|
hasDefault: true;
|
|
@@ -787,7 +795,7 @@ export declare const bookingsService: {
|
|
|
787
795
|
availabilitySlotId: string | null;
|
|
788
796
|
quantity: number;
|
|
789
797
|
allocationType: "resource" | "unit" | "pickup";
|
|
790
|
-
status: "
|
|
798
|
+
status: "expired" | "cancelled" | "confirmed" | "fulfilled" | "held" | "released";
|
|
791
799
|
holdExpiresAt: Date | null;
|
|
792
800
|
confirmedAt: Date | null;
|
|
793
801
|
releasedAt: Date | null;
|
|
@@ -970,7 +978,7 @@ export declare const bookingsService: {
|
|
|
970
978
|
tableName: "booking_allocations";
|
|
971
979
|
dataType: "string";
|
|
972
980
|
columnType: "PgEnumColumn";
|
|
973
|
-
data: "
|
|
981
|
+
data: "expired" | "cancelled" | "confirmed" | "fulfilled" | "held" | "released";
|
|
974
982
|
driverParam: string;
|
|
975
983
|
notNull: true;
|
|
976
984
|
hasDefault: true;
|
|
@@ -1097,10 +1105,10 @@ export declare const bookingsService: {
|
|
|
1097
1105
|
status: "ok";
|
|
1098
1106
|
booking: {
|
|
1099
1107
|
id: string;
|
|
1100
|
-
status: "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress"
|
|
1108
|
+
status: "expired" | "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress";
|
|
1109
|
+
organizationId: string | null;
|
|
1101
1110
|
createdAt: Date;
|
|
1102
1111
|
updatedAt: Date;
|
|
1103
|
-
organizationId: string | null;
|
|
1104
1112
|
redeemedAt: Date | null;
|
|
1105
1113
|
startDate: string | null;
|
|
1106
1114
|
endDate: string | null;
|
|
@@ -1144,10 +1152,10 @@ export declare const bookingsService: {
|
|
|
1144
1152
|
}>;
|
|
1145
1153
|
createBooking(db: PostgresJsDatabase, data: CreateBookingInput, userId?: string): Promise<{
|
|
1146
1154
|
id: string;
|
|
1147
|
-
status: "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress"
|
|
1155
|
+
status: "expired" | "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress";
|
|
1156
|
+
organizationId: string | null;
|
|
1148
1157
|
createdAt: Date;
|
|
1149
1158
|
updatedAt: Date;
|
|
1150
|
-
organizationId: string | null;
|
|
1151
1159
|
redeemedAt: Date | null;
|
|
1152
1160
|
startDate: string | null;
|
|
1153
1161
|
endDate: string | null;
|
|
@@ -1189,7 +1197,7 @@ export declare const bookingsService: {
|
|
|
1189
1197
|
updateBooking(db: PostgresJsDatabase, id: string, data: UpdateBookingInput): Promise<{
|
|
1190
1198
|
id: string;
|
|
1191
1199
|
bookingNumber: string;
|
|
1192
|
-
status: "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress"
|
|
1200
|
+
status: "expired" | "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress";
|
|
1193
1201
|
personId: string | null;
|
|
1194
1202
|
organizationId: string | null;
|
|
1195
1203
|
sourceType: "internal" | "direct" | "manual" | "affiliate" | "ota" | "reseller" | "api_partner";
|
|
@@ -1238,7 +1246,7 @@ export declare const bookingsService: {
|
|
|
1238
1246
|
booking: {
|
|
1239
1247
|
id: string;
|
|
1240
1248
|
bookingNumber: string;
|
|
1241
|
-
status: "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress"
|
|
1249
|
+
status: "expired" | "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress";
|
|
1242
1250
|
personId: string | null;
|
|
1243
1251
|
organizationId: string | null;
|
|
1244
1252
|
sourceType: "internal" | "direct" | "manual" | "affiliate" | "ota" | "reseller" | "api_partner";
|
|
@@ -1287,7 +1295,7 @@ export declare const bookingsService: {
|
|
|
1287
1295
|
booking: {
|
|
1288
1296
|
id: string;
|
|
1289
1297
|
bookingNumber: string;
|
|
1290
|
-
status: "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress"
|
|
1298
|
+
status: "expired" | "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress";
|
|
1291
1299
|
personId: string | null;
|
|
1292
1300
|
organizationId: string | null;
|
|
1293
1301
|
sourceType: "internal" | "direct" | "manual" | "affiliate" | "ota" | "reseller" | "api_partner";
|
|
@@ -1336,7 +1344,7 @@ export declare const bookingsService: {
|
|
|
1336
1344
|
booking: {
|
|
1337
1345
|
id: string;
|
|
1338
1346
|
bookingNumber: string;
|
|
1339
|
-
status: "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress"
|
|
1347
|
+
status: "expired" | "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress";
|
|
1340
1348
|
personId: string | null;
|
|
1341
1349
|
organizationId: string | null;
|
|
1342
1350
|
sourceType: "internal" | "direct" | "manual" | "affiliate" | "ota" | "reseller" | "api_partner";
|
|
@@ -1387,7 +1395,7 @@ export declare const bookingsService: {
|
|
|
1387
1395
|
booking: {
|
|
1388
1396
|
id: string;
|
|
1389
1397
|
bookingNumber: string;
|
|
1390
|
-
status: "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress"
|
|
1398
|
+
status: "expired" | "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress";
|
|
1391
1399
|
personId: string | null;
|
|
1392
1400
|
organizationId: string | null;
|
|
1393
1401
|
sourceType: "internal" | "direct" | "manual" | "affiliate" | "ota" | "reseller" | "api_partner";
|
|
@@ -1441,7 +1449,7 @@ export declare const bookingsService: {
|
|
|
1441
1449
|
booking: {
|
|
1442
1450
|
id: string;
|
|
1443
1451
|
bookingNumber: string;
|
|
1444
|
-
status: "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress"
|
|
1452
|
+
status: "expired" | "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress";
|
|
1445
1453
|
personId: string | null;
|
|
1446
1454
|
organizationId: string | null;
|
|
1447
1455
|
sourceType: "internal" | "direct" | "manual" | "affiliate" | "ota" | "reseller" | "api_partner";
|
|
@@ -1491,7 +1499,7 @@ export declare const bookingsService: {
|
|
|
1491
1499
|
booking: {
|
|
1492
1500
|
id: string;
|
|
1493
1501
|
bookingNumber: string;
|
|
1494
|
-
status: "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress"
|
|
1502
|
+
status: "expired" | "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress";
|
|
1495
1503
|
personId: string | null;
|
|
1496
1504
|
organizationId: string | null;
|
|
1497
1505
|
sourceType: "internal" | "direct" | "manual" | "affiliate" | "ota" | "reseller" | "api_partner";
|
|
@@ -1540,7 +1548,7 @@ export declare const bookingsService: {
|
|
|
1540
1548
|
booking: {
|
|
1541
1549
|
id: string;
|
|
1542
1550
|
bookingNumber: string;
|
|
1543
|
-
status: "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress"
|
|
1551
|
+
status: "expired" | "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress";
|
|
1544
1552
|
personId: string | null;
|
|
1545
1553
|
organizationId: string | null;
|
|
1546
1554
|
sourceType: "internal" | "direct" | "manual" | "affiliate" | "ota" | "reseller" | "api_partner";
|
|
@@ -1596,7 +1604,7 @@ export declare const bookingsService: {
|
|
|
1596
1604
|
booking: {
|
|
1597
1605
|
id: string;
|
|
1598
1606
|
bookingNumber: string;
|
|
1599
|
-
status: "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress"
|
|
1607
|
+
status: "expired" | "cancelled" | "completed" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress";
|
|
1600
1608
|
personId: string | null;
|
|
1601
1609
|
organizationId: string | null;
|
|
1602
1610
|
sourceType: "internal" | "direct" | "manual" | "affiliate" | "ota" | "reseller" | "api_partner";
|
|
@@ -2189,10 +2197,10 @@ export declare const bookingsService: {
|
|
|
2189
2197
|
} | null>;
|
|
2190
2198
|
createTravelerRecord(db: PostgresJsDatabase, bookingId: string, data: CreateTravelerRecordInput, userId?: string): Promise<{
|
|
2191
2199
|
id: string;
|
|
2192
|
-
notes: string | null;
|
|
2193
2200
|
createdAt: Date;
|
|
2194
2201
|
updatedAt: Date;
|
|
2195
2202
|
email: string | null;
|
|
2203
|
+
notes: string | null;
|
|
2196
2204
|
firstName: string;
|
|
2197
2205
|
lastName: string;
|
|
2198
2206
|
bookingId: string;
|
|
@@ -2247,10 +2255,10 @@ export declare const bookingsService: {
|
|
|
2247
2255
|
}): Promise<{
|
|
2248
2256
|
traveler: {
|
|
2249
2257
|
id: string;
|
|
2250
|
-
notes: string | null;
|
|
2251
2258
|
createdAt: Date;
|
|
2252
2259
|
updatedAt: Date;
|
|
2253
2260
|
email: string | null;
|
|
2261
|
+
notes: string | null;
|
|
2254
2262
|
firstName: string;
|
|
2255
2263
|
lastName: string;
|
|
2256
2264
|
bookingId: string;
|
|
@@ -2476,7 +2484,7 @@ export declare const bookingsService: {
|
|
|
2476
2484
|
tableName: "booking_items";
|
|
2477
2485
|
dataType: "string";
|
|
2478
2486
|
columnType: "PgEnumColumn";
|
|
2479
|
-
data: "
|
|
2487
|
+
data: "expired" | "cancelled" | "draft" | "on_hold" | "confirmed" | "fulfilled";
|
|
2480
2488
|
driverParam: string;
|
|
2481
2489
|
notNull: true;
|
|
2482
2490
|
hasDefault: true;
|
|
@@ -2836,7 +2844,7 @@ export declare const bookingsService: {
|
|
|
2836
2844
|
title: string;
|
|
2837
2845
|
description: string | null;
|
|
2838
2846
|
itemType: "service" | "other" | "unit" | "extra" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
|
|
2839
|
-
status: "
|
|
2847
|
+
status: "expired" | "cancelled" | "draft" | "on_hold" | "confirmed" | "fulfilled";
|
|
2840
2848
|
serviceDate: string | null;
|
|
2841
2849
|
startsAt: Date | null;
|
|
2842
2850
|
endsAt: Date | null;
|
|
@@ -2948,7 +2956,7 @@ export declare const bookingsService: {
|
|
|
2948
2956
|
tableName: "booking_items";
|
|
2949
2957
|
dataType: "string";
|
|
2950
2958
|
columnType: "PgEnumColumn";
|
|
2951
|
-
data: "
|
|
2959
|
+
data: "expired" | "cancelled" | "draft" | "on_hold" | "confirmed" | "fulfilled";
|
|
2952
2960
|
driverParam: string;
|
|
2953
2961
|
notNull: true;
|
|
2954
2962
|
hasDefault: true;
|
|
@@ -3345,20 +3353,20 @@ export declare const bookingsService: {
|
|
|
3345
3353
|
} | null>;
|
|
3346
3354
|
createItem(db: PostgresJsDatabase, bookingId: string, data: CreateBookingItemInput, userId?: string): Promise<{
|
|
3347
3355
|
id: string;
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
startsAt: Date | null;
|
|
3351
|
-
endsAt: Date | null;
|
|
3352
|
-
status: "cancelled" | "draft" | "on_hold" | "confirmed" | "expired" | "fulfilled";
|
|
3353
|
-
notes: string | null;
|
|
3356
|
+
description: string | null;
|
|
3357
|
+
status: "expired" | "cancelled" | "draft" | "on_hold" | "confirmed" | "fulfilled";
|
|
3354
3358
|
createdAt: Date;
|
|
3355
|
-
updatedAt: Date;
|
|
3356
3359
|
metadata: Record<string, unknown> | null;
|
|
3357
|
-
|
|
3360
|
+
updatedAt: Date;
|
|
3361
|
+
notes: string | null;
|
|
3358
3362
|
bookingId: string;
|
|
3363
|
+
title: string;
|
|
3359
3364
|
sellCurrency: string;
|
|
3365
|
+
productId: string | null;
|
|
3360
3366
|
optionUnitId: string | null;
|
|
3361
|
-
|
|
3367
|
+
optionId: string | null;
|
|
3368
|
+
startsAt: Date | null;
|
|
3369
|
+
endsAt: Date | null;
|
|
3362
3370
|
itemType: "service" | "other" | "unit" | "extra" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
|
|
3363
3371
|
serviceDate: string | null;
|
|
3364
3372
|
quantity: number;
|
|
@@ -3377,7 +3385,7 @@ export declare const bookingsService: {
|
|
|
3377
3385
|
title: string;
|
|
3378
3386
|
description: string | null;
|
|
3379
3387
|
itemType: "service" | "other" | "unit" | "extra" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
|
|
3380
|
-
status: "
|
|
3388
|
+
status: "expired" | "cancelled" | "draft" | "on_hold" | "confirmed" | "fulfilled";
|
|
3381
3389
|
serviceDate: string | null;
|
|
3382
3390
|
startsAt: Date | null;
|
|
3383
3391
|
endsAt: Date | null;
|
|
@@ -4062,9 +4070,9 @@ export declare const bookingsService: {
|
|
|
4062
4070
|
}, userId?: string): Promise<{
|
|
4063
4071
|
id: string;
|
|
4064
4072
|
status: "cancelled" | "pending" | "confirmed" | "rejected";
|
|
4065
|
-
notes: string | null;
|
|
4066
4073
|
createdAt: Date;
|
|
4067
4074
|
updatedAt: Date;
|
|
4075
|
+
notes: string | null;
|
|
4068
4076
|
bookingId: string;
|
|
4069
4077
|
costAmountCents: number;
|
|
4070
4078
|
confirmedAt: Date | null;
|
|
@@ -4204,7 +4212,7 @@ export declare const bookingsService: {
|
|
|
4204
4212
|
tableName: "booking_fulfillments";
|
|
4205
4213
|
dataType: "string";
|
|
4206
4214
|
columnType: "PgEnumColumn";
|
|
4207
|
-
data: "
|
|
4215
|
+
data: "failed" | "pending" | "issued" | "reissued" | "revoked";
|
|
4208
4216
|
driverParam: string;
|
|
4209
4217
|
notNull: true;
|
|
4210
4218
|
hasDefault: true;
|
|
@@ -4327,7 +4335,7 @@ export declare const bookingsService: {
|
|
|
4327
4335
|
travelerId: string | null;
|
|
4328
4336
|
fulfillmentType: "other" | "voucher" | "ticket" | "pdf" | "qr_code" | "barcode" | "mobile";
|
|
4329
4337
|
deliveryChannel: "api" | "email" | "other" | "download" | "wallet";
|
|
4330
|
-
status: "
|
|
4338
|
+
status: "failed" | "pending" | "issued" | "reissued" | "revoked";
|
|
4331
4339
|
artifactUrl: string | null;
|
|
4332
4340
|
payload: Record<string, unknown> | null;
|
|
4333
4341
|
issuedAt: Date | null;
|
|
@@ -4442,7 +4450,7 @@ export declare const bookingsService: {
|
|
|
4442
4450
|
tableName: "booking_fulfillments";
|
|
4443
4451
|
dataType: "string";
|
|
4444
4452
|
columnType: "PgEnumColumn";
|
|
4445
|
-
data: "
|
|
4453
|
+
data: "failed" | "pending" | "issued" | "reissued" | "revoked";
|
|
4446
4454
|
driverParam: string;
|
|
4447
4455
|
notNull: true;
|
|
4448
4456
|
hasDefault: true;
|
|
@@ -4561,7 +4569,7 @@ export declare const bookingsService: {
|
|
|
4561
4569
|
}>, "where" | "orderBy">;
|
|
4562
4570
|
issueFulfillment(db: PostgresJsDatabase, bookingId: string, data: CreateBookingFulfillmentInput, userId?: string): Promise<{
|
|
4563
4571
|
id: string;
|
|
4564
|
-
status: "
|
|
4572
|
+
status: "failed" | "pending" | "issued" | "reissued" | "revoked";
|
|
4565
4573
|
createdAt: Date;
|
|
4566
4574
|
updatedAt: Date;
|
|
4567
4575
|
revokedAt: Date | null;
|
|
@@ -4581,7 +4589,7 @@ export declare const bookingsService: {
|
|
|
4581
4589
|
travelerId: string | null;
|
|
4582
4590
|
fulfillmentType: "other" | "voucher" | "ticket" | "pdf" | "qr_code" | "barcode" | "mobile";
|
|
4583
4591
|
deliveryChannel: "api" | "email" | "other" | "download" | "wallet";
|
|
4584
|
-
status: "
|
|
4592
|
+
status: "failed" | "pending" | "issued" | "reissued" | "revoked";
|
|
4585
4593
|
artifactUrl: string | null;
|
|
4586
4594
|
payload: Record<string, unknown> | null;
|
|
4587
4595
|
issuedAt: Date | null;
|
|
@@ -4953,11 +4961,11 @@ export declare const bookingsService: {
|
|
|
4953
4961
|
metadata: Record<string, unknown> | null;
|
|
4954
4962
|
redeemedAt: Date;
|
|
4955
4963
|
bookingId: string;
|
|
4956
|
-
method: "api" | "other" | "manual" | "scan";
|
|
4957
4964
|
travelerId: string | null;
|
|
4958
4965
|
bookingItemId: string | null;
|
|
4959
4966
|
redeemedBy: string | null;
|
|
4960
4967
|
location: string | null;
|
|
4968
|
+
method: "api" | "other" | "manual" | "scan";
|
|
4961
4969
|
} | null>;
|
|
4962
4970
|
listActivity(db: PostgresJsDatabase, bookingId: string): Omit<import("drizzle-orm/pg-core").PgSelectBase<"booking_activity_log", {
|
|
4963
4971
|
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
@@ -5723,9 +5731,9 @@ export declare const bookingsService: {
|
|
|
5723
5731
|
createDocument(db: PostgresJsDatabase, bookingId: string, data: CreateBookingDocumentInput): Promise<{
|
|
5724
5732
|
type: "visa" | "other" | "insurance" | "health" | "passport_copy";
|
|
5725
5733
|
id: string;
|
|
5726
|
-
notes: string | null;
|
|
5727
5734
|
createdAt: Date;
|
|
5728
5735
|
expiresAt: Date | null;
|
|
5736
|
+
notes: string | null;
|
|
5729
5737
|
bookingId: string;
|
|
5730
5738
|
travelerId: string | null;
|
|
5731
5739
|
fileName: string;
|