@connectedxm/client 2.4.1 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -545,6 +545,12 @@ function MergeInfinitePages(data) {
545
545
  );
546
546
  }
547
547
 
548
+ // src/utilities/IsUUID.ts
549
+ var isUUID = (id) => {
550
+ 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}$/;
551
+ return uuidRegex.test(id);
552
+ };
553
+
548
554
  // src/queries/useConnectedSingleQuery.ts
549
555
  import { useQuery } from "@tanstack/react-query";
550
556
  var GetBaseSingleQueryKeys = (locale) => {
@@ -595,81 +601,6 @@ var useConnectedSingleQuery = (queryKeys, queryFn, options = {}) => {
595
601
  };
596
602
  var useConnectedSingleQuery_default = useConnectedSingleQuery;
597
603
 
598
- // src/utilities/CacheIndividualQueries.ts
599
- var CacheIndividualQueries = (page, queryClient, queryKeyFn, locale = "en", itemMap) => {
600
- page.data.forEach((item) => {
601
- item = itemMap ? itemMap(item) : item;
602
- if (item.id) {
603
- const SudoResponse = {
604
- status: page.status,
605
- message: `Cached From: ${page.message}`,
606
- data: item
607
- };
608
- queryClient.setQueryData(
609
- [...queryKeyFn(item.id), ...GetBaseSingleQueryKeys(locale)],
610
- SudoResponse,
611
- {
612
- updatedAt: Date.now() - 1e3 * 60
613
- }
614
- );
615
- if (item.slug) {
616
- queryClient.setQueryData(
617
- [...queryKeyFn(item.slug), ...GetBaseSingleQueryKeys(locale)],
618
- SudoResponse,
619
- {
620
- updatedAt: Date.now() - 1e3 * 60
621
- }
622
- );
623
- }
624
- if (item.username) {
625
- queryClient.setQueryData(
626
- [...queryKeyFn(item.username), ...GetBaseSingleQueryKeys(locale)],
627
- SudoResponse,
628
- {
629
- updatedAt: Date.now() - 1e3 * 60
630
- }
631
- );
632
- }
633
- if (item.code) {
634
- queryClient.setQueryData(
635
- [...queryKeyFn(item.code), ...GetBaseSingleQueryKeys(locale)],
636
- SudoResponse,
637
- {
638
- updatedAt: Date.now() - 1e3 * 60
639
- }
640
- );
641
- }
642
- if (item.name) {
643
- queryClient.setQueryData(
644
- [...queryKeyFn(item.name), ...GetBaseSingleQueryKeys(locale)],
645
- SudoResponse,
646
- {
647
- updatedAt: Date.now() - 1e3 * 60
648
- }
649
- );
650
- }
651
- if (item.alternateId) {
652
- queryClient.setQueryData(
653
- [
654
- ...queryKeyFn(item.alternateId.toString()),
655
- ...GetBaseSingleQueryKeys(locale)
656
- ],
657
- SudoResponse,
658
- {
659
- updatedAt: Date.now() - 1e3 * 60
660
- }
661
- );
662
- }
663
- }
664
- });
665
- };
666
-
667
- // src/utilities/IsUUID.ts
668
- var isUUID = (id) => {
669
- 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}$/;
670
- return uuidRegex.test(id);
671
- };
672
-
673
604
  // src/queries/useConnectedInfiniteQuery.ts
674
605
  import {
675
606
  useInfiniteQuery
@@ -779,9 +710,7 @@ var GetAccounts = async ({
779
710
  orderBy,
780
711
  search,
781
712
  accountType,
782
- queryClient,
783
- clientApiParams,
784
- locale
713
+ clientApiParams
785
714
  }) => {
786
715
  const clientApi = await GetClientAPI(clientApiParams);
787
716
  const { data } = await clientApi.get(`/accounts`, {
@@ -793,14 +722,6 @@ var GetAccounts = async ({
793
722
  search: search || void 0
794
723
  }
795
724
  });
796
- if (queryClient && data.status === "ok") {
797
- CacheIndividualQueries(
798
- data,
799
- queryClient,
800
- (accountId) => ACCOUNT_QUERY_KEY(accountId),
801
- locale
802
- );
803
- }
804
725
  return data;
805
726
  };
806
727
  var useGetAccounts = (accountType, params = {}, options = {}) => {
@@ -896,9 +817,7 @@ var GetActivities = async ({
896
817
  pageSize,
897
818
  orderBy,
898
819
  search,
899
- queryClient,
900
- clientApiParams,
901
- locale
820
+ clientApiParams
902
821
  }) => {
903
822
  const clientApi = await GetClientAPI(clientApiParams);
904
823
  const { data } = await clientApi.get(`/activities`, {
@@ -909,14 +828,6 @@ var GetActivities = async ({
909
828
  search: search || void 0
910
829
  }
911
830
  });
912
- if (queryClient && data.status === "ok") {
913
- CacheIndividualQueries(
914
- data,
915
- queryClient,
916
- (activityId) => ACTIVITY_QUERY_KEY(activityId),
917
- locale
918
- );
919
- }
920
831
  return data;
921
832
  };
922
833
  var useGetActivities = (params = {}, options = {}) => {
@@ -983,9 +894,7 @@ var GetActivityComments = async ({
983
894
  pageSize,
984
895
  orderBy,
985
896
  search,
986
- queryClient,
987
- clientApiParams,
988
- locale
897
+ clientApiParams
989
898
  }) => {
990
899
  const clientApi = await GetClientAPI(clientApiParams);
991
900
  const { data } = await clientApi.get(`/activities/${activityId}/comments`, {
@@ -996,14 +905,6 @@ var GetActivityComments = async ({
996
905
  search: search || void 0
997
906
  }
998
907
  });
999
- if (queryClient && data.status === "ok") {
1000
- CacheIndividualQueries(
1001
- data,
1002
- queryClient,
1003
- (activityId2) => ACTIVITY_QUERY_KEY(activityId2),
1004
- locale
1005
- );
1006
- }
1007
908
  return data;
1008
909
  };
1009
910
  var useGetActivityComments = (activityId = "", params = {}, options = {}) => {
@@ -1037,9 +938,7 @@ var GetAccountActivities = async ({
1037
938
  orderBy,
1038
939
  search,
1039
940
  accountId,
1040
- queryClient,
1041
- clientApiParams,
1042
- locale
941
+ clientApiParams
1043
942
  }) => {
1044
943
  const clientApi = await GetClientAPI(clientApiParams);
1045
944
  const { data } = await clientApi.get(`/accounts/${accountId}/activities`, {
@@ -1050,14 +949,6 @@ var GetAccountActivities = async ({
1050
949
  search: search || void 0
1051
950
  }
1052
951
  });
1053
- if (queryClient && data.status === "ok") {
1054
- CacheIndividualQueries(
1055
- data,
1056
- queryClient,
1057
- (activityId) => ACTIVITY_QUERY_KEY(activityId),
1058
- locale
1059
- );
1060
- }
1061
952
  return data;
1062
953
  };
1063
954
  var useGetAccountActivities = (accountId = "", params = {}, options = {}) => {
@@ -1103,91 +994,6 @@ var useGetAccountByShareCode = (shareCode = "", options = {}) => {
1103
994
  );
1104
995
  };
1105
996
 
1106
- // src/queries/groups/useGetGroups.ts
1107
- var GROUPS_QUERY_KEY = (access) => {
1108
- const keys = ["GROUPS"];
1109
- if (access) keys.push(access);
1110
- return keys;
1111
- };
1112
- var SET_GROUPS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
1113
- client.setQueryData(
1114
- [
1115
- ...GROUPS_QUERY_KEY(...keyParams),
1116
- ...GetBaseInfiniteQueryKeys(...baseKeys)
1117
- ],
1118
- setFirstPageData(response)
1119
- );
1120
- };
1121
- var GetGroups = async ({
1122
- pageParam,
1123
- pageSize,
1124
- orderBy,
1125
- search,
1126
- access,
1127
- queryClient,
1128
- clientApiParams,
1129
- locale
1130
- }) => {
1131
- const clientApi = await GetClientAPI(clientApiParams);
1132
- const { data } = await clientApi.get(`/groups`, {
1133
- params: {
1134
- page: pageParam || void 0,
1135
- pageSize: pageSize || void 0,
1136
- orderBy: orderBy || void 0,
1137
- search: search || void 0,
1138
- access: access || void 0
1139
- }
1140
- });
1141
- if (queryClient && data.status === "ok") {
1142
- CacheIndividualQueries(
1143
- data,
1144
- queryClient,
1145
- (groupId) => GROUP_QUERY_KEY(groupId),
1146
- locale
1147
- );
1148
- }
1149
- return data;
1150
- };
1151
- var useGetGroups = (access, params = {}, options = {}) => {
1152
- return useConnectedInfiniteQuery(
1153
- GROUPS_QUERY_KEY(access),
1154
- (params2) => GetGroups({ access, ...params2 }),
1155
- params,
1156
- options
1157
- );
1158
- };
1159
-
1160
- // src/queries/groups/useGetGroup.ts
1161
- var GROUP_QUERY_KEY = (groupId) => [
1162
- ...GROUPS_QUERY_KEY(),
1163
- groupId
1164
- ];
1165
- var SET_GROUP_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"], options) => {
1166
- client.setQueryData(
1167
- [...GROUP_QUERY_KEY(...keyParams), ...GetBaseSingleQueryKeys(...baseKeys)],
1168
- response,
1169
- options
1170
- );
1171
- };
1172
- var GetGroup = async ({
1173
- groupId,
1174
- clientApiParams
1175
- }) => {
1176
- const clientApi = await GetClientAPI(clientApiParams);
1177
- const { data } = await clientApi.get(`/groups/${groupId}`);
1178
- return data;
1179
- };
1180
- var useGetGroup = (groupId = "", options = {}) => {
1181
- return useConnectedSingleQuery(
1182
- GROUP_QUERY_KEY(groupId),
1183
- (params) => GetGroup({ groupId, ...params }),
1184
- {
1185
- ...options,
1186
- enabled: !!groupId && (options?.enabled ?? true)
1187
- }
1188
- );
1189
- };
1190
-
1191
997
  // src/queries/accounts/useGetAccountGroups.ts
1192
998
  var ACCOUNT_GROUPS_QUERY_KEY = (accountId) => [
1193
999
  ...ACCOUNT_QUERY_KEY(accountId),
@@ -1208,9 +1014,7 @@ var GetAccountGroups = async ({
1208
1014
  orderBy,
1209
1015
  search,
1210
1016
  accountId,
1211
- queryClient,
1212
- clientApiParams,
1213
- locale
1017
+ clientApiParams
1214
1018
  }) => {
1215
1019
  const clientApi = await GetClientAPI(clientApiParams);
1216
1020
  const { data } = await clientApi.get(`/accounts/${accountId}/groups`, {
@@ -1221,14 +1025,6 @@ var GetAccountGroups = async ({
1221
1025
  search: search || void 0
1222
1026
  }
1223
1027
  });
1224
- if (queryClient && data.status === "ok") {
1225
- CacheIndividualQueries(
1226
- data,
1227
- queryClient,
1228
- (groupId) => GROUP_QUERY_KEY(groupId),
1229
- locale
1230
- );
1231
- }
1232
1028
  return data;
1233
1029
  };
1234
1030
  var useGetAccountGroups = (accountId = "", params = {}, options = {}) => {
@@ -1263,9 +1059,7 @@ var GetAccountFollowers = async ({
1263
1059
  orderBy,
1264
1060
  search,
1265
1061
  accountId,
1266
- queryClient,
1267
- clientApiParams,
1268
- locale
1062
+ clientApiParams
1269
1063
  }) => {
1270
1064
  const clientApi = await GetClientAPI(clientApiParams);
1271
1065
  const { data } = await clientApi.get(`/accounts/${accountId}/followers`, {
@@ -1276,14 +1070,6 @@ var GetAccountFollowers = async ({
1276
1070
  search: search || void 0
1277
1071
  }
1278
1072
  });
1279
- if (queryClient && data.status === "ok") {
1280
- CacheIndividualQueries(
1281
- data,
1282
- queryClient,
1283
- (accountId2) => ACCOUNT_QUERY_KEY(accountId2),
1284
- locale
1285
- );
1286
- }
1287
1073
  return data;
1288
1074
  };
1289
1075
  var useGetAccountFollowers = (accountId = "", params = {}, options = {}) => {
@@ -1318,9 +1104,7 @@ var GetAccountFollowings = async ({
1318
1104
  orderBy,
1319
1105
  search,
1320
1106
  accountId,
1321
- queryClient,
1322
- clientApiParams,
1323
- locale
1107
+ clientApiParams
1324
1108
  }) => {
1325
1109
  const clientApi = await GetClientAPI(clientApiParams);
1326
1110
  const { data } = await clientApi.get(`/accounts/${accountId}/following`, {
@@ -1331,14 +1115,6 @@ var GetAccountFollowings = async ({
1331
1115
  search: search || void 0
1332
1116
  }
1333
1117
  });
1334
- if (queryClient && data.status === "ok") {
1335
- CacheIndividualQueries(
1336
- data,
1337
- queryClient,
1338
- (accountId2) => ACCOUNT_QUERY_KEY(accountId2),
1339
- locale
1340
- );
1341
- }
1342
1118
  return data;
1343
1119
  };
1344
1120
  var useGetAccountFollowings = (accountId = "", params = {}, options = {}) => {
@@ -1373,9 +1149,7 @@ var GetAccountsPopular = async ({
1373
1149
  orderBy,
1374
1150
  search,
1375
1151
  accountType,
1376
- queryClient,
1377
- clientApiParams,
1378
- locale
1152
+ clientApiParams
1379
1153
  }) => {
1380
1154
  const clientApi = await GetClientAPI(clientApiParams);
1381
1155
  const { data } = await clientApi.get(`/accounts/popular`, {
@@ -1387,14 +1161,6 @@ var GetAccountsPopular = async ({
1387
1161
  search: search || void 0
1388
1162
  }
1389
1163
  });
1390
- if (queryClient && data.status === "ok") {
1391
- CacheIndividualQueries(
1392
- data,
1393
- queryClient,
1394
- (accountId) => ACCOUNT_QUERY_KEY(accountId),
1395
- locale
1396
- );
1397
- }
1398
1164
  return data;
1399
1165
  };
1400
1166
  var useGetAccountsPopular = (accountType, params = {}, options = {}) => {
@@ -1511,9 +1277,7 @@ var GetBookings = async ({
1511
1277
  search,
1512
1278
  past,
1513
1279
  placeId,
1514
- queryClient,
1515
- clientApiParams,
1516
- locale
1280
+ clientApiParams
1517
1281
  }) => {
1518
1282
  const clientApi = await GetClientAPI(clientApiParams);
1519
1283
  const { data } = await clientApi.get(`/bookings`, {
@@ -1526,14 +1290,6 @@ var GetBookings = async ({
1526
1290
  placeId: placeId || void 0
1527
1291
  }
1528
1292
  });
1529
- if (queryClient && data.status === "ok") {
1530
- CacheIndividualQueries(
1531
- data,
1532
- queryClient,
1533
- (bookingId) => BOOKING_QUERY_KEY(bookingId),
1534
- locale
1535
- );
1536
- }
1537
1293
  return data;
1538
1294
  };
1539
1295
  var useGetBookings = (past = false, placeId = "", params = {}, options = {}) => {
@@ -1624,9 +1380,7 @@ var GetBookingPlaces = async ({
1624
1380
  pageSize,
1625
1381
  orderBy,
1626
1382
  search,
1627
- queryClient,
1628
- clientApiParams,
1629
- locale
1383
+ clientApiParams
1630
1384
  }) => {
1631
1385
  const clientApi = await GetClientAPI(clientApiParams);
1632
1386
  const { data } = await clientApi.get(`/bookings/places`, {
@@ -1637,14 +1391,6 @@ var GetBookingPlaces = async ({
1637
1391
  search: search || void 0
1638
1392
  }
1639
1393
  });
1640
- if (queryClient && data.status === "ok") {
1641
- CacheIndividualQueries(
1642
- data,
1643
- queryClient,
1644
- (bookingPlaceId) => BOOKING_PLACE_QUERY_KEY(bookingPlaceId),
1645
- locale
1646
- );
1647
- }
1648
1394
  return data;
1649
1395
  };
1650
1396
  var useGetBookingPlaces = (params = {}, options = {}) => {
@@ -1742,9 +1488,7 @@ var GetBookingPlacesSpaces = async ({
1742
1488
  pageSize,
1743
1489
  orderBy,
1744
1490
  search,
1745
- queryClient,
1746
- clientApiParams,
1747
- locale
1491
+ clientApiParams
1748
1492
  }) => {
1749
1493
  const clientApi = await GetClientAPI(clientApiParams);
1750
1494
  const { data } = await clientApi.get(`/bookings/places/${bookingId}/spaces`, {
@@ -1755,14 +1499,6 @@ var GetBookingPlacesSpaces = async ({
1755
1499
  search: search || void 0
1756
1500
  }
1757
1501
  });
1758
- if (queryClient && data.status === "ok") {
1759
- CacheIndividualQueries(
1760
- data,
1761
- queryClient,
1762
- (spaceId) => BOOKING_PLACE_SPACE_QUERY_KEY(bookingId, spaceId),
1763
- locale
1764
- );
1765
- }
1766
1502
  return data;
1767
1503
  };
1768
1504
  var useGetBookingPlacesSpaces = (bookingId = "", params = {}, options = {}) => {
@@ -1857,85 +1593,105 @@ var useGetBenefits = (params = {}, options = {}) => {
1857
1593
  );
1858
1594
  };
1859
1595
 
1860
- // src/queries/groups/useGetGroupActivities.ts
1861
- var GROUP_ACTIVITIES_QUERY_KEY = (groupId) => [
1862
- ...ACTIVITIES_QUERY_KEY(),
1863
- ...GROUP_QUERY_KEY(groupId)
1864
- ];
1865
- var SET_GROUP_ACTIVITIES_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
1596
+ // src/queries/groups/useGetGroups.ts
1597
+ var GROUPS_QUERY_KEY = (access) => {
1598
+ const keys = ["GROUPS"];
1599
+ if (access) keys.push(access);
1600
+ return keys;
1601
+ };
1602
+ var SET_GROUPS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
1866
1603
  client.setQueryData(
1867
1604
  [
1868
- ...GROUP_ACTIVITIES_QUERY_KEY(...keyParams),
1605
+ ...GROUPS_QUERY_KEY(...keyParams),
1869
1606
  ...GetBaseInfiniteQueryKeys(...baseKeys)
1870
1607
  ],
1871
1608
  setFirstPageData(response)
1872
1609
  );
1873
1610
  };
1874
- var GetGroupActivities = async ({
1611
+ var GetGroups = async ({
1875
1612
  pageParam,
1876
1613
  pageSize,
1877
1614
  orderBy,
1878
1615
  search,
1879
- groupId,
1880
- queryClient,
1881
- clientApiParams,
1882
- locale
1616
+ access,
1617
+ clientApiParams
1883
1618
  }) => {
1884
1619
  const clientApi = await GetClientAPI(clientApiParams);
1885
- const { data } = await clientApi.get(`/groups/${groupId}/activities`, {
1620
+ const { data } = await clientApi.get(`/groups`, {
1886
1621
  params: {
1887
1622
  page: pageParam || void 0,
1888
1623
  pageSize: pageSize || void 0,
1889
1624
  orderBy: orderBy || void 0,
1890
- search: search || void 0
1625
+ search: search || void 0,
1626
+ access: access || void 0
1891
1627
  }
1892
1628
  });
1893
- if (queryClient && data.status === "ok") {
1894
- CacheIndividualQueries(
1895
- data,
1896
- queryClient,
1897
- (activityId) => ACTIVITY_QUERY_KEY(activityId),
1898
- locale
1899
- );
1900
- }
1901
1629
  return data;
1902
1630
  };
1903
- var useGetGroupActivities = (groupId = "", params = {}, options = {}) => {
1631
+ var useGetGroups = (access, params = {}, options = {}) => {
1904
1632
  return useConnectedInfiniteQuery(
1905
- GROUP_ACTIVITIES_QUERY_KEY(groupId),
1906
- (params2) => GetGroupActivities({ groupId, ...params2 }),
1633
+ GROUPS_QUERY_KEY(access),
1634
+ (params2) => GetGroups({ access, ...params2 }),
1907
1635
  params,
1908
- {
1909
- ...options,
1910
- enabled: !!groupId && (options?.enabled ?? true)
1911
- }
1636
+ options
1912
1637
  );
1913
1638
  };
1914
1639
 
1915
- // src/queries/groups/useGetGroupAnnouncements.ts
1916
- var GROUP_ANNOUNCEMENTS_QUERY_KEY = (groupId) => [
1917
- ...GROUP_QUERY_KEY(groupId),
1918
- "ANNOUNCEMENTS"
1640
+ // src/queries/groups/useGetGroup.ts
1641
+ var GROUP_QUERY_KEY = (groupId) => [
1642
+ ...GROUPS_QUERY_KEY(),
1643
+ groupId
1919
1644
  ];
1920
- var SET_GROUP_ANNOUNCEMENTS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
1645
+ var SET_GROUP_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"], options) => {
1646
+ client.setQueryData(
1647
+ [...GROUP_QUERY_KEY(...keyParams), ...GetBaseSingleQueryKeys(...baseKeys)],
1648
+ response,
1649
+ options
1650
+ );
1651
+ };
1652
+ var GetGroup = async ({
1653
+ groupId,
1654
+ clientApiParams
1655
+ }) => {
1656
+ const clientApi = await GetClientAPI(clientApiParams);
1657
+ const { data } = await clientApi.get(`/groups/${groupId}`);
1658
+ return data;
1659
+ };
1660
+ var useGetGroup = (groupId = "", options = {}) => {
1661
+ return useConnectedSingleQuery(
1662
+ GROUP_QUERY_KEY(groupId),
1663
+ (params) => GetGroup({ groupId, ...params }),
1664
+ {
1665
+ ...options,
1666
+ enabled: !!groupId && (options?.enabled ?? true)
1667
+ }
1668
+ );
1669
+ };
1670
+
1671
+ // src/queries/groups/useGetGroupActivities.ts
1672
+ var GROUP_ACTIVITIES_QUERY_KEY = (groupId) => [
1673
+ ...ACTIVITIES_QUERY_KEY(),
1674
+ ...GROUP_QUERY_KEY(groupId)
1675
+ ];
1676
+ var SET_GROUP_ACTIVITIES_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
1921
1677
  client.setQueryData(
1922
1678
  [
1923
- ...GROUP_ANNOUNCEMENTS_QUERY_KEY(...keyParams),
1679
+ ...GROUP_ACTIVITIES_QUERY_KEY(...keyParams),
1924
1680
  ...GetBaseInfiniteQueryKeys(...baseKeys)
1925
1681
  ],
1926
1682
  setFirstPageData(response)
1927
1683
  );
1928
1684
  };
1929
- var GetGroupAnnouncements = async ({
1930
- groupId,
1685
+ var GetGroupActivities = async ({
1931
1686
  pageParam,
1932
1687
  pageSize,
1933
1688
  orderBy,
1934
1689
  search,
1690
+ groupId,
1935
1691
  clientApiParams
1936
1692
  }) => {
1937
1693
  const clientApi = await GetClientAPI(clientApiParams);
1938
- const { data } = await clientApi.get(`/groups/${groupId}/announcements`, {
1694
+ const { data } = await clientApi.get(`/groups/${groupId}/activities`, {
1939
1695
  params: {
1940
1696
  page: pageParam || void 0,
1941
1697
  pageSize: pageSize || void 0,
@@ -1945,10 +1701,10 @@ var GetGroupAnnouncements = async ({
1945
1701
  });
1946
1702
  return data;
1947
1703
  };
1948
- var useGetGroupAnnouncements = (groupId = "", params = {}, options = {}) => {
1704
+ var useGetGroupActivities = (groupId = "", params = {}, options = {}) => {
1949
1705
  return useConnectedInfiniteQuery(
1950
- GROUP_ANNOUNCEMENTS_QUERY_KEY(groupId),
1951
- (params2) => GetGroupAnnouncements({ groupId, ...params2 }),
1706
+ GROUP_ACTIVITIES_QUERY_KEY(groupId),
1707
+ (params2) => GetGroupActivities({ groupId, ...params2 }),
1952
1708
  params,
1953
1709
  {
1954
1710
  ...options,
@@ -1957,20 +1713,22 @@ var useGetGroupAnnouncements = (groupId = "", params = {}, options = {}) => {
1957
1713
  );
1958
1714
  };
1959
1715
 
1960
- // src/queries/groups/useGetGroupMedia.ts
1961
- var GROUP_MEDIA_QUERY_KEY = (groupId, type) => [...GROUP_QUERY_KEY(groupId), "MEDIA", type || "all"];
1962
- var SET_GROUP_MEDIA_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
1716
+ // src/queries/groups/useGetGroupAnnouncements.ts
1717
+ var GROUP_ANNOUNCEMENTS_QUERY_KEY = (groupId) => [
1718
+ ...GROUP_QUERY_KEY(groupId),
1719
+ "ANNOUNCEMENTS"
1720
+ ];
1721
+ var SET_GROUP_ANNOUNCEMENTS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
1963
1722
  client.setQueryData(
1964
1723
  [
1965
- ...GROUP_MEDIA_QUERY_KEY(...keyParams),
1724
+ ...GROUP_ANNOUNCEMENTS_QUERY_KEY(...keyParams),
1966
1725
  ...GetBaseInfiniteQueryKeys(...baseKeys)
1967
1726
  ],
1968
1727
  setFirstPageData(response)
1969
1728
  );
1970
1729
  };
1971
- var GetGroupMedia = async ({
1730
+ var GetGroupAnnouncements = async ({
1972
1731
  groupId,
1973
- type,
1974
1732
  pageParam,
1975
1733
  pageSize,
1976
1734
  orderBy,
@@ -1978,9 +1736,8 @@ var GetGroupMedia = async ({
1978
1736
  clientApiParams
1979
1737
  }) => {
1980
1738
  const clientApi = await GetClientAPI(clientApiParams);
1981
- const { data } = await clientApi.get(`/groups/${groupId}/media`, {
1739
+ const { data } = await clientApi.get(`/groups/${groupId}/announcements`, {
1982
1740
  params: {
1983
- type: type || void 0,
1984
1741
  page: pageParam || void 0,
1985
1742
  pageSize: pageSize || void 0,
1986
1743
  orderBy: orderBy || void 0,
@@ -1989,10 +1746,10 @@ var GetGroupMedia = async ({
1989
1746
  });
1990
1747
  return data;
1991
1748
  };
1992
- var useGetGroupMedia = (groupId = "", type, params = {}, options = {}) => {
1749
+ var useGetGroupAnnouncements = (groupId = "", params = {}, options = {}) => {
1993
1750
  return useConnectedInfiniteQuery(
1994
- GROUP_MEDIA_QUERY_KEY(groupId, type),
1995
- (params2) => GetGroupMedia({ groupId, type, ...params2 }),
1751
+ GROUP_ANNOUNCEMENTS_QUERY_KEY(groupId),
1752
+ (params2) => GetGroupAnnouncements({ groupId, ...params2 }),
1996
1753
  params,
1997
1754
  {
1998
1755
  ...options,
@@ -2001,78 +1758,46 @@ var useGetGroupMedia = (groupId = "", type, params = {}, options = {}) => {
2001
1758
  );
2002
1759
  };
2003
1760
 
2004
- // src/queries/events/useGetEvents.ts
2005
- var EVENTS_QUERY_KEY = (past) => {
2006
- const keys = ["EVENTS"];
2007
- if (typeof past !== "undefined") {
2008
- keys.push(past ? "PAST" : "UPCOMING");
2009
- }
2010
- return keys;
2011
- };
2012
- var SET_EVENTS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
1761
+ // src/queries/groups/useGetGroupMedia.ts
1762
+ var GROUP_MEDIA_QUERY_KEY = (groupId, type) => [...GROUP_QUERY_KEY(groupId), "MEDIA", type || "all"];
1763
+ var SET_GROUP_MEDIA_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
2013
1764
  client.setQueryData(
2014
1765
  [
2015
- ...EVENTS_QUERY_KEY(...keyParams),
1766
+ ...GROUP_MEDIA_QUERY_KEY(...keyParams),
2016
1767
  ...GetBaseInfiniteQueryKeys(...baseKeys)
2017
1768
  ],
2018
1769
  setFirstPageData(response)
2019
1770
  );
2020
1771
  };
2021
- var GetEvents = async ({
1772
+ var GetGroupMedia = async ({
1773
+ groupId,
1774
+ type,
2022
1775
  pageParam,
2023
1776
  pageSize,
2024
1777
  orderBy,
2025
1778
  search,
2026
- past,
2027
1779
  clientApiParams
2028
1780
  }) => {
2029
1781
  const clientApi = await GetClientAPI(clientApiParams);
2030
- const { data } = await clientApi.get(`/events`, {
1782
+ const { data } = await clientApi.get(`/groups/${groupId}/media`, {
2031
1783
  params: {
1784
+ type: type || void 0,
2032
1785
  page: pageParam || void 0,
2033
1786
  pageSize: pageSize || void 0,
2034
1787
  orderBy: orderBy || void 0,
2035
- search: search || void 0,
2036
- past: past !== void 0 ? past : void 0
1788
+ search: search || void 0
2037
1789
  }
2038
1790
  });
2039
1791
  return data;
2040
1792
  };
2041
- var useGetEvents = (past = false, params = {}, options = {}) => {
1793
+ var useGetGroupMedia = (groupId = "", type, params = {}, options = {}) => {
2042
1794
  return useConnectedInfiniteQuery(
2043
- EVENTS_QUERY_KEY(past),
2044
- (params2) => GetEvents({ past, ...params2 }),
1795
+ GROUP_MEDIA_QUERY_KEY(groupId, type),
1796
+ (params2) => GetGroupMedia({ groupId, type, ...params2 }),
2045
1797
  params,
2046
- options
2047
- );
2048
- };
2049
-
2050
- // src/queries/events/useGetEvent.ts
2051
- var EVENT_QUERY_KEY = (eventId) => [
2052
- ...EVENTS_QUERY_KEY(),
2053
- eventId
2054
- ];
2055
- var SET_EVENT_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
2056
- client.setQueryData(
2057
- [...EVENT_QUERY_KEY(...keyParams), ...GetBaseSingleQueryKeys(...baseKeys)],
2058
- response
2059
- );
2060
- };
2061
- var GetEvent = async ({
2062
- eventId,
2063
- clientApiParams
2064
- }) => {
2065
- const clientApi = await GetClientAPI(clientApiParams);
2066
- const { data } = await clientApi.get(`/events/${eventId}`);
2067
- return data;
2068
- };
2069
- var useGetEvent = (eventId = "", options = {}) => {
2070
- return useConnectedSingleQuery(
2071
- EVENT_QUERY_KEY(eventId),
2072
- (params) => GetEvent({ eventId, ...params }),
2073
1798
  {
2074
1799
  ...options,
2075
- enabled: !!eventId && (options?.enabled ?? true)
1800
+ enabled: !!groupId && (options?.enabled ?? true)
2076
1801
  }
2077
1802
  );
2078
1803
  };
@@ -2099,9 +1824,7 @@ var GetGroupEvents = async ({
2099
1824
  search,
2100
1825
  groupId,
2101
1826
  past,
2102
- queryClient,
2103
- clientApiParams,
2104
- locale
1827
+ clientApiParams
2105
1828
  }) => {
2106
1829
  const clientApi = await GetClientAPI(clientApiParams);
2107
1830
  const { data } = await clientApi.get(`/groups/${groupId}/events`, {
@@ -2113,14 +1836,6 @@ var GetGroupEvents = async ({
2113
1836
  past: past || false
2114
1837
  }
2115
1838
  });
2116
- if (queryClient && data.status === "ok") {
2117
- CacheIndividualQueries(
2118
- data,
2119
- queryClient,
2120
- (eventId) => EVENT_QUERY_KEY(eventId),
2121
- locale
2122
- );
2123
- }
2124
1839
  return data;
2125
1840
  };
2126
1841
  var useGetGroupEvents = (groupId = "", past = false, params = {}, options = {}) => {
@@ -2205,9 +1920,7 @@ var GetGroupSponsors = async ({
2205
1920
  orderBy,
2206
1921
  search,
2207
1922
  groupId,
2208
- queryClient,
2209
- clientApiParams,
2210
- locale
1923
+ clientApiParams
2211
1924
  }) => {
2212
1925
  const clientApi = await GetClientAPI(clientApiParams);
2213
1926
  const { data } = await clientApi.get(`/groups/${groupId}/sponsors`, {
@@ -2218,14 +1931,6 @@ var GetGroupSponsors = async ({
2218
1931
  search: search || void 0
2219
1932
  }
2220
1933
  });
2221
- if (queryClient && data.status === "ok") {
2222
- CacheIndividualQueries(
2223
- data,
2224
- queryClient,
2225
- (accountId) => ACCOUNT_QUERY_KEY(accountId),
2226
- locale
2227
- );
2228
- }
2229
1934
  return data;
2230
1935
  };
2231
1936
  var useGetGroupSponsors = (groupId = "", params = {}, options = {}) => {
@@ -2264,9 +1969,7 @@ var GetGroupRequests = async ({
2264
1969
  search,
2265
1970
  status,
2266
1971
  groupId,
2267
- queryClient,
2268
- clientApiParams,
2269
- locale
1972
+ clientApiParams
2270
1973
  }) => {
2271
1974
  const clientApi = await GetClientAPI(clientApiParams);
2272
1975
  const { data } = await clientApi.get(`/groups/${groupId}/requests`, {
@@ -2278,14 +1981,6 @@ var GetGroupRequests = async ({
2278
1981
  status: status || void 0
2279
1982
  }
2280
1983
  });
2281
- if (queryClient && data.status === "ok") {
2282
- CacheIndividualQueries(
2283
- data,
2284
- queryClient,
2285
- (groupId2) => GROUP_REQUEST_QUERY_KEY(groupId2, data.data.id),
2286
- locale
2287
- );
2288
- }
2289
1984
  return data;
2290
1985
  };
2291
1986
  var useGetGroupRequests = (groupId = "", status, params = {}, options = {}) => {
@@ -2429,9 +2124,7 @@ var GetGroupsFeatured = async ({
2429
2124
  pageSize,
2430
2125
  orderBy,
2431
2126
  search,
2432
- queryClient,
2433
- clientApiParams,
2434
- locale
2127
+ clientApiParams
2435
2128
  }) => {
2436
2129
  const clientApi = await GetClientAPI(clientApiParams);
2437
2130
  const { data } = await clientApi.get(`/groups/featured`, {
@@ -2442,14 +2135,6 @@ var GetGroupsFeatured = async ({
2442
2135
  search: search || void 0
2443
2136
  }
2444
2137
  });
2445
- if (queryClient && data.status === "ok") {
2446
- CacheIndividualQueries(
2447
- data,
2448
- queryClient,
2449
- (groupId) => GROUP_QUERY_KEY(groupId),
2450
- locale
2451
- );
2452
- }
2453
2138
  return data;
2454
2139
  };
2455
2140
  var useGetGroupsFeatured = (params = {}, options = {}) => {
@@ -2475,9 +2160,7 @@ var GetGroupsInvited = async ({
2475
2160
  pageSize,
2476
2161
  orderBy,
2477
2162
  search,
2478
- queryClient,
2479
- clientApiParams,
2480
- locale
2163
+ clientApiParams
2481
2164
  }) => {
2482
2165
  const clientApi = await GetClientAPI(clientApiParams);
2483
2166
  const { data } = await clientApi.get(`/groups/invited`, {
@@ -2486,17 +2169,9 @@ var GetGroupsInvited = async ({
2486
2169
  pageSize: pageSize || void 0,
2487
2170
  orderBy: orderBy || void 0,
2488
2171
  search: search || void 0,
2489
- rejected
2172
+ rejected: rejected !== void 0 ? rejected : void 0
2490
2173
  }
2491
2174
  });
2492
- if (queryClient && data.status === "ok") {
2493
- CacheIndividualQueries(
2494
- data,
2495
- queryClient,
2496
- (groupId) => GROUP_QUERY_KEY(groupId),
2497
- locale
2498
- );
2499
- }
2500
2175
  return data;
2501
2176
  };
2502
2177
  var useGetGroupsInvited = (rejected, params = {}, options = {}) => {
@@ -2517,9 +2192,7 @@ var GetGroupsRequested = async ({
2517
2192
  pageSize,
2518
2193
  orderBy,
2519
2194
  search,
2520
- queryClient,
2521
- clientApiParams,
2522
- locale
2195
+ clientApiParams
2523
2196
  }) => {
2524
2197
  const clientApi = await GetClientAPI(clientApiParams);
2525
2198
  const { data } = await clientApi.get(`/groups/requested`, {
@@ -2530,14 +2203,6 @@ var GetGroupsRequested = async ({
2530
2203
  search: search || void 0
2531
2204
  }
2532
2205
  });
2533
- if (queryClient && data.status === "ok") {
2534
- CacheIndividualQueries(
2535
- data,
2536
- queryClient,
2537
- (groupId) => GROUP_QUERY_KEY(groupId),
2538
- locale
2539
- );
2540
- }
2541
2206
  return data;
2542
2207
  };
2543
2208
  var useGetGroupsRequested = (params = {}, options = {}) => {
@@ -2549,84 +2214,148 @@ var useGetGroupsRequested = (params = {}, options = {}) => {
2549
2214
  );
2550
2215
  };
2551
2216
 
2552
- // src/queries/events/useGetEventActivities.ts
2553
- var EVENT_ACTIVITIES_QUERY_KEY = (eventId) => [
2554
- ...ACTIVITIES_QUERY_KEY(),
2555
- ...EVENT_QUERY_KEY(eventId)
2556
- ];
2557
- var SET_EVENT_ACTIVITIES_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
2217
+ // src/queries/events/useGetEvents.ts
2218
+ var EVENTS_QUERY_KEY = (past) => {
2219
+ const keys = ["EVENTS"];
2220
+ if (typeof past !== "undefined") {
2221
+ keys.push(past ? "PAST" : "UPCOMING");
2222
+ }
2223
+ return keys;
2224
+ };
2225
+ var SET_EVENTS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
2558
2226
  client.setQueryData(
2559
2227
  [
2560
- ...EVENT_ACTIVITIES_QUERY_KEY(...keyParams),
2228
+ ...EVENTS_QUERY_KEY(...keyParams),
2561
2229
  ...GetBaseInfiniteQueryKeys(...baseKeys)
2562
2230
  ],
2563
2231
  setFirstPageData(response)
2564
2232
  );
2565
2233
  };
2566
- var GetEventActivities = async ({
2567
- eventId,
2234
+ var GetEvents = async ({
2568
2235
  pageParam,
2569
2236
  pageSize,
2570
2237
  orderBy,
2571
2238
  search,
2572
- queryClient,
2573
- clientApiParams,
2574
- locale
2239
+ past,
2240
+ clientApiParams
2575
2241
  }) => {
2576
2242
  const clientApi = await GetClientAPI(clientApiParams);
2577
- const { data } = await clientApi.get(`/events/${eventId}/activities`, {
2243
+ const { data } = await clientApi.get(`/events`, {
2578
2244
  params: {
2579
2245
  page: pageParam || void 0,
2580
2246
  pageSize: pageSize || void 0,
2581
2247
  orderBy: orderBy || void 0,
2582
- search: search || void 0
2248
+ search: search || void 0,
2249
+ past: past !== void 0 ? past : void 0
2583
2250
  }
2584
2251
  });
2585
- if (queryClient && data.status === "ok") {
2586
- CacheIndividualQueries(
2587
- data,
2588
- queryClient,
2589
- (activityId) => ACTIVITY_QUERY_KEY(activityId),
2590
- locale
2591
- );
2592
- }
2593
2252
  return data;
2594
2253
  };
2595
- var useGetEventActivities = (eventId = "", params = {}, options = {}) => {
2254
+ var useGetEvents = (past = false, params = {}, options = {}) => {
2596
2255
  return useConnectedInfiniteQuery(
2597
- EVENT_ACTIVITIES_QUERY_KEY(eventId),
2598
- (params2) => GetEventActivities({ eventId, ...params2 }),
2256
+ EVENTS_QUERY_KEY(past),
2257
+ (params2) => GetEvents({ past, ...params2 }),
2599
2258
  params,
2600
- {
2601
- ...options,
2602
- enabled: !!eventId && (options?.enabled ?? true)
2603
- }
2259
+ options
2604
2260
  );
2605
2261
  };
2606
2262
 
2607
- // src/queries/events/useGetEventFAQSections.ts
2608
- var EVENT_FAQ_SECTIONS_QUERY_KEY = (eventId) => [
2609
- ...EVENT_QUERY_KEY(eventId),
2610
- "FAQ_SECTIONS"
2263
+ // src/queries/events/useGetEvent.ts
2264
+ var EVENT_QUERY_KEY = (eventId) => [
2265
+ ...EVENTS_QUERY_KEY(),
2266
+ eventId
2611
2267
  ];
2612
- var SET_EVENT_FAQ_SECTIONS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
2268
+ var SET_EVENT_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
2613
2269
  client.setQueryData(
2614
- [
2615
- ...EVENT_FAQ_SECTIONS_QUERY_KEY(...keyParams),
2616
- ...GetBaseInfiniteQueryKeys(...baseKeys)
2617
- ],
2618
- setFirstPageData(response)
2270
+ [...EVENT_QUERY_KEY(...keyParams), ...GetBaseSingleQueryKeys(...baseKeys)],
2271
+ response
2619
2272
  );
2620
2273
  };
2621
- var GetEventFaqSections = async ({
2274
+ var GetEvent = async ({
2622
2275
  eventId,
2623
- pageParam,
2624
- pageSize,
2276
+ clientApiParams
2277
+ }) => {
2278
+ const clientApi = await GetClientAPI(clientApiParams);
2279
+ const { data } = await clientApi.get(`/events/${eventId}`);
2280
+ return data;
2281
+ };
2282
+ var useGetEvent = (eventId = "", options = {}) => {
2283
+ return useConnectedSingleQuery(
2284
+ EVENT_QUERY_KEY(eventId),
2285
+ (params) => GetEvent({ eventId, ...params }),
2286
+ {
2287
+ ...options,
2288
+ enabled: !!eventId && (options?.enabled ?? true)
2289
+ }
2290
+ );
2291
+ };
2292
+
2293
+ // src/queries/events/useGetEventActivities.ts
2294
+ var EVENT_ACTIVITIES_QUERY_KEY = (eventId) => [
2295
+ ...ACTIVITIES_QUERY_KEY(),
2296
+ ...EVENT_QUERY_KEY(eventId)
2297
+ ];
2298
+ var SET_EVENT_ACTIVITIES_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
2299
+ client.setQueryData(
2300
+ [
2301
+ ...EVENT_ACTIVITIES_QUERY_KEY(...keyParams),
2302
+ ...GetBaseInfiniteQueryKeys(...baseKeys)
2303
+ ],
2304
+ setFirstPageData(response)
2305
+ );
2306
+ };
2307
+ var GetEventActivities = async ({
2308
+ eventId,
2309
+ pageParam,
2310
+ pageSize,
2625
2311
  orderBy,
2626
2312
  search,
2627
- queryClient,
2628
- clientApiParams,
2629
- locale
2313
+ clientApiParams
2314
+ }) => {
2315
+ const clientApi = await GetClientAPI(clientApiParams);
2316
+ const { data } = await clientApi.get(`/events/${eventId}/activities`, {
2317
+ params: {
2318
+ page: pageParam || void 0,
2319
+ pageSize: pageSize || void 0,
2320
+ orderBy: orderBy || void 0,
2321
+ search: search || void 0
2322
+ }
2323
+ });
2324
+ return data;
2325
+ };
2326
+ var useGetEventActivities = (eventId = "", params = {}, options = {}) => {
2327
+ return useConnectedInfiniteQuery(
2328
+ EVENT_ACTIVITIES_QUERY_KEY(eventId),
2329
+ (params2) => GetEventActivities({ eventId, ...params2 }),
2330
+ params,
2331
+ {
2332
+ ...options,
2333
+ enabled: !!eventId && (options?.enabled ?? true)
2334
+ }
2335
+ );
2336
+ };
2337
+
2338
+ // src/queries/events/useGetEventFAQSections.ts
2339
+ var EVENT_FAQ_SECTIONS_QUERY_KEY = (eventId) => [
2340
+ ...EVENT_QUERY_KEY(eventId),
2341
+ "FAQ_SECTIONS"
2342
+ ];
2343
+ var SET_EVENT_FAQ_SECTIONS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
2344
+ client.setQueryData(
2345
+ [
2346
+ ...EVENT_FAQ_SECTIONS_QUERY_KEY(...keyParams),
2347
+ ...GetBaseInfiniteQueryKeys(...baseKeys)
2348
+ ],
2349
+ setFirstPageData(response)
2350
+ );
2351
+ };
2352
+ var GetEventFaqSections = async ({
2353
+ eventId,
2354
+ pageParam,
2355
+ pageSize,
2356
+ orderBy,
2357
+ search,
2358
+ clientApiParams
2630
2359
  }) => {
2631
2360
  const clientApi = await GetClientAPI(clientApiParams);
2632
2361
  const { data } = await clientApi.get(`/events/${eventId}/faqs`, {
@@ -2637,14 +2366,6 @@ var GetEventFaqSections = async ({
2637
2366
  search: search || void 0
2638
2367
  }
2639
2368
  });
2640
- if (queryClient && data.status === "ok") {
2641
- CacheIndividualQueries(
2642
- data,
2643
- queryClient,
2644
- (sectionId) => EVENT_FAQ_SECTION_QUERY_KEY(eventId, sectionId),
2645
- locale
2646
- );
2647
- }
2648
2369
  return data;
2649
2370
  };
2650
2371
  var useGetEventFaqSections = (eventId = "", params = {}, options = {}) => {
@@ -2711,9 +2432,7 @@ var GetEventFaqs = async ({
2711
2432
  pageSize,
2712
2433
  orderBy,
2713
2434
  search,
2714
- queryClient,
2715
- clientApiParams,
2716
- locale
2435
+ clientApiParams
2717
2436
  }) => {
2718
2437
  const clientApi = await GetClientAPI(clientApiParams);
2719
2438
  const { data } = await clientApi.get(
@@ -2727,14 +2446,6 @@ var GetEventFaqs = async ({
2727
2446
  }
2728
2447
  }
2729
2448
  );
2730
- if (queryClient && data.status === "ok") {
2731
- CacheIndividualQueries(
2732
- data,
2733
- queryClient,
2734
- (faqId) => EVENT_FAQ_SECTION_QUESTION_QUERY_KEY(eventId, sectionId, faqId),
2735
- locale
2736
- );
2737
- }
2738
2449
  return data;
2739
2450
  };
2740
2451
  var useGetEventFaqs = (eventId = "", sectionId = "", params = {}, options = {}) => {
@@ -2806,9 +2517,7 @@ var GetEventPages = async ({
2806
2517
  pageSize,
2807
2518
  orderBy,
2808
2519
  search,
2809
- queryClient,
2810
- clientApiParams,
2811
- locale
2520
+ clientApiParams
2812
2521
  }) => {
2813
2522
  const clientApi = await GetClientAPI(clientApiParams);
2814
2523
  const { data } = await clientApi.get(`/events/${eventId}/pages`, {
@@ -2819,14 +2528,6 @@ var GetEventPages = async ({
2819
2528
  search: search || void 0
2820
2529
  }
2821
2530
  });
2822
- if (queryClient && data.status === "ok") {
2823
- CacheIndividualQueries(
2824
- data,
2825
- queryClient,
2826
- (pageId) => EVENT_PAGE_QUERY_KEY(eventId, pageId),
2827
- locale
2828
- );
2829
- }
2830
2531
  return data;
2831
2532
  };
2832
2533
  var useGetEventPages = (eventId = "", params = {}, options = {}) => {
@@ -2933,9 +2634,7 @@ var GetEventRegistrants = async ({
2933
2634
  pageSize,
2934
2635
  orderBy,
2935
2636
  search,
2936
- queryClient,
2937
- clientApiParams,
2938
- locale
2637
+ clientApiParams
2939
2638
  }) => {
2940
2639
  const clientApi = await GetClientAPI(clientApiParams);
2941
2640
  const { data } = await clientApi.get(`/events/${eventId}/registrants`, {
@@ -2946,14 +2645,6 @@ var GetEventRegistrants = async ({
2946
2645
  search: search || void 0
2947
2646
  }
2948
2647
  });
2949
- if (queryClient && data.status === "ok") {
2950
- CacheIndividualQueries(
2951
- data,
2952
- queryClient,
2953
- (accountId) => ACCOUNT_QUERY_KEY(accountId),
2954
- locale
2955
- );
2956
- }
2957
2648
  return data;
2958
2649
  };
2959
2650
  var useGetEventRegistrants = (eventId = "", params = {}, options = {}) => {
@@ -3057,9 +2748,7 @@ var GetEventSpeakers = async ({
3057
2748
  pageSize,
3058
2749
  orderBy,
3059
2750
  search,
3060
- queryClient,
3061
- clientApiParams,
3062
- locale
2751
+ clientApiParams
3063
2752
  }) => {
3064
2753
  const clientApi = await GetClientAPI(clientApiParams);
3065
2754
  const { data } = await clientApi.get(`/events/${eventId}/speakers`, {
@@ -3070,14 +2759,6 @@ var GetEventSpeakers = async ({
3070
2759
  search: search || void 0
3071
2760
  }
3072
2761
  });
3073
- if (queryClient && data.status === "ok") {
3074
- CacheIndividualQueries(
3075
- data,
3076
- queryClient,
3077
- (speakerId) => EVENT_SPEAKER_QUERY_KEY(eventId, speakerId),
3078
- locale
3079
- );
3080
- }
3081
2762
  return data;
3082
2763
  };
3083
2764
  var useGetEventSpeakers = (eventId = "", params = {}, options = {}) => {
@@ -3145,9 +2826,7 @@ var GetEventSponsors = async ({
3145
2826
  pageSize,
3146
2827
  orderBy,
3147
2828
  search,
3148
- queryClient,
3149
- clientApiParams,
3150
- locale
2829
+ clientApiParams
3151
2830
  }) => {
3152
2831
  const clientApi = await GetClientAPI(clientApiParams);
3153
2832
  const { data } = await clientApi.get(`/events/${eventId}/sponsors`, {
@@ -3158,14 +2837,6 @@ var GetEventSponsors = async ({
3158
2837
  search: search || void 0
3159
2838
  }
3160
2839
  });
3161
- if (queryClient && data.status === "ok") {
3162
- CacheIndividualQueries(
3163
- data,
3164
- queryClient,
3165
- (sponsorId) => ACCOUNT_QUERY_KEY(sponsorId),
3166
- locale
3167
- );
3168
- }
3169
2840
  return data;
3170
2841
  };
3171
2842
  var useGetEventSponsors = (eventId = "", params = {}, options = {}) => {
@@ -3239,9 +2910,7 @@ var GetEventActivations = async ({
3239
2910
  pageSize,
3240
2911
  orderBy,
3241
2912
  search,
3242
- queryClient,
3243
- clientApiParams,
3244
- locale
2913
+ clientApiParams
3245
2914
  }) => {
3246
2915
  const clientApi = await GetClientAPI(clientApiParams);
3247
2916
  const { data } = await clientApi.get(`/events/${eventId}/activations`, {
@@ -3252,14 +2921,6 @@ var GetEventActivations = async ({
3252
2921
  search: search || void 0
3253
2922
  }
3254
2923
  });
3255
- if (queryClient && data.status === "ok") {
3256
- CacheIndividualQueries(
3257
- data,
3258
- queryClient,
3259
- (activationId) => EVENT_ACTIVATION_QUERY_KEY(eventId, activationId),
3260
- locale
3261
- );
3262
- }
3263
2924
  return data;
3264
2925
  };
3265
2926
  var useGetEventActivations = (eventId = "", params = {}, options = {}) => {
@@ -3627,9 +3288,7 @@ var GetAllGroupEvents = async ({
3627
3288
  orderBy,
3628
3289
  search,
3629
3290
  past,
3630
- queryClient,
3631
- clientApiParams,
3632
- locale
3291
+ clientApiParams
3633
3292
  }) => {
3634
3293
  const clientApi = await GetClientAPI(clientApiParams);
3635
3294
  const { data } = await clientApi.get(`/groups/events`, {
@@ -3641,14 +3300,6 @@ var GetAllGroupEvents = async ({
3641
3300
  past: past !== void 0 ? past : void 0
3642
3301
  }
3643
3302
  });
3644
- if (queryClient) {
3645
- CacheIndividualQueries(
3646
- data,
3647
- queryClient,
3648
- (eventId) => EVENT_QUERY_KEY(eventId),
3649
- locale
3650
- );
3651
- }
3652
3303
  return data;
3653
3304
  };
3654
3305
  var useGetAllGroupEvents = (past = false, params = {}, options = {}) => {
@@ -3676,9 +3327,7 @@ var GetChannels = async ({
3676
3327
  pageSize,
3677
3328
  orderBy,
3678
3329
  search,
3679
- queryClient,
3680
- clientApiParams,
3681
- locale
3330
+ clientApiParams
3682
3331
  }) => {
3683
3332
  const clientApi = await GetClientAPI(clientApiParams);
3684
3333
  const { data } = await clientApi.get(`/channels`, {
@@ -3689,14 +3338,6 @@ var GetChannels = async ({
3689
3338
  search: search || void 0
3690
3339
  }
3691
3340
  });
3692
- if (queryClient && data.status === "ok") {
3693
- CacheIndividualQueries(
3694
- data,
3695
- queryClient,
3696
- (channelId) => CHANNEL_QUERY_KEY(channelId),
3697
- locale
3698
- );
3699
- }
3700
3341
  return data;
3701
3342
  };
3702
3343
  var useGetChannels = (params = {}, options = {}) => {
@@ -3761,9 +3402,7 @@ var GetChannelCollections = async ({
3761
3402
  pageSize,
3762
3403
  orderBy,
3763
3404
  search,
3764
- queryClient,
3765
- clientApiParams,
3766
- locale
3405
+ clientApiParams
3767
3406
  }) => {
3768
3407
  const clientApi = await GetClientAPI(clientApiParams);
3769
3408
  const { data } = await clientApi.get(`/channels/${channelId}/collections`, {
@@ -3774,14 +3413,6 @@ var GetChannelCollections = async ({
3774
3413
  search: search || void 0
3775
3414
  }
3776
3415
  });
3777
- if (queryClient && data.status === "ok") {
3778
- CacheIndividualQueries(
3779
- data,
3780
- queryClient,
3781
- (collectionId) => CHANNEL_COLLECTION_QUERY_KEY(channelId, collectionId),
3782
- locale
3783
- );
3784
- }
3785
3416
  return data;
3786
3417
  };
3787
3418
  var useGetChannelCollections = (channelId, params = {}, options = {}) => {
@@ -3826,28 +3457,67 @@ var useGetChannelCollection = (channelId = "", collectionId = "", options = {})
3826
3457
  );
3827
3458
  };
3828
3459
 
3829
- // src/queries/contents/useGetContents.ts
3830
- var CONTENTS_QUERY_KEY = (type, featured, interest, past) => {
3831
- const key = ["CONTENTS"];
3832
- if (type) key.push(type);
3460
+ // src/queries/channels/collections/useGetChannelCollectionContents.ts
3461
+ var CHANNEL_COLLECTION_CONTENTS_QUERY_KEY = (channelId, collectionId) => [
3462
+ ...CHANNEL_COLLECTION_QUERY_KEY(channelId, collectionId),
3463
+ "CONTENTS"
3464
+ ];
3465
+ var GetChannelCollectionContents = async ({
3466
+ channelId,
3467
+ collectionId,
3468
+ pageParam,
3469
+ pageSize,
3470
+ orderBy,
3471
+ search,
3472
+ clientApiParams
3473
+ }) => {
3474
+ const clientApi = await GetClientAPI(clientApiParams);
3475
+ const { data } = await clientApi.get(
3476
+ `/channels/${channelId}/collections/${collectionId}/contents`,
3477
+ {
3478
+ params: {
3479
+ page: pageParam || void 0,
3480
+ pageSize: pageSize || void 0,
3481
+ orderBy: orderBy || void 0,
3482
+ search: search || void 0
3483
+ }
3484
+ }
3485
+ );
3486
+ return data;
3487
+ };
3488
+ var useGetChannelCollectionContents = (channelId, collectionId, params = {}, options = {}) => {
3489
+ return useConnectedInfiniteQuery(
3490
+ CHANNEL_COLLECTION_CONTENTS_QUERY_KEY(channelId, collectionId),
3491
+ (params2) => GetChannelCollectionContents({ channelId, collectionId, ...params2 }),
3492
+ params,
3493
+ {
3494
+ ...options,
3495
+ enabled: !!channelId && !!collectionId && (options?.enabled ?? true)
3496
+ }
3497
+ );
3498
+ };
3499
+
3500
+ // src/queries/channels/content/useGetChannelContents.ts
3501
+ var CHANNEL_CONTENTS_QUERY_KEY = (channelId, type, featured, past) => {
3502
+ const key = [...CHANNEL_QUERY_KEY(channelId), "CONTENTS"];
3833
3503
  if (featured) key.push("FEATURED");
3834
- if (interest) key.push(interest);
3835
3504
  if (typeof past !== "undefined") key.push(past ? "PAST" : "UPCOMING");
3505
+ if (type) key.push(type);
3836
3506
  return key;
3837
3507
  };
3838
- var SET_CONTENTS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
3508
+ var SET_CHANNEL_CONTENTS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
3839
3509
  client.setQueryData(
3840
3510
  [
3841
- ...CONTENTS_QUERY_KEY(...keyParams),
3511
+ ...CHANNEL_CONTENTS_QUERY_KEY(...keyParams),
3842
3512
  ...GetBaseInfiniteQueryKeys(...baseKeys)
3843
3513
  ],
3844
3514
  setFirstPageData(response)
3845
3515
  );
3846
3516
  };
3847
- var GetContents = async ({
3517
+ var GetChannelContents = async ({
3518
+ channelId,
3848
3519
  type,
3849
3520
  featured,
3850
- interest,
3851
3521
  past,
3852
3522
  pageParam,
3853
3523
  pageSize,
@@ -3856,11 +3526,10 @@ var GetContents = async ({
3856
3526
  clientApiParams
3857
3527
  }) => {
3858
3528
  const clientApi = await GetClientAPI(clientApiParams);
3859
- const { data } = await clientApi.get(`/contents`, {
3529
+ const { data } = await clientApi.get(`/channels/${channelId}/contents`, {
3860
3530
  params: {
3861
3531
  type: type || void 0,
3862
- featured: typeof featured !== "undefined" ? featured ? "true" : "false" : void 0,
3863
- interest: interest || void 0,
3532
+ featured: featured || void 0,
3864
3533
  past,
3865
3534
  page: pageParam || void 0,
3866
3535
  pageSize: pageSize || void 0,
@@ -3870,185 +3539,21 @@ var GetContents = async ({
3870
3539
  });
3871
3540
  return data;
3872
3541
  };
3873
- var useGetContents = (type, featured, interest, past, params = {}, options = {}) => {
3542
+ var useGetChannelContents = (channelId = "", type, featured, past, params = {}, options = {}) => {
3874
3543
  return useConnectedInfiniteQuery(
3875
- CONTENTS_QUERY_KEY(type, featured, interest, past),
3876
- (params2) => GetContents({ type, featured, interest, past, ...params2 }),
3544
+ CHANNEL_CONTENTS_QUERY_KEY(channelId, type, featured, past),
3545
+ (params2) => GetChannelContents({
3546
+ ...params2,
3547
+ channelId: channelId || "",
3548
+ type,
3549
+ featured,
3550
+ past
3551
+ }),
3877
3552
  params,
3878
- options
3879
- );
3880
- };
3881
-
3882
- // src/queries/contents/useGetContent.ts
3883
- var CONTENT_QUERY_KEY = (contentId) => [
3884
- ...CONTENTS_QUERY_KEY(),
3885
- contentId
3886
- ];
3887
- var SET_CONTENT_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
3888
- client.setQueryData(
3889
- [
3890
- ...CONTENT_QUERY_KEY(...keyParams),
3891
- ...GetBaseSingleQueryKeys(...baseKeys)
3892
- ],
3893
- response
3894
- );
3895
- };
3896
- var GetContent = async ({
3897
- contentId,
3898
- clientApiParams
3899
- }) => {
3900
- const clientApi = await GetClientAPI(clientApiParams);
3901
- const { data } = await clientApi.get(`/contents/${contentId}`);
3902
- return data;
3903
- };
3904
- var useGetContent = (contentId = "", options = {}) => {
3905
- return useConnectedSingleQuery_default(
3906
- CONTENT_QUERY_KEY(contentId),
3907
- (params) => GetContent({ contentId, ...params }),
3908
- {
3909
- ...options,
3910
- enabled: !!contentId && options.enabled
3911
- }
3912
- );
3913
- };
3914
-
3915
- // src/queries/contents/useGetContentInterests.ts
3916
- var CONTENT_INTERESTS_QUERY_KEY = () => {
3917
- const key = ["CONTENTS_INTERESTS"];
3918
- return key;
3919
- };
3920
- var GetContentInterests = async ({
3921
- pageParam,
3922
- pageSize,
3923
- orderBy,
3924
- search,
3925
- clientApiParams
3926
- }) => {
3927
- const clientApi = await GetClientAPI(clientApiParams);
3928
- const { data } = await clientApi.get(`/contents/interests`, {
3929
- params: {
3930
- page: pageParam || void 0,
3931
- pageSize: pageSize || void 0,
3932
- orderBy: orderBy || void 0,
3933
- search: search || void 0
3934
- }
3935
- });
3936
- return data;
3937
- };
3938
- var useGetContentInterests = (params = {}, options = {}) => {
3939
- return useConnectedInfiniteQuery(
3940
- CONTENT_INTERESTS_QUERY_KEY(),
3941
- (params2) => GetContentInterests({ ...params2 }),
3942
- params,
3943
- options
3944
- );
3945
- };
3946
-
3947
- // src/queries/contents/useGetSubscribedContents.ts
3948
- var SUBSCRIBED_CONTENTS_QUERY_KEY = (type, interest) => {
3949
- const key = ["SUBSCRIBED_CONTENTS"];
3950
- if (type) key.push(type);
3951
- if (interest) key.push(interest);
3952
- return key;
3953
- };
3954
- var GetSubscribedContents = async ({
3955
- type,
3956
- interest,
3957
- pageParam,
3958
- pageSize,
3959
- orderBy,
3960
- search,
3961
- clientApiParams
3962
- }) => {
3963
- const clientApi = await GetClientAPI(clientApiParams);
3964
- const { data } = await clientApi.get(`/contents/subscribed`, {
3965
- params: {
3966
- type: type || void 0,
3967
- interest: interest || void 0,
3968
- page: pageParam || void 0,
3969
- pageSize: pageSize || void 0,
3970
- orderBy: orderBy || void 0,
3971
- search: search || void 0
3972
- }
3973
- });
3974
- return data;
3975
- };
3976
- var useGetSubscribedContents = (type, interest, params = {}, options = {}) => {
3977
- return useConnectedInfiniteQuery(
3978
- SUBSCRIBED_CONTENTS_QUERY_KEY(interest),
3979
- (params2) => GetSubscribedContents({ interest, ...params2 }),
3980
- params,
3981
- options
3982
- );
3983
- };
3984
-
3985
- // src/queries/channels/content/useGetChannelContents.ts
3986
- var CHANNEL_CONTENTS_QUERY_KEY = (channelId, type, featured, past) => {
3987
- const key = [...CHANNEL_QUERY_KEY(channelId), "CONTENTS"];
3988
- if (featured) key.push("FEATURED");
3989
- if (typeof past !== "undefined") key.push(past ? "PAST" : "UPCOMING");
3990
- if (type) key.push(type);
3991
- return key;
3992
- };
3993
- var SET_CHANNEL_CONTENTS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
3994
- client.setQueryData(
3995
- [
3996
- ...CHANNEL_CONTENTS_QUERY_KEY(...keyParams),
3997
- ...GetBaseInfiniteQueryKeys(...baseKeys)
3998
- ],
3999
- setFirstPageData(response)
4000
- );
4001
- };
4002
- var GetChannelContents = async ({
4003
- channelId,
4004
- type,
4005
- featured,
4006
- past,
4007
- pageParam,
4008
- pageSize,
4009
- orderBy,
4010
- search,
4011
- queryClient,
4012
- clientApiParams,
4013
- locale
4014
- }) => {
4015
- const clientApi = await GetClientAPI(clientApiParams);
4016
- const { data } = await clientApi.get(`/channels/${channelId}/contents`, {
4017
- params: {
4018
- type: type || void 0,
4019
- featured: featured || void 0,
4020
- past,
4021
- page: pageParam || void 0,
4022
- pageSize: pageSize || void 0,
4023
- orderBy: orderBy || void 0,
4024
- search: search || void 0
4025
- }
4026
- });
4027
- if (queryClient && data.status === "ok") {
4028
- CacheIndividualQueries(
4029
- data,
4030
- queryClient,
4031
- (contentId) => CHANNEL_CONTENT_QUERY_KEY(channelId, contentId),
4032
- locale
4033
- );
4034
- }
4035
- return data;
4036
- };
4037
- var useGetChannelContents = (channelId = "", type, featured, past, params = {}, options = {}) => {
4038
- return useConnectedInfiniteQuery(
4039
- CHANNEL_CONTENTS_QUERY_KEY(channelId, type, featured, past),
4040
- (params2) => GetChannelContents({
4041
- ...params2,
4042
- channelId: channelId || "",
4043
- type,
4044
- featured,
4045
- past
4046
- }),
4047
- params,
4048
- {
4049
- ...options,
4050
- enabled: !!channelId && (options?.enabled ?? true)
4051
- }
3553
+ {
3554
+ ...options,
3555
+ enabled: !!channelId && (options?.enabled ?? true)
3556
+ }
4052
3557
  );
4053
3558
  };
4054
3559
 
@@ -4106,9 +3611,7 @@ var GetChannelContentActivities = async ({
4106
3611
  pageSize,
4107
3612
  orderBy,
4108
3613
  search,
4109
- queryClient,
4110
- clientApiParams,
4111
- locale
3614
+ clientApiParams
4112
3615
  }) => {
4113
3616
  const clientApi = await GetClientAPI(clientApiParams);
4114
3617
  const { data } = await clientApi.get(
@@ -4122,14 +3625,6 @@ var GetChannelContentActivities = async ({
4122
3625
  }
4123
3626
  }
4124
3627
  );
4125
- if (queryClient && data.status === "ok") {
4126
- CacheIndividualQueries(
4127
- data,
4128
- queryClient,
4129
- (activityId) => ACTIVITY_QUERY_KEY(activityId),
4130
- locale
4131
- );
4132
- }
4133
3628
  return data;
4134
3629
  };
4135
3630
  var useGetChannelContentActivities = (channelId = "", contentId = "", params = {}, options = {}) => {
@@ -4221,62 +3716,6 @@ var useGetChannelContentGuests = (channelId, contentId, params = {}, options = {
4221
3716
  );
4222
3717
  };
4223
3718
 
4224
- // src/queries/channels/collections/useGetChannelCollectionContents.ts
4225
- var CHANNEL_COLLECTION_CONTENTS_QUERY_KEY = (channelId, collectionId) => [
4226
- ...CHANNEL_COLLECTION_QUERY_KEY(channelId, collectionId),
4227
- "CONTENTS"
4228
- ];
4229
- var GetChannelCollectionContents = async ({
4230
- channelId,
4231
- collectionId,
4232
- pageParam,
4233
- pageSize,
4234
- orderBy,
4235
- search,
4236
- queryClient,
4237
- clientApiParams,
4238
- locale
4239
- }) => {
4240
- const clientApi = await GetClientAPI(clientApiParams);
4241
- const { data } = await clientApi.get(
4242
- `/channels/${channelId}/collections/${collectionId}/contents`,
4243
- {
4244
- params: {
4245
- page: pageParam || void 0,
4246
- pageSize: pageSize || void 0,
4247
- orderBy: orderBy || void 0,
4248
- search: search || void 0
4249
- }
4250
- }
4251
- );
4252
- if (queryClient && data.status === "ok") {
4253
- CacheIndividualQueries(
4254
- data,
4255
- queryClient,
4256
- (contentId) => CHANNEL_CONTENT_QUERY_KEY(channelId, contentId),
4257
- locale
4258
- );
4259
- CacheIndividualQueries(
4260
- data,
4261
- queryClient,
4262
- (contentId) => CONTENT_QUERY_KEY(contentId),
4263
- locale
4264
- );
4265
- }
4266
- return data;
4267
- };
4268
- var useGetChannelCollectionContents = (channelId, collectionId, params = {}, options = {}) => {
4269
- return useConnectedInfiniteQuery(
4270
- CHANNEL_COLLECTION_CONTENTS_QUERY_KEY(channelId, collectionId),
4271
- (params2) => GetChannelCollectionContents({ channelId, collectionId, ...params2 }),
4272
- params,
4273
- {
4274
- ...options,
4275
- enabled: !!channelId && !!collectionId && (options?.enabled ?? true)
4276
- }
4277
- );
4278
- };
4279
-
4280
3719
  // src/queries/channels/managed/useGetManagedChannels.ts
4281
3720
  var MANAGED_CHANNELS_QUERY_KEY = () => [
4282
3721
  "CHANNELS",
@@ -4296,9 +3735,7 @@ var GetManagedChannels = async ({
4296
3735
  pageSize,
4297
3736
  orderBy,
4298
3737
  search,
4299
- queryClient,
4300
- clientApiParams,
4301
- locale
3738
+ clientApiParams
4302
3739
  }) => {
4303
3740
  const clientApi = await GetClientAPI(clientApiParams);
4304
3741
  const { data } = await clientApi.get(`/channels/managed`, {
@@ -4309,14 +3746,6 @@ var GetManagedChannels = async ({
4309
3746
  search: search || void 0
4310
3747
  }
4311
3748
  });
4312
- if (queryClient && data.status === "ok") {
4313
- CacheIndividualQueries(
4314
- data,
4315
- queryClient,
4316
- (channelId) => MANAGED_CHANNEL_QUERY_KEY(channelId),
4317
- locale
4318
- );
4319
- }
4320
3749
  return data;
4321
3750
  };
4322
3751
  var useGetManagedChannels = (params = {}, options = {}) => {
@@ -4378,9 +3807,7 @@ var GetManagedChannelCollections = async ({
4378
3807
  pageSize,
4379
3808
  orderBy,
4380
3809
  search,
4381
- queryClient,
4382
- clientApiParams,
4383
- locale
3810
+ clientApiParams
4384
3811
  }) => {
4385
3812
  const clientApi = await GetClientAPI(clientApiParams);
4386
3813
  const { data } = await clientApi.get(
@@ -4394,14 +3821,6 @@ var GetManagedChannelCollections = async ({
4394
3821
  }
4395
3822
  }
4396
3823
  );
4397
- if (queryClient && data.status === "ok") {
4398
- CacheIndividualQueries(
4399
- data,
4400
- queryClient,
4401
- (collectionId) => MANAGED_CHANNEL_COLLECTION_QUERY_KEY(channelId, collectionId),
4402
- locale
4403
- );
4404
- }
4405
3824
  return data;
4406
3825
  };
4407
3826
  var useGetManagedChannelCollections = (channelId, params = {}, options = {}) => {
@@ -4449,6 +3868,50 @@ var useGetManagedChannelCollection = (channelId = "", collectionId = "", options
4449
3868
  );
4450
3869
  };
4451
3870
 
3871
+ // src/queries/channels/managed/collections/useGetManagedChannelCollectionContents.ts
3872
+ var MANAGED_CHANNEL_COLLECTION_CONTENTS_QUERY_KEY = (channelId, collectionId) => [
3873
+ ...MANAGED_CHANNEL_COLLECTION_QUERY_KEY(channelId, collectionId),
3874
+ "CONTENTS"
3875
+ ];
3876
+ var GetManagedChannelCollectionContents = async ({
3877
+ channelId,
3878
+ collectionId,
3879
+ pageParam,
3880
+ pageSize,
3881
+ orderBy,
3882
+ search,
3883
+ clientApiParams
3884
+ }) => {
3885
+ const clientApi = await GetClientAPI(clientApiParams);
3886
+ const { data } = await clientApi.get(
3887
+ `/channels/managed/${channelId}/collections/${collectionId}/contents`,
3888
+ {
3889
+ params: {
3890
+ page: pageParam || void 0,
3891
+ pageSize: pageSize || void 0,
3892
+ orderBy: orderBy || void 0,
3893
+ search: search || void 0
3894
+ }
3895
+ }
3896
+ );
3897
+ return data;
3898
+ };
3899
+ var useGetManagedChannelCollectionContents = (channelId, collectionId, params = {}, options = {}) => {
3900
+ return useConnectedInfiniteQuery(
3901
+ MANAGED_CHANNEL_COLLECTION_CONTENTS_QUERY_KEY(channelId, collectionId),
3902
+ (params2) => GetManagedChannelCollectionContents({
3903
+ channelId,
3904
+ collectionId,
3905
+ ...params2
3906
+ }),
3907
+ params,
3908
+ {
3909
+ ...options,
3910
+ enabled: !!channelId && !!collectionId && (options?.enabled ?? true)
3911
+ }
3912
+ );
3913
+ };
3914
+
4452
3915
  // src/queries/channels/managed/content/useGetManagedChannelContents.ts
4453
3916
  var MANAGED_CHANNEL_CONTENTS_QUERY_KEY = (channelId) => [...MANAGED_CHANNEL_QUERY_KEY(channelId), "CONTENTS"];
4454
3917
  var SET_MANAGED_CHANNEL_CONTENTS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
@@ -4466,9 +3929,7 @@ var GetManagedChannelContents = async ({
4466
3929
  orderBy,
4467
3930
  search,
4468
3931
  channelId,
4469
- queryClient,
4470
- clientApiParams,
4471
- locale
3932
+ clientApiParams
4472
3933
  }) => {
4473
3934
  const clientApi = await GetClientAPI(clientApiParams);
4474
3935
  const { data } = await clientApi.get(
@@ -4482,14 +3943,6 @@ var GetManagedChannelContents = async ({
4482
3943
  }
4483
3944
  }
4484
3945
  );
4485
- if (queryClient && data.status === "ok") {
4486
- CacheIndividualQueries(
4487
- data,
4488
- queryClient,
4489
- (contentId) => MANAGED_CHANNEL_CONTENT_QUERY_KEY(channelId, contentId),
4490
- locale
4491
- );
4492
- }
4493
3946
  return data;
4494
3947
  };
4495
3948
  var useGetManagedChannelContents = (channelId = "", params = {}, options = {}) => {
@@ -4558,9 +4011,7 @@ var GetManagedChannelContentActivities = async ({
4558
4011
  pageSize,
4559
4012
  orderBy,
4560
4013
  search,
4561
- queryClient,
4562
- clientApiParams,
4563
- locale
4014
+ clientApiParams
4564
4015
  }) => {
4565
4016
  const clientApi = await GetClientAPI(clientApiParams);
4566
4017
  const { data } = await clientApi.get(
@@ -4574,14 +4025,6 @@ var GetManagedChannelContentActivities = async ({
4574
4025
  }
4575
4026
  }
4576
4027
  );
4577
- if (queryClient && data.status === "ok") {
4578
- CacheIndividualQueries(
4579
- data,
4580
- queryClient,
4581
- (activityId) => ACTIVITY_QUERY_KEY(activityId),
4582
- locale
4583
- );
4584
- }
4585
4028
  return data;
4586
4029
  };
4587
4030
  var useGetManagedChannelContentActivities = (channelId = "", contentId = "", params = {}, options = {}) => {
@@ -4676,25 +4119,28 @@ var useGetManagedChannelContentGuests = (channelId, contentId, params = {}, opti
4676
4119
  );
4677
4120
  };
4678
4121
 
4679
- // src/queries/channels/managed/collections/useGetManagedChannelCollectionContents.ts
4680
- var MANAGED_CHANNEL_COLLECTION_CONTENTS_QUERY_KEY = (channelId, collectionId) => [
4681
- ...MANAGED_CHANNEL_COLLECTION_QUERY_KEY(channelId, collectionId),
4682
- "CONTENTS"
4683
- ];
4684
- var GetManagedChannelCollectionContents = async ({
4685
- channelId,
4686
- collectionId,
4122
+ // src/queries/channels/managed/useGetManagedChannelSubscribers.ts
4123
+ var MANAGED_CHANNEL_SUBSCRIBERS_QUERY_KEY = (channelId) => [...MANAGED_CHANNEL_QUERY_KEY(channelId), "SUBSCRIBERS"];
4124
+ var SET_MANAGED_CHANNEL_SUBSCRIBERS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
4125
+ client.setQueryData(
4126
+ [
4127
+ ...MANAGED_CHANNEL_SUBSCRIBERS_QUERY_KEY(...keyParams),
4128
+ ...GetBaseInfiniteQueryKeys(...baseKeys)
4129
+ ],
4130
+ setFirstPageData(response)
4131
+ );
4132
+ };
4133
+ var GetManagedChannelSubscribers = async ({
4687
4134
  pageParam,
4688
4135
  pageSize,
4689
4136
  orderBy,
4690
4137
  search,
4691
- queryClient,
4692
- clientApiParams,
4693
- locale
4138
+ channelId,
4139
+ clientApiParams
4694
4140
  }) => {
4695
4141
  const clientApi = await GetClientAPI(clientApiParams);
4696
4142
  const { data } = await clientApi.get(
4697
- `/channels/managed/${channelId}/collections/${collectionId}/contents`,
4143
+ `/channels/managed/${channelId}/subscribers`,
4698
4144
  {
4699
4145
  params: {
4700
4146
  page: pageParam || void 0,
@@ -4704,60 +4150,33 @@ var GetManagedChannelCollectionContents = async ({
4704
4150
  }
4705
4151
  }
4706
4152
  );
4707
- if (queryClient && data.status === "ok") {
4708
- CacheIndividualQueries(
4709
- data,
4710
- queryClient,
4711
- (contentId) => MANAGED_CHANNEL_CONTENT_QUERY_KEY(channelId, contentId),
4712
- locale
4713
- );
4714
- CacheIndividualQueries(
4715
- data,
4716
- queryClient,
4717
- (contentId) => CONTENT_QUERY_KEY(contentId),
4718
- locale
4719
- );
4720
- }
4721
4153
  return data;
4722
4154
  };
4723
- var useGetManagedChannelCollectionContents = (channelId, collectionId, params = {}, options = {}) => {
4155
+ var useGetManagedChannelSubscribers = (channelId = "", params = {}, options = {}) => {
4724
4156
  return useConnectedInfiniteQuery(
4725
- MANAGED_CHANNEL_COLLECTION_CONTENTS_QUERY_KEY(channelId, collectionId),
4726
- (params2) => GetManagedChannelCollectionContents({
4727
- channelId,
4728
- collectionId,
4729
- ...params2
4730
- }),
4157
+ MANAGED_CHANNEL_SUBSCRIBERS_QUERY_KEY(channelId),
4158
+ (params2) => GetManagedChannelSubscribers({ ...params2, channelId: channelId || "" }),
4731
4159
  params,
4732
4160
  {
4733
4161
  ...options,
4734
- enabled: !!channelId && !!collectionId && (options?.enabled ?? true)
4162
+ enabled: !!channelId && (options?.enabled ?? true)
4735
4163
  }
4736
4164
  );
4737
4165
  };
4738
4166
 
4739
- // src/queries/channels/managed/useGetManagedChannelSubscribers.ts
4740
- var MANAGED_CHANNEL_SUBSCRIBERS_QUERY_KEY = (channelId) => [...MANAGED_CHANNEL_QUERY_KEY(channelId), "SUBSCRIBERS"];
4741
- var SET_MANAGED_CHANNEL_SUBSCRIBERS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
4742
- client.setQueryData(
4743
- [
4744
- ...MANAGED_CHANNEL_SUBSCRIBERS_QUERY_KEY(...keyParams),
4745
- ...GetBaseInfiniteQueryKeys(...baseKeys)
4746
- ],
4747
- setFirstPageData(response)
4748
- );
4749
- };
4750
- var GetManagedChannelSubscribers = async ({
4167
+ // src/queries/channels/managed/useGetManagedChannelInterests.ts
4168
+ var MANAGED_CHANNEL_INTERESTS_QUERY_KEY = (channelId) => [...MANAGED_CHANNEL_QUERY_KEY(channelId), "INTERESTS"];
4169
+ var GetManagedChannelInterests = async ({
4170
+ channelId,
4751
4171
  pageParam,
4752
4172
  pageSize,
4753
4173
  orderBy,
4754
4174
  search,
4755
- channelId,
4756
4175
  clientApiParams
4757
4176
  }) => {
4758
4177
  const clientApi = await GetClientAPI(clientApiParams);
4759
4178
  const { data } = await clientApi.get(
4760
- `/channels/managed/${channelId}/subscribers`,
4179
+ `/channels/managed/${channelId}/interests`,
4761
4180
  {
4762
4181
  params: {
4763
4182
  page: pageParam || void 0,
@@ -4769,10 +4188,10 @@ var GetManagedChannelSubscribers = async ({
4769
4188
  );
4770
4189
  return data;
4771
4190
  };
4772
- var useGetManagedChannelSubscribers = (channelId = "", params = {}, options = {}) => {
4191
+ var useGetManagedChannelInterests = (channelId, params = {}, options = {}) => {
4773
4192
  return useConnectedInfiniteQuery(
4774
- MANAGED_CHANNEL_SUBSCRIBERS_QUERY_KEY(channelId),
4775
- (params2) => GetManagedChannelSubscribers({ ...params2, channelId: channelId || "" }),
4193
+ MANAGED_CHANNEL_INTERESTS_QUERY_KEY(channelId),
4194
+ (params2) => GetManagedChannelInterests({ channelId, ...params2 }),
4776
4195
  params,
4777
4196
  {
4778
4197
  ...options,
@@ -4781,9 +4200,44 @@ var useGetManagedChannelSubscribers = (channelId = "", params = {}, options = {}
4781
4200
  );
4782
4201
  };
4783
4202
 
4784
- // src/queries/channels/managed/useGetManagedChannelInterests.ts
4785
- var MANAGED_CHANNEL_INTERESTS_QUERY_KEY = (channelId) => [...MANAGED_CHANNEL_QUERY_KEY(channelId), "INTERESTS"];
4786
- var GetManagedChannelInterests = async ({
4203
+ // src/queries/channels/useGetSubscribedChannels.ts
4204
+ var SUBSCRIBED_CHANNELS_QUERY_KEY = () => [
4205
+ ...CHANNELS_QUERY_KEY(),
4206
+ "SUBSCRIBED"
4207
+ ];
4208
+ var GetSubscribedChannels = async ({
4209
+ pageParam,
4210
+ pageSize,
4211
+ orderBy,
4212
+ search,
4213
+ clientApiParams
4214
+ }) => {
4215
+ const clientApi = await GetClientAPI(clientApiParams);
4216
+ const { data } = await clientApi.get(`/channels/subscribed`, {
4217
+ params: {
4218
+ page: pageParam || void 0,
4219
+ pageSize: pageSize || void 0,
4220
+ orderBy: orderBy || void 0,
4221
+ search: search || void 0
4222
+ }
4223
+ });
4224
+ return data;
4225
+ };
4226
+ var useGetSubscribedChannels = (params = {}, options = {}) => {
4227
+ return useConnectedInfiniteQuery(
4228
+ SUBSCRIBED_CHANNELS_QUERY_KEY(),
4229
+ (params2) => GetSubscribedChannels({ ...params2 }),
4230
+ params,
4231
+ options
4232
+ );
4233
+ };
4234
+
4235
+ // src/queries/channels/useGetChannelInterests.ts
4236
+ var CHANNEL_INTERESTS_QUERY_KEY = (channelId) => [
4237
+ ...CHANNEL_QUERY_KEY(channelId),
4238
+ "INTERESTS"
4239
+ ];
4240
+ var GetChannelInterests = async ({
4787
4241
  channelId,
4788
4242
  pageParam,
4789
4243
  pageSize,
@@ -4792,47 +4246,128 @@ var GetManagedChannelInterests = async ({
4792
4246
  clientApiParams
4793
4247
  }) => {
4794
4248
  const clientApi = await GetClientAPI(clientApiParams);
4795
- const { data } = await clientApi.get(
4796
- `/channels/managed/${channelId}/interests`,
4797
- {
4798
- params: {
4799
- page: pageParam || void 0,
4800
- pageSize: pageSize || void 0,
4801
- orderBy: orderBy || void 0,
4802
- search: search || void 0
4803
- }
4804
- }
4805
- );
4249
+ const { data } = await clientApi.get(`/channels/${channelId}/interests`, {
4250
+ params: {
4251
+ page: pageParam || void 0,
4252
+ pageSize: pageSize || void 0,
4253
+ orderBy: orderBy || void 0,
4254
+ search: search || void 0
4255
+ }
4256
+ });
4257
+ return data;
4258
+ };
4259
+ var useGetChannelInterests = (channelId, params = {}, options = {}) => {
4260
+ return useConnectedInfiniteQuery(
4261
+ CHANNEL_INTERESTS_QUERY_KEY(channelId),
4262
+ (params2) => GetChannelInterests({ channelId, ...params2 }),
4263
+ params,
4264
+ {
4265
+ ...options,
4266
+ enabled: !!channelId && (options?.enabled ?? true)
4267
+ }
4268
+ );
4269
+ };
4270
+
4271
+ // src/queries/contents/useGetContents.ts
4272
+ var CONTENTS_QUERY_KEY = (type, featured, interest, past) => {
4273
+ const key = ["CONTENTS"];
4274
+ if (type) key.push(type);
4275
+ if (featured) key.push("FEATURED");
4276
+ if (interest) key.push(interest);
4277
+ if (typeof past !== "undefined") key.push(past ? "PAST" : "UPCOMING");
4278
+ return key;
4279
+ };
4280
+ var SET_CONTENTS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
4281
+ client.setQueryData(
4282
+ [
4283
+ ...CONTENTS_QUERY_KEY(...keyParams),
4284
+ ...GetBaseInfiniteQueryKeys(...baseKeys)
4285
+ ],
4286
+ setFirstPageData(response)
4287
+ );
4288
+ };
4289
+ var GetContents = async ({
4290
+ type,
4291
+ featured,
4292
+ interest,
4293
+ past,
4294
+ pageParam,
4295
+ pageSize,
4296
+ orderBy,
4297
+ search,
4298
+ clientApiParams
4299
+ }) => {
4300
+ const clientApi = await GetClientAPI(clientApiParams);
4301
+ const { data } = await clientApi.get(`/contents`, {
4302
+ params: {
4303
+ type: type || void 0,
4304
+ featured: typeof featured !== "undefined" ? featured ? "true" : "false" : void 0,
4305
+ interest: interest || void 0,
4306
+ past,
4307
+ page: pageParam || void 0,
4308
+ pageSize: pageSize || void 0,
4309
+ orderBy: orderBy || void 0,
4310
+ search: search || void 0
4311
+ }
4312
+ });
4313
+ return data;
4314
+ };
4315
+ var useGetContents = (type, featured, interest, past, params = {}, options = {}) => {
4316
+ return useConnectedInfiniteQuery(
4317
+ CONTENTS_QUERY_KEY(type, featured, interest, past),
4318
+ (params2) => GetContents({ type, featured, interest, past, ...params2 }),
4319
+ params,
4320
+ options
4321
+ );
4322
+ };
4323
+
4324
+ // src/queries/contents/useGetContent.ts
4325
+ var CONTENT_QUERY_KEY = (contentId) => [
4326
+ ...CONTENTS_QUERY_KEY(),
4327
+ contentId
4328
+ ];
4329
+ var SET_CONTENT_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
4330
+ client.setQueryData(
4331
+ [
4332
+ ...CONTENT_QUERY_KEY(...keyParams),
4333
+ ...GetBaseSingleQueryKeys(...baseKeys)
4334
+ ],
4335
+ response
4336
+ );
4337
+ };
4338
+ var GetContent = async ({
4339
+ contentId,
4340
+ clientApiParams
4341
+ }) => {
4342
+ const clientApi = await GetClientAPI(clientApiParams);
4343
+ const { data } = await clientApi.get(`/contents/${contentId}`);
4806
4344
  return data;
4807
4345
  };
4808
- var useGetManagedChannelInterests = (channelId, params = {}, options = {}) => {
4809
- return useConnectedInfiniteQuery(
4810
- MANAGED_CHANNEL_INTERESTS_QUERY_KEY(channelId),
4811
- (params2) => GetManagedChannelInterests({ channelId, ...params2 }),
4812
- params,
4346
+ var useGetContent = (contentId = "", options = {}) => {
4347
+ return useConnectedSingleQuery_default(
4348
+ CONTENT_QUERY_KEY(contentId),
4349
+ (params) => GetContent({ contentId, ...params }),
4813
4350
  {
4814
4351
  ...options,
4815
- enabled: !!channelId && (options?.enabled ?? true)
4352
+ enabled: !!contentId && options.enabled
4816
4353
  }
4817
4354
  );
4818
4355
  };
4819
4356
 
4820
- // src/queries/channels/useGetSubscribedChannels.ts
4821
- var SUBSCRIBED_CHANNELS_QUERY_KEY = () => [
4822
- ...CHANNELS_QUERY_KEY(),
4823
- "SUBSCRIBED"
4824
- ];
4825
- var GetSubscribedChannels = async ({
4357
+ // src/queries/contents/useGetContentInterests.ts
4358
+ var CONTENT_INTERESTS_QUERY_KEY = () => {
4359
+ const key = ["CONTENTS_INTERESTS"];
4360
+ return key;
4361
+ };
4362
+ var GetContentInterests = async ({
4826
4363
  pageParam,
4827
4364
  pageSize,
4828
4365
  orderBy,
4829
4366
  search,
4830
- queryClient,
4831
- clientApiParams,
4832
- locale
4367
+ clientApiParams
4833
4368
  }) => {
4834
4369
  const clientApi = await GetClientAPI(clientApiParams);
4835
- const { data } = await clientApi.get(`/channels/subscribed`, {
4370
+ const { data } = await clientApi.get(`/contents/interests`, {
4836
4371
  params: {
4837
4372
  page: pageParam || void 0,
4838
4373
  pageSize: pageSize || void 0,
@@ -4840,32 +4375,27 @@ var GetSubscribedChannels = async ({
4840
4375
  search: search || void 0
4841
4376
  }
4842
4377
  });
4843
- if (queryClient && data.status === "ok") {
4844
- CacheIndividualQueries(
4845
- data,
4846
- queryClient,
4847
- (channelId) => CHANNEL_QUERY_KEY(channelId),
4848
- locale
4849
- );
4850
- }
4851
4378
  return data;
4852
4379
  };
4853
- var useGetSubscribedChannels = (params = {}, options = {}) => {
4380
+ var useGetContentInterests = (params = {}, options = {}) => {
4854
4381
  return useConnectedInfiniteQuery(
4855
- SUBSCRIBED_CHANNELS_QUERY_KEY(),
4856
- (params2) => GetSubscribedChannels({ ...params2 }),
4382
+ CONTENT_INTERESTS_QUERY_KEY(),
4383
+ (params2) => GetContentInterests({ ...params2 }),
4857
4384
  params,
4858
4385
  options
4859
4386
  );
4860
4387
  };
4861
4388
 
4862
- // src/queries/channels/useGetChannelInterests.ts
4863
- var CHANNEL_INTERESTS_QUERY_KEY = (channelId) => [
4864
- ...CHANNEL_QUERY_KEY(channelId),
4865
- "INTERESTS"
4866
- ];
4867
- var GetChannelInterests = async ({
4868
- channelId,
4389
+ // src/queries/contents/useGetSubscribedContents.ts
4390
+ var SUBSCRIBED_CONTENTS_QUERY_KEY = (type, interest) => {
4391
+ const key = ["SUBSCRIBED_CONTENTS"];
4392
+ if (type) key.push(type);
4393
+ if (interest) key.push(interest);
4394
+ return key;
4395
+ };
4396
+ var GetSubscribedContents = async ({
4397
+ type,
4398
+ interest,
4869
4399
  pageParam,
4870
4400
  pageSize,
4871
4401
  orderBy,
@@ -4873,8 +4403,10 @@ var GetChannelInterests = async ({
4873
4403
  clientApiParams
4874
4404
  }) => {
4875
4405
  const clientApi = await GetClientAPI(clientApiParams);
4876
- const { data } = await clientApi.get(`/channels/${channelId}/interests`, {
4406
+ const { data } = await clientApi.get(`/contents/subscribed`, {
4877
4407
  params: {
4408
+ type: type || void 0,
4409
+ interest: interest || void 0,
4878
4410
  page: pageParam || void 0,
4879
4411
  pageSize: pageSize || void 0,
4880
4412
  orderBy: orderBy || void 0,
@@ -4883,15 +4415,12 @@ var GetChannelInterests = async ({
4883
4415
  });
4884
4416
  return data;
4885
4417
  };
4886
- var useGetChannelInterests = (channelId, params = {}, options = {}) => {
4418
+ var useGetSubscribedContents = (type, interest, params = {}, options = {}) => {
4887
4419
  return useConnectedInfiniteQuery(
4888
- CHANNEL_INTERESTS_QUERY_KEY(channelId),
4889
- (params2) => GetChannelInterests({ channelId, ...params2 }),
4420
+ SUBSCRIBED_CONTENTS_QUERY_KEY(interest),
4421
+ (params2) => GetSubscribedContents({ interest, ...params2 }),
4890
4422
  params,
4891
- {
4892
- ...options,
4893
- enabled: !!channelId && (options?.enabled ?? true)
4894
- }
4423
+ options
4895
4424
  );
4896
4425
  };
4897
4426
 
@@ -5051,9 +4580,7 @@ var GetSelfAddresses = async ({
5051
4580
  pageSize,
5052
4581
  orderBy,
5053
4582
  search,
5054
- queryClient,
5055
- clientApiParams,
5056
- locale
4583
+ clientApiParams
5057
4584
  }) => {
5058
4585
  const clientApi = await GetClientAPI(clientApiParams);
5059
4586
  const { data } = await clientApi.get(`/self/addresses`, {
@@ -5064,14 +4591,6 @@ var GetSelfAddresses = async ({
5064
4591
  search: search || void 0
5065
4592
  }
5066
4593
  });
5067
- if (queryClient && data.status === "ok") {
5068
- CacheIndividualQueries(
5069
- data,
5070
- queryClient,
5071
- (activityId) => SELF_ADDRESS_QUERY_KEY(activityId),
5072
- locale
5073
- );
5074
- }
5075
4594
  return data;
5076
4595
  };
5077
4596
  var useGetSelfAddresses = (params = {}, options = {}) => {
@@ -5126,9 +4645,7 @@ var GetSelfLeads = async ({
5126
4645
  pageSize,
5127
4646
  orderBy,
5128
4647
  search,
5129
- queryClient,
5130
- clientApiParams,
5131
- locale
4648
+ clientApiParams
5132
4649
  }) => {
5133
4650
  const clientApi = await GetClientAPI(clientApiParams);
5134
4651
  const { data } = await clientApi.get(`/self/leads`, {
@@ -5140,14 +4657,6 @@ var GetSelfLeads = async ({
5140
4657
  search: search || void 0
5141
4658
  }
5142
4659
  });
5143
- if (queryClient && data.status === "ok") {
5144
- CacheIndividualQueries(
5145
- data,
5146
- queryClient,
5147
- (activityId) => SELF_LEAD_QUERY_KEY(activityId),
5148
- locale
5149
- );
5150
- }
5151
4660
  return data;
5152
4661
  };
5153
4662
  var useGetSelfLeads = (status, params = {}, options = {}) => {
@@ -5231,9 +4740,7 @@ var GetSelfChatChannels = async ({
5231
4740
  pageSize,
5232
4741
  orderBy,
5233
4742
  search,
5234
- queryClient,
5235
- clientApiParams,
5236
- locale
4743
+ clientApiParams
5237
4744
  }) => {
5238
4745
  const clientApi = await GetClientAPI(clientApiParams);
5239
4746
  const { data } = await clientApi.get(`/self/chat/channels`, {
@@ -5244,20 +4751,6 @@ var GetSelfChatChannels = async ({
5244
4751
  search: search || void 0
5245
4752
  }
5246
4753
  });
5247
- if (queryClient && data.status === "ok") {
5248
- CacheIndividualQueries(
5249
- data,
5250
- queryClient,
5251
- (channelId) => SELF_CHAT_CHANNEL_QUERY_KEY(channelId),
5252
- locale,
5253
- (member) => {
5254
- return {
5255
- ...member,
5256
- id: member.channelId.toString()
5257
- };
5258
- }
5259
- );
5260
- }
5261
4754
  return data;
5262
4755
  };
5263
4756
  var useGetSelfChatChannels = (params = {}, options = {}) => {
@@ -5891,9 +5384,7 @@ var GetSelfSubscriptions = async ({
5891
5384
  pageSize,
5892
5385
  orderBy,
5893
5386
  search,
5894
- queryClient,
5895
- clientApiParams,
5896
- locale
5387
+ clientApiParams
5897
5388
  }) => {
5898
5389
  const clientApi = await GetClientAPI(clientApiParams);
5899
5390
  const { data } = await clientApi.get(`/self/subscriptions`, {
@@ -5905,14 +5396,6 @@ var GetSelfSubscriptions = async ({
5905
5396
  status: status || void 0
5906
5397
  }
5907
5398
  });
5908
- if (queryClient) {
5909
- CacheIndividualQueries(
5910
- data,
5911
- queryClient,
5912
- (subscriptionId) => SELF_SUBSCRIPTION_QUERY_KEY(subscriptionId),
5913
- locale
5914
- );
5915
- }
5916
5399
  return data;
5917
5400
  };
5918
5401
  var useGetSelfSubscriptions = (status, params = {}, options = {}) => {
@@ -6658,9 +6141,7 @@ var GetSelfActivities = async ({
6658
6141
  pageSize,
6659
6142
  orderBy,
6660
6143
  search,
6661
- queryClient,
6662
- clientApiParams,
6663
- locale
6144
+ clientApiParams
6664
6145
  }) => {
6665
6146
  const clientApi = await GetClientAPI(clientApiParams);
6666
6147
  const { data } = await clientApi.get(`/self/activities`, {
@@ -6671,14 +6152,6 @@ var GetSelfActivities = async ({
6671
6152
  search: search || void 0
6672
6153
  }
6673
6154
  });
6674
- if (queryClient && data.status === "ok") {
6675
- CacheIndividualQueries(
6676
- data,
6677
- queryClient,
6678
- (activityId) => ACTIVITY_QUERY_KEY(activityId),
6679
- locale
6680
- );
6681
- }
6682
6155
  return data;
6683
6156
  };
6684
6157
  var useGetSelfActivities = (params = {}, options = {}) => {
@@ -6799,9 +6272,7 @@ var GetSelfDelegateOf = async ({
6799
6272
  pageSize,
6800
6273
  orderBy,
6801
6274
  search,
6802
- queryClient,
6803
- clientApiParams,
6804
- locale
6275
+ clientApiParams
6805
6276
  }) => {
6806
6277
  const clientApi = await GetClientAPI(clientApiParams);
6807
6278
  const { data } = await clientApi.get(`/self/delegateof`, {
@@ -6812,14 +6283,6 @@ var GetSelfDelegateOf = async ({
6812
6283
  search: search || void 0
6813
6284
  }
6814
6285
  });
6815
- if (queryClient && data.status === "ok") {
6816
- CacheIndividualQueries(
6817
- data,
6818
- queryClient,
6819
- (accountId) => ACCOUNT_QUERY_KEY(accountId),
6820
- locale
6821
- );
6822
- }
6823
6286
  return data;
6824
6287
  };
6825
6288
  var useGetSelfDelegateOf = (params = {}, options = {}) => {
@@ -6845,9 +6308,7 @@ var GetSelfDelegates = async ({
6845
6308
  pageSize,
6846
6309
  orderBy,
6847
6310
  search,
6848
- queryClient,
6849
- clientApiParams,
6850
- locale
6311
+ clientApiParams
6851
6312
  }) => {
6852
6313
  const clientApi = await GetClientAPI(clientApiParams);
6853
6314
  const { data } = await clientApi.get(`/self/delegates`, {
@@ -6858,14 +6319,6 @@ var GetSelfDelegates = async ({
6858
6319
  search: search || void 0
6859
6320
  }
6860
6321
  });
6861
- if (queryClient && data.status === "ok") {
6862
- CacheIndividualQueries(
6863
- data,
6864
- queryClient,
6865
- (accountId) => ACCOUNT_QUERY_KEY(accountId),
6866
- locale
6867
- );
6868
- }
6869
6322
  return data;
6870
6323
  };
6871
6324
  var useGetSelfDelegates = (params = {}, options = {}) => {
@@ -6893,9 +6346,7 @@ var GetSelfEvents = async ({
6893
6346
  orderBy,
6894
6347
  search,
6895
6348
  past,
6896
- queryClient,
6897
- clientApiParams,
6898
- locale
6349
+ clientApiParams
6899
6350
  }) => {
6900
6351
  const clientApi = await GetClientAPI(clientApiParams);
6901
6352
  const { data } = await clientApi.get(`/self/events`, {
@@ -6907,14 +6358,6 @@ var GetSelfEvents = async ({
6907
6358
  past: past || false
6908
6359
  }
6909
6360
  });
6910
- if (queryClient && data.status === "ok") {
6911
- CacheIndividualQueries(
6912
- data,
6913
- queryClient,
6914
- (eventId) => EVENT_QUERY_KEY(eventId),
6915
- locale
6916
- );
6917
- }
6918
6361
  return data;
6919
6362
  };
6920
6363
  var useGetSelfEvents = (past = false, params = {}, options = {}) => {
@@ -6942,9 +6385,7 @@ var GetSelfEventSessions = async ({
6942
6385
  pageSize,
6943
6386
  orderBy,
6944
6387
  search,
6945
- queryClient,
6946
- clientApiParams,
6947
- locale
6388
+ clientApiParams
6948
6389
  }) => {
6949
6390
  const clientApi = await GetClientAPI(clientApiParams);
6950
6391
  const { data } = await clientApi.get(`/self/events/${eventId}/sessions`, {
@@ -6956,14 +6397,6 @@ var GetSelfEventSessions = async ({
6956
6397
  search: search || void 0
6957
6398
  }
6958
6399
  });
6959
- if (queryClient && data.status === "ok") {
6960
- CacheIndividualQueries(
6961
- data,
6962
- queryClient,
6963
- (sessionId) => EVENT_SESSION_QUERY_KEY(eventId, sessionId),
6964
- locale
6965
- );
6966
- }
6967
6400
  return data;
6968
6401
  };
6969
6402
  var useGetSelfEventSessions = (eventId, params = {}, options = {}) => {
@@ -6989,9 +6422,7 @@ var GetSelfFeed = async ({
6989
6422
  pageSize,
6990
6423
  orderBy,
6991
6424
  search,
6992
- queryClient,
6993
- clientApiParams,
6994
- locale
6425
+ clientApiParams
6995
6426
  }) => {
6996
6427
  const clientApi = await GetClientAPI(clientApiParams);
6997
6428
  const { data } = await clientApi.get(`/self/activities/feed`, {
@@ -7002,14 +6433,6 @@ var GetSelfFeed = async ({
7002
6433
  search: search || void 0
7003
6434
  }
7004
6435
  });
7005
- if (queryClient && data.status === "ok") {
7006
- CacheIndividualQueries(
7007
- data,
7008
- queryClient,
7009
- (activityId) => ACTIVITY_QUERY_KEY(activityId),
7010
- locale
7011
- );
7012
- }
7013
6436
  return data;
7014
6437
  };
7015
6438
  var useGetSelfFeed = (params = {}, options = {}) => {
@@ -7171,9 +6594,7 @@ var GetSelfPushDevices = async ({
7171
6594
  pageSize,
7172
6595
  orderBy,
7173
6596
  search,
7174
- queryClient,
7175
- clientApiParams,
7176
- locale
6597
+ clientApiParams
7177
6598
  }) => {
7178
6599
  const clientApi = await GetClientAPI(clientApiParams);
7179
6600
  const { data } = await clientApi.get(`/self/push-devices`, {
@@ -7184,14 +6605,6 @@ var GetSelfPushDevices = async ({
7184
6605
  search: search || void 0
7185
6606
  }
7186
6607
  });
7187
- if (queryClient && data.status === "ok") {
7188
- CacheIndividualQueries(
7189
- data,
7190
- queryClient,
7191
- (pushDeviceId) => SELF_PUSH_DEVICE_QUERY_KEY(pushDeviceId),
7192
- locale
7193
- );
7194
- }
7195
6608
  return data;
7196
6609
  };
7197
6610
  var useGetSelfPushDevices = (params = {}, options = {}) => {
@@ -7293,9 +6706,7 @@ var GetSeriesList = async ({
7293
6706
  pageSize,
7294
6707
  orderBy,
7295
6708
  search,
7296
- queryClient,
7297
- clientApiParams,
7298
- locale
6709
+ clientApiParams
7299
6710
  }) => {
7300
6711
  const clientApi = await GetClientAPI(clientApiParams);
7301
6712
  const { data } = await clientApi.get(`/series`, {
@@ -7306,14 +6717,6 @@ var GetSeriesList = async ({
7306
6717
  search: search || void 0
7307
6718
  }
7308
6719
  });
7309
- if (queryClient && data.status === "ok") {
7310
- CacheIndividualQueries(
7311
- data,
7312
- queryClient,
7313
- (seriesId) => SERIES_QUERY_KEY(seriesId),
7314
- locale
7315
- );
7316
- }
7317
6720
  return data;
7318
6721
  };
7319
6722
  var useGetSeriesList = (params = {}, options = {}) => {
@@ -7379,9 +6782,7 @@ var GetSeriesEvents = async ({
7379
6782
  orderBy,
7380
6783
  search,
7381
6784
  past,
7382
- queryClient,
7383
- clientApiParams,
7384
- locale
6785
+ clientApiParams
7385
6786
  }) => {
7386
6787
  const clientApi = await GetClientAPI(clientApiParams);
7387
6788
  const { data } = await clientApi.get(`/series/${seriesId}/events`, {
@@ -7393,14 +6794,6 @@ var GetSeriesEvents = async ({
7393
6794
  past: past !== void 0 ? past : void 0
7394
6795
  }
7395
6796
  });
7396
- if (queryClient && data.status === "ok") {
7397
- CacheIndividualQueries(
7398
- data,
7399
- queryClient,
7400
- (eventId) => EVENT_QUERY_KEY(eventId),
7401
- locale
7402
- );
7403
- }
7404
6797
  return data;
7405
6798
  };
7406
6799
  var useGetSeriesEvents = (seriesId = "", past, params = {}, options = {}) => {
@@ -7431,9 +6824,7 @@ var GetLevels = async ({
7431
6824
  pageSize,
7432
6825
  orderBy,
7433
6826
  search,
7434
- queryClient,
7435
- clientApiParams,
7436
- locale
6827
+ clientApiParams
7437
6828
  }) => {
7438
6829
  const clientApi = await GetClientAPI(clientApiParams);
7439
6830
  const { data } = await clientApi.get(`/levels`, {
@@ -7444,14 +6835,6 @@ var GetLevels = async ({
7444
6835
  search: search || void 0
7445
6836
  }
7446
6837
  });
7447
- if (queryClient && data.status === "ok") {
7448
- CacheIndividualQueries(
7449
- data,
7450
- queryClient,
7451
- (levelId) => LEVEL_QUERY_KEY(levelId),
7452
- locale
7453
- );
7454
- }
7455
6838
  return data;
7456
6839
  };
7457
6840
  var useGetLevels = (params = {}, options = {}) => {
@@ -7513,9 +6896,7 @@ var GetLevelSponsors = async ({
7513
6896
  pageSize,
7514
6897
  orderBy,
7515
6898
  search,
7516
- queryClient,
7517
- clientApiParams,
7518
- locale
6899
+ clientApiParams
7519
6900
  }) => {
7520
6901
  const clientApi = await GetClientAPI(clientApiParams);
7521
6902
  const { data } = await clientApi.get(`/levels/${levelId}/accounts`, {
@@ -7526,14 +6907,6 @@ var GetLevelSponsors = async ({
7526
6907
  search: search || void 0
7527
6908
  }
7528
6909
  });
7529
- if (queryClient && data.status === "ok") {
7530
- CacheIndividualQueries(
7531
- data,
7532
- queryClient,
7533
- (sponsorId) => ACCOUNT_QUERY_KEY(sponsorId),
7534
- locale
7535
- );
7536
- }
7537
6910
  return data;
7538
6911
  };
7539
6912
  var useGetLevelSponsors = (levelId = "", params = {}, options = {}) => {
@@ -7623,9 +6996,7 @@ var GetSelfEventListings = async ({
7623
6996
  orderBy,
7624
6997
  search,
7625
6998
  past,
7626
- queryClient,
7627
- clientApiParams,
7628
- locale
6999
+ clientApiParams
7629
7000
  }) => {
7630
7001
  const clientApi = await GetClientAPI(clientApiParams);
7631
7002
  const { data } = await clientApi.get(`/listings`, {
@@ -7637,14 +7008,6 @@ var GetSelfEventListings = async ({
7637
7008
  past: typeof past == "boolean" ? past : void 0
7638
7009
  }
7639
7010
  });
7640
- if (queryClient && data.status === "ok") {
7641
- CacheIndividualQueries(
7642
- data,
7643
- queryClient,
7644
- (eventId) => LISTING_QUERY_KEY(eventId),
7645
- locale
7646
- );
7647
- }
7648
7011
  return data;
7649
7012
  };
7650
7013
  var useGetSelfEventListings = (past = false, params = {}, options = {}) => {
@@ -8145,14 +7508,12 @@ var INTEREST_ACTIVITIES_QUERY_KEY = (interest) => [
8145
7508
  ...INTEREST_QUERY_KEY(interest)
8146
7509
  ];
8147
7510
  var GetInterestActivities = async ({
7511
+ interest,
8148
7512
  pageParam,
8149
7513
  pageSize,
8150
7514
  orderBy,
8151
7515
  search,
8152
- interest,
8153
- queryClient,
8154
- clientApiParams,
8155
- locale
7516
+ clientApiParams
8156
7517
  }) => {
8157
7518
  const clientApi = await GetClientAPI(clientApiParams);
8158
7519
  const { data } = await clientApi.get(`/interests/${interest}/activities`, {
@@ -8163,14 +7524,6 @@ var GetInterestActivities = async ({
8163
7524
  search: search || void 0
8164
7525
  }
8165
7526
  });
8166
- if (queryClient && data.status === "ok") {
8167
- CacheIndividualQueries(
8168
- data,
8169
- queryClient,
8170
- (activityId) => ACTIVITY_QUERY_KEY(activityId),
8171
- locale
8172
- );
8173
- }
8174
7527
  return data;
8175
7528
  };
8176
7529
  var useGetInterestActivities = (interest = "", params = {}, options = {}) => {
@@ -8479,9 +7832,7 @@ var GetIntegrations = async ({
8479
7832
  pageSize,
8480
7833
  orderBy,
8481
7834
  search,
8482
- queryClient,
8483
- clientApiParams,
8484
- locale
7835
+ clientApiParams
8485
7836
  }) => {
8486
7837
  const clientApi = await GetClientAPI(clientApiParams);
8487
7838
  const { data } = await clientApi.get(`/integrations`, {
@@ -8492,14 +7843,6 @@ var GetIntegrations = async ({
8492
7843
  search: search || void 0
8493
7844
  }
8494
7845
  });
8495
- if (queryClient && data.status === "ok") {
8496
- CacheIndividualQueries(
8497
- data,
8498
- queryClient,
8499
- (integrationId) => INTEGRATION_QUERY_KEY(integrationId),
8500
- locale
8501
- );
8502
- }
8503
7846
  return data;
8504
7847
  };
8505
7848
  var useGetIntegrations = (params = {}, options = {}) => {
@@ -12940,7 +12283,6 @@ export {
12940
12283
  CONTENT_INTERESTS_QUERY_KEY,
12941
12284
  CONTENT_QUERY_KEY,
12942
12285
  CUSTOM_ERROR_CODES,
12943
- CacheIndividualQueries,
12944
12286
  CancelBooking,
12945
12287
  CancelGroupInvitation,
12946
12288
  CancelGroupRequest,