@purpleschool/gptbot 0.8.14 → 0.8.16
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/subscription/create-custom-subscription-plan.command.js +1 -1
- package/build/constants/errors/errors.js +5 -0
- package/build/models/tools/image-editor/image-editor-job.schema.js +7 -1
- package/commands/subscription/create-custom-subscription-plan.command.ts +1 -1
- package/constants/errors/errors.ts +5 -0
- package/models/tools/image-editor/image-editor-job.schema.ts +9 -1
- package/package.json +1 -1
|
@@ -19,6 +19,6 @@ var CreateCustomSubscriptionPlanCommand;
|
|
|
19
19
|
}),
|
|
20
20
|
});
|
|
21
21
|
CreateCustomSubscriptionPlanCommand.ResponseSchema = zod_1.z.object({
|
|
22
|
-
data: models_1.SubscriptionSchema,
|
|
22
|
+
data: zod_1.z.array(models_1.SubscriptionSchema),
|
|
23
23
|
});
|
|
24
24
|
})(CreateCustomSubscriptionPlanCommand || (exports.CreateCustomSubscriptionPlanCommand = CreateCustomSubscriptionPlanCommand = {}));
|
|
@@ -2482,4 +2482,9 @@ exports.ERRORS = {
|
|
|
2482
2482
|
message: 'Произошла ошибка при повторном запросе перефразирования',
|
|
2483
2483
|
httpCode: 500,
|
|
2484
2484
|
},
|
|
2485
|
+
FILES_SAVE_ERROR: {
|
|
2486
|
+
code: 'A507',
|
|
2487
|
+
message: 'Произошла ошибка при сохранении файлов',
|
|
2488
|
+
httpCode: 500,
|
|
2489
|
+
},
|
|
2485
2490
|
};
|
|
@@ -4,6 +4,7 @@ exports.ImageEditorJobSchema = exports.ImageEditorJobParamsSchema = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const constants_1 = require("../../../constants");
|
|
6
6
|
const tool_job_schema_1 = require("../../tool-job.schema");
|
|
7
|
+
const file_schema_1 = require("../../file.schema");
|
|
7
8
|
exports.ImageEditorJobParamsSchema = zod_1.z.object({
|
|
8
9
|
imageUrls: zod_1.z.array(zod_1.z.string()).optional(),
|
|
9
10
|
systemPromptId: zod_1.z.string().optional(),
|
|
@@ -12,7 +13,12 @@ exports.ImageEditorJobSchema = tool_job_schema_1.ToolJobSchema.extend({
|
|
|
12
13
|
title: zod_1.z.string(),
|
|
13
14
|
prompt: zod_1.z.string(),
|
|
14
15
|
reaction: zod_1.z.nativeEnum(constants_1.USER_REACTION).nullable(),
|
|
15
|
-
|
|
16
|
+
images: zod_1.z
|
|
17
|
+
.array(file_schema_1.FileSchema.pick({
|
|
18
|
+
uuid: true,
|
|
19
|
+
url: true,
|
|
20
|
+
}))
|
|
21
|
+
.nullable(),
|
|
16
22
|
params: exports.ImageEditorJobParamsSchema,
|
|
17
23
|
modelId: zod_1.z.string(),
|
|
18
24
|
});
|
|
@@ -19,7 +19,7 @@ export namespace CreateCustomSubscriptionPlanCommand {
|
|
|
19
19
|
export type Request = z.infer<typeof RequestSchema>;
|
|
20
20
|
|
|
21
21
|
export const ResponseSchema = z.object({
|
|
22
|
-
data: SubscriptionSchema,
|
|
22
|
+
data: z.array(SubscriptionSchema),
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
@@ -2490,4 +2490,9 @@ export const ERRORS = {
|
|
|
2490
2490
|
message: 'Произошла ошибка при повторном запросе перефразирования',
|
|
2491
2491
|
httpCode: 500,
|
|
2492
2492
|
},
|
|
2493
|
+
FILES_SAVE_ERROR: {
|
|
2494
|
+
code: 'A507',
|
|
2495
|
+
message: 'Произошла ошибка при сохранении файлов',
|
|
2496
|
+
httpCode: 500,
|
|
2497
|
+
},
|
|
2493
2498
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { USER_REACTION } from '../../../constants';
|
|
3
3
|
import { ToolJobSchema } from '../../tool-job.schema';
|
|
4
|
+
import { FileSchema } from '../../file.schema';
|
|
4
5
|
|
|
5
6
|
export const ImageEditorJobParamsSchema = z.object({
|
|
6
7
|
imageUrls: z.array(z.string()).optional(),
|
|
@@ -13,7 +14,14 @@ export const ImageEditorJobSchema = ToolJobSchema.extend({
|
|
|
13
14
|
title: z.string(),
|
|
14
15
|
prompt: z.string(),
|
|
15
16
|
reaction: z.nativeEnum(USER_REACTION).nullable(),
|
|
16
|
-
|
|
17
|
+
images: z
|
|
18
|
+
.array(
|
|
19
|
+
FileSchema.pick({
|
|
20
|
+
uuid: true,
|
|
21
|
+
url: true,
|
|
22
|
+
}),
|
|
23
|
+
)
|
|
24
|
+
.nullable(),
|
|
17
25
|
params: ImageEditorJobParamsSchema,
|
|
18
26
|
modelId: z.string(),
|
|
19
27
|
});
|