@prezly/sdk 15.6.0 → 15.7.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,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.DEFAULT_USER_AGENT = void 0;
7
- const VERSION = "15.5.0";
7
+ const VERSION = "15.6.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 = "15.5.0";
1
+ const VERSION = "15.6.0";
2
2
  const URL = 'https://github.com/prezly/javascript-sdk';
3
3
  export const DEFAULT_USER_AGENT = `prezly-javascript-sdk/${VERSION} (+${URL})`;
@@ -1,8 +1,9 @@
1
1
  import type { DeferredJobsApiClient } from '../../api';
2
2
  import type { PricingTable } from './types';
3
+ import type { TableId } from './types';
3
4
  export declare class Client {
4
5
  private readonly apiClient;
5
6
  constructor(apiClient: DeferredJobsApiClient);
6
7
  list(): Promise<PricingTable[]>;
7
- get(tableId: 'standard'): Promise<PricingTable>;
8
+ get(tableId: TableId.STANDARD): Promise<PricingTable>;
8
9
  }
@@ -3,7 +3,13 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.OptionId = void 0;
6
+ exports.AddOnId = exports.LimitId = exports.OptionId = exports.TableId = void 0;
7
+ let TableId;
8
+ exports.TableId = TableId;
9
+ (function (TableId) {
10
+ TableId["STANDARD"] = "standard";
11
+ TableId["AGENCY"] = "agency";
12
+ })(TableId || (exports.TableId = TableId = {}));
7
13
  let OptionId;
8
14
  exports.OptionId = OptionId;
9
15
  (function (OptionId) {
@@ -15,4 +21,19 @@ exports.OptionId = OptionId;
15
21
  OptionId["AGENCY_MEDIUM"] = "agency_medium";
16
22
  OptionId["AGENCY_LARGE"] = "agency_large";
17
23
  OptionId["AGENCY_HUGE"] = "agency_huge";
18
- })(OptionId || (exports.OptionId = OptionId = {}));
24
+ })(OptionId || (exports.OptionId = OptionId = {}));
25
+ let LimitId;
26
+ exports.LimitId = LimitId;
27
+ (function (LimitId) {
28
+ LimitId["STORIES"] = "stories";
29
+ LimitId["USERS"] = "users";
30
+ LimitId["SITES"] = "sites";
31
+ LimitId["CONTACTS"] = "contacts";
32
+ LimitId["EMAIL_SENDS"] = "email_sends";
33
+ LimitId["CUSTOM_SENDER_ADDRESSES"] = "custom_sender_addresses";
34
+ })(LimitId || (exports.LimitId = LimitId = {}));
35
+ let AddOnId;
36
+ exports.AddOnId = AddOnId;
37
+ (function (AddOnId) {
38
+ AddOnId["SITE"] = "site";
39
+ })(AddOnId || (exports.AddOnId = AddOnId = {}));
@@ -1,7 +1,12 @@
1
1
  export interface PricingTable {
2
+ id: TableId;
2
3
  options: Option[];
3
4
  rows: Row[];
4
5
  }
6
+ export declare enum TableId {
7
+ STANDARD = "standard",
8
+ AGENCY = "agency"
9
+ }
5
10
  export interface Option {
6
11
  id: OptionId;
7
12
  display_name: string;
@@ -26,11 +31,19 @@ export interface PlanFeatureRef {
26
31
  details?: string;
27
32
  }
28
33
  export interface Limit {
29
- id: string;
34
+ id: LimitId;
30
35
  display_name: string;
31
36
  value: null | number;
32
37
  per: null | string;
33
38
  }
39
+ export declare enum LimitId {
40
+ STORIES = "stories",
41
+ USERS = "users",
42
+ SITES = "sites",
43
+ CONTACTS = "contacts",
44
+ EMAIL_SENDS = "email_sends",
45
+ CUSTOM_SENDER_ADDRESSES = "custom_sender_addresses"
46
+ }
34
47
  export interface Price {
35
48
  billing_cycle: string;
36
49
  currency: string;
@@ -38,10 +51,13 @@ export interface Price {
38
51
  unit: string | null;
39
52
  }
40
53
  export interface AddOn {
41
- id: string;
54
+ id: AddOnId;
42
55
  display_name: string;
43
56
  prices: Price[];
44
57
  }
58
+ export declare enum AddOnId {
59
+ SITE = "site"
60
+ }
45
61
  export interface Row {
46
62
  display_name: string;
47
63
  description: string | null;
@@ -1,3 +1,8 @@
1
+ export let TableId;
2
+ (function (TableId) {
3
+ TableId["STANDARD"] = "standard";
4
+ TableId["AGENCY"] = "agency";
5
+ })(TableId || (TableId = {}));
1
6
  export let OptionId;
2
7
  (function (OptionId) {
3
8
  OptionId["STARTER"] = "starter";
@@ -8,4 +13,17 @@ export let OptionId;
8
13
  OptionId["AGENCY_MEDIUM"] = "agency_medium";
9
14
  OptionId["AGENCY_LARGE"] = "agency_large";
10
15
  OptionId["AGENCY_HUGE"] = "agency_huge";
11
- })(OptionId || (OptionId = {}));
16
+ })(OptionId || (OptionId = {}));
17
+ export let LimitId;
18
+ (function (LimitId) {
19
+ LimitId["STORIES"] = "stories";
20
+ LimitId["USERS"] = "users";
21
+ LimitId["SITES"] = "sites";
22
+ LimitId["CONTACTS"] = "contacts";
23
+ LimitId["EMAIL_SENDS"] = "email_sends";
24
+ LimitId["CUSTOM_SENDER_ADDRESSES"] = "custom_sender_addresses";
25
+ })(LimitId || (LimitId = {}));
26
+ export let AddOnId;
27
+ (function (AddOnId) {
28
+ AddOnId["SITE"] = "site";
29
+ })(AddOnId || (AddOnId = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prezly/sdk",
3
- "version": "15.6.0",
3
+ "version": "15.7.0",
4
4
  "description": "Prezly API SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",