@connectedxm/client 0.0.59 → 0.0.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +325 -320
- package/dist/index.d.ts +325 -320
- package/dist/index.js +503 -399
- package/dist/index.mjs +500 -394
- package/package.json +5 -2
package/dist/index.mjs
CHANGED
|
@@ -1,71 +1,36 @@
|
|
|
1
1
|
// src/ConnectedXMProvider.tsx
|
|
2
2
|
import React from "react";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import {
|
|
4
|
+
QueryClientProvider
|
|
5
|
+
} from "@tanstack/react-query";
|
|
6
|
+
var ConnectedXMClientContext = React.createContext({});
|
|
6
7
|
var ConnectedXMProvider = ({
|
|
8
|
+
queryClient,
|
|
7
9
|
children,
|
|
8
10
|
...state
|
|
9
11
|
}) => {
|
|
10
|
-
const [
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
setExecuteAs
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
children
|
|
24
|
-
);
|
|
12
|
+
const [ssr, setSSR] = React.useState(true);
|
|
13
|
+
React.useEffect(() => {
|
|
14
|
+
setSSR(false);
|
|
15
|
+
}, []);
|
|
16
|
+
const render = () => {
|
|
17
|
+
return /* @__PURE__ */ React.createElement(ConnectedXMClientContext.Provider, { value: state }, children);
|
|
18
|
+
};
|
|
19
|
+
if (ssr)
|
|
20
|
+
return /* @__PURE__ */ React.createElement(QueryClientProvider, { client: queryClient }, render());
|
|
21
|
+
return render();
|
|
25
22
|
};
|
|
26
23
|
|
|
27
24
|
// src/hooks/useConnectedXM.ts
|
|
28
25
|
import React2 from "react";
|
|
29
26
|
var useConnectedXM = () => {
|
|
30
|
-
const context = React2.useContext(
|
|
31
|
-
ConnectedXMClientContext
|
|
32
|
-
);
|
|
27
|
+
const context = React2.useContext(ConnectedXMClientContext);
|
|
33
28
|
if (!context) {
|
|
34
29
|
throw new Error("useConnectedXM must be used within a ConnectedXMProvider");
|
|
35
30
|
}
|
|
36
31
|
return context;
|
|
37
32
|
};
|
|
38
33
|
|
|
39
|
-
// src/hooks/useClientAPI.ts
|
|
40
|
-
import axios from "axios";
|
|
41
|
-
var getClientAPI = (apiUrl, organizationId, token, executeAs, locale) => {
|
|
42
|
-
return axios.create({
|
|
43
|
-
baseURL: apiUrl,
|
|
44
|
-
headers: {
|
|
45
|
-
authorization: token,
|
|
46
|
-
organization: organizationId,
|
|
47
|
-
executeAs,
|
|
48
|
-
locale
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
};
|
|
52
|
-
var useClientAPI = (locale) => {
|
|
53
|
-
const {
|
|
54
|
-
apiUrl,
|
|
55
|
-
token,
|
|
56
|
-
organizationId,
|
|
57
|
-
executeAs,
|
|
58
|
-
locale: _locale
|
|
59
|
-
} = useConnectedXM();
|
|
60
|
-
return getClientAPI(
|
|
61
|
-
apiUrl,
|
|
62
|
-
organizationId,
|
|
63
|
-
token,
|
|
64
|
-
executeAs,
|
|
65
|
-
locale || _locale
|
|
66
|
-
);
|
|
67
|
-
};
|
|
68
|
-
|
|
69
34
|
// src/interfaces.ts
|
|
70
35
|
var RegistrationStatus = /* @__PURE__ */ ((RegistrationStatus2) => {
|
|
71
36
|
RegistrationStatus2["registered"] = "registered";
|
|
@@ -323,10 +288,10 @@ var AppendInfiniteQuery = (queryClient, key, newData) => {
|
|
|
323
288
|
};
|
|
324
289
|
|
|
325
290
|
// src/utilities/GetErrorMessage.ts
|
|
326
|
-
import
|
|
291
|
+
import axios from "axios";
|
|
327
292
|
var GetErrorMessage = (error, fallback = "Something went wrong") => {
|
|
328
293
|
let message = fallback;
|
|
329
|
-
if (
|
|
294
|
+
if (axios.isAxiosError(error)) {
|
|
330
295
|
message = error.response?.data?.message || message;
|
|
331
296
|
} else {
|
|
332
297
|
message = error.message;
|
|
@@ -350,25 +315,33 @@ var GetBaseSingleQueryKeys = (locale) => {
|
|
|
350
315
|
return [locale];
|
|
351
316
|
};
|
|
352
317
|
var useConnectedSingleQuery = (queryKeys, queryFn, options) => {
|
|
353
|
-
const {
|
|
354
|
-
|
|
318
|
+
const {
|
|
319
|
+
locale,
|
|
320
|
+
onModuleForbidden,
|
|
321
|
+
onNotAuthorized,
|
|
322
|
+
onNotFound,
|
|
323
|
+
apiUrl,
|
|
324
|
+
organizationId,
|
|
325
|
+
getToken,
|
|
326
|
+
getExecuteAs
|
|
327
|
+
} = useConnectedXM();
|
|
355
328
|
return useQuery({
|
|
356
329
|
staleTime: 60 * 1e3,
|
|
357
330
|
// 60 Seconds
|
|
358
331
|
retry: (failureCount, error) => {
|
|
359
332
|
if (error.response?.status === 404) {
|
|
360
333
|
if (onNotFound)
|
|
361
|
-
onNotFound(error);
|
|
334
|
+
onNotFound(error, queryKeys);
|
|
362
335
|
return false;
|
|
363
336
|
}
|
|
364
337
|
if (error.response?.status === 403) {
|
|
365
338
|
if (onModuleForbidden)
|
|
366
|
-
onModuleForbidden(error);
|
|
339
|
+
onModuleForbidden(error, queryKeys);
|
|
367
340
|
return false;
|
|
368
341
|
}
|
|
369
342
|
if (error.response?.status === 401) {
|
|
370
343
|
if (onNotAuthorized)
|
|
371
|
-
onNotAuthorized(error);
|
|
344
|
+
onNotAuthorized(error, queryKeys);
|
|
372
345
|
return false;
|
|
373
346
|
}
|
|
374
347
|
if (failureCount < 3)
|
|
@@ -378,7 +351,13 @@ var useConnectedSingleQuery = (queryKeys, queryFn, options) => {
|
|
|
378
351
|
...options,
|
|
379
352
|
queryKey: [...queryKeys, ...GetBaseSingleQueryKeys(locale)],
|
|
380
353
|
queryFn: () => queryFn({
|
|
381
|
-
|
|
354
|
+
clientApiParams: {
|
|
355
|
+
apiUrl,
|
|
356
|
+
organizationId,
|
|
357
|
+
getToken,
|
|
358
|
+
getExecuteAs,
|
|
359
|
+
locale
|
|
360
|
+
}
|
|
382
361
|
})
|
|
383
362
|
});
|
|
384
363
|
};
|
|
@@ -455,8 +434,7 @@ var CacheIndividualQueries = (page, queryClient, queryKeyFn, locale = "en", item
|
|
|
455
434
|
|
|
456
435
|
// src/queries/useConnectedInfiniteQuery.ts
|
|
457
436
|
import {
|
|
458
|
-
useInfiniteQuery
|
|
459
|
-
useQueryClient
|
|
437
|
+
useInfiniteQuery
|
|
460
438
|
} from "@tanstack/react-query";
|
|
461
439
|
var GetBaseInfiniteQueryKeys = (locale, search = "") => {
|
|
462
440
|
return [locale, search];
|
|
@@ -468,9 +446,16 @@ var setFirstPageData = (response) => {
|
|
|
468
446
|
};
|
|
469
447
|
};
|
|
470
448
|
var useConnectedInfiniteQuery = (queryKeys, queryFn, params = {}, options) => {
|
|
471
|
-
const {
|
|
472
|
-
|
|
473
|
-
|
|
449
|
+
const {
|
|
450
|
+
locale,
|
|
451
|
+
onModuleForbidden,
|
|
452
|
+
onNotAuthorized,
|
|
453
|
+
onNotFound,
|
|
454
|
+
apiUrl,
|
|
455
|
+
getToken,
|
|
456
|
+
organizationId,
|
|
457
|
+
getExecuteAs
|
|
458
|
+
} = useConnectedXM();
|
|
474
459
|
const getNextPageParam = (lastPage, allPages) => {
|
|
475
460
|
if (lastPage.data.length === params.pageSize) {
|
|
476
461
|
return allPages.length + 1;
|
|
@@ -483,17 +468,17 @@ var useConnectedInfiniteQuery = (queryKeys, queryFn, params = {}, options) => {
|
|
|
483
468
|
retry: (failureCount, error) => {
|
|
484
469
|
if (error.response?.status === 404) {
|
|
485
470
|
if (onNotFound)
|
|
486
|
-
onNotFound(error);
|
|
471
|
+
onNotFound(error, queryKeys);
|
|
487
472
|
return false;
|
|
488
473
|
}
|
|
489
474
|
if (error.response?.status === 403) {
|
|
490
475
|
if (onModuleForbidden)
|
|
491
|
-
onModuleForbidden(error);
|
|
476
|
+
onModuleForbidden(error, queryKeys);
|
|
492
477
|
return false;
|
|
493
478
|
}
|
|
494
479
|
if (error.response?.status === 401) {
|
|
495
480
|
if (onNotAuthorized)
|
|
496
|
-
onNotAuthorized(error);
|
|
481
|
+
onNotAuthorized(error, queryKeys);
|
|
497
482
|
return false;
|
|
498
483
|
}
|
|
499
484
|
if (failureCount < 3)
|
|
@@ -505,12 +490,34 @@ var useConnectedInfiniteQuery = (queryKeys, queryFn, params = {}, options) => {
|
|
|
505
490
|
...queryKeys,
|
|
506
491
|
...GetBaseInfiniteQueryKeys(params?.locale || locale, params?.search)
|
|
507
492
|
],
|
|
508
|
-
queryFn: ({ pageParam }) => queryFn({ ...params, pageSize: params.pageSize || 25, locale: params.locale || locale, pageParam,
|
|
493
|
+
queryFn: ({ pageParam }) => queryFn({ ...params, pageSize: params.pageSize || 25, locale: params.locale || locale, pageParam, clientApiParams: {
|
|
494
|
+
apiUrl,
|
|
495
|
+
getToken,
|
|
496
|
+
organizationId,
|
|
497
|
+
getExecuteAs,
|
|
498
|
+
locale
|
|
499
|
+
} }),
|
|
509
500
|
initialPageParam: 1,
|
|
510
501
|
getNextPageParam
|
|
511
502
|
});
|
|
512
503
|
};
|
|
513
504
|
|
|
505
|
+
// src/ClientAPI.ts
|
|
506
|
+
import axios2 from "axios";
|
|
507
|
+
var GetClientAPI = async (params) => {
|
|
508
|
+
const token = await params.getToken();
|
|
509
|
+
const executeAs = params.getExecuteAs ? await params.getExecuteAs() : void 0;
|
|
510
|
+
return axios2.create({
|
|
511
|
+
baseURL: params.apiUrl,
|
|
512
|
+
headers: {
|
|
513
|
+
organization: params.organizationId,
|
|
514
|
+
locale: params.locale,
|
|
515
|
+
authorization: token,
|
|
516
|
+
executeAs
|
|
517
|
+
}
|
|
518
|
+
});
|
|
519
|
+
};
|
|
520
|
+
|
|
514
521
|
// src/queries/accounts/useGetAccounts.ts
|
|
515
522
|
var ACCOUNTS_QUERY_KEY = () => ["ACCOUNTS"];
|
|
516
523
|
var SET_ACCOUNTS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
|
|
@@ -527,9 +534,10 @@ var GetAccounts = async ({
|
|
|
527
534
|
orderBy,
|
|
528
535
|
search,
|
|
529
536
|
queryClient,
|
|
530
|
-
|
|
537
|
+
clientApiParams,
|
|
531
538
|
locale
|
|
532
539
|
}) => {
|
|
540
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
533
541
|
const { data } = await clientApi.get(`/accounts`, {
|
|
534
542
|
params: {
|
|
535
543
|
pageSize: pageSize || void 0,
|
|
@@ -548,14 +556,12 @@ var GetAccounts = async ({
|
|
|
548
556
|
return data;
|
|
549
557
|
};
|
|
550
558
|
var useGetAccounts = (params = {}, options = {}) => {
|
|
551
|
-
const { token } = useConnectedXM();
|
|
552
559
|
return useConnectedInfiniteQuery(
|
|
553
560
|
ACCOUNTS_QUERY_KEY(),
|
|
554
561
|
(params2) => GetAccounts({ ...params2 }),
|
|
555
562
|
params,
|
|
556
563
|
{
|
|
557
|
-
...options
|
|
558
|
-
enabled: !!token && (options?.enabled ?? true)
|
|
564
|
+
...options
|
|
559
565
|
}
|
|
560
566
|
);
|
|
561
567
|
};
|
|
@@ -576,19 +582,19 @@ var SET_ACCOUNT_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) =>
|
|
|
576
582
|
};
|
|
577
583
|
var GetAccount = async ({
|
|
578
584
|
accountId,
|
|
579
|
-
|
|
585
|
+
clientApiParams
|
|
580
586
|
}) => {
|
|
587
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
581
588
|
const { data } = await clientApi.get(`/accounts/${accountId}`);
|
|
582
589
|
return data;
|
|
583
590
|
};
|
|
584
|
-
var useGetAccount = (accountId, options = {}) => {
|
|
585
|
-
const { token } = useConnectedXM();
|
|
591
|
+
var useGetAccount = (accountId = "", options = {}) => {
|
|
586
592
|
return useConnectedSingleQuery(
|
|
587
593
|
ACCOUNT_QUERY_KEY(accountId),
|
|
588
594
|
(_params) => GetAccount({ accountId, ..._params }),
|
|
589
595
|
{
|
|
590
596
|
...options,
|
|
591
|
-
enabled: !!
|
|
597
|
+
enabled: !!accountId && (options?.enabled ?? true)
|
|
592
598
|
}
|
|
593
599
|
);
|
|
594
600
|
};
|
|
@@ -610,9 +616,10 @@ var GetActivities = async ({
|
|
|
610
616
|
orderBy,
|
|
611
617
|
search,
|
|
612
618
|
queryClient,
|
|
613
|
-
|
|
619
|
+
clientApiParams,
|
|
614
620
|
locale
|
|
615
621
|
}) => {
|
|
622
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
616
623
|
const { data } = await clientApi.get(`/activities`, {
|
|
617
624
|
params: {
|
|
618
625
|
page: pageParam || void 0,
|
|
@@ -632,13 +639,12 @@ var GetActivities = async ({
|
|
|
632
639
|
return data;
|
|
633
640
|
};
|
|
634
641
|
var useGetActivities = (params = {}, options = {}) => {
|
|
635
|
-
const { token } = useConnectedXM();
|
|
636
642
|
return useConnectedInfiniteQuery(
|
|
637
643
|
ACTIVITIES_QUERY_KEY(),
|
|
638
644
|
(params2) => GetActivities(params2),
|
|
639
645
|
params,
|
|
640
646
|
{
|
|
641
|
-
|
|
647
|
+
...options
|
|
642
648
|
}
|
|
643
649
|
);
|
|
644
650
|
};
|
|
@@ -659,19 +665,19 @@ var SET_ACTIVITY_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) =
|
|
|
659
665
|
};
|
|
660
666
|
var GetActivity = async ({
|
|
661
667
|
activityId,
|
|
662
|
-
|
|
668
|
+
clientApiParams
|
|
663
669
|
}) => {
|
|
670
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
664
671
|
const { data } = await clientApi.get(`/activities/${activityId}`);
|
|
665
672
|
return data;
|
|
666
673
|
};
|
|
667
|
-
var useGetActivity = (activityId, options = {}) => {
|
|
668
|
-
const { token } = useConnectedXM();
|
|
674
|
+
var useGetActivity = (activityId = "", options = {}) => {
|
|
669
675
|
return useConnectedSingleQuery(
|
|
670
676
|
ACTIVITY_QUERY_KEY(activityId),
|
|
671
677
|
(params) => GetActivity({ activityId: activityId || "unknown", ...params }),
|
|
672
678
|
{
|
|
673
679
|
...options,
|
|
674
|
-
enabled: !!
|
|
680
|
+
enabled: !!activityId && (options?.enabled ?? true)
|
|
675
681
|
}
|
|
676
682
|
);
|
|
677
683
|
};
|
|
@@ -697,9 +703,10 @@ var GetAccountActivities = async ({
|
|
|
697
703
|
search,
|
|
698
704
|
accountId,
|
|
699
705
|
queryClient,
|
|
700
|
-
|
|
706
|
+
clientApiParams,
|
|
701
707
|
locale
|
|
702
708
|
}) => {
|
|
709
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
703
710
|
const { data } = await clientApi.get(`/accounts/${accountId}/activities`, {
|
|
704
711
|
params: {
|
|
705
712
|
page: pageParam || void 0,
|
|
@@ -718,15 +725,14 @@ var GetAccountActivities = async ({
|
|
|
718
725
|
}
|
|
719
726
|
return data;
|
|
720
727
|
};
|
|
721
|
-
var useGetAccountActivities = (accountId, params = {}, options = {}) => {
|
|
722
|
-
const { token } = useConnectedXM();
|
|
728
|
+
var useGetAccountActivities = (accountId = "", params = {}, options = {}) => {
|
|
723
729
|
return useConnectedInfiniteQuery(
|
|
724
730
|
ACCOUNT_ACTIVITIES_QUERY_KEY(accountId),
|
|
725
731
|
(params2) => GetAccountActivities({ accountId, ...params2 }),
|
|
726
732
|
params,
|
|
727
733
|
{
|
|
728
734
|
...options,
|
|
729
|
-
enabled: !!
|
|
735
|
+
enabled: !!accountId
|
|
730
736
|
}
|
|
731
737
|
);
|
|
732
738
|
};
|
|
@@ -744,19 +750,19 @@ var SET_ACCOUNT_BY_SHARE_CODE_QUERY_DATA = (client, keyParams, response, baseKey
|
|
|
744
750
|
};
|
|
745
751
|
var GetAccountByShareCode = async ({
|
|
746
752
|
shareCode,
|
|
747
|
-
|
|
753
|
+
clientApiParams
|
|
748
754
|
}) => {
|
|
755
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
749
756
|
const { data } = await clientApi.get(`/accounts/shareCode/${shareCode}`);
|
|
750
757
|
return data;
|
|
751
758
|
};
|
|
752
|
-
var useGetAccountByShareCode = (shareCode, options = {}) => {
|
|
753
|
-
const { token } = useConnectedXM();
|
|
759
|
+
var useGetAccountByShareCode = (shareCode = "", options = {}) => {
|
|
754
760
|
return useConnectedSingleQuery(
|
|
755
761
|
ACCOUNT_BY_SHARE_CODE_QUERY_KEY(shareCode),
|
|
756
762
|
(params) => GetAccountByShareCode({ shareCode: shareCode || "unknown", ...params }),
|
|
757
763
|
{
|
|
758
764
|
...options,
|
|
759
|
-
enabled: !!
|
|
765
|
+
enabled: !!shareCode && (options?.enabled ?? true),
|
|
760
766
|
retry: false
|
|
761
767
|
}
|
|
762
768
|
);
|
|
@@ -780,7 +786,7 @@ var GetCommunities = async ({
|
|
|
780
786
|
search,
|
|
781
787
|
privateCommunities,
|
|
782
788
|
queryClient,
|
|
783
|
-
|
|
789
|
+
clientApiParams,
|
|
784
790
|
locale
|
|
785
791
|
}) => {
|
|
786
792
|
if (privateCommunities) {
|
|
@@ -790,6 +796,7 @@ var GetCommunities = async ({
|
|
|
790
796
|
data: []
|
|
791
797
|
};
|
|
792
798
|
}
|
|
799
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
793
800
|
const { data } = await clientApi.get(`/communities`, {
|
|
794
801
|
params: {
|
|
795
802
|
page: pageParam || void 0,
|
|
@@ -835,12 +842,13 @@ var SET_COMMUNITY_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"],
|
|
|
835
842
|
};
|
|
836
843
|
var GetCommunity = async ({
|
|
837
844
|
communityId,
|
|
838
|
-
|
|
845
|
+
clientApiParams
|
|
839
846
|
}) => {
|
|
847
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
840
848
|
const { data } = await clientApi.get(`/communities/${communityId}`);
|
|
841
849
|
return data;
|
|
842
850
|
};
|
|
843
|
-
var useGetCommunity = (communityId, options = {}) => {
|
|
851
|
+
var useGetCommunity = (communityId = "", options = {}) => {
|
|
844
852
|
return useConnectedSingleQuery(
|
|
845
853
|
COMMUNITY_QUERY_KEY(communityId),
|
|
846
854
|
(params) => GetCommunity({ communityId, ...params }),
|
|
@@ -872,9 +880,10 @@ var GetAccountCommunities = async ({
|
|
|
872
880
|
search,
|
|
873
881
|
accountId,
|
|
874
882
|
queryClient,
|
|
875
|
-
|
|
883
|
+
clientApiParams,
|
|
876
884
|
locale
|
|
877
885
|
}) => {
|
|
886
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
878
887
|
const { data } = await clientApi.get(`/accounts/${accountId}/communities`, {
|
|
879
888
|
params: {
|
|
880
889
|
page: pageParam || void 0,
|
|
@@ -893,15 +902,14 @@ var GetAccountCommunities = async ({
|
|
|
893
902
|
}
|
|
894
903
|
return data;
|
|
895
904
|
};
|
|
896
|
-
var useGetAccountCommunities = (accountId, params = {}, options = {}) => {
|
|
897
|
-
const { token } = useConnectedXM();
|
|
905
|
+
var useGetAccountCommunities = (accountId = "", params = {}, options = {}) => {
|
|
898
906
|
return useConnectedInfiniteQuery(
|
|
899
907
|
ACCOUNT_COMMUNITIES_QUERY_KEY(accountId),
|
|
900
908
|
(params2) => GetAccountCommunities({ accountId, ...params2 }),
|
|
901
909
|
params,
|
|
902
910
|
{
|
|
903
911
|
...options,
|
|
904
|
-
enabled: !!
|
|
912
|
+
enabled: !!accountId && (options?.enabled ?? true)
|
|
905
913
|
}
|
|
906
914
|
);
|
|
907
915
|
};
|
|
@@ -927,9 +935,10 @@ var GetAccountFollowers = async ({
|
|
|
927
935
|
search,
|
|
928
936
|
accountId,
|
|
929
937
|
queryClient,
|
|
930
|
-
|
|
938
|
+
clientApiParams,
|
|
931
939
|
locale
|
|
932
940
|
}) => {
|
|
941
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
933
942
|
const { data } = await clientApi.get(`/accounts/${accountId}/followers`, {
|
|
934
943
|
params: {
|
|
935
944
|
page: pageParam || void 0,
|
|
@@ -948,15 +957,14 @@ var GetAccountFollowers = async ({
|
|
|
948
957
|
}
|
|
949
958
|
return data;
|
|
950
959
|
};
|
|
951
|
-
var useGetAccountFollowers = (accountId, params = {}, options = {}) => {
|
|
952
|
-
const { token } = useConnectedXM();
|
|
960
|
+
var useGetAccountFollowers = (accountId = "", params = {}, options = {}) => {
|
|
953
961
|
return useConnectedInfiniteQuery(
|
|
954
962
|
ACCOUNT_FOLLOWERS_QUERY_KEY(accountId),
|
|
955
963
|
(params2) => GetAccountFollowers({ accountId, ...params2 }),
|
|
956
964
|
params,
|
|
957
965
|
{
|
|
958
966
|
...options,
|
|
959
|
-
enabled: !!
|
|
967
|
+
enabled: !!accountId && (options?.enabled ?? true)
|
|
960
968
|
}
|
|
961
969
|
);
|
|
962
970
|
};
|
|
@@ -982,9 +990,10 @@ var GetAccountFollowings = async ({
|
|
|
982
990
|
search,
|
|
983
991
|
accountId,
|
|
984
992
|
queryClient,
|
|
985
|
-
|
|
993
|
+
clientApiParams,
|
|
986
994
|
locale
|
|
987
995
|
}) => {
|
|
996
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
988
997
|
const { data } = await clientApi.get(`/accounts/${accountId}/following`, {
|
|
989
998
|
params: {
|
|
990
999
|
page: pageParam || void 0,
|
|
@@ -1003,15 +1012,14 @@ var GetAccountFollowings = async ({
|
|
|
1003
1012
|
}
|
|
1004
1013
|
return data;
|
|
1005
1014
|
};
|
|
1006
|
-
var useGetAccountFollowings = (accountId, params = {}, options = {}) => {
|
|
1007
|
-
const { token } = useConnectedXM();
|
|
1015
|
+
var useGetAccountFollowings = (accountId = "", params = {}, options = {}) => {
|
|
1008
1016
|
return useConnectedInfiniteQuery(
|
|
1009
1017
|
ACCOUNT_FOLLOWINGS_QUERY_KEY(accountId),
|
|
1010
1018
|
(params2) => GetAccountFollowings({ accountId, ...params2 }),
|
|
1011
1019
|
params,
|
|
1012
1020
|
{
|
|
1013
1021
|
...options,
|
|
1014
|
-
enabled: !!
|
|
1022
|
+
enabled: !!accountId && (options?.enabled ?? true)
|
|
1015
1023
|
}
|
|
1016
1024
|
);
|
|
1017
1025
|
};
|
|
@@ -1037,9 +1045,10 @@ var GetActivityComments = async ({
|
|
|
1037
1045
|
orderBy,
|
|
1038
1046
|
search,
|
|
1039
1047
|
queryClient,
|
|
1040
|
-
|
|
1048
|
+
clientApiParams,
|
|
1041
1049
|
locale
|
|
1042
1050
|
}) => {
|
|
1051
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1043
1052
|
const { data } = await clientApi.get(`/activities/${activityId}/comments`, {
|
|
1044
1053
|
params: {
|
|
1045
1054
|
page: pageParam || void 0,
|
|
@@ -1058,14 +1067,13 @@ var GetActivityComments = async ({
|
|
|
1058
1067
|
}
|
|
1059
1068
|
return data;
|
|
1060
1069
|
};
|
|
1061
|
-
var useGetActivityComments = (activityId, params = {}, options = {}) => {
|
|
1062
|
-
const { token } = useConnectedXM();
|
|
1070
|
+
var useGetActivityComments = (activityId = "", params = {}, options = {}) => {
|
|
1063
1071
|
return useConnectedInfiniteQuery(
|
|
1064
1072
|
ACTIVITY_COMMENTS_QUERY_KEY(activityId),
|
|
1065
1073
|
(params2) => GetActivityComments({ activityId, ...params2 }),
|
|
1066
1074
|
params,
|
|
1067
1075
|
{
|
|
1068
|
-
enabled: !!
|
|
1076
|
+
enabled: !!activityId && (options?.enabled ?? true)
|
|
1069
1077
|
}
|
|
1070
1078
|
);
|
|
1071
1079
|
};
|
|
@@ -1085,8 +1093,9 @@ var SET_ADVERTISEMENT_QUERY_DATA = (client, keyParams, response, baseKeys = ["en
|
|
|
1085
1093
|
);
|
|
1086
1094
|
};
|
|
1087
1095
|
var GetAdvertisement = async ({
|
|
1088
|
-
|
|
1096
|
+
clientApiParams
|
|
1089
1097
|
}) => {
|
|
1098
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1090
1099
|
const { data } = await clientApi.get(`/advertisement`);
|
|
1091
1100
|
return data;
|
|
1092
1101
|
};
|
|
@@ -1117,8 +1126,9 @@ var GetBenefits = async ({
|
|
|
1117
1126
|
pageSize,
|
|
1118
1127
|
orderBy,
|
|
1119
1128
|
search,
|
|
1120
|
-
|
|
1129
|
+
clientApiParams
|
|
1121
1130
|
}) => {
|
|
1131
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1122
1132
|
const { data } = await clientApi.get(`/benefits`, {
|
|
1123
1133
|
params: {
|
|
1124
1134
|
page: pageParam || void 0,
|
|
@@ -1130,14 +1140,12 @@ var GetBenefits = async ({
|
|
|
1130
1140
|
return data;
|
|
1131
1141
|
};
|
|
1132
1142
|
var useGetBenefits = (params = {}, options = {}) => {
|
|
1133
|
-
const { token } = useConnectedXM();
|
|
1134
1143
|
return useConnectedInfiniteQuery(
|
|
1135
1144
|
BENEFITS_QUERY_KEY(),
|
|
1136
1145
|
(params2) => GetBenefits(params2),
|
|
1137
1146
|
params,
|
|
1138
1147
|
{
|
|
1139
|
-
...options
|
|
1140
|
-
enabled: !!token && (options?.enabled ?? true)
|
|
1148
|
+
...options
|
|
1141
1149
|
}
|
|
1142
1150
|
);
|
|
1143
1151
|
};
|
|
@@ -1160,9 +1168,10 @@ var GetCommunityActivities = async ({
|
|
|
1160
1168
|
search,
|
|
1161
1169
|
communityId,
|
|
1162
1170
|
queryClient,
|
|
1163
|
-
|
|
1171
|
+
clientApiParams,
|
|
1164
1172
|
locale
|
|
1165
1173
|
}) => {
|
|
1174
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1166
1175
|
const { data } = await clientApi.get(
|
|
1167
1176
|
`/communities/${communityId}/activities`,
|
|
1168
1177
|
{
|
|
@@ -1184,15 +1193,14 @@ var GetCommunityActivities = async ({
|
|
|
1184
1193
|
}
|
|
1185
1194
|
return data;
|
|
1186
1195
|
};
|
|
1187
|
-
var useGetCommunityActivities = (communityId, params = {}, options = {}) => {
|
|
1188
|
-
const { token } = useConnectedXM();
|
|
1196
|
+
var useGetCommunityActivities = (communityId = "", params = {}, options = {}) => {
|
|
1189
1197
|
return useConnectedInfiniteQuery(
|
|
1190
1198
|
COMMUNITY_ACTIVITIES_QUERY_KEY(communityId),
|
|
1191
1199
|
(params2) => GetCommunityActivities({ communityId, ...params2 }),
|
|
1192
1200
|
params,
|
|
1193
1201
|
{
|
|
1194
1202
|
...options,
|
|
1195
|
-
enabled: !!
|
|
1203
|
+
enabled: !!communityId && (options?.enabled ?? true)
|
|
1196
1204
|
}
|
|
1197
1205
|
);
|
|
1198
1206
|
};
|
|
@@ -1214,8 +1222,9 @@ var GetCommunityAnnouncements = async ({
|
|
|
1214
1222
|
pageSize,
|
|
1215
1223
|
orderBy,
|
|
1216
1224
|
search,
|
|
1217
|
-
|
|
1225
|
+
clientApiParams
|
|
1218
1226
|
}) => {
|
|
1227
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1219
1228
|
const { data } = await clientApi.get(
|
|
1220
1229
|
`/communities/${communityId}/announcements`,
|
|
1221
1230
|
{
|
|
@@ -1229,15 +1238,14 @@ var GetCommunityAnnouncements = async ({
|
|
|
1229
1238
|
);
|
|
1230
1239
|
return data;
|
|
1231
1240
|
};
|
|
1232
|
-
var useGetCommunityAnnouncements = (communityId, params = {}, options = {}) => {
|
|
1233
|
-
const { token } = useConnectedXM();
|
|
1241
|
+
var useGetCommunityAnnouncements = (communityId = "", params = {}, options = {}) => {
|
|
1234
1242
|
return useConnectedInfiniteQuery(
|
|
1235
1243
|
COMMUNITY_ANNOUNCEMENTS_QUERY_KEY(communityId),
|
|
1236
1244
|
(params2) => GetCommunityAnnouncements({ communityId, ...params2 }),
|
|
1237
1245
|
params,
|
|
1238
1246
|
{
|
|
1239
1247
|
...options,
|
|
1240
|
-
enabled: !!
|
|
1248
|
+
enabled: !!communityId && (options?.enabled ?? true)
|
|
1241
1249
|
}
|
|
1242
1250
|
);
|
|
1243
1251
|
};
|
|
@@ -1266,9 +1274,10 @@ var GetEvents = async ({
|
|
|
1266
1274
|
search,
|
|
1267
1275
|
past,
|
|
1268
1276
|
queryClient,
|
|
1269
|
-
|
|
1277
|
+
clientApiParams,
|
|
1270
1278
|
locale
|
|
1271
1279
|
}) => {
|
|
1280
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1272
1281
|
const { data } = await clientApi.get(`/events`, {
|
|
1273
1282
|
params: {
|
|
1274
1283
|
page: pageParam || void 0,
|
|
@@ -1310,12 +1319,13 @@ var SET_EVENT_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
|
|
|
1310
1319
|
};
|
|
1311
1320
|
var GetEvent = async ({
|
|
1312
1321
|
eventId,
|
|
1313
|
-
|
|
1322
|
+
clientApiParams
|
|
1314
1323
|
}) => {
|
|
1324
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1315
1325
|
const { data } = await clientApi.get(`/events/${eventId}`);
|
|
1316
1326
|
return data;
|
|
1317
1327
|
};
|
|
1318
|
-
var useGetEvent = (eventId, options = {}) => {
|
|
1328
|
+
var useGetEvent = (eventId = "", options = {}) => {
|
|
1319
1329
|
return useConnectedSingleQuery(
|
|
1320
1330
|
EVENT_QUERY_KEY(eventId),
|
|
1321
1331
|
(params) => GetEvent({ eventId, ...params }),
|
|
@@ -1349,9 +1359,10 @@ var GetCommunityEvents = async ({
|
|
|
1349
1359
|
communityId,
|
|
1350
1360
|
past,
|
|
1351
1361
|
queryClient,
|
|
1352
|
-
|
|
1362
|
+
clientApiParams,
|
|
1353
1363
|
locale
|
|
1354
1364
|
}) => {
|
|
1365
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1355
1366
|
const { data } = await clientApi.get(`/communities/${communityId}/events`, {
|
|
1356
1367
|
params: {
|
|
1357
1368
|
page: pageParam || void 0,
|
|
@@ -1371,7 +1382,7 @@ var GetCommunityEvents = async ({
|
|
|
1371
1382
|
}
|
|
1372
1383
|
return data;
|
|
1373
1384
|
};
|
|
1374
|
-
var useGetCommunityEvents = (communityId, past = false, params = {}, options = {}) => {
|
|
1385
|
+
var useGetCommunityEvents = (communityId = "", past = false, params = {}, options = {}) => {
|
|
1375
1386
|
return useConnectedInfiniteQuery(
|
|
1376
1387
|
COMMUNITY_EVENTS_QUERY_KEY(communityId, past),
|
|
1377
1388
|
(params2) => GetCommunityEvents({ communityId, past, ...params2 }),
|
|
@@ -1403,8 +1414,9 @@ var GetCommunityMembers = async ({
|
|
|
1403
1414
|
orderBy,
|
|
1404
1415
|
search,
|
|
1405
1416
|
communityId,
|
|
1406
|
-
|
|
1417
|
+
clientApiParams
|
|
1407
1418
|
}) => {
|
|
1419
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1408
1420
|
const { data } = await clientApi.get(`/communities/${communityId}/members`, {
|
|
1409
1421
|
params: {
|
|
1410
1422
|
page: pageParam || void 0,
|
|
@@ -1415,15 +1427,14 @@ var GetCommunityMembers = async ({
|
|
|
1415
1427
|
});
|
|
1416
1428
|
return data;
|
|
1417
1429
|
};
|
|
1418
|
-
var useGetCommunityMembers = (communityId, params = {}, options = {}) => {
|
|
1419
|
-
const { token } = useConnectedXM();
|
|
1430
|
+
var useGetCommunityMembers = (communityId = "", params = {}, options = {}) => {
|
|
1420
1431
|
return useConnectedInfiniteQuery(
|
|
1421
1432
|
COMMUNITY_MEMBERS_QUERY_KEY(communityId),
|
|
1422
1433
|
(params2) => GetCommunityMembers({ communityId, ...params2 }),
|
|
1423
1434
|
params,
|
|
1424
1435
|
{
|
|
1425
1436
|
...options,
|
|
1426
|
-
enabled: !!
|
|
1437
|
+
enabled: !!communityId && (options?.enabled ?? true)
|
|
1427
1438
|
}
|
|
1428
1439
|
);
|
|
1429
1440
|
};
|
|
@@ -1445,8 +1456,9 @@ var GetCommunityModerators = async ({
|
|
|
1445
1456
|
orderBy,
|
|
1446
1457
|
search,
|
|
1447
1458
|
communityId,
|
|
1448
|
-
|
|
1459
|
+
clientApiParams
|
|
1449
1460
|
}) => {
|
|
1461
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1450
1462
|
const { data } = await clientApi.get(
|
|
1451
1463
|
`/communities/${communityId}/moderators`,
|
|
1452
1464
|
{
|
|
@@ -1460,15 +1472,14 @@ var GetCommunityModerators = async ({
|
|
|
1460
1472
|
);
|
|
1461
1473
|
return data;
|
|
1462
1474
|
};
|
|
1463
|
-
var useGetCommunityModerators = (communityId, params = {}, options = {}) => {
|
|
1464
|
-
const { token } = useConnectedXM();
|
|
1475
|
+
var useGetCommunityModerators = (communityId = "", params = {}, options = {}) => {
|
|
1465
1476
|
return useConnectedInfiniteQuery(
|
|
1466
1477
|
COMMUNITY_MODERATORS_QUERY_KEY(communityId),
|
|
1467
1478
|
(params2) => GetCommunityModerators({ communityId, ...params2 }),
|
|
1468
1479
|
params,
|
|
1469
1480
|
{
|
|
1470
1481
|
...options,
|
|
1471
|
-
enabled: !!
|
|
1482
|
+
enabled: !!communityId && (options?.enabled ?? true)
|
|
1472
1483
|
}
|
|
1473
1484
|
);
|
|
1474
1485
|
};
|
|
@@ -1489,8 +1500,9 @@ var GetSponsors = async ({
|
|
|
1489
1500
|
pageSize,
|
|
1490
1501
|
orderBy,
|
|
1491
1502
|
search,
|
|
1492
|
-
|
|
1503
|
+
clientApiParams
|
|
1493
1504
|
}) => {
|
|
1505
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1494
1506
|
const { data } = await clientApi.get(`/sponsors`, {
|
|
1495
1507
|
params: {
|
|
1496
1508
|
page: pageParam || void 0,
|
|
@@ -1526,12 +1538,13 @@ var SET_SPONSOR_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) =>
|
|
|
1526
1538
|
};
|
|
1527
1539
|
var GetSponsor = async ({
|
|
1528
1540
|
accountId,
|
|
1529
|
-
|
|
1541
|
+
clientApiParams
|
|
1530
1542
|
}) => {
|
|
1543
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1531
1544
|
const { data } = await clientApi.get(`/sponsors/${accountId}`);
|
|
1532
1545
|
return data;
|
|
1533
1546
|
};
|
|
1534
|
-
var useGetSponsor = (accountId, options = {}) => {
|
|
1547
|
+
var useGetSponsor = (accountId = "", options = {}) => {
|
|
1535
1548
|
return useConnectedSingleQuery_default(
|
|
1536
1549
|
SPONSOR_QUERY_KEY(accountId),
|
|
1537
1550
|
(params) => GetSponsor({ accountId, ...params }),
|
|
@@ -1563,9 +1576,10 @@ var GetCommunitySponsors = async ({
|
|
|
1563
1576
|
search,
|
|
1564
1577
|
communityId,
|
|
1565
1578
|
queryClient,
|
|
1566
|
-
|
|
1579
|
+
clientApiParams,
|
|
1567
1580
|
locale
|
|
1568
1581
|
}) => {
|
|
1582
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1569
1583
|
const { data } = await clientApi.get(`/communities/${communityId}/sponsors`, {
|
|
1570
1584
|
params: {
|
|
1571
1585
|
page: pageParam || void 0,
|
|
@@ -1584,7 +1598,7 @@ var GetCommunitySponsors = async ({
|
|
|
1584
1598
|
}
|
|
1585
1599
|
return data;
|
|
1586
1600
|
};
|
|
1587
|
-
var useGetCommunitySponsors = (communityId, params = {}, options = {}) => {
|
|
1601
|
+
var useGetCommunitySponsors = (communityId = "", params = {}, options = {}) => {
|
|
1588
1602
|
return useConnectedInfiniteQuery(
|
|
1589
1603
|
COMMUNITY_SPONSORS_QUERY_KEY(communityId),
|
|
1590
1604
|
(params2) => GetCommunitySponsors({ communityId, ...params2 }),
|
|
@@ -1613,9 +1627,10 @@ var GetContents = async ({
|
|
|
1613
1627
|
orderBy,
|
|
1614
1628
|
search,
|
|
1615
1629
|
queryClient,
|
|
1616
|
-
|
|
1630
|
+
clientApiParams,
|
|
1617
1631
|
locale
|
|
1618
1632
|
}) => {
|
|
1633
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1619
1634
|
const { data } = await clientApi.get(`/contents`, {
|
|
1620
1635
|
params: {
|
|
1621
1636
|
page: pageParam || void 0,
|
|
@@ -1659,12 +1674,13 @@ var SET_CONTENT_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) =>
|
|
|
1659
1674
|
};
|
|
1660
1675
|
var GetContent = async ({
|
|
1661
1676
|
contentId,
|
|
1662
|
-
|
|
1677
|
+
clientApiParams
|
|
1663
1678
|
}) => {
|
|
1679
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1664
1680
|
const { data } = await clientApi.get(`/contents/${contentId}`);
|
|
1665
1681
|
return data;
|
|
1666
1682
|
};
|
|
1667
|
-
var useGetContent = (contentId, options = {}) => {
|
|
1683
|
+
var useGetContent = (contentId = "", options = {}) => {
|
|
1668
1684
|
return useConnectedSingleQuery_default(
|
|
1669
1685
|
CONTENT_QUERY_KEY(contentId),
|
|
1670
1686
|
(params) => GetContent({ contentId: contentId || "", ...params }),
|
|
@@ -1696,9 +1712,10 @@ var GetContentActivities = async ({
|
|
|
1696
1712
|
search,
|
|
1697
1713
|
contentId,
|
|
1698
1714
|
queryClient,
|
|
1699
|
-
|
|
1715
|
+
clientApiParams,
|
|
1700
1716
|
locale
|
|
1701
1717
|
}) => {
|
|
1718
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1702
1719
|
const { data } = await clientApi.get(`/contents/${contentId}/activities`, {
|
|
1703
1720
|
params: {
|
|
1704
1721
|
page: pageParam || void 0,
|
|
@@ -1717,15 +1734,14 @@ var GetContentActivities = async ({
|
|
|
1717
1734
|
}
|
|
1718
1735
|
return data;
|
|
1719
1736
|
};
|
|
1720
|
-
var useGetContentActivities = (contentId, params = {}, options = {}) => {
|
|
1721
|
-
const { token } = useConnectedXM();
|
|
1737
|
+
var useGetContentActivities = (contentId = "", params = {}, options = {}) => {
|
|
1722
1738
|
return useConnectedInfiniteQuery(
|
|
1723
1739
|
CONTENT_ACTIVITIES_QUERY_KEY(contentId),
|
|
1724
1740
|
(params2) => GetContentActivities({ contentId, ...params2 }),
|
|
1725
1741
|
params,
|
|
1726
1742
|
{
|
|
1727
1743
|
...options,
|
|
1728
|
-
enabled: !!
|
|
1744
|
+
enabled: !!contentId && (options.enabled ?? true)
|
|
1729
1745
|
}
|
|
1730
1746
|
);
|
|
1731
1747
|
};
|
|
@@ -1747,9 +1763,10 @@ var GetContentTypes = async ({
|
|
|
1747
1763
|
orderBy,
|
|
1748
1764
|
search,
|
|
1749
1765
|
queryClient,
|
|
1750
|
-
|
|
1766
|
+
clientApiParams,
|
|
1751
1767
|
locale
|
|
1752
1768
|
}) => {
|
|
1769
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1753
1770
|
const { data } = await clientApi.get(`/contentTypes`, {
|
|
1754
1771
|
params: {
|
|
1755
1772
|
page: pageParam || void 0,
|
|
@@ -1793,12 +1810,13 @@ var SET_CONTENT_TYPE_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"
|
|
|
1793
1810
|
};
|
|
1794
1811
|
var GetContentType = async ({
|
|
1795
1812
|
contentTypeId,
|
|
1796
|
-
|
|
1813
|
+
clientApiParams
|
|
1797
1814
|
}) => {
|
|
1815
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1798
1816
|
const { data } = await clientApi.get(`/contentTypes/${contentTypeId}`);
|
|
1799
1817
|
return data;
|
|
1800
1818
|
};
|
|
1801
|
-
var useGetContentType = (contentTypeId, options = {}) => {
|
|
1819
|
+
var useGetContentType = (contentTypeId = "", options = {}) => {
|
|
1802
1820
|
return useConnectedSingleQuery_default(
|
|
1803
1821
|
CONTENT_TYPE_QUERY_KEY(contentTypeId),
|
|
1804
1822
|
(params) => GetContentType({ contentTypeId: contentTypeId || "", ...params }),
|
|
@@ -1827,9 +1845,10 @@ var GetContentTypeContents = async ({
|
|
|
1827
1845
|
search,
|
|
1828
1846
|
contentTypeId,
|
|
1829
1847
|
queryClient,
|
|
1830
|
-
|
|
1848
|
+
clientApiParams,
|
|
1831
1849
|
locale
|
|
1832
1850
|
}) => {
|
|
1851
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1833
1852
|
const { data } = await clientApi.get(
|
|
1834
1853
|
`/contentTypes/${contentTypeId}/contents`,
|
|
1835
1854
|
{
|
|
@@ -1851,7 +1870,7 @@ var GetContentTypeContents = async ({
|
|
|
1851
1870
|
}
|
|
1852
1871
|
return data;
|
|
1853
1872
|
};
|
|
1854
|
-
var useGetContentTypeContents = (contentTypeId, params = {}, options = {}) => {
|
|
1873
|
+
var useGetContentTypeContents = (contentTypeId = "", params = {}, options = {}) => {
|
|
1855
1874
|
return useConnectedInfiniteQuery(
|
|
1856
1875
|
CONTENT_TYPE_CONTENTS_QUERY_KEY(contentTypeId),
|
|
1857
1876
|
(params2) => GetContentTypeContents({ ...params2, contentTypeId: contentTypeId || "" }),
|
|
@@ -1884,9 +1903,10 @@ var GetEventActivities = async ({
|
|
|
1884
1903
|
orderBy,
|
|
1885
1904
|
search,
|
|
1886
1905
|
queryClient,
|
|
1887
|
-
|
|
1906
|
+
clientApiParams,
|
|
1888
1907
|
locale
|
|
1889
1908
|
}) => {
|
|
1909
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1890
1910
|
const { data } = await clientApi.get(`/events/${eventId}/activities`, {
|
|
1891
1911
|
params: {
|
|
1892
1912
|
page: pageParam || void 0,
|
|
@@ -1905,15 +1925,14 @@ var GetEventActivities = async ({
|
|
|
1905
1925
|
}
|
|
1906
1926
|
return data;
|
|
1907
1927
|
};
|
|
1908
|
-
var useGetEventActivities = (eventId, params = {}, options = {}) => {
|
|
1909
|
-
const { token } = useConnectedXM();
|
|
1928
|
+
var useGetEventActivities = (eventId = "", params = {}, options = {}) => {
|
|
1910
1929
|
return useConnectedInfiniteQuery(
|
|
1911
1930
|
EVENT_ACTIVITIES_QUERY_KEY(eventId),
|
|
1912
1931
|
(params2) => GetEventActivities({ eventId, ...params2 }),
|
|
1913
1932
|
params,
|
|
1914
1933
|
{
|
|
1915
1934
|
...options,
|
|
1916
|
-
enabled: !!
|
|
1935
|
+
enabled: !!eventId
|
|
1917
1936
|
}
|
|
1918
1937
|
);
|
|
1919
1938
|
};
|
|
@@ -1939,9 +1958,10 @@ var GetEventFaqSections = async ({
|
|
|
1939
1958
|
orderBy,
|
|
1940
1959
|
search,
|
|
1941
1960
|
queryClient,
|
|
1942
|
-
|
|
1961
|
+
clientApiParams,
|
|
1943
1962
|
locale
|
|
1944
1963
|
}) => {
|
|
1964
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1945
1965
|
const { data } = await clientApi.get(`/events/${eventId}/faqs`, {
|
|
1946
1966
|
params: {
|
|
1947
1967
|
page: pageParam || void 0,
|
|
@@ -1960,7 +1980,7 @@ var GetEventFaqSections = async ({
|
|
|
1960
1980
|
}
|
|
1961
1981
|
return data;
|
|
1962
1982
|
};
|
|
1963
|
-
var useGetEventFaqSections = (eventId, params = {}, options = {}) => {
|
|
1983
|
+
var useGetEventFaqSections = (eventId = "", params = {}, options = {}) => {
|
|
1964
1984
|
return useConnectedInfiniteQuery(
|
|
1965
1985
|
EVENT_FAQ_SECTIONS_QUERY_KEY(eventId),
|
|
1966
1986
|
(params2) => GetEventFaqSections({ eventId, ...params2 }),
|
|
@@ -1986,12 +2006,13 @@ var SET_EVENT_FAQ_SECTION_QUERY_DATA = (client, keyParams, response, baseKeys =
|
|
|
1986
2006
|
var GetEventFAQSection = async ({
|
|
1987
2007
|
eventId,
|
|
1988
2008
|
sectionId,
|
|
1989
|
-
|
|
2009
|
+
clientApiParams
|
|
1990
2010
|
}) => {
|
|
2011
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
1991
2012
|
const { data } = await clientApi.get(`/events/${eventId}/faqs/${sectionId}`);
|
|
1992
2013
|
return data;
|
|
1993
2014
|
};
|
|
1994
|
-
var useGetEventFAQSection = (eventId, sectionId, options = {}) => {
|
|
2015
|
+
var useGetEventFAQSection = (eventId = "", sectionId = "", options = {}) => {
|
|
1995
2016
|
return useConnectedSingleQuery(
|
|
1996
2017
|
EVENT_FAQ_SECTION_QUERY_KEY(eventId, sectionId),
|
|
1997
2018
|
(params) => GetEventFAQSection({ eventId, sectionId, ...params }),
|
|
@@ -2024,9 +2045,10 @@ var GetEventFaqs = async ({
|
|
|
2024
2045
|
orderBy,
|
|
2025
2046
|
search,
|
|
2026
2047
|
queryClient,
|
|
2027
|
-
|
|
2048
|
+
clientApiParams,
|
|
2028
2049
|
locale
|
|
2029
2050
|
}) => {
|
|
2051
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2030
2052
|
const { data } = await clientApi.get(
|
|
2031
2053
|
`/events/${eventId}/faqs/${sectionId}/questions`,
|
|
2032
2054
|
{
|
|
@@ -2048,7 +2070,7 @@ var GetEventFaqs = async ({
|
|
|
2048
2070
|
}
|
|
2049
2071
|
return data;
|
|
2050
2072
|
};
|
|
2051
|
-
var useGetEventFaqs = (eventId, sectionId, params = {}, options = {}) => {
|
|
2073
|
+
var useGetEventFaqs = (eventId = "", sectionId = "", params = {}, options = {}) => {
|
|
2052
2074
|
return useConnectedInfiniteQuery(
|
|
2053
2075
|
EVENT_FAQ_SECTION_QUESTIONS_QUERY_KEY(eventId, sectionId),
|
|
2054
2076
|
(params2) => GetEventFaqs({ eventId, sectionId, ...params2 }),
|
|
@@ -2078,14 +2100,15 @@ var GetEventFAQSectionQuestion = async ({
|
|
|
2078
2100
|
eventId,
|
|
2079
2101
|
sectionId,
|
|
2080
2102
|
questionId,
|
|
2081
|
-
|
|
2103
|
+
clientApiParams
|
|
2082
2104
|
}) => {
|
|
2105
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2083
2106
|
const { data } = await clientApi.get(
|
|
2084
2107
|
`/events/${eventId}/faqs/${sectionId}/questions/${questionId}`
|
|
2085
2108
|
);
|
|
2086
2109
|
return data;
|
|
2087
2110
|
};
|
|
2088
|
-
var useGetEventFAQSectionQuestion = (eventId, sectionId, questionId, options = {}) => {
|
|
2111
|
+
var useGetEventFAQSectionQuestion = (eventId = "", sectionId = "", questionId = "", options = {}) => {
|
|
2089
2112
|
return useConnectedSingleQuery(
|
|
2090
2113
|
EVENT_FAQ_SECTION_QUESTION_QUERY_KEY(eventId, sectionId, questionId),
|
|
2091
2114
|
(params) => GetEventFAQSectionQuestion({ eventId, sectionId, questionId, ...params }),
|
|
@@ -2117,9 +2140,10 @@ var GetEventPages = async ({
|
|
|
2117
2140
|
orderBy,
|
|
2118
2141
|
search,
|
|
2119
2142
|
queryClient,
|
|
2120
|
-
|
|
2143
|
+
clientApiParams,
|
|
2121
2144
|
locale
|
|
2122
2145
|
}) => {
|
|
2146
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2123
2147
|
const { data } = await clientApi.get(`/events/${eventId}/pages`, {
|
|
2124
2148
|
params: {
|
|
2125
2149
|
page: pageParam || void 0,
|
|
@@ -2138,7 +2162,7 @@ var GetEventPages = async ({
|
|
|
2138
2162
|
}
|
|
2139
2163
|
return data;
|
|
2140
2164
|
};
|
|
2141
|
-
var useGetEventPages = (eventId, params = {}, options = {}) => {
|
|
2165
|
+
var useGetEventPages = (eventId = "", params = {}, options = {}) => {
|
|
2142
2166
|
return useConnectedInfiniteQuery(
|
|
2143
2167
|
EVENT_PAGES_QUERY_KEY(eventId),
|
|
2144
2168
|
(params2) => GetEventPages({ eventId, ...params2 }),
|
|
@@ -2164,12 +2188,13 @@ var SET_EVENT_PAGE_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"])
|
|
|
2164
2188
|
var GetEventPage = async ({
|
|
2165
2189
|
eventId,
|
|
2166
2190
|
pageId,
|
|
2167
|
-
|
|
2191
|
+
clientApiParams
|
|
2168
2192
|
}) => {
|
|
2193
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2169
2194
|
const { data } = await clientApi.get(`/events/${eventId}/pages/${pageId}`);
|
|
2170
2195
|
return data;
|
|
2171
2196
|
};
|
|
2172
|
-
var useGetEventPage = (eventId, pageId, options = {}) => {
|
|
2197
|
+
var useGetEventPage = (eventId = "", pageId, options = {}) => {
|
|
2173
2198
|
return useConnectedSingleQuery(
|
|
2174
2199
|
EVENT_PAGE_QUERY_KEY(eventId, pageId),
|
|
2175
2200
|
(params) => GetEventPage({ eventId, pageId, ...params }),
|
|
@@ -2189,8 +2214,9 @@ var GetEventQuestionSearchValues = async ({
|
|
|
2189
2214
|
pageSize,
|
|
2190
2215
|
orderBy,
|
|
2191
2216
|
search,
|
|
2192
|
-
|
|
2217
|
+
clientApiParams
|
|
2193
2218
|
}) => {
|
|
2219
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2194
2220
|
const { data } = await clientApi.get(
|
|
2195
2221
|
`/events/${eventId}/questions/${questionId}/values`,
|
|
2196
2222
|
{
|
|
@@ -2204,7 +2230,7 @@ var GetEventQuestionSearchValues = async ({
|
|
|
2204
2230
|
);
|
|
2205
2231
|
return data;
|
|
2206
2232
|
};
|
|
2207
|
-
var useGetEventQuestionSearchValues = (eventId, questionId, params = {}, options = {}) => {
|
|
2233
|
+
var useGetEventQuestionSearchValues = (eventId = "", questionId = "", params = {}, options = {}) => {
|
|
2208
2234
|
return useConnectedInfiniteQuery(
|
|
2209
2235
|
EVENT_QUESTION_VALUES_QUERY_KEY(eventId, questionId),
|
|
2210
2236
|
(params2) => GetEventQuestionSearchValues({
|
|
@@ -2241,9 +2267,10 @@ var GetEventRegistrants = async ({
|
|
|
2241
2267
|
orderBy,
|
|
2242
2268
|
search,
|
|
2243
2269
|
queryClient,
|
|
2244
|
-
|
|
2270
|
+
clientApiParams,
|
|
2245
2271
|
locale
|
|
2246
2272
|
}) => {
|
|
2273
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2247
2274
|
const { data } = await clientApi.get(`/events/${eventId}/registrants`, {
|
|
2248
2275
|
params: {
|
|
2249
2276
|
page: pageParam || void 0,
|
|
@@ -2262,15 +2289,14 @@ var GetEventRegistrants = async ({
|
|
|
2262
2289
|
}
|
|
2263
2290
|
return data;
|
|
2264
2291
|
};
|
|
2265
|
-
var useGetEventRegistrants = (eventId, params = {}, options = {}) => {
|
|
2266
|
-
const { token } = useConnectedXM();
|
|
2292
|
+
var useGetEventRegistrants = (eventId = "", params = {}, options = {}) => {
|
|
2267
2293
|
return useConnectedInfiniteQuery(
|
|
2268
2294
|
EVENT_REGISTRANTS_QUERY_KEY(eventId),
|
|
2269
2295
|
(params2) => GetEventRegistrants({ eventId, ...params2 }),
|
|
2270
2296
|
params,
|
|
2271
2297
|
{
|
|
2272
2298
|
...options,
|
|
2273
|
-
enabled: !!
|
|
2299
|
+
enabled: !!eventId && (options?.enabled ?? true)
|
|
2274
2300
|
}
|
|
2275
2301
|
);
|
|
2276
2302
|
};
|
|
@@ -2296,9 +2322,10 @@ var GetEventSessions = async ({
|
|
|
2296
2322
|
orderBy,
|
|
2297
2323
|
search,
|
|
2298
2324
|
queryClient,
|
|
2299
|
-
|
|
2325
|
+
clientApiParams,
|
|
2300
2326
|
locale
|
|
2301
2327
|
}) => {
|
|
2328
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2302
2329
|
const { data } = await clientApi.get(`/events/${eventId}/sessions`, {
|
|
2303
2330
|
params: {
|
|
2304
2331
|
page: pageParam || void 0,
|
|
@@ -2317,7 +2344,7 @@ var GetEventSessions = async ({
|
|
|
2317
2344
|
}
|
|
2318
2345
|
return data;
|
|
2319
2346
|
};
|
|
2320
|
-
var useGetEventSessions = (eventId, params = {}, options = {}) => {
|
|
2347
|
+
var useGetEventSessions = (eventId = "", params = {}, options = {}) => {
|
|
2321
2348
|
return useConnectedInfiniteQuery(
|
|
2322
2349
|
EVENT_SESSIONS_QUERY_KEY(eventId),
|
|
2323
2350
|
(params2) => GetEventSessions({ eventId, ...params2 }),
|
|
@@ -2343,14 +2370,15 @@ var SET_EVENT_SESSION_QUERY_DATA = (client, keyParams, response, baseKeys = ["en
|
|
|
2343
2370
|
var GetEventSession = async ({
|
|
2344
2371
|
eventId,
|
|
2345
2372
|
sessionId,
|
|
2346
|
-
|
|
2373
|
+
clientApiParams
|
|
2347
2374
|
}) => {
|
|
2375
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2348
2376
|
const { data } = await clientApi.get(
|
|
2349
2377
|
`/events/${eventId}/sessions/${sessionId}`
|
|
2350
2378
|
);
|
|
2351
2379
|
return data;
|
|
2352
2380
|
};
|
|
2353
|
-
var useGetEventSession = (eventId, sessionId, options = {}) => {
|
|
2381
|
+
var useGetEventSession = (eventId = "", sessionId = "", options = {}) => {
|
|
2354
2382
|
return useConnectedSingleQuery(
|
|
2355
2383
|
EVENT_SESSION_QUERY_KEY(eventId, sessionId),
|
|
2356
2384
|
(params) => GetEventSession({ eventId, sessionId, ...params }),
|
|
@@ -2382,9 +2410,10 @@ var GetEventSpeakers = async ({
|
|
|
2382
2410
|
orderBy,
|
|
2383
2411
|
search,
|
|
2384
2412
|
queryClient,
|
|
2385
|
-
|
|
2413
|
+
clientApiParams,
|
|
2386
2414
|
locale
|
|
2387
2415
|
}) => {
|
|
2416
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2388
2417
|
const { data } = await clientApi.get(`/events/${eventId}/speakers`, {
|
|
2389
2418
|
params: {
|
|
2390
2419
|
page: pageParam || void 0,
|
|
@@ -2403,7 +2432,7 @@ var GetEventSpeakers = async ({
|
|
|
2403
2432
|
}
|
|
2404
2433
|
return data;
|
|
2405
2434
|
};
|
|
2406
|
-
var useGetEventSpeakers = (eventId, params = {}, options = {}) => {
|
|
2435
|
+
var useGetEventSpeakers = (eventId = "", params = {}, options = {}) => {
|
|
2407
2436
|
return useConnectedInfiniteQuery(
|
|
2408
2437
|
EVENT_SPEAKERS_QUERY_KEY(eventId),
|
|
2409
2438
|
(params2) => GetEventSpeakers({ eventId, ...params2 }),
|
|
@@ -2429,14 +2458,15 @@ var SET_EVENT_SPEAKER_QUERY_DATA = (client, keyParams, response, baseKeys = ["en
|
|
|
2429
2458
|
var GetEventSpeaker = async ({
|
|
2430
2459
|
eventId,
|
|
2431
2460
|
speakerId,
|
|
2432
|
-
|
|
2461
|
+
clientApiParams
|
|
2433
2462
|
}) => {
|
|
2463
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2434
2464
|
const { data } = await clientApi.get(
|
|
2435
2465
|
`/events/${eventId}/speakers/${speakerId}`
|
|
2436
2466
|
);
|
|
2437
2467
|
return data;
|
|
2438
2468
|
};
|
|
2439
|
-
var useGetEventSpeaker = (eventId, speakerId, options = {}) => {
|
|
2469
|
+
var useGetEventSpeaker = (eventId = "", speakerId = "", options = {}) => {
|
|
2440
2470
|
return useConnectedSingleQuery(
|
|
2441
2471
|
EVENT_SPEAKER_QUERY_KEY(eventId, speakerId),
|
|
2442
2472
|
(params) => GetEventSpeaker({ eventId, speakerId, ...params }),
|
|
@@ -2467,8 +2497,9 @@ var GetEventTickets = async ({
|
|
|
2467
2497
|
pageSize,
|
|
2468
2498
|
orderBy,
|
|
2469
2499
|
search,
|
|
2470
|
-
|
|
2500
|
+
clientApiParams
|
|
2471
2501
|
}) => {
|
|
2502
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2472
2503
|
const { data } = await clientApi.get(`/events/${eventId}/tickets`, {
|
|
2473
2504
|
params: {
|
|
2474
2505
|
page: pageParam || void 0,
|
|
@@ -2479,7 +2510,7 @@ var GetEventTickets = async ({
|
|
|
2479
2510
|
});
|
|
2480
2511
|
return data;
|
|
2481
2512
|
};
|
|
2482
|
-
var useGetEventTickets = (eventId, params = {}, options = {}) => {
|
|
2513
|
+
var useGetEventTickets = (eventId = "", params = {}, options = {}) => {
|
|
2483
2514
|
return useConnectedInfiniteQuery(
|
|
2484
2515
|
EVENT_TICKETS_QUERY_KEY(eventId),
|
|
2485
2516
|
(params2) => GetEventTickets({ eventId, ...params2 }),
|
|
@@ -2512,9 +2543,10 @@ var GetEventSponsors = async ({
|
|
|
2512
2543
|
orderBy,
|
|
2513
2544
|
search,
|
|
2514
2545
|
queryClient,
|
|
2515
|
-
|
|
2546
|
+
clientApiParams,
|
|
2516
2547
|
locale
|
|
2517
2548
|
}) => {
|
|
2549
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2518
2550
|
const { data } = await clientApi.get(`/events/${eventId}/sponsors`, {
|
|
2519
2551
|
params: {
|
|
2520
2552
|
page: pageParam || void 0,
|
|
@@ -2533,7 +2565,7 @@ var GetEventSponsors = async ({
|
|
|
2533
2565
|
}
|
|
2534
2566
|
return data;
|
|
2535
2567
|
};
|
|
2536
|
-
var useGetEventSponsors = (eventId, params = {}, options = {}) => {
|
|
2568
|
+
var useGetEventSponsors = (eventId = "", params = {}, options = {}) => {
|
|
2537
2569
|
return useConnectedInfiniteQuery(
|
|
2538
2570
|
EVENT_TICKETS_QUERY_KEY(eventId),
|
|
2539
2571
|
(params2) => GetEventSponsors({ eventId, ...params2 }),
|
|
@@ -2564,9 +2596,10 @@ var GetFeaturedEvents = async ({
|
|
|
2564
2596
|
pageSize,
|
|
2565
2597
|
orderBy,
|
|
2566
2598
|
queryClient,
|
|
2567
|
-
|
|
2599
|
+
clientApiParams,
|
|
2568
2600
|
locale
|
|
2569
2601
|
}) => {
|
|
2602
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2570
2603
|
const { data } = await clientApi.get(`/events/featured`, {
|
|
2571
2604
|
params: {
|
|
2572
2605
|
page: pageParam || void 0,
|
|
@@ -2596,8 +2629,9 @@ var useGetFeaturedEvents = (params = {}, options = {}) => {
|
|
|
2596
2629
|
// src/queries/organization/useGetOrganization.ts
|
|
2597
2630
|
var ORGANIZATION_QUERY_KEY = () => ["ORGANIZATION"];
|
|
2598
2631
|
var GetOrganization = async ({
|
|
2599
|
-
|
|
2632
|
+
clientApiParams
|
|
2600
2633
|
}) => {
|
|
2634
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2601
2635
|
const { data } = await clientApi.get(`/organization`);
|
|
2602
2636
|
return data;
|
|
2603
2637
|
};
|
|
@@ -2615,8 +2649,9 @@ var ORGANIZATION_EXPLORE_QUERY_KEY = () => [
|
|
|
2615
2649
|
"ORGANIZATION"
|
|
2616
2650
|
];
|
|
2617
2651
|
var GetOrganizationExplore = async ({
|
|
2618
|
-
|
|
2652
|
+
clientApiParams
|
|
2619
2653
|
}) => {
|
|
2654
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2620
2655
|
const { data } = await clientApi.get(`/organization/explore`);
|
|
2621
2656
|
return data;
|
|
2622
2657
|
};
|
|
@@ -2645,8 +2680,9 @@ var SET_ORGANIZATION_PAGE_QUERY_DATA = (queryClient, keyParams, response, baseKe
|
|
|
2645
2680
|
};
|
|
2646
2681
|
var GetOrganizationPage = async ({
|
|
2647
2682
|
type,
|
|
2648
|
-
|
|
2683
|
+
clientApiParams
|
|
2649
2684
|
}) => {
|
|
2685
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2650
2686
|
const { data } = await clientApi.get(`/organization/pages/${type}`);
|
|
2651
2687
|
return data;
|
|
2652
2688
|
};
|
|
@@ -2667,8 +2703,9 @@ var ORGANIZATION_SUBSCRIPTIONS_QUERY_KEY = () => [
|
|
|
2667
2703
|
"SUBSCRIPTIONS"
|
|
2668
2704
|
];
|
|
2669
2705
|
var GetOrganizationSubscriptionProducts = async ({
|
|
2670
|
-
|
|
2706
|
+
clientApiParams
|
|
2671
2707
|
}) => {
|
|
2708
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2672
2709
|
const { data } = await clientApi.get(`/organization/subscriptions`);
|
|
2673
2710
|
return data;
|
|
2674
2711
|
};
|
|
@@ -2687,8 +2724,9 @@ var ORGANIZATION_PAYMENT_INTEGRATION_QUERY_KEY = () => [
|
|
|
2687
2724
|
"PAYMENT_INTEGRATION"
|
|
2688
2725
|
];
|
|
2689
2726
|
var GetOrganizationPaymentIntegration = async ({
|
|
2690
|
-
|
|
2727
|
+
clientApiParams
|
|
2691
2728
|
}) => {
|
|
2729
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2692
2730
|
const { data } = await clientApi.get(`/organization/payment-integration`);
|
|
2693
2731
|
return data;
|
|
2694
2732
|
};
|
|
@@ -2717,9 +2755,10 @@ var GetSelfChatChannels = async ({
|
|
|
2717
2755
|
orderBy,
|
|
2718
2756
|
search,
|
|
2719
2757
|
queryClient,
|
|
2720
|
-
|
|
2758
|
+
clientApiParams,
|
|
2721
2759
|
locale
|
|
2722
2760
|
}) => {
|
|
2761
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2723
2762
|
const { data } = await clientApi.get(`/self/chat/channels`, {
|
|
2724
2763
|
params: {
|
|
2725
2764
|
page: pageParam || void 0,
|
|
@@ -2745,14 +2784,12 @@ var GetSelfChatChannels = async ({
|
|
|
2745
2784
|
return data;
|
|
2746
2785
|
};
|
|
2747
2786
|
var useGetSelfChatChannels = (params = {}, options = {}) => {
|
|
2748
|
-
const { token } = useConnectedXM();
|
|
2749
2787
|
return useConnectedInfiniteQuery(
|
|
2750
2788
|
SELF_CHAT_CHANNELS_QUERY_KEY(),
|
|
2751
2789
|
(params2) => GetSelfChatChannels(params2),
|
|
2752
2790
|
params,
|
|
2753
2791
|
{
|
|
2754
|
-
...options
|
|
2755
|
-
enabled: !!token && (options?.enabled ?? true)
|
|
2792
|
+
...options
|
|
2756
2793
|
}
|
|
2757
2794
|
);
|
|
2758
2795
|
};
|
|
@@ -2773,13 +2810,13 @@ var SET_SELF_CHAT_CHANNEL_QUERY_DATA = (client, keyParams, response, baseKeys =
|
|
|
2773
2810
|
};
|
|
2774
2811
|
var GetSelfChatChannel = async ({
|
|
2775
2812
|
channelId,
|
|
2776
|
-
|
|
2813
|
+
clientApiParams
|
|
2777
2814
|
}) => {
|
|
2815
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2778
2816
|
const { data } = await clientApi.get(`/self/chat/channels/${channelId}`);
|
|
2779
2817
|
return data;
|
|
2780
2818
|
};
|
|
2781
2819
|
var useGetSelfChatChannel = (channelId, options = {}) => {
|
|
2782
|
-
const { token } = useConnectedXM();
|
|
2783
2820
|
return useConnectedSingleQuery(
|
|
2784
2821
|
SELF_CHAT_CHANNEL_QUERY_KEY(channelId),
|
|
2785
2822
|
(params) => GetSelfChatChannel({
|
|
@@ -2789,7 +2826,7 @@ var useGetSelfChatChannel = (channelId, options = {}) => {
|
|
|
2789
2826
|
{
|
|
2790
2827
|
staleTime: Infinity,
|
|
2791
2828
|
...options,
|
|
2792
|
-
enabled: !!
|
|
2829
|
+
enabled: !!channelId && (options?.enabled ?? true)
|
|
2793
2830
|
}
|
|
2794
2831
|
);
|
|
2795
2832
|
};
|
|
@@ -2811,8 +2848,9 @@ var GetSelfChatChannelMembers = async ({
|
|
|
2811
2848
|
pageSize,
|
|
2812
2849
|
orderBy,
|
|
2813
2850
|
search,
|
|
2814
|
-
|
|
2851
|
+
clientApiParams
|
|
2815
2852
|
}) => {
|
|
2853
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2816
2854
|
const { data } = await clientApi.get(
|
|
2817
2855
|
`/self/chat/channels/${channelId}/members`,
|
|
2818
2856
|
{
|
|
@@ -2827,14 +2865,13 @@ var GetSelfChatChannelMembers = async ({
|
|
|
2827
2865
|
return data;
|
|
2828
2866
|
};
|
|
2829
2867
|
var useGetSelfChatChannelMembers = (channelId, params = {}, options = {}) => {
|
|
2830
|
-
const { token } = useConnectedXM();
|
|
2831
2868
|
return useConnectedInfiniteQuery(
|
|
2832
2869
|
SELF_CHAT_CHANNEL_MEMBERS_QUERY_KEY(channelId),
|
|
2833
2870
|
(params2) => GetSelfChatChannelMembers({ ...params2, channelId }),
|
|
2834
2871
|
params,
|
|
2835
2872
|
{
|
|
2836
2873
|
...options,
|
|
2837
|
-
enabled: !!
|
|
2874
|
+
enabled: !!channelId && (options?.enabled ?? true)
|
|
2838
2875
|
}
|
|
2839
2876
|
);
|
|
2840
2877
|
};
|
|
@@ -2857,8 +2894,9 @@ var GetSelfChatChannelMessages = async ({
|
|
|
2857
2894
|
orderBy,
|
|
2858
2895
|
search,
|
|
2859
2896
|
queryClient,
|
|
2860
|
-
|
|
2897
|
+
clientApiParams
|
|
2861
2898
|
}) => {
|
|
2899
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2862
2900
|
const { data } = await clientApi.get(
|
|
2863
2901
|
`/self/chat/channels/${channelId}/messages`,
|
|
2864
2902
|
{
|
|
@@ -2882,14 +2920,13 @@ var GetSelfChatChannelMessages = async ({
|
|
|
2882
2920
|
return data;
|
|
2883
2921
|
};
|
|
2884
2922
|
var useGetSelfChatChannelMessages = (channelId, params = {}, options = {}) => {
|
|
2885
|
-
const { token } = useConnectedXM();
|
|
2886
2923
|
return useConnectedInfiniteQuery(
|
|
2887
2924
|
SELF_CHAT_CHANNEL_MESSAGES_QUERY_KEY(channelId),
|
|
2888
2925
|
(params2) => GetSelfChatChannelMessages({ ...params2, channelId }),
|
|
2889
2926
|
params,
|
|
2890
2927
|
{
|
|
2891
2928
|
...options,
|
|
2892
|
-
enabled: !!
|
|
2929
|
+
enabled: !!channelId && (options?.enabled ?? true)
|
|
2893
2930
|
}
|
|
2894
2931
|
);
|
|
2895
2932
|
};
|
|
@@ -2909,20 +2946,21 @@ var SET_SELF_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
|
|
|
2909
2946
|
};
|
|
2910
2947
|
var GetSelf = async ({
|
|
2911
2948
|
authenticated,
|
|
2912
|
-
|
|
2949
|
+
clientApiParams
|
|
2913
2950
|
}) => {
|
|
2914
|
-
|
|
2915
|
-
|
|
2951
|
+
const clientApi = await GetClientAPI({
|
|
2952
|
+
...clientApiParams,
|
|
2953
|
+
getExecuteAs: authenticated ? void 0 : clientApiParams.getExecuteAs
|
|
2954
|
+
});
|
|
2916
2955
|
const { data } = await clientApi.get(`/self`);
|
|
2917
2956
|
return data;
|
|
2918
2957
|
};
|
|
2919
2958
|
var useGetSelf = (authenticated, options = {}) => {
|
|
2920
|
-
const { token } = useConnectedXM();
|
|
2921
2959
|
return useConnectedSingleQuery(
|
|
2922
2960
|
SELF_QUERY_KEY(authenticated),
|
|
2923
2961
|
(params) => GetSelf({ authenticated, ...params }),
|
|
2924
2962
|
{
|
|
2925
|
-
|
|
2963
|
+
...options
|
|
2926
2964
|
}
|
|
2927
2965
|
);
|
|
2928
2966
|
};
|
|
@@ -2943,8 +2981,9 @@ var GetSelfEventRegistration = async ({
|
|
|
2943
2981
|
ticket,
|
|
2944
2982
|
quantity,
|
|
2945
2983
|
coupon,
|
|
2946
|
-
|
|
2984
|
+
clientApiParams
|
|
2947
2985
|
}) => {
|
|
2986
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2948
2987
|
const { data } = await clientApi.get(`/self/events/${eventId}/registration`, {
|
|
2949
2988
|
params: {
|
|
2950
2989
|
ticket: ticket || void 0,
|
|
@@ -2955,7 +2994,6 @@ var GetSelfEventRegistration = async ({
|
|
|
2955
2994
|
return data;
|
|
2956
2995
|
};
|
|
2957
2996
|
var useGetSelfEventRegistration = (eventId, ticket, quantity, coupon, options = {}) => {
|
|
2958
|
-
const { token } = useConnectedXM();
|
|
2959
2997
|
return useConnectedSingleQuery_default(
|
|
2960
2998
|
SELF_EVENT_REGISTRATION_QUERY_KEY(eventId),
|
|
2961
2999
|
(params) => GetSelfEventRegistration({
|
|
@@ -2970,7 +3008,7 @@ var useGetSelfEventRegistration = (eventId, ticket, quantity, coupon, options =
|
|
|
2970
3008
|
staleTime: Infinity,
|
|
2971
3009
|
refetchOnMount: false,
|
|
2972
3010
|
...options,
|
|
2973
|
-
enabled: !!
|
|
3011
|
+
enabled: !!eventId && (options?.enabled ?? true)
|
|
2974
3012
|
}
|
|
2975
3013
|
);
|
|
2976
3014
|
};
|
|
@@ -2984,15 +3022,15 @@ var SELF_EVENT_REGISTRATION_CHECKOUT_QUERY_KEY = (eventId, registrationId) => [
|
|
|
2984
3022
|
var GetSelfEventRegistrationCheckout = async ({
|
|
2985
3023
|
eventId,
|
|
2986
3024
|
registrationId,
|
|
2987
|
-
|
|
3025
|
+
clientApiParams
|
|
2988
3026
|
}) => {
|
|
3027
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
2989
3028
|
const { data } = await clientApi.get(
|
|
2990
3029
|
`/self/events/${eventId}/registration/${registrationId}/draft/checkout`
|
|
2991
3030
|
);
|
|
2992
3031
|
return data;
|
|
2993
3032
|
};
|
|
2994
3033
|
var useGetSelfEventRegistrationCheckout = (eventId, registrationId = "", options = {}) => {
|
|
2995
|
-
const { token } = useConnectedXM();
|
|
2996
3034
|
return useConnectedSingleQuery_default(
|
|
2997
3035
|
SELF_EVENT_REGISTRATION_CHECKOUT_QUERY_KEY(eventId, registrationId),
|
|
2998
3036
|
(params) => GetSelfEventRegistrationCheckout({ eventId, registrationId, ...params }),
|
|
@@ -3001,7 +3039,7 @@ var useGetSelfEventRegistrationCheckout = (eventId, registrationId = "", options
|
|
|
3001
3039
|
retry: false,
|
|
3002
3040
|
retryOnMount: false,
|
|
3003
3041
|
...options,
|
|
3004
|
-
enabled: !!
|
|
3042
|
+
enabled: !!eventId && !!registrationId
|
|
3005
3043
|
}
|
|
3006
3044
|
);
|
|
3007
3045
|
};
|
|
@@ -3021,9 +3059,10 @@ var GetSelfSubscriptions = async ({
|
|
|
3021
3059
|
orderBy,
|
|
3022
3060
|
search,
|
|
3023
3061
|
queryClient,
|
|
3024
|
-
|
|
3062
|
+
clientApiParams,
|
|
3025
3063
|
locale
|
|
3026
3064
|
}) => {
|
|
3065
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3027
3066
|
const { data } = await clientApi.get(`/self/subscriptions`, {
|
|
3028
3067
|
params: {
|
|
3029
3068
|
page: pageParam || void 0,
|
|
@@ -3044,14 +3083,12 @@ var GetSelfSubscriptions = async ({
|
|
|
3044
3083
|
return data;
|
|
3045
3084
|
};
|
|
3046
3085
|
var useGetSelfSubscriptions = (status, params = {}, options = {}) => {
|
|
3047
|
-
const { token } = useConnectedXM();
|
|
3048
3086
|
return useConnectedInfiniteQuery(
|
|
3049
3087
|
SELF_SUBSCRIPTIONS_QUERY_KEY(status),
|
|
3050
3088
|
(params2) => GetSelfSubscriptions({ status, ...params2 }),
|
|
3051
3089
|
params,
|
|
3052
3090
|
{
|
|
3053
|
-
...options
|
|
3054
|
-
enabled: !!token
|
|
3091
|
+
...options
|
|
3055
3092
|
}
|
|
3056
3093
|
);
|
|
3057
3094
|
};
|
|
@@ -3060,19 +3097,19 @@ var useGetSelfSubscriptions = (status, params = {}, options = {}) => {
|
|
|
3060
3097
|
var SELF_SUBSCRIPTION_QUERY_KEY = (subscriptionId) => [...SELF_SUBSCRIPTIONS_QUERY_KEY(), subscriptionId];
|
|
3061
3098
|
var GetSelfSubcription = async ({
|
|
3062
3099
|
subscriptionId,
|
|
3063
|
-
|
|
3100
|
+
clientApiParams
|
|
3064
3101
|
}) => {
|
|
3102
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3065
3103
|
const { data } = await clientApi.get(`/self/subscriptions/${subscriptionId}`);
|
|
3066
3104
|
return data;
|
|
3067
3105
|
};
|
|
3068
3106
|
var useGetSelfSubcription = (subscriptionId = "", options = {}) => {
|
|
3069
|
-
const { token } = useConnectedXM();
|
|
3070
3107
|
return useConnectedSingleQuery(
|
|
3071
3108
|
SELF_SUBSCRIPTION_QUERY_KEY(subscriptionId),
|
|
3072
3109
|
(params) => GetSelfSubcription({ subscriptionId, ...params }),
|
|
3073
3110
|
{
|
|
3074
3111
|
...options,
|
|
3075
|
-
enabled: !!
|
|
3112
|
+
enabled: !!subscriptionId
|
|
3076
3113
|
}
|
|
3077
3114
|
);
|
|
3078
3115
|
};
|
|
@@ -3085,8 +3122,9 @@ var GetSelfSubscriptionPayments = async ({
|
|
|
3085
3122
|
pageSize,
|
|
3086
3123
|
orderBy,
|
|
3087
3124
|
search,
|
|
3088
|
-
|
|
3125
|
+
clientApiParams
|
|
3089
3126
|
}) => {
|
|
3127
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3090
3128
|
const { data } = await clientApi.get(
|
|
3091
3129
|
`/self/subscriptions/${subscriptionId}/payments`,
|
|
3092
3130
|
{
|
|
@@ -3101,14 +3139,12 @@ var GetSelfSubscriptionPayments = async ({
|
|
|
3101
3139
|
return data;
|
|
3102
3140
|
};
|
|
3103
3141
|
var useGetSelfSubscriptionPayments = (subscriptionId, params = {}, options = {}) => {
|
|
3104
|
-
const { token } = useConnectedXM();
|
|
3105
3142
|
return useConnectedInfiniteQuery(
|
|
3106
3143
|
SELF_SUBSCRIPTION_PAYMENTS_QUERY_KEY(subscriptionId),
|
|
3107
3144
|
(params2) => GetSelfSubscriptionPayments({ ...params2, subscriptionId }),
|
|
3108
3145
|
params,
|
|
3109
3146
|
{
|
|
3110
|
-
...options
|
|
3111
|
-
enabled: !!token
|
|
3147
|
+
...options
|
|
3112
3148
|
}
|
|
3113
3149
|
);
|
|
3114
3150
|
};
|
|
@@ -3124,9 +3160,10 @@ var GetSelfActivities = async ({
|
|
|
3124
3160
|
orderBy,
|
|
3125
3161
|
search,
|
|
3126
3162
|
queryClient,
|
|
3127
|
-
|
|
3163
|
+
clientApiParams,
|
|
3128
3164
|
locale
|
|
3129
3165
|
}) => {
|
|
3166
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3130
3167
|
const { data } = await clientApi.get(`/self/activities`, {
|
|
3131
3168
|
params: {
|
|
3132
3169
|
page: pageParam || void 0,
|
|
@@ -3146,14 +3183,13 @@ var GetSelfActivities = async ({
|
|
|
3146
3183
|
return data;
|
|
3147
3184
|
};
|
|
3148
3185
|
var useGetSelfActivities = (params = {}, options = {}) => {
|
|
3149
|
-
const { token } = useConnectedXM();
|
|
3150
3186
|
return useConnectedInfiniteQuery(
|
|
3151
3187
|
SELF_ACTIVITIES_QUERY_KEY(),
|
|
3152
3188
|
(params2) => GetSelfActivities({ ...params2 }),
|
|
3153
3189
|
params,
|
|
3154
3190
|
{
|
|
3155
3191
|
...options,
|
|
3156
|
-
enabled:
|
|
3192
|
+
enabled: options.enabled ?? true
|
|
3157
3193
|
}
|
|
3158
3194
|
);
|
|
3159
3195
|
};
|
|
@@ -3162,19 +3198,19 @@ var useGetSelfActivities = (params = {}, options = {}) => {
|
|
|
3162
3198
|
var SELF_ANNOUNCEMENT_QUERY_KEY = (announcementId) => [...SELF_QUERY_KEY(), "ANNOUNCEMENT", announcementId];
|
|
3163
3199
|
var GetSelfAnnouncement = async ({
|
|
3164
3200
|
announcementId,
|
|
3165
|
-
|
|
3201
|
+
clientApiParams
|
|
3166
3202
|
}) => {
|
|
3203
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3167
3204
|
const { data } = await clientApi.get(`/self/announcements/${announcementId}`);
|
|
3168
3205
|
return data;
|
|
3169
3206
|
};
|
|
3170
3207
|
var useGetSelfAnnouncement = (announcementId, options = {}) => {
|
|
3171
|
-
const { token } = useConnectedXM();
|
|
3172
3208
|
return useConnectedSingleQuery(
|
|
3173
3209
|
SELF_ANNOUNCEMENT_QUERY_KEY(announcementId),
|
|
3174
3210
|
(params) => GetSelfAnnouncement({ announcementId, ...params }),
|
|
3175
3211
|
{
|
|
3176
3212
|
...options,
|
|
3177
|
-
enabled: !!
|
|
3213
|
+
enabled: !!announcementId && (options?.enabled ?? true)
|
|
3178
3214
|
}
|
|
3179
3215
|
);
|
|
3180
3216
|
};
|
|
@@ -3189,8 +3225,9 @@ var GetSelfCommunityMemberships = async ({
|
|
|
3189
3225
|
pageSize,
|
|
3190
3226
|
orderBy,
|
|
3191
3227
|
search,
|
|
3192
|
-
|
|
3228
|
+
clientApiParams
|
|
3193
3229
|
}) => {
|
|
3230
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3194
3231
|
const { data } = await clientApi.get(`/self/communities`, {
|
|
3195
3232
|
params: {
|
|
3196
3233
|
page: pageParam || void 0,
|
|
@@ -3202,14 +3239,12 @@ var GetSelfCommunityMemberships = async ({
|
|
|
3202
3239
|
return data;
|
|
3203
3240
|
};
|
|
3204
3241
|
var useGetSelfCommunityMemberships = (params = {}, options = {}) => {
|
|
3205
|
-
const { token } = useConnectedXM();
|
|
3206
3242
|
return useConnectedInfiniteQuery(
|
|
3207
3243
|
SELF_COMMUNITY_MEMBERSHIPS_QUERY_KEY(),
|
|
3208
3244
|
(params2) => GetSelfCommunityMemberships({ ...params2 }),
|
|
3209
3245
|
params,
|
|
3210
3246
|
{
|
|
3211
|
-
...options
|
|
3212
|
-
enabled: !!token && (options?.enabled ?? true)
|
|
3247
|
+
...options
|
|
3213
3248
|
}
|
|
3214
3249
|
);
|
|
3215
3250
|
};
|
|
@@ -3227,21 +3262,21 @@ var SET_SELF_COMMUNITY_MEMBERSHIP_QUERY_DATA = (client, keyParams, response, bas
|
|
|
3227
3262
|
};
|
|
3228
3263
|
var GetSelfCommunityMembership = async ({
|
|
3229
3264
|
communityId,
|
|
3230
|
-
|
|
3265
|
+
clientApiParams
|
|
3231
3266
|
}) => {
|
|
3267
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3232
3268
|
const { data } = await clientApi.get(
|
|
3233
3269
|
`/self/communities/${communityId}/membership`
|
|
3234
3270
|
);
|
|
3235
3271
|
return data;
|
|
3236
3272
|
};
|
|
3237
3273
|
var useGetSelfCommunityMembership = (communityId, options = {}) => {
|
|
3238
|
-
const { token } = useConnectedXM();
|
|
3239
3274
|
return useConnectedSingleQuery(
|
|
3240
3275
|
SELF_COMMUNITY_MEMBERSHIP_QUERY_KEY(communityId),
|
|
3241
3276
|
(params) => GetSelfCommunityMembership({ communityId, ...params }),
|
|
3242
3277
|
{
|
|
3243
3278
|
...options,
|
|
3244
|
-
enabled: !!
|
|
3279
|
+
enabled: !!communityId && (options?.enabled ?? true)
|
|
3245
3280
|
}
|
|
3246
3281
|
);
|
|
3247
3282
|
};
|
|
@@ -3257,9 +3292,10 @@ var GetSelfDelegateOf = async ({
|
|
|
3257
3292
|
orderBy,
|
|
3258
3293
|
search,
|
|
3259
3294
|
queryClient,
|
|
3260
|
-
|
|
3295
|
+
clientApiParams,
|
|
3261
3296
|
locale
|
|
3262
3297
|
}) => {
|
|
3298
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3263
3299
|
const { data } = await clientApi.get(`/self/delegateof`, {
|
|
3264
3300
|
params: {
|
|
3265
3301
|
page: pageParam || void 0,
|
|
@@ -3279,14 +3315,12 @@ var GetSelfDelegateOf = async ({
|
|
|
3279
3315
|
return data;
|
|
3280
3316
|
};
|
|
3281
3317
|
var useGetSelfDelegateOf = (params = {}, options = {}) => {
|
|
3282
|
-
const { token } = useConnectedXM();
|
|
3283
3318
|
return useConnectedInfiniteQuery(
|
|
3284
3319
|
SELF_DELEGATE_OF_QUERY_KEY(),
|
|
3285
3320
|
(params2) => GetSelfDelegateOf({ ...params2 }),
|
|
3286
3321
|
params,
|
|
3287
3322
|
{
|
|
3288
|
-
...options
|
|
3289
|
-
enabled: !!token
|
|
3323
|
+
...options
|
|
3290
3324
|
}
|
|
3291
3325
|
);
|
|
3292
3326
|
};
|
|
@@ -3302,9 +3336,10 @@ var GetSelfDelegates = async ({
|
|
|
3302
3336
|
orderBy,
|
|
3303
3337
|
search,
|
|
3304
3338
|
queryClient,
|
|
3305
|
-
|
|
3339
|
+
clientApiParams,
|
|
3306
3340
|
locale
|
|
3307
3341
|
}) => {
|
|
3342
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3308
3343
|
const { data } = await clientApi.get(`/self/delegates`, {
|
|
3309
3344
|
params: {
|
|
3310
3345
|
page: pageParam || void 0,
|
|
@@ -3324,14 +3359,12 @@ var GetSelfDelegates = async ({
|
|
|
3324
3359
|
return data;
|
|
3325
3360
|
};
|
|
3326
3361
|
var useGetSelfDelegates = (params = {}, options = {}) => {
|
|
3327
|
-
const { token } = useConnectedXM();
|
|
3328
3362
|
return useConnectedInfiniteQuery(
|
|
3329
3363
|
SELF_DELEGATES_QUERY_KEY(),
|
|
3330
3364
|
(params2) => GetSelfDelegates(params2),
|
|
3331
3365
|
params,
|
|
3332
3366
|
{
|
|
3333
|
-
...options
|
|
3334
|
-
enabled: !!token
|
|
3367
|
+
...options
|
|
3335
3368
|
}
|
|
3336
3369
|
);
|
|
3337
3370
|
};
|
|
@@ -3349,9 +3382,10 @@ var GetSelfEventListings = async ({
|
|
|
3349
3382
|
search,
|
|
3350
3383
|
past,
|
|
3351
3384
|
queryClient,
|
|
3352
|
-
|
|
3385
|
+
clientApiParams,
|
|
3353
3386
|
locale
|
|
3354
3387
|
}) => {
|
|
3388
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3355
3389
|
const { data } = await clientApi.get(`/self/events/listings`, {
|
|
3356
3390
|
params: {
|
|
3357
3391
|
page: pageParam || void 0,
|
|
@@ -3372,14 +3406,12 @@ var GetSelfEventListings = async ({
|
|
|
3372
3406
|
return data;
|
|
3373
3407
|
};
|
|
3374
3408
|
var useGetSelfEventListings = (past = false, params = {}, options = {}) => {
|
|
3375
|
-
const { token } = useConnectedXM();
|
|
3376
3409
|
return useConnectedInfiniteQuery(
|
|
3377
3410
|
SELF_EVENT_LISTINGS_QUERY_KEY(past),
|
|
3378
3411
|
(params2) => GetSelfEventListings({ past, ...params2 }),
|
|
3379
3412
|
params,
|
|
3380
3413
|
{
|
|
3381
|
-
...options
|
|
3382
|
-
enabled: !!token
|
|
3414
|
+
...options
|
|
3383
3415
|
}
|
|
3384
3416
|
);
|
|
3385
3417
|
};
|
|
@@ -3400,19 +3432,19 @@ var SET_SELF_EVENT_LISTING_QUERY_DATA = (client, keyParams, response, baseKeys =
|
|
|
3400
3432
|
};
|
|
3401
3433
|
var GetSelfEventListing = async ({
|
|
3402
3434
|
eventId,
|
|
3403
|
-
|
|
3435
|
+
clientApiParams
|
|
3404
3436
|
}) => {
|
|
3437
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3405
3438
|
const { data } = await clientApi.get(`self/events/listings/${eventId}`);
|
|
3406
3439
|
return data;
|
|
3407
3440
|
};
|
|
3408
3441
|
var useGetSelfEventListing = (eventId, options = {}) => {
|
|
3409
|
-
const { token } = useConnectedXM();
|
|
3410
3442
|
return useConnectedSingleQuery(
|
|
3411
3443
|
SELF_EVENT_LISTING_QUERY_KEY(eventId),
|
|
3412
3444
|
(params) => GetSelfEventListing({ eventId, ...params }),
|
|
3413
3445
|
{
|
|
3414
3446
|
...options,
|
|
3415
|
-
enabled: !!
|
|
3447
|
+
enabled: !!eventId && (options?.enabled ?? true)
|
|
3416
3448
|
}
|
|
3417
3449
|
);
|
|
3418
3450
|
};
|
|
@@ -3430,8 +3462,9 @@ var GetSelfEventListingRegistrations = async ({
|
|
|
3430
3462
|
orderBy,
|
|
3431
3463
|
search,
|
|
3432
3464
|
checkedIn,
|
|
3433
|
-
|
|
3465
|
+
clientApiParams
|
|
3434
3466
|
}) => {
|
|
3467
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3435
3468
|
const { data } = await clientApi.get(
|
|
3436
3469
|
`/self/events/listings/${eventId}/registrations`,
|
|
3437
3470
|
{
|
|
@@ -3447,14 +3480,13 @@ var GetSelfEventListingRegistrations = async ({
|
|
|
3447
3480
|
return data;
|
|
3448
3481
|
};
|
|
3449
3482
|
var useGetSelfEventListingsRegistrations = (eventId, checkedIn = false, params = {}, options = {}) => {
|
|
3450
|
-
const { token } = useConnectedXM();
|
|
3451
3483
|
return useConnectedInfiniteQuery(
|
|
3452
3484
|
SELF_EVENT_LISTING_REGISTRATIONS_QUERY_KEY(eventId, checkedIn),
|
|
3453
3485
|
(params2) => GetSelfEventListingRegistrations({ eventId, checkedIn, ...params2 }),
|
|
3454
3486
|
params,
|
|
3455
3487
|
{
|
|
3456
3488
|
...options,
|
|
3457
|
-
enabled: !!
|
|
3489
|
+
enabled: !!eventId && (options?.enabled ?? true)
|
|
3458
3490
|
}
|
|
3459
3491
|
);
|
|
3460
3492
|
};
|
|
@@ -3472,9 +3504,10 @@ var GetSelfEvents = async ({
|
|
|
3472
3504
|
search,
|
|
3473
3505
|
past,
|
|
3474
3506
|
queryClient,
|
|
3475
|
-
|
|
3507
|
+
clientApiParams,
|
|
3476
3508
|
locale
|
|
3477
3509
|
}) => {
|
|
3510
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3478
3511
|
const { data } = await clientApi.get(`/self/events`, {
|
|
3479
3512
|
params: {
|
|
3480
3513
|
page: pageParam || void 0,
|
|
@@ -3495,14 +3528,13 @@ var GetSelfEvents = async ({
|
|
|
3495
3528
|
return data;
|
|
3496
3529
|
};
|
|
3497
3530
|
var useGetSelfEvents = (past = false, params = {}, options = {}) => {
|
|
3498
|
-
const { token } = useConnectedXM();
|
|
3499
3531
|
return useConnectedInfiniteQuery(
|
|
3500
3532
|
SELF_EVENTS_QUERY_KEY(past),
|
|
3501
3533
|
(params2) => GetSelfEvents({ ...params2, past }),
|
|
3502
3534
|
params,
|
|
3503
3535
|
{
|
|
3504
3536
|
...options,
|
|
3505
|
-
enabled:
|
|
3537
|
+
enabled: options.enabled ?? true
|
|
3506
3538
|
}
|
|
3507
3539
|
);
|
|
3508
3540
|
};
|
|
@@ -3520,9 +3552,10 @@ var GetSelfEventSessions = async ({
|
|
|
3520
3552
|
orderBy,
|
|
3521
3553
|
search,
|
|
3522
3554
|
queryClient,
|
|
3523
|
-
|
|
3555
|
+
clientApiParams,
|
|
3524
3556
|
locale
|
|
3525
3557
|
}) => {
|
|
3558
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3526
3559
|
const { data } = await clientApi.get(`/self/events/${eventId}/sessions`, {
|
|
3527
3560
|
params: {
|
|
3528
3561
|
eventId: eventId || void 0,
|
|
@@ -3543,14 +3576,13 @@ var GetSelfEventSessions = async ({
|
|
|
3543
3576
|
return data;
|
|
3544
3577
|
};
|
|
3545
3578
|
var useGetSelfEventSessions = (eventId, params = {}, options = {}) => {
|
|
3546
|
-
const { token } = useConnectedXM();
|
|
3547
3579
|
return useConnectedInfiniteQuery(
|
|
3548
3580
|
SELF_EVENT_SESSIONS_QUERY_KEY(eventId),
|
|
3549
3581
|
(params2) => GetSelfEventSessions({ eventId, ...params2 }),
|
|
3550
3582
|
params,
|
|
3551
3583
|
{
|
|
3552
3584
|
...options,
|
|
3553
|
-
enabled: !!
|
|
3585
|
+
enabled: !!eventId && (options.enabled ?? true)
|
|
3554
3586
|
}
|
|
3555
3587
|
);
|
|
3556
3588
|
};
|
|
@@ -3566,9 +3598,10 @@ var GetSelfFeed = async ({
|
|
|
3566
3598
|
orderBy,
|
|
3567
3599
|
search,
|
|
3568
3600
|
queryClient,
|
|
3569
|
-
|
|
3601
|
+
clientApiParams,
|
|
3570
3602
|
locale
|
|
3571
3603
|
}) => {
|
|
3604
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3572
3605
|
const { data } = await clientApi.get(`/self/activities/feed`, {
|
|
3573
3606
|
params: {
|
|
3574
3607
|
page: pageParam || void 0,
|
|
@@ -3588,14 +3621,12 @@ var GetSelfFeed = async ({
|
|
|
3588
3621
|
return data;
|
|
3589
3622
|
};
|
|
3590
3623
|
var useGetSelfFeed = (params = {}, options = {}) => {
|
|
3591
|
-
const { token } = useConnectedXM();
|
|
3592
3624
|
return useConnectedInfiniteQuery(
|
|
3593
3625
|
SELF_FEED_QUERY_KEY(),
|
|
3594
3626
|
(params2) => GetSelfFeed(params2),
|
|
3595
3627
|
params,
|
|
3596
3628
|
{
|
|
3597
|
-
...options
|
|
3598
|
-
enabled: !!token && (options?.enabled ?? true)
|
|
3629
|
+
...options
|
|
3599
3630
|
}
|
|
3600
3631
|
);
|
|
3601
3632
|
};
|
|
@@ -3610,8 +3641,9 @@ var GetSelfInterests = async ({
|
|
|
3610
3641
|
pageSize,
|
|
3611
3642
|
orderBy,
|
|
3612
3643
|
search,
|
|
3613
|
-
|
|
3644
|
+
clientApiParams
|
|
3614
3645
|
}) => {
|
|
3646
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3615
3647
|
const { data } = await clientApi.get(`/self/interests`, {
|
|
3616
3648
|
params: {
|
|
3617
3649
|
page: pageParam || void 0,
|
|
@@ -3623,14 +3655,12 @@ var GetSelfInterests = async ({
|
|
|
3623
3655
|
return data;
|
|
3624
3656
|
};
|
|
3625
3657
|
var useGetSelfInterests = (params = {}, options = {}) => {
|
|
3626
|
-
const { token } = useConnectedXM();
|
|
3627
3658
|
return useConnectedInfiniteQuery(
|
|
3628
3659
|
SELF_INTERESTS_QUERY_KEY(),
|
|
3629
3660
|
(params2) => GetSelfInterests({ ...params2 }),
|
|
3630
3661
|
params,
|
|
3631
3662
|
{
|
|
3632
|
-
...options
|
|
3633
|
-
enabled: !!token && (options?.enabled ?? true)
|
|
3663
|
+
...options
|
|
3634
3664
|
}
|
|
3635
3665
|
);
|
|
3636
3666
|
};
|
|
@@ -3641,19 +3671,18 @@ var SELF_PREFERENCES_QUERY_KEY = () => [
|
|
|
3641
3671
|
"PREFERENCES"
|
|
3642
3672
|
];
|
|
3643
3673
|
var GetSelfNotificationPreferences = async ({
|
|
3644
|
-
|
|
3674
|
+
clientApiParams
|
|
3645
3675
|
}) => {
|
|
3676
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3646
3677
|
const { data } = await clientApi.get(`/self/notificationPreferences`);
|
|
3647
3678
|
return data;
|
|
3648
3679
|
};
|
|
3649
3680
|
var useGetSelfNotificationPreferences = (options = {}) => {
|
|
3650
|
-
const { token } = useConnectedXM();
|
|
3651
3681
|
return useConnectedSingleQuery(
|
|
3652
3682
|
SELF_PREFERENCES_QUERY_KEY(),
|
|
3653
3683
|
(params) => GetSelfNotificationPreferences({ ...params }),
|
|
3654
3684
|
{
|
|
3655
|
-
...options
|
|
3656
|
-
enabled: !!token && (options?.enabled ?? true)
|
|
3685
|
+
...options
|
|
3657
3686
|
}
|
|
3658
3687
|
);
|
|
3659
3688
|
};
|
|
@@ -3670,8 +3699,9 @@ var GetSelfNotifications = async ({
|
|
|
3670
3699
|
orderBy,
|
|
3671
3700
|
search,
|
|
3672
3701
|
filters,
|
|
3673
|
-
|
|
3702
|
+
clientApiParams
|
|
3674
3703
|
}) => {
|
|
3704
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3675
3705
|
const { data } = await clientApi.get(`/self/notifications`, {
|
|
3676
3706
|
params: {
|
|
3677
3707
|
page: pageParam || void 0,
|
|
@@ -3684,15 +3714,13 @@ var GetSelfNotifications = async ({
|
|
|
3684
3714
|
return data;
|
|
3685
3715
|
};
|
|
3686
3716
|
var useGetSelfNotifications = (filters = "", params = {}, options = {}) => {
|
|
3687
|
-
const { token } = useConnectedXM();
|
|
3688
3717
|
return useConnectedInfiniteQuery(
|
|
3689
3718
|
SELF_NOTIFICATIONS_QUERY_KEY(filters),
|
|
3690
3719
|
(params2) => GetSelfNotifications({ ...params2, filters }),
|
|
3691
3720
|
params,
|
|
3692
3721
|
{
|
|
3693
3722
|
staleTime: 0,
|
|
3694
|
-
...options
|
|
3695
|
-
enabled: !!token && (options?.enabled ?? true)
|
|
3723
|
+
...options
|
|
3696
3724
|
}
|
|
3697
3725
|
);
|
|
3698
3726
|
};
|
|
@@ -3701,8 +3729,9 @@ var useGetSelfNotifications = (filters = "", params = {}, options = {}) => {
|
|
|
3701
3729
|
var SELF_NOTIFICATION_COUNT_QUERY_KEY = (filters) => [...SELF_QUERY_KEY(), "NOTIFICATION_COUNT", filters];
|
|
3702
3730
|
var GetSelfNewNotificationsCount = async ({
|
|
3703
3731
|
filters,
|
|
3704
|
-
|
|
3732
|
+
clientApiParams
|
|
3705
3733
|
}) => {
|
|
3734
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3706
3735
|
const { data } = await clientApi.get(`/self/notifications/count`, {
|
|
3707
3736
|
params: {
|
|
3708
3737
|
filters
|
|
@@ -3711,13 +3740,11 @@ var GetSelfNewNotificationsCount = async ({
|
|
|
3711
3740
|
return data;
|
|
3712
3741
|
};
|
|
3713
3742
|
var useGetSelfNewNotificationsCount = (filters = "", options = {}) => {
|
|
3714
|
-
const { token } = useConnectedXM();
|
|
3715
3743
|
return useConnectedSingleQuery_default(
|
|
3716
3744
|
SELF_NOTIFICATION_COUNT_QUERY_KEY(filters),
|
|
3717
3745
|
(params) => GetSelfNewNotificationsCount({ filters, ...params }),
|
|
3718
3746
|
{
|
|
3719
|
-
...options
|
|
3720
|
-
enabled: !!token && (options?.enabled ?? true)
|
|
3747
|
+
...options
|
|
3721
3748
|
}
|
|
3722
3749
|
);
|
|
3723
3750
|
};
|
|
@@ -3733,9 +3760,10 @@ var GetSelfPushDevices = async ({
|
|
|
3733
3760
|
orderBy,
|
|
3734
3761
|
search,
|
|
3735
3762
|
queryClient,
|
|
3736
|
-
|
|
3763
|
+
clientApiParams,
|
|
3737
3764
|
locale
|
|
3738
3765
|
}) => {
|
|
3766
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3739
3767
|
const { data } = await clientApi.get(`/self/push-devices`, {
|
|
3740
3768
|
params: {
|
|
3741
3769
|
page: pageParam || void 0,
|
|
@@ -3755,14 +3783,12 @@ var GetSelfPushDevices = async ({
|
|
|
3755
3783
|
return data;
|
|
3756
3784
|
};
|
|
3757
3785
|
var useGetSelfPushDevices = (params = {}, options = {}) => {
|
|
3758
|
-
const { token } = useConnectedXM();
|
|
3759
3786
|
return useConnectedInfiniteQuery(
|
|
3760
3787
|
SELF_PUSH_DEVICES_QUERY_KEY(),
|
|
3761
3788
|
(params2) => GetSelfPushDevices({ ...params2 }),
|
|
3762
3789
|
params,
|
|
3763
3790
|
{
|
|
3764
|
-
...options
|
|
3765
|
-
enabled: !!token
|
|
3791
|
+
...options
|
|
3766
3792
|
}
|
|
3767
3793
|
);
|
|
3768
3794
|
};
|
|
@@ -3783,19 +3809,19 @@ var SET_PUSH_DEVICE_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]
|
|
|
3783
3809
|
};
|
|
3784
3810
|
var GetSelfPushDevice = async ({
|
|
3785
3811
|
pushDeviceId,
|
|
3786
|
-
|
|
3812
|
+
clientApiParams
|
|
3787
3813
|
}) => {
|
|
3814
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3788
3815
|
const { data } = await clientApi.get(`/self/push-devices/${pushDeviceId}`);
|
|
3789
3816
|
return data;
|
|
3790
3817
|
};
|
|
3791
3818
|
var useGetSelfPushDevice = (pushDeviceId, options = {}) => {
|
|
3792
|
-
const { token } = useConnectedXM();
|
|
3793
3819
|
return useConnectedSingleQuery(
|
|
3794
3820
|
SELF_PUSH_DEVICE_QUERY_KEY(pushDeviceId),
|
|
3795
3821
|
(params) => GetSelfPushDevice({ pushDeviceId, ...params }),
|
|
3796
3822
|
{
|
|
3797
3823
|
...options,
|
|
3798
|
-
enabled: !!
|
|
3824
|
+
enabled: !!pushDeviceId && (options?.enabled ?? true)
|
|
3799
3825
|
}
|
|
3800
3826
|
);
|
|
3801
3827
|
};
|
|
@@ -3815,9 +3841,10 @@ var GetSelfRecommendations = async ({
|
|
|
3815
3841
|
eventId,
|
|
3816
3842
|
type,
|
|
3817
3843
|
queryClient,
|
|
3818
|
-
|
|
3844
|
+
clientApiParams,
|
|
3819
3845
|
locale
|
|
3820
3846
|
}) => {
|
|
3847
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3821
3848
|
const { data } = await clientApi.get(`/self/recommendations`, {
|
|
3822
3849
|
params: {
|
|
3823
3850
|
page: pageParam || void 0,
|
|
@@ -3839,14 +3866,12 @@ var GetSelfRecommendations = async ({
|
|
|
3839
3866
|
return data;
|
|
3840
3867
|
};
|
|
3841
3868
|
var useGetSelfRecommendations = (type, eventId = "", params = {}, options = {}) => {
|
|
3842
|
-
const { token } = useConnectedXM();
|
|
3843
3869
|
return useConnectedInfiniteQuery(
|
|
3844
3870
|
SELF_RECOMMENDATIONS_QUERY_KEY(type, eventId),
|
|
3845
3871
|
(params2) => GetSelfRecommendations({ ...params2, eventId, type }),
|
|
3846
3872
|
params,
|
|
3847
3873
|
{
|
|
3848
|
-
...options
|
|
3849
|
-
enabled: !!token
|
|
3874
|
+
...options
|
|
3850
3875
|
}
|
|
3851
3876
|
);
|
|
3852
3877
|
};
|
|
@@ -3861,8 +3886,9 @@ var GetSelfTransfers = async ({
|
|
|
3861
3886
|
pageSize,
|
|
3862
3887
|
orderBy,
|
|
3863
3888
|
search,
|
|
3864
|
-
|
|
3889
|
+
clientApiParams
|
|
3865
3890
|
}) => {
|
|
3891
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3866
3892
|
const { data } = await clientApi.get(`/self/transfers`, {
|
|
3867
3893
|
params: {
|
|
3868
3894
|
page: pageParam || void 0,
|
|
@@ -3874,14 +3900,12 @@ var GetSelfTransfers = async ({
|
|
|
3874
3900
|
return data;
|
|
3875
3901
|
};
|
|
3876
3902
|
var useGetSelfTransfers = (params = {}, options = {}) => {
|
|
3877
|
-
const { token } = useConnectedXM();
|
|
3878
3903
|
return useConnectedInfiniteQuery(
|
|
3879
3904
|
SELF_TRANSFERS_QUERY_KEY(),
|
|
3880
3905
|
(params2) => GetSelfTransfers({ ...params2 }),
|
|
3881
3906
|
params,
|
|
3882
3907
|
{
|
|
3883
|
-
...options
|
|
3884
|
-
enabled: !!token && (options?.enabled ?? true)
|
|
3908
|
+
...options
|
|
3885
3909
|
}
|
|
3886
3910
|
);
|
|
3887
3911
|
};
|
|
@@ -3890,19 +3914,19 @@ var useGetSelfTransfers = (params = {}, options = {}) => {
|
|
|
3890
3914
|
var SELF_PENDING_TRANSFER_QUERY_KEY = (transferId) => [...SELF_TRANSFERS_QUERY_KEY(), transferId];
|
|
3891
3915
|
var GetSelfTransfer = async ({
|
|
3892
3916
|
transferId,
|
|
3893
|
-
|
|
3917
|
+
clientApiParams
|
|
3894
3918
|
}) => {
|
|
3919
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3895
3920
|
const { data } = await clientApi.get(`/self/transfers/${transferId}`);
|
|
3896
3921
|
return data;
|
|
3897
3922
|
};
|
|
3898
3923
|
var useGetSelfTransfer = (transferId = "", options = {}) => {
|
|
3899
|
-
const { token } = useConnectedXM();
|
|
3900
3924
|
return useConnectedSingleQuery(
|
|
3901
3925
|
SELF_PENDING_TRANSFER_QUERY_KEY(transferId),
|
|
3902
3926
|
(params) => GetSelfTransfer({ ...params, transferId }),
|
|
3903
3927
|
{
|
|
3904
3928
|
...options,
|
|
3905
|
-
enabled: !!
|
|
3929
|
+
enabled: !!transferId && (options?.enabled ?? true)
|
|
3906
3930
|
}
|
|
3907
3931
|
);
|
|
3908
3932
|
};
|
|
@@ -3924,9 +3948,10 @@ var GetSeriesList = async ({
|
|
|
3924
3948
|
orderBy,
|
|
3925
3949
|
search,
|
|
3926
3950
|
queryClient,
|
|
3927
|
-
|
|
3951
|
+
clientApiParams,
|
|
3928
3952
|
locale
|
|
3929
3953
|
}) => {
|
|
3954
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3930
3955
|
const { data } = await clientApi.get(`/series`, {
|
|
3931
3956
|
params: {
|
|
3932
3957
|
page: pageParam || void 0,
|
|
@@ -3967,12 +3992,13 @@ var SET_SERIES_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) =>
|
|
|
3967
3992
|
};
|
|
3968
3993
|
var GetSeries = async ({
|
|
3969
3994
|
seriesId,
|
|
3970
|
-
|
|
3995
|
+
clientApiParams
|
|
3971
3996
|
}) => {
|
|
3997
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
3972
3998
|
const { data } = await clientApi.get(`/series/${seriesId}`);
|
|
3973
3999
|
return data;
|
|
3974
4000
|
};
|
|
3975
|
-
var useGetSeries = (seriesId, options = {}) => {
|
|
4001
|
+
var useGetSeries = (seriesId = "", options = {}) => {
|
|
3976
4002
|
return useConnectedSingleQuery(
|
|
3977
4003
|
SERIES_QUERY_KEY(seriesId),
|
|
3978
4004
|
(params) => GetSeries({ seriesId, ...params }),
|
|
@@ -4004,9 +4030,10 @@ var GetSeriesEvents = async ({
|
|
|
4004
4030
|
orderBy,
|
|
4005
4031
|
search,
|
|
4006
4032
|
queryClient,
|
|
4007
|
-
|
|
4033
|
+
clientApiParams,
|
|
4008
4034
|
locale
|
|
4009
4035
|
}) => {
|
|
4036
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4010
4037
|
const { data } = await clientApi.get(`/series/${seriesId}/events`, {
|
|
4011
4038
|
params: {
|
|
4012
4039
|
page: pageParam || void 0,
|
|
@@ -4025,7 +4052,7 @@ var GetSeriesEvents = async ({
|
|
|
4025
4052
|
}
|
|
4026
4053
|
return data;
|
|
4027
4054
|
};
|
|
4028
|
-
var useGetSeriesEvents = (seriesId, params = {}, options = {}) => {
|
|
4055
|
+
var useGetSeriesEvents = (seriesId = "", params = {}, options = {}) => {
|
|
4029
4056
|
return useConnectedInfiniteQuery(
|
|
4030
4057
|
SERIES_EVENTS_QUERY_KEY(seriesId),
|
|
4031
4058
|
(params2) => GetSeriesEvents({ seriesId, ...params2 }),
|
|
@@ -4054,9 +4081,10 @@ var GetLevels = async ({
|
|
|
4054
4081
|
orderBy,
|
|
4055
4082
|
search,
|
|
4056
4083
|
queryClient,
|
|
4057
|
-
|
|
4084
|
+
clientApiParams,
|
|
4058
4085
|
locale
|
|
4059
4086
|
}) => {
|
|
4087
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4060
4088
|
const { data } = await clientApi.get(`/levels`, {
|
|
4061
4089
|
params: {
|
|
4062
4090
|
page: pageParam || void 0,
|
|
@@ -4097,12 +4125,13 @@ var SET_LEVEL_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
|
|
|
4097
4125
|
};
|
|
4098
4126
|
var GetLevel = async ({
|
|
4099
4127
|
levelId,
|
|
4100
|
-
|
|
4128
|
+
clientApiParams
|
|
4101
4129
|
}) => {
|
|
4130
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4102
4131
|
const { data } = await clientApi.get(`/levels/${levelId}`, {});
|
|
4103
4132
|
return data;
|
|
4104
4133
|
};
|
|
4105
|
-
var useGetLevel = (levelId, options = {}) => {
|
|
4134
|
+
var useGetLevel = (levelId = "", options = {}) => {
|
|
4106
4135
|
return useConnectedSingleQuery_default(
|
|
4107
4136
|
LEVEL_QUERY_KEY(levelId),
|
|
4108
4137
|
(params) => GetLevel({ levelId, ...params }),
|
|
@@ -4134,9 +4163,10 @@ var GetLevelSponsors = async ({
|
|
|
4134
4163
|
orderBy,
|
|
4135
4164
|
search,
|
|
4136
4165
|
queryClient,
|
|
4137
|
-
|
|
4166
|
+
clientApiParams,
|
|
4138
4167
|
locale
|
|
4139
4168
|
}) => {
|
|
4169
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4140
4170
|
const { data } = await clientApi.get(`/levels/${levelId}/accounts`, {
|
|
4141
4171
|
params: {
|
|
4142
4172
|
page: pageParam || void 0,
|
|
@@ -4155,7 +4185,7 @@ var GetLevelSponsors = async ({
|
|
|
4155
4185
|
}
|
|
4156
4186
|
return data;
|
|
4157
4187
|
};
|
|
4158
|
-
var useGetLevelSponsors = (levelId, params = {}, options = {}) => {
|
|
4188
|
+
var useGetLevelSponsors = (levelId = "", params = {}, options = {}) => {
|
|
4159
4189
|
return useConnectedInfiniteQuery(
|
|
4160
4190
|
LEVEL_SPONSORS_QUERY_KEY(levelId),
|
|
4161
4191
|
(params2) => GetLevelSponsors({ levelId, ...params2 }),
|
|
@@ -4170,18 +4200,23 @@ var useGetLevelSponsors = (levelId, params = {}, options = {}) => {
|
|
|
4170
4200
|
// src/mutations/useConnectedMutation.ts
|
|
4171
4201
|
import {
|
|
4172
4202
|
useMutation,
|
|
4173
|
-
useQueryClient
|
|
4203
|
+
useQueryClient
|
|
4174
4204
|
} from "@tanstack/react-query";
|
|
4175
4205
|
var useConnectedMutation = (mutation, params, options) => {
|
|
4176
|
-
const { locale } = useConnectedXM();
|
|
4177
|
-
const queryClient =
|
|
4178
|
-
const clientApi = useClientAPI();
|
|
4206
|
+
const { locale, apiUrl, getToken, organizationId, getExecuteAs } = useConnectedXM();
|
|
4207
|
+
const queryClient = useQueryClient();
|
|
4179
4208
|
return useMutation({
|
|
4180
4209
|
mutationFn: (data) => mutation({
|
|
4181
|
-
locale: params?.locale || locale,
|
|
4182
|
-
...data,
|
|
4183
4210
|
queryClient,
|
|
4184
|
-
|
|
4211
|
+
locale: params?.locale || locale,
|
|
4212
|
+
clientApiParams: {
|
|
4213
|
+
apiUrl,
|
|
4214
|
+
getToken,
|
|
4215
|
+
organizationId,
|
|
4216
|
+
getExecuteAs,
|
|
4217
|
+
locale: params?.locale || locale
|
|
4218
|
+
},
|
|
4219
|
+
...data
|
|
4185
4220
|
}),
|
|
4186
4221
|
...options
|
|
4187
4222
|
});
|
|
@@ -4191,10 +4226,11 @@ var useConnectedMutation_default = useConnectedMutation;
|
|
|
4191
4226
|
// src/mutations/accounts/useFollowAccount.ts
|
|
4192
4227
|
var FollowAccount = async ({
|
|
4193
4228
|
accountId,
|
|
4194
|
-
|
|
4229
|
+
clientApiParams,
|
|
4195
4230
|
queryClient,
|
|
4196
4231
|
locale = "en"
|
|
4197
4232
|
}) => {
|
|
4233
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4198
4234
|
const { data } = await clientApi.post(
|
|
4199
4235
|
`/accounts/${accountId}/follow`
|
|
4200
4236
|
);
|
|
@@ -4214,10 +4250,11 @@ var useFollowAccount = (params = {}, options = {}) => {
|
|
|
4214
4250
|
// src/mutations/accounts/useUnfollowAccount.ts
|
|
4215
4251
|
var UnfollowAccount = async ({
|
|
4216
4252
|
accountId,
|
|
4217
|
-
|
|
4253
|
+
clientApiParams,
|
|
4218
4254
|
queryClient,
|
|
4219
4255
|
locale = "en"
|
|
4220
4256
|
}) => {
|
|
4257
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4221
4258
|
const { data } = await clientApi.post(
|
|
4222
4259
|
`/accounts/${accountId}/unfollow`
|
|
4223
4260
|
);
|
|
@@ -4292,7 +4329,7 @@ var UpdateResharesInfinite = (increment, queryClient, KEY, activityId) => {
|
|
|
4292
4329
|
// src/mutations/activities/useDeleteReshare.ts
|
|
4293
4330
|
var DeleteReshare = async ({
|
|
4294
4331
|
activityId,
|
|
4295
|
-
|
|
4332
|
+
clientApiParams,
|
|
4296
4333
|
queryClient
|
|
4297
4334
|
}) => {
|
|
4298
4335
|
if (queryClient) {
|
|
@@ -4304,6 +4341,7 @@ var DeleteReshare = async ({
|
|
|
4304
4341
|
activityId
|
|
4305
4342
|
);
|
|
4306
4343
|
}
|
|
4344
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4307
4345
|
const { data } = await clientApi.delete(
|
|
4308
4346
|
`/self/activities/${activityId}/reshares`
|
|
4309
4347
|
);
|
|
@@ -4371,13 +4409,14 @@ var UpdateLikesInfinite = (increment, queryClient, KEY, activityId) => {
|
|
|
4371
4409
|
// src/mutations/activities/useLikeActivity.ts
|
|
4372
4410
|
var LikeActivity = async ({
|
|
4373
4411
|
activityId,
|
|
4374
|
-
|
|
4412
|
+
clientApiParams,
|
|
4375
4413
|
queryClient
|
|
4376
4414
|
}) => {
|
|
4377
4415
|
if (queryClient) {
|
|
4378
4416
|
UpdateLikesSingle(true, queryClient, ACTIVITY_QUERY_KEY(activityId));
|
|
4379
4417
|
UpdateLikesInfinite(true, queryClient, ACTIVITIES_QUERY_KEY(), activityId);
|
|
4380
4418
|
}
|
|
4419
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4381
4420
|
const { data } = await clientApi.post(
|
|
4382
4421
|
`/self/activities/${activityId}/likes`
|
|
4383
4422
|
);
|
|
@@ -4391,7 +4430,7 @@ var useLikeActivity = (params = {}, options = {}) => {
|
|
|
4391
4430
|
var ReshareActivity = async ({
|
|
4392
4431
|
activityId,
|
|
4393
4432
|
queryClient,
|
|
4394
|
-
|
|
4433
|
+
clientApiParams
|
|
4395
4434
|
}) => {
|
|
4396
4435
|
if (queryClient) {
|
|
4397
4436
|
UpdateResharesSingle(true, queryClient, ACTIVITY_QUERY_KEY(activityId));
|
|
@@ -4402,6 +4441,7 @@ var ReshareActivity = async ({
|
|
|
4402
4441
|
activityId
|
|
4403
4442
|
);
|
|
4404
4443
|
}
|
|
4444
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4405
4445
|
const { data } = await clientApi.post(
|
|
4406
4446
|
`/self/activities/${activityId}/reshares`,
|
|
4407
4447
|
{
|
|
@@ -4417,13 +4457,14 @@ var useReshareActivity = (params = {}, options = {}) => {
|
|
|
4417
4457
|
// src/mutations/activities/useUnlikeActivity.ts
|
|
4418
4458
|
var UnlikeActivity = async ({
|
|
4419
4459
|
activityId,
|
|
4420
|
-
|
|
4460
|
+
clientApiParams,
|
|
4421
4461
|
queryClient
|
|
4422
4462
|
}) => {
|
|
4423
4463
|
if (queryClient) {
|
|
4424
4464
|
UpdateLikesSingle(false, queryClient, ACTIVITY_QUERY_KEY(activityId));
|
|
4425
4465
|
UpdateLikesInfinite(false, queryClient, ACTIVITIES_QUERY_KEY(), activityId);
|
|
4426
4466
|
}
|
|
4467
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4427
4468
|
const { data } = await clientApi.delete(
|
|
4428
4469
|
`/self/activities/${activityId}/likes`
|
|
4429
4470
|
);
|
|
@@ -4437,9 +4478,10 @@ var useUnlikeActivity = (params = {}, options = {}) => {
|
|
|
4437
4478
|
var AddCommunityEvent = async ({
|
|
4438
4479
|
communityId,
|
|
4439
4480
|
eventId,
|
|
4440
|
-
|
|
4481
|
+
clientApiParams,
|
|
4441
4482
|
queryClient
|
|
4442
4483
|
}) => {
|
|
4484
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4443
4485
|
const { data } = await clientApi.post(
|
|
4444
4486
|
`/communityModerator/${communityId}/events/${eventId}`
|
|
4445
4487
|
);
|
|
@@ -4467,9 +4509,10 @@ var CreateCommunityAnnouncement = async ({
|
|
|
4467
4509
|
html,
|
|
4468
4510
|
email,
|
|
4469
4511
|
push,
|
|
4470
|
-
|
|
4512
|
+
clientApiParams,
|
|
4471
4513
|
queryClient
|
|
4472
4514
|
}) => {
|
|
4515
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4473
4516
|
const { data } = await clientApi.post(
|
|
4474
4517
|
`/communityModerator/${communityId}/announcements`,
|
|
4475
4518
|
{
|
|
@@ -4496,9 +4539,10 @@ var useCreateCommunityAnnouncement = (params = {}, options = {}) => {
|
|
|
4496
4539
|
var RemoveCommunityEvent = async ({
|
|
4497
4540
|
communityId,
|
|
4498
4541
|
eventId,
|
|
4499
|
-
|
|
4542
|
+
clientApiParams,
|
|
4500
4543
|
queryClient
|
|
4501
4544
|
}) => {
|
|
4545
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4502
4546
|
const { data } = await clientApi.delete(
|
|
4503
4547
|
`/communityModerator/${communityId}/events/${eventId}`
|
|
4504
4548
|
);
|
|
@@ -4525,10 +4569,11 @@ var UpdateCommunity = async ({
|
|
|
4525
4569
|
description,
|
|
4526
4570
|
externalUrl,
|
|
4527
4571
|
base64,
|
|
4528
|
-
|
|
4572
|
+
clientApiParams,
|
|
4529
4573
|
queryClient,
|
|
4530
4574
|
locale = "en"
|
|
4531
4575
|
}) => {
|
|
4576
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4532
4577
|
const { data } = await clientApi.put(
|
|
4533
4578
|
`/communityModerator/${communityId}`,
|
|
4534
4579
|
{
|
|
@@ -4555,9 +4600,10 @@ var CompleteEventActivation = async ({
|
|
|
4555
4600
|
eventId,
|
|
4556
4601
|
activationId,
|
|
4557
4602
|
code,
|
|
4558
|
-
|
|
4603
|
+
clientApiParams,
|
|
4559
4604
|
queryClient
|
|
4560
4605
|
}) => {
|
|
4606
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4561
4607
|
const { data } = await clientApi.post(
|
|
4562
4608
|
`/events/${eventId}/activations/${activationId}`,
|
|
4563
4609
|
{
|
|
@@ -4577,9 +4623,10 @@ var CreateEventLead = async ({
|
|
|
4577
4623
|
eventId,
|
|
4578
4624
|
purchaseId,
|
|
4579
4625
|
note,
|
|
4580
|
-
|
|
4626
|
+
clientApiParams,
|
|
4581
4627
|
queryClient
|
|
4582
4628
|
}) => {
|
|
4629
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4583
4630
|
const { data } = await clientApi.post(
|
|
4584
4631
|
`/events/${eventId}/leads/${purchaseId}`,
|
|
4585
4632
|
{
|
|
@@ -4598,9 +4645,10 @@ var useCreateEventLead = (params = {}, options = {}) => {
|
|
|
4598
4645
|
var AddSelfChatChannelMember = async ({
|
|
4599
4646
|
channelId,
|
|
4600
4647
|
accountId,
|
|
4601
|
-
|
|
4648
|
+
clientApiParams,
|
|
4602
4649
|
queryClient
|
|
4603
4650
|
}) => {
|
|
4651
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4604
4652
|
const { data } = await clientApi.post(
|
|
4605
4653
|
`/self/chat/channels/${channelId}/members/${accountId}`
|
|
4606
4654
|
);
|
|
@@ -4619,9 +4667,10 @@ var useAddSelfChatChannelMember = (params = {}, options = {}) => {
|
|
|
4619
4667
|
var CreateSelfChatChannel = async ({
|
|
4620
4668
|
name,
|
|
4621
4669
|
accountIds,
|
|
4622
|
-
|
|
4670
|
+
clientApiParams,
|
|
4623
4671
|
queryClient
|
|
4624
4672
|
}) => {
|
|
4673
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4625
4674
|
const { data } = await clientApi.post(
|
|
4626
4675
|
`/self/chat/channels`,
|
|
4627
4676
|
{
|
|
@@ -4645,8 +4694,9 @@ var CreateSelfChatChannelMessage = async ({
|
|
|
4645
4694
|
channelId,
|
|
4646
4695
|
text,
|
|
4647
4696
|
queryClient,
|
|
4648
|
-
|
|
4697
|
+
clientApiParams
|
|
4649
4698
|
}) => {
|
|
4699
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4650
4700
|
const { data } = await clientApi.post(`/self/chat/channels/${channelId}/messages`, {
|
|
4651
4701
|
text
|
|
4652
4702
|
});
|
|
@@ -4661,9 +4711,10 @@ var useCreateSelfChatChannelMessage = (params = {}, options = {}) => {
|
|
|
4661
4711
|
// src/mutations/self/chat/useDeleteSelfChatChannel.ts
|
|
4662
4712
|
var DeleteSelfChatChannel = async ({
|
|
4663
4713
|
channelId,
|
|
4664
|
-
|
|
4714
|
+
clientApiParams,
|
|
4665
4715
|
queryClient
|
|
4666
4716
|
}) => {
|
|
4717
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4667
4718
|
const { data } = await clientApi.delete(
|
|
4668
4719
|
`/self/chat/channels/${channelId}`
|
|
4669
4720
|
);
|
|
@@ -4683,9 +4734,10 @@ var useDeleteSelfChatChannel = (params = {}, options = {}) => {
|
|
|
4683
4734
|
var DeleteSelfChatChannelMessage = async ({
|
|
4684
4735
|
channelId,
|
|
4685
4736
|
messageId,
|
|
4686
|
-
|
|
4737
|
+
clientApiParams,
|
|
4687
4738
|
queryClient
|
|
4688
4739
|
}) => {
|
|
4740
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4689
4741
|
const { data } = await clientApi.delete(
|
|
4690
4742
|
`/self/chat/channels/${channelId}/messages/${messageId}`
|
|
4691
4743
|
);
|
|
@@ -4703,9 +4755,10 @@ var useDeleteSelfChatChannelMessage = (params = {}, options = {}) => {
|
|
|
4703
4755
|
// src/mutations/self/chat/useLeaveSelfChatChannel.ts
|
|
4704
4756
|
var LeaveSelfChatChannel = async ({
|
|
4705
4757
|
channelId,
|
|
4706
|
-
|
|
4758
|
+
clientApiParams,
|
|
4707
4759
|
queryClient
|
|
4708
4760
|
}) => {
|
|
4761
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4709
4762
|
const { data } = await clientApi.delete(
|
|
4710
4763
|
`/self/chat/channels/${channelId}/leave`
|
|
4711
4764
|
);
|
|
@@ -4725,10 +4778,11 @@ var useLeaveSelfChatChannel = (params = {}, options = {}) => {
|
|
|
4725
4778
|
var UpdateSelfChatChannelNotifications = async ({
|
|
4726
4779
|
channelId,
|
|
4727
4780
|
notifications,
|
|
4728
|
-
|
|
4781
|
+
clientApiParams,
|
|
4729
4782
|
queryClient,
|
|
4730
4783
|
locale = "en"
|
|
4731
4784
|
}) => {
|
|
4785
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4732
4786
|
const { data } = await clientApi.put(
|
|
4733
4787
|
`/self/chat/channels/${channelId}/notifications`,
|
|
4734
4788
|
{
|
|
@@ -4751,10 +4805,11 @@ var useUpdateSelfChatChannelNotifications = (params = {}, options = {}) => {
|
|
|
4751
4805
|
var RegisterCancelledEventRegistration = async ({
|
|
4752
4806
|
eventId,
|
|
4753
4807
|
registrationId,
|
|
4754
|
-
|
|
4808
|
+
clientApiParams,
|
|
4755
4809
|
queryClient,
|
|
4756
4810
|
locale = "en"
|
|
4757
4811
|
}) => {
|
|
4812
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4758
4813
|
const { data } = await clientApi.post(
|
|
4759
4814
|
`/self/events/${eventId}/registration/${registrationId}/cancelled/register`
|
|
4760
4815
|
);
|
|
@@ -4786,10 +4841,11 @@ var SelectSelfEventRegistrationCoupon = async ({
|
|
|
4786
4841
|
eventId,
|
|
4787
4842
|
registrationId,
|
|
4788
4843
|
couponId,
|
|
4789
|
-
|
|
4844
|
+
clientApiParams,
|
|
4790
4845
|
queryClient,
|
|
4791
4846
|
locale = "en"
|
|
4792
4847
|
}) => {
|
|
4848
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4793
4849
|
const { data } = await clientApi.post(
|
|
4794
4850
|
`/self/events/${eventId}/registration/${registrationId}/draft/coupon`,
|
|
4795
4851
|
{
|
|
@@ -4829,10 +4885,11 @@ var useSelectSelfEventRegistrationCoupon = (params = {}, options = {}) => {
|
|
|
4829
4885
|
var CaptureSelfEventRegistrationPayment = async ({
|
|
4830
4886
|
eventId,
|
|
4831
4887
|
registrationId,
|
|
4832
|
-
|
|
4888
|
+
clientApiParams,
|
|
4833
4889
|
queryClient,
|
|
4834
4890
|
locale = "en"
|
|
4835
4891
|
}) => {
|
|
4892
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4836
4893
|
const { data } = await clientApi.post(
|
|
4837
4894
|
`/self/events/${eventId}/registration/${registrationId}/draft/capture`
|
|
4838
4895
|
);
|
|
@@ -4852,10 +4909,11 @@ var CreateSelfEventRegistrationGuest = async ({
|
|
|
4852
4909
|
eventId,
|
|
4853
4910
|
registrationId,
|
|
4854
4911
|
guest,
|
|
4855
|
-
|
|
4912
|
+
clientApiParams,
|
|
4856
4913
|
queryClient,
|
|
4857
4914
|
locale = "en"
|
|
4858
4915
|
}) => {
|
|
4916
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4859
4917
|
const { data } = await clientApi.post(
|
|
4860
4918
|
`/self/events/${eventId}/registration/${registrationId}/draft/guests`,
|
|
4861
4919
|
guest
|
|
@@ -4876,10 +4934,11 @@ var DeleteSelfEventRegistrationGuest = async ({
|
|
|
4876
4934
|
eventId,
|
|
4877
4935
|
registrationId,
|
|
4878
4936
|
guestId,
|
|
4879
|
-
|
|
4937
|
+
clientApiParams,
|
|
4880
4938
|
queryClient,
|
|
4881
4939
|
locale = "en"
|
|
4882
4940
|
}) => {
|
|
4941
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4883
4942
|
const { data } = await clientApi.delete(
|
|
4884
4943
|
`/self/events/${eventId}/registration/${registrationId}/draft/guests/${guestId}`
|
|
4885
4944
|
);
|
|
@@ -4898,10 +4957,11 @@ var useDeleteSelfEventRegistrationGuest = (params = {}, options = {}) => {
|
|
|
4898
4957
|
var RemoveSelfEventRegistrationCoupon = async ({
|
|
4899
4958
|
eventId,
|
|
4900
4959
|
registrationId,
|
|
4901
|
-
|
|
4960
|
+
clientApiParams,
|
|
4902
4961
|
queryClient,
|
|
4903
4962
|
locale = "en"
|
|
4904
4963
|
}) => {
|
|
4964
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4905
4965
|
const { data } = await clientApi.delete(
|
|
4906
4966
|
`/self/events/${eventId}/registration/${registrationId}/draft/coupon`
|
|
4907
4967
|
);
|
|
@@ -4938,10 +4998,11 @@ var useRemoveSelfEventRegistrationCoupon = (params = {}, options = {}) => {
|
|
|
4938
4998
|
var RemoveSelfEventRegistrationTicket = async ({
|
|
4939
4999
|
eventId,
|
|
4940
5000
|
registrationId,
|
|
4941
|
-
|
|
5001
|
+
clientApiParams,
|
|
4942
5002
|
queryClient,
|
|
4943
5003
|
locale = "en"
|
|
4944
5004
|
}) => {
|
|
5005
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4945
5006
|
const { data } = await clientApi.delete(
|
|
4946
5007
|
`/self/events/${eventId}/registration/${registrationId}/draft/ticket`
|
|
4947
5008
|
);
|
|
@@ -4979,10 +5040,11 @@ var SelectSelfEventRegistrationTicket = async ({
|
|
|
4979
5040
|
eventId,
|
|
4980
5041
|
registrationId,
|
|
4981
5042
|
ticketId,
|
|
4982
|
-
|
|
5043
|
+
clientApiParams,
|
|
4983
5044
|
queryClient,
|
|
4984
5045
|
locale = "en"
|
|
4985
5046
|
}) => {
|
|
5047
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4986
5048
|
const { data } = await clientApi.post(
|
|
4987
5049
|
`/self/events/${eventId}/registration/${registrationId}/draft/ticket`,
|
|
4988
5050
|
{
|
|
@@ -5018,10 +5080,11 @@ var SubmitSelfEventRegistration = async ({
|
|
|
5018
5080
|
eventId,
|
|
5019
5081
|
registrationId,
|
|
5020
5082
|
payment,
|
|
5021
|
-
|
|
5083
|
+
clientApiParams,
|
|
5022
5084
|
queryClient,
|
|
5023
5085
|
locale = "en"
|
|
5024
5086
|
}) => {
|
|
5087
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5025
5088
|
const { data } = await clientApi.post(
|
|
5026
5089
|
`/self/events/${eventId}/registration/${registrationId}/draft/submit`,
|
|
5027
5090
|
payment
|
|
@@ -5043,10 +5106,11 @@ var UpdateSelfEventRegistrationGuest = async ({
|
|
|
5043
5106
|
registrationId,
|
|
5044
5107
|
guestId,
|
|
5045
5108
|
guest,
|
|
5046
|
-
|
|
5109
|
+
clientApiParams,
|
|
5047
5110
|
queryClient,
|
|
5048
5111
|
locale = "en"
|
|
5049
5112
|
}) => {
|
|
5113
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5050
5114
|
const { data } = await clientApi.put(
|
|
5051
5115
|
`/self/events/${eventId}/registration/${registrationId}/draft/guests/${guestId}`,
|
|
5052
5116
|
guest
|
|
@@ -5070,10 +5134,11 @@ var UpdateSelfEventRegistrationGuestResponseFile = async ({
|
|
|
5070
5134
|
guestId,
|
|
5071
5135
|
dataUrl,
|
|
5072
5136
|
name,
|
|
5073
|
-
|
|
5137
|
+
clientApiParams
|
|
5074
5138
|
}) => {
|
|
5075
5139
|
if (!guestId)
|
|
5076
5140
|
throw new Error("Guest ID is required");
|
|
5141
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5077
5142
|
const { data } = await clientApi.put(
|
|
5078
5143
|
`/self/events/${eventId}/registration/${registrationId}/draft/guests/${guestId}/responses/file`,
|
|
5079
5144
|
{
|
|
@@ -5094,8 +5159,9 @@ var UpdateSelfEventRegistrationGuestResponses = async ({
|
|
|
5094
5159
|
registrationId,
|
|
5095
5160
|
guestId,
|
|
5096
5161
|
responses,
|
|
5097
|
-
|
|
5162
|
+
clientApiParams
|
|
5098
5163
|
}) => {
|
|
5164
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5099
5165
|
const { data } = await clientApi.put(
|
|
5100
5166
|
`/self/events/${eventId}/registration/${registrationId}/draft/guests/${guestId}/responses`,
|
|
5101
5167
|
responses
|
|
@@ -5113,8 +5179,9 @@ var UpdateSelfEventRegistrationResponseFile = async ({
|
|
|
5113
5179
|
dataUrl,
|
|
5114
5180
|
name,
|
|
5115
5181
|
questionId,
|
|
5116
|
-
|
|
5182
|
+
clientApiParams
|
|
5117
5183
|
}) => {
|
|
5184
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5118
5185
|
const { data } = await clientApi.put(
|
|
5119
5186
|
`/self/events/${eventId}/registration/${registrationId}/draft/responses/file`,
|
|
5120
5187
|
{
|
|
@@ -5134,10 +5201,11 @@ var UpdateSelfEventRegistrationResponses = async ({
|
|
|
5134
5201
|
eventId,
|
|
5135
5202
|
registrationId,
|
|
5136
5203
|
responses,
|
|
5137
|
-
|
|
5204
|
+
clientApiParams,
|
|
5138
5205
|
queryClient,
|
|
5139
5206
|
locale = "en"
|
|
5140
5207
|
}) => {
|
|
5208
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5141
5209
|
const { data } = await clientApi.put(
|
|
5142
5210
|
`/self/events/${eventId}/registration/${registrationId}/draft/responses`,
|
|
5143
5211
|
responses
|
|
@@ -5157,10 +5225,11 @@ var useUpdateSelfEventRegistrationResponses = (params = {}, options = {}) => {
|
|
|
5157
5225
|
var CancelEventRegistration = async ({
|
|
5158
5226
|
eventId,
|
|
5159
5227
|
registrationId,
|
|
5160
|
-
|
|
5228
|
+
clientApiParams,
|
|
5161
5229
|
queryClient,
|
|
5162
5230
|
locale = "env"
|
|
5163
5231
|
}) => {
|
|
5232
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5164
5233
|
const { data } = await clientApi.delete(
|
|
5165
5234
|
`/self/events/${eventId}/registration/${registrationId}/registered/cancel`
|
|
5166
5235
|
);
|
|
@@ -5192,9 +5261,10 @@ var CancelTransfer = async ({
|
|
|
5192
5261
|
transferId,
|
|
5193
5262
|
eventId,
|
|
5194
5263
|
registrationId,
|
|
5195
|
-
|
|
5264
|
+
clientApiParams,
|
|
5196
5265
|
queryClient
|
|
5197
5266
|
}) => {
|
|
5267
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5198
5268
|
const { data } = await clientApi.delete(
|
|
5199
5269
|
`/self/events/${eventId}/registration/${registrationId}/transfer/${transferId}`
|
|
5200
5270
|
);
|
|
@@ -5215,9 +5285,10 @@ var TransferPurchase = async ({
|
|
|
5215
5285
|
purchaseId,
|
|
5216
5286
|
eventId,
|
|
5217
5287
|
registrationId,
|
|
5218
|
-
|
|
5288
|
+
clientApiParams,
|
|
5219
5289
|
queryClient
|
|
5220
5290
|
}) => {
|
|
5291
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5221
5292
|
const { data } = await clientApi.post(
|
|
5222
5293
|
`/self/events/${eventId}/registration/${registrationId}/transfer`,
|
|
5223
5294
|
{
|
|
@@ -5242,10 +5313,11 @@ var UpdateSelfEventRegistrationResponse = async ({
|
|
|
5242
5313
|
registrationId,
|
|
5243
5314
|
questionId,
|
|
5244
5315
|
response,
|
|
5245
|
-
|
|
5316
|
+
clientApiParams,
|
|
5246
5317
|
queryClient,
|
|
5247
5318
|
locale = "en"
|
|
5248
5319
|
}) => {
|
|
5320
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5249
5321
|
const { data } = await clientApi.put(
|
|
5250
5322
|
`/self/events/${eventId}/registration/${registrationId}/registered/response`,
|
|
5251
5323
|
{
|
|
@@ -5275,10 +5347,11 @@ var UpdateSelfEventRegistrationGuestResponse = async ({
|
|
|
5275
5347
|
questionId,
|
|
5276
5348
|
guestId,
|
|
5277
5349
|
response,
|
|
5278
|
-
|
|
5350
|
+
clientApiParams,
|
|
5279
5351
|
queryClient,
|
|
5280
5352
|
locale = "en"
|
|
5281
5353
|
}) => {
|
|
5354
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5282
5355
|
const { data } = await clientApi.put(
|
|
5283
5356
|
`/self/events/${eventId}/registration/${registrationId}/registered/guests/${guestId}/response`,
|
|
5284
5357
|
{
|
|
@@ -5304,9 +5377,10 @@ var useUpdateSelfEventRegistrationGuestResponse = (params = {}, options = {}) =>
|
|
|
5304
5377
|
// src/mutations/self/subscriptions/useCancelSubscription.ts
|
|
5305
5378
|
var CancelSubscription = async ({
|
|
5306
5379
|
subscriptionId,
|
|
5307
|
-
|
|
5380
|
+
clientApiParams,
|
|
5308
5381
|
queryClient
|
|
5309
5382
|
}) => {
|
|
5383
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5310
5384
|
const { data } = await clientApi.delete(
|
|
5311
5385
|
`/self/subscriptions/${subscriptionId}`
|
|
5312
5386
|
);
|
|
@@ -5328,8 +5402,9 @@ var useCancelSubscription = (params = {}, options = {}) => {
|
|
|
5328
5402
|
var CreateSubscription = async ({
|
|
5329
5403
|
productId,
|
|
5330
5404
|
priceId,
|
|
5331
|
-
|
|
5405
|
+
clientApiParams
|
|
5332
5406
|
}) => {
|
|
5407
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5333
5408
|
const { data } = await clientApi.post("/self/subscriptions", {
|
|
5334
5409
|
productId,
|
|
5335
5410
|
priceId,
|
|
@@ -5345,9 +5420,10 @@ var useCreateSubscription = (params = {}, options = {}) => {
|
|
|
5345
5420
|
var UpdateSubscriptionPaymentMethod = async ({
|
|
5346
5421
|
subscriptionId,
|
|
5347
5422
|
paymentMethodId,
|
|
5348
|
-
|
|
5423
|
+
clientApiParams,
|
|
5349
5424
|
queryClient
|
|
5350
5425
|
}) => {
|
|
5426
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5351
5427
|
const { data } = await clientApi.put(
|
|
5352
5428
|
`/self/subscriptions/${subscriptionId}/payment-method`,
|
|
5353
5429
|
{
|
|
@@ -5368,9 +5444,10 @@ var useUpdateSubscriptionPaymentMethod = (params = {}, options = {}) => {
|
|
|
5368
5444
|
// src/mutations/self/useAcceptTransfer.ts
|
|
5369
5445
|
var AcceptTransfer = async ({
|
|
5370
5446
|
transferId,
|
|
5371
|
-
|
|
5447
|
+
clientApiParams,
|
|
5372
5448
|
queryClient
|
|
5373
5449
|
}) => {
|
|
5450
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5374
5451
|
const { data } = await clientApi.post(
|
|
5375
5452
|
`/self/transfers/${transferId}`
|
|
5376
5453
|
);
|
|
@@ -5386,9 +5463,10 @@ var useAcceptTransfer = (params = {}, options = {}) => {
|
|
|
5386
5463
|
// src/mutations/self/useAddSelfDelegate.ts
|
|
5387
5464
|
var AddSelfDelegate = async ({
|
|
5388
5465
|
email,
|
|
5389
|
-
|
|
5466
|
+
clientApiParams,
|
|
5390
5467
|
queryClient
|
|
5391
5468
|
}) => {
|
|
5469
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5392
5470
|
const { data } = await clientApi.post(
|
|
5393
5471
|
`/self/delegates`,
|
|
5394
5472
|
{
|
|
@@ -5408,10 +5486,11 @@ var useAddSelfDelegate = (params = {}, options = {}) => {
|
|
|
5408
5486
|
var AddSelfEventListingSession = async ({
|
|
5409
5487
|
eventId,
|
|
5410
5488
|
session,
|
|
5411
|
-
|
|
5489
|
+
clientApiParams,
|
|
5412
5490
|
queryClient,
|
|
5413
5491
|
locale = "en"
|
|
5414
5492
|
}) => {
|
|
5493
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5415
5494
|
const { data } = await clientApi.post(
|
|
5416
5495
|
`/self/events/listings/${eventId}/sessions`,
|
|
5417
5496
|
{
|
|
@@ -5460,10 +5539,11 @@ var useAddSelfEventListingSession = (params = {}, options = {}) => {
|
|
|
5460
5539
|
var AddSelfEventListingSpeaker = async ({
|
|
5461
5540
|
eventId,
|
|
5462
5541
|
speaker,
|
|
5463
|
-
|
|
5542
|
+
clientApiParams,
|
|
5464
5543
|
queryClient,
|
|
5465
5544
|
locale = "en"
|
|
5466
5545
|
}) => {
|
|
5546
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5467
5547
|
const { data } = await clientApi.post(
|
|
5468
5548
|
`/self/events/listings/${eventId}/speakers`,
|
|
5469
5549
|
{
|
|
@@ -5512,7 +5592,7 @@ var useAddSelfEventListingSpeaker = (params = {}, options = {}) => {
|
|
|
5512
5592
|
var AddSelfEventListingSponsor = async ({
|
|
5513
5593
|
eventId,
|
|
5514
5594
|
sponsor,
|
|
5515
|
-
|
|
5595
|
+
clientApiParams,
|
|
5516
5596
|
queryClient,
|
|
5517
5597
|
locale = "en"
|
|
5518
5598
|
}) => {
|
|
@@ -5546,6 +5626,7 @@ var AddSelfEventListingSponsor = async ({
|
|
|
5546
5626
|
}
|
|
5547
5627
|
);
|
|
5548
5628
|
}
|
|
5629
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5549
5630
|
const { data } = await clientApi.post(
|
|
5550
5631
|
`/self/events/listings/${eventId}/sponsors`,
|
|
5551
5632
|
{
|
|
@@ -5562,9 +5643,10 @@ var useAddSelfEventListingSponsor = (params = {}, options = {}) => {
|
|
|
5562
5643
|
var AddSelfEventSession = async ({
|
|
5563
5644
|
eventId,
|
|
5564
5645
|
sessionId,
|
|
5565
|
-
|
|
5646
|
+
clientApiParams,
|
|
5566
5647
|
queryClient
|
|
5567
5648
|
}) => {
|
|
5649
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5568
5650
|
const { data } = await clientApi.post(
|
|
5569
5651
|
`/self/events/${eventId}/sessions/${sessionId}`
|
|
5570
5652
|
);
|
|
@@ -5587,10 +5669,11 @@ var CreateSelfEventListing = async ({
|
|
|
5587
5669
|
sponsorIds,
|
|
5588
5670
|
speakers,
|
|
5589
5671
|
sessions,
|
|
5590
|
-
|
|
5672
|
+
clientApiParams,
|
|
5591
5673
|
queryClient,
|
|
5592
5674
|
locale = "en"
|
|
5593
5675
|
}) => {
|
|
5676
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5594
5677
|
let data;
|
|
5595
5678
|
if (communityId) {
|
|
5596
5679
|
data = (await clientApi.post(
|
|
@@ -5638,9 +5721,10 @@ var useCreateSelfEventListing = (params = {}, options = {}) => {
|
|
|
5638
5721
|
|
|
5639
5722
|
// src/mutations/self/useDeleteSelf.ts
|
|
5640
5723
|
var DeleteSelf = async ({
|
|
5641
|
-
|
|
5724
|
+
clientApiParams,
|
|
5642
5725
|
queryClient
|
|
5643
5726
|
}) => {
|
|
5727
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5644
5728
|
const { data } = await clientApi.delete(`/self`);
|
|
5645
5729
|
if (queryClient && data.status === "ok") {
|
|
5646
5730
|
queryClient.clear();
|
|
@@ -5654,9 +5738,10 @@ var useDeleteSelf = (params = {}, options = {}) => {
|
|
|
5654
5738
|
// src/mutations/self/useDeleteSelfPushDevice.ts
|
|
5655
5739
|
var DeleteSelfPushDevice = async ({
|
|
5656
5740
|
pushDeviceId,
|
|
5657
|
-
|
|
5741
|
+
clientApiParams,
|
|
5658
5742
|
queryClient
|
|
5659
5743
|
}) => {
|
|
5744
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5660
5745
|
const { data } = await clientApi.delete(
|
|
5661
5746
|
`/self/push-devices/${pushDeviceId}`
|
|
5662
5747
|
);
|
|
@@ -5674,9 +5759,10 @@ var useDeleteSelfPushDevice = (params = {}, options = {}) => {
|
|
|
5674
5759
|
// src/mutations/self/useRejectTransfer.ts
|
|
5675
5760
|
var RejectTransfer = async ({
|
|
5676
5761
|
transferId,
|
|
5677
|
-
|
|
5762
|
+
clientApiParams,
|
|
5678
5763
|
queryClient
|
|
5679
5764
|
}) => {
|
|
5765
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5680
5766
|
const { data } = await clientApi.delete(
|
|
5681
5767
|
`/self/transfers/${transferId}`
|
|
5682
5768
|
);
|
|
@@ -5694,9 +5780,10 @@ var useRejectTransfer = (params = {}, options = {}) => {
|
|
|
5694
5780
|
// src/mutations/self/useRemoveSelfDelegate.ts
|
|
5695
5781
|
var RemoveSelfDelegate = async ({
|
|
5696
5782
|
accountId,
|
|
5697
|
-
|
|
5783
|
+
clientApiParams,
|
|
5698
5784
|
queryClient
|
|
5699
5785
|
}) => {
|
|
5786
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5700
5787
|
const { data } = await clientApi.delete(
|
|
5701
5788
|
`/self/delegates/${accountId}`
|
|
5702
5789
|
);
|
|
@@ -5713,7 +5800,7 @@ var useRemoveSelfDelegate = (params = {}, options = {}) => {
|
|
|
5713
5800
|
var RemoveSelfEventListingSession = async ({
|
|
5714
5801
|
eventId,
|
|
5715
5802
|
sessionId,
|
|
5716
|
-
|
|
5803
|
+
clientApiParams,
|
|
5717
5804
|
queryClient,
|
|
5718
5805
|
locale = "en"
|
|
5719
5806
|
}) => {
|
|
@@ -5747,6 +5834,7 @@ var RemoveSelfEventListingSession = async ({
|
|
|
5747
5834
|
}
|
|
5748
5835
|
);
|
|
5749
5836
|
}
|
|
5837
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5750
5838
|
const { data } = await clientApi.delete(
|
|
5751
5839
|
`/self/events/listings/${eventId}/sessions/${sessionId}`
|
|
5752
5840
|
);
|
|
@@ -5760,7 +5848,7 @@ var useRemoveSelfEventListingSession = (params = {}, options = {}) => {
|
|
|
5760
5848
|
var RemoveSelfEventListingSpeaker = async ({
|
|
5761
5849
|
eventId,
|
|
5762
5850
|
speakerId,
|
|
5763
|
-
|
|
5851
|
+
clientApiParams,
|
|
5764
5852
|
queryClient,
|
|
5765
5853
|
locale = "en"
|
|
5766
5854
|
}) => {
|
|
@@ -5794,6 +5882,7 @@ var RemoveSelfEventListingSpeaker = async ({
|
|
|
5794
5882
|
}
|
|
5795
5883
|
);
|
|
5796
5884
|
}
|
|
5885
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5797
5886
|
const { data } = await clientApi.delete(
|
|
5798
5887
|
`/self/events/listings/${eventId}/speakers/${speakerId}`
|
|
5799
5888
|
);
|
|
@@ -5807,7 +5896,7 @@ var useRemoveSelfEventListingSpeaker = (params = {}, options = {}) => {
|
|
|
5807
5896
|
var RemoveSelfEventListingSponsor = async ({
|
|
5808
5897
|
eventId,
|
|
5809
5898
|
sponsorId,
|
|
5810
|
-
|
|
5899
|
+
clientApiParams,
|
|
5811
5900
|
queryClient,
|
|
5812
5901
|
locale = "en"
|
|
5813
5902
|
}) => {
|
|
@@ -5841,6 +5930,7 @@ var RemoveSelfEventListingSponsor = async ({
|
|
|
5841
5930
|
}
|
|
5842
5931
|
);
|
|
5843
5932
|
}
|
|
5933
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5844
5934
|
const { data } = await clientApi.delete(
|
|
5845
5935
|
`/self/events/listings/${eventId}/sponsors/${sponsorId}`
|
|
5846
5936
|
);
|
|
@@ -5854,9 +5944,10 @@ var useRemoveSelfEventListingSponsor = (params = {}, options = {}) => {
|
|
|
5854
5944
|
var RemoveSelfEventSession = async ({
|
|
5855
5945
|
eventId,
|
|
5856
5946
|
sessionId,
|
|
5857
|
-
|
|
5947
|
+
clientApiParams,
|
|
5858
5948
|
queryClient
|
|
5859
5949
|
}) => {
|
|
5950
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5860
5951
|
const { data } = await clientApi.delete(
|
|
5861
5952
|
`/self/events/${eventId}/sessions/${sessionId}`
|
|
5862
5953
|
);
|
|
@@ -5875,9 +5966,10 @@ var useRemoveSelfEventSession = (params = {}, options = {}) => {
|
|
|
5875
5966
|
var SelfCheckinRegistration = async ({
|
|
5876
5967
|
accountId,
|
|
5877
5968
|
eventId,
|
|
5878
|
-
|
|
5969
|
+
clientApiParams,
|
|
5879
5970
|
queryClient
|
|
5880
5971
|
}) => {
|
|
5972
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5881
5973
|
const { data } = await clientApi.post(
|
|
5882
5974
|
`/self/events/listings/${eventId}/registrations/${accountId}`
|
|
5883
5975
|
);
|
|
@@ -5961,7 +6053,7 @@ var SelfCreateActivity = async ({
|
|
|
5961
6053
|
activity,
|
|
5962
6054
|
base64Image,
|
|
5963
6055
|
videoUri,
|
|
5964
|
-
|
|
6056
|
+
clientApiParams,
|
|
5965
6057
|
queryClient,
|
|
5966
6058
|
locale = "en"
|
|
5967
6059
|
}) => {
|
|
@@ -5979,6 +6071,7 @@ var SelfCreateActivity = async ({
|
|
|
5979
6071
|
);
|
|
5980
6072
|
}
|
|
5981
6073
|
}
|
|
6074
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
5982
6075
|
const { data } = await clientApi.post(
|
|
5983
6076
|
`/self/activities`,
|
|
5984
6077
|
{
|
|
@@ -6039,9 +6132,10 @@ var useSelfCreateActivity = (params = {}, options = {}) => {
|
|
|
6039
6132
|
// src/mutations/self/useSelfDeleteActivity.ts
|
|
6040
6133
|
var DeleteActivity = async ({
|
|
6041
6134
|
activityId,
|
|
6042
|
-
|
|
6135
|
+
clientApiParams,
|
|
6043
6136
|
queryClient
|
|
6044
6137
|
}) => {
|
|
6138
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
6045
6139
|
const { data } = await clientApi.delete(
|
|
6046
6140
|
`/self/activities/${activityId}`
|
|
6047
6141
|
);
|
|
@@ -6057,9 +6151,10 @@ var useDeleteActivity = (params = {}, options = {}) => {
|
|
|
6057
6151
|
// src/mutations/self/useSelfJoinCommunity.ts
|
|
6058
6152
|
var SelfJoinCommunity = async ({
|
|
6059
6153
|
communityId,
|
|
6060
|
-
|
|
6154
|
+
clientApiParams,
|
|
6061
6155
|
queryClient
|
|
6062
6156
|
}) => {
|
|
6157
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
6063
6158
|
const { data } = await clientApi.post(`/self/communities/${communityId}`);
|
|
6064
6159
|
if (queryClient && data.status === "ok") {
|
|
6065
6160
|
queryClient.invalidateQueries({
|
|
@@ -6084,9 +6179,10 @@ var useSelfJoinCommunity = (params = {}, options = {}) => {
|
|
|
6084
6179
|
// src/mutations/self/useSelfLeaveCommunity.ts
|
|
6085
6180
|
var SelfLeaveCommunity = async ({
|
|
6086
6181
|
communityId,
|
|
6087
|
-
|
|
6182
|
+
clientApiParams,
|
|
6088
6183
|
queryClient
|
|
6089
6184
|
}) => {
|
|
6185
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
6090
6186
|
const { data } = await clientApi.delete(
|
|
6091
6187
|
`/self/communities/${communityId}`
|
|
6092
6188
|
);
|
|
@@ -6114,7 +6210,7 @@ var useSelfLeaveCommunity = (params = {}, options = {}) => {
|
|
|
6114
6210
|
var SelfUpdateCommunityMembership = async ({
|
|
6115
6211
|
communityId,
|
|
6116
6212
|
membership,
|
|
6117
|
-
|
|
6213
|
+
clientApiParams,
|
|
6118
6214
|
queryClient,
|
|
6119
6215
|
locale = "en"
|
|
6120
6216
|
}) => {
|
|
@@ -6132,6 +6228,7 @@ var SelfUpdateCommunityMembership = async ({
|
|
|
6132
6228
|
}
|
|
6133
6229
|
);
|
|
6134
6230
|
}
|
|
6231
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
6135
6232
|
const { data } = await clientApi.put(`/self/communities/${communityId}`, membership);
|
|
6136
6233
|
return data;
|
|
6137
6234
|
};
|
|
@@ -6141,10 +6238,11 @@ var useSelfUpdateCommunityMembership = (params = {}, options = {}) => {
|
|
|
6141
6238
|
|
|
6142
6239
|
// src/mutations/self/useUpdateSelf.ts
|
|
6143
6240
|
var UpdateSelf = async ({
|
|
6144
|
-
|
|
6241
|
+
clientApiParams,
|
|
6145
6242
|
queryClient,
|
|
6146
6243
|
...params
|
|
6147
6244
|
}) => {
|
|
6245
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
6148
6246
|
const { data } = await clientApi.put(
|
|
6149
6247
|
`/self`,
|
|
6150
6248
|
params
|
|
@@ -6163,10 +6261,11 @@ var UpdateSelfEventListing = async ({
|
|
|
6163
6261
|
eventId,
|
|
6164
6262
|
event,
|
|
6165
6263
|
base64,
|
|
6166
|
-
|
|
6264
|
+
clientApiParams,
|
|
6167
6265
|
queryClient,
|
|
6168
6266
|
locale = "en"
|
|
6169
6267
|
}) => {
|
|
6268
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
6170
6269
|
const { data } = await clientApi.put(
|
|
6171
6270
|
`/self/events/listings/${eventId}`,
|
|
6172
6271
|
{
|
|
@@ -6199,10 +6298,11 @@ var UpdateSelfEventListingSession = async ({
|
|
|
6199
6298
|
eventId,
|
|
6200
6299
|
session,
|
|
6201
6300
|
sessionId,
|
|
6202
|
-
|
|
6301
|
+
clientApiParams,
|
|
6203
6302
|
queryClient,
|
|
6204
6303
|
locale = "en"
|
|
6205
6304
|
}) => {
|
|
6305
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
6206
6306
|
const { data } = await clientApi.put(
|
|
6207
6307
|
`/self/events/listings/${eventId}/sessions/${sessionId}`,
|
|
6208
6308
|
{
|
|
@@ -6251,10 +6351,11 @@ var UpdateSelfEventListingSpeaker = async ({
|
|
|
6251
6351
|
speaker,
|
|
6252
6352
|
speakerId,
|
|
6253
6353
|
buffer,
|
|
6254
|
-
|
|
6354
|
+
clientApiParams,
|
|
6255
6355
|
queryClient,
|
|
6256
6356
|
locale = "en"
|
|
6257
6357
|
}) => {
|
|
6358
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
6258
6359
|
const { data } = await clientApi.put(
|
|
6259
6360
|
`/self/events/listings/${eventId}/speakers/${speakerId}`,
|
|
6260
6361
|
{
|
|
@@ -6301,9 +6402,10 @@ var useUpdateSelfEventListingSpeaker = (params = {}, options = {}) => {
|
|
|
6301
6402
|
// src/mutations/self/useUpdateSelfImage.ts
|
|
6302
6403
|
var UpdateSelfImage = async ({
|
|
6303
6404
|
base64,
|
|
6304
|
-
|
|
6405
|
+
clientApiParams,
|
|
6305
6406
|
queryClient
|
|
6306
6407
|
}) => {
|
|
6408
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
6307
6409
|
const { data } = await clientApi.put(
|
|
6308
6410
|
`/self/image`,
|
|
6309
6411
|
{
|
|
@@ -6323,8 +6425,9 @@ var useUpdateSelfImage = (params = {}, options = {}) => {
|
|
|
6323
6425
|
var UpdateSelfLead = async ({
|
|
6324
6426
|
leadId,
|
|
6325
6427
|
note,
|
|
6326
|
-
|
|
6428
|
+
clientApiParams
|
|
6327
6429
|
}) => {
|
|
6430
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
6328
6431
|
const { data } = await clientApi.put(
|
|
6329
6432
|
`/self/leads/${leadId}`,
|
|
6330
6433
|
{
|
|
@@ -6339,7 +6442,7 @@ var useUpdateSelfLead = (params = {}, options = {}) => {
|
|
|
6339
6442
|
|
|
6340
6443
|
// src/mutations/self/useUpdateSelfNotificationPreferences.ts
|
|
6341
6444
|
var UpdateSelfNotificationPreferences = async ({
|
|
6342
|
-
|
|
6445
|
+
clientApiParams,
|
|
6343
6446
|
queryClient,
|
|
6344
6447
|
locale = "en",
|
|
6345
6448
|
...params
|
|
@@ -6357,6 +6460,7 @@ var UpdateSelfNotificationPreferences = async ({
|
|
|
6357
6460
|
}
|
|
6358
6461
|
);
|
|
6359
6462
|
}
|
|
6463
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
6360
6464
|
const { data } = await clientApi.put(`/self/notificationPreferences`, params);
|
|
6361
6465
|
return data;
|
|
6362
6466
|
};
|
|
@@ -6368,9 +6472,10 @@ var useUpdateSelfNotificationPreferences = (params = {}, options = {}) => {
|
|
|
6368
6472
|
var UpdateSelfPushDevice = async ({
|
|
6369
6473
|
pushDeviceId,
|
|
6370
6474
|
pushDevice,
|
|
6371
|
-
|
|
6475
|
+
clientApiParams,
|
|
6372
6476
|
queryClient
|
|
6373
6477
|
}) => {
|
|
6478
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
6374
6479
|
const { data } = await clientApi.put(
|
|
6375
6480
|
`/self/push-devices/${pushDeviceId}`,
|
|
6376
6481
|
{
|
|
@@ -6398,8 +6503,9 @@ var CreateSupportTicket = async ({
|
|
|
6398
6503
|
request,
|
|
6399
6504
|
eventId,
|
|
6400
6505
|
productId,
|
|
6401
|
-
|
|
6506
|
+
clientApiParams
|
|
6402
6507
|
}) => {
|
|
6508
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
6403
6509
|
const { data } = await clientApi.post(
|
|
6404
6510
|
"/supportTickets",
|
|
6405
6511
|
{
|
|
@@ -6420,8 +6526,9 @@ var useCreateSupportTicket = (params = {}, options = {}) => {
|
|
|
6420
6526
|
var CreateTeamAccount = async ({
|
|
6421
6527
|
name,
|
|
6422
6528
|
email,
|
|
6423
|
-
|
|
6529
|
+
clientApiParams
|
|
6424
6530
|
}) => {
|
|
6531
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
6425
6532
|
const { data } = await clientApi.post(
|
|
6426
6533
|
`/self/team`,
|
|
6427
6534
|
{
|
|
@@ -6533,6 +6640,7 @@ export {
|
|
|
6533
6640
|
GetActivityComments,
|
|
6534
6641
|
GetAdvertisement,
|
|
6535
6642
|
GetBenefits,
|
|
6643
|
+
GetClientAPI,
|
|
6536
6644
|
GetCommunities,
|
|
6537
6645
|
GetCommunity,
|
|
6538
6646
|
GetCommunityActivities,
|
|
@@ -6768,7 +6876,6 @@ export {
|
|
|
6768
6876
|
UpdateSelfNotificationPreferences,
|
|
6769
6877
|
UpdateSelfPushDevice,
|
|
6770
6878
|
UpdateSubscriptionPaymentMethod,
|
|
6771
|
-
getClientAPI,
|
|
6772
6879
|
isListing,
|
|
6773
6880
|
isManagedCoupon,
|
|
6774
6881
|
isSelf,
|
|
@@ -6818,7 +6925,6 @@ export {
|
|
|
6818
6925
|
useCancelSubscription,
|
|
6819
6926
|
useCancelTransfer,
|
|
6820
6927
|
useCaptureSelfEventRegistrationPayment,
|
|
6821
|
-
useClientAPI,
|
|
6822
6928
|
useCompleteEventActivation,
|
|
6823
6929
|
useConnectedXM,
|
|
6824
6930
|
useCreateCommunityAnnouncement,
|