@prezly/sdk 22.4.0 → 22.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.
@@ -4,6 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.DEFAULT_USER_AGENT = void 0;
7
- const VERSION = "22.3.0";
7
+ const VERSION = "22.5.0";
8
8
  const URL = 'https://github.com/prezly/javascript-sdk';
9
9
  const DEFAULT_USER_AGENT = exports.DEFAULT_USER_AGENT = `prezly-javascript-sdk/${VERSION} (+${URL})`;
@@ -1,3 +1,3 @@
1
- const VERSION = "22.3.0";
1
+ const VERSION = "22.5.0";
2
2
  const URL = 'https://github.com/prezly/javascript-sdk';
3
3
  export const DEFAULT_USER_AGENT = `prezly-javascript-sdk/${VERSION} (+${URL})`;
@@ -1,4 +1,4 @@
1
- import type { CultureRef, CountryRef, Contact, CoverageEntry, NewsroomRef, OEmbedInfo, Pagination, Story, Query, SortOrder } from '../../types';
1
+ import type { Contact, CountryRef, CoverageEntry, CoverageIntegrationRun, CultureRef, NewsroomRef, OEmbedInfo, Pagination, Query, SortOrder, Story } from '../../types';
2
2
  export type Scope = {
3
3
  story: Story['id'];
4
4
  } | null;
@@ -50,7 +50,7 @@ export interface UpdateRequest {
50
50
  sentiment?: CoverageEntry.Sentiment | null;
51
51
  }
52
52
  export interface CreateRequest extends UpdateRequest {
53
- integration_run?: CoverageEntry['integration_run'];
53
+ integration_run?: CoverageIntegrationRun['id'] | CoverageIntegrationRun['uuid'];
54
54
  }
55
55
  export interface CreateOptions {
56
56
  enrich?: boolean;
@@ -3,6 +3,7 @@ import type { OptionId } from '../endpoints/PricingTables';
3
3
  import type { TableId } from '../endpoints/PricingTables';
4
4
  import type { BillingCycle } from './BillingCycle';
5
5
  import type { Currency } from './Currency';
6
+ import type { TiersMode, BillingSchema, Tier } from './Price';
6
7
  export interface PlanReference {
7
8
  display_name: string;
8
9
  description: string | null;
@@ -41,8 +42,11 @@ export interface AddOn {
41
42
  export interface PricingPlan {
42
43
  billing_cycle: BillingCycle;
43
44
  currency: Currency;
44
- amount: number;
45
+ billing_schema: BillingSchema;
46
+ amount: number | null;
45
47
  unit: string | null;
48
+ tiers_mode: TiersMode | null;
49
+ tiers: Tier[] | null;
46
50
  }
47
51
  export interface Usage {
48
52
  limit: Limit;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.TiersMode = exports.BillingSchema = void 0;
7
+ let BillingSchema = exports.BillingSchema = /*#__PURE__*/function (BillingSchema) {
8
+ BillingSchema["PER_UNIT"] = "per_unit";
9
+ BillingSchema["TIERED"] = "tiered";
10
+ return BillingSchema;
11
+ }({});
12
+ let TiersMode = exports.TiersMode = /*#__PURE__*/function (TiersMode) {
13
+ TiersMode["GRADUATED"] = "graduated";
14
+ TiersMode["VOLUME"] = "volume";
15
+ return TiersMode;
16
+ }({});
@@ -0,0 +1,13 @@
1
+ export interface Tier {
2
+ flat_amount: number;
3
+ unit_amount: number;
4
+ up_to: number | null;
5
+ }
6
+ export declare enum BillingSchema {
7
+ PER_UNIT = "per_unit",
8
+ TIERED = "tiered"
9
+ }
10
+ export declare enum TiersMode {
11
+ GRADUATED = "graduated",
12
+ VOLUME = "volume"
13
+ }
@@ -0,0 +1,10 @@
1
+ export let BillingSchema = /*#__PURE__*/function (BillingSchema) {
2
+ BillingSchema["PER_UNIT"] = "per_unit";
3
+ BillingSchema["TIERED"] = "tiered";
4
+ return BillingSchema;
5
+ }({});
6
+ export let TiersMode = /*#__PURE__*/function (TiersMode) {
7
+ TiersMode["GRADUATED"] = "graduated";
8
+ TiersMode["VOLUME"] = "volume";
9
+ return TiersMode;
10
+ }({});
@@ -355,6 +355,17 @@ Object.keys(_Plan).forEach(function (key) {
355
355
  }
356
356
  });
357
357
  });
358
+ var _Price = require("./Price.cjs");
359
+ Object.keys(_Price).forEach(function (key) {
360
+ if (key === "default" || key === "__esModule") return;
361
+ if (key in exports && exports[key] === _Price[key]) return;
362
+ Object.defineProperty(exports, key, {
363
+ enumerable: true,
364
+ get: function () {
365
+ return _Price[key];
366
+ }
367
+ });
368
+ });
358
369
  var _PrivacyRequest = require("./PrivacyRequest.cjs");
359
370
  Object.keys(_PrivacyRequest).forEach(function (key) {
360
371
  if (key === "default" || key === "__esModule") return;
@@ -30,6 +30,7 @@ export * from './NewsroomSubscription';
30
30
  export * from './NewsroomTheme';
31
31
  export * from './NewsroomWebhook';
32
32
  export * from './Plan';
33
+ export * from './Price';
33
34
  export * from './PrivacyRequest';
34
35
  export * from './SenderAddress';
35
36
  export * from './SenderDomain';
@@ -31,6 +31,7 @@ export * from "./NewsroomSubscription.js";
31
31
  export * from "./NewsroomTheme.js";
32
32
  export * from "./NewsroomWebhook.js";
33
33
  export * from "./Plan.js";
34
+ export * from "./Price.js";
34
35
  export * from "./PrivacyRequest.js";
35
36
  export * from "./SenderAddress.js";
36
37
  export * from "./SenderDomain.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prezly/sdk",
3
- "version": "22.4.0",
3
+ "version": "22.6.0",
4
4
  "description": "Prezly API SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",