@prezly/sdk 19.5.0 → 19.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.
- package/dist/api/DeferredJobsApiClient.cjs +1 -0
- package/dist/api/DeferredJobsApiClient.js +1 -0
- package/dist/api/constants.cjs +3 -2
- package/dist/api/constants.js +1 -1
- package/dist/endpoints/Accounts/index.cjs +0 -2
- package/dist/endpoints/Billing/index.cjs +0 -2
- package/dist/endpoints/Billing/types.cjs +9 -7
- package/dist/endpoints/Billing/types.js +6 -6
- package/dist/endpoints/CampaignRecipients/index.cjs +0 -2
- package/dist/endpoints/Campaigns/index.cjs +0 -2
- package/dist/endpoints/Contacts/index.cjs +0 -2
- package/dist/endpoints/ContactsExports/index.cjs +0 -2
- package/dist/endpoints/Coverage/index.cjs +0 -2
- package/dist/endpoints/Jobs/index.cjs +0 -2
- package/dist/endpoints/Licenses/index.cjs +0 -1
- package/dist/endpoints/NewsroomCategories/index.cjs +0 -2
- package/dist/endpoints/NewsroomContacts/index.cjs +0 -2
- package/dist/endpoints/NewsroomDomains/index.cjs +0 -2
- package/dist/endpoints/NewsroomGalleries/index.cjs +0 -2
- package/dist/endpoints/NewsroomHub/index.cjs +0 -2
- package/dist/endpoints/NewsroomLanguages/index.cjs +0 -2
- package/dist/endpoints/NewsroomPrivacyRequests/index.cjs +0 -2
- package/dist/endpoints/NewsroomSubscriptions/Client.cjs +17 -0
- package/dist/endpoints/NewsroomSubscriptions/Client.d.ts +2 -1
- package/dist/endpoints/NewsroomSubscriptions/Client.js +17 -0
- package/dist/endpoints/NewsroomSubscriptions/index.cjs +0 -2
- package/dist/endpoints/NewsroomSubscriptions/types.d.ts +15 -1
- package/dist/endpoints/NewsroomThemes/index.cjs +0 -1
- package/dist/endpoints/NewsroomWebhooks/index.cjs +0 -2
- package/dist/endpoints/Newsrooms/index.cjs +0 -2
- package/dist/endpoints/Newsrooms/types.d.ts +1 -0
- package/dist/endpoints/NotificationSubscriptions/index.cjs +0 -2
- package/dist/endpoints/PricingTables/index.cjs +0 -2
- package/dist/endpoints/PricingTables/types.cjs +17 -13
- package/dist/endpoints/PricingTables/types.js +12 -12
- package/dist/endpoints/SenderAddresses/index.cjs +0 -2
- package/dist/endpoints/Snippets/index.cjs +0 -2
- package/dist/endpoints/Stories/Client.cjs +4 -23
- package/dist/endpoints/Stories/Client.js +7 -22
- package/dist/endpoints/Stories/index.cjs +0 -3
- package/dist/endpoints/Stories/scopes.cjs +3 -2
- package/dist/endpoints/Stories/types.cjs +4 -14
- package/dist/endpoints/Stories/types.js +3 -13
- package/dist/endpoints/Subscriptions/index.cjs +0 -2
- package/dist/endpoints/Subscriptions/types.cjs +4 -3
- package/dist/endpoints/Subscriptions/types.js +3 -3
- package/dist/endpoints/index.cjs +3 -3
- package/dist/http/constants.cjs +6 -3
- package/dist/http/index.cjs +8 -8
- package/dist/http/types.cjs +8 -6
- package/dist/http/types.js +6 -6
- package/dist/index.cjs +4 -7
- package/dist/routing.cjs +3 -3
- package/dist/routing.d.ts +0 -1
- package/dist/routing.js +0 -1
- package/dist/types/BillingCycle.cjs +4 -3
- package/dist/types/BillingCycle.js +3 -3
- package/dist/types/Campaign.cjs +20 -19
- package/dist/types/Campaign.js +18 -18
- package/dist/types/Category.cjs +2 -1
- package/dist/types/Contact.cjs +20 -19
- package/dist/types/Contact.js +18 -18
- package/dist/types/ContactDuplicateSuggestion.cjs +5 -5
- package/dist/types/ContactDuplicateSuggestion.js +4 -3
- package/dist/types/ContactsExport.cjs +5 -4
- package/dist/types/ContactsExport.js +3 -3
- package/dist/types/ContactsScope.cjs +5 -4
- package/dist/types/ContactsScope.js +3 -3
- package/dist/types/CoverageEntry.cjs +8 -7
- package/dist/types/CoverageEntry.js +6 -6
- package/dist/types/Culture.cjs +5 -10
- package/dist/types/Culture.js +3 -9
- package/dist/types/Currency.cjs +4 -3
- package/dist/types/Currency.js +3 -3
- package/dist/types/EmailRecipient.cjs +5 -4
- package/dist/types/EmailRecipient.js +3 -3
- package/dist/types/EmailSubscription.d.ts +1 -0
- package/dist/types/JobState.cjs +4 -3
- package/dist/types/JobState.js +3 -3
- package/dist/types/License.cjs +11 -10
- package/dist/types/License.js +9 -9
- package/dist/types/Newsroom.cjs +11 -13
- package/dist/types/Newsroom.d.ts +1 -0
- package/dist/types/Newsroom.js +9 -12
- package/dist/types/NewsroomDomain.cjs +8 -7
- package/dist/types/NewsroomDomain.js +6 -6
- package/dist/types/NewsroomGallery.cjs +8 -7
- package/dist/types/NewsroomGallery.js +6 -6
- package/dist/types/NewsroomSubscription.cjs +1 -0
- package/dist/types/NewsroomSubscription.d.ts +8 -0
- package/dist/types/NewsroomSubscription.js +1 -0
- package/dist/types/NewsroomTheme.cjs +11 -8
- package/dist/types/NewsroomTheme.js +8 -7
- package/dist/types/NewsroomWebhook.cjs +5 -4
- package/dist/types/NewsroomWebhook.js +3 -3
- package/dist/types/NotificationSubscription.cjs +5 -4
- package/dist/types/NotificationSubscription.js +3 -3
- package/dist/types/Permissions.cjs +4 -3
- package/dist/types/Permissions.js +3 -3
- package/dist/types/Plan.cjs +8 -7
- package/dist/types/Plan.js +8 -8
- package/dist/types/PrivacyRequest.cjs +8 -7
- package/dist/types/PrivacyRequest.js +6 -6
- package/dist/types/SenderAddress.cjs +5 -4
- package/dist/types/SenderAddress.js +3 -3
- package/dist/types/SenderDomain.cjs +5 -4
- package/dist/types/SenderDomain.js +3 -3
- package/dist/types/SortOrder.cjs +5 -4
- package/dist/types/SortOrder.js +3 -3
- package/dist/types/Story.cjs +18 -29
- package/dist/types/Story.js +16 -28
- package/dist/types/User.cjs +8 -7
- package/dist/types/User.js +6 -6
- package/dist/types/common/Notification.cjs +5 -4
- package/dist/types/common/Notification.js +3 -3
- package/dist/types/common/OEmbedInfo.cjs +5 -4
- package/dist/types/common/OEmbedInfo.js +3 -3
- package/dist/types/common/Pagination.cjs +4 -4
- package/dist/types/common/Pagination.js +3 -3
- package/dist/types/common/Query.cjs +2 -1
- package/dist/types/common/Query.js +1 -0
- package/dist/types/common/index.cjs +0 -6
- package/dist/types/index.cjs +10 -36
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/package.json +1 -1
package/dist/api/constants.cjs
CHANGED
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.DEFAULT_USER_AGENT = void 0;
|
|
7
|
-
const VERSION = "19.
|
|
7
|
+
const VERSION = "19.5.0";
|
|
8
8
|
const URL = 'https://github.com/prezly/javascript-sdk';
|
|
9
|
-
const DEFAULT_USER_AGENT =
|
|
9
|
+
const DEFAULT_USER_AGENT = `prezly-javascript-sdk/${VERSION} (+${URL})`;
|
|
10
|
+
exports.DEFAULT_USER_AGENT = DEFAULT_USER_AGENT;
|
package/dist/api/constants.js
CHANGED
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
var _Client = require("./Client.cjs");
|
|
7
7
|
Object.keys(_Client).forEach(function (key) {
|
|
8
8
|
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _Client[key]) return;
|
|
10
9
|
Object.defineProperty(exports, key, {
|
|
11
10
|
enumerable: true,
|
|
12
11
|
get: function () {
|
|
@@ -17,7 +16,6 @@ Object.keys(_Client).forEach(function (key) {
|
|
|
17
16
|
var _types = require("./types.cjs");
|
|
18
17
|
Object.keys(_types).forEach(function (key) {
|
|
19
18
|
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _types[key]) return;
|
|
21
19
|
Object.defineProperty(exports, key, {
|
|
22
20
|
enumerable: true,
|
|
23
21
|
get: function () {
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
var _Client = require("./Client.cjs");
|
|
7
7
|
Object.keys(_Client).forEach(function (key) {
|
|
8
8
|
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _Client[key]) return;
|
|
10
9
|
Object.defineProperty(exports, key, {
|
|
11
10
|
enumerable: true,
|
|
12
11
|
get: function () {
|
|
@@ -17,7 +16,6 @@ Object.keys(_Client).forEach(function (key) {
|
|
|
17
16
|
var _types = require("./types.cjs");
|
|
18
17
|
Object.keys(_types).forEach(function (key) {
|
|
19
18
|
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _types[key]) return;
|
|
21
19
|
Object.defineProperty(exports, key, {
|
|
22
20
|
enumerable: true,
|
|
23
21
|
get: function () {
|
|
@@ -3,15 +3,17 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
let SignupPlan
|
|
6
|
+
exports.SignupCurrency = exports.SignupPlan = void 0;
|
|
7
|
+
let SignupPlan;
|
|
8
|
+
exports.SignupPlan = SignupPlan;
|
|
9
|
+
(function (SignupPlan) {
|
|
8
10
|
SignupPlan["STARTER"] = "starter";
|
|
9
11
|
SignupPlan["CORE"] = "core";
|
|
10
12
|
SignupPlan["PREMIUM"] = "premium";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
})(SignupPlan || (exports.SignupPlan = SignupPlan = {}));
|
|
14
|
+
let SignupCurrency;
|
|
15
|
+
exports.SignupCurrency = SignupCurrency;
|
|
16
|
+
(function (SignupCurrency) {
|
|
14
17
|
SignupCurrency["EUR"] = "eur";
|
|
15
18
|
SignupCurrency["USD"] = "usd";
|
|
16
|
-
|
|
17
|
-
}({});
|
|
19
|
+
})(SignupCurrency || (exports.SignupCurrency = SignupCurrency = {}));
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export let SignupPlan
|
|
1
|
+
export let SignupPlan;
|
|
2
|
+
(function (SignupPlan) {
|
|
2
3
|
SignupPlan["STARTER"] = "starter";
|
|
3
4
|
SignupPlan["CORE"] = "core";
|
|
4
5
|
SignupPlan["PREMIUM"] = "premium";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
})(SignupPlan || (SignupPlan = {}));
|
|
7
|
+
export let SignupCurrency;
|
|
8
|
+
(function (SignupCurrency) {
|
|
8
9
|
SignupCurrency["EUR"] = "eur";
|
|
9
10
|
SignupCurrency["USD"] = "usd";
|
|
10
|
-
|
|
11
|
-
}({});
|
|
11
|
+
})(SignupCurrency || (SignupCurrency = {}));
|
|
@@ -16,7 +16,6 @@ var _Client = require("./Client.cjs");
|
|
|
16
16
|
Object.keys(_Client).forEach(function (key) {
|
|
17
17
|
if (key === "default" || key === "__esModule") return;
|
|
18
18
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
19
|
-
if (key in exports && exports[key] === _Client[key]) return;
|
|
20
19
|
Object.defineProperty(exports, key, {
|
|
21
20
|
enumerable: true,
|
|
22
21
|
get: function () {
|
|
@@ -28,7 +27,6 @@ var _types = require("./types.cjs");
|
|
|
28
27
|
Object.keys(_types).forEach(function (key) {
|
|
29
28
|
if (key === "default" || key === "__esModule") return;
|
|
30
29
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
31
|
-
if (key in exports && exports[key] === _types[key]) return;
|
|
32
30
|
Object.defineProperty(exports, key, {
|
|
33
31
|
enumerable: true,
|
|
34
32
|
get: function () {
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
var _Client = require("./Client.cjs");
|
|
7
7
|
Object.keys(_Client).forEach(function (key) {
|
|
8
8
|
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _Client[key]) return;
|
|
10
9
|
Object.defineProperty(exports, key, {
|
|
11
10
|
enumerable: true,
|
|
12
11
|
get: function () {
|
|
@@ -17,7 +16,6 @@ Object.keys(_Client).forEach(function (key) {
|
|
|
17
16
|
var _types = require("./types.cjs");
|
|
18
17
|
Object.keys(_types).forEach(function (key) {
|
|
19
18
|
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _types[key]) return;
|
|
21
19
|
Object.defineProperty(exports, key, {
|
|
22
20
|
enumerable: true,
|
|
23
21
|
get: function () {
|
|
@@ -16,7 +16,6 @@ var _Client = require("./Client.cjs");
|
|
|
16
16
|
Object.keys(_Client).forEach(function (key) {
|
|
17
17
|
if (key === "default" || key === "__esModule") return;
|
|
18
18
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
19
|
-
if (key in exports && exports[key] === _Client[key]) return;
|
|
20
19
|
Object.defineProperty(exports, key, {
|
|
21
20
|
enumerable: true,
|
|
22
21
|
get: function () {
|
|
@@ -28,7 +27,6 @@ var _types = require("./types.cjs");
|
|
|
28
27
|
Object.keys(_types).forEach(function (key) {
|
|
29
28
|
if (key === "default" || key === "__esModule") return;
|
|
30
29
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
31
|
-
if (key in exports && exports[key] === _types[key]) return;
|
|
32
30
|
Object.defineProperty(exports, key, {
|
|
33
31
|
enumerable: true,
|
|
34
32
|
get: function () {
|
|
@@ -16,7 +16,6 @@ var _Client = require("./Client.cjs");
|
|
|
16
16
|
Object.keys(_Client).forEach(function (key) {
|
|
17
17
|
if (key === "default" || key === "__esModule") return;
|
|
18
18
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
19
|
-
if (key in exports && exports[key] === _Client[key]) return;
|
|
20
19
|
Object.defineProperty(exports, key, {
|
|
21
20
|
enumerable: true,
|
|
22
21
|
get: function () {
|
|
@@ -28,7 +27,6 @@ var _types = require("./types.cjs");
|
|
|
28
27
|
Object.keys(_types).forEach(function (key) {
|
|
29
28
|
if (key === "default" || key === "__esModule") return;
|
|
30
29
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
31
|
-
if (key in exports && exports[key] === _types[key]) return;
|
|
32
30
|
Object.defineProperty(exports, key, {
|
|
33
31
|
enumerable: true,
|
|
34
32
|
get: function () {
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
var _Client = require("./Client.cjs");
|
|
7
7
|
Object.keys(_Client).forEach(function (key) {
|
|
8
8
|
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _Client[key]) return;
|
|
10
9
|
Object.defineProperty(exports, key, {
|
|
11
10
|
enumerable: true,
|
|
12
11
|
get: function () {
|
|
@@ -17,7 +16,6 @@ Object.keys(_Client).forEach(function (key) {
|
|
|
17
16
|
var _types = require("./types.cjs");
|
|
18
17
|
Object.keys(_types).forEach(function (key) {
|
|
19
18
|
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _types[key]) return;
|
|
21
19
|
Object.defineProperty(exports, key, {
|
|
22
20
|
enumerable: true,
|
|
23
21
|
get: function () {
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
var _Client = require("./Client.cjs");
|
|
7
7
|
Object.keys(_Client).forEach(function (key) {
|
|
8
8
|
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _Client[key]) return;
|
|
10
9
|
Object.defineProperty(exports, key, {
|
|
11
10
|
enumerable: true,
|
|
12
11
|
get: function () {
|
|
@@ -17,7 +16,6 @@ Object.keys(_Client).forEach(function (key) {
|
|
|
17
16
|
var _types = require("./types.cjs");
|
|
18
17
|
Object.keys(_types).forEach(function (key) {
|
|
19
18
|
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _types[key]) return;
|
|
21
19
|
Object.defineProperty(exports, key, {
|
|
22
20
|
enumerable: true,
|
|
23
21
|
get: function () {
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
var _Client = require("./Client.cjs");
|
|
7
7
|
Object.keys(_Client).forEach(function (key) {
|
|
8
8
|
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _Client[key]) return;
|
|
10
9
|
Object.defineProperty(exports, key, {
|
|
11
10
|
enumerable: true,
|
|
12
11
|
get: function () {
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
var _Client = require("./Client.cjs");
|
|
7
7
|
Object.keys(_Client).forEach(function (key) {
|
|
8
8
|
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _Client[key]) return;
|
|
10
9
|
Object.defineProperty(exports, key, {
|
|
11
10
|
enumerable: true,
|
|
12
11
|
get: function () {
|
|
@@ -17,7 +16,6 @@ Object.keys(_Client).forEach(function (key) {
|
|
|
17
16
|
var _types = require("./types.cjs");
|
|
18
17
|
Object.keys(_types).forEach(function (key) {
|
|
19
18
|
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _types[key]) return;
|
|
21
19
|
Object.defineProperty(exports, key, {
|
|
22
20
|
enumerable: true,
|
|
23
21
|
get: function () {
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
var _Client = require("./Client.cjs");
|
|
7
7
|
Object.keys(_Client).forEach(function (key) {
|
|
8
8
|
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _Client[key]) return;
|
|
10
9
|
Object.defineProperty(exports, key, {
|
|
11
10
|
enumerable: true,
|
|
12
11
|
get: function () {
|
|
@@ -17,7 +16,6 @@ Object.keys(_Client).forEach(function (key) {
|
|
|
17
16
|
var _types = require("./types.cjs");
|
|
18
17
|
Object.keys(_types).forEach(function (key) {
|
|
19
18
|
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _types[key]) return;
|
|
21
19
|
Object.defineProperty(exports, key, {
|
|
22
20
|
enumerable: true,
|
|
23
21
|
get: function () {
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
var _Client = require("./Client.cjs");
|
|
7
7
|
Object.keys(_Client).forEach(function (key) {
|
|
8
8
|
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _Client[key]) return;
|
|
10
9
|
Object.defineProperty(exports, key, {
|
|
11
10
|
enumerable: true,
|
|
12
11
|
get: function () {
|
|
@@ -17,7 +16,6 @@ Object.keys(_Client).forEach(function (key) {
|
|
|
17
16
|
var _types = require("./types.cjs");
|
|
18
17
|
Object.keys(_types).forEach(function (key) {
|
|
19
18
|
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _types[key]) return;
|
|
21
19
|
Object.defineProperty(exports, key, {
|
|
22
20
|
enumerable: true,
|
|
23
21
|
get: function () {
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
var _Client = require("./Client.cjs");
|
|
7
7
|
Object.keys(_Client).forEach(function (key) {
|
|
8
8
|
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _Client[key]) return;
|
|
10
9
|
Object.defineProperty(exports, key, {
|
|
11
10
|
enumerable: true,
|
|
12
11
|
get: function () {
|
|
@@ -17,7 +16,6 @@ Object.keys(_Client).forEach(function (key) {
|
|
|
17
16
|
var _types = require("./types.cjs");
|
|
18
17
|
Object.keys(_types).forEach(function (key) {
|
|
19
18
|
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _types[key]) return;
|
|
21
19
|
Object.defineProperty(exports, key, {
|
|
22
20
|
enumerable: true,
|
|
23
21
|
get: function () {
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
var _Client = require("./Client.cjs");
|
|
7
7
|
Object.keys(_Client).forEach(function (key) {
|
|
8
8
|
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _Client[key]) return;
|
|
10
9
|
Object.defineProperty(exports, key, {
|
|
11
10
|
enumerable: true,
|
|
12
11
|
get: function () {
|
|
@@ -17,7 +16,6 @@ Object.keys(_Client).forEach(function (key) {
|
|
|
17
16
|
var _types = require("./types.cjs");
|
|
18
17
|
Object.keys(_types).forEach(function (key) {
|
|
19
18
|
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _types[key]) return;
|
|
21
19
|
Object.defineProperty(exports, key, {
|
|
22
20
|
enumerable: true,
|
|
23
21
|
get: function () {
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
var _Client = require("./Client.cjs");
|
|
7
7
|
Object.keys(_Client).forEach(function (key) {
|
|
8
8
|
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _Client[key]) return;
|
|
10
9
|
Object.defineProperty(exports, key, {
|
|
11
10
|
enumerable: true,
|
|
12
11
|
get: function () {
|
|
@@ -17,7 +16,6 @@ Object.keys(_Client).forEach(function (key) {
|
|
|
17
16
|
var _types = require("./types.cjs");
|
|
18
17
|
Object.keys(_types).forEach(function (key) {
|
|
19
18
|
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _types[key]) return;
|
|
21
19
|
Object.defineProperty(exports, key, {
|
|
22
20
|
enumerable: true,
|
|
23
21
|
get: function () {
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
var _Client = require("./Client.cjs");
|
|
7
7
|
Object.keys(_Client).forEach(function (key) {
|
|
8
8
|
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _Client[key]) return;
|
|
10
9
|
Object.defineProperty(exports, key, {
|
|
11
10
|
enumerable: true,
|
|
12
11
|
get: function () {
|
|
@@ -17,7 +16,6 @@ Object.keys(_Client).forEach(function (key) {
|
|
|
17
16
|
var _types = require("./types.cjs");
|
|
18
17
|
Object.keys(_types).forEach(function (key) {
|
|
19
18
|
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _types[key]) return;
|
|
21
19
|
Object.defineProperty(exports, key, {
|
|
22
20
|
enumerable: true,
|
|
23
21
|
get: function () {
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.Client = void 0;
|
|
7
7
|
var _routing = require("../../routing.cjs");
|
|
8
|
+
var _index = require("../../types/index.cjs");
|
|
8
9
|
/**
|
|
9
10
|
* @deprecated Use Subscriptions instead
|
|
10
11
|
*/
|
|
@@ -18,5 +19,21 @@ class Client {
|
|
|
18
19
|
payload
|
|
19
20
|
});
|
|
20
21
|
}
|
|
22
|
+
async list(newsroomId, {
|
|
23
|
+
limit,
|
|
24
|
+
offset,
|
|
25
|
+
search,
|
|
26
|
+
sortOrder
|
|
27
|
+
} = {}) {
|
|
28
|
+
const url = _routing.routing.newsroomSubscriptionsUrl.replace(':newsroom_id', String(newsroomId));
|
|
29
|
+
return this.apiClient.get(url, {
|
|
30
|
+
query: {
|
|
31
|
+
limit,
|
|
32
|
+
offset,
|
|
33
|
+
search,
|
|
34
|
+
sort: _index.SortOrder.stringify(sortOrder)
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
}
|
|
21
38
|
}
|
|
22
39
|
exports.Client = Client;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DeferredJobsApiClient } from '../../api';
|
|
2
2
|
import type { Newsroom } from '../../types';
|
|
3
|
-
import type { CreateRequest } from './types';
|
|
3
|
+
import type { CreateRequest, ListOptions, ListResponse } from './types';
|
|
4
4
|
type NewsroomId = Newsroom['uuid'] | Newsroom['id'];
|
|
5
5
|
/**
|
|
6
6
|
* @deprecated Use Subscriptions instead
|
|
@@ -9,5 +9,6 @@ export declare class Client {
|
|
|
9
9
|
private readonly apiClient;
|
|
10
10
|
constructor(apiClient: DeferredJobsApiClient);
|
|
11
11
|
subscribe(newsroomId: NewsroomId, payload: CreateRequest): Promise<void>;
|
|
12
|
+
list(newsroomId: NewsroomId, { limit, offset, search, sortOrder }?: ListOptions): Promise<ListResponse>;
|
|
12
13
|
}
|
|
13
14
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { routing } from "../../routing.js";
|
|
2
|
+
import { SortOrder } from "../../types/index.js";
|
|
2
3
|
/**
|
|
3
4
|
* @deprecated Use Subscriptions instead
|
|
4
5
|
*/
|
|
@@ -12,4 +13,20 @@ export class Client {
|
|
|
12
13
|
payload
|
|
13
14
|
});
|
|
14
15
|
}
|
|
16
|
+
async list(newsroomId, {
|
|
17
|
+
limit,
|
|
18
|
+
offset,
|
|
19
|
+
search,
|
|
20
|
+
sortOrder
|
|
21
|
+
} = {}) {
|
|
22
|
+
const url = routing.newsroomSubscriptionsUrl.replace(':newsroom_id', String(newsroomId));
|
|
23
|
+
return this.apiClient.get(url, {
|
|
24
|
+
query: {
|
|
25
|
+
limit,
|
|
26
|
+
offset,
|
|
27
|
+
search,
|
|
28
|
+
sort: SortOrder.stringify(sortOrder)
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
15
32
|
}
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
var _Client = require("./Client.cjs");
|
|
7
7
|
Object.keys(_Client).forEach(function (key) {
|
|
8
8
|
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _Client[key]) return;
|
|
10
9
|
Object.defineProperty(exports, key, {
|
|
11
10
|
enumerable: true,
|
|
12
11
|
get: function () {
|
|
@@ -17,7 +16,6 @@ Object.keys(_Client).forEach(function (key) {
|
|
|
17
16
|
var _types = require("./types.cjs");
|
|
18
17
|
Object.keys(_types).forEach(function (key) {
|
|
19
18
|
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _types[key]) return;
|
|
21
19
|
Object.defineProperty(exports, key, {
|
|
22
20
|
enumerable: true,
|
|
23
21
|
get: function () {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { UploadedImage } from '@prezly/uploads';
|
|
2
|
-
import type { Contact } from '../../types';
|
|
2
|
+
import type { Contact, NewsroomSubscription, Pagination, SortOrder } from '../../types';
|
|
3
3
|
export interface CreateRequest {
|
|
4
4
|
email_address: string;
|
|
5
5
|
locale?: string;
|
|
@@ -54,3 +54,17 @@ export interface CreateRequest {
|
|
|
54
54
|
};
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
+
export interface ListOptions {
|
|
58
|
+
limit?: number;
|
|
59
|
+
offset?: number;
|
|
60
|
+
/**
|
|
61
|
+
* Text search keyword.
|
|
62
|
+
*/
|
|
63
|
+
search?: string;
|
|
64
|
+
sortOrder?: SortOrder | string;
|
|
65
|
+
}
|
|
66
|
+
export interface ListResponse {
|
|
67
|
+
subscriptions: NewsroomSubscription[];
|
|
68
|
+
pagination: Pagination;
|
|
69
|
+
sort: string;
|
|
70
|
+
}
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
var _Client = require("./Client.cjs");
|
|
7
7
|
Object.keys(_Client).forEach(function (key) {
|
|
8
8
|
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _Client[key]) return;
|
|
10
9
|
Object.defineProperty(exports, key, {
|
|
11
10
|
enumerable: true,
|
|
12
11
|
get: function () {
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
var _Client = require("./Client.cjs");
|
|
7
7
|
Object.keys(_Client).forEach(function (key) {
|
|
8
8
|
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _Client[key]) return;
|
|
10
9
|
Object.defineProperty(exports, key, {
|
|
11
10
|
enumerable: true,
|
|
12
11
|
get: function () {
|
|
@@ -17,7 +16,6 @@ Object.keys(_Client).forEach(function (key) {
|
|
|
17
16
|
var _types = require("./types.cjs");
|
|
18
17
|
Object.keys(_types).forEach(function (key) {
|
|
19
18
|
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _types[key]) return;
|
|
21
19
|
Object.defineProperty(exports, key, {
|
|
22
20
|
enumerable: true,
|
|
23
21
|
get: function () {
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
var _Client = require("./Client.cjs");
|
|
7
7
|
Object.keys(_Client).forEach(function (key) {
|
|
8
8
|
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _Client[key]) return;
|
|
10
9
|
Object.defineProperty(exports, key, {
|
|
11
10
|
enumerable: true,
|
|
12
11
|
get: function () {
|
|
@@ -17,7 +16,6 @@ Object.keys(_Client).forEach(function (key) {
|
|
|
17
16
|
var _types = require("./types.cjs");
|
|
18
17
|
Object.keys(_types).forEach(function (key) {
|
|
19
18
|
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _types[key]) return;
|
|
21
19
|
Object.defineProperty(exports, key, {
|
|
22
20
|
enumerable: true,
|
|
23
21
|
get: function () {
|
|
@@ -102,6 +102,7 @@ export interface UpdateRequest {
|
|
|
102
102
|
* "subscription_form" feature flag
|
|
103
103
|
*/
|
|
104
104
|
is_subscription_form_enabled?: boolean;
|
|
105
|
+
auto_create_contacts_from_subscribers?: boolean;
|
|
105
106
|
status?: Newsroom.Status.ACTIVE | Newsroom.Status.INACTIVE;
|
|
106
107
|
is_plausible_enabled?: boolean;
|
|
107
108
|
is_white_labeled?: boolean;
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
var _Client = require("./Client.cjs");
|
|
7
7
|
Object.keys(_Client).forEach(function (key) {
|
|
8
8
|
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _Client[key]) return;
|
|
10
9
|
Object.defineProperty(exports, key, {
|
|
11
10
|
enumerable: true,
|
|
12
11
|
get: function () {
|
|
@@ -17,7 +16,6 @@ Object.keys(_Client).forEach(function (key) {
|
|
|
17
16
|
var _types = require("./types.cjs");
|
|
18
17
|
Object.keys(_types).forEach(function (key) {
|
|
19
18
|
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _types[key]) return;
|
|
21
19
|
Object.defineProperty(exports, key, {
|
|
22
20
|
enumerable: true,
|
|
23
21
|
get: function () {
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
var _Client = require("./Client.cjs");
|
|
7
7
|
Object.keys(_Client).forEach(function (key) {
|
|
8
8
|
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _Client[key]) return;
|
|
10
9
|
Object.defineProperty(exports, key, {
|
|
11
10
|
enumerable: true,
|
|
12
11
|
get: function () {
|
|
@@ -17,7 +16,6 @@ Object.keys(_Client).forEach(function (key) {
|
|
|
17
16
|
var _types = require("./types.cjs");
|
|
18
17
|
Object.keys(_types).forEach(function (key) {
|
|
19
18
|
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _types[key]) return;
|
|
21
19
|
Object.defineProperty(exports, key, {
|
|
22
20
|
enumerable: true,
|
|
23
21
|
get: function () {
|
|
@@ -3,13 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
let TableId
|
|
6
|
+
exports.AddOnId = exports.LimitId = exports.OptionId = exports.TableId = void 0;
|
|
7
|
+
let TableId;
|
|
8
|
+
exports.TableId = TableId;
|
|
9
|
+
(function (TableId) {
|
|
8
10
|
TableId["STANDARD"] = "standard";
|
|
9
11
|
TableId["AGENCY"] = "agency";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
})(TableId || (exports.TableId = TableId = {}));
|
|
13
|
+
let OptionId;
|
|
14
|
+
exports.OptionId = OptionId;
|
|
15
|
+
(function (OptionId) {
|
|
13
16
|
OptionId["STARTER"] = "starter";
|
|
14
17
|
OptionId["CORE"] = "core";
|
|
15
18
|
OptionId["PREMIUM"] = "premium";
|
|
@@ -18,18 +21,19 @@ let OptionId = exports.OptionId = /*#__PURE__*/function (OptionId) {
|
|
|
18
21
|
OptionId["AGENCY_MEDIUM"] = "agency_medium";
|
|
19
22
|
OptionId["AGENCY_LARGE"] = "agency_large";
|
|
20
23
|
OptionId["AGENCY_HUGE"] = "agency_huge";
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
})(OptionId || (exports.OptionId = OptionId = {}));
|
|
25
|
+
let LimitId;
|
|
26
|
+
exports.LimitId = LimitId;
|
|
27
|
+
(function (LimitId) {
|
|
24
28
|
LimitId["STORIES"] = "stories";
|
|
25
29
|
LimitId["USERS"] = "users";
|
|
26
30
|
LimitId["SITES"] = "sites";
|
|
27
31
|
LimitId["CONTACTS"] = "contacts";
|
|
28
32
|
LimitId["EMAIL_SENDS"] = "email_sends";
|
|
29
33
|
LimitId["CUSTOM_SENDER_ADDRESSES"] = "custom_sender_addresses";
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
34
|
+
})(LimitId || (exports.LimitId = LimitId = {}));
|
|
35
|
+
let AddOnId;
|
|
36
|
+
exports.AddOnId = AddOnId;
|
|
37
|
+
(function (AddOnId) {
|
|
33
38
|
AddOnId["SITE"] = "site";
|
|
34
|
-
|
|
35
|
-
}({});
|
|
39
|
+
})(AddOnId || (exports.AddOnId = AddOnId = {}));
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
export let TableId
|
|
1
|
+
export let TableId;
|
|
2
|
+
(function (TableId) {
|
|
2
3
|
TableId["STANDARD"] = "standard";
|
|
3
4
|
TableId["AGENCY"] = "agency";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
})(TableId || (TableId = {}));
|
|
6
|
+
export let OptionId;
|
|
7
|
+
(function (OptionId) {
|
|
7
8
|
OptionId["STARTER"] = "starter";
|
|
8
9
|
OptionId["CORE"] = "core";
|
|
9
10
|
OptionId["PREMIUM"] = "premium";
|
|
@@ -12,18 +13,17 @@ export let OptionId = /*#__PURE__*/function (OptionId) {
|
|
|
12
13
|
OptionId["AGENCY_MEDIUM"] = "agency_medium";
|
|
13
14
|
OptionId["AGENCY_LARGE"] = "agency_large";
|
|
14
15
|
OptionId["AGENCY_HUGE"] = "agency_huge";
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
})(OptionId || (OptionId = {}));
|
|
17
|
+
export let LimitId;
|
|
18
|
+
(function (LimitId) {
|
|
18
19
|
LimitId["STORIES"] = "stories";
|
|
19
20
|
LimitId["USERS"] = "users";
|
|
20
21
|
LimitId["SITES"] = "sites";
|
|
21
22
|
LimitId["CONTACTS"] = "contacts";
|
|
22
23
|
LimitId["EMAIL_SENDS"] = "email_sends";
|
|
23
24
|
LimitId["CUSTOM_SENDER_ADDRESSES"] = "custom_sender_addresses";
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
})(LimitId || (LimitId = {}));
|
|
26
|
+
export let AddOnId;
|
|
27
|
+
(function (AddOnId) {
|
|
27
28
|
AddOnId["SITE"] = "site";
|
|
28
|
-
|
|
29
|
-
}({});
|
|
29
|
+
})(AddOnId || (AddOnId = {}));
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
var _Client = require("./Client.cjs");
|
|
7
7
|
Object.keys(_Client).forEach(function (key) {
|
|
8
8
|
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _Client[key]) return;
|
|
10
9
|
Object.defineProperty(exports, key, {
|
|
11
10
|
enumerable: true,
|
|
12
11
|
get: function () {
|
|
@@ -17,7 +16,6 @@ Object.keys(_Client).forEach(function (key) {
|
|
|
17
16
|
var _types = require("./types.cjs");
|
|
18
17
|
Object.keys(_types).forEach(function (key) {
|
|
19
18
|
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _types[key]) return;
|
|
21
19
|
Object.defineProperty(exports, key, {
|
|
22
20
|
enumerable: true,
|
|
23
21
|
get: function () {
|