@prezly/sdk 11.7.0 → 11.7.1

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.
@@ -1,3 +1,3 @@
1
- const VERSION = "11.6.0";
1
+ const VERSION = "11.7.0";
2
2
  const URL = 'https://github.com/prezly/javascript-sdk';
3
3
  export const DEFAULT_USER_AGENT = `prezly-javascript-sdk/${VERSION} (+${URL})`;
@@ -47,7 +47,9 @@ 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>;
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 & {
51
+ force?: boolean;
52
+ }): Promise<StoryRecord>;
51
53
  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>;
52
54
  delete(id: StoryId): Promise<void>;
53
55
  }
@@ -259,7 +259,8 @@ export class Client {
259
259
  story
260
260
  } = await this.apiClient.post(url, {
261
261
  query: {
262
- include: include
262
+ include: include,
263
+ force: options?.force || undefined
263
264
  }
264
265
  });
265
266
  return story;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prezly/sdk",
3
- "version": "11.7.0",
3
+ "version": "11.7.1",
4
4
  "description": "Prezly API SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",