@connectedxm/client 2.4.1 → 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
@@ -89,7 +89,6 @@ __export(index_exports, {
89
89
  CONTENT_INTERESTS_QUERY_KEY: () => CONTENT_INTERESTS_QUERY_KEY,
90
90
  CONTENT_QUERY_KEY: () => CONTENT_QUERY_KEY,
91
91
  CUSTOM_ERROR_CODES: () => CUSTOM_ERROR_CODES,
92
- CacheIndividualQueries: () => CacheIndividualQueries,
93
92
  CancelBooking: () => CancelBooking,
94
93
  CancelGroupInvitation: () => CancelGroupInvitation,
95
94
  CancelGroupRequest: () => CancelGroupRequest,
@@ -1693,6 +1692,12 @@ function MergeInfinitePages(data) {
1693
1692
  );
1694
1693
  }
1695
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
+
1696
1701
  // src/queries/useConnectedSingleQuery.ts
1697
1702
  var import_react_query2 = require("@tanstack/react-query");
1698
1703
  var GetBaseSingleQueryKeys = (locale) => {
@@ -1743,81 +1748,6 @@ var useConnectedSingleQuery = (queryKeys, queryFn, options = {}) => {
1743
1748
  };
1744
1749
  var useConnectedSingleQuery_default = useConnectedSingleQuery;
1745
1750
 
1746
- // src/utilities/CacheIndividualQueries.ts
1747
- var CacheIndividualQueries = (page, queryClient, queryKeyFn, locale = "en", itemMap) => {
1748
- page.data.forEach((item) => {
1749
- item = itemMap ? itemMap(item) : item;
1750
- if (item.id) {
1751
- const SudoResponse = {
1752
- status: page.status,
1753
- message: `Cached From: ${page.message}`,
1754
- data: item
1755
- };
1756
- queryClient.setQueryData(
1757
- [...queryKeyFn(item.id), ...GetBaseSingleQueryKeys(locale)],
1758
- SudoResponse,
1759
- {
1760
- updatedAt: Date.now() - 1e3 * 60
1761
- }
1762
- );
1763
- if (item.slug) {
1764
- queryClient.setQueryData(
1765
- [...queryKeyFn(item.slug), ...GetBaseSingleQueryKeys(locale)],
1766
- SudoResponse,
1767
- {
1768
- updatedAt: Date.now() - 1e3 * 60
1769
- }
1770
- );
1771
- }
1772
- if (item.username) {
1773
- queryClient.setQueryData(
1774
- [...queryKeyFn(item.username), ...GetBaseSingleQueryKeys(locale)],
1775
- SudoResponse,
1776
- {
1777
- updatedAt: Date.now() - 1e3 * 60
1778
- }
1779
- );
1780
- }
1781
- if (item.code) {
1782
- queryClient.setQueryData(
1783
- [...queryKeyFn(item.code), ...GetBaseSingleQueryKeys(locale)],
1784
- SudoResponse,
1785
- {
1786
- updatedAt: Date.now() - 1e3 * 60
1787
- }
1788
- );
1789
- }
1790
- if (item.name) {
1791
- queryClient.setQueryData(
1792
- [...queryKeyFn(item.name), ...GetBaseSingleQueryKeys(locale)],
1793
- SudoResponse,
1794
- {
1795
- updatedAt: Date.now() - 1e3 * 60
1796
- }
1797
- );
1798
- }
1799
- if (item.alternateId) {
1800
- queryClient.setQueryData(
1801
- [
1802
- ...queryKeyFn(item.alternateId.toString()),
1803
- ...GetBaseSingleQueryKeys(locale)
1804
- ],
1805
- SudoResponse,
1806
- {
1807
- updatedAt: Date.now() - 1e3 * 60
1808
- }
1809
- );
1810
- }
1811
- }
1812
- });
1813
- };
1814
-
1815
- // src/utilities/IsUUID.ts
1816
- var isUUID = (id) => {
1817
- 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}$/;
1818
- return uuidRegex.test(id);
1819
- };
1820
-
1821
1751
  // src/queries/useConnectedInfiniteQuery.ts
1822
1752
  var import_react_query3 = require("@tanstack/react-query");
1823
1753
  var GetBaseInfiniteQueryKeys = (locale, search = "") => {
@@ -1925,9 +1855,7 @@ var GetAccounts = async ({
1925
1855
  orderBy,
1926
1856
  search,
1927
1857
  accountType,
1928
- queryClient,
1929
- clientApiParams,
1930
- locale
1858
+ clientApiParams
1931
1859
  }) => {
1932
1860
  const clientApi = await GetClientAPI(clientApiParams);
1933
1861
  const { data } = await clientApi.get(`/accounts`, {
@@ -1939,14 +1867,6 @@ var GetAccounts = async ({
1939
1867
  search: search || void 0
1940
1868
  }
1941
1869
  });
1942
- if (queryClient && data.status === "ok") {
1943
- CacheIndividualQueries(
1944
- data,
1945
- queryClient,
1946
- (accountId) => ACCOUNT_QUERY_KEY(accountId),
1947
- locale
1948
- );
1949
- }
1950
1870
  return data;
1951
1871
  };
1952
1872
  var useGetAccounts = (accountType, params = {}, options = {}) => {
@@ -2042,9 +1962,7 @@ var GetActivities = async ({
2042
1962
  pageSize,
2043
1963
  orderBy,
2044
1964
  search,
2045
- queryClient,
2046
- clientApiParams,
2047
- locale
1965
+ clientApiParams
2048
1966
  }) => {
2049
1967
  const clientApi = await GetClientAPI(clientApiParams);
2050
1968
  const { data } = await clientApi.get(`/activities`, {
@@ -2055,14 +1973,6 @@ var GetActivities = async ({
2055
1973
  search: search || void 0
2056
1974
  }
2057
1975
  });
2058
- if (queryClient && data.status === "ok") {
2059
- CacheIndividualQueries(
2060
- data,
2061
- queryClient,
2062
- (activityId) => ACTIVITY_QUERY_KEY(activityId),
2063
- locale
2064
- );
2065
- }
2066
1976
  return data;
2067
1977
  };
2068
1978
  var useGetActivities = (params = {}, options = {}) => {
@@ -2129,9 +2039,7 @@ var GetActivityComments = async ({
2129
2039
  pageSize,
2130
2040
  orderBy,
2131
2041
  search,
2132
- queryClient,
2133
- clientApiParams,
2134
- locale
2042
+ clientApiParams
2135
2043
  }) => {
2136
2044
  const clientApi = await GetClientAPI(clientApiParams);
2137
2045
  const { data } = await clientApi.get(`/activities/${activityId}/comments`, {
@@ -2142,14 +2050,6 @@ var GetActivityComments = async ({
2142
2050
  search: search || void 0
2143
2051
  }
2144
2052
  });
2145
- if (queryClient && data.status === "ok") {
2146
- CacheIndividualQueries(
2147
- data,
2148
- queryClient,
2149
- (activityId2) => ACTIVITY_QUERY_KEY(activityId2),
2150
- locale
2151
- );
2152
- }
2153
2053
  return data;
2154
2054
  };
2155
2055
  var useGetActivityComments = (activityId = "", params = {}, options = {}) => {
@@ -2183,9 +2083,7 @@ var GetAccountActivities = async ({
2183
2083
  orderBy,
2184
2084
  search,
2185
2085
  accountId,
2186
- queryClient,
2187
- clientApiParams,
2188
- locale
2086
+ clientApiParams
2189
2087
  }) => {
2190
2088
  const clientApi = await GetClientAPI(clientApiParams);
2191
2089
  const { data } = await clientApi.get(`/accounts/${accountId}/activities`, {
@@ -2196,14 +2094,6 @@ var GetAccountActivities = async ({
2196
2094
  search: search || void 0
2197
2095
  }
2198
2096
  });
2199
- if (queryClient && data.status === "ok") {
2200
- CacheIndividualQueries(
2201
- data,
2202
- queryClient,
2203
- (activityId) => ACTIVITY_QUERY_KEY(activityId),
2204
- locale
2205
- );
2206
- }
2207
2097
  return data;
2208
2098
  };
2209
2099
  var useGetAccountActivities = (accountId = "", params = {}, options = {}) => {
@@ -2249,91 +2139,6 @@ var useGetAccountByShareCode = (shareCode = "", options = {}) => {
2249
2139
  );
2250
2140
  };
2251
2141
 
2252
- // src/queries/groups/useGetGroups.ts
2253
- var GROUPS_QUERY_KEY = (access) => {
2254
- const keys = ["GROUPS"];
2255
- if (access) keys.push(access);
2256
- return keys;
2257
- };
2258
- var SET_GROUPS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
2259
- client.setQueryData(
2260
- [
2261
- ...GROUPS_QUERY_KEY(...keyParams),
2262
- ...GetBaseInfiniteQueryKeys(...baseKeys)
2263
- ],
2264
- setFirstPageData(response)
2265
- );
2266
- };
2267
- var GetGroups = async ({
2268
- pageParam,
2269
- pageSize,
2270
- orderBy,
2271
- search,
2272
- access,
2273
- queryClient,
2274
- clientApiParams,
2275
- locale
2276
- }) => {
2277
- const clientApi = await GetClientAPI(clientApiParams);
2278
- const { data } = await clientApi.get(`/groups`, {
2279
- params: {
2280
- page: pageParam || void 0,
2281
- pageSize: pageSize || void 0,
2282
- orderBy: orderBy || void 0,
2283
- search: search || void 0,
2284
- access: access || void 0
2285
- }
2286
- });
2287
- if (queryClient && data.status === "ok") {
2288
- CacheIndividualQueries(
2289
- data,
2290
- queryClient,
2291
- (groupId) => GROUP_QUERY_KEY(groupId),
2292
- locale
2293
- );
2294
- }
2295
- return data;
2296
- };
2297
- var useGetGroups = (access, params = {}, options = {}) => {
2298
- return useConnectedInfiniteQuery(
2299
- GROUPS_QUERY_KEY(access),
2300
- (params2) => GetGroups({ access, ...params2 }),
2301
- params,
2302
- options
2303
- );
2304
- };
2305
-
2306
- // src/queries/groups/useGetGroup.ts
2307
- var GROUP_QUERY_KEY = (groupId) => [
2308
- ...GROUPS_QUERY_KEY(),
2309
- groupId
2310
- ];
2311
- var SET_GROUP_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"], options) => {
2312
- client.setQueryData(
2313
- [...GROUP_QUERY_KEY(...keyParams), ...GetBaseSingleQueryKeys(...baseKeys)],
2314
- response,
2315
- options
2316
- );
2317
- };
2318
- var GetGroup = async ({
2319
- groupId,
2320
- clientApiParams
2321
- }) => {
2322
- const clientApi = await GetClientAPI(clientApiParams);
2323
- const { data } = await clientApi.get(`/groups/${groupId}`);
2324
- return data;
2325
- };
2326
- var useGetGroup = (groupId = "", options = {}) => {
2327
- return useConnectedSingleQuery(
2328
- GROUP_QUERY_KEY(groupId),
2329
- (params) => GetGroup({ groupId, ...params }),
2330
- {
2331
- ...options,
2332
- enabled: !!groupId && (options?.enabled ?? true)
2333
- }
2334
- );
2335
- };
2336
-
2337
2142
  // src/queries/accounts/useGetAccountGroups.ts
2338
2143
  var ACCOUNT_GROUPS_QUERY_KEY = (accountId) => [
2339
2144
  ...ACCOUNT_QUERY_KEY(accountId),
@@ -2354,9 +2159,7 @@ var GetAccountGroups = async ({
2354
2159
  orderBy,
2355
2160
  search,
2356
2161
  accountId,
2357
- queryClient,
2358
- clientApiParams,
2359
- locale
2162
+ clientApiParams
2360
2163
  }) => {
2361
2164
  const clientApi = await GetClientAPI(clientApiParams);
2362
2165
  const { data } = await clientApi.get(`/accounts/${accountId}/groups`, {
@@ -2367,14 +2170,6 @@ var GetAccountGroups = async ({
2367
2170
  search: search || void 0
2368
2171
  }
2369
2172
  });
2370
- if (queryClient && data.status === "ok") {
2371
- CacheIndividualQueries(
2372
- data,
2373
- queryClient,
2374
- (groupId) => GROUP_QUERY_KEY(groupId),
2375
- locale
2376
- );
2377
- }
2378
2173
  return data;
2379
2174
  };
2380
2175
  var useGetAccountGroups = (accountId = "", params = {}, options = {}) => {
@@ -2409,9 +2204,7 @@ var GetAccountFollowers = async ({
2409
2204
  orderBy,
2410
2205
  search,
2411
2206
  accountId,
2412
- queryClient,
2413
- clientApiParams,
2414
- locale
2207
+ clientApiParams
2415
2208
  }) => {
2416
2209
  const clientApi = await GetClientAPI(clientApiParams);
2417
2210
  const { data } = await clientApi.get(`/accounts/${accountId}/followers`, {
@@ -2422,14 +2215,6 @@ var GetAccountFollowers = async ({
2422
2215
  search: search || void 0
2423
2216
  }
2424
2217
  });
2425
- if (queryClient && data.status === "ok") {
2426
- CacheIndividualQueries(
2427
- data,
2428
- queryClient,
2429
- (accountId2) => ACCOUNT_QUERY_KEY(accountId2),
2430
- locale
2431
- );
2432
- }
2433
2218
  return data;
2434
2219
  };
2435
2220
  var useGetAccountFollowers = (accountId = "", params = {}, options = {}) => {
@@ -2464,9 +2249,7 @@ var GetAccountFollowings = async ({
2464
2249
  orderBy,
2465
2250
  search,
2466
2251
  accountId,
2467
- queryClient,
2468
- clientApiParams,
2469
- locale
2252
+ clientApiParams
2470
2253
  }) => {
2471
2254
  const clientApi = await GetClientAPI(clientApiParams);
2472
2255
  const { data } = await clientApi.get(`/accounts/${accountId}/following`, {
@@ -2477,14 +2260,6 @@ var GetAccountFollowings = async ({
2477
2260
  search: search || void 0
2478
2261
  }
2479
2262
  });
2480
- if (queryClient && data.status === "ok") {
2481
- CacheIndividualQueries(
2482
- data,
2483
- queryClient,
2484
- (accountId2) => ACCOUNT_QUERY_KEY(accountId2),
2485
- locale
2486
- );
2487
- }
2488
2263
  return data;
2489
2264
  };
2490
2265
  var useGetAccountFollowings = (accountId = "", params = {}, options = {}) => {
@@ -2519,9 +2294,7 @@ var GetAccountsPopular = async ({
2519
2294
  orderBy,
2520
2295
  search,
2521
2296
  accountType,
2522
- queryClient,
2523
- clientApiParams,
2524
- locale
2297
+ clientApiParams
2525
2298
  }) => {
2526
2299
  const clientApi = await GetClientAPI(clientApiParams);
2527
2300
  const { data } = await clientApi.get(`/accounts/popular`, {
@@ -2533,14 +2306,6 @@ var GetAccountsPopular = async ({
2533
2306
  search: search || void 0
2534
2307
  }
2535
2308
  });
2536
- if (queryClient && data.status === "ok") {
2537
- CacheIndividualQueries(
2538
- data,
2539
- queryClient,
2540
- (accountId) => ACCOUNT_QUERY_KEY(accountId),
2541
- locale
2542
- );
2543
- }
2544
2309
  return data;
2545
2310
  };
2546
2311
  var useGetAccountsPopular = (accountType, params = {}, options = {}) => {
@@ -2657,9 +2422,7 @@ var GetBookings = async ({
2657
2422
  search,
2658
2423
  past,
2659
2424
  placeId,
2660
- queryClient,
2661
- clientApiParams,
2662
- locale
2425
+ clientApiParams
2663
2426
  }) => {
2664
2427
  const clientApi = await GetClientAPI(clientApiParams);
2665
2428
  const { data } = await clientApi.get(`/bookings`, {
@@ -2672,14 +2435,6 @@ var GetBookings = async ({
2672
2435
  placeId: placeId || void 0
2673
2436
  }
2674
2437
  });
2675
- if (queryClient && data.status === "ok") {
2676
- CacheIndividualQueries(
2677
- data,
2678
- queryClient,
2679
- (bookingId) => BOOKING_QUERY_KEY(bookingId),
2680
- locale
2681
- );
2682
- }
2683
2438
  return data;
2684
2439
  };
2685
2440
  var useGetBookings = (past = false, placeId = "", params = {}, options = {}) => {
@@ -2770,9 +2525,7 @@ var GetBookingPlaces = async ({
2770
2525
  pageSize,
2771
2526
  orderBy,
2772
2527
  search,
2773
- queryClient,
2774
- clientApiParams,
2775
- locale
2528
+ clientApiParams
2776
2529
  }) => {
2777
2530
  const clientApi = await GetClientAPI(clientApiParams);
2778
2531
  const { data } = await clientApi.get(`/bookings/places`, {
@@ -2783,14 +2536,6 @@ var GetBookingPlaces = async ({
2783
2536
  search: search || void 0
2784
2537
  }
2785
2538
  });
2786
- if (queryClient && data.status === "ok") {
2787
- CacheIndividualQueries(
2788
- data,
2789
- queryClient,
2790
- (bookingPlaceId) => BOOKING_PLACE_QUERY_KEY(bookingPlaceId),
2791
- locale
2792
- );
2793
- }
2794
2539
  return data;
2795
2540
  };
2796
2541
  var useGetBookingPlaces = (params = {}, options = {}) => {
@@ -2888,9 +2633,7 @@ var GetBookingPlacesSpaces = async ({
2888
2633
  pageSize,
2889
2634
  orderBy,
2890
2635
  search,
2891
- queryClient,
2892
- clientApiParams,
2893
- locale
2636
+ clientApiParams
2894
2637
  }) => {
2895
2638
  const clientApi = await GetClientAPI(clientApiParams);
2896
2639
  const { data } = await clientApi.get(`/bookings/places/${bookingId}/spaces`, {
@@ -2901,14 +2644,6 @@ var GetBookingPlacesSpaces = async ({
2901
2644
  search: search || void 0
2902
2645
  }
2903
2646
  });
2904
- if (queryClient && data.status === "ok") {
2905
- CacheIndividualQueries(
2906
- data,
2907
- queryClient,
2908
- (spaceId) => BOOKING_PLACE_SPACE_QUERY_KEY(bookingId, spaceId),
2909
- locale
2910
- );
2911
- }
2912
2647
  return data;
2913
2648
  };
2914
2649
  var useGetBookingPlacesSpaces = (bookingId = "", params = {}, options = {}) => {
@@ -3003,85 +2738,105 @@ var useGetBenefits = (params = {}, options = {}) => {
3003
2738
  );
3004
2739
  };
3005
2740
 
3006
- // src/queries/groups/useGetGroupActivities.ts
3007
- var GROUP_ACTIVITIES_QUERY_KEY = (groupId) => [
3008
- ...ACTIVITIES_QUERY_KEY(),
3009
- ...GROUP_QUERY_KEY(groupId)
3010
- ];
3011
- 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"]) => {
3012
2748
  client.setQueryData(
3013
2749
  [
3014
- ...GROUP_ACTIVITIES_QUERY_KEY(...keyParams),
2750
+ ...GROUPS_QUERY_KEY(...keyParams),
3015
2751
  ...GetBaseInfiniteQueryKeys(...baseKeys)
3016
2752
  ],
3017
2753
  setFirstPageData(response)
3018
2754
  );
3019
2755
  };
3020
- var GetGroupActivities = async ({
2756
+ var GetGroups = async ({
3021
2757
  pageParam,
3022
2758
  pageSize,
3023
2759
  orderBy,
3024
2760
  search,
3025
- groupId,
3026
- queryClient,
3027
- clientApiParams,
3028
- locale
2761
+ access,
2762
+ clientApiParams
3029
2763
  }) => {
3030
2764
  const clientApi = await GetClientAPI(clientApiParams);
3031
- const { data } = await clientApi.get(`/groups/${groupId}/activities`, {
2765
+ const { data } = await clientApi.get(`/groups`, {
3032
2766
  params: {
3033
2767
  page: pageParam || void 0,
3034
2768
  pageSize: pageSize || void 0,
3035
2769
  orderBy: orderBy || void 0,
3036
- search: search || void 0
2770
+ search: search || void 0,
2771
+ access: access || void 0
3037
2772
  }
3038
2773
  });
3039
- if (queryClient && data.status === "ok") {
3040
- CacheIndividualQueries(
3041
- data,
3042
- queryClient,
3043
- (activityId) => ACTIVITY_QUERY_KEY(activityId),
3044
- locale
3045
- );
3046
- }
3047
2774
  return data;
3048
2775
  };
3049
- var useGetGroupActivities = (groupId = "", params = {}, options = {}) => {
2776
+ var useGetGroups = (access, params = {}, options = {}) => {
3050
2777
  return useConnectedInfiniteQuery(
3051
- GROUP_ACTIVITIES_QUERY_KEY(groupId),
3052
- (params2) => GetGroupActivities({ groupId, ...params2 }),
2778
+ GROUPS_QUERY_KEY(access),
2779
+ (params2) => GetGroups({ access, ...params2 }),
3053
2780
  params,
3054
- {
3055
- ...options,
3056
- enabled: !!groupId && (options?.enabled ?? true)
3057
- }
2781
+ options
3058
2782
  );
3059
2783
  };
3060
2784
 
3061
- // src/queries/groups/useGetGroupAnnouncements.ts
3062
- var GROUP_ANNOUNCEMENTS_QUERY_KEY = (groupId) => [
3063
- ...GROUP_QUERY_KEY(groupId),
3064
- "ANNOUNCEMENTS"
2785
+ // src/queries/groups/useGetGroup.ts
2786
+ var GROUP_QUERY_KEY = (groupId) => [
2787
+ ...GROUPS_QUERY_KEY(),
2788
+ groupId
3065
2789
  ];
3066
- 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"]) => {
3067
2822
  client.setQueryData(
3068
2823
  [
3069
- ...GROUP_ANNOUNCEMENTS_QUERY_KEY(...keyParams),
2824
+ ...GROUP_ACTIVITIES_QUERY_KEY(...keyParams),
3070
2825
  ...GetBaseInfiniteQueryKeys(...baseKeys)
3071
2826
  ],
3072
2827
  setFirstPageData(response)
3073
2828
  );
3074
2829
  };
3075
- var GetGroupAnnouncements = async ({
3076
- groupId,
2830
+ var GetGroupActivities = async ({
3077
2831
  pageParam,
3078
2832
  pageSize,
3079
2833
  orderBy,
3080
2834
  search,
2835
+ groupId,
3081
2836
  clientApiParams
3082
2837
  }) => {
3083
2838
  const clientApi = await GetClientAPI(clientApiParams);
3084
- const { data } = await clientApi.get(`/groups/${groupId}/announcements`, {
2839
+ const { data } = await clientApi.get(`/groups/${groupId}/activities`, {
3085
2840
  params: {
3086
2841
  page: pageParam || void 0,
3087
2842
  pageSize: pageSize || void 0,
@@ -3091,10 +2846,10 @@ var GetGroupAnnouncements = async ({
3091
2846
  });
3092
2847
  return data;
3093
2848
  };
3094
- var useGetGroupAnnouncements = (groupId = "", params = {}, options = {}) => {
2849
+ var useGetGroupActivities = (groupId = "", params = {}, options = {}) => {
3095
2850
  return useConnectedInfiniteQuery(
3096
- GROUP_ANNOUNCEMENTS_QUERY_KEY(groupId),
3097
- (params2) => GetGroupAnnouncements({ groupId, ...params2 }),
2851
+ GROUP_ACTIVITIES_QUERY_KEY(groupId),
2852
+ (params2) => GetGroupActivities({ groupId, ...params2 }),
3098
2853
  params,
3099
2854
  {
3100
2855
  ...options,
@@ -3103,20 +2858,22 @@ var useGetGroupAnnouncements = (groupId = "", params = {}, options = {}) => {
3103
2858
  );
3104
2859
  };
3105
2860
 
3106
- // src/queries/groups/useGetGroupMedia.ts
3107
- var GROUP_MEDIA_QUERY_KEY = (groupId, type) => [...GROUP_QUERY_KEY(groupId), "MEDIA", type || "all"];
3108
- 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"]) => {
3109
2867
  client.setQueryData(
3110
2868
  [
3111
- ...GROUP_MEDIA_QUERY_KEY(...keyParams),
2869
+ ...GROUP_ANNOUNCEMENTS_QUERY_KEY(...keyParams),
3112
2870
  ...GetBaseInfiniteQueryKeys(...baseKeys)
3113
2871
  ],
3114
2872
  setFirstPageData(response)
3115
2873
  );
3116
2874
  };
3117
- var GetGroupMedia = async ({
2875
+ var GetGroupAnnouncements = async ({
3118
2876
  groupId,
3119
- type,
3120
2877
  pageParam,
3121
2878
  pageSize,
3122
2879
  orderBy,
@@ -3124,9 +2881,8 @@ var GetGroupMedia = async ({
3124
2881
  clientApiParams
3125
2882
  }) => {
3126
2883
  const clientApi = await GetClientAPI(clientApiParams);
3127
- const { data } = await clientApi.get(`/groups/${groupId}/media`, {
2884
+ const { data } = await clientApi.get(`/groups/${groupId}/announcements`, {
3128
2885
  params: {
3129
- type: type || void 0,
3130
2886
  page: pageParam || void 0,
3131
2887
  pageSize: pageSize || void 0,
3132
2888
  orderBy: orderBy || void 0,
@@ -3135,10 +2891,10 @@ var GetGroupMedia = async ({
3135
2891
  });
3136
2892
  return data;
3137
2893
  };
3138
- var useGetGroupMedia = (groupId = "", type, params = {}, options = {}) => {
2894
+ var useGetGroupAnnouncements = (groupId = "", params = {}, options = {}) => {
3139
2895
  return useConnectedInfiniteQuery(
3140
- GROUP_MEDIA_QUERY_KEY(groupId, type),
3141
- (params2) => GetGroupMedia({ groupId, type, ...params2 }),
2896
+ GROUP_ANNOUNCEMENTS_QUERY_KEY(groupId),
2897
+ (params2) => GetGroupAnnouncements({ groupId, ...params2 }),
3142
2898
  params,
3143
2899
  {
3144
2900
  ...options,
@@ -3147,78 +2903,46 @@ var useGetGroupMedia = (groupId = "", type, params = {}, options = {}) => {
3147
2903
  );
3148
2904
  };
3149
2905
 
3150
- // src/queries/events/useGetEvents.ts
3151
- var EVENTS_QUERY_KEY = (past) => {
3152
- const keys = ["EVENTS"];
3153
- if (typeof past !== "undefined") {
3154
- keys.push(past ? "PAST" : "UPCOMING");
3155
- }
3156
- return keys;
3157
- };
3158
- 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"]) => {
3159
2909
  client.setQueryData(
3160
2910
  [
3161
- ...EVENTS_QUERY_KEY(...keyParams),
2911
+ ...GROUP_MEDIA_QUERY_KEY(...keyParams),
3162
2912
  ...GetBaseInfiniteQueryKeys(...baseKeys)
3163
2913
  ],
3164
2914
  setFirstPageData(response)
3165
2915
  );
3166
2916
  };
3167
- var GetEvents = async ({
2917
+ var GetGroupMedia = async ({
2918
+ groupId,
2919
+ type,
3168
2920
  pageParam,
3169
2921
  pageSize,
3170
2922
  orderBy,
3171
2923
  search,
3172
- past,
3173
2924
  clientApiParams
3174
2925
  }) => {
3175
2926
  const clientApi = await GetClientAPI(clientApiParams);
3176
- const { data } = await clientApi.get(`/events`, {
2927
+ const { data } = await clientApi.get(`/groups/${groupId}/media`, {
3177
2928
  params: {
2929
+ type: type || void 0,
3178
2930
  page: pageParam || void 0,
3179
2931
  pageSize: pageSize || void 0,
3180
2932
  orderBy: orderBy || void 0,
3181
- search: search || void 0,
3182
- past: past !== void 0 ? past : void 0
2933
+ search: search || void 0
3183
2934
  }
3184
2935
  });
3185
2936
  return data;
3186
2937
  };
3187
- var useGetEvents = (past = false, params = {}, options = {}) => {
2938
+ var useGetGroupMedia = (groupId = "", type, params = {}, options = {}) => {
3188
2939
  return useConnectedInfiniteQuery(
3189
- EVENTS_QUERY_KEY(past),
3190
- (params2) => GetEvents({ past, ...params2 }),
2940
+ GROUP_MEDIA_QUERY_KEY(groupId, type),
2941
+ (params2) => GetGroupMedia({ groupId, type, ...params2 }),
3191
2942
  params,
3192
- options
3193
- );
3194
- };
3195
-
3196
- // src/queries/events/useGetEvent.ts
3197
- var EVENT_QUERY_KEY = (eventId) => [
3198
- ...EVENTS_QUERY_KEY(),
3199
- eventId
3200
- ];
3201
- var SET_EVENT_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
3202
- client.setQueryData(
3203
- [...EVENT_QUERY_KEY(...keyParams), ...GetBaseSingleQueryKeys(...baseKeys)],
3204
- response
3205
- );
3206
- };
3207
- var GetEvent = async ({
3208
- eventId,
3209
- clientApiParams
3210
- }) => {
3211
- const clientApi = await GetClientAPI(clientApiParams);
3212
- const { data } = await clientApi.get(`/events/${eventId}`);
3213
- return data;
3214
- };
3215
- var useGetEvent = (eventId = "", options = {}) => {
3216
- return useConnectedSingleQuery(
3217
- EVENT_QUERY_KEY(eventId),
3218
- (params) => GetEvent({ eventId, ...params }),
3219
2943
  {
3220
2944
  ...options,
3221
- enabled: !!eventId && (options?.enabled ?? true)
2945
+ enabled: !!groupId && (options?.enabled ?? true)
3222
2946
  }
3223
2947
  );
3224
2948
  };
@@ -3245,9 +2969,7 @@ var GetGroupEvents = async ({
3245
2969
  search,
3246
2970
  groupId,
3247
2971
  past,
3248
- queryClient,
3249
- clientApiParams,
3250
- locale
2972
+ clientApiParams
3251
2973
  }) => {
3252
2974
  const clientApi = await GetClientAPI(clientApiParams);
3253
2975
  const { data } = await clientApi.get(`/groups/${groupId}/events`, {
@@ -3259,14 +2981,6 @@ var GetGroupEvents = async ({
3259
2981
  past: past || false
3260
2982
  }
3261
2983
  });
3262
- if (queryClient && data.status === "ok") {
3263
- CacheIndividualQueries(
3264
- data,
3265
- queryClient,
3266
- (eventId) => EVENT_QUERY_KEY(eventId),
3267
- locale
3268
- );
3269
- }
3270
2984
  return data;
3271
2985
  };
3272
2986
  var useGetGroupEvents = (groupId = "", past = false, params = {}, options = {}) => {
@@ -3351,9 +3065,7 @@ var GetGroupSponsors = async ({
3351
3065
  orderBy,
3352
3066
  search,
3353
3067
  groupId,
3354
- queryClient,
3355
- clientApiParams,
3356
- locale
3068
+ clientApiParams
3357
3069
  }) => {
3358
3070
  const clientApi = await GetClientAPI(clientApiParams);
3359
3071
  const { data } = await clientApi.get(`/groups/${groupId}/sponsors`, {
@@ -3364,14 +3076,6 @@ var GetGroupSponsors = async ({
3364
3076
  search: search || void 0
3365
3077
  }
3366
3078
  });
3367
- if (queryClient && data.status === "ok") {
3368
- CacheIndividualQueries(
3369
- data,
3370
- queryClient,
3371
- (accountId) => ACCOUNT_QUERY_KEY(accountId),
3372
- locale
3373
- );
3374
- }
3375
3079
  return data;
3376
3080
  };
3377
3081
  var useGetGroupSponsors = (groupId = "", params = {}, options = {}) => {
@@ -3410,9 +3114,7 @@ var GetGroupRequests = async ({
3410
3114
  search,
3411
3115
  status,
3412
3116
  groupId,
3413
- queryClient,
3414
- clientApiParams,
3415
- locale
3117
+ clientApiParams
3416
3118
  }) => {
3417
3119
  const clientApi = await GetClientAPI(clientApiParams);
3418
3120
  const { data } = await clientApi.get(`/groups/${groupId}/requests`, {
@@ -3424,14 +3126,6 @@ var GetGroupRequests = async ({
3424
3126
  status: status || void 0
3425
3127
  }
3426
3128
  });
3427
- if (queryClient && data.status === "ok") {
3428
- CacheIndividualQueries(
3429
- data,
3430
- queryClient,
3431
- (groupId2) => GROUP_REQUEST_QUERY_KEY(groupId2, data.data.id),
3432
- locale
3433
- );
3434
- }
3435
3129
  return data;
3436
3130
  };
3437
3131
  var useGetGroupRequests = (groupId = "", status, params = {}, options = {}) => {
@@ -3575,9 +3269,7 @@ var GetGroupsFeatured = async ({
3575
3269
  pageSize,
3576
3270
  orderBy,
3577
3271
  search,
3578
- queryClient,
3579
- clientApiParams,
3580
- locale
3272
+ clientApiParams
3581
3273
  }) => {
3582
3274
  const clientApi = await GetClientAPI(clientApiParams);
3583
3275
  const { data } = await clientApi.get(`/groups/featured`, {
@@ -3588,14 +3280,6 @@ var GetGroupsFeatured = async ({
3588
3280
  search: search || void 0
3589
3281
  }
3590
3282
  });
3591
- if (queryClient && data.status === "ok") {
3592
- CacheIndividualQueries(
3593
- data,
3594
- queryClient,
3595
- (groupId) => GROUP_QUERY_KEY(groupId),
3596
- locale
3597
- );
3598
- }
3599
3283
  return data;
3600
3284
  };
3601
3285
  var useGetGroupsFeatured = (params = {}, options = {}) => {
@@ -3621,9 +3305,7 @@ var GetGroupsInvited = async ({
3621
3305
  pageSize,
3622
3306
  orderBy,
3623
3307
  search,
3624
- queryClient,
3625
- clientApiParams,
3626
- locale
3308
+ clientApiParams
3627
3309
  }) => {
3628
3310
  const clientApi = await GetClientAPI(clientApiParams);
3629
3311
  const { data } = await clientApi.get(`/groups/invited`, {
@@ -3632,17 +3314,9 @@ var GetGroupsInvited = async ({
3632
3314
  pageSize: pageSize || void 0,
3633
3315
  orderBy: orderBy || void 0,
3634
3316
  search: search || void 0,
3635
- rejected
3317
+ rejected: rejected !== void 0 ? rejected : void 0
3636
3318
  }
3637
3319
  });
3638
- if (queryClient && data.status === "ok") {
3639
- CacheIndividualQueries(
3640
- data,
3641
- queryClient,
3642
- (groupId) => GROUP_QUERY_KEY(groupId),
3643
- locale
3644
- );
3645
- }
3646
3320
  return data;
3647
3321
  };
3648
3322
  var useGetGroupsInvited = (rejected, params = {}, options = {}) => {
@@ -3663,9 +3337,7 @@ var GetGroupsRequested = async ({
3663
3337
  pageSize,
3664
3338
  orderBy,
3665
3339
  search,
3666
- queryClient,
3667
- clientApiParams,
3668
- locale
3340
+ clientApiParams
3669
3341
  }) => {
3670
3342
  const clientApi = await GetClientAPI(clientApiParams);
3671
3343
  const { data } = await clientApi.get(`/groups/requested`, {
@@ -3676,14 +3348,6 @@ var GetGroupsRequested = async ({
3676
3348
  search: search || void 0
3677
3349
  }
3678
3350
  });
3679
- if (queryClient && data.status === "ok") {
3680
- CacheIndividualQueries(
3681
- data,
3682
- queryClient,
3683
- (groupId) => GROUP_QUERY_KEY(groupId),
3684
- locale
3685
- );
3686
- }
3687
3351
  return data;
3688
3352
  };
3689
3353
  var useGetGroupsRequested = (params = {}, options = {}) => {
@@ -3695,84 +3359,148 @@ var useGetGroupsRequested = (params = {}, options = {}) => {
3695
3359
  );
3696
3360
  };
3697
3361
 
3698
- // src/queries/events/useGetEventActivities.ts
3699
- var EVENT_ACTIVITIES_QUERY_KEY = (eventId) => [
3700
- ...ACTIVITIES_QUERY_KEY(),
3701
- ...EVENT_QUERY_KEY(eventId)
3702
- ];
3703
- 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"]) => {
3704
3371
  client.setQueryData(
3705
3372
  [
3706
- ...EVENT_ACTIVITIES_QUERY_KEY(...keyParams),
3373
+ ...EVENTS_QUERY_KEY(...keyParams),
3707
3374
  ...GetBaseInfiniteQueryKeys(...baseKeys)
3708
3375
  ],
3709
3376
  setFirstPageData(response)
3710
3377
  );
3711
3378
  };
3712
- var GetEventActivities = async ({
3713
- eventId,
3379
+ var GetEvents = async ({
3714
3380
  pageParam,
3715
3381
  pageSize,
3716
3382
  orderBy,
3717
3383
  search,
3718
- queryClient,
3719
- clientApiParams,
3720
- locale
3384
+ past,
3385
+ clientApiParams
3721
3386
  }) => {
3722
3387
  const clientApi = await GetClientAPI(clientApiParams);
3723
- const { data } = await clientApi.get(`/events/${eventId}/activities`, {
3388
+ const { data } = await clientApi.get(`/events`, {
3724
3389
  params: {
3725
3390
  page: pageParam || void 0,
3726
3391
  pageSize: pageSize || void 0,
3727
3392
  orderBy: orderBy || void 0,
3728
- search: search || void 0
3393
+ search: search || void 0,
3394
+ past: past !== void 0 ? past : void 0
3729
3395
  }
3730
3396
  });
3731
- if (queryClient && data.status === "ok") {
3732
- CacheIndividualQueries(
3733
- data,
3734
- queryClient,
3735
- (activityId) => ACTIVITY_QUERY_KEY(activityId),
3736
- locale
3737
- );
3738
- }
3739
3397
  return data;
3740
3398
  };
3741
- var useGetEventActivities = (eventId = "", params = {}, options = {}) => {
3399
+ var useGetEvents = (past = false, params = {}, options = {}) => {
3742
3400
  return useConnectedInfiniteQuery(
3743
- EVENT_ACTIVITIES_QUERY_KEY(eventId),
3744
- (params2) => GetEventActivities({ eventId, ...params2 }),
3401
+ EVENTS_QUERY_KEY(past),
3402
+ (params2) => GetEvents({ past, ...params2 }),
3745
3403
  params,
3746
- {
3747
- ...options,
3748
- enabled: !!eventId && (options?.enabled ?? true)
3749
- }
3404
+ options
3750
3405
  );
3751
3406
  };
3752
3407
 
3753
- // src/queries/events/useGetEventFAQSections.ts
3754
- var EVENT_FAQ_SECTIONS_QUERY_KEY = (eventId) => [
3755
- ...EVENT_QUERY_KEY(eventId),
3756
- "FAQ_SECTIONS"
3408
+ // src/queries/events/useGetEvent.ts
3409
+ var EVENT_QUERY_KEY = (eventId) => [
3410
+ ...EVENTS_QUERY_KEY(),
3411
+ eventId
3757
3412
  ];
3758
- var SET_EVENT_FAQ_SECTIONS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
3413
+ var SET_EVENT_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
3759
3414
  client.setQueryData(
3760
- [
3761
- ...EVENT_FAQ_SECTIONS_QUERY_KEY(...keyParams),
3762
- ...GetBaseInfiniteQueryKeys(...baseKeys)
3763
- ],
3764
- setFirstPageData(response)
3415
+ [...EVENT_QUERY_KEY(...keyParams), ...GetBaseSingleQueryKeys(...baseKeys)],
3416
+ response
3765
3417
  );
3766
3418
  };
3767
- var GetEventFaqSections = async ({
3419
+ var GetEvent = async ({
3768
3420
  eventId,
3769
- pageParam,
3770
- 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,
3771
3456
  orderBy,
3772
3457
  search,
3773
- queryClient,
3774
- clientApiParams,
3775
- 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
3776
3504
  }) => {
3777
3505
  const clientApi = await GetClientAPI(clientApiParams);
3778
3506
  const { data } = await clientApi.get(`/events/${eventId}/faqs`, {
@@ -3783,14 +3511,6 @@ var GetEventFaqSections = async ({
3783
3511
  search: search || void 0
3784
3512
  }
3785
3513
  });
3786
- if (queryClient && data.status === "ok") {
3787
- CacheIndividualQueries(
3788
- data,
3789
- queryClient,
3790
- (sectionId) => EVENT_FAQ_SECTION_QUERY_KEY(eventId, sectionId),
3791
- locale
3792
- );
3793
- }
3794
3514
  return data;
3795
3515
  };
3796
3516
  var useGetEventFaqSections = (eventId = "", params = {}, options = {}) => {
@@ -3857,9 +3577,7 @@ var GetEventFaqs = async ({
3857
3577
  pageSize,
3858
3578
  orderBy,
3859
3579
  search,
3860
- queryClient,
3861
- clientApiParams,
3862
- locale
3580
+ clientApiParams
3863
3581
  }) => {
3864
3582
  const clientApi = await GetClientAPI(clientApiParams);
3865
3583
  const { data } = await clientApi.get(
@@ -3873,14 +3591,6 @@ var GetEventFaqs = async ({
3873
3591
  }
3874
3592
  }
3875
3593
  );
3876
- if (queryClient && data.status === "ok") {
3877
- CacheIndividualQueries(
3878
- data,
3879
- queryClient,
3880
- (faqId) => EVENT_FAQ_SECTION_QUESTION_QUERY_KEY(eventId, sectionId, faqId),
3881
- locale
3882
- );
3883
- }
3884
3594
  return data;
3885
3595
  };
3886
3596
  var useGetEventFaqs = (eventId = "", sectionId = "", params = {}, options = {}) => {
@@ -3952,9 +3662,7 @@ var GetEventPages = async ({
3952
3662
  pageSize,
3953
3663
  orderBy,
3954
3664
  search,
3955
- queryClient,
3956
- clientApiParams,
3957
- locale
3665
+ clientApiParams
3958
3666
  }) => {
3959
3667
  const clientApi = await GetClientAPI(clientApiParams);
3960
3668
  const { data } = await clientApi.get(`/events/${eventId}/pages`, {
@@ -3965,14 +3673,6 @@ var GetEventPages = async ({
3965
3673
  search: search || void 0
3966
3674
  }
3967
3675
  });
3968
- if (queryClient && data.status === "ok") {
3969
- CacheIndividualQueries(
3970
- data,
3971
- queryClient,
3972
- (pageId) => EVENT_PAGE_QUERY_KEY(eventId, pageId),
3973
- locale
3974
- );
3975
- }
3976
3676
  return data;
3977
3677
  };
3978
3678
  var useGetEventPages = (eventId = "", params = {}, options = {}) => {
@@ -4079,9 +3779,7 @@ var GetEventRegistrants = async ({
4079
3779
  pageSize,
4080
3780
  orderBy,
4081
3781
  search,
4082
- queryClient,
4083
- clientApiParams,
4084
- locale
3782
+ clientApiParams
4085
3783
  }) => {
4086
3784
  const clientApi = await GetClientAPI(clientApiParams);
4087
3785
  const { data } = await clientApi.get(`/events/${eventId}/registrants`, {
@@ -4092,14 +3790,6 @@ var GetEventRegistrants = async ({
4092
3790
  search: search || void 0
4093
3791
  }
4094
3792
  });
4095
- if (queryClient && data.status === "ok") {
4096
- CacheIndividualQueries(
4097
- data,
4098
- queryClient,
4099
- (accountId) => ACCOUNT_QUERY_KEY(accountId),
4100
- locale
4101
- );
4102
- }
4103
3793
  return data;
4104
3794
  };
4105
3795
  var useGetEventRegistrants = (eventId = "", params = {}, options = {}) => {
@@ -4203,9 +3893,7 @@ var GetEventSpeakers = async ({
4203
3893
  pageSize,
4204
3894
  orderBy,
4205
3895
  search,
4206
- queryClient,
4207
- clientApiParams,
4208
- locale
3896
+ clientApiParams
4209
3897
  }) => {
4210
3898
  const clientApi = await GetClientAPI(clientApiParams);
4211
3899
  const { data } = await clientApi.get(`/events/${eventId}/speakers`, {
@@ -4216,14 +3904,6 @@ var GetEventSpeakers = async ({
4216
3904
  search: search || void 0
4217
3905
  }
4218
3906
  });
4219
- if (queryClient && data.status === "ok") {
4220
- CacheIndividualQueries(
4221
- data,
4222
- queryClient,
4223
- (speakerId) => EVENT_SPEAKER_QUERY_KEY(eventId, speakerId),
4224
- locale
4225
- );
4226
- }
4227
3907
  return data;
4228
3908
  };
4229
3909
  var useGetEventSpeakers = (eventId = "", params = {}, options = {}) => {
@@ -4291,9 +3971,7 @@ var GetEventSponsors = async ({
4291
3971
  pageSize,
4292
3972
  orderBy,
4293
3973
  search,
4294
- queryClient,
4295
- clientApiParams,
4296
- locale
3974
+ clientApiParams
4297
3975
  }) => {
4298
3976
  const clientApi = await GetClientAPI(clientApiParams);
4299
3977
  const { data } = await clientApi.get(`/events/${eventId}/sponsors`, {
@@ -4304,14 +3982,6 @@ var GetEventSponsors = async ({
4304
3982
  search: search || void 0
4305
3983
  }
4306
3984
  });
4307
- if (queryClient && data.status === "ok") {
4308
- CacheIndividualQueries(
4309
- data,
4310
- queryClient,
4311
- (sponsorId) => ACCOUNT_QUERY_KEY(sponsorId),
4312
- locale
4313
- );
4314
- }
4315
3985
  return data;
4316
3986
  };
4317
3987
  var useGetEventSponsors = (eventId = "", params = {}, options = {}) => {
@@ -4385,9 +4055,7 @@ var GetEventActivations = async ({
4385
4055
  pageSize,
4386
4056
  orderBy,
4387
4057
  search,
4388
- queryClient,
4389
- clientApiParams,
4390
- locale
4058
+ clientApiParams
4391
4059
  }) => {
4392
4060
  const clientApi = await GetClientAPI(clientApiParams);
4393
4061
  const { data } = await clientApi.get(`/events/${eventId}/activations`, {
@@ -4398,14 +4066,6 @@ var GetEventActivations = async ({
4398
4066
  search: search || void 0
4399
4067
  }
4400
4068
  });
4401
- if (queryClient && data.status === "ok") {
4402
- CacheIndividualQueries(
4403
- data,
4404
- queryClient,
4405
- (activationId) => EVENT_ACTIVATION_QUERY_KEY(eventId, activationId),
4406
- locale
4407
- );
4408
- }
4409
4069
  return data;
4410
4070
  };
4411
4071
  var useGetEventActivations = (eventId = "", params = {}, options = {}) => {
@@ -4773,9 +4433,7 @@ var GetAllGroupEvents = async ({
4773
4433
  orderBy,
4774
4434
  search,
4775
4435
  past,
4776
- queryClient,
4777
- clientApiParams,
4778
- locale
4436
+ clientApiParams
4779
4437
  }) => {
4780
4438
  const clientApi = await GetClientAPI(clientApiParams);
4781
4439
  const { data } = await clientApi.get(`/groups/events`, {
@@ -4787,14 +4445,6 @@ var GetAllGroupEvents = async ({
4787
4445
  past: past !== void 0 ? past : void 0
4788
4446
  }
4789
4447
  });
4790
- if (queryClient) {
4791
- CacheIndividualQueries(
4792
- data,
4793
- queryClient,
4794
- (eventId) => EVENT_QUERY_KEY(eventId),
4795
- locale
4796
- );
4797
- }
4798
4448
  return data;
4799
4449
  };
4800
4450
  var useGetAllGroupEvents = (past = false, params = {}, options = {}) => {
@@ -4822,9 +4472,7 @@ var GetChannels = async ({
4822
4472
  pageSize,
4823
4473
  orderBy,
4824
4474
  search,
4825
- queryClient,
4826
- clientApiParams,
4827
- locale
4475
+ clientApiParams
4828
4476
  }) => {
4829
4477
  const clientApi = await GetClientAPI(clientApiParams);
4830
4478
  const { data } = await clientApi.get(`/channels`, {
@@ -4835,14 +4483,6 @@ var GetChannels = async ({
4835
4483
  search: search || void 0
4836
4484
  }
4837
4485
  });
4838
- if (queryClient && data.status === "ok") {
4839
- CacheIndividualQueries(
4840
- data,
4841
- queryClient,
4842
- (channelId) => CHANNEL_QUERY_KEY(channelId),
4843
- locale
4844
- );
4845
- }
4846
4486
  return data;
4847
4487
  };
4848
4488
  var useGetChannels = (params = {}, options = {}) => {
@@ -4907,9 +4547,7 @@ var GetChannelCollections = async ({
4907
4547
  pageSize,
4908
4548
  orderBy,
4909
4549
  search,
4910
- queryClient,
4911
- clientApiParams,
4912
- locale
4550
+ clientApiParams
4913
4551
  }) => {
4914
4552
  const clientApi = await GetClientAPI(clientApiParams);
4915
4553
  const { data } = await clientApi.get(`/channels/${channelId}/collections`, {
@@ -4920,14 +4558,6 @@ var GetChannelCollections = async ({
4920
4558
  search: search || void 0
4921
4559
  }
4922
4560
  });
4923
- if (queryClient && data.status === "ok") {
4924
- CacheIndividualQueries(
4925
- data,
4926
- queryClient,
4927
- (collectionId) => CHANNEL_COLLECTION_QUERY_KEY(channelId, collectionId),
4928
- locale
4929
- );
4930
- }
4931
4561
  return data;
4932
4562
  };
4933
4563
  var useGetChannelCollections = (channelId, params = {}, options = {}) => {
@@ -4972,28 +4602,67 @@ var useGetChannelCollection = (channelId = "", collectionId = "", options = {})
4972
4602
  );
4973
4603
  };
4974
4604
 
4975
- // src/queries/contents/useGetContents.ts
4976
- var CONTENTS_QUERY_KEY = (type, featured, interest, past) => {
4977
- const key = ["CONTENTS"];
4978
- 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"];
4979
4648
  if (featured) key.push("FEATURED");
4980
- if (interest) key.push(interest);
4981
4649
  if (typeof past !== "undefined") key.push(past ? "PAST" : "UPCOMING");
4650
+ if (type) key.push(type);
4982
4651
  return key;
4983
4652
  };
4984
- var SET_CONTENTS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
4653
+ var SET_CHANNEL_CONTENTS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
4985
4654
  client.setQueryData(
4986
4655
  [
4987
- ...CONTENTS_QUERY_KEY(...keyParams),
4656
+ ...CHANNEL_CONTENTS_QUERY_KEY(...keyParams),
4988
4657
  ...GetBaseInfiniteQueryKeys(...baseKeys)
4989
4658
  ],
4990
4659
  setFirstPageData(response)
4991
4660
  );
4992
4661
  };
4993
- var GetContents = async ({
4662
+ var GetChannelContents = async ({
4663
+ channelId,
4994
4664
  type,
4995
4665
  featured,
4996
- interest,
4997
4666
  past,
4998
4667
  pageParam,
4999
4668
  pageSize,
@@ -5002,11 +4671,10 @@ var GetContents = async ({
5002
4671
  clientApiParams
5003
4672
  }) => {
5004
4673
  const clientApi = await GetClientAPI(clientApiParams);
5005
- const { data } = await clientApi.get(`/contents`, {
4674
+ const { data } = await clientApi.get(`/channels/${channelId}/contents`, {
5006
4675
  params: {
5007
4676
  type: type || void 0,
5008
- featured: typeof featured !== "undefined" ? featured ? "true" : "false" : void 0,
5009
- interest: interest || void 0,
4677
+ featured: featured || void 0,
5010
4678
  past,
5011
4679
  page: pageParam || void 0,
5012
4680
  pageSize: pageSize || void 0,
@@ -5016,185 +4684,21 @@ var GetContents = async ({
5016
4684
  });
5017
4685
  return data;
5018
4686
  };
5019
- var useGetContents = (type, featured, interest, past, params = {}, options = {}) => {
4687
+ var useGetChannelContents = (channelId = "", type, featured, past, params = {}, options = {}) => {
5020
4688
  return useConnectedInfiniteQuery(
5021
- CONTENTS_QUERY_KEY(type, featured, interest, past),
5022
- (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
+ }),
5023
4697
  params,
5024
- options
5025
- );
5026
- };
5027
-
5028
- // src/queries/contents/useGetContent.ts
5029
- var CONTENT_QUERY_KEY = (contentId) => [
5030
- ...CONTENTS_QUERY_KEY(),
5031
- contentId
5032
- ];
5033
- var SET_CONTENT_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
5034
- client.setQueryData(
5035
- [
5036
- ...CONTENT_QUERY_KEY(...keyParams),
5037
- ...GetBaseSingleQueryKeys(...baseKeys)
5038
- ],
5039
- response
5040
- );
5041
- };
5042
- var GetContent = async ({
5043
- contentId,
5044
- clientApiParams
5045
- }) => {
5046
- const clientApi = await GetClientAPI(clientApiParams);
5047
- const { data } = await clientApi.get(`/contents/${contentId}`);
5048
- return data;
5049
- };
5050
- var useGetContent = (contentId = "", options = {}) => {
5051
- return useConnectedSingleQuery_default(
5052
- CONTENT_QUERY_KEY(contentId),
5053
- (params) => GetContent({ contentId, ...params }),
5054
- {
5055
- ...options,
5056
- enabled: !!contentId && options.enabled
5057
- }
5058
- );
5059
- };
5060
-
5061
- // src/queries/contents/useGetContentInterests.ts
5062
- var CONTENT_INTERESTS_QUERY_KEY = () => {
5063
- const key = ["CONTENTS_INTERESTS"];
5064
- return key;
5065
- };
5066
- var GetContentInterests = async ({
5067
- pageParam,
5068
- pageSize,
5069
- orderBy,
5070
- search,
5071
- clientApiParams
5072
- }) => {
5073
- const clientApi = await GetClientAPI(clientApiParams);
5074
- const { data } = await clientApi.get(`/contents/interests`, {
5075
- params: {
5076
- page: pageParam || void 0,
5077
- pageSize: pageSize || void 0,
5078
- orderBy: orderBy || void 0,
5079
- search: search || void 0
5080
- }
5081
- });
5082
- return data;
5083
- };
5084
- var useGetContentInterests = (params = {}, options = {}) => {
5085
- return useConnectedInfiniteQuery(
5086
- CONTENT_INTERESTS_QUERY_KEY(),
5087
- (params2) => GetContentInterests({ ...params2 }),
5088
- params,
5089
- options
5090
- );
5091
- };
5092
-
5093
- // src/queries/contents/useGetSubscribedContents.ts
5094
- var SUBSCRIBED_CONTENTS_QUERY_KEY = (type, interest) => {
5095
- const key = ["SUBSCRIBED_CONTENTS"];
5096
- if (type) key.push(type);
5097
- if (interest) key.push(interest);
5098
- return key;
5099
- };
5100
- var GetSubscribedContents = async ({
5101
- type,
5102
- interest,
5103
- pageParam,
5104
- pageSize,
5105
- orderBy,
5106
- search,
5107
- clientApiParams
5108
- }) => {
5109
- const clientApi = await GetClientAPI(clientApiParams);
5110
- const { data } = await clientApi.get(`/contents/subscribed`, {
5111
- params: {
5112
- type: type || void 0,
5113
- interest: interest || void 0,
5114
- page: pageParam || void 0,
5115
- pageSize: pageSize || void 0,
5116
- orderBy: orderBy || void 0,
5117
- search: search || void 0
5118
- }
5119
- });
5120
- return data;
5121
- };
5122
- var useGetSubscribedContents = (type, interest, params = {}, options = {}) => {
5123
- return useConnectedInfiniteQuery(
5124
- SUBSCRIBED_CONTENTS_QUERY_KEY(interest),
5125
- (params2) => GetSubscribedContents({ interest, ...params2 }),
5126
- params,
5127
- options
5128
- );
5129
- };
5130
-
5131
- // src/queries/channels/content/useGetChannelContents.ts
5132
- var CHANNEL_CONTENTS_QUERY_KEY = (channelId, type, featured, past) => {
5133
- const key = [...CHANNEL_QUERY_KEY(channelId), "CONTENTS"];
5134
- if (featured) key.push("FEATURED");
5135
- if (typeof past !== "undefined") key.push(past ? "PAST" : "UPCOMING");
5136
- if (type) key.push(type);
5137
- return key;
5138
- };
5139
- var SET_CHANNEL_CONTENTS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
5140
- client.setQueryData(
5141
- [
5142
- ...CHANNEL_CONTENTS_QUERY_KEY(...keyParams),
5143
- ...GetBaseInfiniteQueryKeys(...baseKeys)
5144
- ],
5145
- setFirstPageData(response)
5146
- );
5147
- };
5148
- var GetChannelContents = async ({
5149
- channelId,
5150
- type,
5151
- featured,
5152
- past,
5153
- pageParam,
5154
- pageSize,
5155
- orderBy,
5156
- search,
5157
- queryClient,
5158
- clientApiParams,
5159
- locale
5160
- }) => {
5161
- const clientApi = await GetClientAPI(clientApiParams);
5162
- const { data } = await clientApi.get(`/channels/${channelId}/contents`, {
5163
- params: {
5164
- type: type || void 0,
5165
- featured: featured || void 0,
5166
- past,
5167
- page: pageParam || void 0,
5168
- pageSize: pageSize || void 0,
5169
- orderBy: orderBy || void 0,
5170
- search: search || void 0
5171
- }
5172
- });
5173
- if (queryClient && data.status === "ok") {
5174
- CacheIndividualQueries(
5175
- data,
5176
- queryClient,
5177
- (contentId) => CHANNEL_CONTENT_QUERY_KEY(channelId, contentId),
5178
- locale
5179
- );
5180
- }
5181
- return data;
5182
- };
5183
- var useGetChannelContents = (channelId = "", type, featured, past, params = {}, options = {}) => {
5184
- return useConnectedInfiniteQuery(
5185
- CHANNEL_CONTENTS_QUERY_KEY(channelId, type, featured, past),
5186
- (params2) => GetChannelContents({
5187
- ...params2,
5188
- channelId: channelId || "",
5189
- type,
5190
- featured,
5191
- past
5192
- }),
5193
- params,
5194
- {
5195
- ...options,
5196
- enabled: !!channelId && (options?.enabled ?? true)
5197
- }
4698
+ {
4699
+ ...options,
4700
+ enabled: !!channelId && (options?.enabled ?? true)
4701
+ }
5198
4702
  );
5199
4703
  };
5200
4704
 
@@ -5252,9 +4756,7 @@ var GetChannelContentActivities = async ({
5252
4756
  pageSize,
5253
4757
  orderBy,
5254
4758
  search,
5255
- queryClient,
5256
- clientApiParams,
5257
- locale
4759
+ clientApiParams
5258
4760
  }) => {
5259
4761
  const clientApi = await GetClientAPI(clientApiParams);
5260
4762
  const { data } = await clientApi.get(
@@ -5268,14 +4770,6 @@ var GetChannelContentActivities = async ({
5268
4770
  }
5269
4771
  }
5270
4772
  );
5271
- if (queryClient && data.status === "ok") {
5272
- CacheIndividualQueries(
5273
- data,
5274
- queryClient,
5275
- (activityId) => ACTIVITY_QUERY_KEY(activityId),
5276
- locale
5277
- );
5278
- }
5279
4773
  return data;
5280
4774
  };
5281
4775
  var useGetChannelContentActivities = (channelId = "", contentId = "", params = {}, options = {}) => {
@@ -5367,62 +4861,6 @@ var useGetChannelContentGuests = (channelId, contentId, params = {}, options = {
5367
4861
  );
5368
4862
  };
5369
4863
 
5370
- // src/queries/channels/collections/useGetChannelCollectionContents.ts
5371
- var CHANNEL_COLLECTION_CONTENTS_QUERY_KEY = (channelId, collectionId) => [
5372
- ...CHANNEL_COLLECTION_QUERY_KEY(channelId, collectionId),
5373
- "CONTENTS"
5374
- ];
5375
- var GetChannelCollectionContents = async ({
5376
- channelId,
5377
- collectionId,
5378
- pageParam,
5379
- pageSize,
5380
- orderBy,
5381
- search,
5382
- queryClient,
5383
- clientApiParams,
5384
- locale
5385
- }) => {
5386
- const clientApi = await GetClientAPI(clientApiParams);
5387
- const { data } = await clientApi.get(
5388
- `/channels/${channelId}/collections/${collectionId}/contents`,
5389
- {
5390
- params: {
5391
- page: pageParam || void 0,
5392
- pageSize: pageSize || void 0,
5393
- orderBy: orderBy || void 0,
5394
- search: search || void 0
5395
- }
5396
- }
5397
- );
5398
- if (queryClient && data.status === "ok") {
5399
- CacheIndividualQueries(
5400
- data,
5401
- queryClient,
5402
- (contentId) => CHANNEL_CONTENT_QUERY_KEY(channelId, contentId),
5403
- locale
5404
- );
5405
- CacheIndividualQueries(
5406
- data,
5407
- queryClient,
5408
- (contentId) => CONTENT_QUERY_KEY(contentId),
5409
- locale
5410
- );
5411
- }
5412
- return data;
5413
- };
5414
- var useGetChannelCollectionContents = (channelId, collectionId, params = {}, options = {}) => {
5415
- return useConnectedInfiniteQuery(
5416
- CHANNEL_COLLECTION_CONTENTS_QUERY_KEY(channelId, collectionId),
5417
- (params2) => GetChannelCollectionContents({ channelId, collectionId, ...params2 }),
5418
- params,
5419
- {
5420
- ...options,
5421
- enabled: !!channelId && !!collectionId && (options?.enabled ?? true)
5422
- }
5423
- );
5424
- };
5425
-
5426
4864
  // src/queries/channels/managed/useGetManagedChannels.ts
5427
4865
  var MANAGED_CHANNELS_QUERY_KEY = () => [
5428
4866
  "CHANNELS",
@@ -5442,9 +4880,7 @@ var GetManagedChannels = async ({
5442
4880
  pageSize,
5443
4881
  orderBy,
5444
4882
  search,
5445
- queryClient,
5446
- clientApiParams,
5447
- locale
4883
+ clientApiParams
5448
4884
  }) => {
5449
4885
  const clientApi = await GetClientAPI(clientApiParams);
5450
4886
  const { data } = await clientApi.get(`/channels/managed`, {
@@ -5455,14 +4891,6 @@ var GetManagedChannels = async ({
5455
4891
  search: search || void 0
5456
4892
  }
5457
4893
  });
5458
- if (queryClient && data.status === "ok") {
5459
- CacheIndividualQueries(
5460
- data,
5461
- queryClient,
5462
- (channelId) => MANAGED_CHANNEL_QUERY_KEY(channelId),
5463
- locale
5464
- );
5465
- }
5466
4894
  return data;
5467
4895
  };
5468
4896
  var useGetManagedChannels = (params = {}, options = {}) => {
@@ -5524,9 +4952,7 @@ var GetManagedChannelCollections = async ({
5524
4952
  pageSize,
5525
4953
  orderBy,
5526
4954
  search,
5527
- queryClient,
5528
- clientApiParams,
5529
- locale
4955
+ clientApiParams
5530
4956
  }) => {
5531
4957
  const clientApi = await GetClientAPI(clientApiParams);
5532
4958
  const { data } = await clientApi.get(
@@ -5540,14 +4966,6 @@ var GetManagedChannelCollections = async ({
5540
4966
  }
5541
4967
  }
5542
4968
  );
5543
- if (queryClient && data.status === "ok") {
5544
- CacheIndividualQueries(
5545
- data,
5546
- queryClient,
5547
- (collectionId) => MANAGED_CHANNEL_COLLECTION_QUERY_KEY(channelId, collectionId),
5548
- locale
5549
- );
5550
- }
5551
4969
  return data;
5552
4970
  };
5553
4971
  var useGetManagedChannelCollections = (channelId, params = {}, options = {}) => {
@@ -5595,6 +5013,50 @@ var useGetManagedChannelCollection = (channelId = "", collectionId = "", options
5595
5013
  );
5596
5014
  };
5597
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
+
5598
5060
  // src/queries/channels/managed/content/useGetManagedChannelContents.ts
5599
5061
  var MANAGED_CHANNEL_CONTENTS_QUERY_KEY = (channelId) => [...MANAGED_CHANNEL_QUERY_KEY(channelId), "CONTENTS"];
5600
5062
  var SET_MANAGED_CHANNEL_CONTENTS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
@@ -5612,9 +5074,7 @@ var GetManagedChannelContents = async ({
5612
5074
  orderBy,
5613
5075
  search,
5614
5076
  channelId,
5615
- queryClient,
5616
- clientApiParams,
5617
- locale
5077
+ clientApiParams
5618
5078
  }) => {
5619
5079
  const clientApi = await GetClientAPI(clientApiParams);
5620
5080
  const { data } = await clientApi.get(
@@ -5628,14 +5088,6 @@ var GetManagedChannelContents = async ({
5628
5088
  }
5629
5089
  }
5630
5090
  );
5631
- if (queryClient && data.status === "ok") {
5632
- CacheIndividualQueries(
5633
- data,
5634
- queryClient,
5635
- (contentId) => MANAGED_CHANNEL_CONTENT_QUERY_KEY(channelId, contentId),
5636
- locale
5637
- );
5638
- }
5639
5091
  return data;
5640
5092
  };
5641
5093
  var useGetManagedChannelContents = (channelId = "", params = {}, options = {}) => {
@@ -5704,9 +5156,7 @@ var GetManagedChannelContentActivities = async ({
5704
5156
  pageSize,
5705
5157
  orderBy,
5706
5158
  search,
5707
- queryClient,
5708
- clientApiParams,
5709
- locale
5159
+ clientApiParams
5710
5160
  }) => {
5711
5161
  const clientApi = await GetClientAPI(clientApiParams);
5712
5162
  const { data } = await clientApi.get(
@@ -5720,14 +5170,6 @@ var GetManagedChannelContentActivities = async ({
5720
5170
  }
5721
5171
  }
5722
5172
  );
5723
- if (queryClient && data.status === "ok") {
5724
- CacheIndividualQueries(
5725
- data,
5726
- queryClient,
5727
- (activityId) => ACTIVITY_QUERY_KEY(activityId),
5728
- locale
5729
- );
5730
- }
5731
5173
  return data;
5732
5174
  };
5733
5175
  var useGetManagedChannelContentActivities = (channelId = "", contentId = "", params = {}, options = {}) => {
@@ -5822,25 +5264,28 @@ var useGetManagedChannelContentGuests = (channelId, contentId, params = {}, opti
5822
5264
  );
5823
5265
  };
5824
5266
 
5825
- // src/queries/channels/managed/collections/useGetManagedChannelCollectionContents.ts
5826
- var MANAGED_CHANNEL_COLLECTION_CONTENTS_QUERY_KEY = (channelId, collectionId) => [
5827
- ...MANAGED_CHANNEL_COLLECTION_QUERY_KEY(channelId, collectionId),
5828
- "CONTENTS"
5829
- ];
5830
- var GetManagedChannelCollectionContents = async ({
5831
- channelId,
5832
- 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 ({
5833
5279
  pageParam,
5834
5280
  pageSize,
5835
5281
  orderBy,
5836
5282
  search,
5837
- queryClient,
5838
- clientApiParams,
5839
- locale
5283
+ channelId,
5284
+ clientApiParams
5840
5285
  }) => {
5841
5286
  const clientApi = await GetClientAPI(clientApiParams);
5842
5287
  const { data } = await clientApi.get(
5843
- `/channels/managed/${channelId}/collections/${collectionId}/contents`,
5288
+ `/channels/managed/${channelId}/subscribers`,
5844
5289
  {
5845
5290
  params: {
5846
5291
  page: pageParam || void 0,
@@ -5850,60 +5295,33 @@ var GetManagedChannelCollectionContents = async ({
5850
5295
  }
5851
5296
  }
5852
5297
  );
5853
- if (queryClient && data.status === "ok") {
5854
- CacheIndividualQueries(
5855
- data,
5856
- queryClient,
5857
- (contentId) => MANAGED_CHANNEL_CONTENT_QUERY_KEY(channelId, contentId),
5858
- locale
5859
- );
5860
- CacheIndividualQueries(
5861
- data,
5862
- queryClient,
5863
- (contentId) => CONTENT_QUERY_KEY(contentId),
5864
- locale
5865
- );
5866
- }
5867
5298
  return data;
5868
5299
  };
5869
- var useGetManagedChannelCollectionContents = (channelId, collectionId, params = {}, options = {}) => {
5300
+ var useGetManagedChannelSubscribers = (channelId = "", params = {}, options = {}) => {
5870
5301
  return useConnectedInfiniteQuery(
5871
- MANAGED_CHANNEL_COLLECTION_CONTENTS_QUERY_KEY(channelId, collectionId),
5872
- (params2) => GetManagedChannelCollectionContents({
5873
- channelId,
5874
- collectionId,
5875
- ...params2
5876
- }),
5302
+ MANAGED_CHANNEL_SUBSCRIBERS_QUERY_KEY(channelId),
5303
+ (params2) => GetManagedChannelSubscribers({ ...params2, channelId: channelId || "" }),
5877
5304
  params,
5878
5305
  {
5879
5306
  ...options,
5880
- enabled: !!channelId && !!collectionId && (options?.enabled ?? true)
5307
+ enabled: !!channelId && (options?.enabled ?? true)
5881
5308
  }
5882
5309
  );
5883
5310
  };
5884
5311
 
5885
- // src/queries/channels/managed/useGetManagedChannelSubscribers.ts
5886
- var MANAGED_CHANNEL_SUBSCRIBERS_QUERY_KEY = (channelId) => [...MANAGED_CHANNEL_QUERY_KEY(channelId), "SUBSCRIBERS"];
5887
- var SET_MANAGED_CHANNEL_SUBSCRIBERS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
5888
- client.setQueryData(
5889
- [
5890
- ...MANAGED_CHANNEL_SUBSCRIBERS_QUERY_KEY(...keyParams),
5891
- ...GetBaseInfiniteQueryKeys(...baseKeys)
5892
- ],
5893
- setFirstPageData(response)
5894
- );
5895
- };
5896
- 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,
5897
5316
  pageParam,
5898
5317
  pageSize,
5899
5318
  orderBy,
5900
5319
  search,
5901
- channelId,
5902
5320
  clientApiParams
5903
5321
  }) => {
5904
5322
  const clientApi = await GetClientAPI(clientApiParams);
5905
5323
  const { data } = await clientApi.get(
5906
- `/channels/managed/${channelId}/subscribers`,
5324
+ `/channels/managed/${channelId}/interests`,
5907
5325
  {
5908
5326
  params: {
5909
5327
  page: pageParam || void 0,
@@ -5915,10 +5333,10 @@ var GetManagedChannelSubscribers = async ({
5915
5333
  );
5916
5334
  return data;
5917
5335
  };
5918
- var useGetManagedChannelSubscribers = (channelId = "", params = {}, options = {}) => {
5336
+ var useGetManagedChannelInterests = (channelId, params = {}, options = {}) => {
5919
5337
  return useConnectedInfiniteQuery(
5920
- MANAGED_CHANNEL_SUBSCRIBERS_QUERY_KEY(channelId),
5921
- (params2) => GetManagedChannelSubscribers({ ...params2, channelId: channelId || "" }),
5338
+ MANAGED_CHANNEL_INTERESTS_QUERY_KEY(channelId),
5339
+ (params2) => GetManagedChannelInterests({ channelId, ...params2 }),
5922
5340
  params,
5923
5341
  {
5924
5342
  ...options,
@@ -5927,9 +5345,44 @@ var useGetManagedChannelSubscribers = (channelId = "", params = {}, options = {}
5927
5345
  );
5928
5346
  };
5929
5347
 
5930
- // src/queries/channels/managed/useGetManagedChannelInterests.ts
5931
- var MANAGED_CHANNEL_INTERESTS_QUERY_KEY = (channelId) => [...MANAGED_CHANNEL_QUERY_KEY(channelId), "INTERESTS"];
5932
- var GetManagedChannelInterests = async ({
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 ({
5933
5386
  channelId,
5934
5387
  pageParam,
5935
5388
  pageSize,
@@ -5938,47 +5391,128 @@ var GetManagedChannelInterests = async ({
5938
5391
  clientApiParams
5939
5392
  }) => {
5940
5393
  const clientApi = await GetClientAPI(clientApiParams);
5941
- const { data } = await clientApi.get(
5942
- `/channels/managed/${channelId}/interests`,
5943
- {
5944
- params: {
5945
- page: pageParam || void 0,
5946
- pageSize: pageSize || void 0,
5947
- orderBy: orderBy || void 0,
5948
- search: search || void 0
5949
- }
5950
- }
5951
- );
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
+ });
5458
+ return data;
5459
+ };
5460
+ var useGetContents = (type, featured, interest, past, params = {}, options = {}) => {
5461
+ return useConnectedInfiniteQuery(
5462
+ CONTENTS_QUERY_KEY(type, featured, interest, past),
5463
+ (params2) => GetContents({ type, featured, interest, past, ...params2 }),
5464
+ params,
5465
+ options
5466
+ );
5467
+ };
5468
+
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,
5485
+ clientApiParams
5486
+ }) => {
5487
+ const clientApi = await GetClientAPI(clientApiParams);
5488
+ const { data } = await clientApi.get(`/contents/${contentId}`);
5952
5489
  return data;
5953
5490
  };
5954
- var useGetManagedChannelInterests = (channelId, params = {}, options = {}) => {
5955
- return useConnectedInfiniteQuery(
5956
- MANAGED_CHANNEL_INTERESTS_QUERY_KEY(channelId),
5957
- (params2) => GetManagedChannelInterests({ channelId, ...params2 }),
5958
- params,
5491
+ var useGetContent = (contentId = "", options = {}) => {
5492
+ return useConnectedSingleQuery_default(
5493
+ CONTENT_QUERY_KEY(contentId),
5494
+ (params) => GetContent({ contentId, ...params }),
5959
5495
  {
5960
5496
  ...options,
5961
- enabled: !!channelId && (options?.enabled ?? true)
5497
+ enabled: !!contentId && options.enabled
5962
5498
  }
5963
5499
  );
5964
5500
  };
5965
5501
 
5966
- // src/queries/channels/useGetSubscribedChannels.ts
5967
- var SUBSCRIBED_CHANNELS_QUERY_KEY = () => [
5968
- ...CHANNELS_QUERY_KEY(),
5969
- "SUBSCRIBED"
5970
- ];
5971
- 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 ({
5972
5508
  pageParam,
5973
5509
  pageSize,
5974
5510
  orderBy,
5975
5511
  search,
5976
- queryClient,
5977
- clientApiParams,
5978
- locale
5512
+ clientApiParams
5979
5513
  }) => {
5980
5514
  const clientApi = await GetClientAPI(clientApiParams);
5981
- const { data } = await clientApi.get(`/channels/subscribed`, {
5515
+ const { data } = await clientApi.get(`/contents/interests`, {
5982
5516
  params: {
5983
5517
  page: pageParam || void 0,
5984
5518
  pageSize: pageSize || void 0,
@@ -5986,32 +5520,27 @@ var GetSubscribedChannels = async ({
5986
5520
  search: search || void 0
5987
5521
  }
5988
5522
  });
5989
- if (queryClient && data.status === "ok") {
5990
- CacheIndividualQueries(
5991
- data,
5992
- queryClient,
5993
- (channelId) => CHANNEL_QUERY_KEY(channelId),
5994
- locale
5995
- );
5996
- }
5997
5523
  return data;
5998
5524
  };
5999
- var useGetSubscribedChannels = (params = {}, options = {}) => {
5525
+ var useGetContentInterests = (params = {}, options = {}) => {
6000
5526
  return useConnectedInfiniteQuery(
6001
- SUBSCRIBED_CHANNELS_QUERY_KEY(),
6002
- (params2) => GetSubscribedChannels({ ...params2 }),
5527
+ CONTENT_INTERESTS_QUERY_KEY(),
5528
+ (params2) => GetContentInterests({ ...params2 }),
6003
5529
  params,
6004
5530
  options
6005
5531
  );
6006
5532
  };
6007
5533
 
6008
- // src/queries/channels/useGetChannelInterests.ts
6009
- var CHANNEL_INTERESTS_QUERY_KEY = (channelId) => [
6010
- ...CHANNEL_QUERY_KEY(channelId),
6011
- "INTERESTS"
6012
- ];
6013
- var GetChannelInterests = async ({
6014
- 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,
6015
5544
  pageParam,
6016
5545
  pageSize,
6017
5546
  orderBy,
@@ -6019,8 +5548,10 @@ var GetChannelInterests = async ({
6019
5548
  clientApiParams
6020
5549
  }) => {
6021
5550
  const clientApi = await GetClientAPI(clientApiParams);
6022
- const { data } = await clientApi.get(`/channels/${channelId}/interests`, {
5551
+ const { data } = await clientApi.get(`/contents/subscribed`, {
6023
5552
  params: {
5553
+ type: type || void 0,
5554
+ interest: interest || void 0,
6024
5555
  page: pageParam || void 0,
6025
5556
  pageSize: pageSize || void 0,
6026
5557
  orderBy: orderBy || void 0,
@@ -6029,15 +5560,12 @@ var GetChannelInterests = async ({
6029
5560
  });
6030
5561
  return data;
6031
5562
  };
6032
- var useGetChannelInterests = (channelId, params = {}, options = {}) => {
5563
+ var useGetSubscribedContents = (type, interest, params = {}, options = {}) => {
6033
5564
  return useConnectedInfiniteQuery(
6034
- CHANNEL_INTERESTS_QUERY_KEY(channelId),
6035
- (params2) => GetChannelInterests({ channelId, ...params2 }),
5565
+ SUBSCRIBED_CONTENTS_QUERY_KEY(interest),
5566
+ (params2) => GetSubscribedContents({ interest, ...params2 }),
6036
5567
  params,
6037
- {
6038
- ...options,
6039
- enabled: !!channelId && (options?.enabled ?? true)
6040
- }
5568
+ options
6041
5569
  );
6042
5570
  };
6043
5571
 
@@ -6197,9 +5725,7 @@ var GetSelfAddresses = async ({
6197
5725
  pageSize,
6198
5726
  orderBy,
6199
5727
  search,
6200
- queryClient,
6201
- clientApiParams,
6202
- locale
5728
+ clientApiParams
6203
5729
  }) => {
6204
5730
  const clientApi = await GetClientAPI(clientApiParams);
6205
5731
  const { data } = await clientApi.get(`/self/addresses`, {
@@ -6210,14 +5736,6 @@ var GetSelfAddresses = async ({
6210
5736
  search: search || void 0
6211
5737
  }
6212
5738
  });
6213
- if (queryClient && data.status === "ok") {
6214
- CacheIndividualQueries(
6215
- data,
6216
- queryClient,
6217
- (activityId) => SELF_ADDRESS_QUERY_KEY(activityId),
6218
- locale
6219
- );
6220
- }
6221
5739
  return data;
6222
5740
  };
6223
5741
  var useGetSelfAddresses = (params = {}, options = {}) => {
@@ -6272,9 +5790,7 @@ var GetSelfLeads = async ({
6272
5790
  pageSize,
6273
5791
  orderBy,
6274
5792
  search,
6275
- queryClient,
6276
- clientApiParams,
6277
- locale
5793
+ clientApiParams
6278
5794
  }) => {
6279
5795
  const clientApi = await GetClientAPI(clientApiParams);
6280
5796
  const { data } = await clientApi.get(`/self/leads`, {
@@ -6286,14 +5802,6 @@ var GetSelfLeads = async ({
6286
5802
  search: search || void 0
6287
5803
  }
6288
5804
  });
6289
- if (queryClient && data.status === "ok") {
6290
- CacheIndividualQueries(
6291
- data,
6292
- queryClient,
6293
- (activityId) => SELF_LEAD_QUERY_KEY(activityId),
6294
- locale
6295
- );
6296
- }
6297
5805
  return data;
6298
5806
  };
6299
5807
  var useGetSelfLeads = (status, params = {}, options = {}) => {
@@ -6377,9 +5885,7 @@ var GetSelfChatChannels = async ({
6377
5885
  pageSize,
6378
5886
  orderBy,
6379
5887
  search,
6380
- queryClient,
6381
- clientApiParams,
6382
- locale
5888
+ clientApiParams
6383
5889
  }) => {
6384
5890
  const clientApi = await GetClientAPI(clientApiParams);
6385
5891
  const { data } = await clientApi.get(`/self/chat/channels`, {
@@ -6390,20 +5896,6 @@ var GetSelfChatChannels = async ({
6390
5896
  search: search || void 0
6391
5897
  }
6392
5898
  });
6393
- if (queryClient && data.status === "ok") {
6394
- CacheIndividualQueries(
6395
- data,
6396
- queryClient,
6397
- (channelId) => SELF_CHAT_CHANNEL_QUERY_KEY(channelId),
6398
- locale,
6399
- (member) => {
6400
- return {
6401
- ...member,
6402
- id: member.channelId.toString()
6403
- };
6404
- }
6405
- );
6406
- }
6407
5899
  return data;
6408
5900
  };
6409
5901
  var useGetSelfChatChannels = (params = {}, options = {}) => {
@@ -7037,9 +6529,7 @@ var GetSelfSubscriptions = async ({
7037
6529
  pageSize,
7038
6530
  orderBy,
7039
6531
  search,
7040
- queryClient,
7041
- clientApiParams,
7042
- locale
6532
+ clientApiParams
7043
6533
  }) => {
7044
6534
  const clientApi = await GetClientAPI(clientApiParams);
7045
6535
  const { data } = await clientApi.get(`/self/subscriptions`, {
@@ -7051,14 +6541,6 @@ var GetSelfSubscriptions = async ({
7051
6541
  status: status || void 0
7052
6542
  }
7053
6543
  });
7054
- if (queryClient) {
7055
- CacheIndividualQueries(
7056
- data,
7057
- queryClient,
7058
- (subscriptionId) => SELF_SUBSCRIPTION_QUERY_KEY(subscriptionId),
7059
- locale
7060
- );
7061
- }
7062
6544
  return data;
7063
6545
  };
7064
6546
  var useGetSelfSubscriptions = (status, params = {}, options = {}) => {
@@ -7804,9 +7286,7 @@ var GetSelfActivities = async ({
7804
7286
  pageSize,
7805
7287
  orderBy,
7806
7288
  search,
7807
- queryClient,
7808
- clientApiParams,
7809
- locale
7289
+ clientApiParams
7810
7290
  }) => {
7811
7291
  const clientApi = await GetClientAPI(clientApiParams);
7812
7292
  const { data } = await clientApi.get(`/self/activities`, {
@@ -7817,14 +7297,6 @@ var GetSelfActivities = async ({
7817
7297
  search: search || void 0
7818
7298
  }
7819
7299
  });
7820
- if (queryClient && data.status === "ok") {
7821
- CacheIndividualQueries(
7822
- data,
7823
- queryClient,
7824
- (activityId) => ACTIVITY_QUERY_KEY(activityId),
7825
- locale
7826
- );
7827
- }
7828
7300
  return data;
7829
7301
  };
7830
7302
  var useGetSelfActivities = (params = {}, options = {}) => {
@@ -7945,9 +7417,7 @@ var GetSelfDelegateOf = async ({
7945
7417
  pageSize,
7946
7418
  orderBy,
7947
7419
  search,
7948
- queryClient,
7949
- clientApiParams,
7950
- locale
7420
+ clientApiParams
7951
7421
  }) => {
7952
7422
  const clientApi = await GetClientAPI(clientApiParams);
7953
7423
  const { data } = await clientApi.get(`/self/delegateof`, {
@@ -7958,14 +7428,6 @@ var GetSelfDelegateOf = async ({
7958
7428
  search: search || void 0
7959
7429
  }
7960
7430
  });
7961
- if (queryClient && data.status === "ok") {
7962
- CacheIndividualQueries(
7963
- data,
7964
- queryClient,
7965
- (accountId) => ACCOUNT_QUERY_KEY(accountId),
7966
- locale
7967
- );
7968
- }
7969
7431
  return data;
7970
7432
  };
7971
7433
  var useGetSelfDelegateOf = (params = {}, options = {}) => {
@@ -7991,9 +7453,7 @@ var GetSelfDelegates = async ({
7991
7453
  pageSize,
7992
7454
  orderBy,
7993
7455
  search,
7994
- queryClient,
7995
- clientApiParams,
7996
- locale
7456
+ clientApiParams
7997
7457
  }) => {
7998
7458
  const clientApi = await GetClientAPI(clientApiParams);
7999
7459
  const { data } = await clientApi.get(`/self/delegates`, {
@@ -8004,14 +7464,6 @@ var GetSelfDelegates = async ({
8004
7464
  search: search || void 0
8005
7465
  }
8006
7466
  });
8007
- if (queryClient && data.status === "ok") {
8008
- CacheIndividualQueries(
8009
- data,
8010
- queryClient,
8011
- (accountId) => ACCOUNT_QUERY_KEY(accountId),
8012
- locale
8013
- );
8014
- }
8015
7467
  return data;
8016
7468
  };
8017
7469
  var useGetSelfDelegates = (params = {}, options = {}) => {
@@ -8039,9 +7491,7 @@ var GetSelfEvents = async ({
8039
7491
  orderBy,
8040
7492
  search,
8041
7493
  past,
8042
- queryClient,
8043
- clientApiParams,
8044
- locale
7494
+ clientApiParams
8045
7495
  }) => {
8046
7496
  const clientApi = await GetClientAPI(clientApiParams);
8047
7497
  const { data } = await clientApi.get(`/self/events`, {
@@ -8053,14 +7503,6 @@ var GetSelfEvents = async ({
8053
7503
  past: past || false
8054
7504
  }
8055
7505
  });
8056
- if (queryClient && data.status === "ok") {
8057
- CacheIndividualQueries(
8058
- data,
8059
- queryClient,
8060
- (eventId) => EVENT_QUERY_KEY(eventId),
8061
- locale
8062
- );
8063
- }
8064
7506
  return data;
8065
7507
  };
8066
7508
  var useGetSelfEvents = (past = false, params = {}, options = {}) => {
@@ -8088,9 +7530,7 @@ var GetSelfEventSessions = async ({
8088
7530
  pageSize,
8089
7531
  orderBy,
8090
7532
  search,
8091
- queryClient,
8092
- clientApiParams,
8093
- locale
7533
+ clientApiParams
8094
7534
  }) => {
8095
7535
  const clientApi = await GetClientAPI(clientApiParams);
8096
7536
  const { data } = await clientApi.get(`/self/events/${eventId}/sessions`, {
@@ -8102,14 +7542,6 @@ var GetSelfEventSessions = async ({
8102
7542
  search: search || void 0
8103
7543
  }
8104
7544
  });
8105
- if (queryClient && data.status === "ok") {
8106
- CacheIndividualQueries(
8107
- data,
8108
- queryClient,
8109
- (sessionId) => EVENT_SESSION_QUERY_KEY(eventId, sessionId),
8110
- locale
8111
- );
8112
- }
8113
7545
  return data;
8114
7546
  };
8115
7547
  var useGetSelfEventSessions = (eventId, params = {}, options = {}) => {
@@ -8135,9 +7567,7 @@ var GetSelfFeed = async ({
8135
7567
  pageSize,
8136
7568
  orderBy,
8137
7569
  search,
8138
- queryClient,
8139
- clientApiParams,
8140
- locale
7570
+ clientApiParams
8141
7571
  }) => {
8142
7572
  const clientApi = await GetClientAPI(clientApiParams);
8143
7573
  const { data } = await clientApi.get(`/self/activities/feed`, {
@@ -8148,14 +7578,6 @@ var GetSelfFeed = async ({
8148
7578
  search: search || void 0
8149
7579
  }
8150
7580
  });
8151
- if (queryClient && data.status === "ok") {
8152
- CacheIndividualQueries(
8153
- data,
8154
- queryClient,
8155
- (activityId) => ACTIVITY_QUERY_KEY(activityId),
8156
- locale
8157
- );
8158
- }
8159
7581
  return data;
8160
7582
  };
8161
7583
  var useGetSelfFeed = (params = {}, options = {}) => {
@@ -8317,9 +7739,7 @@ var GetSelfPushDevices = async ({
8317
7739
  pageSize,
8318
7740
  orderBy,
8319
7741
  search,
8320
- queryClient,
8321
- clientApiParams,
8322
- locale
7742
+ clientApiParams
8323
7743
  }) => {
8324
7744
  const clientApi = await GetClientAPI(clientApiParams);
8325
7745
  const { data } = await clientApi.get(`/self/push-devices`, {
@@ -8330,14 +7750,6 @@ var GetSelfPushDevices = async ({
8330
7750
  search: search || void 0
8331
7751
  }
8332
7752
  });
8333
- if (queryClient && data.status === "ok") {
8334
- CacheIndividualQueries(
8335
- data,
8336
- queryClient,
8337
- (pushDeviceId) => SELF_PUSH_DEVICE_QUERY_KEY(pushDeviceId),
8338
- locale
8339
- );
8340
- }
8341
7753
  return data;
8342
7754
  };
8343
7755
  var useGetSelfPushDevices = (params = {}, options = {}) => {
@@ -8439,9 +7851,7 @@ var GetSeriesList = async ({
8439
7851
  pageSize,
8440
7852
  orderBy,
8441
7853
  search,
8442
- queryClient,
8443
- clientApiParams,
8444
- locale
7854
+ clientApiParams
8445
7855
  }) => {
8446
7856
  const clientApi = await GetClientAPI(clientApiParams);
8447
7857
  const { data } = await clientApi.get(`/series`, {
@@ -8452,14 +7862,6 @@ var GetSeriesList = async ({
8452
7862
  search: search || void 0
8453
7863
  }
8454
7864
  });
8455
- if (queryClient && data.status === "ok") {
8456
- CacheIndividualQueries(
8457
- data,
8458
- queryClient,
8459
- (seriesId) => SERIES_QUERY_KEY(seriesId),
8460
- locale
8461
- );
8462
- }
8463
7865
  return data;
8464
7866
  };
8465
7867
  var useGetSeriesList = (params = {}, options = {}) => {
@@ -8525,9 +7927,7 @@ var GetSeriesEvents = async ({
8525
7927
  orderBy,
8526
7928
  search,
8527
7929
  past,
8528
- queryClient,
8529
- clientApiParams,
8530
- locale
7930
+ clientApiParams
8531
7931
  }) => {
8532
7932
  const clientApi = await GetClientAPI(clientApiParams);
8533
7933
  const { data } = await clientApi.get(`/series/${seriesId}/events`, {
@@ -8539,14 +7939,6 @@ var GetSeriesEvents = async ({
8539
7939
  past: past !== void 0 ? past : void 0
8540
7940
  }
8541
7941
  });
8542
- if (queryClient && data.status === "ok") {
8543
- CacheIndividualQueries(
8544
- data,
8545
- queryClient,
8546
- (eventId) => EVENT_QUERY_KEY(eventId),
8547
- locale
8548
- );
8549
- }
8550
7942
  return data;
8551
7943
  };
8552
7944
  var useGetSeriesEvents = (seriesId = "", past, params = {}, options = {}) => {
@@ -8577,9 +7969,7 @@ var GetLevels = async ({
8577
7969
  pageSize,
8578
7970
  orderBy,
8579
7971
  search,
8580
- queryClient,
8581
- clientApiParams,
8582
- locale
7972
+ clientApiParams
8583
7973
  }) => {
8584
7974
  const clientApi = await GetClientAPI(clientApiParams);
8585
7975
  const { data } = await clientApi.get(`/levels`, {
@@ -8590,14 +7980,6 @@ var GetLevels = async ({
8590
7980
  search: search || void 0
8591
7981
  }
8592
7982
  });
8593
- if (queryClient && data.status === "ok") {
8594
- CacheIndividualQueries(
8595
- data,
8596
- queryClient,
8597
- (levelId) => LEVEL_QUERY_KEY(levelId),
8598
- locale
8599
- );
8600
- }
8601
7983
  return data;
8602
7984
  };
8603
7985
  var useGetLevels = (params = {}, options = {}) => {
@@ -8659,9 +8041,7 @@ var GetLevelSponsors = async ({
8659
8041
  pageSize,
8660
8042
  orderBy,
8661
8043
  search,
8662
- queryClient,
8663
- clientApiParams,
8664
- locale
8044
+ clientApiParams
8665
8045
  }) => {
8666
8046
  const clientApi = await GetClientAPI(clientApiParams);
8667
8047
  const { data } = await clientApi.get(`/levels/${levelId}/accounts`, {
@@ -8672,14 +8052,6 @@ var GetLevelSponsors = async ({
8672
8052
  search: search || void 0
8673
8053
  }
8674
8054
  });
8675
- if (queryClient && data.status === "ok") {
8676
- CacheIndividualQueries(
8677
- data,
8678
- queryClient,
8679
- (sponsorId) => ACCOUNT_QUERY_KEY(sponsorId),
8680
- locale
8681
- );
8682
- }
8683
8055
  return data;
8684
8056
  };
8685
8057
  var useGetLevelSponsors = (levelId = "", params = {}, options = {}) => {
@@ -8769,9 +8141,7 @@ var GetSelfEventListings = async ({
8769
8141
  orderBy,
8770
8142
  search,
8771
8143
  past,
8772
- queryClient,
8773
- clientApiParams,
8774
- locale
8144
+ clientApiParams
8775
8145
  }) => {
8776
8146
  const clientApi = await GetClientAPI(clientApiParams);
8777
8147
  const { data } = await clientApi.get(`/listings`, {
@@ -8783,14 +8153,6 @@ var GetSelfEventListings = async ({
8783
8153
  past: typeof past == "boolean" ? past : void 0
8784
8154
  }
8785
8155
  });
8786
- if (queryClient && data.status === "ok") {
8787
- CacheIndividualQueries(
8788
- data,
8789
- queryClient,
8790
- (eventId) => LISTING_QUERY_KEY(eventId),
8791
- locale
8792
- );
8793
- }
8794
8156
  return data;
8795
8157
  };
8796
8158
  var useGetSelfEventListings = (past = false, params = {}, options = {}) => {
@@ -9291,14 +8653,12 @@ var INTEREST_ACTIVITIES_QUERY_KEY = (interest) => [
9291
8653
  ...INTEREST_QUERY_KEY(interest)
9292
8654
  ];
9293
8655
  var GetInterestActivities = async ({
8656
+ interest,
9294
8657
  pageParam,
9295
8658
  pageSize,
9296
8659
  orderBy,
9297
8660
  search,
9298
- interest,
9299
- queryClient,
9300
- clientApiParams,
9301
- locale
8661
+ clientApiParams
9302
8662
  }) => {
9303
8663
  const clientApi = await GetClientAPI(clientApiParams);
9304
8664
  const { data } = await clientApi.get(`/interests/${interest}/activities`, {
@@ -9309,14 +8669,6 @@ var GetInterestActivities = async ({
9309
8669
  search: search || void 0
9310
8670
  }
9311
8671
  });
9312
- if (queryClient && data.status === "ok") {
9313
- CacheIndividualQueries(
9314
- data,
9315
- queryClient,
9316
- (activityId) => ACTIVITY_QUERY_KEY(activityId),
9317
- locale
9318
- );
9319
- }
9320
8672
  return data;
9321
8673
  };
9322
8674
  var useGetInterestActivities = (interest = "", params = {}, options = {}) => {
@@ -9625,9 +8977,7 @@ var GetIntegrations = async ({
9625
8977
  pageSize,
9626
8978
  orderBy,
9627
8979
  search,
9628
- queryClient,
9629
- clientApiParams,
9630
- locale
8980
+ clientApiParams
9631
8981
  }) => {
9632
8982
  const clientApi = await GetClientAPI(clientApiParams);
9633
8983
  const { data } = await clientApi.get(`/integrations`, {
@@ -9638,14 +8988,6 @@ var GetIntegrations = async ({
9638
8988
  search: search || void 0
9639
8989
  }
9640
8990
  });
9641
- if (queryClient && data.status === "ok") {
9642
- CacheIndividualQueries(
9643
- data,
9644
- queryClient,
9645
- (integrationId) => INTEGRATION_QUERY_KEY(integrationId),
9646
- locale
9647
- );
9648
- }
9649
8991
  return data;
9650
8992
  };
9651
8993
  var useGetIntegrations = (params = {}, options = {}) => {
@@ -14084,7 +13426,6 @@ var useCreateInterest = (options = {}) => {
14084
13426
  CONTENT_INTERESTS_QUERY_KEY,
14085
13427
  CONTENT_QUERY_KEY,
14086
13428
  CUSTOM_ERROR_CODES,
14087
- CacheIndividualQueries,
14088
13429
  CancelBooking,
14089
13430
  CancelGroupInvitation,
14090
13431
  CancelGroupRequest,