@prezly/sdk 14.1.0 → 14.1.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.
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 = "14.
|
|
7
|
+
const VERSION = "14.1.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;
|
package/dist/api/constants.js
CHANGED
package/dist/types/Newsroom.cjs
CHANGED
|
@@ -28,24 +28,24 @@ exports.Newsroom = Newsroom;
|
|
|
28
28
|
})(TrackingPolicy || (TrackingPolicy = {}));
|
|
29
29
|
_Newsroom.TrackingPolicy = TrackingPolicy;
|
|
30
30
|
function isActive(arg) {
|
|
31
|
-
if (typeof arg === '
|
|
32
|
-
return arg
|
|
31
|
+
if (typeof arg === 'object' && arg !== null) {
|
|
32
|
+
return isActive(arg.status);
|
|
33
33
|
}
|
|
34
|
-
return
|
|
34
|
+
return arg === Status.ACTIVE;
|
|
35
35
|
}
|
|
36
36
|
_Newsroom.isActive = isActive;
|
|
37
37
|
function isInactive(arg) {
|
|
38
|
-
if (typeof arg === '
|
|
39
|
-
return arg
|
|
38
|
+
if (typeof arg === 'object' && arg !== null) {
|
|
39
|
+
return isInactive(arg.status);
|
|
40
40
|
}
|
|
41
|
-
return
|
|
41
|
+
return arg === Status.INACTIVE;
|
|
42
42
|
}
|
|
43
43
|
_Newsroom.isInactive = isInactive;
|
|
44
44
|
function isArchived(arg) {
|
|
45
|
-
if (typeof arg === '
|
|
46
|
-
return arg
|
|
45
|
+
if (typeof arg === 'object' && arg !== null) {
|
|
46
|
+
return isArchived(arg.status);
|
|
47
47
|
}
|
|
48
|
-
return
|
|
48
|
+
return arg === Status.ARCHIVED;
|
|
49
49
|
}
|
|
50
50
|
_Newsroom.isArchived = isArchived;
|
|
51
51
|
})(Newsroom || (exports.Newsroom = Newsroom = {}));
|
package/dist/types/Newsroom.js
CHANGED
|
@@ -21,24 +21,24 @@ export let Newsroom;
|
|
|
21
21
|
})(TrackingPolicy || (TrackingPolicy = {}));
|
|
22
22
|
_Newsroom.TrackingPolicy = TrackingPolicy;
|
|
23
23
|
function isActive(arg) {
|
|
24
|
-
if (typeof arg === '
|
|
25
|
-
return arg
|
|
24
|
+
if (typeof arg === 'object' && arg !== null) {
|
|
25
|
+
return isActive(arg.status);
|
|
26
26
|
}
|
|
27
|
-
return
|
|
27
|
+
return arg === Status.ACTIVE;
|
|
28
28
|
}
|
|
29
29
|
_Newsroom.isActive = isActive;
|
|
30
30
|
function isInactive(arg) {
|
|
31
|
-
if (typeof arg === '
|
|
32
|
-
return arg
|
|
31
|
+
if (typeof arg === 'object' && arg !== null) {
|
|
32
|
+
return isInactive(arg.status);
|
|
33
33
|
}
|
|
34
|
-
return
|
|
34
|
+
return arg === Status.INACTIVE;
|
|
35
35
|
}
|
|
36
36
|
_Newsroom.isInactive = isInactive;
|
|
37
37
|
function isArchived(arg) {
|
|
38
|
-
if (typeof arg === '
|
|
39
|
-
return arg
|
|
38
|
+
if (typeof arg === 'object' && arg !== null) {
|
|
39
|
+
return isArchived(arg.status);
|
|
40
40
|
}
|
|
41
|
-
return
|
|
41
|
+
return arg === Status.ARCHIVED;
|
|
42
42
|
}
|
|
43
43
|
_Newsroom.isArchived = isArchived;
|
|
44
44
|
})(Newsroom || (Newsroom = {}));
|
package/dist/types/Story.cjs
CHANGED
|
@@ -58,49 +58,49 @@ exports.Story = Story;
|
|
|
58
58
|
}
|
|
59
59
|
_Story.isArchivedNewsroom = isArchivedNewsroom;
|
|
60
60
|
function isUninitialized(arg) {
|
|
61
|
-
if (typeof arg === 'object') {
|
|
61
|
+
if (typeof arg === 'object' && arg !== null) {
|
|
62
62
|
return isUninitialized(arg.status);
|
|
63
63
|
}
|
|
64
64
|
return arg === Status.UNINITIALIZED;
|
|
65
65
|
}
|
|
66
66
|
_Story.isUninitialized = isUninitialized;
|
|
67
67
|
function isDraft(arg) {
|
|
68
|
-
if (typeof arg === 'object') {
|
|
68
|
+
if (typeof arg === 'object' && arg !== null) {
|
|
69
69
|
return isDraft(arg.status);
|
|
70
70
|
}
|
|
71
71
|
return arg === Status.DRAFT;
|
|
72
72
|
}
|
|
73
73
|
_Story.isDraft = isDraft;
|
|
74
74
|
function isScheduled(arg) {
|
|
75
|
-
if (typeof arg === 'object') {
|
|
75
|
+
if (typeof arg === 'object' && arg !== null) {
|
|
76
76
|
return isScheduled(arg.status);
|
|
77
77
|
}
|
|
78
78
|
return arg === Status.SCHEDULED;
|
|
79
79
|
}
|
|
80
80
|
_Story.isScheduled = isScheduled;
|
|
81
81
|
function isScheduledEmbargo(arg) {
|
|
82
|
-
if (typeof arg === 'object') {
|
|
82
|
+
if (typeof arg === 'object' && arg !== null) {
|
|
83
83
|
return isScheduledEmbargo(arg.status);
|
|
84
84
|
}
|
|
85
85
|
return arg === Status.EMBARGO;
|
|
86
86
|
}
|
|
87
87
|
_Story.isScheduledEmbargo = isScheduledEmbargo;
|
|
88
88
|
function isPublished(arg) {
|
|
89
|
-
if (typeof arg === 'object') {
|
|
89
|
+
if (typeof arg === 'object' && arg !== null) {
|
|
90
90
|
return isPublished(arg.status);
|
|
91
91
|
}
|
|
92
92
|
return arg === Status.PUBLISHED;
|
|
93
93
|
}
|
|
94
94
|
_Story.isPublished = isPublished;
|
|
95
95
|
function isLegacyHtmlFormat(arg) {
|
|
96
|
-
if (typeof arg === 'object') {
|
|
96
|
+
if (typeof arg === 'object' && arg !== null) {
|
|
97
97
|
return isLegacyHtmlFormat(arg.format_version);
|
|
98
98
|
}
|
|
99
99
|
return arg === FormatVersion.HTML;
|
|
100
100
|
}
|
|
101
101
|
_Story.isLegacyHtmlFormat = isLegacyHtmlFormat;
|
|
102
102
|
function isSlateFormat(arg) {
|
|
103
|
-
if (typeof arg === 'object') {
|
|
103
|
+
if (typeof arg === 'object' && arg !== null) {
|
|
104
104
|
return isSlateFormat(arg.format_version);
|
|
105
105
|
}
|
|
106
106
|
return arg === FormatVersion.SLATEJS;
|
package/dist/types/Story.js
CHANGED
|
@@ -51,49 +51,49 @@ export let Story;
|
|
|
51
51
|
}
|
|
52
52
|
_Story.isArchivedNewsroom = isArchivedNewsroom;
|
|
53
53
|
function isUninitialized(arg) {
|
|
54
|
-
if (typeof arg === 'object') {
|
|
54
|
+
if (typeof arg === 'object' && arg !== null) {
|
|
55
55
|
return isUninitialized(arg.status);
|
|
56
56
|
}
|
|
57
57
|
return arg === Status.UNINITIALIZED;
|
|
58
58
|
}
|
|
59
59
|
_Story.isUninitialized = isUninitialized;
|
|
60
60
|
function isDraft(arg) {
|
|
61
|
-
if (typeof arg === 'object') {
|
|
61
|
+
if (typeof arg === 'object' && arg !== null) {
|
|
62
62
|
return isDraft(arg.status);
|
|
63
63
|
}
|
|
64
64
|
return arg === Status.DRAFT;
|
|
65
65
|
}
|
|
66
66
|
_Story.isDraft = isDraft;
|
|
67
67
|
function isScheduled(arg) {
|
|
68
|
-
if (typeof arg === 'object') {
|
|
68
|
+
if (typeof arg === 'object' && arg !== null) {
|
|
69
69
|
return isScheduled(arg.status);
|
|
70
70
|
}
|
|
71
71
|
return arg === Status.SCHEDULED;
|
|
72
72
|
}
|
|
73
73
|
_Story.isScheduled = isScheduled;
|
|
74
74
|
function isScheduledEmbargo(arg) {
|
|
75
|
-
if (typeof arg === 'object') {
|
|
75
|
+
if (typeof arg === 'object' && arg !== null) {
|
|
76
76
|
return isScheduledEmbargo(arg.status);
|
|
77
77
|
}
|
|
78
78
|
return arg === Status.EMBARGO;
|
|
79
79
|
}
|
|
80
80
|
_Story.isScheduledEmbargo = isScheduledEmbargo;
|
|
81
81
|
function isPublished(arg) {
|
|
82
|
-
if (typeof arg === 'object') {
|
|
82
|
+
if (typeof arg === 'object' && arg !== null) {
|
|
83
83
|
return isPublished(arg.status);
|
|
84
84
|
}
|
|
85
85
|
return arg === Status.PUBLISHED;
|
|
86
86
|
}
|
|
87
87
|
_Story.isPublished = isPublished;
|
|
88
88
|
function isLegacyHtmlFormat(arg) {
|
|
89
|
-
if (typeof arg === 'object') {
|
|
89
|
+
if (typeof arg === 'object' && arg !== null) {
|
|
90
90
|
return isLegacyHtmlFormat(arg.format_version);
|
|
91
91
|
}
|
|
92
92
|
return arg === FormatVersion.HTML;
|
|
93
93
|
}
|
|
94
94
|
_Story.isLegacyHtmlFormat = isLegacyHtmlFormat;
|
|
95
95
|
function isSlateFormat(arg) {
|
|
96
|
-
if (typeof arg === 'object') {
|
|
96
|
+
if (typeof arg === 'object' && arg !== null) {
|
|
97
97
|
return isSlateFormat(arg.format_version);
|
|
98
98
|
}
|
|
99
99
|
return arg === FormatVersion.SLATEJS;
|