@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.js CHANGED
@@ -21322,6 +21322,32 @@ var useRemoveChannelSubscriber = (options = {}) => {
21322
21322
  return useConnectedMutation(RemoveChannelSubscriber, options);
21323
21323
  };
21324
21324
 
21325
+ // src/mutations/channels/useRevertChannelContentToDraft.ts
21326
+ var RevertChannelContentToDraft = async ({
21327
+ contentId,
21328
+ channelId,
21329
+ adminApiParams,
21330
+ queryClient
21331
+ }) => {
21332
+ const connectedXM = await GetAdminAPI(adminApiParams);
21333
+ const { data } = await connectedXM.put(
21334
+ `/channels/${channelId}/contents/${contentId}/revertToDraft`
21335
+ );
21336
+ if (queryClient && data.status === "ok") {
21337
+ queryClient.invalidateQueries({
21338
+ queryKey: CHANNEL_CONTENT_QUERY_KEY(channelId, contentId)
21339
+ });
21340
+ queryClient.invalidateQueries({
21341
+ queryKey: CHANNEL_CONTENTS_QUERY_KEY(channelId)
21342
+ });
21343
+ SET_CHANNEL_CONTENT_QUERY_DATA(queryClient, [channelId, contentId], data);
21344
+ }
21345
+ return data;
21346
+ };
21347
+ var useRevertChannelContentToDraft = (options = {}) => {
21348
+ return useConnectedMutation(RevertChannelContentToDraft, options);
21349
+ };
21350
+
21325
21351
  // src/mutations/channels/useUpdateChannel.ts
21326
21352
  var UpdateChannel = async ({
21327
21353
  channelId,
@@ -36727,6 +36753,7 @@ export {
36727
36753
  ReorderSurveySectionQuestions,
36728
36754
  ReportType,
36729
36755
  ResendRegistrationConfirmationEmail,
36756
+ RevertChannelContentToDraft,
36730
36757
  SEARCHLISTS_QUERY_KEY,
36731
36758
  SEARCHLIST_CONNECTED_QUESTIONS_QUERY_KEY,
36732
36759
  SEARCHLIST_QUERY_KEY,
@@ -38352,6 +38379,7 @@ export {
38352
38379
  useReorderSurveyQuestionChoices,
38353
38380
  useReorderSurveySectionQuestions,
38354
38381
  useResendRegistrationConfirmationEmail,
38382
+ useRevertChannelContentToDraft,
38355
38383
  useSearchOrganization,
38356
38384
  useSelfLeaveOrganization,
38357
38385
  useSendAnnouncementPreview,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@connectedxm/admin",
3
- "version": "4.2.11",
3
+ "version": "4.2.13",
4
4
  "description": "Admin API javascript SDK",
5
5
  "author": "ConnectedXM Inc.",
6
6
  "type": "module",