@purpleschool/gptbot-tools 0.4.15 → 0.4.17-stage-2
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/image-generation/commands/image-generation-model/get-image-generation-model-by-uuid.command.d.ts +0 -2
- package/build/image-generation/enums/index.d.ts +0 -1
- package/build/image-generation/enums/index.js +0 -1
- package/build/image-generation/models/image-generation-config.schema.d.ts +0 -1
- package/build/image-generation/models/image-generation-model.schema.d.ts +1 -2
- package/build/image-generation/models/image-generation-model.schema.js +0 -1
- package/build/image-generation/queries/get-image-generation-config.query.d.ts +0 -2
- package/build/index.d.ts +3 -0
- package/build/index.js +3 -0
- package/build/motion-control/commands.d.ts +669 -0
- package/build/motion-control/commands.js +128 -0
- package/build/motion-control/index.d.ts +5 -0
- package/build/motion-control/index.js +21 -0
- package/build/motion-control/models.d.ts +297 -0
- package/build/motion-control/models.js +93 -0
- package/build/motion-control/queries.d.ts +504 -0
- package/build/motion-control/queries.js +41 -0
- package/build/motion-control/routes.d.ts +18 -0
- package/build/motion-control/routes.js +21 -0
- package/build/motion-control/utils.d.ts +4 -0
- package/build/motion-control/utils.js +23 -0
- package/build/tools/enums/tool-content-type.enum.d.ts +1 -0
- package/build/tools/enums/tool-content-type.enum.js +1 -0
- package/build/tools/enums/tool-type.enum.d.ts +1 -0
- package/build/tools/enums/tool-type.enum.js +1 -0
- package/build/tools/models/global-tools-config.schema.d.ts +81 -1
- package/build/tools/models/global-tools-config.schema.js +8 -6
- package/build/tools/models/tools-with-configs.schema.d.ts +186 -2
- package/build/tools/models/tools-with-configs.schema.js +11 -6
- package/build/tools/queries/get-global-tools-config.query.d.ts +144 -2
- package/build/tools/queries/get-tools-with-configs.query.d.ts +168 -2
- package/package.json +2 -2
- package/build/image-generation/enums/image-generation-model-strategy.enum.d.ts +0 -21
- package/build/image-generation/enums/image-generation-model-strategy.enum.js +0 -35
|
@@ -0,0 +1,504 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { JOB_SCOPE } from '../common';
|
|
3
|
+
import { JOB_SORT, JOB_STATUS } from '../tools/enums';
|
|
4
|
+
export declare namespace GetMotionControlConfigQuery {
|
|
5
|
+
const RequestSchema: z.ZodObject<{
|
|
6
|
+
locale: z.ZodEnum<typeof import("@purpleschool/rugpt-lib-common").LOCALE>;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
type Request = z.infer<typeof RequestSchema>;
|
|
9
|
+
const ResponseSchema: z.ZodObject<{
|
|
10
|
+
isSuccess: z.ZodBoolean;
|
|
11
|
+
data: z.ZodOptional<z.ZodType<{
|
|
12
|
+
models: {
|
|
13
|
+
uuid: string;
|
|
14
|
+
title: string;
|
|
15
|
+
description: string;
|
|
16
|
+
aiModel: string;
|
|
17
|
+
status: import("..").TOOL_MODEL_STATUS;
|
|
18
|
+
order: number;
|
|
19
|
+
icons: {
|
|
20
|
+
light: {
|
|
21
|
+
svg: string;
|
|
22
|
+
png: string;
|
|
23
|
+
};
|
|
24
|
+
dark: {
|
|
25
|
+
svg: string;
|
|
26
|
+
png: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
maxPromptLength: number;
|
|
30
|
+
maxInputVideoSizeBytes: number;
|
|
31
|
+
maxInputImageSizeBytes: number;
|
|
32
|
+
supportedVideoFormats: string[];
|
|
33
|
+
supportedImageFormats: string[];
|
|
34
|
+
params: {
|
|
35
|
+
resolution: {
|
|
36
|
+
options: ("1080p" | "720p")[];
|
|
37
|
+
};
|
|
38
|
+
backgroundSource: {
|
|
39
|
+
options: ("image" | "video")[];
|
|
40
|
+
};
|
|
41
|
+
duration: {
|
|
42
|
+
min: number;
|
|
43
|
+
maxByBackgroundSource: {
|
|
44
|
+
image: number;
|
|
45
|
+
video: number;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
geometry: {
|
|
49
|
+
minWidth: number;
|
|
50
|
+
minHeight: number;
|
|
51
|
+
maxWidth?: number | undefined;
|
|
52
|
+
maxHeight?: number | undefined;
|
|
53
|
+
minAspectRatio: number;
|
|
54
|
+
maxAspectRatio: number;
|
|
55
|
+
};
|
|
56
|
+
sourceGeometry?: {
|
|
57
|
+
image: {
|
|
58
|
+
minWidth: number;
|
|
59
|
+
minHeight: number;
|
|
60
|
+
maxWidth?: number | undefined;
|
|
61
|
+
maxHeight?: number | undefined;
|
|
62
|
+
minAspectRatio: number;
|
|
63
|
+
maxAspectRatio: number;
|
|
64
|
+
};
|
|
65
|
+
video: {
|
|
66
|
+
minWidth: number;
|
|
67
|
+
minHeight: number;
|
|
68
|
+
maxWidth?: number | undefined;
|
|
69
|
+
maxHeight?: number | undefined;
|
|
70
|
+
minAspectRatio: number;
|
|
71
|
+
maxAspectRatio: number;
|
|
72
|
+
} | null;
|
|
73
|
+
} | undefined;
|
|
74
|
+
};
|
|
75
|
+
pricingRules: {
|
|
76
|
+
resolution: "1080p" | "720p";
|
|
77
|
+
pricePerSecond: number;
|
|
78
|
+
}[];
|
|
79
|
+
createdAt: Date;
|
|
80
|
+
updatedAt: Date;
|
|
81
|
+
}[];
|
|
82
|
+
}, unknown, z.core.$ZodTypeInternals<{
|
|
83
|
+
models: {
|
|
84
|
+
uuid: string;
|
|
85
|
+
title: string;
|
|
86
|
+
description: string;
|
|
87
|
+
aiModel: string;
|
|
88
|
+
status: import("..").TOOL_MODEL_STATUS;
|
|
89
|
+
order: number;
|
|
90
|
+
icons: {
|
|
91
|
+
light: {
|
|
92
|
+
svg: string;
|
|
93
|
+
png: string;
|
|
94
|
+
};
|
|
95
|
+
dark: {
|
|
96
|
+
svg: string;
|
|
97
|
+
png: string;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
maxPromptLength: number;
|
|
101
|
+
maxInputVideoSizeBytes: number;
|
|
102
|
+
maxInputImageSizeBytes: number;
|
|
103
|
+
supportedVideoFormats: string[];
|
|
104
|
+
supportedImageFormats: string[];
|
|
105
|
+
params: {
|
|
106
|
+
resolution: {
|
|
107
|
+
options: ("1080p" | "720p")[];
|
|
108
|
+
};
|
|
109
|
+
backgroundSource: {
|
|
110
|
+
options: ("image" | "video")[];
|
|
111
|
+
};
|
|
112
|
+
duration: {
|
|
113
|
+
min: number;
|
|
114
|
+
maxByBackgroundSource: {
|
|
115
|
+
image: number;
|
|
116
|
+
video: number;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
geometry: {
|
|
120
|
+
minWidth: number;
|
|
121
|
+
minHeight: number;
|
|
122
|
+
maxWidth?: number | undefined;
|
|
123
|
+
maxHeight?: number | undefined;
|
|
124
|
+
minAspectRatio: number;
|
|
125
|
+
maxAspectRatio: number;
|
|
126
|
+
};
|
|
127
|
+
sourceGeometry?: {
|
|
128
|
+
image: {
|
|
129
|
+
minWidth: number;
|
|
130
|
+
minHeight: number;
|
|
131
|
+
maxWidth?: number | undefined;
|
|
132
|
+
maxHeight?: number | undefined;
|
|
133
|
+
minAspectRatio: number;
|
|
134
|
+
maxAspectRatio: number;
|
|
135
|
+
};
|
|
136
|
+
video: {
|
|
137
|
+
minWidth: number;
|
|
138
|
+
minHeight: number;
|
|
139
|
+
maxWidth?: number | undefined;
|
|
140
|
+
maxHeight?: number | undefined;
|
|
141
|
+
minAspectRatio: number;
|
|
142
|
+
maxAspectRatio: number;
|
|
143
|
+
} | null;
|
|
144
|
+
} | undefined;
|
|
145
|
+
};
|
|
146
|
+
pricingRules: {
|
|
147
|
+
resolution: "1080p" | "720p";
|
|
148
|
+
pricePerSecond: number;
|
|
149
|
+
}[];
|
|
150
|
+
createdAt: Date;
|
|
151
|
+
updatedAt: Date;
|
|
152
|
+
}[];
|
|
153
|
+
}, unknown>>>;
|
|
154
|
+
code: z.ZodOptional<z.ZodString>;
|
|
155
|
+
message: z.ZodOptional<z.ZodString>;
|
|
156
|
+
}, z.core.$strip>;
|
|
157
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
158
|
+
}
|
|
159
|
+
export declare namespace GetMotionControlModelByUuidCommand {
|
|
160
|
+
const RequestSchema: z.ZodObject<{
|
|
161
|
+
locale: z.ZodEnum<typeof import("@purpleschool/rugpt-lib-common").LOCALE>;
|
|
162
|
+
uuid: z.ZodUUID;
|
|
163
|
+
}, z.core.$strip>;
|
|
164
|
+
type Request = z.infer<typeof RequestSchema>;
|
|
165
|
+
const ResponseSchema: z.ZodObject<{
|
|
166
|
+
isSuccess: z.ZodBoolean;
|
|
167
|
+
data: z.ZodOptional<z.ZodType<{
|
|
168
|
+
uuid: string;
|
|
169
|
+
title: string;
|
|
170
|
+
description: string;
|
|
171
|
+
aiModel: string;
|
|
172
|
+
status: import("..").TOOL_MODEL_STATUS;
|
|
173
|
+
order: number;
|
|
174
|
+
icons: {
|
|
175
|
+
light: {
|
|
176
|
+
svg: string;
|
|
177
|
+
png: string;
|
|
178
|
+
};
|
|
179
|
+
dark: {
|
|
180
|
+
svg: string;
|
|
181
|
+
png: string;
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
maxPromptLength: number;
|
|
185
|
+
maxInputVideoSizeBytes: number;
|
|
186
|
+
maxInputImageSizeBytes: number;
|
|
187
|
+
supportedVideoFormats: string[];
|
|
188
|
+
supportedImageFormats: string[];
|
|
189
|
+
params: {
|
|
190
|
+
resolution: {
|
|
191
|
+
options: ("1080p" | "720p")[];
|
|
192
|
+
};
|
|
193
|
+
backgroundSource: {
|
|
194
|
+
options: ("image" | "video")[];
|
|
195
|
+
};
|
|
196
|
+
duration: {
|
|
197
|
+
min: number;
|
|
198
|
+
maxByBackgroundSource: {
|
|
199
|
+
image: number;
|
|
200
|
+
video: number;
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
geometry: {
|
|
204
|
+
minWidth: number;
|
|
205
|
+
minHeight: number;
|
|
206
|
+
maxWidth?: number | undefined;
|
|
207
|
+
maxHeight?: number | undefined;
|
|
208
|
+
minAspectRatio: number;
|
|
209
|
+
maxAspectRatio: number;
|
|
210
|
+
};
|
|
211
|
+
sourceGeometry?: {
|
|
212
|
+
image: {
|
|
213
|
+
minWidth: number;
|
|
214
|
+
minHeight: number;
|
|
215
|
+
maxWidth?: number | undefined;
|
|
216
|
+
maxHeight?: number | undefined;
|
|
217
|
+
minAspectRatio: number;
|
|
218
|
+
maxAspectRatio: number;
|
|
219
|
+
};
|
|
220
|
+
video: {
|
|
221
|
+
minWidth: number;
|
|
222
|
+
minHeight: number;
|
|
223
|
+
maxWidth?: number | undefined;
|
|
224
|
+
maxHeight?: number | undefined;
|
|
225
|
+
minAspectRatio: number;
|
|
226
|
+
maxAspectRatio: number;
|
|
227
|
+
} | null;
|
|
228
|
+
} | undefined;
|
|
229
|
+
};
|
|
230
|
+
pricingRules: {
|
|
231
|
+
resolution: "1080p" | "720p";
|
|
232
|
+
pricePerSecond: number;
|
|
233
|
+
}[];
|
|
234
|
+
createdAt: Date;
|
|
235
|
+
updatedAt: Date;
|
|
236
|
+
}, unknown, z.core.$ZodTypeInternals<{
|
|
237
|
+
uuid: string;
|
|
238
|
+
title: string;
|
|
239
|
+
description: string;
|
|
240
|
+
aiModel: string;
|
|
241
|
+
status: import("..").TOOL_MODEL_STATUS;
|
|
242
|
+
order: number;
|
|
243
|
+
icons: {
|
|
244
|
+
light: {
|
|
245
|
+
svg: string;
|
|
246
|
+
png: string;
|
|
247
|
+
};
|
|
248
|
+
dark: {
|
|
249
|
+
svg: string;
|
|
250
|
+
png: string;
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
maxPromptLength: number;
|
|
254
|
+
maxInputVideoSizeBytes: number;
|
|
255
|
+
maxInputImageSizeBytes: number;
|
|
256
|
+
supportedVideoFormats: string[];
|
|
257
|
+
supportedImageFormats: string[];
|
|
258
|
+
params: {
|
|
259
|
+
resolution: {
|
|
260
|
+
options: ("1080p" | "720p")[];
|
|
261
|
+
};
|
|
262
|
+
backgroundSource: {
|
|
263
|
+
options: ("image" | "video")[];
|
|
264
|
+
};
|
|
265
|
+
duration: {
|
|
266
|
+
min: number;
|
|
267
|
+
maxByBackgroundSource: {
|
|
268
|
+
image: number;
|
|
269
|
+
video: number;
|
|
270
|
+
};
|
|
271
|
+
};
|
|
272
|
+
geometry: {
|
|
273
|
+
minWidth: number;
|
|
274
|
+
minHeight: number;
|
|
275
|
+
maxWidth?: number | undefined;
|
|
276
|
+
maxHeight?: number | undefined;
|
|
277
|
+
minAspectRatio: number;
|
|
278
|
+
maxAspectRatio: number;
|
|
279
|
+
};
|
|
280
|
+
sourceGeometry?: {
|
|
281
|
+
image: {
|
|
282
|
+
minWidth: number;
|
|
283
|
+
minHeight: number;
|
|
284
|
+
maxWidth?: number | undefined;
|
|
285
|
+
maxHeight?: number | undefined;
|
|
286
|
+
minAspectRatio: number;
|
|
287
|
+
maxAspectRatio: number;
|
|
288
|
+
};
|
|
289
|
+
video: {
|
|
290
|
+
minWidth: number;
|
|
291
|
+
minHeight: number;
|
|
292
|
+
maxWidth?: number | undefined;
|
|
293
|
+
maxHeight?: number | undefined;
|
|
294
|
+
minAspectRatio: number;
|
|
295
|
+
maxAspectRatio: number;
|
|
296
|
+
} | null;
|
|
297
|
+
} | undefined;
|
|
298
|
+
};
|
|
299
|
+
pricingRules: {
|
|
300
|
+
resolution: "1080p" | "720p";
|
|
301
|
+
pricePerSecond: number;
|
|
302
|
+
}[];
|
|
303
|
+
createdAt: Date;
|
|
304
|
+
updatedAt: Date;
|
|
305
|
+
}, unknown>>>;
|
|
306
|
+
code: z.ZodOptional<z.ZodString>;
|
|
307
|
+
message: z.ZodOptional<z.ZodString>;
|
|
308
|
+
}, z.core.$strip>;
|
|
309
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
310
|
+
}
|
|
311
|
+
export declare namespace FindMotionControlJobByIdQuery {
|
|
312
|
+
const RequestSchema: z.ZodObject<{
|
|
313
|
+
userId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
314
|
+
unregisteredUserId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
315
|
+
uuid: z.ZodUUID;
|
|
316
|
+
}, z.core.$strip>;
|
|
317
|
+
type Request = z.infer<typeof RequestSchema>;
|
|
318
|
+
const ResponseSchema: z.ZodObject<{
|
|
319
|
+
isSuccess: z.ZodBoolean;
|
|
320
|
+
data: z.ZodOptional<z.ZodType<{
|
|
321
|
+
uuid: string;
|
|
322
|
+
modelId: string;
|
|
323
|
+
userId: string | null;
|
|
324
|
+
unregisteredUserId: string | null;
|
|
325
|
+
scope: JOB_SCOPE;
|
|
326
|
+
prompt: string;
|
|
327
|
+
title: string;
|
|
328
|
+
status: JOB_STATUS;
|
|
329
|
+
error: string | null;
|
|
330
|
+
externalId: string | null;
|
|
331
|
+
price: number;
|
|
332
|
+
tokenReservationId: string | null;
|
|
333
|
+
motionVideoFileId: string;
|
|
334
|
+
motionVideoUrl: string;
|
|
335
|
+
characterImageFileId: string;
|
|
336
|
+
characterImageUrl: string;
|
|
337
|
+
duration: number;
|
|
338
|
+
resolution: "1080p" | "720p";
|
|
339
|
+
backgroundSource: "image" | "video";
|
|
340
|
+
params: {
|
|
341
|
+
resolution: "1080p" | "720p";
|
|
342
|
+
backgroundSource: "image" | "video";
|
|
343
|
+
};
|
|
344
|
+
outputVideoUrl: string | null;
|
|
345
|
+
outputVideoId: string | null;
|
|
346
|
+
previewUrl: string | null;
|
|
347
|
+
previewId: string | null;
|
|
348
|
+
reaction: import("..").USER_REACTION | null;
|
|
349
|
+
dislikeReason: string | null;
|
|
350
|
+
isFavorite: boolean;
|
|
351
|
+
isDeleted: boolean;
|
|
352
|
+
isPublished: boolean;
|
|
353
|
+
postId: string | null;
|
|
354
|
+
createdAt: Date;
|
|
355
|
+
updatedAt: Date;
|
|
356
|
+
completedAt: Date | null;
|
|
357
|
+
}, unknown, z.core.$ZodTypeInternals<{
|
|
358
|
+
uuid: string;
|
|
359
|
+
modelId: string;
|
|
360
|
+
userId: string | null;
|
|
361
|
+
unregisteredUserId: string | null;
|
|
362
|
+
scope: JOB_SCOPE;
|
|
363
|
+
prompt: string;
|
|
364
|
+
title: string;
|
|
365
|
+
status: JOB_STATUS;
|
|
366
|
+
error: string | null;
|
|
367
|
+
externalId: string | null;
|
|
368
|
+
price: number;
|
|
369
|
+
tokenReservationId: string | null;
|
|
370
|
+
motionVideoFileId: string;
|
|
371
|
+
motionVideoUrl: string;
|
|
372
|
+
characterImageFileId: string;
|
|
373
|
+
characterImageUrl: string;
|
|
374
|
+
duration: number;
|
|
375
|
+
resolution: "1080p" | "720p";
|
|
376
|
+
backgroundSource: "image" | "video";
|
|
377
|
+
params: {
|
|
378
|
+
resolution: "1080p" | "720p";
|
|
379
|
+
backgroundSource: "image" | "video";
|
|
380
|
+
};
|
|
381
|
+
outputVideoUrl: string | null;
|
|
382
|
+
outputVideoId: string | null;
|
|
383
|
+
previewUrl: string | null;
|
|
384
|
+
previewId: string | null;
|
|
385
|
+
reaction: import("..").USER_REACTION | null;
|
|
386
|
+
dislikeReason: string | null;
|
|
387
|
+
isFavorite: boolean;
|
|
388
|
+
isDeleted: boolean;
|
|
389
|
+
isPublished: boolean;
|
|
390
|
+
postId: string | null;
|
|
391
|
+
createdAt: Date;
|
|
392
|
+
updatedAt: Date;
|
|
393
|
+
completedAt: Date | null;
|
|
394
|
+
}, unknown>>>;
|
|
395
|
+
code: z.ZodOptional<z.ZodString>;
|
|
396
|
+
message: z.ZodOptional<z.ZodString>;
|
|
397
|
+
}, z.core.$strip>;
|
|
398
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
399
|
+
}
|
|
400
|
+
export declare namespace FindMotionControlJobsQuery {
|
|
401
|
+
const RequestSchema: z.ZodObject<{
|
|
402
|
+
userId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
403
|
+
unregisteredUserId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
404
|
+
scope: z.ZodDefault<z.ZodEnum<typeof JOB_SCOPE>>;
|
|
405
|
+
title: z.ZodOptional<z.ZodString>;
|
|
406
|
+
isFavorite: z.ZodOptional<z.ZodBoolean>;
|
|
407
|
+
status: z.ZodOptional<z.ZodEnum<typeof JOB_STATUS>>;
|
|
408
|
+
createdAtSortOrder: z.ZodDefault<z.ZodEnum<typeof JOB_SORT>>;
|
|
409
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
410
|
+
offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
411
|
+
}, z.core.$strip>;
|
|
412
|
+
type Request = z.infer<typeof RequestSchema>;
|
|
413
|
+
const ResponseSchema: z.ZodObject<{
|
|
414
|
+
isSuccess: z.ZodBoolean;
|
|
415
|
+
data: z.ZodOptional<z.ZodType<{
|
|
416
|
+
data: {
|
|
417
|
+
uuid: string;
|
|
418
|
+
modelId: string;
|
|
419
|
+
userId: string | null;
|
|
420
|
+
unregisteredUserId: string | null;
|
|
421
|
+
scope: JOB_SCOPE;
|
|
422
|
+
prompt: string;
|
|
423
|
+
title: string;
|
|
424
|
+
status: JOB_STATUS;
|
|
425
|
+
error: string | null;
|
|
426
|
+
externalId: string | null;
|
|
427
|
+
price: number;
|
|
428
|
+
tokenReservationId: string | null;
|
|
429
|
+
motionVideoFileId: string;
|
|
430
|
+
motionVideoUrl: string;
|
|
431
|
+
characterImageFileId: string;
|
|
432
|
+
characterImageUrl: string;
|
|
433
|
+
duration: number;
|
|
434
|
+
resolution: "1080p" | "720p";
|
|
435
|
+
backgroundSource: "image" | "video";
|
|
436
|
+
params: {
|
|
437
|
+
resolution: "1080p" | "720p";
|
|
438
|
+
backgroundSource: "image" | "video";
|
|
439
|
+
};
|
|
440
|
+
outputVideoUrl: string | null;
|
|
441
|
+
outputVideoId: string | null;
|
|
442
|
+
previewUrl: string | null;
|
|
443
|
+
previewId: string | null;
|
|
444
|
+
reaction: import("..").USER_REACTION | null;
|
|
445
|
+
dislikeReason: string | null;
|
|
446
|
+
isFavorite: boolean;
|
|
447
|
+
isDeleted: boolean;
|
|
448
|
+
isPublished: boolean;
|
|
449
|
+
postId: string | null;
|
|
450
|
+
createdAt: Date;
|
|
451
|
+
updatedAt: Date;
|
|
452
|
+
completedAt: Date | null;
|
|
453
|
+
}[];
|
|
454
|
+
page: number;
|
|
455
|
+
totalPages: number;
|
|
456
|
+
total: number;
|
|
457
|
+
}, unknown, z.core.$ZodTypeInternals<{
|
|
458
|
+
data: {
|
|
459
|
+
uuid: string;
|
|
460
|
+
modelId: string;
|
|
461
|
+
userId: string | null;
|
|
462
|
+
unregisteredUserId: string | null;
|
|
463
|
+
scope: JOB_SCOPE;
|
|
464
|
+
prompt: string;
|
|
465
|
+
title: string;
|
|
466
|
+
status: JOB_STATUS;
|
|
467
|
+
error: string | null;
|
|
468
|
+
externalId: string | null;
|
|
469
|
+
price: number;
|
|
470
|
+
tokenReservationId: string | null;
|
|
471
|
+
motionVideoFileId: string;
|
|
472
|
+
motionVideoUrl: string;
|
|
473
|
+
characterImageFileId: string;
|
|
474
|
+
characterImageUrl: string;
|
|
475
|
+
duration: number;
|
|
476
|
+
resolution: "1080p" | "720p";
|
|
477
|
+
backgroundSource: "image" | "video";
|
|
478
|
+
params: {
|
|
479
|
+
resolution: "1080p" | "720p";
|
|
480
|
+
backgroundSource: "image" | "video";
|
|
481
|
+
};
|
|
482
|
+
outputVideoUrl: string | null;
|
|
483
|
+
outputVideoId: string | null;
|
|
484
|
+
previewUrl: string | null;
|
|
485
|
+
previewId: string | null;
|
|
486
|
+
reaction: import("..").USER_REACTION | null;
|
|
487
|
+
dislikeReason: string | null;
|
|
488
|
+
isFavorite: boolean;
|
|
489
|
+
isDeleted: boolean;
|
|
490
|
+
isPublished: boolean;
|
|
491
|
+
postId: string | null;
|
|
492
|
+
createdAt: Date;
|
|
493
|
+
updatedAt: Date;
|
|
494
|
+
completedAt: Date | null;
|
|
495
|
+
}[];
|
|
496
|
+
page: number;
|
|
497
|
+
totalPages: number;
|
|
498
|
+
total: number;
|
|
499
|
+
}, unknown>>>;
|
|
500
|
+
code: z.ZodOptional<z.ZodString>;
|
|
501
|
+
message: z.ZodOptional<z.ZodString>;
|
|
502
|
+
}, z.core.$strip>;
|
|
503
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
504
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FindMotionControlJobsQuery = exports.FindMotionControlJobByIdQuery = exports.GetMotionControlModelByUuidCommand = exports.GetMotionControlConfigQuery = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const common_1 = require("../common");
|
|
6
|
+
const enums_1 = require("../tools/enums");
|
|
7
|
+
const models_1 = require("./models");
|
|
8
|
+
const commands_1 = require("./commands");
|
|
9
|
+
var GetMotionControlConfigQuery;
|
|
10
|
+
(function (GetMotionControlConfigQuery) {
|
|
11
|
+
GetMotionControlConfigQuery.RequestSchema = common_1.LocaleRequestSchema;
|
|
12
|
+
GetMotionControlConfigQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.MotionControlConfigSchema);
|
|
13
|
+
})(GetMotionControlConfigQuery || (exports.GetMotionControlConfigQuery = GetMotionControlConfigQuery = {}));
|
|
14
|
+
var GetMotionControlModelByUuidCommand;
|
|
15
|
+
(function (GetMotionControlModelByUuidCommand) {
|
|
16
|
+
GetMotionControlModelByUuidCommand.RequestSchema = common_1.LocaleRequestSchema.extend({ uuid: zod_1.z.uuid() });
|
|
17
|
+
GetMotionControlModelByUuidCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.MotionControlModelSchema);
|
|
18
|
+
})(GetMotionControlModelByUuidCommand || (exports.GetMotionControlModelByUuidCommand = GetMotionControlModelByUuidCommand = {}));
|
|
19
|
+
var FindMotionControlJobByIdQuery;
|
|
20
|
+
(function (FindMotionControlJobByIdQuery) {
|
|
21
|
+
FindMotionControlJobByIdQuery.RequestSchema = commands_1.MotionControlOwnerSchema.safeExtend({ uuid: zod_1.z.uuid() });
|
|
22
|
+
FindMotionControlJobByIdQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.MotionControlJobSchema);
|
|
23
|
+
})(FindMotionControlJobByIdQuery || (exports.FindMotionControlJobByIdQuery = FindMotionControlJobByIdQuery = {}));
|
|
24
|
+
var FindMotionControlJobsQuery;
|
|
25
|
+
(function (FindMotionControlJobsQuery) {
|
|
26
|
+
FindMotionControlJobsQuery.RequestSchema = commands_1.MotionControlOwnerSchema.safeExtend({
|
|
27
|
+
scope: zod_1.z.enum(common_1.JOB_SCOPE).default(common_1.JOB_SCOPE.TOOL),
|
|
28
|
+
title: zod_1.z.string().optional(),
|
|
29
|
+
isFavorite: zod_1.z.boolean().optional(),
|
|
30
|
+
status: zod_1.z.enum(enums_1.JOB_STATUS).optional(),
|
|
31
|
+
createdAtSortOrder: zod_1.z.enum(enums_1.JOB_SORT).default(enums_1.JOB_SORT.DESC),
|
|
32
|
+
limit: zod_1.z.coerce.number().int().min(1).max(100).default(20),
|
|
33
|
+
offset: zod_1.z.coerce.number().int().min(0).default(0),
|
|
34
|
+
});
|
|
35
|
+
FindMotionControlJobsQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(zod_1.z.object({
|
|
36
|
+
data: zod_1.z.array(models_1.MotionControlJobSchema),
|
|
37
|
+
page: zod_1.z.number(),
|
|
38
|
+
totalPages: zod_1.z.number(),
|
|
39
|
+
total: zod_1.z.number(),
|
|
40
|
+
}));
|
|
41
|
+
})(FindMotionControlJobsQuery || (exports.FindMotionControlJobsQuery = FindMotionControlJobsQuery = {}));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const MOTION_CONTROL_CONTROLLER = "motion-control";
|
|
2
|
+
export declare const MOTION_CONTROL_AMQP_ROUTES: {
|
|
3
|
+
readonly CONFIG: 'tools.motion-control.config.rpc';
|
|
4
|
+
readonly EXECUTE: 'tools.motion-control.execute.rpc';
|
|
5
|
+
readonly GET_PRICE: 'tools.motion-control.get-price.rpc';
|
|
6
|
+
readonly GET_JOB: 'tools.motion-control.jobs.get.rpc';
|
|
7
|
+
readonly LIST_JOBS: 'tools.motion-control.jobs.list.rpc';
|
|
8
|
+
readonly RETRY: 'tools.motion-control.jobs.retry.rpc';
|
|
9
|
+
readonly UPDATE_JOB: 'tools.motion-control.jobs.update.rpc';
|
|
10
|
+
readonly UPDATE_TITLE: 'tools.motion-control.jobs.update-title.rpc';
|
|
11
|
+
readonly UPDATE_FAVORITE: 'tools.motion-control.jobs.update-favorite.rpc';
|
|
12
|
+
readonly SET_REACTION: 'tools.motion-control.jobs.set-reaction.rpc';
|
|
13
|
+
readonly SOFT_DELETE: 'tools.motion-control.jobs.soft-delete.rpc';
|
|
14
|
+
readonly SOFT_DELETE_ALL: 'tools.motion-control.jobs.soft-delete-all.rpc';
|
|
15
|
+
};
|
|
16
|
+
export declare const MOTION_CONTROL_MODEL_AMQP_ROUTES: {
|
|
17
|
+
readonly GET_MODEL_BY_UUID: 'tools.motion-control.model.get-by-uuid.rpc';
|
|
18
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MOTION_CONTROL_MODEL_AMQP_ROUTES = exports.MOTION_CONTROL_AMQP_ROUTES = exports.MOTION_CONTROL_CONTROLLER = void 0;
|
|
4
|
+
exports.MOTION_CONTROL_CONTROLLER = 'motion-control';
|
|
5
|
+
exports.MOTION_CONTROL_AMQP_ROUTES = {
|
|
6
|
+
CONFIG: 'tools.motion-control.config.rpc',
|
|
7
|
+
EXECUTE: 'tools.motion-control.execute.rpc',
|
|
8
|
+
GET_PRICE: 'tools.motion-control.get-price.rpc',
|
|
9
|
+
GET_JOB: 'tools.motion-control.jobs.get.rpc',
|
|
10
|
+
LIST_JOBS: 'tools.motion-control.jobs.list.rpc',
|
|
11
|
+
RETRY: 'tools.motion-control.jobs.retry.rpc',
|
|
12
|
+
UPDATE_JOB: 'tools.motion-control.jobs.update.rpc',
|
|
13
|
+
UPDATE_TITLE: 'tools.motion-control.jobs.update-title.rpc',
|
|
14
|
+
UPDATE_FAVORITE: 'tools.motion-control.jobs.update-favorite.rpc',
|
|
15
|
+
SET_REACTION: 'tools.motion-control.jobs.set-reaction.rpc',
|
|
16
|
+
SOFT_DELETE: 'tools.motion-control.jobs.soft-delete.rpc',
|
|
17
|
+
SOFT_DELETE_ALL: 'tools.motion-control.jobs.soft-delete-all.rpc',
|
|
18
|
+
};
|
|
19
|
+
exports.MOTION_CONTROL_MODEL_AMQP_ROUTES = {
|
|
20
|
+
GET_MODEL_BY_UUID: 'tools.motion-control.model.get-by-uuid.rpc',
|
|
21
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.calculateMotionControlPrice = calculateMotionControlPrice;
|
|
4
|
+
function calculateMotionControlPrice(model, params) {
|
|
5
|
+
if (!Number.isFinite(params.duration) ||
|
|
6
|
+
params.duration < model.params.duration.min ||
|
|
7
|
+
!model.params.backgroundSource.options.includes(params.backgroundSource) ||
|
|
8
|
+
params.duration > model.params.duration.maxByBackgroundSource[params.backgroundSource])
|
|
9
|
+
throw new Error('Invalid motion video duration');
|
|
10
|
+
if (!model.params.resolution.options.includes(params.resolution))
|
|
11
|
+
throw new Error('Unsupported resolution');
|
|
12
|
+
const rules = model.pricingRules.filter((rule) => rule.resolution === params.resolution);
|
|
13
|
+
if (rules.length !== 1 ||
|
|
14
|
+
!Number.isFinite(rules[0].pricePerSecond) ||
|
|
15
|
+
rules[0].pricePerSecond <= 0)
|
|
16
|
+
throw new Error('Invalid pricing configuration');
|
|
17
|
+
// KIE Motion Control bills whole seconds rounded down: verified on 2026-10-14,
|
|
18
|
+
// 5.9s cost 100 credits and 6.041667s cost 120 at 20 credits/s. Floor the
|
|
19
|
+
// duration BEFORE multiplying so our quote/reservation does not charge for
|
|
20
|
+
// the fractional second. Keep the actual source duration unchanged.
|
|
21
|
+
const billableSeconds = Math.floor(params.duration);
|
|
22
|
+
return Math.ceil(billableSeconds * rules[0].pricePerSecond);
|
|
23
|
+
}
|
|
@@ -13,6 +13,7 @@ var TOOL_CONTENT_TYPE;
|
|
|
13
13
|
TOOL_CONTENT_TYPE["PRESENTATION"] = "PRESENTATION";
|
|
14
14
|
TOOL_CONTENT_TYPE["WRITER"] = "WRITER";
|
|
15
15
|
TOOL_CONTENT_TYPE["VIDEO_EDITOR"] = "VIDEO_EDITOR";
|
|
16
|
+
TOOL_CONTENT_TYPE["MOTION_CONTROL"] = "MOTION_CONTROL";
|
|
16
17
|
TOOL_CONTENT_TYPE["MUSIC"] = "MUSIC";
|
|
17
18
|
TOOL_CONTENT_TYPE["INTERIOR_DESIGN"] = "INTERIOR_DESIGN";
|
|
18
19
|
TOOL_CONTENT_TYPE["TEXT"] = "TEXT";
|
|
@@ -10,6 +10,7 @@ export declare enum TOOL_TYPE {
|
|
|
10
10
|
PARAPHRASE = "PARAPHRASE",
|
|
11
11
|
WRITER_ACTION = "WRITER_ACTION",
|
|
12
12
|
VIDEO_EDITOR = "VIDEO_EDITOR",
|
|
13
|
+
MOTION_CONTROL = "MOTION_CONTROL",
|
|
13
14
|
MUSIC = "MUSIC",
|
|
14
15
|
MUSIC_ACTION = "MUSIC_ACTION",
|
|
15
16
|
IMAGE_GENERATION = "IMAGE_GENERATION",
|
|
@@ -14,6 +14,7 @@ var TOOL_TYPE;
|
|
|
14
14
|
TOOL_TYPE["PARAPHRASE"] = "PARAPHRASE";
|
|
15
15
|
TOOL_TYPE["WRITER_ACTION"] = "WRITER_ACTION";
|
|
16
16
|
TOOL_TYPE["VIDEO_EDITOR"] = "VIDEO_EDITOR";
|
|
17
|
+
TOOL_TYPE["MOTION_CONTROL"] = "MOTION_CONTROL";
|
|
17
18
|
TOOL_TYPE["MUSIC"] = "MUSIC";
|
|
18
19
|
TOOL_TYPE["MUSIC_ACTION"] = "MUSIC_ACTION";
|
|
19
20
|
TOOL_TYPE["IMAGE_GENERATION"] = "IMAGE_GENERATION";
|