@purpleschool/gptbot 0.7.55 → 0.7.56
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/build/commands/chat/check-limit.command.js +1 -0
- package/build/constants/subscription/enums/subscription-feature-type.enum.js +3 -0
- package/build/models/subscription-feature.schema.js +26 -1
- package/commands/chat/check-limit.command.ts +1 -0
- package/constants/subscription/enums/subscription-feature-type.enum.ts +3 -0
- package/models/subscription-feature.schema.ts +30 -0
- package/package.json +1 -1
|
@@ -11,6 +11,7 @@ var CheckLimitCommand;
|
|
|
11
11
|
subscriptionBalance: zod_1.z.number(),
|
|
12
12
|
productBalance: zod_1.z.number(),
|
|
13
13
|
referralBonusBalance: zod_1.z.number(),
|
|
14
|
+
carriedOverBalance: zod_1.z.number(),
|
|
14
15
|
}),
|
|
15
16
|
});
|
|
16
17
|
})(CheckLimitCommand || (exports.CheckLimitCommand = CheckLimitCommand = {}));
|
|
@@ -18,6 +18,8 @@ var SUBSCRIPTION_FEATURE_TYPE;
|
|
|
18
18
|
SUBSCRIPTION_FEATURE_TYPE["VIDEO_MODEL_ACCESS"] = "video_model_access";
|
|
19
19
|
SUBSCRIPTION_FEATURE_TYPE["EXTENDED_CONTEXT"] = "extended_context";
|
|
20
20
|
SUBSCRIPTION_FEATURE_TYPE["PRESENTATION_QUOTA"] = "presentation_quota";
|
|
21
|
+
SUBSCRIPTION_FEATURE_TYPE["TOKENS"] = "tokens";
|
|
22
|
+
SUBSCRIPTION_FEATURE_TYPE["CARRYOVER_BALANCE"] = "carryover_balance";
|
|
21
23
|
})(SUBSCRIPTION_FEATURE_TYPE || (exports.SUBSCRIPTION_FEATURE_TYPE = SUBSCRIPTION_FEATURE_TYPE = {}));
|
|
22
24
|
var SUBSCRIPTION_FEATURE_KIND;
|
|
23
25
|
(function (SUBSCRIPTION_FEATURE_KIND) {
|
|
@@ -29,4 +31,5 @@ var SUBSCRIPTION_FEATURE_KIND;
|
|
|
29
31
|
SUBSCRIPTION_FEATURE_KIND["PRESENTATIONS"] = "presentations";
|
|
30
32
|
SUBSCRIPTION_FEATURE_KIND["VIDEO"] = "video";
|
|
31
33
|
SUBSCRIPTION_FEATURE_KIND["PRESENTATION"] = "presentation";
|
|
34
|
+
SUBSCRIPTION_FEATURE_KIND["BASE"] = "base";
|
|
32
35
|
})(SUBSCRIPTION_FEATURE_KIND || (exports.SUBSCRIPTION_FEATURE_KIND = SUBSCRIPTION_FEATURE_KIND = {}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SubscriptionFeatureSchema = exports.PresentationQuotaFeatureSchema = exports.VideoModelAccessFeatureSchema = exports.VideoQuotaFeatureSchema = exports.STTQuotaFeatureSchema = exports.STTModelAccessFeatureSchema = exports.TTSQuotaFeatureSchema = exports.ImageGenerationQuotaFeatureSchema = exports.TtsModelAccessFeatureSchema = exports.AdvancedToolsAccessFeatureSchema = exports.WebSearchFeatureSchema = exports.ExtendedContextFeatureSchema = exports.MaxInputLengthFeatureSchema = exports.RequestsQuotaFeatureSchema = exports.AiModelAccessFeatureSchema = exports.SubscriptionFeatureBaseSchema = void 0;
|
|
3
|
+
exports.SubscriptionFeatureSchema = exports.PresentationQuotaFeatureSchema = exports.VideoModelAccessFeatureSchema = exports.VideoQuotaFeatureSchema = exports.STTQuotaFeatureSchema = exports.STTModelAccessFeatureSchema = exports.TTSQuotaFeatureSchema = exports.ImageGenerationQuotaFeatureSchema = exports.TtsModelAccessFeatureSchema = exports.AdvancedToolsAccessFeatureSchema = exports.WebSearchFeatureSchema = exports.ExtendedContextFeatureSchema = exports.MaxInputLengthFeatureSchema = exports.RequestsQuotaFeatureSchema = exports.AiModelAccessFeatureSchema = exports.CarryoverBalanceFeatureSchema = exports.TokensFeatureSchema = exports.SubscriptionFeatureBaseSchema = void 0;
|
|
4
4
|
const constants_1 = require("../constants");
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
exports.SubscriptionFeatureBaseSchema = zod_1.z.object({
|
|
@@ -8,6 +8,29 @@ exports.SubscriptionFeatureBaseSchema = zod_1.z.object({
|
|
|
8
8
|
type: zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_FEATURE_TYPE),
|
|
9
9
|
title: zod_1.z.string(),
|
|
10
10
|
});
|
|
11
|
+
const SubscriptionFeatureIconsSchema = zod_1.z.object({
|
|
12
|
+
light: zod_1.z.object({
|
|
13
|
+
png: zod_1.z.string(),
|
|
14
|
+
svg: zod_1.z.string(),
|
|
15
|
+
}),
|
|
16
|
+
dark: zod_1.z.object({
|
|
17
|
+
png: zod_1.z.string(),
|
|
18
|
+
svg: zod_1.z.string(),
|
|
19
|
+
}),
|
|
20
|
+
});
|
|
21
|
+
exports.TokensFeatureSchema = exports.SubscriptionFeatureBaseSchema.extend({
|
|
22
|
+
kind: zod_1.z.literal(constants_1.SUBSCRIPTION_FEATURE_KIND.BASE),
|
|
23
|
+
type: zod_1.z.literal(constants_1.SUBSCRIPTION_FEATURE_TYPE.TOKENS),
|
|
24
|
+
tokens: zod_1.z.number(),
|
|
25
|
+
icons: SubscriptionFeatureIconsSchema,
|
|
26
|
+
});
|
|
27
|
+
exports.CarryoverBalanceFeatureSchema = exports.SubscriptionFeatureBaseSchema.extend({
|
|
28
|
+
kind: zod_1.z.literal(constants_1.SUBSCRIPTION_FEATURE_KIND.BASE),
|
|
29
|
+
type: zod_1.z.literal(constants_1.SUBSCRIPTION_FEATURE_TYPE.CARRYOVER_BALANCE),
|
|
30
|
+
isAvailable: zod_1.z.boolean(),
|
|
31
|
+
tooltip: zod_1.z.string(),
|
|
32
|
+
icons: SubscriptionFeatureIconsSchema,
|
|
33
|
+
});
|
|
11
34
|
exports.AiModelAccessFeatureSchema = exports.SubscriptionFeatureBaseSchema.extend({
|
|
12
35
|
type: zod_1.z.literal(constants_1.SUBSCRIPTION_FEATURE_TYPE.AI_MODEL_ACCESS),
|
|
13
36
|
kind: zod_1.z.literal(constants_1.SUBSCRIPTION_FEATURE_KIND.AI_MODEL),
|
|
@@ -102,4 +125,6 @@ exports.SubscriptionFeatureSchema = zod_1.z.union([
|
|
|
102
125
|
exports.VideoModelAccessFeatureSchema,
|
|
103
126
|
exports.ExtendedContextFeatureSchema,
|
|
104
127
|
exports.PresentationQuotaFeatureSchema,
|
|
128
|
+
exports.TokensFeatureSchema,
|
|
129
|
+
exports.CarryoverBalanceFeatureSchema,
|
|
105
130
|
]);
|
|
@@ -14,6 +14,8 @@ export enum SUBSCRIPTION_FEATURE_TYPE {
|
|
|
14
14
|
VIDEO_MODEL_ACCESS = 'video_model_access',
|
|
15
15
|
EXTENDED_CONTEXT = 'extended_context',
|
|
16
16
|
PRESENTATION_QUOTA = 'presentation_quota',
|
|
17
|
+
TOKENS = 'tokens',
|
|
18
|
+
CARRYOVER_BALANCE = 'carryover_balance',
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
export enum SUBSCRIPTION_FEATURE_KIND {
|
|
@@ -25,4 +27,5 @@ export enum SUBSCRIPTION_FEATURE_KIND {
|
|
|
25
27
|
PRESENTATIONS = 'presentations',
|
|
26
28
|
VIDEO = 'video',
|
|
27
29
|
PRESENTATION = 'presentation',
|
|
30
|
+
BASE = 'base',
|
|
28
31
|
}
|
|
@@ -12,6 +12,34 @@ export const SubscriptionFeatureBaseSchema = z.object({
|
|
|
12
12
|
});
|
|
13
13
|
export type SubscriptionFeatureBase = z.infer<typeof SubscriptionFeatureBaseSchema>;
|
|
14
14
|
|
|
15
|
+
const SubscriptionFeatureIconsSchema = z.object({
|
|
16
|
+
light: z.object({
|
|
17
|
+
png: z.string(),
|
|
18
|
+
svg: z.string(),
|
|
19
|
+
}),
|
|
20
|
+
dark: z.object({
|
|
21
|
+
png: z.string(),
|
|
22
|
+
svg: z.string(),
|
|
23
|
+
}),
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
export const TokensFeatureSchema = SubscriptionFeatureBaseSchema.extend({
|
|
27
|
+
kind: z.literal(SUBSCRIPTION_FEATURE_KIND.BASE),
|
|
28
|
+
type: z.literal(SUBSCRIPTION_FEATURE_TYPE.TOKENS),
|
|
29
|
+
tokens: z.number(),
|
|
30
|
+
icons: SubscriptionFeatureIconsSchema,
|
|
31
|
+
});
|
|
32
|
+
export type TokensFeature = z.infer<typeof TokensFeatureSchema>;
|
|
33
|
+
|
|
34
|
+
export const CarryoverBalanceFeatureSchema = SubscriptionFeatureBaseSchema.extend({
|
|
35
|
+
kind: z.literal(SUBSCRIPTION_FEATURE_KIND.BASE),
|
|
36
|
+
type: z.literal(SUBSCRIPTION_FEATURE_TYPE.CARRYOVER_BALANCE),
|
|
37
|
+
isAvailable: z.boolean(),
|
|
38
|
+
tooltip: z.string(),
|
|
39
|
+
icons: SubscriptionFeatureIconsSchema,
|
|
40
|
+
});
|
|
41
|
+
export type CarryoverBalanceFeature = z.infer<typeof CarryoverBalanceFeatureSchema>;
|
|
42
|
+
|
|
15
43
|
export const AiModelAccessFeatureSchema = SubscriptionFeatureBaseSchema.extend({
|
|
16
44
|
type: z.literal(SUBSCRIPTION_FEATURE_TYPE.AI_MODEL_ACCESS),
|
|
17
45
|
kind: z.literal(SUBSCRIPTION_FEATURE_KIND.AI_MODEL),
|
|
@@ -134,6 +162,8 @@ export const SubscriptionFeatureSchema = z.union([
|
|
|
134
162
|
VideoModelAccessFeatureSchema,
|
|
135
163
|
ExtendedContextFeatureSchema,
|
|
136
164
|
PresentationQuotaFeatureSchema,
|
|
165
|
+
TokensFeatureSchema,
|
|
166
|
+
CarryoverBalanceFeatureSchema,
|
|
137
167
|
]);
|
|
138
168
|
|
|
139
169
|
export type SubscriptionFeature = z.infer<typeof SubscriptionFeatureSchema>;
|