@voyantjs/bookings-react 0.6.8 → 0.6.9
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 +4 -4
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +4 -4
- package/dist/hooks/use-booking-documents.d.ts +8 -8
- package/dist/hooks/use-booking-documents.d.ts.map +1 -1
- package/dist/hooks/use-booking-documents.js +17 -7
- package/dist/hooks/use-booking-item-participants.d.ts +6 -16
- package/dist/hooks/use-booking-item-participants.d.ts.map +1 -1
- package/dist/hooks/use-booking-item-participants.js +19 -17
- package/dist/hooks/use-booking-item-travelers.d.ts +32 -0
- package/dist/hooks/use-booking-item-travelers.d.ts.map +1 -0
- package/dist/hooks/use-booking-item-travelers.js +48 -0
- package/dist/hooks/use-booking-note-mutation.d.ts +12 -1
- package/dist/hooks/use-booking-note-mutation.d.ts.map +1 -1
- package/dist/hooks/use-booking-note-mutation.js +17 -4
- package/dist/hooks/use-passenger-mutation.d.ts +12 -2
- package/dist/hooks/use-passenger-mutation.d.ts.map +1 -1
- package/dist/hooks/use-passengers.d.ts +1 -17
- package/dist/hooks/use-passengers.d.ts.map +1 -1
- package/dist/hooks/use-passengers.js +1 -11
- package/dist/hooks/use-public-booking-session-flow-mutation.d.ts +7 -8
- package/dist/hooks/use-public-booking-session-flow-mutation.d.ts.map +1 -1
- package/dist/hooks/use-public-booking-session.d.ts +7 -8
- package/dist/hooks/use-public-booking-session.d.ts.map +1 -1
- package/dist/hooks/use-traveler-mutation.d.ts +56 -0
- package/dist/hooks/use-traveler-mutation.d.ts.map +1 -0
- package/dist/hooks/use-traveler-mutation.js +42 -0
- package/dist/hooks/use-travelers.d.ts +23 -0
- package/dist/hooks/use-travelers.d.ts.map +1 -0
- package/dist/hooks/use-travelers.js +12 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/query-keys.d.ts +3 -1
- package/dist/query-keys.d.ts.map +1 -1
- package/dist/query-keys.js +3 -1
- package/dist/query-options.d.ts +78 -60
- package/dist/query-options.d.ts.map +1 -1
- package/dist/query-options.js +11 -9
- package/dist/schemas.d.ts +77 -43
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +18 -11
- package/package.json +5 -5
package/dist/query-options.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { queryOptions } from "@tanstack/react-query";
|
|
3
3
|
import { fetchWithValidation } from "./client.js";
|
|
4
4
|
import { bookingsQueryKeys } from "./query-keys.js";
|
|
5
|
-
import { bookingActivityResponse,
|
|
5
|
+
import { bookingActivityResponse, bookingGroupDetailResponse, bookingGroupForBookingResponse, bookingGroupListResponse, bookingItemsResponse, bookingItemTravelersResponse, bookingListResponse, bookingNotesResponse, bookingSingleResponse, bookingSupplierStatusesResponse, bookingTravelerDocumentsResponse, bookingTravelersResponse, publicBookingSessionResponse, publicBookingSessionStateResponse, } from "./schemas.js";
|
|
6
6
|
export function getBookingsQueryOptions(client, options = {}) {
|
|
7
7
|
const { enabled: _enabled = true, ...filters } = options;
|
|
8
8
|
return queryOptions({
|
|
@@ -36,27 +36,29 @@ export function getBookingItemsQueryOptions(client, bookingId, options = {}) {
|
|
|
36
36
|
queryFn: () => fetchWithValidation(`/v1/bookings/${bookingId}/items`, bookingItemsResponse, client),
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
|
-
export function
|
|
39
|
+
export function getBookingItemTravelersQueryOptions(client, bookingId, itemId, options = {}) {
|
|
40
40
|
const { enabled: _enabled = true } = options;
|
|
41
41
|
return queryOptions({
|
|
42
|
-
queryKey: bookingsQueryKeys.
|
|
43
|
-
queryFn: () => fetchWithValidation(`/v1/bookings/${bookingId}/items/${itemId}/
|
|
42
|
+
queryKey: bookingsQueryKeys.itemTravelers(bookingId ?? "", itemId ?? ""),
|
|
43
|
+
queryFn: () => fetchWithValidation(`/v1/bookings/${bookingId}/items/${itemId}/travelers`, bookingItemTravelersResponse, client),
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
|
-
export function
|
|
46
|
+
export function getBookingTravelerDocumentsQueryOptions(client, bookingId, options = {}) {
|
|
47
47
|
const { enabled: _enabled = true } = options;
|
|
48
48
|
return queryOptions({
|
|
49
49
|
queryKey: bookingsQueryKeys.documents(bookingId ?? ""),
|
|
50
|
-
queryFn: () => fetchWithValidation(`/v1/bookings/${bookingId}/documents`,
|
|
50
|
+
queryFn: () => fetchWithValidation(`/v1/bookings/${bookingId}/documents`, bookingTravelerDocumentsResponse, client),
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
|
-
export function
|
|
53
|
+
export function getTravelersQueryOptions(client, bookingId, options = {}) {
|
|
54
54
|
const { enabled: _enabled = true } = options;
|
|
55
55
|
return queryOptions({
|
|
56
|
-
queryKey: bookingsQueryKeys.
|
|
57
|
-
queryFn: () => fetchWithValidation(`/v1/bookings/${bookingId}/
|
|
56
|
+
queryKey: bookingsQueryKeys.travelers(bookingId ?? ""),
|
|
57
|
+
queryFn: () => fetchWithValidation(`/v1/bookings/${bookingId}/travelers`, bookingTravelersResponse, client),
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
|
+
export const getPassengersQueryOptions = getTravelersQueryOptions;
|
|
61
|
+
export const getBookingItemParticipantsQueryOptions = getBookingItemTravelersQueryOptions;
|
|
60
62
|
export function getSupplierStatusesQueryOptions(client, bookingId, options = {}) {
|
|
61
63
|
const { enabled: _enabled = true } = options;
|
|
62
64
|
return queryOptions({
|
package/dist/schemas.d.ts
CHANGED
|
@@ -56,19 +56,24 @@ export declare const bookingRecordSchema: z.ZodObject<{
|
|
|
56
56
|
updatedAt: z.ZodString;
|
|
57
57
|
}, z.core.$strip>;
|
|
58
58
|
export type BookingRecord = z.infer<typeof bookingRecordSchema>;
|
|
59
|
-
export declare const
|
|
59
|
+
export declare const bookingTravelerRecordSchema: z.ZodObject<{
|
|
60
60
|
id: z.ZodString;
|
|
61
61
|
bookingId: z.ZodString;
|
|
62
|
+
participantType: z.ZodString;
|
|
63
|
+
travelerCategory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
62
64
|
firstName: z.ZodString;
|
|
63
65
|
lastName: z.ZodString;
|
|
64
66
|
email: z.ZodNullable<z.ZodString>;
|
|
65
67
|
phone: z.ZodNullable<z.ZodString>;
|
|
68
|
+
preferredLanguage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
69
|
+
accessibilityNeeds: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
66
70
|
specialRequests: z.ZodNullable<z.ZodString>;
|
|
67
|
-
|
|
71
|
+
isPrimary: z.ZodBoolean;
|
|
72
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
68
73
|
createdAt: z.ZodString;
|
|
69
74
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
70
75
|
}, z.core.$strip>;
|
|
71
|
-
export type
|
|
76
|
+
export type BookingTravelerRecord = z.infer<typeof bookingTravelerRecordSchema>;
|
|
72
77
|
export declare const bookingSupplierStatusRecordSchema: z.ZodObject<{
|
|
73
78
|
id: z.ZodString;
|
|
74
79
|
bookingId: z.ZodString;
|
|
@@ -171,30 +176,30 @@ export declare const bookingItemRecordSchema: z.ZodObject<{
|
|
|
171
176
|
updatedAt: z.ZodString;
|
|
172
177
|
}, z.core.$strip>;
|
|
173
178
|
export type BookingItemRecord = z.infer<typeof bookingItemRecordSchema>;
|
|
174
|
-
export declare const
|
|
179
|
+
export declare const bookingItemTravelerRoleSchema: z.ZodEnum<{
|
|
175
180
|
traveler: "traveler";
|
|
176
181
|
occupant: "occupant";
|
|
177
182
|
other: "other";
|
|
178
|
-
primary_contact: "primary_contact";
|
|
179
|
-
service_assignee: "service_assignee";
|
|
180
183
|
beneficiary: "beneficiary";
|
|
184
|
+
service_assignee: "service_assignee";
|
|
185
|
+
primary_contact: "primary_contact";
|
|
181
186
|
}>;
|
|
182
|
-
export declare const
|
|
187
|
+
export declare const bookingItemTravelerRecordSchema: z.ZodObject<{
|
|
183
188
|
id: z.ZodString;
|
|
184
189
|
bookingItemId: z.ZodString;
|
|
185
|
-
|
|
190
|
+
travelerId: z.ZodString;
|
|
186
191
|
role: z.ZodEnum<{
|
|
187
192
|
traveler: "traveler";
|
|
188
193
|
occupant: "occupant";
|
|
189
194
|
other: "other";
|
|
190
|
-
primary_contact: "primary_contact";
|
|
191
|
-
service_assignee: "service_assignee";
|
|
192
195
|
beneficiary: "beneficiary";
|
|
196
|
+
service_assignee: "service_assignee";
|
|
197
|
+
primary_contact: "primary_contact";
|
|
193
198
|
}>;
|
|
194
199
|
isPrimary: z.ZodBoolean;
|
|
195
200
|
createdAt: z.ZodString;
|
|
196
201
|
}, z.core.$strip>;
|
|
197
|
-
export type
|
|
202
|
+
export type BookingItemTravelerRecord = z.infer<typeof bookingItemTravelerRecordSchema>;
|
|
198
203
|
export declare const bookingDocumentTypeSchema: z.ZodEnum<{
|
|
199
204
|
other: "other";
|
|
200
205
|
visa: "visa";
|
|
@@ -202,10 +207,10 @@ export declare const bookingDocumentTypeSchema: z.ZodEnum<{
|
|
|
202
207
|
health: "health";
|
|
203
208
|
passport_copy: "passport_copy";
|
|
204
209
|
}>;
|
|
205
|
-
export declare const
|
|
210
|
+
export declare const bookingTravelerDocumentRecordSchema: z.ZodObject<{
|
|
206
211
|
id: z.ZodString;
|
|
207
212
|
bookingId: z.ZodString;
|
|
208
|
-
|
|
213
|
+
travelerId: z.ZodNullable<z.ZodString>;
|
|
209
214
|
type: z.ZodEnum<{
|
|
210
215
|
other: "other";
|
|
211
216
|
visa: "visa";
|
|
@@ -219,7 +224,7 @@ export declare const bookingDocumentRecordSchema: z.ZodObject<{
|
|
|
219
224
|
notes: z.ZodNullable<z.ZodString>;
|
|
220
225
|
createdAt: z.ZodString;
|
|
221
226
|
}, z.core.$strip>;
|
|
222
|
-
export type
|
|
227
|
+
export type BookingTravelerDocumentRecord = z.infer<typeof bookingTravelerDocumentRecordSchema>;
|
|
223
228
|
export declare const bookingGroupKindSchema: z.ZodEnum<{
|
|
224
229
|
other: "other";
|
|
225
230
|
shared_room: "shared_room";
|
|
@@ -442,28 +447,28 @@ export declare const bookingItemsResponse: z.ZodObject<{
|
|
|
442
447
|
updatedAt: z.ZodString;
|
|
443
448
|
}, z.core.$strip>>;
|
|
444
449
|
}, z.core.$strip>;
|
|
445
|
-
export declare const
|
|
450
|
+
export declare const bookingItemTravelersResponse: z.ZodObject<{
|
|
446
451
|
data: z.ZodArray<z.ZodObject<{
|
|
447
452
|
id: z.ZodString;
|
|
448
453
|
bookingItemId: z.ZodString;
|
|
449
|
-
|
|
454
|
+
travelerId: z.ZodString;
|
|
450
455
|
role: z.ZodEnum<{
|
|
451
456
|
traveler: "traveler";
|
|
452
457
|
occupant: "occupant";
|
|
453
458
|
other: "other";
|
|
454
|
-
primary_contact: "primary_contact";
|
|
455
|
-
service_assignee: "service_assignee";
|
|
456
459
|
beneficiary: "beneficiary";
|
|
460
|
+
service_assignee: "service_assignee";
|
|
461
|
+
primary_contact: "primary_contact";
|
|
457
462
|
}>;
|
|
458
463
|
isPrimary: z.ZodBoolean;
|
|
459
464
|
createdAt: z.ZodString;
|
|
460
465
|
}, z.core.$strip>>;
|
|
461
466
|
}, z.core.$strip>;
|
|
462
|
-
export declare const
|
|
467
|
+
export declare const bookingTravelerDocumentsResponse: z.ZodObject<{
|
|
463
468
|
data: z.ZodArray<z.ZodObject<{
|
|
464
469
|
id: z.ZodString;
|
|
465
470
|
bookingId: z.ZodString;
|
|
466
|
-
|
|
471
|
+
travelerId: z.ZodNullable<z.ZodString>;
|
|
467
472
|
type: z.ZodEnum<{
|
|
468
473
|
other: "other";
|
|
469
474
|
visa: "visa";
|
|
@@ -664,20 +669,61 @@ export declare const bookingGroupForBookingResponse: z.ZodObject<{
|
|
|
664
669
|
}, z.core.$strip>>;
|
|
665
670
|
}, z.core.$strip>;
|
|
666
671
|
export type BookingGroupForBookingRecord = z.infer<typeof bookingGroupForBookingSchema>;
|
|
672
|
+
export declare const bookingTravelersResponse: z.ZodObject<{
|
|
673
|
+
data: z.ZodArray<z.ZodObject<{
|
|
674
|
+
id: z.ZodString;
|
|
675
|
+
bookingId: z.ZodString;
|
|
676
|
+
participantType: z.ZodString;
|
|
677
|
+
travelerCategory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
678
|
+
firstName: z.ZodString;
|
|
679
|
+
lastName: z.ZodString;
|
|
680
|
+
email: z.ZodNullable<z.ZodString>;
|
|
681
|
+
phone: z.ZodNullable<z.ZodString>;
|
|
682
|
+
preferredLanguage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
683
|
+
accessibilityNeeds: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
684
|
+
specialRequests: z.ZodNullable<z.ZodString>;
|
|
685
|
+
isPrimary: z.ZodBoolean;
|
|
686
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
687
|
+
createdAt: z.ZodString;
|
|
688
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
689
|
+
}, z.core.$strip>>;
|
|
690
|
+
}, z.core.$strip>;
|
|
667
691
|
export declare const bookingPassengersResponse: z.ZodObject<{
|
|
668
692
|
data: z.ZodArray<z.ZodObject<{
|
|
669
693
|
id: z.ZodString;
|
|
670
694
|
bookingId: z.ZodString;
|
|
695
|
+
participantType: z.ZodString;
|
|
696
|
+
travelerCategory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
671
697
|
firstName: z.ZodString;
|
|
672
698
|
lastName: z.ZodString;
|
|
673
699
|
email: z.ZodNullable<z.ZodString>;
|
|
674
700
|
phone: z.ZodNullable<z.ZodString>;
|
|
701
|
+
preferredLanguage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
702
|
+
accessibilityNeeds: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
675
703
|
specialRequests: z.ZodNullable<z.ZodString>;
|
|
676
|
-
|
|
704
|
+
isPrimary: z.ZodBoolean;
|
|
705
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
677
706
|
createdAt: z.ZodString;
|
|
678
707
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
679
708
|
}, z.core.$strip>>;
|
|
680
709
|
}, z.core.$strip>;
|
|
710
|
+
export declare const bookingItemParticipantsResponse: z.ZodObject<{
|
|
711
|
+
data: z.ZodArray<z.ZodObject<{
|
|
712
|
+
id: z.ZodString;
|
|
713
|
+
bookingItemId: z.ZodString;
|
|
714
|
+
travelerId: z.ZodString;
|
|
715
|
+
role: z.ZodEnum<{
|
|
716
|
+
traveler: "traveler";
|
|
717
|
+
occupant: "occupant";
|
|
718
|
+
other: "other";
|
|
719
|
+
beneficiary: "beneficiary";
|
|
720
|
+
service_assignee: "service_assignee";
|
|
721
|
+
primary_contact: "primary_contact";
|
|
722
|
+
}>;
|
|
723
|
+
isPrimary: z.ZodBoolean;
|
|
724
|
+
createdAt: z.ZodString;
|
|
725
|
+
}, z.core.$strip>>;
|
|
726
|
+
}, z.core.$strip>;
|
|
681
727
|
export declare const bookingSupplierStatusesResponse: z.ZodObject<{
|
|
682
728
|
data: z.ZodArray<z.ZodObject<{
|
|
683
729
|
id: z.ZodString;
|
|
@@ -744,14 +790,11 @@ export declare const publicBookingSessionResponse: z.ZodObject<{
|
|
|
744
790
|
expiredAt: z.ZodNullable<z.ZodString>;
|
|
745
791
|
cancelledAt: z.ZodNullable<z.ZodString>;
|
|
746
792
|
completedAt: z.ZodNullable<z.ZodString>;
|
|
747
|
-
|
|
793
|
+
travelers: z.ZodArray<z.ZodObject<{
|
|
748
794
|
id: z.ZodString;
|
|
749
795
|
participantType: z.ZodEnum<{
|
|
750
796
|
traveler: "traveler";
|
|
751
|
-
booker: "booker";
|
|
752
|
-
contact: "contact";
|
|
753
797
|
occupant: "occupant";
|
|
754
|
-
staff: "staff";
|
|
755
798
|
other: "other";
|
|
756
799
|
}>;
|
|
757
800
|
travelerCategory: z.ZodNullable<z.ZodEnum<{
|
|
@@ -810,15 +853,13 @@ export declare const publicBookingSessionResponse: z.ZodObject<{
|
|
|
810
853
|
optionId: z.ZodNullable<z.ZodString>;
|
|
811
854
|
optionUnitId: z.ZodNullable<z.ZodString>;
|
|
812
855
|
pricingCategoryId: z.ZodNullable<z.ZodString>;
|
|
813
|
-
|
|
856
|
+
travelerLinks: z.ZodArray<z.ZodObject<{
|
|
814
857
|
id: z.ZodString;
|
|
815
|
-
|
|
858
|
+
travelerId: z.ZodString;
|
|
816
859
|
role: z.ZodEnum<{
|
|
817
860
|
traveler: "traveler";
|
|
818
861
|
occupant: "occupant";
|
|
819
862
|
other: "other";
|
|
820
|
-
primary_contact: "primary_contact";
|
|
821
|
-
service_assignee: "service_assignee";
|
|
822
863
|
beneficiary: "beneficiary";
|
|
823
864
|
}>;
|
|
824
865
|
isPrimary: z.ZodBoolean;
|
|
@@ -851,9 +892,8 @@ export declare const publicBookingSessionResponse: z.ZodObject<{
|
|
|
851
892
|
releasedAt: z.ZodNullable<z.ZodString>;
|
|
852
893
|
}, z.core.$strip>>;
|
|
853
894
|
checklist: z.ZodObject<{
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
hasPrimaryParticipant: z.ZodBoolean;
|
|
895
|
+
hasTravelers: z.ZodBoolean;
|
|
896
|
+
hasPrimaryTraveler: z.ZodBoolean;
|
|
857
897
|
hasItems: z.ZodBoolean;
|
|
858
898
|
hasAllocations: z.ZodBoolean;
|
|
859
899
|
readyForConfirmation: z.ZodBoolean;
|
|
@@ -931,14 +971,11 @@ export declare const publicBookingSessionRepriceResponse: z.ZodObject<{
|
|
|
931
971
|
expiredAt: z.ZodNullable<z.ZodString>;
|
|
932
972
|
cancelledAt: z.ZodNullable<z.ZodString>;
|
|
933
973
|
completedAt: z.ZodNullable<z.ZodString>;
|
|
934
|
-
|
|
974
|
+
travelers: z.ZodArray<z.ZodObject<{
|
|
935
975
|
id: z.ZodString;
|
|
936
976
|
participantType: z.ZodEnum<{
|
|
937
977
|
traveler: "traveler";
|
|
938
|
-
booker: "booker";
|
|
939
|
-
contact: "contact";
|
|
940
978
|
occupant: "occupant";
|
|
941
|
-
staff: "staff";
|
|
942
979
|
other: "other";
|
|
943
980
|
}>;
|
|
944
981
|
travelerCategory: z.ZodNullable<z.ZodEnum<{
|
|
@@ -997,15 +1034,13 @@ export declare const publicBookingSessionRepriceResponse: z.ZodObject<{
|
|
|
997
1034
|
optionId: z.ZodNullable<z.ZodString>;
|
|
998
1035
|
optionUnitId: z.ZodNullable<z.ZodString>;
|
|
999
1036
|
pricingCategoryId: z.ZodNullable<z.ZodString>;
|
|
1000
|
-
|
|
1037
|
+
travelerLinks: z.ZodArray<z.ZodObject<{
|
|
1001
1038
|
id: z.ZodString;
|
|
1002
|
-
|
|
1039
|
+
travelerId: z.ZodString;
|
|
1003
1040
|
role: z.ZodEnum<{
|
|
1004
1041
|
traveler: "traveler";
|
|
1005
1042
|
occupant: "occupant";
|
|
1006
1043
|
other: "other";
|
|
1007
|
-
primary_contact: "primary_contact";
|
|
1008
|
-
service_assignee: "service_assignee";
|
|
1009
1044
|
beneficiary: "beneficiary";
|
|
1010
1045
|
}>;
|
|
1011
1046
|
isPrimary: z.ZodBoolean;
|
|
@@ -1038,9 +1073,8 @@ export declare const publicBookingSessionRepriceResponse: z.ZodObject<{
|
|
|
1038
1073
|
releasedAt: z.ZodNullable<z.ZodString>;
|
|
1039
1074
|
}, z.core.$strip>>;
|
|
1040
1075
|
checklist: z.ZodObject<{
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
hasPrimaryParticipant: z.ZodBoolean;
|
|
1076
|
+
hasTravelers: z.ZodBoolean;
|
|
1077
|
+
hasPrimaryTraveler: z.ZodBoolean;
|
|
1044
1078
|
hasItems: z.ZodBoolean;
|
|
1045
1079
|
hasAllocations: z.ZodBoolean;
|
|
1046
1080
|
readyForConfirmation: z.ZodBoolean;
|
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,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAE/D,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,
|
|
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,e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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAA6C,CAAA;AACtF,eAAO,MAAM,iCAAiC;;;;;;;;;;;iBAAkD,CAAA;AAChG,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAE/C,CAAA"}
|
package/dist/schemas.js
CHANGED
|
@@ -41,15 +41,20 @@ export const bookingRecordSchema = z.object({
|
|
|
41
41
|
createdAt: z.string(),
|
|
42
42
|
updatedAt: z.string(),
|
|
43
43
|
});
|
|
44
|
-
export const
|
|
44
|
+
export const bookingTravelerRecordSchema = z.object({
|
|
45
45
|
id: z.string(),
|
|
46
46
|
bookingId: z.string(),
|
|
47
|
+
participantType: z.string(),
|
|
48
|
+
travelerCategory: z.string().nullable().optional(),
|
|
47
49
|
firstName: z.string(),
|
|
48
50
|
lastName: z.string(),
|
|
49
51
|
email: z.string().nullable(),
|
|
50
52
|
phone: z.string().nullable(),
|
|
53
|
+
preferredLanguage: z.string().nullable().optional(),
|
|
54
|
+
accessibilityNeeds: z.string().nullable().optional(),
|
|
51
55
|
specialRequests: z.string().nullable(),
|
|
52
|
-
|
|
56
|
+
isPrimary: z.boolean(),
|
|
57
|
+
notes: z.string().nullable().optional(),
|
|
53
58
|
createdAt: z.string(),
|
|
54
59
|
updatedAt: z.string().optional(),
|
|
55
60
|
});
|
|
@@ -128,7 +133,7 @@ export const bookingItemRecordSchema = z.object({
|
|
|
128
133
|
createdAt: z.string(),
|
|
129
134
|
updatedAt: z.string(),
|
|
130
135
|
});
|
|
131
|
-
export const
|
|
136
|
+
export const bookingItemTravelerRoleSchema = z.enum([
|
|
132
137
|
"traveler",
|
|
133
138
|
"occupant",
|
|
134
139
|
"primary_contact",
|
|
@@ -136,11 +141,11 @@ export const bookingItemParticipantRoleSchema = z.enum([
|
|
|
136
141
|
"beneficiary",
|
|
137
142
|
"other",
|
|
138
143
|
]);
|
|
139
|
-
export const
|
|
144
|
+
export const bookingItemTravelerRecordSchema = z.object({
|
|
140
145
|
id: z.string(),
|
|
141
146
|
bookingItemId: z.string(),
|
|
142
|
-
|
|
143
|
-
role:
|
|
147
|
+
travelerId: z.string(),
|
|
148
|
+
role: bookingItemTravelerRoleSchema,
|
|
144
149
|
isPrimary: z.boolean(),
|
|
145
150
|
createdAt: z.string(),
|
|
146
151
|
});
|
|
@@ -151,10 +156,10 @@ export const bookingDocumentTypeSchema = z.enum([
|
|
|
151
156
|
"passport_copy",
|
|
152
157
|
"other",
|
|
153
158
|
]);
|
|
154
|
-
export const
|
|
159
|
+
export const bookingTravelerDocumentRecordSchema = z.object({
|
|
155
160
|
id: z.string(),
|
|
156
161
|
bookingId: z.string(),
|
|
157
|
-
|
|
162
|
+
travelerId: z.string().nullable(),
|
|
158
163
|
type: bookingDocumentTypeSchema,
|
|
159
164
|
fileName: z.string(),
|
|
160
165
|
fileUrl: z.string(),
|
|
@@ -191,8 +196,8 @@ export const bookingGroupDetailSchema = bookingGroupRecordSchema.extend({
|
|
|
191
196
|
export const bookingListResponse = paginatedEnvelope(bookingRecordSchema);
|
|
192
197
|
export const bookingSingleResponse = singleEnvelope(bookingRecordSchema);
|
|
193
198
|
export const bookingItemsResponse = arrayEnvelope(bookingItemRecordSchema);
|
|
194
|
-
export const
|
|
195
|
-
export const
|
|
199
|
+
export const bookingItemTravelersResponse = arrayEnvelope(bookingItemTravelerRecordSchema);
|
|
200
|
+
export const bookingTravelerDocumentsResponse = arrayEnvelope(bookingTravelerDocumentRecordSchema);
|
|
196
201
|
export const bookingGroupListResponse = paginatedEnvelope(bookingGroupRecordSchema);
|
|
197
202
|
export const bookingGroupSingleResponse = singleEnvelope(bookingGroupRecordSchema);
|
|
198
203
|
export const bookingGroupDetailResponse = singleEnvelope(bookingGroupDetailSchema);
|
|
@@ -204,7 +209,9 @@ export const bookingGroupForBookingSchema = bookingGroupRecordSchema.extend({
|
|
|
204
209
|
export const bookingGroupForBookingResponse = z.object({
|
|
205
210
|
data: bookingGroupForBookingSchema.nullable(),
|
|
206
211
|
});
|
|
207
|
-
export const
|
|
212
|
+
export const bookingTravelersResponse = arrayEnvelope(bookingTravelerRecordSchema);
|
|
213
|
+
export const bookingPassengersResponse = bookingTravelersResponse;
|
|
214
|
+
export const bookingItemParticipantsResponse = bookingItemTravelersResponse;
|
|
208
215
|
export const bookingSupplierStatusesResponse = arrayEnvelope(bookingSupplierStatusRecordSchema);
|
|
209
216
|
export const bookingActivityResponse = arrayEnvelope(bookingActivityRecordSchema);
|
|
210
217
|
export const bookingNotesResponse = arrayEnvelope(bookingNoteRecordSchema);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyantjs/bookings-react",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.9",
|
|
4
4
|
"license": "FSL-1.1-Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"react": "^19.0.0",
|
|
36
36
|
"react-dom": "^19.0.0",
|
|
37
37
|
"zod": "^4.0.0",
|
|
38
|
-
"@voyantjs/bookings": "0.6.
|
|
38
|
+
"@voyantjs/bookings": "0.6.9"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@tanstack/react-query": "^5.96.2",
|
|
@@ -46,12 +46,12 @@
|
|
|
46
46
|
"typescript": "^6.0.2",
|
|
47
47
|
"vitest": "^4.1.2",
|
|
48
48
|
"zod": "^4.3.6",
|
|
49
|
-
"@voyantjs/bookings": "0.6.
|
|
50
|
-
"@voyantjs/react": "0.6.
|
|
49
|
+
"@voyantjs/bookings": "0.6.9",
|
|
50
|
+
"@voyantjs/react": "0.6.9",
|
|
51
51
|
"@voyantjs/voyant-typescript-config": "0.1.0"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@voyantjs/react": "0.6.
|
|
54
|
+
"@voyantjs/react": "0.6.9"
|
|
55
55
|
},
|
|
56
56
|
"files": [
|
|
57
57
|
"dist"
|