@purpleschool/gptbot 0.8.83 → 0.8.85
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/cabinet/get-user-statistics-by-month.command.js +1 -1
- package/build/commands/cabinet/get-user-statistics-overview.command.js +1 -1
- package/build/commands/community/create-community-post.command.js +1 -1
- package/build/constants/errors/errors.js +5 -5
- package/build/models/community/community-post-media-data.schema.js +7 -7
- package/commands/cabinet/get-user-statistics-by-month.command.ts +1 -1
- package/commands/cabinet/get-user-statistics-overview.command.ts +1 -1
- package/commands/community/create-community-post.command.ts +1 -1
- package/constants/errors/errors.ts +5 -5
- package/models/community/community-post-media-data.schema.ts +7 -7
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ const constants_1 = require("../../constants");
|
|
|
6
6
|
var GetUserStatisticsByMonthCommand;
|
|
7
7
|
(function (GetUserStatisticsByMonthCommand) {
|
|
8
8
|
GetUserStatisticsByMonthCommand.RequestSchema = zod_1.z.object({
|
|
9
|
-
origin: zod_1.z.nativeEnum(constants_1.JOB_REQUEST_ORIGIN).default(constants_1.JOB_REQUEST_ORIGIN.API),
|
|
9
|
+
origin: zod_1.z.nativeEnum(constants_1.JOB_REQUEST_ORIGIN).default(constants_1.JOB_REQUEST_ORIGIN.API).optional(),
|
|
10
10
|
});
|
|
11
11
|
GetUserStatisticsByMonthCommand.UserStatisticsByMonthResponseSchema = zod_1.z.object({
|
|
12
12
|
month: zod_1.z.string(),
|
|
@@ -13,7 +13,7 @@ var GetUserStatisticsOverviewCommand;
|
|
|
13
13
|
message: 'to must be a valid date string',
|
|
14
14
|
}),
|
|
15
15
|
groupBy: zod_1.z.nativeEnum(constants_1.GROUP_BY).default(constants_1.GROUP_BY.DAY),
|
|
16
|
-
origin: zod_1.z.nativeEnum(constants_1.JOB_REQUEST_ORIGIN).default(constants_1.JOB_REQUEST_ORIGIN.API),
|
|
16
|
+
origin: zod_1.z.nativeEnum(constants_1.JOB_REQUEST_ORIGIN).default(constants_1.JOB_REQUEST_ORIGIN.API).optional(),
|
|
17
17
|
});
|
|
18
18
|
GetUserStatisticsOverviewCommand.UserStatisticsOverviewResponseSchema = zod_1.z.object({
|
|
19
19
|
startDate: zod_1.z.string(),
|
|
@@ -11,7 +11,7 @@ var CreateCommunityPostCommand;
|
|
|
11
11
|
caption: zod_1.z.string().max(500).nullable().optional(),
|
|
12
12
|
toolJobId: zod_1.z.string().uuid(),
|
|
13
13
|
toolType: zod_1.z.nativeEnum(constants_1.COMMUNITY_TOOL_TYPE),
|
|
14
|
-
|
|
14
|
+
trackId: zod_1.z.string().uuid().optional(),
|
|
15
15
|
});
|
|
16
16
|
CreateCommunityPostCommand.ResponseSchema = zod_1.z.object({
|
|
17
17
|
data: models_1.ResponseCommunityPostSchema,
|
|
@@ -2642,15 +2642,15 @@ exports.ERRORS = {
|
|
|
2642
2642
|
message: 'Произошла ошибка при получении модели для генерации изображений',
|
|
2643
2643
|
httpCode: 500,
|
|
2644
2644
|
},
|
|
2645
|
-
|
|
2645
|
+
COMMUNITY_POST_TRACK_ID_REQUIRED: {
|
|
2646
2646
|
code: 'A539',
|
|
2647
|
-
message: '
|
|
2647
|
+
message: 'ID трека обязателен для музыкального поста',
|
|
2648
2648
|
httpCode: 400,
|
|
2649
2649
|
},
|
|
2650
|
-
|
|
2650
|
+
COMMUNITY_POST_TRACK_NOT_FOUND: {
|
|
2651
2651
|
code: 'A540',
|
|
2652
|
-
message: '
|
|
2653
|
-
httpCode:
|
|
2652
|
+
message: 'Трек не найден',
|
|
2653
|
+
httpCode: 404,
|
|
2654
2654
|
},
|
|
2655
2655
|
COMMUNITY_POST_EXISTANCE_CHECK_ERROR: {
|
|
2656
2656
|
code: 'A561',
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CommunityPostMediaDataSchema = exports.MusicCommunityMediaSchema = exports.VideoEditorCommunityMediaSchema = exports.VideoCommunityMediaSchema = exports.ImageEditorCommunityMediaSchema = exports.ImageCommunityMediaSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const constants_1 = require("../../constants");
|
|
6
|
-
const music_track_schema_1 = require("../tools/music/music-track.schema");
|
|
7
6
|
const video_job_schema_1 = require("../tools/video/video-job.schema");
|
|
8
7
|
const file_schema_1 = require("../file.schema");
|
|
9
8
|
const tools_1 = require("../tools");
|
|
@@ -37,12 +36,13 @@ exports.MusicCommunityMediaSchema = zod_1.z.object({
|
|
|
37
36
|
type: zod_1.z.literal(constants_1.COMMUNITY_POST_TYPE.MUSIC),
|
|
38
37
|
params: tools_1.MusicJobParamsSchema,
|
|
39
38
|
prompt: zod_1.z.string(),
|
|
40
|
-
track:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
39
|
+
track: zod_1.z.object({
|
|
40
|
+
uuid: zod_1.z.string().optional(), // Опционально для backward compatibility
|
|
41
|
+
audioUrl: zod_1.z.string(),
|
|
42
|
+
coverUrl: zod_1.z.string(),
|
|
43
|
+
duration: zod_1.z.number(),
|
|
44
|
+
title: zod_1.z.string(),
|
|
45
|
+
tags: zod_1.z.string(),
|
|
46
46
|
}),
|
|
47
47
|
});
|
|
48
48
|
exports.CommunityPostMediaDataSchema = zod_1.z.discriminatedUnion('type', [
|
|
@@ -3,7 +3,7 @@ import { JOB_REQUEST_ORIGIN } from '../../constants';
|
|
|
3
3
|
|
|
4
4
|
export namespace GetUserStatisticsByMonthCommand {
|
|
5
5
|
export const RequestSchema = z.object({
|
|
6
|
-
origin: z.nativeEnum(JOB_REQUEST_ORIGIN).default(JOB_REQUEST_ORIGIN.API),
|
|
6
|
+
origin: z.nativeEnum(JOB_REQUEST_ORIGIN).default(JOB_REQUEST_ORIGIN.API).optional(),
|
|
7
7
|
});
|
|
8
8
|
|
|
9
9
|
export type Request = z.infer<typeof RequestSchema>;
|
|
@@ -10,7 +10,7 @@ export namespace GetUserStatisticsOverviewCommand {
|
|
|
10
10
|
message: 'to must be a valid date string',
|
|
11
11
|
}),
|
|
12
12
|
groupBy: z.nativeEnum(GROUP_BY).default(GROUP_BY.DAY),
|
|
13
|
-
origin: z.nativeEnum(JOB_REQUEST_ORIGIN).default(JOB_REQUEST_ORIGIN.API),
|
|
13
|
+
origin: z.nativeEnum(JOB_REQUEST_ORIGIN).default(JOB_REQUEST_ORIGIN.API).optional(),
|
|
14
14
|
});
|
|
15
15
|
|
|
16
16
|
export type Request = z.infer<typeof RequestSchema>;
|
|
@@ -8,7 +8,7 @@ export namespace CreateCommunityPostCommand {
|
|
|
8
8
|
caption: z.string().max(500).nullable().optional(),
|
|
9
9
|
toolJobId: z.string().uuid(),
|
|
10
10
|
toolType: z.nativeEnum(COMMUNITY_TOOL_TYPE),
|
|
11
|
-
|
|
11
|
+
trackId: z.string().uuid().optional(),
|
|
12
12
|
});
|
|
13
13
|
export type RequestBody = z.infer<typeof RequestBodySchema>;
|
|
14
14
|
|
|
@@ -2650,15 +2650,15 @@ export const ERRORS = {
|
|
|
2650
2650
|
message: 'Произошла ошибка при получении модели для генерации изображений',
|
|
2651
2651
|
httpCode: 500,
|
|
2652
2652
|
},
|
|
2653
|
-
|
|
2653
|
+
COMMUNITY_POST_TRACK_ID_REQUIRED: {
|
|
2654
2654
|
code: 'A539',
|
|
2655
|
-
message: '
|
|
2655
|
+
message: 'ID трека обязателен для музыкального поста',
|
|
2656
2656
|
httpCode: 400,
|
|
2657
2657
|
},
|
|
2658
|
-
|
|
2658
|
+
COMMUNITY_POST_TRACK_NOT_FOUND: {
|
|
2659
2659
|
code: 'A540',
|
|
2660
|
-
message: '
|
|
2661
|
-
httpCode:
|
|
2660
|
+
message: 'Трек не найден',
|
|
2661
|
+
httpCode: 404,
|
|
2662
2662
|
},
|
|
2663
2663
|
COMMUNITY_POST_EXISTANCE_CHECK_ERROR: {
|
|
2664
2664
|
code: 'A561',
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { COMMUNITY_POST_TYPE } from '../../constants';
|
|
3
|
-
import { MusicTrackSchema } from '../tools/music/music-track.schema';
|
|
4
3
|
import { VideoJobParamsSchema } from '../tools/video/video-job.schema';
|
|
5
4
|
import { FileSchema } from '../file.schema';
|
|
6
5
|
import { MusicJobParamsSchema } from '../tools';
|
|
@@ -39,12 +38,13 @@ export const MusicCommunityMediaSchema = z.object({
|
|
|
39
38
|
type: z.literal(COMMUNITY_POST_TYPE.MUSIC),
|
|
40
39
|
params: MusicJobParamsSchema,
|
|
41
40
|
prompt: z.string(),
|
|
42
|
-
track:
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
track: z.object({
|
|
42
|
+
uuid: z.string().optional(), // Опционально для backward compatibility
|
|
43
|
+
audioUrl: z.string(),
|
|
44
|
+
coverUrl: z.string(),
|
|
45
|
+
duration: z.number(),
|
|
46
|
+
title: z.string(),
|
|
47
|
+
tags: z.string(),
|
|
48
48
|
}),
|
|
49
49
|
});
|
|
50
50
|
|