@prezly/sdk 14.6.0 → 15.0.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/api/constants.cjs +1 -1
- package/dist/api/constants.js +1 -1
- package/dist/endpoints/Billing/Client.cjs +6 -0
- package/dist/endpoints/Billing/Client.d.ts +2 -0
- package/dist/endpoints/Billing/Client.js +6 -0
- package/dist/types/License.d.ts +2 -9
- package/dist/types/Plan.cjs +1 -1
- package/dist/types/Plan.d.ts +20 -0
- package/dist/types/Plan.js +1 -0
- package/package.json +1 -1
package/dist/api/constants.cjs
CHANGED
|
@@ -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.
|
|
7
|
+
const VERSION = "14.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;
|
package/dist/api/constants.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { DeferredJobsApiClient } from '../../api';
|
|
2
|
+
import type { Plan } from '../../types';
|
|
2
3
|
import type { SignupRequest, SignupResponse } from './types';
|
|
3
4
|
export declare class Client {
|
|
4
5
|
private readonly apiClient;
|
|
5
6
|
constructor(apiClient: DeferredJobsApiClient);
|
|
6
7
|
signup(payload: SignupRequest): Promise<SignupResponse>;
|
|
8
|
+
getPlan(): Promise<Plan>;
|
|
7
9
|
}
|
package/dist/types/License.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Currency } from './Currency';
|
|
2
|
-
import type { PlanLevel } from './Plan';
|
|
2
|
+
import type { PlanLevel, PlanReference } from './Plan';
|
|
3
3
|
export interface LicenseRef {
|
|
4
4
|
id: number;
|
|
5
5
|
display_name: string;
|
|
@@ -60,7 +60,7 @@ export interface License extends LicenseRef {
|
|
|
60
60
|
* use "plan" instead.
|
|
61
61
|
*/
|
|
62
62
|
plan_level: PlanLevel | null;
|
|
63
|
-
plan:
|
|
63
|
+
plan: PlanReference | null;
|
|
64
64
|
status: License.Status;
|
|
65
65
|
subscription_lockout: boolean;
|
|
66
66
|
/**
|
|
@@ -108,11 +108,4 @@ export declare namespace License {
|
|
|
108
108
|
CANCELED = "canceled",
|
|
109
109
|
UNPAID = "unpaid"
|
|
110
110
|
}
|
|
111
|
-
interface Plan {
|
|
112
|
-
display_name: string | null;
|
|
113
|
-
description: string | null;
|
|
114
|
-
is_legacy: boolean;
|
|
115
|
-
is_superior: boolean;
|
|
116
|
-
pricing_table_option_id: string | null;
|
|
117
|
-
}
|
|
118
111
|
}
|
package/dist/types/Plan.cjs
CHANGED
package/dist/types/Plan.d.ts
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
import type { Limit } from '../endpoints/PricingTables';
|
|
2
|
+
export interface PlanReference {
|
|
3
|
+
display_name: string;
|
|
4
|
+
description: string | null;
|
|
5
|
+
is_legacy: boolean;
|
|
6
|
+
is_deprecated: boolean;
|
|
7
|
+
is_superior: boolean;
|
|
8
|
+
is_trial: boolean;
|
|
9
|
+
pricing_table_option_id: string | null;
|
|
10
|
+
}
|
|
11
|
+
export interface Plan extends PlanReference {
|
|
12
|
+
billing_cycle: string;
|
|
13
|
+
currency: string;
|
|
14
|
+
usage: Usage[];
|
|
15
|
+
}
|
|
16
|
+
export interface Usage {
|
|
17
|
+
limit: Limit;
|
|
18
|
+
used: number;
|
|
19
|
+
}
|
|
20
|
+
/** @deprecated Will be dropped in future */
|
|
1
21
|
export declare enum PlanLevel {
|
|
2
22
|
BASIC = "basic",
|
|
3
23
|
CORE = "core",
|
package/dist/types/Plan.js
CHANGED