@voyantjs/bookings-react 0.6.7 → 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/hooks/index.d.ts
CHANGED
|
@@ -2,14 +2,14 @@ export { type UseBookingOptions, useBooking } from "./use-booking.js";
|
|
|
2
2
|
export { type UseBookingActivityOptions, useBookingActivity } from "./use-booking-activity.js";
|
|
3
3
|
export { type CancelBookingInput, useBookingCancelMutation, } from "./use-booking-cancel-mutation.js";
|
|
4
4
|
export { type ConvertProductToBookingInput, useBookingConvertMutation, } from "./use-booking-convert-mutation.js";
|
|
5
|
-
export { type
|
|
5
|
+
export { type CreateBookingTravelerDocumentInput, type UseBookingTravelerDocumentsOptions, useBookingTravelerDocumentMutation, useBookingTravelerDocuments, } from "./use-booking-documents.js";
|
|
6
6
|
export { type UseBookingGroupOptions, useBookingGroup } from "./use-booking-group.js";
|
|
7
7
|
export { type UseBookingGroupForBookingOptions, useBookingGroupForBooking, } from "./use-booking-group-for-booking.js";
|
|
8
8
|
export { type AddBookingGroupMemberInput, useBookingGroupMemberMutation, } from "./use-booking-group-member-mutation.js";
|
|
9
9
|
export { type CreateBookingGroupInput, type UpdateBookingGroupInput, useBookingGroupMutation, } from "./use-booking-group-mutation.js";
|
|
10
10
|
export { type UseBookingGroupsOptions, useBookingGroups } from "./use-booking-groups.js";
|
|
11
11
|
export { type CreateBookingItemInput, type UpdateBookingItemInput, useBookingItemMutation, } from "./use-booking-item-mutation.js";
|
|
12
|
-
export { type
|
|
12
|
+
export { type AddItemTravelerInput, type UseBookingItemTravelersOptions, useBookingItemTravelerMutation, useBookingItemTravelers, } from "./use-booking-item-travelers.js";
|
|
13
13
|
export { type UseBookingItemsOptions, useBookingItems } from "./use-booking-items.js";
|
|
14
14
|
export { type CreateBookingInput, type UpdateBookingInput, useBookingMutation, } from "./use-booking-mutation.js";
|
|
15
15
|
export { type CreateBookingNoteInput, useBookingNoteMutation, } from "./use-booking-note-mutation.js";
|
|
@@ -17,11 +17,11 @@ export { type UseBookingNotesOptions, useBookingNotes } from "./use-booking-note
|
|
|
17
17
|
export { type UseBookingPrimaryProductOptions, type UseBookingPrimaryProductResult, useBookingPrimaryProduct, } from "./use-booking-primary-product.js";
|
|
18
18
|
export { type UpdateBookingStatusInput, useBookingStatusMutation, } from "./use-booking-status-mutation.js";
|
|
19
19
|
export { type UseBookingsOptions, useBookings } from "./use-bookings.js";
|
|
20
|
-
export { type CreatePassengerInput, type UpdatePassengerInput, usePassengerMutation, } from "./use-passenger-mutation.js";
|
|
21
|
-
export { type UsePassengersOptions, usePassengers } from "./use-passengers.js";
|
|
22
20
|
export { type UsePublicBookingSessionOptions, usePublicBookingSession, } from "./use-public-booking-session.js";
|
|
23
21
|
export { usePublicBookingSessionFlowMutation } from "./use-public-booking-session-flow-mutation.js";
|
|
24
22
|
export { type UsePublicBookingSessionStateOptions, usePublicBookingSessionState, } from "./use-public-booking-session-state.js";
|
|
25
23
|
export { type CreateSupplierStatusInput, type UpdateSupplierStatusInput, useSupplierStatusMutation, } from "./use-supplier-status-mutation.js";
|
|
26
24
|
export { type UseSupplierStatusesOptions, useSupplierStatuses } from "./use-supplier-statuses.js";
|
|
25
|
+
export { type CreateTravelerInput, type UpdateTravelerInput, useTravelerMutation, } from "./use-traveler-mutation.js";
|
|
26
|
+
export { type UseTravelersOptions, useTravelers } from "./use-travelers.js";
|
|
27
27
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AACrE,OAAO,EAAE,KAAK,yBAAyB,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAC9F,OAAO,EACL,KAAK,kBAAkB,EACvB,wBAAwB,GACzB,MAAM,kCAAkC,CAAA;AACzC,OAAO,EACL,KAAK,4BAA4B,EACjC,yBAAyB,GAC1B,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EACL,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AACrE,OAAO,EAAE,KAAK,yBAAyB,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAC9F,OAAO,EACL,KAAK,kBAAkB,EACvB,wBAAwB,GACzB,MAAM,kCAAkC,CAAA;AACzC,OAAO,EACL,KAAK,4BAA4B,EACjC,yBAAyB,GAC1B,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EACL,KAAK,kCAAkC,EACvC,KAAK,kCAAkC,EACvC,kCAAkC,EAClC,2BAA2B,GAC5B,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,KAAK,sBAAsB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACrF,OAAO,EACL,KAAK,gCAAgC,EACrC,yBAAyB,GAC1B,MAAM,oCAAoC,CAAA;AAC3C,OAAO,EACL,KAAK,0BAA0B,EAC/B,6BAA6B,GAC9B,MAAM,wCAAwC,CAAA;AAC/C,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,uBAAuB,GACxB,MAAM,iCAAiC,CAAA;AACxC,OAAO,EAAE,KAAK,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AACxF,OAAO,EACL,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,sBAAsB,GACvB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,8BAA8B,EACnC,8BAA8B,EAC9B,uBAAuB,GACxB,MAAM,iCAAiC,CAAA;AACxC,OAAO,EAAE,KAAK,sBAAsB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACrF,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,kBAAkB,GACnB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EACL,KAAK,sBAAsB,EAC3B,sBAAsB,GACvB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,KAAK,sBAAsB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACrF,OAAO,EACL,KAAK,+BAA+B,EACpC,KAAK,8BAA8B,EACnC,wBAAwB,GACzB,MAAM,kCAAkC,CAAA;AACzC,OAAO,EACL,KAAK,wBAAwB,EAC7B,wBAAwB,GACzB,MAAM,kCAAkC,CAAA;AACzC,OAAO,EAAE,KAAK,kBAAkB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AACxE,OAAO,EACL,KAAK,8BAA8B,EACnC,uBAAuB,GACxB,MAAM,iCAAiC,CAAA;AACxC,OAAO,EAAE,mCAAmC,EAAE,MAAM,+CAA+C,CAAA;AACnG,OAAO,EACL,KAAK,mCAAmC,EACxC,4BAA4B,GAC7B,MAAM,uCAAuC,CAAA;AAC9C,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,yBAAyB,GAC1B,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EAAE,KAAK,0BAA0B,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AACjG,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,mBAAmB,GACpB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,KAAK,mBAAmB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA"}
|
package/dist/hooks/index.js
CHANGED
|
@@ -2,14 +2,14 @@ export { useBooking } from "./use-booking.js";
|
|
|
2
2
|
export { useBookingActivity } from "./use-booking-activity.js";
|
|
3
3
|
export { useBookingCancelMutation, } from "./use-booking-cancel-mutation.js";
|
|
4
4
|
export { useBookingConvertMutation, } from "./use-booking-convert-mutation.js";
|
|
5
|
-
export {
|
|
5
|
+
export { useBookingTravelerDocumentMutation, useBookingTravelerDocuments, } from "./use-booking-documents.js";
|
|
6
6
|
export { useBookingGroup } from "./use-booking-group.js";
|
|
7
7
|
export { useBookingGroupForBooking, } from "./use-booking-group-for-booking.js";
|
|
8
8
|
export { useBookingGroupMemberMutation, } from "./use-booking-group-member-mutation.js";
|
|
9
9
|
export { useBookingGroupMutation, } from "./use-booking-group-mutation.js";
|
|
10
10
|
export { useBookingGroups } from "./use-booking-groups.js";
|
|
11
11
|
export { useBookingItemMutation, } from "./use-booking-item-mutation.js";
|
|
12
|
-
export {
|
|
12
|
+
export { useBookingItemTravelerMutation, useBookingItemTravelers, } from "./use-booking-item-travelers.js";
|
|
13
13
|
export { useBookingItems } from "./use-booking-items.js";
|
|
14
14
|
export { useBookingMutation, } from "./use-booking-mutation.js";
|
|
15
15
|
export { useBookingNoteMutation, } from "./use-booking-note-mutation.js";
|
|
@@ -17,10 +17,10 @@ export { useBookingNotes } from "./use-booking-notes.js";
|
|
|
17
17
|
export { useBookingPrimaryProduct, } from "./use-booking-primary-product.js";
|
|
18
18
|
export { useBookingStatusMutation, } from "./use-booking-status-mutation.js";
|
|
19
19
|
export { useBookings } from "./use-bookings.js";
|
|
20
|
-
export { usePassengerMutation, } from "./use-passenger-mutation.js";
|
|
21
|
-
export { usePassengers } from "./use-passengers.js";
|
|
22
20
|
export { usePublicBookingSession, } from "./use-public-booking-session.js";
|
|
23
21
|
export { usePublicBookingSessionFlowMutation } from "./use-public-booking-session-flow-mutation.js";
|
|
24
22
|
export { usePublicBookingSessionState, } from "./use-public-booking-session-state.js";
|
|
25
23
|
export { useSupplierStatusMutation, } from "./use-supplier-status-mutation.js";
|
|
26
24
|
export { useSupplierStatuses } from "./use-supplier-statuses.js";
|
|
25
|
+
export { useTravelerMutation, } from "./use-traveler-mutation.js";
|
|
26
|
+
export { useTravelers } from "./use-travelers.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface UseBookingTravelerDocumentsOptions {
|
|
2
2
|
enabled?: boolean;
|
|
3
3
|
}
|
|
4
|
-
export declare function
|
|
4
|
+
export declare function useBookingTravelerDocuments(bookingId: string | null | undefined, options?: UseBookingTravelerDocumentsOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
5
5
|
data: {
|
|
6
6
|
id: string;
|
|
7
7
|
bookingId: string;
|
|
8
|
-
|
|
8
|
+
travelerId: string | null;
|
|
9
9
|
type: "other" | "visa" | "insurance" | "health" | "passport_copy";
|
|
10
10
|
fileName: string;
|
|
11
11
|
fileUrl: string;
|
|
@@ -14,26 +14,26 @@ export declare function useBookingDocuments(bookingId: string | null | undefined
|
|
|
14
14
|
createdAt: string;
|
|
15
15
|
}[];
|
|
16
16
|
}, Error>;
|
|
17
|
-
export interface
|
|
17
|
+
export interface CreateBookingTravelerDocumentInput {
|
|
18
18
|
type: string;
|
|
19
19
|
fileName: string;
|
|
20
20
|
fileUrl: string;
|
|
21
|
-
|
|
21
|
+
travelerId?: string | null;
|
|
22
22
|
expiresAt?: string | null;
|
|
23
23
|
notes?: string | null;
|
|
24
24
|
}
|
|
25
|
-
export declare function
|
|
25
|
+
export declare function useBookingTravelerDocumentMutation(bookingId: string): {
|
|
26
26
|
create: import("@tanstack/react-query").UseMutationResult<{
|
|
27
27
|
id: string;
|
|
28
28
|
bookingId: string;
|
|
29
|
-
|
|
29
|
+
travelerId: string | null;
|
|
30
30
|
type: "other" | "visa" | "insurance" | "health" | "passport_copy";
|
|
31
31
|
fileName: string;
|
|
32
32
|
fileUrl: string;
|
|
33
33
|
expiresAt: string | null;
|
|
34
34
|
notes: string | null;
|
|
35
35
|
createdAt: string;
|
|
36
|
-
}, Error,
|
|
36
|
+
}, Error, CreateBookingTravelerDocumentInput, unknown>;
|
|
37
37
|
remove: import("@tanstack/react-query").UseMutationResult<{
|
|
38
38
|
success: boolean;
|
|
39
39
|
}, Error, string, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-booking-documents.d.ts","sourceRoot":"","sources":["../../src/hooks/use-booking-documents.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-booking-documents.d.ts","sourceRoot":"","sources":["../../src/hooks/use-booking-documents.ts"],"names":[],"mappings":"AAcA,MAAM,WAAW,kCAAkC;IACjD,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,kCAAuC;;;;;;;;;;;;UASjD;AAED,MAAM,WAAW,kCAAkC;IACjD,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACtB;AAED,wBAAgB,kCAAkC,CAAC,SAAS,EAAE,MAAM;;;;;;;;;;;;;;;EA6CnE"}
|
|
@@ -3,17 +3,17 @@ import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
|
3
3
|
import { fetchWithValidation } from "../client.js";
|
|
4
4
|
import { useVoyantBookingsContext } from "../provider.js";
|
|
5
5
|
import { bookingsQueryKeys } from "../query-keys.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
export function
|
|
6
|
+
import { getBookingTravelerDocumentsQueryOptions } from "../query-options.js";
|
|
7
|
+
import { bookingSingleResponse, bookingTravelerDocumentsResponse, successEnvelope, } from "../schemas.js";
|
|
8
|
+
export function useBookingTravelerDocuments(bookingId, options = {}) {
|
|
9
9
|
const { baseUrl, fetcher } = useVoyantBookingsContext();
|
|
10
10
|
const { enabled = true } = options;
|
|
11
11
|
return useQuery({
|
|
12
|
-
...
|
|
12
|
+
...getBookingTravelerDocumentsQueryOptions({ baseUrl, fetcher }, bookingId),
|
|
13
13
|
enabled: enabled && Boolean(bookingId),
|
|
14
14
|
});
|
|
15
15
|
}
|
|
16
|
-
export function
|
|
16
|
+
export function useBookingTravelerDocumentMutation(bookingId) {
|
|
17
17
|
const { baseUrl, fetcher } = useVoyantBookingsContext();
|
|
18
18
|
const queryClient = useQueryClient();
|
|
19
19
|
const invalidate = () => {
|
|
@@ -22,8 +22,18 @@ export function useBookingDocumentMutation(bookingId) {
|
|
|
22
22
|
const create = useMutation({
|
|
23
23
|
mutationFn: async (input) => {
|
|
24
24
|
const { data } = await fetchWithValidation(`/v1/bookings/${bookingId}/documents`, bookingSingleResponse.extend({
|
|
25
|
-
data:
|
|
26
|
-
}), { baseUrl, fetcher }, {
|
|
25
|
+
data: bookingTravelerDocumentsResponse.shape.data.element,
|
|
26
|
+
}), { baseUrl, fetcher }, {
|
|
27
|
+
method: "POST",
|
|
28
|
+
body: JSON.stringify({
|
|
29
|
+
type: input.type,
|
|
30
|
+
fileName: input.fileName,
|
|
31
|
+
fileUrl: input.fileUrl,
|
|
32
|
+
travelerId: input.travelerId,
|
|
33
|
+
expiresAt: input.expiresAt,
|
|
34
|
+
notes: input.notes,
|
|
35
|
+
}),
|
|
36
|
+
});
|
|
27
37
|
return data;
|
|
28
38
|
},
|
|
29
39
|
onSuccess: invalidate,
|
|
@@ -1,18 +1,8 @@
|
|
|
1
|
-
export
|
|
2
|
-
enabled?: boolean;
|
|
3
|
-
}
|
|
4
|
-
export declare function useBookingItemParticipants(bookingId: string | null | undefined, itemId: string | null | undefined, options?: UseBookingItemParticipantsOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
5
|
-
data: {
|
|
6
|
-
id: string;
|
|
7
|
-
bookingItemId: string;
|
|
8
|
-
participantId: string;
|
|
9
|
-
role: "traveler" | "occupant" | "other" | "primary_contact" | "service_assignee" | "beneficiary";
|
|
10
|
-
isPrimary: boolean;
|
|
11
|
-
createdAt: string;
|
|
12
|
-
}[];
|
|
13
|
-
}, Error>;
|
|
1
|
+
export { type UseBookingItemTravelersOptions as UseBookingItemParticipantsOptions, useBookingItemTravelers as useBookingItemParticipants, } from "./use-booking-item-travelers.js";
|
|
14
2
|
export interface AddItemParticipantInput {
|
|
15
|
-
|
|
3
|
+
travelerId?: string;
|
|
4
|
+
participantId?: string;
|
|
5
|
+
passengerId?: string;
|
|
16
6
|
role?: string;
|
|
17
7
|
isPrimary?: boolean;
|
|
18
8
|
}
|
|
@@ -20,8 +10,8 @@ export declare function useBookingItemParticipantMutation(bookingId: string, ite
|
|
|
20
10
|
add: import("@tanstack/react-query").UseMutationResult<{
|
|
21
11
|
id: string;
|
|
22
12
|
bookingItemId: string;
|
|
23
|
-
|
|
24
|
-
role: "traveler" | "occupant" | "other" | "
|
|
13
|
+
travelerId: string;
|
|
14
|
+
role: "traveler" | "occupant" | "other" | "beneficiary" | "service_assignee" | "primary_contact";
|
|
25
15
|
isPrimary: boolean;
|
|
26
16
|
createdAt: string;
|
|
27
17
|
}, Error, AddItemParticipantInput, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-booking-item-participants.d.ts","sourceRoot":"","sources":["../../src/hooks/use-booking-item-participants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-booking-item-participants.d.ts","sourceRoot":"","sources":["../../src/hooks/use-booking-item-participants.ts"],"names":[],"mappings":"AASA,OAAO,EACL,KAAK,8BAA8B,IAAI,iCAAiC,EACxE,uBAAuB,IAAI,0BAA0B,GACtD,MAAM,iCAAiC,CAAA;AAExC,MAAM,WAAW,uBAAuB;IACtC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED,wBAAgB,iCAAiC,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;;;;;;;;;;;;EAiDlF"}
|
|
@@ -1,39 +1,41 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useMutation,
|
|
2
|
+
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
3
3
|
import { fetchWithValidation } from "../client.js";
|
|
4
4
|
import { useVoyantBookingsContext } from "../provider.js";
|
|
5
5
|
import { bookingsQueryKeys } from "../query-keys.js";
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
export function useBookingItemParticipants(bookingId, itemId, options = {}) {
|
|
9
|
-
const { baseUrl, fetcher } = useVoyantBookingsContext();
|
|
10
|
-
const { enabled = true } = options;
|
|
11
|
-
return useQuery({
|
|
12
|
-
...getBookingItemParticipantsQueryOptions({ baseUrl, fetcher }, bookingId, itemId),
|
|
13
|
-
enabled: enabled && Boolean(bookingId) && Boolean(itemId),
|
|
14
|
-
});
|
|
15
|
-
}
|
|
6
|
+
import { bookingItemTravelersResponse, bookingSingleResponse, successEnvelope } from "../schemas.js";
|
|
7
|
+
export { useBookingItemTravelers as useBookingItemParticipants, } from "./use-booking-item-travelers.js";
|
|
16
8
|
export function useBookingItemParticipantMutation(bookingId, itemId) {
|
|
17
9
|
const { baseUrl, fetcher } = useVoyantBookingsContext();
|
|
18
10
|
const queryClient = useQueryClient();
|
|
19
11
|
const add = useMutation({
|
|
20
12
|
mutationFn: async (input) => {
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
13
|
+
const travelerId = input.travelerId ?? input.participantId ?? input.passengerId;
|
|
14
|
+
if (!travelerId)
|
|
15
|
+
throw new Error("travelerId is required");
|
|
16
|
+
const { data } = await fetchWithValidation(`/v1/bookings/${bookingId}/items/${itemId}/travelers`, bookingSingleResponse.extend({
|
|
17
|
+
data: bookingItemTravelersResponse.shape.data.element,
|
|
18
|
+
}), { baseUrl, fetcher }, {
|
|
19
|
+
method: "POST",
|
|
20
|
+
body: JSON.stringify({
|
|
21
|
+
travelerId,
|
|
22
|
+
role: input.role,
|
|
23
|
+
isPrimary: input.isPrimary,
|
|
24
|
+
}),
|
|
25
|
+
});
|
|
24
26
|
return data;
|
|
25
27
|
},
|
|
26
28
|
onSuccess: () => {
|
|
27
29
|
void queryClient.invalidateQueries({
|
|
28
|
-
queryKey: bookingsQueryKeys.
|
|
30
|
+
queryKey: bookingsQueryKeys.itemTravelers(bookingId, itemId),
|
|
29
31
|
});
|
|
30
32
|
},
|
|
31
33
|
});
|
|
32
34
|
const remove = useMutation({
|
|
33
|
-
mutationFn: async (linkId) => fetchWithValidation(`/v1/bookings/${bookingId}/items/${itemId}/
|
|
35
|
+
mutationFn: async (linkId) => fetchWithValidation(`/v1/bookings/${bookingId}/items/${itemId}/travelers/${linkId}`, successEnvelope, { baseUrl, fetcher }, { method: "DELETE" }),
|
|
34
36
|
onSuccess: () => {
|
|
35
37
|
void queryClient.invalidateQueries({
|
|
36
|
-
queryKey: bookingsQueryKeys.
|
|
38
|
+
queryKey: bookingsQueryKeys.itemTravelers(bookingId, itemId),
|
|
37
39
|
});
|
|
38
40
|
},
|
|
39
41
|
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface UseBookingItemTravelersOptions {
|
|
2
|
+
enabled?: boolean;
|
|
3
|
+
}
|
|
4
|
+
export declare function useBookingItemTravelers(bookingId: string | null | undefined, itemId: string | null | undefined, options?: UseBookingItemTravelersOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
5
|
+
data: {
|
|
6
|
+
id: string;
|
|
7
|
+
bookingItemId: string;
|
|
8
|
+
travelerId: string;
|
|
9
|
+
role: "traveler" | "occupant" | "other" | "beneficiary" | "service_assignee" | "primary_contact";
|
|
10
|
+
isPrimary: boolean;
|
|
11
|
+
createdAt: string;
|
|
12
|
+
}[];
|
|
13
|
+
}, Error>;
|
|
14
|
+
export interface AddItemTravelerInput {
|
|
15
|
+
travelerId: string;
|
|
16
|
+
role?: string;
|
|
17
|
+
isPrimary?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare function useBookingItemTravelerMutation(bookingId: string, itemId: string): {
|
|
20
|
+
add: import("@tanstack/react-query").UseMutationResult<{
|
|
21
|
+
id: string;
|
|
22
|
+
bookingItemId: string;
|
|
23
|
+
travelerId: string;
|
|
24
|
+
role: "traveler" | "occupant" | "other" | "beneficiary" | "service_assignee" | "primary_contact";
|
|
25
|
+
isPrimary: boolean;
|
|
26
|
+
createdAt: string;
|
|
27
|
+
}, Error, AddItemTravelerInput, unknown>;
|
|
28
|
+
remove: import("@tanstack/react-query").UseMutationResult<{
|
|
29
|
+
success: boolean;
|
|
30
|
+
}, Error, string, unknown>;
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=use-booking-item-travelers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-booking-item-travelers.d.ts","sourceRoot":"","sources":["../../src/hooks/use-booking-item-travelers.ts"],"names":[],"mappings":"AAUA,MAAM,WAAW,8BAA8B;IAC7C,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACjC,OAAO,GAAE,8BAAmC;;;;;;;;;UAS7C;AAED,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED,wBAAgB,8BAA8B,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;;;;;;;;;;;;EA8C/E"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
3
|
+
import { fetchWithValidation } from "../client.js";
|
|
4
|
+
import { useVoyantBookingsContext } from "../provider.js";
|
|
5
|
+
import { bookingsQueryKeys } from "../query-keys.js";
|
|
6
|
+
import { getBookingItemTravelersQueryOptions } from "../query-options.js";
|
|
7
|
+
import { bookingItemTravelersResponse, bookingSingleResponse, successEnvelope } from "../schemas.js";
|
|
8
|
+
export function useBookingItemTravelers(bookingId, itemId, options = {}) {
|
|
9
|
+
const { baseUrl, fetcher } = useVoyantBookingsContext();
|
|
10
|
+
const { enabled = true } = options;
|
|
11
|
+
return useQuery({
|
|
12
|
+
...getBookingItemTravelersQueryOptions({ baseUrl, fetcher }, bookingId, itemId),
|
|
13
|
+
enabled: enabled && Boolean(bookingId) && Boolean(itemId),
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
export function useBookingItemTravelerMutation(bookingId, itemId) {
|
|
17
|
+
const { baseUrl, fetcher } = useVoyantBookingsContext();
|
|
18
|
+
const queryClient = useQueryClient();
|
|
19
|
+
const add = useMutation({
|
|
20
|
+
mutationFn: async (input) => {
|
|
21
|
+
const { data } = await fetchWithValidation(`/v1/bookings/${bookingId}/items/${itemId}/travelers`, bookingSingleResponse.extend({
|
|
22
|
+
data: bookingItemTravelersResponse.shape.data.element,
|
|
23
|
+
}), { baseUrl, fetcher }, {
|
|
24
|
+
method: "POST",
|
|
25
|
+
body: JSON.stringify({
|
|
26
|
+
travelerId: input.travelerId,
|
|
27
|
+
role: input.role,
|
|
28
|
+
isPrimary: input.isPrimary,
|
|
29
|
+
}),
|
|
30
|
+
});
|
|
31
|
+
return data;
|
|
32
|
+
},
|
|
33
|
+
onSuccess: () => {
|
|
34
|
+
void queryClient.invalidateQueries({
|
|
35
|
+
queryKey: bookingsQueryKeys.itemTravelers(bookingId, itemId),
|
|
36
|
+
});
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
const remove = useMutation({
|
|
40
|
+
mutationFn: async (linkId) => fetchWithValidation(`/v1/bookings/${bookingId}/items/${itemId}/travelers/${linkId}`, successEnvelope, { baseUrl, fetcher }, { method: "DELETE" }),
|
|
41
|
+
onSuccess: () => {
|
|
42
|
+
void queryClient.invalidateQueries({
|
|
43
|
+
queryKey: bookingsQueryKeys.itemTravelers(bookingId, itemId),
|
|
44
|
+
});
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
return { add, remove };
|
|
48
|
+
}
|
|
@@ -7,5 +7,16 @@ export declare function useBookingNoteMutation(bookingId: string): import("@tans
|
|
|
7
7
|
authorId: string;
|
|
8
8
|
content: string;
|
|
9
9
|
createdAt: string;
|
|
10
|
-
}, Error, CreateBookingNoteInput, unknown
|
|
10
|
+
}, Error, CreateBookingNoteInput, unknown> & {
|
|
11
|
+
create: import("@tanstack/react-query").UseMutationResult<{
|
|
12
|
+
id: string;
|
|
13
|
+
bookingId: string;
|
|
14
|
+
authorId: string;
|
|
15
|
+
content: string;
|
|
16
|
+
createdAt: string;
|
|
17
|
+
}, Error, CreateBookingNoteInput, unknown>;
|
|
18
|
+
remove: import("@tanstack/react-query").UseMutationResult<{
|
|
19
|
+
success: boolean;
|
|
20
|
+
}, Error, string, unknown>;
|
|
21
|
+
};
|
|
11
22
|
//# sourceMappingURL=use-booking-note-mutation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-booking-note-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-booking-note-mutation.ts"],"names":[],"mappings":"AAUA,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,MAAM,CAAA;CAChB;
|
|
1
|
+
{"version":3,"file":"use-booking-note-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-booking-note-mutation.ts"],"names":[],"mappings":"AAUA,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,MAAM,CAAA;CAChB;AAQD,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM;;;;;;;;;;;;;;;;;EAuCvD"}
|
|
@@ -8,17 +8,30 @@ import { bookingNoteRecordSchema } from "../schemas.js";
|
|
|
8
8
|
const bookingNoteSingleResponse = z.object({
|
|
9
9
|
data: bookingNoteRecordSchema,
|
|
10
10
|
});
|
|
11
|
+
const successResponse = z.object({ success: z.boolean() });
|
|
11
12
|
export function useBookingNoteMutation(bookingId) {
|
|
12
13
|
const { baseUrl, fetcher } = useVoyantBookingsContext();
|
|
13
14
|
const queryClient = useQueryClient();
|
|
14
|
-
|
|
15
|
+
const invalidate = () => {
|
|
16
|
+
void queryClient.invalidateQueries({ queryKey: bookingsQueryKeys.notes(bookingId) });
|
|
17
|
+
void queryClient.invalidateQueries({ queryKey: bookingsQueryKeys.activity(bookingId) });
|
|
18
|
+
};
|
|
19
|
+
const create = useMutation({
|
|
15
20
|
mutationFn: async (input) => {
|
|
16
21
|
const { data } = await fetchWithValidation(`/v1/bookings/${bookingId}/notes`, bookingNoteSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
|
|
17
22
|
return data;
|
|
18
23
|
},
|
|
19
|
-
onSuccess:
|
|
20
|
-
|
|
21
|
-
|
|
24
|
+
onSuccess: invalidate,
|
|
25
|
+
});
|
|
26
|
+
const remove = useMutation({
|
|
27
|
+
mutationFn: async (noteId) => {
|
|
28
|
+
return fetchWithValidation(`/v1/bookings/${bookingId}/notes/${noteId}`, successResponse, { baseUrl, fetcher }, { method: "DELETE" });
|
|
22
29
|
},
|
|
30
|
+
onSuccess: invalidate,
|
|
23
31
|
});
|
|
32
|
+
// Back-compat: older callers invoke `mutation.mutateAsync({ content })` directly
|
|
33
|
+
// on the returned object (treating the hook as a single create mutation).
|
|
34
|
+
// Expose the create mutation's surface at the top level, plus named `create`
|
|
35
|
+
// and `remove` for new callers.
|
|
36
|
+
return Object.assign(create, { create, remove });
|
|
24
37
|
}
|
|
@@ -11,25 +11,35 @@ export declare function usePassengerMutation(bookingId: string): {
|
|
|
11
11
|
create: import("@tanstack/react-query").UseMutationResult<{
|
|
12
12
|
id: string;
|
|
13
13
|
bookingId: string;
|
|
14
|
+
participantType: string;
|
|
14
15
|
firstName: string;
|
|
15
16
|
lastName: string;
|
|
16
17
|
email: string | null;
|
|
17
18
|
phone: string | null;
|
|
18
19
|
specialRequests: string | null;
|
|
20
|
+
isPrimary: boolean;
|
|
19
21
|
createdAt: string;
|
|
20
|
-
|
|
22
|
+
travelerCategory?: string | null | undefined;
|
|
23
|
+
preferredLanguage?: string | null | undefined;
|
|
24
|
+
accessibilityNeeds?: string | null | undefined;
|
|
25
|
+
notes?: string | null | undefined;
|
|
21
26
|
updatedAt?: string | undefined;
|
|
22
27
|
}, Error, CreatePassengerInput, unknown>;
|
|
23
28
|
update: import("@tanstack/react-query").UseMutationResult<{
|
|
24
29
|
id: string;
|
|
25
30
|
bookingId: string;
|
|
31
|
+
participantType: string;
|
|
26
32
|
firstName: string;
|
|
27
33
|
lastName: string;
|
|
28
34
|
email: string | null;
|
|
29
35
|
phone: string | null;
|
|
30
36
|
specialRequests: string | null;
|
|
37
|
+
isPrimary: boolean;
|
|
31
38
|
createdAt: string;
|
|
32
|
-
|
|
39
|
+
travelerCategory?: string | null | undefined;
|
|
40
|
+
preferredLanguage?: string | null | undefined;
|
|
41
|
+
accessibilityNeeds?: string | null | undefined;
|
|
42
|
+
notes?: string | null | undefined;
|
|
33
43
|
updatedAt?: string | undefined;
|
|
34
44
|
}, Error, {
|
|
35
45
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-passenger-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-passenger-mutation.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC/B,eAAe,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;CACjC;AAED,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAA;AAEhE,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"use-passenger-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-passenger-mutation.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC/B,eAAe,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;CACjC;AAED,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAA;AAEhE,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAuBV,MAAM;eAAS,oBAAoB;;;;;EAgC9E"}
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
enabled?: boolean;
|
|
3
|
-
}
|
|
4
|
-
export declare function usePassengers(bookingId: string | null | undefined, options?: UsePassengersOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
5
|
-
data: {
|
|
6
|
-
id: string;
|
|
7
|
-
bookingId: string;
|
|
8
|
-
firstName: string;
|
|
9
|
-
lastName: string;
|
|
10
|
-
email: string | null;
|
|
11
|
-
phone: string | null;
|
|
12
|
-
specialRequests: string | null;
|
|
13
|
-
createdAt: string;
|
|
14
|
-
isLeadPassenger?: boolean | null | undefined;
|
|
15
|
-
updatedAt?: string | undefined;
|
|
16
|
-
}[];
|
|
17
|
-
}, Error>;
|
|
1
|
+
export { type UseTravelersOptions as UsePassengersOptions, useTravelers as usePassengers, } from "./use-travelers.js";
|
|
18
2
|
//# sourceMappingURL=use-passengers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-passengers.d.ts","sourceRoot":"","sources":["../../src/hooks/use-passengers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-passengers.d.ts","sourceRoot":"","sources":["../../src/hooks/use-passengers.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,mBAAmB,IAAI,oBAAoB,EAChD,YAAY,IAAI,aAAa,GAC9B,MAAM,oBAAoB,CAAA"}
|
|
@@ -1,12 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
import { useVoyantBookingsContext } from "../provider.js";
|
|
4
|
-
import { getPassengersQueryOptions } from "../query-options.js";
|
|
5
|
-
export function usePassengers(bookingId, options = {}) {
|
|
6
|
-
const { baseUrl, fetcher } = useVoyantBookingsContext();
|
|
7
|
-
const { enabled = true } = options;
|
|
8
|
-
return useQuery({
|
|
9
|
-
...getPassengersQueryOptions({ baseUrl, fetcher }, bookingId),
|
|
10
|
-
enabled: enabled && Boolean(bookingId),
|
|
11
|
-
});
|
|
12
|
-
}
|
|
2
|
+
export { useTravelers as usePassengers, } from "./use-travelers.js";
|
|
@@ -54,9 +54,9 @@ export declare function usePublicBookingSessionFlowMutation(sessionId: string):
|
|
|
54
54
|
expiredAt: string | null;
|
|
55
55
|
cancelledAt: string | null;
|
|
56
56
|
completedAt: string | null;
|
|
57
|
-
|
|
57
|
+
travelers: {
|
|
58
58
|
id: string;
|
|
59
|
-
participantType: "traveler" | "
|
|
59
|
+
participantType: "traveler" | "occupant" | "other";
|
|
60
60
|
travelerCategory: "other" | "adult" | "child" | "infant" | "senior" | null;
|
|
61
61
|
firstName: string;
|
|
62
62
|
lastName: string;
|
|
@@ -89,10 +89,10 @@ export declare function usePublicBookingSessionFlowMutation(sessionId: string):
|
|
|
89
89
|
optionId: string | null;
|
|
90
90
|
optionUnitId: string | null;
|
|
91
91
|
pricingCategoryId: string | null;
|
|
92
|
-
|
|
92
|
+
travelerLinks: {
|
|
93
93
|
id: string;
|
|
94
|
-
|
|
95
|
-
role: "traveler" | "occupant" | "other" | "
|
|
94
|
+
travelerId: string;
|
|
95
|
+
role: "traveler" | "occupant" | "other" | "beneficiary";
|
|
96
96
|
isPrimary: boolean;
|
|
97
97
|
}[];
|
|
98
98
|
}[];
|
|
@@ -112,9 +112,8 @@ export declare function usePublicBookingSessionFlowMutation(sessionId: string):
|
|
|
112
112
|
releasedAt: string | null;
|
|
113
113
|
}[];
|
|
114
114
|
checklist: {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
hasPrimaryParticipant: boolean;
|
|
115
|
+
hasTravelers: boolean;
|
|
116
|
+
hasPrimaryTraveler: boolean;
|
|
118
117
|
hasItems: boolean;
|
|
119
118
|
hasAllocations: boolean;
|
|
120
119
|
readyForConfirmation: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-public-booking-session-flow-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-public-booking-session-flow-mutation.ts"],"names":[],"mappings":"AAgBA,wBAAgB,mCAAmC,CAAC,SAAS,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"use-public-booking-session-flow-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-public-booking-session-flow-mutation.ts"],"names":[],"mappings":"AAgBA,wBAAgB,mCAAmC,CAAC,SAAS,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyCpE"}
|
|
@@ -18,9 +18,9 @@ export declare function usePublicBookingSession(sessionId: string | null | undef
|
|
|
18
18
|
expiredAt: string | null;
|
|
19
19
|
cancelledAt: string | null;
|
|
20
20
|
completedAt: string | null;
|
|
21
|
-
|
|
21
|
+
travelers: {
|
|
22
22
|
id: string;
|
|
23
|
-
participantType: "traveler" | "
|
|
23
|
+
participantType: "traveler" | "occupant" | "other";
|
|
24
24
|
travelerCategory: "other" | "adult" | "child" | "infant" | "senior" | null;
|
|
25
25
|
firstName: string;
|
|
26
26
|
lastName: string;
|
|
@@ -53,10 +53,10 @@ export declare function usePublicBookingSession(sessionId: string | null | undef
|
|
|
53
53
|
optionId: string | null;
|
|
54
54
|
optionUnitId: string | null;
|
|
55
55
|
pricingCategoryId: string | null;
|
|
56
|
-
|
|
56
|
+
travelerLinks: {
|
|
57
57
|
id: string;
|
|
58
|
-
|
|
59
|
-
role: "traveler" | "occupant" | "other" | "
|
|
58
|
+
travelerId: string;
|
|
59
|
+
role: "traveler" | "occupant" | "other" | "beneficiary";
|
|
60
60
|
isPrimary: boolean;
|
|
61
61
|
}[];
|
|
62
62
|
}[];
|
|
@@ -76,9 +76,8 @@ export declare function usePublicBookingSession(sessionId: string | null | undef
|
|
|
76
76
|
releasedAt: string | null;
|
|
77
77
|
}[];
|
|
78
78
|
checklist: {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
hasPrimaryParticipant: boolean;
|
|
79
|
+
hasTravelers: boolean;
|
|
80
|
+
hasPrimaryTraveler: boolean;
|
|
82
81
|
hasItems: boolean;
|
|
83
82
|
hasAllocations: boolean;
|
|
84
83
|
readyForConfirmation: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-public-booking-session.d.ts","sourceRoot":"","sources":["../../src/hooks/use-public-booking-session.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,8BAA8B;IAC7C,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,8BAAmC
|
|
1
|
+
{"version":3,"file":"use-public-booking-session.d.ts","sourceRoot":"","sources":["../../src/hooks/use-public-booking-session.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,8BAA8B;IAC7C,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,8BAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAS7C"}
|