@connectedxm/admin 7.4.0 → 7.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +125 -0
- package/dist/index.d.cts +72 -4
- package/dist/index.d.ts +72 -4
- package/dist/index.js +117 -0
- package/openapi.json +294 -11
- 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,
|
|
@@ -1471,6 +1474,7 @@ __export(index_exports, {
|
|
|
1471
1474
|
RemoveEventBenefit: () => RemoveEventBenefit,
|
|
1472
1475
|
RemoveEventBlockSession: () => RemoveEventBlockSession,
|
|
1473
1476
|
RemoveEventCoHost: () => RemoveEventCoHost,
|
|
1477
|
+
RemoveEventCouponTier: () => RemoveEventCouponTier,
|
|
1474
1478
|
RemoveEventFollowupAddOn: () => RemoveEventFollowupAddOn,
|
|
1475
1479
|
RemoveEventFollowupPassType: () => RemoveEventFollowupPassType,
|
|
1476
1480
|
RemoveEventFollowupQuestion: () => RemoveEventFollowupQuestion,
|
|
@@ -1715,6 +1719,7 @@ __export(index_exports, {
|
|
|
1715
1719
|
SET_EVENT_COUPON_PASSES_QUERY_DATA: () => SET_EVENT_COUPON_PASSES_QUERY_DATA,
|
|
1716
1720
|
SET_EVENT_COUPON_PAYMENTS_QUERY_DATA: () => SET_EVENT_COUPON_PAYMENTS_QUERY_DATA,
|
|
1717
1721
|
SET_EVENT_COUPON_QUERY_DATA: () => SET_EVENT_COUPON_QUERY_DATA,
|
|
1722
|
+
SET_EVENT_COUPON_TIERS_QUERY_DATA: () => SET_EVENT_COUPON_TIERS_QUERY_DATA,
|
|
1718
1723
|
SET_EVENT_COUPON_VARIANTS_QUERY_DATA: () => SET_EVENT_COUPON_VARIANTS_QUERY_DATA,
|
|
1719
1724
|
SET_EVENT_CO_HOSTS_QUERY_DATA: () => SET_EVENT_CO_HOSTS_QUERY_DATA,
|
|
1720
1725
|
SET_EVENT_DASHBOARD_QUESTIONS_QUERY_DATA: () => SET_EVENT_DASHBOARD_QUESTIONS_QUERY_DATA,
|
|
@@ -2400,6 +2405,7 @@ __export(index_exports, {
|
|
|
2400
2405
|
useAddEventBenefit: () => useAddEventBenefit,
|
|
2401
2406
|
useAddEventBlockSession: () => useAddEventBlockSession,
|
|
2402
2407
|
useAddEventCoHost: () => useAddEventCoHost,
|
|
2408
|
+
useAddEventCouponTier: () => useAddEventCouponTier,
|
|
2403
2409
|
useAddEventFollowupAddOn: () => useAddEventFollowupAddOn,
|
|
2404
2410
|
useAddEventFollowupPassType: () => useAddEventFollowupPassType,
|
|
2405
2411
|
useAddEventFollowupQuestion: () => useAddEventFollowupQuestion,
|
|
@@ -2909,6 +2915,7 @@ __export(index_exports, {
|
|
|
2909
2915
|
useGetEventCoupon: () => useGetEventCoupon,
|
|
2910
2916
|
useGetEventCouponPasses: () => useGetEventCouponPasses,
|
|
2911
2917
|
useGetEventCouponPayments: () => useGetEventCouponPayments,
|
|
2918
|
+
useGetEventCouponTiers: () => useGetEventCouponTiers,
|
|
2912
2919
|
useGetEventCouponVariants: () => useGetEventCouponVariants,
|
|
2913
2920
|
useGetEventCoupons: () => useGetEventCoupons,
|
|
2914
2921
|
useGetEventDashboardQuestions: () => useGetEventDashboardQuestions,
|
|
@@ -3323,6 +3330,7 @@ __export(index_exports, {
|
|
|
3323
3330
|
useRemoveEventBenefit: () => useRemoveEventBenefit,
|
|
3324
3331
|
useRemoveEventBlockSession: () => useRemoveEventBlockSession,
|
|
3325
3332
|
useRemoveEventCoHost: () => useRemoveEventCoHost,
|
|
3333
|
+
useRemoveEventCouponTier: () => useRemoveEventCouponTier,
|
|
3326
3334
|
useRemoveEventFollowupAddOn: () => useRemoveEventFollowupAddOn,
|
|
3327
3335
|
useRemoveEventFollowupPassType: () => useRemoveEventFollowupPassType,
|
|
3328
3336
|
useRemoveEventFollowupQuestion: () => useRemoveEventFollowupQuestion,
|
|
@@ -10979,6 +10987,57 @@ var useGetEventCouponPayments = (eventId = "", couponId = "", params = {}, optio
|
|
|
10979
10987
|
);
|
|
10980
10988
|
};
|
|
10981
10989
|
|
|
10990
|
+
// src/queries/events/coupons/useGetEventCouponTiers.ts
|
|
10991
|
+
var EVENT_COUPON_TIERS_QUERY_KEY = (allowed, eventId, couponId) => [
|
|
10992
|
+
...EVENT_COUPON_QUERY_KEY(eventId, couponId),
|
|
10993
|
+
"TIERS",
|
|
10994
|
+
allowed ? "ALLOWED" : "DISALLOWED"
|
|
10995
|
+
];
|
|
10996
|
+
var SET_EVENT_COUPON_TIERS_QUERY_DATA = (client, keyParams, response) => {
|
|
10997
|
+
client.setQueryData(EVENT_COUPON_TIERS_QUERY_KEY(...keyParams), response);
|
|
10998
|
+
};
|
|
10999
|
+
var GetEventCouponTiers = async ({
|
|
11000
|
+
allowed,
|
|
11001
|
+
eventId,
|
|
11002
|
+
couponId,
|
|
11003
|
+
pageParam,
|
|
11004
|
+
pageSize,
|
|
11005
|
+
orderBy,
|
|
11006
|
+
search,
|
|
11007
|
+
adminApiParams
|
|
11008
|
+
}) => {
|
|
11009
|
+
const adminApi = await GetAdminAPI(adminApiParams);
|
|
11010
|
+
const { data } = await adminApi.get(
|
|
11011
|
+
`/events/${eventId}/coupons/${couponId}/tiers`,
|
|
11012
|
+
{
|
|
11013
|
+
params: {
|
|
11014
|
+
allowed,
|
|
11015
|
+
page: pageParam || void 0,
|
|
11016
|
+
pageSize: pageSize || void 0,
|
|
11017
|
+
orderBy: orderBy || void 0,
|
|
11018
|
+
search: search || void 0
|
|
11019
|
+
}
|
|
11020
|
+
}
|
|
11021
|
+
);
|
|
11022
|
+
return data;
|
|
11023
|
+
};
|
|
11024
|
+
var useGetEventCouponTiers = (allowed, eventId = "", couponId = "", params = {}, options = {}) => {
|
|
11025
|
+
return useConnectedInfiniteQuery(
|
|
11026
|
+
EVENT_COUPON_TIERS_QUERY_KEY(allowed, eventId, couponId),
|
|
11027
|
+
(params2) => GetEventCouponTiers({
|
|
11028
|
+
...params2,
|
|
11029
|
+
allowed,
|
|
11030
|
+
eventId,
|
|
11031
|
+
couponId
|
|
11032
|
+
}),
|
|
11033
|
+
params,
|
|
11034
|
+
{
|
|
11035
|
+
...options,
|
|
11036
|
+
enabled: typeof allowed === "boolean" && !!eventId && !!couponId && (options.enabled ?? true)
|
|
11037
|
+
}
|
|
11038
|
+
);
|
|
11039
|
+
};
|
|
11040
|
+
|
|
10982
11041
|
// src/queries/events/coupons/useGetEventCouponVariants.ts
|
|
10983
11042
|
var EVENT_COUPON_VARIANTS_QUERY_KEY = (eventId, parentCouponId) => {
|
|
10984
11043
|
const key = [...EVENT_QUERY_KEY(eventId), "COUPONS"];
|
|
@@ -29855,6 +29914,34 @@ var useRemoveEventCoHost = (options = {}) => {
|
|
|
29855
29914
|
return useConnectedMutation(RemoveEventCoHost, options);
|
|
29856
29915
|
};
|
|
29857
29916
|
|
|
29917
|
+
// src/mutations/events/coupons/useAddEventCouponTier.ts
|
|
29918
|
+
var AddEventCouponTier = async ({
|
|
29919
|
+
allowed,
|
|
29920
|
+
eventId,
|
|
29921
|
+
couponId,
|
|
29922
|
+
tierId,
|
|
29923
|
+
adminApiParams,
|
|
29924
|
+
queryClient
|
|
29925
|
+
}) => {
|
|
29926
|
+
const connectedXM = await GetAdminAPI(adminApiParams);
|
|
29927
|
+
const { data } = await connectedXM.post(
|
|
29928
|
+
`/events/${eventId}/coupons/${couponId}/tiers/${tierId}`,
|
|
29929
|
+
{
|
|
29930
|
+
allowed
|
|
29931
|
+
}
|
|
29932
|
+
);
|
|
29933
|
+
if (queryClient && data.status === "ok") {
|
|
29934
|
+
queryClient.invalidateQueries({
|
|
29935
|
+
queryKey: EVENT_COUPON_TIERS_QUERY_KEY(allowed, eventId, couponId)
|
|
29936
|
+
});
|
|
29937
|
+
SET_EVENT_COUPON_QUERY_DATA(queryClient, [eventId, couponId], data);
|
|
29938
|
+
}
|
|
29939
|
+
return data;
|
|
29940
|
+
};
|
|
29941
|
+
var useAddEventCouponTier = (options = {}) => {
|
|
29942
|
+
return useConnectedMutation(AddEventCouponTier, options);
|
|
29943
|
+
};
|
|
29944
|
+
|
|
29858
29945
|
// src/mutations/events/coupons/useCreateEventCoupon.ts
|
|
29859
29946
|
var CreateEventCoupon = async ({
|
|
29860
29947
|
eventId,
|
|
@@ -29950,6 +30037,36 @@ var useDeleteEventCouponVariants = (options = {}) => {
|
|
|
29950
30037
|
return useConnectedMutation(DeleteEventCouponVariants, options);
|
|
29951
30038
|
};
|
|
29952
30039
|
|
|
30040
|
+
// src/mutations/events/coupons/useRemoveEventCouponTier.ts
|
|
30041
|
+
var RemoveEventCouponTier = async ({
|
|
30042
|
+
allowed,
|
|
30043
|
+
eventId,
|
|
30044
|
+
couponId,
|
|
30045
|
+
tierId,
|
|
30046
|
+
adminApiParams,
|
|
30047
|
+
queryClient
|
|
30048
|
+
}) => {
|
|
30049
|
+
const connectedXM = await GetAdminAPI(adminApiParams);
|
|
30050
|
+
const { data } = await connectedXM.delete(
|
|
30051
|
+
`/events/${eventId}/coupons/${couponId}/tiers/${tierId}`,
|
|
30052
|
+
{
|
|
30053
|
+
params: {
|
|
30054
|
+
allowed
|
|
30055
|
+
}
|
|
30056
|
+
}
|
|
30057
|
+
);
|
|
30058
|
+
if (queryClient && data.status === "ok") {
|
|
30059
|
+
queryClient.invalidateQueries({
|
|
30060
|
+
queryKey: EVENT_COUPON_TIERS_QUERY_KEY(allowed, eventId, couponId)
|
|
30061
|
+
});
|
|
30062
|
+
SET_EVENT_COUPON_QUERY_DATA(queryClient, [eventId, couponId], data);
|
|
30063
|
+
}
|
|
30064
|
+
return data;
|
|
30065
|
+
};
|
|
30066
|
+
var useRemoveEventCouponTier = (options = {}) => {
|
|
30067
|
+
return useConnectedMutation(RemoveEventCouponTier, options);
|
|
30068
|
+
};
|
|
30069
|
+
|
|
29953
30070
|
// src/mutations/events/coupons/useSyncEventCouponToVariants.ts
|
|
29954
30071
|
var SyncEventCouponToVariants = async ({
|
|
29955
30072
|
eventId,
|
|
@@ -43716,6 +43833,7 @@ var useUpdateTier = (options = {}) => {
|
|
|
43716
43833
|
AddEventBenefit,
|
|
43717
43834
|
AddEventBlockSession,
|
|
43718
43835
|
AddEventCoHost,
|
|
43836
|
+
AddEventCouponTier,
|
|
43719
43837
|
AddEventFollowupAddOn,
|
|
43720
43838
|
AddEventFollowupPassType,
|
|
43721
43839
|
AddEventFollowupQuestion,
|
|
@@ -44184,6 +44302,7 @@ var useUpdateTier = (options = {}) => {
|
|
|
44184
44302
|
EVENT_COUPON_PASSES_QUERY_KEY,
|
|
44185
44303
|
EVENT_COUPON_PAYMENTS_QUERY_KEY,
|
|
44186
44304
|
EVENT_COUPON_QUERY_KEY,
|
|
44305
|
+
EVENT_COUPON_TIERS_QUERY_KEY,
|
|
44187
44306
|
EVENT_COUPON_VARIANTS_QUERY_KEY,
|
|
44188
44307
|
EVENT_CO_HOSTS_QUERY_KEY,
|
|
44189
44308
|
EVENT_DASHBOARD_QUESTIONS_QUERY_KEY,
|
|
@@ -44559,6 +44678,7 @@ var useUpdateTier = (options = {}) => {
|
|
|
44559
44678
|
GetEventCoupon,
|
|
44560
44679
|
GetEventCouponPasses,
|
|
44561
44680
|
GetEventCouponPayments,
|
|
44681
|
+
GetEventCouponTiers,
|
|
44562
44682
|
GetEventCouponVariants,
|
|
44563
44683
|
GetEventCoupons,
|
|
44564
44684
|
GetEventDashboardQuestions,
|
|
@@ -45091,6 +45211,7 @@ var useUpdateTier = (options = {}) => {
|
|
|
45091
45211
|
RemoveEventBenefit,
|
|
45092
45212
|
RemoveEventBlockSession,
|
|
45093
45213
|
RemoveEventCoHost,
|
|
45214
|
+
RemoveEventCouponTier,
|
|
45094
45215
|
RemoveEventFollowupAddOn,
|
|
45095
45216
|
RemoveEventFollowupPassType,
|
|
45096
45217
|
RemoveEventFollowupQuestion,
|
|
@@ -45335,6 +45456,7 @@ var useUpdateTier = (options = {}) => {
|
|
|
45335
45456
|
SET_EVENT_COUPON_PASSES_QUERY_DATA,
|
|
45336
45457
|
SET_EVENT_COUPON_PAYMENTS_QUERY_DATA,
|
|
45337
45458
|
SET_EVENT_COUPON_QUERY_DATA,
|
|
45459
|
+
SET_EVENT_COUPON_TIERS_QUERY_DATA,
|
|
45338
45460
|
SET_EVENT_COUPON_VARIANTS_QUERY_DATA,
|
|
45339
45461
|
SET_EVENT_CO_HOSTS_QUERY_DATA,
|
|
45340
45462
|
SET_EVENT_DASHBOARD_QUESTIONS_QUERY_DATA,
|
|
@@ -46020,6 +46142,7 @@ var useUpdateTier = (options = {}) => {
|
|
|
46020
46142
|
useAddEventBenefit,
|
|
46021
46143
|
useAddEventBlockSession,
|
|
46022
46144
|
useAddEventCoHost,
|
|
46145
|
+
useAddEventCouponTier,
|
|
46023
46146
|
useAddEventFollowupAddOn,
|
|
46024
46147
|
useAddEventFollowupPassType,
|
|
46025
46148
|
useAddEventFollowupQuestion,
|
|
@@ -46529,6 +46652,7 @@ var useUpdateTier = (options = {}) => {
|
|
|
46529
46652
|
useGetEventCoupon,
|
|
46530
46653
|
useGetEventCouponPasses,
|
|
46531
46654
|
useGetEventCouponPayments,
|
|
46655
|
+
useGetEventCouponTiers,
|
|
46532
46656
|
useGetEventCouponVariants,
|
|
46533
46657
|
useGetEventCoupons,
|
|
46534
46658
|
useGetEventDashboardQuestions,
|
|
@@ -46943,6 +47067,7 @@ var useUpdateTier = (options = {}) => {
|
|
|
46943
47067
|
useRemoveEventBenefit,
|
|
46944
47068
|
useRemoveEventBlockSession,
|
|
46945
47069
|
useRemoveEventCoHost,
|
|
47070
|
+
useRemoveEventCouponTier,
|
|
46946
47071
|
useRemoveEventFollowupAddOn,
|
|
46947
47072
|
useRemoveEventFollowupPassType,
|
|
46948
47073
|
useRemoveEventFollowupQuestion,
|