@connectedxm/admin 7.4.1 → 7.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +125 -20
- package/dist/index.d.cts +2549 -20
- package/dist/index.d.ts +2549 -20
- package/dist/index.js +117 -18
- package/openapi.json +2709 -2418
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -96,6 +96,7 @@ __export(index_exports, {
|
|
|
96
96
|
AddEventBenefit: () => AddEventBenefit,
|
|
97
97
|
AddEventBlockSession: () => AddEventBlockSession,
|
|
98
98
|
AddEventCoHost: () => AddEventCoHost,
|
|
99
|
+
AddEventCouponTier: () => AddEventCouponTier,
|
|
99
100
|
AddEventFollowupAddOn: () => AddEventFollowupAddOn,
|
|
100
101
|
AddEventFollowupPassType: () => AddEventFollowupPassType,
|
|
101
102
|
AddEventFollowupQuestion: () => AddEventFollowupQuestion,
|
|
@@ -564,6 +565,7 @@ __export(index_exports, {
|
|
|
564
565
|
EVENT_COUPON_PASSES_QUERY_KEY: () => EVENT_COUPON_PASSES_QUERY_KEY,
|
|
565
566
|
EVENT_COUPON_PAYMENTS_QUERY_KEY: () => EVENT_COUPON_PAYMENTS_QUERY_KEY,
|
|
566
567
|
EVENT_COUPON_QUERY_KEY: () => EVENT_COUPON_QUERY_KEY,
|
|
568
|
+
EVENT_COUPON_TIERS_QUERY_KEY: () => EVENT_COUPON_TIERS_QUERY_KEY,
|
|
567
569
|
EVENT_COUPON_VARIANTS_QUERY_KEY: () => EVENT_COUPON_VARIANTS_QUERY_KEY,
|
|
568
570
|
EVENT_CO_HOSTS_QUERY_KEY: () => EVENT_CO_HOSTS_QUERY_KEY,
|
|
569
571
|
EVENT_DASHBOARD_QUESTIONS_QUERY_KEY: () => EVENT_DASHBOARD_QUESTIONS_QUERY_KEY,
|
|
@@ -939,6 +941,7 @@ __export(index_exports, {
|
|
|
939
941
|
GetEventCoupon: () => GetEventCoupon,
|
|
940
942
|
GetEventCouponPasses: () => GetEventCouponPasses,
|
|
941
943
|
GetEventCouponPayments: () => GetEventCouponPayments,
|
|
944
|
+
GetEventCouponTiers: () => GetEventCouponTiers,
|
|
942
945
|
GetEventCouponVariants: () => GetEventCouponVariants,
|
|
943
946
|
GetEventCoupons: () => GetEventCoupons,
|
|
944
947
|
GetEventDashboardQuestions: () => GetEventDashboardQuestions,
|
|
@@ -1352,7 +1355,6 @@ __export(index_exports, {
|
|
|
1352
1355
|
INVOICE_QUERY_KEY: () => INVOICE_QUERY_KEY,
|
|
1353
1356
|
ImageModerationLevel: () => ImageModerationLevel,
|
|
1354
1357
|
ImageType: () => ImageType,
|
|
1355
|
-
ImpersonateAccount: () => ImpersonateAccount,
|
|
1356
1358
|
ImportItemStatus: () => ImportItemStatus,
|
|
1357
1359
|
ImportRooms: () => ImportRooms,
|
|
1358
1360
|
ImportType: () => ImportType,
|
|
@@ -1471,6 +1473,7 @@ __export(index_exports, {
|
|
|
1471
1473
|
RemoveEventBenefit: () => RemoveEventBenefit,
|
|
1472
1474
|
RemoveEventBlockSession: () => RemoveEventBlockSession,
|
|
1473
1475
|
RemoveEventCoHost: () => RemoveEventCoHost,
|
|
1476
|
+
RemoveEventCouponTier: () => RemoveEventCouponTier,
|
|
1474
1477
|
RemoveEventFollowupAddOn: () => RemoveEventFollowupAddOn,
|
|
1475
1478
|
RemoveEventFollowupPassType: () => RemoveEventFollowupPassType,
|
|
1476
1479
|
RemoveEventFollowupQuestion: () => RemoveEventFollowupQuestion,
|
|
@@ -1715,6 +1718,7 @@ __export(index_exports, {
|
|
|
1715
1718
|
SET_EVENT_COUPON_PASSES_QUERY_DATA: () => SET_EVENT_COUPON_PASSES_QUERY_DATA,
|
|
1716
1719
|
SET_EVENT_COUPON_PAYMENTS_QUERY_DATA: () => SET_EVENT_COUPON_PAYMENTS_QUERY_DATA,
|
|
1717
1720
|
SET_EVENT_COUPON_QUERY_DATA: () => SET_EVENT_COUPON_QUERY_DATA,
|
|
1721
|
+
SET_EVENT_COUPON_TIERS_QUERY_DATA: () => SET_EVENT_COUPON_TIERS_QUERY_DATA,
|
|
1718
1722
|
SET_EVENT_COUPON_VARIANTS_QUERY_DATA: () => SET_EVENT_COUPON_VARIANTS_QUERY_DATA,
|
|
1719
1723
|
SET_EVENT_CO_HOSTS_QUERY_DATA: () => SET_EVENT_CO_HOSTS_QUERY_DATA,
|
|
1720
1724
|
SET_EVENT_DASHBOARD_QUESTIONS_QUERY_DATA: () => SET_EVENT_DASHBOARD_QUESTIONS_QUERY_DATA,
|
|
@@ -2400,6 +2404,7 @@ __export(index_exports, {
|
|
|
2400
2404
|
useAddEventBenefit: () => useAddEventBenefit,
|
|
2401
2405
|
useAddEventBlockSession: () => useAddEventBlockSession,
|
|
2402
2406
|
useAddEventCoHost: () => useAddEventCoHost,
|
|
2407
|
+
useAddEventCouponTier: () => useAddEventCouponTier,
|
|
2403
2408
|
useAddEventFollowupAddOn: () => useAddEventFollowupAddOn,
|
|
2404
2409
|
useAddEventFollowupPassType: () => useAddEventFollowupPassType,
|
|
2405
2410
|
useAddEventFollowupQuestion: () => useAddEventFollowupQuestion,
|
|
@@ -2909,6 +2914,7 @@ __export(index_exports, {
|
|
|
2909
2914
|
useGetEventCoupon: () => useGetEventCoupon,
|
|
2910
2915
|
useGetEventCouponPasses: () => useGetEventCouponPasses,
|
|
2911
2916
|
useGetEventCouponPayments: () => useGetEventCouponPayments,
|
|
2917
|
+
useGetEventCouponTiers: () => useGetEventCouponTiers,
|
|
2912
2918
|
useGetEventCouponVariants: () => useGetEventCouponVariants,
|
|
2913
2919
|
useGetEventCoupons: () => useGetEventCoupons,
|
|
2914
2920
|
useGetEventDashboardQuestions: () => useGetEventDashboardQuestions,
|
|
@@ -3294,7 +3300,6 @@ __export(index_exports, {
|
|
|
3294
3300
|
useGetVideoCaptions: () => useGetVideoCaptions,
|
|
3295
3301
|
useGetVideoDownloadStatus: () => useGetVideoDownloadStatus,
|
|
3296
3302
|
useGetVideos: () => useGetVideos,
|
|
3297
|
-
useImpersonateAccount: () => useImpersonateAccount,
|
|
3298
3303
|
useImportRooms: () => useImportRooms,
|
|
3299
3304
|
useIndexEventPasses: () => useIndexEventPasses,
|
|
3300
3305
|
useInitiateVideoDownload: () => useInitiateVideoDownload,
|
|
@@ -3323,6 +3328,7 @@ __export(index_exports, {
|
|
|
3323
3328
|
useRemoveEventBenefit: () => useRemoveEventBenefit,
|
|
3324
3329
|
useRemoveEventBlockSession: () => useRemoveEventBlockSession,
|
|
3325
3330
|
useRemoveEventCoHost: () => useRemoveEventCoHost,
|
|
3331
|
+
useRemoveEventCouponTier: () => useRemoveEventCouponTier,
|
|
3326
3332
|
useRemoveEventFollowupAddOn: () => useRemoveEventFollowupAddOn,
|
|
3327
3333
|
useRemoveEventFollowupPassType: () => useRemoveEventFollowupPassType,
|
|
3328
3334
|
useRemoveEventFollowupQuestion: () => useRemoveEventFollowupQuestion,
|
|
@@ -10979,6 +10985,57 @@ var useGetEventCouponPayments = (eventId = "", couponId = "", params = {}, optio
|
|
|
10979
10985
|
);
|
|
10980
10986
|
};
|
|
10981
10987
|
|
|
10988
|
+
// src/queries/events/coupons/useGetEventCouponTiers.ts
|
|
10989
|
+
var EVENT_COUPON_TIERS_QUERY_KEY = (allowed, eventId, couponId) => [
|
|
10990
|
+
...EVENT_COUPON_QUERY_KEY(eventId, couponId),
|
|
10991
|
+
"TIERS",
|
|
10992
|
+
allowed ? "ALLOWED" : "DISALLOWED"
|
|
10993
|
+
];
|
|
10994
|
+
var SET_EVENT_COUPON_TIERS_QUERY_DATA = (client, keyParams, response) => {
|
|
10995
|
+
client.setQueryData(EVENT_COUPON_TIERS_QUERY_KEY(...keyParams), response);
|
|
10996
|
+
};
|
|
10997
|
+
var GetEventCouponTiers = async ({
|
|
10998
|
+
allowed,
|
|
10999
|
+
eventId,
|
|
11000
|
+
couponId,
|
|
11001
|
+
pageParam,
|
|
11002
|
+
pageSize,
|
|
11003
|
+
orderBy,
|
|
11004
|
+
search,
|
|
11005
|
+
adminApiParams
|
|
11006
|
+
}) => {
|
|
11007
|
+
const adminApi = await GetAdminAPI(adminApiParams);
|
|
11008
|
+
const { data } = await adminApi.get(
|
|
11009
|
+
`/events/${eventId}/coupons/${couponId}/tiers`,
|
|
11010
|
+
{
|
|
11011
|
+
params: {
|
|
11012
|
+
allowed,
|
|
11013
|
+
page: pageParam || void 0,
|
|
11014
|
+
pageSize: pageSize || void 0,
|
|
11015
|
+
orderBy: orderBy || void 0,
|
|
11016
|
+
search: search || void 0
|
|
11017
|
+
}
|
|
11018
|
+
}
|
|
11019
|
+
);
|
|
11020
|
+
return data;
|
|
11021
|
+
};
|
|
11022
|
+
var useGetEventCouponTiers = (allowed, eventId = "", couponId = "", params = {}, options = {}) => {
|
|
11023
|
+
return useConnectedInfiniteQuery(
|
|
11024
|
+
EVENT_COUPON_TIERS_QUERY_KEY(allowed, eventId, couponId),
|
|
11025
|
+
(params2) => GetEventCouponTiers({
|
|
11026
|
+
...params2,
|
|
11027
|
+
allowed,
|
|
11028
|
+
eventId,
|
|
11029
|
+
couponId
|
|
11030
|
+
}),
|
|
11031
|
+
params,
|
|
11032
|
+
{
|
|
11033
|
+
...options,
|
|
11034
|
+
enabled: typeof allowed === "boolean" && !!eventId && !!couponId && (options.enabled ?? true)
|
|
11035
|
+
}
|
|
11036
|
+
);
|
|
11037
|
+
};
|
|
11038
|
+
|
|
10982
11039
|
// src/queries/events/coupons/useGetEventCouponVariants.ts
|
|
10983
11040
|
var EVENT_COUPON_VARIANTS_QUERY_KEY = (eventId, parentCouponId) => {
|
|
10984
11041
|
const key = [...EVENT_QUERY_KEY(eventId), "COUPONS"];
|
|
@@ -26117,22 +26174,6 @@ var useExportAccount = (options = {}) => {
|
|
|
26117
26174
|
return useConnectedMutation(ExportAccount, options);
|
|
26118
26175
|
};
|
|
26119
26176
|
|
|
26120
|
-
// src/mutations/accounts/useImpersonateAccount.ts
|
|
26121
|
-
var ImpersonateAccount = async ({
|
|
26122
|
-
accountId,
|
|
26123
|
-
username,
|
|
26124
|
-
adminApiParams
|
|
26125
|
-
}) => {
|
|
26126
|
-
const connectedXM = await GetAdminAPI(adminApiParams);
|
|
26127
|
-
const { data } = await connectedXM.post(
|
|
26128
|
-
`/accounts/${accountId}/impersonate/${username}`
|
|
26129
|
-
);
|
|
26130
|
-
return data;
|
|
26131
|
-
};
|
|
26132
|
-
var useImpersonateAccount = (options = {}) => {
|
|
26133
|
-
return useConnectedMutation(ImpersonateAccount, options);
|
|
26134
|
-
};
|
|
26135
|
-
|
|
26136
26177
|
// src/mutations/accounts/useSyncAccount.ts
|
|
26137
26178
|
var SyncAccount = async ({
|
|
26138
26179
|
accountId,
|
|
@@ -29855,6 +29896,34 @@ var useRemoveEventCoHost = (options = {}) => {
|
|
|
29855
29896
|
return useConnectedMutation(RemoveEventCoHost, options);
|
|
29856
29897
|
};
|
|
29857
29898
|
|
|
29899
|
+
// src/mutations/events/coupons/useAddEventCouponTier.ts
|
|
29900
|
+
var AddEventCouponTier = async ({
|
|
29901
|
+
allowed,
|
|
29902
|
+
eventId,
|
|
29903
|
+
couponId,
|
|
29904
|
+
tierId,
|
|
29905
|
+
adminApiParams,
|
|
29906
|
+
queryClient
|
|
29907
|
+
}) => {
|
|
29908
|
+
const connectedXM = await GetAdminAPI(adminApiParams);
|
|
29909
|
+
const { data } = await connectedXM.post(
|
|
29910
|
+
`/events/${eventId}/coupons/${couponId}/tiers/${tierId}`,
|
|
29911
|
+
{
|
|
29912
|
+
allowed
|
|
29913
|
+
}
|
|
29914
|
+
);
|
|
29915
|
+
if (queryClient && data.status === "ok") {
|
|
29916
|
+
queryClient.invalidateQueries({
|
|
29917
|
+
queryKey: EVENT_COUPON_TIERS_QUERY_KEY(allowed, eventId, couponId)
|
|
29918
|
+
});
|
|
29919
|
+
SET_EVENT_COUPON_QUERY_DATA(queryClient, [eventId, couponId], data);
|
|
29920
|
+
}
|
|
29921
|
+
return data;
|
|
29922
|
+
};
|
|
29923
|
+
var useAddEventCouponTier = (options = {}) => {
|
|
29924
|
+
return useConnectedMutation(AddEventCouponTier, options);
|
|
29925
|
+
};
|
|
29926
|
+
|
|
29858
29927
|
// src/mutations/events/coupons/useCreateEventCoupon.ts
|
|
29859
29928
|
var CreateEventCoupon = async ({
|
|
29860
29929
|
eventId,
|
|
@@ -29950,6 +30019,36 @@ var useDeleteEventCouponVariants = (options = {}) => {
|
|
|
29950
30019
|
return useConnectedMutation(DeleteEventCouponVariants, options);
|
|
29951
30020
|
};
|
|
29952
30021
|
|
|
30022
|
+
// src/mutations/events/coupons/useRemoveEventCouponTier.ts
|
|
30023
|
+
var RemoveEventCouponTier = async ({
|
|
30024
|
+
allowed,
|
|
30025
|
+
eventId,
|
|
30026
|
+
couponId,
|
|
30027
|
+
tierId,
|
|
30028
|
+
adminApiParams,
|
|
30029
|
+
queryClient
|
|
30030
|
+
}) => {
|
|
30031
|
+
const connectedXM = await GetAdminAPI(adminApiParams);
|
|
30032
|
+
const { data } = await connectedXM.delete(
|
|
30033
|
+
`/events/${eventId}/coupons/${couponId}/tiers/${tierId}`,
|
|
30034
|
+
{
|
|
30035
|
+
params: {
|
|
30036
|
+
allowed
|
|
30037
|
+
}
|
|
30038
|
+
}
|
|
30039
|
+
);
|
|
30040
|
+
if (queryClient && data.status === "ok") {
|
|
30041
|
+
queryClient.invalidateQueries({
|
|
30042
|
+
queryKey: EVENT_COUPON_TIERS_QUERY_KEY(allowed, eventId, couponId)
|
|
30043
|
+
});
|
|
30044
|
+
SET_EVENT_COUPON_QUERY_DATA(queryClient, [eventId, couponId], data);
|
|
30045
|
+
}
|
|
30046
|
+
return data;
|
|
30047
|
+
};
|
|
30048
|
+
var useRemoveEventCouponTier = (options = {}) => {
|
|
30049
|
+
return useConnectedMutation(RemoveEventCouponTier, options);
|
|
30050
|
+
};
|
|
30051
|
+
|
|
29953
30052
|
// src/mutations/events/coupons/useSyncEventCouponToVariants.ts
|
|
29954
30053
|
var SyncEventCouponToVariants = async ({
|
|
29955
30054
|
eventId,
|
|
@@ -43716,6 +43815,7 @@ var useUpdateTier = (options = {}) => {
|
|
|
43716
43815
|
AddEventBenefit,
|
|
43717
43816
|
AddEventBlockSession,
|
|
43718
43817
|
AddEventCoHost,
|
|
43818
|
+
AddEventCouponTier,
|
|
43719
43819
|
AddEventFollowupAddOn,
|
|
43720
43820
|
AddEventFollowupPassType,
|
|
43721
43821
|
AddEventFollowupQuestion,
|
|
@@ -44184,6 +44284,7 @@ var useUpdateTier = (options = {}) => {
|
|
|
44184
44284
|
EVENT_COUPON_PASSES_QUERY_KEY,
|
|
44185
44285
|
EVENT_COUPON_PAYMENTS_QUERY_KEY,
|
|
44186
44286
|
EVENT_COUPON_QUERY_KEY,
|
|
44287
|
+
EVENT_COUPON_TIERS_QUERY_KEY,
|
|
44187
44288
|
EVENT_COUPON_VARIANTS_QUERY_KEY,
|
|
44188
44289
|
EVENT_CO_HOSTS_QUERY_KEY,
|
|
44189
44290
|
EVENT_DASHBOARD_QUESTIONS_QUERY_KEY,
|
|
@@ -44559,6 +44660,7 @@ var useUpdateTier = (options = {}) => {
|
|
|
44559
44660
|
GetEventCoupon,
|
|
44560
44661
|
GetEventCouponPasses,
|
|
44561
44662
|
GetEventCouponPayments,
|
|
44663
|
+
GetEventCouponTiers,
|
|
44562
44664
|
GetEventCouponVariants,
|
|
44563
44665
|
GetEventCoupons,
|
|
44564
44666
|
GetEventDashboardQuestions,
|
|
@@ -44972,7 +45074,6 @@ var useUpdateTier = (options = {}) => {
|
|
|
44972
45074
|
INVOICE_QUERY_KEY,
|
|
44973
45075
|
ImageModerationLevel,
|
|
44974
45076
|
ImageType,
|
|
44975
|
-
ImpersonateAccount,
|
|
44976
45077
|
ImportItemStatus,
|
|
44977
45078
|
ImportRooms,
|
|
44978
45079
|
ImportType,
|
|
@@ -45091,6 +45192,7 @@ var useUpdateTier = (options = {}) => {
|
|
|
45091
45192
|
RemoveEventBenefit,
|
|
45092
45193
|
RemoveEventBlockSession,
|
|
45093
45194
|
RemoveEventCoHost,
|
|
45195
|
+
RemoveEventCouponTier,
|
|
45094
45196
|
RemoveEventFollowupAddOn,
|
|
45095
45197
|
RemoveEventFollowupPassType,
|
|
45096
45198
|
RemoveEventFollowupQuestion,
|
|
@@ -45335,6 +45437,7 @@ var useUpdateTier = (options = {}) => {
|
|
|
45335
45437
|
SET_EVENT_COUPON_PASSES_QUERY_DATA,
|
|
45336
45438
|
SET_EVENT_COUPON_PAYMENTS_QUERY_DATA,
|
|
45337
45439
|
SET_EVENT_COUPON_QUERY_DATA,
|
|
45440
|
+
SET_EVENT_COUPON_TIERS_QUERY_DATA,
|
|
45338
45441
|
SET_EVENT_COUPON_VARIANTS_QUERY_DATA,
|
|
45339
45442
|
SET_EVENT_CO_HOSTS_QUERY_DATA,
|
|
45340
45443
|
SET_EVENT_DASHBOARD_QUESTIONS_QUERY_DATA,
|
|
@@ -46020,6 +46123,7 @@ var useUpdateTier = (options = {}) => {
|
|
|
46020
46123
|
useAddEventBenefit,
|
|
46021
46124
|
useAddEventBlockSession,
|
|
46022
46125
|
useAddEventCoHost,
|
|
46126
|
+
useAddEventCouponTier,
|
|
46023
46127
|
useAddEventFollowupAddOn,
|
|
46024
46128
|
useAddEventFollowupPassType,
|
|
46025
46129
|
useAddEventFollowupQuestion,
|
|
@@ -46529,6 +46633,7 @@ var useUpdateTier = (options = {}) => {
|
|
|
46529
46633
|
useGetEventCoupon,
|
|
46530
46634
|
useGetEventCouponPasses,
|
|
46531
46635
|
useGetEventCouponPayments,
|
|
46636
|
+
useGetEventCouponTiers,
|
|
46532
46637
|
useGetEventCouponVariants,
|
|
46533
46638
|
useGetEventCoupons,
|
|
46534
46639
|
useGetEventDashboardQuestions,
|
|
@@ -46914,7 +47019,6 @@ var useUpdateTier = (options = {}) => {
|
|
|
46914
47019
|
useGetVideoCaptions,
|
|
46915
47020
|
useGetVideoDownloadStatus,
|
|
46916
47021
|
useGetVideos,
|
|
46917
|
-
useImpersonateAccount,
|
|
46918
47022
|
useImportRooms,
|
|
46919
47023
|
useIndexEventPasses,
|
|
46920
47024
|
useInitiateVideoDownload,
|
|
@@ -46943,6 +47047,7 @@ var useUpdateTier = (options = {}) => {
|
|
|
46943
47047
|
useRemoveEventBenefit,
|
|
46944
47048
|
useRemoveEventBlockSession,
|
|
46945
47049
|
useRemoveEventCoHost,
|
|
47050
|
+
useRemoveEventCouponTier,
|
|
46946
47051
|
useRemoveEventFollowupAddOn,
|
|
46947
47052
|
useRemoveEventFollowupPassType,
|
|
46948
47053
|
useRemoveEventFollowupQuestion,
|