@voyantjs/bookings-react 0.4.5 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/hooks/index.d.ts +11 -0
  2. package/dist/hooks/index.d.ts.map +1 -1
  3. package/dist/hooks/index.js +11 -0
  4. package/dist/hooks/use-booking-cancel-mutation.d.ts +25 -0
  5. package/dist/hooks/use-booking-cancel-mutation.d.ts.map +1 -0
  6. package/dist/hooks/use-booking-cancel-mutation.js +24 -0
  7. package/dist/hooks/use-booking-convert-mutation.d.ts +31 -0
  8. package/dist/hooks/use-booking-convert-mutation.d.ts.map +1 -0
  9. package/dist/hooks/use-booking-convert-mutation.js +24 -0
  10. package/dist/hooks/use-booking-documents.d.ts +41 -0
  11. package/dist/hooks/use-booking-documents.d.ts.map +1 -0
  12. package/dist/hooks/use-booking-documents.js +36 -0
  13. package/dist/hooks/use-booking-group-for-booking.d.ts +24 -0
  14. package/dist/hooks/use-booking-group-for-booking.d.ts.map +1 -0
  15. package/dist/hooks/use-booking-group-for-booking.js +12 -0
  16. package/dist/hooks/use-booking-group-member-mutation.d.ts +27 -0
  17. package/dist/hooks/use-booking-group-member-mutation.d.ts.map +1 -0
  18. package/dist/hooks/use-booking-group-member-mutation.js +38 -0
  19. package/dist/hooks/use-booking-group-mutation.d.ts +40 -0
  20. package/dist/hooks/use-booking-group-mutation.d.ts.map +1 -0
  21. package/dist/hooks/use-booking-group-mutation.js +32 -0
  22. package/dist/hooks/use-booking-group.d.ts +41 -0
  23. package/dist/hooks/use-booking-group.d.ts.map +1 -0
  24. package/dist/hooks/use-booking-group.js +12 -0
  25. package/dist/hooks/use-booking-groups.d.ts +21 -0
  26. package/dist/hooks/use-booking-groups.d.ts.map +1 -0
  27. package/dist/hooks/use-booking-groups.js +12 -0
  28. package/dist/hooks/use-booking-item-mutation.d.ts +77 -0
  29. package/dist/hooks/use-booking-item-mutation.d.ts.map +1 -0
  30. package/dist/hooks/use-booking-item-mutation.js +42 -0
  31. package/dist/hooks/use-booking-item-participants.d.ts +32 -0
  32. package/dist/hooks/use-booking-item-participants.d.ts.map +1 -0
  33. package/dist/hooks/use-booking-item-participants.js +41 -0
  34. package/dist/hooks/use-booking-items.d.ts +31 -0
  35. package/dist/hooks/use-booking-items.d.ts.map +1 -0
  36. package/dist/hooks/use-booking-items.js +12 -0
  37. package/dist/index.d.ts +1 -1
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/index.js +1 -1
  40. package/dist/query-keys.d.ts +15 -0
  41. package/dist/query-keys.d.ts.map +1 -1
  42. package/dist/query-keys.js +8 -0
  43. package/dist/query-options.d.ts +522 -0
  44. package/dist/query-options.d.ts.map +1 -1
  45. package/dist/query-options.js +57 -1
  46. package/dist/schemas.d.ts +500 -0
  47. package/dist/schemas.d.ts.map +1 -1
  48. package/dist/schemas.js +119 -0
  49. package/package.json +5 -5
@@ -0,0 +1,42 @@
1
+ "use client";
2
+ import { useMutation, 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 { bookingItemsResponse, bookingSingleResponse, successEnvelope } from "../schemas.js";
7
+ export function useBookingItemMutation(bookingId) {
8
+ const { baseUrl, fetcher } = useVoyantBookingsContext();
9
+ const queryClient = useQueryClient();
10
+ const create = useMutation({
11
+ mutationFn: async (input) => {
12
+ const { data } = await fetchWithValidation(`/v1/bookings/${bookingId}/items`, bookingSingleResponse.extend({
13
+ data: bookingItemsResponse.shape.data.element,
14
+ }), { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
15
+ return data;
16
+ },
17
+ onSuccess: () => {
18
+ void queryClient.invalidateQueries({ queryKey: bookingsQueryKeys.items(bookingId) });
19
+ void queryClient.invalidateQueries({ queryKey: bookingsQueryKeys.activity(bookingId) });
20
+ },
21
+ });
22
+ const update = useMutation({
23
+ mutationFn: async ({ id, input }) => {
24
+ const { data } = await fetchWithValidation(`/v1/bookings/${bookingId}/items/${id}`, bookingSingleResponse.extend({
25
+ data: bookingItemsResponse.shape.data.element,
26
+ }), { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
27
+ return data;
28
+ },
29
+ onSuccess: () => {
30
+ void queryClient.invalidateQueries({ queryKey: bookingsQueryKeys.items(bookingId) });
31
+ void queryClient.invalidateQueries({ queryKey: bookingsQueryKeys.activity(bookingId) });
32
+ },
33
+ });
34
+ const remove = useMutation({
35
+ mutationFn: async (itemId) => fetchWithValidation(`/v1/bookings/${bookingId}/items/${itemId}`, successEnvelope, { baseUrl, fetcher }, { method: "DELETE" }),
36
+ onSuccess: () => {
37
+ void queryClient.invalidateQueries({ queryKey: bookingsQueryKeys.items(bookingId) });
38
+ void queryClient.invalidateQueries({ queryKey: bookingsQueryKeys.activity(bookingId) });
39
+ },
40
+ });
41
+ return { create, update, remove };
42
+ }
@@ -0,0 +1,32 @@
1
+ export interface UseBookingItemParticipantsOptions {
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>;
14
+ export interface AddItemParticipantInput {
15
+ participantId: string;
16
+ role?: string;
17
+ isPrimary?: boolean;
18
+ }
19
+ export declare function useBookingItemParticipantMutation(bookingId: string, itemId: string): {
20
+ add: import("@tanstack/react-query").UseMutationResult<{
21
+ id: string;
22
+ bookingItemId: string;
23
+ participantId: string;
24
+ role: "traveler" | "occupant" | "other" | "primary_contact" | "service_assignee" | "beneficiary";
25
+ isPrimary: boolean;
26
+ createdAt: string;
27
+ }, Error, AddItemParticipantInput, unknown>;
28
+ remove: import("@tanstack/react-query").UseMutationResult<{
29
+ success: boolean;
30
+ }, Error, string, unknown>;
31
+ };
32
+ //# sourceMappingURL=use-booking-item-participants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-booking-item-participants.d.ts","sourceRoot":"","sources":["../../src/hooks/use-booking-item-participants.ts"],"names":[],"mappings":"AAcA,MAAM,WAAW,iCAAiC;IAChD,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACjC,OAAO,GAAE,iCAAsC;;;;;;;;;UAShD;AAED,MAAM,WAAW,uBAAuB;IACtC,aAAa,EAAE,MAAM,CAAA;IACrB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED,wBAAgB,iCAAiC,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;;;;;;;;;;;;EAuClF"}
@@ -0,0 +1,41 @@
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 { getBookingItemParticipantsQueryOptions } from "../query-options.js";
7
+ import { bookingItemParticipantsResponse, bookingSingleResponse, successEnvelope, } from "../schemas.js";
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
+ }
16
+ export function useBookingItemParticipantMutation(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}/participants`, bookingSingleResponse.extend({
22
+ data: bookingItemParticipantsResponse.shape.data.element,
23
+ }), { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
24
+ return data;
25
+ },
26
+ onSuccess: () => {
27
+ void queryClient.invalidateQueries({
28
+ queryKey: bookingsQueryKeys.itemParticipants(bookingId, itemId),
29
+ });
30
+ },
31
+ });
32
+ const remove = useMutation({
33
+ mutationFn: async (linkId) => fetchWithValidation(`/v1/bookings/${bookingId}/items/${itemId}/participants/${linkId}`, successEnvelope, { baseUrl, fetcher }, { method: "DELETE" }),
34
+ onSuccess: () => {
35
+ void queryClient.invalidateQueries({
36
+ queryKey: bookingsQueryKeys.itemParticipants(bookingId, itemId),
37
+ });
38
+ },
39
+ });
40
+ return { add, remove };
41
+ }
@@ -0,0 +1,31 @@
1
+ export interface UseBookingItemsOptions {
2
+ enabled?: boolean;
3
+ }
4
+ export declare function useBookingItems(bookingId: string | null | undefined, options?: UseBookingItemsOptions): import("@tanstack/react-query").UseQueryResult<{
5
+ data: {
6
+ id: string;
7
+ bookingId: string;
8
+ title: string;
9
+ description: string | null;
10
+ itemType: "other" | "unit" | "extra" | "service" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
11
+ status: "draft" | "on_hold" | "confirmed" | "expired" | "cancelled" | "fulfilled";
12
+ serviceDate: string | null;
13
+ startsAt: string | null;
14
+ endsAt: string | null;
15
+ quantity: number;
16
+ sellCurrency: string;
17
+ unitSellAmountCents: number | null;
18
+ totalSellAmountCents: number | null;
19
+ costCurrency: string | null;
20
+ unitCostAmountCents: number | null;
21
+ totalCostAmountCents: number | null;
22
+ notes: string | null;
23
+ productId: string | null;
24
+ optionId: string | null;
25
+ optionUnitId: string | null;
26
+ pricingCategoryId: string | null;
27
+ createdAt: string;
28
+ updatedAt: string;
29
+ }[];
30
+ }, Error>;
31
+ //# sourceMappingURL=use-booking-items.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-booking-items.d.ts","sourceRoot":"","sources":["../../src/hooks/use-booking-items.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,sBAAsB;IACrC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,eAAe,CAC7B,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,sBAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;UASrC"}
@@ -0,0 +1,12 @@
1
+ "use client";
2
+ import { useQuery } from "@tanstack/react-query";
3
+ import { useVoyantBookingsContext } from "../provider.js";
4
+ import { getBookingItemsQueryOptions } from "../query-options.js";
5
+ export function useBookingItems(bookingId, options = {}) {
6
+ const { baseUrl, fetcher } = useVoyantBookingsContext();
7
+ const { enabled = true } = options;
8
+ return useQuery({
9
+ ...getBookingItemsQueryOptions({ baseUrl, fetcher }, bookingId),
10
+ enabled: enabled && Boolean(bookingId),
11
+ });
12
+ }
package/dist/index.d.ts CHANGED
@@ -2,6 +2,6 @@ export { defaultFetcher, fetchWithValidation, VoyantApiError, type VoyantFetcher
2
2
  export * from "./hooks/index.js";
3
3
  export { useVoyantBookingsContext, type VoyantBookingsContextValue, VoyantBookingsProvider, type VoyantBookingsProviderProps, } from "./provider.js";
4
4
  export { bookingsQueryKeys } from "./query-keys.js";
5
- export { getBookingActivityQueryOptions, getBookingNotesQueryOptions, getBookingQueryOptions, getBookingsQueryOptions, getPassengersQueryOptions, getPublicBookingSessionQueryOptions, getPublicBookingSessionStateQueryOptions, getSupplierStatusesQueryOptions, } from "./query-options.js";
5
+ export { getBookingActivityQueryOptions, getBookingDocumentsQueryOptions, getBookingGroupForBookingQueryOptions, getBookingGroupQueryOptions, getBookingGroupsQueryOptions, getBookingItemParticipantsQueryOptions, getBookingItemsQueryOptions, getBookingNotesQueryOptions, getBookingQueryOptions, getBookingsQueryOptions, getPassengersQueryOptions, getPublicBookingSessionQueryOptions, getPublicBookingSessionStateQueryOptions, getSupplierStatusesQueryOptions, } from "./query-options.js";
6
6
  export * from "./schemas.js";
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,KAAK,aAAa,GACnB,MAAM,aAAa,CAAA;AACpB,cAAc,kBAAkB,CAAA;AAChC,OAAO,EACL,wBAAwB,EACxB,KAAK,0BAA0B,EAC/B,sBAAsB,EACtB,KAAK,2BAA2B,GACjC,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,EACL,8BAA8B,EAC9B,2BAA2B,EAC3B,sBAAsB,EACtB,uBAAuB,EACvB,yBAAyB,EACzB,mCAAmC,EACnC,wCAAwC,EACxC,+BAA+B,GAChC,MAAM,oBAAoB,CAAA;AAC3B,cAAc,cAAc,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,KAAK,aAAa,GACnB,MAAM,aAAa,CAAA;AACpB,cAAc,kBAAkB,CAAA;AAChC,OAAO,EACL,wBAAwB,EACxB,KAAK,0BAA0B,EAC/B,sBAAsB,EACtB,KAAK,2BAA2B,GACjC,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,EACL,8BAA8B,EAC9B,+BAA+B,EAC/B,qCAAqC,EACrC,2BAA2B,EAC3B,4BAA4B,EAC5B,sCAAsC,EACtC,2BAA2B,EAC3B,2BAA2B,EAC3B,sBAAsB,EACtB,uBAAuB,EACvB,yBAAyB,EACzB,mCAAmC,EACnC,wCAAwC,EACxC,+BAA+B,GAChC,MAAM,oBAAoB,CAAA;AAC3B,cAAc,cAAc,CAAA"}
package/dist/index.js CHANGED
@@ -2,5 +2,5 @@ export { defaultFetcher, fetchWithValidation, VoyantApiError, } from "./client.j
2
2
  export * from "./hooks/index.js";
3
3
  export { useVoyantBookingsContext, VoyantBookingsProvider, } from "./provider.js";
4
4
  export { bookingsQueryKeys } from "./query-keys.js";
5
- export { getBookingActivityQueryOptions, getBookingNotesQueryOptions, getBookingQueryOptions, getBookingsQueryOptions, getPassengersQueryOptions, getPublicBookingSessionQueryOptions, getPublicBookingSessionStateQueryOptions, getSupplierStatusesQueryOptions, } from "./query-options.js";
5
+ export { getBookingActivityQueryOptions, getBookingDocumentsQueryOptions, getBookingGroupForBookingQueryOptions, getBookingGroupQueryOptions, getBookingGroupsQueryOptions, getBookingItemParticipantsQueryOptions, getBookingItemsQueryOptions, getBookingNotesQueryOptions, getBookingQueryOptions, getBookingsQueryOptions, getPassengersQueryOptions, getPublicBookingSessionQueryOptions, getPublicBookingSessionStateQueryOptions, getSupplierStatusesQueryOptions, } from "./query-options.js";
6
6
  export * from "./schemas.js";
@@ -4,6 +4,13 @@ export interface BookingsListFilters {
4
4
  limit?: number | undefined;
5
5
  offset?: number | undefined;
6
6
  }
7
+ export interface BookingGroupsListFilters {
8
+ kind?: string | undefined;
9
+ productId?: string | undefined;
10
+ optionUnitId?: string | undefined;
11
+ limit?: number | undefined;
12
+ offset?: number | undefined;
13
+ }
7
14
  export declare const bookingsQueryKeys: {
8
15
  readonly all: readonly ["voyant", "bookings"];
9
16
  readonly bookings: () => readonly ["voyant", "bookings", "bookings"];
@@ -12,9 +19,17 @@ export declare const bookingsQueryKeys: {
12
19
  readonly booking: (id: string) => readonly ["voyant", "bookings", "bookings", "detail", string];
13
20
  readonly publicSession: (sessionId: string) => readonly ["voyant", "bookings", "public-sessions", "detail", string];
14
21
  readonly publicSessionState: (sessionId: string) => readonly ["voyant", "bookings", "public-sessions", "detail", string, "state"];
22
+ readonly items: (bookingId: string) => readonly ["voyant", "bookings", "bookings", "detail", string, "items"];
23
+ readonly itemParticipants: (bookingId: string, itemId: string) => readonly ["voyant", "bookings", "bookings", "detail", string, "items", string, "participants"];
24
+ readonly documents: (bookingId: string) => readonly ["voyant", "bookings", "bookings", "detail", string, "documents"];
15
25
  readonly passengers: (bookingId: string) => readonly ["voyant", "bookings", "bookings", "detail", string, "passengers"];
16
26
  readonly supplierStatuses: (bookingId: string) => readonly ["voyant", "bookings", "bookings", "detail", string, "supplier-statuses"];
17
27
  readonly activity: (bookingId: string) => readonly ["voyant", "bookings", "bookings", "detail", string, "activity"];
18
28
  readonly notes: (bookingId: string) => readonly ["voyant", "bookings", "bookings", "detail", string, "notes"];
29
+ readonly groups: () => readonly ["voyant", "bookings", "groups"];
30
+ readonly groupsList: (filters: BookingGroupsListFilters) => readonly ["voyant", "bookings", "groups", "list", BookingGroupsListFilters];
31
+ readonly group: (id: string) => readonly ["voyant", "bookings", "groups", "detail", string];
32
+ readonly groupMembers: (id: string) => readonly ["voyant", "bookings", "groups", "detail", string, "members"];
33
+ readonly groupForBooking: (bookingId: string) => readonly ["voyant", "bookings", "bookings", "detail", string, "group"];
19
34
  };
20
35
  //# sourceMappingURL=query-keys.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"query-keys.d.ts","sourceRoot":"","sources":["../src/query-keys.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC5B;AAED,eAAO,MAAM,iBAAiB;;;;qCAKJ,mBAAmB;2BAE7B,MAAM;wCACO,MAAM;6CAED,MAAM;qCAGd,MAAM;2CAEA,MAAM;mCAEd,MAAM;gCACT,MAAM;CACjB,CAAA"}
1
+ {"version":3,"file":"query-keys.d.ts","sourceRoot":"","sources":["../src/query-keys.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC5B;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9B,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACjC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC5B;AAED,eAAO,MAAM,iBAAiB;;;;qCAKJ,mBAAmB;2BAE7B,MAAM;wCACO,MAAM;6CAED,MAAM;gCAGnB,MAAM;2CACK,MAAM,UAAU,MAAM;oCAE7B,MAAM;qCACL,MAAM;2CAEA,MAAM;mCAEd,MAAM;gCACT,MAAM;;mCAGH,wBAAwB;yBAElC,MAAM;gCACC,MAAM;0CACI,MAAM;CAE3B,CAAA"}
@@ -6,8 +6,16 @@ export const bookingsQueryKeys = {
6
6
  booking: (id) => [...bookingsQueryKeys.bookings(), "detail", id],
7
7
  publicSession: (sessionId) => [...bookingsQueryKeys.publicSessions(), "detail", sessionId],
8
8
  publicSessionState: (sessionId) => [...bookingsQueryKeys.publicSession(sessionId), "state"],
9
+ items: (bookingId) => [...bookingsQueryKeys.booking(bookingId), "items"],
10
+ itemParticipants: (bookingId, itemId) => [...bookingsQueryKeys.items(bookingId), itemId, "participants"],
11
+ documents: (bookingId) => [...bookingsQueryKeys.booking(bookingId), "documents"],
9
12
  passengers: (bookingId) => [...bookingsQueryKeys.booking(bookingId), "passengers"],
10
13
  supplierStatuses: (bookingId) => [...bookingsQueryKeys.booking(bookingId), "supplier-statuses"],
11
14
  activity: (bookingId) => [...bookingsQueryKeys.booking(bookingId), "activity"],
12
15
  notes: (bookingId) => [...bookingsQueryKeys.booking(bookingId), "notes"],
16
+ groups: () => [...bookingsQueryKeys.all, "groups"],
17
+ groupsList: (filters) => [...bookingsQueryKeys.groups(), "list", filters],
18
+ group: (id) => [...bookingsQueryKeys.groups(), "detail", id],
19
+ groupMembers: (id) => [...bookingsQueryKeys.group(id), "members"],
20
+ groupForBooking: (bookingId) => [...bookingsQueryKeys.booking(bookingId), "group"],
13
21
  };