@connectedxm/client 2.4.0 → 3.0.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
@@ -60,9 +60,8 @@ __export(index_exports, {
60
60
  AddSelfDelegate: () => AddSelfDelegate,
61
61
  AddSelfEventSession: () => AddSelfEventSession,
62
62
  AddSelfInterests: () => AddSelfInterests,
63
- AddThreadMember: () => AddThreadMember,
63
+ AddThreadCircleAccount: () => AddThreadCircleAccount,
64
64
  AddThreadMessageReaction: () => AddThreadMessageReaction,
65
- AddThreadMessageReply: () => AddThreadMessageReply,
66
65
  AdvertisementType: () => AdvertisementType,
67
66
  AppendInfiniteQuery: () => AppendInfiniteQuery,
68
67
  BENEFITS_QUERY_KEY: () => BENEFITS_QUERY_KEY,
@@ -90,7 +89,6 @@ __export(index_exports, {
90
89
  CONTENT_INTERESTS_QUERY_KEY: () => CONTENT_INTERESTS_QUERY_KEY,
91
90
  CONTENT_QUERY_KEY: () => CONTENT_QUERY_KEY,
92
91
  CUSTOM_ERROR_CODES: () => CUSTOM_ERROR_CODES,
93
- CacheIndividualQueries: () => CacheIndividualQueries,
94
92
  CancelBooking: () => CancelBooking,
95
93
  CancelGroupInvitation: () => CancelGroupInvitation,
96
94
  CancelGroupRequest: () => CancelGroupRequest,
@@ -126,7 +124,6 @@ __export(index_exports, {
126
124
  CreateSubscription: () => CreateSubscription,
127
125
  CreateSupportTicket: () => CreateSupportTicket,
128
126
  CreateTeamAccount: () => CreateTeamAccount,
129
- CreateThread: () => CreateThread,
130
127
  CreateThreadMessage: () => CreateThreadMessage,
131
128
  Currency: () => Currency,
132
129
  DayOfWeek: () => DayOfWeek,
@@ -150,7 +147,7 @@ __export(index_exports, {
150
147
  DeleteSelfChatChannelMessage: () => DeleteSelfChatChannelMessage,
151
148
  DeleteSelfLead: () => DeleteSelfLead,
152
149
  DeleteSelfPushDevice: () => DeleteSelfPushDevice,
153
- DeleteThreadMember: () => DeleteThreadMember,
150
+ DeleteThreadCircleAccount: () => DeleteThreadCircleAccount,
154
151
  DeleteThreadMessage: () => DeleteThreadMessage,
155
152
  DemoteGroupModerator: () => DemoteGroupModerator,
156
153
  DisableIntegration: () => DisableIntegration,
@@ -404,16 +401,12 @@ __export(index_exports, {
404
401
  GetSurveySubmissionSections: () => GetSurveySubmissionSections,
405
402
  GetSurveySubmissions: () => GetSurveySubmissions,
406
403
  GetThread: () => GetThread,
407
- GetThreadEvent: () => GetThreadEvent,
408
- GetThreadEvents: () => GetThreadEvents,
409
- GetThreadGroup: () => GetThreadGroup,
410
- GetThreadGroups: () => GetThreadGroups,
411
- GetThreadMember: () => GetThreadMember,
412
- GetThreadMembers: () => GetThreadMembers,
404
+ GetThreadCircle: () => GetThreadCircle,
405
+ GetThreadCircleAccount: () => GetThreadCircleAccount,
406
+ GetThreadCircleAccounts: () => GetThreadCircleAccounts,
407
+ GetThreadCircles: () => GetThreadCircles,
413
408
  GetThreadMessage: () => GetThreadMessage,
414
- GetThreadMessageReplies: () => GetThreadMessageReplies,
415
409
  GetThreadMessages: () => GetThreadMessages,
416
- GetThreads: () => GetThreads,
417
410
  GetVideo: () => GetVideo,
418
411
  GroupAccess: () => GroupAccess,
419
412
  GroupInvitationStatus: () => GroupInvitationStatus,
@@ -465,7 +458,6 @@ __export(index_exports, {
465
458
  MANAGED_CHANNEL_INTERESTS_QUERY_KEY: () => MANAGED_CHANNEL_INTERESTS_QUERY_KEY,
466
459
  MANAGED_CHANNEL_QUERY_KEY: () => MANAGED_CHANNEL_QUERY_KEY,
467
460
  MANAGED_CHANNEL_SUBSCRIBERS_QUERY_KEY: () => MANAGED_CHANNEL_SUBSCRIBERS_QUERY_KEY,
468
- MarkUnread: () => MarkUnread,
469
461
  MergeInfinitePages: () => MergeInfinitePages,
470
462
  NotificationType: () => NotificationType,
471
463
  ORGANIZATION_CONFIG_QUERY_KEY: () => ORGANIZATION_CONFIG_QUERY_KEY,
@@ -677,16 +669,12 @@ __export(index_exports, {
677
669
  SET_SERIES_QUERY_DATA: () => SET_SERIES_QUERY_DATA,
678
670
  SET_SURVEY_QUERY_DATA: () => SET_SURVEY_QUERY_DATA,
679
671
  SET_SURVEY_SUBMISSION_SECTIONS_QUERY_DATA: () => SET_SURVEY_SUBMISSION_SECTIONS_QUERY_DATA,
680
- SET_THREADS_QUERY_DATA: () => SET_THREADS_QUERY_DATA,
681
- SET_THREAD_EVENTS_QUERY_DATA: () => SET_THREAD_EVENTS_QUERY_DATA,
682
- SET_THREAD_EVENT_QUERY_DATA: () => SET_THREAD_EVENT_QUERY_DATA,
683
- SET_THREAD_GROUPS_QUERY_DATA: () => SET_THREAD_GROUPS_QUERY_DATA,
684
- SET_THREAD_GROUP_QUERY_DATA: () => SET_THREAD_GROUP_QUERY_DATA,
685
- SET_THREAD_MEMBERS_QUERY_DATA: () => SET_THREAD_MEMBERS_QUERY_DATA,
686
- SET_THREAD_MEMBER_QUERY_DATA: () => SET_THREAD_MEMBER_QUERY_DATA,
672
+ SET_THREAD_CIRCLES_QUERY_DATA: () => SET_THREAD_CIRCLES_QUERY_DATA,
673
+ SET_THREAD_CIRCLE_ACCOUNTS_QUERY_DATA: () => SET_THREAD_CIRCLE_ACCOUNTS_QUERY_DATA,
674
+ SET_THREAD_CIRCLE_ACCOUNT_QUERY_DATA: () => SET_THREAD_CIRCLE_ACCOUNT_QUERY_DATA,
675
+ SET_THREAD_CIRCLE_QUERY_DATA: () => SET_THREAD_CIRCLE_QUERY_DATA,
687
676
  SET_THREAD_MESSAGES_QUERY_DATA: () => SET_THREAD_MESSAGES_QUERY_DATA,
688
677
  SET_THREAD_MESSAGE_QUERY_DATA: () => SET_THREAD_MESSAGE_QUERY_DATA,
689
- SET_THREAD_MESSAGE_REPLIES_QUERY_DATA: () => SET_THREAD_MESSAGE_REPLIES_QUERY_DATA,
690
678
  SET_THREAD_QUERY_DATA: () => SET_THREAD_QUERY_DATA,
691
679
  SET_TRANSFER_ACCOUNTS_QUERY_DATA: () => SET_TRANSFER_ACCOUNTS_QUERY_DATA,
692
680
  SET_VIDEO_QUERY_DATA: () => SET_VIDEO_QUERY_DATA,
@@ -708,19 +696,14 @@ __export(index_exports, {
708
696
  SupportTicketType: () => SupportTicketType,
709
697
  SurveyQuestionType: () => SurveyQuestionType,
710
698
  THREADS_QUERY_KEY: () => THREADS_QUERY_KEY,
711
- THREAD_EVENTS_QUERY_KEY: () => THREAD_EVENTS_QUERY_KEY,
712
- THREAD_EVENT_QUERY_KEY: () => THREAD_EVENT_QUERY_KEY,
713
- THREAD_GROUPS_QUERY_KEY: () => THREAD_GROUPS_QUERY_KEY,
714
- THREAD_GROUP_QUERY_KEY: () => THREAD_GROUP_QUERY_KEY,
715
- THREAD_MEMBERS_QUERY_KEY: () => THREAD_MEMBERS_QUERY_KEY,
716
- THREAD_MEMBER_QUERY_KEY: () => THREAD_MEMBER_QUERY_KEY,
699
+ THREAD_CIRCLES_QUERY_KEY: () => THREAD_CIRCLES_QUERY_KEY,
700
+ THREAD_CIRCLE_ACCOUNTS_QUERY_KEY: () => THREAD_CIRCLE_ACCOUNTS_QUERY_KEY,
701
+ THREAD_CIRCLE_ACCOUNT_QUERY_KEY: () => THREAD_CIRCLE_ACCOUNT_QUERY_KEY,
702
+ THREAD_CIRCLE_QUERY_KEY: () => THREAD_CIRCLE_QUERY_KEY,
717
703
  THREAD_MESSAGES_QUERY_KEY: () => THREAD_MESSAGES_QUERY_KEY,
718
704
  THREAD_MESSAGE_QUERY_KEY: () => THREAD_MESSAGE_QUERY_KEY,
719
- THREAD_MESSAGE_REPLIES_QUERY_KEY: () => THREAD_MESSAGE_REPLIES_QUERY_KEY,
720
705
  THREAD_QUERY_KEY: () => THREAD_QUERY_KEY,
721
- ThreadAccessLevel: () => ThreadAccessLevel,
722
- ThreadInvitationStatus: () => ThreadInvitationStatus,
723
- ThreadMemberRole: () => ThreadMemberRole,
706
+ ThreadCircleAccountRole: () => ThreadCircleAccountRole,
724
707
  ThreadMessageType: () => ThreadMessageType,
725
708
  TicketEventAccessLevel: () => TicketEventAccessLevel,
726
709
  TicketVisibility: () => TicketVisibility,
@@ -762,7 +745,8 @@ __export(index_exports, {
762
745
  UpdateSubscriptionPaymentMethod: () => UpdateSubscriptionPaymentMethod,
763
746
  UpdateSurveyResponse: () => UpdateSurveyResponse,
764
747
  UpdateThread: () => UpdateThread,
765
- UpdateThreadMember: () => UpdateThreadMember,
748
+ UpdateThreadCircle: () => UpdateThreadCircle,
749
+ UpdateThreadCircleAccount: () => UpdateThreadCircleAccount,
766
750
  UpdateThreadMessage: () => UpdateThreadMessage,
767
751
  UploadChannelContentImage: () => UploadChannelContentImage,
768
752
  UploadFile: () => UploadFile,
@@ -820,9 +804,8 @@ __export(index_exports, {
820
804
  useAddSelfDelegate: () => useAddSelfDelegate,
821
805
  useAddSelfEventSession: () => useAddSelfEventSession,
822
806
  useAddSelfInterests: () => useAddSelfInterests,
823
- useAddThreadMember: () => useAddThreadMember,
807
+ useAddThreadCircleAccount: () => useAddThreadCircleAccount,
824
808
  useAddThreadMessageReaction: () => useAddThreadMessageReaction,
825
- useAddThreadMessageReply: () => useAddThreadMessageReply,
826
809
  useBlockAccount: () => useBlockAccount,
827
810
  useBlockIntegration: () => useBlockIntegration,
828
811
  useCancelBooking: () => useCancelBooking,
@@ -861,7 +844,6 @@ __export(index_exports, {
861
844
  useCreateSubscription: () => useCreateSubscription,
862
845
  useCreateSupportTicket: () => useCreateSupportTicket,
863
846
  useCreateTeamAccount: () => useCreateTeamAccount,
864
- useCreateThread: () => useCreateThread,
865
847
  useCreateThreadMessage: () => useCreateThreadMessage,
866
848
  useDeactivateGroup: () => useDeactivateGroup,
867
849
  useDeleteActivity: () => useDeleteActivity,
@@ -882,7 +864,7 @@ __export(index_exports, {
882
864
  useDeleteSelfChatChannelMessage: () => useDeleteSelfChatChannelMessage,
883
865
  useDeleteSelfLead: () => useDeleteSelfLead,
884
866
  useDeleteSelfPushDevice: () => useDeleteSelfPushDevice,
885
- useDeleteThreadMember: () => useDeleteThreadMember,
867
+ useDeleteThreadCircleAccount: () => useDeleteThreadCircleAccount,
886
868
  useDeleteThreadMessage: () => useDeleteThreadMessage,
887
869
  useDemoteGroupModerator: () => useDemoteGroupModerator,
888
870
  useDisableIntegration: () => useDisableIntegration,
@@ -1078,16 +1060,12 @@ __export(index_exports, {
1078
1060
  useGetSurveySubmissionSections: () => useGetSurveySubmissionSections,
1079
1061
  useGetSurveySubmissions: () => useGetSurveySubmissions,
1080
1062
  useGetThread: () => useGetThread,
1081
- useGetThreadEvent: () => useGetThreadEvent,
1082
- useGetThreadEvents: () => useGetThreadEvents,
1083
- useGetThreadGroup: () => useGetThreadGroup,
1084
- useGetThreadGroups: () => useGetThreadGroups,
1085
- useGetThreadMember: () => useGetThreadMember,
1086
- useGetThreadMembers: () => useGetThreadMembers,
1063
+ useGetThreadCircle: () => useGetThreadCircle,
1064
+ useGetThreadCircleAccount: () => useGetThreadCircleAccount,
1065
+ useGetThreadCircleAccounts: () => useGetThreadCircleAccounts,
1066
+ useGetThreadCircles: () => useGetThreadCircles,
1087
1067
  useGetThreadMessage: () => useGetThreadMessage,
1088
- useGetThreadMessageReplies: () => useGetThreadMessageReplies,
1089
1068
  useGetThreadMessages: () => useGetThreadMessages,
1090
- useGetThreads: () => useGetThreads,
1091
1069
  useGetVideo: () => useGetVideo,
1092
1070
  useGroupStatus: () => useGroupStatus,
1093
1071
  useIsAccountFollowing: () => useIsAccountFollowing,
@@ -1098,7 +1076,6 @@ __export(index_exports, {
1098
1076
  useLeaveSelfChatChannel: () => useLeaveSelfChatChannel,
1099
1077
  useLikeActivity: () => useLikeActivity,
1100
1078
  useLikeContent: () => useLikeContent,
1101
- useMarkUnread: () => useMarkUnread,
1102
1079
  usePromoteGroupMember: () => usePromoteGroupMember,
1103
1080
  useReinviteGroupInvitation: () => useReinviteGroupInvitation,
1104
1081
  useRejectGroupInvitation: () => useRejectGroupInvitation,
@@ -1160,7 +1137,8 @@ __export(index_exports, {
1160
1137
  useUpdateSubscriptionPaymentMethod: () => useUpdateSubscriptionPaymentMethod,
1161
1138
  useUpdateSurveyResponse: () => useUpdateSurveyResponse,
1162
1139
  useUpdateThread: () => useUpdateThread,
1163
- useUpdateThreadMember: () => useUpdateThreadMember,
1140
+ useUpdateThreadCircle: () => useUpdateThreadCircle,
1141
+ useUpdateThreadCircleAccount: () => useUpdateThreadCircleAccount,
1164
1142
  useUpdateThreadMessage: () => useUpdateThreadMessage,
1165
1143
  useUploadChannelContentImage: () => useUploadChannelContentImage,
1166
1144
  useUploadFile: () => useUploadFile,
@@ -1578,21 +1556,12 @@ var EventEmailType = /* @__PURE__ */ ((EventEmailType2) => {
1578
1556
  EventEmailType2["reminder"] = "reminder";
1579
1557
  return EventEmailType2;
1580
1558
  })(EventEmailType || {});
1581
- var ThreadInvitationStatus = /* @__PURE__ */ ((ThreadInvitationStatus2) => {
1582
- ThreadInvitationStatus2["invited"] = "invited";
1583
- ThreadInvitationStatus2["rejected"] = "rejected";
1584
- return ThreadInvitationStatus2;
1585
- })(ThreadInvitationStatus || {});
1586
- var ThreadAccessLevel = /* @__PURE__ */ ((ThreadAccessLevel2) => {
1587
- ThreadAccessLevel2["public"] = "public";
1588
- ThreadAccessLevel2["private"] = "private";
1589
- return ThreadAccessLevel2;
1590
- })(ThreadAccessLevel || {});
1591
- var ThreadMemberRole = /* @__PURE__ */ ((ThreadMemberRole2) => {
1592
- ThreadMemberRole2["member"] = "member";
1593
- ThreadMemberRole2["moderator"] = "moderator";
1594
- return ThreadMemberRole2;
1595
- })(ThreadMemberRole || {});
1559
+ var ThreadCircleAccountRole = /* @__PURE__ */ ((ThreadCircleAccountRole2) => {
1560
+ ThreadCircleAccountRole2["member"] = "member";
1561
+ ThreadCircleAccountRole2["manager"] = "manager";
1562
+ ThreadCircleAccountRole2["invited"] = "invited";
1563
+ return ThreadCircleAccountRole2;
1564
+ })(ThreadCircleAccountRole || {});
1596
1565
  var ThreadMessageType = /* @__PURE__ */ ((ThreadMessageType2) => {
1597
1566
  ThreadMessageType2["user"] = "user";
1598
1567
  ThreadMessageType2["bot"] = "bot";
@@ -1723,6 +1692,12 @@ function MergeInfinitePages(data) {
1723
1692
  );
1724
1693
  }
1725
1694
 
1695
+ // src/utilities/IsUUID.ts
1696
+ var isUUID = (id) => {
1697
+ 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}$/;
1698
+ return uuidRegex.test(id);
1699
+ };
1700
+
1726
1701
  // src/queries/useConnectedSingleQuery.ts
1727
1702
  var import_react_query2 = require("@tanstack/react-query");
1728
1703
  var GetBaseSingleQueryKeys = (locale) => {
@@ -1773,81 +1748,6 @@ var useConnectedSingleQuery = (queryKeys, queryFn, options = {}) => {
1773
1748
  };
1774
1749
  var useConnectedSingleQuery_default = useConnectedSingleQuery;
1775
1750
 
1776
- // src/utilities/CacheIndividualQueries.ts
1777
- var CacheIndividualQueries = (page, queryClient, queryKeyFn, locale = "en", itemMap) => {
1778
- page.data.forEach((item) => {
1779
- item = itemMap ? itemMap(item) : item;
1780
- if (item.id) {
1781
- const SudoResponse = {
1782
- status: page.status,
1783
- message: `Cached From: ${page.message}`,
1784
- data: item
1785
- };
1786
- queryClient.setQueryData(
1787
- [...queryKeyFn(item.id), ...GetBaseSingleQueryKeys(locale)],
1788
- SudoResponse,
1789
- {
1790
- updatedAt: Date.now() - 1e3 * 60
1791
- }
1792
- );
1793
- if (item.slug) {
1794
- queryClient.setQueryData(
1795
- [...queryKeyFn(item.slug), ...GetBaseSingleQueryKeys(locale)],
1796
- SudoResponse,
1797
- {
1798
- updatedAt: Date.now() - 1e3 * 60
1799
- }
1800
- );
1801
- }
1802
- if (item.username) {
1803
- queryClient.setQueryData(
1804
- [...queryKeyFn(item.username), ...GetBaseSingleQueryKeys(locale)],
1805
- SudoResponse,
1806
- {
1807
- updatedAt: Date.now() - 1e3 * 60
1808
- }
1809
- );
1810
- }
1811
- if (item.code) {
1812
- queryClient.setQueryData(
1813
- [...queryKeyFn(item.code), ...GetBaseSingleQueryKeys(locale)],
1814
- SudoResponse,
1815
- {
1816
- updatedAt: Date.now() - 1e3 * 60
1817
- }
1818
- );
1819
- }
1820
- if (item.name) {
1821
- queryClient.setQueryData(
1822
- [...queryKeyFn(item.name), ...GetBaseSingleQueryKeys(locale)],
1823
- SudoResponse,
1824
- {
1825
- updatedAt: Date.now() - 1e3 * 60
1826
- }
1827
- );
1828
- }
1829
- if (item.alternateId) {
1830
- queryClient.setQueryData(
1831
- [
1832
- ...queryKeyFn(item.alternateId.toString()),
1833
- ...GetBaseSingleQueryKeys(locale)
1834
- ],
1835
- SudoResponse,
1836
- {
1837
- updatedAt: Date.now() - 1e3 * 60
1838
- }
1839
- );
1840
- }
1841
- }
1842
- });
1843
- };
1844
-
1845
- // src/utilities/IsUUID.ts
1846
- var isUUID = (id) => {
1847
- 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}$/;
1848
- return uuidRegex.test(id);
1849
- };
1850
-
1851
1751
  // src/queries/useConnectedInfiniteQuery.ts
1852
1752
  var import_react_query3 = require("@tanstack/react-query");
1853
1753
  var GetBaseInfiniteQueryKeys = (locale, search = "") => {
@@ -1955,9 +1855,7 @@ var GetAccounts = async ({
1955
1855
  orderBy,
1956
1856
  search,
1957
1857
  accountType,
1958
- queryClient,
1959
- clientApiParams,
1960
- locale
1858
+ clientApiParams
1961
1859
  }) => {
1962
1860
  const clientApi = await GetClientAPI(clientApiParams);
1963
1861
  const { data } = await clientApi.get(`/accounts`, {
@@ -1969,14 +1867,6 @@ var GetAccounts = async ({
1969
1867
  search: search || void 0
1970
1868
  }
1971
1869
  });
1972
- if (queryClient && data.status === "ok") {
1973
- CacheIndividualQueries(
1974
- data,
1975
- queryClient,
1976
- (accountId) => ACCOUNT_QUERY_KEY(accountId),
1977
- locale
1978
- );
1979
- }
1980
1870
  return data;
1981
1871
  };
1982
1872
  var useGetAccounts = (accountType, params = {}, options = {}) => {
@@ -2072,9 +1962,7 @@ var GetActivities = async ({
2072
1962
  pageSize,
2073
1963
  orderBy,
2074
1964
  search,
2075
- queryClient,
2076
- clientApiParams,
2077
- locale
1965
+ clientApiParams
2078
1966
  }) => {
2079
1967
  const clientApi = await GetClientAPI(clientApiParams);
2080
1968
  const { data } = await clientApi.get(`/activities`, {
@@ -2085,14 +1973,6 @@ var GetActivities = async ({
2085
1973
  search: search || void 0
2086
1974
  }
2087
1975
  });
2088
- if (queryClient && data.status === "ok") {
2089
- CacheIndividualQueries(
2090
- data,
2091
- queryClient,
2092
- (activityId) => ACTIVITY_QUERY_KEY(activityId),
2093
- locale
2094
- );
2095
- }
2096
1976
  return data;
2097
1977
  };
2098
1978
  var useGetActivities = (params = {}, options = {}) => {
@@ -2159,9 +2039,7 @@ var GetActivityComments = async ({
2159
2039
  pageSize,
2160
2040
  orderBy,
2161
2041
  search,
2162
- queryClient,
2163
- clientApiParams,
2164
- locale
2042
+ clientApiParams
2165
2043
  }) => {
2166
2044
  const clientApi = await GetClientAPI(clientApiParams);
2167
2045
  const { data } = await clientApi.get(`/activities/${activityId}/comments`, {
@@ -2172,14 +2050,6 @@ var GetActivityComments = async ({
2172
2050
  search: search || void 0
2173
2051
  }
2174
2052
  });
2175
- if (queryClient && data.status === "ok") {
2176
- CacheIndividualQueries(
2177
- data,
2178
- queryClient,
2179
- (activityId2) => ACTIVITY_QUERY_KEY(activityId2),
2180
- locale
2181
- );
2182
- }
2183
2053
  return data;
2184
2054
  };
2185
2055
  var useGetActivityComments = (activityId = "", params = {}, options = {}) => {
@@ -2213,9 +2083,7 @@ var GetAccountActivities = async ({
2213
2083
  orderBy,
2214
2084
  search,
2215
2085
  accountId,
2216
- queryClient,
2217
- clientApiParams,
2218
- locale
2086
+ clientApiParams
2219
2087
  }) => {
2220
2088
  const clientApi = await GetClientAPI(clientApiParams);
2221
2089
  const { data } = await clientApi.get(`/accounts/${accountId}/activities`, {
@@ -2226,14 +2094,6 @@ var GetAccountActivities = async ({
2226
2094
  search: search || void 0
2227
2095
  }
2228
2096
  });
2229
- if (queryClient && data.status === "ok") {
2230
- CacheIndividualQueries(
2231
- data,
2232
- queryClient,
2233
- (activityId) => ACTIVITY_QUERY_KEY(activityId),
2234
- locale
2235
- );
2236
- }
2237
2097
  return data;
2238
2098
  };
2239
2099
  var useGetAccountActivities = (accountId = "", params = {}, options = {}) => {
@@ -2279,91 +2139,6 @@ var useGetAccountByShareCode = (shareCode = "", options = {}) => {
2279
2139
  );
2280
2140
  };
2281
2141
 
2282
- // src/queries/groups/useGetGroups.ts
2283
- var GROUPS_QUERY_KEY = (access) => {
2284
- const keys = ["GROUPS"];
2285
- if (access) keys.push(access);
2286
- return keys;
2287
- };
2288
- var SET_GROUPS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
2289
- client.setQueryData(
2290
- [
2291
- ...GROUPS_QUERY_KEY(...keyParams),
2292
- ...GetBaseInfiniteQueryKeys(...baseKeys)
2293
- ],
2294
- setFirstPageData(response)
2295
- );
2296
- };
2297
- var GetGroups = async ({
2298
- pageParam,
2299
- pageSize,
2300
- orderBy,
2301
- search,
2302
- access,
2303
- queryClient,
2304
- clientApiParams,
2305
- locale
2306
- }) => {
2307
- const clientApi = await GetClientAPI(clientApiParams);
2308
- const { data } = await clientApi.get(`/groups`, {
2309
- params: {
2310
- page: pageParam || void 0,
2311
- pageSize: pageSize || void 0,
2312
- orderBy: orderBy || void 0,
2313
- search: search || void 0,
2314
- access: access || void 0
2315
- }
2316
- });
2317
- if (queryClient && data.status === "ok") {
2318
- CacheIndividualQueries(
2319
- data,
2320
- queryClient,
2321
- (groupId) => GROUP_QUERY_KEY(groupId),
2322
- locale
2323
- );
2324
- }
2325
- return data;
2326
- };
2327
- var useGetGroups = (access, params = {}, options = {}) => {
2328
- return useConnectedInfiniteQuery(
2329
- GROUPS_QUERY_KEY(access),
2330
- (params2) => GetGroups({ access, ...params2 }),
2331
- params,
2332
- options
2333
- );
2334
- };
2335
-
2336
- // src/queries/groups/useGetGroup.ts
2337
- var GROUP_QUERY_KEY = (groupId) => [
2338
- ...GROUPS_QUERY_KEY(),
2339
- groupId
2340
- ];
2341
- var SET_GROUP_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"], options) => {
2342
- client.setQueryData(
2343
- [...GROUP_QUERY_KEY(...keyParams), ...GetBaseSingleQueryKeys(...baseKeys)],
2344
- response,
2345
- options
2346
- );
2347
- };
2348
- var GetGroup = async ({
2349
- groupId,
2350
- clientApiParams
2351
- }) => {
2352
- const clientApi = await GetClientAPI(clientApiParams);
2353
- const { data } = await clientApi.get(`/groups/${groupId}`);
2354
- return data;
2355
- };
2356
- var useGetGroup = (groupId = "", options = {}) => {
2357
- return useConnectedSingleQuery(
2358
- GROUP_QUERY_KEY(groupId),
2359
- (params) => GetGroup({ groupId, ...params }),
2360
- {
2361
- ...options,
2362
- enabled: !!groupId && (options?.enabled ?? true)
2363
- }
2364
- );
2365
- };
2366
-
2367
2142
  // src/queries/accounts/useGetAccountGroups.ts
2368
2143
  var ACCOUNT_GROUPS_QUERY_KEY = (accountId) => [
2369
2144
  ...ACCOUNT_QUERY_KEY(accountId),
@@ -2384,9 +2159,7 @@ var GetAccountGroups = async ({
2384
2159
  orderBy,
2385
2160
  search,
2386
2161
  accountId,
2387
- queryClient,
2388
- clientApiParams,
2389
- locale
2162
+ clientApiParams
2390
2163
  }) => {
2391
2164
  const clientApi = await GetClientAPI(clientApiParams);
2392
2165
  const { data } = await clientApi.get(`/accounts/${accountId}/groups`, {
@@ -2397,14 +2170,6 @@ var GetAccountGroups = async ({
2397
2170
  search: search || void 0
2398
2171
  }
2399
2172
  });
2400
- if (queryClient && data.status === "ok") {
2401
- CacheIndividualQueries(
2402
- data,
2403
- queryClient,
2404
- (groupId) => GROUP_QUERY_KEY(groupId),
2405
- locale
2406
- );
2407
- }
2408
2173
  return data;
2409
2174
  };
2410
2175
  var useGetAccountGroups = (accountId = "", params = {}, options = {}) => {
@@ -2439,9 +2204,7 @@ var GetAccountFollowers = async ({
2439
2204
  orderBy,
2440
2205
  search,
2441
2206
  accountId,
2442
- queryClient,
2443
- clientApiParams,
2444
- locale
2207
+ clientApiParams
2445
2208
  }) => {
2446
2209
  const clientApi = await GetClientAPI(clientApiParams);
2447
2210
  const { data } = await clientApi.get(`/accounts/${accountId}/followers`, {
@@ -2452,14 +2215,6 @@ var GetAccountFollowers = async ({
2452
2215
  search: search || void 0
2453
2216
  }
2454
2217
  });
2455
- if (queryClient && data.status === "ok") {
2456
- CacheIndividualQueries(
2457
- data,
2458
- queryClient,
2459
- (accountId2) => ACCOUNT_QUERY_KEY(accountId2),
2460
- locale
2461
- );
2462
- }
2463
2218
  return data;
2464
2219
  };
2465
2220
  var useGetAccountFollowers = (accountId = "", params = {}, options = {}) => {
@@ -2494,9 +2249,7 @@ var GetAccountFollowings = async ({
2494
2249
  orderBy,
2495
2250
  search,
2496
2251
  accountId,
2497
- queryClient,
2498
- clientApiParams,
2499
- locale
2252
+ clientApiParams
2500
2253
  }) => {
2501
2254
  const clientApi = await GetClientAPI(clientApiParams);
2502
2255
  const { data } = await clientApi.get(`/accounts/${accountId}/following`, {
@@ -2507,14 +2260,6 @@ var GetAccountFollowings = async ({
2507
2260
  search: search || void 0
2508
2261
  }
2509
2262
  });
2510
- if (queryClient && data.status === "ok") {
2511
- CacheIndividualQueries(
2512
- data,
2513
- queryClient,
2514
- (accountId2) => ACCOUNT_QUERY_KEY(accountId2),
2515
- locale
2516
- );
2517
- }
2518
2263
  return data;
2519
2264
  };
2520
2265
  var useGetAccountFollowings = (accountId = "", params = {}, options = {}) => {
@@ -2549,9 +2294,7 @@ var GetAccountsPopular = async ({
2549
2294
  orderBy,
2550
2295
  search,
2551
2296
  accountType,
2552
- queryClient,
2553
- clientApiParams,
2554
- locale
2297
+ clientApiParams
2555
2298
  }) => {
2556
2299
  const clientApi = await GetClientAPI(clientApiParams);
2557
2300
  const { data } = await clientApi.get(`/accounts/popular`, {
@@ -2563,14 +2306,6 @@ var GetAccountsPopular = async ({
2563
2306
  search: search || void 0
2564
2307
  }
2565
2308
  });
2566
- if (queryClient && data.status === "ok") {
2567
- CacheIndividualQueries(
2568
- data,
2569
- queryClient,
2570
- (accountId) => ACCOUNT_QUERY_KEY(accountId),
2571
- locale
2572
- );
2573
- }
2574
2309
  return data;
2575
2310
  };
2576
2311
  var useGetAccountsPopular = (accountType, params = {}, options = {}) => {
@@ -2687,9 +2422,7 @@ var GetBookings = async ({
2687
2422
  search,
2688
2423
  past,
2689
2424
  placeId,
2690
- queryClient,
2691
- clientApiParams,
2692
- locale
2425
+ clientApiParams
2693
2426
  }) => {
2694
2427
  const clientApi = await GetClientAPI(clientApiParams);
2695
2428
  const { data } = await clientApi.get(`/bookings`, {
@@ -2702,14 +2435,6 @@ var GetBookings = async ({
2702
2435
  placeId: placeId || void 0
2703
2436
  }
2704
2437
  });
2705
- if (queryClient && data.status === "ok") {
2706
- CacheIndividualQueries(
2707
- data,
2708
- queryClient,
2709
- (bookingId) => BOOKING_QUERY_KEY(bookingId),
2710
- locale
2711
- );
2712
- }
2713
2438
  return data;
2714
2439
  };
2715
2440
  var useGetBookings = (past = false, placeId = "", params = {}, options = {}) => {
@@ -2800,9 +2525,7 @@ var GetBookingPlaces = async ({
2800
2525
  pageSize,
2801
2526
  orderBy,
2802
2527
  search,
2803
- queryClient,
2804
- clientApiParams,
2805
- locale
2528
+ clientApiParams
2806
2529
  }) => {
2807
2530
  const clientApi = await GetClientAPI(clientApiParams);
2808
2531
  const { data } = await clientApi.get(`/bookings/places`, {
@@ -2813,14 +2536,6 @@ var GetBookingPlaces = async ({
2813
2536
  search: search || void 0
2814
2537
  }
2815
2538
  });
2816
- if (queryClient && data.status === "ok") {
2817
- CacheIndividualQueries(
2818
- data,
2819
- queryClient,
2820
- (bookingPlaceId) => BOOKING_PLACE_QUERY_KEY(bookingPlaceId),
2821
- locale
2822
- );
2823
- }
2824
2539
  return data;
2825
2540
  };
2826
2541
  var useGetBookingPlaces = (params = {}, options = {}) => {
@@ -2918,9 +2633,7 @@ var GetBookingPlacesSpaces = async ({
2918
2633
  pageSize,
2919
2634
  orderBy,
2920
2635
  search,
2921
- queryClient,
2922
- clientApiParams,
2923
- locale
2636
+ clientApiParams
2924
2637
  }) => {
2925
2638
  const clientApi = await GetClientAPI(clientApiParams);
2926
2639
  const { data } = await clientApi.get(`/bookings/places/${bookingId}/spaces`, {
@@ -2931,14 +2644,6 @@ var GetBookingPlacesSpaces = async ({
2931
2644
  search: search || void 0
2932
2645
  }
2933
2646
  });
2934
- if (queryClient && data.status === "ok") {
2935
- CacheIndividualQueries(
2936
- data,
2937
- queryClient,
2938
- (spaceId) => BOOKING_PLACE_SPACE_QUERY_KEY(bookingId, spaceId),
2939
- locale
2940
- );
2941
- }
2942
2647
  return data;
2943
2648
  };
2944
2649
  var useGetBookingPlacesSpaces = (bookingId = "", params = {}, options = {}) => {
@@ -3033,85 +2738,105 @@ var useGetBenefits = (params = {}, options = {}) => {
3033
2738
  );
3034
2739
  };
3035
2740
 
3036
- // src/queries/groups/useGetGroupActivities.ts
3037
- var GROUP_ACTIVITIES_QUERY_KEY = (groupId) => [
3038
- ...ACTIVITIES_QUERY_KEY(),
3039
- ...GROUP_QUERY_KEY(groupId)
3040
- ];
3041
- var SET_GROUP_ACTIVITIES_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
2741
+ // src/queries/groups/useGetGroups.ts
2742
+ var GROUPS_QUERY_KEY = (access) => {
2743
+ const keys = ["GROUPS"];
2744
+ if (access) keys.push(access);
2745
+ return keys;
2746
+ };
2747
+ var SET_GROUPS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
3042
2748
  client.setQueryData(
3043
2749
  [
3044
- ...GROUP_ACTIVITIES_QUERY_KEY(...keyParams),
2750
+ ...GROUPS_QUERY_KEY(...keyParams),
3045
2751
  ...GetBaseInfiniteQueryKeys(...baseKeys)
3046
2752
  ],
3047
2753
  setFirstPageData(response)
3048
2754
  );
3049
2755
  };
3050
- var GetGroupActivities = async ({
2756
+ var GetGroups = async ({
3051
2757
  pageParam,
3052
2758
  pageSize,
3053
2759
  orderBy,
3054
2760
  search,
3055
- groupId,
3056
- queryClient,
3057
- clientApiParams,
3058
- locale
2761
+ access,
2762
+ clientApiParams
3059
2763
  }) => {
3060
2764
  const clientApi = await GetClientAPI(clientApiParams);
3061
- const { data } = await clientApi.get(`/groups/${groupId}/activities`, {
2765
+ const { data } = await clientApi.get(`/groups`, {
3062
2766
  params: {
3063
2767
  page: pageParam || void 0,
3064
2768
  pageSize: pageSize || void 0,
3065
2769
  orderBy: orderBy || void 0,
3066
- search: search || void 0
2770
+ search: search || void 0,
2771
+ access: access || void 0
3067
2772
  }
3068
2773
  });
3069
- if (queryClient && data.status === "ok") {
3070
- CacheIndividualQueries(
3071
- data,
3072
- queryClient,
3073
- (activityId) => ACTIVITY_QUERY_KEY(activityId),
3074
- locale
3075
- );
3076
- }
3077
2774
  return data;
3078
2775
  };
3079
- var useGetGroupActivities = (groupId = "", params = {}, options = {}) => {
2776
+ var useGetGroups = (access, params = {}, options = {}) => {
3080
2777
  return useConnectedInfiniteQuery(
3081
- GROUP_ACTIVITIES_QUERY_KEY(groupId),
3082
- (params2) => GetGroupActivities({ groupId, ...params2 }),
2778
+ GROUPS_QUERY_KEY(access),
2779
+ (params2) => GetGroups({ access, ...params2 }),
3083
2780
  params,
3084
- {
3085
- ...options,
3086
- enabled: !!groupId && (options?.enabled ?? true)
3087
- }
2781
+ options
3088
2782
  );
3089
2783
  };
3090
2784
 
3091
- // src/queries/groups/useGetGroupAnnouncements.ts
3092
- var GROUP_ANNOUNCEMENTS_QUERY_KEY = (groupId) => [
3093
- ...GROUP_QUERY_KEY(groupId),
3094
- "ANNOUNCEMENTS"
2785
+ // src/queries/groups/useGetGroup.ts
2786
+ var GROUP_QUERY_KEY = (groupId) => [
2787
+ ...GROUPS_QUERY_KEY(),
2788
+ groupId
3095
2789
  ];
3096
- var SET_GROUP_ANNOUNCEMENTS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
2790
+ var SET_GROUP_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"], options) => {
2791
+ client.setQueryData(
2792
+ [...GROUP_QUERY_KEY(...keyParams), ...GetBaseSingleQueryKeys(...baseKeys)],
2793
+ response,
2794
+ options
2795
+ );
2796
+ };
2797
+ var GetGroup = async ({
2798
+ groupId,
2799
+ clientApiParams
2800
+ }) => {
2801
+ const clientApi = await GetClientAPI(clientApiParams);
2802
+ const { data } = await clientApi.get(`/groups/${groupId}`);
2803
+ return data;
2804
+ };
2805
+ var useGetGroup = (groupId = "", options = {}) => {
2806
+ return useConnectedSingleQuery(
2807
+ GROUP_QUERY_KEY(groupId),
2808
+ (params) => GetGroup({ groupId, ...params }),
2809
+ {
2810
+ ...options,
2811
+ enabled: !!groupId && (options?.enabled ?? true)
2812
+ }
2813
+ );
2814
+ };
2815
+
2816
+ // src/queries/groups/useGetGroupActivities.ts
2817
+ var GROUP_ACTIVITIES_QUERY_KEY = (groupId) => [
2818
+ ...ACTIVITIES_QUERY_KEY(),
2819
+ ...GROUP_QUERY_KEY(groupId)
2820
+ ];
2821
+ var SET_GROUP_ACTIVITIES_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
3097
2822
  client.setQueryData(
3098
2823
  [
3099
- ...GROUP_ANNOUNCEMENTS_QUERY_KEY(...keyParams),
2824
+ ...GROUP_ACTIVITIES_QUERY_KEY(...keyParams),
3100
2825
  ...GetBaseInfiniteQueryKeys(...baseKeys)
3101
2826
  ],
3102
2827
  setFirstPageData(response)
3103
2828
  );
3104
2829
  };
3105
- var GetGroupAnnouncements = async ({
3106
- groupId,
2830
+ var GetGroupActivities = async ({
3107
2831
  pageParam,
3108
2832
  pageSize,
3109
2833
  orderBy,
3110
2834
  search,
2835
+ groupId,
3111
2836
  clientApiParams
3112
2837
  }) => {
3113
2838
  const clientApi = await GetClientAPI(clientApiParams);
3114
- const { data } = await clientApi.get(`/groups/${groupId}/announcements`, {
2839
+ const { data } = await clientApi.get(`/groups/${groupId}/activities`, {
3115
2840
  params: {
3116
2841
  page: pageParam || void 0,
3117
2842
  pageSize: pageSize || void 0,
@@ -3121,10 +2846,10 @@ var GetGroupAnnouncements = async ({
3121
2846
  });
3122
2847
  return data;
3123
2848
  };
3124
- var useGetGroupAnnouncements = (groupId = "", params = {}, options = {}) => {
2849
+ var useGetGroupActivities = (groupId = "", params = {}, options = {}) => {
3125
2850
  return useConnectedInfiniteQuery(
3126
- GROUP_ANNOUNCEMENTS_QUERY_KEY(groupId),
3127
- (params2) => GetGroupAnnouncements({ groupId, ...params2 }),
2851
+ GROUP_ACTIVITIES_QUERY_KEY(groupId),
2852
+ (params2) => GetGroupActivities({ groupId, ...params2 }),
3128
2853
  params,
3129
2854
  {
3130
2855
  ...options,
@@ -3133,20 +2858,22 @@ var useGetGroupAnnouncements = (groupId = "", params = {}, options = {}) => {
3133
2858
  );
3134
2859
  };
3135
2860
 
3136
- // src/queries/groups/useGetGroupMedia.ts
3137
- var GROUP_MEDIA_QUERY_KEY = (groupId, type) => [...GROUP_QUERY_KEY(groupId), "MEDIA", type || "all"];
3138
- var SET_GROUP_MEDIA_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
2861
+ // src/queries/groups/useGetGroupAnnouncements.ts
2862
+ var GROUP_ANNOUNCEMENTS_QUERY_KEY = (groupId) => [
2863
+ ...GROUP_QUERY_KEY(groupId),
2864
+ "ANNOUNCEMENTS"
2865
+ ];
2866
+ var SET_GROUP_ANNOUNCEMENTS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
3139
2867
  client.setQueryData(
3140
2868
  [
3141
- ...GROUP_MEDIA_QUERY_KEY(...keyParams),
2869
+ ...GROUP_ANNOUNCEMENTS_QUERY_KEY(...keyParams),
3142
2870
  ...GetBaseInfiniteQueryKeys(...baseKeys)
3143
2871
  ],
3144
2872
  setFirstPageData(response)
3145
2873
  );
3146
2874
  };
3147
- var GetGroupMedia = async ({
2875
+ var GetGroupAnnouncements = async ({
3148
2876
  groupId,
3149
- type,
3150
2877
  pageParam,
3151
2878
  pageSize,
3152
2879
  orderBy,
@@ -3154,9 +2881,8 @@ var GetGroupMedia = async ({
3154
2881
  clientApiParams
3155
2882
  }) => {
3156
2883
  const clientApi = await GetClientAPI(clientApiParams);
3157
- const { data } = await clientApi.get(`/groups/${groupId}/media`, {
2884
+ const { data } = await clientApi.get(`/groups/${groupId}/announcements`, {
3158
2885
  params: {
3159
- type: type || void 0,
3160
2886
  page: pageParam || void 0,
3161
2887
  pageSize: pageSize || void 0,
3162
2888
  orderBy: orderBy || void 0,
@@ -3165,10 +2891,10 @@ var GetGroupMedia = async ({
3165
2891
  });
3166
2892
  return data;
3167
2893
  };
3168
- var useGetGroupMedia = (groupId = "", type, params = {}, options = {}) => {
2894
+ var useGetGroupAnnouncements = (groupId = "", params = {}, options = {}) => {
3169
2895
  return useConnectedInfiniteQuery(
3170
- GROUP_MEDIA_QUERY_KEY(groupId, type),
3171
- (params2) => GetGroupMedia({ groupId, type, ...params2 }),
2896
+ GROUP_ANNOUNCEMENTS_QUERY_KEY(groupId),
2897
+ (params2) => GetGroupAnnouncements({ groupId, ...params2 }),
3172
2898
  params,
3173
2899
  {
3174
2900
  ...options,
@@ -3177,78 +2903,46 @@ var useGetGroupMedia = (groupId = "", type, params = {}, options = {}) => {
3177
2903
  );
3178
2904
  };
3179
2905
 
3180
- // src/queries/events/useGetEvents.ts
3181
- var EVENTS_QUERY_KEY = (past) => {
3182
- const keys = ["EVENTS"];
3183
- if (typeof past !== "undefined") {
3184
- keys.push(past ? "PAST" : "UPCOMING");
3185
- }
3186
- return keys;
3187
- };
3188
- var SET_EVENTS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
2906
+ // src/queries/groups/useGetGroupMedia.ts
2907
+ var GROUP_MEDIA_QUERY_KEY = (groupId, type) => [...GROUP_QUERY_KEY(groupId), "MEDIA", type || "all"];
2908
+ var SET_GROUP_MEDIA_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
3189
2909
  client.setQueryData(
3190
2910
  [
3191
- ...EVENTS_QUERY_KEY(...keyParams),
2911
+ ...GROUP_MEDIA_QUERY_KEY(...keyParams),
3192
2912
  ...GetBaseInfiniteQueryKeys(...baseKeys)
3193
2913
  ],
3194
2914
  setFirstPageData(response)
3195
2915
  );
3196
2916
  };
3197
- var GetEvents = async ({
2917
+ var GetGroupMedia = async ({
2918
+ groupId,
2919
+ type,
3198
2920
  pageParam,
3199
2921
  pageSize,
3200
2922
  orderBy,
3201
2923
  search,
3202
- past,
3203
2924
  clientApiParams
3204
2925
  }) => {
3205
2926
  const clientApi = await GetClientAPI(clientApiParams);
3206
- const { data } = await clientApi.get(`/events`, {
2927
+ const { data } = await clientApi.get(`/groups/${groupId}/media`, {
3207
2928
  params: {
2929
+ type: type || void 0,
3208
2930
  page: pageParam || void 0,
3209
2931
  pageSize: pageSize || void 0,
3210
2932
  orderBy: orderBy || void 0,
3211
- search: search || void 0,
3212
- past: past !== void 0 ? past : void 0
2933
+ search: search || void 0
3213
2934
  }
3214
2935
  });
3215
2936
  return data;
3216
2937
  };
3217
- var useGetEvents = (past = false, params = {}, options = {}) => {
2938
+ var useGetGroupMedia = (groupId = "", type, params = {}, options = {}) => {
3218
2939
  return useConnectedInfiniteQuery(
3219
- EVENTS_QUERY_KEY(past),
3220
- (params2) => GetEvents({ past, ...params2 }),
2940
+ GROUP_MEDIA_QUERY_KEY(groupId, type),
2941
+ (params2) => GetGroupMedia({ groupId, type, ...params2 }),
3221
2942
  params,
3222
- options
3223
- );
3224
- };
3225
-
3226
- // src/queries/events/useGetEvent.ts
3227
- var EVENT_QUERY_KEY = (eventId) => [
3228
- ...EVENTS_QUERY_KEY(),
3229
- eventId
3230
- ];
3231
- var SET_EVENT_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
3232
- client.setQueryData(
3233
- [...EVENT_QUERY_KEY(...keyParams), ...GetBaseSingleQueryKeys(...baseKeys)],
3234
- response
3235
- );
3236
- };
3237
- var GetEvent = async ({
3238
- eventId,
3239
- clientApiParams
3240
- }) => {
3241
- const clientApi = await GetClientAPI(clientApiParams);
3242
- const { data } = await clientApi.get(`/events/${eventId}`);
3243
- return data;
3244
- };
3245
- var useGetEvent = (eventId = "", options = {}) => {
3246
- return useConnectedSingleQuery(
3247
- EVENT_QUERY_KEY(eventId),
3248
- (params) => GetEvent({ eventId, ...params }),
3249
2943
  {
3250
2944
  ...options,
3251
- enabled: !!eventId && (options?.enabled ?? true)
2945
+ enabled: !!groupId && (options?.enabled ?? true)
3252
2946
  }
3253
2947
  );
3254
2948
  };
@@ -3275,9 +2969,7 @@ var GetGroupEvents = async ({
3275
2969
  search,
3276
2970
  groupId,
3277
2971
  past,
3278
- queryClient,
3279
- clientApiParams,
3280
- locale
2972
+ clientApiParams
3281
2973
  }) => {
3282
2974
  const clientApi = await GetClientAPI(clientApiParams);
3283
2975
  const { data } = await clientApi.get(`/groups/${groupId}/events`, {
@@ -3289,14 +2981,6 @@ var GetGroupEvents = async ({
3289
2981
  past: past || false
3290
2982
  }
3291
2983
  });
3292
- if (queryClient && data.status === "ok") {
3293
- CacheIndividualQueries(
3294
- data,
3295
- queryClient,
3296
- (eventId) => EVENT_QUERY_KEY(eventId),
3297
- locale
3298
- );
3299
- }
3300
2984
  return data;
3301
2985
  };
3302
2986
  var useGetGroupEvents = (groupId = "", past = false, params = {}, options = {}) => {
@@ -3381,9 +3065,7 @@ var GetGroupSponsors = async ({
3381
3065
  orderBy,
3382
3066
  search,
3383
3067
  groupId,
3384
- queryClient,
3385
- clientApiParams,
3386
- locale
3068
+ clientApiParams
3387
3069
  }) => {
3388
3070
  const clientApi = await GetClientAPI(clientApiParams);
3389
3071
  const { data } = await clientApi.get(`/groups/${groupId}/sponsors`, {
@@ -3394,14 +3076,6 @@ var GetGroupSponsors = async ({
3394
3076
  search: search || void 0
3395
3077
  }
3396
3078
  });
3397
- if (queryClient && data.status === "ok") {
3398
- CacheIndividualQueries(
3399
- data,
3400
- queryClient,
3401
- (accountId) => ACCOUNT_QUERY_KEY(accountId),
3402
- locale
3403
- );
3404
- }
3405
3079
  return data;
3406
3080
  };
3407
3081
  var useGetGroupSponsors = (groupId = "", params = {}, options = {}) => {
@@ -3440,9 +3114,7 @@ var GetGroupRequests = async ({
3440
3114
  search,
3441
3115
  status,
3442
3116
  groupId,
3443
- queryClient,
3444
- clientApiParams,
3445
- locale
3117
+ clientApiParams
3446
3118
  }) => {
3447
3119
  const clientApi = await GetClientAPI(clientApiParams);
3448
3120
  const { data } = await clientApi.get(`/groups/${groupId}/requests`, {
@@ -3454,14 +3126,6 @@ var GetGroupRequests = async ({
3454
3126
  status: status || void 0
3455
3127
  }
3456
3128
  });
3457
- if (queryClient && data.status === "ok") {
3458
- CacheIndividualQueries(
3459
- data,
3460
- queryClient,
3461
- (groupId2) => GROUP_REQUEST_QUERY_KEY(groupId2, data.data.id),
3462
- locale
3463
- );
3464
- }
3465
3129
  return data;
3466
3130
  };
3467
3131
  var useGetGroupRequests = (groupId = "", status, params = {}, options = {}) => {
@@ -3605,9 +3269,7 @@ var GetGroupsFeatured = async ({
3605
3269
  pageSize,
3606
3270
  orderBy,
3607
3271
  search,
3608
- queryClient,
3609
- clientApiParams,
3610
- locale
3272
+ clientApiParams
3611
3273
  }) => {
3612
3274
  const clientApi = await GetClientAPI(clientApiParams);
3613
3275
  const { data } = await clientApi.get(`/groups/featured`, {
@@ -3618,14 +3280,6 @@ var GetGroupsFeatured = async ({
3618
3280
  search: search || void 0
3619
3281
  }
3620
3282
  });
3621
- if (queryClient && data.status === "ok") {
3622
- CacheIndividualQueries(
3623
- data,
3624
- queryClient,
3625
- (groupId) => GROUP_QUERY_KEY(groupId),
3626
- locale
3627
- );
3628
- }
3629
3283
  return data;
3630
3284
  };
3631
3285
  var useGetGroupsFeatured = (params = {}, options = {}) => {
@@ -3651,9 +3305,7 @@ var GetGroupsInvited = async ({
3651
3305
  pageSize,
3652
3306
  orderBy,
3653
3307
  search,
3654
- queryClient,
3655
- clientApiParams,
3656
- locale
3308
+ clientApiParams
3657
3309
  }) => {
3658
3310
  const clientApi = await GetClientAPI(clientApiParams);
3659
3311
  const { data } = await clientApi.get(`/groups/invited`, {
@@ -3662,17 +3314,9 @@ var GetGroupsInvited = async ({
3662
3314
  pageSize: pageSize || void 0,
3663
3315
  orderBy: orderBy || void 0,
3664
3316
  search: search || void 0,
3665
- rejected
3317
+ rejected: rejected !== void 0 ? rejected : void 0
3666
3318
  }
3667
3319
  });
3668
- if (queryClient && data.status === "ok") {
3669
- CacheIndividualQueries(
3670
- data,
3671
- queryClient,
3672
- (groupId) => GROUP_QUERY_KEY(groupId),
3673
- locale
3674
- );
3675
- }
3676
3320
  return data;
3677
3321
  };
3678
3322
  var useGetGroupsInvited = (rejected, params = {}, options = {}) => {
@@ -3693,9 +3337,7 @@ var GetGroupsRequested = async ({
3693
3337
  pageSize,
3694
3338
  orderBy,
3695
3339
  search,
3696
- queryClient,
3697
- clientApiParams,
3698
- locale
3340
+ clientApiParams
3699
3341
  }) => {
3700
3342
  const clientApi = await GetClientAPI(clientApiParams);
3701
3343
  const { data } = await clientApi.get(`/groups/requested`, {
@@ -3706,14 +3348,6 @@ var GetGroupsRequested = async ({
3706
3348
  search: search || void 0
3707
3349
  }
3708
3350
  });
3709
- if (queryClient && data.status === "ok") {
3710
- CacheIndividualQueries(
3711
- data,
3712
- queryClient,
3713
- (groupId) => GROUP_QUERY_KEY(groupId),
3714
- locale
3715
- );
3716
- }
3717
3351
  return data;
3718
3352
  };
3719
3353
  var useGetGroupsRequested = (params = {}, options = {}) => {
@@ -3725,84 +3359,148 @@ var useGetGroupsRequested = (params = {}, options = {}) => {
3725
3359
  );
3726
3360
  };
3727
3361
 
3728
- // src/queries/events/useGetEventActivities.ts
3729
- var EVENT_ACTIVITIES_QUERY_KEY = (eventId) => [
3730
- ...ACTIVITIES_QUERY_KEY(),
3731
- ...EVENT_QUERY_KEY(eventId)
3732
- ];
3733
- var SET_EVENT_ACTIVITIES_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
3362
+ // src/queries/events/useGetEvents.ts
3363
+ var EVENTS_QUERY_KEY = (past) => {
3364
+ const keys = ["EVENTS"];
3365
+ if (typeof past !== "undefined") {
3366
+ keys.push(past ? "PAST" : "UPCOMING");
3367
+ }
3368
+ return keys;
3369
+ };
3370
+ var SET_EVENTS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
3734
3371
  client.setQueryData(
3735
3372
  [
3736
- ...EVENT_ACTIVITIES_QUERY_KEY(...keyParams),
3373
+ ...EVENTS_QUERY_KEY(...keyParams),
3737
3374
  ...GetBaseInfiniteQueryKeys(...baseKeys)
3738
3375
  ],
3739
3376
  setFirstPageData(response)
3740
3377
  );
3741
3378
  };
3742
- var GetEventActivities = async ({
3743
- eventId,
3379
+ var GetEvents = async ({
3744
3380
  pageParam,
3745
3381
  pageSize,
3746
3382
  orderBy,
3747
3383
  search,
3748
- queryClient,
3749
- clientApiParams,
3750
- locale
3384
+ past,
3385
+ clientApiParams
3751
3386
  }) => {
3752
3387
  const clientApi = await GetClientAPI(clientApiParams);
3753
- const { data } = await clientApi.get(`/events/${eventId}/activities`, {
3388
+ const { data } = await clientApi.get(`/events`, {
3754
3389
  params: {
3755
3390
  page: pageParam || void 0,
3756
3391
  pageSize: pageSize || void 0,
3757
3392
  orderBy: orderBy || void 0,
3758
- search: search || void 0
3393
+ search: search || void 0,
3394
+ past: past !== void 0 ? past : void 0
3759
3395
  }
3760
3396
  });
3761
- if (queryClient && data.status === "ok") {
3762
- CacheIndividualQueries(
3763
- data,
3764
- queryClient,
3765
- (activityId) => ACTIVITY_QUERY_KEY(activityId),
3766
- locale
3767
- );
3768
- }
3769
3397
  return data;
3770
3398
  };
3771
- var useGetEventActivities = (eventId = "", params = {}, options = {}) => {
3399
+ var useGetEvents = (past = false, params = {}, options = {}) => {
3772
3400
  return useConnectedInfiniteQuery(
3773
- EVENT_ACTIVITIES_QUERY_KEY(eventId),
3774
- (params2) => GetEventActivities({ eventId, ...params2 }),
3401
+ EVENTS_QUERY_KEY(past),
3402
+ (params2) => GetEvents({ past, ...params2 }),
3775
3403
  params,
3776
- {
3777
- ...options,
3778
- enabled: !!eventId && (options?.enabled ?? true)
3779
- }
3404
+ options
3780
3405
  );
3781
3406
  };
3782
3407
 
3783
- // src/queries/events/useGetEventFAQSections.ts
3784
- var EVENT_FAQ_SECTIONS_QUERY_KEY = (eventId) => [
3785
- ...EVENT_QUERY_KEY(eventId),
3786
- "FAQ_SECTIONS"
3408
+ // src/queries/events/useGetEvent.ts
3409
+ var EVENT_QUERY_KEY = (eventId) => [
3410
+ ...EVENTS_QUERY_KEY(),
3411
+ eventId
3787
3412
  ];
3788
- var SET_EVENT_FAQ_SECTIONS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
3413
+ var SET_EVENT_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
3789
3414
  client.setQueryData(
3790
- [
3791
- ...EVENT_FAQ_SECTIONS_QUERY_KEY(...keyParams),
3792
- ...GetBaseInfiniteQueryKeys(...baseKeys)
3793
- ],
3794
- setFirstPageData(response)
3415
+ [...EVENT_QUERY_KEY(...keyParams), ...GetBaseSingleQueryKeys(...baseKeys)],
3416
+ response
3795
3417
  );
3796
3418
  };
3797
- var GetEventFaqSections = async ({
3419
+ var GetEvent = async ({
3798
3420
  eventId,
3799
- pageParam,
3800
- pageSize,
3421
+ clientApiParams
3422
+ }) => {
3423
+ const clientApi = await GetClientAPI(clientApiParams);
3424
+ const { data } = await clientApi.get(`/events/${eventId}`);
3425
+ return data;
3426
+ };
3427
+ var useGetEvent = (eventId = "", options = {}) => {
3428
+ return useConnectedSingleQuery(
3429
+ EVENT_QUERY_KEY(eventId),
3430
+ (params) => GetEvent({ eventId, ...params }),
3431
+ {
3432
+ ...options,
3433
+ enabled: !!eventId && (options?.enabled ?? true)
3434
+ }
3435
+ );
3436
+ };
3437
+
3438
+ // src/queries/events/useGetEventActivities.ts
3439
+ var EVENT_ACTIVITIES_QUERY_KEY = (eventId) => [
3440
+ ...ACTIVITIES_QUERY_KEY(),
3441
+ ...EVENT_QUERY_KEY(eventId)
3442
+ ];
3443
+ var SET_EVENT_ACTIVITIES_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
3444
+ client.setQueryData(
3445
+ [
3446
+ ...EVENT_ACTIVITIES_QUERY_KEY(...keyParams),
3447
+ ...GetBaseInfiniteQueryKeys(...baseKeys)
3448
+ ],
3449
+ setFirstPageData(response)
3450
+ );
3451
+ };
3452
+ var GetEventActivities = async ({
3453
+ eventId,
3454
+ pageParam,
3455
+ pageSize,
3801
3456
  orderBy,
3802
3457
  search,
3803
- queryClient,
3804
- clientApiParams,
3805
- locale
3458
+ clientApiParams
3459
+ }) => {
3460
+ const clientApi = await GetClientAPI(clientApiParams);
3461
+ const { data } = await clientApi.get(`/events/${eventId}/activities`, {
3462
+ params: {
3463
+ page: pageParam || void 0,
3464
+ pageSize: pageSize || void 0,
3465
+ orderBy: orderBy || void 0,
3466
+ search: search || void 0
3467
+ }
3468
+ });
3469
+ return data;
3470
+ };
3471
+ var useGetEventActivities = (eventId = "", params = {}, options = {}) => {
3472
+ return useConnectedInfiniteQuery(
3473
+ EVENT_ACTIVITIES_QUERY_KEY(eventId),
3474
+ (params2) => GetEventActivities({ eventId, ...params2 }),
3475
+ params,
3476
+ {
3477
+ ...options,
3478
+ enabled: !!eventId && (options?.enabled ?? true)
3479
+ }
3480
+ );
3481
+ };
3482
+
3483
+ // src/queries/events/useGetEventFAQSections.ts
3484
+ var EVENT_FAQ_SECTIONS_QUERY_KEY = (eventId) => [
3485
+ ...EVENT_QUERY_KEY(eventId),
3486
+ "FAQ_SECTIONS"
3487
+ ];
3488
+ var SET_EVENT_FAQ_SECTIONS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
3489
+ client.setQueryData(
3490
+ [
3491
+ ...EVENT_FAQ_SECTIONS_QUERY_KEY(...keyParams),
3492
+ ...GetBaseInfiniteQueryKeys(...baseKeys)
3493
+ ],
3494
+ setFirstPageData(response)
3495
+ );
3496
+ };
3497
+ var GetEventFaqSections = async ({
3498
+ eventId,
3499
+ pageParam,
3500
+ pageSize,
3501
+ orderBy,
3502
+ search,
3503
+ clientApiParams
3806
3504
  }) => {
3807
3505
  const clientApi = await GetClientAPI(clientApiParams);
3808
3506
  const { data } = await clientApi.get(`/events/${eventId}/faqs`, {
@@ -3813,14 +3511,6 @@ var GetEventFaqSections = async ({
3813
3511
  search: search || void 0
3814
3512
  }
3815
3513
  });
3816
- if (queryClient && data.status === "ok") {
3817
- CacheIndividualQueries(
3818
- data,
3819
- queryClient,
3820
- (sectionId) => EVENT_FAQ_SECTION_QUERY_KEY(eventId, sectionId),
3821
- locale
3822
- );
3823
- }
3824
3514
  return data;
3825
3515
  };
3826
3516
  var useGetEventFaqSections = (eventId = "", params = {}, options = {}) => {
@@ -3887,9 +3577,7 @@ var GetEventFaqs = async ({
3887
3577
  pageSize,
3888
3578
  orderBy,
3889
3579
  search,
3890
- queryClient,
3891
- clientApiParams,
3892
- locale
3580
+ clientApiParams
3893
3581
  }) => {
3894
3582
  const clientApi = await GetClientAPI(clientApiParams);
3895
3583
  const { data } = await clientApi.get(
@@ -3903,14 +3591,6 @@ var GetEventFaqs = async ({
3903
3591
  }
3904
3592
  }
3905
3593
  );
3906
- if (queryClient && data.status === "ok") {
3907
- CacheIndividualQueries(
3908
- data,
3909
- queryClient,
3910
- (faqId) => EVENT_FAQ_SECTION_QUESTION_QUERY_KEY(eventId, sectionId, faqId),
3911
- locale
3912
- );
3913
- }
3914
3594
  return data;
3915
3595
  };
3916
3596
  var useGetEventFaqs = (eventId = "", sectionId = "", params = {}, options = {}) => {
@@ -3982,9 +3662,7 @@ var GetEventPages = async ({
3982
3662
  pageSize,
3983
3663
  orderBy,
3984
3664
  search,
3985
- queryClient,
3986
- clientApiParams,
3987
- locale
3665
+ clientApiParams
3988
3666
  }) => {
3989
3667
  const clientApi = await GetClientAPI(clientApiParams);
3990
3668
  const { data } = await clientApi.get(`/events/${eventId}/pages`, {
@@ -3995,14 +3673,6 @@ var GetEventPages = async ({
3995
3673
  search: search || void 0
3996
3674
  }
3997
3675
  });
3998
- if (queryClient && data.status === "ok") {
3999
- CacheIndividualQueries(
4000
- data,
4001
- queryClient,
4002
- (pageId) => EVENT_PAGE_QUERY_KEY(eventId, pageId),
4003
- locale
4004
- );
4005
- }
4006
3676
  return data;
4007
3677
  };
4008
3678
  var useGetEventPages = (eventId = "", params = {}, options = {}) => {
@@ -4109,9 +3779,7 @@ var GetEventRegistrants = async ({
4109
3779
  pageSize,
4110
3780
  orderBy,
4111
3781
  search,
4112
- queryClient,
4113
- clientApiParams,
4114
- locale
3782
+ clientApiParams
4115
3783
  }) => {
4116
3784
  const clientApi = await GetClientAPI(clientApiParams);
4117
3785
  const { data } = await clientApi.get(`/events/${eventId}/registrants`, {
@@ -4122,14 +3790,6 @@ var GetEventRegistrants = async ({
4122
3790
  search: search || void 0
4123
3791
  }
4124
3792
  });
4125
- if (queryClient && data.status === "ok") {
4126
- CacheIndividualQueries(
4127
- data,
4128
- queryClient,
4129
- (accountId) => ACCOUNT_QUERY_KEY(accountId),
4130
- locale
4131
- );
4132
- }
4133
3793
  return data;
4134
3794
  };
4135
3795
  var useGetEventRegistrants = (eventId = "", params = {}, options = {}) => {
@@ -4233,9 +3893,7 @@ var GetEventSpeakers = async ({
4233
3893
  pageSize,
4234
3894
  orderBy,
4235
3895
  search,
4236
- queryClient,
4237
- clientApiParams,
4238
- locale
3896
+ clientApiParams
4239
3897
  }) => {
4240
3898
  const clientApi = await GetClientAPI(clientApiParams);
4241
3899
  const { data } = await clientApi.get(`/events/${eventId}/speakers`, {
@@ -4246,14 +3904,6 @@ var GetEventSpeakers = async ({
4246
3904
  search: search || void 0
4247
3905
  }
4248
3906
  });
4249
- if (queryClient && data.status === "ok") {
4250
- CacheIndividualQueries(
4251
- data,
4252
- queryClient,
4253
- (speakerId) => EVENT_SPEAKER_QUERY_KEY(eventId, speakerId),
4254
- locale
4255
- );
4256
- }
4257
3907
  return data;
4258
3908
  };
4259
3909
  var useGetEventSpeakers = (eventId = "", params = {}, options = {}) => {
@@ -4321,9 +3971,7 @@ var GetEventSponsors = async ({
4321
3971
  pageSize,
4322
3972
  orderBy,
4323
3973
  search,
4324
- queryClient,
4325
- clientApiParams,
4326
- locale
3974
+ clientApiParams
4327
3975
  }) => {
4328
3976
  const clientApi = await GetClientAPI(clientApiParams);
4329
3977
  const { data } = await clientApi.get(`/events/${eventId}/sponsors`, {
@@ -4334,14 +3982,6 @@ var GetEventSponsors = async ({
4334
3982
  search: search || void 0
4335
3983
  }
4336
3984
  });
4337
- if (queryClient && data.status === "ok") {
4338
- CacheIndividualQueries(
4339
- data,
4340
- queryClient,
4341
- (sponsorId) => ACCOUNT_QUERY_KEY(sponsorId),
4342
- locale
4343
- );
4344
- }
4345
3985
  return data;
4346
3986
  };
4347
3987
  var useGetEventSponsors = (eventId = "", params = {}, options = {}) => {
@@ -4415,9 +4055,7 @@ var GetEventActivations = async ({
4415
4055
  pageSize,
4416
4056
  orderBy,
4417
4057
  search,
4418
- queryClient,
4419
- clientApiParams,
4420
- locale
4058
+ clientApiParams
4421
4059
  }) => {
4422
4060
  const clientApi = await GetClientAPI(clientApiParams);
4423
4061
  const { data } = await clientApi.get(`/events/${eventId}/activations`, {
@@ -4428,14 +4066,6 @@ var GetEventActivations = async ({
4428
4066
  search: search || void 0
4429
4067
  }
4430
4068
  });
4431
- if (queryClient && data.status === "ok") {
4432
- CacheIndividualQueries(
4433
- data,
4434
- queryClient,
4435
- (activationId) => EVENT_ACTIVATION_QUERY_KEY(eventId, activationId),
4436
- locale
4437
- );
4438
- }
4439
4069
  return data;
4440
4070
  };
4441
4071
  var useGetEventActivations = (eventId = "", params = {}, options = {}) => {
@@ -4803,9 +4433,7 @@ var GetAllGroupEvents = async ({
4803
4433
  orderBy,
4804
4434
  search,
4805
4435
  past,
4806
- queryClient,
4807
- clientApiParams,
4808
- locale
4436
+ clientApiParams
4809
4437
  }) => {
4810
4438
  const clientApi = await GetClientAPI(clientApiParams);
4811
4439
  const { data } = await clientApi.get(`/groups/events`, {
@@ -4817,14 +4445,6 @@ var GetAllGroupEvents = async ({
4817
4445
  past: past !== void 0 ? past : void 0
4818
4446
  }
4819
4447
  });
4820
- if (queryClient) {
4821
- CacheIndividualQueries(
4822
- data,
4823
- queryClient,
4824
- (eventId) => EVENT_QUERY_KEY(eventId),
4825
- locale
4826
- );
4827
- }
4828
4448
  return data;
4829
4449
  };
4830
4450
  var useGetAllGroupEvents = (past = false, params = {}, options = {}) => {
@@ -4852,9 +4472,7 @@ var GetChannels = async ({
4852
4472
  pageSize,
4853
4473
  orderBy,
4854
4474
  search,
4855
- queryClient,
4856
- clientApiParams,
4857
- locale
4475
+ clientApiParams
4858
4476
  }) => {
4859
4477
  const clientApi = await GetClientAPI(clientApiParams);
4860
4478
  const { data } = await clientApi.get(`/channels`, {
@@ -4865,14 +4483,6 @@ var GetChannels = async ({
4865
4483
  search: search || void 0
4866
4484
  }
4867
4485
  });
4868
- if (queryClient && data.status === "ok") {
4869
- CacheIndividualQueries(
4870
- data,
4871
- queryClient,
4872
- (channelId) => CHANNEL_QUERY_KEY(channelId),
4873
- locale
4874
- );
4875
- }
4876
4486
  return data;
4877
4487
  };
4878
4488
  var useGetChannels = (params = {}, options = {}) => {
@@ -4937,9 +4547,7 @@ var GetChannelCollections = async ({
4937
4547
  pageSize,
4938
4548
  orderBy,
4939
4549
  search,
4940
- queryClient,
4941
- clientApiParams,
4942
- locale
4550
+ clientApiParams
4943
4551
  }) => {
4944
4552
  const clientApi = await GetClientAPI(clientApiParams);
4945
4553
  const { data } = await clientApi.get(`/channels/${channelId}/collections`, {
@@ -4950,14 +4558,6 @@ var GetChannelCollections = async ({
4950
4558
  search: search || void 0
4951
4559
  }
4952
4560
  });
4953
- if (queryClient && data.status === "ok") {
4954
- CacheIndividualQueries(
4955
- data,
4956
- queryClient,
4957
- (collectionId) => CHANNEL_COLLECTION_QUERY_KEY(channelId, collectionId),
4958
- locale
4959
- );
4960
- }
4961
4561
  return data;
4962
4562
  };
4963
4563
  var useGetChannelCollections = (channelId, params = {}, options = {}) => {
@@ -5002,28 +4602,67 @@ var useGetChannelCollection = (channelId = "", collectionId = "", options = {})
5002
4602
  );
5003
4603
  };
5004
4604
 
5005
- // src/queries/contents/useGetContents.ts
5006
- var CONTENTS_QUERY_KEY = (type, featured, interest, past) => {
5007
- const key = ["CONTENTS"];
5008
- if (type) key.push(type);
4605
+ // src/queries/channels/collections/useGetChannelCollectionContents.ts
4606
+ var CHANNEL_COLLECTION_CONTENTS_QUERY_KEY = (channelId, collectionId) => [
4607
+ ...CHANNEL_COLLECTION_QUERY_KEY(channelId, collectionId),
4608
+ "CONTENTS"
4609
+ ];
4610
+ var GetChannelCollectionContents = async ({
4611
+ channelId,
4612
+ collectionId,
4613
+ pageParam,
4614
+ pageSize,
4615
+ orderBy,
4616
+ search,
4617
+ clientApiParams
4618
+ }) => {
4619
+ const clientApi = await GetClientAPI(clientApiParams);
4620
+ const { data } = await clientApi.get(
4621
+ `/channels/${channelId}/collections/${collectionId}/contents`,
4622
+ {
4623
+ params: {
4624
+ page: pageParam || void 0,
4625
+ pageSize: pageSize || void 0,
4626
+ orderBy: orderBy || void 0,
4627
+ search: search || void 0
4628
+ }
4629
+ }
4630
+ );
4631
+ return data;
4632
+ };
4633
+ var useGetChannelCollectionContents = (channelId, collectionId, params = {}, options = {}) => {
4634
+ return useConnectedInfiniteQuery(
4635
+ CHANNEL_COLLECTION_CONTENTS_QUERY_KEY(channelId, collectionId),
4636
+ (params2) => GetChannelCollectionContents({ channelId, collectionId, ...params2 }),
4637
+ params,
4638
+ {
4639
+ ...options,
4640
+ enabled: !!channelId && !!collectionId && (options?.enabled ?? true)
4641
+ }
4642
+ );
4643
+ };
4644
+
4645
+ // src/queries/channels/content/useGetChannelContents.ts
4646
+ var CHANNEL_CONTENTS_QUERY_KEY = (channelId, type, featured, past) => {
4647
+ const key = [...CHANNEL_QUERY_KEY(channelId), "CONTENTS"];
5009
4648
  if (featured) key.push("FEATURED");
5010
- if (interest) key.push(interest);
5011
4649
  if (typeof past !== "undefined") key.push(past ? "PAST" : "UPCOMING");
4650
+ if (type) key.push(type);
5012
4651
  return key;
5013
4652
  };
5014
- var SET_CONTENTS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
4653
+ var SET_CHANNEL_CONTENTS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
5015
4654
  client.setQueryData(
5016
4655
  [
5017
- ...CONTENTS_QUERY_KEY(...keyParams),
4656
+ ...CHANNEL_CONTENTS_QUERY_KEY(...keyParams),
5018
4657
  ...GetBaseInfiniteQueryKeys(...baseKeys)
5019
4658
  ],
5020
4659
  setFirstPageData(response)
5021
4660
  );
5022
4661
  };
5023
- var GetContents = async ({
4662
+ var GetChannelContents = async ({
4663
+ channelId,
5024
4664
  type,
5025
4665
  featured,
5026
- interest,
5027
4666
  past,
5028
4667
  pageParam,
5029
4668
  pageSize,
@@ -5032,11 +4671,10 @@ var GetContents = async ({
5032
4671
  clientApiParams
5033
4672
  }) => {
5034
4673
  const clientApi = await GetClientAPI(clientApiParams);
5035
- const { data } = await clientApi.get(`/contents`, {
4674
+ const { data } = await clientApi.get(`/channels/${channelId}/contents`, {
5036
4675
  params: {
5037
4676
  type: type || void 0,
5038
- featured: typeof featured !== "undefined" ? featured ? "true" : "false" : void 0,
5039
- interest: interest || void 0,
4677
+ featured: featured || void 0,
5040
4678
  past,
5041
4679
  page: pageParam || void 0,
5042
4680
  pageSize: pageSize || void 0,
@@ -5046,185 +4684,21 @@ var GetContents = async ({
5046
4684
  });
5047
4685
  return data;
5048
4686
  };
5049
- var useGetContents = (type, featured, interest, past, params = {}, options = {}) => {
4687
+ var useGetChannelContents = (channelId = "", type, featured, past, params = {}, options = {}) => {
5050
4688
  return useConnectedInfiniteQuery(
5051
- CONTENTS_QUERY_KEY(type, featured, interest, past),
5052
- (params2) => GetContents({ type, featured, interest, past, ...params2 }),
4689
+ CHANNEL_CONTENTS_QUERY_KEY(channelId, type, featured, past),
4690
+ (params2) => GetChannelContents({
4691
+ ...params2,
4692
+ channelId: channelId || "",
4693
+ type,
4694
+ featured,
4695
+ past
4696
+ }),
5053
4697
  params,
5054
- options
5055
- );
5056
- };
5057
-
5058
- // src/queries/contents/useGetContent.ts
5059
- var CONTENT_QUERY_KEY = (contentId) => [
5060
- ...CONTENTS_QUERY_KEY(),
5061
- contentId
5062
- ];
5063
- var SET_CONTENT_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
5064
- client.setQueryData(
5065
- [
5066
- ...CONTENT_QUERY_KEY(...keyParams),
5067
- ...GetBaseSingleQueryKeys(...baseKeys)
5068
- ],
5069
- response
5070
- );
5071
- };
5072
- var GetContent = async ({
5073
- contentId,
5074
- clientApiParams
5075
- }) => {
5076
- const clientApi = await GetClientAPI(clientApiParams);
5077
- const { data } = await clientApi.get(`/contents/${contentId}`);
5078
- return data;
5079
- };
5080
- var useGetContent = (contentId = "", options = {}) => {
5081
- return useConnectedSingleQuery_default(
5082
- CONTENT_QUERY_KEY(contentId),
5083
- (params) => GetContent({ contentId, ...params }),
5084
- {
5085
- ...options,
5086
- enabled: !!contentId && options.enabled
5087
- }
5088
- );
5089
- };
5090
-
5091
- // src/queries/contents/useGetContentInterests.ts
5092
- var CONTENT_INTERESTS_QUERY_KEY = () => {
5093
- const key = ["CONTENTS_INTERESTS"];
5094
- return key;
5095
- };
5096
- var GetContentInterests = async ({
5097
- pageParam,
5098
- pageSize,
5099
- orderBy,
5100
- search,
5101
- clientApiParams
5102
- }) => {
5103
- const clientApi = await GetClientAPI(clientApiParams);
5104
- const { data } = await clientApi.get(`/contents/interests`, {
5105
- params: {
5106
- page: pageParam || void 0,
5107
- pageSize: pageSize || void 0,
5108
- orderBy: orderBy || void 0,
5109
- search: search || void 0
5110
- }
5111
- });
5112
- return data;
5113
- };
5114
- var useGetContentInterests = (params = {}, options = {}) => {
5115
- return useConnectedInfiniteQuery(
5116
- CONTENT_INTERESTS_QUERY_KEY(),
5117
- (params2) => GetContentInterests({ ...params2 }),
5118
- params,
5119
- options
5120
- );
5121
- };
5122
-
5123
- // src/queries/contents/useGetSubscribedContents.ts
5124
- var SUBSCRIBED_CONTENTS_QUERY_KEY = (type, interest) => {
5125
- const key = ["SUBSCRIBED_CONTENTS"];
5126
- if (type) key.push(type);
5127
- if (interest) key.push(interest);
5128
- return key;
5129
- };
5130
- var GetSubscribedContents = async ({
5131
- type,
5132
- interest,
5133
- pageParam,
5134
- pageSize,
5135
- orderBy,
5136
- search,
5137
- clientApiParams
5138
- }) => {
5139
- const clientApi = await GetClientAPI(clientApiParams);
5140
- const { data } = await clientApi.get(`/contents/subscribed`, {
5141
- params: {
5142
- type: type || void 0,
5143
- interest: interest || void 0,
5144
- page: pageParam || void 0,
5145
- pageSize: pageSize || void 0,
5146
- orderBy: orderBy || void 0,
5147
- search: search || void 0
5148
- }
5149
- });
5150
- return data;
5151
- };
5152
- var useGetSubscribedContents = (type, interest, params = {}, options = {}) => {
5153
- return useConnectedInfiniteQuery(
5154
- SUBSCRIBED_CONTENTS_QUERY_KEY(interest),
5155
- (params2) => GetSubscribedContents({ interest, ...params2 }),
5156
- params,
5157
- options
5158
- );
5159
- };
5160
-
5161
- // src/queries/channels/content/useGetChannelContents.ts
5162
- var CHANNEL_CONTENTS_QUERY_KEY = (channelId, type, featured, past) => {
5163
- const key = [...CHANNEL_QUERY_KEY(channelId), "CONTENTS"];
5164
- if (featured) key.push("FEATURED");
5165
- if (typeof past !== "undefined") key.push(past ? "PAST" : "UPCOMING");
5166
- if (type) key.push(type);
5167
- return key;
5168
- };
5169
- var SET_CHANNEL_CONTENTS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
5170
- client.setQueryData(
5171
- [
5172
- ...CHANNEL_CONTENTS_QUERY_KEY(...keyParams),
5173
- ...GetBaseInfiniteQueryKeys(...baseKeys)
5174
- ],
5175
- setFirstPageData(response)
5176
- );
5177
- };
5178
- var GetChannelContents = async ({
5179
- channelId,
5180
- type,
5181
- featured,
5182
- past,
5183
- pageParam,
5184
- pageSize,
5185
- orderBy,
5186
- search,
5187
- queryClient,
5188
- clientApiParams,
5189
- locale
5190
- }) => {
5191
- const clientApi = await GetClientAPI(clientApiParams);
5192
- const { data } = await clientApi.get(`/channels/${channelId}/contents`, {
5193
- params: {
5194
- type: type || void 0,
5195
- featured: featured || void 0,
5196
- past,
5197
- page: pageParam || void 0,
5198
- pageSize: pageSize || void 0,
5199
- orderBy: orderBy || void 0,
5200
- search: search || void 0
5201
- }
5202
- });
5203
- if (queryClient && data.status === "ok") {
5204
- CacheIndividualQueries(
5205
- data,
5206
- queryClient,
5207
- (contentId) => CHANNEL_CONTENT_QUERY_KEY(channelId, contentId),
5208
- locale
5209
- );
5210
- }
5211
- return data;
5212
- };
5213
- var useGetChannelContents = (channelId = "", type, featured, past, params = {}, options = {}) => {
5214
- return useConnectedInfiniteQuery(
5215
- CHANNEL_CONTENTS_QUERY_KEY(channelId, type, featured, past),
5216
- (params2) => GetChannelContents({
5217
- ...params2,
5218
- channelId: channelId || "",
5219
- type,
5220
- featured,
5221
- past
5222
- }),
5223
- params,
5224
- {
5225
- ...options,
5226
- enabled: !!channelId && (options?.enabled ?? true)
5227
- }
4698
+ {
4699
+ ...options,
4700
+ enabled: !!channelId && (options?.enabled ?? true)
4701
+ }
5228
4702
  );
5229
4703
  };
5230
4704
 
@@ -5282,9 +4756,7 @@ var GetChannelContentActivities = async ({
5282
4756
  pageSize,
5283
4757
  orderBy,
5284
4758
  search,
5285
- queryClient,
5286
- clientApiParams,
5287
- locale
4759
+ clientApiParams
5288
4760
  }) => {
5289
4761
  const clientApi = await GetClientAPI(clientApiParams);
5290
4762
  const { data } = await clientApi.get(
@@ -5298,14 +4770,6 @@ var GetChannelContentActivities = async ({
5298
4770
  }
5299
4771
  }
5300
4772
  );
5301
- if (queryClient && data.status === "ok") {
5302
- CacheIndividualQueries(
5303
- data,
5304
- queryClient,
5305
- (activityId) => ACTIVITY_QUERY_KEY(activityId),
5306
- locale
5307
- );
5308
- }
5309
4773
  return data;
5310
4774
  };
5311
4775
  var useGetChannelContentActivities = (channelId = "", contentId = "", params = {}, options = {}) => {
@@ -5397,62 +4861,6 @@ var useGetChannelContentGuests = (channelId, contentId, params = {}, options = {
5397
4861
  );
5398
4862
  };
5399
4863
 
5400
- // src/queries/channels/collections/useGetChannelCollectionContents.ts
5401
- var CHANNEL_COLLECTION_CONTENTS_QUERY_KEY = (channelId, collectionId) => [
5402
- ...CHANNEL_COLLECTION_QUERY_KEY(channelId, collectionId),
5403
- "CONTENTS"
5404
- ];
5405
- var GetChannelCollectionContents = async ({
5406
- channelId,
5407
- collectionId,
5408
- pageParam,
5409
- pageSize,
5410
- orderBy,
5411
- search,
5412
- queryClient,
5413
- clientApiParams,
5414
- locale
5415
- }) => {
5416
- const clientApi = await GetClientAPI(clientApiParams);
5417
- const { data } = await clientApi.get(
5418
- `/channels/${channelId}/collections/${collectionId}/contents`,
5419
- {
5420
- params: {
5421
- page: pageParam || void 0,
5422
- pageSize: pageSize || void 0,
5423
- orderBy: orderBy || void 0,
5424
- search: search || void 0
5425
- }
5426
- }
5427
- );
5428
- if (queryClient && data.status === "ok") {
5429
- CacheIndividualQueries(
5430
- data,
5431
- queryClient,
5432
- (contentId) => CHANNEL_CONTENT_QUERY_KEY(channelId, contentId),
5433
- locale
5434
- );
5435
- CacheIndividualQueries(
5436
- data,
5437
- queryClient,
5438
- (contentId) => CONTENT_QUERY_KEY(contentId),
5439
- locale
5440
- );
5441
- }
5442
- return data;
5443
- };
5444
- var useGetChannelCollectionContents = (channelId, collectionId, params = {}, options = {}) => {
5445
- return useConnectedInfiniteQuery(
5446
- CHANNEL_COLLECTION_CONTENTS_QUERY_KEY(channelId, collectionId),
5447
- (params2) => GetChannelCollectionContents({ channelId, collectionId, ...params2 }),
5448
- params,
5449
- {
5450
- ...options,
5451
- enabled: !!channelId && !!collectionId && (options?.enabled ?? true)
5452
- }
5453
- );
5454
- };
5455
-
5456
4864
  // src/queries/channels/managed/useGetManagedChannels.ts
5457
4865
  var MANAGED_CHANNELS_QUERY_KEY = () => [
5458
4866
  "CHANNELS",
@@ -5472,9 +4880,7 @@ var GetManagedChannels = async ({
5472
4880
  pageSize,
5473
4881
  orderBy,
5474
4882
  search,
5475
- queryClient,
5476
- clientApiParams,
5477
- locale
4883
+ clientApiParams
5478
4884
  }) => {
5479
4885
  const clientApi = await GetClientAPI(clientApiParams);
5480
4886
  const { data } = await clientApi.get(`/channels/managed`, {
@@ -5485,14 +4891,6 @@ var GetManagedChannels = async ({
5485
4891
  search: search || void 0
5486
4892
  }
5487
4893
  });
5488
- if (queryClient && data.status === "ok") {
5489
- CacheIndividualQueries(
5490
- data,
5491
- queryClient,
5492
- (channelId) => MANAGED_CHANNEL_QUERY_KEY(channelId),
5493
- locale
5494
- );
5495
- }
5496
4894
  return data;
5497
4895
  };
5498
4896
  var useGetManagedChannels = (params = {}, options = {}) => {
@@ -5554,9 +4952,7 @@ var GetManagedChannelCollections = async ({
5554
4952
  pageSize,
5555
4953
  orderBy,
5556
4954
  search,
5557
- queryClient,
5558
- clientApiParams,
5559
- locale
4955
+ clientApiParams
5560
4956
  }) => {
5561
4957
  const clientApi = await GetClientAPI(clientApiParams);
5562
4958
  const { data } = await clientApi.get(
@@ -5570,14 +4966,6 @@ var GetManagedChannelCollections = async ({
5570
4966
  }
5571
4967
  }
5572
4968
  );
5573
- if (queryClient && data.status === "ok") {
5574
- CacheIndividualQueries(
5575
- data,
5576
- queryClient,
5577
- (collectionId) => MANAGED_CHANNEL_COLLECTION_QUERY_KEY(channelId, collectionId),
5578
- locale
5579
- );
5580
- }
5581
4969
  return data;
5582
4970
  };
5583
4971
  var useGetManagedChannelCollections = (channelId, params = {}, options = {}) => {
@@ -5625,6 +5013,50 @@ var useGetManagedChannelCollection = (channelId = "", collectionId = "", options
5625
5013
  );
5626
5014
  };
5627
5015
 
5016
+ // src/queries/channels/managed/collections/useGetManagedChannelCollectionContents.ts
5017
+ var MANAGED_CHANNEL_COLLECTION_CONTENTS_QUERY_KEY = (channelId, collectionId) => [
5018
+ ...MANAGED_CHANNEL_COLLECTION_QUERY_KEY(channelId, collectionId),
5019
+ "CONTENTS"
5020
+ ];
5021
+ var GetManagedChannelCollectionContents = async ({
5022
+ channelId,
5023
+ collectionId,
5024
+ pageParam,
5025
+ pageSize,
5026
+ orderBy,
5027
+ search,
5028
+ clientApiParams
5029
+ }) => {
5030
+ const clientApi = await GetClientAPI(clientApiParams);
5031
+ const { data } = await clientApi.get(
5032
+ `/channels/managed/${channelId}/collections/${collectionId}/contents`,
5033
+ {
5034
+ params: {
5035
+ page: pageParam || void 0,
5036
+ pageSize: pageSize || void 0,
5037
+ orderBy: orderBy || void 0,
5038
+ search: search || void 0
5039
+ }
5040
+ }
5041
+ );
5042
+ return data;
5043
+ };
5044
+ var useGetManagedChannelCollectionContents = (channelId, collectionId, params = {}, options = {}) => {
5045
+ return useConnectedInfiniteQuery(
5046
+ MANAGED_CHANNEL_COLLECTION_CONTENTS_QUERY_KEY(channelId, collectionId),
5047
+ (params2) => GetManagedChannelCollectionContents({
5048
+ channelId,
5049
+ collectionId,
5050
+ ...params2
5051
+ }),
5052
+ params,
5053
+ {
5054
+ ...options,
5055
+ enabled: !!channelId && !!collectionId && (options?.enabled ?? true)
5056
+ }
5057
+ );
5058
+ };
5059
+
5628
5060
  // src/queries/channels/managed/content/useGetManagedChannelContents.ts
5629
5061
  var MANAGED_CHANNEL_CONTENTS_QUERY_KEY = (channelId) => [...MANAGED_CHANNEL_QUERY_KEY(channelId), "CONTENTS"];
5630
5062
  var SET_MANAGED_CHANNEL_CONTENTS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
@@ -5642,9 +5074,7 @@ var GetManagedChannelContents = async ({
5642
5074
  orderBy,
5643
5075
  search,
5644
5076
  channelId,
5645
- queryClient,
5646
- clientApiParams,
5647
- locale
5077
+ clientApiParams
5648
5078
  }) => {
5649
5079
  const clientApi = await GetClientAPI(clientApiParams);
5650
5080
  const { data } = await clientApi.get(
@@ -5658,14 +5088,6 @@ var GetManagedChannelContents = async ({
5658
5088
  }
5659
5089
  }
5660
5090
  );
5661
- if (queryClient && data.status === "ok") {
5662
- CacheIndividualQueries(
5663
- data,
5664
- queryClient,
5665
- (contentId) => MANAGED_CHANNEL_CONTENT_QUERY_KEY(channelId, contentId),
5666
- locale
5667
- );
5668
- }
5669
5091
  return data;
5670
5092
  };
5671
5093
  var useGetManagedChannelContents = (channelId = "", params = {}, options = {}) => {
@@ -5734,9 +5156,7 @@ var GetManagedChannelContentActivities = async ({
5734
5156
  pageSize,
5735
5157
  orderBy,
5736
5158
  search,
5737
- queryClient,
5738
- clientApiParams,
5739
- locale
5159
+ clientApiParams
5740
5160
  }) => {
5741
5161
  const clientApi = await GetClientAPI(clientApiParams);
5742
5162
  const { data } = await clientApi.get(
@@ -5750,14 +5170,6 @@ var GetManagedChannelContentActivities = async ({
5750
5170
  }
5751
5171
  }
5752
5172
  );
5753
- if (queryClient && data.status === "ok") {
5754
- CacheIndividualQueries(
5755
- data,
5756
- queryClient,
5757
- (activityId) => ACTIVITY_QUERY_KEY(activityId),
5758
- locale
5759
- );
5760
- }
5761
5173
  return data;
5762
5174
  };
5763
5175
  var useGetManagedChannelContentActivities = (channelId = "", contentId = "", params = {}, options = {}) => {
@@ -5852,25 +5264,28 @@ var useGetManagedChannelContentGuests = (channelId, contentId, params = {}, opti
5852
5264
  );
5853
5265
  };
5854
5266
 
5855
- // src/queries/channels/managed/collections/useGetManagedChannelCollectionContents.ts
5856
- var MANAGED_CHANNEL_COLLECTION_CONTENTS_QUERY_KEY = (channelId, collectionId) => [
5857
- ...MANAGED_CHANNEL_COLLECTION_QUERY_KEY(channelId, collectionId),
5858
- "CONTENTS"
5859
- ];
5860
- var GetManagedChannelCollectionContents = async ({
5861
- channelId,
5862
- collectionId,
5267
+ // src/queries/channels/managed/useGetManagedChannelSubscribers.ts
5268
+ var MANAGED_CHANNEL_SUBSCRIBERS_QUERY_KEY = (channelId) => [...MANAGED_CHANNEL_QUERY_KEY(channelId), "SUBSCRIBERS"];
5269
+ var SET_MANAGED_CHANNEL_SUBSCRIBERS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
5270
+ client.setQueryData(
5271
+ [
5272
+ ...MANAGED_CHANNEL_SUBSCRIBERS_QUERY_KEY(...keyParams),
5273
+ ...GetBaseInfiniteQueryKeys(...baseKeys)
5274
+ ],
5275
+ setFirstPageData(response)
5276
+ );
5277
+ };
5278
+ var GetManagedChannelSubscribers = async ({
5863
5279
  pageParam,
5864
5280
  pageSize,
5865
5281
  orderBy,
5866
5282
  search,
5867
- queryClient,
5868
- clientApiParams,
5869
- locale
5283
+ channelId,
5284
+ clientApiParams
5870
5285
  }) => {
5871
5286
  const clientApi = await GetClientAPI(clientApiParams);
5872
5287
  const { data } = await clientApi.get(
5873
- `/channels/managed/${channelId}/collections/${collectionId}/contents`,
5288
+ `/channels/managed/${channelId}/subscribers`,
5874
5289
  {
5875
5290
  params: {
5876
5291
  page: pageParam || void 0,
@@ -5880,60 +5295,33 @@ var GetManagedChannelCollectionContents = async ({
5880
5295
  }
5881
5296
  }
5882
5297
  );
5883
- if (queryClient && data.status === "ok") {
5884
- CacheIndividualQueries(
5885
- data,
5886
- queryClient,
5887
- (contentId) => MANAGED_CHANNEL_CONTENT_QUERY_KEY(channelId, contentId),
5888
- locale
5889
- );
5890
- CacheIndividualQueries(
5891
- data,
5892
- queryClient,
5893
- (contentId) => CONTENT_QUERY_KEY(contentId),
5894
- locale
5895
- );
5896
- }
5897
5298
  return data;
5898
5299
  };
5899
- var useGetManagedChannelCollectionContents = (channelId, collectionId, params = {}, options = {}) => {
5300
+ var useGetManagedChannelSubscribers = (channelId = "", params = {}, options = {}) => {
5900
5301
  return useConnectedInfiniteQuery(
5901
- MANAGED_CHANNEL_COLLECTION_CONTENTS_QUERY_KEY(channelId, collectionId),
5902
- (params2) => GetManagedChannelCollectionContents({
5903
- channelId,
5904
- collectionId,
5905
- ...params2
5906
- }),
5302
+ MANAGED_CHANNEL_SUBSCRIBERS_QUERY_KEY(channelId),
5303
+ (params2) => GetManagedChannelSubscribers({ ...params2, channelId: channelId || "" }),
5907
5304
  params,
5908
5305
  {
5909
5306
  ...options,
5910
- enabled: !!channelId && !!collectionId && (options?.enabled ?? true)
5307
+ enabled: !!channelId && (options?.enabled ?? true)
5911
5308
  }
5912
5309
  );
5913
5310
  };
5914
5311
 
5915
- // src/queries/channels/managed/useGetManagedChannelSubscribers.ts
5916
- var MANAGED_CHANNEL_SUBSCRIBERS_QUERY_KEY = (channelId) => [...MANAGED_CHANNEL_QUERY_KEY(channelId), "SUBSCRIBERS"];
5917
- var SET_MANAGED_CHANNEL_SUBSCRIBERS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
5918
- client.setQueryData(
5919
- [
5920
- ...MANAGED_CHANNEL_SUBSCRIBERS_QUERY_KEY(...keyParams),
5921
- ...GetBaseInfiniteQueryKeys(...baseKeys)
5922
- ],
5923
- setFirstPageData(response)
5924
- );
5925
- };
5926
- var GetManagedChannelSubscribers = async ({
5312
+ // src/queries/channels/managed/useGetManagedChannelInterests.ts
5313
+ var MANAGED_CHANNEL_INTERESTS_QUERY_KEY = (channelId) => [...MANAGED_CHANNEL_QUERY_KEY(channelId), "INTERESTS"];
5314
+ var GetManagedChannelInterests = async ({
5315
+ channelId,
5927
5316
  pageParam,
5928
5317
  pageSize,
5929
5318
  orderBy,
5930
5319
  search,
5931
- channelId,
5932
5320
  clientApiParams
5933
5321
  }) => {
5934
5322
  const clientApi = await GetClientAPI(clientApiParams);
5935
5323
  const { data } = await clientApi.get(
5936
- `/channels/managed/${channelId}/subscribers`,
5324
+ `/channels/managed/${channelId}/interests`,
5937
5325
  {
5938
5326
  params: {
5939
5327
  page: pageParam || void 0,
@@ -5942,73 +5330,189 @@ var GetManagedChannelSubscribers = async ({
5942
5330
  search: search || void 0
5943
5331
  }
5944
5332
  }
5945
- );
5333
+ );
5334
+ return data;
5335
+ };
5336
+ var useGetManagedChannelInterests = (channelId, params = {}, options = {}) => {
5337
+ return useConnectedInfiniteQuery(
5338
+ MANAGED_CHANNEL_INTERESTS_QUERY_KEY(channelId),
5339
+ (params2) => GetManagedChannelInterests({ channelId, ...params2 }),
5340
+ params,
5341
+ {
5342
+ ...options,
5343
+ enabled: !!channelId && (options?.enabled ?? true)
5344
+ }
5345
+ );
5346
+ };
5347
+
5348
+ // src/queries/channels/useGetSubscribedChannels.ts
5349
+ var SUBSCRIBED_CHANNELS_QUERY_KEY = () => [
5350
+ ...CHANNELS_QUERY_KEY(),
5351
+ "SUBSCRIBED"
5352
+ ];
5353
+ var GetSubscribedChannels = async ({
5354
+ pageParam,
5355
+ pageSize,
5356
+ orderBy,
5357
+ search,
5358
+ clientApiParams
5359
+ }) => {
5360
+ const clientApi = await GetClientAPI(clientApiParams);
5361
+ const { data } = await clientApi.get(`/channels/subscribed`, {
5362
+ params: {
5363
+ page: pageParam || void 0,
5364
+ pageSize: pageSize || void 0,
5365
+ orderBy: orderBy || void 0,
5366
+ search: search || void 0
5367
+ }
5368
+ });
5369
+ return data;
5370
+ };
5371
+ var useGetSubscribedChannels = (params = {}, options = {}) => {
5372
+ return useConnectedInfiniteQuery(
5373
+ SUBSCRIBED_CHANNELS_QUERY_KEY(),
5374
+ (params2) => GetSubscribedChannels({ ...params2 }),
5375
+ params,
5376
+ options
5377
+ );
5378
+ };
5379
+
5380
+ // src/queries/channels/useGetChannelInterests.ts
5381
+ var CHANNEL_INTERESTS_QUERY_KEY = (channelId) => [
5382
+ ...CHANNEL_QUERY_KEY(channelId),
5383
+ "INTERESTS"
5384
+ ];
5385
+ var GetChannelInterests = async ({
5386
+ channelId,
5387
+ pageParam,
5388
+ pageSize,
5389
+ orderBy,
5390
+ search,
5391
+ clientApiParams
5392
+ }) => {
5393
+ const clientApi = await GetClientAPI(clientApiParams);
5394
+ const { data } = await clientApi.get(`/channels/${channelId}/interests`, {
5395
+ params: {
5396
+ page: pageParam || void 0,
5397
+ pageSize: pageSize || void 0,
5398
+ orderBy: orderBy || void 0,
5399
+ search: search || void 0
5400
+ }
5401
+ });
5402
+ return data;
5403
+ };
5404
+ var useGetChannelInterests = (channelId, params = {}, options = {}) => {
5405
+ return useConnectedInfiniteQuery(
5406
+ CHANNEL_INTERESTS_QUERY_KEY(channelId),
5407
+ (params2) => GetChannelInterests({ channelId, ...params2 }),
5408
+ params,
5409
+ {
5410
+ ...options,
5411
+ enabled: !!channelId && (options?.enabled ?? true)
5412
+ }
5413
+ );
5414
+ };
5415
+
5416
+ // src/queries/contents/useGetContents.ts
5417
+ var CONTENTS_QUERY_KEY = (type, featured, interest, past) => {
5418
+ const key = ["CONTENTS"];
5419
+ if (type) key.push(type);
5420
+ if (featured) key.push("FEATURED");
5421
+ if (interest) key.push(interest);
5422
+ if (typeof past !== "undefined") key.push(past ? "PAST" : "UPCOMING");
5423
+ return key;
5424
+ };
5425
+ var SET_CONTENTS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
5426
+ client.setQueryData(
5427
+ [
5428
+ ...CONTENTS_QUERY_KEY(...keyParams),
5429
+ ...GetBaseInfiniteQueryKeys(...baseKeys)
5430
+ ],
5431
+ setFirstPageData(response)
5432
+ );
5433
+ };
5434
+ var GetContents = async ({
5435
+ type,
5436
+ featured,
5437
+ interest,
5438
+ past,
5439
+ pageParam,
5440
+ pageSize,
5441
+ orderBy,
5442
+ search,
5443
+ clientApiParams
5444
+ }) => {
5445
+ const clientApi = await GetClientAPI(clientApiParams);
5446
+ const { data } = await clientApi.get(`/contents`, {
5447
+ params: {
5448
+ type: type || void 0,
5449
+ featured: typeof featured !== "undefined" ? featured ? "true" : "false" : void 0,
5450
+ interest: interest || void 0,
5451
+ past,
5452
+ page: pageParam || void 0,
5453
+ pageSize: pageSize || void 0,
5454
+ orderBy: orderBy || void 0,
5455
+ search: search || void 0
5456
+ }
5457
+ });
5946
5458
  return data;
5947
5459
  };
5948
- var useGetManagedChannelSubscribers = (channelId = "", params = {}, options = {}) => {
5460
+ var useGetContents = (type, featured, interest, past, params = {}, options = {}) => {
5949
5461
  return useConnectedInfiniteQuery(
5950
- MANAGED_CHANNEL_SUBSCRIBERS_QUERY_KEY(channelId),
5951
- (params2) => GetManagedChannelSubscribers({ ...params2, channelId: channelId || "" }),
5462
+ CONTENTS_QUERY_KEY(type, featured, interest, past),
5463
+ (params2) => GetContents({ type, featured, interest, past, ...params2 }),
5952
5464
  params,
5953
- {
5954
- ...options,
5955
- enabled: !!channelId && (options?.enabled ?? true)
5956
- }
5465
+ options
5957
5466
  );
5958
5467
  };
5959
5468
 
5960
- // src/queries/channels/managed/useGetManagedChannelInterests.ts
5961
- var MANAGED_CHANNEL_INTERESTS_QUERY_KEY = (channelId) => [...MANAGED_CHANNEL_QUERY_KEY(channelId), "INTERESTS"];
5962
- var GetManagedChannelInterests = async ({
5963
- channelId,
5964
- pageParam,
5965
- pageSize,
5966
- orderBy,
5967
- search,
5469
+ // src/queries/contents/useGetContent.ts
5470
+ var CONTENT_QUERY_KEY = (contentId) => [
5471
+ ...CONTENTS_QUERY_KEY(),
5472
+ contentId
5473
+ ];
5474
+ var SET_CONTENT_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
5475
+ client.setQueryData(
5476
+ [
5477
+ ...CONTENT_QUERY_KEY(...keyParams),
5478
+ ...GetBaseSingleQueryKeys(...baseKeys)
5479
+ ],
5480
+ response
5481
+ );
5482
+ };
5483
+ var GetContent = async ({
5484
+ contentId,
5968
5485
  clientApiParams
5969
5486
  }) => {
5970
5487
  const clientApi = await GetClientAPI(clientApiParams);
5971
- const { data } = await clientApi.get(
5972
- `/channels/managed/${channelId}/interests`,
5973
- {
5974
- params: {
5975
- page: pageParam || void 0,
5976
- pageSize: pageSize || void 0,
5977
- orderBy: orderBy || void 0,
5978
- search: search || void 0
5979
- }
5980
- }
5981
- );
5488
+ const { data } = await clientApi.get(`/contents/${contentId}`);
5982
5489
  return data;
5983
5490
  };
5984
- var useGetManagedChannelInterests = (channelId, params = {}, options = {}) => {
5985
- return useConnectedInfiniteQuery(
5986
- MANAGED_CHANNEL_INTERESTS_QUERY_KEY(channelId),
5987
- (params2) => GetManagedChannelInterests({ channelId, ...params2 }),
5988
- params,
5491
+ var useGetContent = (contentId = "", options = {}) => {
5492
+ return useConnectedSingleQuery_default(
5493
+ CONTENT_QUERY_KEY(contentId),
5494
+ (params) => GetContent({ contentId, ...params }),
5989
5495
  {
5990
5496
  ...options,
5991
- enabled: !!channelId && (options?.enabled ?? true)
5497
+ enabled: !!contentId && options.enabled
5992
5498
  }
5993
5499
  );
5994
5500
  };
5995
5501
 
5996
- // src/queries/channels/useGetSubscribedChannels.ts
5997
- var SUBSCRIBED_CHANNELS_QUERY_KEY = () => [
5998
- ...CHANNELS_QUERY_KEY(),
5999
- "SUBSCRIBED"
6000
- ];
6001
- var GetSubscribedChannels = async ({
5502
+ // src/queries/contents/useGetContentInterests.ts
5503
+ var CONTENT_INTERESTS_QUERY_KEY = () => {
5504
+ const key = ["CONTENTS_INTERESTS"];
5505
+ return key;
5506
+ };
5507
+ var GetContentInterests = async ({
6002
5508
  pageParam,
6003
5509
  pageSize,
6004
5510
  orderBy,
6005
5511
  search,
6006
- queryClient,
6007
- clientApiParams,
6008
- locale
5512
+ clientApiParams
6009
5513
  }) => {
6010
5514
  const clientApi = await GetClientAPI(clientApiParams);
6011
- const { data } = await clientApi.get(`/channels/subscribed`, {
5515
+ const { data } = await clientApi.get(`/contents/interests`, {
6012
5516
  params: {
6013
5517
  page: pageParam || void 0,
6014
5518
  pageSize: pageSize || void 0,
@@ -6016,32 +5520,27 @@ var GetSubscribedChannels = async ({
6016
5520
  search: search || void 0
6017
5521
  }
6018
5522
  });
6019
- if (queryClient && data.status === "ok") {
6020
- CacheIndividualQueries(
6021
- data,
6022
- queryClient,
6023
- (channelId) => CHANNEL_QUERY_KEY(channelId),
6024
- locale
6025
- );
6026
- }
6027
5523
  return data;
6028
5524
  };
6029
- var useGetSubscribedChannels = (params = {}, options = {}) => {
5525
+ var useGetContentInterests = (params = {}, options = {}) => {
6030
5526
  return useConnectedInfiniteQuery(
6031
- SUBSCRIBED_CHANNELS_QUERY_KEY(),
6032
- (params2) => GetSubscribedChannels({ ...params2 }),
5527
+ CONTENT_INTERESTS_QUERY_KEY(),
5528
+ (params2) => GetContentInterests({ ...params2 }),
6033
5529
  params,
6034
5530
  options
6035
5531
  );
6036
5532
  };
6037
5533
 
6038
- // src/queries/channels/useGetChannelInterests.ts
6039
- var CHANNEL_INTERESTS_QUERY_KEY = (channelId) => [
6040
- ...CHANNEL_QUERY_KEY(channelId),
6041
- "INTERESTS"
6042
- ];
6043
- var GetChannelInterests = async ({
6044
- channelId,
5534
+ // src/queries/contents/useGetSubscribedContents.ts
5535
+ var SUBSCRIBED_CONTENTS_QUERY_KEY = (type, interest) => {
5536
+ const key = ["SUBSCRIBED_CONTENTS"];
5537
+ if (type) key.push(type);
5538
+ if (interest) key.push(interest);
5539
+ return key;
5540
+ };
5541
+ var GetSubscribedContents = async ({
5542
+ type,
5543
+ interest,
6045
5544
  pageParam,
6046
5545
  pageSize,
6047
5546
  orderBy,
@@ -6049,8 +5548,10 @@ var GetChannelInterests = async ({
6049
5548
  clientApiParams
6050
5549
  }) => {
6051
5550
  const clientApi = await GetClientAPI(clientApiParams);
6052
- const { data } = await clientApi.get(`/channels/${channelId}/interests`, {
5551
+ const { data } = await clientApi.get(`/contents/subscribed`, {
6053
5552
  params: {
5553
+ type: type || void 0,
5554
+ interest: interest || void 0,
6054
5555
  page: pageParam || void 0,
6055
5556
  pageSize: pageSize || void 0,
6056
5557
  orderBy: orderBy || void 0,
@@ -6059,15 +5560,12 @@ var GetChannelInterests = async ({
6059
5560
  });
6060
5561
  return data;
6061
5562
  };
6062
- var useGetChannelInterests = (channelId, params = {}, options = {}) => {
5563
+ var useGetSubscribedContents = (type, interest, params = {}, options = {}) => {
6063
5564
  return useConnectedInfiniteQuery(
6064
- CHANNEL_INTERESTS_QUERY_KEY(channelId),
6065
- (params2) => GetChannelInterests({ channelId, ...params2 }),
5565
+ SUBSCRIBED_CONTENTS_QUERY_KEY(interest),
5566
+ (params2) => GetSubscribedContents({ interest, ...params2 }),
6066
5567
  params,
6067
- {
6068
- ...options,
6069
- enabled: !!channelId && (options?.enabled ?? true)
6070
- }
5568
+ options
6071
5569
  );
6072
5570
  };
6073
5571
 
@@ -6227,9 +5725,7 @@ var GetSelfAddresses = async ({
6227
5725
  pageSize,
6228
5726
  orderBy,
6229
5727
  search,
6230
- queryClient,
6231
- clientApiParams,
6232
- locale
5728
+ clientApiParams
6233
5729
  }) => {
6234
5730
  const clientApi = await GetClientAPI(clientApiParams);
6235
5731
  const { data } = await clientApi.get(`/self/addresses`, {
@@ -6240,14 +5736,6 @@ var GetSelfAddresses = async ({
6240
5736
  search: search || void 0
6241
5737
  }
6242
5738
  });
6243
- if (queryClient && data.status === "ok") {
6244
- CacheIndividualQueries(
6245
- data,
6246
- queryClient,
6247
- (activityId) => SELF_ADDRESS_QUERY_KEY(activityId),
6248
- locale
6249
- );
6250
- }
6251
5739
  return data;
6252
5740
  };
6253
5741
  var useGetSelfAddresses = (params = {}, options = {}) => {
@@ -6302,9 +5790,7 @@ var GetSelfLeads = async ({
6302
5790
  pageSize,
6303
5791
  orderBy,
6304
5792
  search,
6305
- queryClient,
6306
- clientApiParams,
6307
- locale
5793
+ clientApiParams
6308
5794
  }) => {
6309
5795
  const clientApi = await GetClientAPI(clientApiParams);
6310
5796
  const { data } = await clientApi.get(`/self/leads`, {
@@ -6316,14 +5802,6 @@ var GetSelfLeads = async ({
6316
5802
  search: search || void 0
6317
5803
  }
6318
5804
  });
6319
- if (queryClient && data.status === "ok") {
6320
- CacheIndividualQueries(
6321
- data,
6322
- queryClient,
6323
- (activityId) => SELF_LEAD_QUERY_KEY(activityId),
6324
- locale
6325
- );
6326
- }
6327
5805
  return data;
6328
5806
  };
6329
5807
  var useGetSelfLeads = (status, params = {}, options = {}) => {
@@ -6407,9 +5885,7 @@ var GetSelfChatChannels = async ({
6407
5885
  pageSize,
6408
5886
  orderBy,
6409
5887
  search,
6410
- queryClient,
6411
- clientApiParams,
6412
- locale
5888
+ clientApiParams
6413
5889
  }) => {
6414
5890
  const clientApi = await GetClientAPI(clientApiParams);
6415
5891
  const { data } = await clientApi.get(`/self/chat/channels`, {
@@ -6420,20 +5896,6 @@ var GetSelfChatChannels = async ({
6420
5896
  search: search || void 0
6421
5897
  }
6422
5898
  });
6423
- if (queryClient && data.status === "ok") {
6424
- CacheIndividualQueries(
6425
- data,
6426
- queryClient,
6427
- (channelId) => SELF_CHAT_CHANNEL_QUERY_KEY(channelId),
6428
- locale,
6429
- (member) => {
6430
- return {
6431
- ...member,
6432
- id: member.channelId.toString()
6433
- };
6434
- }
6435
- );
6436
- }
6437
5899
  return data;
6438
5900
  };
6439
5901
  var useGetSelfChatChannels = (params = {}, options = {}) => {
@@ -7067,9 +6529,7 @@ var GetSelfSubscriptions = async ({
7067
6529
  pageSize,
7068
6530
  orderBy,
7069
6531
  search,
7070
- queryClient,
7071
- clientApiParams,
7072
- locale
6532
+ clientApiParams
7073
6533
  }) => {
7074
6534
  const clientApi = await GetClientAPI(clientApiParams);
7075
6535
  const { data } = await clientApi.get(`/self/subscriptions`, {
@@ -7081,14 +6541,6 @@ var GetSelfSubscriptions = async ({
7081
6541
  status: status || void 0
7082
6542
  }
7083
6543
  });
7084
- if (queryClient) {
7085
- CacheIndividualQueries(
7086
- data,
7087
- queryClient,
7088
- (subscriptionId) => SELF_SUBSCRIPTION_QUERY_KEY(subscriptionId),
7089
- locale
7090
- );
7091
- }
7092
6544
  return data;
7093
6545
  };
7094
6546
  var useGetSelfSubscriptions = (status, params = {}, options = {}) => {
@@ -7834,9 +7286,7 @@ var GetSelfActivities = async ({
7834
7286
  pageSize,
7835
7287
  orderBy,
7836
7288
  search,
7837
- queryClient,
7838
- clientApiParams,
7839
- locale
7289
+ clientApiParams
7840
7290
  }) => {
7841
7291
  const clientApi = await GetClientAPI(clientApiParams);
7842
7292
  const { data } = await clientApi.get(`/self/activities`, {
@@ -7847,14 +7297,6 @@ var GetSelfActivities = async ({
7847
7297
  search: search || void 0
7848
7298
  }
7849
7299
  });
7850
- if (queryClient && data.status === "ok") {
7851
- CacheIndividualQueries(
7852
- data,
7853
- queryClient,
7854
- (activityId) => ACTIVITY_QUERY_KEY(activityId),
7855
- locale
7856
- );
7857
- }
7858
7300
  return data;
7859
7301
  };
7860
7302
  var useGetSelfActivities = (params = {}, options = {}) => {
@@ -7975,9 +7417,7 @@ var GetSelfDelegateOf = async ({
7975
7417
  pageSize,
7976
7418
  orderBy,
7977
7419
  search,
7978
- queryClient,
7979
- clientApiParams,
7980
- locale
7420
+ clientApiParams
7981
7421
  }) => {
7982
7422
  const clientApi = await GetClientAPI(clientApiParams);
7983
7423
  const { data } = await clientApi.get(`/self/delegateof`, {
@@ -7988,14 +7428,6 @@ var GetSelfDelegateOf = async ({
7988
7428
  search: search || void 0
7989
7429
  }
7990
7430
  });
7991
- if (queryClient && data.status === "ok") {
7992
- CacheIndividualQueries(
7993
- data,
7994
- queryClient,
7995
- (accountId) => ACCOUNT_QUERY_KEY(accountId),
7996
- locale
7997
- );
7998
- }
7999
7431
  return data;
8000
7432
  };
8001
7433
  var useGetSelfDelegateOf = (params = {}, options = {}) => {
@@ -8021,9 +7453,7 @@ var GetSelfDelegates = async ({
8021
7453
  pageSize,
8022
7454
  orderBy,
8023
7455
  search,
8024
- queryClient,
8025
- clientApiParams,
8026
- locale
7456
+ clientApiParams
8027
7457
  }) => {
8028
7458
  const clientApi = await GetClientAPI(clientApiParams);
8029
7459
  const { data } = await clientApi.get(`/self/delegates`, {
@@ -8034,14 +7464,6 @@ var GetSelfDelegates = async ({
8034
7464
  search: search || void 0
8035
7465
  }
8036
7466
  });
8037
- if (queryClient && data.status === "ok") {
8038
- CacheIndividualQueries(
8039
- data,
8040
- queryClient,
8041
- (accountId) => ACCOUNT_QUERY_KEY(accountId),
8042
- locale
8043
- );
8044
- }
8045
7467
  return data;
8046
7468
  };
8047
7469
  var useGetSelfDelegates = (params = {}, options = {}) => {
@@ -8069,9 +7491,7 @@ var GetSelfEvents = async ({
8069
7491
  orderBy,
8070
7492
  search,
8071
7493
  past,
8072
- queryClient,
8073
- clientApiParams,
8074
- locale
7494
+ clientApiParams
8075
7495
  }) => {
8076
7496
  const clientApi = await GetClientAPI(clientApiParams);
8077
7497
  const { data } = await clientApi.get(`/self/events`, {
@@ -8083,14 +7503,6 @@ var GetSelfEvents = async ({
8083
7503
  past: past || false
8084
7504
  }
8085
7505
  });
8086
- if (queryClient && data.status === "ok") {
8087
- CacheIndividualQueries(
8088
- data,
8089
- queryClient,
8090
- (eventId) => EVENT_QUERY_KEY(eventId),
8091
- locale
8092
- );
8093
- }
8094
7506
  return data;
8095
7507
  };
8096
7508
  var useGetSelfEvents = (past = false, params = {}, options = {}) => {
@@ -8118,9 +7530,7 @@ var GetSelfEventSessions = async ({
8118
7530
  pageSize,
8119
7531
  orderBy,
8120
7532
  search,
8121
- queryClient,
8122
- clientApiParams,
8123
- locale
7533
+ clientApiParams
8124
7534
  }) => {
8125
7535
  const clientApi = await GetClientAPI(clientApiParams);
8126
7536
  const { data } = await clientApi.get(`/self/events/${eventId}/sessions`, {
@@ -8132,14 +7542,6 @@ var GetSelfEventSessions = async ({
8132
7542
  search: search || void 0
8133
7543
  }
8134
7544
  });
8135
- if (queryClient && data.status === "ok") {
8136
- CacheIndividualQueries(
8137
- data,
8138
- queryClient,
8139
- (sessionId) => EVENT_SESSION_QUERY_KEY(eventId, sessionId),
8140
- locale
8141
- );
8142
- }
8143
7545
  return data;
8144
7546
  };
8145
7547
  var useGetSelfEventSessions = (eventId, params = {}, options = {}) => {
@@ -8165,9 +7567,7 @@ var GetSelfFeed = async ({
8165
7567
  pageSize,
8166
7568
  orderBy,
8167
7569
  search,
8168
- queryClient,
8169
- clientApiParams,
8170
- locale
7570
+ clientApiParams
8171
7571
  }) => {
8172
7572
  const clientApi = await GetClientAPI(clientApiParams);
8173
7573
  const { data } = await clientApi.get(`/self/activities/feed`, {
@@ -8178,14 +7578,6 @@ var GetSelfFeed = async ({
8178
7578
  search: search || void 0
8179
7579
  }
8180
7580
  });
8181
- if (queryClient && data.status === "ok") {
8182
- CacheIndividualQueries(
8183
- data,
8184
- queryClient,
8185
- (activityId) => ACTIVITY_QUERY_KEY(activityId),
8186
- locale
8187
- );
8188
- }
8189
7581
  return data;
8190
7582
  };
8191
7583
  var useGetSelfFeed = (params = {}, options = {}) => {
@@ -8347,9 +7739,7 @@ var GetSelfPushDevices = async ({
8347
7739
  pageSize,
8348
7740
  orderBy,
8349
7741
  search,
8350
- queryClient,
8351
- clientApiParams,
8352
- locale
7742
+ clientApiParams
8353
7743
  }) => {
8354
7744
  const clientApi = await GetClientAPI(clientApiParams);
8355
7745
  const { data } = await clientApi.get(`/self/push-devices`, {
@@ -8360,14 +7750,6 @@ var GetSelfPushDevices = async ({
8360
7750
  search: search || void 0
8361
7751
  }
8362
7752
  });
8363
- if (queryClient && data.status === "ok") {
8364
- CacheIndividualQueries(
8365
- data,
8366
- queryClient,
8367
- (pushDeviceId) => SELF_PUSH_DEVICE_QUERY_KEY(pushDeviceId),
8368
- locale
8369
- );
8370
- }
8371
7753
  return data;
8372
7754
  };
8373
7755
  var useGetSelfPushDevices = (params = {}, options = {}) => {
@@ -8469,9 +7851,7 @@ var GetSeriesList = async ({
8469
7851
  pageSize,
8470
7852
  orderBy,
8471
7853
  search,
8472
- queryClient,
8473
- clientApiParams,
8474
- locale
7854
+ clientApiParams
8475
7855
  }) => {
8476
7856
  const clientApi = await GetClientAPI(clientApiParams);
8477
7857
  const { data } = await clientApi.get(`/series`, {
@@ -8482,14 +7862,6 @@ var GetSeriesList = async ({
8482
7862
  search: search || void 0
8483
7863
  }
8484
7864
  });
8485
- if (queryClient && data.status === "ok") {
8486
- CacheIndividualQueries(
8487
- data,
8488
- queryClient,
8489
- (seriesId) => SERIES_QUERY_KEY(seriesId),
8490
- locale
8491
- );
8492
- }
8493
7865
  return data;
8494
7866
  };
8495
7867
  var useGetSeriesList = (params = {}, options = {}) => {
@@ -8555,9 +7927,7 @@ var GetSeriesEvents = async ({
8555
7927
  orderBy,
8556
7928
  search,
8557
7929
  past,
8558
- queryClient,
8559
- clientApiParams,
8560
- locale
7930
+ clientApiParams
8561
7931
  }) => {
8562
7932
  const clientApi = await GetClientAPI(clientApiParams);
8563
7933
  const { data } = await clientApi.get(`/series/${seriesId}/events`, {
@@ -8569,14 +7939,6 @@ var GetSeriesEvents = async ({
8569
7939
  past: past !== void 0 ? past : void 0
8570
7940
  }
8571
7941
  });
8572
- if (queryClient && data.status === "ok") {
8573
- CacheIndividualQueries(
8574
- data,
8575
- queryClient,
8576
- (eventId) => EVENT_QUERY_KEY(eventId),
8577
- locale
8578
- );
8579
- }
8580
7942
  return data;
8581
7943
  };
8582
7944
  var useGetSeriesEvents = (seriesId = "", past, params = {}, options = {}) => {
@@ -8607,27 +7969,17 @@ var GetLevels = async ({
8607
7969
  pageSize,
8608
7970
  orderBy,
8609
7971
  search,
8610
- queryClient,
8611
- clientApiParams,
8612
- locale
7972
+ clientApiParams
8613
7973
  }) => {
8614
7974
  const clientApi = await GetClientAPI(clientApiParams);
8615
7975
  const { data } = await clientApi.get(`/levels`, {
8616
7976
  params: {
8617
7977
  page: pageParam || void 0,
8618
7978
  pageSize: pageSize || void 0,
8619
- orderBy: orderBy || void 0,
8620
- search: search || void 0
8621
- }
8622
- });
8623
- if (queryClient && data.status === "ok") {
8624
- CacheIndividualQueries(
8625
- data,
8626
- queryClient,
8627
- (levelId) => LEVEL_QUERY_KEY(levelId),
8628
- locale
8629
- );
8630
- }
7979
+ orderBy: orderBy || void 0,
7980
+ search: search || void 0
7981
+ }
7982
+ });
8631
7983
  return data;
8632
7984
  };
8633
7985
  var useGetLevels = (params = {}, options = {}) => {
@@ -8689,9 +8041,7 @@ var GetLevelSponsors = async ({
8689
8041
  pageSize,
8690
8042
  orderBy,
8691
8043
  search,
8692
- queryClient,
8693
- clientApiParams,
8694
- locale
8044
+ clientApiParams
8695
8045
  }) => {
8696
8046
  const clientApi = await GetClientAPI(clientApiParams);
8697
8047
  const { data } = await clientApi.get(`/levels/${levelId}/accounts`, {
@@ -8702,14 +8052,6 @@ var GetLevelSponsors = async ({
8702
8052
  search: search || void 0
8703
8053
  }
8704
8054
  });
8705
- if (queryClient && data.status === "ok") {
8706
- CacheIndividualQueries(
8707
- data,
8708
- queryClient,
8709
- (sponsorId) => ACCOUNT_QUERY_KEY(sponsorId),
8710
- locale
8711
- );
8712
- }
8713
8055
  return data;
8714
8056
  };
8715
8057
  var useGetLevelSponsors = (levelId = "", params = {}, options = {}) => {
@@ -8799,9 +8141,7 @@ var GetSelfEventListings = async ({
8799
8141
  orderBy,
8800
8142
  search,
8801
8143
  past,
8802
- queryClient,
8803
- clientApiParams,
8804
- locale
8144
+ clientApiParams
8805
8145
  }) => {
8806
8146
  const clientApi = await GetClientAPI(clientApiParams);
8807
8147
  const { data } = await clientApi.get(`/listings`, {
@@ -8813,14 +8153,6 @@ var GetSelfEventListings = async ({
8813
8153
  past: typeof past == "boolean" ? past : void 0
8814
8154
  }
8815
8155
  });
8816
- if (queryClient && data.status === "ok") {
8817
- CacheIndividualQueries(
8818
- data,
8819
- queryClient,
8820
- (eventId) => LISTING_QUERY_KEY(eventId),
8821
- locale
8822
- );
8823
- }
8824
8156
  return data;
8825
8157
  };
8826
8158
  var useGetSelfEventListings = (past = false, params = {}, options = {}) => {
@@ -9321,14 +8653,12 @@ var INTEREST_ACTIVITIES_QUERY_KEY = (interest) => [
9321
8653
  ...INTEREST_QUERY_KEY(interest)
9322
8654
  ];
9323
8655
  var GetInterestActivities = async ({
8656
+ interest,
9324
8657
  pageParam,
9325
8658
  pageSize,
9326
8659
  orderBy,
9327
8660
  search,
9328
- interest,
9329
- queryClient,
9330
- clientApiParams,
9331
- locale
8661
+ clientApiParams
9332
8662
  }) => {
9333
8663
  const clientApi = await GetClientAPI(clientApiParams);
9334
8664
  const { data } = await clientApi.get(`/interests/${interest}/activities`, {
@@ -9339,14 +8669,6 @@ var GetInterestActivities = async ({
9339
8669
  search: search || void 0
9340
8670
  }
9341
8671
  });
9342
- if (queryClient && data.status === "ok") {
9343
- CacheIndividualQueries(
9344
- data,
9345
- queryClient,
9346
- (activityId) => ACTIVITY_QUERY_KEY(activityId),
9347
- locale
9348
- );
9349
- }
9350
8672
  return data;
9351
8673
  };
9352
8674
  var useGetInterestActivities = (interest = "", params = {}, options = {}) => {
@@ -9361,468 +8683,277 @@ var useGetInterestActivities = (interest = "", params = {}, options = {}) => {
9361
8683
  );
9362
8684
  };
9363
8685
 
9364
- // src/queries/threads/useGetThread.ts
9365
- var THREAD_QUERY_KEY = (threadId, accountId) => [...THREADS_QUERY_KEY(), threadId, accountId];
9366
- var SET_THREAD_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"], options) => {
9367
- client.setQueryData(
9368
- [...THREAD_QUERY_KEY(...keyParams), ...GetBaseSingleQueryKeys(...baseKeys)],
9369
- response,
9370
- options
9371
- );
9372
- };
9373
- var GetThread = async ({
9374
- threadId,
9375
- clientApiParams
9376
- }) => {
9377
- const clientApi = await GetClientAPI(clientApiParams);
9378
- const { data } = await clientApi.get(`/threads/${threadId}`);
9379
- return data;
9380
- };
9381
- var useGetThread = (threadId = "", options = {}) => {
9382
- return useConnectedSingleQuery(
9383
- THREAD_QUERY_KEY(threadId),
9384
- (params) => GetThread({ threadId, ...params }),
9385
- {
9386
- ...options,
9387
- enabled: !!threadId && (options?.enabled ?? true)
9388
- }
9389
- );
9390
- };
9391
-
9392
- // src/queries/threads/useGetThreads.ts
9393
- var THREADS_QUERY_KEY = (access, groupId) => {
9394
- const keys = ["THREADS"];
9395
- if (access) keys.push(access);
9396
- if (groupId) keys.push(groupId);
9397
- return keys;
9398
- };
9399
- var SET_THREADS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
8686
+ // src/queries/threads/useGetThreadCircles.ts
8687
+ var THREADS_QUERY_KEY = () => ["THREADS"];
8688
+ var THREAD_CIRCLES_QUERY_KEY = () => [
8689
+ ...THREADS_QUERY_KEY(),
8690
+ "CIRCLES"
8691
+ ];
8692
+ var SET_THREAD_CIRCLES_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
9400
8693
  client.setQueryData(
9401
8694
  [
9402
- ...THREADS_QUERY_KEY(...keyParams),
8695
+ ...THREAD_CIRCLES_QUERY_KEY(...keyParams),
9403
8696
  ...GetBaseInfiniteQueryKeys(...baseKeys)
9404
8697
  ],
9405
8698
  setFirstPageData(response)
9406
8699
  );
9407
8700
  };
9408
- var GetThreads = async ({
8701
+ var GetThreadCircles = async ({
9409
8702
  pageParam,
9410
8703
  pageSize,
9411
8704
  orderBy,
9412
- queryClient,
9413
- access,
9414
- groupId,
9415
- eventId,
9416
8705
  search,
9417
- locale,
8706
+ type,
9418
8707
  clientApiParams
9419
8708
  }) => {
9420
8709
  const clientApi = await GetClientAPI(clientApiParams);
9421
- const { data } = await clientApi.get(`/threads`, {
8710
+ const { data } = await clientApi.get(`/threads/circles`, {
9422
8711
  params: {
9423
8712
  page: pageParam || void 0,
9424
8713
  pageSize: pageSize || void 0,
9425
8714
  orderBy: orderBy || void 0,
9426
8715
  search: search || void 0,
9427
- access: access || void 0,
9428
- groupId: groupId || void 0,
9429
- eventId: eventId || void 0
8716
+ type: type || void 0
9430
8717
  }
9431
8718
  });
9432
- if (queryClient && data.status === "ok") {
9433
- CacheIndividualQueries(
9434
- data,
9435
- queryClient,
9436
- (threadId) => THREAD_QUERY_KEY(threadId),
9437
- locale
9438
- );
9439
- }
9440
8719
  return data;
9441
8720
  };
9442
- var useGetThreads = (access = "public", groupId, eventId, params = {}, options = {}) => {
8721
+ var useGetThreadCircles = (params = {}, options = {}) => {
8722
+ const { authenticated } = useConnectedXM();
9443
8723
  return useConnectedInfiniteQuery(
9444
- THREADS_QUERY_KEY(access, groupId),
9445
- (params2) => GetThreads({ access, groupId, eventId, ...params2 }),
8724
+ THREAD_CIRCLES_QUERY_KEY(),
8725
+ (params2) => GetThreadCircles(params2),
9446
8726
  params,
9447
8727
  {
9448
- ...options
8728
+ ...options,
8729
+ enabled: !!authenticated && (options?.enabled ?? true)
9449
8730
  }
9450
8731
  );
9451
8732
  };
9452
8733
 
9453
- // src/queries/threads/useGetThreadMember.ts
9454
- var THREAD_MEMBER_QUERY_KEY = (threadId, accountId) => {
9455
- return [...THREAD_QUERY_KEY(threadId, accountId)];
9456
- };
9457
- var SET_THREAD_MEMBER_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"], options) => {
8734
+ // src/queries/threads/useGetThreadCircle.ts
8735
+ var THREAD_CIRCLE_QUERY_KEY = (circleId) => [
8736
+ ...THREAD_CIRCLES_QUERY_KEY(),
8737
+ circleId
8738
+ ];
8739
+ var SET_THREAD_CIRCLE_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"], options) => {
9458
8740
  client.setQueryData(
9459
8741
  [
9460
- ...THREAD_MEMBER_QUERY_KEY(...keyParams),
8742
+ ...THREAD_CIRCLE_QUERY_KEY(...keyParams),
9461
8743
  ...GetBaseSingleQueryKeys(...baseKeys)
9462
8744
  ],
9463
8745
  response,
9464
8746
  options
9465
8747
  );
9466
8748
  };
9467
- var GetThreadMember = async ({
9468
- threadId,
9469
- accountId,
8749
+ var GetThreadCircle = async ({
8750
+ circleId,
9470
8751
  clientApiParams
9471
8752
  }) => {
9472
8753
  const clientApi = await GetClientAPI(clientApiParams);
9473
- const { data } = await clientApi.get(
9474
- `/threads/${threadId}/members/${accountId}`
9475
- );
8754
+ const { data } = await clientApi.get(`/threads/circles/${circleId}`);
9476
8755
  return data;
9477
8756
  };
9478
- var useGetThreadMember = (threadId, accountId, options = {}) => {
8757
+ var useGetThreadCircle = (circleId = "", options = {}) => {
9479
8758
  return useConnectedSingleQuery(
9480
- THREAD_MEMBER_QUERY_KEY(threadId, accountId),
9481
- (params) => GetThreadMember({ threadId, accountId, ...params }),
8759
+ THREAD_CIRCLE_QUERY_KEY(circleId),
8760
+ (params) => GetThreadCircle({ circleId, ...params }),
9482
8761
  {
9483
8762
  ...options,
9484
- enabled: !!threadId && (options?.enabled ?? true)
8763
+ enabled: !!circleId && (options?.enabled ?? true)
9485
8764
  }
9486
8765
  );
9487
8766
  };
9488
8767
 
9489
- // src/queries/threads/useGetThreadMembers.ts
9490
- var THREAD_MEMBERS_QUERY_KEY = (threadId, role) => {
9491
- const keys = [...THREAD_QUERY_KEY(threadId), "MEMBERS"];
9492
- if (role) {
9493
- keys.push(role);
9494
- }
9495
- return keys;
9496
- };
9497
- var SET_THREAD_MEMBERS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
8768
+ // src/queries/threads/useGetThreadCircleAccounts.ts
8769
+ var THREAD_CIRCLE_ACCOUNTS_QUERY_KEY = (circleId) => [...THREAD_CIRCLE_QUERY_KEY(circleId), "ACCOUNTS"];
8770
+ var SET_THREAD_CIRCLE_ACCOUNTS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
9498
8771
  client.setQueryData(
9499
8772
  [
9500
- ...THREAD_MEMBERS_QUERY_KEY(...keyParams),
8773
+ ...THREAD_CIRCLE_ACCOUNTS_QUERY_KEY(...keyParams),
9501
8774
  ...GetBaseInfiniteQueryKeys(...baseKeys)
9502
8775
  ],
9503
8776
  setFirstPageData(response)
9504
8777
  );
9505
8778
  };
9506
- var GetThreadMembers = async ({
8779
+ var GetThreadCircleAccounts = async ({
8780
+ circleId,
9507
8781
  pageParam,
9508
8782
  pageSize,
9509
8783
  orderBy,
9510
8784
  search,
9511
8785
  role,
9512
- threadId,
9513
- clientApiParams
9514
- }) => {
9515
- const clientApi = await GetClientAPI(clientApiParams);
9516
- const { data } = await clientApi.get(`/threads/${threadId}/members`, {
9517
- params: {
9518
- page: pageParam || void 0,
9519
- pageSize: pageSize || void 0,
9520
- orderBy: orderBy || void 0,
9521
- search: search || void 0,
9522
- role: role || void 0
9523
- }
9524
- });
9525
- return data;
9526
- };
9527
- var useGetThreadMembers = (threadId = "", role, params = {}, options = {}) => {
9528
- return useConnectedInfiniteQuery(
9529
- THREAD_MEMBERS_QUERY_KEY(threadId, role),
9530
- (params2) => GetThreadMembers({ threadId, role, ...params2 }),
9531
- params,
9532
- {
9533
- ...options,
9534
- enabled: !!threadId && (options?.enabled ?? true)
9535
- }
9536
- );
9537
- };
9538
-
9539
- // src/queries/threads/useGetThreadMessage.ts
9540
- var THREAD_MESSAGE_QUERY_KEY = (threadId, messageId) => {
9541
- return [...THREAD_MESSAGES_QUERY_KEY(threadId, messageId)];
9542
- };
9543
- var SET_THREAD_MESSAGE_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"], options) => {
9544
- client.setQueryData(
9545
- [
9546
- ...THREAD_MESSAGE_QUERY_KEY(...keyParams),
9547
- ...GetBaseSingleQueryKeys(...baseKeys)
9548
- ],
9549
- response,
9550
- options
9551
- );
9552
- };
9553
- var GetThreadMessage = async ({
9554
- threadId,
9555
- messageId,
9556
8786
  clientApiParams
9557
8787
  }) => {
9558
8788
  const clientApi = await GetClientAPI(clientApiParams);
9559
8789
  const { data } = await clientApi.get(
9560
- `/threads/${threadId}/messages/${messageId}`
9561
- );
9562
- return data;
9563
- };
9564
- var useGetThreadMessage = (threadId, messageId, options = {}) => {
9565
- return useConnectedSingleQuery(
9566
- THREAD_MESSAGE_QUERY_KEY(threadId, messageId),
9567
- (params) => GetThreadMessage({ threadId, messageId, ...params }),
9568
- {
9569
- staleTime: Infinity,
9570
- ...options,
9571
- enabled: !!threadId && (options?.enabled ?? true)
9572
- }
9573
- );
9574
- };
9575
-
9576
- // src/queries/threads/useGetThreadMessages.ts
9577
- var THREAD_MESSAGES_QUERY_KEY = (threadId, messageId) => [...THREAD_QUERY_KEY(threadId, messageId), "MESSAGES"];
9578
- var SET_THREAD_MESSAGES_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
9579
- client.setQueryData(
9580
- [
9581
- ...THREAD_MESSAGES_QUERY_KEY(...keyParams),
9582
- ...GetBaseInfiniteQueryKeys(...baseKeys)
9583
- ],
9584
- setFirstPageData(response)
9585
- );
9586
- };
9587
- var GetThreadMessages = async ({
9588
- threadId,
9589
- pageParam,
9590
- pageSize,
9591
- orderBy,
9592
- search,
9593
- queryClient,
9594
- clientApiParams,
9595
- locale
9596
- }) => {
9597
- const clientApi = await GetClientAPI(clientApiParams);
9598
- const { data } = await clientApi.get(`/threads/${threadId}/messages`, {
9599
- params: {
9600
- page: pageParam || void 0,
9601
- pageSize: pageSize || void 0,
9602
- orderBy: orderBy || void 0,
9603
- search: search || void 0
9604
- }
9605
- });
9606
- if (queryClient && data.status === "ok") {
9607
- CacheIndividualQueries(
9608
- data,
9609
- queryClient,
9610
- (messageId) => THREAD_MESSAGE_QUERY_KEY(threadId, messageId),
9611
- locale
9612
- );
9613
- SET_THREAD_QUERY_DATA(queryClient, [threadId], (old) => ({
9614
- ...old,
9615
- data: {
9616
- ...old.data,
9617
- read: true
9618
- }
9619
- }));
9620
- }
9621
- return data;
9622
- };
9623
- var useGetThreadMessages = (threadId = "", params = {}, options = {}) => {
9624
- const { authenticated } = useConnectedXM();
9625
- return useConnectedInfiniteQuery(
9626
- THREAD_MESSAGES_QUERY_KEY(threadId),
9627
- (params2) => GetThreadMessages({ ...params2, threadId }),
9628
- params,
9629
- {
9630
- refetchInterval: 5 * 1e3,
9631
- ...options,
9632
- enabled: !!authenticated && !!threadId && (options?.enabled ?? true)
9633
- }
9634
- );
9635
- };
9636
-
9637
- // src/queries/threads/useGetThreadMessageReplies.ts
9638
- var THREAD_MESSAGE_REPLIES_QUERY_KEY = (threadId, messageId) => [...THREAD_MESSAGE_QUERY_KEY(threadId, messageId), "REPLIES"];
9639
- var SET_THREAD_MESSAGE_REPLIES_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
9640
- client.setQueryData(
9641
- [
9642
- ...THREAD_MESSAGE_REPLIES_QUERY_KEY(...keyParams),
9643
- ...GetBaseInfiniteQueryKeys(...baseKeys)
9644
- ],
9645
- setFirstPageData(response)
9646
- );
9647
- };
9648
- var GetThreadMessageReplies = async ({
9649
- threadId,
9650
- messageId,
9651
- pageParam,
9652
- pageSize,
9653
- orderBy,
9654
- search,
9655
- queryClient,
9656
- clientApiParams,
9657
- locale
9658
- }) => {
9659
- const clientApi = await GetClientAPI(clientApiParams);
9660
- const { data } = await clientApi.get(
9661
- `/threads/${threadId}/messages/${messageId}/replies`,
8790
+ `/threads/circles/${circleId}/accounts`,
9662
8791
  {
9663
8792
  params: {
9664
8793
  page: pageParam || void 0,
9665
8794
  pageSize: pageSize || void 0,
9666
8795
  orderBy: orderBy || void 0,
9667
- search: search || void 0
8796
+ search: search || void 0,
8797
+ role: role || void 0
9668
8798
  }
9669
8799
  }
9670
8800
  );
9671
- if (queryClient && data.status === "ok") {
9672
- CacheIndividualQueries(
9673
- data,
9674
- queryClient,
9675
- (messageId2) => THREAD_MESSAGE_QUERY_KEY(threadId, messageId2),
9676
- locale
9677
- );
9678
- }
9679
8801
  return data;
9680
8802
  };
9681
- var useGetThreadMessageReplies = (threadId = "", messageId = "", params = {}, options = {}) => {
8803
+ var useGetThreadCircleAccounts = (circleId = "", params = {}, options = {}) => {
9682
8804
  const { authenticated } = useConnectedXM();
9683
8805
  return useConnectedInfiniteQuery(
9684
- THREAD_MESSAGE_REPLIES_QUERY_KEY(threadId, messageId),
9685
- (params2) => GetThreadMessageReplies({ ...params2, threadId, messageId }),
8806
+ THREAD_CIRCLE_ACCOUNTS_QUERY_KEY(circleId),
8807
+ (params2) => GetThreadCircleAccounts({ ...params2, circleId }),
9686
8808
  params,
9687
8809
  {
9688
- refetchInterval: 5 * 1e3,
9689
8810
  ...options,
9690
- enabled: !!authenticated && !!threadId && !!messageId && (options?.enabled ?? true)
8811
+ enabled: !!authenticated && !!circleId && (options?.enabled ?? true)
9691
8812
  }
9692
8813
  );
9693
8814
  };
9694
8815
 
9695
- // src/queries/threads/useGetThreadGroups.ts
9696
- var THREAD_GROUPS_QUERY_KEY = (accountId) => [
9697
- ...THREADS_QUERY_KEY(),
9698
- "groups",
9699
- accountId
9700
- ];
9701
- var SET_THREAD_GROUPS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"], options) => {
8816
+ // src/queries/threads/useGetThreadCircleAccount.ts
8817
+ var THREAD_CIRCLE_ACCOUNT_QUERY_KEY = (circleId, accountId) => [...THREAD_CIRCLE_ACCOUNTS_QUERY_KEY(circleId), accountId];
8818
+ var SET_THREAD_CIRCLE_ACCOUNT_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"], options) => {
9702
8819
  client.setQueryData(
9703
8820
  [
9704
- ...THREAD_GROUPS_QUERY_KEY(...keyParams),
8821
+ ...THREAD_CIRCLE_ACCOUNT_QUERY_KEY(...keyParams),
9705
8822
  ...GetBaseSingleQueryKeys(...baseKeys)
9706
8823
  ],
9707
8824
  response,
9708
8825
  options
9709
8826
  );
9710
8827
  };
9711
- var GetThreadGroups = async ({
8828
+ var GetThreadCircleAccount = async ({
8829
+ circleId,
8830
+ accountId,
9712
8831
  clientApiParams
9713
8832
  }) => {
9714
8833
  const clientApi = await GetClientAPI(clientApiParams);
9715
- const { data } = await clientApi.get(`/threads/groups`);
8834
+ const { data } = await clientApi.get(
8835
+ `/threads/circles/${circleId}/accounts/${accountId}`
8836
+ );
9716
8837
  return data;
9717
8838
  };
9718
- var useGetThreadGroups = (options = {}) => {
8839
+ var useGetThreadCircleAccount = (circleId = "", accountId = "", options = {}) => {
9719
8840
  return useConnectedSingleQuery(
9720
- THREAD_GROUPS_QUERY_KEY(),
9721
- (params) => GetThreadGroups({ ...params }),
8841
+ THREAD_CIRCLE_ACCOUNT_QUERY_KEY(circleId, accountId),
8842
+ (params) => GetThreadCircleAccount({ circleId, accountId, ...params }),
9722
8843
  {
9723
8844
  ...options,
9724
- enabled: options?.enabled ?? true
8845
+ enabled: !!circleId && !!accountId && (options?.enabled ?? true)
9725
8846
  }
9726
8847
  );
9727
8848
  };
9728
8849
 
9729
- // src/queries/threads/useGetThreadGroup.ts
9730
- var THREAD_GROUP_QUERY_KEY = (groupId) => [
9731
- ...THREADS_QUERY_KEY(),
9732
- "group",
9733
- groupId
9734
- ];
9735
- var SET_THREAD_GROUP_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"], options) => {
8850
+ // src/queries/threads/useGetThread.ts
8851
+ var THREAD_QUERY_KEY = (threadId, accountId) => [...THREADS_QUERY_KEY(), threadId, accountId];
8852
+ var SET_THREAD_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"], options) => {
9736
8853
  client.setQueryData(
9737
- [
9738
- ...THREAD_GROUP_QUERY_KEY(...keyParams),
9739
- ...GetBaseSingleQueryKeys(...baseKeys)
9740
- ],
8854
+ [...THREAD_QUERY_KEY(...keyParams), ...GetBaseSingleQueryKeys(...baseKeys)],
9741
8855
  response,
9742
8856
  options
9743
8857
  );
9744
8858
  };
9745
- var GetThreadGroup = async ({
9746
- groupId,
8859
+ var GetThread = async ({
8860
+ threadId,
9747
8861
  clientApiParams
9748
8862
  }) => {
9749
8863
  const clientApi = await GetClientAPI(clientApiParams);
9750
- const { data } = await clientApi.get(`/threads/groups/${groupId}`);
8864
+ const { data } = await clientApi.get(`/threads/${threadId}`);
9751
8865
  return data;
9752
8866
  };
9753
- var useGetThreadGroup = (groupId = "", options = {}) => {
8867
+ var useGetThread = (threadId = "", options = {}) => {
9754
8868
  return useConnectedSingleQuery(
9755
- THREAD_GROUP_QUERY_KEY(groupId),
9756
- (params) => GetThreadGroup({ groupId, ...params }),
8869
+ THREAD_QUERY_KEY(threadId),
8870
+ (params) => GetThread({ threadId, ...params }),
9757
8871
  {
9758
8872
  ...options,
9759
- enabled: !!groupId && (options?.enabled ?? true)
8873
+ enabled: !!threadId && (options?.enabled ?? true)
9760
8874
  }
9761
8875
  );
9762
8876
  };
9763
8877
 
9764
- // src/queries/threads/useGetThreadEvents.ts
9765
- var THREAD_EVENTS_QUERY_KEY = (threadId, accountId) => [...THREADS_QUERY_KEY(), "events", threadId, accountId];
9766
- var SET_THREAD_EVENTS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"], options) => {
8878
+ // src/queries/threads/useGetThreadMessages.ts
8879
+ var THREAD_MESSAGES_QUERY_KEY = (threadId) => [
8880
+ ...THREAD_QUERY_KEY(threadId),
8881
+ "MESSAGES"
8882
+ ];
8883
+ var SET_THREAD_MESSAGES_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
9767
8884
  client.setQueryData(
9768
8885
  [
9769
- ...THREAD_EVENTS_QUERY_KEY(...keyParams),
9770
- ...GetBaseSingleQueryKeys(...baseKeys)
8886
+ ...THREAD_MESSAGES_QUERY_KEY(...keyParams),
8887
+ ...GetBaseInfiniteQueryKeys(...baseKeys)
9771
8888
  ],
9772
- response,
9773
- options
8889
+ setFirstPageData(response)
9774
8890
  );
9775
8891
  };
9776
- var GetThreadEvents = async ({
8892
+ var GetThreadMessages = async ({
9777
8893
  threadId,
8894
+ pageParam,
8895
+ pageSize,
8896
+ orderBy,
8897
+ search,
9778
8898
  clientApiParams
9779
8899
  }) => {
9780
8900
  const clientApi = await GetClientAPI(clientApiParams);
9781
- const { data } = await clientApi.get(`/threads/${threadId}/events`);
8901
+ const { data } = await clientApi.get(`/threads/${threadId}/messages`, {
8902
+ params: {
8903
+ page: pageParam || void 0,
8904
+ pageSize: pageSize || void 0,
8905
+ orderBy: orderBy || void 0,
8906
+ search: search || void 0
8907
+ }
8908
+ });
9782
8909
  return data;
9783
8910
  };
9784
- var useGetThreadEvents = (threadId = "", options = {}) => {
9785
- return useConnectedSingleQuery(
9786
- THREAD_EVENTS_QUERY_KEY(threadId),
9787
- (params) => GetThreadEvents({ threadId, ...params }),
8911
+ var useGetThreadMessages = (threadId = "", params = {}, options = {}) => {
8912
+ const { authenticated } = useConnectedXM();
8913
+ return useConnectedInfiniteQuery(
8914
+ THREAD_MESSAGES_QUERY_KEY(threadId),
8915
+ (params2) => GetThreadMessages({ ...params2, threadId }),
8916
+ params,
9788
8917
  {
9789
8918
  ...options,
9790
- enabled: !!threadId && (options?.enabled ?? true)
8919
+ enabled: !!authenticated && !!threadId && (options?.enabled ?? true)
9791
8920
  }
9792
8921
  );
9793
8922
  };
9794
8923
 
9795
- // src/queries/threads/useGetThreadEvent.ts
9796
- var THREAD_EVENT_QUERY_KEY = (eventId) => [
9797
- ...THREADS_QUERY_KEY(),
9798
- "event",
9799
- eventId
9800
- ];
9801
- var SET_THREAD_EVENT_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"], options) => {
8924
+ // src/queries/threads/useGetThreadMessage.ts
8925
+ var THREAD_MESSAGE_QUERY_KEY = (threadId, messageId) => {
8926
+ return [...THREAD_MESSAGES_QUERY_KEY(threadId), messageId];
8927
+ };
8928
+ var SET_THREAD_MESSAGE_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"], options) => {
9802
8929
  client.setQueryData(
9803
8930
  [
9804
- ...THREAD_EVENT_QUERY_KEY(...keyParams),
8931
+ ...THREAD_MESSAGE_QUERY_KEY(...keyParams),
9805
8932
  ...GetBaseSingleQueryKeys(...baseKeys)
9806
8933
  ],
9807
8934
  response,
9808
8935
  options
9809
8936
  );
9810
8937
  };
9811
- var GetThreadEvent = async ({
9812
- eventId,
8938
+ var GetThreadMessage = async ({
8939
+ threadId,
8940
+ messageId,
9813
8941
  clientApiParams
9814
8942
  }) => {
9815
8943
  const clientApi = await GetClientAPI(clientApiParams);
9816
- const { data } = await clientApi.get(`/threads/events/${eventId}`);
8944
+ const { data } = await clientApi.get(
8945
+ `/threads/${threadId}/messages/${messageId}`
8946
+ );
9817
8947
  return data;
9818
8948
  };
9819
- var useGetThreadEvent = (eventId = "", options = {}) => {
8949
+ var useGetThreadMessage = (threadId, messageId, options = {}) => {
9820
8950
  return useConnectedSingleQuery(
9821
- THREAD_EVENT_QUERY_KEY(eventId),
9822
- (params) => GetThreadEvent({ eventId, ...params }),
8951
+ THREAD_MESSAGE_QUERY_KEY(threadId, messageId),
8952
+ (params) => GetThreadMessage({ threadId, messageId, ...params }),
9823
8953
  {
8954
+ staleTime: Infinity,
9824
8955
  ...options,
9825
- enabled: !!eventId && (options?.enabled ?? true)
8956
+ enabled: !!threadId && !!messageId && (options?.enabled ?? true)
9826
8957
  }
9827
8958
  );
9828
8959
  };
@@ -9846,9 +8977,7 @@ var GetIntegrations = async ({
9846
8977
  pageSize,
9847
8978
  orderBy,
9848
8979
  search,
9849
- queryClient,
9850
- clientApiParams,
9851
- locale
8980
+ clientApiParams
9852
8981
  }) => {
9853
8982
  const clientApi = await GetClientAPI(clientApiParams);
9854
8983
  const { data } = await clientApi.get(`/integrations`, {
@@ -9859,14 +8988,6 @@ var GetIntegrations = async ({
9859
8988
  search: search || void 0
9860
8989
  }
9861
8990
  });
9862
- if (queryClient && data.status === "ok") {
9863
- CacheIndividualQueries(
9864
- data,
9865
- queryClient,
9866
- (integrationId) => INTEGRATION_QUERY_KEY(integrationId),
9867
- locale
9868
- );
9869
- }
9870
8991
  return data;
9871
8992
  };
9872
8993
  var useGetIntegrations = (params = {}, options = {}) => {
@@ -13852,347 +12973,251 @@ var useUploadImage = (options = {}) => {
13852
12973
  return useConnectedMutation_default(UploadImage, options);
13853
12974
  };
13854
12975
 
13855
- // src/mutations/threads/useCreateThread.ts
13856
- var CreateThread = async ({
13857
- thread,
13858
- accountIds,
13859
- firstMessage,
13860
- clientApiParams,
13861
- queryClient
13862
- }) => {
13863
- const clientApi = await GetClientAPI(clientApiParams);
13864
- const { data } = await clientApi.post(
13865
- `/threads`,
13866
- {
13867
- thread,
13868
- accountIds,
13869
- firstMessage
13870
- }
13871
- );
13872
- if (queryClient && data.status === "ok") {
13873
- SET_THREAD_QUERY_DATA(queryClient, [data.data.id], data);
13874
- queryClient.invalidateQueries({
13875
- queryKey: THREADS_QUERY_KEY()
13876
- });
13877
- }
13878
- return data;
13879
- };
13880
- var useCreateThread = (options = {}) => {
13881
- return useConnectedMutation_default(CreateThread, options);
13882
- };
13883
-
13884
- // src/mutations/threads/useAddThreadMember.ts
13885
- var AddThreadMember = async ({
12976
+ // src/mutations/threads/useUpdateThread.ts
12977
+ var UpdateThread = async ({
13886
12978
  threadId,
13887
- accountId,
13888
- role,
12979
+ subject,
12980
+ imageId,
13889
12981
  clientApiParams,
13890
12982
  queryClient
13891
12983
  }) => {
13892
12984
  const clientApi = await GetClientAPI(clientApiParams);
13893
- const { data } = await clientApi.post(
13894
- `/threads/${threadId}/members/${accountId}`,
13895
- {
13896
- role
13897
- }
13898
- );
12985
+ const { data } = await clientApi.put(`/threads/${threadId}`, {
12986
+ subject,
12987
+ imageId
12988
+ });
13899
12989
  if (queryClient && data.status === "ok") {
13900
- queryClient.invalidateQueries({
13901
- queryKey: THREAD_MEMBERS_QUERY_KEY(threadId)
13902
- });
13903
- queryClient.invalidateQueries({
13904
- queryKey: THREAD_QUERY_KEY(threadId)
13905
- });
12990
+ SET_THREAD_QUERY_DATA(queryClient, [threadId], data, [
12991
+ clientApiParams.locale
12992
+ ]);
13906
12993
  }
13907
12994
  return data;
13908
12995
  };
13909
- var useAddThreadMember = (options = {}) => {
13910
- return useConnectedMutation_default(AddThreadMember, options);
12996
+ var useUpdateThread = (options = {}) => {
12997
+ return useConnectedMutation(UpdateThread, options);
13911
12998
  };
13912
12999
 
13913
- // src/mutations/threads/useUpdateThread.ts
13914
- var UpdateThread = async ({
13000
+ // src/mutations/threads/useCreateThreadMessage.ts
13001
+ var CreateThreadMessage = async ({
13915
13002
  threadId,
13916
- thread,
13917
- imageDataUri,
13003
+ body,
13004
+ entities,
13918
13005
  clientApiParams,
13919
13006
  queryClient
13920
13007
  }) => {
13921
13008
  const clientApi = await GetClientAPI(clientApiParams);
13922
- const { data } = await clientApi.patch(
13923
- `/threads/${threadId}`,
13924
- {
13925
- thread,
13926
- imageDataUri
13927
- }
13928
- );
13009
+ const { data } = await clientApi.post(`/threads/${threadId}/messages`, {
13010
+ body,
13011
+ entities
13012
+ });
13929
13013
  if (queryClient && data.status === "ok") {
13930
- SET_THREAD_QUERY_DATA(queryClient, [data.data.id], data);
13931
- queryClient.invalidateQueries({
13932
- queryKey: THREADS_QUERY_KEY()
13933
- });
13014
+ AppendInfiniteQuery(
13015
+ queryClient,
13016
+ THREAD_MESSAGES_QUERY_KEY(threadId),
13017
+ data.data
13018
+ );
13934
13019
  }
13935
13020
  return data;
13936
13021
  };
13937
- var useUpdateThread = (options = {}) => {
13938
- return useConnectedMutation_default(UpdateThread, options);
13022
+ var useCreateThreadMessage = (options = {}) => {
13023
+ return useConnectedMutation(CreateThreadMessage, options);
13939
13024
  };
13940
13025
 
13941
- // src/mutations/threads/useUpdateThreadMember.ts
13942
- var UpdateThreadMember = async ({
13026
+ // src/mutations/threads/useUpdateThreadMessage.ts
13027
+ var UpdateThreadMessage = async ({
13943
13028
  threadId,
13944
- accountId,
13945
- role,
13029
+ messageId,
13030
+ body,
13946
13031
  clientApiParams,
13947
13032
  queryClient
13948
13033
  }) => {
13949
13034
  const clientApi = await GetClientAPI(clientApiParams);
13950
- const { data } = await clientApi.patch(
13951
- `/threads/${threadId}/members/${accountId}`,
13035
+ const { data } = await clientApi.put(
13036
+ `/threads/${threadId}/messages/${messageId}`,
13952
13037
  {
13953
- role
13038
+ body
13954
13039
  }
13955
13040
  );
13956
13041
  if (queryClient && data.status === "ok") {
13957
- queryClient.invalidateQueries({
13958
- queryKey: THREAD_MEMBERS_QUERY_KEY(threadId)
13959
- });
13960
- queryClient.invalidateQueries({
13961
- queryKey: THREAD_QUERY_KEY(threadId)
13962
- });
13042
+ SET_THREAD_MESSAGE_QUERY_DATA(queryClient, [threadId, messageId], data, [
13043
+ clientApiParams.locale
13044
+ ]);
13963
13045
  }
13964
13046
  return data;
13965
13047
  };
13966
- var useUpdateThreadMember = (options = {}) => {
13967
- return useConnectedMutation_default(UpdateThreadMember, options);
13048
+ var useUpdateThreadMessage = (options = {}) => {
13049
+ return useConnectedMutation(UpdateThreadMessage, options);
13968
13050
  };
13969
13051
 
13970
- // src/mutations/threads/useDeleteThreadMember.ts
13971
- var DeleteThreadMember = async ({
13052
+ // src/mutations/threads/useDeleteThreadMessage.ts
13053
+ var DeleteThreadMessage = async ({
13972
13054
  threadId,
13973
- accountId,
13055
+ messageId,
13974
13056
  clientApiParams,
13975
13057
  queryClient
13976
13058
  }) => {
13977
13059
  const clientApi = await GetClientAPI(clientApiParams);
13978
13060
  const { data } = await clientApi.delete(
13979
- `/threads/${threadId}/members/${accountId}`
13061
+ `/threads/${threadId}/messages/${messageId}`
13980
13062
  );
13981
13063
  if (queryClient && data.status === "ok") {
13982
13064
  queryClient.invalidateQueries({
13983
- queryKey: THREAD_MEMBERS_QUERY_KEY(threadId)
13984
- });
13985
- queryClient.invalidateQueries({
13986
- queryKey: THREADS_QUERY_KEY()
13987
- });
13988
- queryClient.invalidateQueries({
13989
- queryKey: THREAD_QUERY_KEY(threadId)
13065
+ queryKey: THREAD_MESSAGES_QUERY_KEY(threadId)
13990
13066
  });
13991
13067
  }
13992
13068
  return data;
13993
13069
  };
13994
- var useDeleteThreadMember = (options = {}) => {
13995
- return useConnectedMutation_default(DeleteThreadMember, options);
13070
+ var useDeleteThreadMessage = (options = {}) => {
13071
+ return useConnectedMutation(DeleteThreadMessage, options);
13996
13072
  };
13997
13073
 
13998
- // src/mutations/threads/useMarkUnread.ts
13999
- var MarkUnread = async ({
13074
+ // src/mutations/threads/useAddThreadMessageReaction.ts
13075
+ var AddThreadMessageReaction = async ({
14000
13076
  threadId,
13077
+ messageId,
13078
+ emojiName,
14001
13079
  clientApiParams,
14002
13080
  queryClient
14003
13081
  }) => {
14004
13082
  const clientApi = await GetClientAPI(clientApiParams);
14005
13083
  const { data } = await clientApi.post(
14006
- `/threads/${threadId}/unread`
13084
+ `/threads/${threadId}/messages/${messageId}/reactions`,
13085
+ {
13086
+ emojiName
13087
+ }
14007
13088
  );
14008
13089
  if (queryClient && data.status === "ok") {
14009
- queryClient.setQueryData(
14010
- [...THREAD_QUERY_KEY(threadId), clientApiParams.locale],
14011
- (oldData) => {
14012
- if (!oldData) {
14013
- return oldData;
14014
- }
14015
- return {
14016
- ...oldData,
14017
- read: false
14018
- };
14019
- }
14020
- );
13090
+ queryClient.invalidateQueries({
13091
+ queryKey: THREAD_MESSAGES_QUERY_KEY(threadId)
13092
+ });
14021
13093
  }
14022
13094
  return data;
14023
13095
  };
14024
- var useMarkUnread = (options = {}) => {
14025
- return useConnectedMutation_default(MarkUnread, options);
13096
+ var useAddThreadMessageReaction = (options = {}) => {
13097
+ return useConnectedMutation(AddThreadMessageReaction, options);
14026
13098
  };
14027
13099
 
14028
- // src/mutations/threads/useCreateThreadMessage.ts
14029
- var CreateThreadMessage = async ({
13100
+ // src/mutations/threads/useRemoveThreadMessageReaction.ts
13101
+ var RemoveThreadMessageReaction = async ({
14030
13102
  threadId,
14031
- body,
13103
+ messageId,
13104
+ reactionId,
14032
13105
  clientApiParams,
14033
13106
  queryClient
14034
13107
  }) => {
14035
13108
  const clientApi = await GetClientAPI(clientApiParams);
14036
- const { data } = await clientApi.post(
14037
- `/threads/${threadId}/messages`,
14038
- { body }
13109
+ const { data } = await clientApi.delete(
13110
+ `/threads/${threadId}/messages/${messageId}/reactions/${reactionId}`
14039
13111
  );
14040
13112
  if (queryClient && data.status === "ok") {
14041
- AppendInfiniteQuery(
14042
- queryClient,
14043
- [
14044
- ...THREAD_MESSAGES_QUERY_KEY(threadId),
14045
- ...GetBaseInfiniteQueryKeys(clientApiParams.locale)
14046
- ],
14047
- data.data
14048
- );
13113
+ queryClient.invalidateQueries({
13114
+ queryKey: THREAD_MESSAGES_QUERY_KEY(threadId)
13115
+ });
14049
13116
  }
14050
13117
  return data;
14051
13118
  };
14052
- var useCreateThreadMessage = (options = {}) => {
14053
- return useConnectedMutation_default(CreateThreadMessage, options);
13119
+ var useRemoveThreadMessageReaction = (options = {}) => {
13120
+ return useConnectedMutation(RemoveThreadMessageReaction, options);
14054
13121
  };
14055
13122
 
14056
- // src/mutations/threads/useUpdateThreadMessage.ts
14057
- var UpdateThreadMessage = async ({
14058
- threadId,
14059
- messageId,
14060
- body,
13123
+ // src/mutations/threads/useUpdateThreadCircle.ts
13124
+ var UpdateThreadCircle = async ({
13125
+ circleId,
13126
+ name,
14061
13127
  clientApiParams,
14062
13128
  queryClient
14063
13129
  }) => {
14064
13130
  const clientApi = await GetClientAPI(clientApiParams);
14065
- const { data } = await clientApi.put(
14066
- `/threads/${threadId}/messages/${messageId}`,
14067
- { body }
14068
- );
13131
+ const { data } = await clientApi.put(`/threads/circles/${circleId}`, {
13132
+ name
13133
+ });
14069
13134
  if (queryClient && data.status === "ok") {
14070
- SET_THREAD_MESSAGE_QUERY_DATA(queryClient, [threadId, messageId], data, [
13135
+ SET_THREAD_CIRCLE_QUERY_DATA(queryClient, [circleId], data, [
14071
13136
  clientApiParams.locale
14072
13137
  ]);
14073
13138
  }
14074
13139
  return data;
14075
13140
  };
14076
- var useUpdateThreadMessage = (options = {}) => {
14077
- return useConnectedMutation_default(UpdateThreadMessage, options);
13141
+ var useUpdateThreadCircle = (options = {}) => {
13142
+ return useConnectedMutation(UpdateThreadCircle, options);
14078
13143
  };
14079
13144
 
14080
- // src/mutations/threads/useDeleteThreadMessage.ts
14081
- var import_immer6 = require("immer");
14082
- var DeleteThreadMessage = async ({
14083
- threadId,
14084
- messageId,
14085
- body,
14086
- moderator,
13145
+ // src/mutations/threads/useAddThreadCircleAccount.ts
13146
+ var AddThreadCircleAccount = async ({
13147
+ circleId,
13148
+ accountId,
13149
+ role,
14087
13150
  clientApiParams,
14088
13151
  queryClient
14089
13152
  }) => {
14090
13153
  const clientApi = await GetClientAPI(clientApiParams);
14091
- const { data } = await clientApi.delete(
14092
- `/threads/${threadId}/messages/${messageId}`,
13154
+ const { data } = await clientApi.post(
13155
+ `/threads/circles/${circleId}/accounts`,
14093
13156
  {
14094
- data: { body, moderator }
13157
+ accountId,
13158
+ role
14095
13159
  }
14096
13160
  );
14097
- if (queryClient && data.status === "ok") {
14098
- queryClient.setQueryData(
14099
- [
14100
- ...THREAD_MESSAGES_QUERY_KEY(threadId),
14101
- ...GetBaseInfiniteQueryKeys(clientApiParams.locale)
14102
- ],
14103
- (oldData) => {
14104
- if (!oldData) return oldData;
14105
- return (0, import_immer6.produce)(oldData, (draft) => {
14106
- draft.pages.forEach((page) => {
14107
- const index = page.data.findIndex((m) => m.id === messageId);
14108
- if (index !== -1) {
14109
- page.data.splice(index, 1);
14110
- }
14111
- });
14112
- });
14113
- }
14114
- );
14115
- }
14116
- return data;
14117
- };
14118
- var useDeleteThreadMessage = (options = {}) => {
14119
- return useConnectedMutation_default(DeleteThreadMessage, options);
14120
- };
14121
-
14122
- // src/mutations/threads/useAddThreadMessageReaction.ts
14123
- var AddThreadMessageReaction = async ({
14124
- threadId,
14125
- messageId,
14126
- emojiName,
14127
- clientApiParams,
14128
- queryClient
14129
- }) => {
14130
- const clientApi = await GetClientAPI(clientApiParams);
14131
- const { data } = await clientApi.post(`/threads/${threadId}/messages/${messageId}/reactions`, { emojiName });
14132
13161
  if (queryClient && data.status === "ok") {
14133
13162
  queryClient.invalidateQueries({
14134
- queryKey: THREAD_MESSAGES_QUERY_KEY(threadId)
13163
+ queryKey: THREAD_CIRCLE_ACCOUNTS_QUERY_KEY(circleId)
14135
13164
  });
14136
13165
  }
14137
13166
  return data;
14138
13167
  };
14139
- var useAddThreadMessageReaction = (options = {}) => {
14140
- return useConnectedMutation_default(AddThreadMessageReaction, options);
13168
+ var useAddThreadCircleAccount = (options = {}) => {
13169
+ return useConnectedMutation(AddThreadCircleAccount, options);
14141
13170
  };
14142
13171
 
14143
- // src/mutations/threads/useRemoveThreadMessageReaction.ts
14144
- var RemoveThreadMessageReaction = async ({
14145
- threadId,
14146
- messageId,
14147
- emojiName,
13172
+ // src/mutations/threads/useUpdateThreadCircleAccount.ts
13173
+ var UpdateThreadCircleAccount = async ({
13174
+ circleId,
13175
+ accountId,
13176
+ role,
14148
13177
  clientApiParams,
14149
13178
  queryClient
14150
13179
  }) => {
14151
13180
  const clientApi = await GetClientAPI(clientApiParams);
14152
- const { data } = await clientApi.delete(
14153
- `/threads/${threadId}/messages/${messageId}/reactions`,
13181
+ const { data } = await clientApi.put(
13182
+ `/threads/circles/${circleId}/accounts/${accountId}`,
14154
13183
  {
14155
- data: { emojiName }
13184
+ role
14156
13185
  }
14157
13186
  );
14158
13187
  if (queryClient && data.status === "ok") {
14159
- queryClient.invalidateQueries({
14160
- queryKey: THREAD_MESSAGE_QUERY_KEY(threadId, messageId)
14161
- });
13188
+ SET_THREAD_CIRCLE_ACCOUNT_QUERY_DATA(
13189
+ queryClient,
13190
+ [circleId, accountId],
13191
+ data,
13192
+ [clientApiParams.locale]
13193
+ );
14162
13194
  }
14163
13195
  return data;
14164
13196
  };
14165
- var useRemoveThreadMessageReaction = (options = {}) => {
14166
- return useConnectedMutation_default(RemoveThreadMessageReaction, options);
13197
+ var useUpdateThreadCircleAccount = (options = {}) => {
13198
+ return useConnectedMutation(UpdateThreadCircleAccount, options);
14167
13199
  };
14168
13200
 
14169
- // src/mutations/threads/useAddThreadMessageReply.ts
14170
- var AddThreadMessageReply = async ({
14171
- threadId,
14172
- messageId,
14173
- body,
13201
+ // src/mutations/threads/useDeleteThreadCircleAccount.ts
13202
+ var DeleteThreadCircleAccount = async ({
13203
+ circleId,
13204
+ accountId,
14174
13205
  clientApiParams,
14175
13206
  queryClient
14176
13207
  }) => {
14177
13208
  const clientApi = await GetClientAPI(clientApiParams);
14178
- const { data } = await clientApi.post(
14179
- `/threads/${threadId}/messages/${messageId}/replies`,
14180
- { body }
13209
+ const { data } = await clientApi.delete(
13210
+ `/threads/circles/${circleId}/accounts/${accountId}`
14181
13211
  );
14182
13212
  if (queryClient && data.status === "ok") {
14183
- AppendInfiniteQuery(
14184
- queryClient,
14185
- [
14186
- ...THREAD_MESSAGE_REPLIES_QUERY_KEY(threadId, messageId),
14187
- ...GetBaseInfiniteQueryKeys(clientApiParams.locale)
14188
- ],
14189
- data.data
14190
- );
13213
+ queryClient.invalidateQueries({
13214
+ queryKey: THREAD_CIRCLE_ACCOUNTS_QUERY_KEY(circleId)
13215
+ });
14191
13216
  }
14192
13217
  return data;
14193
13218
  };
14194
- var useAddThreadMessageReply = (options = {}) => {
14195
- return useConnectedMutation_default(AddThreadMessageReply, options);
13219
+ var useDeleteThreadCircleAccount = (options = {}) => {
13220
+ return useConnectedMutation(DeleteThreadCircleAccount, options);
14196
13221
  };
14197
13222
 
14198
13223
  // src/mutations/integrations/useBlockIntegration.ts
@@ -14372,9 +13397,8 @@ var useCreateInterest = (options = {}) => {
14372
13397
  AddSelfDelegate,
14373
13398
  AddSelfEventSession,
14374
13399
  AddSelfInterests,
14375
- AddThreadMember,
13400
+ AddThreadCircleAccount,
14376
13401
  AddThreadMessageReaction,
14377
- AddThreadMessageReply,
14378
13402
  AdvertisementType,
14379
13403
  AppendInfiniteQuery,
14380
13404
  BENEFITS_QUERY_KEY,
@@ -14402,7 +13426,6 @@ var useCreateInterest = (options = {}) => {
14402
13426
  CONTENT_INTERESTS_QUERY_KEY,
14403
13427
  CONTENT_QUERY_KEY,
14404
13428
  CUSTOM_ERROR_CODES,
14405
- CacheIndividualQueries,
14406
13429
  CancelBooking,
14407
13430
  CancelGroupInvitation,
14408
13431
  CancelGroupRequest,
@@ -14438,7 +13461,6 @@ var useCreateInterest = (options = {}) => {
14438
13461
  CreateSubscription,
14439
13462
  CreateSupportTicket,
14440
13463
  CreateTeamAccount,
14441
- CreateThread,
14442
13464
  CreateThreadMessage,
14443
13465
  Currency,
14444
13466
  DayOfWeek,
@@ -14462,7 +13484,7 @@ var useCreateInterest = (options = {}) => {
14462
13484
  DeleteSelfChatChannelMessage,
14463
13485
  DeleteSelfLead,
14464
13486
  DeleteSelfPushDevice,
14465
- DeleteThreadMember,
13487
+ DeleteThreadCircleAccount,
14466
13488
  DeleteThreadMessage,
14467
13489
  DemoteGroupModerator,
14468
13490
  DisableIntegration,
@@ -14716,16 +13738,12 @@ var useCreateInterest = (options = {}) => {
14716
13738
  GetSurveySubmissionSections,
14717
13739
  GetSurveySubmissions,
14718
13740
  GetThread,
14719
- GetThreadEvent,
14720
- GetThreadEvents,
14721
- GetThreadGroup,
14722
- GetThreadGroups,
14723
- GetThreadMember,
14724
- GetThreadMembers,
13741
+ GetThreadCircle,
13742
+ GetThreadCircleAccount,
13743
+ GetThreadCircleAccounts,
13744
+ GetThreadCircles,
14725
13745
  GetThreadMessage,
14726
- GetThreadMessageReplies,
14727
13746
  GetThreadMessages,
14728
- GetThreads,
14729
13747
  GetVideo,
14730
13748
  GroupAccess,
14731
13749
  GroupInvitationStatus,
@@ -14777,7 +13795,6 @@ var useCreateInterest = (options = {}) => {
14777
13795
  MANAGED_CHANNEL_INTERESTS_QUERY_KEY,
14778
13796
  MANAGED_CHANNEL_QUERY_KEY,
14779
13797
  MANAGED_CHANNEL_SUBSCRIBERS_QUERY_KEY,
14780
- MarkUnread,
14781
13798
  MergeInfinitePages,
14782
13799
  NotificationType,
14783
13800
  ORGANIZATION_CONFIG_QUERY_KEY,
@@ -14989,16 +14006,12 @@ var useCreateInterest = (options = {}) => {
14989
14006
  SET_SERIES_QUERY_DATA,
14990
14007
  SET_SURVEY_QUERY_DATA,
14991
14008
  SET_SURVEY_SUBMISSION_SECTIONS_QUERY_DATA,
14992
- SET_THREADS_QUERY_DATA,
14993
- SET_THREAD_EVENTS_QUERY_DATA,
14994
- SET_THREAD_EVENT_QUERY_DATA,
14995
- SET_THREAD_GROUPS_QUERY_DATA,
14996
- SET_THREAD_GROUP_QUERY_DATA,
14997
- SET_THREAD_MEMBERS_QUERY_DATA,
14998
- SET_THREAD_MEMBER_QUERY_DATA,
14009
+ SET_THREAD_CIRCLES_QUERY_DATA,
14010
+ SET_THREAD_CIRCLE_ACCOUNTS_QUERY_DATA,
14011
+ SET_THREAD_CIRCLE_ACCOUNT_QUERY_DATA,
14012
+ SET_THREAD_CIRCLE_QUERY_DATA,
14999
14013
  SET_THREAD_MESSAGES_QUERY_DATA,
15000
14014
  SET_THREAD_MESSAGE_QUERY_DATA,
15001
- SET_THREAD_MESSAGE_REPLIES_QUERY_DATA,
15002
14015
  SET_THREAD_QUERY_DATA,
15003
14016
  SET_TRANSFER_ACCOUNTS_QUERY_DATA,
15004
14017
  SET_VIDEO_QUERY_DATA,
@@ -15020,19 +14033,14 @@ var useCreateInterest = (options = {}) => {
15020
14033
  SupportTicketType,
15021
14034
  SurveyQuestionType,
15022
14035
  THREADS_QUERY_KEY,
15023
- THREAD_EVENTS_QUERY_KEY,
15024
- THREAD_EVENT_QUERY_KEY,
15025
- THREAD_GROUPS_QUERY_KEY,
15026
- THREAD_GROUP_QUERY_KEY,
15027
- THREAD_MEMBERS_QUERY_KEY,
15028
- THREAD_MEMBER_QUERY_KEY,
14036
+ THREAD_CIRCLES_QUERY_KEY,
14037
+ THREAD_CIRCLE_ACCOUNTS_QUERY_KEY,
14038
+ THREAD_CIRCLE_ACCOUNT_QUERY_KEY,
14039
+ THREAD_CIRCLE_QUERY_KEY,
15029
14040
  THREAD_MESSAGES_QUERY_KEY,
15030
14041
  THREAD_MESSAGE_QUERY_KEY,
15031
- THREAD_MESSAGE_REPLIES_QUERY_KEY,
15032
14042
  THREAD_QUERY_KEY,
15033
- ThreadAccessLevel,
15034
- ThreadInvitationStatus,
15035
- ThreadMemberRole,
14043
+ ThreadCircleAccountRole,
15036
14044
  ThreadMessageType,
15037
14045
  TicketEventAccessLevel,
15038
14046
  TicketVisibility,
@@ -15074,7 +14082,8 @@ var useCreateInterest = (options = {}) => {
15074
14082
  UpdateSubscriptionPaymentMethod,
15075
14083
  UpdateSurveyResponse,
15076
14084
  UpdateThread,
15077
- UpdateThreadMember,
14085
+ UpdateThreadCircle,
14086
+ UpdateThreadCircleAccount,
15078
14087
  UpdateThreadMessage,
15079
14088
  UploadChannelContentImage,
15080
14089
  UploadFile,
@@ -15132,9 +14141,8 @@ var useCreateInterest = (options = {}) => {
15132
14141
  useAddSelfDelegate,
15133
14142
  useAddSelfEventSession,
15134
14143
  useAddSelfInterests,
15135
- useAddThreadMember,
14144
+ useAddThreadCircleAccount,
15136
14145
  useAddThreadMessageReaction,
15137
- useAddThreadMessageReply,
15138
14146
  useBlockAccount,
15139
14147
  useBlockIntegration,
15140
14148
  useCancelBooking,
@@ -15173,7 +14181,6 @@ var useCreateInterest = (options = {}) => {
15173
14181
  useCreateSubscription,
15174
14182
  useCreateSupportTicket,
15175
14183
  useCreateTeamAccount,
15176
- useCreateThread,
15177
14184
  useCreateThreadMessage,
15178
14185
  useDeactivateGroup,
15179
14186
  useDeleteActivity,
@@ -15194,7 +14201,7 @@ var useCreateInterest = (options = {}) => {
15194
14201
  useDeleteSelfChatChannelMessage,
15195
14202
  useDeleteSelfLead,
15196
14203
  useDeleteSelfPushDevice,
15197
- useDeleteThreadMember,
14204
+ useDeleteThreadCircleAccount,
15198
14205
  useDeleteThreadMessage,
15199
14206
  useDemoteGroupModerator,
15200
14207
  useDisableIntegration,
@@ -15390,16 +14397,12 @@ var useCreateInterest = (options = {}) => {
15390
14397
  useGetSurveySubmissionSections,
15391
14398
  useGetSurveySubmissions,
15392
14399
  useGetThread,
15393
- useGetThreadEvent,
15394
- useGetThreadEvents,
15395
- useGetThreadGroup,
15396
- useGetThreadGroups,
15397
- useGetThreadMember,
15398
- useGetThreadMembers,
14400
+ useGetThreadCircle,
14401
+ useGetThreadCircleAccount,
14402
+ useGetThreadCircleAccounts,
14403
+ useGetThreadCircles,
15399
14404
  useGetThreadMessage,
15400
- useGetThreadMessageReplies,
15401
14405
  useGetThreadMessages,
15402
- useGetThreads,
15403
14406
  useGetVideo,
15404
14407
  useGroupStatus,
15405
14408
  useIsAccountFollowing,
@@ -15410,7 +14413,6 @@ var useCreateInterest = (options = {}) => {
15410
14413
  useLeaveSelfChatChannel,
15411
14414
  useLikeActivity,
15412
14415
  useLikeContent,
15413
- useMarkUnread,
15414
14416
  usePromoteGroupMember,
15415
14417
  useReinviteGroupInvitation,
15416
14418
  useRejectGroupInvitation,
@@ -15472,7 +14474,8 @@ var useCreateInterest = (options = {}) => {
15472
14474
  useUpdateSubscriptionPaymentMethod,
15473
14475
  useUpdateSurveyResponse,
15474
14476
  useUpdateThread,
15475
- useUpdateThreadMember,
14477
+ useUpdateThreadCircle,
14478
+ useUpdateThreadCircleAccount,
15476
14479
  useUpdateThreadMessage,
15477
14480
  useUploadChannelContentImage,
15478
14481
  useUploadFile,