@prezly/sdk 18.2.2 → 19.0.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/DeferredJobsApiClient.cjs +0 -1
- package/dist/api/DeferredJobsApiClient.js +0 -1
- package/dist/api/constants.cjs +2 -3
- package/dist/api/constants.js +1 -1
- package/dist/api/types.d.ts +1 -1
- package/dist/endpoints/Accounts/index.cjs +2 -0
- package/dist/endpoints/Billing/index.cjs +2 -0
- package/dist/endpoints/Billing/types.cjs +3 -5
- package/dist/endpoints/CampaignRecipients/Client.d.ts +3 -3
- package/dist/endpoints/CampaignRecipients/index.cjs +2 -0
- package/dist/endpoints/Campaigns/index.cjs +2 -0
- package/dist/endpoints/Contacts/Client.d.ts +2 -2
- package/dist/endpoints/Contacts/index.cjs +2 -0
- package/dist/endpoints/Contacts/types.d.ts +3 -3
- package/dist/endpoints/ContactsExports/index.cjs +2 -0
- package/dist/endpoints/Coverage/Client.d.ts +1 -1
- package/dist/endpoints/Coverage/index.cjs +2 -0
- package/dist/endpoints/Coverage/types.d.ts +1 -1
- package/dist/endpoints/Jobs/index.cjs +2 -0
- package/dist/endpoints/Licenses/index.cjs +1 -0
- package/dist/endpoints/NewsroomCategories/Client.d.ts +1 -1
- package/dist/endpoints/NewsroomCategories/index.cjs +2 -0
- package/dist/endpoints/NewsroomContacts/Client.d.ts +2 -2
- package/dist/endpoints/NewsroomContacts/index.cjs +2 -0
- package/dist/endpoints/NewsroomContacts/types.d.ts +1 -1
- package/dist/endpoints/NewsroomDomains/Client.d.ts +1 -1
- package/dist/endpoints/NewsroomDomains/index.cjs +2 -0
- package/dist/endpoints/NewsroomGalleries/Client.d.ts +2 -2
- package/dist/endpoints/NewsroomGalleries/index.cjs +2 -0
- package/dist/endpoints/NewsroomHub/Client.d.ts +1 -1
- package/dist/endpoints/NewsroomHub/index.cjs +2 -0
- package/dist/endpoints/NewsroomHub/types.d.ts +1 -1
- package/dist/endpoints/NewsroomLanguages/Client.d.ts +1 -1
- package/dist/endpoints/NewsroomLanguages/index.cjs +2 -0
- package/dist/endpoints/NewsroomPrivacyRequests/index.cjs +2 -0
- package/dist/endpoints/NewsroomSubscriptions/Client.d.ts +1 -1
- package/dist/endpoints/NewsroomSubscriptions/index.cjs +2 -0
- package/dist/endpoints/NewsroomThemes/Client.d.ts +2 -2
- package/dist/endpoints/NewsroomThemes/index.cjs +1 -0
- package/dist/endpoints/NewsroomWebhooks/Client.d.ts +1 -1
- package/dist/endpoints/NewsroomWebhooks/index.cjs +2 -0
- package/dist/endpoints/Newsrooms/Client.d.ts +1 -1
- package/dist/endpoints/Newsrooms/index.cjs +2 -0
- package/dist/endpoints/NotificationSubscriptions/index.cjs +2 -0
- package/dist/endpoints/PricingTables/index.cjs +2 -0
- package/dist/endpoints/PricingTables/types.cjs +5 -9
- package/dist/endpoints/SenderAddresses/index.cjs +2 -0
- package/dist/endpoints/Snippets/Client.d.ts +1 -1
- package/dist/endpoints/Snippets/index.cjs +2 -0
- package/dist/endpoints/Stories/Client.cjs +69 -20
- package/dist/endpoints/Stories/Client.d.ts +20 -9
- package/dist/endpoints/Stories/Client.js +68 -23
- package/dist/endpoints/Stories/index.cjs +3 -0
- package/dist/endpoints/Stories/scopes.cjs +2 -3
- package/dist/endpoints/Stories/types.cjs +14 -4
- package/dist/endpoints/Stories/types.d.ts +28 -9
- package/dist/endpoints/Stories/types.js +13 -3
- package/dist/endpoints/Subscriptions/Client.d.ts +1 -1
- package/dist/endpoints/Subscriptions/index.cjs +2 -0
- package/dist/endpoints/Subscriptions/types.cjs +1 -2
- package/dist/endpoints/index.cjs +3 -3
- package/dist/http/constants.cjs +3 -6
- package/dist/http/index.cjs +8 -8
- package/dist/http/lib.cjs +0 -16
- package/dist/http/lib.js +0 -14
- package/dist/http/types.cjs +2 -4
- package/dist/index.cjs +7 -4
- package/dist/routing.cjs +2 -3
- package/dist/types/BillingCycle.cjs +1 -2
- package/dist/types/Campaign.cjs +1 -2
- package/dist/types/Category.cjs +1 -2
- package/dist/types/Category.d.ts +3 -3
- package/dist/types/Contact.cjs +1 -2
- package/dist/types/ContactDuplicateSuggestion.cjs +2 -2
- package/dist/types/ContactDuplicateSuggestion.d.ts +1 -1
- package/dist/types/ContactsExport.cjs +1 -2
- package/dist/types/ContactsExport.d.ts +1 -1
- package/dist/types/ContactsScope.cjs +1 -2
- package/dist/types/ContactsScope.d.ts +1 -1
- package/dist/types/CoverageEntry.cjs +1 -2
- package/dist/types/Culture.cjs +7 -2
- package/dist/types/Culture.d.ts +1 -1
- package/dist/types/Culture.js +6 -0
- package/dist/types/Currency.cjs +1 -2
- package/dist/types/DnsConfigurationInstruction.d.ts +1 -1
- package/dist/types/EmailRecipient.cjs +1 -2
- package/dist/types/JobState.cjs +1 -2
- package/dist/types/JobState.d.ts +1 -1
- package/dist/types/License.cjs +1 -2
- package/dist/types/Newsroom.cjs +4 -2
- package/dist/types/Newsroom.d.ts +2 -2
- package/dist/types/Newsroom.js +3 -0
- package/dist/types/NewsroomDomain.cjs +1 -2
- package/dist/types/NewsroomGallery.cjs +1 -2
- package/dist/types/NewsroomTheme.cjs +3 -5
- package/dist/types/NewsroomTheme.d.ts +1 -1
- package/dist/types/NewsroomTheme.js +1 -1
- package/dist/types/NewsroomWebhook.cjs +1 -2
- package/dist/types/NotificationSubscription.cjs +1 -2
- package/dist/types/Permissions.cjs +1 -2
- package/dist/types/Permissions.d.ts +1 -1
- package/dist/types/Plan.cjs +3 -4
- package/dist/types/PrivacyRequest.cjs +1 -2
- package/dist/types/SenderAddress.cjs +1 -2
- package/dist/types/SenderDomain.cjs +1 -2
- package/dist/types/SortOrder.cjs +1 -2
- package/dist/types/Story.cjs +17 -6
- package/dist/types/Story.d.ts +2 -2
- package/dist/types/Story.js +16 -4
- package/dist/types/User.cjs +1 -2
- package/dist/types/UserAccount.d.ts +1 -1
- package/dist/types/common/Notification.cjs +1 -2
- package/dist/types/common/OEmbedInfo.cjs +1 -2
- package/dist/types/common/Pagination.cjs +2 -2
- package/dist/types/common/Query.cjs +1 -2
- package/dist/types/common/Query.d.ts +1 -1
- package/dist/types/common/index.cjs +6 -0
- package/dist/types/index.cjs +36 -0
- package/package.json +10 -13
|
@@ -4,8 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.NotificationSubscription = void 0;
|
|
7
|
-
let NotificationSubscription;
|
|
8
|
-
exports.NotificationSubscription = NotificationSubscription;
|
|
7
|
+
let NotificationSubscription = exports.NotificationSubscription = void 0;
|
|
9
8
|
(function (_NotificationSubscription) {
|
|
10
9
|
let Area;
|
|
11
10
|
(function (Area) {
|
|
@@ -4,8 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.Permission = void 0;
|
|
7
|
-
let Permission;
|
|
8
|
-
exports.Permission = Permission;
|
|
7
|
+
let Permission = exports.Permission = void 0;
|
|
9
8
|
(function (Permission) {
|
|
10
9
|
Permission["CREATE_NEWSROOM"] = "create_newsroom";
|
|
11
10
|
Permission["EXPORT_CONTACTS"] = "export_contacts";
|
package/dist/types/Plan.cjs
CHANGED
|
@@ -4,15 +4,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.PlanLevel = exports.ChangeType = void 0;
|
|
7
|
-
let ChangeType
|
|
8
|
-
|
|
7
|
+
let ChangeType = exports.ChangeType = void 0;
|
|
8
|
+
/** @deprecated Will be dropped in future */
|
|
9
9
|
(function (ChangeType) {
|
|
10
10
|
ChangeType["ACTIVATION"] = "activation";
|
|
11
11
|
ChangeType["UPGRADE"] = "upgrade";
|
|
12
12
|
ChangeType["DOWNGRADE"] = "downgrade";
|
|
13
13
|
})(ChangeType || (exports.ChangeType = ChangeType = {}));
|
|
14
|
-
let PlanLevel;
|
|
15
|
-
exports.PlanLevel = PlanLevel;
|
|
14
|
+
let PlanLevel = exports.PlanLevel = void 0;
|
|
16
15
|
(function (PlanLevel) {
|
|
17
16
|
PlanLevel["BASIC"] = "basic";
|
|
18
17
|
PlanLevel["CORE"] = "core";
|
|
@@ -4,8 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.PrivacyRequest = void 0;
|
|
7
|
-
let PrivacyRequest;
|
|
8
|
-
exports.PrivacyRequest = PrivacyRequest;
|
|
7
|
+
let PrivacyRequest = exports.PrivacyRequest = void 0;
|
|
9
8
|
(function (_PrivacyRequest) {
|
|
10
9
|
let Type;
|
|
11
10
|
(function (Type) {
|
|
@@ -4,8 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.SenderAddress = void 0;
|
|
7
|
-
let SenderAddress;
|
|
8
|
-
exports.SenderAddress = SenderAddress;
|
|
7
|
+
let SenderAddress = exports.SenderAddress = void 0;
|
|
9
8
|
(function (_SenderAddress) {
|
|
10
9
|
let Type;
|
|
11
10
|
(function (Type) {
|
|
@@ -4,8 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.SenderDomain = void 0;
|
|
7
|
-
let SenderDomain;
|
|
8
|
-
exports.SenderDomain = SenderDomain;
|
|
7
|
+
let SenderDomain = exports.SenderDomain = void 0;
|
|
9
8
|
(function (_SenderDomain) {
|
|
10
9
|
let VerificationFlowVersion;
|
|
11
10
|
(function (VerificationFlowVersion) {
|
package/dist/types/SortOrder.cjs
CHANGED
package/dist/types/Story.cjs
CHANGED
|
@@ -5,8 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.Story = void 0;
|
|
7
7
|
var _Newsroom = require("./Newsroom.cjs");
|
|
8
|
-
let Story;
|
|
9
|
-
exports.Story = Story;
|
|
8
|
+
let Story = exports.Story = void 0;
|
|
10
9
|
(function (_Story) {
|
|
11
10
|
let FormatVersion;
|
|
12
11
|
(function (FormatVersion) {
|
|
@@ -28,10 +27,12 @@ exports.Story = Story;
|
|
|
28
27
|
/**
|
|
29
28
|
* @deprecated Please use `Status` instead.
|
|
30
29
|
* @see Status
|
|
31
|
-
*/
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
*/
|
|
31
|
+
var LifecycleStatus = Status;
|
|
32
|
+
/**
|
|
33
|
+
* @deprecated Please use `Status` instead.
|
|
34
|
+
* @see Status
|
|
35
|
+
*/
|
|
35
36
|
let PublicationStatus;
|
|
36
37
|
(function (PublicationStatus) {
|
|
37
38
|
PublicationStatus["NEW"] = "new";
|
|
@@ -47,6 +48,10 @@ exports.Story = Story;
|
|
|
47
48
|
Visibility["CONFIDENTIAL"] = "confidential";
|
|
48
49
|
})(Visibility || (Visibility = {}));
|
|
49
50
|
_Story.Visibility = Visibility;
|
|
51
|
+
/*
|
|
52
|
+
* Newsroom status checks
|
|
53
|
+
*/
|
|
54
|
+
|
|
50
55
|
function isActiveNewsroom(story) {
|
|
51
56
|
return _Newsroom.Newsroom.isActive(story.newsroom);
|
|
52
57
|
}
|
|
@@ -59,6 +64,9 @@ exports.Story = Story;
|
|
|
59
64
|
return _Newsroom.Newsroom.isArchived(story.newsroom);
|
|
60
65
|
}
|
|
61
66
|
_Story.isArchivedNewsroom = isArchivedNewsroom;
|
|
67
|
+
/*
|
|
68
|
+
* Lifecycle status checks
|
|
69
|
+
*/
|
|
62
70
|
function isUninitialized(arg) {
|
|
63
71
|
if (typeof arg === 'object' && arg !== null) {
|
|
64
72
|
return isUninitialized(arg.status);
|
|
@@ -101,6 +109,9 @@ exports.Story = Story;
|
|
|
101
109
|
return arg === Status.PUBLISHED;
|
|
102
110
|
}
|
|
103
111
|
_Story.isPublished = isPublished;
|
|
112
|
+
/*
|
|
113
|
+
* Format version checks
|
|
114
|
+
*/
|
|
104
115
|
function isLegacyHtmlFormat(arg) {
|
|
105
116
|
if (typeof arg === 'object' && arg !== null) {
|
|
106
117
|
return isLegacyHtmlFormat(arg.format_version);
|
package/dist/types/Story.d.ts
CHANGED
|
@@ -4,8 +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
|
-
|
|
8
|
-
|
|
7
|
+
type Html = string;
|
|
8
|
+
type Json = string;
|
|
9
9
|
export interface StoryRef {
|
|
10
10
|
uuid: string;
|
|
11
11
|
/**
|
package/dist/types/Story.js
CHANGED
|
@@ -21,10 +21,12 @@ export let Story;
|
|
|
21
21
|
/**
|
|
22
22
|
* @deprecated Please use `Status` instead.
|
|
23
23
|
* @see Status
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
*/
|
|
25
|
+
var LifecycleStatus = Status;
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated Please use `Status` instead.
|
|
28
|
+
* @see Status
|
|
29
|
+
*/
|
|
28
30
|
let PublicationStatus;
|
|
29
31
|
(function (PublicationStatus) {
|
|
30
32
|
PublicationStatus["NEW"] = "new";
|
|
@@ -40,6 +42,10 @@ export let Story;
|
|
|
40
42
|
Visibility["CONFIDENTIAL"] = "confidential";
|
|
41
43
|
})(Visibility || (Visibility = {}));
|
|
42
44
|
_Story.Visibility = Visibility;
|
|
45
|
+
/*
|
|
46
|
+
* Newsroom status checks
|
|
47
|
+
*/
|
|
48
|
+
|
|
43
49
|
function isActiveNewsroom(story) {
|
|
44
50
|
return Newsroom.isActive(story.newsroom);
|
|
45
51
|
}
|
|
@@ -52,6 +58,9 @@ export let Story;
|
|
|
52
58
|
return Newsroom.isArchived(story.newsroom);
|
|
53
59
|
}
|
|
54
60
|
_Story.isArchivedNewsroom = isArchivedNewsroom;
|
|
61
|
+
/*
|
|
62
|
+
* Lifecycle status checks
|
|
63
|
+
*/
|
|
55
64
|
function isUninitialized(arg) {
|
|
56
65
|
if (typeof arg === 'object' && arg !== null) {
|
|
57
66
|
return isUninitialized(arg.status);
|
|
@@ -94,6 +103,9 @@ export let Story;
|
|
|
94
103
|
return arg === Status.PUBLISHED;
|
|
95
104
|
}
|
|
96
105
|
_Story.isPublished = isPublished;
|
|
106
|
+
/*
|
|
107
|
+
* Format version checks
|
|
108
|
+
*/
|
|
97
109
|
function isLegacyHtmlFormat(arg) {
|
|
98
110
|
if (typeof arg === 'object' && arg !== null) {
|
|
99
111
|
return isLegacyHtmlFormat(arg.format_version);
|
package/dist/types/User.cjs
CHANGED
|
@@ -2,7 +2,7 @@ import type { LicenseRef } from './License';
|
|
|
2
2
|
import type { NewsroomRef } from './Newsroom';
|
|
3
3
|
import type { Permission } from './Permissions';
|
|
4
4
|
import type { UserRef } from './User';
|
|
5
|
-
export
|
|
5
|
+
export type UserAccountRef = UserRef;
|
|
6
6
|
export interface UserAccount {
|
|
7
7
|
id: number;
|
|
8
8
|
avatar_url: string;
|
|
@@ -4,8 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.Notification = void 0;
|
|
7
|
-
let Notification;
|
|
8
|
-
exports.Notification = Notification;
|
|
7
|
+
let Notification = exports.Notification = void 0;
|
|
9
8
|
(function (_Notification) {
|
|
10
9
|
let Style;
|
|
11
10
|
(function (Style) {
|
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.SelectionMode = void 0;
|
|
7
7
|
/**
|
|
8
8
|
* @see https://api.prezly.com/v2/common/schema.json#/definitions/Pagination
|
|
9
|
-
*/
|
|
10
|
-
exports.SelectionMode =
|
|
9
|
+
*/
|
|
10
|
+
let SelectionMode = exports.SelectionMode = void 0;
|
|
11
11
|
(function (SelectionMode) {
|
|
12
12
|
SelectionMode["ALL"] = "all";
|
|
13
13
|
SelectionMode["IN"] = "in";
|
|
@@ -8,8 +8,7 @@ exports.Query = void 0;
|
|
|
8
8
|
/**
|
|
9
9
|
* @see https://developers.prezly.com/docs/api/docs/06-prezly-query-language.md
|
|
10
10
|
*/
|
|
11
|
-
let Query;
|
|
12
|
-
exports.Query = Query;
|
|
11
|
+
let Query = exports.Query = void 0;
|
|
13
12
|
(function (_Query) {
|
|
14
13
|
function stringify(query) {
|
|
15
14
|
if (!query) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @see https://developers.prezly.com/docs/api/docs/06-prezly-query-language.md
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
4
|
+
export type Query = object | string;
|
|
5
5
|
export declare namespace Query {
|
|
6
6
|
function stringify(query: Query | undefined | null): string | undefined;
|
|
7
7
|
}
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
var _Notification = require("./Notification.cjs");
|
|
7
7
|
Object.keys(_Notification).forEach(function (key) {
|
|
8
8
|
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _Notification[key]) return;
|
|
9
10
|
Object.defineProperty(exports, key, {
|
|
10
11
|
enumerable: true,
|
|
11
12
|
get: function () {
|
|
@@ -16,6 +17,7 @@ Object.keys(_Notification).forEach(function (key) {
|
|
|
16
17
|
var _OEmbedInfo = require("./OEmbedInfo.cjs");
|
|
17
18
|
Object.keys(_OEmbedInfo).forEach(function (key) {
|
|
18
19
|
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _OEmbedInfo[key]) return;
|
|
19
21
|
Object.defineProperty(exports, key, {
|
|
20
22
|
enumerable: true,
|
|
21
23
|
get: function () {
|
|
@@ -26,6 +28,7 @@ Object.keys(_OEmbedInfo).forEach(function (key) {
|
|
|
26
28
|
var _Pagination = require("./Pagination.cjs");
|
|
27
29
|
Object.keys(_Pagination).forEach(function (key) {
|
|
28
30
|
if (key === "default" || key === "__esModule") return;
|
|
31
|
+
if (key in exports && exports[key] === _Pagination[key]) return;
|
|
29
32
|
Object.defineProperty(exports, key, {
|
|
30
33
|
enumerable: true,
|
|
31
34
|
get: function () {
|
|
@@ -36,6 +39,7 @@ Object.keys(_Pagination).forEach(function (key) {
|
|
|
36
39
|
var _Query = require("./Query.cjs");
|
|
37
40
|
Object.keys(_Query).forEach(function (key) {
|
|
38
41
|
if (key === "default" || key === "__esModule") return;
|
|
42
|
+
if (key in exports && exports[key] === _Query[key]) return;
|
|
39
43
|
Object.defineProperty(exports, key, {
|
|
40
44
|
enumerable: true,
|
|
41
45
|
get: function () {
|
|
@@ -46,6 +50,7 @@ Object.keys(_Query).forEach(function (key) {
|
|
|
46
50
|
var _Utm = require("./Utm.cjs");
|
|
47
51
|
Object.keys(_Utm).forEach(function (key) {
|
|
48
52
|
if (key === "default" || key === "__esModule") return;
|
|
53
|
+
if (key in exports && exports[key] === _Utm[key]) return;
|
|
49
54
|
Object.defineProperty(exports, key, {
|
|
50
55
|
enumerable: true,
|
|
51
56
|
get: function () {
|
|
@@ -56,6 +61,7 @@ Object.keys(_Utm).forEach(function (key) {
|
|
|
56
61
|
var _Warning = require("./Warning.cjs");
|
|
57
62
|
Object.keys(_Warning).forEach(function (key) {
|
|
58
63
|
if (key === "default" || key === "__esModule") return;
|
|
64
|
+
if (key in exports && exports[key] === _Warning[key]) return;
|
|
59
65
|
Object.defineProperty(exports, key, {
|
|
60
66
|
enumerable: true,
|
|
61
67
|
get: function () {
|
package/dist/types/index.cjs
CHANGED
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
var _index = require("./common/index.cjs");
|
|
7
7
|
Object.keys(_index).forEach(function (key) {
|
|
8
8
|
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _index[key]) return;
|
|
9
10
|
Object.defineProperty(exports, key, {
|
|
10
11
|
enumerable: true,
|
|
11
12
|
get: function () {
|
|
@@ -16,6 +17,7 @@ Object.keys(_index).forEach(function (key) {
|
|
|
16
17
|
var _BillingCycle = require("./BillingCycle.cjs");
|
|
17
18
|
Object.keys(_BillingCycle).forEach(function (key) {
|
|
18
19
|
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _BillingCycle[key]) return;
|
|
19
21
|
Object.defineProperty(exports, key, {
|
|
20
22
|
enumerable: true,
|
|
21
23
|
get: function () {
|
|
@@ -26,6 +28,7 @@ Object.keys(_BillingCycle).forEach(function (key) {
|
|
|
26
28
|
var _Campaign = require("./Campaign.cjs");
|
|
27
29
|
Object.keys(_Campaign).forEach(function (key) {
|
|
28
30
|
if (key === "default" || key === "__esModule") return;
|
|
31
|
+
if (key in exports && exports[key] === _Campaign[key]) return;
|
|
29
32
|
Object.defineProperty(exports, key, {
|
|
30
33
|
enumerable: true,
|
|
31
34
|
get: function () {
|
|
@@ -36,6 +39,7 @@ Object.keys(_Campaign).forEach(function (key) {
|
|
|
36
39
|
var _Category = require("./Category.cjs");
|
|
37
40
|
Object.keys(_Category).forEach(function (key) {
|
|
38
41
|
if (key === "default" || key === "__esModule") return;
|
|
42
|
+
if (key in exports && exports[key] === _Category[key]) return;
|
|
39
43
|
Object.defineProperty(exports, key, {
|
|
40
44
|
enumerable: true,
|
|
41
45
|
get: function () {
|
|
@@ -46,6 +50,7 @@ Object.keys(_Category).forEach(function (key) {
|
|
|
46
50
|
var _Contact = require("./Contact.cjs");
|
|
47
51
|
Object.keys(_Contact).forEach(function (key) {
|
|
48
52
|
if (key === "default" || key === "__esModule") return;
|
|
53
|
+
if (key in exports && exports[key] === _Contact[key]) return;
|
|
49
54
|
Object.defineProperty(exports, key, {
|
|
50
55
|
enumerable: true,
|
|
51
56
|
get: function () {
|
|
@@ -56,6 +61,7 @@ Object.keys(_Contact).forEach(function (key) {
|
|
|
56
61
|
var _ContactDuplicateSuggestion = require("./ContactDuplicateSuggestion.cjs");
|
|
57
62
|
Object.keys(_ContactDuplicateSuggestion).forEach(function (key) {
|
|
58
63
|
if (key === "default" || key === "__esModule") return;
|
|
64
|
+
if (key in exports && exports[key] === _ContactDuplicateSuggestion[key]) return;
|
|
59
65
|
Object.defineProperty(exports, key, {
|
|
60
66
|
enumerable: true,
|
|
61
67
|
get: function () {
|
|
@@ -66,6 +72,7 @@ Object.keys(_ContactDuplicateSuggestion).forEach(function (key) {
|
|
|
66
72
|
var _ContactsBulkSelector = require("./ContactsBulkSelector.cjs");
|
|
67
73
|
Object.keys(_ContactsBulkSelector).forEach(function (key) {
|
|
68
74
|
if (key === "default" || key === "__esModule") return;
|
|
75
|
+
if (key in exports && exports[key] === _ContactsBulkSelector[key]) return;
|
|
69
76
|
Object.defineProperty(exports, key, {
|
|
70
77
|
enumerable: true,
|
|
71
78
|
get: function () {
|
|
@@ -76,6 +83,7 @@ Object.keys(_ContactsBulkSelector).forEach(function (key) {
|
|
|
76
83
|
var _ContactsExport = require("./ContactsExport.cjs");
|
|
77
84
|
Object.keys(_ContactsExport).forEach(function (key) {
|
|
78
85
|
if (key === "default" || key === "__esModule") return;
|
|
86
|
+
if (key in exports && exports[key] === _ContactsExport[key]) return;
|
|
79
87
|
Object.defineProperty(exports, key, {
|
|
80
88
|
enumerable: true,
|
|
81
89
|
get: function () {
|
|
@@ -86,6 +94,7 @@ Object.keys(_ContactsExport).forEach(function (key) {
|
|
|
86
94
|
var _ContactsScope = require("./ContactsScope.cjs");
|
|
87
95
|
Object.keys(_ContactsScope).forEach(function (key) {
|
|
88
96
|
if (key === "default" || key === "__esModule") return;
|
|
97
|
+
if (key in exports && exports[key] === _ContactsScope[key]) return;
|
|
89
98
|
Object.defineProperty(exports, key, {
|
|
90
99
|
enumerable: true,
|
|
91
100
|
get: function () {
|
|
@@ -96,6 +105,7 @@ Object.keys(_ContactsScope).forEach(function (key) {
|
|
|
96
105
|
var _Country = require("./Country.cjs");
|
|
97
106
|
Object.keys(_Country).forEach(function (key) {
|
|
98
107
|
if (key === "default" || key === "__esModule") return;
|
|
108
|
+
if (key in exports && exports[key] === _Country[key]) return;
|
|
99
109
|
Object.defineProperty(exports, key, {
|
|
100
110
|
enumerable: true,
|
|
101
111
|
get: function () {
|
|
@@ -106,6 +116,7 @@ Object.keys(_Country).forEach(function (key) {
|
|
|
106
116
|
var _CoverageEntry = require("./CoverageEntry.cjs");
|
|
107
117
|
Object.keys(_CoverageEntry).forEach(function (key) {
|
|
108
118
|
if (key === "default" || key === "__esModule") return;
|
|
119
|
+
if (key in exports && exports[key] === _CoverageEntry[key]) return;
|
|
109
120
|
Object.defineProperty(exports, key, {
|
|
110
121
|
enumerable: true,
|
|
111
122
|
get: function () {
|
|
@@ -116,6 +127,7 @@ Object.keys(_CoverageEntry).forEach(function (key) {
|
|
|
116
127
|
var _Culture = require("./Culture.cjs");
|
|
117
128
|
Object.keys(_Culture).forEach(function (key) {
|
|
118
129
|
if (key === "default" || key === "__esModule") return;
|
|
130
|
+
if (key in exports && exports[key] === _Culture[key]) return;
|
|
119
131
|
Object.defineProperty(exports, key, {
|
|
120
132
|
enumerable: true,
|
|
121
133
|
get: function () {
|
|
@@ -126,6 +138,7 @@ Object.keys(_Culture).forEach(function (key) {
|
|
|
126
138
|
var _Currency = require("./Currency.cjs");
|
|
127
139
|
Object.keys(_Currency).forEach(function (key) {
|
|
128
140
|
if (key === "default" || key === "__esModule") return;
|
|
141
|
+
if (key in exports && exports[key] === _Currency[key]) return;
|
|
129
142
|
Object.defineProperty(exports, key, {
|
|
130
143
|
enumerable: true,
|
|
131
144
|
get: function () {
|
|
@@ -136,6 +149,7 @@ Object.keys(_Currency).forEach(function (key) {
|
|
|
136
149
|
var _DnsConfigurationInstruction = require("./DnsConfigurationInstruction.cjs");
|
|
137
150
|
Object.keys(_DnsConfigurationInstruction).forEach(function (key) {
|
|
138
151
|
if (key === "default" || key === "__esModule") return;
|
|
152
|
+
if (key in exports && exports[key] === _DnsConfigurationInstruction[key]) return;
|
|
139
153
|
Object.defineProperty(exports, key, {
|
|
140
154
|
enumerable: true,
|
|
141
155
|
get: function () {
|
|
@@ -146,6 +160,7 @@ Object.keys(_DnsConfigurationInstruction).forEach(function (key) {
|
|
|
146
160
|
var _EmailRecipient = require("./EmailRecipient.cjs");
|
|
147
161
|
Object.keys(_EmailRecipient).forEach(function (key) {
|
|
148
162
|
if (key === "default" || key === "__esModule") return;
|
|
163
|
+
if (key in exports && exports[key] === _EmailRecipient[key]) return;
|
|
149
164
|
Object.defineProperty(exports, key, {
|
|
150
165
|
enumerable: true,
|
|
151
166
|
get: function () {
|
|
@@ -156,6 +171,7 @@ Object.keys(_EmailRecipient).forEach(function (key) {
|
|
|
156
171
|
var _EmailSubscription = require("./EmailSubscription.cjs");
|
|
157
172
|
Object.keys(_EmailSubscription).forEach(function (key) {
|
|
158
173
|
if (key === "default" || key === "__esModule") return;
|
|
174
|
+
if (key in exports && exports[key] === _EmailSubscription[key]) return;
|
|
159
175
|
Object.defineProperty(exports, key, {
|
|
160
176
|
enumerable: true,
|
|
161
177
|
get: function () {
|
|
@@ -166,6 +182,7 @@ Object.keys(_EmailSubscription).forEach(function (key) {
|
|
|
166
182
|
var _JobState = require("./JobState.cjs");
|
|
167
183
|
Object.keys(_JobState).forEach(function (key) {
|
|
168
184
|
if (key === "default" || key === "__esModule") return;
|
|
185
|
+
if (key in exports && exports[key] === _JobState[key]) return;
|
|
169
186
|
Object.defineProperty(exports, key, {
|
|
170
187
|
enumerable: true,
|
|
171
188
|
get: function () {
|
|
@@ -176,6 +193,7 @@ Object.keys(_JobState).forEach(function (key) {
|
|
|
176
193
|
var _License = require("./License.cjs");
|
|
177
194
|
Object.keys(_License).forEach(function (key) {
|
|
178
195
|
if (key === "default" || key === "__esModule") return;
|
|
196
|
+
if (key in exports && exports[key] === _License[key]) return;
|
|
179
197
|
Object.defineProperty(exports, key, {
|
|
180
198
|
enumerable: true,
|
|
181
199
|
get: function () {
|
|
@@ -186,6 +204,7 @@ Object.keys(_License).forEach(function (key) {
|
|
|
186
204
|
var _Newsroom = require("./Newsroom.cjs");
|
|
187
205
|
Object.keys(_Newsroom).forEach(function (key) {
|
|
188
206
|
if (key === "default" || key === "__esModule") return;
|
|
207
|
+
if (key in exports && exports[key] === _Newsroom[key]) return;
|
|
189
208
|
Object.defineProperty(exports, key, {
|
|
190
209
|
enumerable: true,
|
|
191
210
|
get: function () {
|
|
@@ -196,6 +215,7 @@ Object.keys(_Newsroom).forEach(function (key) {
|
|
|
196
215
|
var _NewsroomCompanyInformation = require("./NewsroomCompanyInformation.cjs");
|
|
197
216
|
Object.keys(_NewsroomCompanyInformation).forEach(function (key) {
|
|
198
217
|
if (key === "default" || key === "__esModule") return;
|
|
218
|
+
if (key in exports && exports[key] === _NewsroomCompanyInformation[key]) return;
|
|
199
219
|
Object.defineProperty(exports, key, {
|
|
200
220
|
enumerable: true,
|
|
201
221
|
get: function () {
|
|
@@ -206,6 +226,7 @@ Object.keys(_NewsroomCompanyInformation).forEach(function (key) {
|
|
|
206
226
|
var _NewsroomContact = require("./NewsroomContact.cjs");
|
|
207
227
|
Object.keys(_NewsroomContact).forEach(function (key) {
|
|
208
228
|
if (key === "default" || key === "__esModule") return;
|
|
229
|
+
if (key in exports && exports[key] === _NewsroomContact[key]) return;
|
|
209
230
|
Object.defineProperty(exports, key, {
|
|
210
231
|
enumerable: true,
|
|
211
232
|
get: function () {
|
|
@@ -216,6 +237,7 @@ Object.keys(_NewsroomContact).forEach(function (key) {
|
|
|
216
237
|
var _NewsroomDomain = require("./NewsroomDomain.cjs");
|
|
217
238
|
Object.keys(_NewsroomDomain).forEach(function (key) {
|
|
218
239
|
if (key === "default" || key === "__esModule") return;
|
|
240
|
+
if (key in exports && exports[key] === _NewsroomDomain[key]) return;
|
|
219
241
|
Object.defineProperty(exports, key, {
|
|
220
242
|
enumerable: true,
|
|
221
243
|
get: function () {
|
|
@@ -226,6 +248,7 @@ Object.keys(_NewsroomDomain).forEach(function (key) {
|
|
|
226
248
|
var _NewsroomGallery = require("./NewsroomGallery.cjs");
|
|
227
249
|
Object.keys(_NewsroomGallery).forEach(function (key) {
|
|
228
250
|
if (key === "default" || key === "__esModule") return;
|
|
251
|
+
if (key in exports && exports[key] === _NewsroomGallery[key]) return;
|
|
229
252
|
Object.defineProperty(exports, key, {
|
|
230
253
|
enumerable: true,
|
|
231
254
|
get: function () {
|
|
@@ -236,6 +259,7 @@ Object.keys(_NewsroomGallery).forEach(function (key) {
|
|
|
236
259
|
var _NewsroomLanguageSettings = require("./NewsroomLanguageSettings.cjs");
|
|
237
260
|
Object.keys(_NewsroomLanguageSettings).forEach(function (key) {
|
|
238
261
|
if (key === "default" || key === "__esModule") return;
|
|
262
|
+
if (key in exports && exports[key] === _NewsroomLanguageSettings[key]) return;
|
|
239
263
|
Object.defineProperty(exports, key, {
|
|
240
264
|
enumerable: true,
|
|
241
265
|
get: function () {
|
|
@@ -246,6 +270,7 @@ Object.keys(_NewsroomLanguageSettings).forEach(function (key) {
|
|
|
246
270
|
var _NewsroomTheme = require("./NewsroomTheme.cjs");
|
|
247
271
|
Object.keys(_NewsroomTheme).forEach(function (key) {
|
|
248
272
|
if (key === "default" || key === "__esModule") return;
|
|
273
|
+
if (key in exports && exports[key] === _NewsroomTheme[key]) return;
|
|
249
274
|
Object.defineProperty(exports, key, {
|
|
250
275
|
enumerable: true,
|
|
251
276
|
get: function () {
|
|
@@ -256,6 +281,7 @@ Object.keys(_NewsroomTheme).forEach(function (key) {
|
|
|
256
281
|
var _NewsroomWebhook = require("./NewsroomWebhook.cjs");
|
|
257
282
|
Object.keys(_NewsroomWebhook).forEach(function (key) {
|
|
258
283
|
if (key === "default" || key === "__esModule") return;
|
|
284
|
+
if (key in exports && exports[key] === _NewsroomWebhook[key]) return;
|
|
259
285
|
Object.defineProperty(exports, key, {
|
|
260
286
|
enumerable: true,
|
|
261
287
|
get: function () {
|
|
@@ -266,6 +292,7 @@ Object.keys(_NewsroomWebhook).forEach(function (key) {
|
|
|
266
292
|
var _Plan = require("./Plan.cjs");
|
|
267
293
|
Object.keys(_Plan).forEach(function (key) {
|
|
268
294
|
if (key === "default" || key === "__esModule") return;
|
|
295
|
+
if (key in exports && exports[key] === _Plan[key]) return;
|
|
269
296
|
Object.defineProperty(exports, key, {
|
|
270
297
|
enumerable: true,
|
|
271
298
|
get: function () {
|
|
@@ -276,6 +303,7 @@ Object.keys(_Plan).forEach(function (key) {
|
|
|
276
303
|
var _PrivacyRequest = require("./PrivacyRequest.cjs");
|
|
277
304
|
Object.keys(_PrivacyRequest).forEach(function (key) {
|
|
278
305
|
if (key === "default" || key === "__esModule") return;
|
|
306
|
+
if (key in exports && exports[key] === _PrivacyRequest[key]) return;
|
|
279
307
|
Object.defineProperty(exports, key, {
|
|
280
308
|
enumerable: true,
|
|
281
309
|
get: function () {
|
|
@@ -286,6 +314,7 @@ Object.keys(_PrivacyRequest).forEach(function (key) {
|
|
|
286
314
|
var _SenderAddress = require("./SenderAddress.cjs");
|
|
287
315
|
Object.keys(_SenderAddress).forEach(function (key) {
|
|
288
316
|
if (key === "default" || key === "__esModule") return;
|
|
317
|
+
if (key in exports && exports[key] === _SenderAddress[key]) return;
|
|
289
318
|
Object.defineProperty(exports, key, {
|
|
290
319
|
enumerable: true,
|
|
291
320
|
get: function () {
|
|
@@ -296,6 +325,7 @@ Object.keys(_SenderAddress).forEach(function (key) {
|
|
|
296
325
|
var _SenderDomain = require("./SenderDomain.cjs");
|
|
297
326
|
Object.keys(_SenderDomain).forEach(function (key) {
|
|
298
327
|
if (key === "default" || key === "__esModule") return;
|
|
328
|
+
if (key in exports && exports[key] === _SenderDomain[key]) return;
|
|
299
329
|
Object.defineProperty(exports, key, {
|
|
300
330
|
enumerable: true,
|
|
301
331
|
get: function () {
|
|
@@ -306,6 +336,7 @@ Object.keys(_SenderDomain).forEach(function (key) {
|
|
|
306
336
|
var _Snippet = require("./Snippet.cjs");
|
|
307
337
|
Object.keys(_Snippet).forEach(function (key) {
|
|
308
338
|
if (key === "default" || key === "__esModule") return;
|
|
339
|
+
if (key in exports && exports[key] === _Snippet[key]) return;
|
|
309
340
|
Object.defineProperty(exports, key, {
|
|
310
341
|
enumerable: true,
|
|
311
342
|
get: function () {
|
|
@@ -316,6 +347,7 @@ Object.keys(_Snippet).forEach(function (key) {
|
|
|
316
347
|
var _SortOrder = require("./SortOrder.cjs");
|
|
317
348
|
Object.keys(_SortOrder).forEach(function (key) {
|
|
318
349
|
if (key === "default" || key === "__esModule") return;
|
|
350
|
+
if (key in exports && exports[key] === _SortOrder[key]) return;
|
|
319
351
|
Object.defineProperty(exports, key, {
|
|
320
352
|
enumerable: true,
|
|
321
353
|
get: function () {
|
|
@@ -326,6 +358,7 @@ Object.keys(_SortOrder).forEach(function (key) {
|
|
|
326
358
|
var _Story = require("./Story.cjs");
|
|
327
359
|
Object.keys(_Story).forEach(function (key) {
|
|
328
360
|
if (key === "default" || key === "__esModule") return;
|
|
361
|
+
if (key in exports && exports[key] === _Story[key]) return;
|
|
329
362
|
Object.defineProperty(exports, key, {
|
|
330
363
|
enumerable: true,
|
|
331
364
|
get: function () {
|
|
@@ -336,6 +369,7 @@ Object.keys(_Story).forEach(function (key) {
|
|
|
336
369
|
var _User = require("./User.cjs");
|
|
337
370
|
Object.keys(_User).forEach(function (key) {
|
|
338
371
|
if (key === "default" || key === "__esModule") return;
|
|
372
|
+
if (key in exports && exports[key] === _User[key]) return;
|
|
339
373
|
Object.defineProperty(exports, key, {
|
|
340
374
|
enumerable: true,
|
|
341
375
|
get: function () {
|
|
@@ -346,6 +380,7 @@ Object.keys(_User).forEach(function (key) {
|
|
|
346
380
|
var _UserAccount = require("./UserAccount.cjs");
|
|
347
381
|
Object.keys(_UserAccount).forEach(function (key) {
|
|
348
382
|
if (key === "default" || key === "__esModule") return;
|
|
383
|
+
if (key in exports && exports[key] === _UserAccount[key]) return;
|
|
349
384
|
Object.defineProperty(exports, key, {
|
|
350
385
|
enumerable: true,
|
|
351
386
|
get: function () {
|
|
@@ -356,6 +391,7 @@ Object.keys(_UserAccount).forEach(function (key) {
|
|
|
356
391
|
var _NotificationSubscription = require("./NotificationSubscription.cjs");
|
|
357
392
|
Object.keys(_NotificationSubscription).forEach(function (key) {
|
|
358
393
|
if (key === "default" || key === "__esModule") return;
|
|
394
|
+
if (key in exports && exports[key] === _NotificationSubscription[key]) return;
|
|
359
395
|
Object.defineProperty(exports, key, {
|
|
360
396
|
enumerable: true,
|
|
361
397
|
get: function () {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prezly/sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "19.0.0",
|
|
4
4
|
"description": "Prezly API SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -36,22 +36,21 @@
|
|
|
36
36
|
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
|
|
37
37
|
"@babel/preset-env": "^7.7.1",
|
|
38
38
|
"@babel/preset-typescript": "^7.18.6",
|
|
39
|
-
"@types/node": "^
|
|
40
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
41
|
-
"@typescript-eslint/parser": "^
|
|
39
|
+
"@types/node": "^20.10.4",
|
|
40
|
+
"@typescript-eslint/eslint-plugin": "^6.13.2",
|
|
41
|
+
"@typescript-eslint/parser": "^6.13.2",
|
|
42
42
|
"babel-plugin-add-import-extension": "^1.6.0",
|
|
43
43
|
"babel-plugin-transform-inline-environment-variables": "^0.4.4",
|
|
44
44
|
"cross-env": "^7.0.3",
|
|
45
45
|
"eslint": "^8.25.0",
|
|
46
46
|
"eslint-config-prettier": "^8.5.0",
|
|
47
47
|
"eslint-plugin-import": "^2.26.0",
|
|
48
|
-
"
|
|
49
|
-
"jest-fetch-mock": "^3.0.3",
|
|
50
|
-
"np": "^7.2.0",
|
|
48
|
+
"np": "^9.2.0",
|
|
51
49
|
"prettier": "^2.7.1",
|
|
52
50
|
"rimraf": "^3.0.0",
|
|
53
|
-
"
|
|
54
|
-
"
|
|
51
|
+
"typescript": "^5.3.3",
|
|
52
|
+
"vitest": "^1.0.4",
|
|
53
|
+
"vitest-fetch-mock": "^0.2.2"
|
|
55
54
|
},
|
|
56
55
|
"scripts": {
|
|
57
56
|
"clean": "rimraf dist node_modules",
|
|
@@ -64,11 +63,9 @@
|
|
|
64
63
|
"start": "npm run build --incremental --watch",
|
|
65
64
|
"lint": "eslint ./src --ext=.ts",
|
|
66
65
|
"lint:fix": "npm run lint -- --fix",
|
|
67
|
-
"test": "npm run test:build && npm run test:
|
|
68
|
-
"test:unit": "
|
|
69
|
-
"test:ts": "find src/ -name '*.test.ts' | xargs -I{} tsc --noEmit --strict {}",
|
|
66
|
+
"test": "npm run test:build && npm run test:unit",
|
|
67
|
+
"test:unit": "vitest run",
|
|
70
68
|
"test:build": "node dist/index.js && tsc --noEmit dist/index.d.ts",
|
|
71
|
-
"snapshot": "jest --updateSnapshot",
|
|
72
69
|
"prettier:check": "prettier --check './src/**/*.{ts,js}'",
|
|
73
70
|
"prettier:fix": "prettier --write './src/**/*.{ts,js}'",
|
|
74
71
|
"prerelease": "npm run build",
|