@prezly/sdk 11.4.0 → 11.6.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.js
CHANGED
|
@@ -47,6 +47,8 @@ export declare class Client {
|
|
|
47
47
|
unpublish<Include extends readonly (keyof Story.ExtraFields)[], Options extends IncludeOptions<Include>, StoryRecord extends ExtendedStory = Options['include'] extends Include ? ExtendedStory & Pick<Story.ExtraFields, Options['include'][number]> : ExtendedStory>(id: StoryId, payload?: UnpublishRequest, options?: Options): Promise<StoryRecord>;
|
|
48
48
|
schedule<Include extends readonly (keyof Story.ExtraFields)[], Options extends IncludeOptions<Include>, StoryRecord extends ExtendedStory = Options['include'] extends Include ? ExtendedStory & Pick<Story.ExtraFields, Options['include'][number]> : ExtendedStory>(id: StoryId, payload?: ScheduleRequest, options?: Options): Promise<StoryRecord>;
|
|
49
49
|
unschedule<Include extends readonly (keyof Story.ExtraFields)[], Options extends IncludeOptions<Include>, StoryRecord extends ExtendedStory = Options['include'] extends Include ? ExtendedStory & Pick<Story.ExtraFields, Options['include'][number]> : ExtendedStory>(id: StoryId, payload?: UnscheduleRequest, options?: Options): Promise<StoryRecord>;
|
|
50
|
+
pin<Include extends readonly (keyof Story.ExtraFields)[], Options extends IncludeOptions<Include>, StoryRecord extends ExtendedStory = Options['include'] extends Include ? ExtendedStory & Pick<Story.ExtraFields, Options['include'][number]> : ExtendedStory>(id: StoryId, options?: Options): Promise<StoryRecord>;
|
|
51
|
+
unpin<Include extends readonly (keyof Story.ExtraFields)[], Options extends IncludeOptions<Include>, StoryRecord extends ExtendedStory = Options['include'] extends Include ? ExtendedStory & Pick<Story.ExtraFields, Options['include'][number]> : ExtendedStory>(id: StoryId, options?: Options): Promise<StoryRecord>;
|
|
50
52
|
delete(id: StoryId): Promise<void>;
|
|
51
53
|
}
|
|
52
54
|
export {};
|
|
@@ -252,6 +252,30 @@ export class Client {
|
|
|
252
252
|
});
|
|
253
253
|
return story;
|
|
254
254
|
}
|
|
255
|
+
async pin(id, options) {
|
|
256
|
+
const url = `${routing.storiesUrl}/${id}/pin`;
|
|
257
|
+
const include = options?.include;
|
|
258
|
+
const {
|
|
259
|
+
story
|
|
260
|
+
} = await this.apiClient.post(url, {
|
|
261
|
+
query: {
|
|
262
|
+
include: include
|
|
263
|
+
}
|
|
264
|
+
});
|
|
265
|
+
return story;
|
|
266
|
+
}
|
|
267
|
+
async unpin(id, options) {
|
|
268
|
+
const url = `${routing.storiesUrl}/${id}/unpin`;
|
|
269
|
+
const include = options?.include;
|
|
270
|
+
const {
|
|
271
|
+
story
|
|
272
|
+
} = await this.apiClient.post(url, {
|
|
273
|
+
query: {
|
|
274
|
+
include: include
|
|
275
|
+
}
|
|
276
|
+
});
|
|
277
|
+
return story;
|
|
278
|
+
}
|
|
255
279
|
async delete(id) {
|
|
256
280
|
const url = `${routing.storiesUrl}/${id}`;
|
|
257
281
|
await this.apiClient.delete(url);
|
package/dist/types/Newsroom.d.ts
CHANGED
|
@@ -72,6 +72,8 @@ export interface Newsroom extends NewsroomRef {
|
|
|
72
72
|
cultures: CultureRef[];
|
|
73
73
|
campaigns_number: number;
|
|
74
74
|
stories_number: number;
|
|
75
|
+
pitches_number: number;
|
|
76
|
+
coverage_number: number;
|
|
75
77
|
public_galleries_number: number;
|
|
76
78
|
square_logo: UploadedImage | null;
|
|
77
79
|
newsroom_logo: UploadedImage | null;
|
package/dist/types/Story.d.ts
CHANGED