@connectedxm/admin 0.0.12 → 0.0.14

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.js CHANGED
@@ -787,6 +787,7 @@ __export(src_exports, {
787
787
  RemoveSeriesEvent: () => RemoveSeriesEvent,
788
788
  RemoveSubscriptionProductTier: () => RemoveSubscriptionProductTier,
789
789
  RemoveTierAccount: () => RemoveTierAccount,
790
+ ReorderEventFaqSectionQuestions: () => ReorderEventFaqSectionQuestions,
790
791
  ReorderEventQuestionChoices: () => ReorderEventQuestionChoices,
791
792
  ReorderEventSectionQuestions: () => ReorderEventSectionQuestions,
792
793
  ReportType: () => ReportType,
@@ -1444,7 +1445,7 @@ __export(src_exports, {
1444
1445
  useGetEventFaqSectionQuestion: () => useGetEventFaqSectionQuestion,
1445
1446
  useGetEventFaqSectionQuestionTranslation: () => useGetEventFaqSectionQuestionTranslation,
1446
1447
  useGetEventFaqSectionQuestionTranslations: () => useGetEventFaqSectionQuestionTranslations,
1447
- useGetEventFaqSectionQuestionsectionQuestions: () => useGetEventFaqSectionQuestionsectionQuestions,
1448
+ useGetEventFaqSectionQuestions: () => useGetEventFaqSectionQuestions,
1448
1449
  useGetEventFaqSectionTranslation: () => useGetEventFaqSectionTranslation,
1449
1450
  useGetEventFaqSectionTranslations: () => useGetEventFaqSectionTranslations,
1450
1451
  useGetEventFaqSections: () => useGetEventFaqSections,
@@ -1669,6 +1670,7 @@ __export(src_exports, {
1669
1670
  useRemoveSeriesEvent: () => useRemoveSeriesEvent,
1670
1671
  useRemoveSubscriptionProductTier: () => useRemoveSubscriptionProductTier,
1671
1672
  useRemoveTierAccount: () => useRemoveTierAccount,
1673
+ useReorderEventFaqSectionQuestions: () => useReorderEventFaqSectionQuestions,
1672
1674
  useReorderEventQuestionChoices: () => useReorderEventQuestionChoices,
1673
1675
  useReorderEventSectionQuestions: () => useReorderEventSectionQuestions,
1674
1676
  useResendEventRegistrationConfirmationEmail: () => useResendEventRegistrationConfirmationEmail,
@@ -1755,7 +1757,7 @@ __export(src_exports, {
1755
1757
  useUpdateSeries: () => useUpdateSeries,
1756
1758
  useUpdateStreamConfig: () => useUpdateStreamConfig,
1757
1759
  useUpdateStreamInput: () => useUpdateStreamInput,
1758
- useUpdateStreamInputOutputInput: () => useUpdateStreamInputOutputInput,
1760
+ useUpdateStreamInputOutput: () => useUpdateStreamInputOutput,
1759
1761
  useUpdateSubscription: () => useUpdateSubscription,
1760
1762
  useUpdateSubscriptionProduct: () => useUpdateSubscriptionProduct,
1761
1763
  useUpdateSubscriptionProductPrice: () => useUpdateSubscriptionProductPrice,
@@ -5241,8 +5243,14 @@ var useGetEventFaqSection = (eventId = "", sectionId = "", options = {}) => {
5241
5243
  var EVENT_FAQ_SECTION_QUESTIONS_QUERY_KEY = (eventId, sectionId) => [...EVENT_FAQ_SECTION_QUERY_KEY(eventId, sectionId), "QUESTIONS"];
5242
5244
  var SET_EVENT_FAQ_SECTION_QUESTIONS_QUERY_DATA = (client, keyParams, response) => {
5243
5245
  client.setQueryData(
5244
- EVENT_FAQ_SECTION_QUESTIONS_QUERY_KEY(...keyParams),
5245
- response
5246
+ [
5247
+ ...EVENT_FAQ_SECTION_QUESTIONS_QUERY_KEY(...keyParams),
5248
+ ...GetBaseInfiniteQueryKeys("")
5249
+ ],
5250
+ {
5251
+ pages: [response],
5252
+ pageParams: [null]
5253
+ }
5246
5254
  );
5247
5255
  };
5248
5256
  var GetEventFaqSectionQuestions = async ({
@@ -5268,7 +5276,7 @@ var GetEventFaqSectionQuestions = async ({
5268
5276
  );
5269
5277
  return data;
5270
5278
  };
5271
- var useGetEventFaqSectionQuestionsectionQuestions = (eventId = "", sectionId = "", params = {}, options = {}) => {
5279
+ var useGetEventFaqSectionQuestions = (eventId = "", sectionId = "", params = {}, options = {}) => {
5272
5280
  return useConnectedInfiniteQuery(
5273
5281
  EVENT_FAQ_SECTION_QUESTIONS_QUERY_KEY(eventId, sectionId),
5274
5282
  (params2) => GetEventFaqSectionQuestions({
@@ -5308,14 +5316,14 @@ var useGetEventFaqSectionQuestion = (eventId = "", sectionId = "", questionId =
5308
5316
  return useConnectedSingleQuery(
5309
5317
  EVENT_FAQ_SECTION_QUESTION_QUERY_KEY(eventId, sectionId, questionId),
5310
5318
  (params) => GetEventFaqSectionQuestion({
5311
- sectionId,
5312
5319
  eventId,
5320
+ sectionId,
5313
5321
  questionId,
5314
5322
  ...params
5315
5323
  }),
5316
5324
  {
5317
5325
  ...options,
5318
- enabled: !!eventId && !!sectionId && !!questionId
5326
+ enabled: !!eventId && !!sectionId && !!questionId && (options?.enabled ?? true)
5319
5327
  }
5320
5328
  );
5321
5329
  };
@@ -6843,21 +6851,27 @@ var useGetEventRegistrationPurchaseSections = (eventId = "", registrationId = ""
6843
6851
  );
6844
6852
  };
6845
6853
 
6846
- // src/queries/events/registrations/purchases/useGetEventRegistrationPurchaseTransferLogs.ts
6847
- var EVENT_REGISTRATION_PURCHASE_TRANSFER_LOGS_QUERY_KEY = (eventId, registrationId, purchaseId) => [
6848
- ...EVENT_REGISTRATION_PURCHASE_QUERY_KEY(eventId, registrationId, purchaseId),
6849
- "TRANSFER_LOGS"
6854
+ // src/queries/events/registrations/purchases/useGetEventRegistrationPurchasesResponseChanges.ts
6855
+ var EVENT_REGISTRATION_PURCHASE_RESPONSE_CHANGES_QUERY_KEY = (eventId, registrationId, purchaseId, questionId) => [
6856
+ ...EVENT_REGISTRATION_PURCHASE_RESPONSE_QUERY_KEY(
6857
+ eventId,
6858
+ registrationId,
6859
+ purchaseId,
6860
+ questionId
6861
+ ),
6862
+ "CHANGES"
6850
6863
  ];
6851
- var SET_EVENT_REGISTRATION_PURCHASE_TRANSFER_LOGS_QUERY_DATA = (client, keyParams, response) => {
6864
+ var SET_EVENT_REGISTRATION_PURCHASE_RESPONSE_CHANGES_QUERY_DATA = (client, keyParams, response) => {
6852
6865
  client.setQueryData(
6853
- EVENT_REGISTRATION_PURCHASE_TRANSFER_LOGS_QUERY_KEY(...keyParams),
6866
+ EVENT_REGISTRATION_PURCHASE_RESPONSE_CHANGES_QUERY_KEY(...keyParams),
6854
6867
  response
6855
6868
  );
6856
6869
  };
6857
- var GetEventRegistrationTransferLogs = async ({
6870
+ var GetEventRegistrationPurchaseResponseChanges = async ({
6858
6871
  eventId,
6859
6872
  registrationId,
6860
6873
  purchaseId,
6874
+ questionId,
6861
6875
  pageParam,
6862
6876
  pageSize,
6863
6877
  orderBy,
@@ -6866,7 +6880,7 @@ var GetEventRegistrationTransferLogs = async ({
6866
6880
  }) => {
6867
6881
  const adminApi = await GetAdminAPI(adminApiParams);
6868
6882
  const { data } = await adminApi.get(
6869
- `/events/${eventId}/registrations/${registrationId}/purchases/${purchaseId}/transfers/logs`,
6883
+ `/events/${eventId}/registrations/${registrationId}/purchases/${purchaseId}/responses/${questionId}/changes`,
6870
6884
  {
6871
6885
  params: {
6872
6886
  page: pageParam || void 0,
@@ -6878,48 +6892,44 @@ var GetEventRegistrationTransferLogs = async ({
6878
6892
  );
6879
6893
  return data;
6880
6894
  };
6881
- var useGetEventRegistrationTransferLogs = (eventId = "", registrationId = "", purchaseId = "", params = {}, options = {}) => {
6895
+ var useGetEventRegistrationPurchaseResponseChanges = (eventId = "", registrationId = "", purchaseId = "", questionId = "", params = {}, options = {}) => {
6882
6896
  return useConnectedInfiniteQuery(
6883
- EVENT_REGISTRATION_PURCHASE_TRANSFER_LOGS_QUERY_KEY(
6897
+ EVENT_REGISTRATION_PURCHASE_RESPONSE_CHANGES_QUERY_KEY(
6884
6898
  eventId,
6885
6899
  registrationId,
6886
- purchaseId
6900
+ purchaseId,
6901
+ questionId
6887
6902
  ),
6888
- (params2) => GetEventRegistrationTransferLogs({
6903
+ (params2) => GetEventRegistrationPurchaseResponseChanges({
6889
6904
  ...params2,
6890
6905
  eventId,
6891
6906
  registrationId,
6907
+ questionId,
6892
6908
  purchaseId
6893
6909
  }),
6894
6910
  params,
6895
6911
  {
6896
6912
  ...options,
6897
- enabled: !!eventId && !!registrationId && !!purchaseId && (options.enabled ?? true)
6913
+ enabled: !!eventId && !!registrationId && !!questionId && !!purchaseId && (options.enabled ?? true)
6898
6914
  }
6899
6915
  );
6900
6916
  };
6901
6917
 
6902
- // src/queries/events/registrations/purchases/useGetEventRegistrationPurchasesResponseChanges.ts
6903
- var EVENT_REGISTRATION_PURCHASE_RESPONSE_CHANGES_QUERY_KEY = (eventId, registrationId, purchaseId, questionId) => [
6904
- ...EVENT_REGISTRATION_PURCHASE_RESPONSE_QUERY_KEY(
6905
- eventId,
6906
- registrationId,
6907
- purchaseId,
6908
- questionId
6909
- ),
6910
- "CHANGES"
6918
+ // src/queries/events/registrations/purchases/useGetEventRegistrationPurchaseTransferLogs.ts
6919
+ var EVENT_REGISTRATION_PURCHASE_TRANSFER_LOGS_QUERY_KEY = (eventId, registrationId, purchaseId) => [
6920
+ ...EVENT_REGISTRATION_PURCHASE_QUERY_KEY(eventId, registrationId, purchaseId),
6921
+ "TRANSFER_LOGS"
6911
6922
  ];
6912
- var SET_EVENT_REGISTRATION_PURCHASE_RESPONSE_CHANGES_QUERY_DATA = (client, keyParams, response) => {
6923
+ var SET_EVENT_REGISTRATION_PURCHASE_TRANSFER_LOGS_QUERY_DATA = (client, keyParams, response) => {
6913
6924
  client.setQueryData(
6914
- EVENT_REGISTRATION_PURCHASE_RESPONSE_CHANGES_QUERY_KEY(...keyParams),
6925
+ EVENT_REGISTRATION_PURCHASE_TRANSFER_LOGS_QUERY_KEY(...keyParams),
6915
6926
  response
6916
6927
  );
6917
6928
  };
6918
- var GetEventRegistrationPurchaseResponseChanges = async ({
6929
+ var GetEventRegistrationTransferLogs = async ({
6919
6930
  eventId,
6920
6931
  registrationId,
6921
6932
  purchaseId,
6922
- questionId,
6923
6933
  pageParam,
6924
6934
  pageSize,
6925
6935
  orderBy,
@@ -6928,7 +6938,7 @@ var GetEventRegistrationPurchaseResponseChanges = async ({
6928
6938
  }) => {
6929
6939
  const adminApi = await GetAdminAPI(adminApiParams);
6930
6940
  const { data } = await adminApi.get(
6931
- `/events/${eventId}/registrations/${registrationId}/purchases/${purchaseId}/responses/${questionId}/changes`,
6941
+ `/events/${eventId}/registrations/${registrationId}/purchases/${purchaseId}/transfers/logs`,
6932
6942
  {
6933
6943
  params: {
6934
6944
  page: pageParam || void 0,
@@ -6940,25 +6950,23 @@ var GetEventRegistrationPurchaseResponseChanges = async ({
6940
6950
  );
6941
6951
  return data;
6942
6952
  };
6943
- var useGetEventRegistrationPurchaseResponseChanges = (eventId = "", registrationId = "", purchaseId = "", questionId = "", params = {}, options = {}) => {
6953
+ var useGetEventRegistrationTransferLogs = (eventId = "", registrationId = "", purchaseId = "", params = {}, options = {}) => {
6944
6954
  return useConnectedInfiniteQuery(
6945
- EVENT_REGISTRATION_PURCHASE_RESPONSE_CHANGES_QUERY_KEY(
6955
+ EVENT_REGISTRATION_PURCHASE_TRANSFER_LOGS_QUERY_KEY(
6946
6956
  eventId,
6947
6957
  registrationId,
6948
- purchaseId,
6949
- questionId
6958
+ purchaseId
6950
6959
  ),
6951
- (params2) => GetEventRegistrationPurchaseResponseChanges({
6960
+ (params2) => GetEventRegistrationTransferLogs({
6952
6961
  ...params2,
6953
6962
  eventId,
6954
6963
  registrationId,
6955
- questionId,
6956
6964
  purchaseId
6957
6965
  }),
6958
6966
  params,
6959
6967
  {
6960
6968
  ...options,
6961
- enabled: !!eventId && !!registrationId && !!questionId && !!purchaseId && (options.enabled ?? true)
6969
+ enabled: !!eventId && !!registrationId && !!purchaseId && (options.enabled ?? true)
6962
6970
  }
6963
6971
  );
6964
6972
  };
@@ -11420,31 +11428,6 @@ var useGetSelf = (options = {}) => {
11420
11428
  );
11421
11429
  };
11422
11430
 
11423
- // src/queries/self/useGetSelfOrgMembership.ts
11424
- var SELF_MEMBERSHIP_QUERY_KEY = () => [
11425
- ...SELF_QUERY_KEY(),
11426
- "MEMBERSHIP"
11427
- ];
11428
- var SET_SELF_MEMBERSHIP_QUERY_DATA = (client, keyParams, response) => {
11429
- client.setQueryData(SELF_MEMBERSHIP_QUERY_KEY(...keyParams), response);
11430
- };
11431
- var GetSelfOrgMembership = async ({
11432
- adminApiParams
11433
- }) => {
11434
- const adminApi = await GetAdminAPI(adminApiParams);
11435
- const { data } = await adminApi.get(`/self/organization-membership`);
11436
- return data;
11437
- };
11438
- var useGetSelfOrgMembership = (options = {}) => {
11439
- return useConnectedSingleQuery(
11440
- SELF_MEMBERSHIP_QUERY_KEY(),
11441
- (params) => GetSelfOrgMembership({
11442
- ...params
11443
- }),
11444
- options
11445
- );
11446
- };
11447
-
11448
11431
  // src/queries/self/useGetSelfOrganizations.ts
11449
11432
  var SELF_ORGANIZATIONS_QUERY_KEY = () => [
11450
11433
  ...SELF_QUERY_KEY(),
@@ -11480,6 +11463,31 @@ var useGetSelfOrganizations = (params = {}, options = {}) => {
11480
11463
  );
11481
11464
  };
11482
11465
 
11466
+ // src/queries/self/useGetSelfOrgMembership.ts
11467
+ var SELF_MEMBERSHIP_QUERY_KEY = () => [
11468
+ ...SELF_QUERY_KEY(),
11469
+ "MEMBERSHIP"
11470
+ ];
11471
+ var SET_SELF_MEMBERSHIP_QUERY_DATA = (client, keyParams, response) => {
11472
+ client.setQueryData(SELF_MEMBERSHIP_QUERY_KEY(...keyParams), response);
11473
+ };
11474
+ var GetSelfOrgMembership = async ({
11475
+ adminApiParams
11476
+ }) => {
11477
+ const adminApi = await GetAdminAPI(adminApiParams);
11478
+ const { data } = await adminApi.get(`/self/organization-membership`);
11479
+ return data;
11480
+ };
11481
+ var useGetSelfOrgMembership = (options = {}) => {
11482
+ return useConnectedSingleQuery(
11483
+ SELF_MEMBERSHIP_QUERY_KEY(),
11484
+ (params) => GetSelfOrgMembership({
11485
+ ...params
11486
+ }),
11487
+ options
11488
+ );
11489
+ };
11490
+
11483
11491
  // src/queries/series/useGetSeriesList.ts
11484
11492
  var SERIES_LIST_QUERY_KEY = () => {
11485
11493
  const keys = ["SERIES"];
@@ -14743,6 +14751,35 @@ var useUpdateEventFaqSectionQuestion = (options = {}) => {
14743
14751
  return useConnectedMutation(UpdateEventFaqSectionQuestion, options);
14744
14752
  };
14745
14753
 
14754
+ // src/mutations/event/faqs/useReorderEventFaqSectionQuestions.ts
14755
+ var ReorderEventFaqSectionQuestions = async ({
14756
+ eventId,
14757
+ sectionId,
14758
+ questionIds,
14759
+ adminApiParams,
14760
+ queryClient
14761
+ }) => {
14762
+ if (!sectionId) throw new Error("Section ID Undefined");
14763
+ const connectedXM = await GetAdminAPI(adminApiParams);
14764
+ const { data } = await connectedXM.put(
14765
+ `/events/${eventId}/faqs/${sectionId}/questions/reorder`,
14766
+ {
14767
+ questionIds
14768
+ }
14769
+ );
14770
+ if (queryClient && data.status === "ok") {
14771
+ SET_EVENT_FAQ_SECTION_QUESTIONS_QUERY_DATA(
14772
+ queryClient,
14773
+ [eventId, sectionId],
14774
+ data
14775
+ );
14776
+ }
14777
+ return data;
14778
+ };
14779
+ var useReorderEventFaqSectionQuestions = (options = {}) => {
14780
+ return useConnectedMutation(ReorderEventFaqSectionQuestions, options);
14781
+ };
14782
+
14746
14783
  // src/mutations/event/on-site/useUpdateEventCheckinCode.ts
14747
14784
  var UpdateEventCheckinCode = async ({
14748
14785
  eventId,
@@ -20192,6 +20229,11 @@ var UpdateStream = async ({
20192
20229
  );
20193
20230
  if (queryClient && data.status === "ok") {
20194
20231
  queryClient.invalidateQueries({ queryKey: STREAM_INPUTS_QUERY_KEY() });
20232
+ if (stream.eventId) {
20233
+ queryClient.invalidateQueries({
20234
+ queryKey: EVENT_QUERY_KEY(stream.eventId)
20235
+ });
20236
+ }
20195
20237
  SET_STREAM_INPUT_QUERY_DATA(
20196
20238
  queryClient,
20197
20239
  [streamId || data.data.id.toString()],
@@ -20222,7 +20264,7 @@ var UpdateStreamInputOutput = async ({
20222
20264
  }
20223
20265
  return data;
20224
20266
  };
20225
- var useUpdateStreamInputOutputInput = (options = {}) => {
20267
+ var useUpdateStreamInputOutput = (options = {}) => {
20226
20268
  return useConnectedMutation(UpdateStreamInputOutput, options);
20227
20269
  };
20228
20270
 
@@ -21480,6 +21522,7 @@ var useUpdateVideo = (options = {}) => {
21480
21522
  RemoveSeriesEvent,
21481
21523
  RemoveSubscriptionProductTier,
21482
21524
  RemoveTierAccount,
21525
+ ReorderEventFaqSectionQuestions,
21483
21526
  ReorderEventQuestionChoices,
21484
21527
  ReorderEventSectionQuestions,
21485
21528
  ReportType,
@@ -22137,7 +22180,7 @@ var useUpdateVideo = (options = {}) => {
22137
22180
  useGetEventFaqSectionQuestion,
22138
22181
  useGetEventFaqSectionQuestionTranslation,
22139
22182
  useGetEventFaqSectionQuestionTranslations,
22140
- useGetEventFaqSectionQuestionsectionQuestions,
22183
+ useGetEventFaqSectionQuestions,
22141
22184
  useGetEventFaqSectionTranslation,
22142
22185
  useGetEventFaqSectionTranslations,
22143
22186
  useGetEventFaqSections,
@@ -22362,6 +22405,7 @@ var useUpdateVideo = (options = {}) => {
22362
22405
  useRemoveSeriesEvent,
22363
22406
  useRemoveSubscriptionProductTier,
22364
22407
  useRemoveTierAccount,
22408
+ useReorderEventFaqSectionQuestions,
22365
22409
  useReorderEventQuestionChoices,
22366
22410
  useReorderEventSectionQuestions,
22367
22411
  useResendEventRegistrationConfirmationEmail,
@@ -22448,7 +22492,7 @@ var useUpdateVideo = (options = {}) => {
22448
22492
  useUpdateSeries,
22449
22493
  useUpdateStreamConfig,
22450
22494
  useUpdateStreamInput,
22451
- useUpdateStreamInputOutputInput,
22495
+ useUpdateStreamInputOutput,
22452
22496
  useUpdateSubscription,
22453
22497
  useUpdateSubscriptionProduct,
22454
22498
  useUpdateSubscriptionProductPrice,