@connectedxm/client 0.0.61 → 0.0.79
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.d.mts +329 -322
- package/dist/index.d.ts +329 -322
- package/dist/index.js +524 -371
- package/dist/index.mjs +529 -374
- package/package.json +4 -1
package/dist/index.mjs
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
// src/ConnectedXMProvider.tsx
|
|
2
2
|
import React from "react";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
QueryClientProvider
|
|
5
|
+
} from "@tanstack/react-query";
|
|
4
6
|
var ConnectedXMClientContext = React.createContext({});
|
|
5
7
|
var ConnectedXMProvider = ({
|
|
6
8
|
queryClient,
|
|
9
|
+
authenticated = true,
|
|
7
10
|
children,
|
|
8
11
|
...state
|
|
9
12
|
}) => {
|
|
10
13
|
const [ssr, setSSR] = React.useState(true);
|
|
11
|
-
const [token, setToken] = React.useState();
|
|
12
|
-
const [executeAs, setExecuteAs] = React.useState();
|
|
13
14
|
React.useEffect(() => {
|
|
14
15
|
setSSR(false);
|
|
15
16
|
}, []);
|
|
@@ -19,10 +20,7 @@ var ConnectedXMProvider = ({
|
|
|
19
20
|
{
|
|
20
21
|
value: {
|
|
21
22
|
...state,
|
|
22
|
-
|
|
23
|
-
setToken,
|
|
24
|
-
executeAs,
|
|
25
|
-
setExecuteAs
|
|
23
|
+
authenticated
|
|
26
24
|
}
|
|
27
25
|
},
|
|
28
26
|
children
|
|
@@ -30,8 +28,7 @@ var ConnectedXMProvider = ({
|
|
|
30
28
|
};
|
|
31
29
|
if (ssr)
|
|
32
30
|
return /* @__PURE__ */ React.createElement(QueryClientProvider, { client: queryClient }, render());
|
|
33
|
-
|
|
34
|
-
return render();
|
|
31
|
+
return render();
|
|
35
32
|
};
|
|
36
33
|
|
|
37
34
|
// src/hooks/useConnectedXM.ts
|
|
@@ -44,36 +41,6 @@ var useConnectedXM = () => {
|
|
|
44
41
|
return context;
|
|
45
42
|
};
|
|
46
43
|
|
|
47
|
-
// src/hooks/useClientAPI.ts
|
|
48
|
-
import axios from "axios";
|
|
49
|
-
var getClientAPI = (apiUrl, organizationId, token, executeAs, locale) => {
|
|
50
|
-
return axios.create({
|
|
51
|
-
baseURL: apiUrl,
|
|
52
|
-
headers: {
|
|
53
|
-
authorization: token,
|
|
54
|
-
organization: organizationId,
|
|
55
|
-
executeAs,
|
|
56
|
-
locale
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
};
|
|
60
|
-
var useClientAPI = (locale) => {
|
|
61
|
-
const {
|
|
62
|
-
apiUrl,
|
|
63
|
-
token,
|
|
64
|
-
organizationId,
|
|
65
|
-
executeAs,
|
|
66
|
-
locale: _locale
|
|
67
|
-
} = useConnectedXM();
|
|
68
|
-
return getClientAPI(
|
|
69
|
-
apiUrl,
|
|
70
|
-
organizationId,
|
|
71
|
-
token,
|
|
72
|
-
executeAs,
|
|
73
|
-
locale || _locale
|
|
74
|
-
);
|
|
75
|
-
};
|
|
76
|
-
|
|
77
44
|
// src/interfaces.ts
|
|
78
45
|
var RegistrationStatus = /* @__PURE__ */ ((RegistrationStatus2) => {
|
|
79
46
|
RegistrationStatus2["registered"] = "registered";
|
|
@@ -331,10 +298,10 @@ var AppendInfiniteQuery = (queryClient, key, newData) => {
|
|
|
331
298
|
};
|
|
332
299
|
|
|
333
300
|
// src/utilities/GetErrorMessage.ts
|
|
334
|
-
import
|
|
301
|
+
import axios from "axios";
|
|
335
302
|
var GetErrorMessage = (error, fallback = "Something went wrong") => {
|
|
336
303
|
let message = fallback;
|
|
337
|
-
if (
|
|
304
|
+
if (axios.isAxiosError(error)) {
|
|
338
305
|
message = error.response?.data?.message || message;
|
|
339
306
|
} else {
|
|
340
307
|
message = error.message;
|
|
@@ -358,25 +325,33 @@ var GetBaseSingleQueryKeys = (locale) => {
|
|
|
358
325
|
return [locale];
|
|
359
326
|
};
|
|
360
327
|
var useConnectedSingleQuery = (queryKeys, queryFn, options) => {
|
|
361
|
-
const {
|
|
362
|
-
|
|
328
|
+
const {
|
|
329
|
+
locale,
|
|
330
|
+
onModuleForbidden,
|
|
331
|
+
onNotAuthorized,
|
|
332
|
+
onNotFound,
|
|
333
|
+
apiUrl,
|
|
334
|
+
organizationId,
|
|
335
|
+
getToken,
|
|
336
|
+
getExecuteAs
|
|
337
|
+
} = useConnectedXM();
|
|
363
338
|
return useQuery({
|
|
364
339
|
staleTime: 60 * 1e3,
|
|
365
340
|
// 60 Seconds
|
|
366
341
|
retry: (failureCount, error) => {
|
|
367
342
|
if (error.response?.status === 404) {
|
|
368
343
|
if (onNotFound)
|
|
369
|
-
onNotFound(error);
|
|
344
|
+
onNotFound(error, queryKeys);
|
|
370
345
|
return false;
|
|
371
346
|
}
|
|
372
347
|
if (error.response?.status === 403) {
|
|
373
348
|
if (onModuleForbidden)
|
|
374
|
-
onModuleForbidden(error);
|
|
349
|
+
onModuleForbidden(error, queryKeys);
|
|
375
350
|
return false;
|
|
376
351
|
}
|
|
377
352
|
if (error.response?.status === 401) {
|
|
378
353
|
if (onNotAuthorized)
|
|
379
|
-
onNotAuthorized(error);
|
|
354
|
+
onNotAuthorized(error, queryKeys);
|
|
380
355
|
return false;
|
|
381
356
|
}
|
|
382
357
|
if (failureCount < 3)
|
|
@@ -386,7 +361,13 @@ var useConnectedSingleQuery = (queryKeys, queryFn, options) => {
|
|
|
386
361
|
...options,
|
|
387
362
|
queryKey: [...queryKeys, ...GetBaseSingleQueryKeys(locale)],
|
|
388
363
|
queryFn: () => queryFn({
|
|
389
|
-
|
|
364
|
+
clientApiParams: {
|
|
365
|
+
apiUrl,
|
|
366
|
+
organizationId,
|
|
367
|
+
getToken,
|
|
368
|
+
getExecuteAs,
|
|
369
|
+
locale
|
|
370
|
+
}
|
|
390
371
|
})
|
|
391
372
|
});
|
|
392
373
|
};
|
|
@@ -463,8 +444,7 @@ var CacheIndividualQueries = (page, queryClient, queryKeyFn, locale = "en", item
|
|
|
463
444
|
|
|
464
445
|
// src/queries/useConnectedInfiniteQuery.ts
|
|
465
446
|
import {
|
|
466
|
-
useInfiniteQuery
|
|
467
|
-
useQueryClient
|
|
447
|
+
useInfiniteQuery
|
|
468
448
|
} from "@tanstack/react-query";
|
|
469
449
|
var GetBaseInfiniteQueryKeys = (locale, search = "") => {
|
|
470
450
|
return [locale, search];
|
|
@@ -476,9 +456,16 @@ var setFirstPageData = (response) => {
|
|
|
476
456
|
};
|
|
477
457
|
};
|
|
478
458
|
var useConnectedInfiniteQuery = (queryKeys, queryFn, params = {}, options) => {
|
|
479
|
-
const {
|
|
480
|
-
|
|
481
|
-
|
|
459
|
+
const {
|
|
460
|
+
locale,
|
|
461
|
+
onModuleForbidden,
|
|
462
|
+
onNotAuthorized,
|
|
463
|
+
onNotFound,
|
|
464
|
+
apiUrl,
|
|
465
|
+
getToken,
|
|
466
|
+
organizationId,
|
|
467
|
+
getExecuteAs
|
|
468
|
+
} = useConnectedXM();
|
|
482
469
|
const getNextPageParam = (lastPage, allPages) => {
|
|
483
470
|
if (lastPage.data.length === params.pageSize) {
|
|
484
471
|
return allPages.length + 1;
|
|
@@ -491,17 +478,17 @@ var useConnectedInfiniteQuery = (queryKeys, queryFn, params = {}, options) => {
|
|
|
491
478
|
retry: (failureCount, error) => {
|
|
492
479
|
if (error.response?.status === 404) {
|
|
493
480
|
if (onNotFound)
|
|
494
|
-
onNotFound(error);
|
|
481
|
+
onNotFound(error, queryKeys);
|
|
495
482
|
return false;
|
|
496
483
|
}
|
|
497
484
|
if (error.response?.status === 403) {
|
|
498
485
|
if (onModuleForbidden)
|
|
499
|
-
onModuleForbidden(error);
|
|
486
|
+
onModuleForbidden(error, queryKeys);
|
|
500
487
|
return false;
|
|
501
488
|
}
|
|
502
489
|
if (error.response?.status === 401) {
|
|
503
490
|
if (onNotAuthorized)
|
|
504
|
-
onNotAuthorized(error);
|
|
491
|
+
onNotAuthorized(error, queryKeys);
|
|
505
492
|
return false;
|
|
506
493
|
}
|
|
507
494
|
if (failureCount < 3)
|
|
@@ -513,12 +500,34 @@ var useConnectedInfiniteQuery = (queryKeys, queryFn, params = {}, options) => {
|
|
|
513
500
|
...queryKeys,
|
|
514
501
|
...GetBaseInfiniteQueryKeys(params?.locale || locale, params?.search)
|
|
515
502
|
],
|
|
516
|
-
queryFn: ({ pageParam }) => queryFn({ ...params, pageSize: params.pageSize || 25, locale: params.locale || locale, pageParam,
|
|
503
|
+
queryFn: ({ pageParam }) => queryFn({ ...params, pageSize: params.pageSize || 25, locale: params.locale || locale, pageParam, clientApiParams: {
|
|
504
|
+
apiUrl,
|
|
505
|
+
getToken,
|
|
506
|
+
organizationId,
|
|
507
|
+
getExecuteAs,
|
|
508
|
+
locale
|
|
509
|
+
} }),
|
|
517
510
|
initialPageParam: 1,
|
|
518
511
|
getNextPageParam
|
|
519
512
|
});
|
|
520
513
|
};
|
|
521
514
|
|
|
515
|
+
// src/ClientAPI.ts
|
|
516
|
+
import axios2 from "axios";
|
|
517
|
+
var GetClientAPI = async (params) => {
|
|
518
|
+
const token = await params.getToken();
|
|
519
|
+
const executeAs = params.getExecuteAs ? await params.getExecuteAs() : void 0;
|
|
520
|
+
return axios2.create({
|
|
521
|
+
baseURL: params.apiUrl,
|
|
522
|
+
headers: {
|
|
523
|
+
organization: params.organizationId,
|
|
524
|
+
locale: params.locale,
|
|
525
|
+
authorization: token,
|
|
526
|
+
executeAs
|
|
527
|
+
}
|
|
528
|
+
});
|
|
529
|
+
};
|
|
530
|
+
|
|
522
531
|
// src/queries/accounts/useGetAccounts.ts
|
|
523
532
|
var ACCOUNTS_QUERY_KEY = () => ["ACCOUNTS"];
|
|
524
533
|
var SET_ACCOUNTS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
|
|
@@ -535,9 +544,10 @@ var GetAccounts = async ({
|
|
|
535
544
|
orderBy,
|
|
536
545
|
search,
|
|
537
546
|
queryClient,
|
|
538
|
-
|
|
547
|
+
clientApiParams,
|
|
539
548
|
locale
|
|
540
549
|
}) => {
|
|
550
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
541
551
|
const { data } = await clientApi.get(`/accounts`, {
|
|
542
552
|
params: {
|
|
543
553
|
pageSize: pageSize || void 0,
|
|
@@ -556,14 +566,12 @@ var GetAccounts = async ({
|
|
|
556
566
|
return data;
|
|
557
567
|
};
|
|
558
568
|
var useGetAccounts = (params = {}, options = {}) => {
|
|
559
|
-
const { token } = useConnectedXM();
|
|
560
569
|
return useConnectedInfiniteQuery(
|
|
561
570
|
ACCOUNTS_QUERY_KEY(),
|
|
562
571
|
(params2) => GetAccounts({ ...params2 }),
|
|
563
572
|
params,
|
|
564
573
|
{
|
|
565
|
-
...options
|
|
566
|
-
enabled: !!token && (options?.enabled ?? true)
|
|
574
|
+
...options
|
|
567
575
|
}
|
|
568
576
|
);
|
|
569
577
|
};
|
|
@@ -584,19 +592,19 @@ var SET_ACCOUNT_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) =>
|
|
|
584
592
|
};
|
|
585
593
|
var GetAccount = async ({
|
|
586
594
|
accountId,
|
|
587
|
-
|
|
595
|
+
clientApiParams
|
|
588
596
|
}) => {
|
|
597
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
589
598
|
const { data } = await clientApi.get(`/accounts/${accountId}`);
|
|
590
599
|
return data;
|
|
591
600
|
};
|
|
592
|
-
var useGetAccount = (accountId, options = {}) => {
|
|
593
|
-
const { token } = useConnectedXM();
|
|
601
|
+
var useGetAccount = (accountId = "", options = {}) => {
|
|
594
602
|
return useConnectedSingleQuery(
|
|
595
603
|
ACCOUNT_QUERY_KEY(accountId),
|
|
596
604
|
(_params) => GetAccount({ accountId, ..._params }),
|
|
597
605
|
{
|
|
598
606
|
...options,
|
|
599
|
-
enabled: !!
|
|
607
|
+
enabled: !!accountId && (options?.enabled ?? true)
|
|
600
608
|
}
|
|
601
609
|
);
|
|
602
610
|
};
|
|
@@ -618,9 +626,10 @@ var GetActivities = async ({
|
|
|
618
626
|
orderBy,
|
|
619
627
|
search,
|
|
620
628
|
queryClient,
|
|
621
|
-
|
|
629
|
+
clientApiParams,
|
|
622
630
|
locale
|
|
623
631
|
}) => {
|
|
632
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
624
633
|
const { data } = await clientApi.get(`/activities`, {
|
|
625
634
|
params: {
|
|
626
635
|
page: pageParam || void 0,
|
|
@@ -640,13 +649,12 @@ var GetActivities = async ({
|
|
|
640
649
|
return data;
|
|
641
650
|
};
|
|
642
651
|
var useGetActivities = (params = {}, options = {}) => {
|
|
643
|
-
const { token } = useConnectedXM();
|
|
644
652
|
return useConnectedInfiniteQuery(
|
|
645
653
|
ACTIVITIES_QUERY_KEY(),
|
|
646
654
|
(params2) => GetActivities(params2),
|
|
647
655
|
params,
|
|
648
656
|
{
|
|
649
|
-
|
|
657
|
+
...options
|
|
650
658
|
}
|
|
651
659
|
);
|
|
652
660
|
};
|
|
@@ -667,19 +675,19 @@ var SET_ACTIVITY_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) =
|
|
|
667
675
|
};
|
|
668
676
|
var GetActivity = async ({
|
|
669
677
|
activityId,
|
|
670
|
-
|
|
678
|
+
clientApiParams
|
|
671
679
|
}) => {
|
|
680
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
672
681
|
const { data } = await clientApi.get(`/activities/${activityId}`);
|
|
673
682
|
return data;
|
|
674
683
|
};
|
|
675
|
-
var useGetActivity = (activityId, options = {}) => {
|
|
676
|
-
const { token } = useConnectedXM();
|
|
684
|
+
var useGetActivity = (activityId = "", options = {}) => {
|
|
677
685
|
return useConnectedSingleQuery(
|
|
678
686
|
ACTIVITY_QUERY_KEY(activityId),
|
|
679
687
|
(params) => GetActivity({ activityId: activityId || "unknown", ...params }),
|
|
680
688
|
{
|
|
681
689
|
...options,
|
|
682
|
-
enabled: !!
|
|
690
|
+
enabled: !!activityId && (options?.enabled ?? true)
|
|
683
691
|
}
|
|
684
692
|
);
|
|
685
693
|
};
|
|
@@ -705,9 +713,10 @@ var GetAccountActivities = async ({
|
|
|
705
713
|
search,
|
|
706
714
|
accountId,
|
|
707
715
|
queryClient,
|
|
708
|
-
|
|
716
|
+
clientApiParams,
|
|
709
717
|
locale
|
|
710
718
|
}) => {
|
|
719
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
711
720
|
const { data } = await clientApi.get(`/accounts/${accountId}/activities`, {
|
|
712
721
|
params: {
|
|
713
722
|
page: pageParam || void 0,
|
|
@@ -726,15 +735,14 @@ var GetAccountActivities = async ({
|
|
|
726
735
|
}
|
|
727
736
|
return data;
|
|
728
737
|
};
|
|
729
|
-
var useGetAccountActivities = (accountId, params = {}, options = {}) => {
|
|
730
|
-
const { token } = useConnectedXM();
|
|
738
|
+
var useGetAccountActivities = (accountId = "", params = {}, options = {}) => {
|
|
731
739
|
return useConnectedInfiniteQuery(
|
|
732
740
|
ACCOUNT_ACTIVITIES_QUERY_KEY(accountId),
|
|
733
741
|
(params2) => GetAccountActivities({ accountId, ...params2 }),
|
|
734
742
|
params,
|
|
735
743
|
{
|
|
736
744
|
...options,
|
|
737
|
-
enabled: !!
|
|
745
|
+
enabled: !!accountId
|
|
738
746
|
}
|
|
739
747
|
);
|
|
740
748
|
};
|
|
@@ -752,19 +760,19 @@ var SET_ACCOUNT_BY_SHARE_CODE_QUERY_DATA = (client, keyParams, response, baseKey
|
|
|
752
760
|
};
|
|
753
761
|
var GetAccountByShareCode = async ({
|
|
754
762
|
shareCode,
|
|
755
|
-
|
|
763
|
+
clientApiParams
|
|
756
764
|
}) => {
|
|
765
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
757
766
|
const { data } = await clientApi.get(`/accounts/shareCode/${shareCode}`);
|
|
758
767
|
return data;
|
|
759
768
|
};
|
|
760
|
-
var useGetAccountByShareCode = (shareCode, options = {}) => {
|
|
761
|
-
const { token } = useConnectedXM();
|
|
769
|
+
var useGetAccountByShareCode = (shareCode = "", options = {}) => {
|
|
762
770
|
return useConnectedSingleQuery(
|
|
763
771
|
ACCOUNT_BY_SHARE_CODE_QUERY_KEY(shareCode),
|
|
764
772
|
(params) => GetAccountByShareCode({ shareCode: shareCode || "unknown", ...params }),
|
|
765
773
|
{
|
|
766
774
|
...options,
|
|
767
|
-
enabled: !!
|
|
775
|
+
enabled: !!shareCode && (options?.enabled ?? true),
|
|
768
776
|
retry: false
|
|
769
777
|
}
|
|
770
778
|
);
|
|
@@ -788,7 +796,7 @@ var GetCommunities = async ({
|
|
|
788
796
|
search,
|
|
789
797
|
privateCommunities,
|
|
790
798
|
queryClient,
|
|
791
|
-
|
|
799
|
+
clientApiParams,
|
|
792
800
|
locale
|
|
793
801
|
}) => {
|
|
794
802
|
if (privateCommunities) {
|
|
@@ -798,6 +806,7 @@ var GetCommunities = async ({
|
|
|
798
806
|
data: []
|
|
799
807
|
};
|
|
800
808
|
}
|
|
809
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
801
810
|
const { data } = await clientApi.get(`/communities`, {
|
|
802
811
|
params: {
|
|
803
812
|
page: pageParam || void 0,
|
|
@@ -843,12 +852,13 @@ var SET_COMMUNITY_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"],
|
|
|
843
852
|
};
|
|
844
853
|
var GetCommunity = async ({
|
|
845
854
|
communityId,
|
|
846
|
-
|
|
855
|
+
clientApiParams
|
|
847
856
|
}) => {
|
|
857
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
848
858
|
const { data } = await clientApi.get(`/communities/${communityId}`);
|
|
849
859
|
return data;
|
|
850
860
|
};
|
|
851
|
-
var useGetCommunity = (communityId, options = {}) => {
|
|
861
|
+
var useGetCommunity = (communityId = "", options = {}) => {
|
|
852
862
|
return useConnectedSingleQuery(
|
|
853
863
|
COMMUNITY_QUERY_KEY(communityId),
|
|
854
864
|
(params) => GetCommunity({ communityId, ...params }),
|
|
@@ -880,9 +890,10 @@ var GetAccountCommunities = async ({
|
|
|
880
890
|
search,
|
|
881
891
|
accountId,
|
|
882
892
|
queryClient,
|
|
883
|
-
|
|
893
|
+
clientApiParams,
|
|
884
894
|
locale
|
|
885
895
|
}) => {
|
|
896
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
886
897
|
const { data } = await clientApi.get(`/accounts/${accountId}/communities`, {
|
|
887
898
|
params: {
|
|
888
899
|
page: pageParam || void 0,
|
|
@@ -901,15 +912,14 @@ var GetAccountCommunities = async ({
|
|
|
901
912
|
}
|
|
902
913
|
return data;
|
|
903
914
|
};
|
|
904
|
-
var useGetAccountCommunities = (accountId, params = {}, options = {}) => {
|
|
905
|
-
const { token } = useConnectedXM();
|
|
915
|
+
var useGetAccountCommunities = (accountId = "", params = {}, options = {}) => {
|
|
906
916
|
return useConnectedInfiniteQuery(
|
|
907
917
|
ACCOUNT_COMMUNITIES_QUERY_KEY(accountId),
|
|
908
918
|
(params2) => GetAccountCommunities({ accountId, ...params2 }),
|
|
909
919
|
params,
|
|
910
920
|
{
|
|
911
921
|
...options,
|
|
912
|
-
enabled: !!
|
|
922
|
+
enabled: !!accountId && (options?.enabled ?? true)
|
|
913
923
|
}
|
|
914
924
|
);
|
|
915
925
|
};
|
|
@@ -935,9 +945,10 @@ var GetAccountFollowers = async ({
|
|
|
935
945
|
search,
|
|
936
946
|
accountId,
|
|
937
947
|
queryClient,
|
|
938
|
-
|
|
948
|
+
clientApiParams,
|
|
939
949
|
locale
|
|
940
950
|
}) => {
|
|
951
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
941
952
|
const { data } = await clientApi.get(`/accounts/${accountId}/followers`, {
|
|
942
953
|
params: {
|
|
943
954
|
page: pageParam || void 0,
|
|
@@ -956,15 +967,14 @@ var GetAccountFollowers = async ({
|
|
|
956
967
|
}
|
|
957
968
|
return data;
|
|
958
969
|
};
|
|
959
|
-
var useGetAccountFollowers = (accountId, params = {}, options = {}) => {
|
|
960
|
-
const { token } = useConnectedXM();
|
|
970
|
+
var useGetAccountFollowers = (accountId = "", params = {}, options = {}) => {
|
|
961
971
|
return useConnectedInfiniteQuery(
|
|
962
972
|
ACCOUNT_FOLLOWERS_QUERY_KEY(accountId),
|
|
963
973
|
(params2) => GetAccountFollowers({ accountId, ...params2 }),
|
|
964
974
|
params,
|
|
965
975
|
{
|
|
966
976
|
...options,
|
|
967
|
-
enabled: !!
|
|
977
|
+
enabled: !!accountId && (options?.enabled ?? true)
|
|
968
978
|
}
|
|
969
979
|
);
|
|
970
980
|
};
|
|
@@ -990,9 +1000,10 @@ var GetAccountFollowings = async ({
|
|
|
990
1000
|
search,
|
|
991
1001
|
accountId,
|
|
992
1002
|
queryClient,
|
|
993
|
-
|
|
1003
|
+
clientApiParams,
|
|
994
1004
|
locale
|
|
995
1005
|
}) => {
|
|
1006
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
996
1007
|
const { data } = await clientApi.get(`/accounts/${accountId}/following`, {
|
|
997
1008
|
params: {
|
|
998
1009
|
page: pageParam || void 0,
|
|
@@ -1011,15 +1022,14 @@ var GetAccountFollowings = async ({
|
|
|
1011
1022
|
}
|
|
1012
1023
|
return data;
|
|
1013
1024
|
};
|
|
1014
|
-
var useGetAccountFollowings = (accountId, params = {}, options = {}) => {
|
|
1015
|
-
const { token } = useConnectedXM();
|
|
1025
|
+
var useGetAccountFollowings = (accountId = "", params = {}, options = {}) => {
|
|
1016
1026
|
return useConnectedInfiniteQuery(
|
|
1017
1027
|
ACCOUNT_FOLLOWINGS_QUERY_KEY(accountId),
|
|
1018
1028
|
(params2) => GetAccountFollowings({ accountId, ...params2 }),
|
|
1019
1029
|
params,
|
|
1020
1030
|
{
|
|
1021
1031
|
...options,
|
|
1022
|
-
enabled: !!
|
|
1032
|
+
enabled: !!accountId && (options?.enabled ?? true)
|
|
1023
1033
|
}
|
|
1024
1034
|
);
|
|
1025
1035
|
};
|
|
@@ -1045,9 +1055,10 @@ var GetActivityComments = async ({
|
|
|
1045
1055
|
orderBy,
|
|
1046
1056
|
search,
|
|
1047
1057
|
queryClient,
|
|
1048
|
-
|
|
1058
|
+
clientApiParams,
|
|
1049
1059
|
locale
|
|
1050
1060
|
}) => {
|
|
1061
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1051
1062
|
const { data } = await clientApi.get(`/activities/${activityId}/comments`, {
|
|
1052
1063
|
params: {
|
|
1053
1064
|
page: pageParam || void 0,
|
|
@@ -1066,14 +1077,13 @@ var GetActivityComments = async ({
|
|
|
1066
1077
|
}
|
|
1067
1078
|
return data;
|
|
1068
1079
|
};
|
|
1069
|
-
var useGetActivityComments = (activityId, params = {}, options = {}) => {
|
|
1070
|
-
const { token } = useConnectedXM();
|
|
1080
|
+
var useGetActivityComments = (activityId = "", params = {}, options = {}) => {
|
|
1071
1081
|
return useConnectedInfiniteQuery(
|
|
1072
1082
|
ACTIVITY_COMMENTS_QUERY_KEY(activityId),
|
|
1073
1083
|
(params2) => GetActivityComments({ activityId, ...params2 }),
|
|
1074
1084
|
params,
|
|
1075
1085
|
{
|
|
1076
|
-
enabled: !!
|
|
1086
|
+
enabled: !!activityId && (options?.enabled ?? true)
|
|
1077
1087
|
}
|
|
1078
1088
|
);
|
|
1079
1089
|
};
|
|
@@ -1093,8 +1103,9 @@ var SET_ADVERTISEMENT_QUERY_DATA = (client, keyParams, response, baseKeys = ["en
|
|
|
1093
1103
|
);
|
|
1094
1104
|
};
|
|
1095
1105
|
var GetAdvertisement = async ({
|
|
1096
|
-
|
|
1106
|
+
clientApiParams
|
|
1097
1107
|
}) => {
|
|
1108
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1098
1109
|
const { data } = await clientApi.get(`/advertisement`);
|
|
1099
1110
|
return data;
|
|
1100
1111
|
};
|
|
@@ -1125,8 +1136,9 @@ var GetBenefits = async ({
|
|
|
1125
1136
|
pageSize,
|
|
1126
1137
|
orderBy,
|
|
1127
1138
|
search,
|
|
1128
|
-
|
|
1139
|
+
clientApiParams
|
|
1129
1140
|
}) => {
|
|
1141
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1130
1142
|
const { data } = await clientApi.get(`/benefits`, {
|
|
1131
1143
|
params: {
|
|
1132
1144
|
page: pageParam || void 0,
|
|
@@ -1138,14 +1150,12 @@ var GetBenefits = async ({
|
|
|
1138
1150
|
return data;
|
|
1139
1151
|
};
|
|
1140
1152
|
var useGetBenefits = (params = {}, options = {}) => {
|
|
1141
|
-
const { token } = useConnectedXM();
|
|
1142
1153
|
return useConnectedInfiniteQuery(
|
|
1143
1154
|
BENEFITS_QUERY_KEY(),
|
|
1144
1155
|
(params2) => GetBenefits(params2),
|
|
1145
1156
|
params,
|
|
1146
1157
|
{
|
|
1147
|
-
...options
|
|
1148
|
-
enabled: !!token && (options?.enabled ?? true)
|
|
1158
|
+
...options
|
|
1149
1159
|
}
|
|
1150
1160
|
);
|
|
1151
1161
|
};
|
|
@@ -1168,9 +1178,10 @@ var GetCommunityActivities = async ({
|
|
|
1168
1178
|
search,
|
|
1169
1179
|
communityId,
|
|
1170
1180
|
queryClient,
|
|
1171
|
-
|
|
1181
|
+
clientApiParams,
|
|
1172
1182
|
locale
|
|
1173
1183
|
}) => {
|
|
1184
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1174
1185
|
const { data } = await clientApi.get(
|
|
1175
1186
|
`/communities/${communityId}/activities`,
|
|
1176
1187
|
{
|
|
@@ -1192,15 +1203,14 @@ var GetCommunityActivities = async ({
|
|
|
1192
1203
|
}
|
|
1193
1204
|
return data;
|
|
1194
1205
|
};
|
|
1195
|
-
var useGetCommunityActivities = (communityId, params = {}, options = {}) => {
|
|
1196
|
-
const { token } = useConnectedXM();
|
|
1206
|
+
var useGetCommunityActivities = (communityId = "", params = {}, options = {}) => {
|
|
1197
1207
|
return useConnectedInfiniteQuery(
|
|
1198
1208
|
COMMUNITY_ACTIVITIES_QUERY_KEY(communityId),
|
|
1199
1209
|
(params2) => GetCommunityActivities({ communityId, ...params2 }),
|
|
1200
1210
|
params,
|
|
1201
1211
|
{
|
|
1202
1212
|
...options,
|
|
1203
|
-
enabled: !!
|
|
1213
|
+
enabled: !!communityId && (options?.enabled ?? true)
|
|
1204
1214
|
}
|
|
1205
1215
|
);
|
|
1206
1216
|
};
|
|
@@ -1222,8 +1232,9 @@ var GetCommunityAnnouncements = async ({
|
|
|
1222
1232
|
pageSize,
|
|
1223
1233
|
orderBy,
|
|
1224
1234
|
search,
|
|
1225
|
-
|
|
1235
|
+
clientApiParams
|
|
1226
1236
|
}) => {
|
|
1237
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1227
1238
|
const { data } = await clientApi.get(
|
|
1228
1239
|
`/communities/${communityId}/announcements`,
|
|
1229
1240
|
{
|
|
@@ -1237,15 +1248,14 @@ var GetCommunityAnnouncements = async ({
|
|
|
1237
1248
|
);
|
|
1238
1249
|
return data;
|
|
1239
1250
|
};
|
|
1240
|
-
var useGetCommunityAnnouncements = (communityId, params = {}, options = {}) => {
|
|
1241
|
-
const { token } = useConnectedXM();
|
|
1251
|
+
var useGetCommunityAnnouncements = (communityId = "", params = {}, options = {}) => {
|
|
1242
1252
|
return useConnectedInfiniteQuery(
|
|
1243
1253
|
COMMUNITY_ANNOUNCEMENTS_QUERY_KEY(communityId),
|
|
1244
1254
|
(params2) => GetCommunityAnnouncements({ communityId, ...params2 }),
|
|
1245
1255
|
params,
|
|
1246
1256
|
{
|
|
1247
1257
|
...options,
|
|
1248
|
-
enabled: !!
|
|
1258
|
+
enabled: !!communityId && (options?.enabled ?? true)
|
|
1249
1259
|
}
|
|
1250
1260
|
);
|
|
1251
1261
|
};
|
|
@@ -1274,9 +1284,10 @@ var GetEvents = async ({
|
|
|
1274
1284
|
search,
|
|
1275
1285
|
past,
|
|
1276
1286
|
queryClient,
|
|
1277
|
-
|
|
1287
|
+
clientApiParams,
|
|
1278
1288
|
locale
|
|
1279
1289
|
}) => {
|
|
1290
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1280
1291
|
const { data } = await clientApi.get(`/events`, {
|
|
1281
1292
|
params: {
|
|
1282
1293
|
page: pageParam || void 0,
|
|
@@ -1318,12 +1329,13 @@ var SET_EVENT_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
|
|
|
1318
1329
|
};
|
|
1319
1330
|
var GetEvent = async ({
|
|
1320
1331
|
eventId,
|
|
1321
|
-
|
|
1332
|
+
clientApiParams
|
|
1322
1333
|
}) => {
|
|
1334
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1323
1335
|
const { data } = await clientApi.get(`/events/${eventId}`);
|
|
1324
1336
|
return data;
|
|
1325
1337
|
};
|
|
1326
|
-
var useGetEvent = (eventId, options = {}) => {
|
|
1338
|
+
var useGetEvent = (eventId = "", options = {}) => {
|
|
1327
1339
|
return useConnectedSingleQuery(
|
|
1328
1340
|
EVENT_QUERY_KEY(eventId),
|
|
1329
1341
|
(params) => GetEvent({ eventId, ...params }),
|
|
@@ -1357,9 +1369,10 @@ var GetCommunityEvents = async ({
|
|
|
1357
1369
|
communityId,
|
|
1358
1370
|
past,
|
|
1359
1371
|
queryClient,
|
|
1360
|
-
|
|
1372
|
+
clientApiParams,
|
|
1361
1373
|
locale
|
|
1362
1374
|
}) => {
|
|
1375
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1363
1376
|
const { data } = await clientApi.get(`/communities/${communityId}/events`, {
|
|
1364
1377
|
params: {
|
|
1365
1378
|
page: pageParam || void 0,
|
|
@@ -1379,7 +1392,7 @@ var GetCommunityEvents = async ({
|
|
|
1379
1392
|
}
|
|
1380
1393
|
return data;
|
|
1381
1394
|
};
|
|
1382
|
-
var useGetCommunityEvents = (communityId, past = false, params = {}, options = {}) => {
|
|
1395
|
+
var useGetCommunityEvents = (communityId = "", past = false, params = {}, options = {}) => {
|
|
1383
1396
|
return useConnectedInfiniteQuery(
|
|
1384
1397
|
COMMUNITY_EVENTS_QUERY_KEY(communityId, past),
|
|
1385
1398
|
(params2) => GetCommunityEvents({ communityId, past, ...params2 }),
|
|
@@ -1411,8 +1424,9 @@ var GetCommunityMembers = async ({
|
|
|
1411
1424
|
orderBy,
|
|
1412
1425
|
search,
|
|
1413
1426
|
communityId,
|
|
1414
|
-
|
|
1427
|
+
clientApiParams
|
|
1415
1428
|
}) => {
|
|
1429
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1416
1430
|
const { data } = await clientApi.get(`/communities/${communityId}/members`, {
|
|
1417
1431
|
params: {
|
|
1418
1432
|
page: pageParam || void 0,
|
|
@@ -1423,15 +1437,14 @@ var GetCommunityMembers = async ({
|
|
|
1423
1437
|
});
|
|
1424
1438
|
return data;
|
|
1425
1439
|
};
|
|
1426
|
-
var useGetCommunityMembers = (communityId, params = {}, options = {}) => {
|
|
1427
|
-
const { token } = useConnectedXM();
|
|
1440
|
+
var useGetCommunityMembers = (communityId = "", params = {}, options = {}) => {
|
|
1428
1441
|
return useConnectedInfiniteQuery(
|
|
1429
1442
|
COMMUNITY_MEMBERS_QUERY_KEY(communityId),
|
|
1430
1443
|
(params2) => GetCommunityMembers({ communityId, ...params2 }),
|
|
1431
1444
|
params,
|
|
1432
1445
|
{
|
|
1433
1446
|
...options,
|
|
1434
|
-
enabled: !!
|
|
1447
|
+
enabled: !!communityId && (options?.enabled ?? true)
|
|
1435
1448
|
}
|
|
1436
1449
|
);
|
|
1437
1450
|
};
|
|
@@ -1453,8 +1466,9 @@ var GetCommunityModerators = async ({
|
|
|
1453
1466
|
orderBy,
|
|
1454
1467
|
search,
|
|
1455
1468
|
communityId,
|
|
1456
|
-
|
|
1469
|
+
clientApiParams
|
|
1457
1470
|
}) => {
|
|
1471
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1458
1472
|
const { data } = await clientApi.get(
|
|
1459
1473
|
`/communities/${communityId}/moderators`,
|
|
1460
1474
|
{
|
|
@@ -1468,15 +1482,14 @@ var GetCommunityModerators = async ({
|
|
|
1468
1482
|
);
|
|
1469
1483
|
return data;
|
|
1470
1484
|
};
|
|
1471
|
-
var useGetCommunityModerators = (communityId, params = {}, options = {}) => {
|
|
1472
|
-
const { token } = useConnectedXM();
|
|
1485
|
+
var useGetCommunityModerators = (communityId = "", params = {}, options = {}) => {
|
|
1473
1486
|
return useConnectedInfiniteQuery(
|
|
1474
1487
|
COMMUNITY_MODERATORS_QUERY_KEY(communityId),
|
|
1475
1488
|
(params2) => GetCommunityModerators({ communityId, ...params2 }),
|
|
1476
1489
|
params,
|
|
1477
1490
|
{
|
|
1478
1491
|
...options,
|
|
1479
|
-
enabled: !!
|
|
1492
|
+
enabled: !!communityId && (options?.enabled ?? true)
|
|
1480
1493
|
}
|
|
1481
1494
|
);
|
|
1482
1495
|
};
|
|
@@ -1497,8 +1510,9 @@ var GetSponsors = async ({
|
|
|
1497
1510
|
pageSize,
|
|
1498
1511
|
orderBy,
|
|
1499
1512
|
search,
|
|
1500
|
-
|
|
1513
|
+
clientApiParams
|
|
1501
1514
|
}) => {
|
|
1515
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1502
1516
|
const { data } = await clientApi.get(`/sponsors`, {
|
|
1503
1517
|
params: {
|
|
1504
1518
|
page: pageParam || void 0,
|
|
@@ -1534,12 +1548,13 @@ var SET_SPONSOR_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) =>
|
|
|
1534
1548
|
};
|
|
1535
1549
|
var GetSponsor = async ({
|
|
1536
1550
|
accountId,
|
|
1537
|
-
|
|
1551
|
+
clientApiParams
|
|
1538
1552
|
}) => {
|
|
1553
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1539
1554
|
const { data } = await clientApi.get(`/sponsors/${accountId}`);
|
|
1540
1555
|
return data;
|
|
1541
1556
|
};
|
|
1542
|
-
var useGetSponsor = (accountId, options = {}) => {
|
|
1557
|
+
var useGetSponsor = (accountId = "", options = {}) => {
|
|
1543
1558
|
return useConnectedSingleQuery_default(
|
|
1544
1559
|
SPONSOR_QUERY_KEY(accountId),
|
|
1545
1560
|
(params) => GetSponsor({ accountId, ...params }),
|
|
@@ -1571,9 +1586,10 @@ var GetCommunitySponsors = async ({
|
|
|
1571
1586
|
search,
|
|
1572
1587
|
communityId,
|
|
1573
1588
|
queryClient,
|
|
1574
|
-
|
|
1589
|
+
clientApiParams,
|
|
1575
1590
|
locale
|
|
1576
1591
|
}) => {
|
|
1592
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1577
1593
|
const { data } = await clientApi.get(`/communities/${communityId}/sponsors`, {
|
|
1578
1594
|
params: {
|
|
1579
1595
|
page: pageParam || void 0,
|
|
@@ -1592,7 +1608,7 @@ var GetCommunitySponsors = async ({
|
|
|
1592
1608
|
}
|
|
1593
1609
|
return data;
|
|
1594
1610
|
};
|
|
1595
|
-
var useGetCommunitySponsors = (communityId, params = {}, options = {}) => {
|
|
1611
|
+
var useGetCommunitySponsors = (communityId = "", params = {}, options = {}) => {
|
|
1596
1612
|
return useConnectedInfiniteQuery(
|
|
1597
1613
|
COMMUNITY_SPONSORS_QUERY_KEY(communityId),
|
|
1598
1614
|
(params2) => GetCommunitySponsors({ communityId, ...params2 }),
|
|
@@ -1621,9 +1637,10 @@ var GetContents = async ({
|
|
|
1621
1637
|
orderBy,
|
|
1622
1638
|
search,
|
|
1623
1639
|
queryClient,
|
|
1624
|
-
|
|
1640
|
+
clientApiParams,
|
|
1625
1641
|
locale
|
|
1626
1642
|
}) => {
|
|
1643
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1627
1644
|
const { data } = await clientApi.get(`/contents`, {
|
|
1628
1645
|
params: {
|
|
1629
1646
|
page: pageParam || void 0,
|
|
@@ -1667,12 +1684,13 @@ var SET_CONTENT_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) =>
|
|
|
1667
1684
|
};
|
|
1668
1685
|
var GetContent = async ({
|
|
1669
1686
|
contentId,
|
|
1670
|
-
|
|
1687
|
+
clientApiParams
|
|
1671
1688
|
}) => {
|
|
1689
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1672
1690
|
const { data } = await clientApi.get(`/contents/${contentId}`);
|
|
1673
1691
|
return data;
|
|
1674
1692
|
};
|
|
1675
|
-
var useGetContent = (contentId, options = {}) => {
|
|
1693
|
+
var useGetContent = (contentId = "", options = {}) => {
|
|
1676
1694
|
return useConnectedSingleQuery_default(
|
|
1677
1695
|
CONTENT_QUERY_KEY(contentId),
|
|
1678
1696
|
(params) => GetContent({ contentId: contentId || "", ...params }),
|
|
@@ -1704,9 +1722,10 @@ var GetContentActivities = async ({
|
|
|
1704
1722
|
search,
|
|
1705
1723
|
contentId,
|
|
1706
1724
|
queryClient,
|
|
1707
|
-
|
|
1725
|
+
clientApiParams,
|
|
1708
1726
|
locale
|
|
1709
1727
|
}) => {
|
|
1728
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1710
1729
|
const { data } = await clientApi.get(`/contents/${contentId}/activities`, {
|
|
1711
1730
|
params: {
|
|
1712
1731
|
page: pageParam || void 0,
|
|
@@ -1725,15 +1744,14 @@ var GetContentActivities = async ({
|
|
|
1725
1744
|
}
|
|
1726
1745
|
return data;
|
|
1727
1746
|
};
|
|
1728
|
-
var useGetContentActivities = (contentId, params = {}, options = {}) => {
|
|
1729
|
-
const { token } = useConnectedXM();
|
|
1747
|
+
var useGetContentActivities = (contentId = "", params = {}, options = {}) => {
|
|
1730
1748
|
return useConnectedInfiniteQuery(
|
|
1731
1749
|
CONTENT_ACTIVITIES_QUERY_KEY(contentId),
|
|
1732
1750
|
(params2) => GetContentActivities({ contentId, ...params2 }),
|
|
1733
1751
|
params,
|
|
1734
1752
|
{
|
|
1735
1753
|
...options,
|
|
1736
|
-
enabled: !!
|
|
1754
|
+
enabled: !!contentId && (options.enabled ?? true)
|
|
1737
1755
|
}
|
|
1738
1756
|
);
|
|
1739
1757
|
};
|
|
@@ -1755,9 +1773,10 @@ var GetContentTypes = async ({
|
|
|
1755
1773
|
orderBy,
|
|
1756
1774
|
search,
|
|
1757
1775
|
queryClient,
|
|
1758
|
-
|
|
1776
|
+
clientApiParams,
|
|
1759
1777
|
locale
|
|
1760
1778
|
}) => {
|
|
1779
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1761
1780
|
const { data } = await clientApi.get(`/contentTypes`, {
|
|
1762
1781
|
params: {
|
|
1763
1782
|
page: pageParam || void 0,
|
|
@@ -1801,12 +1820,13 @@ var SET_CONTENT_TYPE_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"
|
|
|
1801
1820
|
};
|
|
1802
1821
|
var GetContentType = async ({
|
|
1803
1822
|
contentTypeId,
|
|
1804
|
-
|
|
1823
|
+
clientApiParams
|
|
1805
1824
|
}) => {
|
|
1825
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1806
1826
|
const { data } = await clientApi.get(`/contentTypes/${contentTypeId}`);
|
|
1807
1827
|
return data;
|
|
1808
1828
|
};
|
|
1809
|
-
var useGetContentType = (contentTypeId, options = {}) => {
|
|
1829
|
+
var useGetContentType = (contentTypeId = "", options = {}) => {
|
|
1810
1830
|
return useConnectedSingleQuery_default(
|
|
1811
1831
|
CONTENT_TYPE_QUERY_KEY(contentTypeId),
|
|
1812
1832
|
(params) => GetContentType({ contentTypeId: contentTypeId || "", ...params }),
|
|
@@ -1835,9 +1855,10 @@ var GetContentTypeContents = async ({
|
|
|
1835
1855
|
search,
|
|
1836
1856
|
contentTypeId,
|
|
1837
1857
|
queryClient,
|
|
1838
|
-
|
|
1858
|
+
clientApiParams,
|
|
1839
1859
|
locale
|
|
1840
1860
|
}) => {
|
|
1861
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1841
1862
|
const { data } = await clientApi.get(
|
|
1842
1863
|
`/contentTypes/${contentTypeId}/contents`,
|
|
1843
1864
|
{
|
|
@@ -1859,7 +1880,7 @@ var GetContentTypeContents = async ({
|
|
|
1859
1880
|
}
|
|
1860
1881
|
return data;
|
|
1861
1882
|
};
|
|
1862
|
-
var useGetContentTypeContents = (contentTypeId, params = {}, options = {}) => {
|
|
1883
|
+
var useGetContentTypeContents = (contentTypeId = "", params = {}, options = {}) => {
|
|
1863
1884
|
return useConnectedInfiniteQuery(
|
|
1864
1885
|
CONTENT_TYPE_CONTENTS_QUERY_KEY(contentTypeId),
|
|
1865
1886
|
(params2) => GetContentTypeContents({ ...params2, contentTypeId: contentTypeId || "" }),
|
|
@@ -1892,9 +1913,10 @@ var GetEventActivities = async ({
|
|
|
1892
1913
|
orderBy,
|
|
1893
1914
|
search,
|
|
1894
1915
|
queryClient,
|
|
1895
|
-
|
|
1916
|
+
clientApiParams,
|
|
1896
1917
|
locale
|
|
1897
1918
|
}) => {
|
|
1919
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1898
1920
|
const { data } = await clientApi.get(`/events/${eventId}/activities`, {
|
|
1899
1921
|
params: {
|
|
1900
1922
|
page: pageParam || void 0,
|
|
@@ -1913,15 +1935,14 @@ var GetEventActivities = async ({
|
|
|
1913
1935
|
}
|
|
1914
1936
|
return data;
|
|
1915
1937
|
};
|
|
1916
|
-
var useGetEventActivities = (eventId, params = {}, options = {}) => {
|
|
1917
|
-
const { token } = useConnectedXM();
|
|
1938
|
+
var useGetEventActivities = (eventId = "", params = {}, options = {}) => {
|
|
1918
1939
|
return useConnectedInfiniteQuery(
|
|
1919
1940
|
EVENT_ACTIVITIES_QUERY_KEY(eventId),
|
|
1920
1941
|
(params2) => GetEventActivities({ eventId, ...params2 }),
|
|
1921
1942
|
params,
|
|
1922
1943
|
{
|
|
1923
1944
|
...options,
|
|
1924
|
-
enabled: !!
|
|
1945
|
+
enabled: !!eventId
|
|
1925
1946
|
}
|
|
1926
1947
|
);
|
|
1927
1948
|
};
|
|
@@ -1947,9 +1968,10 @@ var GetEventFaqSections = async ({
|
|
|
1947
1968
|
orderBy,
|
|
1948
1969
|
search,
|
|
1949
1970
|
queryClient,
|
|
1950
|
-
|
|
1971
|
+
clientApiParams,
|
|
1951
1972
|
locale
|
|
1952
1973
|
}) => {
|
|
1974
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1953
1975
|
const { data } = await clientApi.get(`/events/${eventId}/faqs`, {
|
|
1954
1976
|
params: {
|
|
1955
1977
|
page: pageParam || void 0,
|
|
@@ -1968,7 +1990,7 @@ var GetEventFaqSections = async ({
|
|
|
1968
1990
|
}
|
|
1969
1991
|
return data;
|
|
1970
1992
|
};
|
|
1971
|
-
var useGetEventFaqSections = (eventId, params = {}, options = {}) => {
|
|
1993
|
+
var useGetEventFaqSections = (eventId = "", params = {}, options = {}) => {
|
|
1972
1994
|
return useConnectedInfiniteQuery(
|
|
1973
1995
|
EVENT_FAQ_SECTIONS_QUERY_KEY(eventId),
|
|
1974
1996
|
(params2) => GetEventFaqSections({ eventId, ...params2 }),
|
|
@@ -1994,12 +2016,13 @@ var SET_EVENT_FAQ_SECTION_QUERY_DATA = (client, keyParams, response, baseKeys =
|
|
|
1994
2016
|
var GetEventFAQSection = async ({
|
|
1995
2017
|
eventId,
|
|
1996
2018
|
sectionId,
|
|
1997
|
-
|
|
2019
|
+
clientApiParams
|
|
1998
2020
|
}) => {
|
|
2021
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1999
2022
|
const { data } = await clientApi.get(`/events/${eventId}/faqs/${sectionId}`);
|
|
2000
2023
|
return data;
|
|
2001
2024
|
};
|
|
2002
|
-
var useGetEventFAQSection = (eventId, sectionId, options = {}) => {
|
|
2025
|
+
var useGetEventFAQSection = (eventId = "", sectionId = "", options = {}) => {
|
|
2003
2026
|
return useConnectedSingleQuery(
|
|
2004
2027
|
EVENT_FAQ_SECTION_QUERY_KEY(eventId, sectionId),
|
|
2005
2028
|
(params) => GetEventFAQSection({ eventId, sectionId, ...params }),
|
|
@@ -2032,9 +2055,10 @@ var GetEventFaqs = async ({
|
|
|
2032
2055
|
orderBy,
|
|
2033
2056
|
search,
|
|
2034
2057
|
queryClient,
|
|
2035
|
-
|
|
2058
|
+
clientApiParams,
|
|
2036
2059
|
locale
|
|
2037
2060
|
}) => {
|
|
2061
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2038
2062
|
const { data } = await clientApi.get(
|
|
2039
2063
|
`/events/${eventId}/faqs/${sectionId}/questions`,
|
|
2040
2064
|
{
|
|
@@ -2056,7 +2080,7 @@ var GetEventFaqs = async ({
|
|
|
2056
2080
|
}
|
|
2057
2081
|
return data;
|
|
2058
2082
|
};
|
|
2059
|
-
var useGetEventFaqs = (eventId, sectionId, params = {}, options = {}) => {
|
|
2083
|
+
var useGetEventFaqs = (eventId = "", sectionId = "", params = {}, options = {}) => {
|
|
2060
2084
|
return useConnectedInfiniteQuery(
|
|
2061
2085
|
EVENT_FAQ_SECTION_QUESTIONS_QUERY_KEY(eventId, sectionId),
|
|
2062
2086
|
(params2) => GetEventFaqs({ eventId, sectionId, ...params2 }),
|
|
@@ -2086,14 +2110,15 @@ var GetEventFAQSectionQuestion = async ({
|
|
|
2086
2110
|
eventId,
|
|
2087
2111
|
sectionId,
|
|
2088
2112
|
questionId,
|
|
2089
|
-
|
|
2113
|
+
clientApiParams
|
|
2090
2114
|
}) => {
|
|
2115
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2091
2116
|
const { data } = await clientApi.get(
|
|
2092
2117
|
`/events/${eventId}/faqs/${sectionId}/questions/${questionId}`
|
|
2093
2118
|
);
|
|
2094
2119
|
return data;
|
|
2095
2120
|
};
|
|
2096
|
-
var useGetEventFAQSectionQuestion = (eventId, sectionId, questionId, options = {}) => {
|
|
2121
|
+
var useGetEventFAQSectionQuestion = (eventId = "", sectionId = "", questionId = "", options = {}) => {
|
|
2097
2122
|
return useConnectedSingleQuery(
|
|
2098
2123
|
EVENT_FAQ_SECTION_QUESTION_QUERY_KEY(eventId, sectionId, questionId),
|
|
2099
2124
|
(params) => GetEventFAQSectionQuestion({ eventId, sectionId, questionId, ...params }),
|
|
@@ -2125,9 +2150,10 @@ var GetEventPages = async ({
|
|
|
2125
2150
|
orderBy,
|
|
2126
2151
|
search,
|
|
2127
2152
|
queryClient,
|
|
2128
|
-
|
|
2153
|
+
clientApiParams,
|
|
2129
2154
|
locale
|
|
2130
2155
|
}) => {
|
|
2156
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2131
2157
|
const { data } = await clientApi.get(`/events/${eventId}/pages`, {
|
|
2132
2158
|
params: {
|
|
2133
2159
|
page: pageParam || void 0,
|
|
@@ -2146,7 +2172,7 @@ var GetEventPages = async ({
|
|
|
2146
2172
|
}
|
|
2147
2173
|
return data;
|
|
2148
2174
|
};
|
|
2149
|
-
var useGetEventPages = (eventId, params = {}, options = {}) => {
|
|
2175
|
+
var useGetEventPages = (eventId = "", params = {}, options = {}) => {
|
|
2150
2176
|
return useConnectedInfiniteQuery(
|
|
2151
2177
|
EVENT_PAGES_QUERY_KEY(eventId),
|
|
2152
2178
|
(params2) => GetEventPages({ eventId, ...params2 }),
|
|
@@ -2172,12 +2198,13 @@ var SET_EVENT_PAGE_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"])
|
|
|
2172
2198
|
var GetEventPage = async ({
|
|
2173
2199
|
eventId,
|
|
2174
2200
|
pageId,
|
|
2175
|
-
|
|
2201
|
+
clientApiParams
|
|
2176
2202
|
}) => {
|
|
2203
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2177
2204
|
const { data } = await clientApi.get(`/events/${eventId}/pages/${pageId}`);
|
|
2178
2205
|
return data;
|
|
2179
2206
|
};
|
|
2180
|
-
var useGetEventPage = (eventId, pageId, options = {}) => {
|
|
2207
|
+
var useGetEventPage = (eventId = "", pageId, options = {}) => {
|
|
2181
2208
|
return useConnectedSingleQuery(
|
|
2182
2209
|
EVENT_PAGE_QUERY_KEY(eventId, pageId),
|
|
2183
2210
|
(params) => GetEventPage({ eventId, pageId, ...params }),
|
|
@@ -2197,8 +2224,9 @@ var GetEventQuestionSearchValues = async ({
|
|
|
2197
2224
|
pageSize,
|
|
2198
2225
|
orderBy,
|
|
2199
2226
|
search,
|
|
2200
|
-
|
|
2227
|
+
clientApiParams
|
|
2201
2228
|
}) => {
|
|
2229
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2202
2230
|
const { data } = await clientApi.get(
|
|
2203
2231
|
`/events/${eventId}/questions/${questionId}/values`,
|
|
2204
2232
|
{
|
|
@@ -2212,7 +2240,7 @@ var GetEventQuestionSearchValues = async ({
|
|
|
2212
2240
|
);
|
|
2213
2241
|
return data;
|
|
2214
2242
|
};
|
|
2215
|
-
var useGetEventQuestionSearchValues = (eventId, questionId, params = {}, options = {}) => {
|
|
2243
|
+
var useGetEventQuestionSearchValues = (eventId = "", questionId = "", params = {}, options = {}) => {
|
|
2216
2244
|
return useConnectedInfiniteQuery(
|
|
2217
2245
|
EVENT_QUESTION_VALUES_QUERY_KEY(eventId, questionId),
|
|
2218
2246
|
(params2) => GetEventQuestionSearchValues({
|
|
@@ -2249,9 +2277,10 @@ var GetEventRegistrants = async ({
|
|
|
2249
2277
|
orderBy,
|
|
2250
2278
|
search,
|
|
2251
2279
|
queryClient,
|
|
2252
|
-
|
|
2280
|
+
clientApiParams,
|
|
2253
2281
|
locale
|
|
2254
2282
|
}) => {
|
|
2283
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2255
2284
|
const { data } = await clientApi.get(`/events/${eventId}/registrants`, {
|
|
2256
2285
|
params: {
|
|
2257
2286
|
page: pageParam || void 0,
|
|
@@ -2270,15 +2299,14 @@ var GetEventRegistrants = async ({
|
|
|
2270
2299
|
}
|
|
2271
2300
|
return data;
|
|
2272
2301
|
};
|
|
2273
|
-
var useGetEventRegistrants = (eventId, params = {}, options = {}) => {
|
|
2274
|
-
const { token } = useConnectedXM();
|
|
2302
|
+
var useGetEventRegistrants = (eventId = "", params = {}, options = {}) => {
|
|
2275
2303
|
return useConnectedInfiniteQuery(
|
|
2276
2304
|
EVENT_REGISTRANTS_QUERY_KEY(eventId),
|
|
2277
2305
|
(params2) => GetEventRegistrants({ eventId, ...params2 }),
|
|
2278
2306
|
params,
|
|
2279
2307
|
{
|
|
2280
2308
|
...options,
|
|
2281
|
-
enabled: !!
|
|
2309
|
+
enabled: !!eventId && (options?.enabled ?? true)
|
|
2282
2310
|
}
|
|
2283
2311
|
);
|
|
2284
2312
|
};
|
|
@@ -2304,9 +2332,10 @@ var GetEventSessions = async ({
|
|
|
2304
2332
|
orderBy,
|
|
2305
2333
|
search,
|
|
2306
2334
|
queryClient,
|
|
2307
|
-
|
|
2335
|
+
clientApiParams,
|
|
2308
2336
|
locale
|
|
2309
2337
|
}) => {
|
|
2338
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2310
2339
|
const { data } = await clientApi.get(`/events/${eventId}/sessions`, {
|
|
2311
2340
|
params: {
|
|
2312
2341
|
page: pageParam || void 0,
|
|
@@ -2325,7 +2354,7 @@ var GetEventSessions = async ({
|
|
|
2325
2354
|
}
|
|
2326
2355
|
return data;
|
|
2327
2356
|
};
|
|
2328
|
-
var useGetEventSessions = (eventId, params = {}, options = {}) => {
|
|
2357
|
+
var useGetEventSessions = (eventId = "", params = {}, options = {}) => {
|
|
2329
2358
|
return useConnectedInfiniteQuery(
|
|
2330
2359
|
EVENT_SESSIONS_QUERY_KEY(eventId),
|
|
2331
2360
|
(params2) => GetEventSessions({ eventId, ...params2 }),
|
|
@@ -2351,14 +2380,15 @@ var SET_EVENT_SESSION_QUERY_DATA = (client, keyParams, response, baseKeys = ["en
|
|
|
2351
2380
|
var GetEventSession = async ({
|
|
2352
2381
|
eventId,
|
|
2353
2382
|
sessionId,
|
|
2354
|
-
|
|
2383
|
+
clientApiParams
|
|
2355
2384
|
}) => {
|
|
2385
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2356
2386
|
const { data } = await clientApi.get(
|
|
2357
2387
|
`/events/${eventId}/sessions/${sessionId}`
|
|
2358
2388
|
);
|
|
2359
2389
|
return data;
|
|
2360
2390
|
};
|
|
2361
|
-
var useGetEventSession = (eventId, sessionId, options = {}) => {
|
|
2391
|
+
var useGetEventSession = (eventId = "", sessionId = "", options = {}) => {
|
|
2362
2392
|
return useConnectedSingleQuery(
|
|
2363
2393
|
EVENT_SESSION_QUERY_KEY(eventId, sessionId),
|
|
2364
2394
|
(params) => GetEventSession({ eventId, sessionId, ...params }),
|
|
@@ -2390,9 +2420,10 @@ var GetEventSpeakers = async ({
|
|
|
2390
2420
|
orderBy,
|
|
2391
2421
|
search,
|
|
2392
2422
|
queryClient,
|
|
2393
|
-
|
|
2423
|
+
clientApiParams,
|
|
2394
2424
|
locale
|
|
2395
2425
|
}) => {
|
|
2426
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2396
2427
|
const { data } = await clientApi.get(`/events/${eventId}/speakers`, {
|
|
2397
2428
|
params: {
|
|
2398
2429
|
page: pageParam || void 0,
|
|
@@ -2411,7 +2442,7 @@ var GetEventSpeakers = async ({
|
|
|
2411
2442
|
}
|
|
2412
2443
|
return data;
|
|
2413
2444
|
};
|
|
2414
|
-
var useGetEventSpeakers = (eventId, params = {}, options = {}) => {
|
|
2445
|
+
var useGetEventSpeakers = (eventId = "", params = {}, options = {}) => {
|
|
2415
2446
|
return useConnectedInfiniteQuery(
|
|
2416
2447
|
EVENT_SPEAKERS_QUERY_KEY(eventId),
|
|
2417
2448
|
(params2) => GetEventSpeakers({ eventId, ...params2 }),
|
|
@@ -2437,14 +2468,15 @@ var SET_EVENT_SPEAKER_QUERY_DATA = (client, keyParams, response, baseKeys = ["en
|
|
|
2437
2468
|
var GetEventSpeaker = async ({
|
|
2438
2469
|
eventId,
|
|
2439
2470
|
speakerId,
|
|
2440
|
-
|
|
2471
|
+
clientApiParams
|
|
2441
2472
|
}) => {
|
|
2473
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2442
2474
|
const { data } = await clientApi.get(
|
|
2443
2475
|
`/events/${eventId}/speakers/${speakerId}`
|
|
2444
2476
|
);
|
|
2445
2477
|
return data;
|
|
2446
2478
|
};
|
|
2447
|
-
var useGetEventSpeaker = (eventId, speakerId, options = {}) => {
|
|
2479
|
+
var useGetEventSpeaker = (eventId = "", speakerId = "", options = {}) => {
|
|
2448
2480
|
return useConnectedSingleQuery(
|
|
2449
2481
|
EVENT_SPEAKER_QUERY_KEY(eventId, speakerId),
|
|
2450
2482
|
(params) => GetEventSpeaker({ eventId, speakerId, ...params }),
|
|
@@ -2475,8 +2507,9 @@ var GetEventTickets = async ({
|
|
|
2475
2507
|
pageSize,
|
|
2476
2508
|
orderBy,
|
|
2477
2509
|
search,
|
|
2478
|
-
|
|
2510
|
+
clientApiParams
|
|
2479
2511
|
}) => {
|
|
2512
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2480
2513
|
const { data } = await clientApi.get(`/events/${eventId}/tickets`, {
|
|
2481
2514
|
params: {
|
|
2482
2515
|
page: pageParam || void 0,
|
|
@@ -2487,7 +2520,7 @@ var GetEventTickets = async ({
|
|
|
2487
2520
|
});
|
|
2488
2521
|
return data;
|
|
2489
2522
|
};
|
|
2490
|
-
var useGetEventTickets = (eventId, params = {}, options = {}) => {
|
|
2523
|
+
var useGetEventTickets = (eventId = "", params = {}, options = {}) => {
|
|
2491
2524
|
return useConnectedInfiniteQuery(
|
|
2492
2525
|
EVENT_TICKETS_QUERY_KEY(eventId),
|
|
2493
2526
|
(params2) => GetEventTickets({ eventId, ...params2 }),
|
|
@@ -2520,9 +2553,10 @@ var GetEventSponsors = async ({
|
|
|
2520
2553
|
orderBy,
|
|
2521
2554
|
search,
|
|
2522
2555
|
queryClient,
|
|
2523
|
-
|
|
2556
|
+
clientApiParams,
|
|
2524
2557
|
locale
|
|
2525
2558
|
}) => {
|
|
2559
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2526
2560
|
const { data } = await clientApi.get(`/events/${eventId}/sponsors`, {
|
|
2527
2561
|
params: {
|
|
2528
2562
|
page: pageParam || void 0,
|
|
@@ -2541,7 +2575,7 @@ var GetEventSponsors = async ({
|
|
|
2541
2575
|
}
|
|
2542
2576
|
return data;
|
|
2543
2577
|
};
|
|
2544
|
-
var useGetEventSponsors = (eventId, params = {}, options = {}) => {
|
|
2578
|
+
var useGetEventSponsors = (eventId = "", params = {}, options = {}) => {
|
|
2545
2579
|
return useConnectedInfiniteQuery(
|
|
2546
2580
|
EVENT_TICKETS_QUERY_KEY(eventId),
|
|
2547
2581
|
(params2) => GetEventSponsors({ eventId, ...params2 }),
|
|
@@ -2572,9 +2606,10 @@ var GetFeaturedEvents = async ({
|
|
|
2572
2606
|
pageSize,
|
|
2573
2607
|
orderBy,
|
|
2574
2608
|
queryClient,
|
|
2575
|
-
|
|
2609
|
+
clientApiParams,
|
|
2576
2610
|
locale
|
|
2577
2611
|
}) => {
|
|
2612
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2578
2613
|
const { data } = await clientApi.get(`/events/featured`, {
|
|
2579
2614
|
params: {
|
|
2580
2615
|
page: pageParam || void 0,
|
|
@@ -2604,8 +2639,9 @@ var useGetFeaturedEvents = (params = {}, options = {}) => {
|
|
|
2604
2639
|
// src/queries/organization/useGetOrganization.ts
|
|
2605
2640
|
var ORGANIZATION_QUERY_KEY = () => ["ORGANIZATION"];
|
|
2606
2641
|
var GetOrganization = async ({
|
|
2607
|
-
|
|
2642
|
+
clientApiParams
|
|
2608
2643
|
}) => {
|
|
2644
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2609
2645
|
const { data } = await clientApi.get(`/organization`);
|
|
2610
2646
|
return data;
|
|
2611
2647
|
};
|
|
@@ -2623,8 +2659,9 @@ var ORGANIZATION_EXPLORE_QUERY_KEY = () => [
|
|
|
2623
2659
|
"ORGANIZATION"
|
|
2624
2660
|
];
|
|
2625
2661
|
var GetOrganizationExplore = async ({
|
|
2626
|
-
|
|
2662
|
+
clientApiParams
|
|
2627
2663
|
}) => {
|
|
2664
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2628
2665
|
const { data } = await clientApi.get(`/organization/explore`);
|
|
2629
2666
|
return data;
|
|
2630
2667
|
};
|
|
@@ -2653,8 +2690,9 @@ var SET_ORGANIZATION_PAGE_QUERY_DATA = (queryClient, keyParams, response, baseKe
|
|
|
2653
2690
|
};
|
|
2654
2691
|
var GetOrganizationPage = async ({
|
|
2655
2692
|
type,
|
|
2656
|
-
|
|
2693
|
+
clientApiParams
|
|
2657
2694
|
}) => {
|
|
2695
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2658
2696
|
const { data } = await clientApi.get(`/organization/pages/${type}`);
|
|
2659
2697
|
return data;
|
|
2660
2698
|
};
|
|
@@ -2675,8 +2713,9 @@ var ORGANIZATION_SUBSCRIPTIONS_QUERY_KEY = () => [
|
|
|
2675
2713
|
"SUBSCRIPTIONS"
|
|
2676
2714
|
];
|
|
2677
2715
|
var GetOrganizationSubscriptionProducts = async ({
|
|
2678
|
-
|
|
2716
|
+
clientApiParams
|
|
2679
2717
|
}) => {
|
|
2718
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2680
2719
|
const { data } = await clientApi.get(`/organization/subscriptions`);
|
|
2681
2720
|
return data;
|
|
2682
2721
|
};
|
|
@@ -2695,8 +2734,9 @@ var ORGANIZATION_PAYMENT_INTEGRATION_QUERY_KEY = () => [
|
|
|
2695
2734
|
"PAYMENT_INTEGRATION"
|
|
2696
2735
|
];
|
|
2697
2736
|
var GetOrganizationPaymentIntegration = async ({
|
|
2698
|
-
|
|
2737
|
+
clientApiParams
|
|
2699
2738
|
}) => {
|
|
2739
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2700
2740
|
const { data } = await clientApi.get(`/organization/payment-integration`);
|
|
2701
2741
|
return data;
|
|
2702
2742
|
};
|
|
@@ -2725,9 +2765,10 @@ var GetSelfChatChannels = async ({
|
|
|
2725
2765
|
orderBy,
|
|
2726
2766
|
search,
|
|
2727
2767
|
queryClient,
|
|
2728
|
-
|
|
2768
|
+
clientApiParams,
|
|
2729
2769
|
locale
|
|
2730
2770
|
}) => {
|
|
2771
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2731
2772
|
const { data } = await clientApi.get(`/self/chat/channels`, {
|
|
2732
2773
|
params: {
|
|
2733
2774
|
page: pageParam || void 0,
|
|
@@ -2753,14 +2794,14 @@ var GetSelfChatChannels = async ({
|
|
|
2753
2794
|
return data;
|
|
2754
2795
|
};
|
|
2755
2796
|
var useGetSelfChatChannels = (params = {}, options = {}) => {
|
|
2756
|
-
const {
|
|
2797
|
+
const { authenticated } = useConnectedXM();
|
|
2757
2798
|
return useConnectedInfiniteQuery(
|
|
2758
2799
|
SELF_CHAT_CHANNELS_QUERY_KEY(),
|
|
2759
2800
|
(params2) => GetSelfChatChannels(params2),
|
|
2760
2801
|
params,
|
|
2761
2802
|
{
|
|
2762
2803
|
...options,
|
|
2763
|
-
enabled: !!
|
|
2804
|
+
enabled: !!authenticated && (options.enabled ?? true)
|
|
2764
2805
|
}
|
|
2765
2806
|
);
|
|
2766
2807
|
};
|
|
@@ -2781,13 +2822,14 @@ var SET_SELF_CHAT_CHANNEL_QUERY_DATA = (client, keyParams, response, baseKeys =
|
|
|
2781
2822
|
};
|
|
2782
2823
|
var GetSelfChatChannel = async ({
|
|
2783
2824
|
channelId,
|
|
2784
|
-
|
|
2825
|
+
clientApiParams
|
|
2785
2826
|
}) => {
|
|
2827
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2786
2828
|
const { data } = await clientApi.get(`/self/chat/channels/${channelId}`);
|
|
2787
2829
|
return data;
|
|
2788
2830
|
};
|
|
2789
2831
|
var useGetSelfChatChannel = (channelId, options = {}) => {
|
|
2790
|
-
const {
|
|
2832
|
+
const { authenticated } = useConnectedXM();
|
|
2791
2833
|
return useConnectedSingleQuery(
|
|
2792
2834
|
SELF_CHAT_CHANNEL_QUERY_KEY(channelId),
|
|
2793
2835
|
(params) => GetSelfChatChannel({
|
|
@@ -2797,7 +2839,7 @@ var useGetSelfChatChannel = (channelId, options = {}) => {
|
|
|
2797
2839
|
{
|
|
2798
2840
|
staleTime: Infinity,
|
|
2799
2841
|
...options,
|
|
2800
|
-
enabled: !!
|
|
2842
|
+
enabled: !!authenticated && !!channelId && (options?.enabled ?? true)
|
|
2801
2843
|
}
|
|
2802
2844
|
);
|
|
2803
2845
|
};
|
|
@@ -2819,8 +2861,9 @@ var GetSelfChatChannelMembers = async ({
|
|
|
2819
2861
|
pageSize,
|
|
2820
2862
|
orderBy,
|
|
2821
2863
|
search,
|
|
2822
|
-
|
|
2864
|
+
clientApiParams
|
|
2823
2865
|
}) => {
|
|
2866
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2824
2867
|
const { data } = await clientApi.get(
|
|
2825
2868
|
`/self/chat/channels/${channelId}/members`,
|
|
2826
2869
|
{
|
|
@@ -2835,14 +2878,14 @@ var GetSelfChatChannelMembers = async ({
|
|
|
2835
2878
|
return data;
|
|
2836
2879
|
};
|
|
2837
2880
|
var useGetSelfChatChannelMembers = (channelId, params = {}, options = {}) => {
|
|
2838
|
-
const {
|
|
2881
|
+
const { authenticated } = useConnectedXM();
|
|
2839
2882
|
return useConnectedInfiniteQuery(
|
|
2840
2883
|
SELF_CHAT_CHANNEL_MEMBERS_QUERY_KEY(channelId),
|
|
2841
2884
|
(params2) => GetSelfChatChannelMembers({ ...params2, channelId }),
|
|
2842
2885
|
params,
|
|
2843
2886
|
{
|
|
2844
2887
|
...options,
|
|
2845
|
-
enabled: !!
|
|
2888
|
+
enabled: !!authenticated && !!channelId && (options?.enabled ?? true)
|
|
2846
2889
|
}
|
|
2847
2890
|
);
|
|
2848
2891
|
};
|
|
@@ -2865,8 +2908,9 @@ var GetSelfChatChannelMessages = async ({
|
|
|
2865
2908
|
orderBy,
|
|
2866
2909
|
search,
|
|
2867
2910
|
queryClient,
|
|
2868
|
-
|
|
2911
|
+
clientApiParams
|
|
2869
2912
|
}) => {
|
|
2913
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2870
2914
|
const { data } = await clientApi.get(
|
|
2871
2915
|
`/self/chat/channels/${channelId}/messages`,
|
|
2872
2916
|
{
|
|
@@ -2890,23 +2934,23 @@ var GetSelfChatChannelMessages = async ({
|
|
|
2890
2934
|
return data;
|
|
2891
2935
|
};
|
|
2892
2936
|
var useGetSelfChatChannelMessages = (channelId, params = {}, options = {}) => {
|
|
2893
|
-
const {
|
|
2937
|
+
const { authenticated } = useConnectedXM();
|
|
2894
2938
|
return useConnectedInfiniteQuery(
|
|
2895
2939
|
SELF_CHAT_CHANNEL_MESSAGES_QUERY_KEY(channelId),
|
|
2896
2940
|
(params2) => GetSelfChatChannelMessages({ ...params2, channelId }),
|
|
2897
2941
|
params,
|
|
2898
2942
|
{
|
|
2899
2943
|
...options,
|
|
2900
|
-
enabled: !!
|
|
2944
|
+
enabled: !!authenticated && !!channelId && (options?.enabled ?? true)
|
|
2901
2945
|
}
|
|
2902
2946
|
);
|
|
2903
2947
|
};
|
|
2904
2948
|
|
|
2905
2949
|
// src/queries/self/useGetSelf.ts
|
|
2906
|
-
var SELF_QUERY_KEY = (
|
|
2950
|
+
var SELF_QUERY_KEY = (ignoreExecuteAs) => {
|
|
2907
2951
|
const keys = ["SELF"];
|
|
2908
|
-
if (
|
|
2909
|
-
keys.push("
|
|
2952
|
+
if (ignoreExecuteAs)
|
|
2953
|
+
keys.push("IGNORE_EXECUTEAS");
|
|
2910
2954
|
return keys;
|
|
2911
2955
|
};
|
|
2912
2956
|
var SET_SELF_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
|
|
@@ -2916,21 +2960,24 @@ var SET_SELF_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
|
|
|
2916
2960
|
);
|
|
2917
2961
|
};
|
|
2918
2962
|
var GetSelf = async ({
|
|
2919
|
-
|
|
2920
|
-
|
|
2963
|
+
ignoreExecuteAs,
|
|
2964
|
+
clientApiParams
|
|
2921
2965
|
}) => {
|
|
2922
|
-
|
|
2923
|
-
|
|
2966
|
+
const clientApi = await GetClientAPI({
|
|
2967
|
+
...clientApiParams,
|
|
2968
|
+
getExecuteAs: ignoreExecuteAs ? void 0 : clientApiParams.getExecuteAs
|
|
2969
|
+
});
|
|
2924
2970
|
const { data } = await clientApi.get(`/self`);
|
|
2925
2971
|
return data;
|
|
2926
2972
|
};
|
|
2927
|
-
var useGetSelf = (
|
|
2928
|
-
const {
|
|
2973
|
+
var useGetSelf = (ignoreExecuteAs, options = {}) => {
|
|
2974
|
+
const { authenticated } = useConnectedXM();
|
|
2929
2975
|
return useConnectedSingleQuery(
|
|
2930
|
-
SELF_QUERY_KEY(
|
|
2931
|
-
(params) => GetSelf({
|
|
2976
|
+
SELF_QUERY_KEY(ignoreExecuteAs),
|
|
2977
|
+
(params) => GetSelf({ ignoreExecuteAs, ...params }),
|
|
2932
2978
|
{
|
|
2933
|
-
|
|
2979
|
+
...options,
|
|
2980
|
+
enabled: authenticated && (options.enabled ?? true)
|
|
2934
2981
|
}
|
|
2935
2982
|
);
|
|
2936
2983
|
};
|
|
@@ -2951,8 +2998,9 @@ var GetSelfEventRegistration = async ({
|
|
|
2951
2998
|
ticket,
|
|
2952
2999
|
quantity,
|
|
2953
3000
|
coupon,
|
|
2954
|
-
|
|
3001
|
+
clientApiParams
|
|
2955
3002
|
}) => {
|
|
3003
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2956
3004
|
const { data } = await clientApi.get(`/self/events/${eventId}/registration`, {
|
|
2957
3005
|
params: {
|
|
2958
3006
|
ticket: ticket || void 0,
|
|
@@ -2963,7 +3011,7 @@ var GetSelfEventRegistration = async ({
|
|
|
2963
3011
|
return data;
|
|
2964
3012
|
};
|
|
2965
3013
|
var useGetSelfEventRegistration = (eventId, ticket, quantity, coupon, options = {}) => {
|
|
2966
|
-
const {
|
|
3014
|
+
const { authenticated } = useConnectedXM();
|
|
2967
3015
|
return useConnectedSingleQuery_default(
|
|
2968
3016
|
SELF_EVENT_REGISTRATION_QUERY_KEY(eventId),
|
|
2969
3017
|
(params) => GetSelfEventRegistration({
|
|
@@ -2978,7 +3026,7 @@ var useGetSelfEventRegistration = (eventId, ticket, quantity, coupon, options =
|
|
|
2978
3026
|
staleTime: Infinity,
|
|
2979
3027
|
refetchOnMount: false,
|
|
2980
3028
|
...options,
|
|
2981
|
-
enabled: !!
|
|
3029
|
+
enabled: !!authenticated && !!eventId && (options?.enabled ?? true)
|
|
2982
3030
|
}
|
|
2983
3031
|
);
|
|
2984
3032
|
};
|
|
@@ -2992,15 +3040,16 @@ var SELF_EVENT_REGISTRATION_CHECKOUT_QUERY_KEY = (eventId, registrationId) => [
|
|
|
2992
3040
|
var GetSelfEventRegistrationCheckout = async ({
|
|
2993
3041
|
eventId,
|
|
2994
3042
|
registrationId,
|
|
2995
|
-
|
|
3043
|
+
clientApiParams
|
|
2996
3044
|
}) => {
|
|
3045
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2997
3046
|
const { data } = await clientApi.get(
|
|
2998
3047
|
`/self/events/${eventId}/registration/${registrationId}/draft/checkout`
|
|
2999
3048
|
);
|
|
3000
3049
|
return data;
|
|
3001
3050
|
};
|
|
3002
3051
|
var useGetSelfEventRegistrationCheckout = (eventId, registrationId = "", options = {}) => {
|
|
3003
|
-
const {
|
|
3052
|
+
const { authenticated } = useConnectedXM();
|
|
3004
3053
|
return useConnectedSingleQuery_default(
|
|
3005
3054
|
SELF_EVENT_REGISTRATION_CHECKOUT_QUERY_KEY(eventId, registrationId),
|
|
3006
3055
|
(params) => GetSelfEventRegistrationCheckout({ eventId, registrationId, ...params }),
|
|
@@ -3009,7 +3058,7 @@ var useGetSelfEventRegistrationCheckout = (eventId, registrationId = "", options
|
|
|
3009
3058
|
retry: false,
|
|
3010
3059
|
retryOnMount: false,
|
|
3011
3060
|
...options,
|
|
3012
|
-
enabled: !!
|
|
3061
|
+
enabled: !!authenticated && !!eventId && !!registrationId && (options.enabled ?? true)
|
|
3013
3062
|
}
|
|
3014
3063
|
);
|
|
3015
3064
|
};
|
|
@@ -3029,9 +3078,10 @@ var GetSelfSubscriptions = async ({
|
|
|
3029
3078
|
orderBy,
|
|
3030
3079
|
search,
|
|
3031
3080
|
queryClient,
|
|
3032
|
-
|
|
3081
|
+
clientApiParams,
|
|
3033
3082
|
locale
|
|
3034
3083
|
}) => {
|
|
3084
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3035
3085
|
const { data } = await clientApi.get(`/self/subscriptions`, {
|
|
3036
3086
|
params: {
|
|
3037
3087
|
page: pageParam || void 0,
|
|
@@ -3052,14 +3102,14 @@ var GetSelfSubscriptions = async ({
|
|
|
3052
3102
|
return data;
|
|
3053
3103
|
};
|
|
3054
3104
|
var useGetSelfSubscriptions = (status, params = {}, options = {}) => {
|
|
3055
|
-
const {
|
|
3105
|
+
const { authenticated } = useConnectedXM();
|
|
3056
3106
|
return useConnectedInfiniteQuery(
|
|
3057
3107
|
SELF_SUBSCRIPTIONS_QUERY_KEY(status),
|
|
3058
3108
|
(params2) => GetSelfSubscriptions({ status, ...params2 }),
|
|
3059
3109
|
params,
|
|
3060
3110
|
{
|
|
3061
3111
|
...options,
|
|
3062
|
-
enabled: !!
|
|
3112
|
+
enabled: !!authenticated && (options.enabled ?? true)
|
|
3063
3113
|
}
|
|
3064
3114
|
);
|
|
3065
3115
|
};
|
|
@@ -3068,19 +3118,20 @@ var useGetSelfSubscriptions = (status, params = {}, options = {}) => {
|
|
|
3068
3118
|
var SELF_SUBSCRIPTION_QUERY_KEY = (subscriptionId) => [...SELF_SUBSCRIPTIONS_QUERY_KEY(), subscriptionId];
|
|
3069
3119
|
var GetSelfSubcription = async ({
|
|
3070
3120
|
subscriptionId,
|
|
3071
|
-
|
|
3121
|
+
clientApiParams
|
|
3072
3122
|
}) => {
|
|
3123
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3073
3124
|
const { data } = await clientApi.get(`/self/subscriptions/${subscriptionId}`);
|
|
3074
3125
|
return data;
|
|
3075
3126
|
};
|
|
3076
3127
|
var useGetSelfSubcription = (subscriptionId = "", options = {}) => {
|
|
3077
|
-
const {
|
|
3128
|
+
const { authenticated } = useConnectedXM();
|
|
3078
3129
|
return useConnectedSingleQuery(
|
|
3079
3130
|
SELF_SUBSCRIPTION_QUERY_KEY(subscriptionId),
|
|
3080
3131
|
(params) => GetSelfSubcription({ subscriptionId, ...params }),
|
|
3081
3132
|
{
|
|
3082
3133
|
...options,
|
|
3083
|
-
enabled: !!
|
|
3134
|
+
enabled: !!authenticated && !!subscriptionId && (options?.enabled ?? true)
|
|
3084
3135
|
}
|
|
3085
3136
|
);
|
|
3086
3137
|
};
|
|
@@ -3093,8 +3144,9 @@ var GetSelfSubscriptionPayments = async ({
|
|
|
3093
3144
|
pageSize,
|
|
3094
3145
|
orderBy,
|
|
3095
3146
|
search,
|
|
3096
|
-
|
|
3147
|
+
clientApiParams
|
|
3097
3148
|
}) => {
|
|
3149
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3098
3150
|
const { data } = await clientApi.get(
|
|
3099
3151
|
`/self/subscriptions/${subscriptionId}/payments`,
|
|
3100
3152
|
{
|
|
@@ -3109,14 +3161,14 @@ var GetSelfSubscriptionPayments = async ({
|
|
|
3109
3161
|
return data;
|
|
3110
3162
|
};
|
|
3111
3163
|
var useGetSelfSubscriptionPayments = (subscriptionId, params = {}, options = {}) => {
|
|
3112
|
-
const {
|
|
3164
|
+
const { authenticated } = useConnectedXM();
|
|
3113
3165
|
return useConnectedInfiniteQuery(
|
|
3114
3166
|
SELF_SUBSCRIPTION_PAYMENTS_QUERY_KEY(subscriptionId),
|
|
3115
3167
|
(params2) => GetSelfSubscriptionPayments({ ...params2, subscriptionId }),
|
|
3116
3168
|
params,
|
|
3117
3169
|
{
|
|
3118
3170
|
...options,
|
|
3119
|
-
enabled: !!
|
|
3171
|
+
enabled: !!authenticated && (options.enabled ?? true)
|
|
3120
3172
|
}
|
|
3121
3173
|
);
|
|
3122
3174
|
};
|
|
@@ -3132,9 +3184,10 @@ var GetSelfActivities = async ({
|
|
|
3132
3184
|
orderBy,
|
|
3133
3185
|
search,
|
|
3134
3186
|
queryClient,
|
|
3135
|
-
|
|
3187
|
+
clientApiParams,
|
|
3136
3188
|
locale
|
|
3137
3189
|
}) => {
|
|
3190
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3138
3191
|
const { data } = await clientApi.get(`/self/activities`, {
|
|
3139
3192
|
params: {
|
|
3140
3193
|
page: pageParam || void 0,
|
|
@@ -3154,14 +3207,14 @@ var GetSelfActivities = async ({
|
|
|
3154
3207
|
return data;
|
|
3155
3208
|
};
|
|
3156
3209
|
var useGetSelfActivities = (params = {}, options = {}) => {
|
|
3157
|
-
const {
|
|
3210
|
+
const { authenticated } = useConnectedXM();
|
|
3158
3211
|
return useConnectedInfiniteQuery(
|
|
3159
3212
|
SELF_ACTIVITIES_QUERY_KEY(),
|
|
3160
3213
|
(params2) => GetSelfActivities({ ...params2 }),
|
|
3161
3214
|
params,
|
|
3162
3215
|
{
|
|
3163
3216
|
...options,
|
|
3164
|
-
enabled: !!
|
|
3217
|
+
enabled: !!authenticated && (options.enabled ?? true)
|
|
3165
3218
|
}
|
|
3166
3219
|
);
|
|
3167
3220
|
};
|
|
@@ -3170,19 +3223,20 @@ var useGetSelfActivities = (params = {}, options = {}) => {
|
|
|
3170
3223
|
var SELF_ANNOUNCEMENT_QUERY_KEY = (announcementId) => [...SELF_QUERY_KEY(), "ANNOUNCEMENT", announcementId];
|
|
3171
3224
|
var GetSelfAnnouncement = async ({
|
|
3172
3225
|
announcementId,
|
|
3173
|
-
|
|
3226
|
+
clientApiParams
|
|
3174
3227
|
}) => {
|
|
3228
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3175
3229
|
const { data } = await clientApi.get(`/self/announcements/${announcementId}`);
|
|
3176
3230
|
return data;
|
|
3177
3231
|
};
|
|
3178
3232
|
var useGetSelfAnnouncement = (announcementId, options = {}) => {
|
|
3179
|
-
const {
|
|
3233
|
+
const { authenticated } = useConnectedXM();
|
|
3180
3234
|
return useConnectedSingleQuery(
|
|
3181
3235
|
SELF_ANNOUNCEMENT_QUERY_KEY(announcementId),
|
|
3182
3236
|
(params) => GetSelfAnnouncement({ announcementId, ...params }),
|
|
3183
3237
|
{
|
|
3184
3238
|
...options,
|
|
3185
|
-
enabled: !!
|
|
3239
|
+
enabled: !!authenticated && !!announcementId && (options?.enabled ?? true)
|
|
3186
3240
|
}
|
|
3187
3241
|
);
|
|
3188
3242
|
};
|
|
@@ -3197,8 +3251,9 @@ var GetSelfCommunityMemberships = async ({
|
|
|
3197
3251
|
pageSize,
|
|
3198
3252
|
orderBy,
|
|
3199
3253
|
search,
|
|
3200
|
-
|
|
3254
|
+
clientApiParams
|
|
3201
3255
|
}) => {
|
|
3256
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3202
3257
|
const { data } = await clientApi.get(`/self/communities`, {
|
|
3203
3258
|
params: {
|
|
3204
3259
|
page: pageParam || void 0,
|
|
@@ -3210,14 +3265,14 @@ var GetSelfCommunityMemberships = async ({
|
|
|
3210
3265
|
return data;
|
|
3211
3266
|
};
|
|
3212
3267
|
var useGetSelfCommunityMemberships = (params = {}, options = {}) => {
|
|
3213
|
-
const {
|
|
3268
|
+
const { authenticated } = useConnectedXM();
|
|
3214
3269
|
return useConnectedInfiniteQuery(
|
|
3215
3270
|
SELF_COMMUNITY_MEMBERSHIPS_QUERY_KEY(),
|
|
3216
3271
|
(params2) => GetSelfCommunityMemberships({ ...params2 }),
|
|
3217
3272
|
params,
|
|
3218
3273
|
{
|
|
3219
3274
|
...options,
|
|
3220
|
-
enabled: !!
|
|
3275
|
+
enabled: !!authenticated && (options.enabled ?? true)
|
|
3221
3276
|
}
|
|
3222
3277
|
);
|
|
3223
3278
|
};
|
|
@@ -3235,21 +3290,22 @@ var SET_SELF_COMMUNITY_MEMBERSHIP_QUERY_DATA = (client, keyParams, response, bas
|
|
|
3235
3290
|
};
|
|
3236
3291
|
var GetSelfCommunityMembership = async ({
|
|
3237
3292
|
communityId,
|
|
3238
|
-
|
|
3293
|
+
clientApiParams
|
|
3239
3294
|
}) => {
|
|
3295
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3240
3296
|
const { data } = await clientApi.get(
|
|
3241
3297
|
`/self/communities/${communityId}/membership`
|
|
3242
3298
|
);
|
|
3243
3299
|
return data;
|
|
3244
3300
|
};
|
|
3245
3301
|
var useGetSelfCommunityMembership = (communityId, options = {}) => {
|
|
3246
|
-
const {
|
|
3302
|
+
const { authenticated } = useConnectedXM();
|
|
3247
3303
|
return useConnectedSingleQuery(
|
|
3248
3304
|
SELF_COMMUNITY_MEMBERSHIP_QUERY_KEY(communityId),
|
|
3249
3305
|
(params) => GetSelfCommunityMembership({ communityId, ...params }),
|
|
3250
3306
|
{
|
|
3251
3307
|
...options,
|
|
3252
|
-
enabled: !!
|
|
3308
|
+
enabled: !!authenticated && !!communityId && (options?.enabled ?? true)
|
|
3253
3309
|
}
|
|
3254
3310
|
);
|
|
3255
3311
|
};
|
|
@@ -3265,9 +3321,10 @@ var GetSelfDelegateOf = async ({
|
|
|
3265
3321
|
orderBy,
|
|
3266
3322
|
search,
|
|
3267
3323
|
queryClient,
|
|
3268
|
-
|
|
3324
|
+
clientApiParams,
|
|
3269
3325
|
locale
|
|
3270
3326
|
}) => {
|
|
3327
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3271
3328
|
const { data } = await clientApi.get(`/self/delegateof`, {
|
|
3272
3329
|
params: {
|
|
3273
3330
|
page: pageParam || void 0,
|
|
@@ -3287,14 +3344,14 @@ var GetSelfDelegateOf = async ({
|
|
|
3287
3344
|
return data;
|
|
3288
3345
|
};
|
|
3289
3346
|
var useGetSelfDelegateOf = (params = {}, options = {}) => {
|
|
3290
|
-
const {
|
|
3347
|
+
const { authenticated } = useConnectedXM();
|
|
3291
3348
|
return useConnectedInfiniteQuery(
|
|
3292
3349
|
SELF_DELEGATE_OF_QUERY_KEY(),
|
|
3293
3350
|
(params2) => GetSelfDelegateOf({ ...params2 }),
|
|
3294
3351
|
params,
|
|
3295
3352
|
{
|
|
3296
3353
|
...options,
|
|
3297
|
-
enabled: !!
|
|
3354
|
+
enabled: !!authenticated && (options.enabled ?? true)
|
|
3298
3355
|
}
|
|
3299
3356
|
);
|
|
3300
3357
|
};
|
|
@@ -3310,9 +3367,10 @@ var GetSelfDelegates = async ({
|
|
|
3310
3367
|
orderBy,
|
|
3311
3368
|
search,
|
|
3312
3369
|
queryClient,
|
|
3313
|
-
|
|
3370
|
+
clientApiParams,
|
|
3314
3371
|
locale
|
|
3315
3372
|
}) => {
|
|
3373
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3316
3374
|
const { data } = await clientApi.get(`/self/delegates`, {
|
|
3317
3375
|
params: {
|
|
3318
3376
|
page: pageParam || void 0,
|
|
@@ -3332,14 +3390,14 @@ var GetSelfDelegates = async ({
|
|
|
3332
3390
|
return data;
|
|
3333
3391
|
};
|
|
3334
3392
|
var useGetSelfDelegates = (params = {}, options = {}) => {
|
|
3335
|
-
const {
|
|
3393
|
+
const { authenticated } = useConnectedXM();
|
|
3336
3394
|
return useConnectedInfiniteQuery(
|
|
3337
3395
|
SELF_DELEGATES_QUERY_KEY(),
|
|
3338
3396
|
(params2) => GetSelfDelegates(params2),
|
|
3339
3397
|
params,
|
|
3340
3398
|
{
|
|
3341
3399
|
...options,
|
|
3342
|
-
enabled: !!
|
|
3400
|
+
enabled: !!authenticated && (options.enabled ?? true)
|
|
3343
3401
|
}
|
|
3344
3402
|
);
|
|
3345
3403
|
};
|
|
@@ -3357,9 +3415,10 @@ var GetSelfEventListings = async ({
|
|
|
3357
3415
|
search,
|
|
3358
3416
|
past,
|
|
3359
3417
|
queryClient,
|
|
3360
|
-
|
|
3418
|
+
clientApiParams,
|
|
3361
3419
|
locale
|
|
3362
3420
|
}) => {
|
|
3421
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3363
3422
|
const { data } = await clientApi.get(`/self/events/listings`, {
|
|
3364
3423
|
params: {
|
|
3365
3424
|
page: pageParam || void 0,
|
|
@@ -3380,14 +3439,14 @@ var GetSelfEventListings = async ({
|
|
|
3380
3439
|
return data;
|
|
3381
3440
|
};
|
|
3382
3441
|
var useGetSelfEventListings = (past = false, params = {}, options = {}) => {
|
|
3383
|
-
const {
|
|
3442
|
+
const { authenticated } = useConnectedXM();
|
|
3384
3443
|
return useConnectedInfiniteQuery(
|
|
3385
3444
|
SELF_EVENT_LISTINGS_QUERY_KEY(past),
|
|
3386
3445
|
(params2) => GetSelfEventListings({ past, ...params2 }),
|
|
3387
3446
|
params,
|
|
3388
3447
|
{
|
|
3389
3448
|
...options,
|
|
3390
|
-
enabled: !!
|
|
3449
|
+
enabled: !!authenticated && (options.enabled ?? true)
|
|
3391
3450
|
}
|
|
3392
3451
|
);
|
|
3393
3452
|
};
|
|
@@ -3408,19 +3467,20 @@ var SET_SELF_EVENT_LISTING_QUERY_DATA = (client, keyParams, response, baseKeys =
|
|
|
3408
3467
|
};
|
|
3409
3468
|
var GetSelfEventListing = async ({
|
|
3410
3469
|
eventId,
|
|
3411
|
-
|
|
3470
|
+
clientApiParams
|
|
3412
3471
|
}) => {
|
|
3472
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3413
3473
|
const { data } = await clientApi.get(`self/events/listings/${eventId}`);
|
|
3414
3474
|
return data;
|
|
3415
3475
|
};
|
|
3416
3476
|
var useGetSelfEventListing = (eventId, options = {}) => {
|
|
3417
|
-
const {
|
|
3477
|
+
const { authenticated } = useConnectedXM();
|
|
3418
3478
|
return useConnectedSingleQuery(
|
|
3419
3479
|
SELF_EVENT_LISTING_QUERY_KEY(eventId),
|
|
3420
3480
|
(params) => GetSelfEventListing({ eventId, ...params }),
|
|
3421
3481
|
{
|
|
3422
3482
|
...options,
|
|
3423
|
-
enabled: !!
|
|
3483
|
+
enabled: !!authenticated && !!eventId && (options?.enabled ?? true)
|
|
3424
3484
|
}
|
|
3425
3485
|
);
|
|
3426
3486
|
};
|
|
@@ -3438,8 +3498,9 @@ var GetSelfEventListingRegistrations = async ({
|
|
|
3438
3498
|
orderBy,
|
|
3439
3499
|
search,
|
|
3440
3500
|
checkedIn,
|
|
3441
|
-
|
|
3501
|
+
clientApiParams
|
|
3442
3502
|
}) => {
|
|
3503
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3443
3504
|
const { data } = await clientApi.get(
|
|
3444
3505
|
`/self/events/listings/${eventId}/registrations`,
|
|
3445
3506
|
{
|
|
@@ -3455,14 +3516,14 @@ var GetSelfEventListingRegistrations = async ({
|
|
|
3455
3516
|
return data;
|
|
3456
3517
|
};
|
|
3457
3518
|
var useGetSelfEventListingsRegistrations = (eventId, checkedIn = false, params = {}, options = {}) => {
|
|
3458
|
-
const {
|
|
3519
|
+
const { authenticated } = useConnectedXM();
|
|
3459
3520
|
return useConnectedInfiniteQuery(
|
|
3460
3521
|
SELF_EVENT_LISTING_REGISTRATIONS_QUERY_KEY(eventId, checkedIn),
|
|
3461
3522
|
(params2) => GetSelfEventListingRegistrations({ eventId, checkedIn, ...params2 }),
|
|
3462
3523
|
params,
|
|
3463
3524
|
{
|
|
3464
3525
|
...options,
|
|
3465
|
-
enabled: !!
|
|
3526
|
+
enabled: !!authenticated && !!eventId && (options?.enabled ?? true)
|
|
3466
3527
|
}
|
|
3467
3528
|
);
|
|
3468
3529
|
};
|
|
@@ -3480,9 +3541,10 @@ var GetSelfEvents = async ({
|
|
|
3480
3541
|
search,
|
|
3481
3542
|
past,
|
|
3482
3543
|
queryClient,
|
|
3483
|
-
|
|
3544
|
+
clientApiParams,
|
|
3484
3545
|
locale
|
|
3485
3546
|
}) => {
|
|
3547
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3486
3548
|
const { data } = await clientApi.get(`/self/events`, {
|
|
3487
3549
|
params: {
|
|
3488
3550
|
page: pageParam || void 0,
|
|
@@ -3503,14 +3565,14 @@ var GetSelfEvents = async ({
|
|
|
3503
3565
|
return data;
|
|
3504
3566
|
};
|
|
3505
3567
|
var useGetSelfEvents = (past = false, params = {}, options = {}) => {
|
|
3506
|
-
const {
|
|
3568
|
+
const { authenticated } = useConnectedXM();
|
|
3507
3569
|
return useConnectedInfiniteQuery(
|
|
3508
3570
|
SELF_EVENTS_QUERY_KEY(past),
|
|
3509
3571
|
(params2) => GetSelfEvents({ ...params2, past }),
|
|
3510
3572
|
params,
|
|
3511
3573
|
{
|
|
3512
3574
|
...options,
|
|
3513
|
-
enabled: !!
|
|
3575
|
+
enabled: !!authenticated && (options.enabled ?? true)
|
|
3514
3576
|
}
|
|
3515
3577
|
);
|
|
3516
3578
|
};
|
|
@@ -3528,9 +3590,10 @@ var GetSelfEventSessions = async ({
|
|
|
3528
3590
|
orderBy,
|
|
3529
3591
|
search,
|
|
3530
3592
|
queryClient,
|
|
3531
|
-
|
|
3593
|
+
clientApiParams,
|
|
3532
3594
|
locale
|
|
3533
3595
|
}) => {
|
|
3596
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3534
3597
|
const { data } = await clientApi.get(`/self/events/${eventId}/sessions`, {
|
|
3535
3598
|
params: {
|
|
3536
3599
|
eventId: eventId || void 0,
|
|
@@ -3551,14 +3614,14 @@ var GetSelfEventSessions = async ({
|
|
|
3551
3614
|
return data;
|
|
3552
3615
|
};
|
|
3553
3616
|
var useGetSelfEventSessions = (eventId, params = {}, options = {}) => {
|
|
3554
|
-
const {
|
|
3617
|
+
const { authenticated } = useConnectedXM();
|
|
3555
3618
|
return useConnectedInfiniteQuery(
|
|
3556
3619
|
SELF_EVENT_SESSIONS_QUERY_KEY(eventId),
|
|
3557
3620
|
(params2) => GetSelfEventSessions({ eventId, ...params2 }),
|
|
3558
3621
|
params,
|
|
3559
3622
|
{
|
|
3560
3623
|
...options,
|
|
3561
|
-
enabled: !!
|
|
3624
|
+
enabled: !!authenticated && !!eventId && (options.enabled ?? true)
|
|
3562
3625
|
}
|
|
3563
3626
|
);
|
|
3564
3627
|
};
|
|
@@ -3574,9 +3637,10 @@ var GetSelfFeed = async ({
|
|
|
3574
3637
|
orderBy,
|
|
3575
3638
|
search,
|
|
3576
3639
|
queryClient,
|
|
3577
|
-
|
|
3640
|
+
clientApiParams,
|
|
3578
3641
|
locale
|
|
3579
3642
|
}) => {
|
|
3643
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3580
3644
|
const { data } = await clientApi.get(`/self/activities/feed`, {
|
|
3581
3645
|
params: {
|
|
3582
3646
|
page: pageParam || void 0,
|
|
@@ -3596,14 +3660,14 @@ var GetSelfFeed = async ({
|
|
|
3596
3660
|
return data;
|
|
3597
3661
|
};
|
|
3598
3662
|
var useGetSelfFeed = (params = {}, options = {}) => {
|
|
3599
|
-
const {
|
|
3663
|
+
const { authenticated } = useConnectedXM();
|
|
3600
3664
|
return useConnectedInfiniteQuery(
|
|
3601
3665
|
SELF_FEED_QUERY_KEY(),
|
|
3602
3666
|
(params2) => GetSelfFeed(params2),
|
|
3603
3667
|
params,
|
|
3604
3668
|
{
|
|
3605
3669
|
...options,
|
|
3606
|
-
enabled: !!
|
|
3670
|
+
enabled: !!authenticated && (options.enabled ?? true)
|
|
3607
3671
|
}
|
|
3608
3672
|
);
|
|
3609
3673
|
};
|
|
@@ -3618,8 +3682,9 @@ var GetSelfInterests = async ({
|
|
|
3618
3682
|
pageSize,
|
|
3619
3683
|
orderBy,
|
|
3620
3684
|
search,
|
|
3621
|
-
|
|
3685
|
+
clientApiParams
|
|
3622
3686
|
}) => {
|
|
3687
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3623
3688
|
const { data } = await clientApi.get(`/self/interests`, {
|
|
3624
3689
|
params: {
|
|
3625
3690
|
page: pageParam || void 0,
|
|
@@ -3631,14 +3696,14 @@ var GetSelfInterests = async ({
|
|
|
3631
3696
|
return data;
|
|
3632
3697
|
};
|
|
3633
3698
|
var useGetSelfInterests = (params = {}, options = {}) => {
|
|
3634
|
-
const {
|
|
3699
|
+
const { authenticated } = useConnectedXM();
|
|
3635
3700
|
return useConnectedInfiniteQuery(
|
|
3636
3701
|
SELF_INTERESTS_QUERY_KEY(),
|
|
3637
3702
|
(params2) => GetSelfInterests({ ...params2 }),
|
|
3638
3703
|
params,
|
|
3639
3704
|
{
|
|
3640
3705
|
...options,
|
|
3641
|
-
enabled: !!
|
|
3706
|
+
enabled: !!authenticated && (options.enabled ?? true)
|
|
3642
3707
|
}
|
|
3643
3708
|
);
|
|
3644
3709
|
};
|
|
@@ -3649,19 +3714,20 @@ var SELF_PREFERENCES_QUERY_KEY = () => [
|
|
|
3649
3714
|
"PREFERENCES"
|
|
3650
3715
|
];
|
|
3651
3716
|
var GetSelfNotificationPreferences = async ({
|
|
3652
|
-
|
|
3717
|
+
clientApiParams
|
|
3653
3718
|
}) => {
|
|
3719
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3654
3720
|
const { data } = await clientApi.get(`/self/notificationPreferences`);
|
|
3655
3721
|
return data;
|
|
3656
3722
|
};
|
|
3657
3723
|
var useGetSelfNotificationPreferences = (options = {}) => {
|
|
3658
|
-
const {
|
|
3724
|
+
const { authenticated } = useConnectedXM();
|
|
3659
3725
|
return useConnectedSingleQuery(
|
|
3660
3726
|
SELF_PREFERENCES_QUERY_KEY(),
|
|
3661
3727
|
(params) => GetSelfNotificationPreferences({ ...params }),
|
|
3662
3728
|
{
|
|
3663
3729
|
...options,
|
|
3664
|
-
enabled: !!
|
|
3730
|
+
enabled: !!authenticated && (options.enabled ?? true)
|
|
3665
3731
|
}
|
|
3666
3732
|
);
|
|
3667
3733
|
};
|
|
@@ -3678,8 +3744,9 @@ var GetSelfNotifications = async ({
|
|
|
3678
3744
|
orderBy,
|
|
3679
3745
|
search,
|
|
3680
3746
|
filters,
|
|
3681
|
-
|
|
3747
|
+
clientApiParams
|
|
3682
3748
|
}) => {
|
|
3749
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3683
3750
|
const { data } = await clientApi.get(`/self/notifications`, {
|
|
3684
3751
|
params: {
|
|
3685
3752
|
page: pageParam || void 0,
|
|
@@ -3692,7 +3759,7 @@ var GetSelfNotifications = async ({
|
|
|
3692
3759
|
return data;
|
|
3693
3760
|
};
|
|
3694
3761
|
var useGetSelfNotifications = (filters = "", params = {}, options = {}) => {
|
|
3695
|
-
const {
|
|
3762
|
+
const { authenticated } = useConnectedXM();
|
|
3696
3763
|
return useConnectedInfiniteQuery(
|
|
3697
3764
|
SELF_NOTIFICATIONS_QUERY_KEY(filters),
|
|
3698
3765
|
(params2) => GetSelfNotifications({ ...params2, filters }),
|
|
@@ -3700,7 +3767,7 @@ var useGetSelfNotifications = (filters = "", params = {}, options = {}) => {
|
|
|
3700
3767
|
{
|
|
3701
3768
|
staleTime: 0,
|
|
3702
3769
|
...options,
|
|
3703
|
-
enabled: !!
|
|
3770
|
+
enabled: !!authenticated && (options.enabled ?? true)
|
|
3704
3771
|
}
|
|
3705
3772
|
);
|
|
3706
3773
|
};
|
|
@@ -3709,8 +3776,9 @@ var useGetSelfNotifications = (filters = "", params = {}, options = {}) => {
|
|
|
3709
3776
|
var SELF_NOTIFICATION_COUNT_QUERY_KEY = (filters) => [...SELF_QUERY_KEY(), "NOTIFICATION_COUNT", filters];
|
|
3710
3777
|
var GetSelfNewNotificationsCount = async ({
|
|
3711
3778
|
filters,
|
|
3712
|
-
|
|
3779
|
+
clientApiParams
|
|
3713
3780
|
}) => {
|
|
3781
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3714
3782
|
const { data } = await clientApi.get(`/self/notifications/count`, {
|
|
3715
3783
|
params: {
|
|
3716
3784
|
filters
|
|
@@ -3719,13 +3787,13 @@ var GetSelfNewNotificationsCount = async ({
|
|
|
3719
3787
|
return data;
|
|
3720
3788
|
};
|
|
3721
3789
|
var useGetSelfNewNotificationsCount = (filters = "", options = {}) => {
|
|
3722
|
-
const {
|
|
3790
|
+
const { authenticated } = useConnectedXM();
|
|
3723
3791
|
return useConnectedSingleQuery_default(
|
|
3724
3792
|
SELF_NOTIFICATION_COUNT_QUERY_KEY(filters),
|
|
3725
3793
|
(params) => GetSelfNewNotificationsCount({ filters, ...params }),
|
|
3726
3794
|
{
|
|
3727
3795
|
...options,
|
|
3728
|
-
enabled: !!
|
|
3796
|
+
enabled: !!authenticated && (options.enabled ?? true)
|
|
3729
3797
|
}
|
|
3730
3798
|
);
|
|
3731
3799
|
};
|
|
@@ -3741,9 +3809,10 @@ var GetSelfPushDevices = async ({
|
|
|
3741
3809
|
orderBy,
|
|
3742
3810
|
search,
|
|
3743
3811
|
queryClient,
|
|
3744
|
-
|
|
3812
|
+
clientApiParams,
|
|
3745
3813
|
locale
|
|
3746
3814
|
}) => {
|
|
3815
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3747
3816
|
const { data } = await clientApi.get(`/self/push-devices`, {
|
|
3748
3817
|
params: {
|
|
3749
3818
|
page: pageParam || void 0,
|
|
@@ -3763,14 +3832,14 @@ var GetSelfPushDevices = async ({
|
|
|
3763
3832
|
return data;
|
|
3764
3833
|
};
|
|
3765
3834
|
var useGetSelfPushDevices = (params = {}, options = {}) => {
|
|
3766
|
-
const {
|
|
3835
|
+
const { authenticated } = useConnectedXM();
|
|
3767
3836
|
return useConnectedInfiniteQuery(
|
|
3768
3837
|
SELF_PUSH_DEVICES_QUERY_KEY(),
|
|
3769
3838
|
(params2) => GetSelfPushDevices({ ...params2 }),
|
|
3770
3839
|
params,
|
|
3771
3840
|
{
|
|
3772
3841
|
...options,
|
|
3773
|
-
enabled: !!
|
|
3842
|
+
enabled: !!authenticated && (options.enabled ?? true)
|
|
3774
3843
|
}
|
|
3775
3844
|
);
|
|
3776
3845
|
};
|
|
@@ -3791,19 +3860,20 @@ var SET_PUSH_DEVICE_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]
|
|
|
3791
3860
|
};
|
|
3792
3861
|
var GetSelfPushDevice = async ({
|
|
3793
3862
|
pushDeviceId,
|
|
3794
|
-
|
|
3863
|
+
clientApiParams
|
|
3795
3864
|
}) => {
|
|
3865
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3796
3866
|
const { data } = await clientApi.get(`/self/push-devices/${pushDeviceId}`);
|
|
3797
3867
|
return data;
|
|
3798
3868
|
};
|
|
3799
3869
|
var useGetSelfPushDevice = (pushDeviceId, options = {}) => {
|
|
3800
|
-
const {
|
|
3870
|
+
const { authenticated } = useConnectedXM();
|
|
3801
3871
|
return useConnectedSingleQuery(
|
|
3802
3872
|
SELF_PUSH_DEVICE_QUERY_KEY(pushDeviceId),
|
|
3803
3873
|
(params) => GetSelfPushDevice({ pushDeviceId, ...params }),
|
|
3804
3874
|
{
|
|
3805
3875
|
...options,
|
|
3806
|
-
enabled: !!
|
|
3876
|
+
enabled: !!authenticated && !!pushDeviceId && (options?.enabled ?? true)
|
|
3807
3877
|
}
|
|
3808
3878
|
);
|
|
3809
3879
|
};
|
|
@@ -3823,9 +3893,10 @@ var GetSelfRecommendations = async ({
|
|
|
3823
3893
|
eventId,
|
|
3824
3894
|
type,
|
|
3825
3895
|
queryClient,
|
|
3826
|
-
|
|
3896
|
+
clientApiParams,
|
|
3827
3897
|
locale
|
|
3828
3898
|
}) => {
|
|
3899
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3829
3900
|
const { data } = await clientApi.get(`/self/recommendations`, {
|
|
3830
3901
|
params: {
|
|
3831
3902
|
page: pageParam || void 0,
|
|
@@ -3847,14 +3918,14 @@ var GetSelfRecommendations = async ({
|
|
|
3847
3918
|
return data;
|
|
3848
3919
|
};
|
|
3849
3920
|
var useGetSelfRecommendations = (type, eventId = "", params = {}, options = {}) => {
|
|
3850
|
-
const {
|
|
3921
|
+
const { authenticated } = useConnectedXM();
|
|
3851
3922
|
return useConnectedInfiniteQuery(
|
|
3852
3923
|
SELF_RECOMMENDATIONS_QUERY_KEY(type, eventId),
|
|
3853
3924
|
(params2) => GetSelfRecommendations({ ...params2, eventId, type }),
|
|
3854
3925
|
params,
|
|
3855
3926
|
{
|
|
3856
3927
|
...options,
|
|
3857
|
-
enabled: !!
|
|
3928
|
+
enabled: !!authenticated && (options.enabled ?? true)
|
|
3858
3929
|
}
|
|
3859
3930
|
);
|
|
3860
3931
|
};
|
|
@@ -3869,8 +3940,9 @@ var GetSelfTransfers = async ({
|
|
|
3869
3940
|
pageSize,
|
|
3870
3941
|
orderBy,
|
|
3871
3942
|
search,
|
|
3872
|
-
|
|
3943
|
+
clientApiParams
|
|
3873
3944
|
}) => {
|
|
3945
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3874
3946
|
const { data } = await clientApi.get(`/self/transfers`, {
|
|
3875
3947
|
params: {
|
|
3876
3948
|
page: pageParam || void 0,
|
|
@@ -3882,14 +3954,14 @@ var GetSelfTransfers = async ({
|
|
|
3882
3954
|
return data;
|
|
3883
3955
|
};
|
|
3884
3956
|
var useGetSelfTransfers = (params = {}, options = {}) => {
|
|
3885
|
-
const {
|
|
3957
|
+
const { authenticated } = useConnectedXM();
|
|
3886
3958
|
return useConnectedInfiniteQuery(
|
|
3887
3959
|
SELF_TRANSFERS_QUERY_KEY(),
|
|
3888
3960
|
(params2) => GetSelfTransfers({ ...params2 }),
|
|
3889
3961
|
params,
|
|
3890
3962
|
{
|
|
3891
3963
|
...options,
|
|
3892
|
-
enabled: !!
|
|
3964
|
+
enabled: !!authenticated && (options.enabled ?? true)
|
|
3893
3965
|
}
|
|
3894
3966
|
);
|
|
3895
3967
|
};
|
|
@@ -3898,19 +3970,20 @@ var useGetSelfTransfers = (params = {}, options = {}) => {
|
|
|
3898
3970
|
var SELF_PENDING_TRANSFER_QUERY_KEY = (transferId) => [...SELF_TRANSFERS_QUERY_KEY(), transferId];
|
|
3899
3971
|
var GetSelfTransfer = async ({
|
|
3900
3972
|
transferId,
|
|
3901
|
-
|
|
3973
|
+
clientApiParams
|
|
3902
3974
|
}) => {
|
|
3975
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3903
3976
|
const { data } = await clientApi.get(`/self/transfers/${transferId}`);
|
|
3904
3977
|
return data;
|
|
3905
3978
|
};
|
|
3906
3979
|
var useGetSelfTransfer = (transferId = "", options = {}) => {
|
|
3907
|
-
const {
|
|
3980
|
+
const { authenticated } = useConnectedXM();
|
|
3908
3981
|
return useConnectedSingleQuery(
|
|
3909
3982
|
SELF_PENDING_TRANSFER_QUERY_KEY(transferId),
|
|
3910
3983
|
(params) => GetSelfTransfer({ ...params, transferId }),
|
|
3911
3984
|
{
|
|
3912
3985
|
...options,
|
|
3913
|
-
enabled: !!
|
|
3986
|
+
enabled: !!authenticated && !!transferId && (options?.enabled ?? true)
|
|
3914
3987
|
}
|
|
3915
3988
|
);
|
|
3916
3989
|
};
|
|
@@ -3932,9 +4005,10 @@ var GetSeriesList = async ({
|
|
|
3932
4005
|
orderBy,
|
|
3933
4006
|
search,
|
|
3934
4007
|
queryClient,
|
|
3935
|
-
|
|
4008
|
+
clientApiParams,
|
|
3936
4009
|
locale
|
|
3937
4010
|
}) => {
|
|
4011
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3938
4012
|
const { data } = await clientApi.get(`/series`, {
|
|
3939
4013
|
params: {
|
|
3940
4014
|
page: pageParam || void 0,
|
|
@@ -3975,12 +4049,13 @@ var SET_SERIES_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) =>
|
|
|
3975
4049
|
};
|
|
3976
4050
|
var GetSeries = async ({
|
|
3977
4051
|
seriesId,
|
|
3978
|
-
|
|
4052
|
+
clientApiParams
|
|
3979
4053
|
}) => {
|
|
4054
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3980
4055
|
const { data } = await clientApi.get(`/series/${seriesId}`);
|
|
3981
4056
|
return data;
|
|
3982
4057
|
};
|
|
3983
|
-
var useGetSeries = (seriesId, options = {}) => {
|
|
4058
|
+
var useGetSeries = (seriesId = "", options = {}) => {
|
|
3984
4059
|
return useConnectedSingleQuery(
|
|
3985
4060
|
SERIES_QUERY_KEY(seriesId),
|
|
3986
4061
|
(params) => GetSeries({ seriesId, ...params }),
|
|
@@ -4012,9 +4087,10 @@ var GetSeriesEvents = async ({
|
|
|
4012
4087
|
orderBy,
|
|
4013
4088
|
search,
|
|
4014
4089
|
queryClient,
|
|
4015
|
-
|
|
4090
|
+
clientApiParams,
|
|
4016
4091
|
locale
|
|
4017
4092
|
}) => {
|
|
4093
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4018
4094
|
const { data } = await clientApi.get(`/series/${seriesId}/events`, {
|
|
4019
4095
|
params: {
|
|
4020
4096
|
page: pageParam || void 0,
|
|
@@ -4033,7 +4109,7 @@ var GetSeriesEvents = async ({
|
|
|
4033
4109
|
}
|
|
4034
4110
|
return data;
|
|
4035
4111
|
};
|
|
4036
|
-
var useGetSeriesEvents = (seriesId, params = {}, options = {}) => {
|
|
4112
|
+
var useGetSeriesEvents = (seriesId = "", params = {}, options = {}) => {
|
|
4037
4113
|
return useConnectedInfiniteQuery(
|
|
4038
4114
|
SERIES_EVENTS_QUERY_KEY(seriesId),
|
|
4039
4115
|
(params2) => GetSeriesEvents({ seriesId, ...params2 }),
|
|
@@ -4062,9 +4138,10 @@ var GetLevels = async ({
|
|
|
4062
4138
|
orderBy,
|
|
4063
4139
|
search,
|
|
4064
4140
|
queryClient,
|
|
4065
|
-
|
|
4141
|
+
clientApiParams,
|
|
4066
4142
|
locale
|
|
4067
4143
|
}) => {
|
|
4144
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4068
4145
|
const { data } = await clientApi.get(`/levels`, {
|
|
4069
4146
|
params: {
|
|
4070
4147
|
page: pageParam || void 0,
|
|
@@ -4105,12 +4182,13 @@ var SET_LEVEL_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
|
|
|
4105
4182
|
};
|
|
4106
4183
|
var GetLevel = async ({
|
|
4107
4184
|
levelId,
|
|
4108
|
-
|
|
4185
|
+
clientApiParams
|
|
4109
4186
|
}) => {
|
|
4187
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4110
4188
|
const { data } = await clientApi.get(`/levels/${levelId}`, {});
|
|
4111
4189
|
return data;
|
|
4112
4190
|
};
|
|
4113
|
-
var useGetLevel = (levelId, options = {}) => {
|
|
4191
|
+
var useGetLevel = (levelId = "", options = {}) => {
|
|
4114
4192
|
return useConnectedSingleQuery_default(
|
|
4115
4193
|
LEVEL_QUERY_KEY(levelId),
|
|
4116
4194
|
(params) => GetLevel({ levelId, ...params }),
|
|
@@ -4142,9 +4220,10 @@ var GetLevelSponsors = async ({
|
|
|
4142
4220
|
orderBy,
|
|
4143
4221
|
search,
|
|
4144
4222
|
queryClient,
|
|
4145
|
-
|
|
4223
|
+
clientApiParams,
|
|
4146
4224
|
locale
|
|
4147
4225
|
}) => {
|
|
4226
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4148
4227
|
const { data } = await clientApi.get(`/levels/${levelId}/accounts`, {
|
|
4149
4228
|
params: {
|
|
4150
4229
|
page: pageParam || void 0,
|
|
@@ -4163,7 +4242,7 @@ var GetLevelSponsors = async ({
|
|
|
4163
4242
|
}
|
|
4164
4243
|
return data;
|
|
4165
4244
|
};
|
|
4166
|
-
var useGetLevelSponsors = (levelId, params = {}, options = {}) => {
|
|
4245
|
+
var useGetLevelSponsors = (levelId = "", params = {}, options = {}) => {
|
|
4167
4246
|
return useConnectedInfiniteQuery(
|
|
4168
4247
|
LEVEL_SPONSORS_QUERY_KEY(levelId),
|
|
4169
4248
|
(params2) => GetLevelSponsors({ levelId, ...params2 }),
|
|
@@ -4178,18 +4257,23 @@ var useGetLevelSponsors = (levelId, params = {}, options = {}) => {
|
|
|
4178
4257
|
// src/mutations/useConnectedMutation.ts
|
|
4179
4258
|
import {
|
|
4180
4259
|
useMutation,
|
|
4181
|
-
useQueryClient
|
|
4260
|
+
useQueryClient
|
|
4182
4261
|
} from "@tanstack/react-query";
|
|
4183
4262
|
var useConnectedMutation = (mutation, params, options) => {
|
|
4184
|
-
const { locale } = useConnectedXM();
|
|
4185
|
-
const queryClient =
|
|
4186
|
-
const clientApi = useClientAPI();
|
|
4263
|
+
const { locale, apiUrl, getToken, organizationId, getExecuteAs } = useConnectedXM();
|
|
4264
|
+
const queryClient = useQueryClient();
|
|
4187
4265
|
return useMutation({
|
|
4188
4266
|
mutationFn: (data) => mutation({
|
|
4189
|
-
locale: params?.locale || locale,
|
|
4190
|
-
...data,
|
|
4191
4267
|
queryClient,
|
|
4192
|
-
|
|
4268
|
+
locale: params?.locale || locale,
|
|
4269
|
+
clientApiParams: {
|
|
4270
|
+
apiUrl,
|
|
4271
|
+
getToken,
|
|
4272
|
+
organizationId,
|
|
4273
|
+
getExecuteAs,
|
|
4274
|
+
locale: params?.locale || locale
|
|
4275
|
+
},
|
|
4276
|
+
...data
|
|
4193
4277
|
}),
|
|
4194
4278
|
...options
|
|
4195
4279
|
});
|
|
@@ -4199,10 +4283,11 @@ var useConnectedMutation_default = useConnectedMutation;
|
|
|
4199
4283
|
// src/mutations/accounts/useFollowAccount.ts
|
|
4200
4284
|
var FollowAccount = async ({
|
|
4201
4285
|
accountId,
|
|
4202
|
-
|
|
4286
|
+
clientApiParams,
|
|
4203
4287
|
queryClient,
|
|
4204
4288
|
locale = "en"
|
|
4205
4289
|
}) => {
|
|
4290
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4206
4291
|
const { data } = await clientApi.post(
|
|
4207
4292
|
`/accounts/${accountId}/follow`
|
|
4208
4293
|
);
|
|
@@ -4222,10 +4307,11 @@ var useFollowAccount = (params = {}, options = {}) => {
|
|
|
4222
4307
|
// src/mutations/accounts/useUnfollowAccount.ts
|
|
4223
4308
|
var UnfollowAccount = async ({
|
|
4224
4309
|
accountId,
|
|
4225
|
-
|
|
4310
|
+
clientApiParams,
|
|
4226
4311
|
queryClient,
|
|
4227
4312
|
locale = "en"
|
|
4228
4313
|
}) => {
|
|
4314
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4229
4315
|
const { data } = await clientApi.post(
|
|
4230
4316
|
`/accounts/${accountId}/unfollow`
|
|
4231
4317
|
);
|
|
@@ -4300,7 +4386,7 @@ var UpdateResharesInfinite = (increment, queryClient, KEY, activityId) => {
|
|
|
4300
4386
|
// src/mutations/activities/useDeleteReshare.ts
|
|
4301
4387
|
var DeleteReshare = async ({
|
|
4302
4388
|
activityId,
|
|
4303
|
-
|
|
4389
|
+
clientApiParams,
|
|
4304
4390
|
queryClient
|
|
4305
4391
|
}) => {
|
|
4306
4392
|
if (queryClient) {
|
|
@@ -4312,6 +4398,7 @@ var DeleteReshare = async ({
|
|
|
4312
4398
|
activityId
|
|
4313
4399
|
);
|
|
4314
4400
|
}
|
|
4401
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4315
4402
|
const { data } = await clientApi.delete(
|
|
4316
4403
|
`/self/activities/${activityId}/reshares`
|
|
4317
4404
|
);
|
|
@@ -4379,13 +4466,14 @@ var UpdateLikesInfinite = (increment, queryClient, KEY, activityId) => {
|
|
|
4379
4466
|
// src/mutations/activities/useLikeActivity.ts
|
|
4380
4467
|
var LikeActivity = async ({
|
|
4381
4468
|
activityId,
|
|
4382
|
-
|
|
4469
|
+
clientApiParams,
|
|
4383
4470
|
queryClient
|
|
4384
4471
|
}) => {
|
|
4385
4472
|
if (queryClient) {
|
|
4386
4473
|
UpdateLikesSingle(true, queryClient, ACTIVITY_QUERY_KEY(activityId));
|
|
4387
4474
|
UpdateLikesInfinite(true, queryClient, ACTIVITIES_QUERY_KEY(), activityId);
|
|
4388
4475
|
}
|
|
4476
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4389
4477
|
const { data } = await clientApi.post(
|
|
4390
4478
|
`/self/activities/${activityId}/likes`
|
|
4391
4479
|
);
|
|
@@ -4399,7 +4487,7 @@ var useLikeActivity = (params = {}, options = {}) => {
|
|
|
4399
4487
|
var ReshareActivity = async ({
|
|
4400
4488
|
activityId,
|
|
4401
4489
|
queryClient,
|
|
4402
|
-
|
|
4490
|
+
clientApiParams
|
|
4403
4491
|
}) => {
|
|
4404
4492
|
if (queryClient) {
|
|
4405
4493
|
UpdateResharesSingle(true, queryClient, ACTIVITY_QUERY_KEY(activityId));
|
|
@@ -4410,6 +4498,7 @@ var ReshareActivity = async ({
|
|
|
4410
4498
|
activityId
|
|
4411
4499
|
);
|
|
4412
4500
|
}
|
|
4501
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4413
4502
|
const { data } = await clientApi.post(
|
|
4414
4503
|
`/self/activities/${activityId}/reshares`,
|
|
4415
4504
|
{
|
|
@@ -4425,13 +4514,14 @@ var useReshareActivity = (params = {}, options = {}) => {
|
|
|
4425
4514
|
// src/mutations/activities/useUnlikeActivity.ts
|
|
4426
4515
|
var UnlikeActivity = async ({
|
|
4427
4516
|
activityId,
|
|
4428
|
-
|
|
4517
|
+
clientApiParams,
|
|
4429
4518
|
queryClient
|
|
4430
4519
|
}) => {
|
|
4431
4520
|
if (queryClient) {
|
|
4432
4521
|
UpdateLikesSingle(false, queryClient, ACTIVITY_QUERY_KEY(activityId));
|
|
4433
4522
|
UpdateLikesInfinite(false, queryClient, ACTIVITIES_QUERY_KEY(), activityId);
|
|
4434
4523
|
}
|
|
4524
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4435
4525
|
const { data } = await clientApi.delete(
|
|
4436
4526
|
`/self/activities/${activityId}/likes`
|
|
4437
4527
|
);
|
|
@@ -4445,9 +4535,10 @@ var useUnlikeActivity = (params = {}, options = {}) => {
|
|
|
4445
4535
|
var AddCommunityEvent = async ({
|
|
4446
4536
|
communityId,
|
|
4447
4537
|
eventId,
|
|
4448
|
-
|
|
4538
|
+
clientApiParams,
|
|
4449
4539
|
queryClient
|
|
4450
4540
|
}) => {
|
|
4541
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4451
4542
|
const { data } = await clientApi.post(
|
|
4452
4543
|
`/communityModerator/${communityId}/events/${eventId}`
|
|
4453
4544
|
);
|
|
@@ -4475,9 +4566,10 @@ var CreateCommunityAnnouncement = async ({
|
|
|
4475
4566
|
html,
|
|
4476
4567
|
email,
|
|
4477
4568
|
push,
|
|
4478
|
-
|
|
4569
|
+
clientApiParams,
|
|
4479
4570
|
queryClient
|
|
4480
4571
|
}) => {
|
|
4572
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4481
4573
|
const { data } = await clientApi.post(
|
|
4482
4574
|
`/communityModerator/${communityId}/announcements`,
|
|
4483
4575
|
{
|
|
@@ -4504,9 +4596,10 @@ var useCreateCommunityAnnouncement = (params = {}, options = {}) => {
|
|
|
4504
4596
|
var RemoveCommunityEvent = async ({
|
|
4505
4597
|
communityId,
|
|
4506
4598
|
eventId,
|
|
4507
|
-
|
|
4599
|
+
clientApiParams,
|
|
4508
4600
|
queryClient
|
|
4509
4601
|
}) => {
|
|
4602
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4510
4603
|
const { data } = await clientApi.delete(
|
|
4511
4604
|
`/communityModerator/${communityId}/events/${eventId}`
|
|
4512
4605
|
);
|
|
@@ -4533,10 +4626,11 @@ var UpdateCommunity = async ({
|
|
|
4533
4626
|
description,
|
|
4534
4627
|
externalUrl,
|
|
4535
4628
|
base64,
|
|
4536
|
-
|
|
4629
|
+
clientApiParams,
|
|
4537
4630
|
queryClient,
|
|
4538
4631
|
locale = "en"
|
|
4539
4632
|
}) => {
|
|
4633
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4540
4634
|
const { data } = await clientApi.put(
|
|
4541
4635
|
`/communityModerator/${communityId}`,
|
|
4542
4636
|
{
|
|
@@ -4563,9 +4657,10 @@ var CompleteEventActivation = async ({
|
|
|
4563
4657
|
eventId,
|
|
4564
4658
|
activationId,
|
|
4565
4659
|
code,
|
|
4566
|
-
|
|
4660
|
+
clientApiParams,
|
|
4567
4661
|
queryClient
|
|
4568
4662
|
}) => {
|
|
4663
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4569
4664
|
const { data } = await clientApi.post(
|
|
4570
4665
|
`/events/${eventId}/activations/${activationId}`,
|
|
4571
4666
|
{
|
|
@@ -4585,9 +4680,10 @@ var CreateEventLead = async ({
|
|
|
4585
4680
|
eventId,
|
|
4586
4681
|
purchaseId,
|
|
4587
4682
|
note,
|
|
4588
|
-
|
|
4683
|
+
clientApiParams,
|
|
4589
4684
|
queryClient
|
|
4590
4685
|
}) => {
|
|
4686
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4591
4687
|
const { data } = await clientApi.post(
|
|
4592
4688
|
`/events/${eventId}/leads/${purchaseId}`,
|
|
4593
4689
|
{
|
|
@@ -4606,9 +4702,10 @@ var useCreateEventLead = (params = {}, options = {}) => {
|
|
|
4606
4702
|
var AddSelfChatChannelMember = async ({
|
|
4607
4703
|
channelId,
|
|
4608
4704
|
accountId,
|
|
4609
|
-
|
|
4705
|
+
clientApiParams,
|
|
4610
4706
|
queryClient
|
|
4611
4707
|
}) => {
|
|
4708
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4612
4709
|
const { data } = await clientApi.post(
|
|
4613
4710
|
`/self/chat/channels/${channelId}/members/${accountId}`
|
|
4614
4711
|
);
|
|
@@ -4627,9 +4724,10 @@ var useAddSelfChatChannelMember = (params = {}, options = {}) => {
|
|
|
4627
4724
|
var CreateSelfChatChannel = async ({
|
|
4628
4725
|
name,
|
|
4629
4726
|
accountIds,
|
|
4630
|
-
|
|
4727
|
+
clientApiParams,
|
|
4631
4728
|
queryClient
|
|
4632
4729
|
}) => {
|
|
4730
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4633
4731
|
const { data } = await clientApi.post(
|
|
4634
4732
|
`/self/chat/channels`,
|
|
4635
4733
|
{
|
|
@@ -4653,8 +4751,9 @@ var CreateSelfChatChannelMessage = async ({
|
|
|
4653
4751
|
channelId,
|
|
4654
4752
|
text,
|
|
4655
4753
|
queryClient,
|
|
4656
|
-
|
|
4754
|
+
clientApiParams
|
|
4657
4755
|
}) => {
|
|
4756
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4658
4757
|
const { data } = await clientApi.post(`/self/chat/channels/${channelId}/messages`, {
|
|
4659
4758
|
text
|
|
4660
4759
|
});
|
|
@@ -4669,9 +4768,10 @@ var useCreateSelfChatChannelMessage = (params = {}, options = {}) => {
|
|
|
4669
4768
|
// src/mutations/self/chat/useDeleteSelfChatChannel.ts
|
|
4670
4769
|
var DeleteSelfChatChannel = async ({
|
|
4671
4770
|
channelId,
|
|
4672
|
-
|
|
4771
|
+
clientApiParams,
|
|
4673
4772
|
queryClient
|
|
4674
4773
|
}) => {
|
|
4774
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4675
4775
|
const { data } = await clientApi.delete(
|
|
4676
4776
|
`/self/chat/channels/${channelId}`
|
|
4677
4777
|
);
|
|
@@ -4691,9 +4791,10 @@ var useDeleteSelfChatChannel = (params = {}, options = {}) => {
|
|
|
4691
4791
|
var DeleteSelfChatChannelMessage = async ({
|
|
4692
4792
|
channelId,
|
|
4693
4793
|
messageId,
|
|
4694
|
-
|
|
4794
|
+
clientApiParams,
|
|
4695
4795
|
queryClient
|
|
4696
4796
|
}) => {
|
|
4797
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4697
4798
|
const { data } = await clientApi.delete(
|
|
4698
4799
|
`/self/chat/channels/${channelId}/messages/${messageId}`
|
|
4699
4800
|
);
|
|
@@ -4711,9 +4812,10 @@ var useDeleteSelfChatChannelMessage = (params = {}, options = {}) => {
|
|
|
4711
4812
|
// src/mutations/self/chat/useLeaveSelfChatChannel.ts
|
|
4712
4813
|
var LeaveSelfChatChannel = async ({
|
|
4713
4814
|
channelId,
|
|
4714
|
-
|
|
4815
|
+
clientApiParams,
|
|
4715
4816
|
queryClient
|
|
4716
4817
|
}) => {
|
|
4818
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4717
4819
|
const { data } = await clientApi.delete(
|
|
4718
4820
|
`/self/chat/channels/${channelId}/leave`
|
|
4719
4821
|
);
|
|
@@ -4733,10 +4835,11 @@ var useLeaveSelfChatChannel = (params = {}, options = {}) => {
|
|
|
4733
4835
|
var UpdateSelfChatChannelNotifications = async ({
|
|
4734
4836
|
channelId,
|
|
4735
4837
|
notifications,
|
|
4736
|
-
|
|
4838
|
+
clientApiParams,
|
|
4737
4839
|
queryClient,
|
|
4738
4840
|
locale = "en"
|
|
4739
4841
|
}) => {
|
|
4842
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4740
4843
|
const { data } = await clientApi.put(
|
|
4741
4844
|
`/self/chat/channels/${channelId}/notifications`,
|
|
4742
4845
|
{
|
|
@@ -4759,10 +4862,11 @@ var useUpdateSelfChatChannelNotifications = (params = {}, options = {}) => {
|
|
|
4759
4862
|
var RegisterCancelledEventRegistration = async ({
|
|
4760
4863
|
eventId,
|
|
4761
4864
|
registrationId,
|
|
4762
|
-
|
|
4865
|
+
clientApiParams,
|
|
4763
4866
|
queryClient,
|
|
4764
4867
|
locale = "en"
|
|
4765
4868
|
}) => {
|
|
4869
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4766
4870
|
const { data } = await clientApi.post(
|
|
4767
4871
|
`/self/events/${eventId}/registration/${registrationId}/cancelled/register`
|
|
4768
4872
|
);
|
|
@@ -4794,10 +4898,11 @@ var SelectSelfEventRegistrationCoupon = async ({
|
|
|
4794
4898
|
eventId,
|
|
4795
4899
|
registrationId,
|
|
4796
4900
|
couponId,
|
|
4797
|
-
|
|
4901
|
+
clientApiParams,
|
|
4798
4902
|
queryClient,
|
|
4799
4903
|
locale = "en"
|
|
4800
4904
|
}) => {
|
|
4905
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4801
4906
|
const { data } = await clientApi.post(
|
|
4802
4907
|
`/self/events/${eventId}/registration/${registrationId}/draft/coupon`,
|
|
4803
4908
|
{
|
|
@@ -4837,10 +4942,11 @@ var useSelectSelfEventRegistrationCoupon = (params = {}, options = {}) => {
|
|
|
4837
4942
|
var CaptureSelfEventRegistrationPayment = async ({
|
|
4838
4943
|
eventId,
|
|
4839
4944
|
registrationId,
|
|
4840
|
-
|
|
4945
|
+
clientApiParams,
|
|
4841
4946
|
queryClient,
|
|
4842
4947
|
locale = "en"
|
|
4843
4948
|
}) => {
|
|
4949
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4844
4950
|
const { data } = await clientApi.post(
|
|
4845
4951
|
`/self/events/${eventId}/registration/${registrationId}/draft/capture`
|
|
4846
4952
|
);
|
|
@@ -4860,10 +4966,11 @@ var CreateSelfEventRegistrationGuest = async ({
|
|
|
4860
4966
|
eventId,
|
|
4861
4967
|
registrationId,
|
|
4862
4968
|
guest,
|
|
4863
|
-
|
|
4969
|
+
clientApiParams,
|
|
4864
4970
|
queryClient,
|
|
4865
4971
|
locale = "en"
|
|
4866
4972
|
}) => {
|
|
4973
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4867
4974
|
const { data } = await clientApi.post(
|
|
4868
4975
|
`/self/events/${eventId}/registration/${registrationId}/draft/guests`,
|
|
4869
4976
|
guest
|
|
@@ -4884,10 +4991,11 @@ var DeleteSelfEventRegistrationGuest = async ({
|
|
|
4884
4991
|
eventId,
|
|
4885
4992
|
registrationId,
|
|
4886
4993
|
guestId,
|
|
4887
|
-
|
|
4994
|
+
clientApiParams,
|
|
4888
4995
|
queryClient,
|
|
4889
4996
|
locale = "en"
|
|
4890
4997
|
}) => {
|
|
4998
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4891
4999
|
const { data } = await clientApi.delete(
|
|
4892
5000
|
`/self/events/${eventId}/registration/${registrationId}/draft/guests/${guestId}`
|
|
4893
5001
|
);
|
|
@@ -4906,10 +5014,11 @@ var useDeleteSelfEventRegistrationGuest = (params = {}, options = {}) => {
|
|
|
4906
5014
|
var RemoveSelfEventRegistrationCoupon = async ({
|
|
4907
5015
|
eventId,
|
|
4908
5016
|
registrationId,
|
|
4909
|
-
|
|
5017
|
+
clientApiParams,
|
|
4910
5018
|
queryClient,
|
|
4911
5019
|
locale = "en"
|
|
4912
5020
|
}) => {
|
|
5021
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4913
5022
|
const { data } = await clientApi.delete(
|
|
4914
5023
|
`/self/events/${eventId}/registration/${registrationId}/draft/coupon`
|
|
4915
5024
|
);
|
|
@@ -4946,10 +5055,11 @@ var useRemoveSelfEventRegistrationCoupon = (params = {}, options = {}) => {
|
|
|
4946
5055
|
var RemoveSelfEventRegistrationTicket = async ({
|
|
4947
5056
|
eventId,
|
|
4948
5057
|
registrationId,
|
|
4949
|
-
|
|
5058
|
+
clientApiParams,
|
|
4950
5059
|
queryClient,
|
|
4951
5060
|
locale = "en"
|
|
4952
5061
|
}) => {
|
|
5062
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4953
5063
|
const { data } = await clientApi.delete(
|
|
4954
5064
|
`/self/events/${eventId}/registration/${registrationId}/draft/ticket`
|
|
4955
5065
|
);
|
|
@@ -4987,10 +5097,11 @@ var SelectSelfEventRegistrationTicket = async ({
|
|
|
4987
5097
|
eventId,
|
|
4988
5098
|
registrationId,
|
|
4989
5099
|
ticketId,
|
|
4990
|
-
|
|
5100
|
+
clientApiParams,
|
|
4991
5101
|
queryClient,
|
|
4992
5102
|
locale = "en"
|
|
4993
5103
|
}) => {
|
|
5104
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4994
5105
|
const { data } = await clientApi.post(
|
|
4995
5106
|
`/self/events/${eventId}/registration/${registrationId}/draft/ticket`,
|
|
4996
5107
|
{
|
|
@@ -5026,10 +5137,11 @@ var SubmitSelfEventRegistration = async ({
|
|
|
5026
5137
|
eventId,
|
|
5027
5138
|
registrationId,
|
|
5028
5139
|
payment,
|
|
5029
|
-
|
|
5140
|
+
clientApiParams,
|
|
5030
5141
|
queryClient,
|
|
5031
5142
|
locale = "en"
|
|
5032
5143
|
}) => {
|
|
5144
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5033
5145
|
const { data } = await clientApi.post(
|
|
5034
5146
|
`/self/events/${eventId}/registration/${registrationId}/draft/submit`,
|
|
5035
5147
|
payment
|
|
@@ -5051,10 +5163,11 @@ var UpdateSelfEventRegistrationGuest = async ({
|
|
|
5051
5163
|
registrationId,
|
|
5052
5164
|
guestId,
|
|
5053
5165
|
guest,
|
|
5054
|
-
|
|
5166
|
+
clientApiParams,
|
|
5055
5167
|
queryClient,
|
|
5056
5168
|
locale = "en"
|
|
5057
5169
|
}) => {
|
|
5170
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5058
5171
|
const { data } = await clientApi.put(
|
|
5059
5172
|
`/self/events/${eventId}/registration/${registrationId}/draft/guests/${guestId}`,
|
|
5060
5173
|
guest
|
|
@@ -5078,10 +5191,11 @@ var UpdateSelfEventRegistrationGuestResponseFile = async ({
|
|
|
5078
5191
|
guestId,
|
|
5079
5192
|
dataUrl,
|
|
5080
5193
|
name,
|
|
5081
|
-
|
|
5194
|
+
clientApiParams
|
|
5082
5195
|
}) => {
|
|
5083
5196
|
if (!guestId)
|
|
5084
5197
|
throw new Error("Guest ID is required");
|
|
5198
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5085
5199
|
const { data } = await clientApi.put(
|
|
5086
5200
|
`/self/events/${eventId}/registration/${registrationId}/draft/guests/${guestId}/responses/file`,
|
|
5087
5201
|
{
|
|
@@ -5102,8 +5216,9 @@ var UpdateSelfEventRegistrationGuestResponses = async ({
|
|
|
5102
5216
|
registrationId,
|
|
5103
5217
|
guestId,
|
|
5104
5218
|
responses,
|
|
5105
|
-
|
|
5219
|
+
clientApiParams
|
|
5106
5220
|
}) => {
|
|
5221
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5107
5222
|
const { data } = await clientApi.put(
|
|
5108
5223
|
`/self/events/${eventId}/registration/${registrationId}/draft/guests/${guestId}/responses`,
|
|
5109
5224
|
responses
|
|
@@ -5121,8 +5236,9 @@ var UpdateSelfEventRegistrationResponseFile = async ({
|
|
|
5121
5236
|
dataUrl,
|
|
5122
5237
|
name,
|
|
5123
5238
|
questionId,
|
|
5124
|
-
|
|
5239
|
+
clientApiParams
|
|
5125
5240
|
}) => {
|
|
5241
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5126
5242
|
const { data } = await clientApi.put(
|
|
5127
5243
|
`/self/events/${eventId}/registration/${registrationId}/draft/responses/file`,
|
|
5128
5244
|
{
|
|
@@ -5142,10 +5258,11 @@ var UpdateSelfEventRegistrationResponses = async ({
|
|
|
5142
5258
|
eventId,
|
|
5143
5259
|
registrationId,
|
|
5144
5260
|
responses,
|
|
5145
|
-
|
|
5261
|
+
clientApiParams,
|
|
5146
5262
|
queryClient,
|
|
5147
5263
|
locale = "en"
|
|
5148
5264
|
}) => {
|
|
5265
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5149
5266
|
const { data } = await clientApi.put(
|
|
5150
5267
|
`/self/events/${eventId}/registration/${registrationId}/draft/responses`,
|
|
5151
5268
|
responses
|
|
@@ -5165,10 +5282,11 @@ var useUpdateSelfEventRegistrationResponses = (params = {}, options = {}) => {
|
|
|
5165
5282
|
var CancelEventRegistration = async ({
|
|
5166
5283
|
eventId,
|
|
5167
5284
|
registrationId,
|
|
5168
|
-
|
|
5285
|
+
clientApiParams,
|
|
5169
5286
|
queryClient,
|
|
5170
5287
|
locale = "env"
|
|
5171
5288
|
}) => {
|
|
5289
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5172
5290
|
const { data } = await clientApi.delete(
|
|
5173
5291
|
`/self/events/${eventId}/registration/${registrationId}/registered/cancel`
|
|
5174
5292
|
);
|
|
@@ -5200,9 +5318,10 @@ var CancelTransfer = async ({
|
|
|
5200
5318
|
transferId,
|
|
5201
5319
|
eventId,
|
|
5202
5320
|
registrationId,
|
|
5203
|
-
|
|
5321
|
+
clientApiParams,
|
|
5204
5322
|
queryClient
|
|
5205
5323
|
}) => {
|
|
5324
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5206
5325
|
const { data } = await clientApi.delete(
|
|
5207
5326
|
`/self/events/${eventId}/registration/${registrationId}/transfer/${transferId}`
|
|
5208
5327
|
);
|
|
@@ -5223,9 +5342,10 @@ var TransferPurchase = async ({
|
|
|
5223
5342
|
purchaseId,
|
|
5224
5343
|
eventId,
|
|
5225
5344
|
registrationId,
|
|
5226
|
-
|
|
5345
|
+
clientApiParams,
|
|
5227
5346
|
queryClient
|
|
5228
5347
|
}) => {
|
|
5348
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5229
5349
|
const { data } = await clientApi.post(
|
|
5230
5350
|
`/self/events/${eventId}/registration/${registrationId}/transfer`,
|
|
5231
5351
|
{
|
|
@@ -5250,10 +5370,11 @@ var UpdateSelfEventRegistrationResponse = async ({
|
|
|
5250
5370
|
registrationId,
|
|
5251
5371
|
questionId,
|
|
5252
5372
|
response,
|
|
5253
|
-
|
|
5373
|
+
clientApiParams,
|
|
5254
5374
|
queryClient,
|
|
5255
5375
|
locale = "en"
|
|
5256
5376
|
}) => {
|
|
5377
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5257
5378
|
const { data } = await clientApi.put(
|
|
5258
5379
|
`/self/events/${eventId}/registration/${registrationId}/registered/response`,
|
|
5259
5380
|
{
|
|
@@ -5283,10 +5404,11 @@ var UpdateSelfEventRegistrationGuestResponse = async ({
|
|
|
5283
5404
|
questionId,
|
|
5284
5405
|
guestId,
|
|
5285
5406
|
response,
|
|
5286
|
-
|
|
5407
|
+
clientApiParams,
|
|
5287
5408
|
queryClient,
|
|
5288
5409
|
locale = "en"
|
|
5289
5410
|
}) => {
|
|
5411
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5290
5412
|
const { data } = await clientApi.put(
|
|
5291
5413
|
`/self/events/${eventId}/registration/${registrationId}/registered/guests/${guestId}/response`,
|
|
5292
5414
|
{
|
|
@@ -5312,9 +5434,10 @@ var useUpdateSelfEventRegistrationGuestResponse = (params = {}, options = {}) =>
|
|
|
5312
5434
|
// src/mutations/self/subscriptions/useCancelSubscription.ts
|
|
5313
5435
|
var CancelSubscription = async ({
|
|
5314
5436
|
subscriptionId,
|
|
5315
|
-
|
|
5437
|
+
clientApiParams,
|
|
5316
5438
|
queryClient
|
|
5317
5439
|
}) => {
|
|
5440
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5318
5441
|
const { data } = await clientApi.delete(
|
|
5319
5442
|
`/self/subscriptions/${subscriptionId}`
|
|
5320
5443
|
);
|
|
@@ -5336,8 +5459,9 @@ var useCancelSubscription = (params = {}, options = {}) => {
|
|
|
5336
5459
|
var CreateSubscription = async ({
|
|
5337
5460
|
productId,
|
|
5338
5461
|
priceId,
|
|
5339
|
-
|
|
5462
|
+
clientApiParams
|
|
5340
5463
|
}) => {
|
|
5464
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5341
5465
|
const { data } = await clientApi.post("/self/subscriptions", {
|
|
5342
5466
|
productId,
|
|
5343
5467
|
priceId,
|
|
@@ -5353,9 +5477,10 @@ var useCreateSubscription = (params = {}, options = {}) => {
|
|
|
5353
5477
|
var UpdateSubscriptionPaymentMethod = async ({
|
|
5354
5478
|
subscriptionId,
|
|
5355
5479
|
paymentMethodId,
|
|
5356
|
-
|
|
5480
|
+
clientApiParams,
|
|
5357
5481
|
queryClient
|
|
5358
5482
|
}) => {
|
|
5483
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5359
5484
|
const { data } = await clientApi.put(
|
|
5360
5485
|
`/self/subscriptions/${subscriptionId}/payment-method`,
|
|
5361
5486
|
{
|
|
@@ -5376,9 +5501,10 @@ var useUpdateSubscriptionPaymentMethod = (params = {}, options = {}) => {
|
|
|
5376
5501
|
// src/mutations/self/useAcceptTransfer.ts
|
|
5377
5502
|
var AcceptTransfer = async ({
|
|
5378
5503
|
transferId,
|
|
5379
|
-
|
|
5504
|
+
clientApiParams,
|
|
5380
5505
|
queryClient
|
|
5381
5506
|
}) => {
|
|
5507
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5382
5508
|
const { data } = await clientApi.post(
|
|
5383
5509
|
`/self/transfers/${transferId}`
|
|
5384
5510
|
);
|
|
@@ -5394,9 +5520,10 @@ var useAcceptTransfer = (params = {}, options = {}) => {
|
|
|
5394
5520
|
// src/mutations/self/useAddSelfDelegate.ts
|
|
5395
5521
|
var AddSelfDelegate = async ({
|
|
5396
5522
|
email,
|
|
5397
|
-
|
|
5523
|
+
clientApiParams,
|
|
5398
5524
|
queryClient
|
|
5399
5525
|
}) => {
|
|
5526
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5400
5527
|
const { data } = await clientApi.post(
|
|
5401
5528
|
`/self/delegates`,
|
|
5402
5529
|
{
|
|
@@ -5416,10 +5543,11 @@ var useAddSelfDelegate = (params = {}, options = {}) => {
|
|
|
5416
5543
|
var AddSelfEventListingSession = async ({
|
|
5417
5544
|
eventId,
|
|
5418
5545
|
session,
|
|
5419
|
-
|
|
5546
|
+
clientApiParams,
|
|
5420
5547
|
queryClient,
|
|
5421
5548
|
locale = "en"
|
|
5422
5549
|
}) => {
|
|
5550
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5423
5551
|
const { data } = await clientApi.post(
|
|
5424
5552
|
`/self/events/listings/${eventId}/sessions`,
|
|
5425
5553
|
{
|
|
@@ -5468,10 +5596,11 @@ var useAddSelfEventListingSession = (params = {}, options = {}) => {
|
|
|
5468
5596
|
var AddSelfEventListingSpeaker = async ({
|
|
5469
5597
|
eventId,
|
|
5470
5598
|
speaker,
|
|
5471
|
-
|
|
5599
|
+
clientApiParams,
|
|
5472
5600
|
queryClient,
|
|
5473
5601
|
locale = "en"
|
|
5474
5602
|
}) => {
|
|
5603
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5475
5604
|
const { data } = await clientApi.post(
|
|
5476
5605
|
`/self/events/listings/${eventId}/speakers`,
|
|
5477
5606
|
{
|
|
@@ -5520,7 +5649,7 @@ var useAddSelfEventListingSpeaker = (params = {}, options = {}) => {
|
|
|
5520
5649
|
var AddSelfEventListingSponsor = async ({
|
|
5521
5650
|
eventId,
|
|
5522
5651
|
sponsor,
|
|
5523
|
-
|
|
5652
|
+
clientApiParams,
|
|
5524
5653
|
queryClient,
|
|
5525
5654
|
locale = "en"
|
|
5526
5655
|
}) => {
|
|
@@ -5554,6 +5683,7 @@ var AddSelfEventListingSponsor = async ({
|
|
|
5554
5683
|
}
|
|
5555
5684
|
);
|
|
5556
5685
|
}
|
|
5686
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5557
5687
|
const { data } = await clientApi.post(
|
|
5558
5688
|
`/self/events/listings/${eventId}/sponsors`,
|
|
5559
5689
|
{
|
|
@@ -5570,9 +5700,10 @@ var useAddSelfEventListingSponsor = (params = {}, options = {}) => {
|
|
|
5570
5700
|
var AddSelfEventSession = async ({
|
|
5571
5701
|
eventId,
|
|
5572
5702
|
sessionId,
|
|
5573
|
-
|
|
5703
|
+
clientApiParams,
|
|
5574
5704
|
queryClient
|
|
5575
5705
|
}) => {
|
|
5706
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5576
5707
|
const { data } = await clientApi.post(
|
|
5577
5708
|
`/self/events/${eventId}/sessions/${sessionId}`
|
|
5578
5709
|
);
|
|
@@ -5595,10 +5726,11 @@ var CreateSelfEventListing = async ({
|
|
|
5595
5726
|
sponsorIds,
|
|
5596
5727
|
speakers,
|
|
5597
5728
|
sessions,
|
|
5598
|
-
|
|
5729
|
+
clientApiParams,
|
|
5599
5730
|
queryClient,
|
|
5600
5731
|
locale = "en"
|
|
5601
5732
|
}) => {
|
|
5733
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5602
5734
|
let data;
|
|
5603
5735
|
if (communityId) {
|
|
5604
5736
|
data = (await clientApi.post(
|
|
@@ -5646,9 +5778,10 @@ var useCreateSelfEventListing = (params = {}, options = {}) => {
|
|
|
5646
5778
|
|
|
5647
5779
|
// src/mutations/self/useDeleteSelf.ts
|
|
5648
5780
|
var DeleteSelf = async ({
|
|
5649
|
-
|
|
5781
|
+
clientApiParams,
|
|
5650
5782
|
queryClient
|
|
5651
5783
|
}) => {
|
|
5784
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5652
5785
|
const { data } = await clientApi.delete(`/self`);
|
|
5653
5786
|
if (queryClient && data.status === "ok") {
|
|
5654
5787
|
queryClient.clear();
|
|
@@ -5662,9 +5795,10 @@ var useDeleteSelf = (params = {}, options = {}) => {
|
|
|
5662
5795
|
// src/mutations/self/useDeleteSelfPushDevice.ts
|
|
5663
5796
|
var DeleteSelfPushDevice = async ({
|
|
5664
5797
|
pushDeviceId,
|
|
5665
|
-
|
|
5798
|
+
clientApiParams,
|
|
5666
5799
|
queryClient
|
|
5667
5800
|
}) => {
|
|
5801
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5668
5802
|
const { data } = await clientApi.delete(
|
|
5669
5803
|
`/self/push-devices/${pushDeviceId}`
|
|
5670
5804
|
);
|
|
@@ -5682,9 +5816,10 @@ var useDeleteSelfPushDevice = (params = {}, options = {}) => {
|
|
|
5682
5816
|
// src/mutations/self/useRejectTransfer.ts
|
|
5683
5817
|
var RejectTransfer = async ({
|
|
5684
5818
|
transferId,
|
|
5685
|
-
|
|
5819
|
+
clientApiParams,
|
|
5686
5820
|
queryClient
|
|
5687
5821
|
}) => {
|
|
5822
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5688
5823
|
const { data } = await clientApi.delete(
|
|
5689
5824
|
`/self/transfers/${transferId}`
|
|
5690
5825
|
);
|
|
@@ -5702,9 +5837,10 @@ var useRejectTransfer = (params = {}, options = {}) => {
|
|
|
5702
5837
|
// src/mutations/self/useRemoveSelfDelegate.ts
|
|
5703
5838
|
var RemoveSelfDelegate = async ({
|
|
5704
5839
|
accountId,
|
|
5705
|
-
|
|
5840
|
+
clientApiParams,
|
|
5706
5841
|
queryClient
|
|
5707
5842
|
}) => {
|
|
5843
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5708
5844
|
const { data } = await clientApi.delete(
|
|
5709
5845
|
`/self/delegates/${accountId}`
|
|
5710
5846
|
);
|
|
@@ -5721,7 +5857,7 @@ var useRemoveSelfDelegate = (params = {}, options = {}) => {
|
|
|
5721
5857
|
var RemoveSelfEventListingSession = async ({
|
|
5722
5858
|
eventId,
|
|
5723
5859
|
sessionId,
|
|
5724
|
-
|
|
5860
|
+
clientApiParams,
|
|
5725
5861
|
queryClient,
|
|
5726
5862
|
locale = "en"
|
|
5727
5863
|
}) => {
|
|
@@ -5755,6 +5891,7 @@ var RemoveSelfEventListingSession = async ({
|
|
|
5755
5891
|
}
|
|
5756
5892
|
);
|
|
5757
5893
|
}
|
|
5894
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5758
5895
|
const { data } = await clientApi.delete(
|
|
5759
5896
|
`/self/events/listings/${eventId}/sessions/${sessionId}`
|
|
5760
5897
|
);
|
|
@@ -5768,7 +5905,7 @@ var useRemoveSelfEventListingSession = (params = {}, options = {}) => {
|
|
|
5768
5905
|
var RemoveSelfEventListingSpeaker = async ({
|
|
5769
5906
|
eventId,
|
|
5770
5907
|
speakerId,
|
|
5771
|
-
|
|
5908
|
+
clientApiParams,
|
|
5772
5909
|
queryClient,
|
|
5773
5910
|
locale = "en"
|
|
5774
5911
|
}) => {
|
|
@@ -5802,6 +5939,7 @@ var RemoveSelfEventListingSpeaker = async ({
|
|
|
5802
5939
|
}
|
|
5803
5940
|
);
|
|
5804
5941
|
}
|
|
5942
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5805
5943
|
const { data } = await clientApi.delete(
|
|
5806
5944
|
`/self/events/listings/${eventId}/speakers/${speakerId}`
|
|
5807
5945
|
);
|
|
@@ -5815,7 +5953,7 @@ var useRemoveSelfEventListingSpeaker = (params = {}, options = {}) => {
|
|
|
5815
5953
|
var RemoveSelfEventListingSponsor = async ({
|
|
5816
5954
|
eventId,
|
|
5817
5955
|
sponsorId,
|
|
5818
|
-
|
|
5956
|
+
clientApiParams,
|
|
5819
5957
|
queryClient,
|
|
5820
5958
|
locale = "en"
|
|
5821
5959
|
}) => {
|
|
@@ -5849,6 +5987,7 @@ var RemoveSelfEventListingSponsor = async ({
|
|
|
5849
5987
|
}
|
|
5850
5988
|
);
|
|
5851
5989
|
}
|
|
5990
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5852
5991
|
const { data } = await clientApi.delete(
|
|
5853
5992
|
`/self/events/listings/${eventId}/sponsors/${sponsorId}`
|
|
5854
5993
|
);
|
|
@@ -5862,9 +6001,10 @@ var useRemoveSelfEventListingSponsor = (params = {}, options = {}) => {
|
|
|
5862
6001
|
var RemoveSelfEventSession = async ({
|
|
5863
6002
|
eventId,
|
|
5864
6003
|
sessionId,
|
|
5865
|
-
|
|
6004
|
+
clientApiParams,
|
|
5866
6005
|
queryClient
|
|
5867
6006
|
}) => {
|
|
6007
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5868
6008
|
const { data } = await clientApi.delete(
|
|
5869
6009
|
`/self/events/${eventId}/sessions/${sessionId}`
|
|
5870
6010
|
);
|
|
@@ -5883,9 +6023,10 @@ var useRemoveSelfEventSession = (params = {}, options = {}) => {
|
|
|
5883
6023
|
var SelfCheckinRegistration = async ({
|
|
5884
6024
|
accountId,
|
|
5885
6025
|
eventId,
|
|
5886
|
-
|
|
6026
|
+
clientApiParams,
|
|
5887
6027
|
queryClient
|
|
5888
6028
|
}) => {
|
|
6029
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5889
6030
|
const { data } = await clientApi.post(
|
|
5890
6031
|
`/self/events/listings/${eventId}/registrations/${accountId}`
|
|
5891
6032
|
);
|
|
@@ -5969,7 +6110,7 @@ var SelfCreateActivity = async ({
|
|
|
5969
6110
|
activity,
|
|
5970
6111
|
base64Image,
|
|
5971
6112
|
videoUri,
|
|
5972
|
-
|
|
6113
|
+
clientApiParams,
|
|
5973
6114
|
queryClient,
|
|
5974
6115
|
locale = "en"
|
|
5975
6116
|
}) => {
|
|
@@ -5987,6 +6128,7 @@ var SelfCreateActivity = async ({
|
|
|
5987
6128
|
);
|
|
5988
6129
|
}
|
|
5989
6130
|
}
|
|
6131
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5990
6132
|
const { data } = await clientApi.post(
|
|
5991
6133
|
`/self/activities`,
|
|
5992
6134
|
{
|
|
@@ -6047,9 +6189,10 @@ var useSelfCreateActivity = (params = {}, options = {}) => {
|
|
|
6047
6189
|
// src/mutations/self/useSelfDeleteActivity.ts
|
|
6048
6190
|
var DeleteActivity = async ({
|
|
6049
6191
|
activityId,
|
|
6050
|
-
|
|
6192
|
+
clientApiParams,
|
|
6051
6193
|
queryClient
|
|
6052
6194
|
}) => {
|
|
6195
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
6053
6196
|
const { data } = await clientApi.delete(
|
|
6054
6197
|
`/self/activities/${activityId}`
|
|
6055
6198
|
);
|
|
@@ -6065,9 +6208,10 @@ var useDeleteActivity = (params = {}, options = {}) => {
|
|
|
6065
6208
|
// src/mutations/self/useSelfJoinCommunity.ts
|
|
6066
6209
|
var SelfJoinCommunity = async ({
|
|
6067
6210
|
communityId,
|
|
6068
|
-
|
|
6211
|
+
clientApiParams,
|
|
6069
6212
|
queryClient
|
|
6070
6213
|
}) => {
|
|
6214
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
6071
6215
|
const { data } = await clientApi.post(`/self/communities/${communityId}`);
|
|
6072
6216
|
if (queryClient && data.status === "ok") {
|
|
6073
6217
|
queryClient.invalidateQueries({
|
|
@@ -6092,9 +6236,10 @@ var useSelfJoinCommunity = (params = {}, options = {}) => {
|
|
|
6092
6236
|
// src/mutations/self/useSelfLeaveCommunity.ts
|
|
6093
6237
|
var SelfLeaveCommunity = async ({
|
|
6094
6238
|
communityId,
|
|
6095
|
-
|
|
6239
|
+
clientApiParams,
|
|
6096
6240
|
queryClient
|
|
6097
6241
|
}) => {
|
|
6242
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
6098
6243
|
const { data } = await clientApi.delete(
|
|
6099
6244
|
`/self/communities/${communityId}`
|
|
6100
6245
|
);
|
|
@@ -6122,7 +6267,7 @@ var useSelfLeaveCommunity = (params = {}, options = {}) => {
|
|
|
6122
6267
|
var SelfUpdateCommunityMembership = async ({
|
|
6123
6268
|
communityId,
|
|
6124
6269
|
membership,
|
|
6125
|
-
|
|
6270
|
+
clientApiParams,
|
|
6126
6271
|
queryClient,
|
|
6127
6272
|
locale = "en"
|
|
6128
6273
|
}) => {
|
|
@@ -6140,6 +6285,7 @@ var SelfUpdateCommunityMembership = async ({
|
|
|
6140
6285
|
}
|
|
6141
6286
|
);
|
|
6142
6287
|
}
|
|
6288
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
6143
6289
|
const { data } = await clientApi.put(`/self/communities/${communityId}`, membership);
|
|
6144
6290
|
return data;
|
|
6145
6291
|
};
|
|
@@ -6149,10 +6295,11 @@ var useSelfUpdateCommunityMembership = (params = {}, options = {}) => {
|
|
|
6149
6295
|
|
|
6150
6296
|
// src/mutations/self/useUpdateSelf.ts
|
|
6151
6297
|
var UpdateSelf = async ({
|
|
6152
|
-
|
|
6298
|
+
clientApiParams,
|
|
6153
6299
|
queryClient,
|
|
6154
6300
|
...params
|
|
6155
6301
|
}) => {
|
|
6302
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
6156
6303
|
const { data } = await clientApi.put(
|
|
6157
6304
|
`/self`,
|
|
6158
6305
|
params
|
|
@@ -6171,10 +6318,11 @@ var UpdateSelfEventListing = async ({
|
|
|
6171
6318
|
eventId,
|
|
6172
6319
|
event,
|
|
6173
6320
|
base64,
|
|
6174
|
-
|
|
6321
|
+
clientApiParams,
|
|
6175
6322
|
queryClient,
|
|
6176
6323
|
locale = "en"
|
|
6177
6324
|
}) => {
|
|
6325
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
6178
6326
|
const { data } = await clientApi.put(
|
|
6179
6327
|
`/self/events/listings/${eventId}`,
|
|
6180
6328
|
{
|
|
@@ -6207,10 +6355,11 @@ var UpdateSelfEventListingSession = async ({
|
|
|
6207
6355
|
eventId,
|
|
6208
6356
|
session,
|
|
6209
6357
|
sessionId,
|
|
6210
|
-
|
|
6358
|
+
clientApiParams,
|
|
6211
6359
|
queryClient,
|
|
6212
6360
|
locale = "en"
|
|
6213
6361
|
}) => {
|
|
6362
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
6214
6363
|
const { data } = await clientApi.put(
|
|
6215
6364
|
`/self/events/listings/${eventId}/sessions/${sessionId}`,
|
|
6216
6365
|
{
|
|
@@ -6259,10 +6408,11 @@ var UpdateSelfEventListingSpeaker = async ({
|
|
|
6259
6408
|
speaker,
|
|
6260
6409
|
speakerId,
|
|
6261
6410
|
buffer,
|
|
6262
|
-
|
|
6411
|
+
clientApiParams,
|
|
6263
6412
|
queryClient,
|
|
6264
6413
|
locale = "en"
|
|
6265
6414
|
}) => {
|
|
6415
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
6266
6416
|
const { data } = await clientApi.put(
|
|
6267
6417
|
`/self/events/listings/${eventId}/speakers/${speakerId}`,
|
|
6268
6418
|
{
|
|
@@ -6309,9 +6459,10 @@ var useUpdateSelfEventListingSpeaker = (params = {}, options = {}) => {
|
|
|
6309
6459
|
// src/mutations/self/useUpdateSelfImage.ts
|
|
6310
6460
|
var UpdateSelfImage = async ({
|
|
6311
6461
|
base64,
|
|
6312
|
-
|
|
6462
|
+
clientApiParams,
|
|
6313
6463
|
queryClient
|
|
6314
6464
|
}) => {
|
|
6465
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
6315
6466
|
const { data } = await clientApi.put(
|
|
6316
6467
|
`/self/image`,
|
|
6317
6468
|
{
|
|
@@ -6331,8 +6482,9 @@ var useUpdateSelfImage = (params = {}, options = {}) => {
|
|
|
6331
6482
|
var UpdateSelfLead = async ({
|
|
6332
6483
|
leadId,
|
|
6333
6484
|
note,
|
|
6334
|
-
|
|
6485
|
+
clientApiParams
|
|
6335
6486
|
}) => {
|
|
6487
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
6336
6488
|
const { data } = await clientApi.put(
|
|
6337
6489
|
`/self/leads/${leadId}`,
|
|
6338
6490
|
{
|
|
@@ -6347,7 +6499,7 @@ var useUpdateSelfLead = (params = {}, options = {}) => {
|
|
|
6347
6499
|
|
|
6348
6500
|
// src/mutations/self/useUpdateSelfNotificationPreferences.ts
|
|
6349
6501
|
var UpdateSelfNotificationPreferences = async ({
|
|
6350
|
-
|
|
6502
|
+
clientApiParams,
|
|
6351
6503
|
queryClient,
|
|
6352
6504
|
locale = "en",
|
|
6353
6505
|
...params
|
|
@@ -6365,6 +6517,7 @@ var UpdateSelfNotificationPreferences = async ({
|
|
|
6365
6517
|
}
|
|
6366
6518
|
);
|
|
6367
6519
|
}
|
|
6520
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
6368
6521
|
const { data } = await clientApi.put(`/self/notificationPreferences`, params);
|
|
6369
6522
|
return data;
|
|
6370
6523
|
};
|
|
@@ -6376,9 +6529,10 @@ var useUpdateSelfNotificationPreferences = (params = {}, options = {}) => {
|
|
|
6376
6529
|
var UpdateSelfPushDevice = async ({
|
|
6377
6530
|
pushDeviceId,
|
|
6378
6531
|
pushDevice,
|
|
6379
|
-
|
|
6532
|
+
clientApiParams,
|
|
6380
6533
|
queryClient
|
|
6381
6534
|
}) => {
|
|
6535
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
6382
6536
|
const { data } = await clientApi.put(
|
|
6383
6537
|
`/self/push-devices/${pushDeviceId}`,
|
|
6384
6538
|
{
|
|
@@ -6406,8 +6560,9 @@ var CreateSupportTicket = async ({
|
|
|
6406
6560
|
request,
|
|
6407
6561
|
eventId,
|
|
6408
6562
|
productId,
|
|
6409
|
-
|
|
6563
|
+
clientApiParams
|
|
6410
6564
|
}) => {
|
|
6565
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
6411
6566
|
const { data } = await clientApi.post(
|
|
6412
6567
|
"/supportTickets",
|
|
6413
6568
|
{
|
|
@@ -6428,8 +6583,9 @@ var useCreateSupportTicket = (params = {}, options = {}) => {
|
|
|
6428
6583
|
var CreateTeamAccount = async ({
|
|
6429
6584
|
name,
|
|
6430
6585
|
email,
|
|
6431
|
-
|
|
6586
|
+
clientApiParams
|
|
6432
6587
|
}) => {
|
|
6588
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
6433
6589
|
const { data } = await clientApi.post(
|
|
6434
6590
|
`/self/team`,
|
|
6435
6591
|
{
|
|
@@ -6541,6 +6697,7 @@ export {
|
|
|
6541
6697
|
GetActivityComments,
|
|
6542
6698
|
GetAdvertisement,
|
|
6543
6699
|
GetBenefits,
|
|
6700
|
+
GetClientAPI,
|
|
6544
6701
|
GetCommunities,
|
|
6545
6702
|
GetCommunity,
|
|
6546
6703
|
GetCommunityActivities,
|
|
@@ -6776,7 +6933,6 @@ export {
|
|
|
6776
6933
|
UpdateSelfNotificationPreferences,
|
|
6777
6934
|
UpdateSelfPushDevice,
|
|
6778
6935
|
UpdateSubscriptionPaymentMethod,
|
|
6779
|
-
getClientAPI,
|
|
6780
6936
|
isListing,
|
|
6781
6937
|
isManagedCoupon,
|
|
6782
6938
|
isSelf,
|
|
@@ -6826,7 +6982,6 @@ export {
|
|
|
6826
6982
|
useCancelSubscription,
|
|
6827
6983
|
useCancelTransfer,
|
|
6828
6984
|
useCaptureSelfEventRegistrationPayment,
|
|
6829
|
-
useClientAPI,
|
|
6830
6985
|
useCompleteEventActivation,
|
|
6831
6986
|
useConnectedXM,
|
|
6832
6987
|
useCreateCommunityAnnouncement,
|