@prezly/sdk 16.1.1 → 16.2.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.cjs
CHANGED
|
@@ -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 = "16.1.
|
|
7
|
+
const VERSION = "16.1.2";
|
|
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;
|
package/dist/api/constants.js
CHANGED
package/dist/types/Story.cjs
CHANGED
|
@@ -72,6 +72,13 @@ exports.Story = Story;
|
|
|
72
72
|
return arg === Status.DRAFT;
|
|
73
73
|
}
|
|
74
74
|
_Story.isDraft = isDraft;
|
|
75
|
+
function isUninitializedOrDraft(arg) {
|
|
76
|
+
if (typeof arg === 'object' && arg !== null) {
|
|
77
|
+
return isUninitializedOrDraft(arg.status);
|
|
78
|
+
}
|
|
79
|
+
return arg === Status.UNINITIALIZED || arg === Status.DRAFT;
|
|
80
|
+
}
|
|
81
|
+
_Story.isUninitializedOrDraft = isUninitializedOrDraft;
|
|
75
82
|
function isScheduled(arg) {
|
|
76
83
|
if (typeof arg === 'object' && arg !== null) {
|
|
77
84
|
return isScheduled(arg.status);
|
package/dist/types/Story.d.ts
CHANGED
|
@@ -246,16 +246,30 @@ export declare namespace Story {
|
|
|
246
246
|
function isActiveNewsroom(story: Pick<Story, 'newsroom'>): boolean;
|
|
247
247
|
function isInactiveNewsroom(story: Pick<Story, 'newsroom'>): boolean;
|
|
248
248
|
function isArchivedNewsroom(story: Pick<Story, 'newsroom'>): boolean;
|
|
249
|
-
function isUninitialized(status: Status):
|
|
250
|
-
function isUninitialized
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
function
|
|
254
|
-
function
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
function
|
|
258
|
-
function
|
|
249
|
+
function isUninitialized(status: Status): status is Status.UNINITIALIZED;
|
|
250
|
+
function isUninitialized<T extends Pick<Story, 'status'>>(story: T): story is T & {
|
|
251
|
+
status: Status.UNINITIALIZED;
|
|
252
|
+
};
|
|
253
|
+
function isDraft(status: Status): status is Status.DRAFT;
|
|
254
|
+
function isDraft<T extends Pick<Story, 'status'>>(story: T): story is T & {
|
|
255
|
+
status: Status.DRAFT;
|
|
256
|
+
};
|
|
257
|
+
function isUninitializedOrDraft(status: Status): status is Status.UNINITIALIZED | Status.DRAFT;
|
|
258
|
+
function isUninitializedOrDraft<T extends Pick<Story, 'status'>>(story: T): story is T & {
|
|
259
|
+
status: Status.UNINITIALIZED | Status.DRAFT;
|
|
260
|
+
};
|
|
261
|
+
function isScheduled(status: Status): status is Status.SCHEDULED;
|
|
262
|
+
function isScheduled<T extends Pick<Story, 'status'>>(story: T): story is T & {
|
|
263
|
+
status: Status.SCHEDULED;
|
|
264
|
+
};
|
|
265
|
+
function isScheduledEmbargo(status: Status): status is Status.EMBARGO;
|
|
266
|
+
function isScheduledEmbargo<T extends Pick<Story, 'status'>>(story: T): story is T & {
|
|
267
|
+
status: Status.EMBARGO;
|
|
268
|
+
};
|
|
269
|
+
function isPublished(status: Status): status is Status.PUBLISHED;
|
|
270
|
+
function isPublished<T extends Pick<Story, 'status'>>(story: T): story is T & {
|
|
271
|
+
status: Status.PUBLISHED;
|
|
272
|
+
};
|
|
259
273
|
function isLegacyHtmlFormat(format: FormatVersion): format is FormatVersion.HTML;
|
|
260
274
|
function isLegacyHtmlFormat<T extends Pick<Story, 'format_version'>>(story: T): story is T & {
|
|
261
275
|
format_version: FormatVersion.HTML;
|
package/dist/types/Story.js
CHANGED
|
@@ -65,6 +65,13 @@ export let Story;
|
|
|
65
65
|
return arg === Status.DRAFT;
|
|
66
66
|
}
|
|
67
67
|
_Story.isDraft = isDraft;
|
|
68
|
+
function isUninitializedOrDraft(arg) {
|
|
69
|
+
if (typeof arg === 'object' && arg !== null) {
|
|
70
|
+
return isUninitializedOrDraft(arg.status);
|
|
71
|
+
}
|
|
72
|
+
return arg === Status.UNINITIALIZED || arg === Status.DRAFT;
|
|
73
|
+
}
|
|
74
|
+
_Story.isUninitializedOrDraft = isUninitializedOrDraft;
|
|
68
75
|
function isScheduled(arg) {
|
|
69
76
|
if (typeof arg === 'object' && arg !== null) {
|
|
70
77
|
return isScheduled(arg.status);
|