@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.js
CHANGED
|
@@ -7378,6 +7378,57 @@ var useGetEventCouponPayments = (eventId = "", couponId = "", params = {}, optio
|
|
|
7378
7378
|
);
|
|
7379
7379
|
};
|
|
7380
7380
|
|
|
7381
|
+
// src/queries/events/coupons/useGetEventCouponTiers.ts
|
|
7382
|
+
var EVENT_COUPON_TIERS_QUERY_KEY = (allowed, eventId, couponId) => [
|
|
7383
|
+
...EVENT_COUPON_QUERY_KEY(eventId, couponId),
|
|
7384
|
+
"TIERS",
|
|
7385
|
+
allowed ? "ALLOWED" : "DISALLOWED"
|
|
7386
|
+
];
|
|
7387
|
+
var SET_EVENT_COUPON_TIERS_QUERY_DATA = (client, keyParams, response) => {
|
|
7388
|
+
client.setQueryData(EVENT_COUPON_TIERS_QUERY_KEY(...keyParams), response);
|
|
7389
|
+
};
|
|
7390
|
+
var GetEventCouponTiers = async ({
|
|
7391
|
+
allowed,
|
|
7392
|
+
eventId,
|
|
7393
|
+
couponId,
|
|
7394
|
+
pageParam,
|
|
7395
|
+
pageSize,
|
|
7396
|
+
orderBy,
|
|
7397
|
+
search,
|
|
7398
|
+
adminApiParams
|
|
7399
|
+
}) => {
|
|
7400
|
+
const adminApi = await GetAdminAPI(adminApiParams);
|
|
7401
|
+
const { data } = await adminApi.get(
|
|
7402
|
+
`/events/${eventId}/coupons/${couponId}/tiers`,
|
|
7403
|
+
{
|
|
7404
|
+
params: {
|
|
7405
|
+
allowed,
|
|
7406
|
+
page: pageParam || void 0,
|
|
7407
|
+
pageSize: pageSize || void 0,
|
|
7408
|
+
orderBy: orderBy || void 0,
|
|
7409
|
+
search: search || void 0
|
|
7410
|
+
}
|
|
7411
|
+
}
|
|
7412
|
+
);
|
|
7413
|
+
return data;
|
|
7414
|
+
};
|
|
7415
|
+
var useGetEventCouponTiers = (allowed, eventId = "", couponId = "", params = {}, options = {}) => {
|
|
7416
|
+
return useConnectedInfiniteQuery(
|
|
7417
|
+
EVENT_COUPON_TIERS_QUERY_KEY(allowed, eventId, couponId),
|
|
7418
|
+
(params2) => GetEventCouponTiers({
|
|
7419
|
+
...params2,
|
|
7420
|
+
allowed,
|
|
7421
|
+
eventId,
|
|
7422
|
+
couponId
|
|
7423
|
+
}),
|
|
7424
|
+
params,
|
|
7425
|
+
{
|
|
7426
|
+
...options,
|
|
7427
|
+
enabled: typeof allowed === "boolean" && !!eventId && !!couponId && (options.enabled ?? true)
|
|
7428
|
+
}
|
|
7429
|
+
);
|
|
7430
|
+
};
|
|
7431
|
+
|
|
7381
7432
|
// src/queries/events/coupons/useGetEventCouponVariants.ts
|
|
7382
7433
|
var EVENT_COUPON_VARIANTS_QUERY_KEY = (eventId, parentCouponId) => {
|
|
7383
7434
|
const key = [...EVENT_QUERY_KEY(eventId), "COUPONS"];
|
|
@@ -22521,22 +22572,6 @@ var useExportAccount = (options = {}) => {
|
|
|
22521
22572
|
return useConnectedMutation(ExportAccount, options);
|
|
22522
22573
|
};
|
|
22523
22574
|
|
|
22524
|
-
// src/mutations/accounts/useImpersonateAccount.ts
|
|
22525
|
-
var ImpersonateAccount = async ({
|
|
22526
|
-
accountId,
|
|
22527
|
-
username,
|
|
22528
|
-
adminApiParams
|
|
22529
|
-
}) => {
|
|
22530
|
-
const connectedXM = await GetAdminAPI(adminApiParams);
|
|
22531
|
-
const { data } = await connectedXM.post(
|
|
22532
|
-
`/accounts/${accountId}/impersonate/${username}`
|
|
22533
|
-
);
|
|
22534
|
-
return data;
|
|
22535
|
-
};
|
|
22536
|
-
var useImpersonateAccount = (options = {}) => {
|
|
22537
|
-
return useConnectedMutation(ImpersonateAccount, options);
|
|
22538
|
-
};
|
|
22539
|
-
|
|
22540
22575
|
// src/mutations/accounts/useSyncAccount.ts
|
|
22541
22576
|
var SyncAccount = async ({
|
|
22542
22577
|
accountId,
|
|
@@ -26259,6 +26294,34 @@ var useRemoveEventCoHost = (options = {}) => {
|
|
|
26259
26294
|
return useConnectedMutation(RemoveEventCoHost, options);
|
|
26260
26295
|
};
|
|
26261
26296
|
|
|
26297
|
+
// src/mutations/events/coupons/useAddEventCouponTier.ts
|
|
26298
|
+
var AddEventCouponTier = async ({
|
|
26299
|
+
allowed,
|
|
26300
|
+
eventId,
|
|
26301
|
+
couponId,
|
|
26302
|
+
tierId,
|
|
26303
|
+
adminApiParams,
|
|
26304
|
+
queryClient
|
|
26305
|
+
}) => {
|
|
26306
|
+
const connectedXM = await GetAdminAPI(adminApiParams);
|
|
26307
|
+
const { data } = await connectedXM.post(
|
|
26308
|
+
`/events/${eventId}/coupons/${couponId}/tiers/${tierId}`,
|
|
26309
|
+
{
|
|
26310
|
+
allowed
|
|
26311
|
+
}
|
|
26312
|
+
);
|
|
26313
|
+
if (queryClient && data.status === "ok") {
|
|
26314
|
+
queryClient.invalidateQueries({
|
|
26315
|
+
queryKey: EVENT_COUPON_TIERS_QUERY_KEY(allowed, eventId, couponId)
|
|
26316
|
+
});
|
|
26317
|
+
SET_EVENT_COUPON_QUERY_DATA(queryClient, [eventId, couponId], data);
|
|
26318
|
+
}
|
|
26319
|
+
return data;
|
|
26320
|
+
};
|
|
26321
|
+
var useAddEventCouponTier = (options = {}) => {
|
|
26322
|
+
return useConnectedMutation(AddEventCouponTier, options);
|
|
26323
|
+
};
|
|
26324
|
+
|
|
26262
26325
|
// src/mutations/events/coupons/useCreateEventCoupon.ts
|
|
26263
26326
|
var CreateEventCoupon = async ({
|
|
26264
26327
|
eventId,
|
|
@@ -26354,6 +26417,36 @@ var useDeleteEventCouponVariants = (options = {}) => {
|
|
|
26354
26417
|
return useConnectedMutation(DeleteEventCouponVariants, options);
|
|
26355
26418
|
};
|
|
26356
26419
|
|
|
26420
|
+
// src/mutations/events/coupons/useRemoveEventCouponTier.ts
|
|
26421
|
+
var RemoveEventCouponTier = async ({
|
|
26422
|
+
allowed,
|
|
26423
|
+
eventId,
|
|
26424
|
+
couponId,
|
|
26425
|
+
tierId,
|
|
26426
|
+
adminApiParams,
|
|
26427
|
+
queryClient
|
|
26428
|
+
}) => {
|
|
26429
|
+
const connectedXM = await GetAdminAPI(adminApiParams);
|
|
26430
|
+
const { data } = await connectedXM.delete(
|
|
26431
|
+
`/events/${eventId}/coupons/${couponId}/tiers/${tierId}`,
|
|
26432
|
+
{
|
|
26433
|
+
params: {
|
|
26434
|
+
allowed
|
|
26435
|
+
}
|
|
26436
|
+
}
|
|
26437
|
+
);
|
|
26438
|
+
if (queryClient && data.status === "ok") {
|
|
26439
|
+
queryClient.invalidateQueries({
|
|
26440
|
+
queryKey: EVENT_COUPON_TIERS_QUERY_KEY(allowed, eventId, couponId)
|
|
26441
|
+
});
|
|
26442
|
+
SET_EVENT_COUPON_QUERY_DATA(queryClient, [eventId, couponId], data);
|
|
26443
|
+
}
|
|
26444
|
+
return data;
|
|
26445
|
+
};
|
|
26446
|
+
var useRemoveEventCouponTier = (options = {}) => {
|
|
26447
|
+
return useConnectedMutation(RemoveEventCouponTier, options);
|
|
26448
|
+
};
|
|
26449
|
+
|
|
26357
26450
|
// src/mutations/events/coupons/useSyncEventCouponToVariants.ts
|
|
26358
26451
|
var SyncEventCouponToVariants = async ({
|
|
26359
26452
|
eventId,
|
|
@@ -40119,6 +40212,7 @@ export {
|
|
|
40119
40212
|
AddEventBenefit,
|
|
40120
40213
|
AddEventBlockSession,
|
|
40121
40214
|
AddEventCoHost,
|
|
40215
|
+
AddEventCouponTier,
|
|
40122
40216
|
AddEventFollowupAddOn,
|
|
40123
40217
|
AddEventFollowupPassType,
|
|
40124
40218
|
AddEventFollowupQuestion,
|
|
@@ -40587,6 +40681,7 @@ export {
|
|
|
40587
40681
|
EVENT_COUPON_PASSES_QUERY_KEY,
|
|
40588
40682
|
EVENT_COUPON_PAYMENTS_QUERY_KEY,
|
|
40589
40683
|
EVENT_COUPON_QUERY_KEY,
|
|
40684
|
+
EVENT_COUPON_TIERS_QUERY_KEY,
|
|
40590
40685
|
EVENT_COUPON_VARIANTS_QUERY_KEY,
|
|
40591
40686
|
EVENT_CO_HOSTS_QUERY_KEY,
|
|
40592
40687
|
EVENT_DASHBOARD_QUESTIONS_QUERY_KEY,
|
|
@@ -40962,6 +41057,7 @@ export {
|
|
|
40962
41057
|
GetEventCoupon,
|
|
40963
41058
|
GetEventCouponPasses,
|
|
40964
41059
|
GetEventCouponPayments,
|
|
41060
|
+
GetEventCouponTiers,
|
|
40965
41061
|
GetEventCouponVariants,
|
|
40966
41062
|
GetEventCoupons,
|
|
40967
41063
|
GetEventDashboardQuestions,
|
|
@@ -41375,7 +41471,6 @@ export {
|
|
|
41375
41471
|
INVOICE_QUERY_KEY,
|
|
41376
41472
|
ImageModerationLevel,
|
|
41377
41473
|
ImageType,
|
|
41378
|
-
ImpersonateAccount,
|
|
41379
41474
|
ImportItemStatus,
|
|
41380
41475
|
ImportRooms,
|
|
41381
41476
|
ImportType,
|
|
@@ -41494,6 +41589,7 @@ export {
|
|
|
41494
41589
|
RemoveEventBenefit,
|
|
41495
41590
|
RemoveEventBlockSession,
|
|
41496
41591
|
RemoveEventCoHost,
|
|
41592
|
+
RemoveEventCouponTier,
|
|
41497
41593
|
RemoveEventFollowupAddOn,
|
|
41498
41594
|
RemoveEventFollowupPassType,
|
|
41499
41595
|
RemoveEventFollowupQuestion,
|
|
@@ -41738,6 +41834,7 @@ export {
|
|
|
41738
41834
|
SET_EVENT_COUPON_PASSES_QUERY_DATA,
|
|
41739
41835
|
SET_EVENT_COUPON_PAYMENTS_QUERY_DATA,
|
|
41740
41836
|
SET_EVENT_COUPON_QUERY_DATA,
|
|
41837
|
+
SET_EVENT_COUPON_TIERS_QUERY_DATA,
|
|
41741
41838
|
SET_EVENT_COUPON_VARIANTS_QUERY_DATA,
|
|
41742
41839
|
SET_EVENT_CO_HOSTS_QUERY_DATA,
|
|
41743
41840
|
SET_EVENT_DASHBOARD_QUESTIONS_QUERY_DATA,
|
|
@@ -42423,6 +42520,7 @@ export {
|
|
|
42423
42520
|
useAddEventBenefit,
|
|
42424
42521
|
useAddEventBlockSession,
|
|
42425
42522
|
useAddEventCoHost,
|
|
42523
|
+
useAddEventCouponTier,
|
|
42426
42524
|
useAddEventFollowupAddOn,
|
|
42427
42525
|
useAddEventFollowupPassType,
|
|
42428
42526
|
useAddEventFollowupQuestion,
|
|
@@ -42932,6 +43030,7 @@ export {
|
|
|
42932
43030
|
useGetEventCoupon,
|
|
42933
43031
|
useGetEventCouponPasses,
|
|
42934
43032
|
useGetEventCouponPayments,
|
|
43033
|
+
useGetEventCouponTiers,
|
|
42935
43034
|
useGetEventCouponVariants,
|
|
42936
43035
|
useGetEventCoupons,
|
|
42937
43036
|
useGetEventDashboardQuestions,
|
|
@@ -43317,7 +43416,6 @@ export {
|
|
|
43317
43416
|
useGetVideoCaptions,
|
|
43318
43417
|
useGetVideoDownloadStatus,
|
|
43319
43418
|
useGetVideos,
|
|
43320
|
-
useImpersonateAccount,
|
|
43321
43419
|
useImportRooms,
|
|
43322
43420
|
useIndexEventPasses,
|
|
43323
43421
|
useInitiateVideoDownload,
|
|
@@ -43346,6 +43444,7 @@ export {
|
|
|
43346
43444
|
useRemoveEventBenefit,
|
|
43347
43445
|
useRemoveEventBlockSession,
|
|
43348
43446
|
useRemoveEventCoHost,
|
|
43447
|
+
useRemoveEventCouponTier,
|
|
43349
43448
|
useRemoveEventFollowupAddOn,
|
|
43350
43449
|
useRemoveEventFollowupPassType,
|
|
43351
43450
|
useRemoveEventFollowupQuestion,
|