@connectedxm/client 1.4.23 → 1.4.24

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/index.js CHANGED
@@ -65,6 +65,13 @@ __export(src_exports, {
65
65
  AdvertisementType: () => AdvertisementType,
66
66
  AppendInfiniteQuery: () => AppendInfiniteQuery,
67
67
  BENEFITS_QUERY_KEY: () => BENEFITS_QUERY_KEY,
68
+ BOOKINGS_QUERY_KEY: () => BOOKINGS_QUERY_KEY,
69
+ BOOKING_PLACES_QUERY_KEY: () => BOOKING_PLACES_QUERY_KEY,
70
+ BOOKING_PLACE_QUERY_KEY: () => BOOKING_PLACE_QUERY_KEY,
71
+ BOOKING_PLACE_SPACES_QUERY_KEY: () => BOOKING_PLACE_SPACES_QUERY_KEY,
72
+ BOOKING_PLACE_SPACE_QUERY_KEY: () => BOOKING_PLACE_SPACE_QUERY_KEY,
73
+ BOOKING_PLACE_SPACE_SLOTS_QUERY_KEY: () => BOOKING_PLACE_SPACE_SLOTS_QUERY_KEY,
74
+ BOOKING_QUERY_KEY: () => BOOKING_QUERY_KEY,
68
75
  BlockIntegration: () => BlockIntegration,
69
76
  CHANNELS_QUERY_KEY: () => CHANNELS_QUERY_KEY,
70
77
  CHANNEL_COLLECTIONS_QUERY_KEY: () => CHANNEL_COLLECTIONS_QUERY_KEY,
@@ -82,6 +89,7 @@ __export(src_exports, {
82
89
  CONTENT_QUERY_KEY: () => CONTENT_QUERY_KEY,
83
90
  CUSTOM_ERROR_CODES: () => CUSTOM_ERROR_CODES,
84
91
  CacheIndividualQueries: () => CacheIndividualQueries,
92
+ CancelBooking: () => CancelBooking,
85
93
  CancelGroupInvitation: () => CancelGroupInvitation,
86
94
  CancelGroupRequest: () => CancelGroupRequest,
87
95
  CancelPass: () => CancelPass,
@@ -89,6 +97,7 @@ __export(src_exports, {
89
97
  CapturePaymentIntent: () => CapturePaymentIntent,
90
98
  CheckinListingAttendeePass: () => CheckinListingAttendeePass,
91
99
  CompleteEventActivation: () => CompleteEventActivation,
100
+ ConfirmBooking: () => ConfirmBooking,
92
101
  ConnectedXMProvider: () => ConnectedXMProvider,
93
102
  ContentGuestType: () => ContentGuestType,
94
103
  CouponType: () => CouponType,
@@ -116,6 +125,7 @@ __export(src_exports, {
116
125
  CreateThread: () => CreateThread,
117
126
  CreateThreadMessage: () => CreateThreadMessage,
118
127
  Currency: () => Currency,
128
+ DayOfWeek: () => DayOfWeek,
119
129
  DeactivateGroup: () => DeactivateGroup,
120
130
  DefaultAuthAction: () => DefaultAuthAction,
121
131
  DeleteActivity: () => DeleteActivity,
@@ -125,6 +135,7 @@ __export(src_exports, {
125
135
  DeleteChannelSubscriber: () => DeleteChannelSubscriber,
126
136
  DeleteContentGuest: () => DeleteContentGuest,
127
137
  DeleteContentPublishSchedule: () => DeleteContentPublishSchedule,
138
+ DeleteDraftBooking: () => DeleteDraftBooking,
128
139
  DeleteListing: () => DeleteListing,
129
140
  DeleteListingQuestion: () => DeleteListingQuestion,
130
141
  DeleteListingSession: () => DeleteListingSession,
@@ -140,6 +151,7 @@ __export(src_exports, {
140
151
  DeleteThreadMessage: () => DeleteThreadMessage,
141
152
  DemoteGroupModerator: () => DemoteGroupModerator,
142
153
  DisableIntegration: () => DisableIntegration,
154
+ DraftBooking: () => DraftBooking,
143
155
  ERR_FEATURE_NOT_AVAILABLE: () => ERR_FEATURE_NOT_AVAILABLE,
144
156
  ERR_INTEGRATION_PERMISSION_DENIED: () => ERR_INTEGRATION_PERMISSION_DENIED,
145
157
  ERR_KNOWN_ERROR: () => ERR_KNOWN_ERROR,
@@ -208,6 +220,13 @@ __export(src_exports, {
208
220
  GetBaseInfiniteQueryKeys: () => GetBaseInfiniteQueryKeys,
209
221
  GetBaseSingleQueryKeys: () => GetBaseSingleQueryKeys,
210
222
  GetBenefits: () => GetBenefits,
223
+ GetBooking: () => GetBooking,
224
+ GetBookingPlace: () => GetBookingPlace,
225
+ GetBookingPlaceSpace: () => GetBookingPlaceSpace,
226
+ GetBookingPlaceSpaceSlots: () => GetBookingPlaceSpaceSlots,
227
+ GetBookingPlaces: () => GetBookingPlaces,
228
+ GetBookingPlacesSpaces: () => GetBookingPlacesSpaces,
229
+ GetBookings: () => GetBookings,
211
230
  GetChannel: () => GetChannel,
212
231
  GetChannelCollection: () => GetChannelCollection,
213
232
  GetChannelCollectionContents: () => GetChannelCollectionContents,
@@ -507,6 +526,12 @@ __export(src_exports, {
507
526
  SET_ADVERTISEMENT_QUERY_DATA: () => SET_ADVERTISEMENT_QUERY_DATA,
508
527
  SET_ALL_GROUP_EVENTS_QUERY_DATA: () => SET_ALL_GROUP_EVENTS_QUERY_DATA,
509
528
  SET_BENEFITS_QUERY_DATA: () => SET_BENEFITS_QUERY_DATA,
529
+ SET_BOOKINGS_QUERY_DATA: () => SET_BOOKINGS_QUERY_DATA,
530
+ SET_BOOKING_PLACES_QUERY_DATA: () => SET_BOOKING_PLACES_QUERY_DATA,
531
+ SET_BOOKING_PLACE_QUERY_DATA: () => SET_BOOKING_PLACE_QUERY_DATA,
532
+ SET_BOOKING_PLACE_SPACES_QUERY_DATA: () => SET_BOOKING_PLACE_SPACES_QUERY_DATA,
533
+ SET_BOOKING_PLACE_SPACE_QUERY_DATA: () => SET_BOOKING_PLACE_SPACE_QUERY_DATA,
534
+ SET_BOOKING_QUERY_DATA: () => SET_BOOKING_QUERY_DATA,
510
535
  SET_CHANNELS_QUERY_DATA: () => SET_CHANNELS_QUERY_DATA,
511
536
  SET_CHANNEL_COLLECTIONS_QUERY_DATA: () => SET_CHANNEL_COLLECTIONS_QUERY_DATA,
512
537
  SET_CHANNEL_COLLECTION_QUERY_DATA: () => SET_CHANNEL_COLLECTION_QUERY_DATA,
@@ -720,6 +745,7 @@ __export(src_exports, {
720
745
  useAddThreadMessageReaction: () => useAddThreadMessageReaction,
721
746
  useAddThreadMessageReply: () => useAddThreadMessageReply,
722
747
  useBlockIntegration: () => useBlockIntegration,
748
+ useCancelBooking: () => useCancelBooking,
723
749
  useCancelGroupInvitation: () => useCancelGroupInvitation,
724
750
  useCancelGroupRequest: () => useCancelGroupRequest,
725
751
  useCancelPass: () => useCancelPass,
@@ -727,6 +753,7 @@ __export(src_exports, {
727
753
  useCapturePaymentIntent: () => useCapturePaymentIntent,
728
754
  useCheckinListingAttendeePass: () => useCheckinListingAttendeePass,
729
755
  useCompleteEventActivation: () => useCompleteEventActivation,
756
+ useConfirmBooking: () => useConfirmBooking,
730
757
  useConnectedInfiniteQuery: () => useConnectedInfiniteQuery,
731
758
  useConnectedMutation: () => useConnectedMutation,
732
759
  useConnectedSingleQuery: () => useConnectedSingleQuery,
@@ -762,6 +789,7 @@ __export(src_exports, {
762
789
  useDeleteChannelSubscriber: () => useDeleteChannelSubscriber,
763
790
  useDeleteContentGuest: () => useDeleteContentGuest,
764
791
  useDeleteContentPublishSchedule: () => useDeleteContentPublishSchedule,
792
+ useDeleteDraftBooking: () => useDeleteDraftBooking,
765
793
  useDeleteListing: () => useDeleteListing,
766
794
  useDeleteListingQuestion: () => useDeleteListingQuestion,
767
795
  useDeleteListingSession: () => useDeleteListingSession,
@@ -777,6 +805,7 @@ __export(src_exports, {
777
805
  useDeleteThreadMessage: () => useDeleteThreadMessage,
778
806
  useDemoteGroupModerator: () => useDemoteGroupModerator,
779
807
  useDisableIntegration: () => useDisableIntegration,
808
+ useDraftBooking: () => useDraftBooking,
780
809
  useEnableIntegration: () => useEnableIntegration,
781
810
  useFollowAccount: () => useFollowAccount,
782
811
  useGetAccount: () => useGetAccount,
@@ -795,6 +824,13 @@ __export(src_exports, {
795
824
  useGetAdvertisement: () => useGetAdvertisement,
796
825
  useGetAllGroupEvents: () => useGetAllGroupEvents,
797
826
  useGetBenefits: () => useGetBenefits,
827
+ useGetBooking: () => useGetBooking,
828
+ useGetBookingPlace: () => useGetBookingPlace,
829
+ useGetBookingPlaceSpace: () => useGetBookingPlaceSpace,
830
+ useGetBookingPlaceSpaceSlots: () => useGetBookingPlaceSpaceSlots,
831
+ useGetBookingPlaces: () => useGetBookingPlaces,
832
+ useGetBookingPlacesSpaces: () => useGetBookingPlacesSpaces,
833
+ useGetBookings: () => useGetBookings,
798
834
  useGetChannel: () => useGetChannel,
799
835
  useGetChannelCollection: () => useGetChannelCollection,
800
836
  useGetChannelCollectionContents: () => useGetChannelCollectionContents,
@@ -1461,6 +1497,7 @@ var OrganizationModuleType = /* @__PURE__ */ ((OrganizationModuleType2) => {
1461
1497
  OrganizationModuleType2["subscriptions"] = "subscriptions";
1462
1498
  OrganizationModuleType2["invoices"] = "invoices";
1463
1499
  OrganizationModuleType2["announcements"] = "announcements";
1500
+ OrganizationModuleType2["bookings"] = "bookings";
1464
1501
  return OrganizationModuleType2;
1465
1502
  })(OrganizationModuleType || {});
1466
1503
  var PaymentIntegrationType = /* @__PURE__ */ ((PaymentIntegrationType2) => {
@@ -1469,6 +1506,16 @@ var PaymentIntegrationType = /* @__PURE__ */ ((PaymentIntegrationType2) => {
1469
1506
  PaymentIntegrationType2["braintree"] = "braintree";
1470
1507
  return PaymentIntegrationType2;
1471
1508
  })(PaymentIntegrationType || {});
1509
+ var DayOfWeek = /* @__PURE__ */ ((DayOfWeek2) => {
1510
+ DayOfWeek2["sunday"] = "sunday";
1511
+ DayOfWeek2["monday"] = "monday";
1512
+ DayOfWeek2["tuesday"] = "tuesday";
1513
+ DayOfWeek2["wednesday"] = "wednesday";
1514
+ DayOfWeek2["thursday"] = "thursday";
1515
+ DayOfWeek2["friday"] = "friday";
1516
+ DayOfWeek2["saturday"] = "saturday";
1517
+ return DayOfWeek2;
1518
+ })(DayOfWeek || {});
1472
1519
 
1473
1520
  // src/utilities/AppendInfiniteQuery.ts
1474
1521
  var import_immer = require("immer");
@@ -2466,6 +2513,309 @@ var useGetAdvertisement = (position, options = {}) => {
2466
2513
  );
2467
2514
  };
2468
2515
 
2516
+ // src/queries/bookings/useGetBookings.ts
2517
+ var BOOKINGS_QUERY_KEY = (past, placeId) => {
2518
+ const keys = ["BOOKINGS"];
2519
+ if (typeof past !== "undefined") {
2520
+ keys.push(past ? "PAST" : "UPCOMING");
2521
+ }
2522
+ if (placeId) {
2523
+ keys.push(placeId);
2524
+ }
2525
+ return keys;
2526
+ };
2527
+ var SET_BOOKINGS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
2528
+ client.setQueryData(
2529
+ [
2530
+ ...BOOKINGS_QUERY_KEY(...keyParams),
2531
+ ...GetBaseInfiniteQueryKeys(...baseKeys)
2532
+ ],
2533
+ setFirstPageData(response)
2534
+ );
2535
+ };
2536
+ var GetBookings = async ({
2537
+ pageParam,
2538
+ pageSize,
2539
+ orderBy,
2540
+ search,
2541
+ past,
2542
+ placeId,
2543
+ queryClient,
2544
+ clientApiParams,
2545
+ locale
2546
+ }) => {
2547
+ const clientApi = await GetClientAPI(clientApiParams);
2548
+ const { data } = await clientApi.get(`/bookings`, {
2549
+ params: {
2550
+ page: pageParam || void 0,
2551
+ pageSize: pageSize || void 0,
2552
+ orderBy: orderBy || void 0,
2553
+ search: search || void 0,
2554
+ past: past !== void 0 ? past : void 0,
2555
+ placeId: placeId || void 0
2556
+ }
2557
+ });
2558
+ if (queryClient && data.status === "ok") {
2559
+ CacheIndividualQueries(
2560
+ data,
2561
+ queryClient,
2562
+ (bookingId) => BOOKING_QUERY_KEY(bookingId),
2563
+ locale
2564
+ );
2565
+ }
2566
+ return data;
2567
+ };
2568
+ var useGetBookings = (past = false, placeId = "", params = {}, options = {}) => {
2569
+ return useConnectedInfiniteQuery(
2570
+ BOOKINGS_QUERY_KEY(past, placeId),
2571
+ (params2) => GetBookings({ past, placeId, ...params2 }),
2572
+ params,
2573
+ options
2574
+ );
2575
+ };
2576
+
2577
+ // src/queries/bookings/useGetBooking.ts
2578
+ var BOOKING_QUERY_KEY = (bookingId) => [
2579
+ ...BOOKINGS_QUERY_KEY(),
2580
+ bookingId
2581
+ ];
2582
+ var SET_BOOKING_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
2583
+ client.setQueryData(
2584
+ [
2585
+ ...BOOKING_QUERY_KEY(...keyParams),
2586
+ ...GetBaseSingleQueryKeys(...baseKeys)
2587
+ ],
2588
+ response
2589
+ );
2590
+ };
2591
+ var GetBooking = async ({
2592
+ bookingId,
2593
+ clientApiParams
2594
+ }) => {
2595
+ const clientApi = await GetClientAPI(clientApiParams);
2596
+ const { data } = await clientApi.get(`/bookings/${bookingId}`);
2597
+ return data;
2598
+ };
2599
+ var useGetBooking = (bookingId = "", options = {}) => {
2600
+ return useConnectedSingleQuery(
2601
+ BOOKING_QUERY_KEY(bookingId),
2602
+ (_params) => GetBooking({ bookingId, ..._params }),
2603
+ {
2604
+ ...options,
2605
+ enabled: !!bookingId && (options?.enabled ?? true)
2606
+ }
2607
+ );
2608
+ };
2609
+
2610
+ // src/queries/bookings/useGetBookingPlaces.ts
2611
+ var BOOKING_PLACES_QUERY_KEY = () => ["BOOKING_PLACES"];
2612
+ var SET_BOOKING_PLACES_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
2613
+ client.setQueryData(
2614
+ [
2615
+ ...BOOKING_PLACES_QUERY_KEY(...keyParams),
2616
+ ...GetBaseInfiniteQueryKeys(...baseKeys)
2617
+ ],
2618
+ setFirstPageData(response)
2619
+ );
2620
+ };
2621
+ var GetBookingPlaces = async ({
2622
+ pageParam,
2623
+ pageSize,
2624
+ orderBy,
2625
+ search,
2626
+ queryClient,
2627
+ clientApiParams,
2628
+ locale
2629
+ }) => {
2630
+ const clientApi = await GetClientAPI(clientApiParams);
2631
+ const { data } = await clientApi.get(`/bookings/places`, {
2632
+ params: {
2633
+ page: pageParam || void 0,
2634
+ pageSize: pageSize || void 0,
2635
+ orderBy: orderBy || void 0,
2636
+ search: search || void 0
2637
+ }
2638
+ });
2639
+ if (queryClient && data.status === "ok") {
2640
+ CacheIndividualQueries(
2641
+ data,
2642
+ queryClient,
2643
+ (bookingPlaceId) => BOOKING_PLACE_QUERY_KEY(bookingPlaceId),
2644
+ locale
2645
+ );
2646
+ }
2647
+ return data;
2648
+ };
2649
+ var useGetBookingPlaces = (params = {}, options = {}) => {
2650
+ return useConnectedInfiniteQuery(
2651
+ BOOKING_PLACES_QUERY_KEY(),
2652
+ (params2) => GetBookingPlaces({ ...params2 }),
2653
+ params,
2654
+ options
2655
+ );
2656
+ };
2657
+
2658
+ // src/queries/bookings/useGetBookingPlace.ts
2659
+ var BOOKING_PLACE_QUERY_KEY = (placeId) => [
2660
+ ...BOOKING_PLACES_QUERY_KEY(),
2661
+ placeId
2662
+ ];
2663
+ var SET_BOOKING_PLACE_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
2664
+ client.setQueryData(
2665
+ [
2666
+ ...BOOKING_PLACE_QUERY_KEY(...keyParams),
2667
+ ...GetBaseSingleQueryKeys(...baseKeys)
2668
+ ],
2669
+ response
2670
+ );
2671
+ };
2672
+ var GetBookingPlace = async ({
2673
+ placeId,
2674
+ clientApiParams
2675
+ }) => {
2676
+ const clientApi = await GetClientAPI(clientApiParams);
2677
+ const { data } = await clientApi.get(`/bookings/places/${placeId}`);
2678
+ return data;
2679
+ };
2680
+ var useGetBookingPlace = (placeId = "", options = {}) => {
2681
+ return useConnectedSingleQuery(
2682
+ BOOKING_PLACE_QUERY_KEY(placeId),
2683
+ (_params) => GetBookingPlace({ placeId, ..._params }),
2684
+ {
2685
+ ...options,
2686
+ enabled: !!placeId && (options?.enabled ?? true)
2687
+ }
2688
+ );
2689
+ };
2690
+
2691
+ // src/queries/bookings/useGetBookingPlaceSpace.ts
2692
+ var BOOKING_PLACE_SPACE_QUERY_KEY = (placeId, spaceId) => [...BOOKING_PLACES_QUERY_KEY(), placeId, "SPACE", spaceId];
2693
+ var SET_BOOKING_PLACE_SPACE_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
2694
+ client.setQueryData(
2695
+ [
2696
+ ...BOOKING_PLACE_SPACE_QUERY_KEY(...keyParams),
2697
+ ...GetBaseSingleQueryKeys(...baseKeys)
2698
+ ],
2699
+ response
2700
+ );
2701
+ };
2702
+ var GetBookingPlaceSpace = async ({
2703
+ placeId,
2704
+ spaceId,
2705
+ clientApiParams
2706
+ }) => {
2707
+ const clientApi = await GetClientAPI(clientApiParams);
2708
+ const { data } = await clientApi.get(
2709
+ `/bookings/places/${placeId}/spaces/${spaceId}`
2710
+ );
2711
+ return data;
2712
+ };
2713
+ var useGetBookingPlaceSpace = (placeId = "", spaceId = "", options = {}) => {
2714
+ return useConnectedSingleQuery(
2715
+ BOOKING_PLACE_SPACE_QUERY_KEY(placeId, spaceId),
2716
+ (_params) => GetBookingPlaceSpace({ placeId, spaceId, ..._params }),
2717
+ {
2718
+ ...options,
2719
+ enabled: !!placeId && !!spaceId && (options?.enabled ?? true)
2720
+ }
2721
+ );
2722
+ };
2723
+
2724
+ // src/queries/bookings/useGetBookingPlaceSpaces.ts
2725
+ var BOOKING_PLACE_SPACES_QUERY_KEY = (bookingId) => [
2726
+ ...BOOKING_PLACE_QUERY_KEY(bookingId),
2727
+ "SPACES"
2728
+ ];
2729
+ var SET_BOOKING_PLACE_SPACES_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
2730
+ client.setQueryData(
2731
+ [
2732
+ ...BOOKING_PLACE_SPACES_QUERY_KEY(...keyParams),
2733
+ ...GetBaseInfiniteQueryKeys(...baseKeys)
2734
+ ],
2735
+ setFirstPageData(response)
2736
+ );
2737
+ };
2738
+ var GetBookingPlacesSpaces = async ({
2739
+ bookingId,
2740
+ pageParam,
2741
+ pageSize,
2742
+ orderBy,
2743
+ search,
2744
+ queryClient,
2745
+ clientApiParams,
2746
+ locale
2747
+ }) => {
2748
+ const clientApi = await GetClientAPI(clientApiParams);
2749
+ const { data } = await clientApi.get(`/bookings/places/${bookingId}/spaces`, {
2750
+ params: {
2751
+ page: pageParam || void 0,
2752
+ pageSize: pageSize || void 0,
2753
+ orderBy: orderBy || void 0,
2754
+ search: search || void 0
2755
+ }
2756
+ });
2757
+ if (queryClient && data.status === "ok") {
2758
+ CacheIndividualQueries(
2759
+ data,
2760
+ queryClient,
2761
+ (spaceId) => BOOKING_PLACE_SPACE_QUERY_KEY(bookingId, spaceId),
2762
+ locale
2763
+ );
2764
+ }
2765
+ return data;
2766
+ };
2767
+ var useGetBookingPlacesSpaces = (bookingId = "", params = {}, options = {}) => {
2768
+ return useConnectedInfiniteQuery(
2769
+ BOOKING_PLACE_SPACES_QUERY_KEY(bookingId),
2770
+ (params2) => GetBookingPlacesSpaces({ bookingId, ...params2 }),
2771
+ params,
2772
+ {
2773
+ ...options,
2774
+ enabled: !!bookingId && (options?.enabled ?? true)
2775
+ }
2776
+ );
2777
+ };
2778
+
2779
+ // src/queries/bookings/useGetBookingPlaceSpaceSlots.ts
2780
+ var BOOKING_PLACE_SPACE_SLOTS_QUERY_KEY = (placeId, spaceId, firstDayOfMonth) => [
2781
+ ...BOOKING_PLACES_QUERY_KEY(),
2782
+ placeId,
2783
+ "SPACE",
2784
+ spaceId,
2785
+ "SLOTS",
2786
+ firstDayOfMonth
2787
+ ];
2788
+ var GetBookingPlaceSpaceSlots = async ({
2789
+ placeId,
2790
+ spaceId,
2791
+ firstDayOfMonth,
2792
+ clientApiParams
2793
+ }) => {
2794
+ const clientApi = await GetClientAPI(clientApiParams);
2795
+ const { data } = await clientApi.get(
2796
+ `/bookings/places/${placeId}/spaces/${spaceId}/slots`,
2797
+ {
2798
+ params: { firstDayOfMonth }
2799
+ }
2800
+ );
2801
+ return data;
2802
+ };
2803
+ var useGetBookingPlaceSpaceSlots = (placeId = "", spaceId = "", firstDayOfMonth, options = {}) => {
2804
+ return useConnectedSingleQuery(
2805
+ BOOKING_PLACE_SPACE_SLOTS_QUERY_KEY(placeId, spaceId, firstDayOfMonth),
2806
+ (_params) => GetBookingPlaceSpaceSlots({
2807
+ placeId,
2808
+ spaceId,
2809
+ firstDayOfMonth,
2810
+ ..._params
2811
+ }),
2812
+ {
2813
+ ...options,
2814
+ enabled: !!placeId && !!spaceId && (options?.enabled ?? true)
2815
+ }
2816
+ );
2817
+ };
2818
+
2469
2819
  // src/queries/benefits/useGetBenefits.ts
2470
2820
  var BENEFITS_QUERY_KEY = () => ["BENEFITS"];
2471
2821
  var SET_BENEFITS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
@@ -9131,6 +9481,94 @@ var useUnlikeActivity = (options = {}) => {
9131
9481
  return useConnectedMutation_default(UnlikeActivity, options);
9132
9482
  };
9133
9483
 
9484
+ // src/mutations/bookings/useCancelBooking.ts
9485
+ var CancelBooking = async ({
9486
+ bookingId,
9487
+ clientApiParams,
9488
+ queryClient
9489
+ }) => {
9490
+ const clientApi = await GetClientAPI(clientApiParams);
9491
+ const { data } = await clientApi.delete(
9492
+ `/bookings/${bookingId}`
9493
+ );
9494
+ if (queryClient && data.status === "ok") {
9495
+ queryClient.setQueryData(BOOKING_QUERY_KEY(bookingId), data);
9496
+ queryClient.invalidateQueries({
9497
+ queryKey: BOOKINGS_QUERY_KEY()
9498
+ });
9499
+ }
9500
+ return data;
9501
+ };
9502
+ var useCancelBooking = (options = {}) => {
9503
+ return useConnectedMutation_default(CancelBooking, options);
9504
+ };
9505
+
9506
+ // src/mutations/bookings/useConfirmBooking.ts
9507
+ var ConfirmBooking = async ({
9508
+ bookingId,
9509
+ clientApiParams,
9510
+ queryClient
9511
+ }) => {
9512
+ const clientApi = await GetClientAPI(clientApiParams);
9513
+ const { data } = await clientApi.post(
9514
+ `/bookings/${bookingId}`
9515
+ );
9516
+ if (queryClient && data.status === "ok") {
9517
+ queryClient.setQueryData(BOOKING_QUERY_KEY(bookingId), data);
9518
+ queryClient.invalidateQueries({
9519
+ queryKey: BOOKINGS_QUERY_KEY()
9520
+ });
9521
+ }
9522
+ return data;
9523
+ };
9524
+ var useConfirmBooking = (options = {}) => {
9525
+ return useConnectedMutation_default(ConfirmBooking, options);
9526
+ };
9527
+
9528
+ // src/mutations/bookings/useDraftBooking.ts
9529
+ var DraftBooking = async ({
9530
+ placeId,
9531
+ spaceId,
9532
+ day,
9533
+ time,
9534
+ queryClient,
9535
+ clientApiParams
9536
+ }) => {
9537
+ const clientApi = await GetClientAPI(clientApiParams);
9538
+ const { data } = await clientApi.post(
9539
+ `/bookings/places/${placeId}/spaces/${spaceId}/slots`,
9540
+ { day, time }
9541
+ );
9542
+ if (data.status === "ok" && queryClient) {
9543
+ queryClient.invalidateQueries({
9544
+ queryKey: BOOKINGS_QUERY_KEY()
9545
+ });
9546
+ }
9547
+ return data;
9548
+ };
9549
+ var useDraftBooking = (options = {}) => {
9550
+ return useConnectedMutation_default(DraftBooking, options);
9551
+ };
9552
+
9553
+ // src/mutations/bookings/useDeleteDraftBooking.ts
9554
+ var DeleteDraftBooking = async ({
9555
+ bookingId,
9556
+ clientApiParams,
9557
+ queryClient
9558
+ }) => {
9559
+ const clientApi = await GetClientAPI(clientApiParams);
9560
+ const { data } = await clientApi.delete(
9561
+ `/bookings/${bookingId}`
9562
+ );
9563
+ if (queryClient && data.status === "ok") {
9564
+ queryClient.removeQueries({ queryKey: BOOKING_QUERY_KEY(bookingId) });
9565
+ }
9566
+ return data;
9567
+ };
9568
+ var useDeleteDraftBooking = (options = {}) => {
9569
+ return useConnectedMutation_default(DeleteDraftBooking, options);
9570
+ };
9571
+
9134
9572
  // src/mutations/channels/contents/useLikeContent.ts
9135
9573
  var LikeContent = async ({
9136
9574
  channelId,
@@ -12617,6 +13055,13 @@ var useEnableIntegration = (options = {}) => {
12617
13055
  AdvertisementType,
12618
13056
  AppendInfiniteQuery,
12619
13057
  BENEFITS_QUERY_KEY,
13058
+ BOOKINGS_QUERY_KEY,
13059
+ BOOKING_PLACES_QUERY_KEY,
13060
+ BOOKING_PLACE_QUERY_KEY,
13061
+ BOOKING_PLACE_SPACES_QUERY_KEY,
13062
+ BOOKING_PLACE_SPACE_QUERY_KEY,
13063
+ BOOKING_PLACE_SPACE_SLOTS_QUERY_KEY,
13064
+ BOOKING_QUERY_KEY,
12620
13065
  BlockIntegration,
12621
13066
  CHANNELS_QUERY_KEY,
12622
13067
  CHANNEL_COLLECTIONS_QUERY_KEY,
@@ -12634,6 +13079,7 @@ var useEnableIntegration = (options = {}) => {
12634
13079
  CONTENT_QUERY_KEY,
12635
13080
  CUSTOM_ERROR_CODES,
12636
13081
  CacheIndividualQueries,
13082
+ CancelBooking,
12637
13083
  CancelGroupInvitation,
12638
13084
  CancelGroupRequest,
12639
13085
  CancelPass,
@@ -12641,6 +13087,7 @@ var useEnableIntegration = (options = {}) => {
12641
13087
  CapturePaymentIntent,
12642
13088
  CheckinListingAttendeePass,
12643
13089
  CompleteEventActivation,
13090
+ ConfirmBooking,
12644
13091
  ConnectedXMProvider,
12645
13092
  ContentGuestType,
12646
13093
  CouponType,
@@ -12668,6 +13115,7 @@ var useEnableIntegration = (options = {}) => {
12668
13115
  CreateThread,
12669
13116
  CreateThreadMessage,
12670
13117
  Currency,
13118
+ DayOfWeek,
12671
13119
  DeactivateGroup,
12672
13120
  DefaultAuthAction,
12673
13121
  DeleteActivity,
@@ -12677,6 +13125,7 @@ var useEnableIntegration = (options = {}) => {
12677
13125
  DeleteChannelSubscriber,
12678
13126
  DeleteContentGuest,
12679
13127
  DeleteContentPublishSchedule,
13128
+ DeleteDraftBooking,
12680
13129
  DeleteListing,
12681
13130
  DeleteListingQuestion,
12682
13131
  DeleteListingSession,
@@ -12692,6 +13141,7 @@ var useEnableIntegration = (options = {}) => {
12692
13141
  DeleteThreadMessage,
12693
13142
  DemoteGroupModerator,
12694
13143
  DisableIntegration,
13144
+ DraftBooking,
12695
13145
  ERR_FEATURE_NOT_AVAILABLE,
12696
13146
  ERR_INTEGRATION_PERMISSION_DENIED,
12697
13147
  ERR_KNOWN_ERROR,
@@ -12760,6 +13210,13 @@ var useEnableIntegration = (options = {}) => {
12760
13210
  GetBaseInfiniteQueryKeys,
12761
13211
  GetBaseSingleQueryKeys,
12762
13212
  GetBenefits,
13213
+ GetBooking,
13214
+ GetBookingPlace,
13215
+ GetBookingPlaceSpace,
13216
+ GetBookingPlaceSpaceSlots,
13217
+ GetBookingPlaces,
13218
+ GetBookingPlacesSpaces,
13219
+ GetBookings,
12763
13220
  GetChannel,
12764
13221
  GetChannelCollection,
12765
13222
  GetChannelCollectionContents,
@@ -13059,6 +13516,12 @@ var useEnableIntegration = (options = {}) => {
13059
13516
  SET_ADVERTISEMENT_QUERY_DATA,
13060
13517
  SET_ALL_GROUP_EVENTS_QUERY_DATA,
13061
13518
  SET_BENEFITS_QUERY_DATA,
13519
+ SET_BOOKINGS_QUERY_DATA,
13520
+ SET_BOOKING_PLACES_QUERY_DATA,
13521
+ SET_BOOKING_PLACE_QUERY_DATA,
13522
+ SET_BOOKING_PLACE_SPACES_QUERY_DATA,
13523
+ SET_BOOKING_PLACE_SPACE_QUERY_DATA,
13524
+ SET_BOOKING_QUERY_DATA,
13062
13525
  SET_CHANNELS_QUERY_DATA,
13063
13526
  SET_CHANNEL_COLLECTIONS_QUERY_DATA,
13064
13527
  SET_CHANNEL_COLLECTION_QUERY_DATA,
@@ -13272,6 +13735,7 @@ var useEnableIntegration = (options = {}) => {
13272
13735
  useAddThreadMessageReaction,
13273
13736
  useAddThreadMessageReply,
13274
13737
  useBlockIntegration,
13738
+ useCancelBooking,
13275
13739
  useCancelGroupInvitation,
13276
13740
  useCancelGroupRequest,
13277
13741
  useCancelPass,
@@ -13279,6 +13743,7 @@ var useEnableIntegration = (options = {}) => {
13279
13743
  useCapturePaymentIntent,
13280
13744
  useCheckinListingAttendeePass,
13281
13745
  useCompleteEventActivation,
13746
+ useConfirmBooking,
13282
13747
  useConnectedInfiniteQuery,
13283
13748
  useConnectedMutation,
13284
13749
  useConnectedSingleQuery,
@@ -13314,6 +13779,7 @@ var useEnableIntegration = (options = {}) => {
13314
13779
  useDeleteChannelSubscriber,
13315
13780
  useDeleteContentGuest,
13316
13781
  useDeleteContentPublishSchedule,
13782
+ useDeleteDraftBooking,
13317
13783
  useDeleteListing,
13318
13784
  useDeleteListingQuestion,
13319
13785
  useDeleteListingSession,
@@ -13329,6 +13795,7 @@ var useEnableIntegration = (options = {}) => {
13329
13795
  useDeleteThreadMessage,
13330
13796
  useDemoteGroupModerator,
13331
13797
  useDisableIntegration,
13798
+ useDraftBooking,
13332
13799
  useEnableIntegration,
13333
13800
  useFollowAccount,
13334
13801
  useGetAccount,
@@ -13347,6 +13814,13 @@ var useEnableIntegration = (options = {}) => {
13347
13814
  useGetAdvertisement,
13348
13815
  useGetAllGroupEvents,
13349
13816
  useGetBenefits,
13817
+ useGetBooking,
13818
+ useGetBookingPlace,
13819
+ useGetBookingPlaceSpace,
13820
+ useGetBookingPlaceSpaceSlots,
13821
+ useGetBookingPlaces,
13822
+ useGetBookingPlacesSpaces,
13823
+ useGetBookings,
13350
13824
  useGetChannel,
13351
13825
  useGetChannelCollection,
13352
13826
  useGetChannelCollectionContents,