@prezly/sdk 21.4.1 → 21.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.
@@ -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 = "21.4.0";
7
+ const VERSION = "21.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})`;
@@ -1,3 +1,3 @@
1
- const VERSION = "21.4.0";
1
+ const VERSION = "21.5.0";
2
2
  const URL = 'https://github.com/prezly/javascript-sdk';
3
3
  export const DEFAULT_USER_AGENT = `prezly-javascript-sdk/${VERSION} (+${URL})`;
@@ -133,9 +133,6 @@ export interface HtmlStoryCreateRequest extends GenericCreateRequest {
133
133
  attached_videos_content?: Json;
134
134
  }
135
135
  export interface SlateV3StoryCreateRequest extends GenericCreateRequest {
136
- /**
137
- * If format version is omitted, license default editor version will be implied.
138
- */
139
136
  format_version?: Story.FormatVersion.SLATEJS_V3;
140
137
  header_image?: UploadedImage | null;
141
138
  title?: string;
@@ -147,9 +144,6 @@ export interface SlateV3StoryCreateRequest extends GenericCreateRequest {
147
144
  content?: PrezlyContentFormat;
148
145
  }
149
146
  export interface SlateV4StoryCreateRequest extends GenericCreateRequest {
150
- /**
151
- * If format version is omitted, license default editor version will be implied.
152
- */
153
147
  format_version?: Story.FormatVersion.SLATEJS_V4;
154
148
  header_image?: never;
155
149
  title?: never;
@@ -161,10 +155,7 @@ export interface SlateV4StoryCreateRequest extends GenericCreateRequest {
161
155
  content?: PrezlyContentFormat;
162
156
  }
163
157
  export interface SlateV5StoryCreateRequest extends Omit<SlateV4StoryCreateRequest, 'format_version'> {
164
- /**
165
- * If format version is omitted, license default editor version will be implied.
166
- */
167
- format_version?: Story.FormatVersion.SLATEJS_V5;
158
+ format_version?: Story.FormatVersion.SLATEJS_V5 | Story.FormatVersion.SLATEJS_V6;
168
159
  }
169
160
  export interface HtmlStoryUpdateRequest extends GenericUpdateRequest {
170
161
  format_version?: Story.FormatVersion.HTML;
@@ -206,7 +197,7 @@ export interface SlateV4StoryUpdateRequest extends GenericUpdateRequest {
206
197
  content_version?: number;
207
198
  }
208
199
  export interface SlateV5StoryUpdateRequest extends Omit<SlateV4StoryUpdateRequest, 'format_version'> {
209
- format_version?: Story.FormatVersion.SLATEJS_V5;
200
+ format_version?: Story.FormatVersion.SLATEJS_V5 | Story.FormatVersion.SLATEJS_V6;
210
201
  }
211
202
  export interface PreviewResponse {
212
203
  content: {
@@ -43,6 +43,8 @@ export interface License extends LicenseRef {
43
43
  * At the end of this period, a new invoice will be created.
44
44
  */
45
45
  current_period_end: string | null;
46
+ demo_content_created_at: string | null;
47
+ demo_content_deleted_at: string | null;
46
48
  display_name: string;
47
49
  id: number;
48
50
  is_locked: boolean;
@@ -12,6 +12,7 @@ let Story = exports.Story = void 0;
12
12
  FormatVersion[FormatVersion["SLATEJS_V3"] = 3] = "SLATEJS_V3";
13
13
  FormatVersion[FormatVersion["SLATEJS_V4"] = 4] = "SLATEJS_V4";
14
14
  FormatVersion[FormatVersion["SLATEJS_V5"] = 5] = "SLATEJS_V5";
15
+ FormatVersion[FormatVersion["SLATEJS_V6"] = 6] = "SLATEJS_V6";
15
16
  return FormatVersion;
16
17
  }({});
17
18
  _Story.FormatVersion = FormatVersion;
@@ -123,7 +124,7 @@ let Story = exports.Story = void 0;
123
124
  if (typeof arg === 'object' && arg !== null) {
124
125
  return isSlateFormat(arg.format_version);
125
126
  }
126
- return arg === FormatVersion.SLATEJS_V3 || arg === FormatVersion.SLATEJS_V4 || arg === FormatVersion.SLATEJS_V5;
127
+ return arg === FormatVersion.SLATEJS_V3 || arg === FormatVersion.SLATEJS_V4 || arg === FormatVersion.SLATEJS_V5 || arg === FormatVersion.SLATEJS_V6;
127
128
  }
128
129
  _Story.isSlateFormat = isSlateFormat;
129
130
  function isSlateV3Format(arg) {
@@ -147,4 +148,11 @@ let Story = exports.Story = void 0;
147
148
  return arg === FormatVersion.SLATEJS_V5;
148
149
  }
149
150
  _Story.isSlateV5Format = isSlateV5Format;
151
+ function isSlateV6Format(arg) {
152
+ if (typeof arg === 'object' && arg !== null) {
153
+ return arg.format_version === FormatVersion.SLATEJS_V6;
154
+ }
155
+ return arg === FormatVersion.SLATEJS_V6;
156
+ }
157
+ _Story.isSlateV6Format = isSlateV6Format;
150
158
  })(Story || (exports.Story = Story = {}));
@@ -153,7 +153,8 @@ export declare namespace Story {
153
153
  HTML = 1,
154
154
  SLATEJS_V3 = 3,
155
155
  SLATEJS_V4 = 4,
156
- SLATEJS_V5 = 5
156
+ SLATEJS_V5 = 5,
157
+ SLATEJS_V6 = 6
157
158
  }
158
159
  enum Status {
159
160
  UNINITIALIZED = "uninitialized",
@@ -288,9 +289,9 @@ export declare namespace Story {
288
289
  function isLegacyHtmlFormat<T extends Pick<Story, 'format_version'>>(story: T): story is T & {
289
290
  format_version: FormatVersion.HTML;
290
291
  };
291
- function isSlateFormat(format: FormatVersion): format is FormatVersion.SLATEJS_V3 | FormatVersion.SLATEJS_V4 | FormatVersion.SLATEJS_V5;
292
+ function isSlateFormat(format: FormatVersion): format is FormatVersion.SLATEJS_V3 | FormatVersion.SLATEJS_V4 | FormatVersion.SLATEJS_V5 | FormatVersion.SLATEJS_V6;
292
293
  function isSlateFormat<T extends Pick<Story, 'format_version'>>(story: Pick<Story, 'format_version'>): story is T & {
293
- format_version: FormatVersion.SLATEJS_V3 | FormatVersion.SLATEJS_V4 | FormatVersion.SLATEJS_V5;
294
+ format_version: FormatVersion.SLATEJS_V3 | FormatVersion.SLATEJS_V4 | FormatVersion.SLATEJS_V5 | FormatVersion.SLATEJS_V6;
294
295
  };
295
296
  function isSlateV3Format(format: FormatVersion): format is FormatVersion.SLATEJS_V3;
296
297
  function isSlateV3Format<T extends Pick<Story, 'format_version'>>(story: Pick<Story, 'format_version'>): story is T & {
@@ -304,6 +305,10 @@ export declare namespace Story {
304
305
  function isSlateV5Format<T extends Pick<Story, 'format_version'>>(story: Pick<Story, 'format_version'>): story is T & {
305
306
  format_version: FormatVersion.SLATEJS_V5;
306
307
  };
308
+ function isSlateV6Format(format: FormatVersion): format is FormatVersion.SLATEJS_V6;
309
+ function isSlateV6Format<T extends Pick<Story, 'format_version'>>(story: Pick<Story, 'format_version'>): story is T & {
310
+ format_version: FormatVersion.SLATEJS_V6;
311
+ };
307
312
  }
308
313
  export interface ExtendedStory extends Story, Pick<Story.ExtraFields, 'thumbnail_image' | 'header_image' | 'preview_image' | 'social_image' | 'social_text' | 'tag_names' | 'content' | 'attached_gallery_content' | 'referenced_entities'> {
309
314
  }
@@ -6,6 +6,7 @@ export let Story;
6
6
  FormatVersion[FormatVersion["SLATEJS_V3"] = 3] = "SLATEJS_V3";
7
7
  FormatVersion[FormatVersion["SLATEJS_V4"] = 4] = "SLATEJS_V4";
8
8
  FormatVersion[FormatVersion["SLATEJS_V5"] = 5] = "SLATEJS_V5";
9
+ FormatVersion[FormatVersion["SLATEJS_V6"] = 6] = "SLATEJS_V6";
9
10
  return FormatVersion;
10
11
  }({});
11
12
  _Story.FormatVersion = FormatVersion;
@@ -117,7 +118,7 @@ export let Story;
117
118
  if (typeof arg === 'object' && arg !== null) {
118
119
  return isSlateFormat(arg.format_version);
119
120
  }
120
- return arg === FormatVersion.SLATEJS_V3 || arg === FormatVersion.SLATEJS_V4 || arg === FormatVersion.SLATEJS_V5;
121
+ return arg === FormatVersion.SLATEJS_V3 || arg === FormatVersion.SLATEJS_V4 || arg === FormatVersion.SLATEJS_V5 || arg === FormatVersion.SLATEJS_V6;
121
122
  }
122
123
  _Story.isSlateFormat = isSlateFormat;
123
124
  function isSlateV3Format(arg) {
@@ -141,4 +142,11 @@ export let Story;
141
142
  return arg === FormatVersion.SLATEJS_V5;
142
143
  }
143
144
  _Story.isSlateV5Format = isSlateV5Format;
145
+ function isSlateV6Format(arg) {
146
+ if (typeof arg === 'object' && arg !== null) {
147
+ return arg.format_version === FormatVersion.SLATEJS_V6;
148
+ }
149
+ return arg === FormatVersion.SLATEJS_V6;
150
+ }
151
+ _Story.isSlateV6Format = isSlateV6Format;
144
152
  })(Story || (Story = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prezly/sdk",
3
- "version": "21.4.1",
3
+ "version": "21.6.0",
4
4
  "description": "Prezly API SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",