@purpleschool/gptbot 0.5.57 → 0.5.59
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/ai-model/create-ai-model.command.js +1 -1
- package/build/commands/ai-model/update-ai-model.command.js +1 -1
- package/build/commands/chat/get-input-limits.command.js +5 -1
- package/build/commands/ui-notification/find-active-ui-notifications-by-page-and-user.command.js +2 -6
- package/build/models/ai-model.schema.js +5 -3
- package/build/models/subscription-feature.schema.js +1 -0
- package/build/models/ui-notification.schema.js +6 -2
- package/commands/ai-model/create-ai-model.command.ts +2 -2
- package/commands/ai-model/update-ai-model.command.ts +2 -2
- package/commands/chat/get-input-limits.command.ts +7 -1
- package/commands/ui-notification/find-active-ui-notifications-by-page-and-user.command.ts +2 -8
- package/models/ai-model.schema.ts +5 -2
- package/models/subscription-feature.schema.ts +1 -0
- package/models/ui-notification.schema.ts +6 -2
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ const models_1 = require("../../models");
|
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
var CreateAIModelCommand;
|
|
7
7
|
(function (CreateAIModelCommand) {
|
|
8
|
-
CreateAIModelCommand.RequestSchema = models_1.
|
|
8
|
+
CreateAIModelCommand.RequestSchema = models_1.CreateAiModelSchema.omit({
|
|
9
9
|
uuid: true,
|
|
10
10
|
createdAt: true,
|
|
11
11
|
updatedAt: true,
|
|
@@ -5,7 +5,7 @@ const models_1 = require("../../models");
|
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
var UpdateAIModelCommand;
|
|
7
7
|
(function (UpdateAIModelCommand) {
|
|
8
|
-
UpdateAIModelCommand.RequestSchema = models_1.
|
|
8
|
+
UpdateAIModelCommand.RequestSchema = models_1.CreateAiModelSchema.omit({
|
|
9
9
|
createdAt: true,
|
|
10
10
|
updatedAt: true,
|
|
11
11
|
uuid: true,
|
|
@@ -6,8 +6,12 @@ var GetInputLimitsCommand;
|
|
|
6
6
|
(function (GetInputLimitsCommand) {
|
|
7
7
|
GetInputLimitsCommand.ResponseSchema = zod_1.z.object({
|
|
8
8
|
data: zod_1.z.object({
|
|
9
|
-
maxInputTokens: zod_1.z.number(),
|
|
10
9
|
maxInputLength: zod_1.z.number(),
|
|
10
|
+
models: zod_1.z.array(zod_1.z.object({
|
|
11
|
+
uuid: zod_1.z.string().uuid(),
|
|
12
|
+
title: zod_1.z.string(),
|
|
13
|
+
maxInputLength: zod_1.z.number(),
|
|
14
|
+
})),
|
|
11
15
|
}),
|
|
12
16
|
});
|
|
13
17
|
})(GetInputLimitsCommand || (exports.GetInputLimitsCommand = GetInputLimitsCommand = {}));
|
package/build/commands/ui-notification/find-active-ui-notifications-by-page-and-user.command.js
CHANGED
|
@@ -2,17 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FindActiveUiNotificationsByPageAndUserCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../models");
|
|
5
6
|
var FindActiveUiNotificationsByPageAndUserCommand;
|
|
6
7
|
(function (FindActiveUiNotificationsByPageAndUserCommand) {
|
|
7
8
|
FindActiveUiNotificationsByPageAndUserCommand.RequestQuerySchema = zod_1.z.object({
|
|
8
9
|
page: zod_1.z.string(),
|
|
9
10
|
});
|
|
10
11
|
FindActiveUiNotificationsByPageAndUserCommand.ResponseSchema = zod_1.z.object({
|
|
11
|
-
data: zod_1.z.array(
|
|
12
|
-
uuid: zod_1.z.string().uuid(),
|
|
13
|
-
dynamicUiContent: zod_1.z.record(zod_1.z.unknown()),
|
|
14
|
-
endDate: zod_1.z.date().nullable(),
|
|
15
|
-
serverTime: zod_1.z.date().optional(),
|
|
16
|
-
})),
|
|
12
|
+
data: zod_1.z.array(models_1.uiNotificationSchema),
|
|
17
13
|
});
|
|
18
14
|
})(FindActiveUiNotificationsByPageAndUserCommand || (exports.FindActiveUiNotificationsByPageAndUserCommand = FindActiveUiNotificationsByPageAndUserCommand = {}));
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AiModelWithUnlockedBySchema = exports.AiModelSchema = void 0;
|
|
3
|
+
exports.AiModelWithUnlockedBySchema = exports.CreateAiModelSchema = exports.AiModelSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
exports.AiModelSchema = zod_1.z.object({
|
|
7
7
|
uuid: zod_1.z.string().uuid(),
|
|
8
8
|
title: zod_1.z.string(),
|
|
9
9
|
description: zod_1.z.nullable(zod_1.z.string()),
|
|
10
|
-
model: zod_1.z.string(),
|
|
11
10
|
isPremium: zod_1.z.boolean(),
|
|
12
11
|
tokenMultiplicator: zod_1.z.number(),
|
|
13
12
|
order: zod_1.z.number(),
|
|
@@ -17,10 +16,13 @@ exports.AiModelSchema = zod_1.z.object({
|
|
|
17
16
|
contentType: zod_1.z.enum(Object.values(constants_1.AI_MODEL_CONTENT_TYPE)),
|
|
18
17
|
features: zod_1.z.array(zod_1.z.nativeEnum(constants_1.AI_MODEL_FEATURE)),
|
|
19
18
|
maxInputLength: zod_1.z.number(),
|
|
20
|
-
maxInputTokens: zod_1.z.number(),
|
|
21
19
|
createdAt: zod_1.z.date(),
|
|
22
20
|
updatedAt: zod_1.z.date(),
|
|
23
21
|
});
|
|
22
|
+
exports.CreateAiModelSchema = exports.AiModelSchema.extend({
|
|
23
|
+
model: zod_1.z.string(),
|
|
24
|
+
maxInputTokens: zod_1.z.number(),
|
|
25
|
+
});
|
|
24
26
|
exports.AiModelWithUnlockedBySchema = exports.AiModelSchema.extend({
|
|
25
27
|
unlockedBy: zod_1.z
|
|
26
28
|
.object({
|
|
@@ -14,6 +14,7 @@ exports.AiModelAccessFeatureSchema = exports.SubscriptionFeatureBaseSchema.exten
|
|
|
14
14
|
isAvailable: zod_1.z.boolean(),
|
|
15
15
|
order: zod_1.z.number(),
|
|
16
16
|
contentType: zod_1.z.nativeEnum(constants_1.AI_MODEL_CONTENT_TYPE),
|
|
17
|
+
maxInputLength: zod_1.z.number(),
|
|
17
18
|
}),
|
|
18
19
|
});
|
|
19
20
|
exports.RequestsQuotaFeatureSchema = exports.SubscriptionFeatureBaseSchema.extend({
|
|
@@ -3,8 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.uiNotificationSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.uiNotificationSchema = zod_1.z.object({
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
uuid: zod_1.z.string().uuid(),
|
|
7
|
+
type: zod_1.z.string(),
|
|
8
|
+
dynamicUiContent: zod_1.z.record(zod_1.z.unknown()),
|
|
9
|
+
userId: zod_1.z.string().nullable(),
|
|
10
|
+
status: zod_1.z.string(),
|
|
11
|
+
conditionOfExecution: zod_1.z.string(),
|
|
8
12
|
endDate: zod_1.z.date().nullable(),
|
|
9
13
|
serverTime: zod_1.z.date().optional(),
|
|
10
14
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { AiModelSchema } from '../../models';
|
|
1
|
+
import { AiModelSchema, CreateAiModelSchema } from '../../models';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
export namespace CreateAIModelCommand {
|
|
5
|
-
export const RequestSchema =
|
|
5
|
+
export const RequestSchema = CreateAiModelSchema.omit({
|
|
6
6
|
uuid: true,
|
|
7
7
|
createdAt: true,
|
|
8
8
|
updatedAt: true,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { AiModelSchema } from '../../models';
|
|
1
|
+
import { AiModelSchema, CreateAiModelSchema } from '../../models';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
export namespace UpdateAIModelCommand {
|
|
5
|
-
export const RequestSchema =
|
|
5
|
+
export const RequestSchema = CreateAiModelSchema.omit({
|
|
6
6
|
createdAt: true,
|
|
7
7
|
updatedAt: true,
|
|
8
8
|
uuid: true,
|
|
@@ -3,8 +3,14 @@ import { z } from 'zod';
|
|
|
3
3
|
export namespace GetInputLimitsCommand {
|
|
4
4
|
export const ResponseSchema = z.object({
|
|
5
5
|
data: z.object({
|
|
6
|
-
maxInputTokens: z.number(),
|
|
7
6
|
maxInputLength: z.number(),
|
|
7
|
+
models: z.array(
|
|
8
|
+
z.object({
|
|
9
|
+
uuid: z.string().uuid(),
|
|
10
|
+
title: z.string(),
|
|
11
|
+
maxInputLength: z.number(),
|
|
12
|
+
}),
|
|
13
|
+
),
|
|
8
14
|
}),
|
|
9
15
|
});
|
|
10
16
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { uiNotificationSchema } from '../../models';
|
|
2
3
|
|
|
3
4
|
export namespace FindActiveUiNotificationsByPageAndUserCommand {
|
|
4
5
|
export const RequestQuerySchema = z.object({
|
|
@@ -8,14 +9,7 @@ export namespace FindActiveUiNotificationsByPageAndUserCommand {
|
|
|
8
9
|
export type Request = z.infer<typeof RequestQuerySchema>;
|
|
9
10
|
|
|
10
11
|
export const ResponseSchema = z.object({
|
|
11
|
-
data: z.array(
|
|
12
|
-
z.object({
|
|
13
|
-
uuid: z.string().uuid(),
|
|
14
|
-
dynamicUiContent: z.record(z.unknown()),
|
|
15
|
-
endDate: z.date().nullable(),
|
|
16
|
-
serverTime: z.date().optional(),
|
|
17
|
-
}),
|
|
18
|
-
),
|
|
12
|
+
data: z.array(uiNotificationSchema),
|
|
19
13
|
});
|
|
20
14
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
21
15
|
}
|
|
@@ -10,7 +10,6 @@ export const AiModelSchema = z.object({
|
|
|
10
10
|
uuid: z.string().uuid(),
|
|
11
11
|
title: z.string(),
|
|
12
12
|
description: z.nullable(z.string()),
|
|
13
|
-
model: z.string(),
|
|
14
13
|
isPremium: z.boolean(),
|
|
15
14
|
tokenMultiplicator: z.number(),
|
|
16
15
|
order: z.number(),
|
|
@@ -20,11 +19,15 @@ export const AiModelSchema = z.object({
|
|
|
20
19
|
contentType: z.enum(Object.values(AI_MODEL_CONTENT_TYPE) as [TAIModelContentTypeEnum]),
|
|
21
20
|
features: z.array(z.nativeEnum(AI_MODEL_FEATURE)),
|
|
22
21
|
maxInputLength: z.number(),
|
|
23
|
-
maxInputTokens: z.number(),
|
|
24
22
|
createdAt: z.date(),
|
|
25
23
|
updatedAt: z.date(),
|
|
26
24
|
});
|
|
27
25
|
|
|
26
|
+
export const CreateAiModelSchema = AiModelSchema.extend({
|
|
27
|
+
model: z.string(),
|
|
28
|
+
maxInputTokens: z.number(),
|
|
29
|
+
});
|
|
30
|
+
|
|
28
31
|
export const AiModelWithUnlockedBySchema = AiModelSchema.extend({
|
|
29
32
|
unlockedBy: z
|
|
30
33
|
.object({
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
3
|
export const uiNotificationSchema = z.object({
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
uuid: z.string().uuid(),
|
|
5
|
+
type: z.string(),
|
|
6
|
+
dynamicUiContent: z.record(z.unknown()),
|
|
7
|
+
userId: z.string().nullable(),
|
|
8
|
+
status: z.string(),
|
|
9
|
+
conditionOfExecution: z.string(),
|
|
6
10
|
endDate: z.date().nullable(),
|
|
7
11
|
serverTime: z.date().optional(),
|
|
8
12
|
});
|