@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
@@ -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 () {
@@ -8,15 +8,6 @@ var _index = require("../../http/index.cjs");
8
8
  var _routing = require("../../routing.cjs");
9
9
  var _index2 = require("../../types/index.cjs");
10
10
  var _types = require("./types.cjs");
11
- /**
12
- * `uuid` is the preferred way of targeting a Story. Numeric `id` is considered deprecated.
13
- */
14
-
15
- /**
16
- * Utility type to forbid arbitrary ad-hoc extensions of generic parameters.
17
- * @see https://stackoverflow.com/a/69666350
18
- */
19
-
20
11
  class Client {
21
12
  constructor(apiClient) {
22
13
  this.apiClient = apiClient;
@@ -68,20 +59,6 @@ class Client {
68
59
  * Get story by UUID.
69
60
  */
70
61
 
71
- /**
72
- * Get multiple stories by UUIDs.
73
- */
74
-
75
- /**
76
- * Get story by deprecated numeric ID, or UUID.
77
- * @deprecated Please use UUID instead.
78
- */
79
-
80
- /**
81
- * Get multiple stories by numeric IDs.
82
- * @deprecated Please use UUID instead.
83
- */
84
-
85
62
  /**
86
63
  * Implementation
87
64
  */
@@ -171,6 +148,7 @@ class Client {
171
148
  include,
172
149
  force: force || undefined // only pass it if it's true
173
150
  },
151
+
174
152
  payload
175
153
  });
176
154
  return story;
@@ -229,6 +207,7 @@ class Client {
229
207
  include,
230
208
  force: force || undefined // only pass it if it's true
231
209
  },
210
+
232
211
  payload
233
212
  });
234
213
  return {
@@ -257,6 +236,7 @@ class Client {
257
236
  include,
258
237
  force: force || undefined // only pass it if it's true
259
238
  },
239
+
260
240
  payload
261
241
  });
262
242
  return story;
@@ -387,6 +367,7 @@ class Client {
387
367
  force: force || undefined // only pass it if it's true
388
368
  }
389
369
  });
370
+
390
371
  return story;
391
372
  }
392
373
  async unpin(id, options) {
@@ -1,14 +1,9 @@
1
1
  import { ApiError, HttpCodes } from "../../http/index.js";
2
2
  import { routing } from "../../routing.js";
3
3
  import { SortOrder } from "../../types/index.js";
4
- import { EXTENDED_STORY_INCLUDED_EXTRA_FIELDS } from "./types.js";
5
- /**
6
- * `uuid` is the preferred way of targeting a Story. Numeric `id` is considered deprecated.
7
- */
8
- /**
9
- * Utility type to forbid arbitrary ad-hoc extensions of generic parameters.
10
- * @see https://stackoverflow.com/a/69666350
11
- */
4
+ import { EXTENDED_STORY_INCLUDED_EXTRA_FIELDS } from "./types.js"; /**
5
+ * `uuid` is the preferred way of targeting a Story. Numeric `id` is considered deprecated.
6
+ */
12
7
  export class Client {
13
8
  constructor(apiClient) {
14
9
  this.apiClient = apiClient;
@@ -60,20 +55,6 @@ export class Client {
60
55
  * Get story by UUID.
61
56
  */
62
57
 
63
- /**
64
- * Get multiple stories by UUIDs.
65
- */
66
-
67
- /**
68
- * Get story by deprecated numeric ID, or UUID.
69
- * @deprecated Please use UUID instead.
70
- */
71
-
72
- /**
73
- * Get multiple stories by numeric IDs.
74
- * @deprecated Please use UUID instead.
75
- */
76
-
77
58
  /**
78
59
  * Implementation
79
60
  */
@@ -163,6 +144,7 @@ export class Client {
163
144
  include,
164
145
  force: force || undefined // only pass it if it's true
165
146
  },
147
+
166
148
  payload
167
149
  });
168
150
  return story;
@@ -221,6 +203,7 @@ export class Client {
221
203
  include,
222
204
  force: force || undefined // only pass it if it's true
223
205
  },
206
+
224
207
  payload
225
208
  });
226
209
  return {
@@ -249,6 +232,7 @@ export class Client {
249
232
  include,
250
233
  force: force || undefined // only pass it if it's true
251
234
  },
235
+
252
236
  payload
253
237
  });
254
238
  return story;
@@ -379,6 +363,7 @@ export class Client {
379
363
  force: force || undefined // only pass it if it's true
380
364
  }
381
365
  });
366
+
382
367
  return story;
383
368
  }
384
369
  async unpin(id, options) {
@@ -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 () {
@@ -28,7 +26,6 @@ Object.keys(_types).forEach(function (key) {
28
26
  var _scopes = require("./scopes.cjs");
29
27
  Object.keys(_scopes).forEach(function (key) {
30
28
  if (key === "default" || key === "__esModule") return;
31
- if (key in exports && exports[key] === _scopes[key]) return;
32
29
  Object.defineProperty(exports, key, {
33
30
  enumerable: true,
34
31
  get: function () {
@@ -5,10 +5,11 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.Scope = void 0;
7
7
  var _index = require("../../types/index.cjs");
8
- const Scope = exports.Scope = {
8
+ const Scope = {
9
9
  EXCLUDE_ARCHIVED_NEWSROOMS: {
10
10
  'newsroom.status': {
11
11
  $nin: [_index.Newsroom.Status.ARCHIVED]
12
12
  }
13
13
  }
14
- };
14
+ };
15
+ exports.Scope = Scope;
@@ -5,18 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.EXTENDED_STORY_INCLUDED_EXTRA_FIELDS = exports.ALL_EXTRA_FIELDS = void 0;
7
7
  var _index = require("../../types/index.cjs");
8
- /**
9
- * Uploadcare image JSON string.
10
- */
11
- /**
12
- * Raw HTML string.
13
- */
14
- /**
15
- * String-serialized JSON object.
16
- */
17
- /**
18
- * String containing Prezly Content Format JSON structure.
19
- */
20
8
  var Alignment = _index.Campaign.StoryAlignment;
21
9
  var Appearance = _index.Campaign.StoryAppearance;
22
10
  var HeaderFooter = _index.Campaign.StoryHeaderFooter;
@@ -53,5 +41,7 @@ const ALL_EXTRA_FIELDS_SHAPE = {
53
41
  'pitches.count': true
54
42
  }; // satisfies Record<keyof Story.OnDemandFields, boolean>; // TODO: Use Typescript `satisfies` operator, when it's out of beta
55
43
 
56
- const ALL_EXTRA_FIELDS = exports.ALL_EXTRA_FIELDS = Object.keys(ALL_EXTRA_FIELDS_SHAPE);
57
- const EXTENDED_STORY_INCLUDED_EXTRA_FIELDS = exports.EXTENDED_STORY_INCLUDED_EXTRA_FIELDS = Object.keys(EXTENDED_STORY_INCLUDED_EXTRA_FIELDS_SHAPE);
44
+ const ALL_EXTRA_FIELDS = Object.keys(ALL_EXTRA_FIELDS_SHAPE);
45
+ exports.ALL_EXTRA_FIELDS = ALL_EXTRA_FIELDS;
46
+ const EXTENDED_STORY_INCLUDED_EXTRA_FIELDS = Object.keys(EXTENDED_STORY_INCLUDED_EXTRA_FIELDS_SHAPE);
47
+ exports.EXTENDED_STORY_INCLUDED_EXTRA_FIELDS = EXTENDED_STORY_INCLUDED_EXTRA_FIELDS;
@@ -1,16 +1,6 @@
1
- import { Campaign } from "../../types/index.js";
2
- /**
3
- * Uploadcare image JSON string.
4
- */
5
- /**
6
- * Raw HTML string.
7
- */
8
- /**
9
- * String-serialized JSON object.
10
- */
11
- /**
12
- * String containing Prezly Content Format JSON structure.
13
- */
1
+ import { Campaign } from "../../types/index.js"; /**
2
+ * Uploadcare image JSON string.
3
+ */
14
4
  var Alignment = Campaign.StoryAlignment;
15
5
  var Appearance = Campaign.StoryAppearance;
16
6
  var HeaderFooter = Campaign.StoryHeaderFooter;
@@ -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 () {
@@ -4,11 +4,12 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.UnsubscribeReason = void 0;
7
- let UnsubscribeReason = exports.UnsubscribeReason = /*#__PURE__*/function (UnsubscribeReason) {
7
+ let UnsubscribeReason;
8
+ exports.UnsubscribeReason = UnsubscribeReason;
9
+ (function (UnsubscribeReason) {
8
10
  UnsubscribeReason["UNKNOWN"] = "unknown";
9
11
  UnsubscribeReason["UNWANTED"] = "unwanted";
10
12
  UnsubscribeReason["SPAM"] = "spam";
11
13
  UnsubscribeReason["NEVER_SIGNED_UP"] = "never_signed_up";
12
14
  UnsubscribeReason["OTHER"] = "other";
13
- return UnsubscribeReason;
14
- }({});
15
+ })(UnsubscribeReason || (exports.UnsubscribeReason = UnsubscribeReason = {}));
@@ -1,8 +1,8 @@
1
- export let UnsubscribeReason = /*#__PURE__*/function (UnsubscribeReason) {
1
+ export let UnsubscribeReason;
2
+ (function (UnsubscribeReason) {
2
3
  UnsubscribeReason["UNKNOWN"] = "unknown";
3
4
  UnsubscribeReason["UNWANTED"] = "unwanted";
4
5
  UnsubscribeReason["SPAM"] = "spam";
5
6
  UnsubscribeReason["NEVER_SIGNED_UP"] = "never_signed_up";
6
7
  UnsubscribeReason["OTHER"] = "other";
7
- return UnsubscribeReason;
8
- }({});
8
+ })(UnsubscribeReason || (UnsubscribeReason = {}));
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.Subscriptions = exports.Stories = exports.Snippets = exports.SenderAddresses = exports.PricingTables = exports.NotificationSubscriptions = exports.Newsrooms = exports.NewsroomWebhooks = exports.NewsroomThemes = exports.NewsroomSubscriptions = exports.NewsroomPrivacyRequests = exports.NewsroomLanguages = exports.NewsroomHub = exports.NewsroomGalleries = exports.NewsroomDomains = exports.NewsroomContacts = exports.NewsroomCategories = exports.Licenses = exports.Jobs = exports.Coverage = exports.ContactsExports = exports.Contacts = exports.Campaigns = exports.CampaignRecipients = exports.Billing = exports.Accounts = void 0;
6
+ exports.NotificationSubscriptions = exports.Subscriptions = exports.Stories = exports.Snippets = exports.SenderAddresses = exports.PricingTables = exports.NewsroomWebhooks = exports.NewsroomThemes = exports.NewsroomSubscriptions = exports.Newsrooms = exports.NewsroomPrivacyRequests = exports.NewsroomLanguages = exports.NewsroomHub = exports.NewsroomGalleries = exports.NewsroomDomains = exports.NewsroomContacts = exports.NewsroomCategories = exports.Licenses = exports.Jobs = exports.Coverage = exports.ContactsExports = exports.Contacts = exports.Campaigns = exports.CampaignRecipients = exports.Billing = exports.Accounts = void 0;
7
7
  var _Accounts = _interopRequireWildcard(require("./Accounts/index.cjs"));
8
8
  exports.Accounts = _Accounts;
9
9
  var _Billing = _interopRequireWildcard(require("./Billing/index.cjs"));
@@ -56,5 +56,5 @@ var _Subscriptions = _interopRequireWildcard(require("./Subscriptions/index.cjs"
56
56
  exports.Subscriptions = _Subscriptions;
57
57
  var _NotificationSubscriptions = _interopRequireWildcard(require("./NotificationSubscriptions/index.cjs"));
58
58
  exports.NotificationSubscriptions = _NotificationSubscriptions;
59
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
60
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
59
+ function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
60
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -4,6 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.NETWORK_PROBLEM_ERROR_MESSAGE = exports.INVALID_URL_ERROR_MESSAGE = exports.CONTENT_TYPE = void 0;
7
- const CONTENT_TYPE = exports.CONTENT_TYPE = 'application/json;charset=utf-8';
8
- const INVALID_URL_ERROR_MESSAGE = exports.INVALID_URL_ERROR_MESSAGE = 'Invalid URL provided';
9
- const NETWORK_PROBLEM_ERROR_MESSAGE = exports.NETWORK_PROBLEM_ERROR_MESSAGE = 'Network problem';
7
+ const CONTENT_TYPE = 'application/json;charset=utf-8';
8
+ exports.CONTENT_TYPE = CONTENT_TYPE;
9
+ const INVALID_URL_ERROR_MESSAGE = 'Invalid URL provided';
10
+ exports.INVALID_URL_ERROR_MESSAGE = INVALID_URL_ERROR_MESSAGE;
11
+ const NETWORK_PROBLEM_ERROR_MESSAGE = 'Network problem';
12
+ exports.NETWORK_PROBLEM_ERROR_MESSAGE = NETWORK_PROBLEM_ERROR_MESSAGE;
@@ -9,28 +9,28 @@ Object.defineProperty(exports, "ApiError", {
9
9
  return _ApiError.ApiError;
10
10
  }
11
11
  });
12
- Object.defineProperty(exports, "HttpCodes", {
12
+ Object.defineProperty(exports, "createHttpClient", {
13
13
  enumerable: true,
14
14
  get: function () {
15
- return _types.HttpCodes;
15
+ return _HttpClient.createHttpClient;
16
16
  }
17
17
  });
18
- Object.defineProperty(exports, "Method", {
18
+ Object.defineProperty(exports, "isDeferredJobResponse", {
19
19
  enumerable: true,
20
20
  get: function () {
21
- return _types.Method;
21
+ return _lib.isDeferredJobResponse;
22
22
  }
23
23
  });
24
- Object.defineProperty(exports, "createHttpClient", {
24
+ Object.defineProperty(exports, "HttpCodes", {
25
25
  enumerable: true,
26
26
  get: function () {
27
- return _HttpClient.createHttpClient;
27
+ return _types.HttpCodes;
28
28
  }
29
29
  });
30
- Object.defineProperty(exports, "isDeferredJobResponse", {
30
+ Object.defineProperty(exports, "Method", {
31
31
  enumerable: true,
32
32
  get: function () {
33
- return _lib.isDeferredJobResponse;
33
+ return _types.Method;
34
34
  }
35
35
  });
36
36
  var _ApiError = require("./ApiError.cjs");
@@ -4,20 +4,22 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.Method = exports.HttpCodes = void 0;
7
- let HttpCodes = exports.HttpCodes = /*#__PURE__*/function (HttpCodes) {
7
+ let HttpCodes;
8
+ exports.HttpCodes = HttpCodes;
9
+ (function (HttpCodes) {
8
10
  HttpCodes[HttpCodes["ACCEPTED"] = 202] = "ACCEPTED";
9
11
  HttpCodes[HttpCodes["NO_CONTENT"] = 204] = "NO_CONTENT";
10
12
  HttpCodes[HttpCodes["NOT_FOUND"] = 404] = "NOT_FOUND";
11
13
  HttpCodes[HttpCodes["CONFLICT"] = 409] = "CONFLICT";
12
14
  HttpCodes[HttpCodes["GONE"] = 410] = "GONE";
13
15
  HttpCodes[HttpCodes["PRECONDITION_FAILED"] = 412] = "PRECONDITION_FAILED";
14
- return HttpCodes;
15
- }({});
16
- let Method = exports.Method = /*#__PURE__*/function (Method) {
16
+ })(HttpCodes || (exports.HttpCodes = HttpCodes = {}));
17
+ let Method;
18
+ exports.Method = Method;
19
+ (function (Method) {
17
20
  Method["DELETE"] = "DELETE";
18
21
  Method["GET"] = "GET";
19
22
  Method["PATCH"] = "PATCH";
20
23
  Method["POST"] = "POST";
21
24
  Method["PUT"] = "PUT";
22
- return Method;
23
- }({});
25
+ })(Method || (exports.Method = Method = {}));
@@ -1,17 +1,17 @@
1
- export let HttpCodes = /*#__PURE__*/function (HttpCodes) {
1
+ export let HttpCodes;
2
+ (function (HttpCodes) {
2
3
  HttpCodes[HttpCodes["ACCEPTED"] = 202] = "ACCEPTED";
3
4
  HttpCodes[HttpCodes["NO_CONTENT"] = 204] = "NO_CONTENT";
4
5
  HttpCodes[HttpCodes["NOT_FOUND"] = 404] = "NOT_FOUND";
5
6
  HttpCodes[HttpCodes["CONFLICT"] = 409] = "CONFLICT";
6
7
  HttpCodes[HttpCodes["GONE"] = 410] = "GONE";
7
8
  HttpCodes[HttpCodes["PRECONDITION_FAILED"] = 412] = "PRECONDITION_FAILED";
8
- return HttpCodes;
9
- }({});
10
- export let Method = /*#__PURE__*/function (Method) {
9
+ })(HttpCodes || (HttpCodes = {}));
10
+ export let Method;
11
+ (function (Method) {
11
12
  Method["DELETE"] = "DELETE";
12
13
  Method["GET"] = "GET";
13
14
  Method["PATCH"] = "PATCH";
14
15
  Method["POST"] = "POST";
15
16
  Method["PUT"] = "PUT";
16
- return Method;
17
- }({});
17
+ })(Method || (Method = {}));
package/dist/index.cjs CHANGED
@@ -7,23 +7,22 @@ var _exportNames = {
7
7
  createPrezlyClient: true,
8
8
  ApiError: true
9
9
  };
10
- Object.defineProperty(exports, "ApiError", {
10
+ Object.defineProperty(exports, "createPrezlyClient", {
11
11
  enumerable: true,
12
12
  get: function () {
13
- return _index.ApiError;
13
+ return _Client.createClient;
14
14
  }
15
15
  });
16
- Object.defineProperty(exports, "createPrezlyClient", {
16
+ Object.defineProperty(exports, "ApiError", {
17
17
  enumerable: true,
18
18
  get: function () {
19
- return _Client.createClient;
19
+ return _index.ApiError;
20
20
  }
21
21
  });
22
22
  var _uploads = require("@prezly/uploads");
23
23
  Object.keys(_uploads).forEach(function (key) {
24
24
  if (key === "default" || key === "__esModule") return;
25
25
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
26
- if (key in exports && exports[key] === _uploads[key]) return;
27
26
  Object.defineProperty(exports, key, {
28
27
  enumerable: true,
29
28
  get: function () {
@@ -37,7 +36,6 @@ var _index2 = require("./endpoints/index.cjs");
37
36
  Object.keys(_index2).forEach(function (key) {
38
37
  if (key === "default" || key === "__esModule") return;
39
38
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
40
- if (key in exports && exports[key] === _index2[key]) return;
41
39
  Object.defineProperty(exports, key, {
42
40
  enumerable: true,
43
41
  get: function () {
@@ -49,7 +47,6 @@ var _index3 = require("./types/index.cjs");
49
47
  Object.keys(_index3).forEach(function (key) {
50
48
  if (key === "default" || key === "__esModule") return;
51
49
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
52
- if (key in exports && exports[key] === _index3[key]) return;
53
50
  Object.defineProperty(exports, key, {
54
51
  enumerable: true,
55
52
  get: function () {
package/dist/routing.cjs CHANGED
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.routing = void 0;
7
- const routing = exports.routing = {
7
+ const routing = {
8
8
  accounts: '/v2/accounts',
9
9
  billing: 'v2/billing',
10
10
  campaignsUrl: '/v2/campaigns',
@@ -19,7 +19,6 @@ const routing = exports.routing = {
19
19
  newsroomCategoriesUrl: '/v2/newsrooms/:newsroom_id/categories',
20
20
  newsroomContactsUrl: '/v2/newsrooms/:newsroom_id/contacts',
21
21
  newsroomLanguagesUrl: '/v2/newsrooms/:newsroom_id/languages',
22
- /** @deprecated Please use newsroomSubscribeUrl instead */
23
22
  newsroomSubscriptionsUrl: '/v2/newsrooms/:newsroom_id/subscriptions',
24
23
  newsroomSubscribeUrl: '/v2/newsrooms/:newsroom_id/subscribe',
25
24
  newsroomUnsubscribeUrl: '/v2/newsrooms/:newsroom_id/unsubscribe',
@@ -37,4 +36,5 @@ const routing = exports.routing = {
37
36
  storiesSearchUrl: '/v2/stories/search',
38
37
  storyCoverageUrl: '/v1/stories/:story_id/reports/coverage',
39
38
  snippetsUrl: '/v2/snippets'
40
- };
39
+ };
40
+ exports.routing = routing;
package/dist/routing.d.ts CHANGED
@@ -13,7 +13,6 @@ export declare const routing: {
13
13
  newsroomCategoriesUrl: string;
14
14
  newsroomContactsUrl: string;
15
15
  newsroomLanguagesUrl: string;
16
- /** @deprecated Please use newsroomSubscribeUrl instead */
17
16
  newsroomSubscriptionsUrl: string;
18
17
  newsroomSubscribeUrl: string;
19
18
  newsroomUnsubscribeUrl: string;
package/dist/routing.js CHANGED
@@ -13,7 +13,6 @@ export const routing = {
13
13
  newsroomCategoriesUrl: '/v2/newsrooms/:newsroom_id/categories',
14
14
  newsroomContactsUrl: '/v2/newsrooms/:newsroom_id/contacts',
15
15
  newsroomLanguagesUrl: '/v2/newsrooms/:newsroom_id/languages',
16
- /** @deprecated Please use newsroomSubscribeUrl instead */
17
16
  newsroomSubscriptionsUrl: '/v2/newsrooms/:newsroom_id/subscriptions',
18
17
  newsroomSubscribeUrl: '/v2/newsrooms/:newsroom_id/subscribe',
19
18
  newsroomUnsubscribeUrl: '/v2/newsrooms/:newsroom_id/unsubscribe',
@@ -4,8 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.BillingCycle = void 0;
7
- let BillingCycle = exports.BillingCycle = /*#__PURE__*/function (BillingCycle) {
7
+ let BillingCycle;
8
+ exports.BillingCycle = BillingCycle;
9
+ (function (BillingCycle) {
8
10
  BillingCycle["YEAR"] = "year";
9
11
  BillingCycle["MONTH"] = "month";
10
- return BillingCycle;
11
- }({});
12
+ })(BillingCycle || (exports.BillingCycle = BillingCycle = {}));
@@ -1,5 +1,5 @@
1
- export let BillingCycle = /*#__PURE__*/function (BillingCycle) {
1
+ export let BillingCycle;
2
+ (function (BillingCycle) {
2
3
  BillingCycle["YEAR"] = "year";
3
4
  BillingCycle["MONTH"] = "month";
4
- return BillingCycle;
5
- }({});
5
+ })(BillingCycle || (BillingCycle = {}));
@@ -5,50 +5,51 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.Campaign = void 0;
7
7
  var _SenderDomain = require("./SenderDomain.cjs");
8
- let Campaign = exports.Campaign = void 0;
8
+ let Campaign;
9
+ exports.Campaign = Campaign;
9
10
  (function (_Campaign) {
10
11
  const SenderDomainVerificationFlow = _Campaign.SenderDomainVerificationFlow = _SenderDomain.SenderDomain.VerificationFlowVersion;
11
- let LifecycleStatus = /*#__PURE__*/function (LifecycleStatus) {
12
+ let LifecycleStatus;
13
+ (function (LifecycleStatus) {
12
14
  LifecycleStatus["DRAFT"] = "draft";
13
15
  LifecycleStatus["SCHEDULED"] = "scheduled";
14
16
  LifecycleStatus["PENDING"] = "pending";
15
17
  LifecycleStatus["SENT"] = "sent";
16
- return LifecycleStatus;
17
- }({});
18
+ })(LifecycleStatus || (LifecycleStatus = {}));
18
19
  _Campaign.LifecycleStatus = LifecycleStatus;
19
- let StoryAlignment = /*#__PURE__*/function (StoryAlignment) {
20
+ let StoryAlignment;
21
+ (function (StoryAlignment) {
20
22
  StoryAlignment["CENTER"] = "center";
21
23
  StoryAlignment["LEFT"] = "left";
22
24
  StoryAlignment["RIGHT"] = "right";
23
- return StoryAlignment;
24
- }({});
25
+ })(StoryAlignment || (StoryAlignment = {}));
25
26
  _Campaign.StoryAlignment = StoryAlignment;
26
- let StoryAppearance = /*#__PURE__*/function (StoryAppearance) {
27
+ let StoryAppearance;
28
+ (function (StoryAppearance) {
27
29
  StoryAppearance["INTRO"] = "intro";
28
30
  StoryAppearance["FULL"] = "full";
29
- return StoryAppearance;
30
- }({});
31
+ })(StoryAppearance || (StoryAppearance = {}));
31
32
  _Campaign.StoryAppearance = StoryAppearance;
32
- let StoryHeaderFooter = /*#__PURE__*/function (StoryHeaderFooter) {
33
+ let StoryHeaderFooter;
34
+ (function (StoryHeaderFooter) {
33
35
  StoryHeaderFooter["NONE"] = "none";
34
36
  StoryHeaderFooter["STANDARD"] = "standard";
35
37
  StoryHeaderFooter["FULL"] = "full";
36
- return StoryHeaderFooter;
37
- }({});
38
+ })(StoryHeaderFooter || (StoryHeaderFooter = {}));
38
39
  _Campaign.StoryHeaderFooter = StoryHeaderFooter;
39
- let SenderDomainVerificationStatus = /*#__PURE__*/function (SenderDomainVerificationStatus) {
40
+ let SenderDomainVerificationStatus;
41
+ (function (SenderDomainVerificationStatus) {
40
42
  SenderDomainVerificationStatus["UNKNOWN"] = "unknown";
41
43
  SenderDomainVerificationStatus["VALID"] = "valid";
42
44
  SenderDomainVerificationStatus["INVALID"] = "invalid";
43
45
  SenderDomainVerificationStatus["NOT_APPLICABLE"] = "not-applicable";
44
- return SenderDomainVerificationStatus;
45
- }({});
46
+ })(SenderDomainVerificationStatus || (SenderDomainVerificationStatus = {}));
46
47
  _Campaign.SenderDomainVerificationStatus = SenderDomainVerificationStatus;
47
- let ClickTrackingVersion = /*#__PURE__*/function (ClickTrackingVersion) {
48
+ let ClickTrackingVersion;
49
+ (function (ClickTrackingVersion) {
48
50
  ClickTrackingVersion[ClickTrackingVersion["DEPRECATED"] = 1] = "DEPRECATED";
49
51
  ClickTrackingVersion[ClickTrackingVersion["ENHANCED"] = 2] = "ENHANCED";
50
- return ClickTrackingVersion;
51
- }({});
52
+ })(ClickTrackingVersion || (ClickTrackingVersion = {}));
52
53
  _Campaign.ClickTrackingVersion = ClickTrackingVersion;
53
54
  function isDraft(arg) {
54
55
  if (typeof arg === 'object') {