@prezly/sdk 19.7.1 → 19.8.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 (117) hide show
  1. package/dist/Client.cjs +0 -1
  2. package/dist/Client.d.ts +1 -2
  3. package/dist/Client.js +1 -2
  4. package/dist/api/DeferredJobsApiClient.cjs +1 -0
  5. package/dist/api/DeferredJobsApiClient.js +1 -0
  6. package/dist/api/constants.cjs +2 -1
  7. package/dist/endpoints/Accounts/index.cjs +0 -2
  8. package/dist/endpoints/Billing/index.cjs +0 -2
  9. package/dist/endpoints/Billing/types.cjs +9 -7
  10. package/dist/endpoints/Billing/types.js +6 -6
  11. package/dist/endpoints/CampaignRecipients/index.cjs +0 -2
  12. package/dist/endpoints/Campaigns/index.cjs +0 -2
  13. package/dist/endpoints/Contacts/index.cjs +0 -2
  14. package/dist/endpoints/ContactsExports/index.cjs +0 -2
  15. package/dist/endpoints/Coverage/index.cjs +0 -2
  16. package/dist/endpoints/Jobs/index.cjs +0 -2
  17. package/dist/endpoints/Licenses/index.cjs +0 -1
  18. package/dist/endpoints/NewsroomCategories/index.cjs +0 -2
  19. package/dist/endpoints/NewsroomContacts/index.cjs +0 -2
  20. package/dist/endpoints/NewsroomDomains/index.cjs +0 -2
  21. package/dist/endpoints/NewsroomGalleries/index.cjs +0 -2
  22. package/dist/endpoints/NewsroomHub/index.cjs +0 -2
  23. package/dist/endpoints/NewsroomLanguages/index.cjs +0 -2
  24. package/dist/endpoints/NewsroomPrivacyRequests/index.cjs +0 -2
  25. package/dist/endpoints/NewsroomSubscriptions/Client.cjs +3 -4
  26. package/dist/endpoints/NewsroomSubscriptions/Client.d.ts +3 -3
  27. package/dist/endpoints/NewsroomSubscriptions/Client.js +3 -4
  28. package/dist/endpoints/NewsroomSubscriptions/index.cjs +0 -2
  29. package/dist/endpoints/NewsroomThemes/index.cjs +0 -1
  30. package/dist/endpoints/NewsroomWebhooks/index.cjs +0 -2
  31. package/dist/endpoints/Newsrooms/index.cjs +0 -2
  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 -2
  54. package/dist/types/BillingCycle.cjs +4 -3
  55. package/dist/types/BillingCycle.js +3 -3
  56. package/dist/types/Campaign.cjs +20 -19
  57. package/dist/types/Campaign.js +18 -18
  58. package/dist/types/Category.cjs +2 -1
  59. package/dist/types/Contact.cjs +20 -19
  60. package/dist/types/Contact.js +18 -18
  61. package/dist/types/ContactDuplicateSuggestion.cjs +5 -5
  62. package/dist/types/ContactDuplicateSuggestion.js +4 -3
  63. package/dist/types/ContactsExport.cjs +5 -4
  64. package/dist/types/ContactsExport.js +3 -3
  65. package/dist/types/ContactsScope.cjs +5 -4
  66. package/dist/types/ContactsScope.js +3 -3
  67. package/dist/types/CoverageEntry.cjs +8 -7
  68. package/dist/types/CoverageEntry.js +6 -6
  69. package/dist/types/Culture.cjs +5 -10
  70. package/dist/types/Culture.js +3 -9
  71. package/dist/types/Currency.cjs +4 -3
  72. package/dist/types/Currency.js +3 -3
  73. package/dist/types/EmailRecipient.cjs +5 -4
  74. package/dist/types/EmailRecipient.js +3 -3
  75. package/dist/types/JobState.cjs +4 -3
  76. package/dist/types/JobState.js +3 -3
  77. package/dist/types/License.cjs +11 -10
  78. package/dist/types/License.js +9 -9
  79. package/dist/types/Newsroom.cjs +14 -16
  80. package/dist/types/Newsroom.js +12 -15
  81. package/dist/types/NewsroomDomain.cjs +8 -7
  82. package/dist/types/NewsroomDomain.js +6 -6
  83. package/dist/types/NewsroomGallery.cjs +8 -7
  84. package/dist/types/NewsroomGallery.js +6 -6
  85. package/dist/types/NewsroomTheme.cjs +11 -8
  86. package/dist/types/NewsroomTheme.js +8 -7
  87. package/dist/types/NewsroomWebhook.cjs +5 -4
  88. package/dist/types/NewsroomWebhook.js +3 -3
  89. package/dist/types/NotificationSubscription.cjs +5 -4
  90. package/dist/types/NotificationSubscription.js +3 -3
  91. package/dist/types/Permissions.cjs +4 -3
  92. package/dist/types/Permissions.js +3 -3
  93. package/dist/types/Plan.cjs +8 -7
  94. package/dist/types/Plan.js +8 -8
  95. package/dist/types/PrivacyRequest.cjs +8 -7
  96. package/dist/types/PrivacyRequest.js +6 -6
  97. package/dist/types/SenderAddress.cjs +5 -4
  98. package/dist/types/SenderAddress.js +3 -3
  99. package/dist/types/SenderDomain.cjs +5 -4
  100. package/dist/types/SenderDomain.js +3 -3
  101. package/dist/types/SortOrder.cjs +5 -4
  102. package/dist/types/SortOrder.js +3 -3
  103. package/dist/types/Story.cjs +18 -29
  104. package/dist/types/Story.js +16 -28
  105. package/dist/types/User.cjs +8 -7
  106. package/dist/types/User.js +6 -6
  107. package/dist/types/common/Notification.cjs +5 -4
  108. package/dist/types/common/Notification.js +3 -3
  109. package/dist/types/common/OEmbedInfo.cjs +5 -4
  110. package/dist/types/common/OEmbedInfo.js +3 -3
  111. package/dist/types/common/Pagination.cjs +4 -4
  112. package/dist/types/common/Pagination.js +3 -3
  113. package/dist/types/common/Query.cjs +2 -1
  114. package/dist/types/common/Query.js +1 -0
  115. package/dist/types/common/index.cjs +0 -6
  116. package/dist/types/index.cjs +0 -37
  117. package/package.json +1 -1
package/dist/Client.cjs CHANGED
@@ -43,7 +43,6 @@ function createClient({
43
43
  newsroomDomains: new _index2.NewsroomDomains.Client(apiClient),
44
44
  newsroomGalleries: new _index2.NewsroomGalleries.Client(apiClient),
45
45
  newsroomHub: new _index2.NewsroomHub.Client(apiClient),
46
- newsroomSubscriptions: new _index2.NewsroomSubscriptions.Client(apiClient),
47
46
  pricingTables: new _index2.PricingTables.Client(apiClient),
48
47
  senderAddresses: new _index2.SenderAddresses.Client(apiClient),
49
48
  stories: new _index2.Stories.Client(apiClient),
package/dist/Client.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { DeferredJobsApiClient, type Fetch } from './api';
2
2
  import { Contacts } from './endpoints';
3
- import { Accounts, Billing, NewsroomSubscriptions, Campaigns, CampaignRecipients, ContactsExports, Coverage, Jobs, Licenses, Newsrooms, NewsroomCategories, NewsroomContacts, NewsroomLanguages, NewsroomThemes, NewsroomWebhooks, NewsroomPrivacyRequests, NewsroomDomains, NewsroomGalleries, NewsroomHub, PricingTables, SenderAddresses, Stories, Snippets, Subscriptions, NotificationSubscriptions } from './endpoints';
3
+ import { Accounts, Billing, Campaigns, CampaignRecipients, ContactsExports, Coverage, Jobs, Licenses, Newsrooms, NewsroomCategories, NewsroomContacts, NewsroomLanguages, NewsroomThemes, NewsroomWebhooks, NewsroomPrivacyRequests, NewsroomDomains, NewsroomGalleries, NewsroomHub, PricingTables, SenderAddresses, Stories, Snippets, Subscriptions, NotificationSubscriptions } from './endpoints';
4
4
  import type { HeadersMap } from './http';
5
5
  export interface ClientOptions {
6
6
  accessToken: string;
@@ -29,7 +29,6 @@ export interface Client {
29
29
  newsroomDomains: NewsroomDomains.Client;
30
30
  newsroomGalleries: NewsroomGalleries.Client;
31
31
  newsroomHub: NewsroomHub.Client;
32
- newsroomSubscriptions: NewsroomSubscriptions.Client;
33
32
  pricingTables: PricingTables.Client;
34
33
  senderAddresses: SenderAddresses.Client;
35
34
  stories: Stories.Client;
package/dist/Client.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { ApiClient, DeferredJobsApiClient } from "./api/index.js";
2
2
  import { Contacts } from "./endpoints/index.js";
3
- import { Accounts, Billing, NewsroomSubscriptions, Campaigns, CampaignRecipients, ContactsExports, Coverage, Jobs, Licenses, Newsrooms, NewsroomCategories, NewsroomContacts, NewsroomLanguages, NewsroomThemes, NewsroomWebhooks, NewsroomPrivacyRequests, NewsroomDomains, NewsroomGalleries, NewsroomHub, PricingTables, SenderAddresses, Stories, Snippets, Subscriptions, NotificationSubscriptions } from "./endpoints/index.js";
3
+ import { Accounts, Billing, Campaigns, CampaignRecipients, ContactsExports, Coverage, Jobs, Licenses, Newsrooms, NewsroomCategories, NewsroomContacts, NewsroomLanguages, NewsroomThemes, NewsroomWebhooks, NewsroomPrivacyRequests, NewsroomDomains, NewsroomGalleries, NewsroomHub, PricingTables, SenderAddresses, Stories, Snippets, Subscriptions, NotificationSubscriptions } from "./endpoints/index.js";
4
4
  import { createHttpClient } from "./http/index.js";
5
5
  const DEFAULT_BASE_URL = 'https://api.prezly.com';
6
6
  export function createClient({
@@ -38,7 +38,6 @@ export function createClient({
38
38
  newsroomDomains: new NewsroomDomains.Client(apiClient),
39
39
  newsroomGalleries: new NewsroomGalleries.Client(apiClient),
40
40
  newsroomHub: new NewsroomHub.Client(apiClient),
41
- newsroomSubscriptions: new NewsroomSubscriptions.Client(apiClient),
42
41
  pricingTables: new PricingTables.Client(apiClient),
43
42
  senderAddresses: new SenderAddresses.Client(apiClient),
44
43
  stories: new Stories.Client(apiClient),
@@ -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 {
@@ -6,4 +6,5 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.DEFAULT_USER_AGENT = void 0;
7
7
  const VERSION = "19.7.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;
@@ -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 () {
@@ -6,14 +6,13 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.Client = void 0;
7
7
  var _routing = require("../../routing.cjs");
8
8
  var _index = require("../../types/index.cjs");
9
+ /**
10
+ * @deprecated Use Subscriptions instead
11
+ */
9
12
  class Client {
10
13
  constructor(apiClient) {
11
14
  this.apiClient = apiClient;
12
15
  }
13
-
14
- /**
15
- * @deprecated Use `subscribeToNewsroom` from `Subscriptions` instead
16
- */
17
16
  async subscribe(newsroomId, payload) {
18
17
  const url = _routing.routing.newsroomSubscriptionsUrl.replace(':newsroom_id', String(newsroomId));
19
18
  return this.apiClient.post(url, {
@@ -2,12 +2,12 @@ import type { DeferredJobsApiClient } from '../../api';
2
2
  import type { Newsroom } from '../../types';
3
3
  import type { CreateRequest, ListOptions, ListResponse } from './types';
4
4
  type NewsroomId = Newsroom['uuid'] | Newsroom['id'];
5
+ /**
6
+ * @deprecated Use Subscriptions instead
7
+ */
5
8
  export declare class Client {
6
9
  private readonly apiClient;
7
10
  constructor(apiClient: DeferredJobsApiClient);
8
- /**
9
- * @deprecated Use `subscribeToNewsroom` from `Subscriptions` instead
10
- */
11
11
  subscribe(newsroomId: NewsroomId, payload: CreateRequest): Promise<void>;
12
12
  list(newsroomId: NewsroomId, { limit, offset, search, sortOrder }?: ListOptions): Promise<ListResponse>;
13
13
  }
@@ -1,13 +1,12 @@
1
1
  import { routing } from "../../routing.js";
2
2
  import { SortOrder } from "../../types/index.js";
3
+ /**
4
+ * @deprecated Use Subscriptions instead
5
+ */
3
6
  export class Client {
4
7
  constructor(apiClient) {
5
8
  this.apiClient = apiClient;
6
9
  }
7
-
8
- /**
9
- * @deprecated Use `subscribeToNewsroom` from `Subscriptions` instead
10
- */
11
10
  async subscribe(newsroomId, payload) {
12
11
  const url = routing.newsroomSubscriptionsUrl.replace(':newsroom_id', String(newsroomId));
13
12
  return this.apiClient.post(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 () {
@@ -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 () {
@@ -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 () {