@prezly/sdk 11.7.0 → 11.8.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.
@@ -1,3 +1,3 @@
1
- const VERSION = "11.6.0";
1
+ const VERSION = "11.7.1";
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;
@@ -90,6 +90,11 @@ interface GenericUpdateRequest {
90
90
  categories?: Category['id'][];
91
91
  tags?: string[];
92
92
  is_shared_to_prpro?: boolean;
93
+ seo_settings?: {
94
+ meta_title?: string | null;
95
+ meta_description?: string | null;
96
+ canonical_url?: string | null;
97
+ };
93
98
  }
94
99
  export interface HtmlStoryCreateRequest extends GenericCreateRequest {
95
100
  /**
@@ -0,0 +1,7 @@
1
+ export interface SEOSettings {
2
+ default_meta_title: string | null;
3
+ default_meta_description: string | null;
4
+ meta_title: string | null;
5
+ meta_description: string | null;
6
+ canonical_url: string | null;
7
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -2,6 +2,7 @@ import type { Category } from './Category';
2
2
  import type { OEmbedInfo } from './common';
3
3
  import type { CultureRef } from './Culture';
4
4
  import type { NewsroomRef } from './Newsroom';
5
+ import type { SEOSettings } from './SEOSettings';
5
6
  import type { UserRef } from './User';
6
7
  export interface StoryRef {
7
8
  uuid: string;
@@ -132,6 +133,7 @@ export interface Story {
132
133
  visibility: Story.Visibility;
133
134
  is_pinned: boolean;
134
135
  pinned_by: UserRef | null;
136
+ seo_settings: SEOSettings;
135
137
  }
136
138
  export declare namespace Story {
137
139
  enum FormatVersion {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prezly/sdk",
3
- "version": "11.7.0",
3
+ "version": "11.8.0",
4
4
  "description": "Prezly API SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",