@purpleschool/gptbot 0.8.15 → 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.
@@ -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
- imageUrls: zod_1.z.array(zod_1.z.string()).nullable(),
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
  });
@@ -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
- imageUrls: z.array(z.string()).nullable(),
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
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.8.15",
3
+ "version": "0.8.16",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",