@connectedxm/admin 4.2.11 → 4.2.13

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
@@ -1368,6 +1368,7 @@ __export(index_exports, {
1368
1368
  ReorderSurveySectionQuestions: () => ReorderSurveySectionQuestions,
1369
1369
  ReportType: () => ReportType,
1370
1370
  ResendRegistrationConfirmationEmail: () => ResendRegistrationConfirmationEmail,
1371
+ RevertChannelContentToDraft: () => RevertChannelContentToDraft,
1371
1372
  SEARCHLISTS_QUERY_KEY: () => SEARCHLISTS_QUERY_KEY,
1372
1373
  SEARCHLIST_CONNECTED_QUESTIONS_QUERY_KEY: () => SEARCHLIST_CONNECTED_QUESTIONS_QUERY_KEY,
1373
1374
  SEARCHLIST_QUERY_KEY: () => SEARCHLIST_QUERY_KEY,
@@ -2993,6 +2994,7 @@ __export(index_exports, {
2993
2994
  useReorderSurveyQuestionChoices: () => useReorderSurveyQuestionChoices,
2994
2995
  useReorderSurveySectionQuestions: () => useReorderSurveySectionQuestions,
2995
2996
  useResendRegistrationConfirmationEmail: () => useResendRegistrationConfirmationEmail,
2997
+ useRevertChannelContentToDraft: () => useRevertChannelContentToDraft,
2996
2998
  useSearchOrganization: () => useSearchOrganization,
2997
2999
  useSelfLeaveOrganization: () => useSelfLeaveOrganization,
2998
3000
  useSendAnnouncementPreview: () => useSendAnnouncementPreview,
@@ -24487,6 +24489,32 @@ var useRemoveChannelSubscriber = (options = {}) => {
24487
24489
  return useConnectedMutation(RemoveChannelSubscriber, options);
24488
24490
  };
24489
24491
 
24492
+ // src/mutations/channels/useRevertChannelContentToDraft.ts
24493
+ var RevertChannelContentToDraft = async ({
24494
+ contentId,
24495
+ channelId,
24496
+ adminApiParams,
24497
+ queryClient
24498
+ }) => {
24499
+ const connectedXM = await GetAdminAPI(adminApiParams);
24500
+ const { data } = await connectedXM.put(
24501
+ `/channels/${channelId}/contents/${contentId}/revertToDraft`
24502
+ );
24503
+ if (queryClient && data.status === "ok") {
24504
+ queryClient.invalidateQueries({
24505
+ queryKey: CHANNEL_CONTENT_QUERY_KEY(channelId, contentId)
24506
+ });
24507
+ queryClient.invalidateQueries({
24508
+ queryKey: CHANNEL_CONTENTS_QUERY_KEY(channelId)
24509
+ });
24510
+ SET_CHANNEL_CONTENT_QUERY_DATA(queryClient, [channelId, contentId], data);
24511
+ }
24512
+ return data;
24513
+ };
24514
+ var useRevertChannelContentToDraft = (options = {}) => {
24515
+ return useConnectedMutation(RevertChannelContentToDraft, options);
24516
+ };
24517
+
24490
24518
  // src/mutations/channels/useUpdateChannel.ts
24491
24519
  var UpdateChannel = async ({
24492
24520
  channelId,
@@ -39893,6 +39921,7 @@ var useUploadVideoCaptions = (options = {}) => {
39893
39921
  ReorderSurveySectionQuestions,
39894
39922
  ReportType,
39895
39923
  ResendRegistrationConfirmationEmail,
39924
+ RevertChannelContentToDraft,
39896
39925
  SEARCHLISTS_QUERY_KEY,
39897
39926
  SEARCHLIST_CONNECTED_QUESTIONS_QUERY_KEY,
39898
39927
  SEARCHLIST_QUERY_KEY,
@@ -41518,6 +41547,7 @@ var useUploadVideoCaptions = (options = {}) => {
41518
41547
  useReorderSurveyQuestionChoices,
41519
41548
  useReorderSurveySectionQuestions,
41520
41549
  useResendRegistrationConfirmationEmail,
41550
+ useRevertChannelContentToDraft,
41521
41551
  useSearchOrganization,
41522
41552
  useSelfLeaveOrganization,
41523
41553
  useSendAnnouncementPreview,