@prezly/sdk 26.3.3 → 26.4.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 = "26.3.2";
7
+ const VERSION = "26.4.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 = "26.3.2";
1
+ const VERSION = "26.4.0";
2
2
  const URL = 'https://github.com/prezly/javascript-sdk';
3
3
  export const DEFAULT_USER_AGENT = `prezly-javascript-sdk/${VERSION} (+${URL})`;
@@ -191,7 +191,8 @@ function createClient(api) {
191
191
  async function translate(id, payload = {}, options) {
192
192
  const {
193
193
  culture,
194
- auto = false
194
+ auto = false,
195
+ newsroom
195
196
  } = payload ?? {};
196
197
  const {
197
198
  include,
@@ -207,7 +208,8 @@ function createClient(api) {
207
208
  },
208
209
  payload: {
209
210
  culture,
210
- auto
211
+ auto,
212
+ newsroom
211
213
  }
212
214
  });
213
215
  return story;
@@ -183,7 +183,8 @@ export function createClient(api) {
183
183
  async function translate(id, payload = {}, options) {
184
184
  const {
185
185
  culture,
186
- auto = false
186
+ auto = false,
187
+ newsroom
187
188
  } = payload ?? {};
188
189
  const {
189
190
  include,
@@ -199,7 +200,8 @@ export function createClient(api) {
199
200
  },
200
201
  payload: {
201
202
  culture,
202
- auto
203
+ auto,
204
+ newsroom
203
205
  }
204
206
  });
205
207
  return story;
@@ -54,7 +54,8 @@ const ALL_EXTRA_FIELDS_SHAPE = {
54
54
  referenced_entities: true,
55
55
  'campaigns.count': true,
56
56
  'pitches.count': true,
57
- 'coverage.count': true
57
+ 'coverage.count': true,
58
+ cross_site_translations: true
58
59
  };
59
60
  const ALL_EXTRA_FIELDS = exports.ALL_EXTRA_FIELDS = Object.keys(ALL_EXTRA_FIELDS_SHAPE);
60
61
  const EXTENDED_STORY_INCLUDED_EXTRA_FIELDS = exports.EXTENDED_STORY_INCLUDED_EXTRA_FIELDS = Object.keys(EXTENDED_STORY_INCLUDED_EXTRA_FIELDS_SHAPE);
@@ -240,6 +240,7 @@ export type UnscheduleRequest = UnpublishRequest;
240
240
  export interface TranslateRequest {
241
241
  culture?: CultureRef['code'];
242
242
  auto?: boolean;
243
+ newsroom?: Newsroom['uuid'] | Newsroom['id'];
243
244
  }
244
245
  export interface MoveRequest {
245
246
  newsroom: Newsroom['uuid'] | Newsroom['id'];
@@ -285,6 +286,7 @@ declare const ALL_EXTRA_FIELDS_SHAPE: {
285
286
  'campaigns.count': true;
286
287
  'pitches.count': true;
287
288
  'coverage.count': true;
289
+ cross_site_translations: true;
288
290
  };
289
291
  export declare const ALL_EXTRA_FIELDS: (keyof typeof ALL_EXTRA_FIELDS_SHAPE)[];
290
292
  export declare const EXTENDED_STORY_INCLUDED_EXTRA_FIELDS: (keyof typeof EXTENDED_STORY_INCLUDED_EXTRA_FIELDS_SHAPE)[];
@@ -44,7 +44,8 @@ const ALL_EXTRA_FIELDS_SHAPE = {
44
44
  referenced_entities: true,
45
45
  'campaigns.count': true,
46
46
  'pitches.count': true,
47
- 'coverage.count': true
47
+ 'coverage.count': true,
48
+ cross_site_translations: true
48
49
  };
49
50
  export const ALL_EXTRA_FIELDS = Object.keys(ALL_EXTRA_FIELDS_SHAPE);
50
51
  export const EXTENDED_STORY_INCLUDED_EXTRA_FIELDS = Object.keys(EXTENDED_STORY_INCLUDED_EXTRA_FIELDS_SHAPE);
@@ -266,6 +266,10 @@ export declare namespace Story {
266
266
  * Number of coverage entries linked to this story.
267
267
  */
268
268
  'coverage.count': number;
269
+ /**
270
+ * Translations of this story that exist in other newsrooms (cross-site translations).
271
+ */
272
+ cross_site_translations: StoryRef[];
269
273
  }
270
274
  function isActiveNewsroom(story: Pick<Story, 'newsroom'>): boolean;
271
275
  function isInactiveNewsroom(story: Pick<Story, 'newsroom'>): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prezly/sdk",
3
- "version": "26.3.3",
3
+ "version": "26.4.0",
4
4
  "description": "Prezly API SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",