@connectedxm/client 0.5.24 → 0.5.26
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 +133 -69
- package/dist/index.d.ts +133 -69
- package/dist/index.js +288 -37
- package/dist/index.mjs +271 -37
- package/package.json +7 -4
package/dist/index.js
CHANGED
|
@@ -248,7 +248,11 @@ __export(src_exports, {
|
|
|
248
248
|
GetSelfEventListingReport: () => GetSelfEventListingReport,
|
|
249
249
|
GetSelfEventListings: () => GetSelfEventListings,
|
|
250
250
|
GetSelfEventRegistration: () => GetSelfEventRegistration,
|
|
251
|
+
GetSelfEventRegistrationCoupon: () => GetSelfEventRegistrationCoupon,
|
|
252
|
+
GetSelfEventRegistrationCouponRegistrations: () => GetSelfEventRegistrationCouponRegistrations,
|
|
253
|
+
GetSelfEventRegistrationCoupons: () => GetSelfEventRegistrationCoupons,
|
|
251
254
|
GetSelfEventRegistrationIntent: () => GetSelfEventRegistrationIntent,
|
|
255
|
+
GetSelfEventRegistrationPayment: () => GetSelfEventRegistrationPayment,
|
|
252
256
|
GetSelfEventRegistrationPurchase: () => GetSelfEventRegistrationPurchase,
|
|
253
257
|
GetSelfEventRegistrationPurchaseAddOns: () => GetSelfEventRegistrationPurchaseAddOns,
|
|
254
258
|
GetSelfEventRegistrationPurchaseAddOnsIntent: () => GetSelfEventRegistrationPurchaseAddOnsIntent,
|
|
@@ -256,6 +260,7 @@ __export(src_exports, {
|
|
|
256
260
|
GetSelfEventRegistrationPurchaseSections: () => GetSelfEventRegistrationPurchaseSections,
|
|
257
261
|
GetSelfEventRegistrationStatus: () => GetSelfEventRegistrationStatus,
|
|
258
262
|
GetSelfEventSessions: () => GetSelfEventSessions,
|
|
263
|
+
GetSelfEventTicketCouponIntent: () => GetSelfEventTicketCouponIntent,
|
|
259
264
|
GetSelfEvents: () => GetSelfEvents,
|
|
260
265
|
GetSelfFeed: () => GetSelfFeed,
|
|
261
266
|
GetSelfGroupMembership: () => GetSelfGroupMembership,
|
|
@@ -343,7 +348,11 @@ __export(src_exports, {
|
|
|
343
348
|
SELF_DELEGATES_QUERY_KEY: () => SELF_DELEGATES_QUERY_KEY,
|
|
344
349
|
SELF_DELEGATE_OF_QUERY_KEY: () => SELF_DELEGATE_OF_QUERY_KEY,
|
|
345
350
|
SELF_EVENTS_QUERY_KEY: () => SELF_EVENTS_QUERY_KEY,
|
|
351
|
+
SELF_EVENT_REGISTRATION_COUPONS_QUERY_KEY: () => SELF_EVENT_REGISTRATION_COUPONS_QUERY_KEY,
|
|
352
|
+
SELF_EVENT_REGISTRATION_COUPON_QUERY_KEY: () => SELF_EVENT_REGISTRATION_COUPON_QUERY_KEY,
|
|
353
|
+
SELF_EVENT_REGISTRATION_COUPON_REGISTRATIONS_QUERY_KEY: () => SELF_EVENT_REGISTRATION_COUPON_REGISTRATIONS_QUERY_KEY,
|
|
346
354
|
SELF_EVENT_REGISTRATION_INTENT_QUERY_KEY: () => SELF_EVENT_REGISTRATION_INTENT_QUERY_KEY,
|
|
355
|
+
SELF_EVENT_REGISTRATION_PAYMENT_QUERY_KEY: () => SELF_EVENT_REGISTRATION_PAYMENT_QUERY_KEY,
|
|
347
356
|
SELF_EVENT_REGISTRATION_PURCHASE_ADD_ONS_INTENT_QUERY_KEY: () => SELF_EVENT_REGISTRATION_PURCHASE_ADD_ONS_INTENT_QUERY_KEY,
|
|
348
357
|
SELF_EVENT_REGISTRATION_PURCHASE_ADD_ONS_QUERY_KEY: () => SELF_EVENT_REGISTRATION_PURCHASE_ADD_ONS_QUERY_KEY,
|
|
349
358
|
SELF_EVENT_REGISTRATION_PURCHASE_QUERY_KEY: () => SELF_EVENT_REGISTRATION_PURCHASE_QUERY_KEY,
|
|
@@ -352,6 +361,7 @@ __export(src_exports, {
|
|
|
352
361
|
SELF_EVENT_REGISTRATION_QUERY_KEY: () => SELF_EVENT_REGISTRATION_QUERY_KEY,
|
|
353
362
|
SELF_EVENT_REGISTRATION_STATUS_QUERY_KEY: () => SELF_EVENT_REGISTRATION_STATUS_QUERY_KEY,
|
|
354
363
|
SELF_EVENT_SESSIONS_QUERY_KEY: () => SELF_EVENT_SESSIONS_QUERY_KEY,
|
|
364
|
+
SELF_EVENT_TICKET_COUPON_INTENT_QUERY_KEY: () => SELF_EVENT_TICKET_COUPON_INTENT_QUERY_KEY,
|
|
355
365
|
SELF_FEED_QUERY_KEY: () => SELF_FEED_QUERY_KEY,
|
|
356
366
|
SELF_GROUP_MEMBERSHIPS_QUERY_KEY: () => SELF_GROUP_MEMBERSHIPS_QUERY_KEY,
|
|
357
367
|
SELF_GROUP_MEMBERSHIP_QUERY_KEY: () => SELF_GROUP_MEMBERSHIP_QUERY_KEY,
|
|
@@ -439,6 +449,8 @@ __export(src_exports, {
|
|
|
439
449
|
SET_SELF_CHAT_CHANNEL_MEMBERS_QUERY_DATA: () => SET_SELF_CHAT_CHANNEL_MEMBERS_QUERY_DATA,
|
|
440
450
|
SET_SELF_CHAT_CHANNEL_MESSAGES_QUERY_DATA: () => SET_SELF_CHAT_CHANNEL_MESSAGES_QUERY_DATA,
|
|
441
451
|
SET_SELF_CHAT_CHANNEL_QUERY_DATA: () => SET_SELF_CHAT_CHANNEL_QUERY_DATA,
|
|
452
|
+
SET_SELF_EVENT_REGISTRATION_COUPON_QUERY_DATA: () => SET_SELF_EVENT_REGISTRATION_COUPON_QUERY_DATA,
|
|
453
|
+
SET_SELF_EVENT_REGISTRATION_PAYMENT_QUERY_DATA: () => SET_SELF_EVENT_REGISTRATION_PAYMENT_QUERY_DATA,
|
|
442
454
|
SET_SELF_EVENT_REGISTRATION_PURCHASE_ADD_ONS_QUERY_DATA: () => SET_SELF_EVENT_REGISTRATION_PURCHASE_ADD_ONS_QUERY_DATA,
|
|
443
455
|
SET_SELF_EVENT_REGISTRATION_PURCHASE_QUERY_DATA: () => SET_SELF_EVENT_REGISTRATION_PURCHASE_QUERY_DATA,
|
|
444
456
|
SET_SELF_EVENT_REGISTRATION_PURCHASE_RESERVATION_SECTIONS_QUERY_DATA: () => SET_SELF_EVENT_REGISTRATION_PURCHASE_RESERVATION_SECTIONS_QUERY_DATA,
|
|
@@ -667,7 +679,11 @@ __export(src_exports, {
|
|
|
667
679
|
useGetSelfEventListings: () => useGetSelfEventListings,
|
|
668
680
|
useGetSelfEventListingsRegistrations: () => useGetSelfEventListingsRegistrations,
|
|
669
681
|
useGetSelfEventRegistration: () => useGetSelfEventRegistration,
|
|
682
|
+
useGetSelfEventRegistrationCoupon: () => useGetSelfEventRegistrationCoupon,
|
|
683
|
+
useGetSelfEventRegistrationCouponRegistrations: () => useGetSelfEventRegistrationCouponRegistrations,
|
|
684
|
+
useGetSelfEventRegistrationCoupons: () => useGetSelfEventRegistrationCoupons,
|
|
670
685
|
useGetSelfEventRegistrationIntent: () => useGetSelfEventRegistrationIntent,
|
|
686
|
+
useGetSelfEventRegistrationPayment: () => useGetSelfEventRegistrationPayment,
|
|
671
687
|
useGetSelfEventRegistrationPurchase: () => useGetSelfEventRegistrationPurchase,
|
|
672
688
|
useGetSelfEventRegistrationPurchaseAddOns: () => useGetSelfEventRegistrationPurchaseAddOns,
|
|
673
689
|
useGetSelfEventRegistrationPurchaseAddOnsIntent: () => useGetSelfEventRegistrationPurchaseAddOnsIntent,
|
|
@@ -675,6 +691,7 @@ __export(src_exports, {
|
|
|
675
691
|
useGetSelfEventRegistrationPurchaseSections: () => useGetSelfEventRegistrationPurchaseSections,
|
|
676
692
|
useGetSelfEventRegistrationStatus: () => useGetSelfEventRegistrationStatus,
|
|
677
693
|
useGetSelfEventSessions: () => useGetSelfEventSessions,
|
|
694
|
+
useGetSelfEventTicketCouponIntent: () => useGetSelfEventTicketCouponIntent,
|
|
678
695
|
useGetSelfEvents: () => useGetSelfEvents,
|
|
679
696
|
useGetSelfFeed: () => useGetSelfFeed,
|
|
680
697
|
useGetSelfGroupMembership: () => useGetSelfGroupMembership,
|
|
@@ -818,8 +835,7 @@ var useConnectedXM = () => {
|
|
|
818
835
|
// src/hooks/useIsAccountFollowing.ts
|
|
819
836
|
var useIsAccountFollowing = (accountId) => {
|
|
820
837
|
const { data: relationships } = useGetSelfRelationships();
|
|
821
|
-
if (!accountId)
|
|
822
|
-
return false;
|
|
838
|
+
if (!accountId) return false;
|
|
823
839
|
if (!isUUID(accountId)) {
|
|
824
840
|
throw new Error("Invalid accountId. Did you pass in the username?");
|
|
825
841
|
}
|
|
@@ -829,8 +845,7 @@ var useIsAccountFollowing = (accountId) => {
|
|
|
829
845
|
// src/hooks/useGroupStatus.ts
|
|
830
846
|
var useGroupStatus = (groupId) => {
|
|
831
847
|
const { data: relationships } = useGetSelfRelationships();
|
|
832
|
-
if (!groupId)
|
|
833
|
-
return false;
|
|
848
|
+
if (!groupId) return false;
|
|
834
849
|
if (!isUUID(groupId)) {
|
|
835
850
|
throw new Error("Invalid groupId. Did you pass in the slug?");
|
|
836
851
|
}
|
|
@@ -840,8 +855,7 @@ var useGroupStatus = (groupId) => {
|
|
|
840
855
|
// src/hooks/useIsEventRegistered.ts
|
|
841
856
|
var useIsEventRegistered = (eventId) => {
|
|
842
857
|
const { data: relationships } = useGetSelfRelationships();
|
|
843
|
-
if (!eventId)
|
|
844
|
-
return false;
|
|
858
|
+
if (!eventId) return false;
|
|
845
859
|
if (!isUUID(eventId)) {
|
|
846
860
|
throw new Error("Invalid eventId. Did you pass in the slug?");
|
|
847
861
|
}
|
|
@@ -851,8 +865,7 @@ var useIsEventRegistered = (eventId) => {
|
|
|
851
865
|
// src/hooks/useIsChannelSubscribed.ts
|
|
852
866
|
var useIsChannelSubscribed = (channelId) => {
|
|
853
867
|
const { data: relationships } = useGetSelfRelationships();
|
|
854
|
-
if (!channelId)
|
|
855
|
-
return false;
|
|
868
|
+
if (!channelId) return false;
|
|
856
869
|
if (!isUUID(channelId)) {
|
|
857
870
|
throw new Error("Invalid channelId. Did you pass in the slug?");
|
|
858
871
|
}
|
|
@@ -1242,22 +1255,18 @@ var useConnectedSingleQuery = (queryKeys, queryFn, options = {}) => {
|
|
|
1242
1255
|
// 60 Seconds
|
|
1243
1256
|
retry: (failureCount, error) => {
|
|
1244
1257
|
if (error.response?.status === 404) {
|
|
1245
|
-
if (onNotFound)
|
|
1246
|
-
onNotFound(error, queryKeys, options.shouldRedirect || false);
|
|
1258
|
+
if (onNotFound) onNotFound(error, queryKeys, options.shouldRedirect || false);
|
|
1247
1259
|
return false;
|
|
1248
1260
|
}
|
|
1249
1261
|
if (error.response?.status === 403 || error.response?.status === 453) {
|
|
1250
|
-
if (onModuleForbidden)
|
|
1251
|
-
onModuleForbidden(error, queryKeys, options.shouldRedirect || false);
|
|
1262
|
+
if (onModuleForbidden) onModuleForbidden(error, queryKeys, options.shouldRedirect || false);
|
|
1252
1263
|
return false;
|
|
1253
1264
|
}
|
|
1254
1265
|
if (error.response?.status === 401) {
|
|
1255
|
-
if (onNotAuthorized)
|
|
1256
|
-
onNotAuthorized(error, queryKeys, options.shouldRedirect || false);
|
|
1266
|
+
if (onNotAuthorized) onNotAuthorized(error, queryKeys, options.shouldRedirect || false);
|
|
1257
1267
|
return false;
|
|
1258
1268
|
}
|
|
1259
|
-
if (failureCount < 3)
|
|
1260
|
-
return true;
|
|
1269
|
+
if (failureCount < 3) return true;
|
|
1261
1270
|
return false;
|
|
1262
1271
|
},
|
|
1263
1272
|
...options,
|
|
@@ -1364,8 +1373,7 @@ var setFirstPageData = (response) => {
|
|
|
1364
1373
|
var useConnectedInfiniteQuery = (queryKeys, queryFn, params = {}, options = {
|
|
1365
1374
|
shouldRedirect: false
|
|
1366
1375
|
}) => {
|
|
1367
|
-
if (typeof params.pageSize === "undefined")
|
|
1368
|
-
params.pageSize = 10;
|
|
1376
|
+
if (typeof params.pageSize === "undefined") params.pageSize = 10;
|
|
1369
1377
|
const {
|
|
1370
1378
|
locale,
|
|
1371
1379
|
onModuleForbidden,
|
|
@@ -1388,22 +1396,18 @@ var useConnectedInfiniteQuery = (queryKeys, queryFn, params = {}, options = {
|
|
|
1388
1396
|
// 60 Seconds
|
|
1389
1397
|
retry: (failureCount, error) => {
|
|
1390
1398
|
if (error.response?.status === 404) {
|
|
1391
|
-
if (onNotFound)
|
|
1392
|
-
onNotFound(error, queryKeys, options.shouldRedirect || false);
|
|
1399
|
+
if (onNotFound) onNotFound(error, queryKeys, options.shouldRedirect || false);
|
|
1393
1400
|
return false;
|
|
1394
1401
|
}
|
|
1395
1402
|
if (error.response?.status === 403 || error.response?.status === 453) {
|
|
1396
|
-
if (onModuleForbidden)
|
|
1397
|
-
onModuleForbidden(error, queryKeys, options.shouldRedirect || false);
|
|
1403
|
+
if (onModuleForbidden) onModuleForbidden(error, queryKeys, options.shouldRedirect || false);
|
|
1398
1404
|
return false;
|
|
1399
1405
|
}
|
|
1400
1406
|
if (error.response?.status === 401) {
|
|
1401
|
-
if (onNotAuthorized)
|
|
1402
|
-
onNotAuthorized(error, queryKeys, options.shouldRedirect || false);
|
|
1407
|
+
if (onNotAuthorized) onNotAuthorized(error, queryKeys, options.shouldRedirect || false);
|
|
1403
1408
|
return false;
|
|
1404
1409
|
}
|
|
1405
|
-
if (failureCount < 3)
|
|
1406
|
-
return true;
|
|
1410
|
+
if (failureCount < 3) return true;
|
|
1407
1411
|
return false;
|
|
1408
1412
|
},
|
|
1409
1413
|
...options,
|
|
@@ -1754,8 +1758,7 @@ var useGetAccountByShareCode = (shareCode = "", options = {}) => {
|
|
|
1754
1758
|
// src/queries/groups/useGetGroups.ts
|
|
1755
1759
|
var GROUPS_QUERY_KEY = (access) => {
|
|
1756
1760
|
const keys = ["GROUPS"];
|
|
1757
|
-
if (access)
|
|
1758
|
-
keys.push(access);
|
|
1761
|
+
if (access) keys.push(access);
|
|
1759
1762
|
return keys;
|
|
1760
1763
|
};
|
|
1761
1764
|
var SET_GROUPS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
|
|
@@ -4166,8 +4169,7 @@ var useGetOrganizationPaymentIntegration = (options = {}) => {
|
|
|
4166
4169
|
// src/queries/self/useGetSelf.ts
|
|
4167
4170
|
var SELF_QUERY_KEY = (ignoreExecuteAs) => {
|
|
4168
4171
|
const keys = ["SELF"];
|
|
4169
|
-
if (ignoreExecuteAs)
|
|
4170
|
-
keys.push("IGNORE_EXECUTEAS");
|
|
4172
|
+
if (ignoreExecuteAs) keys.push("IGNORE_EXECUTEAS");
|
|
4171
4173
|
return keys;
|
|
4172
4174
|
};
|
|
4173
4175
|
var SET_SELF_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
|
|
@@ -4401,7 +4403,13 @@ var useGetSelfChatChannelMessages = (channelId = "", params = {}, options = {})
|
|
|
4401
4403
|
};
|
|
4402
4404
|
|
|
4403
4405
|
// src/queries/self/registration/useGetSelfEventRegistration.ts
|
|
4404
|
-
var SELF_EVENT_REGISTRATION_QUERY_KEY = (eventId) =>
|
|
4406
|
+
var SELF_EVENT_REGISTRATION_QUERY_KEY = (eventId, registrationId) => {
|
|
4407
|
+
const key = [...SELF_QUERY_KEY(), "EVENT_REGISTRATION", eventId];
|
|
4408
|
+
if (registrationId) {
|
|
4409
|
+
key.push(registrationId);
|
|
4410
|
+
}
|
|
4411
|
+
return key;
|
|
4412
|
+
};
|
|
4405
4413
|
var SET_SELF_EVENT_REGISTRATION_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
|
|
4406
4414
|
client.setQueryData(
|
|
4407
4415
|
[
|
|
@@ -4465,6 +4473,51 @@ var useGetSelfEventRegistrationIntent = (eventId, registrationId = "", options =
|
|
|
4465
4473
|
);
|
|
4466
4474
|
};
|
|
4467
4475
|
|
|
4476
|
+
// src/queries/self/registration/useGetSelfEventRegistrationPayment.ts
|
|
4477
|
+
var SELF_EVENT_REGISTRATION_PAYMENT_QUERY_KEY = (eventId, paymentId) => [
|
|
4478
|
+
...SELF_EVENT_REGISTRATION_QUERY_KEY(eventId),
|
|
4479
|
+
"PAYMENT",
|
|
4480
|
+
paymentId
|
|
4481
|
+
];
|
|
4482
|
+
var SET_SELF_EVENT_REGISTRATION_PAYMENT_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
|
|
4483
|
+
client.setQueryData(
|
|
4484
|
+
[
|
|
4485
|
+
...SELF_EVENT_REGISTRATION_PAYMENT_QUERY_KEY(...keyParams),
|
|
4486
|
+
...GetBaseSingleQueryKeys(...baseKeys)
|
|
4487
|
+
],
|
|
4488
|
+
response
|
|
4489
|
+
);
|
|
4490
|
+
};
|
|
4491
|
+
var GetSelfEventRegistrationPayment = async ({
|
|
4492
|
+
eventId,
|
|
4493
|
+
registrationId,
|
|
4494
|
+
paymentId,
|
|
4495
|
+
clientApiParams
|
|
4496
|
+
}) => {
|
|
4497
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4498
|
+
const { data } = await clientApi.get(
|
|
4499
|
+
`/self/events/${eventId}/registration/${registrationId}/registered/payments/${paymentId}`,
|
|
4500
|
+
{}
|
|
4501
|
+
);
|
|
4502
|
+
return data;
|
|
4503
|
+
};
|
|
4504
|
+
var useGetSelfEventRegistrationPayment = (eventId, registrationId, paymentId, options = {}) => {
|
|
4505
|
+
const { authenticated } = useConnectedXM();
|
|
4506
|
+
return useConnectedSingleQuery_default(
|
|
4507
|
+
SELF_EVENT_REGISTRATION_PAYMENT_QUERY_KEY(eventId, paymentId),
|
|
4508
|
+
(params) => GetSelfEventRegistrationPayment({
|
|
4509
|
+
eventId,
|
|
4510
|
+
registrationId,
|
|
4511
|
+
paymentId,
|
|
4512
|
+
...params
|
|
4513
|
+
}),
|
|
4514
|
+
{
|
|
4515
|
+
...options,
|
|
4516
|
+
enabled: !!authenticated && !!eventId && !!registrationId && !!paymentId && (options?.enabled ?? true)
|
|
4517
|
+
}
|
|
4518
|
+
);
|
|
4519
|
+
};
|
|
4520
|
+
|
|
4468
4521
|
// src/queries/self/registration/useGetSelfEventRegistrationPurchase.ts
|
|
4469
4522
|
var SELF_EVENT_REGISTRATION_PURCHASE_QUERY_KEY = (eventId, registrationId, purchaseId) => [
|
|
4470
4523
|
...SELF_QUERY_KEY(),
|
|
@@ -4781,6 +4834,190 @@ var useGetSelfEventRegistrationPurchaseAddOnsIntent = (eventId, registrationId,
|
|
|
4781
4834
|
);
|
|
4782
4835
|
};
|
|
4783
4836
|
|
|
4837
|
+
// src/queries/self/registration/useGetSelfEventTicketCouponIntent.ts
|
|
4838
|
+
var SELF_EVENT_TICKET_COUPON_INTENT_QUERY_KEY = (eventId, registrationId, ticketId, quantity) => [
|
|
4839
|
+
...SELF_EVENT_REGISTRATION_QUERY_KEY(eventId),
|
|
4840
|
+
registrationId,
|
|
4841
|
+
"COUPON_INTENT",
|
|
4842
|
+
ticketId,
|
|
4843
|
+
quantity
|
|
4844
|
+
];
|
|
4845
|
+
var GetSelfEventTicketCouponIntent = async ({
|
|
4846
|
+
eventId,
|
|
4847
|
+
registrationId,
|
|
4848
|
+
ticketId,
|
|
4849
|
+
quantity,
|
|
4850
|
+
clientApiParams
|
|
4851
|
+
}) => {
|
|
4852
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4853
|
+
const { data } = await clientApi.get(
|
|
4854
|
+
`/self/events/${eventId}/registration/${registrationId}/coupons/intent`,
|
|
4855
|
+
{
|
|
4856
|
+
params: {
|
|
4857
|
+
ticketId,
|
|
4858
|
+
quantity
|
|
4859
|
+
}
|
|
4860
|
+
}
|
|
4861
|
+
);
|
|
4862
|
+
return data;
|
|
4863
|
+
};
|
|
4864
|
+
var useGetSelfEventTicketCouponIntent = (eventId = "", registrationId = "", ticketId = "", quantity = 0, options = {}) => {
|
|
4865
|
+
const { authenticated } = useConnectedXM();
|
|
4866
|
+
return useConnectedSingleQuery_default(
|
|
4867
|
+
SELF_EVENT_TICKET_COUPON_INTENT_QUERY_KEY(
|
|
4868
|
+
eventId,
|
|
4869
|
+
registrationId,
|
|
4870
|
+
ticketId,
|
|
4871
|
+
quantity
|
|
4872
|
+
),
|
|
4873
|
+
(params) => GetSelfEventTicketCouponIntent({
|
|
4874
|
+
eventId,
|
|
4875
|
+
registrationId,
|
|
4876
|
+
ticketId,
|
|
4877
|
+
quantity,
|
|
4878
|
+
...params
|
|
4879
|
+
}),
|
|
4880
|
+
{
|
|
4881
|
+
staleTime: Infinity,
|
|
4882
|
+
retry: false,
|
|
4883
|
+
retryOnMount: false,
|
|
4884
|
+
...options,
|
|
4885
|
+
enabled: !!authenticated && !!eventId && !!registrationId && !!ticketId && !!quantity && (options?.enabled ?? true)
|
|
4886
|
+
}
|
|
4887
|
+
);
|
|
4888
|
+
};
|
|
4889
|
+
|
|
4890
|
+
// src/queries/self/registration/useGetSelfEventRegistrationCoupons.ts
|
|
4891
|
+
var SELF_EVENT_REGISTRATION_COUPONS_QUERY_KEY = (eventId, registrationId) => [
|
|
4892
|
+
...SELF_EVENT_REGISTRATION_QUERY_KEY(eventId, registrationId),
|
|
4893
|
+
"COUPONS"
|
|
4894
|
+
];
|
|
4895
|
+
var GetSelfEventRegistrationCoupons = async ({
|
|
4896
|
+
eventId,
|
|
4897
|
+
registrationId,
|
|
4898
|
+
clientApiParams,
|
|
4899
|
+
queryClient,
|
|
4900
|
+
locale
|
|
4901
|
+
}) => {
|
|
4902
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4903
|
+
const { data } = await clientApi.get(
|
|
4904
|
+
`/self/events/${eventId}/registration/${registrationId}/coupons`,
|
|
4905
|
+
{}
|
|
4906
|
+
);
|
|
4907
|
+
if (queryClient && data.status === "ok") {
|
|
4908
|
+
CacheIndividualQueries(
|
|
4909
|
+
data,
|
|
4910
|
+
queryClient,
|
|
4911
|
+
(couponId) => SELF_EVENT_REGISTRATION_COUPON_QUERY_KEY(
|
|
4912
|
+
eventId,
|
|
4913
|
+
registrationId,
|
|
4914
|
+
couponId
|
|
4915
|
+
),
|
|
4916
|
+
locale
|
|
4917
|
+
);
|
|
4918
|
+
}
|
|
4919
|
+
return data;
|
|
4920
|
+
};
|
|
4921
|
+
var useGetSelfEventRegistrationCoupons = (eventId, registrationId, params = {}, options = {}) => {
|
|
4922
|
+
const { authenticated } = useConnectedXM();
|
|
4923
|
+
return useConnectedInfiniteQuery(
|
|
4924
|
+
SELF_EVENT_REGISTRATION_COUPONS_QUERY_KEY(eventId, registrationId),
|
|
4925
|
+
(params2) => GetSelfEventRegistrationCoupons({
|
|
4926
|
+
eventId,
|
|
4927
|
+
registrationId,
|
|
4928
|
+
...params2
|
|
4929
|
+
}),
|
|
4930
|
+
params,
|
|
4931
|
+
{
|
|
4932
|
+
...options,
|
|
4933
|
+
enabled: !!authenticated && !!eventId && !!registrationId && (options?.enabled ?? true)
|
|
4934
|
+
}
|
|
4935
|
+
);
|
|
4936
|
+
};
|
|
4937
|
+
|
|
4938
|
+
// src/queries/self/registration/useGetSelfEventRegistrationCoupon.ts
|
|
4939
|
+
var SELF_EVENT_REGISTRATION_COUPON_QUERY_KEY = (eventId, registrationId, couponId) => [
|
|
4940
|
+
...SELF_EVENT_REGISTRATION_COUPONS_QUERY_KEY(eventId, registrationId),
|
|
4941
|
+
couponId
|
|
4942
|
+
];
|
|
4943
|
+
var SET_SELF_EVENT_REGISTRATION_COUPON_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
|
|
4944
|
+
client.setQueryData(
|
|
4945
|
+
[
|
|
4946
|
+
...SELF_EVENT_REGISTRATION_COUPON_QUERY_KEY(...keyParams),
|
|
4947
|
+
...GetBaseSingleQueryKeys(...baseKeys)
|
|
4948
|
+
],
|
|
4949
|
+
response
|
|
4950
|
+
);
|
|
4951
|
+
};
|
|
4952
|
+
var GetSelfEventRegistrationCoupon = async ({
|
|
4953
|
+
eventId,
|
|
4954
|
+
registrationId,
|
|
4955
|
+
couponId,
|
|
4956
|
+
clientApiParams
|
|
4957
|
+
}) => {
|
|
4958
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4959
|
+
const { data } = await clientApi.get(
|
|
4960
|
+
`/self/events/${eventId}/registration/${registrationId}/coupons/${couponId}`,
|
|
4961
|
+
{}
|
|
4962
|
+
);
|
|
4963
|
+
return data;
|
|
4964
|
+
};
|
|
4965
|
+
var useGetSelfEventRegistrationCoupon = (eventId = "", registrationId = "", couponId = "", options = {}) => {
|
|
4966
|
+
const { authenticated } = useConnectedXM();
|
|
4967
|
+
return useConnectedSingleQuery_default(
|
|
4968
|
+
SELF_EVENT_REGISTRATION_COUPON_QUERY_KEY(eventId, registrationId, couponId),
|
|
4969
|
+
(params) => GetSelfEventRegistrationCoupon({
|
|
4970
|
+
eventId,
|
|
4971
|
+
registrationId,
|
|
4972
|
+
couponId,
|
|
4973
|
+
...params
|
|
4974
|
+
}),
|
|
4975
|
+
{
|
|
4976
|
+
...options,
|
|
4977
|
+
enabled: !!authenticated && !!eventId && !!registrationId && !!couponId && (options?.enabled ?? true)
|
|
4978
|
+
}
|
|
4979
|
+
);
|
|
4980
|
+
};
|
|
4981
|
+
|
|
4982
|
+
// src/queries/self/registration/useGetSelfEventRegistrationCouponRegistrations.ts
|
|
4983
|
+
var SELF_EVENT_REGISTRATION_COUPON_REGISTRATIONS_QUERY_KEY = (eventId, registrationId) => [
|
|
4984
|
+
...SELF_EVENT_REGISTRATION_QUERY_KEY(eventId, registrationId),
|
|
4985
|
+
"COUPONS"
|
|
4986
|
+
];
|
|
4987
|
+
var GetSelfEventRegistrationCouponRegistrations = async ({
|
|
4988
|
+
eventId,
|
|
4989
|
+
registrationId,
|
|
4990
|
+
couponId,
|
|
4991
|
+
clientApiParams
|
|
4992
|
+
}) => {
|
|
4993
|
+
const clientApi = await GetClientAPI(clientApiParams);
|
|
4994
|
+
const { data } = await clientApi.get(
|
|
4995
|
+
`/self/events/${eventId}/registration/${registrationId}/coupons/${couponId}/registrations`,
|
|
4996
|
+
{}
|
|
4997
|
+
);
|
|
4998
|
+
return data;
|
|
4999
|
+
};
|
|
5000
|
+
var useGetSelfEventRegistrationCouponRegistrations = (eventId = "", registrationId = "", couponId = "", params = {}, options = {}) => {
|
|
5001
|
+
const { authenticated } = useConnectedXM();
|
|
5002
|
+
return useConnectedInfiniteQuery(
|
|
5003
|
+
SELF_EVENT_REGISTRATION_COUPON_REGISTRATIONS_QUERY_KEY(
|
|
5004
|
+
eventId,
|
|
5005
|
+
registrationId
|
|
5006
|
+
),
|
|
5007
|
+
(params2) => GetSelfEventRegistrationCouponRegistrations({
|
|
5008
|
+
eventId,
|
|
5009
|
+
registrationId,
|
|
5010
|
+
couponId,
|
|
5011
|
+
...params2
|
|
5012
|
+
}),
|
|
5013
|
+
params,
|
|
5014
|
+
{
|
|
5015
|
+
...options,
|
|
5016
|
+
enabled: !!authenticated && !!eventId && !!registrationId && !!couponId && (options?.enabled ?? true)
|
|
5017
|
+
}
|
|
5018
|
+
);
|
|
5019
|
+
};
|
|
5020
|
+
|
|
4784
5021
|
// src/queries/self/subscriptions/useGetSelfSubscriptions.ts
|
|
4785
5022
|
var SELF_SUBSCRIPTIONS_QUERY_KEY = (status) => {
|
|
4786
5023
|
const key = [...SELF_QUERY_KEY(), "SUBSCRIPTIONS"];
|
|
@@ -5540,8 +5777,7 @@ var useGetSelfPushDevice = (pushDeviceId, options = {}) => {
|
|
|
5540
5777
|
// src/queries/self/useGetSelfRecommendations.ts
|
|
5541
5778
|
var SELF_RECOMMENDATIONS_QUERY_KEY = (type, eventId) => {
|
|
5542
5779
|
const keys = [...SELF_QUERY_KEY(), "RECOMMENDATIONS", type];
|
|
5543
|
-
if (typeof eventId !== "undefined")
|
|
5544
|
-
keys.push(eventId);
|
|
5780
|
+
if (typeof eventId !== "undefined") keys.push(eventId);
|
|
5545
5781
|
return keys;
|
|
5546
5782
|
};
|
|
5547
5783
|
var GetSelfRecommendations = async ({
|
|
@@ -6524,10 +6760,8 @@ var useConnectedMutation = (mutation, options) => {
|
|
|
6524
6760
|
}),
|
|
6525
6761
|
...options,
|
|
6526
6762
|
onError: (error, variables, context) => {
|
|
6527
|
-
if (onMutationError)
|
|
6528
|
-
|
|
6529
|
-
if (options?.onError)
|
|
6530
|
-
options.onError(error, variables, context);
|
|
6763
|
+
if (onMutationError) onMutationError(error, variables, context);
|
|
6764
|
+
if (options?.onError) options.onError(error, variables, context);
|
|
6531
6765
|
}
|
|
6532
6766
|
});
|
|
6533
6767
|
};
|
|
@@ -9565,7 +9799,11 @@ var useUploadFile = (options = {}) => {
|
|
|
9565
9799
|
GetSelfEventListingReport,
|
|
9566
9800
|
GetSelfEventListings,
|
|
9567
9801
|
GetSelfEventRegistration,
|
|
9802
|
+
GetSelfEventRegistrationCoupon,
|
|
9803
|
+
GetSelfEventRegistrationCouponRegistrations,
|
|
9804
|
+
GetSelfEventRegistrationCoupons,
|
|
9568
9805
|
GetSelfEventRegistrationIntent,
|
|
9806
|
+
GetSelfEventRegistrationPayment,
|
|
9569
9807
|
GetSelfEventRegistrationPurchase,
|
|
9570
9808
|
GetSelfEventRegistrationPurchaseAddOns,
|
|
9571
9809
|
GetSelfEventRegistrationPurchaseAddOnsIntent,
|
|
@@ -9573,6 +9811,7 @@ var useUploadFile = (options = {}) => {
|
|
|
9573
9811
|
GetSelfEventRegistrationPurchaseSections,
|
|
9574
9812
|
GetSelfEventRegistrationStatus,
|
|
9575
9813
|
GetSelfEventSessions,
|
|
9814
|
+
GetSelfEventTicketCouponIntent,
|
|
9576
9815
|
GetSelfEvents,
|
|
9577
9816
|
GetSelfFeed,
|
|
9578
9817
|
GetSelfGroupMembership,
|
|
@@ -9660,7 +9899,11 @@ var useUploadFile = (options = {}) => {
|
|
|
9660
9899
|
SELF_DELEGATES_QUERY_KEY,
|
|
9661
9900
|
SELF_DELEGATE_OF_QUERY_KEY,
|
|
9662
9901
|
SELF_EVENTS_QUERY_KEY,
|
|
9902
|
+
SELF_EVENT_REGISTRATION_COUPONS_QUERY_KEY,
|
|
9903
|
+
SELF_EVENT_REGISTRATION_COUPON_QUERY_KEY,
|
|
9904
|
+
SELF_EVENT_REGISTRATION_COUPON_REGISTRATIONS_QUERY_KEY,
|
|
9663
9905
|
SELF_EVENT_REGISTRATION_INTENT_QUERY_KEY,
|
|
9906
|
+
SELF_EVENT_REGISTRATION_PAYMENT_QUERY_KEY,
|
|
9664
9907
|
SELF_EVENT_REGISTRATION_PURCHASE_ADD_ONS_INTENT_QUERY_KEY,
|
|
9665
9908
|
SELF_EVENT_REGISTRATION_PURCHASE_ADD_ONS_QUERY_KEY,
|
|
9666
9909
|
SELF_EVENT_REGISTRATION_PURCHASE_QUERY_KEY,
|
|
@@ -9669,6 +9912,7 @@ var useUploadFile = (options = {}) => {
|
|
|
9669
9912
|
SELF_EVENT_REGISTRATION_QUERY_KEY,
|
|
9670
9913
|
SELF_EVENT_REGISTRATION_STATUS_QUERY_KEY,
|
|
9671
9914
|
SELF_EVENT_SESSIONS_QUERY_KEY,
|
|
9915
|
+
SELF_EVENT_TICKET_COUPON_INTENT_QUERY_KEY,
|
|
9672
9916
|
SELF_FEED_QUERY_KEY,
|
|
9673
9917
|
SELF_GROUP_MEMBERSHIPS_QUERY_KEY,
|
|
9674
9918
|
SELF_GROUP_MEMBERSHIP_QUERY_KEY,
|
|
@@ -9756,6 +10000,8 @@ var useUploadFile = (options = {}) => {
|
|
|
9756
10000
|
SET_SELF_CHAT_CHANNEL_MEMBERS_QUERY_DATA,
|
|
9757
10001
|
SET_SELF_CHAT_CHANNEL_MESSAGES_QUERY_DATA,
|
|
9758
10002
|
SET_SELF_CHAT_CHANNEL_QUERY_DATA,
|
|
10003
|
+
SET_SELF_EVENT_REGISTRATION_COUPON_QUERY_DATA,
|
|
10004
|
+
SET_SELF_EVENT_REGISTRATION_PAYMENT_QUERY_DATA,
|
|
9759
10005
|
SET_SELF_EVENT_REGISTRATION_PURCHASE_ADD_ONS_QUERY_DATA,
|
|
9760
10006
|
SET_SELF_EVENT_REGISTRATION_PURCHASE_QUERY_DATA,
|
|
9761
10007
|
SET_SELF_EVENT_REGISTRATION_PURCHASE_RESERVATION_SECTIONS_QUERY_DATA,
|
|
@@ -9984,7 +10230,11 @@ var useUploadFile = (options = {}) => {
|
|
|
9984
10230
|
useGetSelfEventListings,
|
|
9985
10231
|
useGetSelfEventListingsRegistrations,
|
|
9986
10232
|
useGetSelfEventRegistration,
|
|
10233
|
+
useGetSelfEventRegistrationCoupon,
|
|
10234
|
+
useGetSelfEventRegistrationCouponRegistrations,
|
|
10235
|
+
useGetSelfEventRegistrationCoupons,
|
|
9987
10236
|
useGetSelfEventRegistrationIntent,
|
|
10237
|
+
useGetSelfEventRegistrationPayment,
|
|
9988
10238
|
useGetSelfEventRegistrationPurchase,
|
|
9989
10239
|
useGetSelfEventRegistrationPurchaseAddOns,
|
|
9990
10240
|
useGetSelfEventRegistrationPurchaseAddOnsIntent,
|
|
@@ -9992,6 +10242,7 @@ var useUploadFile = (options = {}) => {
|
|
|
9992
10242
|
useGetSelfEventRegistrationPurchaseSections,
|
|
9993
10243
|
useGetSelfEventRegistrationStatus,
|
|
9994
10244
|
useGetSelfEventSessions,
|
|
10245
|
+
useGetSelfEventTicketCouponIntent,
|
|
9995
10246
|
useGetSelfEvents,
|
|
9996
10247
|
useGetSelfFeed,
|
|
9997
10248
|
useGetSelfGroupMembership,
|