@connectedxm/client 0.4.8 → 0.4.10

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
@@ -40,6 +40,7 @@ __export(src_exports, {
40
40
  ACTIVITIES_QUERY_KEY: () => ACTIVITIES_QUERY_KEY,
41
41
  ACTIVITY_COMMENTS_QUERY_KEY: () => ACTIVITY_COMMENTS_QUERY_KEY,
42
42
  ACTIVITY_QUERY_KEY: () => ACTIVITY_QUERY_KEY,
43
+ ADD_SELF_RELATIONSHIP: () => ADD_SELF_RELATIONSHIP,
43
44
  ADVERTISEMENT_QUERY_KEY: () => ADVERTISEMENT_QUERY_KEY,
44
45
  AcceptCommunityInvitation: () => AcceptCommunityInvitation,
45
46
  AcceptCommunityRequest: () => AcceptCommunityRequest,
@@ -92,6 +93,7 @@ __export(src_exports, {
92
93
  CreateEventLead: () => CreateEventLead,
93
94
  CreateListing: () => CreateListing,
94
95
  CreateListingAnnouncement: () => CreateListingAnnouncement,
96
+ CreateListingQuestion: () => CreateListingQuestion,
95
97
  CreateListingSession: () => CreateListingSession,
96
98
  CreateListingSpeaker: () => CreateListingSpeaker,
97
99
  CreateSelfChatChannel: () => CreateSelfChatChannel,
@@ -104,6 +106,7 @@ __export(src_exports, {
104
106
  DeleteActivity: () => DeleteActivity,
105
107
  DeleteCommunityInvitation: () => DeleteCommunityInvitation,
106
108
  DeleteListing: () => DeleteListing,
109
+ DeleteListingQuestion: () => DeleteListingQuestion,
107
110
  DeleteListingSession: () => DeleteListingSession,
108
111
  DeleteListingSpeaker: () => DeleteListingSpeaker,
109
112
  DeleteReshare: () => DeleteReshare,
@@ -208,6 +211,7 @@ __export(src_exports, {
208
211
  GetSelfEventListing: () => GetSelfEventListing,
209
212
  GetSelfEventListingAnnouncement: () => GetSelfEventListingAnnouncement,
210
213
  GetSelfEventListingAnnouncements: () => GetSelfEventListingAnnouncements,
214
+ GetSelfEventListingQuestions: () => GetSelfEventListingQuestions,
211
215
  GetSelfEventListingRegistration: () => GetSelfEventListingRegistration,
212
216
  GetSelfEventListingRegistrations: () => GetSelfEventListingRegistrations,
213
217
  GetSelfEventListings: () => GetSelfEventListings,
@@ -228,6 +232,7 @@ __export(src_exports, {
228
232
  GetSelfPushDevice: () => GetSelfPushDevice,
229
233
  GetSelfPushDevices: () => GetSelfPushDevices,
230
234
  GetSelfRecommendations: () => GetSelfRecommendations,
235
+ GetSelfRelationships: () => GetSelfRelationships,
231
236
  GetSelfSubcription: () => GetSelfSubcription,
232
237
  GetSelfSubscriptionPayments: () => GetSelfSubscriptionPayments,
233
238
  GetSelfSubscriptions: () => GetSelfSubscriptions,
@@ -250,6 +255,7 @@ __export(src_exports, {
250
255
  LISTING_ANNOUNCEMENTS_QUERY_KEY: () => LISTING_ANNOUNCEMENTS_QUERY_KEY,
251
256
  LISTING_ANNOUNCEMENT_QUERY_KEY: () => LISTING_ANNOUNCEMENT_QUERY_KEY,
252
257
  LISTING_QUERY_KEY: () => LISTING_QUERY_KEY,
258
+ LISTING_QUESTIONS_QUERY_KEY: () => LISTING_QUESTIONS_QUERY_KEY,
253
259
  LISTING_REGISTRATIONS_QUERY_KEY: () => LISTING_REGISTRATIONS_QUERY_KEY,
254
260
  LISTING_REGISTRATION_QUERY_KEY: () => LISTING_REGISTRATION_QUERY_KEY,
255
261
  LeaveCommunity: () => LeaveCommunity,
@@ -265,6 +271,7 @@ __export(src_exports, {
265
271
  PromoteCommunityMember: () => PromoteCommunityMember,
266
272
  PushDeviceAppType: () => PushDeviceAppType,
267
273
  PushService: () => PushService,
274
+ REMOVE_SELF_RELATIONSHIP: () => REMOVE_SELF_RELATIONSHIP,
268
275
  RegisterCancelledEventRegistration: () => RegisterCancelledEventRegistration,
269
276
  RegistrationQuestionType: () => RegistrationQuestionType,
270
277
  RegistrationStatus: () => RegistrationStatus,
@@ -308,6 +315,7 @@ __export(src_exports, {
308
315
  SELF_PUSH_DEVICE_QUERY_KEY: () => SELF_PUSH_DEVICE_QUERY_KEY,
309
316
  SELF_QUERY_KEY: () => SELF_QUERY_KEY,
310
317
  SELF_RECOMMENDATIONS_QUERY_KEY: () => SELF_RECOMMENDATIONS_QUERY_KEY,
318
+ SELF_RELATIONSHIPS_QUERY_KEY: () => SELF_RELATIONSHIPS_QUERY_KEY,
311
319
  SELF_SUBSCRIPTIONS_QUERY_KEY: () => SELF_SUBSCRIPTIONS_QUERY_KEY,
312
320
  SELF_SUBSCRIPTION_PAYMENTS_QUERY_KEY: () => SELF_SUBSCRIPTION_PAYMENTS_QUERY_KEY,
313
321
  SELF_SUBSCRIPTION_QUERY_KEY: () => SELF_SUBSCRIPTION_QUERY_KEY,
@@ -403,6 +411,7 @@ __export(src_exports, {
403
411
  UnlikeActivity: () => UnlikeActivity,
404
412
  UpdateCommunity: () => UpdateCommunity,
405
413
  UpdateListing: () => UpdateListing,
414
+ UpdateListingQuestion: () => UpdateListingQuestion,
406
415
  UpdateListingSession: () => UpdateListingSession,
407
416
  UpdateListingSpeaker: () => UpdateListingSpeaker,
408
417
  UpdateSelf: () => UpdateSelf,
@@ -451,6 +460,7 @@ __export(src_exports, {
451
460
  isTypeTicket: () => isTypeTicket,
452
461
  isTypeTrack: () => isTypeTrack,
453
462
  isTypeTransfer: () => isTypeTransfer,
463
+ isUUID: () => isUUID,
454
464
  setFirstPageData: () => setFirstPageData,
455
465
  useAcceptCommunityInvitation: () => useAcceptCommunityInvitation,
456
466
  useAcceptCommunityRequest: () => useAcceptCommunityRequest,
@@ -479,6 +489,7 @@ __export(src_exports, {
479
489
  useCreateEventLead: () => useCreateEventLead,
480
490
  useCreateListing: () => useCreateListing,
481
491
  useCreateListingAnnouncement: () => useCreateListingAnnouncement,
492
+ useCreateListingQuestion: () => useCreateListingQuestion,
482
493
  useCreateListingSession: () => useCreateListingSession,
483
494
  useCreateListingSpeaker: () => useCreateListingSpeaker,
484
495
  useCreateSelfChatChannel: () => useCreateSelfChatChannel,
@@ -490,6 +501,7 @@ __export(src_exports, {
490
501
  useDeleteActivity: () => useDeleteActivity,
491
502
  useDeleteCommunityInvitation: () => useDeleteCommunityInvitation,
492
503
  useDeleteListing: () => useDeleteListing,
504
+ useDeleteListingQuestion: () => useDeleteListingQuestion,
493
505
  useDeleteListingSession: () => useDeleteListingSession,
494
506
  useDeleteListingSpeaker: () => useDeleteListingSpeaker,
495
507
  useDeleteReshare: () => useDeleteReshare,
@@ -570,6 +582,7 @@ __export(src_exports, {
570
582
  useGetSelfEventListing: () => useGetSelfEventListing,
571
583
  useGetSelfEventListingAnnouncement: () => useGetSelfEventListingAnnouncement,
572
584
  useGetSelfEventListingAnnouncements: () => useGetSelfEventListingAnnouncements,
585
+ useGetSelfEventListingQuestions: () => useGetSelfEventListingQuestions,
573
586
  useGetSelfEventListingRegistration: () => useGetSelfEventListingRegistration,
574
587
  useGetSelfEventListings: () => useGetSelfEventListings,
575
588
  useGetSelfEventListingsRegistrations: () => useGetSelfEventListingsRegistrations,
@@ -590,6 +603,7 @@ __export(src_exports, {
590
603
  useGetSelfPushDevice: () => useGetSelfPushDevice,
591
604
  useGetSelfPushDevices: () => useGetSelfPushDevices,
592
605
  useGetSelfRecommendations: () => useGetSelfRecommendations,
606
+ useGetSelfRelationships: () => useGetSelfRelationships,
593
607
  useGetSelfSubcription: () => useGetSelfSubcription,
594
608
  useGetSelfSubscriptionPayments: () => useGetSelfSubscriptionPayments,
595
609
  useGetSelfSubscriptions: () => useGetSelfSubscriptions,
@@ -600,6 +614,10 @@ __export(src_exports, {
600
614
  useGetSeriesList: () => useGetSeriesList,
601
615
  useGetSponsor: () => useGetSponsor,
602
616
  useGetSponsors: () => useGetSponsors,
617
+ useIsAccountFollowing: () => useIsAccountFollowing,
618
+ useIsChannelSubscribed: () => useIsChannelSubscribed,
619
+ useIsCommunityMember: () => useIsCommunityMember,
620
+ useIsEventRegistered: () => useIsEventRegistered,
603
621
  useJoinCommunity: () => useJoinCommunity,
604
622
  useLeaveCommunity: () => useLeaveCommunity,
605
623
  useLeaveSelfChatChannel: () => useLeaveSelfChatChannel,
@@ -627,6 +645,7 @@ __export(src_exports, {
627
645
  useUnlikeActivity: () => useUnlikeActivity,
628
646
  useUpdateCommunity: () => useUpdateCommunity,
629
647
  useUpdateListing: () => useUpdateListing,
648
+ useUpdateListingQuestion: () => useUpdateListingQuestion,
630
649
  useUpdateListingSession: () => useUpdateListingSession,
631
650
  useUpdateListingSpeaker: () => useUpdateListingSpeaker,
632
651
  useUpdateSelf: () => useUpdateSelf,
@@ -649,9 +668,20 @@ var ConnectedXMClientContext = import_react.default.createContext(
649
668
  var ConnectedXMProvider = ({
650
669
  queryClient,
651
670
  children,
671
+ getToken,
652
672
  ...state
653
673
  }) => {
674
+ const [authenticated, setAuthenticated] = import_react.default.useState(false);
654
675
  const [ssr, setSSR] = import_react.default.useState(true);
676
+ import_react.default.useEffect(() => {
677
+ if (!authenticated) {
678
+ getToken().then((token) => {
679
+ if (token) {
680
+ setAuthenticated(true);
681
+ }
682
+ });
683
+ }
684
+ }, [authenticated, getToken]);
655
685
  import_react.default.useEffect(() => {
656
686
  setSSR(false);
657
687
  }, []);
@@ -661,6 +691,9 @@ var ConnectedXMProvider = ({
661
691
  {
662
692
  value: {
663
693
  ...state,
694
+ getToken,
695
+ authenticated,
696
+ setAuthenticated,
664
697
  queryClient
665
698
  }
666
699
  },
@@ -672,6 +705,9 @@ var ConnectedXMProvider = ({
672
705
  {
673
706
  value: {
674
707
  ...state,
708
+ getToken,
709
+ authenticated,
710
+ setAuthenticated,
675
711
  queryClient
676
712
  }
677
713
  },
@@ -691,6 +727,55 @@ var useConnectedXM = () => {
691
727
  return context;
692
728
  };
693
729
 
730
+ // src/hooks/useIsAccountFollowing.ts
731
+ var useIsAccountFollowing = (accountId) => {
732
+ const { data: relationships } = useGetSelfRelationships();
733
+ if (!accountId)
734
+ return false;
735
+ if (!isUUID(accountId)) {
736
+ throw new Error("Invalid accountId. Did you pass in the username?");
737
+ }
738
+ return relationships?.data.accounts[accountId] || false;
739
+ };
740
+
741
+ // src/hooks/useIsCommunityMember.ts
742
+ var useIsCommunityMember = (communityId, role) => {
743
+ const { data: relationships } = useGetSelfRelationships();
744
+ if (!communityId)
745
+ return false;
746
+ if (!isUUID(communityId)) {
747
+ throw new Error("Invalid communityId. Did you pass in the slug?");
748
+ }
749
+ const _role = relationships?.data.communities[communityId];
750
+ if (role) {
751
+ return _role === role;
752
+ } else {
753
+ return _role === "member" || _role === "moderator";
754
+ }
755
+ };
756
+
757
+ // src/hooks/useIsEventRegistered.ts
758
+ var useIsEventRegistered = (eventId) => {
759
+ const { data: relationships } = useGetSelfRelationships();
760
+ if (!eventId)
761
+ return false;
762
+ if (!isUUID(eventId)) {
763
+ throw new Error("Invalid eventId. Did you pass in the slug?");
764
+ }
765
+ return relationships?.data.events[eventId] || false;
766
+ };
767
+
768
+ // src/hooks/useIsChannelSubscribed.ts
769
+ var useIsChannelSubscribed = (channelId) => {
770
+ const { data: relationships } = useGetSelfRelationships();
771
+ if (!channelId)
772
+ return false;
773
+ if (!isUUID(channelId)) {
774
+ throw new Error("Invalid channelId. Did you pass in the slug?");
775
+ }
776
+ return relationships?.data.channels[channelId] || false;
777
+ };
778
+
694
779
  // src/interfaces.ts
695
780
  var RegistrationStatus = /* @__PURE__ */ ((RegistrationStatus2) => {
696
781
  RegistrationStatus2["registered"] = "registered";
@@ -1115,6 +1200,12 @@ var CacheIndividualQueries = (page, queryClient, queryKeyFn, locale = "en", item
1115
1200
  });
1116
1201
  };
1117
1202
 
1203
+ // src/utilities/IsUUID.ts
1204
+ var isUUID = (id) => {
1205
+ const uuidRegex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$/;
1206
+ return uuidRegex.test(id);
1207
+ };
1208
+
1118
1209
  // src/queries/useConnectedInfiniteQuery.ts
1119
1210
  var import_react_query3 = require("@tanstack/react-query");
1120
1211
  var GetBaseInfiniteQueryKeys = (locale, search = "") => {
@@ -2562,7 +2653,7 @@ var useGetContentActivities = (contentId = "", params = {}, options = {}) => {
2562
2653
  params,
2563
2654
  {
2564
2655
  ...options,
2565
- enabled: !!contentId && (options.enabled ?? true)
2656
+ enabled: !!contentId && (options?.enabled ?? true)
2566
2657
  }
2567
2658
  );
2568
2659
  };
@@ -2643,7 +2734,7 @@ var useGetContentType = (contentTypeId = "", options = {}) => {
2643
2734
  (params) => GetContentType({ contentTypeId: contentTypeId || "", ...params }),
2644
2735
  {
2645
2736
  ...options,
2646
- enabled: !!contentTypeId && (options.enabled ?? true)
2737
+ enabled: !!contentTypeId && (options?.enabled ?? true)
2647
2738
  }
2648
2739
  );
2649
2740
  };
@@ -2698,7 +2789,7 @@ var useGetContentTypeContents = (contentTypeId = "", params = {}, options = {})
2698
2789
  params,
2699
2790
  {
2700
2791
  ...options,
2701
- enabled: !!contentTypeId && (options.enabled ?? true)
2792
+ enabled: !!contentTypeId && (options?.enabled ?? true)
2702
2793
  }
2703
2794
  );
2704
2795
  };
@@ -2898,7 +2989,7 @@ var useGetEventFaqs = (eventId = "", sectionId = "", params = {}, options = {})
2898
2989
  params,
2899
2990
  {
2900
2991
  ...options,
2901
- enabled: !!eventId && !!sectionId && (options.enabled ?? true)
2992
+ enabled: !!eventId && !!sectionId && (options?.enabled ?? true)
2902
2993
  }
2903
2994
  );
2904
2995
  };
@@ -3260,7 +3351,7 @@ var useGetEventSpeakers = (eventId = "", params = {}, options = {}) => {
3260
3351
  params,
3261
3352
  {
3262
3353
  ...options,
3263
- enabled: !!eventId && (options.enabled ?? true)
3354
+ enabled: !!eventId && (options?.enabled ?? true)
3264
3355
  }
3265
3356
  );
3266
3357
  };
@@ -3392,7 +3483,7 @@ var useGetEventSponsors = (eventId = "", params = {}, options = {}) => {
3392
3483
  params,
3393
3484
  {
3394
3485
  ...options,
3395
- enabled: !!eventId && (options.enabled ?? true)
3486
+ enabled: !!eventId && (options?.enabled ?? true)
3396
3487
  }
3397
3488
  );
3398
3489
  };
@@ -3512,7 +3603,7 @@ var useGetOrganizationPage = (type, options = {}) => {
3512
3603
  (params) => GetOrganizationPage({ type, ...params }),
3513
3604
  {
3514
3605
  ...options,
3515
- enabled: !!type && (options.enabled ?? true)
3606
+ enabled: !!type && (options?.enabled ?? true)
3516
3607
  }
3517
3608
  );
3518
3609
  };
@@ -3583,11 +3674,13 @@ var GetSelf = async ({
3583
3674
  return data;
3584
3675
  };
3585
3676
  var useGetSelf = (ignoreExecuteAs, options = {}) => {
3677
+ const { authenticated } = useConnectedXM();
3586
3678
  return useConnectedSingleQuery(
3587
3679
  SELF_QUERY_KEY(ignoreExecuteAs),
3588
3680
  (params) => GetSelf({ ignoreExecuteAs, ...params }),
3589
3681
  {
3590
- ...options
3682
+ ...options,
3683
+ enabled: authenticated && (options?.enabled ?? true)
3591
3684
  }
3592
3685
  );
3593
3686
  };
@@ -3641,12 +3734,14 @@ var GetSelfChatChannels = async ({
3641
3734
  return data;
3642
3735
  };
3643
3736
  var useGetSelfChatChannels = (params = {}, options = {}) => {
3737
+ const { authenticated } = useConnectedXM();
3644
3738
  return useConnectedInfiniteQuery(
3645
3739
  SELF_CHAT_CHANNELS_QUERY_KEY(),
3646
3740
  (params2) => GetSelfChatChannels(params2),
3647
3741
  params,
3648
3742
  {
3649
- ...options
3743
+ ...options,
3744
+ enabled: !!authenticated && (options?.enabled ?? true)
3650
3745
  }
3651
3746
  );
3652
3747
  };
@@ -3674,6 +3769,7 @@ var GetSelfChatChannel = async ({
3674
3769
  return data;
3675
3770
  };
3676
3771
  var useGetSelfChatChannel = (channelId, options = {}) => {
3772
+ const { authenticated } = useConnectedXM();
3677
3773
  return useConnectedSingleQuery(
3678
3774
  SELF_CHAT_CHANNEL_QUERY_KEY(channelId),
3679
3775
  (params) => GetSelfChatChannel({
@@ -3683,7 +3779,7 @@ var useGetSelfChatChannel = (channelId, options = {}) => {
3683
3779
  {
3684
3780
  staleTime: Infinity,
3685
3781
  ...options,
3686
- enabled: !!channelId && (options?.enabled ?? true)
3782
+ enabled: !!authenticated && !!channelId && (options?.enabled ?? true)
3687
3783
  }
3688
3784
  );
3689
3785
  };
@@ -3722,13 +3818,14 @@ var GetSelfChatChannelMembers = async ({
3722
3818
  return data;
3723
3819
  };
3724
3820
  var useGetSelfChatChannelMembers = (channelId, params = {}, options = {}) => {
3821
+ const { authenticated } = useConnectedXM();
3725
3822
  return useConnectedInfiniteQuery(
3726
3823
  SELF_CHAT_CHANNEL_MEMBERS_QUERY_KEY(channelId),
3727
3824
  (params2) => GetSelfChatChannelMembers({ ...params2, channelId }),
3728
3825
  params,
3729
3826
  {
3730
3827
  ...options,
3731
- enabled: !!channelId && (options?.enabled ?? true)
3828
+ enabled: !!authenticated && !!channelId && (options?.enabled ?? true)
3732
3829
  }
3733
3830
  );
3734
3831
  };
@@ -3777,13 +3874,14 @@ var GetSelfChatChannelMessages = async ({
3777
3874
  return data;
3778
3875
  };
3779
3876
  var useGetSelfChatChannelMessages = (channelId, params = {}, options = {}) => {
3877
+ const { authenticated } = useConnectedXM();
3780
3878
  return useConnectedInfiniteQuery(
3781
3879
  SELF_CHAT_CHANNEL_MESSAGES_QUERY_KEY(channelId),
3782
3880
  (params2) => GetSelfChatChannelMessages({ ...params2, channelId }),
3783
3881
  params,
3784
3882
  {
3785
3883
  ...options,
3786
- enabled: !!channelId && (options?.enabled ?? true)
3884
+ enabled: !!authenticated && !!channelId && (options?.enabled ?? true)
3787
3885
  }
3788
3886
  );
3789
3887
  };
@@ -3811,6 +3909,7 @@ var GetSelfEventRegistration = async ({
3811
3909
  return data;
3812
3910
  };
3813
3911
  var useGetSelfEventRegistration = (eventId, options = {}) => {
3912
+ const { authenticated } = useConnectedXM();
3814
3913
  return useConnectedSingleQuery_default(
3815
3914
  SELF_EVENT_REGISTRATION_QUERY_KEY(eventId),
3816
3915
  (params) => GetSelfEventRegistration({
@@ -3819,7 +3918,7 @@ var useGetSelfEventRegistration = (eventId, options = {}) => {
3819
3918
  }),
3820
3919
  {
3821
3920
  ...options,
3822
- enabled: !!eventId && (options?.enabled ?? true)
3921
+ enabled: !!authenticated && !!eventId && (options?.enabled ?? true)
3823
3922
  }
3824
3923
  );
3825
3924
  };
@@ -3842,6 +3941,7 @@ var GetSelfEventRegistrationCheckout = async ({
3842
3941
  return data;
3843
3942
  };
3844
3943
  var useGetSelfEventRegistrationCheckout = (eventId, registrationId = "", options = {}) => {
3944
+ const { authenticated } = useConnectedXM();
3845
3945
  return useConnectedSingleQuery_default(
3846
3946
  SELF_EVENT_REGISTRATION_CHECKOUT_QUERY_KEY(eventId, registrationId),
3847
3947
  (params) => GetSelfEventRegistrationCheckout({ eventId, registrationId, ...params }),
@@ -3850,7 +3950,7 @@ var useGetSelfEventRegistrationCheckout = (eventId, registrationId = "", options
3850
3950
  retry: false,
3851
3951
  retryOnMount: false,
3852
3952
  ...options,
3853
- enabled: !!eventId && !!registrationId && (options.enabled ?? true)
3953
+ enabled: !!authenticated && !!eventId && !!registrationId && (options?.enabled ?? true)
3854
3954
  }
3855
3955
  );
3856
3956
  };
@@ -3888,6 +3988,7 @@ var GetSelfEventRegistrationPurchase = async ({
3888
3988
  return data;
3889
3989
  };
3890
3990
  var useGetSelfEventRegistrationPurchase = (eventId, registrationId, purchaseId, options = {}) => {
3991
+ const { authenticated } = useConnectedXM();
3891
3992
  return useConnectedSingleQuery_default(
3892
3993
  SELF_EVENT_REGISTRATION_PURCHASE_QUERY_KEY(
3893
3994
  eventId,
@@ -3902,7 +4003,7 @@ var useGetSelfEventRegistrationPurchase = (eventId, registrationId, purchaseId,
3902
4003
  }),
3903
4004
  {
3904
4005
  ...options,
3905
- enabled: !!eventId && !!registrationId && !!purchaseId && (options?.enabled ?? true)
4006
+ enabled: !!authenticated && !!eventId && !!registrationId && !!purchaseId && (options?.enabled ?? true)
3906
4007
  }
3907
4008
  );
3908
4009
  };
@@ -3941,6 +4042,7 @@ var GetSelfEventRegistrationPurchaseSections = async ({
3941
4042
  return data;
3942
4043
  };
3943
4044
  var useGetSelfEventRegistrationPurchaseSections = (eventId, registrationId, purchaseId, options = {}) => {
4045
+ const { authenticated } = useConnectedXM();
3944
4046
  return useConnectedSingleQuery_default(
3945
4047
  SELF_EVENT_REGISTRATION_PURCHASE_SECTIONS_QUERY_KEY(
3946
4048
  eventId,
@@ -3958,7 +4060,7 @@ var useGetSelfEventRegistrationPurchaseSections = (eventId, registrationId, purc
3958
4060
  staleTime: Infinity,
3959
4061
  refetchOnMount: false,
3960
4062
  ...options,
3961
- enabled: !!eventId && !!registrationId && !!purchaseId && (options?.enabled ?? true)
4063
+ enabled: !!authenticated && !!eventId && !!registrationId && !!purchaseId && (options?.enabled ?? true)
3962
4064
  }
3963
4065
  );
3964
4066
  };
@@ -3997,6 +4099,7 @@ var GetSelfEventRegistrationPurchaseAddOns = async ({
3997
4099
  return data;
3998
4100
  };
3999
4101
  var useGetSelfEventRegistrationPurchaseAddOns = (eventId, registrationId, purchaseId, options = {}) => {
4102
+ const { authenticated } = useConnectedXM();
4000
4103
  return useConnectedSingleQuery_default(
4001
4104
  SELF_EVENT_REGISTRATION_PURCHASE_ADD_ONS_QUERY_KEY(
4002
4105
  eventId,
@@ -4011,7 +4114,7 @@ var useGetSelfEventRegistrationPurchaseAddOns = (eventId, registrationId, purcha
4011
4114
  }),
4012
4115
  {
4013
4116
  ...options,
4014
- enabled: !!eventId && !!registrationId && !!purchaseId && (options?.enabled ?? true)
4117
+ enabled: !!authenticated && !!eventId && !!registrationId && !!purchaseId && (options?.enabled ?? true)
4015
4118
  }
4016
4119
  );
4017
4120
  };
@@ -4052,6 +4155,7 @@ var GetSelfEventRegistrationPurchaseReservationSections = async ({
4052
4155
  return data;
4053
4156
  };
4054
4157
  var useGetSelfEventRegistrationPurchaseReservationSections = (eventId, registrationId, purchaseId, options = {}) => {
4158
+ const { authenticated } = useConnectedXM();
4055
4159
  return useConnectedSingleQuery_default(
4056
4160
  SELF_EVENT_REGISTRATION_PURCHASE_RESERVATION_SECTIONS_QUERY_KEY(
4057
4161
  eventId,
@@ -4066,7 +4170,7 @@ var useGetSelfEventRegistrationPurchaseReservationSections = (eventId, registrat
4066
4170
  }),
4067
4171
  {
4068
4172
  ...options,
4069
- enabled: !!eventId && !!registrationId && !!purchaseId && (options?.enabled ?? true)
4173
+ enabled: !!authenticated && !!eventId && !!registrationId && !!purchaseId && (options?.enabled ?? true)
4070
4174
  }
4071
4175
  );
4072
4176
  };
@@ -4094,6 +4198,7 @@ var GetSelfEventRegistrationStatus = async ({
4094
4198
  return data;
4095
4199
  };
4096
4200
  var useGetSelfEventRegistrationStatus = (eventId, selfId, options = {}) => {
4201
+ const { authenticated } = useConnectedXM();
4097
4202
  return useConnectedSingleQuery_default(
4098
4203
  SELF_EVENT_REGISTRATION_STATUS_QUERY_KEY(eventId),
4099
4204
  (params) => GetSelfEventRegistrationStatus({
@@ -4102,7 +4207,7 @@ var useGetSelfEventRegistrationStatus = (eventId, selfId, options = {}) => {
4102
4207
  }),
4103
4208
  {
4104
4209
  ...options,
4105
- enabled: !!eventId && !!selfId && (options?.enabled ?? true)
4210
+ enabled: !!authenticated && !!eventId && !!selfId && (options?.enabled ?? true)
4106
4211
  }
4107
4212
  );
4108
4213
  };
@@ -4146,13 +4251,14 @@ var GetSelfSubscriptions = async ({
4146
4251
  return data;
4147
4252
  };
4148
4253
  var useGetSelfSubscriptions = (status, params = {}, options = {}) => {
4254
+ const { authenticated } = useConnectedXM();
4149
4255
  return useConnectedInfiniteQuery(
4150
4256
  SELF_SUBSCRIPTIONS_QUERY_KEY(status),
4151
4257
  (params2) => GetSelfSubscriptions({ status, ...params2 }),
4152
4258
  params,
4153
4259
  {
4154
4260
  ...options,
4155
- enabled: options.enabled ?? true
4261
+ enabled: !!authenticated && (options?.enabled ?? true)
4156
4262
  }
4157
4263
  );
4158
4264
  };
@@ -4168,12 +4274,13 @@ var GetSelfSubcription = async ({
4168
4274
  return data;
4169
4275
  };
4170
4276
  var useGetSelfSubcription = (subscriptionId = "", options = {}) => {
4277
+ const { authenticated } = useConnectedXM();
4171
4278
  return useConnectedSingleQuery(
4172
4279
  SELF_SUBSCRIPTION_QUERY_KEY(subscriptionId),
4173
4280
  (params) => GetSelfSubcription({ subscriptionId, ...params }),
4174
4281
  {
4175
4282
  ...options,
4176
- enabled: !!subscriptionId && (options?.enabled ?? true)
4283
+ enabled: !!authenticated && !!subscriptionId && (options?.enabled ?? true)
4177
4284
  }
4178
4285
  );
4179
4286
  };
@@ -4203,13 +4310,69 @@ var GetSelfSubscriptionPayments = async ({
4203
4310
  return data;
4204
4311
  };
4205
4312
  var useGetSelfSubscriptionPayments = (subscriptionId, params = {}, options = {}) => {
4313
+ const { authenticated } = useConnectedXM();
4206
4314
  return useConnectedInfiniteQuery(
4207
4315
  SELF_SUBSCRIPTION_PAYMENTS_QUERY_KEY(subscriptionId),
4208
4316
  (params2) => GetSelfSubscriptionPayments({ ...params2, subscriptionId }),
4209
4317
  params,
4210
4318
  {
4211
4319
  ...options,
4212
- enabled: options.enabled ?? true
4320
+ enabled: !!authenticated && (options?.enabled ?? true)
4321
+ }
4322
+ );
4323
+ };
4324
+
4325
+ // src/queries/self/useGetSelfRelationships.ts
4326
+ var SELF_RELATIONSHIPS_QUERY_KEY = () => {
4327
+ const keys = [...SELF_QUERY_KEY(), "RELATIONSHIPS"];
4328
+ return keys;
4329
+ };
4330
+ var ADD_SELF_RELATIONSHIP = (client, baseKeys = ["en"], type, id, value = true) => {
4331
+ client.setQueryData(
4332
+ [...SELF_RELATIONSHIPS_QUERY_KEY(), ...GetBaseSingleQueryKeys(...baseKeys)],
4333
+ (prev) => ({
4334
+ ...prev,
4335
+ [type]: {
4336
+ ...prev[type],
4337
+ [id]: value
4338
+ }
4339
+ })
4340
+ );
4341
+ };
4342
+ var REMOVE_SELF_RELATIONSHIP = (client, baseKeys = ["en"], type, id, value = false) => {
4343
+ client.setQueryData(
4344
+ [...SELF_RELATIONSHIPS_QUERY_KEY(), ...GetBaseSingleQueryKeys(...baseKeys)],
4345
+ (prev) => ({
4346
+ ...prev,
4347
+ [type]: {
4348
+ ...prev[type],
4349
+ [id]: value
4350
+ }
4351
+ })
4352
+ );
4353
+ };
4354
+ var GetSelfRelationships = async ({
4355
+ clientApiParams
4356
+ }) => {
4357
+ const clientApi = await GetClientAPI({
4358
+ ...clientApiParams
4359
+ });
4360
+ const { data } = await clientApi.get(`/self/relationships`);
4361
+ return data;
4362
+ };
4363
+ var useGetSelfRelationships = (options = {}) => {
4364
+ const { authenticated } = useConnectedXM();
4365
+ return useConnectedSingleQuery(
4366
+ SELF_RELATIONSHIPS_QUERY_KEY(),
4367
+ (params) => GetSelfRelationships({ ...params }),
4368
+ {
4369
+ staleTime: 1e3 * 60 * 60,
4370
+ gcTime: 1e3 * 60 * 60,
4371
+ refetchOnMount: false,
4372
+ refetchOnWindowFocus: false,
4373
+ refetchOnReconnect: false,
4374
+ ...options,
4375
+ enabled: !!authenticated && (options?.enabled ?? true)
4213
4376
  }
4214
4377
  );
4215
4378
  };
@@ -4248,12 +4411,14 @@ var GetSelfActivities = async ({
4248
4411
  return data;
4249
4412
  };
4250
4413
  var useGetSelfActivities = (params = {}, options = {}) => {
4414
+ const { authenticated } = useConnectedXM();
4251
4415
  return useConnectedInfiniteQuery(
4252
4416
  SELF_ACTIVITIES_QUERY_KEY(),
4253
4417
  (params2) => GetSelfActivities({ ...params2 }),
4254
4418
  params,
4255
4419
  {
4256
- ...options
4420
+ ...options,
4421
+ enabled: !!authenticated && (options?.enabled ?? true)
4257
4422
  }
4258
4423
  );
4259
4424
  };
@@ -4269,12 +4434,13 @@ var GetSelfAnnouncement = async ({
4269
4434
  return data;
4270
4435
  };
4271
4436
  var useGetSelfAnnouncement = (announcementId, options = {}) => {
4437
+ const { authenticated } = useConnectedXM();
4272
4438
  return useConnectedSingleQuery(
4273
4439
  SELF_ANNOUNCEMENT_QUERY_KEY(announcementId),
4274
4440
  (params) => GetSelfAnnouncement({ announcementId, ...params }),
4275
4441
  {
4276
4442
  ...options,
4277
- enabled: !!announcementId && (options?.enabled ?? true)
4443
+ enabled: !!authenticated && !!announcementId && (options?.enabled ?? true)
4278
4444
  }
4279
4445
  );
4280
4446
  };
@@ -4303,12 +4469,14 @@ var GetSelfCommunityMemberships = async ({
4303
4469
  return data;
4304
4470
  };
4305
4471
  var useGetSelfCommunityMemberships = (params = {}, options = {}) => {
4472
+ const { authenticated } = useConnectedXM();
4306
4473
  return useConnectedInfiniteQuery(
4307
4474
  SELF_COMMUNITY_MEMBERSHIPS_QUERY_KEY(),
4308
4475
  (params2) => GetSelfCommunityMemberships({ ...params2 }),
4309
4476
  params,
4310
4477
  {
4311
- ...options
4478
+ ...options,
4479
+ enabled: !!authenticated && (options?.enabled ?? true)
4312
4480
  }
4313
4481
  );
4314
4482
  };
@@ -4335,12 +4503,13 @@ var GetSelfCommunityMembership = async ({
4335
4503
  return data;
4336
4504
  };
4337
4505
  var useGetSelfCommunityMembership = (communityId, options = {}) => {
4506
+ const { authenticated } = useConnectedXM();
4338
4507
  return useConnectedSingleQuery(
4339
4508
  SELF_COMMUNITY_MEMBERSHIP_QUERY_KEY(communityId),
4340
4509
  (params) => GetSelfCommunityMembership({ communityId, ...params }),
4341
4510
  {
4342
4511
  ...options,
4343
- enabled: !!communityId && (options?.enabled ?? true)
4512
+ enabled: !!authenticated && !!communityId && (options?.enabled ?? true)
4344
4513
  }
4345
4514
  );
4346
4515
  };
@@ -4379,12 +4548,14 @@ var GetSelfDelegateOf = async ({
4379
4548
  return data;
4380
4549
  };
4381
4550
  var useGetSelfDelegateOf = (params = {}, options = {}) => {
4551
+ const { authenticated } = useConnectedXM();
4382
4552
  return useConnectedInfiniteQuery(
4383
4553
  SELF_DELEGATE_OF_QUERY_KEY(),
4384
4554
  (params2) => GetSelfDelegateOf({ ...params2 }),
4385
4555
  params,
4386
4556
  {
4387
- ...options
4557
+ ...options,
4558
+ enabled: !!authenticated && (options?.enabled ?? true)
4388
4559
  }
4389
4560
  );
4390
4561
  };
@@ -4423,12 +4594,14 @@ var GetSelfDelegates = async ({
4423
4594
  return data;
4424
4595
  };
4425
4596
  var useGetSelfDelegates = (params = {}, options = {}) => {
4597
+ const { authenticated } = useConnectedXM();
4426
4598
  return useConnectedInfiniteQuery(
4427
4599
  SELF_DELEGATES_QUERY_KEY(),
4428
4600
  (params2) => GetSelfDelegates(params2),
4429
4601
  params,
4430
4602
  {
4431
- ...options
4603
+ ...options,
4604
+ enabled: !!authenticated && (options?.enabled ?? true)
4432
4605
  }
4433
4606
  );
4434
4607
  };
@@ -4470,12 +4643,14 @@ var GetSelfEvents = async ({
4470
4643
  return data;
4471
4644
  };
4472
4645
  var useGetSelfEvents = (past = false, params = {}, options = {}) => {
4646
+ const { authenticated } = useConnectedXM();
4473
4647
  return useConnectedInfiniteQuery(
4474
4648
  SELF_EVENTS_QUERY_KEY(past),
4475
4649
  (params2) => GetSelfEvents({ ...params2, past }),
4476
4650
  params,
4477
4651
  {
4478
- ...options
4652
+ ...options,
4653
+ enabled: !!authenticated && (options?.enabled ?? true)
4479
4654
  }
4480
4655
  );
4481
4656
  };
@@ -4517,13 +4692,14 @@ var GetSelfEventSessions = async ({
4517
4692
  return data;
4518
4693
  };
4519
4694
  var useGetSelfEventSessions = (eventId, params = {}, options = {}) => {
4695
+ const { authenticated } = useConnectedXM();
4520
4696
  return useConnectedInfiniteQuery(
4521
4697
  SELF_EVENT_SESSIONS_QUERY_KEY(eventId),
4522
4698
  (params2) => GetSelfEventSessions({ eventId, ...params2 }),
4523
4699
  params,
4524
4700
  {
4525
4701
  ...options,
4526
- enabled: !!eventId && (options.enabled ?? true)
4702
+ enabled: !!authenticated && !!eventId && (options?.enabled ?? true)
4527
4703
  }
4528
4704
  );
4529
4705
  };
@@ -4562,13 +4738,14 @@ var GetSelfFeed = async ({
4562
4738
  return data;
4563
4739
  };
4564
4740
  var useGetSelfFeed = (params = {}, options = {}) => {
4741
+ const { authenticated } = useConnectedXM();
4565
4742
  return useConnectedInfiniteQuery(
4566
4743
  SELF_FEED_QUERY_KEY(),
4567
4744
  (params2) => GetSelfFeed(params2),
4568
4745
  params,
4569
4746
  {
4570
4747
  ...options,
4571
- enabled: options.enabled ?? true
4748
+ enabled: !!authenticated && (options?.enabled ?? true)
4572
4749
  }
4573
4750
  );
4574
4751
  };
@@ -4597,12 +4774,14 @@ var GetSelfInterests = async ({
4597
4774
  return data;
4598
4775
  };
4599
4776
  var useGetSelfInterests = (params = {}, options = {}) => {
4777
+ const { authenticated } = useConnectedXM();
4600
4778
  return useConnectedInfiniteQuery(
4601
4779
  SELF_INTERESTS_QUERY_KEY(),
4602
4780
  (params2) => GetSelfInterests({ ...params2 }),
4603
4781
  params,
4604
4782
  {
4605
- ...options
4783
+ ...options,
4784
+ enabled: !!authenticated && (options?.enabled ?? true)
4606
4785
  }
4607
4786
  );
4608
4787
  };
@@ -4620,11 +4799,13 @@ var GetSelfNotificationPreferences = async ({
4620
4799
  return data;
4621
4800
  };
4622
4801
  var useGetSelfNotificationPreferences = (options = {}) => {
4802
+ const { authenticated } = useConnectedXM();
4623
4803
  return useConnectedSingleQuery(
4624
4804
  SELF_PREFERENCES_QUERY_KEY(),
4625
4805
  (params) => GetSelfNotificationPreferences({ ...params }),
4626
4806
  {
4627
- ...options
4807
+ ...options,
4808
+ enabled: authenticated && (options?.enabled ?? true)
4628
4809
  }
4629
4810
  );
4630
4811
  };
@@ -4656,13 +4837,15 @@ var GetSelfNotifications = async ({
4656
4837
  return data;
4657
4838
  };
4658
4839
  var useGetSelfNotifications = (filters = "", params = {}, options = {}) => {
4840
+ const { authenticated } = useConnectedXM();
4659
4841
  return useConnectedInfiniteQuery(
4660
4842
  SELF_NOTIFICATIONS_QUERY_KEY(filters),
4661
4843
  (params2) => GetSelfNotifications({ ...params2, filters }),
4662
4844
  params,
4663
4845
  {
4664
4846
  staleTime: 0,
4665
- ...options
4847
+ ...options,
4848
+ enabled: !!authenticated && (options?.enabled ?? true)
4666
4849
  }
4667
4850
  );
4668
4851
  };
@@ -4682,11 +4865,13 @@ var GetSelfNewNotificationsCount = async ({
4682
4865
  return data;
4683
4866
  };
4684
4867
  var useGetSelfNewNotificationsCount = (filters = "", options = {}) => {
4868
+ const { authenticated } = useConnectedXM();
4685
4869
  return useConnectedSingleQuery_default(
4686
4870
  SELF_NOTIFICATION_COUNT_QUERY_KEY(filters),
4687
4871
  (params) => GetSelfNewNotificationsCount({ filters, ...params }),
4688
4872
  {
4689
- ...options
4873
+ ...options,
4874
+ enabled: !!authenticated && (options?.enabled ?? true)
4690
4875
  }
4691
4876
  );
4692
4877
  };
@@ -4725,12 +4910,14 @@ var GetSelfPushDevices = async ({
4725
4910
  return data;
4726
4911
  };
4727
4912
  var useGetSelfPushDevices = (params = {}, options = {}) => {
4913
+ const { authenticated } = useConnectedXM();
4728
4914
  return useConnectedInfiniteQuery(
4729
4915
  SELF_PUSH_DEVICES_QUERY_KEY(),
4730
4916
  (params2) => GetSelfPushDevices({ ...params2 }),
4731
4917
  params,
4732
4918
  {
4733
- ...options
4919
+ ...options,
4920
+ enabled: !!authenticated && (options?.enabled ?? true)
4734
4921
  }
4735
4922
  );
4736
4923
  };
@@ -4758,12 +4945,13 @@ var GetSelfPushDevice = async ({
4758
4945
  return data;
4759
4946
  };
4760
4947
  var useGetSelfPushDevice = (pushDeviceId, options = {}) => {
4948
+ const { authenticated } = useConnectedXM();
4761
4949
  return useConnectedSingleQuery(
4762
4950
  SELF_PUSH_DEVICE_QUERY_KEY(pushDeviceId),
4763
4951
  (params) => GetSelfPushDevice({ pushDeviceId, ...params }),
4764
4952
  {
4765
4953
  ...options,
4766
- enabled: !!pushDeviceId && (options?.enabled ?? true)
4954
+ enabled: !!authenticated && !!pushDeviceId && (options?.enabled ?? true)
4767
4955
  }
4768
4956
  );
4769
4957
  };
@@ -4808,12 +4996,14 @@ var GetSelfRecommendations = async ({
4808
4996
  return data;
4809
4997
  };
4810
4998
  var useGetSelfRecommendations = (type, eventId = "", params = {}, options = {}) => {
4999
+ const { authenticated } = useConnectedXM();
4811
5000
  return useConnectedInfiniteQuery(
4812
5001
  SELF_RECOMMENDATIONS_QUERY_KEY(type, eventId),
4813
5002
  (params2) => GetSelfRecommendations({ ...params2, eventId, type }),
4814
5003
  params,
4815
5004
  {
4816
- ...options
5005
+ ...options,
5006
+ enabled: !!authenticated && (options?.enabled ?? true)
4817
5007
  }
4818
5008
  );
4819
5009
  };
@@ -4842,13 +5032,14 @@ var GetSelfTransfers = async ({
4842
5032
  return data;
4843
5033
  };
4844
5034
  var useGetSelfTransfers = (params = {}, options = {}) => {
5035
+ const { authenticated } = useConnectedXM();
4845
5036
  return useConnectedInfiniteQuery(
4846
5037
  SELF_TRANSFERS_QUERY_KEY(),
4847
5038
  (params2) => GetSelfTransfers({ ...params2 }),
4848
5039
  params,
4849
5040
  {
4850
5041
  ...options,
4851
- enabled: options.enabled ?? true
5042
+ enabled: !!authenticated && (options?.enabled ?? true)
4852
5043
  }
4853
5044
  );
4854
5045
  };
@@ -4864,12 +5055,13 @@ var GetSelfTransfer = async ({
4864
5055
  return data;
4865
5056
  };
4866
5057
  var useGetSelfTransfer = (transferId = "", options = {}) => {
5058
+ const { authenticated } = useConnectedXM();
4867
5059
  return useConnectedSingleQuery(
4868
5060
  SELF_PENDING_TRANSFER_QUERY_KEY(transferId),
4869
5061
  (params) => GetSelfTransfer({ ...params, transferId }),
4870
5062
  {
4871
5063
  ...options,
4872
- enabled: !!transferId && (options?.enabled ?? true)
5064
+ enabled: !!authenticated && !!transferId && (options?.enabled ?? true)
4873
5065
  }
4874
5066
  );
4875
5067
  };
@@ -5016,7 +5208,7 @@ var GetSeriesEvents = async ({
5016
5208
  var useGetSeriesEvents = (seriesId = "", past, include, params = {}, options = {}) => {
5017
5209
  return useConnectedInfiniteQuery(
5018
5210
  SERIES_EVENTS_QUERY_KEY(seriesId, past, include),
5019
- (params2) => GetSeriesEvents({ seriesId, past, ...params2 }),
5211
+ (params2) => GetSeriesEvents({ seriesId, past, include, ...params2 }),
5020
5212
  params,
5021
5213
  {
5022
5214
  ...options,
@@ -5234,7 +5426,7 @@ var useGetSelfEventListings = (past = false, params = {}, options = {}) => {
5234
5426
  params,
5235
5427
  {
5236
5428
  ...options,
5237
- enabled: options.enabled ?? true
5429
+ enabled: options?.enabled ?? true
5238
5430
  }
5239
5431
  );
5240
5432
  };
@@ -5341,6 +5533,42 @@ var useGetSelfEventListingAnnouncement = (eventId = "", announcementId = "", opt
5341
5533
  );
5342
5534
  };
5343
5535
 
5536
+ // src/queries/listings/useGetListingQuestions.ts
5537
+ var LISTING_QUESTIONS_QUERY_KEY = (eventId) => [
5538
+ ...LISTING_QUERY_KEY(eventId),
5539
+ "QUESTIONS"
5540
+ ];
5541
+ var GetSelfEventListingQuestions = async ({
5542
+ eventId,
5543
+ pageParam,
5544
+ pageSize,
5545
+ orderBy,
5546
+ search,
5547
+ clientApiParams
5548
+ }) => {
5549
+ const clientApi = await GetClientAPI(clientApiParams);
5550
+ const { data } = await clientApi.get(`/listings/${eventId}/questions`, {
5551
+ params: {
5552
+ page: pageParam || void 0,
5553
+ pageSize: pageSize || void 0,
5554
+ orderBy: orderBy || void 0,
5555
+ search: search || void 0
5556
+ }
5557
+ });
5558
+ return data;
5559
+ };
5560
+ var useGetSelfEventListingQuestions = (eventId, params = {}, options = {}) => {
5561
+ return useConnectedInfiniteQuery(
5562
+ LISTING_QUESTIONS_QUERY_KEY(eventId),
5563
+ (params2) => GetSelfEventListingQuestions({ eventId, ...params2 }),
5564
+ params,
5565
+ {
5566
+ ...options,
5567
+ enabled: !!eventId && (options?.enabled ?? true)
5568
+ }
5569
+ );
5570
+ };
5571
+
5344
5572
  // src/queries/listings/useGetListingRegistrations.ts
5345
5573
  var LISTING_REGISTRATIONS_QUERY_KEY = (eventId, status) => [...LISTING_QUERY_KEY(eventId), "REGISTRATIONS", status ?? "ALL"];
5346
5574
  var GetSelfEventListingRegistrations = async ({
@@ -5504,6 +5732,12 @@ var FollowAccount = async ({
5504
5732
  queryClient.invalidateQueries({
5505
5733
  queryKey: ACCOUNT_FOLLOWERS_QUERY_KEY(data.data.id)
5506
5734
  });
5735
+ ADD_SELF_RELATIONSHIP(
5736
+ queryClient,
5737
+ [clientApiParams.locale],
5738
+ "accounts",
5739
+ accountId
5740
+ );
5507
5741
  }
5508
5742
  return data;
5509
5743
  };
@@ -5531,6 +5765,12 @@ var UnfollowAccount = async ({
5531
5765
  queryClient.invalidateQueries({
5532
5766
  queryKey: ACCOUNT_FOLLOWERS_QUERY_KEY(data.data.id)
5533
5767
  });
5768
+ REMOVE_SELF_RELATIONSHIP(
5769
+ queryClient,
5770
+ [clientApiParams.locale],
5771
+ "accounts",
5772
+ accountId
5773
+ );
5534
5774
  }
5535
5775
  return data;
5536
5776
  };
@@ -6040,6 +6280,12 @@ var CaptureSelfEventRegistrationPayment = async ({
6040
6280
  queryClient.invalidateQueries({
6041
6281
  queryKey: SELF_EVENT_REGISTRATION_STATUS_QUERY_KEY(eventId)
6042
6282
  });
6283
+ ADD_SELF_RELATIONSHIP(
6284
+ queryClient,
6285
+ [clientApiParams.locale],
6286
+ "events",
6287
+ eventId
6288
+ );
6043
6289
  }
6044
6290
  return data;
6045
6291
  };
@@ -6176,6 +6422,12 @@ var SubmitSelfEventRegistration = async ({
6176
6422
  queryClient.invalidateQueries({
6177
6423
  queryKey: SELF_EVENT_REGISTRATION_STATUS_QUERY_KEY(eventId)
6178
6424
  });
6425
+ ADD_SELF_RELATIONSHIP(
6426
+ queryClient,
6427
+ [clientApiParams.locale],
6428
+ "events",
6429
+ eventId
6430
+ );
6179
6431
  }
6180
6432
  return data;
6181
6433
  };
@@ -7131,6 +7383,13 @@ var CreateCommunity = async ({
7131
7383
  queryClient.invalidateQueries({
7132
7384
  queryKey: COMMUNITIES_QUERY_KEY()
7133
7385
  });
7386
+ ADD_SELF_RELATIONSHIP(
7387
+ queryClient,
7388
+ [clientApiParams.locale],
7389
+ "communities",
7390
+ data.data.id,
7391
+ "moderator"
7392
+ );
7134
7393
  }
7135
7394
  return data;
7136
7395
  };
@@ -7248,6 +7507,13 @@ var JoinCommunity = async ({
7248
7507
  queryClient.invalidateQueries({
7249
7508
  queryKey: SELF_COMMUNITY_MEMBERSHIP_QUERY_KEY(communityId)
7250
7509
  });
7510
+ ADD_SELF_RELATIONSHIP(
7511
+ queryClient,
7512
+ [clientApiParams.locale],
7513
+ "communities",
7514
+ communityId,
7515
+ "member"
7516
+ );
7251
7517
  }
7252
7518
  return data;
7253
7519
  };
@@ -7278,6 +7544,12 @@ var LeaveCommunity = async ({
7278
7544
  queryClient.invalidateQueries({
7279
7545
  queryKey: SELF_COMMUNITY_MEMBERSHIP_QUERY_KEY(communityId)
7280
7546
  });
7547
+ REMOVE_SELF_RELATIONSHIP(
7548
+ queryClient,
7549
+ [clientApiParams.locale],
7550
+ "communities",
7551
+ communityId
7552
+ );
7281
7553
  }
7282
7554
  return data;
7283
7555
  };
@@ -7653,6 +7925,46 @@ var useCreateListingAnnouncement = (options = {}) => {
7653
7925
  return useConnectedMutation_default(CreateListingAnnouncement, options);
7654
7926
  };
7655
7927
 
7928
+ // src/mutations/listings/useCreateListingQuestion.ts
7929
+ var CreateListingQuestion = async ({
7930
+ eventId,
7931
+ question,
7932
+ clientApiParams,
7933
+ queryClient
7934
+ }) => {
7935
+ const clientApi = await GetClientAPI(clientApiParams);
7936
+ const { data } = await clientApi.post(`/listings/${eventId}/questions`, question);
7937
+ if (queryClient && data.status === "ok") {
7938
+ queryClient.invalidateQueries({
7939
+ queryKey: LISTING_QUESTIONS_QUERY_KEY(eventId)
7940
+ });
7941
+ }
7942
+ return data;
7943
+ };
7944
+ var useCreateListingQuestion = (options = {}) => {
7945
+ return useConnectedMutation_default(CreateListingQuestion, options);
7946
+ };
7947
+
7948
+ // src/mutations/listings/useDeleteListingQuestion.ts
7949
+ var DeleteListingQuestion = async ({
7950
+ eventId,
7951
+ questionId,
7952
+ clientApiParams,
7953
+ queryClient
7954
+ }) => {
7955
+ const clientApi = await GetClientAPI(clientApiParams);
7956
+ const { data } = await clientApi.delete(`/listings/${eventId}/questions/${questionId}`);
7957
+ if (queryClient && data.status === "ok") {
7958
+ queryClient.invalidateQueries({
7959
+ queryKey: LISTING_QUESTIONS_QUERY_KEY(eventId)
7960
+ });
7961
+ }
7962
+ return data;
7963
+ };
7964
+ var useDeleteListingQuestion = (options = {}) => {
7965
+ return useConnectedMutation_default(DeleteListingQuestion, options);
7966
+ };
7967
+
7656
7968
  // src/mutations/listings/useDeleteListingSession.ts
7657
7969
  var DeleteListingSession = async ({
7658
7970
  eventId,
@@ -7777,6 +8089,28 @@ var useUpdateListing = (options = {}) => {
7777
8089
  return useConnectedMutation_default(UpdateListing, options);
7778
8090
  };
7779
8091
 
8092
+ // src/mutations/listings/useUpdateListingQuestion.ts
8093
+ var UpdateListingQuestion = async ({
8094
+ eventId,
8095
+ question,
8096
+ questionId,
8097
+ clientApiParams,
8098
+ queryClient
8099
+ }) => {
8100
+ const clientApi = await GetClientAPI(clientApiParams);
8101
+ const { data } = await clientApi.put(`/listings/${eventId}/questions/${questionId}`, question);
8102
+ if (queryClient && data.status === "ok") {
8103
+ queryClient.invalidateQueries({
8104
+ queryKey: LISTING_QUESTIONS_QUERY_KEY(eventId),
8105
+ exact: false
8106
+ });
8107
+ }
8108
+ return data;
8109
+ };
8110
+ var useUpdateListingQuestion = (options = {}) => {
8111
+ return useConnectedMutation_default(UpdateListingQuestion, options);
8112
+ };
8113
+
7780
8114
  // src/mutations/listings/useUpdateListingSession.ts
7781
8115
  var UpdateListingSession = async ({
7782
8116
  eventId,
@@ -7846,6 +8180,7 @@ var useUpdateListingSpeaker = (options = {}) => {
7846
8180
  ACTIVITIES_QUERY_KEY,
7847
8181
  ACTIVITY_COMMENTS_QUERY_KEY,
7848
8182
  ACTIVITY_QUERY_KEY,
8183
+ ADD_SELF_RELATIONSHIP,
7849
8184
  ADVERTISEMENT_QUERY_KEY,
7850
8185
  AcceptCommunityInvitation,
7851
8186
  AcceptCommunityRequest,
@@ -7898,6 +8233,7 @@ var useUpdateListingSpeaker = (options = {}) => {
7898
8233
  CreateEventLead,
7899
8234
  CreateListing,
7900
8235
  CreateListingAnnouncement,
8236
+ CreateListingQuestion,
7901
8237
  CreateListingSession,
7902
8238
  CreateListingSpeaker,
7903
8239
  CreateSelfChatChannel,
@@ -7910,6 +8246,7 @@ var useUpdateListingSpeaker = (options = {}) => {
7910
8246
  DeleteActivity,
7911
8247
  DeleteCommunityInvitation,
7912
8248
  DeleteListing,
8249
+ DeleteListingQuestion,
7913
8250
  DeleteListingSession,
7914
8251
  DeleteListingSpeaker,
7915
8252
  DeleteReshare,
@@ -8014,6 +8351,7 @@ var useUpdateListingSpeaker = (options = {}) => {
8014
8351
  GetSelfEventListing,
8015
8352
  GetSelfEventListingAnnouncement,
8016
8353
  GetSelfEventListingAnnouncements,
8354
+ GetSelfEventListingQuestions,
8017
8355
  GetSelfEventListingRegistration,
8018
8356
  GetSelfEventListingRegistrations,
8019
8357
  GetSelfEventListings,
@@ -8034,6 +8372,7 @@ var useUpdateListingSpeaker = (options = {}) => {
8034
8372
  GetSelfPushDevice,
8035
8373
  GetSelfPushDevices,
8036
8374
  GetSelfRecommendations,
8375
+ GetSelfRelationships,
8037
8376
  GetSelfSubcription,
8038
8377
  GetSelfSubscriptionPayments,
8039
8378
  GetSelfSubscriptions,
@@ -8056,6 +8395,7 @@ var useUpdateListingSpeaker = (options = {}) => {
8056
8395
  LISTING_ANNOUNCEMENTS_QUERY_KEY,
8057
8396
  LISTING_ANNOUNCEMENT_QUERY_KEY,
8058
8397
  LISTING_QUERY_KEY,
8398
+ LISTING_QUESTIONS_QUERY_KEY,
8059
8399
  LISTING_REGISTRATIONS_QUERY_KEY,
8060
8400
  LISTING_REGISTRATION_QUERY_KEY,
8061
8401
  LeaveCommunity,
@@ -8071,6 +8411,7 @@ var useUpdateListingSpeaker = (options = {}) => {
8071
8411
  PromoteCommunityMember,
8072
8412
  PushDeviceAppType,
8073
8413
  PushService,
8414
+ REMOVE_SELF_RELATIONSHIP,
8074
8415
  RegisterCancelledEventRegistration,
8075
8416
  RegistrationQuestionType,
8076
8417
  RegistrationStatus,
@@ -8114,6 +8455,7 @@ var useUpdateListingSpeaker = (options = {}) => {
8114
8455
  SELF_PUSH_DEVICE_QUERY_KEY,
8115
8456
  SELF_QUERY_KEY,
8116
8457
  SELF_RECOMMENDATIONS_QUERY_KEY,
8458
+ SELF_RELATIONSHIPS_QUERY_KEY,
8117
8459
  SELF_SUBSCRIPTIONS_QUERY_KEY,
8118
8460
  SELF_SUBSCRIPTION_PAYMENTS_QUERY_KEY,
8119
8461
  SELF_SUBSCRIPTION_QUERY_KEY,
@@ -8209,6 +8551,7 @@ var useUpdateListingSpeaker = (options = {}) => {
8209
8551
  UnlikeActivity,
8210
8552
  UpdateCommunity,
8211
8553
  UpdateListing,
8554
+ UpdateListingQuestion,
8212
8555
  UpdateListingSession,
8213
8556
  UpdateListingSpeaker,
8214
8557
  UpdateSelf,
@@ -8257,6 +8600,7 @@ var useUpdateListingSpeaker = (options = {}) => {
8257
8600
  isTypeTicket,
8258
8601
  isTypeTrack,
8259
8602
  isTypeTransfer,
8603
+ isUUID,
8260
8604
  setFirstPageData,
8261
8605
  useAcceptCommunityInvitation,
8262
8606
  useAcceptCommunityRequest,
@@ -8285,6 +8629,7 @@ var useUpdateListingSpeaker = (options = {}) => {
8285
8629
  useCreateEventLead,
8286
8630
  useCreateListing,
8287
8631
  useCreateListingAnnouncement,
8632
+ useCreateListingQuestion,
8288
8633
  useCreateListingSession,
8289
8634
  useCreateListingSpeaker,
8290
8635
  useCreateSelfChatChannel,
@@ -8296,6 +8641,7 @@ var useUpdateListingSpeaker = (options = {}) => {
8296
8641
  useDeleteActivity,
8297
8642
  useDeleteCommunityInvitation,
8298
8643
  useDeleteListing,
8644
+ useDeleteListingQuestion,
8299
8645
  useDeleteListingSession,
8300
8646
  useDeleteListingSpeaker,
8301
8647
  useDeleteReshare,
@@ -8376,6 +8722,7 @@ var useUpdateListingSpeaker = (options = {}) => {
8376
8722
  useGetSelfEventListing,
8377
8723
  useGetSelfEventListingAnnouncement,
8378
8724
  useGetSelfEventListingAnnouncements,
8725
+ useGetSelfEventListingQuestions,
8379
8726
  useGetSelfEventListingRegistration,
8380
8727
  useGetSelfEventListings,
8381
8728
  useGetSelfEventListingsRegistrations,
@@ -8396,6 +8743,7 @@ var useUpdateListingSpeaker = (options = {}) => {
8396
8743
  useGetSelfPushDevice,
8397
8744
  useGetSelfPushDevices,
8398
8745
  useGetSelfRecommendations,
8746
+ useGetSelfRelationships,
8399
8747
  useGetSelfSubcription,
8400
8748
  useGetSelfSubscriptionPayments,
8401
8749
  useGetSelfSubscriptions,
@@ -8406,6 +8754,10 @@ var useUpdateListingSpeaker = (options = {}) => {
8406
8754
  useGetSeriesList,
8407
8755
  useGetSponsor,
8408
8756
  useGetSponsors,
8757
+ useIsAccountFollowing,
8758
+ useIsChannelSubscribed,
8759
+ useIsCommunityMember,
8760
+ useIsEventRegistered,
8409
8761
  useJoinCommunity,
8410
8762
  useLeaveCommunity,
8411
8763
  useLeaveSelfChatChannel,
@@ -8433,6 +8785,7 @@ var useUpdateListingSpeaker = (options = {}) => {
8433
8785
  useUnlikeActivity,
8434
8786
  useUpdateCommunity,
8435
8787
  useUpdateListing,
8788
+ useUpdateListingQuestion,
8436
8789
  useUpdateListingSession,
8437
8790
  useUpdateListingSpeaker,
8438
8791
  useUpdateSelf,