@purpleschool/gptbot 0.8.67 → 0.8.69

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.
@@ -2,14 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SendReportToCommunityPostCommand = void 0;
4
4
  const zod_1 = require("zod");
5
- const constants_1 = require("../../constants");
6
5
  var SendReportToCommunityPostCommand;
7
6
  (function (SendReportToCommunityPostCommand) {
8
7
  SendReportToCommunityPostCommand.RequestSchema = zod_1.z.object({
9
8
  uuid: zod_1.z.string().uuid(),
10
9
  });
11
10
  SendReportToCommunityPostCommand.RequestBodySchema = zod_1.z.object({
12
- reason: zod_1.z.nativeEnum(constants_1.COMMUNITY_POST_REPORT_REASON),
11
+ reason: zod_1.z.string().min(4, 'Пожалуйста, укажите причину жалобы максимально подробно.'),
13
12
  });
14
13
  SendReportToCommunityPostCommand.ResponseSchema = zod_1.z.void();
15
14
  })(SendReportToCommunityPostCommand || (exports.SendReportToCommunityPostCommand = SendReportToCommunityPostCommand = {}));
@@ -11,7 +11,7 @@ exports.ImageCommunityMediaSchema = zod_1.z.object({
11
11
  type: zod_1.z.literal(constants_1.COMMUNITY_POST_TYPE.IMAGE),
12
12
  text: zod_1.z.string().max(10000),
13
13
  files: zod_1.z.array(file_schema_1.FileSchema.pick({ url: true })),
14
- imageFormat: zod_1.z.nativeEnum(constants_1.IMAGE_FORMAT).nullable(),
14
+ aspectRatio: zod_1.z.string().nullable().optional().default(null),
15
15
  });
16
16
  exports.ImageEditorCommunityMediaSchema = zod_1.z.object({
17
17
  type: zod_1.z.literal(constants_1.COMMUNITY_POST_TYPE.IMAGE_EDITOR),
@@ -17,8 +17,7 @@ exports.CommunityPostSchema = zod_1.z.object({
17
17
  aiModelId: zod_1.z.string().uuid(),
18
18
  aiModelTitle: zod_1.z.string(),
19
19
  aiModelIcons: icon_variants_schema_1.IconVariantsSchema,
20
- messageId: zod_1.z.string().nullable(),
21
- toolJobId: zod_1.z.string().nullable(),
20
+ toolJobId: zod_1.z.string(),
22
21
  toolType: zod_1.z.nativeEnum(constants_1.COMMUNITY_TOOL_TYPE).nullable(),
23
22
  views: zod_1.z.number(),
24
23
  likesCount: zod_1.z.number(),
@@ -39,6 +38,7 @@ exports.ResponseCommunityPostSchema = zod_1.z.object({
39
38
  aiModelId: zod_1.z.string().uuid(),
40
39
  aiModelTitle: zod_1.z.string(),
41
40
  aiModelIcons: icon_variants_schema_1.IconVariantsSchema,
41
+ toolJobId: zod_1.z.string(),
42
42
  views: zod_1.z.number(),
43
43
  likesCount: zod_1.z.number(),
44
44
  publishedAt: zod_1.z.date().nullable(),
@@ -51,6 +51,7 @@ exports.ResponseCommunityPostWithRelationsSchema = zod_1.z.object({
51
51
  visibility: zod_1.z.nativeEnum(constants_1.COMMUNITY_POST_VISIBILITY),
52
52
  type: zod_1.z.nativeEnum(constants_1.COMMUNITY_POST_TYPE),
53
53
  mediaData: community_post_media_data_schema_1.CommunityPostMediaDataSchema,
54
+ toolJobId: zod_1.z.string(),
54
55
  aiModelId: zod_1.z.string().uuid(),
55
56
  aiModelTitle: zod_1.z.string(),
56
57
  aiModelIcons: icon_variants_schema_1.IconVariantsSchema,
@@ -1,5 +1,4 @@
1
1
  import { z } from 'zod';
2
- import { COMMUNITY_POST_REPORT_REASON } from '../../constants';
3
2
 
4
3
  export namespace SendReportToCommunityPostCommand {
5
4
  export const RequestSchema = z.object({
@@ -8,7 +7,7 @@ export namespace SendReportToCommunityPostCommand {
8
7
  export type Request = z.infer<typeof RequestSchema>;
9
8
 
10
9
  export const RequestBodySchema = z.object({
11
- reason: z.nativeEnum(COMMUNITY_POST_REPORT_REASON),
10
+ reason: z.string().min(4, 'Пожалуйста, укажите причину жалобы максимально подробно.'),
12
11
  });
13
12
  export type RequestBody = z.infer<typeof RequestBodySchema>;
14
13
 
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { COMMUNITY_POST_TYPE, IMAGE_FORMAT } from '../../constants';
2
+ import { COMMUNITY_POST_TYPE } from '../../constants';
3
3
  import { MusicTrackSchema } from '../tools/music/music-track.schema';
4
4
  import { VideoJobParamsSchema } from '../tools/video/video-job.schema';
5
5
  import { FileSchema } from '../file.schema';
@@ -9,7 +9,7 @@ export const ImageCommunityMediaSchema = z.object({
9
9
  type: z.literal(COMMUNITY_POST_TYPE.IMAGE),
10
10
  text: z.string().max(10000),
11
11
  files: z.array(FileSchema.pick({ url: true })),
12
- imageFormat: z.nativeEnum(IMAGE_FORMAT).nullable(),
12
+ aspectRatio: z.string().nullable().optional().default(null),
13
13
  });
14
14
 
15
15
  export const ImageEditorCommunityMediaSchema = z.object({
@@ -20,8 +20,7 @@ export const CommunityPostSchema = z.object({
20
20
  aiModelId: z.string().uuid(),
21
21
  aiModelTitle: z.string(),
22
22
  aiModelIcons: IconVariantsSchema,
23
- messageId: z.string().nullable(),
24
- toolJobId: z.string().nullable(),
23
+ toolJobId: z.string(),
25
24
  toolType: z.nativeEnum(COMMUNITY_TOOL_TYPE).nullable(),
26
25
  views: z.number(),
27
26
  likesCount: z.number(),
@@ -43,6 +42,7 @@ export const ResponseCommunityPostSchema = z.object({
43
42
  aiModelId: z.string().uuid(),
44
43
  aiModelTitle: z.string(),
45
44
  aiModelIcons: IconVariantsSchema,
45
+ toolJobId: z.string(),
46
46
  views: z.number(),
47
47
  likesCount: z.number(),
48
48
  publishedAt: z.date().nullable(),
@@ -56,6 +56,7 @@ export const ResponseCommunityPostWithRelationsSchema = z.object({
56
56
  visibility: z.nativeEnum(COMMUNITY_POST_VISIBILITY),
57
57
  type: z.nativeEnum(COMMUNITY_POST_TYPE),
58
58
  mediaData: CommunityPostMediaDataSchema,
59
+ toolJobId: z.string(),
59
60
  aiModelId: z.string().uuid(),
60
61
  aiModelTitle: z.string(),
61
62
  aiModelIcons: IconVariantsSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.8.67",
3
+ "version": "0.8.69",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",