@shaxpir/duiduidui-models 1.36.1 → 1.36.2
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/models/Billing.d.ts
CHANGED
|
@@ -44,6 +44,7 @@ export interface BillingPayload {
|
|
|
44
44
|
grant_note: string | null;
|
|
45
45
|
feature_grants: Record<string, FeatureGrant>;
|
|
46
46
|
redeemed_codes: string[];
|
|
47
|
+
usage_ceilings: Record<string, number>;
|
|
47
48
|
transactions: Transaction[];
|
|
48
49
|
}
|
|
49
50
|
export interface BillingBody extends ContentBody {
|
|
@@ -62,6 +63,8 @@ export declare class Billing extends Content {
|
|
|
62
63
|
get featureGrants(): Record<string, FeatureGrant>;
|
|
63
64
|
get redeemedCodes(): string[];
|
|
64
65
|
get transactions(): Transaction[];
|
|
66
|
+
get usageCeilings(): Record<string, number>;
|
|
67
|
+
getUsageCeiling(usageName: string): number;
|
|
65
68
|
isActive(): boolean;
|
|
66
69
|
isTrialing(): boolean;
|
|
67
70
|
isLifetimeFree(): boolean;
|
package/dist/models/Billing.js
CHANGED
|
@@ -24,6 +24,7 @@ class Billing extends Content_1.Content {
|
|
|
24
24
|
grant_note: null,
|
|
25
25
|
feature_grants: {},
|
|
26
26
|
redeemed_codes: [],
|
|
27
|
+
usage_ceilings: {},
|
|
27
28
|
transactions: []
|
|
28
29
|
};
|
|
29
30
|
}
|
|
@@ -69,6 +70,12 @@ class Billing extends Content_1.Content {
|
|
|
69
70
|
get transactions() {
|
|
70
71
|
return this.payload.transactions ?? [];
|
|
71
72
|
}
|
|
73
|
+
get usageCeilings() {
|
|
74
|
+
return this.payload.usage_ceilings ?? {};
|
|
75
|
+
}
|
|
76
|
+
getUsageCeiling(usageName) {
|
|
77
|
+
return this.usageCeilings[usageName] ?? 0;
|
|
78
|
+
}
|
|
72
79
|
isActive() {
|
|
73
80
|
const status = this.subscriptionStatus;
|
|
74
81
|
return status === 'active' || status === 'trialing' || status === 'grace_period';
|