@prezly/sdk 14.1.1 → 14.3.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,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.DEFAULT_USER_AGENT = void 0;
7
- const VERSION = "14.1.0";
7
+ const VERSION = "14.2.0";
8
8
  const URL = 'https://github.com/prezly/javascript-sdk';
9
9
  const DEFAULT_USER_AGENT = `prezly-javascript-sdk/${VERSION} (+${URL})`;
10
10
  exports.DEFAULT_USER_AGENT = DEFAULT_USER_AGENT;
@@ -1,3 +1,3 @@
1
- const VERSION = "14.1.0";
1
+ const VERSION = "14.2.0";
2
2
  const URL = 'https://github.com/prezly/javascript-sdk';
3
3
  export const DEFAULT_USER_AGENT = `prezly-javascript-sdk/${VERSION} (+${URL})`;
@@ -9,6 +9,10 @@ declare type Iso8601DateTime = string;
9
9
  * Raw HTML string.
10
10
  */
11
11
  declare type Html = string;
12
+ /**
13
+ * String-serialized JSON object.
14
+ */
15
+ declare type Json = string;
12
16
  /**
13
17
  * String containing Prezly Content Format JSON structure.
14
18
  */
@@ -104,10 +108,11 @@ export interface HtmlStoryCreateRequest extends GenericCreateRequest {
104
108
  format_version?: Story.FormatVersion.HTML;
105
109
  intro?: Html;
106
110
  content?: Html;
107
- /**
108
- * Attached gallery slate content.
109
- */
110
- attached_gallery_content?: string;
111
+ attached_attachments_content?: Json;
112
+ attached_bookmarks_content?: Json;
113
+ attached_contacts_content?: Json;
114
+ attached_gallery_content?: Json;
115
+ attached_videos_content?: Json;
111
116
  }
112
117
  export interface SlateStoryCreateRequest extends GenericCreateRequest {
113
118
  /**
@@ -123,10 +128,11 @@ export interface SlateStoryCreateRequest extends GenericCreateRequest {
123
128
  export interface HtmlStoryUpdateRequest extends GenericUpdateRequest {
124
129
  intro?: Html;
125
130
  content?: Html;
126
- /**
127
- * Attached gallery slate content.
128
- */
129
- attached_gallery_content?: string;
131
+ attached_attachments_content?: Json;
132
+ attached_bookmarks_content?: Json;
133
+ attached_contacts_content?: Json;
134
+ attached_gallery_content?: Json;
135
+ attached_videos_content?: Json;
130
136
  }
131
137
  export interface SlateStoryUpdateRequest extends GenericUpdateRequest {
132
138
  /**
@@ -139,7 +145,7 @@ export interface SlateStoryUpdateRequest extends GenericUpdateRequest {
139
145
  }
140
146
  export interface PreviewResponse {
141
147
  content: {
142
- 'text/html': string;
148
+ 'text/html': Html;
143
149
  'text/plain': string;
144
150
  };
145
151
  }
@@ -60,7 +60,7 @@ export interface License extends LicenseRef {
60
60
  * use "plan" instead.
61
61
  */
62
62
  plan_level: PlanLevel | null;
63
- plan: License.Plan;
63
+ plan: License.Plan | null;
64
64
  status: License.Status;
65
65
  subscription_lockout: boolean;
66
66
  /**
@@ -111,5 +111,6 @@ export declare namespace License {
111
111
  interface Plan {
112
112
  display_name: string | null;
113
113
  is_legacy: boolean;
114
+ is_superior: boolean;
114
115
  }
115
116
  }
@@ -4,6 +4,8 @@ import type { CultureRef } from './Culture';
4
4
  import { type NewsroomRef } from './Newsroom';
5
5
  import type { SEOSettings } from './SEOSettings';
6
6
  import type { UserRef } from './User';
7
+ declare type Html = string;
8
+ declare type Json = string;
7
9
  export interface StoryRef {
8
10
  uuid: string;
9
11
  /**
@@ -189,11 +191,11 @@ export declare namespace Story {
189
191
  * - HTML content for v1 stories (deprecated)
190
192
  * - JSON-encoded structured content for v3 stories (see Prezly Content Format).
191
193
  */
192
- content: string;
194
+ content: Html | Json;
193
195
  /**
194
196
  * Only supported on v3 stories with JSON-encoded structured content.
195
197
  */
196
- autosaved_content: string | null;
198
+ autosaved_content: Json | null;
197
199
  /**
198
200
  * Auto-incrementing version number updated on every update.
199
201
  * Used for detecting multiple users editing the same story simultaneously.
@@ -207,27 +209,27 @@ export declare namespace Story {
207
209
  * Contains attached gallery slate content.
208
210
  * Always `null` for v3 stories.
209
211
  */
210
- attached_gallery_content: string | null;
212
+ attached_gallery_content: Json | null;
211
213
  /**
212
214
  * Contains attached videos slate content.
213
215
  * Always `null` for v3 stories.
214
216
  */
215
- attached_videos_content: string | null;
217
+ attached_videos_content: Json | null;
216
218
  /**
217
219
  * Contains attached bookmarks slate content.
218
220
  * Always `null` for v3 stories.
219
221
  */
220
- attached_bookmarks_content: string | null;
222
+ attached_bookmarks_content: Json | null;
221
223
  /**
222
224
  * Contains attached files slate content.
223
225
  * Always `null` for v3 stories.
224
226
  */
225
- attached_attachments_content: string | null;
227
+ attached_attachments_content: Json | null;
226
228
  /**
227
229
  * Contains attached contacts slate content.
228
230
  * Always `null` for v3 stories.
229
231
  */
230
- attached_contacts_content: string | null;
232
+ attached_contacts_content: Json | null;
231
233
  referenced_entities: {
232
234
  stories: Record<string, OEmbedInfo>;
233
235
  };
@@ -264,3 +266,4 @@ export declare namespace Story {
264
266
  }
265
267
  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'> {
266
268
  }
269
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prezly/sdk",
3
- "version": "14.1.1",
3
+ "version": "14.3.0",
4
4
  "description": "Prezly API SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",