@voyantjs/bookings 0.6.8 → 0.7.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.
Files changed (66) hide show
  1. package/README.md +2 -2
  2. package/dist/index.d.ts +8 -8
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +5 -5
  5. package/dist/pii.d.ts +10 -9
  6. package/dist/pii.d.ts.map +1 -1
  7. package/dist/pii.js +33 -33
  8. package/dist/products-ref.d.ts +93 -1
  9. package/dist/products-ref.d.ts.map +1 -1
  10. package/dist/products-ref.js +12 -1
  11. package/dist/routes-groups.d.ts +25 -5
  12. package/dist/routes-groups.d.ts.map +1 -1
  13. package/dist/routes-groups.js +3 -3
  14. package/dist/routes-public.d.ts +19 -21
  15. package/dist/routes-public.d.ts.map +1 -1
  16. package/dist/routes-public.js +1 -1
  17. package/dist/routes-shared.d.ts +3 -2
  18. package/dist/routes-shared.d.ts.map +1 -1
  19. package/dist/routes.d.ts +283 -188
  20. package/dist/routes.d.ts.map +1 -1
  21. package/dist/routes.js +89 -102
  22. package/dist/schema/travel-details.d.ts +27 -27
  23. package/dist/schema/travel-details.d.ts.map +1 -1
  24. package/dist/schema/travel-details.js +19 -14
  25. package/dist/schema-core.d.ts +194 -305
  26. package/dist/schema-core.d.ts.map +1 -1
  27. package/dist/schema-core.js +19 -10
  28. package/dist/schema-items.d.ts +15 -15
  29. package/dist/schema-items.d.ts.map +1 -1
  30. package/dist/schema-items.js +12 -12
  31. package/dist/schema-operations.d.ts +1 -1
  32. package/dist/schema-operations.js +3 -3
  33. package/dist/schema-relations.d.ts +26 -9
  34. package/dist/schema-relations.d.ts.map +1 -1
  35. package/dist/schema-relations.js +36 -21
  36. package/dist/schema-shared.d.ts +3 -2
  37. package/dist/schema-shared.d.ts.map +1 -1
  38. package/dist/schema-shared.js +4 -5
  39. package/dist/schema-staff.d.ts +267 -0
  40. package/dist/schema-staff.d.ts.map +1 -0
  41. package/dist/schema-staff.js +31 -0
  42. package/dist/schema.d.ts +1 -0
  43. package/dist/schema.d.ts.map +1 -1
  44. package/dist/schema.js +1 -0
  45. package/dist/service-groups.d.ts +3 -7
  46. package/dist/service-groups.d.ts.map +1 -1
  47. package/dist/service-groups.js +6 -10
  48. package/dist/service-public.d.ts +102 -55
  49. package/dist/service-public.d.ts.map +1 -1
  50. package/dist/service-public.js +119 -54
  51. package/dist/service.d.ts +327 -104
  52. package/dist/service.d.ts.map +1 -1
  53. package/dist/service.js +530 -130
  54. package/dist/transactions-ref.d.ts +930 -66
  55. package/dist/transactions-ref.d.ts.map +1 -1
  56. package/dist/transactions-ref.js +56 -2
  57. package/dist/validation-public.d.ts +29 -69
  58. package/dist/validation-public.d.ts.map +1 -1
  59. package/dist/validation-public.js +21 -20
  60. package/dist/validation-shared.d.ts +4 -5
  61. package/dist/validation-shared.d.ts.map +1 -1
  62. package/dist/validation-shared.js +2 -10
  63. package/dist/validation.d.ts +248 -44
  64. package/dist/validation.d.ts.map +1 -1
  65. package/dist/validation.js +103 -28
  66. package/package.json +6 -6
package/dist/service.d.ts CHANGED
@@ -1,6 +1,8 @@
1
+ import type { EventBus } from "@voyantjs/core";
1
2
  import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
2
3
  import type { z } from "zod";
3
- import type { bookingListQuerySchema, cancelBookingSchema, confirmBookingSchema, convertProductSchema, expireBookingSchema, expireStaleBookingsSchema, extendBookingHoldSchema, insertBookingDocumentSchema, insertBookingFulfillmentSchema, insertBookingItemParticipantSchema, insertBookingItemSchema, insertBookingNoteSchema, insertBookingSchema, insertParticipantSchema, insertPassengerSchema, recordBookingRedemptionSchema, reserveBookingFromTransactionSchema, reserveBookingSchema, updateBookingFulfillmentSchema, updateBookingItemSchema, updateBookingSchema, updateBookingStatusSchema, updateParticipantSchema, updatePassengerSchema } from "./validation.js";
4
+ import { bookings } from "./schema.js";
5
+ import type { bookingListQuerySchema, cancelBookingSchema, confirmBookingSchema, convertProductSchema, expireBookingSchema, expireStaleBookingsSchema, extendBookingHoldSchema, insertBookingDocumentSchema, insertBookingFulfillmentSchema, insertBookingItemParticipantSchema, insertBookingItemSchema, insertBookingNoteSchema, insertBookingSchema, insertTravelerRecordSchema, insertTravelerSchema, recordBookingRedemptionSchema, reserveBookingFromTransactionSchema, reserveBookingSchema, updateBookingFulfillmentSchema, updateBookingItemSchema, updateBookingSchema, updateBookingStatusSchema, updateTravelerRecordSchema, updateTravelerSchema } from "./validation.js";
4
6
  type BookingListQuery = z.infer<typeof bookingListQuerySchema>;
5
7
  type ConvertProductInput = z.infer<typeof convertProductSchema>;
6
8
  type CreateBookingInput = z.infer<typeof insertBookingSchema>;
@@ -12,10 +14,10 @@ type ConfirmBookingInput = z.infer<typeof confirmBookingSchema>;
12
14
  type CancelBookingInput = z.infer<typeof cancelBookingSchema>;
13
15
  type ExpireBookingInput = z.infer<typeof expireBookingSchema>;
14
16
  type ExpireStaleBookingsInput = z.infer<typeof expireStaleBookingsSchema>;
15
- type CreatePassengerInput = z.infer<typeof insertPassengerSchema>;
16
- type UpdatePassengerInput = z.infer<typeof updatePassengerSchema>;
17
- type CreateParticipantInput = z.infer<typeof insertParticipantSchema>;
18
- type UpdateParticipantInput = z.infer<typeof updateParticipantSchema>;
17
+ type CreateTravelerInput = z.infer<typeof insertTravelerSchema>;
18
+ type UpdateTravelerInput = z.infer<typeof updateTravelerSchema>;
19
+ type CreateTravelerRecordInput = z.infer<typeof insertTravelerRecordSchema>;
20
+ type UpdateTravelerRecordInput = z.infer<typeof updateTravelerRecordSchema>;
19
21
  type CreateBookingItemInput = z.infer<typeof insertBookingItemSchema>;
20
22
  type UpdateBookingItemInput = z.infer<typeof updateBookingItemSchema>;
21
23
  type CreateBookingItemParticipantInput = z.infer<typeof insertBookingItemParticipantSchema>;
@@ -43,6 +45,18 @@ export interface ConvertProductData {
43
45
  id: string;
44
46
  name: string;
45
47
  } | null;
48
+ /**
49
+ * Availability slot the caller chose, if any. When set, the resulting booking
50
+ * pins its startDate/endDate to the slot so recurring/scheduled products don't
51
+ * land with null dates.
52
+ */
53
+ slot?: {
54
+ id: string;
55
+ dateLocal: string;
56
+ startsAt: Date;
57
+ endsAt: Date | null;
58
+ timezone: string;
59
+ } | null;
46
60
  dayServices: Array<{
47
61
  supplierServiceId: string | null;
48
62
  name: string;
@@ -59,7 +73,85 @@ export interface ConvertProductData {
59
73
  sortOrder: number;
60
74
  }>;
61
75
  }
76
+ /**
77
+ * Optional runtime hooks for status-transition flows. Keeps the service
78
+ * decoupled from delivery concerns — bookings only has to emit, never know
79
+ * what listens.
80
+ */
81
+ export interface BookingServiceRuntime {
82
+ eventBus?: EventBus;
83
+ }
84
+ /**
85
+ * Payload shape for `booking.confirmed`. Subscribers should treat unknown
86
+ * fields as forward-compatible additions.
87
+ */
88
+ export interface BookingConfirmedEvent {
89
+ bookingId: string;
90
+ bookingNumber: string;
91
+ actorId: string | null;
92
+ }
93
+ /**
94
+ * Payload for `booking.cancelled`. `previousStatus` is the state the booking
95
+ * transitioned *out of* — useful for subscribers that care about cancelling a
96
+ * confirmed booking (refund flow) vs cancelling a draft/hold (no side effects).
97
+ */
98
+ export interface BookingCancelledEvent {
99
+ bookingId: string;
100
+ bookingNumber: string;
101
+ previousStatus: "draft" | "on_hold" | "confirmed" | "in_progress";
102
+ actorId: string | null;
103
+ }
104
+ /**
105
+ * Payload for `booking.expired`. Fires when an on-hold booking's timer runs
106
+ * out. `cause` flags whether it was the explicit route call or the sweep job —
107
+ * subscribers that want to email the customer should probably skip
108
+ * sweep-originated events to avoid pager noise during backfills.
109
+ */
110
+ export interface BookingExpiredEvent {
111
+ bookingId: string;
112
+ bookingNumber: string;
113
+ cause: "route" | "sweep";
114
+ actorId: string | null;
115
+ }
116
+ type BookingStatus = (typeof bookings.$inferSelect)["status"];
117
+ export interface BookingAggregates {
118
+ /** Total bookings across all statuses in range. */
119
+ total: number;
120
+ /** One row per booking status (including zero counts for active statuses). */
121
+ countsByStatus: Array<{
122
+ status: BookingStatus;
123
+ count: number;
124
+ }>;
125
+ /** Booking counts bucketed by YYYY-MM (UTC), oldest first. */
126
+ monthlyCounts: Array<{
127
+ yearMonth: string;
128
+ count: number;
129
+ }>;
130
+ /**
131
+ * Sell revenue bucketed by YYYY-MM (UTC), grouped by currency. Null currency
132
+ * rows are dropped since a booking without a sell currency is malformed.
133
+ */
134
+ monthlyRevenue: Array<{
135
+ yearMonth: string;
136
+ currency: string;
137
+ sellAmountCents: number;
138
+ }>;
139
+ /** Count of active bookings with `startDate >= today`. */
140
+ upcomingDepartures: number;
141
+ }
62
142
  export declare const bookingsService: {
143
+ /**
144
+ * Pre-aggregated dashboard numbers for the admin bookings surface. Replaces
145
+ * the pattern of fetching a large `listBookings` page and deriving KPIs
146
+ * client-side — which broke past the page limit and disagreed across apps
147
+ * on which statuses count.
148
+ *
149
+ * All ranges are UTC-based.
150
+ */
151
+ getBookingAggregates(db: PostgresJsDatabase, options?: {
152
+ from?: string;
153
+ to?: string;
154
+ }): Promise<BookingAggregates>;
63
155
  listBookings(db: PostgresJsDatabase, query: BookingListQuery): Promise<{
64
156
  data: {
65
157
  id: string;
@@ -70,6 +162,16 @@ export declare const bookingsService: {
70
162
  sourceType: "internal" | "reseller" | "direct" | "manual" | "affiliate" | "ota" | "api_partner";
71
163
  externalBookingRef: string | null;
72
164
  communicationLanguage: string | null;
165
+ contactFirstName: string | null;
166
+ contactLastName: string | null;
167
+ contactEmail: string | null;
168
+ contactPhone: string | null;
169
+ contactPreferredLanguage: string | null;
170
+ contactCountry: string | null;
171
+ contactRegion: string | null;
172
+ contactCity: string | null;
173
+ contactAddressLine1: string | null;
174
+ contactPostalCode: string | null;
73
175
  sellCurrency: string;
74
176
  baseCurrency: string | null;
75
177
  sellAmountCents: number | null;
@@ -100,6 +202,7 @@ export declare const bookingsService: {
100
202
  createdAt: Date;
101
203
  updatedAt: Date;
102
204
  organizationId: string | null;
205
+ redeemedAt: Date | null;
103
206
  startDate: string | null;
104
207
  endDate: string | null;
105
208
  bookingNumber: string;
@@ -107,6 +210,16 @@ export declare const bookingsService: {
107
210
  sourceType: "internal" | "reseller" | "direct" | "manual" | "affiliate" | "ota" | "api_partner";
108
211
  externalBookingRef: string | null;
109
212
  communicationLanguage: string | null;
213
+ contactFirstName: string | null;
214
+ contactLastName: string | null;
215
+ contactEmail: string | null;
216
+ contactPhone: string | null;
217
+ contactPreferredLanguage: string | null;
218
+ contactCountry: string | null;
219
+ contactRegion: string | null;
220
+ contactCity: string | null;
221
+ contactAddressLine1: string | null;
222
+ contactPostalCode: string | null;
110
223
  sellCurrency: string;
111
224
  baseCurrency: string | null;
112
225
  sellAmountCents: number | null;
@@ -121,7 +234,6 @@ export declare const bookingsService: {
121
234
  expiredAt: Date | null;
122
235
  cancelledAt: Date | null;
123
236
  completedAt: Date | null;
124
- redeemedAt: Date | null;
125
237
  } | null>;
126
238
  getBookingById(db: PostgresJsDatabase, id: string): Promise<{
127
239
  id: string;
@@ -132,6 +244,16 @@ export declare const bookingsService: {
132
244
  sourceType: "internal" | "reseller" | "direct" | "manual" | "affiliate" | "ota" | "api_partner";
133
245
  externalBookingRef: string | null;
134
246
  communicationLanguage: string | null;
247
+ contactFirstName: string | null;
248
+ contactLastName: string | null;
249
+ contactEmail: string | null;
250
+ contactPhone: string | null;
251
+ contactPreferredLanguage: string | null;
252
+ contactCountry: string | null;
253
+ contactRegion: string | null;
254
+ contactCity: string | null;
255
+ contactAddressLine1: string | null;
256
+ contactPostalCode: string | null;
135
257
  sellCurrency: string;
136
258
  baseCurrency: string | null;
137
259
  sellAmountCents: number | null;
@@ -158,6 +280,7 @@ export declare const bookingsService: {
158
280
  createdAt: Date;
159
281
  updatedAt: Date;
160
282
  organizationId: string | null;
283
+ redeemedAt: Date | null;
161
284
  startDate: string | null;
162
285
  endDate: string | null;
163
286
  bookingNumber: string;
@@ -165,6 +288,16 @@ export declare const bookingsService: {
165
288
  sourceType: "internal" | "reseller" | "direct" | "manual" | "affiliate" | "ota" | "api_partner";
166
289
  externalBookingRef: string | null;
167
290
  communicationLanguage: string | null;
291
+ contactFirstName: string | null;
292
+ contactLastName: string | null;
293
+ contactEmail: string | null;
294
+ contactPhone: string | null;
295
+ contactPreferredLanguage: string | null;
296
+ contactCountry: string | null;
297
+ contactRegion: string | null;
298
+ contactCity: string | null;
299
+ contactAddressLine1: string | null;
300
+ contactPostalCode: string | null;
168
301
  sellCurrency: string;
169
302
  baseCurrency: string | null;
170
303
  sellAmountCents: number | null;
@@ -179,7 +312,6 @@ export declare const bookingsService: {
179
312
  expiredAt: Date | null;
180
313
  cancelledAt: Date | null;
181
314
  completedAt: Date | null;
182
- redeemedAt: Date | null;
183
315
  } | null>;
184
316
  listAllocations(db: PostgresJsDatabase, bookingId: string): Omit<import("drizzle-orm/pg-core").PgSelectBase<"booking_allocations", {
185
317
  id: import("drizzle-orm/pg-core").PgColumn<{
@@ -798,6 +930,7 @@ export declare const bookingsService: {
798
930
  createdAt: Date;
799
931
  updatedAt: Date;
800
932
  organizationId: string | null;
933
+ redeemedAt: Date | null;
801
934
  startDate: string | null;
802
935
  endDate: string | null;
803
936
  bookingNumber: string;
@@ -805,6 +938,16 @@ export declare const bookingsService: {
805
938
  sourceType: "internal" | "reseller" | "direct" | "manual" | "affiliate" | "ota" | "api_partner";
806
939
  externalBookingRef: string | null;
807
940
  communicationLanguage: string | null;
941
+ contactFirstName: string | null;
942
+ contactLastName: string | null;
943
+ contactEmail: string | null;
944
+ contactPhone: string | null;
945
+ contactPreferredLanguage: string | null;
946
+ contactCountry: string | null;
947
+ contactRegion: string | null;
948
+ contactCity: string | null;
949
+ contactAddressLine1: string | null;
950
+ contactPostalCode: string | null;
808
951
  sellCurrency: string;
809
952
  baseCurrency: string | null;
810
953
  sellAmountCents: number | null;
@@ -819,7 +962,6 @@ export declare const bookingsService: {
819
962
  expiredAt: Date | null;
820
963
  cancelledAt: Date | null;
821
964
  completedAt: Date | null;
822
- redeemedAt: Date | null;
823
965
  };
824
966
  } | {
825
967
  status: Exclude<string, "ok">;
@@ -830,6 +972,7 @@ export declare const bookingsService: {
830
972
  createdAt: Date;
831
973
  updatedAt: Date;
832
974
  organizationId: string | null;
975
+ redeemedAt: Date | null;
833
976
  startDate: string | null;
834
977
  endDate: string | null;
835
978
  bookingNumber: string;
@@ -837,6 +980,16 @@ export declare const bookingsService: {
837
980
  sourceType: "internal" | "reseller" | "direct" | "manual" | "affiliate" | "ota" | "api_partner";
838
981
  externalBookingRef: string | null;
839
982
  communicationLanguage: string | null;
983
+ contactFirstName: string | null;
984
+ contactLastName: string | null;
985
+ contactEmail: string | null;
986
+ contactPhone: string | null;
987
+ contactPreferredLanguage: string | null;
988
+ contactCountry: string | null;
989
+ contactRegion: string | null;
990
+ contactCity: string | null;
991
+ contactAddressLine1: string | null;
992
+ contactPostalCode: string | null;
840
993
  sellCurrency: string;
841
994
  baseCurrency: string | null;
842
995
  sellAmountCents: number | null;
@@ -851,7 +1004,6 @@ export declare const bookingsService: {
851
1004
  expiredAt: Date | null;
852
1005
  cancelledAt: Date | null;
853
1006
  completedAt: Date | null;
854
- redeemedAt: Date | null;
855
1007
  } | null>;
856
1008
  updateBooking(db: PostgresJsDatabase, id: string, data: UpdateBookingInput): Promise<{
857
1009
  id: string;
@@ -862,6 +1014,16 @@ export declare const bookingsService: {
862
1014
  sourceType: "internal" | "reseller" | "direct" | "manual" | "affiliate" | "ota" | "api_partner";
863
1015
  externalBookingRef: string | null;
864
1016
  communicationLanguage: string | null;
1017
+ contactFirstName: string | null;
1018
+ contactLastName: string | null;
1019
+ contactEmail: string | null;
1020
+ contactPhone: string | null;
1021
+ contactPreferredLanguage: string | null;
1022
+ contactCountry: string | null;
1023
+ contactRegion: string | null;
1024
+ contactCity: string | null;
1025
+ contactAddressLine1: string | null;
1026
+ contactPostalCode: string | null;
865
1027
  sellCurrency: string;
866
1028
  baseCurrency: string | null;
867
1029
  sellAmountCents: number | null;
@@ -885,10 +1047,10 @@ export declare const bookingsService: {
885
1047
  deleteBooking(db: PostgresJsDatabase, id: string): Promise<{
886
1048
  id: string;
887
1049
  } | null>;
888
- updateBookingStatus(db: PostgresJsDatabase, id: string, data: UpdateBookingStatusInput, userId?: string): Promise<{
1050
+ updateBookingStatus(db: PostgresJsDatabase, id: string, data: UpdateBookingStatusInput, userId?: string, runtime?: BookingServiceRuntime): Promise<{
889
1051
  status: Exclude<string, "ok">;
890
1052
  }>;
891
- confirmBooking(db: PostgresJsDatabase, id: string, data: ConfirmBookingInput, userId?: string): Promise<{
1053
+ confirmBooking(db: PostgresJsDatabase, id: string, data: ConfirmBookingInput, userId?: string, runtime?: BookingServiceRuntime): Promise<{
892
1054
  status: "ok";
893
1055
  booking: {
894
1056
  id: string;
@@ -899,6 +1061,16 @@ export declare const bookingsService: {
899
1061
  sourceType: "internal" | "reseller" | "direct" | "manual" | "affiliate" | "ota" | "api_partner";
900
1062
  externalBookingRef: string | null;
901
1063
  communicationLanguage: string | null;
1064
+ contactFirstName: string | null;
1065
+ contactLastName: string | null;
1066
+ contactEmail: string | null;
1067
+ contactPhone: string | null;
1068
+ contactPreferredLanguage: string | null;
1069
+ contactCountry: string | null;
1070
+ contactRegion: string | null;
1071
+ contactCity: string | null;
1072
+ contactAddressLine1: string | null;
1073
+ contactPostalCode: string | null;
902
1074
  sellCurrency: string;
903
1075
  baseCurrency: string | null;
904
1076
  sellAmountCents: number | null;
@@ -933,6 +1105,16 @@ export declare const bookingsService: {
933
1105
  sourceType: "internal" | "reseller" | "direct" | "manual" | "affiliate" | "ota" | "api_partner";
934
1106
  externalBookingRef: string | null;
935
1107
  communicationLanguage: string | null;
1108
+ contactFirstName: string | null;
1109
+ contactLastName: string | null;
1110
+ contactEmail: string | null;
1111
+ contactPhone: string | null;
1112
+ contactPreferredLanguage: string | null;
1113
+ contactCountry: string | null;
1114
+ contactRegion: string | null;
1115
+ contactCity: string | null;
1116
+ contactAddressLine1: string | null;
1117
+ contactPostalCode: string | null;
936
1118
  sellCurrency: string;
937
1119
  baseCurrency: string | null;
938
1120
  sellAmountCents: number | null;
@@ -956,7 +1138,9 @@ export declare const bookingsService: {
956
1138
  } | {
957
1139
  status: Exclude<string, "ok">;
958
1140
  }>;
959
- expireBooking(db: PostgresJsDatabase, id: string, data: ExpireBookingInput, userId?: string): Promise<{
1141
+ expireBooking(db: PostgresJsDatabase, id: string, data: ExpireBookingInput, userId?: string, runtime?: BookingServiceRuntime & {
1142
+ cause?: "route" | "sweep";
1143
+ }): Promise<{
960
1144
  status: "ok";
961
1145
  booking: {
962
1146
  id: string;
@@ -967,6 +1151,16 @@ export declare const bookingsService: {
967
1151
  sourceType: "internal" | "reseller" | "direct" | "manual" | "affiliate" | "ota" | "api_partner";
968
1152
  externalBookingRef: string | null;
969
1153
  communicationLanguage: string | null;
1154
+ contactFirstName: string | null;
1155
+ contactLastName: string | null;
1156
+ contactEmail: string | null;
1157
+ contactPhone: string | null;
1158
+ contactPreferredLanguage: string | null;
1159
+ contactCountry: string | null;
1160
+ contactRegion: string | null;
1161
+ contactCity: string | null;
1162
+ contactAddressLine1: string | null;
1163
+ contactPostalCode: string | null;
970
1164
  sellCurrency: string;
971
1165
  baseCurrency: string | null;
972
1166
  sellAmountCents: number | null;
@@ -990,12 +1184,12 @@ export declare const bookingsService: {
990
1184
  } | {
991
1185
  status: Exclude<string, "ok">;
992
1186
  }>;
993
- expireStaleBookings(db: PostgresJsDatabase, data: ExpireStaleBookingsInput, userId?: string): Promise<{
1187
+ expireStaleBookings(db: PostgresJsDatabase, data: ExpireStaleBookingsInput, userId?: string, runtime?: BookingServiceRuntime): Promise<{
994
1188
  expiredIds: string[];
995
1189
  count: number;
996
1190
  cutoff: Date;
997
1191
  }>;
998
- cancelBooking(db: PostgresJsDatabase, id: string, data: CancelBookingInput, userId?: string): Promise<{
1192
+ cancelBooking(db: PostgresJsDatabase, id: string, data: CancelBookingInput, userId?: string, runtime?: BookingServiceRuntime): Promise<{
999
1193
  status: "ok";
1000
1194
  booking: {
1001
1195
  id: string;
@@ -1006,6 +1200,16 @@ export declare const bookingsService: {
1006
1200
  sourceType: "internal" | "reseller" | "direct" | "manual" | "affiliate" | "ota" | "api_partner";
1007
1201
  externalBookingRef: string | null;
1008
1202
  communicationLanguage: string | null;
1203
+ contactFirstName: string | null;
1204
+ contactLastName: string | null;
1205
+ contactEmail: string | null;
1206
+ contactPhone: string | null;
1207
+ contactPreferredLanguage: string | null;
1208
+ contactCountry: string | null;
1209
+ contactRegion: string | null;
1210
+ contactCity: string | null;
1211
+ contactAddressLine1: string | null;
1212
+ contactPostalCode: string | null;
1009
1213
  sellCurrency: string;
1010
1214
  baseCurrency: string | null;
1011
1215
  sellAmountCents: number | null;
@@ -1028,11 +1232,12 @@ export declare const bookingsService: {
1028
1232
  } | null;
1029
1233
  } | {
1030
1234
  status: Exclude<string, "ok">;
1235
+ booking?: undefined;
1031
1236
  }>;
1032
- listParticipants(db: PostgresJsDatabase, bookingId: string): Omit<import("drizzle-orm/pg-core").PgSelectBase<"booking_participants", {
1237
+ listTravelerRecords(db: PostgresJsDatabase, bookingId: string): Omit<import("drizzle-orm/pg-core").PgSelectBase<"booking_travelers", {
1033
1238
  id: import("drizzle-orm/pg-core").PgColumn<{
1034
1239
  name: string;
1035
- tableName: "booking_participants";
1240
+ tableName: "booking_travelers";
1036
1241
  dataType: "string";
1037
1242
  columnType: "PgText";
1038
1243
  data: string;
@@ -1049,7 +1254,7 @@ export declare const bookingsService: {
1049
1254
  }, {}, {}>;
1050
1255
  bookingId: import("drizzle-orm/pg-core").PgColumn<{
1051
1256
  name: string;
1052
- tableName: "booking_participants";
1257
+ tableName: "booking_travelers";
1053
1258
  dataType: "string";
1054
1259
  columnType: "PgText";
1055
1260
  data: string;
@@ -1066,7 +1271,7 @@ export declare const bookingsService: {
1066
1271
  }, {}, {}>;
1067
1272
  personId: import("drizzle-orm/pg-core").PgColumn<{
1068
1273
  name: "person_id";
1069
- tableName: "booking_participants";
1274
+ tableName: "booking_travelers";
1070
1275
  dataType: "string";
1071
1276
  columnType: "PgText";
1072
1277
  data: string;
@@ -1083,24 +1288,24 @@ export declare const bookingsService: {
1083
1288
  }, {}, {}>;
1084
1289
  participantType: import("drizzle-orm/pg-core").PgColumn<{
1085
1290
  name: "participant_type";
1086
- tableName: "booking_participants";
1291
+ tableName: "booking_travelers";
1087
1292
  dataType: "string";
1088
1293
  columnType: "PgEnumColumn";
1089
- data: "staff" | "other" | "traveler" | "booker" | "contact" | "occupant";
1294
+ data: "other" | "traveler" | "occupant";
1090
1295
  driverParam: string;
1091
1296
  notNull: true;
1092
1297
  hasDefault: true;
1093
1298
  isPrimaryKey: false;
1094
1299
  isAutoincrement: false;
1095
1300
  hasRuntimeDefault: false;
1096
- enumValues: ["traveler", "booker", "contact", "occupant", "staff", "other"];
1301
+ enumValues: ["traveler", "occupant", "other"];
1097
1302
  baseColumn: never;
1098
1303
  identity: undefined;
1099
1304
  generated: undefined;
1100
1305
  }, {}, {}>;
1101
1306
  travelerCategory: import("drizzle-orm/pg-core").PgColumn<{
1102
1307
  name: "traveler_category";
1103
- tableName: "booking_participants";
1308
+ tableName: "booking_travelers";
1104
1309
  dataType: "string";
1105
1310
  columnType: "PgEnumColumn";
1106
1311
  data: "other" | "adult" | "child" | "infant" | "senior";
@@ -1117,7 +1322,7 @@ export declare const bookingsService: {
1117
1322
  }, {}, {}>;
1118
1323
  firstName: import("drizzle-orm/pg-core").PgColumn<{
1119
1324
  name: "first_name";
1120
- tableName: "booking_participants";
1325
+ tableName: "booking_travelers";
1121
1326
  dataType: "string";
1122
1327
  columnType: "PgText";
1123
1328
  data: string;
@@ -1134,7 +1339,7 @@ export declare const bookingsService: {
1134
1339
  }, {}, {}>;
1135
1340
  lastName: import("drizzle-orm/pg-core").PgColumn<{
1136
1341
  name: "last_name";
1137
- tableName: "booking_participants";
1342
+ tableName: "booking_travelers";
1138
1343
  dataType: "string";
1139
1344
  columnType: "PgText";
1140
1345
  data: string;
@@ -1151,7 +1356,7 @@ export declare const bookingsService: {
1151
1356
  }, {}, {}>;
1152
1357
  email: import("drizzle-orm/pg-core").PgColumn<{
1153
1358
  name: "email";
1154
- tableName: "booking_participants";
1359
+ tableName: "booking_travelers";
1155
1360
  dataType: "string";
1156
1361
  columnType: "PgText";
1157
1362
  data: string;
@@ -1168,7 +1373,7 @@ export declare const bookingsService: {
1168
1373
  }, {}, {}>;
1169
1374
  phone: import("drizzle-orm/pg-core").PgColumn<{
1170
1375
  name: "phone";
1171
- tableName: "booking_participants";
1376
+ tableName: "booking_travelers";
1172
1377
  dataType: "string";
1173
1378
  columnType: "PgText";
1174
1379
  data: string;
@@ -1185,7 +1390,7 @@ export declare const bookingsService: {
1185
1390
  }, {}, {}>;
1186
1391
  preferredLanguage: import("drizzle-orm/pg-core").PgColumn<{
1187
1392
  name: "preferred_language";
1188
- tableName: "booking_participants";
1393
+ tableName: "booking_travelers";
1189
1394
  dataType: "string";
1190
1395
  columnType: "PgText";
1191
1396
  data: string;
@@ -1202,7 +1407,7 @@ export declare const bookingsService: {
1202
1407
  }, {}, {}>;
1203
1408
  accessibilityNeeds: import("drizzle-orm/pg-core").PgColumn<{
1204
1409
  name: "accessibility_needs";
1205
- tableName: "booking_participants";
1410
+ tableName: "booking_travelers";
1206
1411
  dataType: "string";
1207
1412
  columnType: "PgText";
1208
1413
  data: string;
@@ -1219,7 +1424,7 @@ export declare const bookingsService: {
1219
1424
  }, {}, {}>;
1220
1425
  specialRequests: import("drizzle-orm/pg-core").PgColumn<{
1221
1426
  name: "special_requests";
1222
- tableName: "booking_participants";
1427
+ tableName: "booking_travelers";
1223
1428
  dataType: "string";
1224
1429
  columnType: "PgText";
1225
1430
  data: string;
@@ -1236,7 +1441,7 @@ export declare const bookingsService: {
1236
1441
  }, {}, {}>;
1237
1442
  isPrimary: import("drizzle-orm/pg-core").PgColumn<{
1238
1443
  name: "is_primary";
1239
- tableName: "booking_participants";
1444
+ tableName: "booking_travelers";
1240
1445
  dataType: "boolean";
1241
1446
  columnType: "PgBoolean";
1242
1447
  data: boolean;
@@ -1253,7 +1458,7 @@ export declare const bookingsService: {
1253
1458
  }, {}, {}>;
1254
1459
  notes: import("drizzle-orm/pg-core").PgColumn<{
1255
1460
  name: "notes";
1256
- tableName: "booking_participants";
1461
+ tableName: "booking_travelers";
1257
1462
  dataType: "string";
1258
1463
  columnType: "PgText";
1259
1464
  data: string;
@@ -1270,7 +1475,7 @@ export declare const bookingsService: {
1270
1475
  }, {}, {}>;
1271
1476
  createdAt: import("drizzle-orm/pg-core").PgColumn<{
1272
1477
  name: "created_at";
1273
- tableName: "booking_participants";
1478
+ tableName: "booking_travelers";
1274
1479
  dataType: "date";
1275
1480
  columnType: "PgTimestamp";
1276
1481
  data: Date;
@@ -1287,7 +1492,7 @@ export declare const bookingsService: {
1287
1492
  }, {}, {}>;
1288
1493
  updatedAt: import("drizzle-orm/pg-core").PgColumn<{
1289
1494
  name: "updated_at";
1290
- tableName: "booking_participants";
1495
+ tableName: "booking_travelers";
1291
1496
  dataType: "date";
1292
1497
  columnType: "PgTimestamp";
1293
1498
  data: Date;
@@ -1302,11 +1507,11 @@ export declare const bookingsService: {
1302
1507
  identity: undefined;
1303
1508
  generated: undefined;
1304
1509
  }, {}, {}>;
1305
- }, "single", Record<"booking_participants", "not-null">, false, "where" | "orderBy", {
1510
+ }, "single", Record<"booking_travelers", "not-null">, false, "where" | "orderBy", {
1306
1511
  id: string;
1307
1512
  bookingId: string;
1308
1513
  personId: string | null;
1309
- participantType: "staff" | "other" | "traveler" | "booker" | "contact" | "occupant";
1514
+ participantType: "other" | "traveler" | "occupant";
1310
1515
  travelerCategory: "other" | "adult" | "child" | "infant" | "senior" | null;
1311
1516
  firstName: string;
1312
1517
  lastName: string;
@@ -1322,7 +1527,7 @@ export declare const bookingsService: {
1322
1527
  }[], {
1323
1528
  id: import("drizzle-orm/pg-core").PgColumn<{
1324
1529
  name: string;
1325
- tableName: "booking_participants";
1530
+ tableName: "booking_travelers";
1326
1531
  dataType: "string";
1327
1532
  columnType: "PgText";
1328
1533
  data: string;
@@ -1339,7 +1544,7 @@ export declare const bookingsService: {
1339
1544
  }, {}, {}>;
1340
1545
  bookingId: import("drizzle-orm/pg-core").PgColumn<{
1341
1546
  name: string;
1342
- tableName: "booking_participants";
1547
+ tableName: "booking_travelers";
1343
1548
  dataType: "string";
1344
1549
  columnType: "PgText";
1345
1550
  data: string;
@@ -1356,7 +1561,7 @@ export declare const bookingsService: {
1356
1561
  }, {}, {}>;
1357
1562
  personId: import("drizzle-orm/pg-core").PgColumn<{
1358
1563
  name: "person_id";
1359
- tableName: "booking_participants";
1564
+ tableName: "booking_travelers";
1360
1565
  dataType: "string";
1361
1566
  columnType: "PgText";
1362
1567
  data: string;
@@ -1373,24 +1578,24 @@ export declare const bookingsService: {
1373
1578
  }, {}, {}>;
1374
1579
  participantType: import("drizzle-orm/pg-core").PgColumn<{
1375
1580
  name: "participant_type";
1376
- tableName: "booking_participants";
1581
+ tableName: "booking_travelers";
1377
1582
  dataType: "string";
1378
1583
  columnType: "PgEnumColumn";
1379
- data: "staff" | "other" | "traveler" | "booker" | "contact" | "occupant";
1584
+ data: "other" | "traveler" | "occupant";
1380
1585
  driverParam: string;
1381
1586
  notNull: true;
1382
1587
  hasDefault: true;
1383
1588
  isPrimaryKey: false;
1384
1589
  isAutoincrement: false;
1385
1590
  hasRuntimeDefault: false;
1386
- enumValues: ["traveler", "booker", "contact", "occupant", "staff", "other"];
1591
+ enumValues: ["traveler", "occupant", "other"];
1387
1592
  baseColumn: never;
1388
1593
  identity: undefined;
1389
1594
  generated: undefined;
1390
1595
  }, {}, {}>;
1391
1596
  travelerCategory: import("drizzle-orm/pg-core").PgColumn<{
1392
1597
  name: "traveler_category";
1393
- tableName: "booking_participants";
1598
+ tableName: "booking_travelers";
1394
1599
  dataType: "string";
1395
1600
  columnType: "PgEnumColumn";
1396
1601
  data: "other" | "adult" | "child" | "infant" | "senior";
@@ -1407,7 +1612,7 @@ export declare const bookingsService: {
1407
1612
  }, {}, {}>;
1408
1613
  firstName: import("drizzle-orm/pg-core").PgColumn<{
1409
1614
  name: "first_name";
1410
- tableName: "booking_participants";
1615
+ tableName: "booking_travelers";
1411
1616
  dataType: "string";
1412
1617
  columnType: "PgText";
1413
1618
  data: string;
@@ -1424,7 +1629,7 @@ export declare const bookingsService: {
1424
1629
  }, {}, {}>;
1425
1630
  lastName: import("drizzle-orm/pg-core").PgColumn<{
1426
1631
  name: "last_name";
1427
- tableName: "booking_participants";
1632
+ tableName: "booking_travelers";
1428
1633
  dataType: "string";
1429
1634
  columnType: "PgText";
1430
1635
  data: string;
@@ -1441,7 +1646,7 @@ export declare const bookingsService: {
1441
1646
  }, {}, {}>;
1442
1647
  email: import("drizzle-orm/pg-core").PgColumn<{
1443
1648
  name: "email";
1444
- tableName: "booking_participants";
1649
+ tableName: "booking_travelers";
1445
1650
  dataType: "string";
1446
1651
  columnType: "PgText";
1447
1652
  data: string;
@@ -1458,7 +1663,7 @@ export declare const bookingsService: {
1458
1663
  }, {}, {}>;
1459
1664
  phone: import("drizzle-orm/pg-core").PgColumn<{
1460
1665
  name: "phone";
1461
- tableName: "booking_participants";
1666
+ tableName: "booking_travelers";
1462
1667
  dataType: "string";
1463
1668
  columnType: "PgText";
1464
1669
  data: string;
@@ -1475,7 +1680,7 @@ export declare const bookingsService: {
1475
1680
  }, {}, {}>;
1476
1681
  preferredLanguage: import("drizzle-orm/pg-core").PgColumn<{
1477
1682
  name: "preferred_language";
1478
- tableName: "booking_participants";
1683
+ tableName: "booking_travelers";
1479
1684
  dataType: "string";
1480
1685
  columnType: "PgText";
1481
1686
  data: string;
@@ -1492,7 +1697,7 @@ export declare const bookingsService: {
1492
1697
  }, {}, {}>;
1493
1698
  accessibilityNeeds: import("drizzle-orm/pg-core").PgColumn<{
1494
1699
  name: "accessibility_needs";
1495
- tableName: "booking_participants";
1700
+ tableName: "booking_travelers";
1496
1701
  dataType: "string";
1497
1702
  columnType: "PgText";
1498
1703
  data: string;
@@ -1509,7 +1714,7 @@ export declare const bookingsService: {
1509
1714
  }, {}, {}>;
1510
1715
  specialRequests: import("drizzle-orm/pg-core").PgColumn<{
1511
1716
  name: "special_requests";
1512
- tableName: "booking_participants";
1717
+ tableName: "booking_travelers";
1513
1718
  dataType: "string";
1514
1719
  columnType: "PgText";
1515
1720
  data: string;
@@ -1526,7 +1731,7 @@ export declare const bookingsService: {
1526
1731
  }, {}, {}>;
1527
1732
  isPrimary: import("drizzle-orm/pg-core").PgColumn<{
1528
1733
  name: "is_primary";
1529
- tableName: "booking_participants";
1734
+ tableName: "booking_travelers";
1530
1735
  dataType: "boolean";
1531
1736
  columnType: "PgBoolean";
1532
1737
  data: boolean;
@@ -1543,7 +1748,7 @@ export declare const bookingsService: {
1543
1748
  }, {}, {}>;
1544
1749
  notes: import("drizzle-orm/pg-core").PgColumn<{
1545
1750
  name: "notes";
1546
- tableName: "booking_participants";
1751
+ tableName: "booking_travelers";
1547
1752
  dataType: "string";
1548
1753
  columnType: "PgText";
1549
1754
  data: string;
@@ -1560,7 +1765,7 @@ export declare const bookingsService: {
1560
1765
  }, {}, {}>;
1561
1766
  createdAt: import("drizzle-orm/pg-core").PgColumn<{
1562
1767
  name: "created_at";
1563
- tableName: "booking_participants";
1768
+ tableName: "booking_travelers";
1564
1769
  dataType: "date";
1565
1770
  columnType: "PgTimestamp";
1566
1771
  data: Date;
@@ -1577,7 +1782,7 @@ export declare const bookingsService: {
1577
1782
  }, {}, {}>;
1578
1783
  updatedAt: import("drizzle-orm/pg-core").PgColumn<{
1579
1784
  name: "updated_at";
1580
- tableName: "booking_participants";
1785
+ tableName: "booking_travelers";
1581
1786
  dataType: "date";
1582
1787
  columnType: "PgTimestamp";
1583
1788
  data: Date;
@@ -1593,11 +1798,11 @@ export declare const bookingsService: {
1593
1798
  generated: undefined;
1594
1799
  }, {}, {}>;
1595
1800
  }>, "where" | "orderBy">;
1596
- getParticipantById(db: PostgresJsDatabase, bookingId: string, participantId: string): Promise<{
1801
+ getTravelerRecordById(db: PostgresJsDatabase, bookingId: string, travelerId: string): Promise<{
1597
1802
  id: string;
1598
1803
  bookingId: string;
1599
1804
  personId: string | null;
1600
- participantType: "staff" | "other" | "traveler" | "booker" | "contact" | "occupant";
1805
+ participantType: "other" | "traveler" | "occupant";
1601
1806
  travelerCategory: "other" | "adult" | "child" | "infant" | "senior" | null;
1602
1807
  firstName: string;
1603
1808
  lastName: string;
@@ -1611,7 +1816,7 @@ export declare const bookingsService: {
1611
1816
  createdAt: Date;
1612
1817
  updatedAt: Date;
1613
1818
  } | null>;
1614
- createParticipant(db: PostgresJsDatabase, bookingId: string, data: CreateParticipantInput, userId?: string): Promise<{
1819
+ createTravelerRecord(db: PostgresJsDatabase, bookingId: string, data: CreateTravelerRecordInput, userId?: string): Promise<{
1615
1820
  id: string;
1616
1821
  notes: string | null;
1617
1822
  createdAt: Date;
@@ -1621,7 +1826,7 @@ export declare const bookingsService: {
1621
1826
  lastName: string;
1622
1827
  personId: string | null;
1623
1828
  bookingId: string;
1624
- participantType: "staff" | "other" | "traveler" | "booker" | "contact" | "occupant";
1829
+ participantType: "other" | "traveler" | "occupant";
1625
1830
  travelerCategory: "other" | "adult" | "child" | "infant" | "senior" | null;
1626
1831
  phone: string | null;
1627
1832
  preferredLanguage: string | null;
@@ -1629,11 +1834,11 @@ export declare const bookingsService: {
1629
1834
  specialRequests: string | null;
1630
1835
  isPrimary: boolean;
1631
1836
  } | null>;
1632
- updateParticipant(db: PostgresJsDatabase, participantId: string, data: UpdateParticipantInput): Promise<{
1837
+ updateTravelerRecord(db: PostgresJsDatabase, travelerId: string, data: UpdateTravelerRecordInput): Promise<{
1633
1838
  id: string;
1634
1839
  bookingId: string;
1635
1840
  personId: string | null;
1636
- participantType: "staff" | "other" | "traveler" | "booker" | "contact" | "occupant";
1841
+ participantType: "other" | "traveler" | "occupant";
1637
1842
  travelerCategory: "other" | "adult" | "child" | "infant" | "senior" | null;
1638
1843
  firstName: string;
1639
1844
  lastName: string;
@@ -1647,46 +1852,61 @@ export declare const bookingsService: {
1647
1852
  createdAt: Date;
1648
1853
  updatedAt: Date;
1649
1854
  } | null>;
1650
- deleteParticipant(db: PostgresJsDatabase, participantId: string): Promise<{
1855
+ deleteTravelerRecord(db: PostgresJsDatabase, travelerId: string): Promise<{
1651
1856
  id: string;
1652
1857
  } | null>;
1653
- listPassengers(db: PostgresJsDatabase, bookingId: string): Promise<{
1858
+ listTravelers(db: PostgresJsDatabase, bookingId: string): Promise<{
1654
1859
  id: string;
1655
1860
  bookingId: string;
1861
+ participantType: "other" | "traveler" | "occupant";
1862
+ travelerCategory: "other" | "adult" | "child" | "infant" | "senior" | null;
1656
1863
  firstName: string;
1657
1864
  lastName: string;
1658
1865
  email: string | null;
1659
1866
  phone: string | null;
1867
+ preferredLanguage: string | null;
1868
+ accessibilityNeeds: string | null;
1660
1869
  specialRequests: string | null;
1661
- isLeadPassenger: boolean;
1870
+ isPrimary: boolean;
1871
+ notes: string | null;
1662
1872
  createdAt: Date;
1663
1873
  updatedAt: Date;
1664
1874
  }[]>;
1665
- createPassenger(db: PostgresJsDatabase, bookingId: string, data: CreatePassengerInput, userId?: string): Promise<{
1875
+ createTraveler(db: PostgresJsDatabase, bookingId: string, data: CreateTravelerInput, userId?: string): Promise<{
1666
1876
  id: string;
1667
1877
  bookingId: string;
1878
+ participantType: "other" | "traveler" | "occupant";
1879
+ travelerCategory: "other" | "adult" | "child" | "infant" | "senior" | null;
1668
1880
  firstName: string;
1669
1881
  lastName: string;
1670
1882
  email: string | null;
1671
1883
  phone: string | null;
1884
+ preferredLanguage: string | null;
1885
+ accessibilityNeeds: string | null;
1672
1886
  specialRequests: string | null;
1673
- isLeadPassenger: boolean;
1887
+ isPrimary: boolean;
1888
+ notes: string | null;
1674
1889
  createdAt: Date;
1675
1890
  updatedAt: Date;
1676
1891
  } | null>;
1677
- updatePassenger(db: PostgresJsDatabase, passengerId: string, data: UpdatePassengerInput): Promise<{
1892
+ updateTraveler(db: PostgresJsDatabase, travelerId: string, data: UpdateTravelerInput): Promise<{
1678
1893
  id: string;
1679
1894
  bookingId: string;
1895
+ participantType: "other" | "traveler" | "occupant";
1896
+ travelerCategory: "other" | "adult" | "child" | "infant" | "senior" | null;
1680
1897
  firstName: string;
1681
1898
  lastName: string;
1682
1899
  email: string | null;
1683
1900
  phone: string | null;
1901
+ preferredLanguage: string | null;
1902
+ accessibilityNeeds: string | null;
1684
1903
  specialRequests: string | null;
1685
- isLeadPassenger: boolean;
1904
+ isPrimary: boolean;
1905
+ notes: string | null;
1686
1906
  createdAt: Date;
1687
1907
  updatedAt: Date;
1688
1908
  } | null>;
1689
- deletePassenger(db: PostgresJsDatabase, passengerId: string): Promise<{
1909
+ deleteTraveler(db: PostgresJsDatabase, travelerId: string): Promise<{
1690
1910
  id: string;
1691
1911
  } | null>;
1692
1912
  listItems(db: PostgresJsDatabase, bookingId: string): Omit<import("drizzle-orm/pg-core").PgSelectBase<"booking_items", {
@@ -2666,10 +2886,10 @@ export declare const bookingsService: {
2666
2886
  deleteItem(db: PostgresJsDatabase, itemId: string): Promise<{
2667
2887
  id: string;
2668
2888
  } | null>;
2669
- listItemParticipants(db: PostgresJsDatabase, itemId: string): Omit<import("drizzle-orm/pg-core").PgSelectBase<"booking_item_participants", {
2889
+ listItemParticipants(db: PostgresJsDatabase, itemId: string): Omit<import("drizzle-orm/pg-core").PgSelectBase<"booking_item_travelers", {
2670
2890
  id: import("drizzle-orm/pg-core").PgColumn<{
2671
2891
  name: string;
2672
- tableName: "booking_item_participants";
2892
+ tableName: "booking_item_travelers";
2673
2893
  dataType: "string";
2674
2894
  columnType: "PgText";
2675
2895
  data: string;
@@ -2686,7 +2906,7 @@ export declare const bookingsService: {
2686
2906
  }, {}, {}>;
2687
2907
  bookingItemId: import("drizzle-orm/pg-core").PgColumn<{
2688
2908
  name: string;
2689
- tableName: "booking_item_participants";
2909
+ tableName: "booking_item_travelers";
2690
2910
  dataType: "string";
2691
2911
  columnType: "PgText";
2692
2912
  data: string;
@@ -2701,9 +2921,9 @@ export declare const bookingsService: {
2701
2921
  identity: undefined;
2702
2922
  generated: undefined;
2703
2923
  }, {}, {}>;
2704
- participantId: import("drizzle-orm/pg-core").PgColumn<{
2924
+ travelerId: import("drizzle-orm/pg-core").PgColumn<{
2705
2925
  name: string;
2706
- tableName: "booking_item_participants";
2926
+ tableName: "booking_item_travelers";
2707
2927
  dataType: "string";
2708
2928
  columnType: "PgText";
2709
2929
  data: string;
@@ -2720,24 +2940,24 @@ export declare const bookingsService: {
2720
2940
  }, {}, {}>;
2721
2941
  role: import("drizzle-orm/pg-core").PgColumn<{
2722
2942
  name: "role";
2723
- tableName: "booking_item_participants";
2943
+ tableName: "booking_item_travelers";
2724
2944
  dataType: "string";
2725
2945
  columnType: "PgEnumColumn";
2726
- data: "other" | "traveler" | "occupant" | "primary_contact" | "service_assignee" | "beneficiary";
2946
+ data: "other" | "traveler" | "occupant" | "beneficiary";
2727
2947
  driverParam: string;
2728
2948
  notNull: true;
2729
2949
  hasDefault: true;
2730
2950
  isPrimaryKey: false;
2731
2951
  isAutoincrement: false;
2732
2952
  hasRuntimeDefault: false;
2733
- enumValues: ["traveler", "occupant", "primary_contact", "service_assignee", "beneficiary", "other"];
2953
+ enumValues: ["traveler", "occupant", "beneficiary", "other"];
2734
2954
  baseColumn: never;
2735
2955
  identity: undefined;
2736
2956
  generated: undefined;
2737
2957
  }, {}, {}>;
2738
2958
  isPrimary: import("drizzle-orm/pg-core").PgColumn<{
2739
2959
  name: "is_primary";
2740
- tableName: "booking_item_participants";
2960
+ tableName: "booking_item_travelers";
2741
2961
  dataType: "boolean";
2742
2962
  columnType: "PgBoolean";
2743
2963
  data: boolean;
@@ -2754,7 +2974,7 @@ export declare const bookingsService: {
2754
2974
  }, {}, {}>;
2755
2975
  createdAt: import("drizzle-orm/pg-core").PgColumn<{
2756
2976
  name: "created_at";
2757
- tableName: "booking_item_participants";
2977
+ tableName: "booking_item_travelers";
2758
2978
  dataType: "date";
2759
2979
  columnType: "PgTimestamp";
2760
2980
  data: Date;
@@ -2769,17 +2989,17 @@ export declare const bookingsService: {
2769
2989
  identity: undefined;
2770
2990
  generated: undefined;
2771
2991
  }, {}, {}>;
2772
- }, "single", Record<"booking_item_participants", "not-null">, false, "where" | "orderBy", {
2992
+ }, "single", Record<"booking_item_travelers", "not-null">, false, "where" | "orderBy", {
2773
2993
  id: string;
2774
2994
  bookingItemId: string;
2775
- participantId: string;
2776
- role: "other" | "traveler" | "occupant" | "primary_contact" | "service_assignee" | "beneficiary";
2995
+ travelerId: string;
2996
+ role: "other" | "traveler" | "occupant" | "beneficiary";
2777
2997
  isPrimary: boolean;
2778
2998
  createdAt: Date;
2779
2999
  }[], {
2780
3000
  id: import("drizzle-orm/pg-core").PgColumn<{
2781
3001
  name: string;
2782
- tableName: "booking_item_participants";
3002
+ tableName: "booking_item_travelers";
2783
3003
  dataType: "string";
2784
3004
  columnType: "PgText";
2785
3005
  data: string;
@@ -2796,7 +3016,7 @@ export declare const bookingsService: {
2796
3016
  }, {}, {}>;
2797
3017
  bookingItemId: import("drizzle-orm/pg-core").PgColumn<{
2798
3018
  name: string;
2799
- tableName: "booking_item_participants";
3019
+ tableName: "booking_item_travelers";
2800
3020
  dataType: "string";
2801
3021
  columnType: "PgText";
2802
3022
  data: string;
@@ -2811,9 +3031,9 @@ export declare const bookingsService: {
2811
3031
  identity: undefined;
2812
3032
  generated: undefined;
2813
3033
  }, {}, {}>;
2814
- participantId: import("drizzle-orm/pg-core").PgColumn<{
3034
+ travelerId: import("drizzle-orm/pg-core").PgColumn<{
2815
3035
  name: string;
2816
- tableName: "booking_item_participants";
3036
+ tableName: "booking_item_travelers";
2817
3037
  dataType: "string";
2818
3038
  columnType: "PgText";
2819
3039
  data: string;
@@ -2830,24 +3050,24 @@ export declare const bookingsService: {
2830
3050
  }, {}, {}>;
2831
3051
  role: import("drizzle-orm/pg-core").PgColumn<{
2832
3052
  name: "role";
2833
- tableName: "booking_item_participants";
3053
+ tableName: "booking_item_travelers";
2834
3054
  dataType: "string";
2835
3055
  columnType: "PgEnumColumn";
2836
- data: "other" | "traveler" | "occupant" | "primary_contact" | "service_assignee" | "beneficiary";
3056
+ data: "other" | "traveler" | "occupant" | "beneficiary";
2837
3057
  driverParam: string;
2838
3058
  notNull: true;
2839
3059
  hasDefault: true;
2840
3060
  isPrimaryKey: false;
2841
3061
  isAutoincrement: false;
2842
3062
  hasRuntimeDefault: false;
2843
- enumValues: ["traveler", "occupant", "primary_contact", "service_assignee", "beneficiary", "other"];
3063
+ enumValues: ["traveler", "occupant", "beneficiary", "other"];
2844
3064
  baseColumn: never;
2845
3065
  identity: undefined;
2846
3066
  generated: undefined;
2847
3067
  }, {}, {}>;
2848
3068
  isPrimary: import("drizzle-orm/pg-core").PgColumn<{
2849
3069
  name: "is_primary";
2850
- tableName: "booking_item_participants";
3070
+ tableName: "booking_item_travelers";
2851
3071
  dataType: "boolean";
2852
3072
  columnType: "PgBoolean";
2853
3073
  data: boolean;
@@ -2864,7 +3084,7 @@ export declare const bookingsService: {
2864
3084
  }, {}, {}>;
2865
3085
  createdAt: import("drizzle-orm/pg-core").PgColumn<{
2866
3086
  name: "created_at";
2867
- tableName: "booking_item_participants";
3087
+ tableName: "booking_item_travelers";
2868
3088
  dataType: "date";
2869
3089
  columnType: "PgTimestamp";
2870
3090
  data: Date;
@@ -2883,9 +3103,9 @@ export declare const bookingsService: {
2883
3103
  addItemParticipant(db: PostgresJsDatabase, itemId: string, data: CreateBookingItemParticipantInput): Promise<{
2884
3104
  id: string;
2885
3105
  createdAt: Date;
2886
- role: "other" | "traveler" | "occupant" | "primary_contact" | "service_assignee" | "beneficiary";
3106
+ role: "other" | "traveler" | "occupant" | "beneficiary";
2887
3107
  isPrimary: boolean;
2888
- participantId: string;
3108
+ travelerId: string;
2889
3109
  bookingItemId: string;
2890
3110
  } | null | undefined>;
2891
3111
  removeItemParticipant(db: PostgresJsDatabase, linkId: string): Promise<{
@@ -3412,7 +3632,7 @@ export declare const bookingsService: {
3412
3632
  identity: undefined;
3413
3633
  generated: undefined;
3414
3634
  }, {}, {}>;
3415
- participantId: import("drizzle-orm/pg-core").PgColumn<{
3635
+ travelerId: import("drizzle-orm/pg-core").PgColumn<{
3416
3636
  name: string;
3417
3637
  tableName: "booking_fulfillments";
3418
3638
  dataType: "string";
@@ -3588,7 +3808,7 @@ export declare const bookingsService: {
3588
3808
  id: string;
3589
3809
  bookingId: string;
3590
3810
  bookingItemId: string | null;
3591
- participantId: string | null;
3811
+ travelerId: string | null;
3592
3812
  fulfillmentType: "other" | "voucher" | "ticket" | "pdf" | "qr_code" | "barcode" | "mobile";
3593
3813
  deliveryChannel: "email" | "other" | "download" | "api" | "wallet";
3594
3814
  status: "pending" | "issued" | "reissued" | "revoked" | "failed";
@@ -3650,7 +3870,7 @@ export declare const bookingsService: {
3650
3870
  identity: undefined;
3651
3871
  generated: undefined;
3652
3872
  }, {}, {}>;
3653
- participantId: import("drizzle-orm/pg-core").PgColumn<{
3873
+ travelerId: import("drizzle-orm/pg-core").PgColumn<{
3654
3874
  name: string;
3655
3875
  tableName: "booking_fulfillments";
3656
3876
  dataType: "string";
@@ -3829,7 +4049,7 @@ export declare const bookingsService: {
3829
4049
  createdAt: Date;
3830
4050
  updatedAt: Date;
3831
4051
  bookingId: string;
3832
- participantId: string | null;
4052
+ travelerId: string | null;
3833
4053
  bookingItemId: string | null;
3834
4054
  fulfillmentType: "other" | "voucher" | "ticket" | "pdf" | "qr_code" | "barcode" | "mobile";
3835
4055
  deliveryChannel: "email" | "other" | "download" | "api" | "wallet";
@@ -3842,7 +4062,7 @@ export declare const bookingsService: {
3842
4062
  id: string;
3843
4063
  bookingId: string;
3844
4064
  bookingItemId: string | null;
3845
- participantId: string | null;
4065
+ travelerId: string | null;
3846
4066
  fulfillmentType: "other" | "voucher" | "ticket" | "pdf" | "qr_code" | "barcode" | "mobile";
3847
4067
  deliveryChannel: "email" | "other" | "download" | "api" | "wallet";
3848
4068
  status: "pending" | "issued" | "reissued" | "revoked" | "failed";
@@ -3905,7 +4125,7 @@ export declare const bookingsService: {
3905
4125
  identity: undefined;
3906
4126
  generated: undefined;
3907
4127
  }, {}, {}>;
3908
- participantId: import("drizzle-orm/pg-core").PgColumn<{
4128
+ travelerId: import("drizzle-orm/pg-core").PgColumn<{
3909
4129
  name: string;
3910
4130
  tableName: "booking_redemption_events";
3911
4131
  dataType: "string";
@@ -4030,7 +4250,7 @@ export declare const bookingsService: {
4030
4250
  id: string;
4031
4251
  bookingId: string;
4032
4252
  bookingItemId: string | null;
4033
- participantId: string | null;
4253
+ travelerId: string | null;
4034
4254
  redeemedAt: Date;
4035
4255
  redeemedBy: string | null;
4036
4256
  location: string | null;
@@ -4089,7 +4309,7 @@ export declare const bookingsService: {
4089
4309
  identity: undefined;
4090
4310
  generated: undefined;
4091
4311
  }, {}, {}>;
4092
- participantId: import("drizzle-orm/pg-core").PgColumn<{
4312
+ travelerId: import("drizzle-orm/pg-core").PgColumn<{
4093
4313
  name: string;
4094
4314
  tableName: "booking_redemption_events";
4095
4315
  dataType: "string";
@@ -4218,7 +4438,7 @@ export declare const bookingsService: {
4218
4438
  method: "other" | "manual" | "api" | "scan";
4219
4439
  redeemedAt: Date;
4220
4440
  bookingId: string;
4221
- participantId: string | null;
4441
+ travelerId: string | null;
4222
4442
  bookingItemId: string | null;
4223
4443
  redeemedBy: string | null;
4224
4444
  location: string | null;
@@ -4662,6 +4882,9 @@ export declare const bookingsService: {
4662
4882
  authorId: string;
4663
4883
  content: string;
4664
4884
  } | null | undefined>;
4885
+ deleteNote(db: PostgresJsDatabase, noteId: string): Promise<{
4886
+ id: string;
4887
+ } | null>;
4665
4888
  listDocuments(db: PostgresJsDatabase, bookingId: string): Omit<import("drizzle-orm/pg-core").PgSelectBase<"booking_documents", {
4666
4889
  id: import("drizzle-orm/pg-core").PgColumn<{
4667
4890
  name: string;
@@ -4697,7 +4920,7 @@ export declare const bookingsService: {
4697
4920
  identity: undefined;
4698
4921
  generated: undefined;
4699
4922
  }, {}, {}>;
4700
- participantId: import("drizzle-orm/pg-core").PgColumn<{
4923
+ travelerId: import("drizzle-orm/pg-core").PgColumn<{
4701
4924
  name: string;
4702
4925
  tableName: "booking_documents";
4703
4926
  dataType: "string";
@@ -4819,7 +5042,7 @@ export declare const bookingsService: {
4819
5042
  }, "single", Record<"booking_documents", "not-null">, false, "where" | "orderBy", {
4820
5043
  id: string;
4821
5044
  bookingId: string;
4822
- participantId: string | null;
5045
+ travelerId: string | null;
4823
5046
  type: "visa" | "other" | "insurance" | "health" | "passport_copy";
4824
5047
  fileName: string;
4825
5048
  fileUrl: string;
@@ -4861,7 +5084,7 @@ export declare const bookingsService: {
4861
5084
  identity: undefined;
4862
5085
  generated: undefined;
4863
5086
  }, {}, {}>;
4864
- participantId: import("drizzle-orm/pg-core").PgColumn<{
5087
+ travelerId: import("drizzle-orm/pg-core").PgColumn<{
4865
5088
  name: string;
4866
5089
  tableName: "booking_documents";
4867
5090
  dataType: "string";
@@ -4988,7 +5211,7 @@ export declare const bookingsService: {
4988
5211
  createdAt: Date;
4989
5212
  expiresAt: Date | null;
4990
5213
  bookingId: string;
4991
- participantId: string | null;
5214
+ travelerId: string | null;
4992
5215
  fileName: string;
4993
5216
  fileUrl: string;
4994
5217
  } | null | undefined>;