@purpleschool/gptbot 0.14.11 → 0.14.12-avatar-studio
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/api/controllers/http/avatar-studio.ts +40 -0
- package/api/controllers/http/index.ts +1 -0
- package/api/routes.ts +59 -0
- package/build/api/controllers/http/avatar-studio.js +36 -0
- package/build/api/controllers/http/index.js +1 -0
- package/build/api/routes.js +32 -0
- package/build/commands/avatar-studio/clip/create-avatar-studio-clip.command.js +17 -0
- package/build/commands/avatar-studio/clip/delete-avatar-studio-clip.command.js +12 -0
- package/build/commands/avatar-studio/clip/find-avatar-studio-clips.query.js +13 -0
- package/build/commands/avatar-studio/clip/get-avatar-studio-clip.query.js +13 -0
- package/build/commands/avatar-studio/clip/index.js +21 -0
- package/build/commands/avatar-studio/clip/update-avatar-studio-clip.command.js +19 -0
- package/build/commands/avatar-studio/export-job/find-avatar-studio-export-jobs.query.js +11 -0
- package/build/commands/avatar-studio/export-job/get-avatar-studio-export-job.query.js +13 -0
- package/build/commands/avatar-studio/export-job/index.js +19 -0
- package/build/commands/avatar-studio/export-job/start-avatar-studio-export.command.js +21 -0
- package/build/commands/avatar-studio/generation-job/find-avatar-studio-generation-jobs.query.js +14 -0
- package/build/commands/avatar-studio/generation-job/generate-avatar-studio-frame.command.js +21 -0
- package/build/commands/avatar-studio/generation-job/generate-avatar-studio-library-image.command.js +20 -0
- package/build/commands/avatar-studio/generation-job/generate-avatar-studio-scene-video.command.js +14 -0
- package/build/commands/avatar-studio/generation-job/generate-avatar-studio-scene-voice.command.js +19 -0
- package/build/commands/avatar-studio/generation-job/generate-avatar-studio-talking-avatar.command.js +17 -0
- package/build/commands/avatar-studio/generation-job/generate-avatar-studio-voice-timings.command.js +18 -0
- package/build/commands/avatar-studio/generation-job/get-avatar-studio-generation-job.query.js +13 -0
- package/build/commands/avatar-studio/generation-job/index.js +24 -0
- package/build/commands/avatar-studio/index.js +24 -0
- package/build/commands/avatar-studio/media/create-avatar-studio-media-from-file.command.js +27 -0
- package/build/commands/avatar-studio/media/delete-avatar-studio-media.command.js +12 -0
- package/build/commands/avatar-studio/media/find-avatar-studio-media.query.js +17 -0
- package/build/commands/avatar-studio/media/index.js +20 -0
- package/build/commands/avatar-studio/media/update-avatar-studio-media.command.js +21 -0
- package/build/commands/avatar-studio/scene/create-avatar-studio-scene.command.js +14 -0
- package/build/commands/avatar-studio/scene/delete-avatar-studio-scene.command.js +12 -0
- package/build/commands/avatar-studio/scene/index.js +20 -0
- package/build/commands/avatar-studio/scene/reorder-avatar-studio-scenes.command.js +19 -0
- package/build/commands/avatar-studio/scene/update-avatar-studio-scene.command.js +14 -0
- package/build/commands/avatar-studio/scriptwriter/apply-avatar-studio-scriptwriter-message.command.js +19 -0
- package/build/commands/avatar-studio/scriptwriter/create-avatar-studio-scriptwriter-message.command.js +53 -0
- package/build/commands/avatar-studio/scriptwriter/index.js +18 -0
- package/build/commands/avatar-studio/shared/avatar-studio-common.schema.js +48 -0
- package/build/commands/avatar-studio/shared/index.js +17 -0
- package/build/commands/avatar-studio/voice/design-avatar-studio-voice.command.js +24 -0
- package/build/commands/avatar-studio/voice/find-avatar-studio-clip-voices.query.js +11 -0
- package/build/commands/avatar-studio/voice/find-avatar-studio-voices.query.js +13 -0
- package/build/commands/avatar-studio/voice/index.js +20 -0
- package/build/commands/avatar-studio/voice/update-avatar-studio-clip-voice.command.js +16 -0
- package/build/commands/index.js +1 -0
- package/build/constants/avatar-studio/enums/avatar-studio-export-status.enum.js +10 -0
- package/build/constants/avatar-studio/enums/avatar-studio-image-style.enum.js +9 -0
- package/build/constants/avatar-studio/enums/avatar-studio-job-phase.enum.js +12 -0
- package/build/constants/avatar-studio/enums/avatar-studio-job-status.enum.js +10 -0
- package/build/constants/avatar-studio/enums/avatar-studio-job-type.enum.js +16 -0
- package/build/constants/avatar-studio/enums/avatar-studio-media-kind.enum.js +9 -0
- package/build/constants/avatar-studio/enums/avatar-studio-media-role.enum.js +14 -0
- package/build/constants/avatar-studio/enums/avatar-studio-media-source.enum.js +13 -0
- package/build/constants/avatar-studio/enums/avatar-studio-scene-kind.enum.js +7 -0
- package/build/constants/avatar-studio/enums/avatar-studio-scriptwriter-role.enum.js +9 -0
- package/build/constants/avatar-studio/enums/avatar-studio-slot.enum.js +15 -0
- package/build/constants/avatar-studio/enums/avatar-studio-subtitle-font.enum.js +10 -0
- package/build/constants/avatar-studio/enums/avatar-studio-subtitle-mode.enum.js +9 -0
- package/build/constants/avatar-studio/enums/avatar-studio-video-mode.enum.js +8 -0
- package/build/constants/avatar-studio/enums/avatar-studio-video-quality.enum.js +8 -0
- package/build/constants/avatar-studio/enums/avatar-studio-voice-source.enum.js +9 -0
- package/build/constants/avatar-studio/enums/index.js +32 -0
- package/build/constants/avatar-studio/index.js +17 -0
- package/build/constants/index.js +1 -0
- package/build/models/avatar-studio/avatar-studio.schema.js +178 -0
- package/build/models/avatar-studio/index.js +17 -0
- package/build/models/file.schema.js +1 -1
- package/build/models/index.js +1 -0
- package/build/models/tools/video/video-job.schema.js +2 -0
- package/build/models/tools/video/video-model.schema.js +9 -0
- package/commands/avatar-studio/clip/create-avatar-studio-clip.command.ts +17 -0
- package/commands/avatar-studio/clip/delete-avatar-studio-clip.command.ts +12 -0
- package/commands/avatar-studio/clip/find-avatar-studio-clips.query.ts +16 -0
- package/commands/avatar-studio/clip/get-avatar-studio-clip.query.ts +13 -0
- package/commands/avatar-studio/clip/index.ts +5 -0
- package/commands/avatar-studio/clip/update-avatar-studio-clip.command.ts +21 -0
- package/commands/avatar-studio/export-job/find-avatar-studio-export-jobs.query.ts +18 -0
- package/commands/avatar-studio/export-job/get-avatar-studio-export-job.query.ts +13 -0
- package/commands/avatar-studio/export-job/index.ts +3 -0
- package/commands/avatar-studio/export-job/start-avatar-studio-export.command.ts +23 -0
- package/commands/avatar-studio/generation-job/find-avatar-studio-generation-jobs.query.ts +20 -0
- package/commands/avatar-studio/generation-job/generate-avatar-studio-frame.command.ts +26 -0
- package/commands/avatar-studio/generation-job/generate-avatar-studio-library-image.command.ts +25 -0
- package/commands/avatar-studio/generation-job/generate-avatar-studio-scene-video.command.ts +19 -0
- package/commands/avatar-studio/generation-job/generate-avatar-studio-scene-voice.command.ts +21 -0
- package/commands/avatar-studio/generation-job/generate-avatar-studio-talking-avatar.command.ts +22 -0
- package/commands/avatar-studio/generation-job/generate-avatar-studio-voice-timings.command.ts +20 -0
- package/commands/avatar-studio/generation-job/get-avatar-studio-generation-job.query.ts +13 -0
- package/commands/avatar-studio/generation-job/index.ts +8 -0
- package/commands/avatar-studio/index.ts +8 -0
- package/commands/avatar-studio/media/create-avatar-studio-media-from-file.command.ts +33 -0
- package/commands/avatar-studio/media/delete-avatar-studio-media.command.ts +12 -0
- package/commands/avatar-studio/media/find-avatar-studio-media.query.ts +23 -0
- package/commands/avatar-studio/media/index.ts +4 -0
- package/commands/avatar-studio/media/update-avatar-studio-media.command.ts +23 -0
- package/commands/avatar-studio/scene/create-avatar-studio-scene.command.ts +16 -0
- package/commands/avatar-studio/scene/delete-avatar-studio-scene.command.ts +12 -0
- package/commands/avatar-studio/scene/index.ts +4 -0
- package/commands/avatar-studio/scene/reorder-avatar-studio-scenes.command.ts +23 -0
- package/commands/avatar-studio/scene/update-avatar-studio-scene.command.ts +19 -0
- package/commands/avatar-studio/scriptwriter/apply-avatar-studio-scriptwriter-message.command.ts +21 -0
- package/commands/avatar-studio/scriptwriter/create-avatar-studio-scriptwriter-message.command.ts +64 -0
- package/commands/avatar-studio/scriptwriter/index.ts +2 -0
- package/commands/avatar-studio/shared/avatar-studio-common.schema.ts +59 -0
- package/commands/avatar-studio/shared/index.ts +1 -0
- package/commands/avatar-studio/voice/design-avatar-studio-voice.command.ts +30 -0
- package/commands/avatar-studio/voice/find-avatar-studio-clip-voices.query.ts +18 -0
- package/commands/avatar-studio/voice/find-avatar-studio-voices.query.ts +16 -0
- package/commands/avatar-studio/voice/index.ts +4 -0
- package/commands/avatar-studio/voice/update-avatar-studio-clip-voice.command.ts +18 -0
- package/commands/index.ts +1 -0
- package/constants/avatar-studio/enums/avatar-studio-export-status.enum.ts +6 -0
- package/constants/avatar-studio/enums/avatar-studio-image-style.enum.ts +5 -0
- package/constants/avatar-studio/enums/avatar-studio-job-phase.enum.ts +8 -0
- package/constants/avatar-studio/enums/avatar-studio-job-status.enum.ts +6 -0
- package/constants/avatar-studio/enums/avatar-studio-job-type.enum.ts +12 -0
- package/constants/avatar-studio/enums/avatar-studio-media-kind.enum.ts +5 -0
- package/constants/avatar-studio/enums/avatar-studio-media-role.enum.ts +10 -0
- package/constants/avatar-studio/enums/avatar-studio-media-source.enum.ts +9 -0
- package/constants/avatar-studio/enums/avatar-studio-scene-kind.enum.ts +3 -0
- package/constants/avatar-studio/enums/avatar-studio-scriptwriter-role.enum.ts +5 -0
- package/constants/avatar-studio/enums/avatar-studio-slot.enum.ts +11 -0
- package/constants/avatar-studio/enums/avatar-studio-subtitle-font.enum.ts +6 -0
- package/constants/avatar-studio/enums/avatar-studio-subtitle-mode.enum.ts +5 -0
- package/constants/avatar-studio/enums/avatar-studio-video-mode.enum.ts +4 -0
- package/constants/avatar-studio/enums/avatar-studio-video-quality.enum.ts +4 -0
- package/constants/avatar-studio/enums/avatar-studio-voice-source.enum.ts +5 -0
- package/constants/avatar-studio/enums/index.ts +16 -0
- package/constants/avatar-studio/index.ts +1 -0
- package/constants/index.ts +1 -0
- package/models/avatar-studio/avatar-studio.schema.ts +221 -0
- package/models/avatar-studio/index.ts +1 -0
- package/models/file.schema.ts +1 -1
- package/models/index.ts +1 -0
- package/models/tools/video/video-job.schema.ts +2 -0
- package/models/tools/video/video-model.schema.ts +9 -0
- package/package.json +1 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./avatar-studio-export-status.enum"), exports);
|
|
18
|
+
__exportStar(require("./avatar-studio-image-style.enum"), exports);
|
|
19
|
+
__exportStar(require("./avatar-studio-job-phase.enum"), exports);
|
|
20
|
+
__exportStar(require("./avatar-studio-job-status.enum"), exports);
|
|
21
|
+
__exportStar(require("./avatar-studio-job-type.enum"), exports);
|
|
22
|
+
__exportStar(require("./avatar-studio-media-kind.enum"), exports);
|
|
23
|
+
__exportStar(require("./avatar-studio-media-role.enum"), exports);
|
|
24
|
+
__exportStar(require("./avatar-studio-media-source.enum"), exports);
|
|
25
|
+
__exportStar(require("./avatar-studio-scene-kind.enum"), exports);
|
|
26
|
+
__exportStar(require("./avatar-studio-scriptwriter-role.enum"), exports);
|
|
27
|
+
__exportStar(require("./avatar-studio-slot.enum"), exports);
|
|
28
|
+
__exportStar(require("./avatar-studio-subtitle-font.enum"), exports);
|
|
29
|
+
__exportStar(require("./avatar-studio-subtitle-mode.enum"), exports);
|
|
30
|
+
__exportStar(require("./avatar-studio-video-mode.enum"), exports);
|
|
31
|
+
__exportStar(require("./avatar-studio-video-quality.enum"), exports);
|
|
32
|
+
__exportStar(require("./avatar-studio-voice-source.enum"), exports);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./enums"), exports);
|
package/build/constants/index.js
CHANGED
|
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./ai-model"), exports);
|
|
18
18
|
__exportStar(require("./b2b"), exports);
|
|
19
19
|
__exportStar(require("./api-key"), exports);
|
|
20
|
+
__exportStar(require("./avatar-studio"), exports);
|
|
20
21
|
__exportStar(require("./agents"), exports);
|
|
21
22
|
__exportStar(require("./blog"), exports);
|
|
22
23
|
__exportStar(require("./billing"), exports);
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AvatarStudioClipSchema = exports.AvatarStudioScriptwriterMessageSchema = exports.AvatarStudioExportJobSchema = exports.AvatarStudioGenerationJobSchema = exports.AvatarStudioGenerationJobBaseSchema = exports.AvatarStudioVoiceSchema = exports.AvatarStudioSceneSchema = exports.AvatarStudioSceneVideoConfigSchema = exports.AvatarStudioSceneImageConfigSchema = exports.AvatarStudioSceneVoiceConfigSchema = exports.AvatarStudioSceneReferenceMediaSchema = exports.AvatarStudioMediaSchema = exports.AvatarStudioWordTimingSchema = exports.AvatarStudioSubtitleSettingsSchema = exports.AvatarStudioAspectRatioSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
const file_schema_1 = require("../file.schema");
|
|
7
|
+
const json_value_schema_1 = require("../json-value.schema");
|
|
8
|
+
exports.AvatarStudioAspectRatioSchema = zod_1.z.enum(['9:16', '16:9', '1:1', '4:5']);
|
|
9
|
+
const AvatarStudioSubtitleColorSchema = zod_1.z.string().regex(/^#[0-9A-Fa-f]{6}$/);
|
|
10
|
+
exports.AvatarStudioSubtitleSettingsSchema = zod_1.z
|
|
11
|
+
.object({
|
|
12
|
+
mode: zod_1.z.nativeEnum(constants_1.AVATAR_STUDIO_SUBTITLE_MODE).default(constants_1.AVATAR_STUDIO_SUBTITLE_MODE.NONE),
|
|
13
|
+
font: zod_1.z
|
|
14
|
+
.nativeEnum(constants_1.AVATAR_STUDIO_SUBTITLE_FONT)
|
|
15
|
+
.default(constants_1.AVATAR_STUDIO_SUBTITLE_FONT.ROBOTO_REGULAR),
|
|
16
|
+
textColor: AvatarStudioSubtitleColorSchema.default('#FFFFFF'),
|
|
17
|
+
backgroundColor: AvatarStudioSubtitleColorSchema.default('#000000'),
|
|
18
|
+
})
|
|
19
|
+
.strict();
|
|
20
|
+
exports.AvatarStudioWordTimingSchema = zod_1.z.object({
|
|
21
|
+
word: zod_1.z.string(),
|
|
22
|
+
start: zod_1.z.number().min(0),
|
|
23
|
+
end: zod_1.z.number().min(0),
|
|
24
|
+
});
|
|
25
|
+
exports.AvatarStudioMediaSchema = zod_1.z.object({
|
|
26
|
+
uuid: zod_1.z.string().uuid(),
|
|
27
|
+
userId: zod_1.z.string().uuid(),
|
|
28
|
+
clipId: zod_1.z.string().uuid().nullable(),
|
|
29
|
+
sceneId: zod_1.z.string().uuid().nullable(),
|
|
30
|
+
fileId: zod_1.z.string().uuid(),
|
|
31
|
+
kind: zod_1.z.nativeEnum(constants_1.AVATAR_STUDIO_MEDIA_KIND),
|
|
32
|
+
source: zod_1.z.nativeEnum(constants_1.AVATAR_STUDIO_MEDIA_SOURCE),
|
|
33
|
+
role: zod_1.z.nativeEnum(constants_1.AVATAR_STUDIO_MEDIA_ROLE),
|
|
34
|
+
prompt: zod_1.z.string().nullable(),
|
|
35
|
+
toolJobId: zod_1.z.string().uuid().nullable(),
|
|
36
|
+
durationSeconds: zod_1.z.number().nullable(),
|
|
37
|
+
transcript: zod_1.z.string().nullable(),
|
|
38
|
+
file: file_schema_1.FileSchema.optional(),
|
|
39
|
+
createdAt: zod_1.z.date(),
|
|
40
|
+
updatedAt: zod_1.z.date(),
|
|
41
|
+
});
|
|
42
|
+
exports.AvatarStudioSceneReferenceMediaSchema = zod_1.z.object({
|
|
43
|
+
uuid: zod_1.z.string().uuid(),
|
|
44
|
+
sceneId: zod_1.z.string().uuid(),
|
|
45
|
+
mediaId: zod_1.z.string().uuid(),
|
|
46
|
+
position: zod_1.z.number().int().min(0),
|
|
47
|
+
media: exports.AvatarStudioMediaSchema.optional(),
|
|
48
|
+
createdAt: zod_1.z.date(),
|
|
49
|
+
});
|
|
50
|
+
exports.AvatarStudioSceneVoiceConfigSchema = zod_1.z.object({
|
|
51
|
+
text: zod_1.z.string().default(''),
|
|
52
|
+
mediaId: zod_1.z.string().uuid().nullable().default(null),
|
|
53
|
+
});
|
|
54
|
+
exports.AvatarStudioSceneImageConfigSchema = zod_1.z.object({
|
|
55
|
+
prompt: zod_1.z.string().nullable().default(null),
|
|
56
|
+
style: zod_1.z.nativeEnum(constants_1.AVATAR_STUDIO_IMAGE_STYLE).default(constants_1.AVATAR_STUDIO_IMAGE_STYLE.UGC),
|
|
57
|
+
});
|
|
58
|
+
exports.AvatarStudioSceneVideoConfigSchema = zod_1.z.object({
|
|
59
|
+
prompt: zod_1.z.string().nullable().default(null),
|
|
60
|
+
durationSeconds: zod_1.z.number().positive().default(5),
|
|
61
|
+
videoMode: zod_1.z.nativeEnum(constants_1.AVATAR_STUDIO_VIDEO_MODE).default(constants_1.AVATAR_STUDIO_VIDEO_MODE.B_ROLL),
|
|
62
|
+
quality: zod_1.z.nativeEnum(constants_1.AVATAR_STUDIO_VIDEO_QUALITY).default(constants_1.AVATAR_STUDIO_VIDEO_QUALITY.P720),
|
|
63
|
+
sound: zod_1.z.boolean().default(false),
|
|
64
|
+
});
|
|
65
|
+
exports.AvatarStudioSceneSchema = zod_1.z.object({
|
|
66
|
+
uuid: zod_1.z.string().uuid(),
|
|
67
|
+
clipId: zod_1.z.string().uuid(),
|
|
68
|
+
position: zod_1.z.number().int().min(0),
|
|
69
|
+
voiceConfig: exports.AvatarStudioSceneVoiceConfigSchema,
|
|
70
|
+
imageConfig: exports.AvatarStudioSceneImageConfigSchema,
|
|
71
|
+
videoConfig: exports.AvatarStudioSceneVideoConfigSchema,
|
|
72
|
+
frameMediaId: zod_1.z.string().uuid().nullable(),
|
|
73
|
+
sceneVideoMediaId: zod_1.z.string().uuid().nullable(),
|
|
74
|
+
voiceMediaId: zod_1.z.string().uuid().nullable(),
|
|
75
|
+
avatarVideoMediaId: zod_1.z.string().uuid().nullable(),
|
|
76
|
+
frameStatus: zod_1.z.nativeEnum(constants_1.AVATAR_STUDIO_JOB_STATUS),
|
|
77
|
+
videoStatus: zod_1.z.nativeEnum(constants_1.AVATAR_STUDIO_JOB_STATUS),
|
|
78
|
+
voiceStatus: zod_1.z.nativeEnum(constants_1.AVATAR_STUDIO_JOB_STATUS),
|
|
79
|
+
avatarStatus: zod_1.z.nativeEnum(constants_1.AVATAR_STUDIO_JOB_STATUS),
|
|
80
|
+
frameError: zod_1.z.string().nullable(),
|
|
81
|
+
videoError: zod_1.z.string().nullable(),
|
|
82
|
+
voiceError: zod_1.z.string().nullable(),
|
|
83
|
+
avatarError: zod_1.z.string().nullable(),
|
|
84
|
+
wordTimings: zod_1.z.array(exports.AvatarStudioWordTimingSchema).nullable(),
|
|
85
|
+
transcript: zod_1.z.string().nullable(),
|
|
86
|
+
subtitles: json_value_schema_1.JsonValueSchema.nullable(),
|
|
87
|
+
frameMedia: exports.AvatarStudioMediaSchema.nullable().optional(),
|
|
88
|
+
sceneVideoMedia: exports.AvatarStudioMediaSchema.nullable().optional(),
|
|
89
|
+
voiceMedia: exports.AvatarStudioMediaSchema.nullable().optional(),
|
|
90
|
+
avatarVideoMedia: exports.AvatarStudioMediaSchema.nullable().optional(),
|
|
91
|
+
referenceMedia: zod_1.z.array(exports.AvatarStudioSceneReferenceMediaSchema).optional(),
|
|
92
|
+
createdAt: zod_1.z.date(),
|
|
93
|
+
updatedAt: zod_1.z.date(),
|
|
94
|
+
});
|
|
95
|
+
exports.AvatarStudioVoiceSchema = zod_1.z.object({
|
|
96
|
+
uuid: zod_1.z.string().uuid(),
|
|
97
|
+
userId: zod_1.z.string().uuid(),
|
|
98
|
+
clipId: zod_1.z.string().uuid().nullable(),
|
|
99
|
+
title: zod_1.z.string(),
|
|
100
|
+
source: zod_1.z.nativeEnum(constants_1.AVATAR_STUDIO_VOICE_SOURCE),
|
|
101
|
+
sampleMediaId: zod_1.z.string().uuid().nullable(),
|
|
102
|
+
sampleText: zod_1.z.string().nullable(),
|
|
103
|
+
metadata: json_value_schema_1.JsonObjectSchema.nullable(),
|
|
104
|
+
sampleMedia: exports.AvatarStudioMediaSchema.nullable().optional(),
|
|
105
|
+
createdAt: zod_1.z.date(),
|
|
106
|
+
updatedAt: zod_1.z.date(),
|
|
107
|
+
deletedAt: zod_1.z.date().nullable(),
|
|
108
|
+
});
|
|
109
|
+
exports.AvatarStudioGenerationJobBaseSchema = zod_1.z.object({
|
|
110
|
+
uuid: zod_1.z.string().uuid(),
|
|
111
|
+
userId: zod_1.z.string().uuid(),
|
|
112
|
+
clipId: zod_1.z.string().uuid().nullable(),
|
|
113
|
+
sceneId: zod_1.z.string().uuid().nullable(),
|
|
114
|
+
parentJobId: zod_1.z.string().uuid().nullable(),
|
|
115
|
+
toolJobId: zod_1.z.string().uuid().nullable(),
|
|
116
|
+
type: zod_1.z.nativeEnum(constants_1.AVATAR_STUDIO_JOB_TYPE),
|
|
117
|
+
phase: zod_1.z.nativeEnum(constants_1.AVATAR_STUDIO_JOB_PHASE).nullable(),
|
|
118
|
+
targetSlot: zod_1.z.nativeEnum(constants_1.AVATAR_STUDIO_SLOT),
|
|
119
|
+
status: zod_1.z.nativeEnum(constants_1.AVATAR_STUDIO_JOB_STATUS),
|
|
120
|
+
request: json_value_schema_1.JsonObjectSchema.nullable(),
|
|
121
|
+
resultMediaId: zod_1.z.string().uuid().nullable(),
|
|
122
|
+
tokenReservationUuid: zod_1.z.string().uuid().nullable(),
|
|
123
|
+
price: zod_1.z.number().nullable(),
|
|
124
|
+
error: zod_1.z.string().nullable(),
|
|
125
|
+
resultMedia: exports.AvatarStudioMediaSchema.nullable().optional(),
|
|
126
|
+
startedAt: zod_1.z.date().nullable(),
|
|
127
|
+
completedAt: zod_1.z.date().nullable(),
|
|
128
|
+
createdAt: zod_1.z.date(),
|
|
129
|
+
updatedAt: zod_1.z.date(),
|
|
130
|
+
});
|
|
131
|
+
exports.AvatarStudioGenerationJobSchema = exports.AvatarStudioGenerationJobBaseSchema.extend({
|
|
132
|
+
children: zod_1.z.array(exports.AvatarStudioGenerationJobBaseSchema).optional(),
|
|
133
|
+
});
|
|
134
|
+
exports.AvatarStudioExportJobSchema = zod_1.z.object({
|
|
135
|
+
uuid: zod_1.z.string().uuid(),
|
|
136
|
+
userId: zod_1.z.string().uuid(),
|
|
137
|
+
clipId: zod_1.z.string().uuid(),
|
|
138
|
+
status: zod_1.z.nativeEnum(constants_1.AVATAR_STUDIO_EXPORT_STATUS),
|
|
139
|
+
resultMediaId: zod_1.z.string().uuid().nullable(),
|
|
140
|
+
error: zod_1.z.string().nullable(),
|
|
141
|
+
request: json_value_schema_1.JsonObjectSchema.nullable(),
|
|
142
|
+
resultMedia: exports.AvatarStudioMediaSchema.nullable().optional(),
|
|
143
|
+
startedAt: zod_1.z.date().nullable(),
|
|
144
|
+
completedAt: zod_1.z.date().nullable(),
|
|
145
|
+
createdAt: zod_1.z.date(),
|
|
146
|
+
updatedAt: zod_1.z.date(),
|
|
147
|
+
});
|
|
148
|
+
exports.AvatarStudioScriptwriterMessageSchema = zod_1.z.object({
|
|
149
|
+
uuid: zod_1.z.string().uuid(),
|
|
150
|
+
userId: zod_1.z.string().uuid(),
|
|
151
|
+
clipId: zod_1.z.string().uuid(),
|
|
152
|
+
sceneId: zod_1.z.string().uuid().nullable(),
|
|
153
|
+
role: zod_1.z.nativeEnum(constants_1.AVATAR_STUDIO_SCRIPTWRITER_ROLE),
|
|
154
|
+
content: zod_1.z.string(),
|
|
155
|
+
tokenReservationUuid: zod_1.z.string().uuid().nullable(),
|
|
156
|
+
price: zod_1.z.number().nullable(),
|
|
157
|
+
metadata: json_value_schema_1.JsonObjectSchema.nullable(),
|
|
158
|
+
createdAt: zod_1.z.date(),
|
|
159
|
+
});
|
|
160
|
+
exports.AvatarStudioClipSchema = zod_1.z.object({
|
|
161
|
+
uuid: zod_1.z.string().uuid(),
|
|
162
|
+
userId: zod_1.z.string().uuid(),
|
|
163
|
+
title: zod_1.z.string(),
|
|
164
|
+
subtitleSettings: exports.AvatarStudioSubtitleSettingsSchema,
|
|
165
|
+
selectedVoiceId: zod_1.z.string().uuid().nullable(),
|
|
166
|
+
exportMediaId: zod_1.z.string().uuid().nullable(),
|
|
167
|
+
selectedVoice: exports.AvatarStudioVoiceSchema.nullable().optional(),
|
|
168
|
+
exportMedia: exports.AvatarStudioMediaSchema.nullable().optional(),
|
|
169
|
+
scenes: zod_1.z.array(exports.AvatarStudioSceneSchema).optional(),
|
|
170
|
+
media: zod_1.z.array(exports.AvatarStudioMediaSchema).optional(),
|
|
171
|
+
voices: zod_1.z.array(exports.AvatarStudioVoiceSchema).optional(),
|
|
172
|
+
generationJobs: zod_1.z.array(exports.AvatarStudioGenerationJobSchema).optional(),
|
|
173
|
+
exportJobs: zod_1.z.array(exports.AvatarStudioExportJobSchema).optional(),
|
|
174
|
+
scriptwriterMessages: zod_1.z.array(exports.AvatarStudioScriptwriterMessageSchema).optional(),
|
|
175
|
+
deletedAt: zod_1.z.date().nullable(),
|
|
176
|
+
createdAt: zod_1.z.date(),
|
|
177
|
+
updatedAt: zod_1.z.date(),
|
|
178
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./avatar-studio.schema"), exports);
|
|
@@ -18,7 +18,7 @@ exports.FileSchema = zod_1.z.object({
|
|
|
18
18
|
key: zod_1.z.string(),
|
|
19
19
|
type: zod_1.z.nativeEnum(constants_1.FILE_TYPE),
|
|
20
20
|
duration: zod_1.z.number().nullable(),
|
|
21
|
-
attachmentCost: zod_1.z.number(),
|
|
21
|
+
attachmentCost: zod_1.z.number().default(0),
|
|
22
22
|
contentLength: zod_1.z.number().nullable(),
|
|
23
23
|
createdAt: zod_1.z.date(),
|
|
24
24
|
updatedAt: zod_1.z.date(),
|
package/build/models/index.js
CHANGED
|
@@ -20,6 +20,7 @@ __exportStar(require("./ai-model-config.schema"), exports);
|
|
|
20
20
|
__exportStar(require("./ai-model-formatted.schema"), exports);
|
|
21
21
|
__exportStar(require("./ai-model.schema"), exports);
|
|
22
22
|
__exportStar(require("./ai-vendor.schema"), exports);
|
|
23
|
+
__exportStar(require("./avatar-studio"), exports);
|
|
23
24
|
__exportStar(require("./canvas.schema"), exports);
|
|
24
25
|
__exportStar(require("./canvas-node-definition.schema"), exports);
|
|
25
26
|
__exportStar(require("./canvas-node.schema"), exports);
|
|
@@ -11,6 +11,8 @@ exports.VideoJobParamsSchema = zod_1.z.object({
|
|
|
11
11
|
referenceImageIds: zod_1.z.array(zod_1.z.string()).optional(),
|
|
12
12
|
firstFrameUrl: zod_1.z.string().optional(),
|
|
13
13
|
lastFrameUrl: zod_1.z.string().optional(),
|
|
14
|
+
audioUrl: zod_1.z.string().url().optional(),
|
|
15
|
+
audioId: zod_1.z.string().uuid().optional(),
|
|
14
16
|
firstFrameId: zod_1.z.string().optional(),
|
|
15
17
|
lastFrameId: zod_1.z.string().optional(),
|
|
16
18
|
duration: zod_1.z.number().optional(),
|
|
@@ -36,6 +36,12 @@ exports.VideoModelParamsSchema = zod_1.z.object({
|
|
|
36
36
|
options: zod_1.z.array(zod_1.z.boolean()),
|
|
37
37
|
})
|
|
38
38
|
.optional(),
|
|
39
|
+
audioAttachment: zod_1.z
|
|
40
|
+
.object({
|
|
41
|
+
supported: zod_1.z.boolean(),
|
|
42
|
+
maxAudioUrls: zod_1.z.number(),
|
|
43
|
+
})
|
|
44
|
+
.optional(),
|
|
39
45
|
multiShots: zod_1.z
|
|
40
46
|
.object({
|
|
41
47
|
options: zod_1.z.array(zod_1.z.boolean()),
|
|
@@ -53,6 +59,7 @@ exports.VideoGenerationRequestParamsSchema = zod_1.z.object({
|
|
|
53
59
|
referenceImages: zod_1.z.string().uuid().array().optional(),
|
|
54
60
|
firstFrameImageId: zod_1.z.string().uuid().optional(),
|
|
55
61
|
lastFrameImageId: zod_1.z.string().uuid().optional(),
|
|
62
|
+
audioId: zod_1.z.string().uuid().optional(),
|
|
56
63
|
duration: zod_1.z.number(),
|
|
57
64
|
aspectRatio: zod_1.z.string().optional(),
|
|
58
65
|
quality: zod_1.z.string().optional(),
|
|
@@ -63,6 +70,8 @@ exports.VideoGenerationRequestParamsSchema = zod_1.z.object({
|
|
|
63
70
|
});
|
|
64
71
|
exports.VideoModelPricingRuleConditionSchema = zod_1.z.object({
|
|
65
72
|
aspectRatio: zod_1.z.string().optional(),
|
|
73
|
+
duration: zod_1.z.number().optional(),
|
|
74
|
+
quality: zod_1.z.string().optional(),
|
|
66
75
|
resolution: zod_1.z.string().optional(),
|
|
67
76
|
sound: zod_1.z.boolean().optional(),
|
|
68
77
|
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { AvatarStudioClipSchema, AvatarStudioSubtitleSettingsSchema } from '../../../models';
|
|
3
|
+
|
|
4
|
+
export namespace CreateAvatarStudioClipCommand {
|
|
5
|
+
export const RequestSchema = z
|
|
6
|
+
.object({
|
|
7
|
+
title: z.string().trim().min(1).optional(),
|
|
8
|
+
subtitleSettings: AvatarStudioSubtitleSettingsSchema.nullable().optional(),
|
|
9
|
+
})
|
|
10
|
+
.strict();
|
|
11
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
12
|
+
|
|
13
|
+
export const ResponseSchema = z.object({
|
|
14
|
+
data: AvatarStudioClipSchema,
|
|
15
|
+
});
|
|
16
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { AvatarStudioClipIdParamsSchema } from '../shared/avatar-studio-common.schema';
|
|
3
|
+
|
|
4
|
+
export namespace DeleteAvatarStudioClipCommand {
|
|
5
|
+
export const ParamsSchema = AvatarStudioClipIdParamsSchema;
|
|
6
|
+
export type Params = z.infer<typeof ParamsSchema>;
|
|
7
|
+
|
|
8
|
+
export const ResponseSchema = z.object({
|
|
9
|
+
data: z.object({ uuid: z.string().uuid() }),
|
|
10
|
+
});
|
|
11
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { AvatarStudioClipSchema } from '../../../models';
|
|
3
|
+
import {
|
|
4
|
+
AvatarStudioPagedResponseSchema,
|
|
5
|
+
AvatarStudioPaginationQuerySchema,
|
|
6
|
+
} from '../shared/avatar-studio-common.schema';
|
|
7
|
+
|
|
8
|
+
export namespace FindAvatarStudioClipsQuery {
|
|
9
|
+
export const QuerySchema = AvatarStudioPaginationQuerySchema.extend({
|
|
10
|
+
title: z.string().optional(),
|
|
11
|
+
});
|
|
12
|
+
export type Query = z.infer<typeof QuerySchema>;
|
|
13
|
+
|
|
14
|
+
export const ResponseSchema = AvatarStudioPagedResponseSchema(AvatarStudioClipSchema);
|
|
15
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { AvatarStudioClipSchema } from '../../../models';
|
|
3
|
+
import { AvatarStudioClipIdParamsSchema } from '../shared/avatar-studio-common.schema';
|
|
4
|
+
|
|
5
|
+
export namespace GetAvatarStudioClipQuery {
|
|
6
|
+
export const ParamsSchema = AvatarStudioClipIdParamsSchema;
|
|
7
|
+
export type Params = z.infer<typeof ParamsSchema>;
|
|
8
|
+
|
|
9
|
+
export const ResponseSchema = z.object({
|
|
10
|
+
data: AvatarStudioClipSchema,
|
|
11
|
+
});
|
|
12
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { AvatarStudioClipSchema, AvatarStudioSubtitleSettingsSchema } from '../../../models';
|
|
3
|
+
import { AvatarStudioClipIdParamsSchema } from '../shared/avatar-studio-common.schema';
|
|
4
|
+
|
|
5
|
+
export namespace UpdateAvatarStudioClipCommand {
|
|
6
|
+
export const ParamsSchema = AvatarStudioClipIdParamsSchema;
|
|
7
|
+
export type Params = z.infer<typeof ParamsSchema>;
|
|
8
|
+
|
|
9
|
+
export const RequestSchema = z
|
|
10
|
+
.object({
|
|
11
|
+
title: z.string().trim().min(1).optional(),
|
|
12
|
+
subtitleSettings: AvatarStudioSubtitleSettingsSchema.nullable().optional(),
|
|
13
|
+
})
|
|
14
|
+
.strict();
|
|
15
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
16
|
+
|
|
17
|
+
export const ResponseSchema = z.object({
|
|
18
|
+
data: AvatarStudioClipSchema,
|
|
19
|
+
});
|
|
20
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { AvatarStudioExportJobSchema } from '../../../models';
|
|
3
|
+
import {
|
|
4
|
+
AvatarStudioClipIdParamsSchema,
|
|
5
|
+
AvatarStudioPagedResponseSchema,
|
|
6
|
+
AvatarStudioPaginationQuerySchema,
|
|
7
|
+
} from '../shared/avatar-studio-common.schema';
|
|
8
|
+
|
|
9
|
+
export namespace FindAvatarStudioExportJobsQuery {
|
|
10
|
+
export const ParamsSchema = AvatarStudioClipIdParamsSchema;
|
|
11
|
+
export type Params = z.infer<typeof ParamsSchema>;
|
|
12
|
+
|
|
13
|
+
export const QuerySchema = AvatarStudioPaginationQuerySchema;
|
|
14
|
+
export type Query = z.infer<typeof QuerySchema>;
|
|
15
|
+
|
|
16
|
+
export const ResponseSchema = AvatarStudioPagedResponseSchema(AvatarStudioExportJobSchema);
|
|
17
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { AvatarStudioExportJobSchema } from '../../../models';
|
|
3
|
+
import { AvatarStudioExportJobIdParamsSchema } from '../shared/avatar-studio-common.schema';
|
|
4
|
+
|
|
5
|
+
export namespace GetAvatarStudioExportJobQuery {
|
|
6
|
+
export const ParamsSchema = AvatarStudioExportJobIdParamsSchema;
|
|
7
|
+
export type Params = z.infer<typeof ParamsSchema>;
|
|
8
|
+
|
|
9
|
+
export const ResponseSchema = z.object({
|
|
10
|
+
data: AvatarStudioExportJobSchema,
|
|
11
|
+
});
|
|
12
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { AvatarStudioExportJobSchema } from '../../../models';
|
|
3
|
+
import { JsonObjectSchema } from '../../../models/json-value.schema';
|
|
4
|
+
import { AvatarStudioClipIdParamsSchema } from '../shared/avatar-studio-common.schema';
|
|
5
|
+
|
|
6
|
+
export namespace StartAvatarStudioExportCommand {
|
|
7
|
+
export const ParamsSchema = AvatarStudioClipIdParamsSchema;
|
|
8
|
+
export type Params = z.infer<typeof ParamsSchema>;
|
|
9
|
+
|
|
10
|
+
export const RequestSchema = z
|
|
11
|
+
.object({
|
|
12
|
+
resolution: z.string().optional(),
|
|
13
|
+
includeSubtitles: z.boolean().default(true).optional(),
|
|
14
|
+
metadata: JsonObjectSchema.optional(),
|
|
15
|
+
})
|
|
16
|
+
.strict();
|
|
17
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
18
|
+
|
|
19
|
+
export const ResponseSchema = z.object({
|
|
20
|
+
data: AvatarStudioExportJobSchema,
|
|
21
|
+
});
|
|
22
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { AvatarStudioGenerationJobSchema } from '../../../models';
|
|
3
|
+
import {
|
|
4
|
+
AvatarStudioClipIdParamsSchema,
|
|
5
|
+
AvatarStudioPagedResponseSchema,
|
|
6
|
+
AvatarStudioPaginationQuerySchema,
|
|
7
|
+
} from '../shared/avatar-studio-common.schema';
|
|
8
|
+
|
|
9
|
+
export namespace FindAvatarStudioGenerationJobsQuery {
|
|
10
|
+
export const ParamsSchema = AvatarStudioClipIdParamsSchema;
|
|
11
|
+
export type Params = z.infer<typeof ParamsSchema>;
|
|
12
|
+
|
|
13
|
+
export const QuerySchema = AvatarStudioPaginationQuerySchema.extend({
|
|
14
|
+
sceneId: z.string().uuid().optional(),
|
|
15
|
+
});
|
|
16
|
+
export type Query = z.infer<typeof QuerySchema>;
|
|
17
|
+
|
|
18
|
+
export const ResponseSchema = AvatarStudioPagedResponseSchema(AvatarStudioGenerationJobSchema);
|
|
19
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { AVATAR_STUDIO_IMAGE_STYLE } from '../../../constants';
|
|
3
|
+
import { AvatarStudioGenerationJobSchema } from '../../../models';
|
|
4
|
+
import {
|
|
5
|
+
AvatarStudioSceneIdParamsSchema,
|
|
6
|
+
AvatarStudioUuidListSchema,
|
|
7
|
+
} from '../shared/avatar-studio-common.schema';
|
|
8
|
+
|
|
9
|
+
export namespace GenerateAvatarStudioFrameCommand {
|
|
10
|
+
export const ParamsSchema = AvatarStudioSceneIdParamsSchema;
|
|
11
|
+
export type Params = z.infer<typeof ParamsSchema>;
|
|
12
|
+
|
|
13
|
+
export const RequestSchema = z
|
|
14
|
+
.object({
|
|
15
|
+
prompt: z.string().trim().min(1),
|
|
16
|
+
style: z.nativeEnum(AVATAR_STUDIO_IMAGE_STYLE).default(AVATAR_STUDIO_IMAGE_STYLE.UGC),
|
|
17
|
+
referenceMediaIds: AvatarStudioUuidListSchema.optional(),
|
|
18
|
+
})
|
|
19
|
+
.strict();
|
|
20
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
21
|
+
|
|
22
|
+
export const ResponseSchema = z.object({
|
|
23
|
+
data: AvatarStudioGenerationJobSchema,
|
|
24
|
+
});
|
|
25
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { AvatarStudioAspectRatioSchema, AvatarStudioGenerationJobSchema } from '../../../models';
|
|
3
|
+
import {
|
|
4
|
+
AvatarStudioClipIdParamsSchema,
|
|
5
|
+
AvatarStudioUuidListSchema,
|
|
6
|
+
} from '../shared/avatar-studio-common.schema';
|
|
7
|
+
|
|
8
|
+
export namespace GenerateAvatarStudioLibraryImageCommand {
|
|
9
|
+
export const ParamsSchema = AvatarStudioClipIdParamsSchema;
|
|
10
|
+
export type Params = z.infer<typeof ParamsSchema>;
|
|
11
|
+
|
|
12
|
+
export const RequestSchema = z
|
|
13
|
+
.object({
|
|
14
|
+
prompt: z.string().trim().min(1),
|
|
15
|
+
referenceMediaIds: AvatarStudioUuidListSchema.optional(),
|
|
16
|
+
aspectRatio: AvatarStudioAspectRatioSchema.default('9:16'),
|
|
17
|
+
})
|
|
18
|
+
.strict();
|
|
19
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
20
|
+
|
|
21
|
+
export const ResponseSchema = z.object({
|
|
22
|
+
data: AvatarStudioGenerationJobSchema,
|
|
23
|
+
});
|
|
24
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { AvatarStudioGenerationJobSchema } from '../../../models';
|
|
3
|
+
import {
|
|
4
|
+
AvatarStudioSceneIdParamsSchema,
|
|
5
|
+
AvatarStudioVideoGenerationRequestSchema,
|
|
6
|
+
} from '../shared/avatar-studio-common.schema';
|
|
7
|
+
|
|
8
|
+
export namespace GenerateAvatarStudioSceneVideoCommand {
|
|
9
|
+
export const ParamsSchema = AvatarStudioSceneIdParamsSchema;
|
|
10
|
+
export type Params = z.infer<typeof ParamsSchema>;
|
|
11
|
+
|
|
12
|
+
export const RequestSchema = AvatarStudioVideoGenerationRequestSchema;
|
|
13
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
14
|
+
|
|
15
|
+
export const ResponseSchema = z.object({
|
|
16
|
+
data: AvatarStudioGenerationJobSchema,
|
|
17
|
+
});
|
|
18
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { AvatarStudioGenerationJobSchema } from '../../../models';
|
|
3
|
+
import { AvatarStudioSceneIdParamsSchema } from '../shared/avatar-studio-common.schema';
|
|
4
|
+
|
|
5
|
+
export namespace GenerateAvatarStudioSceneVoiceCommand {
|
|
6
|
+
export const ParamsSchema = AvatarStudioSceneIdParamsSchema;
|
|
7
|
+
export type Params = z.infer<typeof ParamsSchema>;
|
|
8
|
+
|
|
9
|
+
export const RequestSchema = z
|
|
10
|
+
.object({
|
|
11
|
+
text: z.string().trim().min(1).optional(),
|
|
12
|
+
mediaId: z.string().uuid().optional(),
|
|
13
|
+
})
|
|
14
|
+
.strict();
|
|
15
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
16
|
+
|
|
17
|
+
export const ResponseSchema = z.object({
|
|
18
|
+
data: AvatarStudioGenerationJobSchema,
|
|
19
|
+
});
|
|
20
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
21
|
+
}
|
package/commands/avatar-studio/generation-job/generate-avatar-studio-talking-avatar.command.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { AvatarStudioGenerationJobSchema } from '../../../models';
|
|
3
|
+
import {
|
|
4
|
+
AvatarStudioSceneIdParamsSchema,
|
|
5
|
+
AvatarStudioVideoGenerationRequestSchema,
|
|
6
|
+
} from '../shared/avatar-studio-common.schema';
|
|
7
|
+
|
|
8
|
+
export namespace GenerateAvatarStudioTalkingAvatarCommand {
|
|
9
|
+
export const ParamsSchema = AvatarStudioSceneIdParamsSchema;
|
|
10
|
+
export type Params = z.infer<typeof ParamsSchema>;
|
|
11
|
+
|
|
12
|
+
export const RequestSchema = AvatarStudioVideoGenerationRequestSchema.extend({
|
|
13
|
+
imageMediaId: z.string().uuid().optional(),
|
|
14
|
+
audioMediaId: z.string().uuid().optional(),
|
|
15
|
+
}).strict();
|
|
16
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
17
|
+
|
|
18
|
+
export const ResponseSchema = z.object({
|
|
19
|
+
data: AvatarStudioGenerationJobSchema,
|
|
20
|
+
});
|
|
21
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { AvatarStudioGenerationJobSchema } from '../../../models';
|
|
3
|
+
import { AvatarStudioSceneIdParamsSchema } from '../shared/avatar-studio-common.schema';
|
|
4
|
+
|
|
5
|
+
export namespace GenerateAvatarStudioVoiceTimingsCommand {
|
|
6
|
+
export const ParamsSchema = AvatarStudioSceneIdParamsSchema;
|
|
7
|
+
export type Params = z.infer<typeof ParamsSchema>;
|
|
8
|
+
|
|
9
|
+
export const RequestSchema = z
|
|
10
|
+
.object({
|
|
11
|
+
mediaId: z.string().uuid().optional(),
|
|
12
|
+
})
|
|
13
|
+
.strict();
|
|
14
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
15
|
+
|
|
16
|
+
export const ResponseSchema = z.object({
|
|
17
|
+
data: AvatarStudioGenerationJobSchema,
|
|
18
|
+
});
|
|
19
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { AvatarStudioGenerationJobSchema } from '../../../models';
|
|
3
|
+
import { AvatarStudioGenerationJobIdParamsSchema } from '../shared/avatar-studio-common.schema';
|
|
4
|
+
|
|
5
|
+
export namespace GetAvatarStudioGenerationJobQuery {
|
|
6
|
+
export const ParamsSchema = AvatarStudioGenerationJobIdParamsSchema;
|
|
7
|
+
export type Params = z.infer<typeof ParamsSchema>;
|
|
8
|
+
|
|
9
|
+
export const ResponseSchema = z.object({
|
|
10
|
+
data: AvatarStudioGenerationJobSchema,
|
|
11
|
+
});
|
|
12
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
13
|
+
}
|