@purpleschool/gptbot-tools 0.2.25-stage → 0.2.27-stage
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/common/models/attached-file.schema.js +2 -0
- package/build/video/commands/index.js +1 -0
- package/build/video/commands/moderate-video-before-post.command.js +18 -0
- package/build/video/enums/index.js +1 -0
- package/build/video/enums/video-publish-moderation-status.enum.js +9 -0
- package/build/video/models/video-job.schema.js +2 -0
- package/build/video/routes/video.amqp.routes.js +1 -0
- package/common/models/attached-file.schema.ts +2 -0
- package/package.json +1 -1
- package/video/commands/index.ts +1 -0
- package/video/commands/moderate-video-before-post.command.ts +20 -0
- package/video/enums/index.ts +1 -0
- package/video/enums/video-publish-moderation-status.enum.ts +5 -0
- package/video/models/video-job.schema.ts +2 -0
- package/video/routes/video.amqp.routes.ts +1 -0
|
@@ -10,4 +10,6 @@ exports.AttachedFileSchema = zod_1.z.object({
|
|
|
10
10
|
type: zod_1.z.string(),
|
|
11
11
|
size: zod_1.z.number(),
|
|
12
12
|
duration: zod_1.z.number().optional().nullable(),
|
|
13
|
+
content: zod_1.z.string().optional().nullable(),
|
|
14
|
+
contentLength: zod_1.z.number().optional().nullable(),
|
|
13
15
|
});
|
|
@@ -23,3 +23,4 @@ __exportStar(require("./get-video-price.command"), exports);
|
|
|
23
23
|
__exportStar(require("./update-video-job-title.command"), exports);
|
|
24
24
|
__exportStar(require("./video-model"), exports);
|
|
25
25
|
__exportStar(require("./update-published-status-video-jobs.command"), exports);
|
|
26
|
+
__exportStar(require("./moderate-video-before-post.command"), exports);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ModerateVideoBeforePostCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
var ModerateVideoBeforePostCommand;
|
|
7
|
+
(function (ModerateVideoBeforePostCommand) {
|
|
8
|
+
ModerateVideoBeforePostCommand.RequestSchema = zod_1.z.object({
|
|
9
|
+
criteria: zod_1.z.object({
|
|
10
|
+
uuid: zod_1.z.string().uuid(),
|
|
11
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
12
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
|
+
}),
|
|
14
|
+
});
|
|
15
|
+
ModerateVideoBeforePostCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(zod_1.z.object({
|
|
16
|
+
isAllowed: zod_1.z.boolean(),
|
|
17
|
+
}));
|
|
18
|
+
})(ModerateVideoBeforePostCommand || (exports.ModerateVideoBeforePostCommand = ModerateVideoBeforePostCommand = {}));
|
|
@@ -24,3 +24,4 @@ __exportStar(require("./veo-job-params-type.enum"), exports);
|
|
|
24
24
|
__exportStar(require("./video-resolution.enum"), exports);
|
|
25
25
|
__exportStar(require("./video-pricing-rule-type.enum"), exports);
|
|
26
26
|
__exportStar(require("./video-generation-model-limitation.enum"), exports);
|
|
27
|
+
__exportStar(require("./video-publish-moderation-status.enum"), exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VIDEO_PUBLISH_MODERATION_STATUS = void 0;
|
|
4
|
+
var VIDEO_PUBLISH_MODERATION_STATUS;
|
|
5
|
+
(function (VIDEO_PUBLISH_MODERATION_STATUS) {
|
|
6
|
+
VIDEO_PUBLISH_MODERATION_STATUS["NOT_CHECKED"] = "NOT_CHECKED";
|
|
7
|
+
VIDEO_PUBLISH_MODERATION_STATUS["PASSED"] = "PASSED";
|
|
8
|
+
VIDEO_PUBLISH_MODERATION_STATUS["FAILED"] = "FAILED";
|
|
9
|
+
})(VIDEO_PUBLISH_MODERATION_STATUS || (exports.VIDEO_PUBLISH_MODERATION_STATUS = VIDEO_PUBLISH_MODERATION_STATUS = {}));
|
|
@@ -4,6 +4,7 @@ exports.VideoJobSchema = exports.VideoJobParamsSchema = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const tools_1 = require("../../tools");
|
|
6
6
|
const common_1 = require("../../common");
|
|
7
|
+
const enums_1 = require("../enums");
|
|
7
8
|
exports.VideoJobParamsSchema = zod_1.z.object({
|
|
8
9
|
imageUrls: zod_1.z.string().array().optional(),
|
|
9
10
|
imageIds: zod_1.z.array(zod_1.z.string()).optional(),
|
|
@@ -23,6 +24,7 @@ exports.VideoJobSchema = zod_1.z.object({
|
|
|
23
24
|
prompt: zod_1.z.string(),
|
|
24
25
|
reaction: zod_1.z.nativeEnum(common_1.USER_REACTION).nullable(),
|
|
25
26
|
isPublished: zod_1.z.boolean(),
|
|
27
|
+
publishModerationStatus: zod_1.z.nativeEnum(enums_1.VIDEO_PUBLISH_MODERATION_STATUS),
|
|
26
28
|
postId: zod_1.z.string().nullable(),
|
|
27
29
|
dislikeReason: zod_1.z.string().nullable(),
|
|
28
30
|
externalId: zod_1.z.string().nullable(),
|
package/package.json
CHANGED
package/video/commands/index.ts
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
+
|
|
4
|
+
export namespace ModerateVideoBeforePostCommand {
|
|
5
|
+
export const RequestSchema = z.object({
|
|
6
|
+
criteria: z.object({
|
|
7
|
+
uuid: z.string().uuid(),
|
|
8
|
+
userId: z.string().uuid().nullable().optional(),
|
|
9
|
+
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
|
+
}),
|
|
11
|
+
});
|
|
12
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
13
|
+
|
|
14
|
+
export const ResponseSchema = ICommandResponseSchema(
|
|
15
|
+
z.object({
|
|
16
|
+
isAllowed: z.boolean(),
|
|
17
|
+
}),
|
|
18
|
+
);
|
|
19
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
20
|
+
}
|
package/video/enums/index.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { JOB_STATUS } from '../../tools';
|
|
3
3
|
import { USER_REACTION } from '../../common';
|
|
4
|
+
import { VIDEO_PUBLISH_MODERATION_STATUS } from '../enums';
|
|
4
5
|
|
|
5
6
|
export const VideoJobParamsSchema = z.object({
|
|
6
7
|
imageUrls: z.string().array().optional(),
|
|
@@ -24,6 +25,7 @@ export const VideoJobSchema = z.object({
|
|
|
24
25
|
prompt: z.string(),
|
|
25
26
|
reaction: z.nativeEnum(USER_REACTION).nullable(),
|
|
26
27
|
isPublished: z.boolean(),
|
|
28
|
+
publishModerationStatus: z.nativeEnum(VIDEO_PUBLISH_MODERATION_STATUS),
|
|
27
29
|
postId: z.string().nullable(),
|
|
28
30
|
dislikeReason: z.string().nullable(),
|
|
29
31
|
externalId: z.string().nullable(),
|