@prezly/sdk 22.5.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.
- package/dist/api/constants.cjs +1 -1
- package/dist/api/constants.js +1 -1
- package/dist/endpoints/Stories/Client.d.ts +1 -1
- package/dist/types/Plan.d.ts +5 -1
- package/dist/types/Price.cjs +16 -0
- package/dist/types/Price.d.ts +13 -0
- package/dist/types/Price.js +10 -0
- package/dist/types/index.cjs +11 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/package.json +1 -1
package/dist/api/constants.cjs
CHANGED
|
@@ -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.
|
|
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})`;
|
package/dist/api/constants.js
CHANGED
|
@@ -14,7 +14,7 @@ type Exactly<Concrete, Abstract> = Concrete & Record<Exclude<keyof Concrete, key
|
|
|
14
14
|
type InferExtraFields<T> = T extends Required<IncludeOptions<infer I>> ? Pick<Story.ExtraFields, I> : unknown;
|
|
15
15
|
export type Client = ReturnType<typeof createClient>;
|
|
16
16
|
export declare function createClient(api: DeferredJobsApiClient): {
|
|
17
|
-
list: <Options extends ListOptions<keyof Story.ExtraFields>>(options?: Exactly<Options, ListOptions
|
|
17
|
+
list: <Options extends ListOptions<keyof Story.ExtraFields>>(options?: Exactly<Options, ListOptions<keyof Story.ExtraFields>> | undefined) => Promise<ListResponse<Story & InferExtraFields<Options>>>;
|
|
18
18
|
search: <Options_1 extends SearchOptions<keyof Story.ExtraFields>>(options?: Exactly<Options_1, SearchOptions<keyof Story.ExtraFields>> | undefined) => Promise<ListResponse<Story & InferExtraFields<Options_1>>>;
|
|
19
19
|
get: {
|
|
20
20
|
<Options_2 extends IncludeOptions<keyof Story.ExtraFields> & {
|
package/dist/types/Plan.d.ts
CHANGED
|
@@ -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
|
-
|
|
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
|
+
}({});
|
package/dist/types/index.cjs
CHANGED
|
@@ -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;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -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';
|
package/dist/types/index.js
CHANGED
|
@@ -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";
|