@connectedxm/client 0.0.61 → 0.0.78

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -128,6 +128,7 @@ __export(src_exports, {
128
128
  GetActivityComments: () => GetActivityComments,
129
129
  GetAdvertisement: () => GetAdvertisement,
130
130
  GetBenefits: () => GetBenefits,
131
+ GetClientAPI: () => GetClientAPI,
131
132
  GetCommunities: () => GetCommunities,
132
133
  GetCommunity: () => GetCommunity,
133
134
  GetCommunityActivities: () => GetCommunityActivities,
@@ -363,7 +364,6 @@ __export(src_exports, {
363
364
  UpdateSelfNotificationPreferences: () => UpdateSelfNotificationPreferences,
364
365
  UpdateSelfPushDevice: () => UpdateSelfPushDevice,
365
366
  UpdateSubscriptionPaymentMethod: () => UpdateSubscriptionPaymentMethod,
366
- getClientAPI: () => getClientAPI,
367
367
  isListing: () => isListing,
368
368
  isManagedCoupon: () => isManagedCoupon,
369
369
  isSelf: () => isSelf,
@@ -413,7 +413,6 @@ __export(src_exports, {
413
413
  useCancelSubscription: () => useCancelSubscription,
414
414
  useCancelTransfer: () => useCancelTransfer,
415
415
  useCaptureSelfEventRegistrationPayment: () => useCaptureSelfEventRegistrationPayment,
416
- useClientAPI: () => useClientAPI,
417
416
  useCompleteEventActivation: () => useCompleteEventActivation,
418
417
  useConnectedXM: () => useConnectedXM,
419
418
  useCreateCommunityAnnouncement: () => useCreateCommunityAnnouncement,
@@ -576,30 +575,15 @@ var ConnectedXMProvider = ({
576
575
  ...state
577
576
  }) => {
578
577
  const [ssr, setSSR] = import_react.default.useState(true);
579
- const [token, setToken] = import_react.default.useState();
580
- const [executeAs, setExecuteAs] = import_react.default.useState();
581
578
  import_react.default.useEffect(() => {
582
579
  setSSR(false);
583
580
  }, []);
584
581
  const render = () => {
585
- return /* @__PURE__ */ import_react.default.createElement(
586
- ConnectedXMClientContext.Provider,
587
- {
588
- value: {
589
- ...state,
590
- token,
591
- setToken,
592
- executeAs,
593
- setExecuteAs
594
- }
595
- },
596
- children
597
- );
582
+ return /* @__PURE__ */ import_react.default.createElement(ConnectedXMClientContext.Provider, { value: state }, children);
598
583
  };
599
584
  if (ssr)
600
585
  return /* @__PURE__ */ import_react.default.createElement(import_react_query.QueryClientProvider, { client: queryClient }, render());
601
- else
602
- return render();
586
+ return render();
603
587
  };
604
588
 
605
589
  // src/hooks/useConnectedXM.ts
@@ -612,36 +596,6 @@ var useConnectedXM = () => {
612
596
  return context;
613
597
  };
614
598
 
615
- // src/hooks/useClientAPI.ts
616
- var import_axios = __toESM(require("axios"));
617
- var getClientAPI = (apiUrl, organizationId, token, executeAs, locale) => {
618
- return import_axios.default.create({
619
- baseURL: apiUrl,
620
- headers: {
621
- authorization: token,
622
- organization: organizationId,
623
- executeAs,
624
- locale
625
- }
626
- });
627
- };
628
- var useClientAPI = (locale) => {
629
- const {
630
- apiUrl,
631
- token,
632
- organizationId,
633
- executeAs,
634
- locale: _locale
635
- } = useConnectedXM();
636
- return getClientAPI(
637
- apiUrl,
638
- organizationId,
639
- token,
640
- executeAs,
641
- locale || _locale
642
- );
643
- };
644
-
645
599
  // src/interfaces.ts
646
600
  var RegistrationStatus = /* @__PURE__ */ ((RegistrationStatus2) => {
647
601
  RegistrationStatus2["registered"] = "registered";
@@ -899,10 +853,10 @@ var AppendInfiniteQuery = (queryClient, key, newData) => {
899
853
  };
900
854
 
901
855
  // src/utilities/GetErrorMessage.ts
902
- var import_axios2 = __toESM(require("axios"));
856
+ var import_axios = __toESM(require("axios"));
903
857
  var GetErrorMessage = (error, fallback = "Something went wrong") => {
904
858
  let message = fallback;
905
- if (import_axios2.default.isAxiosError(error)) {
859
+ if (import_axios.default.isAxiosError(error)) {
906
860
  message = error.response?.data?.message || message;
907
861
  } else {
908
862
  message = error.message;
@@ -926,25 +880,33 @@ var GetBaseSingleQueryKeys = (locale) => {
926
880
  return [locale];
927
881
  };
928
882
  var useConnectedSingleQuery = (queryKeys, queryFn, options) => {
929
- const { locale, onModuleForbidden, onNotAuthorized, onNotFound } = useConnectedXM();
930
- const clientApi = useClientAPI(locale);
883
+ const {
884
+ locale,
885
+ onModuleForbidden,
886
+ onNotAuthorized,
887
+ onNotFound,
888
+ apiUrl,
889
+ organizationId,
890
+ getToken,
891
+ getExecuteAs
892
+ } = useConnectedXM();
931
893
  return (0, import_react_query2.useQuery)({
932
894
  staleTime: 60 * 1e3,
933
895
  // 60 Seconds
934
896
  retry: (failureCount, error) => {
935
897
  if (error.response?.status === 404) {
936
898
  if (onNotFound)
937
- onNotFound(error);
899
+ onNotFound(error, queryKeys);
938
900
  return false;
939
901
  }
940
902
  if (error.response?.status === 403) {
941
903
  if (onModuleForbidden)
942
- onModuleForbidden(error);
904
+ onModuleForbidden(error, queryKeys);
943
905
  return false;
944
906
  }
945
907
  if (error.response?.status === 401) {
946
908
  if (onNotAuthorized)
947
- onNotAuthorized(error);
909
+ onNotAuthorized(error, queryKeys);
948
910
  return false;
949
911
  }
950
912
  if (failureCount < 3)
@@ -954,7 +916,13 @@ var useConnectedSingleQuery = (queryKeys, queryFn, options) => {
954
916
  ...options,
955
917
  queryKey: [...queryKeys, ...GetBaseSingleQueryKeys(locale)],
956
918
  queryFn: () => queryFn({
957
- clientApi
919
+ clientApiParams: {
920
+ apiUrl,
921
+ organizationId,
922
+ getToken,
923
+ getExecuteAs,
924
+ locale
925
+ }
958
926
  })
959
927
  });
960
928
  };
@@ -1041,9 +1009,16 @@ var setFirstPageData = (response) => {
1041
1009
  };
1042
1010
  };
1043
1011
  var useConnectedInfiniteQuery = (queryKeys, queryFn, params = {}, options) => {
1044
- const { locale, onModuleForbidden, onNotAuthorized, onNotFound } = useConnectedXM();
1045
- const queryClient = (0, import_react_query3.useQueryClient)();
1046
- const clientApi = useClientAPI(locale);
1012
+ const {
1013
+ locale,
1014
+ onModuleForbidden,
1015
+ onNotAuthorized,
1016
+ onNotFound,
1017
+ apiUrl,
1018
+ getToken,
1019
+ organizationId,
1020
+ getExecuteAs
1021
+ } = useConnectedXM();
1047
1022
  const getNextPageParam = (lastPage, allPages) => {
1048
1023
  if (lastPage.data.length === params.pageSize) {
1049
1024
  return allPages.length + 1;
@@ -1056,17 +1031,17 @@ var useConnectedInfiniteQuery = (queryKeys, queryFn, params = {}, options) => {
1056
1031
  retry: (failureCount, error) => {
1057
1032
  if (error.response?.status === 404) {
1058
1033
  if (onNotFound)
1059
- onNotFound(error);
1034
+ onNotFound(error, queryKeys);
1060
1035
  return false;
1061
1036
  }
1062
1037
  if (error.response?.status === 403) {
1063
1038
  if (onModuleForbidden)
1064
- onModuleForbidden(error);
1039
+ onModuleForbidden(error, queryKeys);
1065
1040
  return false;
1066
1041
  }
1067
1042
  if (error.response?.status === 401) {
1068
1043
  if (onNotAuthorized)
1069
- onNotAuthorized(error);
1044
+ onNotAuthorized(error, queryKeys);
1070
1045
  return false;
1071
1046
  }
1072
1047
  if (failureCount < 3)
@@ -1078,12 +1053,34 @@ var useConnectedInfiniteQuery = (queryKeys, queryFn, params = {}, options) => {
1078
1053
  ...queryKeys,
1079
1054
  ...GetBaseInfiniteQueryKeys(params?.locale || locale, params?.search)
1080
1055
  ],
1081
- queryFn: ({ pageParam }) => queryFn({ ...params, pageSize: params.pageSize || 25, locale: params.locale || locale, pageParam, queryClient, clientApi }),
1056
+ queryFn: ({ pageParam }) => queryFn({ ...params, pageSize: params.pageSize || 25, locale: params.locale || locale, pageParam, clientApiParams: {
1057
+ apiUrl,
1058
+ getToken,
1059
+ organizationId,
1060
+ getExecuteAs,
1061
+ locale
1062
+ } }),
1082
1063
  initialPageParam: 1,
1083
1064
  getNextPageParam
1084
1065
  });
1085
1066
  };
1086
1067
 
1068
+ // src/ClientAPI.ts
1069
+ var import_axios2 = __toESM(require("axios"));
1070
+ var GetClientAPI = async (params) => {
1071
+ const token = await params.getToken();
1072
+ const executeAs = params.getExecuteAs ? await params.getExecuteAs() : void 0;
1073
+ return import_axios2.default.create({
1074
+ baseURL: params.apiUrl,
1075
+ headers: {
1076
+ organization: params.organizationId,
1077
+ locale: params.locale,
1078
+ authorization: token,
1079
+ executeAs
1080
+ }
1081
+ });
1082
+ };
1083
+
1087
1084
  // src/queries/accounts/useGetAccounts.ts
1088
1085
  var ACCOUNTS_QUERY_KEY = () => ["ACCOUNTS"];
1089
1086
  var SET_ACCOUNTS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
@@ -1100,9 +1097,10 @@ var GetAccounts = async ({
1100
1097
  orderBy,
1101
1098
  search,
1102
1099
  queryClient,
1103
- clientApi,
1100
+ clientApiParams,
1104
1101
  locale
1105
1102
  }) => {
1103
+ const clientApi = await GetClientAPI(clientApiParams);
1106
1104
  const { data } = await clientApi.get(`/accounts`, {
1107
1105
  params: {
1108
1106
  pageSize: pageSize || void 0,
@@ -1121,14 +1119,12 @@ var GetAccounts = async ({
1121
1119
  return data;
1122
1120
  };
1123
1121
  var useGetAccounts = (params = {}, options = {}) => {
1124
- const { token } = useConnectedXM();
1125
1122
  return useConnectedInfiniteQuery(
1126
1123
  ACCOUNTS_QUERY_KEY(),
1127
1124
  (params2) => GetAccounts({ ...params2 }),
1128
1125
  params,
1129
1126
  {
1130
- ...options,
1131
- enabled: !!token && (options?.enabled ?? true)
1127
+ ...options
1132
1128
  }
1133
1129
  );
1134
1130
  };
@@ -1149,19 +1145,19 @@ var SET_ACCOUNT_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) =>
1149
1145
  };
1150
1146
  var GetAccount = async ({
1151
1147
  accountId,
1152
- clientApi
1148
+ clientApiParams
1153
1149
  }) => {
1150
+ const clientApi = await GetClientAPI(clientApiParams);
1154
1151
  const { data } = await clientApi.get(`/accounts/${accountId}`);
1155
1152
  return data;
1156
1153
  };
1157
- var useGetAccount = (accountId, options = {}) => {
1158
- const { token } = useConnectedXM();
1154
+ var useGetAccount = (accountId = "", options = {}) => {
1159
1155
  return useConnectedSingleQuery(
1160
1156
  ACCOUNT_QUERY_KEY(accountId),
1161
1157
  (_params) => GetAccount({ accountId, ..._params }),
1162
1158
  {
1163
1159
  ...options,
1164
- enabled: !!token && !!accountId && (options?.enabled ?? true)
1160
+ enabled: !!accountId && (options?.enabled ?? true)
1165
1161
  }
1166
1162
  );
1167
1163
  };
@@ -1183,9 +1179,10 @@ var GetActivities = async ({
1183
1179
  orderBy,
1184
1180
  search,
1185
1181
  queryClient,
1186
- clientApi,
1182
+ clientApiParams,
1187
1183
  locale
1188
1184
  }) => {
1185
+ const clientApi = await GetClientAPI(clientApiParams);
1189
1186
  const { data } = await clientApi.get(`/activities`, {
1190
1187
  params: {
1191
1188
  page: pageParam || void 0,
@@ -1205,13 +1202,12 @@ var GetActivities = async ({
1205
1202
  return data;
1206
1203
  };
1207
1204
  var useGetActivities = (params = {}, options = {}) => {
1208
- const { token } = useConnectedXM();
1209
1205
  return useConnectedInfiniteQuery(
1210
1206
  ACTIVITIES_QUERY_KEY(),
1211
1207
  (params2) => GetActivities(params2),
1212
1208
  params,
1213
1209
  {
1214
- enabled: !!token && (options?.enabled ?? true)
1210
+ ...options
1215
1211
  }
1216
1212
  );
1217
1213
  };
@@ -1232,19 +1228,19 @@ var SET_ACTIVITY_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) =
1232
1228
  };
1233
1229
  var GetActivity = async ({
1234
1230
  activityId,
1235
- clientApi
1231
+ clientApiParams
1236
1232
  }) => {
1233
+ const clientApi = await GetClientAPI(clientApiParams);
1237
1234
  const { data } = await clientApi.get(`/activities/${activityId}`);
1238
1235
  return data;
1239
1236
  };
1240
- var useGetActivity = (activityId, options = {}) => {
1241
- const { token } = useConnectedXM();
1237
+ var useGetActivity = (activityId = "", options = {}) => {
1242
1238
  return useConnectedSingleQuery(
1243
1239
  ACTIVITY_QUERY_KEY(activityId),
1244
1240
  (params) => GetActivity({ activityId: activityId || "unknown", ...params }),
1245
1241
  {
1246
1242
  ...options,
1247
- enabled: !!token && !!activityId && (options?.enabled ?? true)
1243
+ enabled: !!activityId && (options?.enabled ?? true)
1248
1244
  }
1249
1245
  );
1250
1246
  };
@@ -1270,9 +1266,10 @@ var GetAccountActivities = async ({
1270
1266
  search,
1271
1267
  accountId,
1272
1268
  queryClient,
1273
- clientApi,
1269
+ clientApiParams,
1274
1270
  locale
1275
1271
  }) => {
1272
+ const clientApi = await GetClientAPI(clientApiParams);
1276
1273
  const { data } = await clientApi.get(`/accounts/${accountId}/activities`, {
1277
1274
  params: {
1278
1275
  page: pageParam || void 0,
@@ -1291,15 +1288,14 @@ var GetAccountActivities = async ({
1291
1288
  }
1292
1289
  return data;
1293
1290
  };
1294
- var useGetAccountActivities = (accountId, params = {}, options = {}) => {
1295
- const { token } = useConnectedXM();
1291
+ var useGetAccountActivities = (accountId = "", params = {}, options = {}) => {
1296
1292
  return useConnectedInfiniteQuery(
1297
1293
  ACCOUNT_ACTIVITIES_QUERY_KEY(accountId),
1298
1294
  (params2) => GetAccountActivities({ accountId, ...params2 }),
1299
1295
  params,
1300
1296
  {
1301
1297
  ...options,
1302
- enabled: !!token && !!accountId
1298
+ enabled: !!accountId
1303
1299
  }
1304
1300
  );
1305
1301
  };
@@ -1317,19 +1313,19 @@ var SET_ACCOUNT_BY_SHARE_CODE_QUERY_DATA = (client, keyParams, response, baseKey
1317
1313
  };
1318
1314
  var GetAccountByShareCode = async ({
1319
1315
  shareCode,
1320
- clientApi
1316
+ clientApiParams
1321
1317
  }) => {
1318
+ const clientApi = await GetClientAPI(clientApiParams);
1322
1319
  const { data } = await clientApi.get(`/accounts/shareCode/${shareCode}`);
1323
1320
  return data;
1324
1321
  };
1325
- var useGetAccountByShareCode = (shareCode, options = {}) => {
1326
- const { token } = useConnectedXM();
1322
+ var useGetAccountByShareCode = (shareCode = "", options = {}) => {
1327
1323
  return useConnectedSingleQuery(
1328
1324
  ACCOUNT_BY_SHARE_CODE_QUERY_KEY(shareCode),
1329
1325
  (params) => GetAccountByShareCode({ shareCode: shareCode || "unknown", ...params }),
1330
1326
  {
1331
1327
  ...options,
1332
- enabled: !!token && !!shareCode && (options?.enabled ?? true),
1328
+ enabled: !!shareCode && (options?.enabled ?? true),
1333
1329
  retry: false
1334
1330
  }
1335
1331
  );
@@ -1353,7 +1349,7 @@ var GetCommunities = async ({
1353
1349
  search,
1354
1350
  privateCommunities,
1355
1351
  queryClient,
1356
- clientApi,
1352
+ clientApiParams,
1357
1353
  locale
1358
1354
  }) => {
1359
1355
  if (privateCommunities) {
@@ -1363,6 +1359,7 @@ var GetCommunities = async ({
1363
1359
  data: []
1364
1360
  };
1365
1361
  }
1362
+ const clientApi = await GetClientAPI(clientApiParams);
1366
1363
  const { data } = await clientApi.get(`/communities`, {
1367
1364
  params: {
1368
1365
  page: pageParam || void 0,
@@ -1408,12 +1405,13 @@ var SET_COMMUNITY_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"],
1408
1405
  };
1409
1406
  var GetCommunity = async ({
1410
1407
  communityId,
1411
- clientApi
1408
+ clientApiParams
1412
1409
  }) => {
1410
+ const clientApi = await GetClientAPI(clientApiParams);
1413
1411
  const { data } = await clientApi.get(`/communities/${communityId}`);
1414
1412
  return data;
1415
1413
  };
1416
- var useGetCommunity = (communityId, options = {}) => {
1414
+ var useGetCommunity = (communityId = "", options = {}) => {
1417
1415
  return useConnectedSingleQuery(
1418
1416
  COMMUNITY_QUERY_KEY(communityId),
1419
1417
  (params) => GetCommunity({ communityId, ...params }),
@@ -1445,9 +1443,10 @@ var GetAccountCommunities = async ({
1445
1443
  search,
1446
1444
  accountId,
1447
1445
  queryClient,
1448
- clientApi,
1446
+ clientApiParams,
1449
1447
  locale
1450
1448
  }) => {
1449
+ const clientApi = await GetClientAPI(clientApiParams);
1451
1450
  const { data } = await clientApi.get(`/accounts/${accountId}/communities`, {
1452
1451
  params: {
1453
1452
  page: pageParam || void 0,
@@ -1466,15 +1465,14 @@ var GetAccountCommunities = async ({
1466
1465
  }
1467
1466
  return data;
1468
1467
  };
1469
- var useGetAccountCommunities = (accountId, params = {}, options = {}) => {
1470
- const { token } = useConnectedXM();
1468
+ var useGetAccountCommunities = (accountId = "", params = {}, options = {}) => {
1471
1469
  return useConnectedInfiniteQuery(
1472
1470
  ACCOUNT_COMMUNITIES_QUERY_KEY(accountId),
1473
1471
  (params2) => GetAccountCommunities({ accountId, ...params2 }),
1474
1472
  params,
1475
1473
  {
1476
1474
  ...options,
1477
- enabled: !!token && !!accountId && (options?.enabled ?? true)
1475
+ enabled: !!accountId && (options?.enabled ?? true)
1478
1476
  }
1479
1477
  );
1480
1478
  };
@@ -1500,9 +1498,10 @@ var GetAccountFollowers = async ({
1500
1498
  search,
1501
1499
  accountId,
1502
1500
  queryClient,
1503
- clientApi,
1501
+ clientApiParams,
1504
1502
  locale
1505
1503
  }) => {
1504
+ const clientApi = await GetClientAPI(clientApiParams);
1506
1505
  const { data } = await clientApi.get(`/accounts/${accountId}/followers`, {
1507
1506
  params: {
1508
1507
  page: pageParam || void 0,
@@ -1521,15 +1520,14 @@ var GetAccountFollowers = async ({
1521
1520
  }
1522
1521
  return data;
1523
1522
  };
1524
- var useGetAccountFollowers = (accountId, params = {}, options = {}) => {
1525
- const { token } = useConnectedXM();
1523
+ var useGetAccountFollowers = (accountId = "", params = {}, options = {}) => {
1526
1524
  return useConnectedInfiniteQuery(
1527
1525
  ACCOUNT_FOLLOWERS_QUERY_KEY(accountId),
1528
1526
  (params2) => GetAccountFollowers({ accountId, ...params2 }),
1529
1527
  params,
1530
1528
  {
1531
1529
  ...options,
1532
- enabled: !!token && !!accountId && (options?.enabled ?? true)
1530
+ enabled: !!accountId && (options?.enabled ?? true)
1533
1531
  }
1534
1532
  );
1535
1533
  };
@@ -1555,9 +1553,10 @@ var GetAccountFollowings = async ({
1555
1553
  search,
1556
1554
  accountId,
1557
1555
  queryClient,
1558
- clientApi,
1556
+ clientApiParams,
1559
1557
  locale
1560
1558
  }) => {
1559
+ const clientApi = await GetClientAPI(clientApiParams);
1561
1560
  const { data } = await clientApi.get(`/accounts/${accountId}/following`, {
1562
1561
  params: {
1563
1562
  page: pageParam || void 0,
@@ -1576,15 +1575,14 @@ var GetAccountFollowings = async ({
1576
1575
  }
1577
1576
  return data;
1578
1577
  };
1579
- var useGetAccountFollowings = (accountId, params = {}, options = {}) => {
1580
- const { token } = useConnectedXM();
1578
+ var useGetAccountFollowings = (accountId = "", params = {}, options = {}) => {
1581
1579
  return useConnectedInfiniteQuery(
1582
1580
  ACCOUNT_FOLLOWINGS_QUERY_KEY(accountId),
1583
1581
  (params2) => GetAccountFollowings({ accountId, ...params2 }),
1584
1582
  params,
1585
1583
  {
1586
1584
  ...options,
1587
- enabled: !!token && !!accountId && (options?.enabled ?? true)
1585
+ enabled: !!accountId && (options?.enabled ?? true)
1588
1586
  }
1589
1587
  );
1590
1588
  };
@@ -1610,9 +1608,10 @@ var GetActivityComments = async ({
1610
1608
  orderBy,
1611
1609
  search,
1612
1610
  queryClient,
1613
- clientApi,
1611
+ clientApiParams,
1614
1612
  locale
1615
1613
  }) => {
1614
+ const clientApi = await GetClientAPI(clientApiParams);
1616
1615
  const { data } = await clientApi.get(`/activities/${activityId}/comments`, {
1617
1616
  params: {
1618
1617
  page: pageParam || void 0,
@@ -1631,14 +1630,13 @@ var GetActivityComments = async ({
1631
1630
  }
1632
1631
  return data;
1633
1632
  };
1634
- var useGetActivityComments = (activityId, params = {}, options = {}) => {
1635
- const { token } = useConnectedXM();
1633
+ var useGetActivityComments = (activityId = "", params = {}, options = {}) => {
1636
1634
  return useConnectedInfiniteQuery(
1637
1635
  ACTIVITY_COMMENTS_QUERY_KEY(activityId),
1638
1636
  (params2) => GetActivityComments({ activityId, ...params2 }),
1639
1637
  params,
1640
1638
  {
1641
- enabled: !!token && !!activityId && (options?.enabled ?? true)
1639
+ enabled: !!activityId && (options?.enabled ?? true)
1642
1640
  }
1643
1641
  );
1644
1642
  };
@@ -1658,8 +1656,9 @@ var SET_ADVERTISEMENT_QUERY_DATA = (client, keyParams, response, baseKeys = ["en
1658
1656
  );
1659
1657
  };
1660
1658
  var GetAdvertisement = async ({
1661
- clientApi
1659
+ clientApiParams
1662
1660
  }) => {
1661
+ const clientApi = await GetClientAPI(clientApiParams);
1663
1662
  const { data } = await clientApi.get(`/advertisement`);
1664
1663
  return data;
1665
1664
  };
@@ -1690,8 +1689,9 @@ var GetBenefits = async ({
1690
1689
  pageSize,
1691
1690
  orderBy,
1692
1691
  search,
1693
- clientApi
1692
+ clientApiParams
1694
1693
  }) => {
1694
+ const clientApi = await GetClientAPI(clientApiParams);
1695
1695
  const { data } = await clientApi.get(`/benefits`, {
1696
1696
  params: {
1697
1697
  page: pageParam || void 0,
@@ -1703,14 +1703,12 @@ var GetBenefits = async ({
1703
1703
  return data;
1704
1704
  };
1705
1705
  var useGetBenefits = (params = {}, options = {}) => {
1706
- const { token } = useConnectedXM();
1707
1706
  return useConnectedInfiniteQuery(
1708
1707
  BENEFITS_QUERY_KEY(),
1709
1708
  (params2) => GetBenefits(params2),
1710
1709
  params,
1711
1710
  {
1712
- ...options,
1713
- enabled: !!token && (options?.enabled ?? true)
1711
+ ...options
1714
1712
  }
1715
1713
  );
1716
1714
  };
@@ -1733,9 +1731,10 @@ var GetCommunityActivities = async ({
1733
1731
  search,
1734
1732
  communityId,
1735
1733
  queryClient,
1736
- clientApi,
1734
+ clientApiParams,
1737
1735
  locale
1738
1736
  }) => {
1737
+ const clientApi = await GetClientAPI(clientApiParams);
1739
1738
  const { data } = await clientApi.get(
1740
1739
  `/communities/${communityId}/activities`,
1741
1740
  {
@@ -1757,15 +1756,14 @@ var GetCommunityActivities = async ({
1757
1756
  }
1758
1757
  return data;
1759
1758
  };
1760
- var useGetCommunityActivities = (communityId, params = {}, options = {}) => {
1761
- const { token } = useConnectedXM();
1759
+ var useGetCommunityActivities = (communityId = "", params = {}, options = {}) => {
1762
1760
  return useConnectedInfiniteQuery(
1763
1761
  COMMUNITY_ACTIVITIES_QUERY_KEY(communityId),
1764
1762
  (params2) => GetCommunityActivities({ communityId, ...params2 }),
1765
1763
  params,
1766
1764
  {
1767
1765
  ...options,
1768
- enabled: !!token && !!communityId && (options?.enabled ?? true)
1766
+ enabled: !!communityId && (options?.enabled ?? true)
1769
1767
  }
1770
1768
  );
1771
1769
  };
@@ -1787,8 +1785,9 @@ var GetCommunityAnnouncements = async ({
1787
1785
  pageSize,
1788
1786
  orderBy,
1789
1787
  search,
1790
- clientApi
1788
+ clientApiParams
1791
1789
  }) => {
1790
+ const clientApi = await GetClientAPI(clientApiParams);
1792
1791
  const { data } = await clientApi.get(
1793
1792
  `/communities/${communityId}/announcements`,
1794
1793
  {
@@ -1802,15 +1801,14 @@ var GetCommunityAnnouncements = async ({
1802
1801
  );
1803
1802
  return data;
1804
1803
  };
1805
- var useGetCommunityAnnouncements = (communityId, params = {}, options = {}) => {
1806
- const { token } = useConnectedXM();
1804
+ var useGetCommunityAnnouncements = (communityId = "", params = {}, options = {}) => {
1807
1805
  return useConnectedInfiniteQuery(
1808
1806
  COMMUNITY_ANNOUNCEMENTS_QUERY_KEY(communityId),
1809
1807
  (params2) => GetCommunityAnnouncements({ communityId, ...params2 }),
1810
1808
  params,
1811
1809
  {
1812
1810
  ...options,
1813
- enabled: !!token && !!communityId && (options?.enabled ?? true)
1811
+ enabled: !!communityId && (options?.enabled ?? true)
1814
1812
  }
1815
1813
  );
1816
1814
  };
@@ -1839,9 +1837,10 @@ var GetEvents = async ({
1839
1837
  search,
1840
1838
  past,
1841
1839
  queryClient,
1842
- clientApi,
1840
+ clientApiParams,
1843
1841
  locale
1844
1842
  }) => {
1843
+ const clientApi = await GetClientAPI(clientApiParams);
1845
1844
  const { data } = await clientApi.get(`/events`, {
1846
1845
  params: {
1847
1846
  page: pageParam || void 0,
@@ -1883,12 +1882,13 @@ var SET_EVENT_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
1883
1882
  };
1884
1883
  var GetEvent = async ({
1885
1884
  eventId,
1886
- clientApi
1885
+ clientApiParams
1887
1886
  }) => {
1887
+ const clientApi = await GetClientAPI(clientApiParams);
1888
1888
  const { data } = await clientApi.get(`/events/${eventId}`);
1889
1889
  return data;
1890
1890
  };
1891
- var useGetEvent = (eventId, options = {}) => {
1891
+ var useGetEvent = (eventId = "", options = {}) => {
1892
1892
  return useConnectedSingleQuery(
1893
1893
  EVENT_QUERY_KEY(eventId),
1894
1894
  (params) => GetEvent({ eventId, ...params }),
@@ -1922,9 +1922,10 @@ var GetCommunityEvents = async ({
1922
1922
  communityId,
1923
1923
  past,
1924
1924
  queryClient,
1925
- clientApi,
1925
+ clientApiParams,
1926
1926
  locale
1927
1927
  }) => {
1928
+ const clientApi = await GetClientAPI(clientApiParams);
1928
1929
  const { data } = await clientApi.get(`/communities/${communityId}/events`, {
1929
1930
  params: {
1930
1931
  page: pageParam || void 0,
@@ -1944,7 +1945,7 @@ var GetCommunityEvents = async ({
1944
1945
  }
1945
1946
  return data;
1946
1947
  };
1947
- var useGetCommunityEvents = (communityId, past = false, params = {}, options = {}) => {
1948
+ var useGetCommunityEvents = (communityId = "", past = false, params = {}, options = {}) => {
1948
1949
  return useConnectedInfiniteQuery(
1949
1950
  COMMUNITY_EVENTS_QUERY_KEY(communityId, past),
1950
1951
  (params2) => GetCommunityEvents({ communityId, past, ...params2 }),
@@ -1976,8 +1977,9 @@ var GetCommunityMembers = async ({
1976
1977
  orderBy,
1977
1978
  search,
1978
1979
  communityId,
1979
- clientApi
1980
+ clientApiParams
1980
1981
  }) => {
1982
+ const clientApi = await GetClientAPI(clientApiParams);
1981
1983
  const { data } = await clientApi.get(`/communities/${communityId}/members`, {
1982
1984
  params: {
1983
1985
  page: pageParam || void 0,
@@ -1988,15 +1990,14 @@ var GetCommunityMembers = async ({
1988
1990
  });
1989
1991
  return data;
1990
1992
  };
1991
- var useGetCommunityMembers = (communityId, params = {}, options = {}) => {
1992
- const { token } = useConnectedXM();
1993
+ var useGetCommunityMembers = (communityId = "", params = {}, options = {}) => {
1993
1994
  return useConnectedInfiniteQuery(
1994
1995
  COMMUNITY_MEMBERS_QUERY_KEY(communityId),
1995
1996
  (params2) => GetCommunityMembers({ communityId, ...params2 }),
1996
1997
  params,
1997
1998
  {
1998
1999
  ...options,
1999
- enabled: !!token && !!communityId && (options?.enabled ?? true)
2000
+ enabled: !!communityId && (options?.enabled ?? true)
2000
2001
  }
2001
2002
  );
2002
2003
  };
@@ -2018,8 +2019,9 @@ var GetCommunityModerators = async ({
2018
2019
  orderBy,
2019
2020
  search,
2020
2021
  communityId,
2021
- clientApi
2022
+ clientApiParams
2022
2023
  }) => {
2024
+ const clientApi = await GetClientAPI(clientApiParams);
2023
2025
  const { data } = await clientApi.get(
2024
2026
  `/communities/${communityId}/moderators`,
2025
2027
  {
@@ -2033,15 +2035,14 @@ var GetCommunityModerators = async ({
2033
2035
  );
2034
2036
  return data;
2035
2037
  };
2036
- var useGetCommunityModerators = (communityId, params = {}, options = {}) => {
2037
- const { token } = useConnectedXM();
2038
+ var useGetCommunityModerators = (communityId = "", params = {}, options = {}) => {
2038
2039
  return useConnectedInfiniteQuery(
2039
2040
  COMMUNITY_MODERATORS_QUERY_KEY(communityId),
2040
2041
  (params2) => GetCommunityModerators({ communityId, ...params2 }),
2041
2042
  params,
2042
2043
  {
2043
2044
  ...options,
2044
- enabled: !!token && !!communityId && (options?.enabled ?? true)
2045
+ enabled: !!communityId && (options?.enabled ?? true)
2045
2046
  }
2046
2047
  );
2047
2048
  };
@@ -2062,8 +2063,9 @@ var GetSponsors = async ({
2062
2063
  pageSize,
2063
2064
  orderBy,
2064
2065
  search,
2065
- clientApi
2066
+ clientApiParams
2066
2067
  }) => {
2068
+ const clientApi = await GetClientAPI(clientApiParams);
2067
2069
  const { data } = await clientApi.get(`/sponsors`, {
2068
2070
  params: {
2069
2071
  page: pageParam || void 0,
@@ -2099,12 +2101,13 @@ var SET_SPONSOR_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) =>
2099
2101
  };
2100
2102
  var GetSponsor = async ({
2101
2103
  accountId,
2102
- clientApi
2104
+ clientApiParams
2103
2105
  }) => {
2106
+ const clientApi = await GetClientAPI(clientApiParams);
2104
2107
  const { data } = await clientApi.get(`/sponsors/${accountId}`);
2105
2108
  return data;
2106
2109
  };
2107
- var useGetSponsor = (accountId, options = {}) => {
2110
+ var useGetSponsor = (accountId = "", options = {}) => {
2108
2111
  return useConnectedSingleQuery_default(
2109
2112
  SPONSOR_QUERY_KEY(accountId),
2110
2113
  (params) => GetSponsor({ accountId, ...params }),
@@ -2136,9 +2139,10 @@ var GetCommunitySponsors = async ({
2136
2139
  search,
2137
2140
  communityId,
2138
2141
  queryClient,
2139
- clientApi,
2142
+ clientApiParams,
2140
2143
  locale
2141
2144
  }) => {
2145
+ const clientApi = await GetClientAPI(clientApiParams);
2142
2146
  const { data } = await clientApi.get(`/communities/${communityId}/sponsors`, {
2143
2147
  params: {
2144
2148
  page: pageParam || void 0,
@@ -2157,7 +2161,7 @@ var GetCommunitySponsors = async ({
2157
2161
  }
2158
2162
  return data;
2159
2163
  };
2160
- var useGetCommunitySponsors = (communityId, params = {}, options = {}) => {
2164
+ var useGetCommunitySponsors = (communityId = "", params = {}, options = {}) => {
2161
2165
  return useConnectedInfiniteQuery(
2162
2166
  COMMUNITY_SPONSORS_QUERY_KEY(communityId),
2163
2167
  (params2) => GetCommunitySponsors({ communityId, ...params2 }),
@@ -2186,9 +2190,10 @@ var GetContents = async ({
2186
2190
  orderBy,
2187
2191
  search,
2188
2192
  queryClient,
2189
- clientApi,
2193
+ clientApiParams,
2190
2194
  locale
2191
2195
  }) => {
2196
+ const clientApi = await GetClientAPI(clientApiParams);
2192
2197
  const { data } = await clientApi.get(`/contents`, {
2193
2198
  params: {
2194
2199
  page: pageParam || void 0,
@@ -2232,12 +2237,13 @@ var SET_CONTENT_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) =>
2232
2237
  };
2233
2238
  var GetContent = async ({
2234
2239
  contentId,
2235
- clientApi
2240
+ clientApiParams
2236
2241
  }) => {
2242
+ const clientApi = await GetClientAPI(clientApiParams);
2237
2243
  const { data } = await clientApi.get(`/contents/${contentId}`);
2238
2244
  return data;
2239
2245
  };
2240
- var useGetContent = (contentId, options = {}) => {
2246
+ var useGetContent = (contentId = "", options = {}) => {
2241
2247
  return useConnectedSingleQuery_default(
2242
2248
  CONTENT_QUERY_KEY(contentId),
2243
2249
  (params) => GetContent({ contentId: contentId || "", ...params }),
@@ -2269,9 +2275,10 @@ var GetContentActivities = async ({
2269
2275
  search,
2270
2276
  contentId,
2271
2277
  queryClient,
2272
- clientApi,
2278
+ clientApiParams,
2273
2279
  locale
2274
2280
  }) => {
2281
+ const clientApi = await GetClientAPI(clientApiParams);
2275
2282
  const { data } = await clientApi.get(`/contents/${contentId}/activities`, {
2276
2283
  params: {
2277
2284
  page: pageParam || void 0,
@@ -2290,15 +2297,14 @@ var GetContentActivities = async ({
2290
2297
  }
2291
2298
  return data;
2292
2299
  };
2293
- var useGetContentActivities = (contentId, params = {}, options = {}) => {
2294
- const { token } = useConnectedXM();
2300
+ var useGetContentActivities = (contentId = "", params = {}, options = {}) => {
2295
2301
  return useConnectedInfiniteQuery(
2296
2302
  CONTENT_ACTIVITIES_QUERY_KEY(contentId),
2297
2303
  (params2) => GetContentActivities({ contentId, ...params2 }),
2298
2304
  params,
2299
2305
  {
2300
2306
  ...options,
2301
- enabled: !!token && !!contentId && (options.enabled ?? true)
2307
+ enabled: !!contentId && (options.enabled ?? true)
2302
2308
  }
2303
2309
  );
2304
2310
  };
@@ -2320,9 +2326,10 @@ var GetContentTypes = async ({
2320
2326
  orderBy,
2321
2327
  search,
2322
2328
  queryClient,
2323
- clientApi,
2329
+ clientApiParams,
2324
2330
  locale
2325
2331
  }) => {
2332
+ const clientApi = await GetClientAPI(clientApiParams);
2326
2333
  const { data } = await clientApi.get(`/contentTypes`, {
2327
2334
  params: {
2328
2335
  page: pageParam || void 0,
@@ -2366,12 +2373,13 @@ var SET_CONTENT_TYPE_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"
2366
2373
  };
2367
2374
  var GetContentType = async ({
2368
2375
  contentTypeId,
2369
- clientApi
2376
+ clientApiParams
2370
2377
  }) => {
2378
+ const clientApi = await GetClientAPI(clientApiParams);
2371
2379
  const { data } = await clientApi.get(`/contentTypes/${contentTypeId}`);
2372
2380
  return data;
2373
2381
  };
2374
- var useGetContentType = (contentTypeId, options = {}) => {
2382
+ var useGetContentType = (contentTypeId = "", options = {}) => {
2375
2383
  return useConnectedSingleQuery_default(
2376
2384
  CONTENT_TYPE_QUERY_KEY(contentTypeId),
2377
2385
  (params) => GetContentType({ contentTypeId: contentTypeId || "", ...params }),
@@ -2400,9 +2408,10 @@ var GetContentTypeContents = async ({
2400
2408
  search,
2401
2409
  contentTypeId,
2402
2410
  queryClient,
2403
- clientApi,
2411
+ clientApiParams,
2404
2412
  locale
2405
2413
  }) => {
2414
+ const clientApi = await GetClientAPI(clientApiParams);
2406
2415
  const { data } = await clientApi.get(
2407
2416
  `/contentTypes/${contentTypeId}/contents`,
2408
2417
  {
@@ -2424,7 +2433,7 @@ var GetContentTypeContents = async ({
2424
2433
  }
2425
2434
  return data;
2426
2435
  };
2427
- var useGetContentTypeContents = (contentTypeId, params = {}, options = {}) => {
2436
+ var useGetContentTypeContents = (contentTypeId = "", params = {}, options = {}) => {
2428
2437
  return useConnectedInfiniteQuery(
2429
2438
  CONTENT_TYPE_CONTENTS_QUERY_KEY(contentTypeId),
2430
2439
  (params2) => GetContentTypeContents({ ...params2, contentTypeId: contentTypeId || "" }),
@@ -2457,9 +2466,10 @@ var GetEventActivities = async ({
2457
2466
  orderBy,
2458
2467
  search,
2459
2468
  queryClient,
2460
- clientApi,
2469
+ clientApiParams,
2461
2470
  locale
2462
2471
  }) => {
2472
+ const clientApi = await GetClientAPI(clientApiParams);
2463
2473
  const { data } = await clientApi.get(`/events/${eventId}/activities`, {
2464
2474
  params: {
2465
2475
  page: pageParam || void 0,
@@ -2478,15 +2488,14 @@ var GetEventActivities = async ({
2478
2488
  }
2479
2489
  return data;
2480
2490
  };
2481
- var useGetEventActivities = (eventId, params = {}, options = {}) => {
2482
- const { token } = useConnectedXM();
2491
+ var useGetEventActivities = (eventId = "", params = {}, options = {}) => {
2483
2492
  return useConnectedInfiniteQuery(
2484
2493
  EVENT_ACTIVITIES_QUERY_KEY(eventId),
2485
2494
  (params2) => GetEventActivities({ eventId, ...params2 }),
2486
2495
  params,
2487
2496
  {
2488
2497
  ...options,
2489
- enabled: !!token && !!eventId
2498
+ enabled: !!eventId
2490
2499
  }
2491
2500
  );
2492
2501
  };
@@ -2512,9 +2521,10 @@ var GetEventFaqSections = async ({
2512
2521
  orderBy,
2513
2522
  search,
2514
2523
  queryClient,
2515
- clientApi,
2524
+ clientApiParams,
2516
2525
  locale
2517
2526
  }) => {
2527
+ const clientApi = await GetClientAPI(clientApiParams);
2518
2528
  const { data } = await clientApi.get(`/events/${eventId}/faqs`, {
2519
2529
  params: {
2520
2530
  page: pageParam || void 0,
@@ -2533,7 +2543,7 @@ var GetEventFaqSections = async ({
2533
2543
  }
2534
2544
  return data;
2535
2545
  };
2536
- var useGetEventFaqSections = (eventId, params = {}, options = {}) => {
2546
+ var useGetEventFaqSections = (eventId = "", params = {}, options = {}) => {
2537
2547
  return useConnectedInfiniteQuery(
2538
2548
  EVENT_FAQ_SECTIONS_QUERY_KEY(eventId),
2539
2549
  (params2) => GetEventFaqSections({ eventId, ...params2 }),
@@ -2559,12 +2569,13 @@ var SET_EVENT_FAQ_SECTION_QUERY_DATA = (client, keyParams, response, baseKeys =
2559
2569
  var GetEventFAQSection = async ({
2560
2570
  eventId,
2561
2571
  sectionId,
2562
- clientApi
2572
+ clientApiParams
2563
2573
  }) => {
2574
+ const clientApi = await GetClientAPI(clientApiParams);
2564
2575
  const { data } = await clientApi.get(`/events/${eventId}/faqs/${sectionId}`);
2565
2576
  return data;
2566
2577
  };
2567
- var useGetEventFAQSection = (eventId, sectionId, options = {}) => {
2578
+ var useGetEventFAQSection = (eventId = "", sectionId = "", options = {}) => {
2568
2579
  return useConnectedSingleQuery(
2569
2580
  EVENT_FAQ_SECTION_QUERY_KEY(eventId, sectionId),
2570
2581
  (params) => GetEventFAQSection({ eventId, sectionId, ...params }),
@@ -2597,9 +2608,10 @@ var GetEventFaqs = async ({
2597
2608
  orderBy,
2598
2609
  search,
2599
2610
  queryClient,
2600
- clientApi,
2611
+ clientApiParams,
2601
2612
  locale
2602
2613
  }) => {
2614
+ const clientApi = await GetClientAPI(clientApiParams);
2603
2615
  const { data } = await clientApi.get(
2604
2616
  `/events/${eventId}/faqs/${sectionId}/questions`,
2605
2617
  {
@@ -2621,7 +2633,7 @@ var GetEventFaqs = async ({
2621
2633
  }
2622
2634
  return data;
2623
2635
  };
2624
- var useGetEventFaqs = (eventId, sectionId, params = {}, options = {}) => {
2636
+ var useGetEventFaqs = (eventId = "", sectionId = "", params = {}, options = {}) => {
2625
2637
  return useConnectedInfiniteQuery(
2626
2638
  EVENT_FAQ_SECTION_QUESTIONS_QUERY_KEY(eventId, sectionId),
2627
2639
  (params2) => GetEventFaqs({ eventId, sectionId, ...params2 }),
@@ -2651,14 +2663,15 @@ var GetEventFAQSectionQuestion = async ({
2651
2663
  eventId,
2652
2664
  sectionId,
2653
2665
  questionId,
2654
- clientApi
2666
+ clientApiParams
2655
2667
  }) => {
2668
+ const clientApi = await GetClientAPI(clientApiParams);
2656
2669
  const { data } = await clientApi.get(
2657
2670
  `/events/${eventId}/faqs/${sectionId}/questions/${questionId}`
2658
2671
  );
2659
2672
  return data;
2660
2673
  };
2661
- var useGetEventFAQSectionQuestion = (eventId, sectionId, questionId, options = {}) => {
2674
+ var useGetEventFAQSectionQuestion = (eventId = "", sectionId = "", questionId = "", options = {}) => {
2662
2675
  return useConnectedSingleQuery(
2663
2676
  EVENT_FAQ_SECTION_QUESTION_QUERY_KEY(eventId, sectionId, questionId),
2664
2677
  (params) => GetEventFAQSectionQuestion({ eventId, sectionId, questionId, ...params }),
@@ -2690,9 +2703,10 @@ var GetEventPages = async ({
2690
2703
  orderBy,
2691
2704
  search,
2692
2705
  queryClient,
2693
- clientApi,
2706
+ clientApiParams,
2694
2707
  locale
2695
2708
  }) => {
2709
+ const clientApi = await GetClientAPI(clientApiParams);
2696
2710
  const { data } = await clientApi.get(`/events/${eventId}/pages`, {
2697
2711
  params: {
2698
2712
  page: pageParam || void 0,
@@ -2711,7 +2725,7 @@ var GetEventPages = async ({
2711
2725
  }
2712
2726
  return data;
2713
2727
  };
2714
- var useGetEventPages = (eventId, params = {}, options = {}) => {
2728
+ var useGetEventPages = (eventId = "", params = {}, options = {}) => {
2715
2729
  return useConnectedInfiniteQuery(
2716
2730
  EVENT_PAGES_QUERY_KEY(eventId),
2717
2731
  (params2) => GetEventPages({ eventId, ...params2 }),
@@ -2737,12 +2751,13 @@ var SET_EVENT_PAGE_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"])
2737
2751
  var GetEventPage = async ({
2738
2752
  eventId,
2739
2753
  pageId,
2740
- clientApi
2754
+ clientApiParams
2741
2755
  }) => {
2756
+ const clientApi = await GetClientAPI(clientApiParams);
2742
2757
  const { data } = await clientApi.get(`/events/${eventId}/pages/${pageId}`);
2743
2758
  return data;
2744
2759
  };
2745
- var useGetEventPage = (eventId, pageId, options = {}) => {
2760
+ var useGetEventPage = (eventId = "", pageId, options = {}) => {
2746
2761
  return useConnectedSingleQuery(
2747
2762
  EVENT_PAGE_QUERY_KEY(eventId, pageId),
2748
2763
  (params) => GetEventPage({ eventId, pageId, ...params }),
@@ -2762,8 +2777,9 @@ var GetEventQuestionSearchValues = async ({
2762
2777
  pageSize,
2763
2778
  orderBy,
2764
2779
  search,
2765
- clientApi
2780
+ clientApiParams
2766
2781
  }) => {
2782
+ const clientApi = await GetClientAPI(clientApiParams);
2767
2783
  const { data } = await clientApi.get(
2768
2784
  `/events/${eventId}/questions/${questionId}/values`,
2769
2785
  {
@@ -2777,7 +2793,7 @@ var GetEventQuestionSearchValues = async ({
2777
2793
  );
2778
2794
  return data;
2779
2795
  };
2780
- var useGetEventQuestionSearchValues = (eventId, questionId, params = {}, options = {}) => {
2796
+ var useGetEventQuestionSearchValues = (eventId = "", questionId = "", params = {}, options = {}) => {
2781
2797
  return useConnectedInfiniteQuery(
2782
2798
  EVENT_QUESTION_VALUES_QUERY_KEY(eventId, questionId),
2783
2799
  (params2) => GetEventQuestionSearchValues({
@@ -2814,9 +2830,10 @@ var GetEventRegistrants = async ({
2814
2830
  orderBy,
2815
2831
  search,
2816
2832
  queryClient,
2817
- clientApi,
2833
+ clientApiParams,
2818
2834
  locale
2819
2835
  }) => {
2836
+ const clientApi = await GetClientAPI(clientApiParams);
2820
2837
  const { data } = await clientApi.get(`/events/${eventId}/registrants`, {
2821
2838
  params: {
2822
2839
  page: pageParam || void 0,
@@ -2835,15 +2852,14 @@ var GetEventRegistrants = async ({
2835
2852
  }
2836
2853
  return data;
2837
2854
  };
2838
- var useGetEventRegistrants = (eventId, params = {}, options = {}) => {
2839
- const { token } = useConnectedXM();
2855
+ var useGetEventRegistrants = (eventId = "", params = {}, options = {}) => {
2840
2856
  return useConnectedInfiniteQuery(
2841
2857
  EVENT_REGISTRANTS_QUERY_KEY(eventId),
2842
2858
  (params2) => GetEventRegistrants({ eventId, ...params2 }),
2843
2859
  params,
2844
2860
  {
2845
2861
  ...options,
2846
- enabled: !!token && !!eventId && (options?.enabled ?? true)
2862
+ enabled: !!eventId && (options?.enabled ?? true)
2847
2863
  }
2848
2864
  );
2849
2865
  };
@@ -2869,9 +2885,10 @@ var GetEventSessions = async ({
2869
2885
  orderBy,
2870
2886
  search,
2871
2887
  queryClient,
2872
- clientApi,
2888
+ clientApiParams,
2873
2889
  locale
2874
2890
  }) => {
2891
+ const clientApi = await GetClientAPI(clientApiParams);
2875
2892
  const { data } = await clientApi.get(`/events/${eventId}/sessions`, {
2876
2893
  params: {
2877
2894
  page: pageParam || void 0,
@@ -2890,7 +2907,7 @@ var GetEventSessions = async ({
2890
2907
  }
2891
2908
  return data;
2892
2909
  };
2893
- var useGetEventSessions = (eventId, params = {}, options = {}) => {
2910
+ var useGetEventSessions = (eventId = "", params = {}, options = {}) => {
2894
2911
  return useConnectedInfiniteQuery(
2895
2912
  EVENT_SESSIONS_QUERY_KEY(eventId),
2896
2913
  (params2) => GetEventSessions({ eventId, ...params2 }),
@@ -2916,14 +2933,15 @@ var SET_EVENT_SESSION_QUERY_DATA = (client, keyParams, response, baseKeys = ["en
2916
2933
  var GetEventSession = async ({
2917
2934
  eventId,
2918
2935
  sessionId,
2919
- clientApi
2936
+ clientApiParams
2920
2937
  }) => {
2938
+ const clientApi = await GetClientAPI(clientApiParams);
2921
2939
  const { data } = await clientApi.get(
2922
2940
  `/events/${eventId}/sessions/${sessionId}`
2923
2941
  );
2924
2942
  return data;
2925
2943
  };
2926
- var useGetEventSession = (eventId, sessionId, options = {}) => {
2944
+ var useGetEventSession = (eventId = "", sessionId = "", options = {}) => {
2927
2945
  return useConnectedSingleQuery(
2928
2946
  EVENT_SESSION_QUERY_KEY(eventId, sessionId),
2929
2947
  (params) => GetEventSession({ eventId, sessionId, ...params }),
@@ -2955,9 +2973,10 @@ var GetEventSpeakers = async ({
2955
2973
  orderBy,
2956
2974
  search,
2957
2975
  queryClient,
2958
- clientApi,
2976
+ clientApiParams,
2959
2977
  locale
2960
2978
  }) => {
2979
+ const clientApi = await GetClientAPI(clientApiParams);
2961
2980
  const { data } = await clientApi.get(`/events/${eventId}/speakers`, {
2962
2981
  params: {
2963
2982
  page: pageParam || void 0,
@@ -2976,7 +2995,7 @@ var GetEventSpeakers = async ({
2976
2995
  }
2977
2996
  return data;
2978
2997
  };
2979
- var useGetEventSpeakers = (eventId, params = {}, options = {}) => {
2998
+ var useGetEventSpeakers = (eventId = "", params = {}, options = {}) => {
2980
2999
  return useConnectedInfiniteQuery(
2981
3000
  EVENT_SPEAKERS_QUERY_KEY(eventId),
2982
3001
  (params2) => GetEventSpeakers({ eventId, ...params2 }),
@@ -3002,14 +3021,15 @@ var SET_EVENT_SPEAKER_QUERY_DATA = (client, keyParams, response, baseKeys = ["en
3002
3021
  var GetEventSpeaker = async ({
3003
3022
  eventId,
3004
3023
  speakerId,
3005
- clientApi
3024
+ clientApiParams
3006
3025
  }) => {
3026
+ const clientApi = await GetClientAPI(clientApiParams);
3007
3027
  const { data } = await clientApi.get(
3008
3028
  `/events/${eventId}/speakers/${speakerId}`
3009
3029
  );
3010
3030
  return data;
3011
3031
  };
3012
- var useGetEventSpeaker = (eventId, speakerId, options = {}) => {
3032
+ var useGetEventSpeaker = (eventId = "", speakerId = "", options = {}) => {
3013
3033
  return useConnectedSingleQuery(
3014
3034
  EVENT_SPEAKER_QUERY_KEY(eventId, speakerId),
3015
3035
  (params) => GetEventSpeaker({ eventId, speakerId, ...params }),
@@ -3040,8 +3060,9 @@ var GetEventTickets = async ({
3040
3060
  pageSize,
3041
3061
  orderBy,
3042
3062
  search,
3043
- clientApi
3063
+ clientApiParams
3044
3064
  }) => {
3065
+ const clientApi = await GetClientAPI(clientApiParams);
3045
3066
  const { data } = await clientApi.get(`/events/${eventId}/tickets`, {
3046
3067
  params: {
3047
3068
  page: pageParam || void 0,
@@ -3052,7 +3073,7 @@ var GetEventTickets = async ({
3052
3073
  });
3053
3074
  return data;
3054
3075
  };
3055
- var useGetEventTickets = (eventId, params = {}, options = {}) => {
3076
+ var useGetEventTickets = (eventId = "", params = {}, options = {}) => {
3056
3077
  return useConnectedInfiniteQuery(
3057
3078
  EVENT_TICKETS_QUERY_KEY(eventId),
3058
3079
  (params2) => GetEventTickets({ eventId, ...params2 }),
@@ -3085,9 +3106,10 @@ var GetEventSponsors = async ({
3085
3106
  orderBy,
3086
3107
  search,
3087
3108
  queryClient,
3088
- clientApi,
3109
+ clientApiParams,
3089
3110
  locale
3090
3111
  }) => {
3112
+ const clientApi = await GetClientAPI(clientApiParams);
3091
3113
  const { data } = await clientApi.get(`/events/${eventId}/sponsors`, {
3092
3114
  params: {
3093
3115
  page: pageParam || void 0,
@@ -3106,7 +3128,7 @@ var GetEventSponsors = async ({
3106
3128
  }
3107
3129
  return data;
3108
3130
  };
3109
- var useGetEventSponsors = (eventId, params = {}, options = {}) => {
3131
+ var useGetEventSponsors = (eventId = "", params = {}, options = {}) => {
3110
3132
  return useConnectedInfiniteQuery(
3111
3133
  EVENT_TICKETS_QUERY_KEY(eventId),
3112
3134
  (params2) => GetEventSponsors({ eventId, ...params2 }),
@@ -3137,9 +3159,10 @@ var GetFeaturedEvents = async ({
3137
3159
  pageSize,
3138
3160
  orderBy,
3139
3161
  queryClient,
3140
- clientApi,
3162
+ clientApiParams,
3141
3163
  locale
3142
3164
  }) => {
3165
+ const clientApi = await GetClientAPI(clientApiParams);
3143
3166
  const { data } = await clientApi.get(`/events/featured`, {
3144
3167
  params: {
3145
3168
  page: pageParam || void 0,
@@ -3169,8 +3192,9 @@ var useGetFeaturedEvents = (params = {}, options = {}) => {
3169
3192
  // src/queries/organization/useGetOrganization.ts
3170
3193
  var ORGANIZATION_QUERY_KEY = () => ["ORGANIZATION"];
3171
3194
  var GetOrganization = async ({
3172
- clientApi
3195
+ clientApiParams
3173
3196
  }) => {
3197
+ const clientApi = await GetClientAPI(clientApiParams);
3174
3198
  const { data } = await clientApi.get(`/organization`);
3175
3199
  return data;
3176
3200
  };
@@ -3188,8 +3212,9 @@ var ORGANIZATION_EXPLORE_QUERY_KEY = () => [
3188
3212
  "ORGANIZATION"
3189
3213
  ];
3190
3214
  var GetOrganizationExplore = async ({
3191
- clientApi
3215
+ clientApiParams
3192
3216
  }) => {
3217
+ const clientApi = await GetClientAPI(clientApiParams);
3193
3218
  const { data } = await clientApi.get(`/organization/explore`);
3194
3219
  return data;
3195
3220
  };
@@ -3218,8 +3243,9 @@ var SET_ORGANIZATION_PAGE_QUERY_DATA = (queryClient, keyParams, response, baseKe
3218
3243
  };
3219
3244
  var GetOrganizationPage = async ({
3220
3245
  type,
3221
- clientApi
3246
+ clientApiParams
3222
3247
  }) => {
3248
+ const clientApi = await GetClientAPI(clientApiParams);
3223
3249
  const { data } = await clientApi.get(`/organization/pages/${type}`);
3224
3250
  return data;
3225
3251
  };
@@ -3240,8 +3266,9 @@ var ORGANIZATION_SUBSCRIPTIONS_QUERY_KEY = () => [
3240
3266
  "SUBSCRIPTIONS"
3241
3267
  ];
3242
3268
  var GetOrganizationSubscriptionProducts = async ({
3243
- clientApi
3269
+ clientApiParams
3244
3270
  }) => {
3271
+ const clientApi = await GetClientAPI(clientApiParams);
3245
3272
  const { data } = await clientApi.get(`/organization/subscriptions`);
3246
3273
  return data;
3247
3274
  };
@@ -3260,8 +3287,9 @@ var ORGANIZATION_PAYMENT_INTEGRATION_QUERY_KEY = () => [
3260
3287
  "PAYMENT_INTEGRATION"
3261
3288
  ];
3262
3289
  var GetOrganizationPaymentIntegration = async ({
3263
- clientApi
3290
+ clientApiParams
3264
3291
  }) => {
3292
+ const clientApi = await GetClientAPI(clientApiParams);
3265
3293
  const { data } = await clientApi.get(`/organization/payment-integration`);
3266
3294
  return data;
3267
3295
  };
@@ -3290,9 +3318,10 @@ var GetSelfChatChannels = async ({
3290
3318
  orderBy,
3291
3319
  search,
3292
3320
  queryClient,
3293
- clientApi,
3321
+ clientApiParams,
3294
3322
  locale
3295
3323
  }) => {
3324
+ const clientApi = await GetClientAPI(clientApiParams);
3296
3325
  const { data } = await clientApi.get(`/self/chat/channels`, {
3297
3326
  params: {
3298
3327
  page: pageParam || void 0,
@@ -3318,14 +3347,12 @@ var GetSelfChatChannels = async ({
3318
3347
  return data;
3319
3348
  };
3320
3349
  var useGetSelfChatChannels = (params = {}, options = {}) => {
3321
- const { token } = useConnectedXM();
3322
3350
  return useConnectedInfiniteQuery(
3323
3351
  SELF_CHAT_CHANNELS_QUERY_KEY(),
3324
3352
  (params2) => GetSelfChatChannels(params2),
3325
3353
  params,
3326
3354
  {
3327
- ...options,
3328
- enabled: !!token && (options?.enabled ?? true)
3355
+ ...options
3329
3356
  }
3330
3357
  );
3331
3358
  };
@@ -3346,13 +3373,13 @@ var SET_SELF_CHAT_CHANNEL_QUERY_DATA = (client, keyParams, response, baseKeys =
3346
3373
  };
3347
3374
  var GetSelfChatChannel = async ({
3348
3375
  channelId,
3349
- clientApi
3376
+ clientApiParams
3350
3377
  }) => {
3378
+ const clientApi = await GetClientAPI(clientApiParams);
3351
3379
  const { data } = await clientApi.get(`/self/chat/channels/${channelId}`);
3352
3380
  return data;
3353
3381
  };
3354
3382
  var useGetSelfChatChannel = (channelId, options = {}) => {
3355
- const { token } = useConnectedXM();
3356
3383
  return useConnectedSingleQuery(
3357
3384
  SELF_CHAT_CHANNEL_QUERY_KEY(channelId),
3358
3385
  (params) => GetSelfChatChannel({
@@ -3362,7 +3389,7 @@ var useGetSelfChatChannel = (channelId, options = {}) => {
3362
3389
  {
3363
3390
  staleTime: Infinity,
3364
3391
  ...options,
3365
- enabled: !!token && !!channelId && (options?.enabled ?? true)
3392
+ enabled: !!channelId && (options?.enabled ?? true)
3366
3393
  }
3367
3394
  );
3368
3395
  };
@@ -3384,8 +3411,9 @@ var GetSelfChatChannelMembers = async ({
3384
3411
  pageSize,
3385
3412
  orderBy,
3386
3413
  search,
3387
- clientApi
3414
+ clientApiParams
3388
3415
  }) => {
3416
+ const clientApi = await GetClientAPI(clientApiParams);
3389
3417
  const { data } = await clientApi.get(
3390
3418
  `/self/chat/channels/${channelId}/members`,
3391
3419
  {
@@ -3400,14 +3428,13 @@ var GetSelfChatChannelMembers = async ({
3400
3428
  return data;
3401
3429
  };
3402
3430
  var useGetSelfChatChannelMembers = (channelId, params = {}, options = {}) => {
3403
- const { token } = useConnectedXM();
3404
3431
  return useConnectedInfiniteQuery(
3405
3432
  SELF_CHAT_CHANNEL_MEMBERS_QUERY_KEY(channelId),
3406
3433
  (params2) => GetSelfChatChannelMembers({ ...params2, channelId }),
3407
3434
  params,
3408
3435
  {
3409
3436
  ...options,
3410
- enabled: !!token && !!channelId && (options?.enabled ?? true)
3437
+ enabled: !!channelId && (options?.enabled ?? true)
3411
3438
  }
3412
3439
  );
3413
3440
  };
@@ -3430,8 +3457,9 @@ var GetSelfChatChannelMessages = async ({
3430
3457
  orderBy,
3431
3458
  search,
3432
3459
  queryClient,
3433
- clientApi
3460
+ clientApiParams
3434
3461
  }) => {
3462
+ const clientApi = await GetClientAPI(clientApiParams);
3435
3463
  const { data } = await clientApi.get(
3436
3464
  `/self/chat/channels/${channelId}/messages`,
3437
3465
  {
@@ -3455,14 +3483,13 @@ var GetSelfChatChannelMessages = async ({
3455
3483
  return data;
3456
3484
  };
3457
3485
  var useGetSelfChatChannelMessages = (channelId, params = {}, options = {}) => {
3458
- const { token } = useConnectedXM();
3459
3486
  return useConnectedInfiniteQuery(
3460
3487
  SELF_CHAT_CHANNEL_MESSAGES_QUERY_KEY(channelId),
3461
3488
  (params2) => GetSelfChatChannelMessages({ ...params2, channelId }),
3462
3489
  params,
3463
3490
  {
3464
3491
  ...options,
3465
- enabled: !!token && !!channelId && (options?.enabled ?? true)
3492
+ enabled: !!channelId && (options?.enabled ?? true)
3466
3493
  }
3467
3494
  );
3468
3495
  };
@@ -3482,20 +3509,21 @@ var SET_SELF_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
3482
3509
  };
3483
3510
  var GetSelf = async ({
3484
3511
  authenticated,
3485
- clientApi
3512
+ clientApiParams
3486
3513
  }) => {
3487
- if (authenticated)
3488
- clientApi.defaults.headers.delete["executeAs"];
3514
+ const clientApi = await GetClientAPI({
3515
+ ...clientApiParams,
3516
+ getExecuteAs: authenticated ? void 0 : clientApiParams.getExecuteAs
3517
+ });
3489
3518
  const { data } = await clientApi.get(`/self`);
3490
3519
  return data;
3491
3520
  };
3492
3521
  var useGetSelf = (authenticated, options = {}) => {
3493
- const { token } = useConnectedXM();
3494
3522
  return useConnectedSingleQuery(
3495
3523
  SELF_QUERY_KEY(authenticated),
3496
3524
  (params) => GetSelf({ authenticated, ...params }),
3497
3525
  {
3498
- enabled: !!token && (options?.enabled ?? true)
3526
+ ...options
3499
3527
  }
3500
3528
  );
3501
3529
  };
@@ -3516,8 +3544,9 @@ var GetSelfEventRegistration = async ({
3516
3544
  ticket,
3517
3545
  quantity,
3518
3546
  coupon,
3519
- clientApi
3547
+ clientApiParams
3520
3548
  }) => {
3549
+ const clientApi = await GetClientAPI(clientApiParams);
3521
3550
  const { data } = await clientApi.get(`/self/events/${eventId}/registration`, {
3522
3551
  params: {
3523
3552
  ticket: ticket || void 0,
@@ -3528,7 +3557,6 @@ var GetSelfEventRegistration = async ({
3528
3557
  return data;
3529
3558
  };
3530
3559
  var useGetSelfEventRegistration = (eventId, ticket, quantity, coupon, options = {}) => {
3531
- const { token } = useConnectedXM();
3532
3560
  return useConnectedSingleQuery_default(
3533
3561
  SELF_EVENT_REGISTRATION_QUERY_KEY(eventId),
3534
3562
  (params) => GetSelfEventRegistration({
@@ -3543,7 +3571,7 @@ var useGetSelfEventRegistration = (eventId, ticket, quantity, coupon, options =
3543
3571
  staleTime: Infinity,
3544
3572
  refetchOnMount: false,
3545
3573
  ...options,
3546
- enabled: !!token && !!eventId && (options?.enabled ?? true)
3574
+ enabled: !!eventId && (options?.enabled ?? true)
3547
3575
  }
3548
3576
  );
3549
3577
  };
@@ -3557,15 +3585,15 @@ var SELF_EVENT_REGISTRATION_CHECKOUT_QUERY_KEY = (eventId, registrationId) => [
3557
3585
  var GetSelfEventRegistrationCheckout = async ({
3558
3586
  eventId,
3559
3587
  registrationId,
3560
- clientApi
3588
+ clientApiParams
3561
3589
  }) => {
3590
+ const clientApi = await GetClientAPI(clientApiParams);
3562
3591
  const { data } = await clientApi.get(
3563
3592
  `/self/events/${eventId}/registration/${registrationId}/draft/checkout`
3564
3593
  );
3565
3594
  return data;
3566
3595
  };
3567
3596
  var useGetSelfEventRegistrationCheckout = (eventId, registrationId = "", options = {}) => {
3568
- const { token } = useConnectedXM();
3569
3597
  return useConnectedSingleQuery_default(
3570
3598
  SELF_EVENT_REGISTRATION_CHECKOUT_QUERY_KEY(eventId, registrationId),
3571
3599
  (params) => GetSelfEventRegistrationCheckout({ eventId, registrationId, ...params }),
@@ -3574,7 +3602,7 @@ var useGetSelfEventRegistrationCheckout = (eventId, registrationId = "", options
3574
3602
  retry: false,
3575
3603
  retryOnMount: false,
3576
3604
  ...options,
3577
- enabled: !!token && !!eventId && !!registrationId
3605
+ enabled: !!eventId && !!registrationId
3578
3606
  }
3579
3607
  );
3580
3608
  };
@@ -3594,9 +3622,10 @@ var GetSelfSubscriptions = async ({
3594
3622
  orderBy,
3595
3623
  search,
3596
3624
  queryClient,
3597
- clientApi,
3625
+ clientApiParams,
3598
3626
  locale
3599
3627
  }) => {
3628
+ const clientApi = await GetClientAPI(clientApiParams);
3600
3629
  const { data } = await clientApi.get(`/self/subscriptions`, {
3601
3630
  params: {
3602
3631
  page: pageParam || void 0,
@@ -3617,14 +3646,12 @@ var GetSelfSubscriptions = async ({
3617
3646
  return data;
3618
3647
  };
3619
3648
  var useGetSelfSubscriptions = (status, params = {}, options = {}) => {
3620
- const { token } = useConnectedXM();
3621
3649
  return useConnectedInfiniteQuery(
3622
3650
  SELF_SUBSCRIPTIONS_QUERY_KEY(status),
3623
3651
  (params2) => GetSelfSubscriptions({ status, ...params2 }),
3624
3652
  params,
3625
3653
  {
3626
- ...options,
3627
- enabled: !!token
3654
+ ...options
3628
3655
  }
3629
3656
  );
3630
3657
  };
@@ -3633,19 +3660,19 @@ var useGetSelfSubscriptions = (status, params = {}, options = {}) => {
3633
3660
  var SELF_SUBSCRIPTION_QUERY_KEY = (subscriptionId) => [...SELF_SUBSCRIPTIONS_QUERY_KEY(), subscriptionId];
3634
3661
  var GetSelfSubcription = async ({
3635
3662
  subscriptionId,
3636
- clientApi
3663
+ clientApiParams
3637
3664
  }) => {
3665
+ const clientApi = await GetClientAPI(clientApiParams);
3638
3666
  const { data } = await clientApi.get(`/self/subscriptions/${subscriptionId}`);
3639
3667
  return data;
3640
3668
  };
3641
3669
  var useGetSelfSubcription = (subscriptionId = "", options = {}) => {
3642
- const { token } = useConnectedXM();
3643
3670
  return useConnectedSingleQuery(
3644
3671
  SELF_SUBSCRIPTION_QUERY_KEY(subscriptionId),
3645
3672
  (params) => GetSelfSubcription({ subscriptionId, ...params }),
3646
3673
  {
3647
3674
  ...options,
3648
- enabled: !!token && !!subscriptionId
3675
+ enabled: !!subscriptionId
3649
3676
  }
3650
3677
  );
3651
3678
  };
@@ -3658,8 +3685,9 @@ var GetSelfSubscriptionPayments = async ({
3658
3685
  pageSize,
3659
3686
  orderBy,
3660
3687
  search,
3661
- clientApi
3688
+ clientApiParams
3662
3689
  }) => {
3690
+ const clientApi = await GetClientAPI(clientApiParams);
3663
3691
  const { data } = await clientApi.get(
3664
3692
  `/self/subscriptions/${subscriptionId}/payments`,
3665
3693
  {
@@ -3674,14 +3702,12 @@ var GetSelfSubscriptionPayments = async ({
3674
3702
  return data;
3675
3703
  };
3676
3704
  var useGetSelfSubscriptionPayments = (subscriptionId, params = {}, options = {}) => {
3677
- const { token } = useConnectedXM();
3678
3705
  return useConnectedInfiniteQuery(
3679
3706
  SELF_SUBSCRIPTION_PAYMENTS_QUERY_KEY(subscriptionId),
3680
3707
  (params2) => GetSelfSubscriptionPayments({ ...params2, subscriptionId }),
3681
3708
  params,
3682
3709
  {
3683
- ...options,
3684
- enabled: !!token
3710
+ ...options
3685
3711
  }
3686
3712
  );
3687
3713
  };
@@ -3697,9 +3723,10 @@ var GetSelfActivities = async ({
3697
3723
  orderBy,
3698
3724
  search,
3699
3725
  queryClient,
3700
- clientApi,
3726
+ clientApiParams,
3701
3727
  locale
3702
3728
  }) => {
3729
+ const clientApi = await GetClientAPI(clientApiParams);
3703
3730
  const { data } = await clientApi.get(`/self/activities`, {
3704
3731
  params: {
3705
3732
  page: pageParam || void 0,
@@ -3719,14 +3746,13 @@ var GetSelfActivities = async ({
3719
3746
  return data;
3720
3747
  };
3721
3748
  var useGetSelfActivities = (params = {}, options = {}) => {
3722
- const { token } = useConnectedXM();
3723
3749
  return useConnectedInfiniteQuery(
3724
3750
  SELF_ACTIVITIES_QUERY_KEY(),
3725
3751
  (params2) => GetSelfActivities({ ...params2 }),
3726
3752
  params,
3727
3753
  {
3728
3754
  ...options,
3729
- enabled: !!token && (options.enabled ?? true)
3755
+ enabled: options.enabled ?? true
3730
3756
  }
3731
3757
  );
3732
3758
  };
@@ -3735,19 +3761,19 @@ var useGetSelfActivities = (params = {}, options = {}) => {
3735
3761
  var SELF_ANNOUNCEMENT_QUERY_KEY = (announcementId) => [...SELF_QUERY_KEY(), "ANNOUNCEMENT", announcementId];
3736
3762
  var GetSelfAnnouncement = async ({
3737
3763
  announcementId,
3738
- clientApi
3764
+ clientApiParams
3739
3765
  }) => {
3766
+ const clientApi = await GetClientAPI(clientApiParams);
3740
3767
  const { data } = await clientApi.get(`/self/announcements/${announcementId}`);
3741
3768
  return data;
3742
3769
  };
3743
3770
  var useGetSelfAnnouncement = (announcementId, options = {}) => {
3744
- const { token } = useConnectedXM();
3745
3771
  return useConnectedSingleQuery(
3746
3772
  SELF_ANNOUNCEMENT_QUERY_KEY(announcementId),
3747
3773
  (params) => GetSelfAnnouncement({ announcementId, ...params }),
3748
3774
  {
3749
3775
  ...options,
3750
- enabled: !!token && !!announcementId && (options?.enabled ?? true)
3776
+ enabled: !!announcementId && (options?.enabled ?? true)
3751
3777
  }
3752
3778
  );
3753
3779
  };
@@ -3762,8 +3788,9 @@ var GetSelfCommunityMemberships = async ({
3762
3788
  pageSize,
3763
3789
  orderBy,
3764
3790
  search,
3765
- clientApi
3791
+ clientApiParams
3766
3792
  }) => {
3793
+ const clientApi = await GetClientAPI(clientApiParams);
3767
3794
  const { data } = await clientApi.get(`/self/communities`, {
3768
3795
  params: {
3769
3796
  page: pageParam || void 0,
@@ -3775,14 +3802,12 @@ var GetSelfCommunityMemberships = async ({
3775
3802
  return data;
3776
3803
  };
3777
3804
  var useGetSelfCommunityMemberships = (params = {}, options = {}) => {
3778
- const { token } = useConnectedXM();
3779
3805
  return useConnectedInfiniteQuery(
3780
3806
  SELF_COMMUNITY_MEMBERSHIPS_QUERY_KEY(),
3781
3807
  (params2) => GetSelfCommunityMemberships({ ...params2 }),
3782
3808
  params,
3783
3809
  {
3784
- ...options,
3785
- enabled: !!token && (options?.enabled ?? true)
3810
+ ...options
3786
3811
  }
3787
3812
  );
3788
3813
  };
@@ -3800,21 +3825,21 @@ var SET_SELF_COMMUNITY_MEMBERSHIP_QUERY_DATA = (client, keyParams, response, bas
3800
3825
  };
3801
3826
  var GetSelfCommunityMembership = async ({
3802
3827
  communityId,
3803
- clientApi
3828
+ clientApiParams
3804
3829
  }) => {
3830
+ const clientApi = await GetClientAPI(clientApiParams);
3805
3831
  const { data } = await clientApi.get(
3806
3832
  `/self/communities/${communityId}/membership`
3807
3833
  );
3808
3834
  return data;
3809
3835
  };
3810
3836
  var useGetSelfCommunityMembership = (communityId, options = {}) => {
3811
- const { token } = useConnectedXM();
3812
3837
  return useConnectedSingleQuery(
3813
3838
  SELF_COMMUNITY_MEMBERSHIP_QUERY_KEY(communityId),
3814
3839
  (params) => GetSelfCommunityMembership({ communityId, ...params }),
3815
3840
  {
3816
3841
  ...options,
3817
- enabled: !!token && !!communityId && (options?.enabled ?? true)
3842
+ enabled: !!communityId && (options?.enabled ?? true)
3818
3843
  }
3819
3844
  );
3820
3845
  };
@@ -3830,9 +3855,10 @@ var GetSelfDelegateOf = async ({
3830
3855
  orderBy,
3831
3856
  search,
3832
3857
  queryClient,
3833
- clientApi,
3858
+ clientApiParams,
3834
3859
  locale
3835
3860
  }) => {
3861
+ const clientApi = await GetClientAPI(clientApiParams);
3836
3862
  const { data } = await clientApi.get(`/self/delegateof`, {
3837
3863
  params: {
3838
3864
  page: pageParam || void 0,
@@ -3852,14 +3878,12 @@ var GetSelfDelegateOf = async ({
3852
3878
  return data;
3853
3879
  };
3854
3880
  var useGetSelfDelegateOf = (params = {}, options = {}) => {
3855
- const { token } = useConnectedXM();
3856
3881
  return useConnectedInfiniteQuery(
3857
3882
  SELF_DELEGATE_OF_QUERY_KEY(),
3858
3883
  (params2) => GetSelfDelegateOf({ ...params2 }),
3859
3884
  params,
3860
3885
  {
3861
- ...options,
3862
- enabled: !!token
3886
+ ...options
3863
3887
  }
3864
3888
  );
3865
3889
  };
@@ -3875,9 +3899,10 @@ var GetSelfDelegates = async ({
3875
3899
  orderBy,
3876
3900
  search,
3877
3901
  queryClient,
3878
- clientApi,
3902
+ clientApiParams,
3879
3903
  locale
3880
3904
  }) => {
3905
+ const clientApi = await GetClientAPI(clientApiParams);
3881
3906
  const { data } = await clientApi.get(`/self/delegates`, {
3882
3907
  params: {
3883
3908
  page: pageParam || void 0,
@@ -3897,14 +3922,12 @@ var GetSelfDelegates = async ({
3897
3922
  return data;
3898
3923
  };
3899
3924
  var useGetSelfDelegates = (params = {}, options = {}) => {
3900
- const { token } = useConnectedXM();
3901
3925
  return useConnectedInfiniteQuery(
3902
3926
  SELF_DELEGATES_QUERY_KEY(),
3903
3927
  (params2) => GetSelfDelegates(params2),
3904
3928
  params,
3905
3929
  {
3906
- ...options,
3907
- enabled: !!token
3930
+ ...options
3908
3931
  }
3909
3932
  );
3910
3933
  };
@@ -3922,9 +3945,10 @@ var GetSelfEventListings = async ({
3922
3945
  search,
3923
3946
  past,
3924
3947
  queryClient,
3925
- clientApi,
3948
+ clientApiParams,
3926
3949
  locale
3927
3950
  }) => {
3951
+ const clientApi = await GetClientAPI(clientApiParams);
3928
3952
  const { data } = await clientApi.get(`/self/events/listings`, {
3929
3953
  params: {
3930
3954
  page: pageParam || void 0,
@@ -3945,14 +3969,12 @@ var GetSelfEventListings = async ({
3945
3969
  return data;
3946
3970
  };
3947
3971
  var useGetSelfEventListings = (past = false, params = {}, options = {}) => {
3948
- const { token } = useConnectedXM();
3949
3972
  return useConnectedInfiniteQuery(
3950
3973
  SELF_EVENT_LISTINGS_QUERY_KEY(past),
3951
3974
  (params2) => GetSelfEventListings({ past, ...params2 }),
3952
3975
  params,
3953
3976
  {
3954
- ...options,
3955
- enabled: !!token
3977
+ ...options
3956
3978
  }
3957
3979
  );
3958
3980
  };
@@ -3973,19 +3995,19 @@ var SET_SELF_EVENT_LISTING_QUERY_DATA = (client, keyParams, response, baseKeys =
3973
3995
  };
3974
3996
  var GetSelfEventListing = async ({
3975
3997
  eventId,
3976
- clientApi
3998
+ clientApiParams
3977
3999
  }) => {
4000
+ const clientApi = await GetClientAPI(clientApiParams);
3978
4001
  const { data } = await clientApi.get(`self/events/listings/${eventId}`);
3979
4002
  return data;
3980
4003
  };
3981
4004
  var useGetSelfEventListing = (eventId, options = {}) => {
3982
- const { token } = useConnectedXM();
3983
4005
  return useConnectedSingleQuery(
3984
4006
  SELF_EVENT_LISTING_QUERY_KEY(eventId),
3985
4007
  (params) => GetSelfEventListing({ eventId, ...params }),
3986
4008
  {
3987
4009
  ...options,
3988
- enabled: !!token && !!eventId && (options?.enabled ?? true)
4010
+ enabled: !!eventId && (options?.enabled ?? true)
3989
4011
  }
3990
4012
  );
3991
4013
  };
@@ -4003,8 +4025,9 @@ var GetSelfEventListingRegistrations = async ({
4003
4025
  orderBy,
4004
4026
  search,
4005
4027
  checkedIn,
4006
- clientApi
4028
+ clientApiParams
4007
4029
  }) => {
4030
+ const clientApi = await GetClientAPI(clientApiParams);
4008
4031
  const { data } = await clientApi.get(
4009
4032
  `/self/events/listings/${eventId}/registrations`,
4010
4033
  {
@@ -4020,14 +4043,13 @@ var GetSelfEventListingRegistrations = async ({
4020
4043
  return data;
4021
4044
  };
4022
4045
  var useGetSelfEventListingsRegistrations = (eventId, checkedIn = false, params = {}, options = {}) => {
4023
- const { token } = useConnectedXM();
4024
4046
  return useConnectedInfiniteQuery(
4025
4047
  SELF_EVENT_LISTING_REGISTRATIONS_QUERY_KEY(eventId, checkedIn),
4026
4048
  (params2) => GetSelfEventListingRegistrations({ eventId, checkedIn, ...params2 }),
4027
4049
  params,
4028
4050
  {
4029
4051
  ...options,
4030
- enabled: !!token && !!eventId && (options?.enabled ?? true)
4052
+ enabled: !!eventId && (options?.enabled ?? true)
4031
4053
  }
4032
4054
  );
4033
4055
  };
@@ -4045,9 +4067,10 @@ var GetSelfEvents = async ({
4045
4067
  search,
4046
4068
  past,
4047
4069
  queryClient,
4048
- clientApi,
4070
+ clientApiParams,
4049
4071
  locale
4050
4072
  }) => {
4073
+ const clientApi = await GetClientAPI(clientApiParams);
4051
4074
  const { data } = await clientApi.get(`/self/events`, {
4052
4075
  params: {
4053
4076
  page: pageParam || void 0,
@@ -4068,14 +4091,13 @@ var GetSelfEvents = async ({
4068
4091
  return data;
4069
4092
  };
4070
4093
  var useGetSelfEvents = (past = false, params = {}, options = {}) => {
4071
- const { token } = useConnectedXM();
4072
4094
  return useConnectedInfiniteQuery(
4073
4095
  SELF_EVENTS_QUERY_KEY(past),
4074
4096
  (params2) => GetSelfEvents({ ...params2, past }),
4075
4097
  params,
4076
4098
  {
4077
4099
  ...options,
4078
- enabled: !!token && (options.enabled ?? true)
4100
+ enabled: options.enabled ?? true
4079
4101
  }
4080
4102
  );
4081
4103
  };
@@ -4093,9 +4115,10 @@ var GetSelfEventSessions = async ({
4093
4115
  orderBy,
4094
4116
  search,
4095
4117
  queryClient,
4096
- clientApi,
4118
+ clientApiParams,
4097
4119
  locale
4098
4120
  }) => {
4121
+ const clientApi = await GetClientAPI(clientApiParams);
4099
4122
  const { data } = await clientApi.get(`/self/events/${eventId}/sessions`, {
4100
4123
  params: {
4101
4124
  eventId: eventId || void 0,
@@ -4116,14 +4139,13 @@ var GetSelfEventSessions = async ({
4116
4139
  return data;
4117
4140
  };
4118
4141
  var useGetSelfEventSessions = (eventId, params = {}, options = {}) => {
4119
- const { token } = useConnectedXM();
4120
4142
  return useConnectedInfiniteQuery(
4121
4143
  SELF_EVENT_SESSIONS_QUERY_KEY(eventId),
4122
4144
  (params2) => GetSelfEventSessions({ eventId, ...params2 }),
4123
4145
  params,
4124
4146
  {
4125
4147
  ...options,
4126
- enabled: !!token && !!eventId && (options.enabled ?? true)
4148
+ enabled: !!eventId && (options.enabled ?? true)
4127
4149
  }
4128
4150
  );
4129
4151
  };
@@ -4139,9 +4161,10 @@ var GetSelfFeed = async ({
4139
4161
  orderBy,
4140
4162
  search,
4141
4163
  queryClient,
4142
- clientApi,
4164
+ clientApiParams,
4143
4165
  locale
4144
4166
  }) => {
4167
+ const clientApi = await GetClientAPI(clientApiParams);
4145
4168
  const { data } = await clientApi.get(`/self/activities/feed`, {
4146
4169
  params: {
4147
4170
  page: pageParam || void 0,
@@ -4161,14 +4184,12 @@ var GetSelfFeed = async ({
4161
4184
  return data;
4162
4185
  };
4163
4186
  var useGetSelfFeed = (params = {}, options = {}) => {
4164
- const { token } = useConnectedXM();
4165
4187
  return useConnectedInfiniteQuery(
4166
4188
  SELF_FEED_QUERY_KEY(),
4167
4189
  (params2) => GetSelfFeed(params2),
4168
4190
  params,
4169
4191
  {
4170
- ...options,
4171
- enabled: !!token && (options?.enabled ?? true)
4192
+ ...options
4172
4193
  }
4173
4194
  );
4174
4195
  };
@@ -4183,8 +4204,9 @@ var GetSelfInterests = async ({
4183
4204
  pageSize,
4184
4205
  orderBy,
4185
4206
  search,
4186
- clientApi
4207
+ clientApiParams
4187
4208
  }) => {
4209
+ const clientApi = await GetClientAPI(clientApiParams);
4188
4210
  const { data } = await clientApi.get(`/self/interests`, {
4189
4211
  params: {
4190
4212
  page: pageParam || void 0,
@@ -4196,14 +4218,12 @@ var GetSelfInterests = async ({
4196
4218
  return data;
4197
4219
  };
4198
4220
  var useGetSelfInterests = (params = {}, options = {}) => {
4199
- const { token } = useConnectedXM();
4200
4221
  return useConnectedInfiniteQuery(
4201
4222
  SELF_INTERESTS_QUERY_KEY(),
4202
4223
  (params2) => GetSelfInterests({ ...params2 }),
4203
4224
  params,
4204
4225
  {
4205
- ...options,
4206
- enabled: !!token && (options?.enabled ?? true)
4226
+ ...options
4207
4227
  }
4208
4228
  );
4209
4229
  };
@@ -4214,19 +4234,18 @@ var SELF_PREFERENCES_QUERY_KEY = () => [
4214
4234
  "PREFERENCES"
4215
4235
  ];
4216
4236
  var GetSelfNotificationPreferences = async ({
4217
- clientApi
4237
+ clientApiParams
4218
4238
  }) => {
4239
+ const clientApi = await GetClientAPI(clientApiParams);
4219
4240
  const { data } = await clientApi.get(`/self/notificationPreferences`);
4220
4241
  return data;
4221
4242
  };
4222
4243
  var useGetSelfNotificationPreferences = (options = {}) => {
4223
- const { token } = useConnectedXM();
4224
4244
  return useConnectedSingleQuery(
4225
4245
  SELF_PREFERENCES_QUERY_KEY(),
4226
4246
  (params) => GetSelfNotificationPreferences({ ...params }),
4227
4247
  {
4228
- ...options,
4229
- enabled: !!token && (options?.enabled ?? true)
4248
+ ...options
4230
4249
  }
4231
4250
  );
4232
4251
  };
@@ -4243,8 +4262,9 @@ var GetSelfNotifications = async ({
4243
4262
  orderBy,
4244
4263
  search,
4245
4264
  filters,
4246
- clientApi
4265
+ clientApiParams
4247
4266
  }) => {
4267
+ const clientApi = await GetClientAPI(clientApiParams);
4248
4268
  const { data } = await clientApi.get(`/self/notifications`, {
4249
4269
  params: {
4250
4270
  page: pageParam || void 0,
@@ -4257,15 +4277,13 @@ var GetSelfNotifications = async ({
4257
4277
  return data;
4258
4278
  };
4259
4279
  var useGetSelfNotifications = (filters = "", params = {}, options = {}) => {
4260
- const { token } = useConnectedXM();
4261
4280
  return useConnectedInfiniteQuery(
4262
4281
  SELF_NOTIFICATIONS_QUERY_KEY(filters),
4263
4282
  (params2) => GetSelfNotifications({ ...params2, filters }),
4264
4283
  params,
4265
4284
  {
4266
4285
  staleTime: 0,
4267
- ...options,
4268
- enabled: !!token && (options?.enabled ?? true)
4286
+ ...options
4269
4287
  }
4270
4288
  );
4271
4289
  };
@@ -4274,8 +4292,9 @@ var useGetSelfNotifications = (filters = "", params = {}, options = {}) => {
4274
4292
  var SELF_NOTIFICATION_COUNT_QUERY_KEY = (filters) => [...SELF_QUERY_KEY(), "NOTIFICATION_COUNT", filters];
4275
4293
  var GetSelfNewNotificationsCount = async ({
4276
4294
  filters,
4277
- clientApi
4295
+ clientApiParams
4278
4296
  }) => {
4297
+ const clientApi = await GetClientAPI(clientApiParams);
4279
4298
  const { data } = await clientApi.get(`/self/notifications/count`, {
4280
4299
  params: {
4281
4300
  filters
@@ -4284,13 +4303,11 @@ var GetSelfNewNotificationsCount = async ({
4284
4303
  return data;
4285
4304
  };
4286
4305
  var useGetSelfNewNotificationsCount = (filters = "", options = {}) => {
4287
- const { token } = useConnectedXM();
4288
4306
  return useConnectedSingleQuery_default(
4289
4307
  SELF_NOTIFICATION_COUNT_QUERY_KEY(filters),
4290
4308
  (params) => GetSelfNewNotificationsCount({ filters, ...params }),
4291
4309
  {
4292
- ...options,
4293
- enabled: !!token && (options?.enabled ?? true)
4310
+ ...options
4294
4311
  }
4295
4312
  );
4296
4313
  };
@@ -4306,9 +4323,10 @@ var GetSelfPushDevices = async ({
4306
4323
  orderBy,
4307
4324
  search,
4308
4325
  queryClient,
4309
- clientApi,
4326
+ clientApiParams,
4310
4327
  locale
4311
4328
  }) => {
4329
+ const clientApi = await GetClientAPI(clientApiParams);
4312
4330
  const { data } = await clientApi.get(`/self/push-devices`, {
4313
4331
  params: {
4314
4332
  page: pageParam || void 0,
@@ -4328,14 +4346,12 @@ var GetSelfPushDevices = async ({
4328
4346
  return data;
4329
4347
  };
4330
4348
  var useGetSelfPushDevices = (params = {}, options = {}) => {
4331
- const { token } = useConnectedXM();
4332
4349
  return useConnectedInfiniteQuery(
4333
4350
  SELF_PUSH_DEVICES_QUERY_KEY(),
4334
4351
  (params2) => GetSelfPushDevices({ ...params2 }),
4335
4352
  params,
4336
4353
  {
4337
- ...options,
4338
- enabled: !!token
4354
+ ...options
4339
4355
  }
4340
4356
  );
4341
4357
  };
@@ -4356,19 +4372,19 @@ var SET_PUSH_DEVICE_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]
4356
4372
  };
4357
4373
  var GetSelfPushDevice = async ({
4358
4374
  pushDeviceId,
4359
- clientApi
4375
+ clientApiParams
4360
4376
  }) => {
4377
+ const clientApi = await GetClientAPI(clientApiParams);
4361
4378
  const { data } = await clientApi.get(`/self/push-devices/${pushDeviceId}`);
4362
4379
  return data;
4363
4380
  };
4364
4381
  var useGetSelfPushDevice = (pushDeviceId, options = {}) => {
4365
- const { token } = useConnectedXM();
4366
4382
  return useConnectedSingleQuery(
4367
4383
  SELF_PUSH_DEVICE_QUERY_KEY(pushDeviceId),
4368
4384
  (params) => GetSelfPushDevice({ pushDeviceId, ...params }),
4369
4385
  {
4370
4386
  ...options,
4371
- enabled: !!token && !!pushDeviceId && (options?.enabled ?? true)
4387
+ enabled: !!pushDeviceId && (options?.enabled ?? true)
4372
4388
  }
4373
4389
  );
4374
4390
  };
@@ -4388,9 +4404,10 @@ var GetSelfRecommendations = async ({
4388
4404
  eventId,
4389
4405
  type,
4390
4406
  queryClient,
4391
- clientApi,
4407
+ clientApiParams,
4392
4408
  locale
4393
4409
  }) => {
4410
+ const clientApi = await GetClientAPI(clientApiParams);
4394
4411
  const { data } = await clientApi.get(`/self/recommendations`, {
4395
4412
  params: {
4396
4413
  page: pageParam || void 0,
@@ -4412,14 +4429,12 @@ var GetSelfRecommendations = async ({
4412
4429
  return data;
4413
4430
  };
4414
4431
  var useGetSelfRecommendations = (type, eventId = "", params = {}, options = {}) => {
4415
- const { token } = useConnectedXM();
4416
4432
  return useConnectedInfiniteQuery(
4417
4433
  SELF_RECOMMENDATIONS_QUERY_KEY(type, eventId),
4418
4434
  (params2) => GetSelfRecommendations({ ...params2, eventId, type }),
4419
4435
  params,
4420
4436
  {
4421
- ...options,
4422
- enabled: !!token
4437
+ ...options
4423
4438
  }
4424
4439
  );
4425
4440
  };
@@ -4434,8 +4449,9 @@ var GetSelfTransfers = async ({
4434
4449
  pageSize,
4435
4450
  orderBy,
4436
4451
  search,
4437
- clientApi
4452
+ clientApiParams
4438
4453
  }) => {
4454
+ const clientApi = await GetClientAPI(clientApiParams);
4439
4455
  const { data } = await clientApi.get(`/self/transfers`, {
4440
4456
  params: {
4441
4457
  page: pageParam || void 0,
@@ -4447,14 +4463,12 @@ var GetSelfTransfers = async ({
4447
4463
  return data;
4448
4464
  };
4449
4465
  var useGetSelfTransfers = (params = {}, options = {}) => {
4450
- const { token } = useConnectedXM();
4451
4466
  return useConnectedInfiniteQuery(
4452
4467
  SELF_TRANSFERS_QUERY_KEY(),
4453
4468
  (params2) => GetSelfTransfers({ ...params2 }),
4454
4469
  params,
4455
4470
  {
4456
- ...options,
4457
- enabled: !!token && (options?.enabled ?? true)
4471
+ ...options
4458
4472
  }
4459
4473
  );
4460
4474
  };
@@ -4463,19 +4477,19 @@ var useGetSelfTransfers = (params = {}, options = {}) => {
4463
4477
  var SELF_PENDING_TRANSFER_QUERY_KEY = (transferId) => [...SELF_TRANSFERS_QUERY_KEY(), transferId];
4464
4478
  var GetSelfTransfer = async ({
4465
4479
  transferId,
4466
- clientApi
4480
+ clientApiParams
4467
4481
  }) => {
4482
+ const clientApi = await GetClientAPI(clientApiParams);
4468
4483
  const { data } = await clientApi.get(`/self/transfers/${transferId}`);
4469
4484
  return data;
4470
4485
  };
4471
4486
  var useGetSelfTransfer = (transferId = "", options = {}) => {
4472
- const { token } = useConnectedXM();
4473
4487
  return useConnectedSingleQuery(
4474
4488
  SELF_PENDING_TRANSFER_QUERY_KEY(transferId),
4475
4489
  (params) => GetSelfTransfer({ ...params, transferId }),
4476
4490
  {
4477
4491
  ...options,
4478
- enabled: !!token && !!transferId && (options?.enabled ?? true)
4492
+ enabled: !!transferId && (options?.enabled ?? true)
4479
4493
  }
4480
4494
  );
4481
4495
  };
@@ -4497,9 +4511,10 @@ var GetSeriesList = async ({
4497
4511
  orderBy,
4498
4512
  search,
4499
4513
  queryClient,
4500
- clientApi,
4514
+ clientApiParams,
4501
4515
  locale
4502
4516
  }) => {
4517
+ const clientApi = await GetClientAPI(clientApiParams);
4503
4518
  const { data } = await clientApi.get(`/series`, {
4504
4519
  params: {
4505
4520
  page: pageParam || void 0,
@@ -4540,12 +4555,13 @@ var SET_SERIES_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) =>
4540
4555
  };
4541
4556
  var GetSeries = async ({
4542
4557
  seriesId,
4543
- clientApi
4558
+ clientApiParams
4544
4559
  }) => {
4560
+ const clientApi = await GetClientAPI(clientApiParams);
4545
4561
  const { data } = await clientApi.get(`/series/${seriesId}`);
4546
4562
  return data;
4547
4563
  };
4548
- var useGetSeries = (seriesId, options = {}) => {
4564
+ var useGetSeries = (seriesId = "", options = {}) => {
4549
4565
  return useConnectedSingleQuery(
4550
4566
  SERIES_QUERY_KEY(seriesId),
4551
4567
  (params) => GetSeries({ seriesId, ...params }),
@@ -4577,9 +4593,10 @@ var GetSeriesEvents = async ({
4577
4593
  orderBy,
4578
4594
  search,
4579
4595
  queryClient,
4580
- clientApi,
4596
+ clientApiParams,
4581
4597
  locale
4582
4598
  }) => {
4599
+ const clientApi = await GetClientAPI(clientApiParams);
4583
4600
  const { data } = await clientApi.get(`/series/${seriesId}/events`, {
4584
4601
  params: {
4585
4602
  page: pageParam || void 0,
@@ -4598,7 +4615,7 @@ var GetSeriesEvents = async ({
4598
4615
  }
4599
4616
  return data;
4600
4617
  };
4601
- var useGetSeriesEvents = (seriesId, params = {}, options = {}) => {
4618
+ var useGetSeriesEvents = (seriesId = "", params = {}, options = {}) => {
4602
4619
  return useConnectedInfiniteQuery(
4603
4620
  SERIES_EVENTS_QUERY_KEY(seriesId),
4604
4621
  (params2) => GetSeriesEvents({ seriesId, ...params2 }),
@@ -4627,9 +4644,10 @@ var GetLevels = async ({
4627
4644
  orderBy,
4628
4645
  search,
4629
4646
  queryClient,
4630
- clientApi,
4647
+ clientApiParams,
4631
4648
  locale
4632
4649
  }) => {
4650
+ const clientApi = await GetClientAPI(clientApiParams);
4633
4651
  const { data } = await clientApi.get(`/levels`, {
4634
4652
  params: {
4635
4653
  page: pageParam || void 0,
@@ -4670,12 +4688,13 @@ var SET_LEVEL_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
4670
4688
  };
4671
4689
  var GetLevel = async ({
4672
4690
  levelId,
4673
- clientApi
4691
+ clientApiParams
4674
4692
  }) => {
4693
+ const clientApi = await GetClientAPI(clientApiParams);
4675
4694
  const { data } = await clientApi.get(`/levels/${levelId}`, {});
4676
4695
  return data;
4677
4696
  };
4678
- var useGetLevel = (levelId, options = {}) => {
4697
+ var useGetLevel = (levelId = "", options = {}) => {
4679
4698
  return useConnectedSingleQuery_default(
4680
4699
  LEVEL_QUERY_KEY(levelId),
4681
4700
  (params) => GetLevel({ levelId, ...params }),
@@ -4707,9 +4726,10 @@ var GetLevelSponsors = async ({
4707
4726
  orderBy,
4708
4727
  search,
4709
4728
  queryClient,
4710
- clientApi,
4729
+ clientApiParams,
4711
4730
  locale
4712
4731
  }) => {
4732
+ const clientApi = await GetClientAPI(clientApiParams);
4713
4733
  const { data } = await clientApi.get(`/levels/${levelId}/accounts`, {
4714
4734
  params: {
4715
4735
  page: pageParam || void 0,
@@ -4728,7 +4748,7 @@ var GetLevelSponsors = async ({
4728
4748
  }
4729
4749
  return data;
4730
4750
  };
4731
- var useGetLevelSponsors = (levelId, params = {}, options = {}) => {
4751
+ var useGetLevelSponsors = (levelId = "", params = {}, options = {}) => {
4732
4752
  return useConnectedInfiniteQuery(
4733
4753
  LEVEL_SPONSORS_QUERY_KEY(levelId),
4734
4754
  (params2) => GetLevelSponsors({ levelId, ...params2 }),
@@ -4743,15 +4763,20 @@ var useGetLevelSponsors = (levelId, params = {}, options = {}) => {
4743
4763
  // src/mutations/useConnectedMutation.ts
4744
4764
  var import_react_query4 = require("@tanstack/react-query");
4745
4765
  var useConnectedMutation = (mutation, params, options) => {
4746
- const { locale } = useConnectedXM();
4766
+ const { locale, apiUrl, getToken, organizationId, getExecuteAs } = useConnectedXM();
4747
4767
  const queryClient = (0, import_react_query4.useQueryClient)();
4748
- const clientApi = useClientAPI();
4749
4768
  return (0, import_react_query4.useMutation)({
4750
4769
  mutationFn: (data) => mutation({
4751
- locale: params?.locale || locale,
4752
- ...data,
4753
4770
  queryClient,
4754
- clientApi
4771
+ locale: params?.locale || locale,
4772
+ clientApiParams: {
4773
+ apiUrl,
4774
+ getToken,
4775
+ organizationId,
4776
+ getExecuteAs,
4777
+ locale: params?.locale || locale
4778
+ },
4779
+ ...data
4755
4780
  }),
4756
4781
  ...options
4757
4782
  });
@@ -4761,10 +4786,11 @@ var useConnectedMutation_default = useConnectedMutation;
4761
4786
  // src/mutations/accounts/useFollowAccount.ts
4762
4787
  var FollowAccount = async ({
4763
4788
  accountId,
4764
- clientApi,
4789
+ clientApiParams,
4765
4790
  queryClient,
4766
4791
  locale = "en"
4767
4792
  }) => {
4793
+ const clientApi = await GetClientAPI(clientApiParams);
4768
4794
  const { data } = await clientApi.post(
4769
4795
  `/accounts/${accountId}/follow`
4770
4796
  );
@@ -4784,10 +4810,11 @@ var useFollowAccount = (params = {}, options = {}) => {
4784
4810
  // src/mutations/accounts/useUnfollowAccount.ts
4785
4811
  var UnfollowAccount = async ({
4786
4812
  accountId,
4787
- clientApi,
4813
+ clientApiParams,
4788
4814
  queryClient,
4789
4815
  locale = "en"
4790
4816
  }) => {
4817
+ const clientApi = await GetClientAPI(clientApiParams);
4791
4818
  const { data } = await clientApi.post(
4792
4819
  `/accounts/${accountId}/unfollow`
4793
4820
  );
@@ -4862,7 +4889,7 @@ var UpdateResharesInfinite = (increment, queryClient, KEY, activityId) => {
4862
4889
  // src/mutations/activities/useDeleteReshare.ts
4863
4890
  var DeleteReshare = async ({
4864
4891
  activityId,
4865
- clientApi,
4892
+ clientApiParams,
4866
4893
  queryClient
4867
4894
  }) => {
4868
4895
  if (queryClient) {
@@ -4874,6 +4901,7 @@ var DeleteReshare = async ({
4874
4901
  activityId
4875
4902
  );
4876
4903
  }
4904
+ const clientApi = await GetClientAPI(clientApiParams);
4877
4905
  const { data } = await clientApi.delete(
4878
4906
  `/self/activities/${activityId}/reshares`
4879
4907
  );
@@ -4941,13 +4969,14 @@ var UpdateLikesInfinite = (increment, queryClient, KEY, activityId) => {
4941
4969
  // src/mutations/activities/useLikeActivity.ts
4942
4970
  var LikeActivity = async ({
4943
4971
  activityId,
4944
- clientApi,
4972
+ clientApiParams,
4945
4973
  queryClient
4946
4974
  }) => {
4947
4975
  if (queryClient) {
4948
4976
  UpdateLikesSingle(true, queryClient, ACTIVITY_QUERY_KEY(activityId));
4949
4977
  UpdateLikesInfinite(true, queryClient, ACTIVITIES_QUERY_KEY(), activityId);
4950
4978
  }
4979
+ const clientApi = await GetClientAPI(clientApiParams);
4951
4980
  const { data } = await clientApi.post(
4952
4981
  `/self/activities/${activityId}/likes`
4953
4982
  );
@@ -4961,7 +4990,7 @@ var useLikeActivity = (params = {}, options = {}) => {
4961
4990
  var ReshareActivity = async ({
4962
4991
  activityId,
4963
4992
  queryClient,
4964
- clientApi
4993
+ clientApiParams
4965
4994
  }) => {
4966
4995
  if (queryClient) {
4967
4996
  UpdateResharesSingle(true, queryClient, ACTIVITY_QUERY_KEY(activityId));
@@ -4972,6 +5001,7 @@ var ReshareActivity = async ({
4972
5001
  activityId
4973
5002
  );
4974
5003
  }
5004
+ const clientApi = await GetClientAPI(clientApiParams);
4975
5005
  const { data } = await clientApi.post(
4976
5006
  `/self/activities/${activityId}/reshares`,
4977
5007
  {
@@ -4987,13 +5017,14 @@ var useReshareActivity = (params = {}, options = {}) => {
4987
5017
  // src/mutations/activities/useUnlikeActivity.ts
4988
5018
  var UnlikeActivity = async ({
4989
5019
  activityId,
4990
- clientApi,
5020
+ clientApiParams,
4991
5021
  queryClient
4992
5022
  }) => {
4993
5023
  if (queryClient) {
4994
5024
  UpdateLikesSingle(false, queryClient, ACTIVITY_QUERY_KEY(activityId));
4995
5025
  UpdateLikesInfinite(false, queryClient, ACTIVITIES_QUERY_KEY(), activityId);
4996
5026
  }
5027
+ const clientApi = await GetClientAPI(clientApiParams);
4997
5028
  const { data } = await clientApi.delete(
4998
5029
  `/self/activities/${activityId}/likes`
4999
5030
  );
@@ -5007,9 +5038,10 @@ var useUnlikeActivity = (params = {}, options = {}) => {
5007
5038
  var AddCommunityEvent = async ({
5008
5039
  communityId,
5009
5040
  eventId,
5010
- clientApi,
5041
+ clientApiParams,
5011
5042
  queryClient
5012
5043
  }) => {
5044
+ const clientApi = await GetClientAPI(clientApiParams);
5013
5045
  const { data } = await clientApi.post(
5014
5046
  `/communityModerator/${communityId}/events/${eventId}`
5015
5047
  );
@@ -5037,9 +5069,10 @@ var CreateCommunityAnnouncement = async ({
5037
5069
  html,
5038
5070
  email,
5039
5071
  push,
5040
- clientApi,
5072
+ clientApiParams,
5041
5073
  queryClient
5042
5074
  }) => {
5075
+ const clientApi = await GetClientAPI(clientApiParams);
5043
5076
  const { data } = await clientApi.post(
5044
5077
  `/communityModerator/${communityId}/announcements`,
5045
5078
  {
@@ -5066,9 +5099,10 @@ var useCreateCommunityAnnouncement = (params = {}, options = {}) => {
5066
5099
  var RemoveCommunityEvent = async ({
5067
5100
  communityId,
5068
5101
  eventId,
5069
- clientApi,
5102
+ clientApiParams,
5070
5103
  queryClient
5071
5104
  }) => {
5105
+ const clientApi = await GetClientAPI(clientApiParams);
5072
5106
  const { data } = await clientApi.delete(
5073
5107
  `/communityModerator/${communityId}/events/${eventId}`
5074
5108
  );
@@ -5095,10 +5129,11 @@ var UpdateCommunity = async ({
5095
5129
  description,
5096
5130
  externalUrl,
5097
5131
  base64,
5098
- clientApi,
5132
+ clientApiParams,
5099
5133
  queryClient,
5100
5134
  locale = "en"
5101
5135
  }) => {
5136
+ const clientApi = await GetClientAPI(clientApiParams);
5102
5137
  const { data } = await clientApi.put(
5103
5138
  `/communityModerator/${communityId}`,
5104
5139
  {
@@ -5125,9 +5160,10 @@ var CompleteEventActivation = async ({
5125
5160
  eventId,
5126
5161
  activationId,
5127
5162
  code,
5128
- clientApi,
5163
+ clientApiParams,
5129
5164
  queryClient
5130
5165
  }) => {
5166
+ const clientApi = await GetClientAPI(clientApiParams);
5131
5167
  const { data } = await clientApi.post(
5132
5168
  `/events/${eventId}/activations/${activationId}`,
5133
5169
  {
@@ -5147,9 +5183,10 @@ var CreateEventLead = async ({
5147
5183
  eventId,
5148
5184
  purchaseId,
5149
5185
  note,
5150
- clientApi,
5186
+ clientApiParams,
5151
5187
  queryClient
5152
5188
  }) => {
5189
+ const clientApi = await GetClientAPI(clientApiParams);
5153
5190
  const { data } = await clientApi.post(
5154
5191
  `/events/${eventId}/leads/${purchaseId}`,
5155
5192
  {
@@ -5168,9 +5205,10 @@ var useCreateEventLead = (params = {}, options = {}) => {
5168
5205
  var AddSelfChatChannelMember = async ({
5169
5206
  channelId,
5170
5207
  accountId,
5171
- clientApi,
5208
+ clientApiParams,
5172
5209
  queryClient
5173
5210
  }) => {
5211
+ const clientApi = await GetClientAPI(clientApiParams);
5174
5212
  const { data } = await clientApi.post(
5175
5213
  `/self/chat/channels/${channelId}/members/${accountId}`
5176
5214
  );
@@ -5189,9 +5227,10 @@ var useAddSelfChatChannelMember = (params = {}, options = {}) => {
5189
5227
  var CreateSelfChatChannel = async ({
5190
5228
  name,
5191
5229
  accountIds,
5192
- clientApi,
5230
+ clientApiParams,
5193
5231
  queryClient
5194
5232
  }) => {
5233
+ const clientApi = await GetClientAPI(clientApiParams);
5195
5234
  const { data } = await clientApi.post(
5196
5235
  `/self/chat/channels`,
5197
5236
  {
@@ -5215,8 +5254,9 @@ var CreateSelfChatChannelMessage = async ({
5215
5254
  channelId,
5216
5255
  text,
5217
5256
  queryClient,
5218
- clientApi
5257
+ clientApiParams
5219
5258
  }) => {
5259
+ const clientApi = await GetClientAPI(clientApiParams);
5220
5260
  const { data } = await clientApi.post(`/self/chat/channels/${channelId}/messages`, {
5221
5261
  text
5222
5262
  });
@@ -5231,9 +5271,10 @@ var useCreateSelfChatChannelMessage = (params = {}, options = {}) => {
5231
5271
  // src/mutations/self/chat/useDeleteSelfChatChannel.ts
5232
5272
  var DeleteSelfChatChannel = async ({
5233
5273
  channelId,
5234
- clientApi,
5274
+ clientApiParams,
5235
5275
  queryClient
5236
5276
  }) => {
5277
+ const clientApi = await GetClientAPI(clientApiParams);
5237
5278
  const { data } = await clientApi.delete(
5238
5279
  `/self/chat/channels/${channelId}`
5239
5280
  );
@@ -5253,9 +5294,10 @@ var useDeleteSelfChatChannel = (params = {}, options = {}) => {
5253
5294
  var DeleteSelfChatChannelMessage = async ({
5254
5295
  channelId,
5255
5296
  messageId,
5256
- clientApi,
5297
+ clientApiParams,
5257
5298
  queryClient
5258
5299
  }) => {
5300
+ const clientApi = await GetClientAPI(clientApiParams);
5259
5301
  const { data } = await clientApi.delete(
5260
5302
  `/self/chat/channels/${channelId}/messages/${messageId}`
5261
5303
  );
@@ -5273,9 +5315,10 @@ var useDeleteSelfChatChannelMessage = (params = {}, options = {}) => {
5273
5315
  // src/mutations/self/chat/useLeaveSelfChatChannel.ts
5274
5316
  var LeaveSelfChatChannel = async ({
5275
5317
  channelId,
5276
- clientApi,
5318
+ clientApiParams,
5277
5319
  queryClient
5278
5320
  }) => {
5321
+ const clientApi = await GetClientAPI(clientApiParams);
5279
5322
  const { data } = await clientApi.delete(
5280
5323
  `/self/chat/channels/${channelId}/leave`
5281
5324
  );
@@ -5295,10 +5338,11 @@ var useLeaveSelfChatChannel = (params = {}, options = {}) => {
5295
5338
  var UpdateSelfChatChannelNotifications = async ({
5296
5339
  channelId,
5297
5340
  notifications,
5298
- clientApi,
5341
+ clientApiParams,
5299
5342
  queryClient,
5300
5343
  locale = "en"
5301
5344
  }) => {
5345
+ const clientApi = await GetClientAPI(clientApiParams);
5302
5346
  const { data } = await clientApi.put(
5303
5347
  `/self/chat/channels/${channelId}/notifications`,
5304
5348
  {
@@ -5321,10 +5365,11 @@ var useUpdateSelfChatChannelNotifications = (params = {}, options = {}) => {
5321
5365
  var RegisterCancelledEventRegistration = async ({
5322
5366
  eventId,
5323
5367
  registrationId,
5324
- clientApi,
5368
+ clientApiParams,
5325
5369
  queryClient,
5326
5370
  locale = "en"
5327
5371
  }) => {
5372
+ const clientApi = await GetClientAPI(clientApiParams);
5328
5373
  const { data } = await clientApi.post(
5329
5374
  `/self/events/${eventId}/registration/${registrationId}/cancelled/register`
5330
5375
  );
@@ -5356,10 +5401,11 @@ var SelectSelfEventRegistrationCoupon = async ({
5356
5401
  eventId,
5357
5402
  registrationId,
5358
5403
  couponId,
5359
- clientApi,
5404
+ clientApiParams,
5360
5405
  queryClient,
5361
5406
  locale = "en"
5362
5407
  }) => {
5408
+ const clientApi = await GetClientAPI(clientApiParams);
5363
5409
  const { data } = await clientApi.post(
5364
5410
  `/self/events/${eventId}/registration/${registrationId}/draft/coupon`,
5365
5411
  {
@@ -5399,10 +5445,11 @@ var useSelectSelfEventRegistrationCoupon = (params = {}, options = {}) => {
5399
5445
  var CaptureSelfEventRegistrationPayment = async ({
5400
5446
  eventId,
5401
5447
  registrationId,
5402
- clientApi,
5448
+ clientApiParams,
5403
5449
  queryClient,
5404
5450
  locale = "en"
5405
5451
  }) => {
5452
+ const clientApi = await GetClientAPI(clientApiParams);
5406
5453
  const { data } = await clientApi.post(
5407
5454
  `/self/events/${eventId}/registration/${registrationId}/draft/capture`
5408
5455
  );
@@ -5422,10 +5469,11 @@ var CreateSelfEventRegistrationGuest = async ({
5422
5469
  eventId,
5423
5470
  registrationId,
5424
5471
  guest,
5425
- clientApi,
5472
+ clientApiParams,
5426
5473
  queryClient,
5427
5474
  locale = "en"
5428
5475
  }) => {
5476
+ const clientApi = await GetClientAPI(clientApiParams);
5429
5477
  const { data } = await clientApi.post(
5430
5478
  `/self/events/${eventId}/registration/${registrationId}/draft/guests`,
5431
5479
  guest
@@ -5446,10 +5494,11 @@ var DeleteSelfEventRegistrationGuest = async ({
5446
5494
  eventId,
5447
5495
  registrationId,
5448
5496
  guestId,
5449
- clientApi,
5497
+ clientApiParams,
5450
5498
  queryClient,
5451
5499
  locale = "en"
5452
5500
  }) => {
5501
+ const clientApi = await GetClientAPI(clientApiParams);
5453
5502
  const { data } = await clientApi.delete(
5454
5503
  `/self/events/${eventId}/registration/${registrationId}/draft/guests/${guestId}`
5455
5504
  );
@@ -5468,10 +5517,11 @@ var useDeleteSelfEventRegistrationGuest = (params = {}, options = {}) => {
5468
5517
  var RemoveSelfEventRegistrationCoupon = async ({
5469
5518
  eventId,
5470
5519
  registrationId,
5471
- clientApi,
5520
+ clientApiParams,
5472
5521
  queryClient,
5473
5522
  locale = "en"
5474
5523
  }) => {
5524
+ const clientApi = await GetClientAPI(clientApiParams);
5475
5525
  const { data } = await clientApi.delete(
5476
5526
  `/self/events/${eventId}/registration/${registrationId}/draft/coupon`
5477
5527
  );
@@ -5508,10 +5558,11 @@ var useRemoveSelfEventRegistrationCoupon = (params = {}, options = {}) => {
5508
5558
  var RemoveSelfEventRegistrationTicket = async ({
5509
5559
  eventId,
5510
5560
  registrationId,
5511
- clientApi,
5561
+ clientApiParams,
5512
5562
  queryClient,
5513
5563
  locale = "en"
5514
5564
  }) => {
5565
+ const clientApi = await GetClientAPI(clientApiParams);
5515
5566
  const { data } = await clientApi.delete(
5516
5567
  `/self/events/${eventId}/registration/${registrationId}/draft/ticket`
5517
5568
  );
@@ -5549,10 +5600,11 @@ var SelectSelfEventRegistrationTicket = async ({
5549
5600
  eventId,
5550
5601
  registrationId,
5551
5602
  ticketId,
5552
- clientApi,
5603
+ clientApiParams,
5553
5604
  queryClient,
5554
5605
  locale = "en"
5555
5606
  }) => {
5607
+ const clientApi = await GetClientAPI(clientApiParams);
5556
5608
  const { data } = await clientApi.post(
5557
5609
  `/self/events/${eventId}/registration/${registrationId}/draft/ticket`,
5558
5610
  {
@@ -5588,10 +5640,11 @@ var SubmitSelfEventRegistration = async ({
5588
5640
  eventId,
5589
5641
  registrationId,
5590
5642
  payment,
5591
- clientApi,
5643
+ clientApiParams,
5592
5644
  queryClient,
5593
5645
  locale = "en"
5594
5646
  }) => {
5647
+ const clientApi = await GetClientAPI(clientApiParams);
5595
5648
  const { data } = await clientApi.post(
5596
5649
  `/self/events/${eventId}/registration/${registrationId}/draft/submit`,
5597
5650
  payment
@@ -5613,10 +5666,11 @@ var UpdateSelfEventRegistrationGuest = async ({
5613
5666
  registrationId,
5614
5667
  guestId,
5615
5668
  guest,
5616
- clientApi,
5669
+ clientApiParams,
5617
5670
  queryClient,
5618
5671
  locale = "en"
5619
5672
  }) => {
5673
+ const clientApi = await GetClientAPI(clientApiParams);
5620
5674
  const { data } = await clientApi.put(
5621
5675
  `/self/events/${eventId}/registration/${registrationId}/draft/guests/${guestId}`,
5622
5676
  guest
@@ -5640,10 +5694,11 @@ var UpdateSelfEventRegistrationGuestResponseFile = async ({
5640
5694
  guestId,
5641
5695
  dataUrl,
5642
5696
  name,
5643
- clientApi
5697
+ clientApiParams
5644
5698
  }) => {
5645
5699
  if (!guestId)
5646
5700
  throw new Error("Guest ID is required");
5701
+ const clientApi = await GetClientAPI(clientApiParams);
5647
5702
  const { data } = await clientApi.put(
5648
5703
  `/self/events/${eventId}/registration/${registrationId}/draft/guests/${guestId}/responses/file`,
5649
5704
  {
@@ -5664,8 +5719,9 @@ var UpdateSelfEventRegistrationGuestResponses = async ({
5664
5719
  registrationId,
5665
5720
  guestId,
5666
5721
  responses,
5667
- clientApi
5722
+ clientApiParams
5668
5723
  }) => {
5724
+ const clientApi = await GetClientAPI(clientApiParams);
5669
5725
  const { data } = await clientApi.put(
5670
5726
  `/self/events/${eventId}/registration/${registrationId}/draft/guests/${guestId}/responses`,
5671
5727
  responses
@@ -5683,8 +5739,9 @@ var UpdateSelfEventRegistrationResponseFile = async ({
5683
5739
  dataUrl,
5684
5740
  name,
5685
5741
  questionId,
5686
- clientApi
5742
+ clientApiParams
5687
5743
  }) => {
5744
+ const clientApi = await GetClientAPI(clientApiParams);
5688
5745
  const { data } = await clientApi.put(
5689
5746
  `/self/events/${eventId}/registration/${registrationId}/draft/responses/file`,
5690
5747
  {
@@ -5704,10 +5761,11 @@ var UpdateSelfEventRegistrationResponses = async ({
5704
5761
  eventId,
5705
5762
  registrationId,
5706
5763
  responses,
5707
- clientApi,
5764
+ clientApiParams,
5708
5765
  queryClient,
5709
5766
  locale = "en"
5710
5767
  }) => {
5768
+ const clientApi = await GetClientAPI(clientApiParams);
5711
5769
  const { data } = await clientApi.put(
5712
5770
  `/self/events/${eventId}/registration/${registrationId}/draft/responses`,
5713
5771
  responses
@@ -5727,10 +5785,11 @@ var useUpdateSelfEventRegistrationResponses = (params = {}, options = {}) => {
5727
5785
  var CancelEventRegistration = async ({
5728
5786
  eventId,
5729
5787
  registrationId,
5730
- clientApi,
5788
+ clientApiParams,
5731
5789
  queryClient,
5732
5790
  locale = "env"
5733
5791
  }) => {
5792
+ const clientApi = await GetClientAPI(clientApiParams);
5734
5793
  const { data } = await clientApi.delete(
5735
5794
  `/self/events/${eventId}/registration/${registrationId}/registered/cancel`
5736
5795
  );
@@ -5762,9 +5821,10 @@ var CancelTransfer = async ({
5762
5821
  transferId,
5763
5822
  eventId,
5764
5823
  registrationId,
5765
- clientApi,
5824
+ clientApiParams,
5766
5825
  queryClient
5767
5826
  }) => {
5827
+ const clientApi = await GetClientAPI(clientApiParams);
5768
5828
  const { data } = await clientApi.delete(
5769
5829
  `/self/events/${eventId}/registration/${registrationId}/transfer/${transferId}`
5770
5830
  );
@@ -5785,9 +5845,10 @@ var TransferPurchase = async ({
5785
5845
  purchaseId,
5786
5846
  eventId,
5787
5847
  registrationId,
5788
- clientApi,
5848
+ clientApiParams,
5789
5849
  queryClient
5790
5850
  }) => {
5851
+ const clientApi = await GetClientAPI(clientApiParams);
5791
5852
  const { data } = await clientApi.post(
5792
5853
  `/self/events/${eventId}/registration/${registrationId}/transfer`,
5793
5854
  {
@@ -5812,10 +5873,11 @@ var UpdateSelfEventRegistrationResponse = async ({
5812
5873
  registrationId,
5813
5874
  questionId,
5814
5875
  response,
5815
- clientApi,
5876
+ clientApiParams,
5816
5877
  queryClient,
5817
5878
  locale = "en"
5818
5879
  }) => {
5880
+ const clientApi = await GetClientAPI(clientApiParams);
5819
5881
  const { data } = await clientApi.put(
5820
5882
  `/self/events/${eventId}/registration/${registrationId}/registered/response`,
5821
5883
  {
@@ -5845,10 +5907,11 @@ var UpdateSelfEventRegistrationGuestResponse = async ({
5845
5907
  questionId,
5846
5908
  guestId,
5847
5909
  response,
5848
- clientApi,
5910
+ clientApiParams,
5849
5911
  queryClient,
5850
5912
  locale = "en"
5851
5913
  }) => {
5914
+ const clientApi = await GetClientAPI(clientApiParams);
5852
5915
  const { data } = await clientApi.put(
5853
5916
  `/self/events/${eventId}/registration/${registrationId}/registered/guests/${guestId}/response`,
5854
5917
  {
@@ -5874,9 +5937,10 @@ var useUpdateSelfEventRegistrationGuestResponse = (params = {}, options = {}) =>
5874
5937
  // src/mutations/self/subscriptions/useCancelSubscription.ts
5875
5938
  var CancelSubscription = async ({
5876
5939
  subscriptionId,
5877
- clientApi,
5940
+ clientApiParams,
5878
5941
  queryClient
5879
5942
  }) => {
5943
+ const clientApi = await GetClientAPI(clientApiParams);
5880
5944
  const { data } = await clientApi.delete(
5881
5945
  `/self/subscriptions/${subscriptionId}`
5882
5946
  );
@@ -5898,8 +5962,9 @@ var useCancelSubscription = (params = {}, options = {}) => {
5898
5962
  var CreateSubscription = async ({
5899
5963
  productId,
5900
5964
  priceId,
5901
- clientApi
5965
+ clientApiParams
5902
5966
  }) => {
5967
+ const clientApi = await GetClientAPI(clientApiParams);
5903
5968
  const { data } = await clientApi.post("/self/subscriptions", {
5904
5969
  productId,
5905
5970
  priceId,
@@ -5915,9 +5980,10 @@ var useCreateSubscription = (params = {}, options = {}) => {
5915
5980
  var UpdateSubscriptionPaymentMethod = async ({
5916
5981
  subscriptionId,
5917
5982
  paymentMethodId,
5918
- clientApi,
5983
+ clientApiParams,
5919
5984
  queryClient
5920
5985
  }) => {
5986
+ const clientApi = await GetClientAPI(clientApiParams);
5921
5987
  const { data } = await clientApi.put(
5922
5988
  `/self/subscriptions/${subscriptionId}/payment-method`,
5923
5989
  {
@@ -5938,9 +6004,10 @@ var useUpdateSubscriptionPaymentMethod = (params = {}, options = {}) => {
5938
6004
  // src/mutations/self/useAcceptTransfer.ts
5939
6005
  var AcceptTransfer = async ({
5940
6006
  transferId,
5941
- clientApi,
6007
+ clientApiParams,
5942
6008
  queryClient
5943
6009
  }) => {
6010
+ const clientApi = await GetClientAPI(clientApiParams);
5944
6011
  const { data } = await clientApi.post(
5945
6012
  `/self/transfers/${transferId}`
5946
6013
  );
@@ -5956,9 +6023,10 @@ var useAcceptTransfer = (params = {}, options = {}) => {
5956
6023
  // src/mutations/self/useAddSelfDelegate.ts
5957
6024
  var AddSelfDelegate = async ({
5958
6025
  email,
5959
- clientApi,
6026
+ clientApiParams,
5960
6027
  queryClient
5961
6028
  }) => {
6029
+ const clientApi = await GetClientAPI(clientApiParams);
5962
6030
  const { data } = await clientApi.post(
5963
6031
  `/self/delegates`,
5964
6032
  {
@@ -5978,10 +6046,11 @@ var useAddSelfDelegate = (params = {}, options = {}) => {
5978
6046
  var AddSelfEventListingSession = async ({
5979
6047
  eventId,
5980
6048
  session,
5981
- clientApi,
6049
+ clientApiParams,
5982
6050
  queryClient,
5983
6051
  locale = "en"
5984
6052
  }) => {
6053
+ const clientApi = await GetClientAPI(clientApiParams);
5985
6054
  const { data } = await clientApi.post(
5986
6055
  `/self/events/listings/${eventId}/sessions`,
5987
6056
  {
@@ -6030,10 +6099,11 @@ var useAddSelfEventListingSession = (params = {}, options = {}) => {
6030
6099
  var AddSelfEventListingSpeaker = async ({
6031
6100
  eventId,
6032
6101
  speaker,
6033
- clientApi,
6102
+ clientApiParams,
6034
6103
  queryClient,
6035
6104
  locale = "en"
6036
6105
  }) => {
6106
+ const clientApi = await GetClientAPI(clientApiParams);
6037
6107
  const { data } = await clientApi.post(
6038
6108
  `/self/events/listings/${eventId}/speakers`,
6039
6109
  {
@@ -6082,7 +6152,7 @@ var useAddSelfEventListingSpeaker = (params = {}, options = {}) => {
6082
6152
  var AddSelfEventListingSponsor = async ({
6083
6153
  eventId,
6084
6154
  sponsor,
6085
- clientApi,
6155
+ clientApiParams,
6086
6156
  queryClient,
6087
6157
  locale = "en"
6088
6158
  }) => {
@@ -6116,6 +6186,7 @@ var AddSelfEventListingSponsor = async ({
6116
6186
  }
6117
6187
  );
6118
6188
  }
6189
+ const clientApi = await GetClientAPI(clientApiParams);
6119
6190
  const { data } = await clientApi.post(
6120
6191
  `/self/events/listings/${eventId}/sponsors`,
6121
6192
  {
@@ -6132,9 +6203,10 @@ var useAddSelfEventListingSponsor = (params = {}, options = {}) => {
6132
6203
  var AddSelfEventSession = async ({
6133
6204
  eventId,
6134
6205
  sessionId,
6135
- clientApi,
6206
+ clientApiParams,
6136
6207
  queryClient
6137
6208
  }) => {
6209
+ const clientApi = await GetClientAPI(clientApiParams);
6138
6210
  const { data } = await clientApi.post(
6139
6211
  `/self/events/${eventId}/sessions/${sessionId}`
6140
6212
  );
@@ -6157,10 +6229,11 @@ var CreateSelfEventListing = async ({
6157
6229
  sponsorIds,
6158
6230
  speakers,
6159
6231
  sessions,
6160
- clientApi,
6232
+ clientApiParams,
6161
6233
  queryClient,
6162
6234
  locale = "en"
6163
6235
  }) => {
6236
+ const clientApi = await GetClientAPI(clientApiParams);
6164
6237
  let data;
6165
6238
  if (communityId) {
6166
6239
  data = (await clientApi.post(
@@ -6208,9 +6281,10 @@ var useCreateSelfEventListing = (params = {}, options = {}) => {
6208
6281
 
6209
6282
  // src/mutations/self/useDeleteSelf.ts
6210
6283
  var DeleteSelf = async ({
6211
- clientApi,
6284
+ clientApiParams,
6212
6285
  queryClient
6213
6286
  }) => {
6287
+ const clientApi = await GetClientAPI(clientApiParams);
6214
6288
  const { data } = await clientApi.delete(`/self`);
6215
6289
  if (queryClient && data.status === "ok") {
6216
6290
  queryClient.clear();
@@ -6224,9 +6298,10 @@ var useDeleteSelf = (params = {}, options = {}) => {
6224
6298
  // src/mutations/self/useDeleteSelfPushDevice.ts
6225
6299
  var DeleteSelfPushDevice = async ({
6226
6300
  pushDeviceId,
6227
- clientApi,
6301
+ clientApiParams,
6228
6302
  queryClient
6229
6303
  }) => {
6304
+ const clientApi = await GetClientAPI(clientApiParams);
6230
6305
  const { data } = await clientApi.delete(
6231
6306
  `/self/push-devices/${pushDeviceId}`
6232
6307
  );
@@ -6244,9 +6319,10 @@ var useDeleteSelfPushDevice = (params = {}, options = {}) => {
6244
6319
  // src/mutations/self/useRejectTransfer.ts
6245
6320
  var RejectTransfer = async ({
6246
6321
  transferId,
6247
- clientApi,
6322
+ clientApiParams,
6248
6323
  queryClient
6249
6324
  }) => {
6325
+ const clientApi = await GetClientAPI(clientApiParams);
6250
6326
  const { data } = await clientApi.delete(
6251
6327
  `/self/transfers/${transferId}`
6252
6328
  );
@@ -6264,9 +6340,10 @@ var useRejectTransfer = (params = {}, options = {}) => {
6264
6340
  // src/mutations/self/useRemoveSelfDelegate.ts
6265
6341
  var RemoveSelfDelegate = async ({
6266
6342
  accountId,
6267
- clientApi,
6343
+ clientApiParams,
6268
6344
  queryClient
6269
6345
  }) => {
6346
+ const clientApi = await GetClientAPI(clientApiParams);
6270
6347
  const { data } = await clientApi.delete(
6271
6348
  `/self/delegates/${accountId}`
6272
6349
  );
@@ -6283,7 +6360,7 @@ var useRemoveSelfDelegate = (params = {}, options = {}) => {
6283
6360
  var RemoveSelfEventListingSession = async ({
6284
6361
  eventId,
6285
6362
  sessionId,
6286
- clientApi,
6363
+ clientApiParams,
6287
6364
  queryClient,
6288
6365
  locale = "en"
6289
6366
  }) => {
@@ -6317,6 +6394,7 @@ var RemoveSelfEventListingSession = async ({
6317
6394
  }
6318
6395
  );
6319
6396
  }
6397
+ const clientApi = await GetClientAPI(clientApiParams);
6320
6398
  const { data } = await clientApi.delete(
6321
6399
  `/self/events/listings/${eventId}/sessions/${sessionId}`
6322
6400
  );
@@ -6330,7 +6408,7 @@ var useRemoveSelfEventListingSession = (params = {}, options = {}) => {
6330
6408
  var RemoveSelfEventListingSpeaker = async ({
6331
6409
  eventId,
6332
6410
  speakerId,
6333
- clientApi,
6411
+ clientApiParams,
6334
6412
  queryClient,
6335
6413
  locale = "en"
6336
6414
  }) => {
@@ -6364,6 +6442,7 @@ var RemoveSelfEventListingSpeaker = async ({
6364
6442
  }
6365
6443
  );
6366
6444
  }
6445
+ const clientApi = await GetClientAPI(clientApiParams);
6367
6446
  const { data } = await clientApi.delete(
6368
6447
  `/self/events/listings/${eventId}/speakers/${speakerId}`
6369
6448
  );
@@ -6377,7 +6456,7 @@ var useRemoveSelfEventListingSpeaker = (params = {}, options = {}) => {
6377
6456
  var RemoveSelfEventListingSponsor = async ({
6378
6457
  eventId,
6379
6458
  sponsorId,
6380
- clientApi,
6459
+ clientApiParams,
6381
6460
  queryClient,
6382
6461
  locale = "en"
6383
6462
  }) => {
@@ -6411,6 +6490,7 @@ var RemoveSelfEventListingSponsor = async ({
6411
6490
  }
6412
6491
  );
6413
6492
  }
6493
+ const clientApi = await GetClientAPI(clientApiParams);
6414
6494
  const { data } = await clientApi.delete(
6415
6495
  `/self/events/listings/${eventId}/sponsors/${sponsorId}`
6416
6496
  );
@@ -6424,9 +6504,10 @@ var useRemoveSelfEventListingSponsor = (params = {}, options = {}) => {
6424
6504
  var RemoveSelfEventSession = async ({
6425
6505
  eventId,
6426
6506
  sessionId,
6427
- clientApi,
6507
+ clientApiParams,
6428
6508
  queryClient
6429
6509
  }) => {
6510
+ const clientApi = await GetClientAPI(clientApiParams);
6430
6511
  const { data } = await clientApi.delete(
6431
6512
  `/self/events/${eventId}/sessions/${sessionId}`
6432
6513
  );
@@ -6445,9 +6526,10 @@ var useRemoveSelfEventSession = (params = {}, options = {}) => {
6445
6526
  var SelfCheckinRegistration = async ({
6446
6527
  accountId,
6447
6528
  eventId,
6448
- clientApi,
6529
+ clientApiParams,
6449
6530
  queryClient
6450
6531
  }) => {
6532
+ const clientApi = await GetClientAPI(clientApiParams);
6451
6533
  const { data } = await clientApi.post(
6452
6534
  `/self/events/listings/${eventId}/registrations/${accountId}`
6453
6535
  );
@@ -6531,7 +6613,7 @@ var SelfCreateActivity = async ({
6531
6613
  activity,
6532
6614
  base64Image,
6533
6615
  videoUri,
6534
- clientApi,
6616
+ clientApiParams,
6535
6617
  queryClient,
6536
6618
  locale = "en"
6537
6619
  }) => {
@@ -6549,6 +6631,7 @@ var SelfCreateActivity = async ({
6549
6631
  );
6550
6632
  }
6551
6633
  }
6634
+ const clientApi = await GetClientAPI(clientApiParams);
6552
6635
  const { data } = await clientApi.post(
6553
6636
  `/self/activities`,
6554
6637
  {
@@ -6609,9 +6692,10 @@ var useSelfCreateActivity = (params = {}, options = {}) => {
6609
6692
  // src/mutations/self/useSelfDeleteActivity.ts
6610
6693
  var DeleteActivity = async ({
6611
6694
  activityId,
6612
- clientApi,
6695
+ clientApiParams,
6613
6696
  queryClient
6614
6697
  }) => {
6698
+ const clientApi = await GetClientAPI(clientApiParams);
6615
6699
  const { data } = await clientApi.delete(
6616
6700
  `/self/activities/${activityId}`
6617
6701
  );
@@ -6627,9 +6711,10 @@ var useDeleteActivity = (params = {}, options = {}) => {
6627
6711
  // src/mutations/self/useSelfJoinCommunity.ts
6628
6712
  var SelfJoinCommunity = async ({
6629
6713
  communityId,
6630
- clientApi,
6714
+ clientApiParams,
6631
6715
  queryClient
6632
6716
  }) => {
6717
+ const clientApi = await GetClientAPI(clientApiParams);
6633
6718
  const { data } = await clientApi.post(`/self/communities/${communityId}`);
6634
6719
  if (queryClient && data.status === "ok") {
6635
6720
  queryClient.invalidateQueries({
@@ -6654,9 +6739,10 @@ var useSelfJoinCommunity = (params = {}, options = {}) => {
6654
6739
  // src/mutations/self/useSelfLeaveCommunity.ts
6655
6740
  var SelfLeaveCommunity = async ({
6656
6741
  communityId,
6657
- clientApi,
6742
+ clientApiParams,
6658
6743
  queryClient
6659
6744
  }) => {
6745
+ const clientApi = await GetClientAPI(clientApiParams);
6660
6746
  const { data } = await clientApi.delete(
6661
6747
  `/self/communities/${communityId}`
6662
6748
  );
@@ -6684,7 +6770,7 @@ var useSelfLeaveCommunity = (params = {}, options = {}) => {
6684
6770
  var SelfUpdateCommunityMembership = async ({
6685
6771
  communityId,
6686
6772
  membership,
6687
- clientApi,
6773
+ clientApiParams,
6688
6774
  queryClient,
6689
6775
  locale = "en"
6690
6776
  }) => {
@@ -6702,6 +6788,7 @@ var SelfUpdateCommunityMembership = async ({
6702
6788
  }
6703
6789
  );
6704
6790
  }
6791
+ const clientApi = await GetClientAPI(clientApiParams);
6705
6792
  const { data } = await clientApi.put(`/self/communities/${communityId}`, membership);
6706
6793
  return data;
6707
6794
  };
@@ -6711,10 +6798,11 @@ var useSelfUpdateCommunityMembership = (params = {}, options = {}) => {
6711
6798
 
6712
6799
  // src/mutations/self/useUpdateSelf.ts
6713
6800
  var UpdateSelf = async ({
6714
- clientApi,
6801
+ clientApiParams,
6715
6802
  queryClient,
6716
6803
  ...params
6717
6804
  }) => {
6805
+ const clientApi = await GetClientAPI(clientApiParams);
6718
6806
  const { data } = await clientApi.put(
6719
6807
  `/self`,
6720
6808
  params
@@ -6733,10 +6821,11 @@ var UpdateSelfEventListing = async ({
6733
6821
  eventId,
6734
6822
  event,
6735
6823
  base64,
6736
- clientApi,
6824
+ clientApiParams,
6737
6825
  queryClient,
6738
6826
  locale = "en"
6739
6827
  }) => {
6828
+ const clientApi = await GetClientAPI(clientApiParams);
6740
6829
  const { data } = await clientApi.put(
6741
6830
  `/self/events/listings/${eventId}`,
6742
6831
  {
@@ -6769,10 +6858,11 @@ var UpdateSelfEventListingSession = async ({
6769
6858
  eventId,
6770
6859
  session,
6771
6860
  sessionId,
6772
- clientApi,
6861
+ clientApiParams,
6773
6862
  queryClient,
6774
6863
  locale = "en"
6775
6864
  }) => {
6865
+ const clientApi = await GetClientAPI(clientApiParams);
6776
6866
  const { data } = await clientApi.put(
6777
6867
  `/self/events/listings/${eventId}/sessions/${sessionId}`,
6778
6868
  {
@@ -6821,10 +6911,11 @@ var UpdateSelfEventListingSpeaker = async ({
6821
6911
  speaker,
6822
6912
  speakerId,
6823
6913
  buffer,
6824
- clientApi,
6914
+ clientApiParams,
6825
6915
  queryClient,
6826
6916
  locale = "en"
6827
6917
  }) => {
6918
+ const clientApi = await GetClientAPI(clientApiParams);
6828
6919
  const { data } = await clientApi.put(
6829
6920
  `/self/events/listings/${eventId}/speakers/${speakerId}`,
6830
6921
  {
@@ -6871,9 +6962,10 @@ var useUpdateSelfEventListingSpeaker = (params = {}, options = {}) => {
6871
6962
  // src/mutations/self/useUpdateSelfImage.ts
6872
6963
  var UpdateSelfImage = async ({
6873
6964
  base64,
6874
- clientApi,
6965
+ clientApiParams,
6875
6966
  queryClient
6876
6967
  }) => {
6968
+ const clientApi = await GetClientAPI(clientApiParams);
6877
6969
  const { data } = await clientApi.put(
6878
6970
  `/self/image`,
6879
6971
  {
@@ -6893,8 +6985,9 @@ var useUpdateSelfImage = (params = {}, options = {}) => {
6893
6985
  var UpdateSelfLead = async ({
6894
6986
  leadId,
6895
6987
  note,
6896
- clientApi
6988
+ clientApiParams
6897
6989
  }) => {
6990
+ const clientApi = await GetClientAPI(clientApiParams);
6898
6991
  const { data } = await clientApi.put(
6899
6992
  `/self/leads/${leadId}`,
6900
6993
  {
@@ -6909,7 +7002,7 @@ var useUpdateSelfLead = (params = {}, options = {}) => {
6909
7002
 
6910
7003
  // src/mutations/self/useUpdateSelfNotificationPreferences.ts
6911
7004
  var UpdateSelfNotificationPreferences = async ({
6912
- clientApi,
7005
+ clientApiParams,
6913
7006
  queryClient,
6914
7007
  locale = "en",
6915
7008
  ...params
@@ -6927,6 +7020,7 @@ var UpdateSelfNotificationPreferences = async ({
6927
7020
  }
6928
7021
  );
6929
7022
  }
7023
+ const clientApi = await GetClientAPI(clientApiParams);
6930
7024
  const { data } = await clientApi.put(`/self/notificationPreferences`, params);
6931
7025
  return data;
6932
7026
  };
@@ -6938,9 +7032,10 @@ var useUpdateSelfNotificationPreferences = (params = {}, options = {}) => {
6938
7032
  var UpdateSelfPushDevice = async ({
6939
7033
  pushDeviceId,
6940
7034
  pushDevice,
6941
- clientApi,
7035
+ clientApiParams,
6942
7036
  queryClient
6943
7037
  }) => {
7038
+ const clientApi = await GetClientAPI(clientApiParams);
6944
7039
  const { data } = await clientApi.put(
6945
7040
  `/self/push-devices/${pushDeviceId}`,
6946
7041
  {
@@ -6968,8 +7063,9 @@ var CreateSupportTicket = async ({
6968
7063
  request,
6969
7064
  eventId,
6970
7065
  productId,
6971
- clientApi
7066
+ clientApiParams
6972
7067
  }) => {
7068
+ const clientApi = await GetClientAPI(clientApiParams);
6973
7069
  const { data } = await clientApi.post(
6974
7070
  "/supportTickets",
6975
7071
  {
@@ -6990,8 +7086,9 @@ var useCreateSupportTicket = (params = {}, options = {}) => {
6990
7086
  var CreateTeamAccount = async ({
6991
7087
  name,
6992
7088
  email,
6993
- clientApi
7089
+ clientApiParams
6994
7090
  }) => {
7091
+ const clientApi = await GetClientAPI(clientApiParams);
6995
7092
  const { data } = await clientApi.post(
6996
7093
  `/self/team`,
6997
7094
  {
@@ -7104,6 +7201,7 @@ var useCreateTeamAccount = (params = {}, options = {}) => {
7104
7201
  GetActivityComments,
7105
7202
  GetAdvertisement,
7106
7203
  GetBenefits,
7204
+ GetClientAPI,
7107
7205
  GetCommunities,
7108
7206
  GetCommunity,
7109
7207
  GetCommunityActivities,
@@ -7339,7 +7437,6 @@ var useCreateTeamAccount = (params = {}, options = {}) => {
7339
7437
  UpdateSelfNotificationPreferences,
7340
7438
  UpdateSelfPushDevice,
7341
7439
  UpdateSubscriptionPaymentMethod,
7342
- getClientAPI,
7343
7440
  isListing,
7344
7441
  isManagedCoupon,
7345
7442
  isSelf,
@@ -7389,7 +7486,6 @@ var useCreateTeamAccount = (params = {}, options = {}) => {
7389
7486
  useCancelSubscription,
7390
7487
  useCancelTransfer,
7391
7488
  useCaptureSelfEventRegistrationPayment,
7392
- useClientAPI,
7393
7489
  useCompleteEventActivation,
7394
7490
  useConnectedXM,
7395
7491
  useCreateCommunityAnnouncement,