@purpleschool/gptbot 0.14.27 → 0.14.29
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 +23 -12
- package/api/routes.ts +68 -19
- package/build/api/controllers/http/avatar-studio.js +22 -12
- package/build/api/routes.js +41 -10
- package/build/commands/avatar-studio/generation-job/generate-avatar-studio-frame.command.js +2 -1
- package/build/commands/avatar-studio/generation-job/generate-avatar-studio-image.command.js +23 -0
- package/build/commands/avatar-studio/generation-job/generate-avatar-studio-scene-voice.command.js +4 -1
- package/build/commands/avatar-studio/generation-job/index.js +1 -3
- package/build/commands/avatar-studio/media/create-avatar-studio-media-from-file.command.js +6 -9
- package/build/commands/avatar-studio/media/find-avatar-studio-media.query.js +7 -5
- package/build/commands/avatar-studio/media/update-avatar-studio-media.command.js +1 -4
- package/build/commands/avatar-studio/scene/apply-avatar-studio-voice-sample-to-all-scenes.command.js +15 -0
- package/build/commands/avatar-studio/scene/index.js +2 -0
- package/build/commands/avatar-studio/scene/set-avatar-studio-scene-slot.command.js +21 -0
- package/build/commands/avatar-studio/scriptwriter/calculate-avatar-studio-scriptwriter-price.command.js +13 -6
- package/build/commands/avatar-studio/scriptwriter/create-avatar-studio-scriptwriter-message.command.js +23 -1
- package/build/commands/avatar-studio/shared/avatar-studio-common.schema.js +2 -1
- package/build/commands/avatar-studio/shared/get-avatar-studio-config.query.js +28 -18
- package/build/commands/avatar-studio/voice/design-avatar-studio-voice.command.js +5 -7
- package/build/commands/avatar-studio/voice/index.js +0 -3
- package/build/commands/photo-studio/execute-photo-studio-action.command.js +7 -2
- package/build/commands/photo-studio/find-photo-studio-job-by-id.query.js +2 -1
- package/build/constants/avatar-studio/enums/avatar-studio-job-type.enum.js +0 -3
- package/build/constants/avatar-studio/enums/avatar-studio-slot.enum.js +10 -7
- package/build/constants/avatar-studio/enums/avatar-studio-unavailable-reason.enum.js +16 -0
- package/build/constants/avatar-studio/enums/index.js +1 -5
- package/build/models/avatar-studio/avatar-studio.schema.js +60 -68
- package/commands/avatar-studio/generation-job/generate-avatar-studio-frame.command.ts +2 -1
- package/commands/avatar-studio/generation-job/{generate-avatar-studio-media-image.command.ts → generate-avatar-studio-image.command.ts} +5 -1
- package/commands/avatar-studio/generation-job/generate-avatar-studio-scene-voice.command.ts +4 -1
- package/commands/avatar-studio/generation-job/index.ts +1 -3
- package/commands/avatar-studio/media/create-avatar-studio-media-from-file.command.ts +7 -16
- package/commands/avatar-studio/media/find-avatar-studio-media.query.ts +9 -7
- package/commands/avatar-studio/media/update-avatar-studio-media.command.ts +1 -4
- package/commands/avatar-studio/scene/apply-avatar-studio-voice-sample-to-all-scenes.command.ts +20 -0
- package/commands/avatar-studio/scene/index.ts +2 -0
- package/commands/avatar-studio/{generation-job/generate-avatar-studio-voice-timings.command.ts → scene/set-avatar-studio-scene-slot.command.ts} +8 -5
- package/commands/avatar-studio/scriptwriter/calculate-avatar-studio-scriptwriter-price.command.ts +14 -7
- package/commands/avatar-studio/scriptwriter/create-avatar-studio-scriptwriter-message.command.ts +26 -1
- package/commands/avatar-studio/shared/avatar-studio-common.schema.ts +2 -1
- package/commands/avatar-studio/shared/get-avatar-studio-config.query.ts +31 -19
- package/commands/avatar-studio/voice/design-avatar-studio-voice.command.ts +6 -14
- package/commands/avatar-studio/voice/index.ts +0 -3
- package/commands/photo-studio/execute-photo-studio-action.command.ts +8 -2
- package/commands/photo-studio/find-photo-studio-job-by-id.query.ts +2 -1
- package/constants/avatar-studio/enums/avatar-studio-job-type.enum.ts +0 -3
- package/constants/avatar-studio/enums/avatar-studio-slot.enum.ts +10 -7
- package/constants/avatar-studio/enums/avatar-studio-unavailable-reason.enum.ts +12 -0
- package/constants/avatar-studio/enums/index.ts +1 -5
- package/models/avatar-studio/avatar-studio.schema.ts +59 -75
- package/package.json +1 -1
- package/build/commands/avatar-studio/generation-job/generate-avatar-studio-library-image.command.js +0 -20
- package/build/commands/avatar-studio/generation-job/generate-avatar-studio-media-image.command.js +0 -19
- package/build/commands/avatar-studio/generation-job/generate-avatar-studio-voice-timings.command.js +0 -18
- package/build/commands/avatar-studio/voice/find-avatar-studio-clip-voices.query.js +0 -14
- package/build/commands/avatar-studio/voice/find-avatar-studio-voices.query.js +0 -19
- package/build/commands/avatar-studio/voice/update-avatar-studio-clip-voice.command.js +0 -19
- package/build/constants/avatar-studio/enums/avatar-studio-job-phase.enum.js +0 -12
- package/build/constants/avatar-studio/enums/avatar-studio-media-role.enum.js +0 -14
- package/build/constants/avatar-studio/enums/avatar-studio-media-source.enum.js +0 -13
- package/build/constants/avatar-studio/enums/avatar-studio-scene-kind.enum.js +0 -7
- package/build/constants/avatar-studio/enums/avatar-studio-voice-source.enum.js +0 -10
- package/commands/avatar-studio/generation-job/generate-avatar-studio-library-image.command.ts +0 -25
- package/commands/avatar-studio/voice/find-avatar-studio-clip-voices.query.ts +0 -21
- package/commands/avatar-studio/voice/find-avatar-studio-voices.query.ts +0 -24
- package/commands/avatar-studio/voice/update-avatar-studio-clip-voice.command.ts +0 -21
- package/constants/avatar-studio/enums/avatar-studio-job-phase.enum.ts +0 -8
- package/constants/avatar-studio/enums/avatar-studio-media-role.enum.ts +0 -10
- package/constants/avatar-studio/enums/avatar-studio-media-source.enum.ts +0 -9
- package/constants/avatar-studio/enums/avatar-studio-scene-kind.enum.ts +0 -3
- package/constants/avatar-studio/enums/avatar-studio-voice-source.enum.ts +0 -6
|
@@ -2,19 +2,15 @@ import { z } from 'zod';
|
|
|
2
2
|
import {
|
|
3
3
|
AVATAR_STUDIO_EXPORT_STATUS,
|
|
4
4
|
AVATAR_STUDIO_IMAGE_STYLE,
|
|
5
|
-
AVATAR_STUDIO_JOB_PHASE,
|
|
6
5
|
AVATAR_STUDIO_JOB_STATUS,
|
|
7
6
|
AVATAR_STUDIO_JOB_TYPE,
|
|
8
7
|
AVATAR_STUDIO_MEDIA_KIND,
|
|
9
|
-
AVATAR_STUDIO_MEDIA_ROLE,
|
|
10
|
-
AVATAR_STUDIO_MEDIA_SOURCE,
|
|
11
8
|
AVATAR_STUDIO_SCRIPTWRITER_ROLE,
|
|
12
9
|
AVATAR_STUDIO_SLOT,
|
|
13
10
|
AVATAR_STUDIO_SUBTITLE_FONT,
|
|
14
11
|
AVATAR_STUDIO_SUBTITLE_MODE,
|
|
15
12
|
AVATAR_STUDIO_VIDEO_MODE,
|
|
16
13
|
AVATAR_STUDIO_VIDEO_QUALITY,
|
|
17
|
-
AVATAR_STUDIO_VOICE_SOURCE,
|
|
18
14
|
} from '../../constants';
|
|
19
15
|
import { FileSchema } from '../file.schema';
|
|
20
16
|
import { JsonObjectSchema, JsonValueSchema } from '../json-value.schema';
|
|
@@ -45,34 +41,31 @@ export type AvatarStudioWordTiming = z.infer<typeof AvatarStudioWordTimingSchema
|
|
|
45
41
|
|
|
46
42
|
export const AvatarStudioMediaSchema = z.object({
|
|
47
43
|
uuid: z.string().uuid(),
|
|
44
|
+
// Медиа принадлежит пользователю, а не клипу. Оба поля NULL — общее системное медиа (пресет).
|
|
48
45
|
userId: z.string().uuid().nullable(),
|
|
49
|
-
|
|
50
|
-
sceneId: z.string().uuid().nullable(),
|
|
46
|
+
unregisteredUserId: z.string().uuid().nullable(),
|
|
51
47
|
fileId: z.string().uuid(),
|
|
52
48
|
kind: z.nativeEnum(AVATAR_STUDIO_MEDIA_KIND),
|
|
53
|
-
source: z.nativeEnum(AVATAR_STUDIO_MEDIA_SOURCE),
|
|
54
|
-
role: z.nativeEnum(AVATAR_STUDIO_MEDIA_ROLE),
|
|
55
49
|
title: z.string().nullable(),
|
|
56
|
-
|
|
50
|
+
// Чем медиа сгенерировали, помнит job: media.toolJobId ⇢ job.request.
|
|
57
51
|
toolJobId: z.string().uuid().nullable(),
|
|
58
52
|
durationSeconds: z.number().nullable(),
|
|
53
|
+
/**
|
|
54
|
+
* Расшифровка аудио: «что сказано» — вход zero-shot TTS, когда медиа используют образцом.
|
|
55
|
+
* NULL — расшифровка ещё идёт или не удалась; таким медиа озвучивать нельзя.
|
|
56
|
+
*/
|
|
59
57
|
transcript: z.string().nullable(),
|
|
58
|
+
/** «Когда сказано», по словам: из этого рисуются субтитры. Свойство файла, не сцены. */
|
|
59
|
+
wordTimings: z.array(AvatarStudioWordTimingSchema).nullable(),
|
|
60
|
+
/** Готовые артефакты субтитров от провайдера STT. */
|
|
61
|
+
subtitles: JsonValueSchema.nullable(),
|
|
62
|
+
deletedAt: z.date().nullable(),
|
|
60
63
|
file: FileSchema.optional(),
|
|
61
64
|
createdAt: z.date(),
|
|
62
65
|
updatedAt: z.date(),
|
|
63
66
|
});
|
|
64
67
|
export type AvatarStudioMedia = z.infer<typeof AvatarStudioMediaSchema>;
|
|
65
68
|
|
|
66
|
-
export const AvatarStudioSceneReferenceMediaSchema = z.object({
|
|
67
|
-
uuid: z.string().uuid(),
|
|
68
|
-
sceneId: z.string().uuid(),
|
|
69
|
-
mediaId: z.string().uuid(),
|
|
70
|
-
position: z.number().int().min(0),
|
|
71
|
-
media: AvatarStudioMediaSchema.optional(),
|
|
72
|
-
createdAt: z.date(),
|
|
73
|
-
});
|
|
74
|
-
export type AvatarStudioSceneReferenceMedia = z.infer<typeof AvatarStudioSceneReferenceMediaSchema>;
|
|
75
|
-
|
|
76
69
|
export const AvatarStudioTrimConfigFields = {
|
|
77
70
|
trimStart: z.number().nonnegative().nullable().default(null),
|
|
78
71
|
trimEnd: z.number().nonnegative().nullable().default(null),
|
|
@@ -91,9 +84,13 @@ export const validateAvatarStudioTrim = (
|
|
|
91
84
|
}
|
|
92
85
|
};
|
|
93
86
|
|
|
87
|
+
/**
|
|
88
|
+
* Образец голоса — вход генерации наравне с текстом, поэтому лежит здесь, а не колонкой
|
|
89
|
+
* сцены: колонки сцены хранят результаты в слотах, конфиги — то, из чего их делают.
|
|
90
|
+
*/
|
|
94
91
|
export const AvatarStudioSceneVoiceConfigBaseSchema = z.object({
|
|
95
92
|
text: z.string().default(''),
|
|
96
|
-
|
|
93
|
+
voiceSampleMediaId: z.string().uuid().nullable().default(null),
|
|
97
94
|
...AvatarStudioTrimConfigFields,
|
|
98
95
|
});
|
|
99
96
|
|
|
@@ -101,9 +98,17 @@ export const AvatarStudioSceneVoiceConfigSchema =
|
|
|
101
98
|
AvatarStudioSceneVoiceConfigBaseSchema.superRefine(validateAvatarStudioTrim);
|
|
102
99
|
export type AvatarStudioSceneVoiceConfig = z.infer<typeof AvatarStudioSceneVoiceConfigSchema>;
|
|
103
100
|
|
|
101
|
+
/**
|
|
102
|
+
* Референсы — вход генерации кадра, наравне с prompt и style, поэтому лежат здесь,
|
|
103
|
+
* а не отдельной связью сцены: больше они ни для чего не нужны.
|
|
104
|
+
*
|
|
105
|
+
* Верхнюю границу числа референсов задаёт модель (maxAttachedImages), а не контракт:
|
|
106
|
+
* она разная у разных моделей и приезжает в конфиге.
|
|
107
|
+
*/
|
|
104
108
|
export const AvatarStudioSceneImageConfigSchema = z.object({
|
|
105
109
|
prompt: z.string().nullable().default(null),
|
|
106
110
|
style: z.nativeEnum(AVATAR_STUDIO_IMAGE_STYLE).default(AVATAR_STUDIO_IMAGE_STYLE.UGC),
|
|
111
|
+
references: z.array(z.string().uuid()).default([]),
|
|
107
112
|
});
|
|
108
113
|
export type AvatarStudioSceneImageConfig = z.infer<typeof AvatarStudioSceneImageConfigSchema>;
|
|
109
114
|
|
|
@@ -123,8 +128,8 @@ export type AvatarStudioSceneVideoConfig = z.infer<typeof AvatarStudioSceneVideo
|
|
|
123
128
|
export const AvatarStudioSceneGenerationJobSchema = z.object({
|
|
124
129
|
jobId: z.string().uuid(),
|
|
125
130
|
type: z.nativeEnum(AVATAR_STUDIO_JOB_TYPE),
|
|
126
|
-
|
|
127
|
-
targetSlot: z.nativeEnum(AVATAR_STUDIO_SLOT),
|
|
131
|
+
/** NULL — генерация не целится ни в один слот сцены. */
|
|
132
|
+
targetSlot: z.nativeEnum(AVATAR_STUDIO_SLOT).nullable(),
|
|
128
133
|
status: z.nativeEnum(AVATAR_STUDIO_JOB_STATUS),
|
|
129
134
|
resultMediaId: z.string().uuid().nullable(),
|
|
130
135
|
error: z.string().nullable(),
|
|
@@ -140,66 +145,39 @@ export const AvatarStudioSceneSchema = z.object({
|
|
|
140
145
|
voiceConfig: AvatarStudioSceneVoiceConfigSchema,
|
|
141
146
|
imageConfig: AvatarStudioSceneImageConfigSchema,
|
|
142
147
|
videoConfig: AvatarStudioSceneVideoConfigSchema,
|
|
143
|
-
|
|
144
|
-
sceneVideoMediaId: z.string().uuid().nullable(),
|
|
148
|
+
// Что лежит в слотах сцены прямо сейчас.
|
|
145
149
|
voiceMediaId: z.string().uuid().nullable(),
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
videoStatus: z.nativeEnum(AVATAR_STUDIO_JOB_STATUS),
|
|
149
|
-
voiceStatus: z.nativeEnum(AVATAR_STUDIO_JOB_STATUS),
|
|
150
|
-
avatarStatus: z.nativeEnum(AVATAR_STUDIO_JOB_STATUS),
|
|
151
|
-
frameError: z.string().nullable(),
|
|
152
|
-
videoError: z.string().nullable(),
|
|
153
|
-
voiceError: z.string().nullable(),
|
|
154
|
-
avatarError: z.string().nullable(),
|
|
155
|
-
wordTimings: z.array(AvatarStudioWordTimingSchema).nullable(),
|
|
156
|
-
transcript: z.string().nullable(),
|
|
157
|
-
subtitles: JsonValueSchema.nullable(),
|
|
158
|
-
frameMedia: AvatarStudioMediaSchema.nullable().optional(),
|
|
159
|
-
sceneVideoMedia: AvatarStudioMediaSchema.nullable().optional(),
|
|
150
|
+
frameMediaId: z.string().uuid().nullable(),
|
|
151
|
+
videoMediaId: z.string().uuid().nullable(),
|
|
160
152
|
voiceMedia: AvatarStudioMediaSchema.nullable().optional(),
|
|
161
|
-
|
|
162
|
-
|
|
153
|
+
frameMedia: AvatarStudioMediaSchema.nullable().optional(),
|
|
154
|
+
videoMedia: AvatarStudioMediaSchema.nullable().optional(),
|
|
155
|
+
/**
|
|
156
|
+
* Ход генерации слотов. Статус слота — это статус свежайшего job'а с нужным targetSlot;
|
|
157
|
+
* сцена его не дублирует, чтобы не хранить одно и то же в двух местах.
|
|
158
|
+
*/
|
|
163
159
|
generationJobs: z.array(AvatarStudioSceneGenerationJobSchema).optional(),
|
|
164
160
|
createdAt: z.date(),
|
|
165
161
|
updatedAt: z.date(),
|
|
166
162
|
});
|
|
167
163
|
export type AvatarStudioScene = z.infer<typeof AvatarStudioSceneSchema>;
|
|
168
164
|
|
|
169
|
-
export const AvatarStudioVoiceSchema = z.object({
|
|
170
|
-
uuid: z.string().uuid(),
|
|
171
|
-
userId: z.string().uuid().nullable(),
|
|
172
|
-
clipId: z.string().uuid().nullable(),
|
|
173
|
-
title: z.string(),
|
|
174
|
-
source: z.nativeEnum(AVATAR_STUDIO_VOICE_SOURCE),
|
|
175
|
-
presetKey: z.string().nullable(),
|
|
176
|
-
gender: z.enum(['male', 'female']).nullable(),
|
|
177
|
-
sortOrder: z.number().int().nullable(),
|
|
178
|
-
sampleMediaId: z.string().uuid().nullable(),
|
|
179
|
-
sampleText: z.string().nullable(),
|
|
180
|
-
metadata: JsonObjectSchema.nullable(),
|
|
181
|
-
sampleMedia: AvatarStudioMediaSchema.nullable().optional(),
|
|
182
|
-
createdAt: z.date(),
|
|
183
|
-
updatedAt: z.date(),
|
|
184
|
-
deletedAt: z.date().nullable(),
|
|
185
|
-
});
|
|
186
|
-
export type AvatarStudioVoice = z.infer<typeof AvatarStudioVoiceSchema>;
|
|
187
|
-
|
|
188
165
|
export const AvatarStudioGenerationJobBaseSchema = z.object({
|
|
189
166
|
uuid: z.string().uuid(),
|
|
190
|
-
|
|
167
|
+
// Владелец ровно один: зарегистрированный пользователь либо анрег.
|
|
168
|
+
userId: z.string().uuid().nullable(),
|
|
169
|
+
unregisteredUserId: z.string().uuid().nullable(),
|
|
191
170
|
clipId: z.string().uuid().nullable(),
|
|
192
171
|
sceneId: z.string().uuid().nullable(),
|
|
193
|
-
parentJobId: z.string().uuid().nullable(),
|
|
194
172
|
toolJobId: z.string().uuid().nullable(),
|
|
195
173
|
type: z.nativeEnum(AVATAR_STUDIO_JOB_TYPE),
|
|
196
|
-
|
|
197
|
-
targetSlot: z.nativeEnum(AVATAR_STUDIO_SLOT),
|
|
174
|
+
/** NULL — генерация не целится ни в один слот сцены. */
|
|
175
|
+
targetSlot: z.nativeEnum(AVATAR_STUDIO_SLOT).nullable(),
|
|
198
176
|
status: z.nativeEnum(AVATAR_STUDIO_JOB_STATUS),
|
|
199
177
|
request: JsonObjectSchema.nullable(),
|
|
200
178
|
resultMediaId: z.string().uuid().nullable(),
|
|
201
|
-
tokenReservationUuid
|
|
202
|
-
|
|
179
|
+
// tokenReservationUuid и price фронту не нужны: это внутренняя бухгалтерия резервирований.
|
|
180
|
+
// Колонки в БД остаются — по ним ведётся аудит списаний.
|
|
203
181
|
error: z.string().nullable(),
|
|
204
182
|
resultMedia: AvatarStudioMediaSchema.nullable().optional(),
|
|
205
183
|
startedAt: z.date().nullable(),
|
|
@@ -208,14 +186,14 @@ export const AvatarStudioGenerationJobBaseSchema = z.object({
|
|
|
208
186
|
updatedAt: z.date(),
|
|
209
187
|
});
|
|
210
188
|
|
|
211
|
-
export const AvatarStudioGenerationJobSchema = AvatarStudioGenerationJobBaseSchema
|
|
212
|
-
children: z.array(AvatarStudioGenerationJobBaseSchema).optional(),
|
|
213
|
-
});
|
|
189
|
+
export const AvatarStudioGenerationJobSchema = AvatarStudioGenerationJobBaseSchema;
|
|
214
190
|
export type AvatarStudioGenerationJob = z.infer<typeof AvatarStudioGenerationJobSchema>;
|
|
215
191
|
|
|
216
192
|
export const AvatarStudioExportJobSchema = z.object({
|
|
217
193
|
uuid: z.string().uuid(),
|
|
218
|
-
|
|
194
|
+
// Владелец ровно один: зарегистрированный пользователь либо анрег.
|
|
195
|
+
userId: z.string().uuid().nullable(),
|
|
196
|
+
unregisteredUserId: z.string().uuid().nullable(),
|
|
219
197
|
clipId: z.string().uuid(),
|
|
220
198
|
status: z.nativeEnum(AVATAR_STUDIO_EXPORT_STATUS),
|
|
221
199
|
resultMediaId: z.string().uuid().nullable(),
|
|
@@ -231,7 +209,9 @@ export type AvatarStudioExportJob = z.infer<typeof AvatarStudioExportJobSchema>;
|
|
|
231
209
|
|
|
232
210
|
export const AvatarStudioScriptwriterMessageSchema = z.object({
|
|
233
211
|
uuid: z.string().uuid(),
|
|
234
|
-
|
|
212
|
+
// Владелец ровно один: зарегистрированный пользователь либо анрег.
|
|
213
|
+
userId: z.string().uuid().nullable(),
|
|
214
|
+
unregisteredUserId: z.string().uuid().nullable(),
|
|
235
215
|
clipId: z.string().uuid(),
|
|
236
216
|
sceneId: z.string().uuid().nullable(),
|
|
237
217
|
role: z.nativeEnum(AVATAR_STUDIO_SCRIPTWRITER_ROLE),
|
|
@@ -243,16 +223,20 @@ export type AvatarStudioScriptwriterMessage = z.infer<typeof AvatarStudioScriptw
|
|
|
243
223
|
|
|
244
224
|
export const AvatarStudioClipSchema = z.object({
|
|
245
225
|
uuid: z.string().uuid(),
|
|
246
|
-
|
|
226
|
+
// Владелец ровно один: зарегистрированный пользователь либо анрег.
|
|
227
|
+
userId: z.string().uuid().nullable(),
|
|
228
|
+
unregisteredUserId: z.string().uuid().nullable(),
|
|
247
229
|
title: z.string(),
|
|
248
230
|
subtitleSettings: AvatarStudioSubtitleSettingsSchema,
|
|
249
|
-
selectedVoiceId: z.string().uuid().nullable(),
|
|
250
231
|
exportMediaId: z.string().uuid().nullable(),
|
|
251
|
-
|
|
232
|
+
/**
|
|
233
|
+
* Обложка клипа: кадр первой по порядку сцены, у которой он есть. NULL — кадров нет ни у одной.
|
|
234
|
+
* Считается на лету из уже загруженных сцен, отдельного поля в БД нет.
|
|
235
|
+
*/
|
|
236
|
+
previewUrl: z.string().nullable(),
|
|
252
237
|
exportMedia: AvatarStudioMediaSchema.nullable().optional(),
|
|
253
238
|
scenes: z.array(AvatarStudioSceneSchema).optional(),
|
|
254
|
-
media
|
|
255
|
-
voices: z.array(AvatarStudioVoiceSchema).optional(),
|
|
239
|
+
// Медиатеки у клипа нет: она принадлежит пользователю — GET /media?owner=me.
|
|
256
240
|
generationJobs: z.array(AvatarStudioGenerationJobSchema).optional(),
|
|
257
241
|
exportJobs: z.array(AvatarStudioExportJobSchema).optional(),
|
|
258
242
|
scriptwriterMessages: z.array(AvatarStudioScriptwriterMessageSchema).optional(),
|
package/package.json
CHANGED
package/build/commands/avatar-studio/generation-job/generate-avatar-studio-library-image.command.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GenerateAvatarStudioLibraryImageCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("../../../models");
|
|
6
|
-
const avatar_studio_common_schema_1 = require("../shared/avatar-studio-common.schema");
|
|
7
|
-
var GenerateAvatarStudioLibraryImageCommand;
|
|
8
|
-
(function (GenerateAvatarStudioLibraryImageCommand) {
|
|
9
|
-
GenerateAvatarStudioLibraryImageCommand.ParamsSchema = avatar_studio_common_schema_1.AvatarStudioClipIdParamsSchema;
|
|
10
|
-
GenerateAvatarStudioLibraryImageCommand.RequestSchema = zod_1.z
|
|
11
|
-
.object({
|
|
12
|
-
prompt: zod_1.z.string().trim().min(1),
|
|
13
|
-
referenceMediaIds: avatar_studio_common_schema_1.AvatarStudioUuidListSchema.optional(),
|
|
14
|
-
aspectRatio: models_1.AvatarStudioAspectRatioSchema.default('9:16'),
|
|
15
|
-
})
|
|
16
|
-
.strict();
|
|
17
|
-
GenerateAvatarStudioLibraryImageCommand.ResponseSchema = zod_1.z.object({
|
|
18
|
-
data: models_1.AvatarStudioGenerationJobSchema,
|
|
19
|
-
});
|
|
20
|
-
})(GenerateAvatarStudioLibraryImageCommand || (exports.GenerateAvatarStudioLibraryImageCommand = GenerateAvatarStudioLibraryImageCommand = {}));
|
package/build/commands/avatar-studio/generation-job/generate-avatar-studio-media-image.command.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GenerateAvatarStudioMediaImageCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("../../../models");
|
|
6
|
-
const avatar_studio_common_schema_1 = require("../shared/avatar-studio-common.schema");
|
|
7
|
-
var GenerateAvatarStudioMediaImageCommand;
|
|
8
|
-
(function (GenerateAvatarStudioMediaImageCommand) {
|
|
9
|
-
GenerateAvatarStudioMediaImageCommand.RequestSchema = zod_1.z
|
|
10
|
-
.object({
|
|
11
|
-
prompt: zod_1.z.string().trim().min(1),
|
|
12
|
-
referenceMediaIds: avatar_studio_common_schema_1.AvatarStudioUuidListSchema.optional(),
|
|
13
|
-
aspectRatio: models_1.AvatarStudioAspectRatioSchema.default('9:16'),
|
|
14
|
-
})
|
|
15
|
-
.strict();
|
|
16
|
-
GenerateAvatarStudioMediaImageCommand.ResponseSchema = zod_1.z.object({
|
|
17
|
-
data: models_1.AvatarStudioGenerationJobSchema,
|
|
18
|
-
});
|
|
19
|
-
})(GenerateAvatarStudioMediaImageCommand || (exports.GenerateAvatarStudioMediaImageCommand = GenerateAvatarStudioMediaImageCommand = {}));
|
package/build/commands/avatar-studio/generation-job/generate-avatar-studio-voice-timings.command.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GenerateAvatarStudioVoiceTimingsCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("../../../models");
|
|
6
|
-
const avatar_studio_common_schema_1 = require("../shared/avatar-studio-common.schema");
|
|
7
|
-
var GenerateAvatarStudioVoiceTimingsCommand;
|
|
8
|
-
(function (GenerateAvatarStudioVoiceTimingsCommand) {
|
|
9
|
-
GenerateAvatarStudioVoiceTimingsCommand.ParamsSchema = avatar_studio_common_schema_1.AvatarStudioSceneIdParamsSchema;
|
|
10
|
-
GenerateAvatarStudioVoiceTimingsCommand.RequestSchema = zod_1.z
|
|
11
|
-
.object({
|
|
12
|
-
mediaId: zod_1.z.string().uuid().optional(),
|
|
13
|
-
})
|
|
14
|
-
.strict();
|
|
15
|
-
GenerateAvatarStudioVoiceTimingsCommand.ResponseSchema = zod_1.z.object({
|
|
16
|
-
data: models_1.AvatarStudioGenerationJobSchema,
|
|
17
|
-
});
|
|
18
|
-
})(GenerateAvatarStudioVoiceTimingsCommand || (exports.GenerateAvatarStudioVoiceTimingsCommand = GenerateAvatarStudioVoiceTimingsCommand = {}));
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FindAvatarStudioClipVoicesQuery = void 0;
|
|
4
|
-
const models_1 = require("../../../models");
|
|
5
|
-
const avatar_studio_common_schema_1 = require("../shared/avatar-studio-common.schema");
|
|
6
|
-
const find_avatar_studio_voices_query_1 = require("./find-avatar-studio-voices.query");
|
|
7
|
-
var FindAvatarStudioClipVoicesQuery;
|
|
8
|
-
(function (FindAvatarStudioClipVoicesQuery) {
|
|
9
|
-
FindAvatarStudioClipVoicesQuery.ParamsSchema = avatar_studio_common_schema_1.AvatarStudioClipIdParamsSchema;
|
|
10
|
-
FindAvatarStudioClipVoicesQuery.QuerySchema = avatar_studio_common_schema_1.AvatarStudioPaginationQuerySchema.extend({
|
|
11
|
-
source: find_avatar_studio_voices_query_1.AvatarStudioVoiceSourceFilterSchema.optional(),
|
|
12
|
-
});
|
|
13
|
-
FindAvatarStudioClipVoicesQuery.ResponseSchema = (0, avatar_studio_common_schema_1.AvatarStudioPagedResponseSchema)(models_1.AvatarStudioVoiceSchema);
|
|
14
|
-
})(FindAvatarStudioClipVoicesQuery || (exports.FindAvatarStudioClipVoicesQuery = FindAvatarStudioClipVoicesQuery = {}));
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FindAvatarStudioVoicesQuery = exports.AvatarStudioVoiceSourceFilterSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const constants_1 = require("../../../constants");
|
|
6
|
-
const models_1 = require("../../../models");
|
|
7
|
-
const avatar_studio_common_schema_1 = require("../shared/avatar-studio-common.schema");
|
|
8
|
-
exports.AvatarStudioVoiceSourceFilterSchema = zod_1.z.union([
|
|
9
|
-
zod_1.z.nativeEnum(constants_1.AVATAR_STUDIO_VOICE_SOURCE),
|
|
10
|
-
zod_1.z.literal('user'),
|
|
11
|
-
]);
|
|
12
|
-
var FindAvatarStudioVoicesQuery;
|
|
13
|
-
(function (FindAvatarStudioVoicesQuery) {
|
|
14
|
-
FindAvatarStudioVoicesQuery.QuerySchema = avatar_studio_common_schema_1.AvatarStudioPaginationQuerySchema.extend({
|
|
15
|
-
clipId: zod_1.z.string().uuid().optional(),
|
|
16
|
-
source: exports.AvatarStudioVoiceSourceFilterSchema.optional(),
|
|
17
|
-
});
|
|
18
|
-
FindAvatarStudioVoicesQuery.ResponseSchema = (0, avatar_studio_common_schema_1.AvatarStudioPagedResponseSchema)(models_1.AvatarStudioVoiceSchema);
|
|
19
|
-
})(FindAvatarStudioVoicesQuery || (exports.FindAvatarStudioVoicesQuery = FindAvatarStudioVoicesQuery = {}));
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UpdateAvatarStudioClipVoiceCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("../../../models");
|
|
6
|
-
const avatar_studio_common_schema_1 = require("../shared/avatar-studio-common.schema");
|
|
7
|
-
var UpdateAvatarStudioClipVoiceCommand;
|
|
8
|
-
(function (UpdateAvatarStudioClipVoiceCommand) {
|
|
9
|
-
UpdateAvatarStudioClipVoiceCommand.ParamsSchema = avatar_studio_common_schema_1.AvatarStudioClipIdParamsSchema;
|
|
10
|
-
UpdateAvatarStudioClipVoiceCommand.RequestSchema = zod_1.z
|
|
11
|
-
.object({
|
|
12
|
-
voiceId: zod_1.z.string().uuid().nullable(),
|
|
13
|
-
applyToScenes: zod_1.z.boolean().default(false).optional(),
|
|
14
|
-
})
|
|
15
|
-
.strict();
|
|
16
|
-
UpdateAvatarStudioClipVoiceCommand.ResponseSchema = zod_1.z.object({
|
|
17
|
-
data: models_1.AvatarStudioClipSchema,
|
|
18
|
-
});
|
|
19
|
-
})(UpdateAvatarStudioClipVoiceCommand || (exports.UpdateAvatarStudioClipVoiceCommand = UpdateAvatarStudioClipVoiceCommand = {}));
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AVATAR_STUDIO_JOB_PHASE = void 0;
|
|
4
|
-
var AVATAR_STUDIO_JOB_PHASE;
|
|
5
|
-
(function (AVATAR_STUDIO_JOB_PHASE) {
|
|
6
|
-
AVATAR_STUDIO_JOB_PHASE["REQUESTED"] = "requested";
|
|
7
|
-
AVATAR_STUDIO_JOB_PHASE["TOOL_JOB_STARTED"] = "tool_job_started";
|
|
8
|
-
AVATAR_STUDIO_JOB_PHASE["TTS"] = "tts";
|
|
9
|
-
AVATAR_STUDIO_JOB_PHASE["STT"] = "stt";
|
|
10
|
-
AVATAR_STUDIO_JOB_PHASE["SAVING_MEDIA"] = "saving_media";
|
|
11
|
-
AVATAR_STUDIO_JOB_PHASE["COMPLETED"] = "completed";
|
|
12
|
-
})(AVATAR_STUDIO_JOB_PHASE || (exports.AVATAR_STUDIO_JOB_PHASE = AVATAR_STUDIO_JOB_PHASE = {}));
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AVATAR_STUDIO_MEDIA_ROLE = void 0;
|
|
4
|
-
var AVATAR_STUDIO_MEDIA_ROLE;
|
|
5
|
-
(function (AVATAR_STUDIO_MEDIA_ROLE) {
|
|
6
|
-
AVATAR_STUDIO_MEDIA_ROLE["FRAME"] = "frame";
|
|
7
|
-
AVATAR_STUDIO_MEDIA_ROLE["REFERENCE"] = "reference";
|
|
8
|
-
AVATAR_STUDIO_MEDIA_ROLE["LIBRARY"] = "library";
|
|
9
|
-
AVATAR_STUDIO_MEDIA_ROLE["SCENE_VIDEO"] = "scene_video";
|
|
10
|
-
AVATAR_STUDIO_MEDIA_ROLE["AVATAR_VIDEO"] = "avatar_video";
|
|
11
|
-
AVATAR_STUDIO_MEDIA_ROLE["VOICE"] = "voice";
|
|
12
|
-
AVATAR_STUDIO_MEDIA_ROLE["VOICE_SAMPLE"] = "voice_sample";
|
|
13
|
-
AVATAR_STUDIO_MEDIA_ROLE["EXPORT"] = "export";
|
|
14
|
-
})(AVATAR_STUDIO_MEDIA_ROLE || (exports.AVATAR_STUDIO_MEDIA_ROLE = AVATAR_STUDIO_MEDIA_ROLE = {}));
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AVATAR_STUDIO_MEDIA_SOURCE = void 0;
|
|
4
|
-
var AVATAR_STUDIO_MEDIA_SOURCE;
|
|
5
|
-
(function (AVATAR_STUDIO_MEDIA_SOURCE) {
|
|
6
|
-
AVATAR_STUDIO_MEDIA_SOURCE["UPLOAD"] = "upload";
|
|
7
|
-
AVATAR_STUDIO_MEDIA_SOURCE["FRAME_GENERATION"] = "frame_generation";
|
|
8
|
-
AVATAR_STUDIO_MEDIA_SOURCE["LIBRARY_GENERATION"] = "library_generation";
|
|
9
|
-
AVATAR_STUDIO_MEDIA_SOURCE["VIDEO_GENERATION"] = "video_generation";
|
|
10
|
-
AVATAR_STUDIO_MEDIA_SOURCE["TTS"] = "tts";
|
|
11
|
-
AVATAR_STUDIO_MEDIA_SOURCE["VOICE_DESIGN"] = "voice_design";
|
|
12
|
-
AVATAR_STUDIO_MEDIA_SOURCE["EXPORT"] = "export";
|
|
13
|
-
})(AVATAR_STUDIO_MEDIA_SOURCE || (exports.AVATAR_STUDIO_MEDIA_SOURCE = AVATAR_STUDIO_MEDIA_SOURCE = {}));
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AVATAR_STUDIO_SCENE_KIND = void 0;
|
|
4
|
-
var AVATAR_STUDIO_SCENE_KIND;
|
|
5
|
-
(function (AVATAR_STUDIO_SCENE_KIND) {
|
|
6
|
-
AVATAR_STUDIO_SCENE_KIND["SCENE"] = "scene";
|
|
7
|
-
})(AVATAR_STUDIO_SCENE_KIND || (exports.AVATAR_STUDIO_SCENE_KIND = AVATAR_STUDIO_SCENE_KIND = {}));
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AVATAR_STUDIO_VOICE_SOURCE = void 0;
|
|
4
|
-
var AVATAR_STUDIO_VOICE_SOURCE;
|
|
5
|
-
(function (AVATAR_STUDIO_VOICE_SOURCE) {
|
|
6
|
-
AVATAR_STUDIO_VOICE_SOURCE["UPLOAD"] = "upload";
|
|
7
|
-
AVATAR_STUDIO_VOICE_SOURCE["TTS"] = "tts";
|
|
8
|
-
AVATAR_STUDIO_VOICE_SOURCE["VOICE_DESIGN"] = "voice_design";
|
|
9
|
-
AVATAR_STUDIO_VOICE_SOURCE["PRESET"] = "preset";
|
|
10
|
-
})(AVATAR_STUDIO_VOICE_SOURCE || (exports.AVATAR_STUDIO_VOICE_SOURCE = AVATAR_STUDIO_VOICE_SOURCE = {}));
|
package/commands/avatar-studio/generation-job/generate-avatar-studio-library-image.command.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { AvatarStudioVoiceSchema } from '../../../models';
|
|
3
|
-
import {
|
|
4
|
-
AvatarStudioClipIdParamsSchema,
|
|
5
|
-
AvatarStudioPagedResponseSchema,
|
|
6
|
-
AvatarStudioPaginationQuerySchema,
|
|
7
|
-
} from '../shared/avatar-studio-common.schema';
|
|
8
|
-
import { AvatarStudioVoiceSourceFilterSchema } from './find-avatar-studio-voices.query';
|
|
9
|
-
|
|
10
|
-
export namespace FindAvatarStudioClipVoicesQuery {
|
|
11
|
-
export const ParamsSchema = AvatarStudioClipIdParamsSchema;
|
|
12
|
-
export type Params = z.infer<typeof ParamsSchema>;
|
|
13
|
-
|
|
14
|
-
export const QuerySchema = AvatarStudioPaginationQuerySchema.extend({
|
|
15
|
-
source: AvatarStudioVoiceSourceFilterSchema.optional(),
|
|
16
|
-
});
|
|
17
|
-
export type Query = z.infer<typeof QuerySchema>;
|
|
18
|
-
|
|
19
|
-
export const ResponseSchema = AvatarStudioPagedResponseSchema(AvatarStudioVoiceSchema);
|
|
20
|
-
export type Response = z.infer<typeof ResponseSchema>;
|
|
21
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { AVATAR_STUDIO_VOICE_SOURCE } from '../../../constants';
|
|
3
|
-
import { AvatarStudioVoiceSchema } from '../../../models';
|
|
4
|
-
import {
|
|
5
|
-
AvatarStudioPagedResponseSchema,
|
|
6
|
-
AvatarStudioPaginationQuerySchema,
|
|
7
|
-
} from '../shared/avatar-studio-common.schema';
|
|
8
|
-
|
|
9
|
-
export const AvatarStudioVoiceSourceFilterSchema = z.union([
|
|
10
|
-
z.nativeEnum(AVATAR_STUDIO_VOICE_SOURCE),
|
|
11
|
-
z.literal('user'),
|
|
12
|
-
]);
|
|
13
|
-
export type AvatarStudioVoiceSourceFilter = z.infer<typeof AvatarStudioVoiceSourceFilterSchema>;
|
|
14
|
-
|
|
15
|
-
export namespace FindAvatarStudioVoicesQuery {
|
|
16
|
-
export const QuerySchema = AvatarStudioPaginationQuerySchema.extend({
|
|
17
|
-
clipId: z.string().uuid().optional(),
|
|
18
|
-
source: AvatarStudioVoiceSourceFilterSchema.optional(),
|
|
19
|
-
});
|
|
20
|
-
export type Query = z.infer<typeof QuerySchema>;
|
|
21
|
-
|
|
22
|
-
export const ResponseSchema = AvatarStudioPagedResponseSchema(AvatarStudioVoiceSchema);
|
|
23
|
-
export type Response = z.infer<typeof ResponseSchema>;
|
|
24
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { AvatarStudioClipSchema } from '../../../models';
|
|
3
|
-
import { AvatarStudioClipIdParamsSchema } from '../shared/avatar-studio-common.schema';
|
|
4
|
-
|
|
5
|
-
export namespace UpdateAvatarStudioClipVoiceCommand {
|
|
6
|
-
export const ParamsSchema = AvatarStudioClipIdParamsSchema;
|
|
7
|
-
export type Params = z.infer<typeof ParamsSchema>;
|
|
8
|
-
|
|
9
|
-
export const RequestSchema = z
|
|
10
|
-
.object({
|
|
11
|
-
voiceId: z.string().uuid().nullable(),
|
|
12
|
-
applyToScenes: z.boolean().default(false).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
|
-
}
|