@prezly/sdk 14.5.0 → 14.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.
package/dist/Client.cjs CHANGED
@@ -37,6 +37,7 @@ function createClient({
37
37
  newsroomDomains: new _index2.NewsroomDomains.Client(apiClient),
38
38
  newsroomGalleries: new _index2.NewsroomGalleries.Client(apiClient),
39
39
  newsroomHub: new _index2.NewsroomHub.Client(apiClient),
40
+ pricingTables: new _index2.PricingTables.Client(apiClient),
40
41
  senderAddresses: new _index2.SenderAddresses.Client(apiClient),
41
42
  signup: new _index2.Signup.Client(apiClient),
42
43
  stories: new _index2.Stories.Client(apiClient),
package/dist/Client.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { DeferredJobsApiClient } from './api';
2
- import { Accounts, Billing, Campaigns, CampaignRecipients, ContactsExports, Coverage, Jobs, Licenses, Newsrooms, NewsroomCategories, NewsroomContacts, NewsroomLanguages, NewsroomThemes, NewsroomWebhooks, NewsroomPrivacyRequests, NewsroomDomains, NewsroomGalleries, NewsroomHub, SenderAddresses, Signup, Stories, Snippets, Subscriptions, NotificationSubscriptions } from './endpoints';
2
+ import { Accounts, Billing, Campaigns, CampaignRecipients, ContactsExports, Coverage, Jobs, Licenses, Newsrooms, NewsroomCategories, NewsroomContacts, NewsroomLanguages, NewsroomThemes, NewsroomWebhooks, NewsroomPrivacyRequests, NewsroomDomains, NewsroomGalleries, NewsroomHub, PricingTables, SenderAddresses, Signup, Stories, Snippets, Subscriptions, NotificationSubscriptions } from './endpoints';
3
3
  import type { HeadersMap } from './http';
4
4
  export interface ClientOptions {
5
5
  accessToken: string;
@@ -26,6 +26,7 @@ export interface Client {
26
26
  newsroomDomains: NewsroomDomains.Client;
27
27
  newsroomGalleries: NewsroomGalleries.Client;
28
28
  newsroomHub: NewsroomHub.Client;
29
+ pricingTables: PricingTables.Client;
29
30
  senderAddresses: SenderAddresses.Client;
30
31
  signup: Signup.Client;
31
32
  stories: Stories.Client;
package/dist/Client.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ApiClient, DeferredJobsApiClient } from "./api/index.js";
2
- import { Accounts, Billing, Campaigns, CampaignRecipients, ContactsExports, Coverage, Jobs, Licenses, Newsrooms, NewsroomCategories, NewsroomContacts, NewsroomLanguages, NewsroomThemes, NewsroomWebhooks, NewsroomPrivacyRequests, NewsroomDomains, NewsroomGalleries, NewsroomHub, SenderAddresses, Signup, Stories, Snippets, Subscriptions, NotificationSubscriptions } from "./endpoints/index.js";
2
+ import { Accounts, Billing, Campaigns, CampaignRecipients, ContactsExports, Coverage, Jobs, Licenses, Newsrooms, NewsroomCategories, NewsroomContacts, NewsroomLanguages, NewsroomThemes, NewsroomWebhooks, NewsroomPrivacyRequests, NewsroomDomains, NewsroomGalleries, NewsroomHub, PricingTables, SenderAddresses, Signup, Stories, Snippets, Subscriptions, NotificationSubscriptions } from "./endpoints/index.js";
3
3
  const DEFAULT_BASE_URL = 'https://api.prezly.com';
4
4
  export function createClient({
5
5
  accessToken,
@@ -31,6 +31,7 @@ export function createClient({
31
31
  newsroomDomains: new NewsroomDomains.Client(apiClient),
32
32
  newsroomGalleries: new NewsroomGalleries.Client(apiClient),
33
33
  newsroomHub: new NewsroomHub.Client(apiClient),
34
+ pricingTables: new PricingTables.Client(apiClient),
34
35
  senderAddresses: new SenderAddresses.Client(apiClient),
35
36
  signup: new Signup.Client(apiClient),
36
37
  stories: new Stories.Client(apiClient),
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.DEFAULT_USER_AGENT = void 0;
7
- const VERSION = "14.4.0";
7
+ const VERSION = "14.5.0";
8
8
  const URL = 'https://github.com/prezly/javascript-sdk';
9
9
  const DEFAULT_USER_AGENT = `prezly-javascript-sdk/${VERSION} (+${URL})`;
10
10
  exports.DEFAULT_USER_AGENT = DEFAULT_USER_AGENT;
@@ -1,3 +1,3 @@
1
- const VERSION = "14.4.0";
1
+ const VERSION = "14.5.0";
2
2
  const URL = 'https://github.com/prezly/javascript-sdk';
3
3
  export const DEFAULT_USER_AGENT = `prezly-javascript-sdk/${VERSION} (+${URL})`;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Client = void 0;
7
+ var _routing = require("../../routing.cjs");
8
+ class Client {
9
+ constructor(apiClient) {
10
+ this.apiClient = apiClient;
11
+ }
12
+ async get(tableId) {
13
+ const url = _routing.routing.pricingTablesUrl.replace(':table_id', String(tableId));
14
+ const {
15
+ table
16
+ } = await this.apiClient.get(url);
17
+ return table;
18
+ }
19
+ }
20
+ exports.Client = Client;
@@ -0,0 +1,7 @@
1
+ import type { DeferredJobsApiClient } from '../../api';
2
+ import type { PricingTable } from './types';
3
+ export declare class Client {
4
+ private readonly apiClient;
5
+ constructor(apiClient: DeferredJobsApiClient);
6
+ get(tableId: 'standard'): Promise<PricingTable>;
7
+ }
@@ -0,0 +1,13 @@
1
+ import { routing } from "../../routing.js";
2
+ export class Client {
3
+ constructor(apiClient) {
4
+ this.apiClient = apiClient;
5
+ }
6
+ async get(tableId) {
7
+ const url = routing.pricingTablesUrl.replace(':table_id', String(tableId));
8
+ const {
9
+ table
10
+ } = await this.apiClient.get(url);
11
+ return table;
12
+ }
13
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _Client = require("./Client.cjs");
7
+ Object.keys(_Client).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ Object.defineProperty(exports, key, {
10
+ enumerable: true,
11
+ get: function () {
12
+ return _Client[key];
13
+ }
14
+ });
15
+ });
16
+ var _types = require("./types.cjs");
17
+ Object.keys(_types).forEach(function (key) {
18
+ if (key === "default" || key === "__esModule") return;
19
+ Object.defineProperty(exports, key, {
20
+ enumerable: true,
21
+ get: function () {
22
+ return _types[key];
23
+ }
24
+ });
25
+ });
@@ -0,0 +1,2 @@
1
+ export * from './Client';
2
+ export * from './types';
@@ -0,0 +1,2 @@
1
+ export * from "./Client.js";
2
+ export * from "./types.js";
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1,33 @@
1
+ export interface PricingTable {
2
+ options: Option[];
3
+ }
4
+ export interface Option {
5
+ id: string;
6
+ display_name: string;
7
+ description: string | null;
8
+ overview_features_list: PlanFeatureRef[];
9
+ limits: Limit[];
10
+ prices: Price[];
11
+ add_ons: AddOn[];
12
+ }
13
+ export interface PlanFeatureRef {
14
+ name: string;
15
+ details?: string;
16
+ }
17
+ export interface Limit {
18
+ id: string;
19
+ display_name: string;
20
+ value: null | number;
21
+ per: null | string;
22
+ }
23
+ export interface Price {
24
+ billing_cycle: string;
25
+ currency: string;
26
+ amount: number;
27
+ unit: string | null;
28
+ }
29
+ export interface AddOn {
30
+ id: string;
31
+ display_name: string;
32
+ prices: Price[];
33
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.NotificationSubscriptions = exports.Subscriptions = exports.Stories = exports.Snippets = exports.Signup = exports.SenderAddresses = 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.Campaigns = exports.CampaignRecipients = exports.Billing = exports.Accounts = void 0;
6
+ exports.NotificationSubscriptions = exports.Subscriptions = exports.Stories = exports.Snippets = exports.Signup = 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.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"));
@@ -42,6 +42,8 @@ var _NewsroomThemes = _interopRequireWildcard(require("./NewsroomThemes/index.cj
42
42
  exports.NewsroomThemes = _NewsroomThemes;
43
43
  var _NewsroomWebhooks = _interopRequireWildcard(require("./NewsroomWebhooks/index.cjs"));
44
44
  exports.NewsroomWebhooks = _NewsroomWebhooks;
45
+ var _PricingTables = _interopRequireWildcard(require("./PricingTables/index.cjs"));
46
+ exports.PricingTables = _PricingTables;
45
47
  var _SenderAddresses = _interopRequireWildcard(require("./SenderAddresses/index.cjs"));
46
48
  exports.SenderAddresses = _SenderAddresses;
47
49
  var _Signup = _interopRequireWildcard(require("./Signup/index.cjs"));
@@ -17,6 +17,7 @@ export * as Newsrooms from './Newsrooms';
17
17
  export * as NewsroomSubscriptions from './NewsroomSubscriptions';
18
18
  export * as NewsroomThemes from './NewsroomThemes';
19
19
  export * as NewsroomWebhooks from './NewsroomWebhooks';
20
+ export * as PricingTables from './PricingTables';
20
21
  export * as SenderAddresses from './SenderAddresses';
21
22
  export * as Signup from './Signup';
22
23
  export * as Snippets from './Snippets';
@@ -17,6 +17,7 @@ export * as Newsrooms from "./Newsrooms/index.js";
17
17
  export * as NewsroomSubscriptions from "./NewsroomSubscriptions/index.js";
18
18
  export * as NewsroomThemes from "./NewsroomThemes/index.js";
19
19
  export * as NewsroomWebhooks from "./NewsroomWebhooks/index.js";
20
+ export * as PricingTables from "./PricingTables/index.js";
20
21
  export * as SenderAddresses from "./SenderAddresses/index.js";
21
22
  export * as Signup from "./Signup/index.js";
22
23
  export * as Snippets from "./Snippets/index.js";
package/dist/routing.cjs CHANGED
@@ -29,6 +29,7 @@ const routing = {
29
29
  newsroomGalleriesUrl: '/v2/newsrooms/:newsroom_id/galleries',
30
30
  newsroomHubUrl: '/v2/newsrooms/:newsroom_id/hub',
31
31
  notificationSubscriptionsUrl: '/v2/notification-subscriptions',
32
+ pricingTablesUrl: '/v2/pricing-tables/:table_id',
32
33
  senderAddressesUrl: '/v2/sender-addresses',
33
34
  signup: '/v2/signup',
34
35
  storiesUrl: '/v2/stories',
package/dist/routing.d.ts CHANGED
@@ -23,6 +23,7 @@ export declare const routing: {
23
23
  newsroomGalleriesUrl: string;
24
24
  newsroomHubUrl: string;
25
25
  notificationSubscriptionsUrl: string;
26
+ pricingTablesUrl: string;
26
27
  senderAddressesUrl: string;
27
28
  signup: string;
28
29
  storiesUrl: string;
package/dist/routing.js CHANGED
@@ -23,6 +23,7 @@ export const routing = {
23
23
  newsroomGalleriesUrl: '/v2/newsrooms/:newsroom_id/galleries',
24
24
  newsroomHubUrl: '/v2/newsrooms/:newsroom_id/hub',
25
25
  notificationSubscriptionsUrl: '/v2/notification-subscriptions',
26
+ pricingTablesUrl: '/v2/pricing-tables/:table_id',
26
27
  senderAddressesUrl: '/v2/sender-addresses',
27
28
  signup: '/v2/signup',
28
29
  storiesUrl: '/v2/stories',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prezly/sdk",
3
- "version": "14.5.0",
3
+ "version": "14.6.0",
4
4
  "description": "Prezly API SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",