@prezly/sdk 23.14.0 → 23.15.0

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.
@@ -4,6 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.DEFAULT_USER_AGENT = void 0;
7
- const VERSION = "23.13.0";
7
+ const VERSION = "23.14.0";
8
8
  const URL = 'https://github.com/prezly/javascript-sdk';
9
9
  const DEFAULT_USER_AGENT = exports.DEFAULT_USER_AGENT = `prezly-javascript-sdk/${VERSION} (+${URL})`;
@@ -1,3 +1,3 @@
1
- const VERSION = "23.13.0";
1
+ const VERSION = "23.14.0";
2
2
  const URL = 'https://github.com/prezly/javascript-sdk';
3
3
  export const DEFAULT_USER_AGENT = `prezly-javascript-sdk/${VERSION} (+${URL})`;
@@ -90,6 +90,12 @@ function createClient(api) {
90
90
  } = await api.post(`${_routing.routing.newsroomsUrl}/${id}/online`);
91
91
  return newsroom;
92
92
  }
93
+ async function convertToHub(id) {
94
+ const {
95
+ newsroom
96
+ } = await api.post(`${_routing.routing.newsroomsUrl}/${id}/convert`);
97
+ return newsroom;
98
+ }
93
99
  return {
94
100
  list,
95
101
  search,
@@ -100,6 +106,7 @@ function createClient(api) {
100
106
  unarchive,
101
107
  delete: doDelete,
102
108
  takeOnline,
103
- takeOffline
109
+ takeOffline,
110
+ convertToHub
104
111
  };
105
112
  }
@@ -14,5 +14,6 @@ export declare function createClient(api: DeferredJobsApiClient): {
14
14
  delete: (id: NewsroomId) => Promise<void>;
15
15
  takeOnline: (id: NewsroomId) => Promise<Newsroom>;
16
16
  takeOffline: (id: NewsroomId) => Promise<Newsroom>;
17
+ convertToHub: (id: NewsroomId) => Promise<Newsroom>;
17
18
  };
18
19
  export {};
@@ -84,6 +84,12 @@ export function createClient(api) {
84
84
  } = await api.post(`${routing.newsroomsUrl}/${id}/online`);
85
85
  return newsroom;
86
86
  }
87
+ async function convertToHub(id) {
88
+ const {
89
+ newsroom
90
+ } = await api.post(`${routing.newsroomsUrl}/${id}/convert`);
91
+ return newsroom;
92
+ }
87
93
  return {
88
94
  list,
89
95
  search,
@@ -94,6 +100,7 @@ export function createClient(api) {
94
100
  unarchive,
95
101
  delete: doDelete,
96
102
  takeOnline,
97
- takeOffline
103
+ takeOffline,
104
+ convertToHub
98
105
  };
99
106
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prezly/sdk",
3
- "version": "23.14.0",
3
+ "version": "23.15.0",
4
4
  "description": "Prezly API SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",