@connectedxm/client 2.0.0 → 2.2.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.
package/dist/index.cjs CHANGED
@@ -49,6 +49,7 @@ __export(index_exports, {
49
49
  AcceptGroupInvitation: () => AcceptGroupInvitation,
50
50
  AcceptGroupRequest: () => AcceptGroupRequest,
51
51
  AccountType: () => AccountType,
52
+ ActivityEntityType: () => ActivityEntityType,
52
53
  AddChannelCollectionContent: () => AddChannelCollectionContent,
53
54
  AddChannelInterest: () => AddChannelInterest,
54
55
  AddContentInterest: () => AddContentInterest,
@@ -102,6 +103,7 @@ __export(index_exports, {
102
103
  ConnectedXMProvider: () => ConnectedXMProvider,
103
104
  ContentGuestType: () => ContentGuestType,
104
105
  CouponType: () => CouponType,
106
+ CreateActivity: () => CreateActivity,
105
107
  CreateChannel: () => CreateChannel,
106
108
  CreateChannelCollection: () => CreateChannelCollection,
107
109
  CreateChannelContent: () => CreateChannelContent,
@@ -141,7 +143,6 @@ __export(index_exports, {
141
143
  DeleteListingQuestion: () => DeleteListingQuestion,
142
144
  DeleteListingSession: () => DeleteListingSession,
143
145
  DeleteListingSpeaker: () => DeleteListingSpeaker,
144
- DeleteReshare: () => DeleteReshare,
145
146
  DeleteSelf: () => DeleteSelf,
146
147
  DeleteSelfAddress: () => DeleteSelfAddress,
147
148
  DeleteSelfChatChannel: () => DeleteSelfChatChannel,
@@ -301,6 +302,7 @@ __export(index_exports, {
301
302
  GetLevel: () => GetLevel,
302
303
  GetLevelSponsors: () => GetLevelSponsors,
303
304
  GetLevels: () => GetLevels,
305
+ GetLinkPreview: () => GetLinkPreview,
304
306
  GetListingAttendeePassQuestionSections: () => GetListingAttendeePassQuestionSections,
305
307
  GetManagedChannel: () => GetManagedChannel,
306
308
  GetManagedChannelCollection: () => GetManagedChannelCollection,
@@ -340,7 +342,6 @@ __export(index_exports, {
340
342
  GetSelfEventAttendeePassAddOnsIntent: () => GetSelfEventAttendeePassAddOnsIntent,
341
343
  GetSelfEventAttendeePassQuestionSections: () => GetSelfEventAttendeePassQuestionSections,
342
344
  GetSelfEventAttendeePayment: () => GetSelfEventAttendeePayment,
343
- GetSelfEventAttendeeSessionPassesIntent: () => GetSelfEventAttendeeSessionPassesIntent,
344
345
  GetSelfEventAttendeeTransferAccounts: () => GetSelfEventAttendeeTransferAccounts,
345
346
  GetSelfEventAttendeeTransfersLogs: () => GetSelfEventAttendeeTransfersLogs,
346
347
  GetSelfEventListing: () => GetSelfEventListing,
@@ -361,6 +362,7 @@ __export(index_exports, {
361
362
  GetSelfEventRegistrationPassTypes: () => GetSelfEventRegistrationPassTypes,
362
363
  GetSelfEventRegistrationQuestions: () => GetSelfEventRegistrationQuestions,
363
364
  GetSelfEventRegistrationRoomTypes: () => GetSelfEventRegistrationRoomTypes,
365
+ GetSelfEventSessionRegistrationIntent: () => GetSelfEventSessionRegistrationIntent,
364
366
  GetSelfEventSessions: () => GetSelfEventSessions,
365
367
  GetSelfEventTicketCouponIntent: () => GetSelfEventTicketCouponIntent,
366
368
  GetSelfEvents: () => GetSelfEvents,
@@ -417,6 +419,7 @@ __export(index_exports, {
417
419
  LEVELS_QUERY_KEY: () => LEVELS_QUERY_KEY,
418
420
  LEVEL_QUERY_KEY: () => LEVEL_QUERY_KEY,
419
421
  LEVEL_SPONSORS_QUERY_KEY: () => LEVEL_SPONSORS_QUERY_KEY,
422
+ LINK_PREVIEW_QUERY_KEY: () => LINK_PREVIEW_QUERY_KEY,
420
423
  LISTINGS_QUERY_KEY: () => LISTINGS_QUERY_KEY,
421
424
  LISTING_ANNOUNCEMENTS_QUERY_KEY: () => LISTING_ANNOUNCEMENTS_QUERY_KEY,
422
425
  LISTING_ANNOUNCEMENT_QUERY_KEY: () => LISTING_ANNOUNCEMENT_QUERY_KEY,
@@ -479,7 +482,6 @@ __export(index_exports, {
479
482
  RemoveSelfEventSession: () => RemoveSelfEventSession,
480
483
  RemoveThreadMessageReaction: () => RemoveThreadMessageReaction,
481
484
  ReportActivity: () => ReportActivity,
482
- ReshareActivity: () => ReshareActivity,
483
485
  SELF_ACTIVITIES_QUERY_KEY: () => SELF_ACTIVITIES_QUERY_KEY,
484
486
  SELF_ADDRESSES_QUERY_KEY: () => SELF_ADDRESSES_QUERY_KEY,
485
487
  SELF_ADDRESS_QUERY_KEY: () => SELF_ADDRESS_QUERY_KEY,
@@ -608,6 +610,7 @@ __export(index_exports, {
608
610
  SET_LEVELS_QUERY_DATA: () => SET_LEVELS_QUERY_DATA,
609
611
  SET_LEVEL_QUERY_DATA: () => SET_LEVEL_QUERY_DATA,
610
612
  SET_LEVEL_SPONSORS_QUERY_DATA: () => SET_LEVEL_SPONSORS_QUERY_DATA,
613
+ SET_LINK_PREVIEW_QUERY_DATA: () => SET_LINK_PREVIEW_QUERY_DATA,
611
614
  SET_LISTING_ANNOUNCEMENT_QUERY_KEY: () => SET_LISTING_ANNOUNCEMENT_QUERY_KEY,
612
615
  SET_LISTING_ATTENDEE_PASS_QUESTION_SECTIONS_QUERY_DATA: () => SET_LISTING_ATTENDEE_PASS_QUESTION_SECTIONS_QUERY_DATA,
613
616
  SET_LISTING_ATTENDEE_QUERY_KEY: () => SET_LISTING_ATTENDEE_QUERY_KEY,
@@ -667,13 +670,11 @@ __export(index_exports, {
667
670
  SURVEY_SUBMISSION_QUERY_KEY: () => SURVEY_SUBMISSION_QUERY_KEY,
668
671
  SURVEY_SUBMISSION_SECTIONS_QUERY_KEY: () => SURVEY_SUBMISSION_SECTIONS_QUERY_KEY,
669
672
  SelectSelfEventRegistrationCoupon: () => SelectSelfEventRegistrationCoupon,
670
- SelfCreateActivity: () => SelfCreateActivity,
671
673
  SelfUpdateGroupMembership: () => SelfUpdateGroupMembership,
672
- SessionPassStatus: () => SessionPassStatus,
673
674
  SetContentPublishSchedule: () => SetContentPublishSchedule,
674
675
  StartSurvey: () => StartSurvey,
675
676
  SubmitSelfEventRegistration: () => SubmitSelfEventRegistration,
676
- SubmitSelfEventRegistrationSessionPasses: () => SubmitSelfEventRegistrationSessionPasses,
677
+ SubmitSelfEventSessionRegistration: () => SubmitSelfEventSessionRegistration,
677
678
  SubmitSurvey: () => SubmitSurvey,
678
679
  SubscriptionStatus: () => SubscriptionStatus,
679
680
  SupportTicketType: () => SupportTicketType,
@@ -803,6 +804,7 @@ __export(index_exports, {
803
804
  useConnectedMutation: () => useConnectedMutation,
804
805
  useConnectedSingleQuery: () => useConnectedSingleQuery,
805
806
  useConnectedXM: () => useConnectedXM,
807
+ useCreateActivity: () => useCreateActivity,
806
808
  useCreateChannel: () => useCreateChannel,
807
809
  useCreateChannelCollection: () => useCreateChannelCollection,
808
810
  useCreateChannelContent: () => useCreateChannelContent,
@@ -839,7 +841,6 @@ __export(index_exports, {
839
841
  useDeleteListingQuestion: () => useDeleteListingQuestion,
840
842
  useDeleteListingSession: () => useDeleteListingSession,
841
843
  useDeleteListingSpeaker: () => useDeleteListingSpeaker,
842
- useDeleteReshare: () => useDeleteReshare,
843
844
  useDeleteSelf: () => useDeleteSelf,
844
845
  useDeleteSelfAddress: () => useDeleteSelfAddress,
845
846
  useDeleteSelfChatChannel: () => useDeleteSelfChatChannel,
@@ -942,6 +943,7 @@ __export(index_exports, {
942
943
  useGetLevel: () => useGetLevel,
943
944
  useGetLevelSponsors: () => useGetLevelSponsors,
944
945
  useGetLevels: () => useGetLevels,
946
+ useGetLinkPreview: () => useGetLinkPreview,
945
947
  useGetListingAttendeePassQuestionSections: () => useGetListingAttendeePassQuestionSections,
946
948
  useGetManagedChannel: () => useGetManagedChannel,
947
949
  useGetManagedChannelCollection: () => useGetManagedChannelCollection,
@@ -981,7 +983,6 @@ __export(index_exports, {
981
983
  useGetSelfEventAttendeePassAddOnsIntent: () => useGetSelfEventAttendeePassAddOnsIntent,
982
984
  useGetSelfEventAttendeePassQuestionSections: () => useGetSelfEventAttendeePassQuestionSections,
983
985
  useGetSelfEventAttendeePayment: () => useGetSelfEventAttendeePayment,
984
- useGetSelfEventAttendeeSessionPassesIntent: () => useGetSelfEventAttendeeSessionPassesIntent,
985
986
  useGetSelfEventAttendeeTransferAccounts: () => useGetSelfEventAttendeeTransferAccounts,
986
987
  useGetSelfEventAttendeeTransfersLogs: () => useGetSelfEventAttendeeTransfersLogs,
987
988
  useGetSelfEventListing: () => useGetSelfEventListing,
@@ -1002,6 +1003,7 @@ __export(index_exports, {
1002
1003
  useGetSelfEventRegistrationPassTypes: () => useGetSelfEventRegistrationPassTypes,
1003
1004
  useGetSelfEventRegistrationQuestions: () => useGetSelfEventRegistrationQuestions,
1004
1005
  useGetSelfEventRegistrationRoomTypes: () => useGetSelfEventRegistrationRoomTypes,
1006
+ useGetSelfEventSessionRegistrationIntent: () => useGetSelfEventSessionRegistrationIntent,
1005
1007
  useGetSelfEventSessions: () => useGetSelfEventSessions,
1006
1008
  useGetSelfEventTicketCouponIntent: () => useGetSelfEventTicketCouponIntent,
1007
1009
  useGetSelfEvents: () => useGetSelfEvents,
@@ -1068,14 +1070,12 @@ __export(index_exports, {
1068
1070
  useRemoveSelfEventSession: () => useRemoveSelfEventSession,
1069
1071
  useRemoveThreadMessageReaction: () => useRemoveThreadMessageReaction,
1070
1072
  useReportActivity: () => useReportActivity,
1071
- useReshareActivity: () => useReshareActivity,
1072
1073
  useSelectSelfEventRegistrationCoupon: () => useSelectSelfEventRegistrationCoupon,
1073
- useSelfCreateActivity: () => useSelfCreateActivity,
1074
1074
  useSelfUpdateGroupMembership: () => useSelfUpdateGroupMembership,
1075
1075
  useSetContentPublishSchedule: () => useSetContentPublishSchedule,
1076
1076
  useStartSurvey: () => useStartSurvey,
1077
1077
  useSubmitSelfEventRegistration: () => useSubmitSelfEventRegistration,
1078
- useSubmitSelfEventRegistrationSessionPasses: () => useSubmitSelfEventRegistrationSessionPasses,
1078
+ useSubmitSelfEventSessionRegistration: () => useSubmitSelfEventSessionRegistration,
1079
1079
  useSubmitSurvey: () => useSubmitSurvey,
1080
1080
  useTransferPass: () => useTransferPass,
1081
1081
  useUnblockAccount: () => useUnblockAccount,
@@ -1270,6 +1270,13 @@ var isTypeAccount = (account) => {
1270
1270
  var isSelf = (account) => {
1271
1271
  return account.email !== void 0;
1272
1272
  };
1273
+ var ActivityEntityType = /* @__PURE__ */ ((ActivityEntityType2) => {
1274
+ ActivityEntityType2["mention"] = "mention";
1275
+ ActivityEntityType2["interest"] = "interest";
1276
+ ActivityEntityType2["link"] = "link";
1277
+ ActivityEntityType2["segment"] = "segment";
1278
+ return ActivityEntityType2;
1279
+ })(ActivityEntityType || {});
1273
1280
  var isTypeActivity = (activity) => {
1274
1281
  return activity._count !== void 0;
1275
1282
  };
@@ -1381,12 +1388,6 @@ var isTypeSpeaker = (speaker) => {
1381
1388
  var isTypeSession = (session) => {
1382
1389
  return session.longDescription !== void 0;
1383
1390
  };
1384
- var SessionPassStatus = /* @__PURE__ */ ((SessionPassStatus2) => {
1385
- SessionPassStatus2["draft"] = "draft";
1386
- SessionPassStatus2["ready"] = "ready";
1387
- SessionPassStatus2["canceled"] = "canceled";
1388
- return SessionPassStatus2;
1389
- })(SessionPassStatus || {});
1390
1391
  var isTypeEventPage = (page) => {
1391
1392
  return page.html !== void 0;
1392
1393
  };
@@ -7356,19 +7357,19 @@ var useGetSelfEventAttendeeTransferAccounts = (eventId, passId, search, options
7356
7357
  );
7357
7358
  };
7358
7359
 
7359
- // src/queries/self/attendee/sessions/useGetSelfEventRegistrationSessionPassesIntent.ts
7360
- var SELF_EVENT_ATTENDEE_SESSION_PASSES_INTENT_QUERY_KEY = (eventId, sessionId, addressId, sessionPassIds) => [
7360
+ // src/queries/self/attendee/sessions/useGetSelfEventSessionRegistrationIntent.ts
7361
+ var SELF_EVENT_ATTENDEE_SESSION_PASSES_INTENT_QUERY_KEY = (eventId, sessionId, addressId, accessIds) => [
7361
7362
  ...SELF_EVENT_ATTENDEE_QUERY_KEY(eventId),
7362
7363
  sessionId,
7363
7364
  addressId,
7364
7365
  "SESSION_PASSES_INTENT",
7365
- ...sessionPassIds
7366
+ ...accessIds
7366
7367
  ];
7367
- var GetSelfEventAttendeeSessionPassesIntent = async ({
7368
+ var GetSelfEventSessionRegistrationIntent = async ({
7368
7369
  eventId,
7369
7370
  sessionId,
7370
7371
  addressId,
7371
- sessionPasses,
7372
+ accesses,
7372
7373
  clientApiParams
7373
7374
  }) => {
7374
7375
  const clientApi = await GetClientAPI(clientApiParams);
@@ -7376,25 +7377,25 @@ var GetSelfEventAttendeeSessionPassesIntent = async ({
7376
7377
  `/self/events/${eventId}/attendee/sessions/${sessionId}/intent`,
7377
7378
  {
7378
7379
  addressId,
7379
- sessionPasses
7380
+ accesses
7380
7381
  }
7381
7382
  );
7382
7383
  return data;
7383
7384
  };
7384
- var useGetSelfEventAttendeeSessionPassesIntent = (eventId, sessionId, addressId, sessionPasses, options = {}) => {
7385
+ var useGetSelfEventSessionRegistrationIntent = (eventId, sessionId, addressId, accesses, options = {}) => {
7385
7386
  const { authenticated } = useConnectedXM();
7386
7387
  return useConnectedSingleQuery_default(
7387
7388
  SELF_EVENT_ATTENDEE_SESSION_PASSES_INTENT_QUERY_KEY(
7388
7389
  eventId,
7389
7390
  sessionId,
7390
7391
  addressId,
7391
- sessionPasses.map(({ passId }) => passId)
7392
+ accesses.map(({ passId }) => passId)
7392
7393
  ),
7393
- (params) => GetSelfEventAttendeeSessionPassesIntent({
7394
+ (params) => GetSelfEventSessionRegistrationIntent({
7394
7395
  eventId,
7395
7396
  sessionId,
7396
7397
  addressId,
7397
- sessionPasses,
7398
+ accesses,
7398
7399
  ...params
7399
7400
  }),
7400
7401
  {
@@ -7402,7 +7403,7 @@ var useGetSelfEventAttendeeSessionPassesIntent = (eventId, sessionId, addressId,
7402
7403
  retry: false,
7403
7404
  retryOnMount: false,
7404
7405
  ...options,
7405
- enabled: !!authenticated && !!eventId && !!sessionId && !!addressId && !!sessionPasses && (options?.enabled ?? true)
7406
+ enabled: !!authenticated && !!eventId && !!sessionId && !!addressId && !!accesses && (options?.enabled ?? true)
7406
7407
  }
7407
7408
  );
7408
7409
  };
@@ -9729,6 +9730,41 @@ var useGetSurveyQuestionSearchValues = (surveyId = "", questionId = "", params =
9729
9730
  );
9730
9731
  };
9731
9732
 
9733
+ // src/queries/link-previews/useGetLinkPreview.ts
9734
+ var LINK_PREVIEW_QUERY_KEY = (href) => [
9735
+ "LINK_PREVIEW",
9736
+ encodeURIComponent(href)
9737
+ ];
9738
+ var SET_LINK_PREVIEW_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
9739
+ client.setQueryData(
9740
+ [
9741
+ ...LINK_PREVIEW_QUERY_KEY(...keyParams),
9742
+ ...GetBaseSingleQueryKeys(...baseKeys)
9743
+ ],
9744
+ response
9745
+ );
9746
+ };
9747
+ var GetLinkPreview = async ({
9748
+ href,
9749
+ clientApiParams
9750
+ }) => {
9751
+ const clientApi = await GetClientAPI(clientApiParams);
9752
+ const { data } = await clientApi.get(
9753
+ `/storage/link-preview?href=${encodeURIComponent(href)}`
9754
+ );
9755
+ return data;
9756
+ };
9757
+ var useGetLinkPreview = (href = "", options = {}) => {
9758
+ return useConnectedSingleQuery(
9759
+ LINK_PREVIEW_QUERY_KEY(href),
9760
+ (_params) => GetLinkPreview({ href, ..._params }),
9761
+ {
9762
+ ...options,
9763
+ enabled: !!href && (options?.enabled ?? true)
9764
+ }
9765
+ );
9766
+ };
9767
+
9732
9768
  // src/mutations/useConnectedMutation.ts
9733
9769
  var import_react_query4 = require("@tanstack/react-query");
9734
9770
  var useConnectedMutation = (mutation, options) => {
@@ -9904,21 +9940,21 @@ var useUnblockAccount = (options = {}) => {
9904
9940
  return useConnectedMutation_default(UnblockAccount, options);
9905
9941
  };
9906
9942
 
9907
- // src/mutations/activities/optimistic/UpdateReshares.ts
9943
+ // src/mutations/activities/optimistic/UpdateComments.ts
9908
9944
  var import_immer4 = require("immer");
9909
- var UpdateResharesSingle = (increment, queryClient, KEY) => {
9945
+ var UpdateCommentsSingle = (increment, queryClient, KEY) => {
9910
9946
  queryClient.setQueryData(
9911
9947
  KEY,
9912
9948
  (originalData) => (0, import_immer4.produce)(originalData, (draft) => {
9913
9949
  if (!draft?.data) {
9914
9950
  return;
9915
9951
  }
9916
- draft.data._count.reshares += increment ? 1 : -1;
9917
- draft.data.reshares = increment ? [{ id: Date.now().toString() }] : [];
9952
+ draft.data._count.comments += increment ? 1 : -1;
9953
+ draft.data.comments = increment ? [{ id: Date.now().toString() }] : [];
9918
9954
  })
9919
9955
  );
9920
9956
  };
9921
- var UpdateResharesInfinite = (increment, queryClient, KEY, activityId) => {
9957
+ var UpdateCommentsInfinite = (increment, queryClient, KEY, activityId) => {
9922
9958
  queryClient.setQueriesData(
9923
9959
  { queryKey: KEY, exact: false },
9924
9960
  (originalData) => (0, import_immer4.produce)(originalData, (draft) => {
@@ -9928,8 +9964,8 @@ var UpdateResharesInfinite = (increment, queryClient, KEY, activityId) => {
9928
9964
  for (const page of draft.pages) {
9929
9965
  for (const activity of page.data) {
9930
9966
  if (activity.id === activityId) {
9931
- activity._count.reshares += increment ? 1 : -1;
9932
- activity.reshares = increment ? [{ id: Date.now().toString() }] : [];
9967
+ activity._count.comments += increment ? 1 : -1;
9968
+ activity.comments = increment ? [{ id: Date.now().toString() }] : [];
9933
9969
  }
9934
9970
  }
9935
9971
  }
@@ -9937,32 +9973,125 @@ var UpdateResharesInfinite = (increment, queryClient, KEY, activityId) => {
9937
9973
  );
9938
9974
  };
9939
9975
 
9940
- // src/mutations/activities/useDeleteReshare.ts
9941
- var DeleteReshare = async ({
9942
- activityId,
9976
+ // src/mutations/activities/useCreateActivity.ts
9977
+ var CreateActivity = async ({
9978
+ activity,
9943
9979
  clientApiParams,
9944
9980
  queryClient
9945
9981
  }) => {
9946
9982
  if (queryClient) {
9947
- UpdateResharesSingle(false, queryClient, [
9948
- ...ACTIVITY_QUERY_KEY(activityId),
9949
- ...GetBaseSingleQueryKeys(clientApiParams.locale)
9950
- ]);
9951
- UpdateResharesInfinite(
9952
- false,
9953
- queryClient,
9954
- ACTIVITIES_QUERY_KEY(),
9955
- activityId
9956
- );
9983
+ if (activity.commentedId) {
9984
+ UpdateCommentsSingle(true, queryClient, [
9985
+ ...ACTIVITY_QUERY_KEY(activity.commentedId),
9986
+ ...GetBaseSingleQueryKeys(clientApiParams.locale)
9987
+ ]);
9988
+ UpdateCommentsInfinite(
9989
+ true,
9990
+ queryClient,
9991
+ [...ACTIVITIES_QUERY_KEY(), clientApiParams.locale],
9992
+ activity.commentedId
9993
+ );
9994
+ }
9957
9995
  }
9996
+ const clientApi = await GetClientAPI(clientApiParams);
9997
+ const { data } = await clientApi.post(
9998
+ `/self/activities`,
9999
+ activity
10000
+ );
10001
+ if (queryClient && data.status === "ok") {
10002
+ let nested = false;
10003
+ if (activity.commentedId) {
10004
+ nested = true;
10005
+ AppendInfiniteQuery(
10006
+ queryClient,
10007
+ [
10008
+ ...ACTIVITY_COMMENTS_QUERY_KEY(activity.commentedId),
10009
+ ...GetBaseInfiniteQueryKeys(clientApiParams.locale)
10010
+ ],
10011
+ data.data
10012
+ );
10013
+ }
10014
+ if (activity.contentId && data.data.content) {
10015
+ nested = true;
10016
+ AppendInfiniteQuery(
10017
+ queryClient,
10018
+ [
10019
+ ...CHANNEL_CONTENT_ACTIVITIES_QUERY_KEY(
10020
+ data.data.content.channel.slug,
10021
+ activity.contentId
10022
+ ),
10023
+ ...GetBaseInfiniteQueryKeys(clientApiParams.locale)
10024
+ ],
10025
+ data.data
10026
+ );
10027
+ AppendInfiniteQuery(
10028
+ queryClient,
10029
+ [
10030
+ ...CHANNEL_CONTENT_ACTIVITIES_QUERY_KEY(
10031
+ data.data.content.channel.id,
10032
+ activity.contentId
10033
+ ),
10034
+ ...GetBaseInfiniteQueryKeys(clientApiParams.locale)
10035
+ ],
10036
+ data.data
10037
+ );
10038
+ }
10039
+ if (activity.eventId) {
10040
+ nested = true;
10041
+ AppendInfiniteQuery(
10042
+ queryClient,
10043
+ [
10044
+ ...EVENT_ACTIVITIES_QUERY_KEY(activity.eventId),
10045
+ ...GetBaseInfiniteQueryKeys(clientApiParams.locale)
10046
+ ],
10047
+ data.data
10048
+ );
10049
+ }
10050
+ if (activity.groupId) {
10051
+ nested = true;
10052
+ AppendInfiniteQuery(
10053
+ queryClient,
10054
+ [
10055
+ ...GROUP_ACTIVITIES_QUERY_KEY(activity.groupId),
10056
+ ...GetBaseInfiniteQueryKeys(clientApiParams.locale)
10057
+ ],
10058
+ data.data
10059
+ );
10060
+ }
10061
+ if (!nested) {
10062
+ AppendInfiniteQuery(
10063
+ queryClient,
10064
+ [
10065
+ ...ACTIVITIES_QUERY_KEY(),
10066
+ ...GetBaseInfiniteQueryKeys(clientApiParams.locale)
10067
+ ],
10068
+ data.data
10069
+ );
10070
+ }
10071
+ }
10072
+ return data;
10073
+ };
10074
+ var useCreateActivity = (options = {}) => {
10075
+ return useConnectedMutation_default(CreateActivity, options);
10076
+ };
10077
+
10078
+ // src/mutations/activities/useDeleteActivity.ts
10079
+ var DeleteActivity = async ({
10080
+ activityId,
10081
+ clientApiParams,
10082
+ queryClient
10083
+ }) => {
9958
10084
  const clientApi = await GetClientAPI(clientApiParams);
9959
10085
  const { data } = await clientApi.delete(
9960
- `/self/activities/${activityId}/reshares`
10086
+ `/activities/${activityId}`
9961
10087
  );
10088
+ if (queryClient && data.status === "ok") {
10089
+ queryClient.invalidateQueries({ queryKey: ACTIVITIES_QUERY_KEY() });
10090
+ }
9962
10091
  return data;
9963
10092
  };
9964
- var useDeleteReshare = (options = {}) => {
9965
- return useConnectedMutation_default(DeleteReshare, options);
10093
+ var useDeleteActivity = (options = {}) => {
10094
+ return useConnectedMutation_default(DeleteActivity, options);
9966
10095
  };
9967
10096
 
9968
10097
  // src/mutations/activities/optimistic/UpdateLikes.ts
@@ -10013,7 +10142,7 @@ var LikeActivity = async ({
10013
10142
  }
10014
10143
  const clientApi = await GetClientAPI(clientApiParams);
10015
10144
  const { data } = await clientApi.post(
10016
- `/self/activities/${activityId}/likes`
10145
+ `/activities/${activityId}/likes`
10017
10146
  );
10018
10147
  return data;
10019
10148
  };
@@ -10021,37 +10150,6 @@ var useLikeActivity = (options = {}) => {
10021
10150
  return useConnectedMutation_default(LikeActivity, options);
10022
10151
  };
10023
10152
 
10024
- // src/mutations/activities/useReshareActivity.ts
10025
- var ReshareActivity = async ({
10026
- activityId,
10027
- queryClient,
10028
- clientApiParams
10029
- }) => {
10030
- if (queryClient) {
10031
- UpdateResharesSingle(true, queryClient, [
10032
- ...ACTIVITY_QUERY_KEY(activityId),
10033
- ...GetBaseSingleQueryKeys(clientApiParams.locale)
10034
- ]);
10035
- UpdateResharesInfinite(
10036
- true,
10037
- queryClient,
10038
- ACTIVITIES_QUERY_KEY(),
10039
- activityId
10040
- );
10041
- }
10042
- const clientApi = await GetClientAPI(clientApiParams);
10043
- const { data } = await clientApi.post(
10044
- `/self/activities/${activityId}/reshares`,
10045
- {
10046
- message: ""
10047
- }
10048
- );
10049
- return data;
10050
- };
10051
- var useReshareActivity = (options = {}) => {
10052
- return useConnectedMutation_default(ReshareActivity, options);
10053
- };
10054
-
10055
10153
  // src/mutations/activities/useUnlikeActivity.ts
10056
10154
  var UnlikeActivity = async ({
10057
10155
  activityId,
@@ -10067,7 +10165,7 @@ var UnlikeActivity = async ({
10067
10165
  }
10068
10166
  const clientApi = await GetClientAPI(clientApiParams);
10069
10167
  const { data } = await clientApi.delete(
10070
- `/self/activities/${activityId}/likes`
10168
+ `/activities/${activityId}/likes`
10071
10169
  );
10072
10170
  return data;
10073
10171
  };
@@ -11574,18 +11672,18 @@ var useCancelPass = (options = {}) => {
11574
11672
  return useConnectedMutation_default(CancelPass, options);
11575
11673
  };
11576
11674
 
11577
- // src/mutations/self/events/attendee/sessions/useSubmitSelfEventAttendeeSessionPasses.ts
11578
- var SubmitSelfEventRegistrationSessionPasses = async ({
11675
+ // src/mutations/self/events/attendee/sessions/useSubmitSelfEventSessionRegistration.ts
11676
+ var SubmitSelfEventSessionRegistration = async ({
11579
11677
  eventId,
11580
11678
  sessionId,
11581
- sessionPasses,
11679
+ accesses,
11582
11680
  clientApiParams,
11583
11681
  queryClient
11584
11682
  }) => {
11585
11683
  const clientApi = await GetClientAPI(clientApiParams);
11586
11684
  const { data } = await clientApi.post(
11587
11685
  `/self/events/${eventId}/attendee/sessions/${sessionId}/submit`,
11588
- sessionPasses
11686
+ accesses
11589
11687
  );
11590
11688
  if (queryClient && data.status === "ok") {
11591
11689
  queryClient.invalidateQueries({
@@ -11600,8 +11698,8 @@ var SubmitSelfEventRegistrationSessionPasses = async ({
11600
11698
  }
11601
11699
  return data;
11602
11700
  };
11603
- var useSubmitSelfEventRegistrationSessionPasses = (options = {}) => {
11604
- return useConnectedMutation_default(SubmitSelfEventRegistrationSessionPasses, options);
11701
+ var useSubmitSelfEventSessionRegistration = (options = {}) => {
11702
+ return useConnectedMutation_default(SubmitSelfEventSessionRegistration, options);
11605
11703
  };
11606
11704
 
11607
11705
  // src/mutations/self/subscriptions/useCancelSubscription.ts
@@ -11793,166 +11891,6 @@ var useRemoveSelfEventSession = (options = {}) => {
11793
11891
  return useConnectedMutation_default(RemoveSelfEventSession, options);
11794
11892
  };
11795
11893
 
11796
- // src/mutations/activities/optimistic/UpdateComments.ts
11797
- var import_immer6 = require("immer");
11798
- var UpdateCommentsSingle = (increment, queryClient, KEY) => {
11799
- queryClient.setQueryData(
11800
- KEY,
11801
- (originalData) => (0, import_immer6.produce)(originalData, (draft) => {
11802
- if (!draft?.data) {
11803
- return;
11804
- }
11805
- draft.data._count.comments += increment ? 1 : -1;
11806
- draft.data.comments = increment ? [{ id: Date.now().toString() }] : [];
11807
- })
11808
- );
11809
- };
11810
- var UpdateCommentsInfinite = (increment, queryClient, KEY, activityId) => {
11811
- queryClient.setQueriesData(
11812
- { queryKey: KEY, exact: false },
11813
- (originalData) => (0, import_immer6.produce)(originalData, (draft) => {
11814
- if (!draft?.pages || draft.pages.length === 0) {
11815
- return;
11816
- }
11817
- for (const page of draft.pages) {
11818
- for (const activity of page.data) {
11819
- if (activity.id === activityId) {
11820
- activity._count.comments += increment ? 1 : -1;
11821
- activity.comments = increment ? [{ id: Date.now().toString() }] : [];
11822
- }
11823
- }
11824
- }
11825
- })
11826
- );
11827
- };
11828
-
11829
- // src/mutations/self/useSelfCreateActivity.ts
11830
- var SelfCreateActivity = async ({
11831
- activity,
11832
- base64Image,
11833
- interests,
11834
- clientApiParams,
11835
- queryClient
11836
- }) => {
11837
- if (queryClient) {
11838
- if (activity.commentedId) {
11839
- UpdateCommentsSingle(true, queryClient, [
11840
- ...ACTIVITY_QUERY_KEY(activity.commentedId),
11841
- ...GetBaseSingleQueryKeys(clientApiParams.locale)
11842
- ]);
11843
- UpdateCommentsInfinite(
11844
- true,
11845
- queryClient,
11846
- [...ACTIVITIES_QUERY_KEY(), clientApiParams.locale],
11847
- activity.commentedId
11848
- );
11849
- }
11850
- }
11851
- const clientApi = await GetClientAPI(clientApiParams);
11852
- const { data } = await clientApi.post(
11853
- `/self/activities`,
11854
- {
11855
- activity,
11856
- imageUri: base64Image ?? void 0,
11857
- interests: interests ?? void 0
11858
- }
11859
- );
11860
- if (queryClient && data.status === "ok") {
11861
- let nested = false;
11862
- if (activity.commentedId) {
11863
- nested = true;
11864
- AppendInfiniteQuery(
11865
- queryClient,
11866
- [
11867
- ...ACTIVITY_COMMENTS_QUERY_KEY(activity.commentedId),
11868
- ...GetBaseInfiniteQueryKeys(clientApiParams.locale)
11869
- ],
11870
- data.data
11871
- );
11872
- }
11873
- if (activity.contentId && data.data.content) {
11874
- nested = true;
11875
- AppendInfiniteQuery(
11876
- queryClient,
11877
- [
11878
- ...CHANNEL_CONTENT_ACTIVITIES_QUERY_KEY(
11879
- data.data.content.channel.slug,
11880
- activity.contentId
11881
- ),
11882
- ...GetBaseInfiniteQueryKeys(clientApiParams.locale)
11883
- ],
11884
- data.data
11885
- );
11886
- AppendInfiniteQuery(
11887
- queryClient,
11888
- [
11889
- ...CHANNEL_CONTENT_ACTIVITIES_QUERY_KEY(
11890
- data.data.content.channel.id,
11891
- activity.contentId
11892
- ),
11893
- ...GetBaseInfiniteQueryKeys(clientApiParams.locale)
11894
- ],
11895
- data.data
11896
- );
11897
- }
11898
- if (activity.eventId) {
11899
- nested = true;
11900
- AppendInfiniteQuery(
11901
- queryClient,
11902
- [
11903
- ...EVENT_ACTIVITIES_QUERY_KEY(activity.eventId),
11904
- ...GetBaseInfiniteQueryKeys(clientApiParams.locale)
11905
- ],
11906
- data.data
11907
- );
11908
- }
11909
- if (activity.groupId) {
11910
- nested = true;
11911
- AppendInfiniteQuery(
11912
- queryClient,
11913
- [
11914
- ...GROUP_ACTIVITIES_QUERY_KEY(activity.groupId),
11915
- ...GetBaseInfiniteQueryKeys(clientApiParams.locale)
11916
- ],
11917
- data.data
11918
- );
11919
- }
11920
- if (!nested) {
11921
- AppendInfiniteQuery(
11922
- queryClient,
11923
- [
11924
- ...ACTIVITIES_QUERY_KEY(),
11925
- ...GetBaseInfiniteQueryKeys(clientApiParams.locale)
11926
- ],
11927
- data.data
11928
- );
11929
- }
11930
- }
11931
- return data;
11932
- };
11933
- var useSelfCreateActivity = (options = {}) => {
11934
- return useConnectedMutation_default(SelfCreateActivity, options);
11935
- };
11936
-
11937
- // src/mutations/self/useSelfDeleteActivity.ts
11938
- var DeleteActivity = async ({
11939
- activityId,
11940
- clientApiParams,
11941
- queryClient
11942
- }) => {
11943
- const clientApi = await GetClientAPI(clientApiParams);
11944
- const { data } = await clientApi.delete(
11945
- `/self/activities/${activityId}`
11946
- );
11947
- if (queryClient && data.status === "ok") {
11948
- queryClient.invalidateQueries({ queryKey: ACTIVITIES_QUERY_KEY() });
11949
- }
11950
- return data;
11951
- };
11952
- var useDeleteActivity = (options = {}) => {
11953
- return useConnectedMutation_default(DeleteActivity, options);
11954
- };
11955
-
11956
11894
  // src/mutations/self/useSelfUpdateGroupMembership.ts
11957
11895
  var SelfUpdateGroupMembership = async ({
11958
11896
  groupId,
@@ -13486,7 +13424,7 @@ var useUpdateThreadMessage = (options = {}) => {
13486
13424
  };
13487
13425
 
13488
13426
  // src/mutations/threads/useDeleteThreadMessage.ts
13489
- var import_immer7 = require("immer");
13427
+ var import_immer6 = require("immer");
13490
13428
  var DeleteThreadMessage = async ({
13491
13429
  threadId,
13492
13430
  messageId,
@@ -13510,7 +13448,7 @@ var DeleteThreadMessage = async ({
13510
13448
  ],
13511
13449
  (oldData) => {
13512
13450
  if (!oldData) return oldData;
13513
- return (0, import_immer7.produce)(oldData, (draft) => {
13451
+ return (0, import_immer6.produce)(oldData, (draft) => {
13514
13452
  draft.pages.forEach((page) => {
13515
13453
  const index = page.data.findIndex((m) => m.id === messageId);
13516
13454
  if (index !== -1) {
@@ -13775,6 +13713,7 @@ var useUploadSurveyResponseFile = (options = {}) => {
13775
13713
  AcceptGroupInvitation,
13776
13714
  AcceptGroupRequest,
13777
13715
  AccountType,
13716
+ ActivityEntityType,
13778
13717
  AddChannelCollectionContent,
13779
13718
  AddChannelInterest,
13780
13719
  AddContentInterest,
@@ -13828,6 +13767,7 @@ var useUploadSurveyResponseFile = (options = {}) => {
13828
13767
  ConnectedXMProvider,
13829
13768
  ContentGuestType,
13830
13769
  CouponType,
13770
+ CreateActivity,
13831
13771
  CreateChannel,
13832
13772
  CreateChannelCollection,
13833
13773
  CreateChannelContent,
@@ -13867,7 +13807,6 @@ var useUploadSurveyResponseFile = (options = {}) => {
13867
13807
  DeleteListingQuestion,
13868
13808
  DeleteListingSession,
13869
13809
  DeleteListingSpeaker,
13870
- DeleteReshare,
13871
13810
  DeleteSelf,
13872
13811
  DeleteSelfAddress,
13873
13812
  DeleteSelfChatChannel,
@@ -14027,6 +13966,7 @@ var useUploadSurveyResponseFile = (options = {}) => {
14027
13966
  GetLevel,
14028
13967
  GetLevelSponsors,
14029
13968
  GetLevels,
13969
+ GetLinkPreview,
14030
13970
  GetListingAttendeePassQuestionSections,
14031
13971
  GetManagedChannel,
14032
13972
  GetManagedChannelCollection,
@@ -14066,7 +14006,6 @@ var useUploadSurveyResponseFile = (options = {}) => {
14066
14006
  GetSelfEventAttendeePassAddOnsIntent,
14067
14007
  GetSelfEventAttendeePassQuestionSections,
14068
14008
  GetSelfEventAttendeePayment,
14069
- GetSelfEventAttendeeSessionPassesIntent,
14070
14009
  GetSelfEventAttendeeTransferAccounts,
14071
14010
  GetSelfEventAttendeeTransfersLogs,
14072
14011
  GetSelfEventListing,
@@ -14087,6 +14026,7 @@ var useUploadSurveyResponseFile = (options = {}) => {
14087
14026
  GetSelfEventRegistrationPassTypes,
14088
14027
  GetSelfEventRegistrationQuestions,
14089
14028
  GetSelfEventRegistrationRoomTypes,
14029
+ GetSelfEventSessionRegistrationIntent,
14090
14030
  GetSelfEventSessions,
14091
14031
  GetSelfEventTicketCouponIntent,
14092
14032
  GetSelfEvents,
@@ -14143,6 +14083,7 @@ var useUploadSurveyResponseFile = (options = {}) => {
14143
14083
  LEVELS_QUERY_KEY,
14144
14084
  LEVEL_QUERY_KEY,
14145
14085
  LEVEL_SPONSORS_QUERY_KEY,
14086
+ LINK_PREVIEW_QUERY_KEY,
14146
14087
  LISTINGS_QUERY_KEY,
14147
14088
  LISTING_ANNOUNCEMENTS_QUERY_KEY,
14148
14089
  LISTING_ANNOUNCEMENT_QUERY_KEY,
@@ -14205,7 +14146,6 @@ var useUploadSurveyResponseFile = (options = {}) => {
14205
14146
  RemoveSelfEventSession,
14206
14147
  RemoveThreadMessageReaction,
14207
14148
  ReportActivity,
14208
- ReshareActivity,
14209
14149
  SELF_ACTIVITIES_QUERY_KEY,
14210
14150
  SELF_ADDRESSES_QUERY_KEY,
14211
14151
  SELF_ADDRESS_QUERY_KEY,
@@ -14334,6 +14274,7 @@ var useUploadSurveyResponseFile = (options = {}) => {
14334
14274
  SET_LEVELS_QUERY_DATA,
14335
14275
  SET_LEVEL_QUERY_DATA,
14336
14276
  SET_LEVEL_SPONSORS_QUERY_DATA,
14277
+ SET_LINK_PREVIEW_QUERY_DATA,
14337
14278
  SET_LISTING_ANNOUNCEMENT_QUERY_KEY,
14338
14279
  SET_LISTING_ATTENDEE_PASS_QUESTION_SECTIONS_QUERY_DATA,
14339
14280
  SET_LISTING_ATTENDEE_QUERY_KEY,
@@ -14393,13 +14334,11 @@ var useUploadSurveyResponseFile = (options = {}) => {
14393
14334
  SURVEY_SUBMISSION_QUERY_KEY,
14394
14335
  SURVEY_SUBMISSION_SECTIONS_QUERY_KEY,
14395
14336
  SelectSelfEventRegistrationCoupon,
14396
- SelfCreateActivity,
14397
14337
  SelfUpdateGroupMembership,
14398
- SessionPassStatus,
14399
14338
  SetContentPublishSchedule,
14400
14339
  StartSurvey,
14401
14340
  SubmitSelfEventRegistration,
14402
- SubmitSelfEventRegistrationSessionPasses,
14341
+ SubmitSelfEventSessionRegistration,
14403
14342
  SubmitSurvey,
14404
14343
  SubscriptionStatus,
14405
14344
  SupportTicketType,
@@ -14529,6 +14468,7 @@ var useUploadSurveyResponseFile = (options = {}) => {
14529
14468
  useConnectedMutation,
14530
14469
  useConnectedSingleQuery,
14531
14470
  useConnectedXM,
14471
+ useCreateActivity,
14532
14472
  useCreateChannel,
14533
14473
  useCreateChannelCollection,
14534
14474
  useCreateChannelContent,
@@ -14565,7 +14505,6 @@ var useUploadSurveyResponseFile = (options = {}) => {
14565
14505
  useDeleteListingQuestion,
14566
14506
  useDeleteListingSession,
14567
14507
  useDeleteListingSpeaker,
14568
- useDeleteReshare,
14569
14508
  useDeleteSelf,
14570
14509
  useDeleteSelfAddress,
14571
14510
  useDeleteSelfChatChannel,
@@ -14668,6 +14607,7 @@ var useUploadSurveyResponseFile = (options = {}) => {
14668
14607
  useGetLevel,
14669
14608
  useGetLevelSponsors,
14670
14609
  useGetLevels,
14610
+ useGetLinkPreview,
14671
14611
  useGetListingAttendeePassQuestionSections,
14672
14612
  useGetManagedChannel,
14673
14613
  useGetManagedChannelCollection,
@@ -14707,7 +14647,6 @@ var useUploadSurveyResponseFile = (options = {}) => {
14707
14647
  useGetSelfEventAttendeePassAddOnsIntent,
14708
14648
  useGetSelfEventAttendeePassQuestionSections,
14709
14649
  useGetSelfEventAttendeePayment,
14710
- useGetSelfEventAttendeeSessionPassesIntent,
14711
14650
  useGetSelfEventAttendeeTransferAccounts,
14712
14651
  useGetSelfEventAttendeeTransfersLogs,
14713
14652
  useGetSelfEventListing,
@@ -14728,6 +14667,7 @@ var useUploadSurveyResponseFile = (options = {}) => {
14728
14667
  useGetSelfEventRegistrationPassTypes,
14729
14668
  useGetSelfEventRegistrationQuestions,
14730
14669
  useGetSelfEventRegistrationRoomTypes,
14670
+ useGetSelfEventSessionRegistrationIntent,
14731
14671
  useGetSelfEventSessions,
14732
14672
  useGetSelfEventTicketCouponIntent,
14733
14673
  useGetSelfEvents,
@@ -14794,14 +14734,12 @@ var useUploadSurveyResponseFile = (options = {}) => {
14794
14734
  useRemoveSelfEventSession,
14795
14735
  useRemoveThreadMessageReaction,
14796
14736
  useReportActivity,
14797
- useReshareActivity,
14798
14737
  useSelectSelfEventRegistrationCoupon,
14799
- useSelfCreateActivity,
14800
14738
  useSelfUpdateGroupMembership,
14801
14739
  useSetContentPublishSchedule,
14802
14740
  useStartSurvey,
14803
14741
  useSubmitSelfEventRegistration,
14804
- useSubmitSelfEventRegistrationSessionPasses,
14742
+ useSubmitSelfEventSessionRegistration,
14805
14743
  useSubmitSurvey,
14806
14744
  useTransferPass,
14807
14745
  useUnblockAccount,