@connectedxm/admin 5.2.2 → 5.3.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 +138 -0
- package/dist/index.d.cts +113 -5
- package/dist/index.d.ts +113 -5
- package/dist/index.js +128 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -244,6 +244,7 @@ __export(index_exports, {
|
|
|
244
244
|
CreateEventAttendee: () => CreateEventAttendee,
|
|
245
245
|
CreateEventAttendeePackage: () => CreateEventAttendeePackage,
|
|
246
246
|
CreateEventCoupon: () => CreateEventCoupon,
|
|
247
|
+
CreateEventCouponVariants: () => CreateEventCouponVariants,
|
|
247
248
|
CreateEventEmailTranslation: () => CreateEventEmailTranslation,
|
|
248
249
|
CreateEventFaqSection: () => CreateEventFaqSection,
|
|
249
250
|
CreateEventFaqSectionQuestion: () => CreateEventFaqSectionQuestion,
|
|
@@ -390,6 +391,7 @@ __export(index_exports, {
|
|
|
390
391
|
DeleteEventAttendee: () => DeleteEventAttendee,
|
|
391
392
|
DeleteEventAttendeePackage: () => DeleteEventAttendeePackage,
|
|
392
393
|
DeleteEventCoupon: () => DeleteEventCoupon,
|
|
394
|
+
DeleteEventCouponVariants: () => DeleteEventCouponVariants,
|
|
393
395
|
DeleteEventEmailTranslation: () => DeleteEventEmailTranslation,
|
|
394
396
|
DeleteEventFaqSection: () => DeleteEventFaqSection,
|
|
395
397
|
DeleteEventFaqSectionQuestion: () => DeleteEventFaqSectionQuestion,
|
|
@@ -535,6 +537,7 @@ __export(index_exports, {
|
|
|
535
537
|
EVENT_COUPON_PASSES_QUERY_KEY: () => EVENT_COUPON_PASSES_QUERY_KEY,
|
|
536
538
|
EVENT_COUPON_PAYMENTS_QUERY_KEY: () => EVENT_COUPON_PAYMENTS_QUERY_KEY,
|
|
537
539
|
EVENT_COUPON_QUERY_KEY: () => EVENT_COUPON_QUERY_KEY,
|
|
540
|
+
EVENT_COUPON_VARIANTS_QUERY_KEY: () => EVENT_COUPON_VARIANTS_QUERY_KEY,
|
|
538
541
|
EVENT_CO_HOSTS_QUERY_KEY: () => EVENT_CO_HOSTS_QUERY_KEY,
|
|
539
542
|
EVENT_DASHBOARD_QUESTIONS_QUERY_KEY: () => EVENT_DASHBOARD_QUESTIONS_QUERY_KEY,
|
|
540
543
|
EVENT_EMAIL_QUERY_KEY: () => EVENT_EMAIL_QUERY_KEY,
|
|
@@ -873,6 +876,7 @@ __export(index_exports, {
|
|
|
873
876
|
GetEventCoupon: () => GetEventCoupon,
|
|
874
877
|
GetEventCouponPasses: () => GetEventCouponPasses,
|
|
875
878
|
GetEventCouponPayments: () => GetEventCouponPayments,
|
|
879
|
+
GetEventCouponVariants: () => GetEventCouponVariants,
|
|
876
880
|
GetEventCoupons: () => GetEventCoupons,
|
|
877
881
|
GetEventDashboardQuestions: () => GetEventDashboardQuestions,
|
|
878
882
|
GetEventEmail: () => GetEventEmail,
|
|
@@ -1564,6 +1568,7 @@ __export(index_exports, {
|
|
|
1564
1568
|
SET_EVENT_COUPON_PASSES_QUERY_DATA: () => SET_EVENT_COUPON_PASSES_QUERY_DATA,
|
|
1565
1569
|
SET_EVENT_COUPON_PAYMENTS_QUERY_DATA: () => SET_EVENT_COUPON_PAYMENTS_QUERY_DATA,
|
|
1566
1570
|
SET_EVENT_COUPON_QUERY_DATA: () => SET_EVENT_COUPON_QUERY_DATA,
|
|
1571
|
+
SET_EVENT_COUPON_VARIANTS_QUERY_DATA: () => SET_EVENT_COUPON_VARIANTS_QUERY_DATA,
|
|
1567
1572
|
SET_EVENT_CO_HOSTS_QUERY_DATA: () => SET_EVENT_CO_HOSTS_QUERY_DATA,
|
|
1568
1573
|
SET_EVENT_DASHBOARD_QUESTIONS_QUERY_DATA: () => SET_EVENT_DASHBOARD_QUESTIONS_QUERY_DATA,
|
|
1569
1574
|
SET_EVENT_EMAIL_QUERY_DATA: () => SET_EVENT_EMAIL_QUERY_DATA,
|
|
@@ -1948,6 +1953,7 @@ __export(index_exports, {
|
|
|
1948
1953
|
SupportedLocale: () => SupportedLocale,
|
|
1949
1954
|
SurveyQuestionType: () => SurveyQuestionType,
|
|
1950
1955
|
SwitchImage: () => SwitchImage,
|
|
1956
|
+
SyncEventCouponToVariants: () => SyncEventCouponToVariants,
|
|
1951
1957
|
SystemEventLogStatus: () => SystemEventLogStatus,
|
|
1952
1958
|
TAX_CODES_QUERY_KEY: () => TAX_CODES_QUERY_KEY,
|
|
1953
1959
|
TAX_INTEGRATIONS_QUERY_KEY: () => TAX_INTEGRATIONS_QUERY_KEY,
|
|
@@ -2282,6 +2288,7 @@ __export(index_exports, {
|
|
|
2282
2288
|
useCreateEventAttendee: () => useCreateEventAttendee,
|
|
2283
2289
|
useCreateEventAttendeePackage: () => useCreateEventAttendeePackage,
|
|
2284
2290
|
useCreateEventCoupon: () => useCreateEventCoupon,
|
|
2291
|
+
useCreateEventCouponVariants: () => useCreateEventCouponVariants,
|
|
2285
2292
|
useCreateEventEmailTranslation: () => useCreateEventEmailTranslation,
|
|
2286
2293
|
useCreateEventFaqSection: () => useCreateEventFaqSection,
|
|
2287
2294
|
useCreateEventFaqSectionQuestion: () => useCreateEventFaqSectionQuestion,
|
|
@@ -2419,6 +2426,7 @@ __export(index_exports, {
|
|
|
2419
2426
|
useDeleteEventAttendee: () => useDeleteEventAttendee,
|
|
2420
2427
|
useDeleteEventAttendeePackage: () => useDeleteEventAttendeePackage,
|
|
2421
2428
|
useDeleteEventCoupon: () => useDeleteEventCoupon,
|
|
2429
|
+
useDeleteEventCouponVariants: () => useDeleteEventCouponVariants,
|
|
2422
2430
|
useDeleteEventEmailTranslation: () => useDeleteEventEmailTranslation,
|
|
2423
2431
|
useDeleteEventFaqSection: () => useDeleteEventFaqSection,
|
|
2424
2432
|
useDeleteEventFaqSectionQuestion: () => useDeleteEventFaqSectionQuestion,
|
|
@@ -2663,6 +2671,7 @@ __export(index_exports, {
|
|
|
2663
2671
|
useGetEventCoupon: () => useGetEventCoupon,
|
|
2664
2672
|
useGetEventCouponPasses: () => useGetEventCouponPasses,
|
|
2665
2673
|
useGetEventCouponPayments: () => useGetEventCouponPayments,
|
|
2674
|
+
useGetEventCouponVariants: () => useGetEventCouponVariants,
|
|
2666
2675
|
useGetEventCoupons: () => useGetEventCoupons,
|
|
2667
2676
|
useGetEventDashboardQuestions: () => useGetEventDashboardQuestions,
|
|
2668
2677
|
useGetEventEmail: () => useGetEventEmail,
|
|
@@ -3106,6 +3115,7 @@ __export(index_exports, {
|
|
|
3106
3115
|
useStartEventRoundMatchmaking: () => useStartEventRoundMatchmaking,
|
|
3107
3116
|
useStartEventSessionRoundMatchmaking: () => useStartEventSessionRoundMatchmaking,
|
|
3108
3117
|
useSwitchImage: () => useSwitchImage,
|
|
3118
|
+
useSyncEventCouponToVariants: () => useSyncEventCouponToVariants,
|
|
3109
3119
|
useTestTaxIntegration: () => useTestTaxIntegration,
|
|
3110
3120
|
useToggleOrganizationPaymentIntegration: () => useToggleOrganizationPaymentIntegration,
|
|
3111
3121
|
useToggleTaxIntegration: () => useToggleTaxIntegration,
|
|
@@ -9652,6 +9662,54 @@ var useGetEventCouponPayments = (eventId = "", couponId = "", params = {}, optio
|
|
|
9652
9662
|
);
|
|
9653
9663
|
};
|
|
9654
9664
|
|
|
9665
|
+
// src/queries/events/coupons/useGetEventCouponVariants.ts
|
|
9666
|
+
var EVENT_COUPON_VARIANTS_QUERY_KEY = (eventId, parentCouponId) => {
|
|
9667
|
+
const key = [...EVENT_QUERY_KEY(eventId), "COUPONS"];
|
|
9668
|
+
key.push("VARIANTS", parentCouponId);
|
|
9669
|
+
return key;
|
|
9670
|
+
};
|
|
9671
|
+
var SET_EVENT_COUPON_VARIANTS_QUERY_DATA = (client, keyParams, response) => {
|
|
9672
|
+
client.setQueryData(EVENT_COUPON_VARIANTS_QUERY_KEY(...keyParams), response);
|
|
9673
|
+
};
|
|
9674
|
+
var GetEventCouponVariants = async ({
|
|
9675
|
+
eventId,
|
|
9676
|
+
parentCouponId,
|
|
9677
|
+
pageParam,
|
|
9678
|
+
pageSize,
|
|
9679
|
+
orderBy,
|
|
9680
|
+
search,
|
|
9681
|
+
adminApiParams
|
|
9682
|
+
}) => {
|
|
9683
|
+
const adminApi = await GetAdminAPI(adminApiParams);
|
|
9684
|
+
const { data } = await adminApi.get(
|
|
9685
|
+
`/events/${eventId}/coupons/${parentCouponId}/variants`,
|
|
9686
|
+
{
|
|
9687
|
+
params: {
|
|
9688
|
+
page: pageParam || void 0,
|
|
9689
|
+
pageSize: pageSize || void 0,
|
|
9690
|
+
orderBy: orderBy || void 0,
|
|
9691
|
+
search: search || void 0
|
|
9692
|
+
}
|
|
9693
|
+
}
|
|
9694
|
+
);
|
|
9695
|
+
return data;
|
|
9696
|
+
};
|
|
9697
|
+
var useGetEventCouponVariants = (eventId = "", parentCouponId = "", params = {}, options = {}) => {
|
|
9698
|
+
return useConnectedInfiniteQuery(
|
|
9699
|
+
EVENT_COUPON_VARIANTS_QUERY_KEY(eventId, parentCouponId),
|
|
9700
|
+
(params2) => GetEventCouponVariants({
|
|
9701
|
+
...params2,
|
|
9702
|
+
eventId,
|
|
9703
|
+
parentCouponId
|
|
9704
|
+
}),
|
|
9705
|
+
params,
|
|
9706
|
+
{
|
|
9707
|
+
...options,
|
|
9708
|
+
enabled: !!eventId && !!parentCouponId && (options.enabled ?? true)
|
|
9709
|
+
}
|
|
9710
|
+
);
|
|
9711
|
+
};
|
|
9712
|
+
|
|
9655
9713
|
// src/queries/events/emails/useGetEventEmail.ts
|
|
9656
9714
|
var EVENT_EMAIL_QUERY_KEY = (eventId, type) => [...EVENT_QUERY_KEY(eventId), "EVENT_EMAIL", type];
|
|
9657
9715
|
var SET_EVENT_EMAIL_QUERY_DATA = (client, keyParams, response) => {
|
|
@@ -26559,6 +26617,30 @@ var useCreateEventCoupon = (options = {}) => {
|
|
|
26559
26617
|
return useConnectedMutation(CreateEventCoupon, options);
|
|
26560
26618
|
};
|
|
26561
26619
|
|
|
26620
|
+
// src/mutations/event/coupons/useCreateEventCouponVariants.ts
|
|
26621
|
+
var CreateEventCouponVariants = async ({
|
|
26622
|
+
eventId,
|
|
26623
|
+
couponId,
|
|
26624
|
+
quantity,
|
|
26625
|
+
adminApiParams,
|
|
26626
|
+
queryClient
|
|
26627
|
+
}) => {
|
|
26628
|
+
const connectedXM = await GetAdminAPI(adminApiParams);
|
|
26629
|
+
const { data } = await connectedXM.post(
|
|
26630
|
+
`/events/${eventId}/coupons/${couponId}/variants`,
|
|
26631
|
+
quantity
|
|
26632
|
+
);
|
|
26633
|
+
if (queryClient && data.status === "ok") {
|
|
26634
|
+
queryClient.invalidateQueries({
|
|
26635
|
+
queryKey: EVENT_COUPONS_QUERY_KEY(eventId)
|
|
26636
|
+
});
|
|
26637
|
+
}
|
|
26638
|
+
return data;
|
|
26639
|
+
};
|
|
26640
|
+
var useCreateEventCouponVariants = (options = {}) => {
|
|
26641
|
+
return useConnectedMutation(CreateEventCouponVariants, options);
|
|
26642
|
+
};
|
|
26643
|
+
|
|
26562
26644
|
// src/mutations/event/coupons/useDeleteEventCoupon.ts
|
|
26563
26645
|
var DeleteEventCoupon = async ({
|
|
26564
26646
|
eventId,
|
|
@@ -26584,6 +26666,52 @@ var useDeleteEventCoupon = (options = {}) => {
|
|
|
26584
26666
|
return useConnectedMutation(DeleteEventCoupon, options);
|
|
26585
26667
|
};
|
|
26586
26668
|
|
|
26669
|
+
// src/mutations/event/coupons/useDeleteEventCouponVariants.ts
|
|
26670
|
+
var DeleteEventCouponVariants = async ({
|
|
26671
|
+
eventId,
|
|
26672
|
+
couponId,
|
|
26673
|
+
adminApiParams,
|
|
26674
|
+
queryClient
|
|
26675
|
+
}) => {
|
|
26676
|
+
const connectedXM = await GetAdminAPI(adminApiParams);
|
|
26677
|
+
const { data } = await connectedXM.delete(
|
|
26678
|
+
`/events/${eventId}/coupons/${couponId}/variants`
|
|
26679
|
+
);
|
|
26680
|
+
if (queryClient && data.status === "ok") {
|
|
26681
|
+
queryClient.invalidateQueries({
|
|
26682
|
+
queryKey: EVENT_COUPONS_QUERY_KEY(eventId)
|
|
26683
|
+
});
|
|
26684
|
+
}
|
|
26685
|
+
return data;
|
|
26686
|
+
};
|
|
26687
|
+
var useDeleteEventCouponVariants = (options = {}) => {
|
|
26688
|
+
return useConnectedMutation(DeleteEventCouponVariants, options);
|
|
26689
|
+
};
|
|
26690
|
+
|
|
26691
|
+
// src/mutations/event/coupons/useSyncEventCouponToVariants.ts
|
|
26692
|
+
var SyncEventCouponToVariants = async ({
|
|
26693
|
+
eventId,
|
|
26694
|
+
couponId,
|
|
26695
|
+
fields,
|
|
26696
|
+
adminApiParams,
|
|
26697
|
+
queryClient
|
|
26698
|
+
}) => {
|
|
26699
|
+
const connectedXM = await GetAdminAPI(adminApiParams);
|
|
26700
|
+
const { data } = await connectedXM.put(
|
|
26701
|
+
`/events/${eventId}/coupons/${couponId}/variants`,
|
|
26702
|
+
fields
|
|
26703
|
+
);
|
|
26704
|
+
if (queryClient && data.status === "ok") {
|
|
26705
|
+
queryClient.invalidateQueries({
|
|
26706
|
+
queryKey: EVENT_COUPONS_QUERY_KEY(eventId)
|
|
26707
|
+
});
|
|
26708
|
+
}
|
|
26709
|
+
return data;
|
|
26710
|
+
};
|
|
26711
|
+
var useSyncEventCouponToVariants = (options = {}) => {
|
|
26712
|
+
return useConnectedMutation(SyncEventCouponToVariants, options);
|
|
26713
|
+
};
|
|
26714
|
+
|
|
26587
26715
|
// src/mutations/event/coupons/useUpdateEventCoupon.ts
|
|
26588
26716
|
var UpdateEventCoupon = async ({
|
|
26589
26717
|
eventId,
|
|
@@ -39881,6 +40009,7 @@ var useUploadVideoCaptions = (options = {}) => {
|
|
|
39881
40009
|
CreateEventAttendee,
|
|
39882
40010
|
CreateEventAttendeePackage,
|
|
39883
40011
|
CreateEventCoupon,
|
|
40012
|
+
CreateEventCouponVariants,
|
|
39884
40013
|
CreateEventEmailTranslation,
|
|
39885
40014
|
CreateEventFaqSection,
|
|
39886
40015
|
CreateEventFaqSectionQuestion,
|
|
@@ -40027,6 +40156,7 @@ var useUploadVideoCaptions = (options = {}) => {
|
|
|
40027
40156
|
DeleteEventAttendee,
|
|
40028
40157
|
DeleteEventAttendeePackage,
|
|
40029
40158
|
DeleteEventCoupon,
|
|
40159
|
+
DeleteEventCouponVariants,
|
|
40030
40160
|
DeleteEventEmailTranslation,
|
|
40031
40161
|
DeleteEventFaqSection,
|
|
40032
40162
|
DeleteEventFaqSectionQuestion,
|
|
@@ -40172,6 +40302,7 @@ var useUploadVideoCaptions = (options = {}) => {
|
|
|
40172
40302
|
EVENT_COUPON_PASSES_QUERY_KEY,
|
|
40173
40303
|
EVENT_COUPON_PAYMENTS_QUERY_KEY,
|
|
40174
40304
|
EVENT_COUPON_QUERY_KEY,
|
|
40305
|
+
EVENT_COUPON_VARIANTS_QUERY_KEY,
|
|
40175
40306
|
EVENT_CO_HOSTS_QUERY_KEY,
|
|
40176
40307
|
EVENT_DASHBOARD_QUESTIONS_QUERY_KEY,
|
|
40177
40308
|
EVENT_EMAIL_QUERY_KEY,
|
|
@@ -40510,6 +40641,7 @@ var useUploadVideoCaptions = (options = {}) => {
|
|
|
40510
40641
|
GetEventCoupon,
|
|
40511
40642
|
GetEventCouponPasses,
|
|
40512
40643
|
GetEventCouponPayments,
|
|
40644
|
+
GetEventCouponVariants,
|
|
40513
40645
|
GetEventCoupons,
|
|
40514
40646
|
GetEventDashboardQuestions,
|
|
40515
40647
|
GetEventEmail,
|
|
@@ -41201,6 +41333,7 @@ var useUploadVideoCaptions = (options = {}) => {
|
|
|
41201
41333
|
SET_EVENT_COUPON_PASSES_QUERY_DATA,
|
|
41202
41334
|
SET_EVENT_COUPON_PAYMENTS_QUERY_DATA,
|
|
41203
41335
|
SET_EVENT_COUPON_QUERY_DATA,
|
|
41336
|
+
SET_EVENT_COUPON_VARIANTS_QUERY_DATA,
|
|
41204
41337
|
SET_EVENT_CO_HOSTS_QUERY_DATA,
|
|
41205
41338
|
SET_EVENT_DASHBOARD_QUESTIONS_QUERY_DATA,
|
|
41206
41339
|
SET_EVENT_EMAIL_QUERY_DATA,
|
|
@@ -41585,6 +41718,7 @@ var useUploadVideoCaptions = (options = {}) => {
|
|
|
41585
41718
|
SupportedLocale,
|
|
41586
41719
|
SurveyQuestionType,
|
|
41587
41720
|
SwitchImage,
|
|
41721
|
+
SyncEventCouponToVariants,
|
|
41588
41722
|
SystemEventLogStatus,
|
|
41589
41723
|
TAX_CODES_QUERY_KEY,
|
|
41590
41724
|
TAX_INTEGRATIONS_QUERY_KEY,
|
|
@@ -41919,6 +42053,7 @@ var useUploadVideoCaptions = (options = {}) => {
|
|
|
41919
42053
|
useCreateEventAttendee,
|
|
41920
42054
|
useCreateEventAttendeePackage,
|
|
41921
42055
|
useCreateEventCoupon,
|
|
42056
|
+
useCreateEventCouponVariants,
|
|
41922
42057
|
useCreateEventEmailTranslation,
|
|
41923
42058
|
useCreateEventFaqSection,
|
|
41924
42059
|
useCreateEventFaqSectionQuestion,
|
|
@@ -42056,6 +42191,7 @@ var useUploadVideoCaptions = (options = {}) => {
|
|
|
42056
42191
|
useDeleteEventAttendee,
|
|
42057
42192
|
useDeleteEventAttendeePackage,
|
|
42058
42193
|
useDeleteEventCoupon,
|
|
42194
|
+
useDeleteEventCouponVariants,
|
|
42059
42195
|
useDeleteEventEmailTranslation,
|
|
42060
42196
|
useDeleteEventFaqSection,
|
|
42061
42197
|
useDeleteEventFaqSectionQuestion,
|
|
@@ -42300,6 +42436,7 @@ var useUploadVideoCaptions = (options = {}) => {
|
|
|
42300
42436
|
useGetEventCoupon,
|
|
42301
42437
|
useGetEventCouponPasses,
|
|
42302
42438
|
useGetEventCouponPayments,
|
|
42439
|
+
useGetEventCouponVariants,
|
|
42303
42440
|
useGetEventCoupons,
|
|
42304
42441
|
useGetEventDashboardQuestions,
|
|
42305
42442
|
useGetEventEmail,
|
|
@@ -42743,6 +42880,7 @@ var useUploadVideoCaptions = (options = {}) => {
|
|
|
42743
42880
|
useStartEventRoundMatchmaking,
|
|
42744
42881
|
useStartEventSessionRoundMatchmaking,
|
|
42745
42882
|
useSwitchImage,
|
|
42883
|
+
useSyncEventCouponToVariants,
|
|
42746
42884
|
useTestTaxIntegration,
|
|
42747
42885
|
useToggleOrganizationPaymentIntegration,
|
|
42748
42886
|
useToggleTaxIntegration,
|