@voyantjs/bookings-react 0.4.5 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hooks/index.d.ts +12 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +12 -0
- package/dist/hooks/use-booking-cancel-mutation.d.ts +25 -0
- package/dist/hooks/use-booking-cancel-mutation.d.ts.map +1 -0
- package/dist/hooks/use-booking-cancel-mutation.js +24 -0
- package/dist/hooks/use-booking-convert-mutation.d.ts +31 -0
- package/dist/hooks/use-booking-convert-mutation.d.ts.map +1 -0
- package/dist/hooks/use-booking-convert-mutation.js +24 -0
- package/dist/hooks/use-booking-documents.d.ts +41 -0
- package/dist/hooks/use-booking-documents.d.ts.map +1 -0
- package/dist/hooks/use-booking-documents.js +36 -0
- package/dist/hooks/use-booking-group-for-booking.d.ts +24 -0
- package/dist/hooks/use-booking-group-for-booking.d.ts.map +1 -0
- package/dist/hooks/use-booking-group-for-booking.js +12 -0
- package/dist/hooks/use-booking-group-member-mutation.d.ts +27 -0
- package/dist/hooks/use-booking-group-member-mutation.d.ts.map +1 -0
- package/dist/hooks/use-booking-group-member-mutation.js +38 -0
- package/dist/hooks/use-booking-group-mutation.d.ts +40 -0
- package/dist/hooks/use-booking-group-mutation.d.ts.map +1 -0
- package/dist/hooks/use-booking-group-mutation.js +32 -0
- package/dist/hooks/use-booking-group.d.ts +41 -0
- package/dist/hooks/use-booking-group.d.ts.map +1 -0
- package/dist/hooks/use-booking-group.js +12 -0
- package/dist/hooks/use-booking-groups.d.ts +21 -0
- package/dist/hooks/use-booking-groups.d.ts.map +1 -0
- package/dist/hooks/use-booking-groups.js +12 -0
- package/dist/hooks/use-booking-item-mutation.d.ts +77 -0
- package/dist/hooks/use-booking-item-mutation.d.ts.map +1 -0
- package/dist/hooks/use-booking-item-mutation.js +42 -0
- package/dist/hooks/use-booking-item-participants.d.ts +32 -0
- package/dist/hooks/use-booking-item-participants.d.ts.map +1 -0
- package/dist/hooks/use-booking-item-participants.js +41 -0
- package/dist/hooks/use-booking-items.d.ts +31 -0
- package/dist/hooks/use-booking-items.d.ts.map +1 -0
- package/dist/hooks/use-booking-items.js +12 -0
- package/dist/hooks/use-booking-primary-product.d.ts +28 -0
- package/dist/hooks/use-booking-primary-product.d.ts.map +1 -0
- package/dist/hooks/use-booking-primary-product.js +20 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/query-keys.d.ts +15 -0
- package/dist/query-keys.d.ts.map +1 -1
- package/dist/query-keys.js +8 -0
- package/dist/query-options.d.ts +522 -0
- package/dist/query-options.d.ts.map +1 -1
- package/dist/query-options.js +57 -1
- package/dist/schemas.d.ts +501 -0
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +119 -0
- package/dist/status-presentation.d.ts +34 -0
- package/dist/status-presentation.d.ts.map +1 -0
- package/dist/status-presentation.js +37 -0
- package/package.json +5 -5
package/dist/schemas.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export declare const bookingStatusSchema: z.ZodEnum<{
|
|
|
23
23
|
expired: "expired";
|
|
24
24
|
cancelled: "cancelled";
|
|
25
25
|
}>;
|
|
26
|
+
export type BookingStatus = z.infer<typeof bookingStatusSchema>;
|
|
26
27
|
export declare const supplierConfirmationStatusSchema: z.ZodEnum<{
|
|
27
28
|
pending: "pending";
|
|
28
29
|
confirmed: "confirmed";
|
|
@@ -106,6 +107,239 @@ export declare const bookingNoteRecordSchema: z.ZodObject<{
|
|
|
106
107
|
createdAt: z.ZodString;
|
|
107
108
|
}, z.core.$strip>;
|
|
108
109
|
export type BookingNoteRecord = z.infer<typeof bookingNoteRecordSchema>;
|
|
110
|
+
export declare const bookingItemTypeSchema: z.ZodEnum<{
|
|
111
|
+
other: "other";
|
|
112
|
+
unit: "unit";
|
|
113
|
+
extra: "extra";
|
|
114
|
+
service: "service";
|
|
115
|
+
fee: "fee";
|
|
116
|
+
tax: "tax";
|
|
117
|
+
discount: "discount";
|
|
118
|
+
adjustment: "adjustment";
|
|
119
|
+
accommodation: "accommodation";
|
|
120
|
+
transport: "transport";
|
|
121
|
+
}>;
|
|
122
|
+
export declare const bookingItemStatusSchema: z.ZodEnum<{
|
|
123
|
+
draft: "draft";
|
|
124
|
+
on_hold: "on_hold";
|
|
125
|
+
confirmed: "confirmed";
|
|
126
|
+
expired: "expired";
|
|
127
|
+
cancelled: "cancelled";
|
|
128
|
+
fulfilled: "fulfilled";
|
|
129
|
+
}>;
|
|
130
|
+
export declare const bookingItemRecordSchema: z.ZodObject<{
|
|
131
|
+
id: z.ZodString;
|
|
132
|
+
bookingId: z.ZodString;
|
|
133
|
+
title: z.ZodString;
|
|
134
|
+
description: z.ZodNullable<z.ZodString>;
|
|
135
|
+
itemType: z.ZodEnum<{
|
|
136
|
+
other: "other";
|
|
137
|
+
unit: "unit";
|
|
138
|
+
extra: "extra";
|
|
139
|
+
service: "service";
|
|
140
|
+
fee: "fee";
|
|
141
|
+
tax: "tax";
|
|
142
|
+
discount: "discount";
|
|
143
|
+
adjustment: "adjustment";
|
|
144
|
+
accommodation: "accommodation";
|
|
145
|
+
transport: "transport";
|
|
146
|
+
}>;
|
|
147
|
+
status: z.ZodEnum<{
|
|
148
|
+
draft: "draft";
|
|
149
|
+
on_hold: "on_hold";
|
|
150
|
+
confirmed: "confirmed";
|
|
151
|
+
expired: "expired";
|
|
152
|
+
cancelled: "cancelled";
|
|
153
|
+
fulfilled: "fulfilled";
|
|
154
|
+
}>;
|
|
155
|
+
serviceDate: z.ZodNullable<z.ZodString>;
|
|
156
|
+
startsAt: z.ZodNullable<z.ZodString>;
|
|
157
|
+
endsAt: z.ZodNullable<z.ZodString>;
|
|
158
|
+
quantity: z.ZodNumber;
|
|
159
|
+
sellCurrency: z.ZodString;
|
|
160
|
+
unitSellAmountCents: z.ZodNullable<z.ZodNumber>;
|
|
161
|
+
totalSellAmountCents: z.ZodNullable<z.ZodNumber>;
|
|
162
|
+
costCurrency: z.ZodNullable<z.ZodString>;
|
|
163
|
+
unitCostAmountCents: z.ZodNullable<z.ZodNumber>;
|
|
164
|
+
totalCostAmountCents: z.ZodNullable<z.ZodNumber>;
|
|
165
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
166
|
+
productId: z.ZodNullable<z.ZodString>;
|
|
167
|
+
optionId: z.ZodNullable<z.ZodString>;
|
|
168
|
+
optionUnitId: z.ZodNullable<z.ZodString>;
|
|
169
|
+
pricingCategoryId: z.ZodNullable<z.ZodString>;
|
|
170
|
+
createdAt: z.ZodString;
|
|
171
|
+
updatedAt: z.ZodString;
|
|
172
|
+
}, z.core.$strip>;
|
|
173
|
+
export type BookingItemRecord = z.infer<typeof bookingItemRecordSchema>;
|
|
174
|
+
export declare const bookingItemParticipantRoleSchema: z.ZodEnum<{
|
|
175
|
+
traveler: "traveler";
|
|
176
|
+
occupant: "occupant";
|
|
177
|
+
other: "other";
|
|
178
|
+
primary_contact: "primary_contact";
|
|
179
|
+
service_assignee: "service_assignee";
|
|
180
|
+
beneficiary: "beneficiary";
|
|
181
|
+
}>;
|
|
182
|
+
export declare const bookingItemParticipantRecordSchema: z.ZodObject<{
|
|
183
|
+
id: z.ZodString;
|
|
184
|
+
bookingItemId: z.ZodString;
|
|
185
|
+
participantId: z.ZodString;
|
|
186
|
+
role: z.ZodEnum<{
|
|
187
|
+
traveler: "traveler";
|
|
188
|
+
occupant: "occupant";
|
|
189
|
+
other: "other";
|
|
190
|
+
primary_contact: "primary_contact";
|
|
191
|
+
service_assignee: "service_assignee";
|
|
192
|
+
beneficiary: "beneficiary";
|
|
193
|
+
}>;
|
|
194
|
+
isPrimary: z.ZodBoolean;
|
|
195
|
+
createdAt: z.ZodString;
|
|
196
|
+
}, z.core.$strip>;
|
|
197
|
+
export type BookingItemParticipantRecord = z.infer<typeof bookingItemParticipantRecordSchema>;
|
|
198
|
+
export declare const bookingDocumentTypeSchema: z.ZodEnum<{
|
|
199
|
+
other: "other";
|
|
200
|
+
visa: "visa";
|
|
201
|
+
insurance: "insurance";
|
|
202
|
+
health: "health";
|
|
203
|
+
passport_copy: "passport_copy";
|
|
204
|
+
}>;
|
|
205
|
+
export declare const bookingDocumentRecordSchema: z.ZodObject<{
|
|
206
|
+
id: z.ZodString;
|
|
207
|
+
bookingId: z.ZodString;
|
|
208
|
+
participantId: z.ZodNullable<z.ZodString>;
|
|
209
|
+
type: z.ZodEnum<{
|
|
210
|
+
other: "other";
|
|
211
|
+
visa: "visa";
|
|
212
|
+
insurance: "insurance";
|
|
213
|
+
health: "health";
|
|
214
|
+
passport_copy: "passport_copy";
|
|
215
|
+
}>;
|
|
216
|
+
fileName: z.ZodString;
|
|
217
|
+
fileUrl: z.ZodString;
|
|
218
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
219
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
220
|
+
createdAt: z.ZodString;
|
|
221
|
+
}, z.core.$strip>;
|
|
222
|
+
export type BookingDocumentRecord = z.infer<typeof bookingDocumentRecordSchema>;
|
|
223
|
+
export declare const bookingGroupKindSchema: z.ZodEnum<{
|
|
224
|
+
other: "other";
|
|
225
|
+
shared_room: "shared_room";
|
|
226
|
+
}>;
|
|
227
|
+
export declare const bookingGroupMemberRoleSchema: z.ZodEnum<{
|
|
228
|
+
primary: "primary";
|
|
229
|
+
shared: "shared";
|
|
230
|
+
}>;
|
|
231
|
+
export declare const bookingGroupRecordSchema: z.ZodObject<{
|
|
232
|
+
id: z.ZodString;
|
|
233
|
+
kind: z.ZodEnum<{
|
|
234
|
+
other: "other";
|
|
235
|
+
shared_room: "shared_room";
|
|
236
|
+
}>;
|
|
237
|
+
label: z.ZodString;
|
|
238
|
+
primaryBookingId: z.ZodNullable<z.ZodString>;
|
|
239
|
+
productId: z.ZodNullable<z.ZodString>;
|
|
240
|
+
optionUnitId: z.ZodNullable<z.ZodString>;
|
|
241
|
+
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
242
|
+
createdAt: z.ZodString;
|
|
243
|
+
updatedAt: z.ZodString;
|
|
244
|
+
}, z.core.$strip>;
|
|
245
|
+
export type BookingGroupRecord = z.infer<typeof bookingGroupRecordSchema>;
|
|
246
|
+
export declare const bookingGroupMemberRecordSchema: z.ZodObject<{
|
|
247
|
+
id: z.ZodString;
|
|
248
|
+
groupId: z.ZodString;
|
|
249
|
+
bookingId: z.ZodString;
|
|
250
|
+
role: z.ZodEnum<{
|
|
251
|
+
primary: "primary";
|
|
252
|
+
shared: "shared";
|
|
253
|
+
}>;
|
|
254
|
+
createdAt: z.ZodString;
|
|
255
|
+
}, z.core.$strip>;
|
|
256
|
+
export type BookingGroupMemberRecord = z.infer<typeof bookingGroupMemberRecordSchema>;
|
|
257
|
+
export declare const bookingGroupMemberWithBookingSchema: z.ZodObject<{
|
|
258
|
+
id: z.ZodString;
|
|
259
|
+
groupId: z.ZodString;
|
|
260
|
+
bookingId: z.ZodString;
|
|
261
|
+
role: z.ZodEnum<{
|
|
262
|
+
primary: "primary";
|
|
263
|
+
shared: "shared";
|
|
264
|
+
}>;
|
|
265
|
+
createdAt: z.ZodString;
|
|
266
|
+
booking: z.ZodNullable<z.ZodObject<{
|
|
267
|
+
id: z.ZodString;
|
|
268
|
+
bookingNumber: z.ZodString;
|
|
269
|
+
status: z.ZodEnum<{
|
|
270
|
+
draft: "draft";
|
|
271
|
+
on_hold: "on_hold";
|
|
272
|
+
confirmed: "confirmed";
|
|
273
|
+
in_progress: "in_progress";
|
|
274
|
+
completed: "completed";
|
|
275
|
+
expired: "expired";
|
|
276
|
+
cancelled: "cancelled";
|
|
277
|
+
}>;
|
|
278
|
+
personId: z.ZodNullable<z.ZodString>;
|
|
279
|
+
organizationId: z.ZodNullable<z.ZodString>;
|
|
280
|
+
sellCurrency: z.ZodString;
|
|
281
|
+
sellAmountCents: z.ZodNullable<z.ZodNumber>;
|
|
282
|
+
costAmountCents: z.ZodNullable<z.ZodNumber>;
|
|
283
|
+
marginPercent: z.ZodNullable<z.ZodNumber>;
|
|
284
|
+
startDate: z.ZodNullable<z.ZodString>;
|
|
285
|
+
endDate: z.ZodNullable<z.ZodString>;
|
|
286
|
+
pax: z.ZodNullable<z.ZodNumber>;
|
|
287
|
+
internalNotes: z.ZodNullable<z.ZodString>;
|
|
288
|
+
createdAt: z.ZodString;
|
|
289
|
+
updatedAt: z.ZodString;
|
|
290
|
+
}, z.core.$strip>>;
|
|
291
|
+
}, z.core.$strip>;
|
|
292
|
+
export type BookingGroupMemberWithBookingRecord = z.infer<typeof bookingGroupMemberWithBookingSchema>;
|
|
293
|
+
export declare const bookingGroupDetailSchema: z.ZodObject<{
|
|
294
|
+
id: z.ZodString;
|
|
295
|
+
kind: z.ZodEnum<{
|
|
296
|
+
other: "other";
|
|
297
|
+
shared_room: "shared_room";
|
|
298
|
+
}>;
|
|
299
|
+
label: z.ZodString;
|
|
300
|
+
primaryBookingId: z.ZodNullable<z.ZodString>;
|
|
301
|
+
productId: z.ZodNullable<z.ZodString>;
|
|
302
|
+
optionUnitId: z.ZodNullable<z.ZodString>;
|
|
303
|
+
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
304
|
+
createdAt: z.ZodString;
|
|
305
|
+
updatedAt: z.ZodString;
|
|
306
|
+
members: z.ZodArray<z.ZodObject<{
|
|
307
|
+
id: z.ZodString;
|
|
308
|
+
groupId: z.ZodString;
|
|
309
|
+
bookingId: z.ZodString;
|
|
310
|
+
role: z.ZodEnum<{
|
|
311
|
+
primary: "primary";
|
|
312
|
+
shared: "shared";
|
|
313
|
+
}>;
|
|
314
|
+
createdAt: z.ZodString;
|
|
315
|
+
booking: z.ZodNullable<z.ZodObject<{
|
|
316
|
+
id: z.ZodString;
|
|
317
|
+
bookingNumber: z.ZodString;
|
|
318
|
+
status: z.ZodEnum<{
|
|
319
|
+
draft: "draft";
|
|
320
|
+
on_hold: "on_hold";
|
|
321
|
+
confirmed: "confirmed";
|
|
322
|
+
in_progress: "in_progress";
|
|
323
|
+
completed: "completed";
|
|
324
|
+
expired: "expired";
|
|
325
|
+
cancelled: "cancelled";
|
|
326
|
+
}>;
|
|
327
|
+
personId: z.ZodNullable<z.ZodString>;
|
|
328
|
+
organizationId: z.ZodNullable<z.ZodString>;
|
|
329
|
+
sellCurrency: z.ZodString;
|
|
330
|
+
sellAmountCents: z.ZodNullable<z.ZodNumber>;
|
|
331
|
+
costAmountCents: z.ZodNullable<z.ZodNumber>;
|
|
332
|
+
marginPercent: z.ZodNullable<z.ZodNumber>;
|
|
333
|
+
startDate: z.ZodNullable<z.ZodString>;
|
|
334
|
+
endDate: z.ZodNullable<z.ZodString>;
|
|
335
|
+
pax: z.ZodNullable<z.ZodNumber>;
|
|
336
|
+
internalNotes: z.ZodNullable<z.ZodString>;
|
|
337
|
+
createdAt: z.ZodString;
|
|
338
|
+
updatedAt: z.ZodString;
|
|
339
|
+
}, z.core.$strip>>;
|
|
340
|
+
}, z.core.$strip>>;
|
|
341
|
+
}, z.core.$strip>;
|
|
342
|
+
export type BookingGroupDetailRecord = z.infer<typeof bookingGroupDetailSchema>;
|
|
109
343
|
export declare const bookingListResponse: z.ZodObject<{
|
|
110
344
|
data: z.ZodArray<z.ZodObject<{
|
|
111
345
|
id: z.ZodString;
|
|
@@ -163,6 +397,273 @@ export declare const bookingSingleResponse: z.ZodObject<{
|
|
|
163
397
|
updatedAt: z.ZodString;
|
|
164
398
|
}, z.core.$strip>;
|
|
165
399
|
}, z.core.$strip>;
|
|
400
|
+
export declare const bookingItemsResponse: z.ZodObject<{
|
|
401
|
+
data: z.ZodArray<z.ZodObject<{
|
|
402
|
+
id: z.ZodString;
|
|
403
|
+
bookingId: z.ZodString;
|
|
404
|
+
title: z.ZodString;
|
|
405
|
+
description: z.ZodNullable<z.ZodString>;
|
|
406
|
+
itemType: z.ZodEnum<{
|
|
407
|
+
other: "other";
|
|
408
|
+
unit: "unit";
|
|
409
|
+
extra: "extra";
|
|
410
|
+
service: "service";
|
|
411
|
+
fee: "fee";
|
|
412
|
+
tax: "tax";
|
|
413
|
+
discount: "discount";
|
|
414
|
+
adjustment: "adjustment";
|
|
415
|
+
accommodation: "accommodation";
|
|
416
|
+
transport: "transport";
|
|
417
|
+
}>;
|
|
418
|
+
status: z.ZodEnum<{
|
|
419
|
+
draft: "draft";
|
|
420
|
+
on_hold: "on_hold";
|
|
421
|
+
confirmed: "confirmed";
|
|
422
|
+
expired: "expired";
|
|
423
|
+
cancelled: "cancelled";
|
|
424
|
+
fulfilled: "fulfilled";
|
|
425
|
+
}>;
|
|
426
|
+
serviceDate: z.ZodNullable<z.ZodString>;
|
|
427
|
+
startsAt: z.ZodNullable<z.ZodString>;
|
|
428
|
+
endsAt: z.ZodNullable<z.ZodString>;
|
|
429
|
+
quantity: z.ZodNumber;
|
|
430
|
+
sellCurrency: z.ZodString;
|
|
431
|
+
unitSellAmountCents: z.ZodNullable<z.ZodNumber>;
|
|
432
|
+
totalSellAmountCents: z.ZodNullable<z.ZodNumber>;
|
|
433
|
+
costCurrency: z.ZodNullable<z.ZodString>;
|
|
434
|
+
unitCostAmountCents: z.ZodNullable<z.ZodNumber>;
|
|
435
|
+
totalCostAmountCents: z.ZodNullable<z.ZodNumber>;
|
|
436
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
437
|
+
productId: z.ZodNullable<z.ZodString>;
|
|
438
|
+
optionId: z.ZodNullable<z.ZodString>;
|
|
439
|
+
optionUnitId: z.ZodNullable<z.ZodString>;
|
|
440
|
+
pricingCategoryId: z.ZodNullable<z.ZodString>;
|
|
441
|
+
createdAt: z.ZodString;
|
|
442
|
+
updatedAt: z.ZodString;
|
|
443
|
+
}, z.core.$strip>>;
|
|
444
|
+
}, z.core.$strip>;
|
|
445
|
+
export declare const bookingItemParticipantsResponse: z.ZodObject<{
|
|
446
|
+
data: z.ZodArray<z.ZodObject<{
|
|
447
|
+
id: z.ZodString;
|
|
448
|
+
bookingItemId: z.ZodString;
|
|
449
|
+
participantId: z.ZodString;
|
|
450
|
+
role: z.ZodEnum<{
|
|
451
|
+
traveler: "traveler";
|
|
452
|
+
occupant: "occupant";
|
|
453
|
+
other: "other";
|
|
454
|
+
primary_contact: "primary_contact";
|
|
455
|
+
service_assignee: "service_assignee";
|
|
456
|
+
beneficiary: "beneficiary";
|
|
457
|
+
}>;
|
|
458
|
+
isPrimary: z.ZodBoolean;
|
|
459
|
+
createdAt: z.ZodString;
|
|
460
|
+
}, z.core.$strip>>;
|
|
461
|
+
}, z.core.$strip>;
|
|
462
|
+
export declare const bookingDocumentsResponse: z.ZodObject<{
|
|
463
|
+
data: z.ZodArray<z.ZodObject<{
|
|
464
|
+
id: z.ZodString;
|
|
465
|
+
bookingId: z.ZodString;
|
|
466
|
+
participantId: z.ZodNullable<z.ZodString>;
|
|
467
|
+
type: z.ZodEnum<{
|
|
468
|
+
other: "other";
|
|
469
|
+
visa: "visa";
|
|
470
|
+
insurance: "insurance";
|
|
471
|
+
health: "health";
|
|
472
|
+
passport_copy: "passport_copy";
|
|
473
|
+
}>;
|
|
474
|
+
fileName: z.ZodString;
|
|
475
|
+
fileUrl: z.ZodString;
|
|
476
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
477
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
478
|
+
createdAt: z.ZodString;
|
|
479
|
+
}, z.core.$strip>>;
|
|
480
|
+
}, z.core.$strip>;
|
|
481
|
+
export declare const bookingGroupListResponse: z.ZodObject<{
|
|
482
|
+
data: z.ZodArray<z.ZodObject<{
|
|
483
|
+
id: z.ZodString;
|
|
484
|
+
kind: z.ZodEnum<{
|
|
485
|
+
other: "other";
|
|
486
|
+
shared_room: "shared_room";
|
|
487
|
+
}>;
|
|
488
|
+
label: z.ZodString;
|
|
489
|
+
primaryBookingId: z.ZodNullable<z.ZodString>;
|
|
490
|
+
productId: z.ZodNullable<z.ZodString>;
|
|
491
|
+
optionUnitId: z.ZodNullable<z.ZodString>;
|
|
492
|
+
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
493
|
+
createdAt: z.ZodString;
|
|
494
|
+
updatedAt: z.ZodString;
|
|
495
|
+
}, z.core.$strip>>;
|
|
496
|
+
total: z.ZodNumber;
|
|
497
|
+
limit: z.ZodNumber;
|
|
498
|
+
offset: z.ZodNumber;
|
|
499
|
+
}, z.core.$strip>;
|
|
500
|
+
export declare const bookingGroupSingleResponse: z.ZodObject<{
|
|
501
|
+
data: z.ZodObject<{
|
|
502
|
+
id: z.ZodString;
|
|
503
|
+
kind: z.ZodEnum<{
|
|
504
|
+
other: "other";
|
|
505
|
+
shared_room: "shared_room";
|
|
506
|
+
}>;
|
|
507
|
+
label: z.ZodString;
|
|
508
|
+
primaryBookingId: z.ZodNullable<z.ZodString>;
|
|
509
|
+
productId: z.ZodNullable<z.ZodString>;
|
|
510
|
+
optionUnitId: z.ZodNullable<z.ZodString>;
|
|
511
|
+
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
512
|
+
createdAt: z.ZodString;
|
|
513
|
+
updatedAt: z.ZodString;
|
|
514
|
+
}, z.core.$strip>;
|
|
515
|
+
}, z.core.$strip>;
|
|
516
|
+
export declare const bookingGroupDetailResponse: z.ZodObject<{
|
|
517
|
+
data: z.ZodObject<{
|
|
518
|
+
id: z.ZodString;
|
|
519
|
+
kind: z.ZodEnum<{
|
|
520
|
+
other: "other";
|
|
521
|
+
shared_room: "shared_room";
|
|
522
|
+
}>;
|
|
523
|
+
label: z.ZodString;
|
|
524
|
+
primaryBookingId: z.ZodNullable<z.ZodString>;
|
|
525
|
+
productId: z.ZodNullable<z.ZodString>;
|
|
526
|
+
optionUnitId: z.ZodNullable<z.ZodString>;
|
|
527
|
+
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
528
|
+
createdAt: z.ZodString;
|
|
529
|
+
updatedAt: z.ZodString;
|
|
530
|
+
members: z.ZodArray<z.ZodObject<{
|
|
531
|
+
id: z.ZodString;
|
|
532
|
+
groupId: z.ZodString;
|
|
533
|
+
bookingId: z.ZodString;
|
|
534
|
+
role: z.ZodEnum<{
|
|
535
|
+
primary: "primary";
|
|
536
|
+
shared: "shared";
|
|
537
|
+
}>;
|
|
538
|
+
createdAt: z.ZodString;
|
|
539
|
+
booking: z.ZodNullable<z.ZodObject<{
|
|
540
|
+
id: z.ZodString;
|
|
541
|
+
bookingNumber: z.ZodString;
|
|
542
|
+
status: z.ZodEnum<{
|
|
543
|
+
draft: "draft";
|
|
544
|
+
on_hold: "on_hold";
|
|
545
|
+
confirmed: "confirmed";
|
|
546
|
+
in_progress: "in_progress";
|
|
547
|
+
completed: "completed";
|
|
548
|
+
expired: "expired";
|
|
549
|
+
cancelled: "cancelled";
|
|
550
|
+
}>;
|
|
551
|
+
personId: z.ZodNullable<z.ZodString>;
|
|
552
|
+
organizationId: z.ZodNullable<z.ZodString>;
|
|
553
|
+
sellCurrency: z.ZodString;
|
|
554
|
+
sellAmountCents: z.ZodNullable<z.ZodNumber>;
|
|
555
|
+
costAmountCents: z.ZodNullable<z.ZodNumber>;
|
|
556
|
+
marginPercent: z.ZodNullable<z.ZodNumber>;
|
|
557
|
+
startDate: z.ZodNullable<z.ZodString>;
|
|
558
|
+
endDate: z.ZodNullable<z.ZodString>;
|
|
559
|
+
pax: z.ZodNullable<z.ZodNumber>;
|
|
560
|
+
internalNotes: z.ZodNullable<z.ZodString>;
|
|
561
|
+
createdAt: z.ZodString;
|
|
562
|
+
updatedAt: z.ZodString;
|
|
563
|
+
}, z.core.$strip>>;
|
|
564
|
+
}, z.core.$strip>>;
|
|
565
|
+
}, z.core.$strip>;
|
|
566
|
+
}, z.core.$strip>;
|
|
567
|
+
export declare const bookingGroupMembersResponse: z.ZodObject<{
|
|
568
|
+
data: z.ZodArray<z.ZodObject<{
|
|
569
|
+
id: z.ZodString;
|
|
570
|
+
groupId: z.ZodString;
|
|
571
|
+
bookingId: z.ZodString;
|
|
572
|
+
role: z.ZodEnum<{
|
|
573
|
+
primary: "primary";
|
|
574
|
+
shared: "shared";
|
|
575
|
+
}>;
|
|
576
|
+
createdAt: z.ZodString;
|
|
577
|
+
booking: z.ZodNullable<z.ZodObject<{
|
|
578
|
+
id: z.ZodString;
|
|
579
|
+
bookingNumber: z.ZodString;
|
|
580
|
+
status: z.ZodEnum<{
|
|
581
|
+
draft: "draft";
|
|
582
|
+
on_hold: "on_hold";
|
|
583
|
+
confirmed: "confirmed";
|
|
584
|
+
in_progress: "in_progress";
|
|
585
|
+
completed: "completed";
|
|
586
|
+
expired: "expired";
|
|
587
|
+
cancelled: "cancelled";
|
|
588
|
+
}>;
|
|
589
|
+
personId: z.ZodNullable<z.ZodString>;
|
|
590
|
+
organizationId: z.ZodNullable<z.ZodString>;
|
|
591
|
+
sellCurrency: z.ZodString;
|
|
592
|
+
sellAmountCents: z.ZodNullable<z.ZodNumber>;
|
|
593
|
+
costAmountCents: z.ZodNullable<z.ZodNumber>;
|
|
594
|
+
marginPercent: z.ZodNullable<z.ZodNumber>;
|
|
595
|
+
startDate: z.ZodNullable<z.ZodString>;
|
|
596
|
+
endDate: z.ZodNullable<z.ZodString>;
|
|
597
|
+
pax: z.ZodNullable<z.ZodNumber>;
|
|
598
|
+
internalNotes: z.ZodNullable<z.ZodString>;
|
|
599
|
+
createdAt: z.ZodString;
|
|
600
|
+
updatedAt: z.ZodString;
|
|
601
|
+
}, z.core.$strip>>;
|
|
602
|
+
}, z.core.$strip>>;
|
|
603
|
+
}, z.core.$strip>;
|
|
604
|
+
export declare const bookingGroupMemberSingleResponse: z.ZodObject<{
|
|
605
|
+
data: z.ZodObject<{
|
|
606
|
+
id: z.ZodString;
|
|
607
|
+
groupId: z.ZodString;
|
|
608
|
+
bookingId: z.ZodString;
|
|
609
|
+
role: z.ZodEnum<{
|
|
610
|
+
primary: "primary";
|
|
611
|
+
shared: "shared";
|
|
612
|
+
}>;
|
|
613
|
+
createdAt: z.ZodString;
|
|
614
|
+
}, z.core.$strip>;
|
|
615
|
+
}, z.core.$strip>;
|
|
616
|
+
export declare const bookingGroupForBookingSchema: z.ZodObject<{
|
|
617
|
+
id: z.ZodString;
|
|
618
|
+
kind: z.ZodEnum<{
|
|
619
|
+
other: "other";
|
|
620
|
+
shared_room: "shared_room";
|
|
621
|
+
}>;
|
|
622
|
+
label: z.ZodString;
|
|
623
|
+
primaryBookingId: z.ZodNullable<z.ZodString>;
|
|
624
|
+
productId: z.ZodNullable<z.ZodString>;
|
|
625
|
+
optionUnitId: z.ZodNullable<z.ZodString>;
|
|
626
|
+
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
627
|
+
createdAt: z.ZodString;
|
|
628
|
+
updatedAt: z.ZodString;
|
|
629
|
+
membership: z.ZodObject<{
|
|
630
|
+
id: z.ZodString;
|
|
631
|
+
groupId: z.ZodString;
|
|
632
|
+
bookingId: z.ZodString;
|
|
633
|
+
role: z.ZodEnum<{
|
|
634
|
+
primary: "primary";
|
|
635
|
+
shared: "shared";
|
|
636
|
+
}>;
|
|
637
|
+
createdAt: z.ZodString;
|
|
638
|
+
}, z.core.$strip>;
|
|
639
|
+
}, z.core.$strip>;
|
|
640
|
+
export declare const bookingGroupForBookingResponse: z.ZodObject<{
|
|
641
|
+
data: z.ZodNullable<z.ZodObject<{
|
|
642
|
+
id: z.ZodString;
|
|
643
|
+
kind: z.ZodEnum<{
|
|
644
|
+
other: "other";
|
|
645
|
+
shared_room: "shared_room";
|
|
646
|
+
}>;
|
|
647
|
+
label: z.ZodString;
|
|
648
|
+
primaryBookingId: z.ZodNullable<z.ZodString>;
|
|
649
|
+
productId: z.ZodNullable<z.ZodString>;
|
|
650
|
+
optionUnitId: z.ZodNullable<z.ZodString>;
|
|
651
|
+
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
652
|
+
createdAt: z.ZodString;
|
|
653
|
+
updatedAt: z.ZodString;
|
|
654
|
+
membership: z.ZodObject<{
|
|
655
|
+
id: z.ZodString;
|
|
656
|
+
groupId: z.ZodString;
|
|
657
|
+
bookingId: z.ZodString;
|
|
658
|
+
role: z.ZodEnum<{
|
|
659
|
+
primary: "primary";
|
|
660
|
+
shared: "shared";
|
|
661
|
+
}>;
|
|
662
|
+
createdAt: z.ZodString;
|
|
663
|
+
}, z.core.$strip>;
|
|
664
|
+
}, z.core.$strip>>;
|
|
665
|
+
}, z.core.$strip>;
|
|
666
|
+
export type BookingGroupForBookingRecord = z.infer<typeof bookingGroupForBookingSchema>;
|
|
166
667
|
export declare const bookingPassengersResponse: z.ZodObject<{
|
|
167
668
|
data: z.ZodArray<z.ZodObject<{
|
|
168
669
|
id: z.ZodString;
|
package/dist/schemas.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC;;;;;iBAM7D,CAAA;AAEJ,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC;;iBAA6B,CAAA;AAC3F,eAAO,MAAM,aAAa,GAAI,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC;;iBAAsC,CAAA;AACnG,eAAO,MAAM,eAAe;;iBAAqC,CAAA;AAEjE,eAAO,MAAM,mBAAmB;;;;;;;;EAQ9B,CAAA;AAEF,eAAO,MAAM,gCAAgC;;;;;EAK3C,CAAA;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;iBAgB9B,CAAA;AAEF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAE/D,eAAO,MAAM,4BAA4B;;;;;;;;;;;iBAWvC,C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AAA;AACF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAA;AACvF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;iBAA8C,CAAA;AACpF,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;iBAAmD,CAAA;AAC/F,eAAO,MAAM,uBAAuB;;;;;;;;;;iBAA6C,CAAA;AACjF,eAAO,MAAM,oBAAoB;;;;;;;;iBAAyC,CAAA;AAC1E,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAA6C,CAAA;AACtF,eAAO,MAAM,iCAAiC;;;;;;;;;;;iBAAkD,CAAA;AAChG,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAE/C,CAAA"}
|
package/dist/schemas.js
CHANGED
|
@@ -83,8 +83,127 @@ export const bookingNoteRecordSchema = z.object({
|
|
|
83
83
|
content: z.string(),
|
|
84
84
|
createdAt: z.string(),
|
|
85
85
|
});
|
|
86
|
+
export const bookingItemTypeSchema = z.enum([
|
|
87
|
+
"unit",
|
|
88
|
+
"extra",
|
|
89
|
+
"service",
|
|
90
|
+
"fee",
|
|
91
|
+
"tax",
|
|
92
|
+
"discount",
|
|
93
|
+
"adjustment",
|
|
94
|
+
"accommodation",
|
|
95
|
+
"transport",
|
|
96
|
+
"other",
|
|
97
|
+
]);
|
|
98
|
+
export const bookingItemStatusSchema = z.enum([
|
|
99
|
+
"draft",
|
|
100
|
+
"on_hold",
|
|
101
|
+
"confirmed",
|
|
102
|
+
"cancelled",
|
|
103
|
+
"expired",
|
|
104
|
+
"fulfilled",
|
|
105
|
+
]);
|
|
106
|
+
export const bookingItemRecordSchema = z.object({
|
|
107
|
+
id: z.string(),
|
|
108
|
+
bookingId: z.string(),
|
|
109
|
+
title: z.string(),
|
|
110
|
+
description: z.string().nullable(),
|
|
111
|
+
itemType: bookingItemTypeSchema,
|
|
112
|
+
status: bookingItemStatusSchema,
|
|
113
|
+
serviceDate: z.string().nullable(),
|
|
114
|
+
startsAt: z.string().nullable(),
|
|
115
|
+
endsAt: z.string().nullable(),
|
|
116
|
+
quantity: z.number().int(),
|
|
117
|
+
sellCurrency: z.string(),
|
|
118
|
+
unitSellAmountCents: z.number().int().nullable(),
|
|
119
|
+
totalSellAmountCents: z.number().int().nullable(),
|
|
120
|
+
costCurrency: z.string().nullable(),
|
|
121
|
+
unitCostAmountCents: z.number().int().nullable(),
|
|
122
|
+
totalCostAmountCents: z.number().int().nullable(),
|
|
123
|
+
notes: z.string().nullable(),
|
|
124
|
+
productId: z.string().nullable(),
|
|
125
|
+
optionId: z.string().nullable(),
|
|
126
|
+
optionUnitId: z.string().nullable(),
|
|
127
|
+
pricingCategoryId: z.string().nullable(),
|
|
128
|
+
createdAt: z.string(),
|
|
129
|
+
updatedAt: z.string(),
|
|
130
|
+
});
|
|
131
|
+
export const bookingItemParticipantRoleSchema = z.enum([
|
|
132
|
+
"traveler",
|
|
133
|
+
"occupant",
|
|
134
|
+
"primary_contact",
|
|
135
|
+
"service_assignee",
|
|
136
|
+
"beneficiary",
|
|
137
|
+
"other",
|
|
138
|
+
]);
|
|
139
|
+
export const bookingItemParticipantRecordSchema = z.object({
|
|
140
|
+
id: z.string(),
|
|
141
|
+
bookingItemId: z.string(),
|
|
142
|
+
participantId: z.string(),
|
|
143
|
+
role: bookingItemParticipantRoleSchema,
|
|
144
|
+
isPrimary: z.boolean(),
|
|
145
|
+
createdAt: z.string(),
|
|
146
|
+
});
|
|
147
|
+
export const bookingDocumentTypeSchema = z.enum([
|
|
148
|
+
"visa",
|
|
149
|
+
"insurance",
|
|
150
|
+
"health",
|
|
151
|
+
"passport_copy",
|
|
152
|
+
"other",
|
|
153
|
+
]);
|
|
154
|
+
export const bookingDocumentRecordSchema = z.object({
|
|
155
|
+
id: z.string(),
|
|
156
|
+
bookingId: z.string(),
|
|
157
|
+
participantId: z.string().nullable(),
|
|
158
|
+
type: bookingDocumentTypeSchema,
|
|
159
|
+
fileName: z.string(),
|
|
160
|
+
fileUrl: z.string(),
|
|
161
|
+
expiresAt: z.string().nullable(),
|
|
162
|
+
notes: z.string().nullable(),
|
|
163
|
+
createdAt: z.string(),
|
|
164
|
+
});
|
|
165
|
+
export const bookingGroupKindSchema = z.enum(["shared_room", "other"]);
|
|
166
|
+
export const bookingGroupMemberRoleSchema = z.enum(["primary", "shared"]);
|
|
167
|
+
export const bookingGroupRecordSchema = z.object({
|
|
168
|
+
id: z.string(),
|
|
169
|
+
kind: bookingGroupKindSchema,
|
|
170
|
+
label: z.string(),
|
|
171
|
+
primaryBookingId: z.string().nullable(),
|
|
172
|
+
productId: z.string().nullable(),
|
|
173
|
+
optionUnitId: z.string().nullable(),
|
|
174
|
+
metadata: z.record(z.string(), z.unknown()).nullable(),
|
|
175
|
+
createdAt: z.string(),
|
|
176
|
+
updatedAt: z.string(),
|
|
177
|
+
});
|
|
178
|
+
export const bookingGroupMemberRecordSchema = z.object({
|
|
179
|
+
id: z.string(),
|
|
180
|
+
groupId: z.string(),
|
|
181
|
+
bookingId: z.string(),
|
|
182
|
+
role: bookingGroupMemberRoleSchema,
|
|
183
|
+
createdAt: z.string(),
|
|
184
|
+
});
|
|
185
|
+
export const bookingGroupMemberWithBookingSchema = bookingGroupMemberRecordSchema.extend({
|
|
186
|
+
booking: bookingRecordSchema.nullable(),
|
|
187
|
+
});
|
|
188
|
+
export const bookingGroupDetailSchema = bookingGroupRecordSchema.extend({
|
|
189
|
+
members: z.array(bookingGroupMemberWithBookingSchema),
|
|
190
|
+
});
|
|
86
191
|
export const bookingListResponse = paginatedEnvelope(bookingRecordSchema);
|
|
87
192
|
export const bookingSingleResponse = singleEnvelope(bookingRecordSchema);
|
|
193
|
+
export const bookingItemsResponse = arrayEnvelope(bookingItemRecordSchema);
|
|
194
|
+
export const bookingItemParticipantsResponse = arrayEnvelope(bookingItemParticipantRecordSchema);
|
|
195
|
+
export const bookingDocumentsResponse = arrayEnvelope(bookingDocumentRecordSchema);
|
|
196
|
+
export const bookingGroupListResponse = paginatedEnvelope(bookingGroupRecordSchema);
|
|
197
|
+
export const bookingGroupSingleResponse = singleEnvelope(bookingGroupRecordSchema);
|
|
198
|
+
export const bookingGroupDetailResponse = singleEnvelope(bookingGroupDetailSchema);
|
|
199
|
+
export const bookingGroupMembersResponse = arrayEnvelope(bookingGroupMemberWithBookingSchema);
|
|
200
|
+
export const bookingGroupMemberSingleResponse = singleEnvelope(bookingGroupMemberRecordSchema);
|
|
201
|
+
export const bookingGroupForBookingSchema = bookingGroupRecordSchema.extend({
|
|
202
|
+
membership: bookingGroupMemberRecordSchema,
|
|
203
|
+
});
|
|
204
|
+
export const bookingGroupForBookingResponse = z.object({
|
|
205
|
+
data: bookingGroupForBookingSchema.nullable(),
|
|
206
|
+
});
|
|
88
207
|
export const bookingPassengersResponse = arrayEnvelope(bookingPassengerRecordSchema);
|
|
89
208
|
export const bookingSupplierStatusesResponse = arrayEnvelope(bookingSupplierStatusRecordSchema);
|
|
90
209
|
export const bookingActivityResponse = arrayEnvelope(bookingActivityRecordSchema);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type BookingStatus } from "./schemas.js";
|
|
2
|
+
/**
|
|
3
|
+
* Badge variant palette used by the shadcn default theme. Exported as a named
|
|
4
|
+
* type so downstream code can keep its local `Badge` component loosely coupled
|
|
5
|
+
* to this package — we don't import shadcn here.
|
|
6
|
+
*/
|
|
7
|
+
export type BookingStatusBadgeVariant = "default" | "secondary" | "outline" | "destructive";
|
|
8
|
+
/**
|
|
9
|
+
* Canonical status → badge-variant mapping for bookings.
|
|
10
|
+
*
|
|
11
|
+
* Typed as `Record<BookingStatus, …>` (not `Record<string, …>`) so that adding
|
|
12
|
+
* a new booking status becomes a compile error here, instead of a silent UX
|
|
13
|
+
* fallback in every app that kept its own local copy of this map.
|
|
14
|
+
*/
|
|
15
|
+
export declare const bookingStatusBadgeVariant: Record<BookingStatus, BookingStatusBadgeVariant>;
|
|
16
|
+
/**
|
|
17
|
+
* Humanize a booking status for display. `"in_progress"` → `"In Progress"`.
|
|
18
|
+
*/
|
|
19
|
+
export declare function formatBookingStatus(status: BookingStatus): string;
|
|
20
|
+
/**
|
|
21
|
+
* All booking status values in their canonical order — derived from the Zod
|
|
22
|
+
* enum so this list can never drift out of sync with the schema.
|
|
23
|
+
*/
|
|
24
|
+
export declare const bookingStatuses: ("draft" | "on_hold" | "confirmed" | "in_progress" | "completed" | "expired" | "cancelled")[];
|
|
25
|
+
/**
|
|
26
|
+
* Pre-built `{ value, label }` list for rendering status pickers (e.g. a
|
|
27
|
+
* Select in a status-change dialog). Uses `formatBookingStatus` for labels so
|
|
28
|
+
* there's exactly one place to tweak capitalization or wording.
|
|
29
|
+
*/
|
|
30
|
+
export declare const bookingStatusOptions: ReadonlyArray<{
|
|
31
|
+
value: BookingStatus;
|
|
32
|
+
label: string;
|
|
33
|
+
}>;
|
|
34
|
+
//# sourceMappingURL=status-presentation.d.ts.map
|