@prezly/sdk 26.3.3 → 26.5.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.
- package/dist/api/constants.cjs +1 -1
- package/dist/api/constants.js +1 -1
- package/dist/endpoints/Newsrooms/types.d.ts +1 -0
- package/dist/endpoints/Stories/Client.cjs +4 -2
- package/dist/endpoints/Stories/Client.js +4 -2
- package/dist/endpoints/Stories/types.cjs +2 -1
- package/dist/endpoints/Stories/types.d.ts +2 -0
- package/dist/endpoints/Stories/types.js +2 -1
- package/dist/types/Newsroom.d.ts +1 -0
- package/dist/types/Story.d.ts +4 -0
- package/package.json +1 -1
package/dist/api/constants.cjs
CHANGED
|
@@ -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.
|
|
7
|
+
const VERSION = "26.5.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})`;
|
package/dist/api/constants.js
CHANGED
|
@@ -128,6 +128,7 @@ export interface UpdateRequest {
|
|
|
128
128
|
status?: Newsroom.Status.ACTIVE | Newsroom.Status.INACTIVE;
|
|
129
129
|
is_plausible_enabled?: boolean;
|
|
130
130
|
is_white_labeled?: boolean;
|
|
131
|
+
redirect_to_canonical_url?: boolean;
|
|
131
132
|
onetrust_cookie_consent?: {
|
|
132
133
|
is_enabled?: boolean;
|
|
133
134
|
category?: string;
|
|
@@ -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);
|
package/dist/types/Newsroom.d.ts
CHANGED
|
@@ -115,6 +115,7 @@ export interface Newsroom extends NewsroomRef {
|
|
|
115
115
|
is_subscription_form_enabled: boolean;
|
|
116
116
|
auto_create_contacts_from_subscribers: boolean;
|
|
117
117
|
is_white_labeled: boolean;
|
|
118
|
+
redirect_to_canonical_url: boolean;
|
|
118
119
|
is_plausible_enabled: boolean;
|
|
119
120
|
plausible_site_id: string;
|
|
120
121
|
/**
|
package/dist/types/Story.d.ts
CHANGED
|
@@ -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;
|