@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.
Files changed (126) hide show
  1. package/dist/api/DeferredJobsApiClient.cjs +1 -0
  2. package/dist/api/DeferredJobsApiClient.js +1 -0
  3. package/dist/api/constants.cjs +3 -2
  4. package/dist/api/constants.js +1 -1
  5. package/dist/endpoints/Accounts/index.cjs +0 -2
  6. package/dist/endpoints/Billing/index.cjs +0 -2
  7. package/dist/endpoints/Billing/types.cjs +9 -7
  8. package/dist/endpoints/Billing/types.js +6 -6
  9. package/dist/endpoints/CampaignRecipients/index.cjs +0 -2
  10. package/dist/endpoints/Campaigns/index.cjs +0 -2
  11. package/dist/endpoints/Contacts/index.cjs +0 -2
  12. package/dist/endpoints/ContactsExports/index.cjs +0 -2
  13. package/dist/endpoints/Coverage/index.cjs +0 -2
  14. package/dist/endpoints/Jobs/index.cjs +0 -2
  15. package/dist/endpoints/Licenses/index.cjs +0 -1
  16. package/dist/endpoints/NewsroomCategories/index.cjs +0 -2
  17. package/dist/endpoints/NewsroomContacts/index.cjs +0 -2
  18. package/dist/endpoints/NewsroomDomains/index.cjs +0 -2
  19. package/dist/endpoints/NewsroomGalleries/index.cjs +0 -2
  20. package/dist/endpoints/NewsroomHub/index.cjs +0 -2
  21. package/dist/endpoints/NewsroomLanguages/index.cjs +0 -2
  22. package/dist/endpoints/NewsroomPrivacyRequests/index.cjs +0 -2
  23. package/dist/endpoints/NewsroomSubscriptions/Client.cjs +17 -0
  24. package/dist/endpoints/NewsroomSubscriptions/Client.d.ts +2 -1
  25. package/dist/endpoints/NewsroomSubscriptions/Client.js +17 -0
  26. package/dist/endpoints/NewsroomSubscriptions/index.cjs +0 -2
  27. package/dist/endpoints/NewsroomSubscriptions/types.d.ts +15 -1
  28. package/dist/endpoints/NewsroomThemes/index.cjs +0 -1
  29. package/dist/endpoints/NewsroomWebhooks/index.cjs +0 -2
  30. package/dist/endpoints/Newsrooms/index.cjs +0 -2
  31. package/dist/endpoints/Newsrooms/types.d.ts +1 -0
  32. package/dist/endpoints/NotificationSubscriptions/index.cjs +0 -2
  33. package/dist/endpoints/PricingTables/index.cjs +0 -2
  34. package/dist/endpoints/PricingTables/types.cjs +17 -13
  35. package/dist/endpoints/PricingTables/types.js +12 -12
  36. package/dist/endpoints/SenderAddresses/index.cjs +0 -2
  37. package/dist/endpoints/Snippets/index.cjs +0 -2
  38. package/dist/endpoints/Stories/Client.cjs +4 -23
  39. package/dist/endpoints/Stories/Client.js +7 -22
  40. package/dist/endpoints/Stories/index.cjs +0 -3
  41. package/dist/endpoints/Stories/scopes.cjs +3 -2
  42. package/dist/endpoints/Stories/types.cjs +4 -14
  43. package/dist/endpoints/Stories/types.js +3 -13
  44. package/dist/endpoints/Subscriptions/index.cjs +0 -2
  45. package/dist/endpoints/Subscriptions/types.cjs +4 -3
  46. package/dist/endpoints/Subscriptions/types.js +3 -3
  47. package/dist/endpoints/index.cjs +3 -3
  48. package/dist/http/constants.cjs +6 -3
  49. package/dist/http/index.cjs +8 -8
  50. package/dist/http/types.cjs +8 -6
  51. package/dist/http/types.js +6 -6
  52. package/dist/index.cjs +4 -7
  53. package/dist/routing.cjs +3 -3
  54. package/dist/routing.d.ts +0 -1
  55. package/dist/routing.js +0 -1
  56. package/dist/types/BillingCycle.cjs +4 -3
  57. package/dist/types/BillingCycle.js +3 -3
  58. package/dist/types/Campaign.cjs +20 -19
  59. package/dist/types/Campaign.js +18 -18
  60. package/dist/types/Category.cjs +2 -1
  61. package/dist/types/Contact.cjs +20 -19
  62. package/dist/types/Contact.js +18 -18
  63. package/dist/types/ContactDuplicateSuggestion.cjs +5 -5
  64. package/dist/types/ContactDuplicateSuggestion.js +4 -3
  65. package/dist/types/ContactsExport.cjs +5 -4
  66. package/dist/types/ContactsExport.js +3 -3
  67. package/dist/types/ContactsScope.cjs +5 -4
  68. package/dist/types/ContactsScope.js +3 -3
  69. package/dist/types/CoverageEntry.cjs +8 -7
  70. package/dist/types/CoverageEntry.js +6 -6
  71. package/dist/types/Culture.cjs +5 -10
  72. package/dist/types/Culture.js +3 -9
  73. package/dist/types/Currency.cjs +4 -3
  74. package/dist/types/Currency.js +3 -3
  75. package/dist/types/EmailRecipient.cjs +5 -4
  76. package/dist/types/EmailRecipient.js +3 -3
  77. package/dist/types/EmailSubscription.d.ts +1 -0
  78. package/dist/types/JobState.cjs +4 -3
  79. package/dist/types/JobState.js +3 -3
  80. package/dist/types/License.cjs +11 -10
  81. package/dist/types/License.js +9 -9
  82. package/dist/types/Newsroom.cjs +11 -13
  83. package/dist/types/Newsroom.d.ts +1 -0
  84. package/dist/types/Newsroom.js +9 -12
  85. package/dist/types/NewsroomDomain.cjs +8 -7
  86. package/dist/types/NewsroomDomain.js +6 -6
  87. package/dist/types/NewsroomGallery.cjs +8 -7
  88. package/dist/types/NewsroomGallery.js +6 -6
  89. package/dist/types/NewsroomSubscription.cjs +1 -0
  90. package/dist/types/NewsroomSubscription.d.ts +8 -0
  91. package/dist/types/NewsroomSubscription.js +1 -0
  92. package/dist/types/NewsroomTheme.cjs +11 -8
  93. package/dist/types/NewsroomTheme.js +8 -7
  94. package/dist/types/NewsroomWebhook.cjs +5 -4
  95. package/dist/types/NewsroomWebhook.js +3 -3
  96. package/dist/types/NotificationSubscription.cjs +5 -4
  97. package/dist/types/NotificationSubscription.js +3 -3
  98. package/dist/types/Permissions.cjs +4 -3
  99. package/dist/types/Permissions.js +3 -3
  100. package/dist/types/Plan.cjs +8 -7
  101. package/dist/types/Plan.js +8 -8
  102. package/dist/types/PrivacyRequest.cjs +8 -7
  103. package/dist/types/PrivacyRequest.js +6 -6
  104. package/dist/types/SenderAddress.cjs +5 -4
  105. package/dist/types/SenderAddress.js +3 -3
  106. package/dist/types/SenderDomain.cjs +5 -4
  107. package/dist/types/SenderDomain.js +3 -3
  108. package/dist/types/SortOrder.cjs +5 -4
  109. package/dist/types/SortOrder.js +3 -3
  110. package/dist/types/Story.cjs +18 -29
  111. package/dist/types/Story.js +16 -28
  112. package/dist/types/User.cjs +8 -7
  113. package/dist/types/User.js +6 -6
  114. package/dist/types/common/Notification.cjs +5 -4
  115. package/dist/types/common/Notification.js +3 -3
  116. package/dist/types/common/OEmbedInfo.cjs +5 -4
  117. package/dist/types/common/OEmbedInfo.js +3 -3
  118. package/dist/types/common/Pagination.cjs +4 -4
  119. package/dist/types/common/Pagination.js +3 -3
  120. package/dist/types/common/Query.cjs +2 -1
  121. package/dist/types/common/Query.js +1 -0
  122. package/dist/types/common/index.cjs +0 -6
  123. package/dist/types/index.cjs +10 -36
  124. package/dist/types/index.d.ts +1 -0
  125. package/dist/types/index.js +1 -0
  126. package/package.json +1 -1
@@ -37,6 +37,7 @@ async function handleDeferredJob(http, request) {
37
37
  } while (true); // eslint-disable-line no-constant-condition
38
38
  });
39
39
  }
40
+
40
41
  return _progressPromise.ProgressPromise.resolve(response.payload);
41
42
  }
42
43
  class DeferredJobsApiClient {
@@ -31,6 +31,7 @@ async function handleDeferredJob(http, request) {
31
31
  } while (true); // eslint-disable-line no-constant-condition
32
32
  });
33
33
  }
34
+
34
35
  return ProgressPromise.resolve(response.payload);
35
36
  }
36
37
  export class DeferredJobsApiClient {
@@ -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.4.2";
7
+ const VERSION = "19.5.0";
8
8
  const URL = 'https://github.com/prezly/javascript-sdk';
9
- const DEFAULT_USER_AGENT = exports.DEFAULT_USER_AGENT = `prezly-javascript-sdk/${VERSION} (+${URL})`;
9
+ const DEFAULT_USER_AGENT = `prezly-javascript-sdk/${VERSION} (+${URL})`;
10
+ exports.DEFAULT_USER_AGENT = DEFAULT_USER_AGENT;
@@ -1,3 +1,3 @@
1
- const VERSION = "19.4.2";
1
+ const VERSION = "19.5.0";
2
2
  const URL = 'https://github.com/prezly/javascript-sdk';
3
3
  export const DEFAULT_USER_AGENT = `prezly-javascript-sdk/${VERSION} (+${URL})`;
@@ -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.SignupPlan = exports.SignupCurrency = void 0;
7
- let SignupPlan = exports.SignupPlan = /*#__PURE__*/function (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
- return SignupPlan;
12
- }({});
13
- let SignupCurrency = exports.SignupCurrency = /*#__PURE__*/function (SignupCurrency) {
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
- return SignupCurrency;
17
- }({});
19
+ })(SignupCurrency || (exports.SignupCurrency = SignupCurrency = {}));
@@ -1,11 +1,11 @@
1
- export let SignupPlan = /*#__PURE__*/function (SignupPlan) {
1
+ export let SignupPlan;
2
+ (function (SignupPlan) {
2
3
  SignupPlan["STARTER"] = "starter";
3
4
  SignupPlan["CORE"] = "core";
4
5
  SignupPlan["PREMIUM"] = "premium";
5
- return SignupPlan;
6
- }({});
7
- export let SignupCurrency = /*#__PURE__*/function (SignupCurrency) {
6
+ })(SignupPlan || (SignupPlan = {}));
7
+ export let SignupCurrency;
8
+ (function (SignupCurrency) {
8
9
  SignupCurrency["EUR"] = "eur";
9
10
  SignupCurrency["USD"] = "usd";
10
- return SignupCurrency;
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.TableId = exports.OptionId = exports.LimitId = exports.AddOnId = void 0;
7
- let TableId = exports.TableId = /*#__PURE__*/function (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
- return TableId;
11
- }({});
12
- let OptionId = exports.OptionId = /*#__PURE__*/function (OptionId) {
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
- return OptionId;
22
- }({});
23
- let LimitId = exports.LimitId = /*#__PURE__*/function (LimitId) {
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
- return LimitId;
31
- }({});
32
- let AddOnId = exports.AddOnId = /*#__PURE__*/function (AddOnId) {
34
+ })(LimitId || (exports.LimitId = LimitId = {}));
35
+ let AddOnId;
36
+ exports.AddOnId = AddOnId;
37
+ (function (AddOnId) {
33
38
  AddOnId["SITE"] = "site";
34
- return AddOnId;
35
- }({});
39
+ })(AddOnId || (exports.AddOnId = AddOnId = {}));
@@ -1,9 +1,10 @@
1
- export let TableId = /*#__PURE__*/function (TableId) {
1
+ export let TableId;
2
+ (function (TableId) {
2
3
  TableId["STANDARD"] = "standard";
3
4
  TableId["AGENCY"] = "agency";
4
- return TableId;
5
- }({});
6
- export let OptionId = /*#__PURE__*/function (OptionId) {
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
- return OptionId;
16
- }({});
17
- export let LimitId = /*#__PURE__*/function (LimitId) {
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
- return LimitId;
25
- }({});
26
- export let AddOnId = /*#__PURE__*/function (AddOnId) {
25
+ })(LimitId || (LimitId = {}));
26
+ export let AddOnId;
27
+ (function (AddOnId) {
27
28
  AddOnId["SITE"] = "site";
28
- return AddOnId;
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 () {