@prezly/sdk 19.8.0 → 19.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/dist/Client.cjs +1 -0
  2. package/dist/Client.d.ts +2 -1
  3. package/dist/Client.js +2 -1
  4. package/dist/api/DeferredJobsApiClient.cjs +0 -1
  5. package/dist/api/DeferredJobsApiClient.js +0 -1
  6. package/dist/api/constants.cjs +2 -3
  7. package/dist/api/constants.js +1 -1
  8. package/dist/endpoints/Accounts/index.cjs +2 -0
  9. package/dist/endpoints/Billing/index.cjs +2 -0
  10. package/dist/endpoints/Billing/types.cjs +7 -9
  11. package/dist/endpoints/Billing/types.js +6 -6
  12. package/dist/endpoints/CampaignRecipients/index.cjs +2 -0
  13. package/dist/endpoints/Campaigns/index.cjs +2 -0
  14. package/dist/endpoints/Contacts/index.cjs +2 -0
  15. package/dist/endpoints/Contacts/types.d.ts +5 -0
  16. package/dist/endpoints/ContactsExports/index.cjs +2 -0
  17. package/dist/endpoints/Coverage/index.cjs +2 -0
  18. package/dist/endpoints/Jobs/index.cjs +2 -0
  19. package/dist/endpoints/Licenses/index.cjs +1 -0
  20. package/dist/endpoints/NewsroomCategories/index.cjs +2 -0
  21. package/dist/endpoints/NewsroomContacts/index.cjs +2 -0
  22. package/dist/endpoints/NewsroomDomains/index.cjs +2 -0
  23. package/dist/endpoints/NewsroomGalleries/index.cjs +2 -0
  24. package/dist/endpoints/NewsroomHub/index.cjs +2 -0
  25. package/dist/endpoints/NewsroomLanguages/index.cjs +2 -0
  26. package/dist/endpoints/NewsroomPrivacyRequests/index.cjs +2 -0
  27. package/dist/endpoints/NewsroomSubscriptions/Client.cjs +4 -3
  28. package/dist/endpoints/NewsroomSubscriptions/Client.d.ts +3 -3
  29. package/dist/endpoints/NewsroomSubscriptions/Client.js +4 -3
  30. package/dist/endpoints/NewsroomSubscriptions/index.cjs +2 -0
  31. package/dist/endpoints/NewsroomThemes/index.cjs +1 -0
  32. package/dist/endpoints/NewsroomWebhooks/index.cjs +2 -0
  33. package/dist/endpoints/Newsrooms/index.cjs +2 -0
  34. package/dist/endpoints/NotificationSubscriptions/index.cjs +2 -0
  35. package/dist/endpoints/PricingTables/index.cjs +2 -0
  36. package/dist/endpoints/PricingTables/types.cjs +13 -17
  37. package/dist/endpoints/PricingTables/types.js +12 -12
  38. package/dist/endpoints/SenderAddresses/index.cjs +2 -0
  39. package/dist/endpoints/Snippets/index.cjs +2 -0
  40. package/dist/endpoints/Stories/Client.cjs +23 -4
  41. package/dist/endpoints/Stories/Client.js +22 -7
  42. package/dist/endpoints/Stories/index.cjs +3 -0
  43. package/dist/endpoints/Stories/scopes.cjs +2 -3
  44. package/dist/endpoints/Stories/types.cjs +14 -4
  45. package/dist/endpoints/Stories/types.js +13 -3
  46. package/dist/endpoints/Subscriptions/index.cjs +2 -0
  47. package/dist/endpoints/Subscriptions/types.cjs +3 -4
  48. package/dist/endpoints/Subscriptions/types.js +3 -3
  49. package/dist/endpoints/index.cjs +3 -3
  50. package/dist/http/constants.cjs +3 -6
  51. package/dist/http/index.cjs +8 -8
  52. package/dist/http/types.cjs +6 -8
  53. package/dist/http/types.js +6 -6
  54. package/dist/index.cjs +7 -4
  55. package/dist/routing.cjs +2 -3
  56. package/dist/types/BillingCycle.cjs +3 -4
  57. package/dist/types/BillingCycle.js +3 -3
  58. package/dist/types/Campaign.cjs +19 -20
  59. package/dist/types/Campaign.js +18 -18
  60. package/dist/types/Category.cjs +1 -2
  61. package/dist/types/Contact.cjs +19 -20
  62. package/dist/types/Contact.js +18 -18
  63. package/dist/types/ContactDuplicateSuggestion.cjs +5 -5
  64. package/dist/types/ContactDuplicateSuggestion.js +3 -4
  65. package/dist/types/ContactsExport.cjs +4 -5
  66. package/dist/types/ContactsExport.js +3 -3
  67. package/dist/types/ContactsScope.cjs +4 -5
  68. package/dist/types/ContactsScope.js +3 -3
  69. package/dist/types/CoverageEntry.cjs +7 -8
  70. package/dist/types/CoverageEntry.js +6 -6
  71. package/dist/types/Culture.cjs +10 -5
  72. package/dist/types/Culture.js +9 -3
  73. package/dist/types/Currency.cjs +3 -4
  74. package/dist/types/Currency.js +3 -3
  75. package/dist/types/EmailRecipient.cjs +4 -5
  76. package/dist/types/EmailRecipient.js +3 -3
  77. package/dist/types/EmailSubscription.d.ts +5 -1
  78. package/dist/types/JobState.cjs +3 -4
  79. package/dist/types/JobState.js +3 -3
  80. package/dist/types/License.cjs +10 -11
  81. package/dist/types/License.js +9 -9
  82. package/dist/types/Newsroom.cjs +16 -14
  83. package/dist/types/Newsroom.js +15 -12
  84. package/dist/types/NewsroomDomain.cjs +7 -8
  85. package/dist/types/NewsroomDomain.js +6 -6
  86. package/dist/types/NewsroomGallery.cjs +7 -8
  87. package/dist/types/NewsroomGallery.js +6 -6
  88. package/dist/types/NewsroomTheme.cjs +8 -11
  89. package/dist/types/NewsroomTheme.js +7 -8
  90. package/dist/types/NewsroomWebhook.cjs +4 -5
  91. package/dist/types/NewsroomWebhook.js +3 -3
  92. package/dist/types/NotificationSubscription.cjs +4 -5
  93. package/dist/types/NotificationSubscription.js +3 -3
  94. package/dist/types/Permissions.cjs +3 -4
  95. package/dist/types/Permissions.js +3 -3
  96. package/dist/types/Plan.cjs +7 -8
  97. package/dist/types/Plan.js +8 -8
  98. package/dist/types/PrivacyRequest.cjs +7 -8
  99. package/dist/types/PrivacyRequest.js +6 -6
  100. package/dist/types/SenderAddress.cjs +4 -5
  101. package/dist/types/SenderAddress.js +3 -3
  102. package/dist/types/SenderDomain.cjs +4 -5
  103. package/dist/types/SenderDomain.js +3 -3
  104. package/dist/types/SortOrder.cjs +4 -5
  105. package/dist/types/SortOrder.js +3 -3
  106. package/dist/types/Story.cjs +29 -18
  107. package/dist/types/Story.js +28 -16
  108. package/dist/types/User.cjs +7 -8
  109. package/dist/types/User.js +6 -6
  110. package/dist/types/common/Notification.cjs +4 -5
  111. package/dist/types/common/Notification.js +3 -3
  112. package/dist/types/common/OEmbedInfo.cjs +4 -5
  113. package/dist/types/common/OEmbedInfo.js +3 -3
  114. package/dist/types/common/Pagination.cjs +4 -4
  115. package/dist/types/common/Pagination.js +3 -3
  116. package/dist/types/common/Query.cjs +1 -2
  117. package/dist/types/common/Query.js +0 -1
  118. package/dist/types/common/index.cjs +6 -0
  119. package/dist/types/index.cjs +37 -0
  120. package/package.json +1 -1
package/dist/Client.cjs CHANGED
@@ -43,6 +43,7 @@ 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),
46
47
  pricingTables: new _index2.PricingTables.Client(apiClient),
47
48
  senderAddresses: new _index2.SenderAddresses.Client(apiClient),
48
49
  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, 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, 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';
4
4
  import type { HeadersMap } from './http';
5
5
  export interface ClientOptions {
6
6
  accessToken: string;
@@ -29,6 +29,7 @@ export interface Client {
29
29
  newsroomDomains: NewsroomDomains.Client;
30
30
  newsroomGalleries: NewsroomGalleries.Client;
31
31
  newsroomHub: NewsroomHub.Client;
32
+ newsroomSubscriptions: NewsroomSubscriptions.Client;
32
33
  pricingTables: PricingTables.Client;
33
34
  senderAddresses: SenderAddresses.Client;
34
35
  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, 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, 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";
4
4
  import { createHttpClient } from "./http/index.js";
5
5
  const DEFAULT_BASE_URL = 'https://api.prezly.com';
6
6
  export function createClient({
@@ -38,6 +38,7 @@ 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),
41
42
  pricingTables: new PricingTables.Client(apiClient),
42
43
  senderAddresses: new SenderAddresses.Client(apiClient),
43
44
  stories: new Stories.Client(apiClient),
@@ -37,7 +37,6 @@ async function handleDeferredJob(http, request) {
37
37
  } while (true); // eslint-disable-line no-constant-condition
38
38
  });
39
39
  }
40
-
41
40
  return _progressPromise.ProgressPromise.resolve(response.payload);
42
41
  }
43
42
  class DeferredJobsApiClient {
@@ -31,7 +31,6 @@ async function handleDeferredJob(http, request) {
31
31
  } while (true); // eslint-disable-line no-constant-condition
32
32
  });
33
33
  }
34
-
35
34
  return ProgressPromise.resolve(response.payload);
36
35
  }
37
36
  export class DeferredJobsApiClient {
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.DEFAULT_USER_AGENT = void 0;
7
- const VERSION = "19.7.0";
7
+ const VERSION = "19.7.1";
8
8
  const URL = 'https://github.com/prezly/javascript-sdk';
9
- const DEFAULT_USER_AGENT = `prezly-javascript-sdk/${VERSION} (+${URL})`;
10
- exports.DEFAULT_USER_AGENT = DEFAULT_USER_AGENT;
9
+ const DEFAULT_USER_AGENT = exports.DEFAULT_USER_AGENT = `prezly-javascript-sdk/${VERSION} (+${URL})`;
@@ -1,3 +1,3 @@
1
- const VERSION = "19.7.0";
1
+ const VERSION = "19.7.1";
2
2
  const URL = 'https://github.com/prezly/javascript-sdk';
3
3
  export const DEFAULT_USER_AGENT = `prezly-javascript-sdk/${VERSION} (+${URL})`;
@@ -6,6 +6,7 @@ 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;
9
10
  Object.defineProperty(exports, key, {
10
11
  enumerable: true,
11
12
  get: function () {
@@ -16,6 +17,7 @@ Object.keys(_Client).forEach(function (key) {
16
17
  var _types = require("./types.cjs");
17
18
  Object.keys(_types).forEach(function (key) {
18
19
  if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _types[key]) return;
19
21
  Object.defineProperty(exports, key, {
20
22
  enumerable: true,
21
23
  get: function () {
@@ -6,6 +6,7 @@ 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;
9
10
  Object.defineProperty(exports, key, {
10
11
  enumerable: true,
11
12
  get: function () {
@@ -16,6 +17,7 @@ Object.keys(_Client).forEach(function (key) {
16
17
  var _types = require("./types.cjs");
17
18
  Object.keys(_types).forEach(function (key) {
18
19
  if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _types[key]) return;
19
21
  Object.defineProperty(exports, key, {
20
22
  enumerable: true,
21
23
  get: function () {
@@ -3,17 +3,15 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.SignupCurrency = exports.SignupPlan = void 0;
7
- let SignupPlan;
8
- exports.SignupPlan = SignupPlan;
9
- (function (SignupPlan) {
6
+ exports.SignupPlan = exports.SignupCurrency = void 0;
7
+ let SignupPlan = exports.SignupPlan = /*#__PURE__*/function (SignupPlan) {
10
8
  SignupPlan["STARTER"] = "starter";
11
9
  SignupPlan["CORE"] = "core";
12
10
  SignupPlan["PREMIUM"] = "premium";
13
- })(SignupPlan || (exports.SignupPlan = SignupPlan = {}));
14
- let SignupCurrency;
15
- exports.SignupCurrency = SignupCurrency;
16
- (function (SignupCurrency) {
11
+ return SignupPlan;
12
+ }({});
13
+ let SignupCurrency = exports.SignupCurrency = /*#__PURE__*/function (SignupCurrency) {
17
14
  SignupCurrency["EUR"] = "eur";
18
15
  SignupCurrency["USD"] = "usd";
19
- })(SignupCurrency || (exports.SignupCurrency = SignupCurrency = {}));
16
+ return SignupCurrency;
17
+ }({});
@@ -1,11 +1,11 @@
1
- export let SignupPlan;
2
- (function (SignupPlan) {
1
+ export let SignupPlan = /*#__PURE__*/function (SignupPlan) {
3
2
  SignupPlan["STARTER"] = "starter";
4
3
  SignupPlan["CORE"] = "core";
5
4
  SignupPlan["PREMIUM"] = "premium";
6
- })(SignupPlan || (SignupPlan = {}));
7
- export let SignupCurrency;
8
- (function (SignupCurrency) {
5
+ return SignupPlan;
6
+ }({});
7
+ export let SignupCurrency = /*#__PURE__*/function (SignupCurrency) {
9
8
  SignupCurrency["EUR"] = "eur";
10
9
  SignupCurrency["USD"] = "usd";
11
- })(SignupCurrency || (SignupCurrency = {}));
10
+ return SignupCurrency;
11
+ }({});
@@ -16,6 +16,7 @@ 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;
19
20
  Object.defineProperty(exports, key, {
20
21
  enumerable: true,
21
22
  get: function () {
@@ -27,6 +28,7 @@ var _types = require("./types.cjs");
27
28
  Object.keys(_types).forEach(function (key) {
28
29
  if (key === "default" || key === "__esModule") return;
29
30
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
31
+ if (key in exports && exports[key] === _types[key]) return;
30
32
  Object.defineProperty(exports, key, {
31
33
  enumerable: true,
32
34
  get: function () {
@@ -6,6 +6,7 @@ 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;
9
10
  Object.defineProperty(exports, key, {
10
11
  enumerable: true,
11
12
  get: function () {
@@ -16,6 +17,7 @@ Object.keys(_Client).forEach(function (key) {
16
17
  var _types = require("./types.cjs");
17
18
  Object.keys(_types).forEach(function (key) {
18
19
  if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _types[key]) return;
19
21
  Object.defineProperty(exports, key, {
20
22
  enumerable: true,
21
23
  get: function () {
@@ -16,6 +16,7 @@ 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;
19
20
  Object.defineProperty(exports, key, {
20
21
  enumerable: true,
21
22
  get: function () {
@@ -27,6 +28,7 @@ var _types = require("./types.cjs");
27
28
  Object.keys(_types).forEach(function (key) {
28
29
  if (key === "default" || key === "__esModule") return;
29
30
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
31
+ if (key in exports && exports[key] === _types[key]) return;
30
32
  Object.defineProperty(exports, key, {
31
33
  enumerable: true,
32
34
  get: function () {
@@ -55,6 +55,11 @@ export interface PersonUpdateRequest extends BaseContactPayload {
55
55
  }
56
56
  export interface PersonCreateRequest extends PersonUpdateRequest {
57
57
  contact_type: `${Contact.Type.PERSON}`;
58
+ /**
59
+ * UUID of a subscriber.
60
+ * If this property is provided, subscriber's data will be applied to the created contact.
61
+ */
62
+ subscriber?: string;
58
63
  }
59
64
  export interface BulkDeleteResponse {
60
65
  deleted_contacts_count: number;
@@ -16,6 +16,7 @@ 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;
19
20
  Object.defineProperty(exports, key, {
20
21
  enumerable: true,
21
22
  get: function () {
@@ -27,6 +28,7 @@ var _types = require("./types.cjs");
27
28
  Object.keys(_types).forEach(function (key) {
28
29
  if (key === "default" || key === "__esModule") return;
29
30
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
31
+ if (key in exports && exports[key] === _types[key]) return;
30
32
  Object.defineProperty(exports, key, {
31
33
  enumerable: true,
32
34
  get: function () {
@@ -6,6 +6,7 @@ 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;
9
10
  Object.defineProperty(exports, key, {
10
11
  enumerable: true,
11
12
  get: function () {
@@ -16,6 +17,7 @@ Object.keys(_Client).forEach(function (key) {
16
17
  var _types = require("./types.cjs");
17
18
  Object.keys(_types).forEach(function (key) {
18
19
  if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _types[key]) return;
19
21
  Object.defineProperty(exports, key, {
20
22
  enumerable: true,
21
23
  get: function () {
@@ -6,6 +6,7 @@ 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;
9
10
  Object.defineProperty(exports, key, {
10
11
  enumerable: true,
11
12
  get: function () {
@@ -16,6 +17,7 @@ Object.keys(_Client).forEach(function (key) {
16
17
  var _types = require("./types.cjs");
17
18
  Object.keys(_types).forEach(function (key) {
18
19
  if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _types[key]) return;
19
21
  Object.defineProperty(exports, key, {
20
22
  enumerable: true,
21
23
  get: function () {
@@ -6,6 +6,7 @@ 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;
9
10
  Object.defineProperty(exports, key, {
10
11
  enumerable: true,
11
12
  get: function () {
@@ -6,6 +6,7 @@ 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;
9
10
  Object.defineProperty(exports, key, {
10
11
  enumerable: true,
11
12
  get: function () {
@@ -16,6 +17,7 @@ Object.keys(_Client).forEach(function (key) {
16
17
  var _types = require("./types.cjs");
17
18
  Object.keys(_types).forEach(function (key) {
18
19
  if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _types[key]) return;
19
21
  Object.defineProperty(exports, key, {
20
22
  enumerable: true,
21
23
  get: function () {
@@ -6,6 +6,7 @@ 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;
9
10
  Object.defineProperty(exports, key, {
10
11
  enumerable: true,
11
12
  get: function () {
@@ -16,6 +17,7 @@ Object.keys(_Client).forEach(function (key) {
16
17
  var _types = require("./types.cjs");
17
18
  Object.keys(_types).forEach(function (key) {
18
19
  if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _types[key]) return;
19
21
  Object.defineProperty(exports, key, {
20
22
  enumerable: true,
21
23
  get: function () {
@@ -6,6 +6,7 @@ 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;
9
10
  Object.defineProperty(exports, key, {
10
11
  enumerable: true,
11
12
  get: function () {
@@ -16,6 +17,7 @@ Object.keys(_Client).forEach(function (key) {
16
17
  var _types = require("./types.cjs");
17
18
  Object.keys(_types).forEach(function (key) {
18
19
  if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _types[key]) return;
19
21
  Object.defineProperty(exports, key, {
20
22
  enumerable: true,
21
23
  get: function () {
@@ -6,6 +6,7 @@ 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;
9
10
  Object.defineProperty(exports, key, {
10
11
  enumerable: true,
11
12
  get: function () {
@@ -16,6 +17,7 @@ Object.keys(_Client).forEach(function (key) {
16
17
  var _types = require("./types.cjs");
17
18
  Object.keys(_types).forEach(function (key) {
18
19
  if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _types[key]) return;
19
21
  Object.defineProperty(exports, key, {
20
22
  enumerable: true,
21
23
  get: function () {
@@ -6,6 +6,7 @@ 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;
9
10
  Object.defineProperty(exports, key, {
10
11
  enumerable: true,
11
12
  get: function () {
@@ -16,6 +17,7 @@ Object.keys(_Client).forEach(function (key) {
16
17
  var _types = require("./types.cjs");
17
18
  Object.keys(_types).forEach(function (key) {
18
19
  if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _types[key]) return;
19
21
  Object.defineProperty(exports, key, {
20
22
  enumerable: true,
21
23
  get: function () {
@@ -6,6 +6,7 @@ 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;
9
10
  Object.defineProperty(exports, key, {
10
11
  enumerable: true,
11
12
  get: function () {
@@ -16,6 +17,7 @@ Object.keys(_Client).forEach(function (key) {
16
17
  var _types = require("./types.cjs");
17
18
  Object.keys(_types).forEach(function (key) {
18
19
  if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _types[key]) return;
19
21
  Object.defineProperty(exports, key, {
20
22
  enumerable: true,
21
23
  get: function () {
@@ -6,6 +6,7 @@ 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;
9
10
  Object.defineProperty(exports, key, {
10
11
  enumerable: true,
11
12
  get: function () {
@@ -16,6 +17,7 @@ Object.keys(_Client).forEach(function (key) {
16
17
  var _types = require("./types.cjs");
17
18
  Object.keys(_types).forEach(function (key) {
18
19
  if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _types[key]) return;
19
21
  Object.defineProperty(exports, key, {
20
22
  enumerable: true,
21
23
  get: function () {
@@ -6,13 +6,14 @@ 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
- */
12
9
  class Client {
13
10
  constructor(apiClient) {
14
11
  this.apiClient = apiClient;
15
12
  }
13
+
14
+ /**
15
+ * @deprecated Use `subscribeToNewsroom` from `Subscriptions` instead
16
+ */
16
17
  async subscribe(newsroomId, payload) {
17
18
  const url = _routing.routing.newsroomSubscriptionsUrl.replace(':newsroom_id', String(newsroomId));
18
19
  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
- */
8
5
  export declare class Client {
9
6
  private readonly apiClient;
10
7
  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,12 +1,13 @@
1
1
  import { routing } from "../../routing.js";
2
2
  import { SortOrder } from "../../types/index.js";
3
- /**
4
- * @deprecated Use Subscriptions instead
5
- */
6
3
  export class Client {
7
4
  constructor(apiClient) {
8
5
  this.apiClient = apiClient;
9
6
  }
7
+
8
+ /**
9
+ * @deprecated Use `subscribeToNewsroom` from `Subscriptions` instead
10
+ */
10
11
  async subscribe(newsroomId, payload) {
11
12
  const url = routing.newsroomSubscriptionsUrl.replace(':newsroom_id', String(newsroomId));
12
13
  return this.apiClient.post(url, {
@@ -6,6 +6,7 @@ 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;
9
10
  Object.defineProperty(exports, key, {
10
11
  enumerable: true,
11
12
  get: function () {
@@ -16,6 +17,7 @@ Object.keys(_Client).forEach(function (key) {
16
17
  var _types = require("./types.cjs");
17
18
  Object.keys(_types).forEach(function (key) {
18
19
  if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _types[key]) return;
19
21
  Object.defineProperty(exports, key, {
20
22
  enumerable: true,
21
23
  get: function () {
@@ -6,6 +6,7 @@ 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;
9
10
  Object.defineProperty(exports, key, {
10
11
  enumerable: true,
11
12
  get: function () {
@@ -6,6 +6,7 @@ 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;
9
10
  Object.defineProperty(exports, key, {
10
11
  enumerable: true,
11
12
  get: function () {
@@ -16,6 +17,7 @@ Object.keys(_Client).forEach(function (key) {
16
17
  var _types = require("./types.cjs");
17
18
  Object.keys(_types).forEach(function (key) {
18
19
  if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _types[key]) return;
19
21
  Object.defineProperty(exports, key, {
20
22
  enumerable: true,
21
23
  get: function () {
@@ -6,6 +6,7 @@ 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;
9
10
  Object.defineProperty(exports, key, {
10
11
  enumerable: true,
11
12
  get: function () {
@@ -16,6 +17,7 @@ Object.keys(_Client).forEach(function (key) {
16
17
  var _types = require("./types.cjs");
17
18
  Object.keys(_types).forEach(function (key) {
18
19
  if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _types[key]) return;
19
21
  Object.defineProperty(exports, key, {
20
22
  enumerable: true,
21
23
  get: function () {
@@ -6,6 +6,7 @@ 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;
9
10
  Object.defineProperty(exports, key, {
10
11
  enumerable: true,
11
12
  get: function () {
@@ -16,6 +17,7 @@ Object.keys(_Client).forEach(function (key) {
16
17
  var _types = require("./types.cjs");
17
18
  Object.keys(_types).forEach(function (key) {
18
19
  if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _types[key]) return;
19
21
  Object.defineProperty(exports, key, {
20
22
  enumerable: true,
21
23
  get: function () {
@@ -6,6 +6,7 @@ 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;
9
10
  Object.defineProperty(exports, key, {
10
11
  enumerable: true,
11
12
  get: function () {
@@ -16,6 +17,7 @@ Object.keys(_Client).forEach(function (key) {
16
17
  var _types = require("./types.cjs");
17
18
  Object.keys(_types).forEach(function (key) {
18
19
  if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _types[key]) return;
19
21
  Object.defineProperty(exports, key, {
20
22
  enumerable: true,
21
23
  get: function () {
@@ -3,16 +3,13 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.AddOnId = exports.LimitId = exports.OptionId = exports.TableId = void 0;
7
- let TableId;
8
- exports.TableId = TableId;
9
- (function (TableId) {
6
+ exports.TableId = exports.OptionId = exports.LimitId = exports.AddOnId = void 0;
7
+ let TableId = exports.TableId = /*#__PURE__*/function (TableId) {
10
8
  TableId["STANDARD"] = "standard";
11
9
  TableId["AGENCY"] = "agency";
12
- })(TableId || (exports.TableId = TableId = {}));
13
- let OptionId;
14
- exports.OptionId = OptionId;
15
- (function (OptionId) {
10
+ return TableId;
11
+ }({});
12
+ let OptionId = exports.OptionId = /*#__PURE__*/function (OptionId) {
16
13
  OptionId["STARTER"] = "starter";
17
14
  OptionId["CORE"] = "core";
18
15
  OptionId["PREMIUM"] = "premium";
@@ -21,19 +18,18 @@ exports.OptionId = OptionId;
21
18
  OptionId["AGENCY_MEDIUM"] = "agency_medium";
22
19
  OptionId["AGENCY_LARGE"] = "agency_large";
23
20
  OptionId["AGENCY_HUGE"] = "agency_huge";
24
- })(OptionId || (exports.OptionId = OptionId = {}));
25
- let LimitId;
26
- exports.LimitId = LimitId;
27
- (function (LimitId) {
21
+ return OptionId;
22
+ }({});
23
+ let LimitId = exports.LimitId = /*#__PURE__*/function (LimitId) {
28
24
  LimitId["STORIES"] = "stories";
29
25
  LimitId["USERS"] = "users";
30
26
  LimitId["SITES"] = "sites";
31
27
  LimitId["CONTACTS"] = "contacts";
32
28
  LimitId["EMAIL_SENDS"] = "email_sends";
33
29
  LimitId["CUSTOM_SENDER_ADDRESSES"] = "custom_sender_addresses";
34
- })(LimitId || (exports.LimitId = LimitId = {}));
35
- let AddOnId;
36
- exports.AddOnId = AddOnId;
37
- (function (AddOnId) {
30
+ return LimitId;
31
+ }({});
32
+ let AddOnId = exports.AddOnId = /*#__PURE__*/function (AddOnId) {
38
33
  AddOnId["SITE"] = "site";
39
- })(AddOnId || (exports.AddOnId = AddOnId = {}));
34
+ return AddOnId;
35
+ }({});
@@ -1,10 +1,9 @@
1
- export let TableId;
2
- (function (TableId) {
1
+ export let TableId = /*#__PURE__*/function (TableId) {
3
2
  TableId["STANDARD"] = "standard";
4
3
  TableId["AGENCY"] = "agency";
5
- })(TableId || (TableId = {}));
6
- export let OptionId;
7
- (function (OptionId) {
4
+ return TableId;
5
+ }({});
6
+ export let OptionId = /*#__PURE__*/function (OptionId) {
8
7
  OptionId["STARTER"] = "starter";
9
8
  OptionId["CORE"] = "core";
10
9
  OptionId["PREMIUM"] = "premium";
@@ -13,17 +12,18 @@ export let OptionId;
13
12
  OptionId["AGENCY_MEDIUM"] = "agency_medium";
14
13
  OptionId["AGENCY_LARGE"] = "agency_large";
15
14
  OptionId["AGENCY_HUGE"] = "agency_huge";
16
- })(OptionId || (OptionId = {}));
17
- export let LimitId;
18
- (function (LimitId) {
15
+ return OptionId;
16
+ }({});
17
+ export let LimitId = /*#__PURE__*/function (LimitId) {
19
18
  LimitId["STORIES"] = "stories";
20
19
  LimitId["USERS"] = "users";
21
20
  LimitId["SITES"] = "sites";
22
21
  LimitId["CONTACTS"] = "contacts";
23
22
  LimitId["EMAIL_SENDS"] = "email_sends";
24
23
  LimitId["CUSTOM_SENDER_ADDRESSES"] = "custom_sender_addresses";
25
- })(LimitId || (LimitId = {}));
26
- export let AddOnId;
27
- (function (AddOnId) {
24
+ return LimitId;
25
+ }({});
26
+ export let AddOnId = /*#__PURE__*/function (AddOnId) {
28
27
  AddOnId["SITE"] = "site";
29
- })(AddOnId || (AddOnId = {}));
28
+ return AddOnId;
29
+ }({});