@connectedxm/admin 6.27.1 → 6.27.2

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 CHANGED
@@ -288,6 +288,7 @@ __export(index_exports, {
288
288
  CreateEventSessionAccess: () => CreateEventSessionAccess,
289
289
  CreateEventSessionLocation: () => CreateEventSessionLocation,
290
290
  CreateEventSessionMatch: () => CreateEventSessionMatch,
291
+ CreateEventSessionPrice: () => CreateEventSessionPrice,
291
292
  CreateEventSessionQuestion: () => CreateEventSessionQuestion,
292
293
  CreateEventSessionQuestionChoice: () => CreateEventSessionQuestionChoice,
293
294
  CreateEventSessionRound: () => CreateEventSessionRound,
@@ -432,6 +433,7 @@ __export(index_exports, {
432
433
  DeleteEventSessionLocation: () => DeleteEventSessionLocation,
433
434
  DeleteEventSessionLocationTranslation: () => DeleteEventSessionLocationTranslation,
434
435
  DeleteEventSessionMatch: () => DeleteEventSessionMatch,
436
+ DeleteEventSessionPrice: () => DeleteEventSessionPrice,
435
437
  DeleteEventSessionQuestion: () => DeleteEventSessionQuestion,
436
438
  DeleteEventSessionQuestionChoice: () => DeleteEventSessionQuestionChoice,
437
439
  DeleteEventSessionQuestionChoiceTranslation: () => DeleteEventSessionQuestionChoiceTranslation,
@@ -2270,6 +2272,7 @@ __export(index_exports, {
2270
2272
  UpdateEventSessionLocation: () => UpdateEventSessionLocation,
2271
2273
  UpdateEventSessionLocationTranslation: () => UpdateEventSessionLocationTranslation,
2272
2274
  UpdateEventSessionMatch: () => UpdateEventSessionMatch,
2275
+ UpdateEventSessionPrice: () => UpdateEventSessionPrice,
2273
2276
  UpdateEventSessionQuestion: () => UpdateEventSessionQuestion,
2274
2277
  UpdateEventSessionQuestionChoice: () => UpdateEventSessionQuestionChoice,
2275
2278
  UpdateEventSessionQuestionChoiceSubQuestion: () => UpdateEventSessionQuestionChoiceSubQuestion,
@@ -2520,6 +2523,7 @@ __export(index_exports, {
2520
2523
  useCreateEventSessionAccess: () => useCreateEventSessionAccess,
2521
2524
  useCreateEventSessionLocation: () => useCreateEventSessionLocation,
2522
2525
  useCreateEventSessionMatch: () => useCreateEventSessionMatch,
2526
+ useCreateEventSessionPrice: () => useCreateEventSessionPrice,
2523
2527
  useCreateEventSessionQuestion: () => useCreateEventSessionQuestion,
2524
2528
  useCreateEventSessionQuestionChoice: () => useCreateEventSessionQuestionChoice,
2525
2529
  useCreateEventSessionRound: () => useCreateEventSessionRound,
@@ -2655,6 +2659,7 @@ __export(index_exports, {
2655
2659
  useDeleteEventSessionLocation: () => useDeleteEventSessionLocation,
2656
2660
  useDeleteEventSessionLocationTranslation: () => useDeleteEventSessionLocationTranslation,
2657
2661
  useDeleteEventSessionMatch: () => useDeleteEventSessionMatch,
2662
+ useDeleteEventSessionPrice: () => useDeleteEventSessionPrice,
2658
2663
  useDeleteEventSessionQuestion: () => useDeleteEventSessionQuestion,
2659
2664
  useDeleteEventSessionQuestionChoice: () => useDeleteEventSessionQuestionChoice,
2660
2665
  useDeleteEventSessionQuestionChoiceTranslation: () => useDeleteEventSessionQuestionChoiceTranslation,
@@ -3489,6 +3494,7 @@ __export(index_exports, {
3489
3494
  useUpdateEventSessionLocation: () => useUpdateEventSessionLocation,
3490
3495
  useUpdateEventSessionLocationTranslation: () => useUpdateEventSessionLocationTranslation,
3491
3496
  useUpdateEventSessionMatch: () => useUpdateEventSessionMatch,
3497
+ useUpdateEventSessionPrice: () => useUpdateEventSessionPrice,
3492
3498
  useUpdateEventSessionQuestion: () => useUpdateEventSessionQuestion,
3493
3499
  useUpdateEventSessionQuestionChoice: () => useUpdateEventSessionQuestionChoice,
3494
3500
  useUpdateEventSessionQuestionChoiceSubQuestion: () => useUpdateEventSessionQuestionChoiceSubQuestion,
@@ -34577,6 +34583,95 @@ var useUpdateEventSessionRoundQuestion = (options = {}) => {
34577
34583
  return useConnectedMutation(UpdateEventSessionRoundQuestion, options);
34578
34584
  };
34579
34585
 
34586
+ // src/mutations/events/sessions/prices/useCreateEventSessionPrice.ts
34587
+ var CreateEventSessionPrice = async ({
34588
+ eventId,
34589
+ sessionId,
34590
+ passTypeId,
34591
+ price,
34592
+ adminApiParams,
34593
+ queryClient
34594
+ }) => {
34595
+ const connectedXM = await GetAdminAPI(adminApiParams);
34596
+ const { data } = await connectedXM.post(
34597
+ `/events/${eventId}/sessions/${sessionId}/prices`,
34598
+ {
34599
+ passTypeId,
34600
+ price
34601
+ }
34602
+ );
34603
+ if (queryClient && data.status === "ok") {
34604
+ queryClient.invalidateQueries({
34605
+ queryKey: EVENT_SESSIONS_QUERY_KEY(eventId)
34606
+ });
34607
+ queryClient.invalidateQueries({
34608
+ queryKey: EVENT_SESSION_QUERY_KEY(eventId, sessionId)
34609
+ });
34610
+ }
34611
+ return data;
34612
+ };
34613
+ var useCreateEventSessionPrice = (options = {}) => {
34614
+ return useConnectedMutation(CreateEventSessionPrice, options);
34615
+ };
34616
+
34617
+ // src/mutations/events/sessions/prices/useDeleteEventSessionPrice.ts
34618
+ var DeleteEventSessionPrice = async ({
34619
+ eventId,
34620
+ sessionId,
34621
+ priceId,
34622
+ adminApiParams,
34623
+ queryClient
34624
+ }) => {
34625
+ const connectedXM = await GetAdminAPI(adminApiParams);
34626
+ const { data } = await connectedXM.delete(
34627
+ `/events/${eventId}/sessions/${sessionId}/prices/${priceId}`
34628
+ );
34629
+ if (queryClient && data.status === "ok") {
34630
+ queryClient.invalidateQueries({
34631
+ queryKey: EVENT_SESSIONS_QUERY_KEY(eventId)
34632
+ });
34633
+ queryClient.invalidateQueries({
34634
+ queryKey: EVENT_SESSION_QUERY_KEY(eventId, sessionId)
34635
+ });
34636
+ }
34637
+ return data;
34638
+ };
34639
+ var useDeleteEventSessionPrice = (options = {}) => {
34640
+ return useConnectedMutation(DeleteEventSessionPrice, options);
34641
+ };
34642
+
34643
+ // src/mutations/events/sessions/prices/useUpdateEventSessionPrice.ts
34644
+ var UpdateEventSessionPrice = async ({
34645
+ eventId,
34646
+ sessionId,
34647
+ priceId,
34648
+ passTypeId,
34649
+ price,
34650
+ adminApiParams,
34651
+ queryClient
34652
+ }) => {
34653
+ const connectedXM = await GetAdminAPI(adminApiParams);
34654
+ const { data } = await connectedXM.put(
34655
+ `/events/${eventId}/sessions/${sessionId}/prices/${priceId}`,
34656
+ {
34657
+ passTypeId,
34658
+ price
34659
+ }
34660
+ );
34661
+ if (queryClient && data.status === "ok") {
34662
+ queryClient.invalidateQueries({
34663
+ queryKey: EVENT_SESSIONS_QUERY_KEY(eventId)
34664
+ });
34665
+ queryClient.invalidateQueries({
34666
+ queryKey: EVENT_SESSION_QUERY_KEY(eventId, sessionId)
34667
+ });
34668
+ }
34669
+ return data;
34670
+ };
34671
+ var useUpdateEventSessionPrice = (options = {}) => {
34672
+ return useConnectedMutation(UpdateEventSessionPrice, options);
34673
+ };
34674
+
34580
34675
  // src/mutations/events/sessions/questions/translations/useDeleteEventSessionQuestionChoiceTranslation.ts
34581
34676
  var DeleteEventSessionQuestionChoiceTranslation = async ({
34582
34677
  eventId,
@@ -43637,6 +43732,7 @@ var useUpdateTier = (options = {}) => {
43637
43732
  CreateEventSessionAccess,
43638
43733
  CreateEventSessionLocation,
43639
43734
  CreateEventSessionMatch,
43735
+ CreateEventSessionPrice,
43640
43736
  CreateEventSessionQuestion,
43641
43737
  CreateEventSessionQuestionChoice,
43642
43738
  CreateEventSessionRound,
@@ -43781,6 +43877,7 @@ var useUpdateTier = (options = {}) => {
43781
43877
  DeleteEventSessionLocation,
43782
43878
  DeleteEventSessionLocationTranslation,
43783
43879
  DeleteEventSessionMatch,
43880
+ DeleteEventSessionPrice,
43784
43881
  DeleteEventSessionQuestion,
43785
43882
  DeleteEventSessionQuestionChoice,
43786
43883
  DeleteEventSessionQuestionChoiceTranslation,
@@ -45619,6 +45716,7 @@ var useUpdateTier = (options = {}) => {
45619
45716
  UpdateEventSessionLocation,
45620
45717
  UpdateEventSessionLocationTranslation,
45621
45718
  UpdateEventSessionMatch,
45719
+ UpdateEventSessionPrice,
45622
45720
  UpdateEventSessionQuestion,
45623
45721
  UpdateEventSessionQuestionChoice,
45624
45722
  UpdateEventSessionQuestionChoiceSubQuestion,
@@ -45869,6 +45967,7 @@ var useUpdateTier = (options = {}) => {
45869
45967
  useCreateEventSessionAccess,
45870
45968
  useCreateEventSessionLocation,
45871
45969
  useCreateEventSessionMatch,
45970
+ useCreateEventSessionPrice,
45872
45971
  useCreateEventSessionQuestion,
45873
45972
  useCreateEventSessionQuestionChoice,
45874
45973
  useCreateEventSessionRound,
@@ -46004,6 +46103,7 @@ var useUpdateTier = (options = {}) => {
46004
46103
  useDeleteEventSessionLocation,
46005
46104
  useDeleteEventSessionLocationTranslation,
46006
46105
  useDeleteEventSessionMatch,
46106
+ useDeleteEventSessionPrice,
46007
46107
  useDeleteEventSessionQuestion,
46008
46108
  useDeleteEventSessionQuestionChoice,
46009
46109
  useDeleteEventSessionQuestionChoiceTranslation,
@@ -46838,6 +46938,7 @@ var useUpdateTier = (options = {}) => {
46838
46938
  useUpdateEventSessionLocation,
46839
46939
  useUpdateEventSessionLocationTranslation,
46840
46940
  useUpdateEventSessionMatch,
46941
+ useUpdateEventSessionPrice,
46841
46942
  useUpdateEventSessionQuestion,
46842
46943
  useUpdateEventSessionQuestionChoice,
46843
46944
  useUpdateEventSessionQuestionChoiceSubQuestion,