@purpleschool/gptbot-tools 0.0.116 → 0.0.118-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-editor/commands/get-image-editor-price.command.js +24 -0
- package/build/image-editor/commands/image-editor.command.js +2 -1
- package/build/image-editor/commands/index.js +2 -0
- package/build/image-editor/commands/retry-image-editor-job.command.js +2 -1
- package/build/image-editor/commands/update-published-status-image-editor-jobs.command.js +20 -0
- package/build/image-editor/models/image-editor-job.schema.js +2 -0
- package/build/image-editor/routes/image-editor.amqp.routes.js +2 -0
- package/build/image-generation/commands/execute-image-generation.command.js +4 -1
- package/build/image-generation/commands/get-image-generation-price.command.js +22 -0
- package/build/image-generation/commands/index.js +2 -0
- package/build/image-generation/commands/retry-image-generation-job.command.js +4 -3
- package/build/image-generation/commands/update-published-status-image-generation-jobs.command.js +20 -0
- package/build/image-generation/models/image-generation-job.schema.js +2 -0
- package/build/image-generation/routes/image-generation.amqp.routes.js +2 -0
- package/build/music/commands/generate-music.command.js +2 -1
- package/build/music/commands/get-music-price.command.js +19 -0
- package/build/music/commands/index.js +2 -0
- package/build/music/commands/retry-music-job.command.js +2 -1
- package/build/music/commands/update-published-status-music-jobs.command.js +20 -0
- package/build/music/models/music-job.schema.js +2 -0
- package/build/music/routes/music.amqp.routes.js +2 -0
- package/build/paraphrase/commands/get-paraphrase-price.command.js +15 -0
- package/build/paraphrase/commands/index.js +1 -0
- package/build/paraphrase/commands/paraphrase.command.js +2 -1
- package/build/paraphrase/commands/retry-paraphrase-job.command.js +2 -1
- package/build/paraphrase/models/paraphrase-job.schema.js +1 -0
- package/build/paraphrase/routes/paraphrase.amqp.routes.js +1 -0
- package/build/presentation/commands/generate-slides.command.js +2 -1
- package/build/presentation/commands/get-presentation-slides-generation-price.command.js +15 -0
- package/build/presentation/commands/index.js +1 -0
- package/build/presentation/models/presentation.schema.js +1 -0
- package/build/presentation/routes/presentation.routes.js +1 -0
- package/build/stt/commands/get-stt-price.command.js +16 -0
- package/build/stt/commands/index.js +1 -0
- package/build/stt/commands/retry-stt-job.command.js +2 -1
- package/build/stt/commands/stt.command.js +2 -1
- package/build/stt/models/stt-job.schema.js +1 -0
- package/build/stt/routes/stt.amqp.routes.js +1 -0
- package/build/tools/enums/index.js +1 -0
- package/build/tools/enums/job-request-origin.enum.js +8 -0
- package/build/tools/events/index.js +1 -0
- package/build/tools/events/tool-job-failed.event.js +14 -0
- package/build/tools/models/tool-job.schema.js +1 -0
- package/build/tools/routes/tools.aqmp.routes.js +1 -0
- package/build/tts/commands/get-tts-price.command.js +16 -0
- package/build/tts/commands/index.js +1 -0
- package/build/tts/commands/retry-tts-job.command.js +2 -1
- package/build/tts/commands/tts.command.js +2 -1
- package/build/tts/models/tts-job.schema.js +1 -0
- package/build/tts/routes/tts.amqp.routes.js +1 -0
- package/build/video/commands/get-video-price.command.js +17 -0
- package/build/video/commands/index.js +2 -0
- package/build/video/commands/retry-video-job.command.js +2 -1
- package/build/video/commands/update-published-status-video-jobs.command.js +20 -0
- package/build/video/commands/video.command.js +2 -1
- package/build/video/models/video-job.schema.js +1 -0
- package/build/video/routes/video.amqp.routes.js +2 -0
- package/build/video-editor/commands/edit-video.command.js +2 -1
- package/build/video-editor/commands/get-video-editor-price.command.js +15 -0
- package/build/video-editor/commands/index.js +2 -0
- package/build/video-editor/commands/retry-video-editor-job.command.js +2 -1
- package/build/video-editor/commands/update-published-status-video-editor-jobs.command.js +20 -0
- package/build/video-editor/models/video-editor-job.schema.js +2 -0
- package/build/video-editor/routes/video-editor.amqp.routes.js +2 -0
- package/build/writer/commands/generate-document-contents.command.js +2 -1
- package/build/writer/commands/get-writer-content-generation-price.command.js +16 -0
- package/build/writer/commands/index.js +1 -0
- package/build/writer/models/writer-document.schema.js +1 -0
- package/build/writer/routes/writer.routes.js +1 -0
- package/image-editor/commands/get-image-editor-price.command.ts +26 -0
- package/image-editor/commands/image-editor.command.ts +2 -1
- package/image-editor/commands/index.ts +2 -0
- package/image-editor/commands/retry-image-editor-job.command.ts +2 -1
- package/image-editor/commands/update-published-status-image-editor-jobs.command.ts +20 -0
- package/image-editor/models/image-editor-job.schema.ts +2 -0
- package/image-editor/routes/image-editor.amqp.routes.ts +2 -0
- package/image-generation/commands/execute-image-generation.command.ts +4 -1
- package/image-generation/commands/get-image-generation-price.command.ts +24 -0
- package/image-generation/commands/index.ts +2 -0
- package/image-generation/commands/retry-image-generation-job.command.ts +4 -3
- package/image-generation/commands/update-published-status-image-generation-jobs.command.ts +20 -0
- package/image-generation/models/image-generation-job.schema.ts +2 -0
- package/image-generation/routes/image-generation.amqp.routes.ts +2 -0
- package/music/commands/generate-music.command.ts +2 -1
- package/music/commands/get-music-price.command.ts +21 -0
- package/music/commands/index.ts +2 -0
- package/music/commands/retry-music-job.command.ts +2 -1
- package/music/commands/update-published-status-music-jobs.command.ts +20 -0
- package/music/models/music-job.schema.ts +2 -0
- package/music/routes/music.amqp.routes.ts +2 -0
- package/package.json +1 -1
- package/paraphrase/commands/get-paraphrase-price.command.ts +16 -0
- package/paraphrase/commands/index.ts +1 -0
- package/paraphrase/commands/paraphrase.command.ts +2 -1
- package/paraphrase/commands/retry-paraphrase-job.command.ts +2 -1
- package/paraphrase/models/paraphrase-job.schema.ts +1 -0
- package/paraphrase/routes/paraphrase.amqp.routes.ts +1 -0
- package/presentation/commands/generate-slides.command.ts +2 -1
- package/presentation/commands/get-presentation-slides-generation-price.command.ts +16 -0
- package/presentation/commands/index.ts +1 -0
- package/presentation/models/presentation.schema.ts +1 -0
- package/presentation/routes/presentation.routes.ts +1 -0
- package/stt/commands/get-stt-price.command.ts +17 -0
- package/stt/commands/index.ts +1 -0
- package/stt/commands/retry-stt-job.command.ts +2 -1
- package/stt/commands/stt.command.ts +2 -1
- package/stt/models/stt-job.schema.ts +1 -0
- package/stt/routes/stt.amqp.routes.ts +1 -0
- package/tools/enums/index.ts +1 -0
- package/tools/enums/job-request-origin.enum.ts +4 -0
- package/tools/events/index.ts +1 -0
- package/tools/events/tool-job-failed.event.ts +13 -0
- package/tools/models/tool-job.schema.ts +1 -0
- package/tools/routes/tools.aqmp.routes.ts +1 -0
- package/tts/commands/get-tts-price.command.ts +17 -0
- package/tts/commands/index.ts +1 -0
- package/tts/commands/retry-tts-job.command.ts +2 -1
- package/tts/commands/tts.command.ts +2 -1
- package/tts/models/tts-job.schema.ts +1 -0
- package/tts/routes/tts.amqp.routes.ts +1 -0
- package/video/commands/get-video-price.command.ts +18 -0
- package/video/commands/index.ts +2 -0
- package/video/commands/retry-video-job.command.ts +2 -1
- package/video/commands/update-published-status-video-jobs.command.ts +20 -0
- package/video/commands/video.command.ts +2 -1
- package/video/models/video-job.schema.ts +1 -0
- package/video/routes/video.amqp.routes.ts +2 -0
- package/video-editor/commands/edit-video.command.ts +2 -1
- package/video-editor/commands/get-video-editor-price.command.ts +16 -0
- package/video-editor/commands/index.ts +2 -0
- package/video-editor/commands/retry-video-editor-job.command.ts +2 -1
- package/video-editor/commands/update-published-status-video-editor-jobs.command.ts +20 -0
- package/video-editor/models/video-editor-job.schema.ts +2 -0
- package/video-editor/routes/video-editor.amqp.routes.ts +2 -0
- package/writer/commands/generate-document-contents.command.ts +2 -1
- package/writer/commands/get-writer-content-generation-price.command.ts +17 -0
- package/writer/commands/index.ts +1 -0
- package/writer/models/writer-document.schema.ts +1 -0
- package/writer/routes/writer.routes.ts +1 -0
|
@@ -19,4 +19,5 @@ __exportStar(require("./delete-all-tts-jobs.command"), exports);
|
|
|
19
19
|
__exportStar(require("./retry-tts-job.command"), exports);
|
|
20
20
|
__exportStar(require("./set-reaction-to-tts-job.command"), exports);
|
|
21
21
|
__exportStar(require("./tts.command"), exports);
|
|
22
|
+
__exportStar(require("./get-tts-price.command"), exports);
|
|
22
23
|
__exportStar(require("./update-tts-job-title.command"), exports);
|
|
@@ -8,9 +8,10 @@ var RetryTTSJobCommand;
|
|
|
8
8
|
(function (RetryTTSJobCommand) {
|
|
9
9
|
RetryTTSJobCommand.RequestSchema = zod_1.z.object({
|
|
10
10
|
uuid: zod_1.z.string().uuid(),
|
|
11
|
-
userBalance: zod_1.z.number(),
|
|
12
11
|
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
12
|
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
|
+
tokenReservationId: zod_1.z.string().uuid(),
|
|
14
|
+
precalculatedPrice: zod_1.z.number(),
|
|
14
15
|
});
|
|
15
16
|
RetryTTSJobCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(tts_job_schema_1.TTSJobSchema);
|
|
16
17
|
})(RetryTTSJobCommand || (exports.RetryTTSJobCommand = RetryTTSJobCommand = {}));
|
|
@@ -9,7 +9,6 @@ var TTSCommand;
|
|
|
9
9
|
TTSCommand.RequestSchema = zod_1.z.object({
|
|
10
10
|
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
11
11
|
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
12
|
-
userBalance: zod_1.z.number(),
|
|
13
12
|
modelId: zod_1.z.string(),
|
|
14
13
|
voiceId: zod_1.z.string(),
|
|
15
14
|
userInput: zod_1.z.string(),
|
|
@@ -21,6 +20,8 @@ var TTSCommand;
|
|
|
21
20
|
style: zod_1.z.number().optional(),
|
|
22
21
|
})
|
|
23
22
|
.optional(),
|
|
23
|
+
tokenReservationId: zod_1.z.string().uuid(),
|
|
24
|
+
precalculatedPrice: zod_1.z.number(),
|
|
24
25
|
});
|
|
25
26
|
TTSCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(tts_job_schema_1.TTSJobSchema);
|
|
26
27
|
})(TTSCommand || (exports.TTSCommand = TTSCommand = {}));
|
|
@@ -25,6 +25,7 @@ exports.TTSJobSchema = zod_1.z.object({
|
|
|
25
25
|
duration: zod_1.z.number(),
|
|
26
26
|
userId: zod_1.z.string().nullable(),
|
|
27
27
|
unregisteredUserId: zod_1.z.string().nullable(),
|
|
28
|
+
tokenReservationId: zod_1.z.string().nullable().optional(),
|
|
28
29
|
isDeleted: zod_1.z.boolean(),
|
|
29
30
|
params: exports.TTSJobParamsSchema,
|
|
30
31
|
createdAt: zod_1.z.date(),
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TTS_AMQP_ROUTES = void 0;
|
|
4
4
|
exports.TTS_AMQP_ROUTES = {
|
|
5
5
|
EXECUTE: 'tools.tts.execute.rpc',
|
|
6
|
+
GET_PRICE: 'tools.tts.get-price.rpc',
|
|
6
7
|
CONFIG: 'tools.tts.config.rpc',
|
|
7
8
|
GET_JOB: 'tools.tts.jobs.get.rpc',
|
|
8
9
|
LIST_JOBS: 'tools.tts.jobs.list.rpc',
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetVideoPriceCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
const models_1 = require("../models");
|
|
7
|
+
var GetVideoPriceCommand;
|
|
8
|
+
(function (GetVideoPriceCommand) {
|
|
9
|
+
GetVideoPriceCommand.RequestSchema = zod_1.z.object({
|
|
10
|
+
modelId: zod_1.z.string(),
|
|
11
|
+
params: models_1.VideoGenerationRequestParamsSchema,
|
|
12
|
+
});
|
|
13
|
+
GetVideoPriceCommand.ResponseDataSchema = zod_1.z.object({
|
|
14
|
+
price: zod_1.z.number(),
|
|
15
|
+
});
|
|
16
|
+
GetVideoPriceCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(GetVideoPriceCommand.ResponseDataSchema);
|
|
17
|
+
})(GetVideoPriceCommand || (exports.GetVideoPriceCommand = GetVideoPriceCommand = {}));
|
|
@@ -19,5 +19,7 @@ __exportStar(require("./delete-all-video-jobs.command"), exports);
|
|
|
19
19
|
__exportStar(require("./retry-video-job.command"), exports);
|
|
20
20
|
__exportStar(require("./set-reaction-to-video-job.command"), exports);
|
|
21
21
|
__exportStar(require("./video.command"), exports);
|
|
22
|
+
__exportStar(require("./get-video-price.command"), exports);
|
|
22
23
|
__exportStar(require("./update-video-job-title.command"), exports);
|
|
23
24
|
__exportStar(require("./video-model"), exports);
|
|
25
|
+
__exportStar(require("./update-published-status-video-jobs.command"), exports);
|
|
@@ -9,12 +9,13 @@ var RetryVideoJobCommand;
|
|
|
9
9
|
(function (RetryVideoJobCommand) {
|
|
10
10
|
RetryVideoJobCommand.RequestSchema = zod_1.z.object({
|
|
11
11
|
uuid: zod_1.z.string().uuid(),
|
|
12
|
-
userBalance: zod_1.z.number(),
|
|
13
12
|
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
14
13
|
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
15
14
|
prompt: zod_1.z.string().optional(),
|
|
16
15
|
modelId: zod_1.z.string().uuid().optional(),
|
|
17
16
|
params: models_1.VideoGenerationRequestParamsSchema.optional(),
|
|
17
|
+
tokenReservationId: zod_1.z.string().uuid(),
|
|
18
|
+
precalculatedPrice: zod_1.z.number(),
|
|
18
19
|
});
|
|
19
20
|
RetryVideoJobCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(video_job_schema_1.VideoJobSchema);
|
|
20
21
|
})(RetryVideoJobCommand || (exports.RetryVideoJobCommand = RetryVideoJobCommand = {}));
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdatePublishedStatusVideoJobsCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
const models_1 = require("../models");
|
|
7
|
+
var UpdatePublishedStatusVideoJobsCommand;
|
|
8
|
+
(function (UpdatePublishedStatusVideoJobsCommand) {
|
|
9
|
+
UpdatePublishedStatusVideoJobsCommand.RequestSchema = zod_1.z.object({
|
|
10
|
+
criteria: zod_1.z.object({
|
|
11
|
+
uuid: zod_1.z.string().uuid(),
|
|
12
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
14
|
+
}),
|
|
15
|
+
data: zod_1.z.object({
|
|
16
|
+
isPublished: zod_1.z.boolean(),
|
|
17
|
+
}),
|
|
18
|
+
});
|
|
19
|
+
UpdatePublishedStatusVideoJobsCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.VideoJobSchema);
|
|
20
|
+
})(UpdatePublishedStatusVideoJobsCommand || (exports.UpdatePublishedStatusVideoJobsCommand = UpdatePublishedStatusVideoJobsCommand = {}));
|
|
@@ -11,9 +11,10 @@ var VideoCommand;
|
|
|
11
11
|
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
12
12
|
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
13
|
prompt: zod_1.z.string(),
|
|
14
|
-
userBalance: zod_1.z.number(),
|
|
15
14
|
modelId: zod_1.z.string(),
|
|
16
15
|
params: models_1.VideoGenerationRequestParamsSchema,
|
|
16
|
+
tokenReservationId: zod_1.z.string().uuid(),
|
|
17
|
+
precalculatedPrice: zod_1.z.number(),
|
|
17
18
|
});
|
|
18
19
|
VideoCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(video_job_schema_1.VideoJobSchema);
|
|
19
20
|
})(VideoCommand || (exports.VideoCommand = VideoCommand = {}));
|
|
@@ -29,6 +29,7 @@ exports.VideoJobSchema = zod_1.z.object({
|
|
|
29
29
|
attempts: zod_1.z.array(zod_1.z.any()),
|
|
30
30
|
userId: zod_1.z.string().nullable().optional(),
|
|
31
31
|
unregisteredUserId: zod_1.z.string().nullable().optional(),
|
|
32
|
+
tokenReservationId: zod_1.z.string().nullable().optional(),
|
|
32
33
|
isDeleted: zod_1.z.boolean(),
|
|
33
34
|
createdAt: zod_1.z.date(),
|
|
34
35
|
completedAt: zod_1.z.date().nullable().optional(),
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.VIDEO_AMQP_ROUTES = void 0;
|
|
4
4
|
exports.VIDEO_AMQP_ROUTES = {
|
|
5
5
|
EXECUTE: 'tools.video.execute.rpc',
|
|
6
|
+
GET_PRICE: 'tools.video.get-price.rpc',
|
|
6
7
|
CONFIG: 'tools.video.config.rpc',
|
|
7
8
|
GET_JOB: 'tools.video.jobs.get.rpc',
|
|
8
9
|
LIST_JOBS: 'tools.video.jobs.list.rpc',
|
|
@@ -11,4 +12,5 @@ exports.VIDEO_AMQP_ROUTES = {
|
|
|
11
12
|
SOFT_DELETE: 'tools.video.jobs.soft-delete.rpc',
|
|
12
13
|
SOFT_DELETE_ALL: 'tools.video.jobs.soft-delete-all.rpc',
|
|
13
14
|
RETRY: 'tools.video.jobs.retry.rpc',
|
|
15
|
+
UPDATE_JOB: 'tools.video.jobs.update.rpc',
|
|
14
16
|
};
|
|
@@ -13,8 +13,9 @@ var EditVideoCommand;
|
|
|
13
13
|
inputVideoId: zod_1.z.string().uuid(),
|
|
14
14
|
inputVideoUrl: zod_1.z.string(),
|
|
15
15
|
duration: zod_1.z.number(),
|
|
16
|
-
userBalance: zod_1.z.number(),
|
|
17
16
|
modelId: zod_1.z.string().uuid(),
|
|
17
|
+
tokenReservationId: zod_1.z.string().uuid(),
|
|
18
|
+
precalculatedPrice: zod_1.z.number(),
|
|
18
19
|
});
|
|
19
20
|
EditVideoCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.VideoEditorJobSchema);
|
|
20
21
|
})(EditVideoCommand || (exports.EditVideoCommand = EditVideoCommand = {}));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetVideoEditorPriceCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
var GetVideoEditorPriceCommand;
|
|
7
|
+
(function (GetVideoEditorPriceCommand) {
|
|
8
|
+
GetVideoEditorPriceCommand.RequestSchema = zod_1.z.object({
|
|
9
|
+
modelId: zod_1.z.string(),
|
|
10
|
+
});
|
|
11
|
+
GetVideoEditorPriceCommand.ResponseDataSchema = zod_1.z.object({
|
|
12
|
+
price: zod_1.z.number(),
|
|
13
|
+
});
|
|
14
|
+
GetVideoEditorPriceCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(GetVideoEditorPriceCommand.ResponseDataSchema);
|
|
15
|
+
})(GetVideoEditorPriceCommand || (exports.GetVideoEditorPriceCommand = GetVideoEditorPriceCommand = {}));
|
|
@@ -19,5 +19,7 @@ __exportStar(require("./delete-video-editor-job-by-uuid.command"), exports);
|
|
|
19
19
|
__exportStar(require("./retry-video-editor-job.command"), exports);
|
|
20
20
|
__exportStar(require("./set-reaction-to-video-editor-job.command"), exports);
|
|
21
21
|
__exportStar(require("./update-video-editor-job-title.command"), exports);
|
|
22
|
+
__exportStar(require("./update-published-status-video-editor-jobs.command"), exports);
|
|
22
23
|
__exportStar(require("./edit-video.command"), exports);
|
|
24
|
+
__exportStar(require("./get-video-editor-price.command"), exports);
|
|
23
25
|
__exportStar(require("./video-editor-model"), exports);
|
|
@@ -8,7 +8,6 @@ var RetryVideoEditorJobCommand;
|
|
|
8
8
|
(function (RetryVideoEditorJobCommand) {
|
|
9
9
|
RetryVideoEditorJobCommand.RequestSchema = zod_1.z.object({
|
|
10
10
|
uuid: zod_1.z.string().uuid(),
|
|
11
|
-
userBalance: zod_1.z.number(),
|
|
12
11
|
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
12
|
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
14
13
|
prompt: zod_1.z.string().optional(),
|
|
@@ -16,6 +15,8 @@ var RetryVideoEditorJobCommand;
|
|
|
16
15
|
inputVideoUrl: zod_1.z.string().optional(),
|
|
17
16
|
duration: zod_1.z.number().optional(),
|
|
18
17
|
modelId: zod_1.z.string().uuid().optional(),
|
|
18
|
+
tokenReservationId: zod_1.z.string().uuid(),
|
|
19
|
+
precalculatedPrice: zod_1.z.number(),
|
|
19
20
|
});
|
|
20
21
|
RetryVideoEditorJobCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(video_editor_job_schema_1.VideoEditorJobSchema);
|
|
21
22
|
})(RetryVideoEditorJobCommand || (exports.RetryVideoEditorJobCommand = RetryVideoEditorJobCommand = {}));
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdatePublishedStatusVideoEditorJobsCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
const video_editor_job_schema_1 = require("../models/video-editor-job.schema");
|
|
7
|
+
var UpdatePublishedStatusVideoEditorJobsCommand;
|
|
8
|
+
(function (UpdatePublishedStatusVideoEditorJobsCommand) {
|
|
9
|
+
UpdatePublishedStatusVideoEditorJobsCommand.RequestSchema = zod_1.z.object({
|
|
10
|
+
criteria: zod_1.z.object({
|
|
11
|
+
uuid: zod_1.z.string().uuid(),
|
|
12
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
14
|
+
}),
|
|
15
|
+
data: zod_1.z.object({
|
|
16
|
+
isPublished: zod_1.z.boolean(),
|
|
17
|
+
}),
|
|
18
|
+
});
|
|
19
|
+
UpdatePublishedStatusVideoEditorJobsCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(video_editor_job_schema_1.VideoEditorJobSchema);
|
|
20
|
+
})(UpdatePublishedStatusVideoEditorJobsCommand || (exports.UpdatePublishedStatusVideoEditorJobsCommand = UpdatePublishedStatusVideoEditorJobsCommand = {}));
|
|
@@ -23,6 +23,8 @@ exports.VideoEditorJobSchema = zod_1.z.object({
|
|
|
23
23
|
attempts: zod_1.z.array(zod_1.z.any()),
|
|
24
24
|
userId: zod_1.z.string().nullable().optional(),
|
|
25
25
|
unregisteredUserId: zod_1.z.string().nullable().optional(),
|
|
26
|
+
tokenReservationId: zod_1.z.string().nullable().optional(),
|
|
27
|
+
isPublished: zod_1.z.boolean(),
|
|
26
28
|
isDeleted: zod_1.z.boolean(),
|
|
27
29
|
createdAt: zod_1.z.date(),
|
|
28
30
|
completedAt: zod_1.z.date().nullable().optional(),
|
|
@@ -3,11 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.VIDEO_EDITOR_AMQP_ROUTES = void 0;
|
|
4
4
|
exports.VIDEO_EDITOR_AMQP_ROUTES = {
|
|
5
5
|
EXECUTE: 'tools.video-editor.execute.rpc',
|
|
6
|
+
GET_PRICE: 'tools.video-editor.get-price.rpc',
|
|
6
7
|
CONFIG: 'tools.video-editor.config.rpc',
|
|
7
8
|
GET_JOB: 'tools.video-editor.jobs.get.rpc',
|
|
8
9
|
LIST_JOBS: 'tools.video-editor.jobs.list.rpc',
|
|
9
10
|
SET_REACTION: 'tools.video-editor.jobs.set-reaction.rpc',
|
|
10
11
|
UPDATE_TITLE: 'tools.video-editor.jobs.update-title.rpc',
|
|
12
|
+
UPDATE_JOB: 'tools.video-editor.jobs.update.rpc',
|
|
11
13
|
SOFT_DELETE: 'tools.video-editor.jobs.soft-delete.rpc',
|
|
12
14
|
SOFT_DELETE_ALL: 'tools.video-editor.jobs.soft-delete-all.rpc',
|
|
13
15
|
RETRY: 'tools.video-editor.jobs.retry.rpc',
|
|
@@ -10,7 +10,8 @@ var GenerateWriterDocumentContentsCommand;
|
|
|
10
10
|
documentId: zod_1.z.string().uuid(),
|
|
11
11
|
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
12
12
|
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
|
-
|
|
13
|
+
tokenReservationId: zod_1.z.string().uuid(),
|
|
14
|
+
precalculatedPrice: zod_1.z.number(),
|
|
14
15
|
modelId: zod_1.z.string(),
|
|
15
16
|
});
|
|
16
17
|
GenerateWriterDocumentContentsCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.WriterDocumentSchema);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetWriterContentGenerationPriceCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const common_1 = require("../../common");
|
|
6
|
+
var GetWriterContentGenerationPriceCommand;
|
|
7
|
+
(function (GetWriterContentGenerationPriceCommand) {
|
|
8
|
+
GetWriterContentGenerationPriceCommand.RequestSchema = zod_1.z.object({
|
|
9
|
+
documentId: zod_1.z.string().uuid(),
|
|
10
|
+
modelId: zod_1.z.string().uuid(),
|
|
11
|
+
});
|
|
12
|
+
GetWriterContentGenerationPriceCommand.ResponseDataSchema = zod_1.z.object({
|
|
13
|
+
price: zod_1.z.number(),
|
|
14
|
+
});
|
|
15
|
+
GetWriterContentGenerationPriceCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(GetWriterContentGenerationPriceCommand.ResponseDataSchema);
|
|
16
|
+
})(GetWriterContentGenerationPriceCommand || (exports.GetWriterContentGenerationPriceCommand = GetWriterContentGenerationPriceCommand = {}));
|
|
@@ -20,6 +20,7 @@ __exportStar(require("./delete-all-user-writer-documents.command"), exports);
|
|
|
20
20
|
__exportStar(require("./update-writer-document-outline.command"), exports);
|
|
21
21
|
__exportStar(require("./export-writer-document-as-docx.command"), exports);
|
|
22
22
|
__exportStar(require("./generate-document-contents.command"), exports);
|
|
23
|
+
__exportStar(require("./get-writer-content-generation-price.command"), exports);
|
|
23
24
|
__exportStar(require("./writer-paraphrase.command"), exports);
|
|
24
25
|
__exportStar(require("./writer-extend-text.command"), exports);
|
|
25
26
|
__exportStar(require("./writer-shorten-text.command"), exports);
|
|
@@ -21,6 +21,7 @@ exports.WriterDocumentSchema = zod_1.z.object({
|
|
|
21
21
|
dislikeReason: zod_1.z.string().nullable(),
|
|
22
22
|
pages: zod_1.z.number(),
|
|
23
23
|
isDeleted: zod_1.z.boolean(),
|
|
24
|
+
tokenReservationId: zod_1.z.string().nullable().optional(),
|
|
24
25
|
createdAt: zod_1.z.date(),
|
|
25
26
|
updatedAt: zod_1.z.date(),
|
|
26
27
|
completedAt: zod_1.z.date().nullable(),
|
|
@@ -11,6 +11,7 @@ exports.WRITER_AMQP_ROUTES = {
|
|
|
11
11
|
UPDATE_DOCUMENT_OUTLINE: 'tools.writer.update-document-outline.rpc',
|
|
12
12
|
UPDATE_DOCUMENT_CONTENTS: 'tools.writer.update-document-contents.rpc',
|
|
13
13
|
GENERATE_DOCUMENT_CONTENTS: 'tools.writer.generate-document-contents.rpc',
|
|
14
|
+
GET_CONTENT_GENERATION_PRICE: 'tools.writer.content-generation.get-price.rpc',
|
|
14
15
|
PARAPHRASE: 'tools.writer.actions.paraphrase.rpc',
|
|
15
16
|
EXTEND_TEXT: 'tools.writer.actions.extend-text.rpc',
|
|
16
17
|
SHORTEN_TEXT: 'tools.writer.actions.shorten-text.rpc',
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
+
import { AttachedFileSchema } from '../../common';
|
|
4
|
+
|
|
5
|
+
export namespace GetImageEditorPriceCommand {
|
|
6
|
+
export const RequestSchema = z.object({
|
|
7
|
+
modelId: z.string().uuid(),
|
|
8
|
+
userId: z.string().uuid().nullable().optional(),
|
|
9
|
+
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
|
+
prompt: z.string(),
|
|
11
|
+
params: z.object({
|
|
12
|
+
attachedFiles: z.array(AttachedFileSchema),
|
|
13
|
+
systemPromptId: z.string().optional(),
|
|
14
|
+
}),
|
|
15
|
+
userHasActiveSubscriptionOrProduct: z.boolean(),
|
|
16
|
+
});
|
|
17
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
18
|
+
|
|
19
|
+
export const ResponseDataSchema = z.object({
|
|
20
|
+
price: z.number(),
|
|
21
|
+
});
|
|
22
|
+
export type ResponseData = z.infer<typeof ResponseDataSchema>;
|
|
23
|
+
|
|
24
|
+
export const ResponseSchema = ICommandResponseSchema(ResponseDataSchema);
|
|
25
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
26
|
+
}
|
|
@@ -8,13 +8,14 @@ export namespace ImageEditorCommand {
|
|
|
8
8
|
userId: z.string().uuid().nullable().optional(),
|
|
9
9
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
10
|
prompt: z.string(),
|
|
11
|
-
userBalance: z.number(),
|
|
12
11
|
modelId: z.string(),
|
|
13
12
|
params: z.object({
|
|
14
13
|
attachedFiles: z.array(AttachedFileSchema),
|
|
15
14
|
systemPromptId: z.string().optional(),
|
|
16
15
|
}),
|
|
17
16
|
userHasActiveSubscriptionOrProduct: z.boolean(),
|
|
17
|
+
tokenReservationId: z.string().uuid(),
|
|
18
|
+
precalculatedPrice: z.number(),
|
|
18
19
|
});
|
|
19
20
|
export type Request = z.infer<typeof RequestSchema>;
|
|
20
21
|
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export * from './delete-image-editor-job-by-uuid.command';
|
|
2
2
|
export * from './delete-all-image-editor-jobs.command';
|
|
3
|
+
export * from './get-image-editor-price.command';
|
|
3
4
|
export * from './retry-image-editor-job.command';
|
|
4
5
|
export * from './set-reaction-to-image-editor-job.command';
|
|
5
6
|
export * from './image-editor.command';
|
|
6
7
|
export * from './update-image-editor-job-title.command';
|
|
8
|
+
export * from './update-published-status-image-editor-jobs.command';
|
|
7
9
|
export * from './image-editor-model';
|
|
@@ -5,10 +5,11 @@ import { ImageEditorJobParamsSchema, ImageEditorJobSchema } from '../models';
|
|
|
5
5
|
export namespace RetryImageEditorJobCommand {
|
|
6
6
|
export const RequestSchema = z.object({
|
|
7
7
|
uuid: z.string().uuid(),
|
|
8
|
-
userBalance: z.number(),
|
|
9
8
|
userId: z.string().uuid().nullable().optional(),
|
|
10
9
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
11
10
|
userHasActiveSubscriptionOrProduct: z.boolean(),
|
|
11
|
+
tokenReservationId: z.string().uuid(),
|
|
12
|
+
precalculatedPrice: z.number(),
|
|
12
13
|
modelId: z.string().optional(),
|
|
13
14
|
prompt: z.string().optional(),
|
|
14
15
|
params: ImageEditorJobParamsSchema.optional(),
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
+
import { ImageEditorJobSchema } from '../models';
|
|
4
|
+
|
|
5
|
+
export namespace UpdatePublishedStatusImageEditorJobsCommand {
|
|
6
|
+
export const RequestSchema = z.object({
|
|
7
|
+
criteria: z.object({
|
|
8
|
+
uuid: z.string().uuid(),
|
|
9
|
+
userId: z.string().uuid().nullable().optional(),
|
|
10
|
+
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
11
|
+
}),
|
|
12
|
+
data: z.object({
|
|
13
|
+
isPublished: z.boolean(),
|
|
14
|
+
}),
|
|
15
|
+
});
|
|
16
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
17
|
+
|
|
18
|
+
export const ResponseSchema = ICommandResponseSchema(ImageEditorJobSchema);
|
|
19
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
20
|
+
}
|
|
@@ -26,7 +26,9 @@ export const ImageEditorJobSchema = z.object({
|
|
|
26
26
|
attempts: z.array(z.any()),
|
|
27
27
|
userId: z.string().nullable().optional(),
|
|
28
28
|
unregisteredUserId: z.string().nullable().optional(),
|
|
29
|
+
isPublished: z.boolean(),
|
|
29
30
|
isDeleted: z.boolean(),
|
|
31
|
+
tokenReservationId: z.string().nullable().optional(),
|
|
30
32
|
createdAt: z.date(),
|
|
31
33
|
completedAt: z.date().nullable().optional(),
|
|
32
34
|
updatedAt: z.date(),
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
export const IMAGE_EDITOR_AMQP_ROUTES = {
|
|
2
2
|
EXECUTE: 'tools.image.execute.rpc',
|
|
3
|
+
GET_PRICE: 'tools.image.get-price.rpc',
|
|
3
4
|
CONFIG: 'tools.image.config.rpc',
|
|
4
5
|
GET_JOB: 'tools.image.jobs.get.rpc',
|
|
5
6
|
LIST_JOBS: 'tools.image.jobs.list.rpc',
|
|
6
7
|
SET_REACTION: 'tools.image.jobs.set-reaction.rpc',
|
|
7
8
|
UPDATE_TITLE: 'tools.image.jobs.update-title.rpc',
|
|
9
|
+
UPDATE_JOB: 'tools.image.jobs.update.rpc',
|
|
8
10
|
SOFT_DELETE: 'tools.image.jobs.soft-delete.rpc',
|
|
9
11
|
SOFT_DELETE_ALL: 'tools.image.jobs.soft-delete-all.rpc',
|
|
10
12
|
RETRY: 'tools.image.jobs.retry.rpc',
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
3
|
import { ImageGenerationJobSchema, ImageGenerationRequestParamsSchema } from '../models';
|
|
4
|
+
import { JOB_REQUEST_ORIGIN } from '../../tools';
|
|
4
5
|
|
|
5
6
|
export namespace ExecuteImageGenerationCommand {
|
|
6
7
|
export const RequestSchema = z.object({
|
|
7
8
|
userId: z.string().uuid().nullable().optional(),
|
|
8
9
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
9
10
|
prompt: z.string(),
|
|
10
|
-
userBalance: z.number(),
|
|
11
11
|
modelId: z.string().uuid(),
|
|
12
12
|
params: ImageGenerationRequestParamsSchema,
|
|
13
13
|
presetId: z.string().uuid().nullable().optional(),
|
|
14
|
+
origin: z.nativeEnum(JOB_REQUEST_ORIGIN).default(JOB_REQUEST_ORIGIN.API),
|
|
14
15
|
userHasActiveSubscriptionOrProduct: z.boolean(),
|
|
16
|
+
tokenReservationId: z.string().uuid(),
|
|
17
|
+
precalculatedPrice: z.number(),
|
|
15
18
|
});
|
|
16
19
|
export type Request = z.infer<typeof RequestSchema>;
|
|
17
20
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
+
import { ImageGenerationRequestParamsSchema } from '../models';
|
|
4
|
+
|
|
5
|
+
export namespace GetImageGenerationPriceCommand {
|
|
6
|
+
export const RequestSchema = z.object({
|
|
7
|
+
modelId: z.string().uuid(),
|
|
8
|
+
userId: z.string().uuid().nullable().optional(),
|
|
9
|
+
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
|
+
prompt: z.string(),
|
|
11
|
+
params: ImageGenerationRequestParamsSchema,
|
|
12
|
+
presetId: z.string().uuid().nullable().optional(),
|
|
13
|
+
userHasActiveSubscriptionOrProduct: z.boolean(),
|
|
14
|
+
});
|
|
15
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
16
|
+
|
|
17
|
+
export const ResponseDataSchema = z.object({
|
|
18
|
+
price: z.number(),
|
|
19
|
+
});
|
|
20
|
+
export type ResponseData = z.infer<typeof ResponseDataSchema>;
|
|
21
|
+
|
|
22
|
+
export const ResponseSchema = ICommandResponseSchema(ResponseDataSchema);
|
|
23
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
24
|
+
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export * from './execute-image-generation.command';
|
|
2
2
|
export * from './forward-image-generation-job.command';
|
|
3
|
+
export * from './get-image-generation-price.command';
|
|
3
4
|
export * from './save-image-generation-job.command';
|
|
4
5
|
export * from './soft-delete-image-generation-job-by-uuid.command';
|
|
5
6
|
export * from './soft-delete-image-generation-jobs-by-criteria.command';
|
|
6
7
|
export * from './set-reaction-to-image-generation-job.command';
|
|
7
8
|
export * from './update-image-generation-job-title.command';
|
|
9
|
+
export * from './update-published-status-image-generation-jobs.command';
|
|
8
10
|
export * from './image-generation-model';
|
|
9
11
|
export * from './retry-image-generation-job.command';
|
|
@@ -7,12 +7,13 @@ export namespace RetryImageGenerationJobCommand {
|
|
|
7
7
|
uuid: z.string().uuid(),
|
|
8
8
|
userId: z.string().uuid().nullable().optional(),
|
|
9
9
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
userHasActiveSubscriptionOrProduct: z.boolean(),
|
|
11
|
+
tokenReservationId: z.string().uuid(),
|
|
12
|
+
precalculatedPrice: z.number(),
|
|
12
13
|
modelId: z.string().uuid().optional(),
|
|
14
|
+
prompt: z.string().optional(),
|
|
13
15
|
params: ImageGenerationRequestParamsSchema.optional(),
|
|
14
16
|
presetId: z.string().uuid().nullable().optional(),
|
|
15
|
-
userHasActiveSubscriptionOrProduct: z.boolean(),
|
|
16
17
|
});
|
|
17
18
|
export type Request = z.infer<typeof RequestSchema>;
|
|
18
19
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
+
import { ImageGenerationJobSchema } from '../models';
|
|
4
|
+
|
|
5
|
+
export namespace UpdatePublishedStatusImageGenerationJobsCommand {
|
|
6
|
+
export const RequestSchema = z.object({
|
|
7
|
+
criteria: z.object({
|
|
8
|
+
uuid: z.string().uuid(),
|
|
9
|
+
userId: z.string().uuid().nullable().optional(),
|
|
10
|
+
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
11
|
+
}),
|
|
12
|
+
data: z.object({
|
|
13
|
+
isPublished: z.boolean(),
|
|
14
|
+
}),
|
|
15
|
+
});
|
|
16
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
17
|
+
|
|
18
|
+
export const ResponseSchema = ICommandResponseSchema(ImageGenerationJobSchema);
|
|
19
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
20
|
+
}
|
|
@@ -28,8 +28,10 @@ export const ImageGenerationJobSchema = z.object({
|
|
|
28
28
|
attempts: z.array(z.any()),
|
|
29
29
|
userId: z.string().nullable().optional(),
|
|
30
30
|
unregisteredUserId: z.string().nullable().optional(),
|
|
31
|
+
isPublished: z.boolean(),
|
|
31
32
|
isDeleted: z.boolean(),
|
|
32
33
|
internalError: z.string().nullable(),
|
|
34
|
+
tokenReservationId: z.string().nullable().optional(),
|
|
33
35
|
createdAt: z.date(),
|
|
34
36
|
updatedAt: z.date(),
|
|
35
37
|
});
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
export const IMAGE_GENERATION_AMQP_ROUTES = {
|
|
2
2
|
EXECUTE: 'tools.image-generation.execute.rpc',
|
|
3
|
+
GET_PRICE: 'tools.image-generation.get-price.rpc',
|
|
3
4
|
CONFIG: 'tools.image-generation.config.rpc',
|
|
4
5
|
FORWARD_JOB: 'tools.image-generation.jobs.forward.rpc',
|
|
5
6
|
GET_JOB: 'tools.image-generation.jobs.get.rpc',
|
|
6
7
|
LIST_JOBS: 'tools.image-generation.jobs.list.rpc',
|
|
7
8
|
SET_REACTION: 'tools.image-generation.jobs.set-reaction.rpc',
|
|
8
9
|
UPDATE_TITLE: 'tools.image-generation.jobs.update-title.rpc',
|
|
10
|
+
UPDATE_JOB: 'tools.image-generation.jobs.update.rpc',
|
|
9
11
|
SOFT_DELETE: 'tools.image-generation.jobs.soft-delete.rpc',
|
|
10
12
|
SOFT_DELETE_ALL: 'tools.image-generation.jobs.soft-delete-all.rpc',
|
|
11
13
|
GET_MODEL_BY_UUID: 'tools.image-generation.model.get-by-uuid.rpc',
|
|
@@ -7,9 +7,10 @@ export namespace GenerateMusicCommand {
|
|
|
7
7
|
export const RequestSchema = z.object({
|
|
8
8
|
userId: z.string().uuid().nullable().optional(),
|
|
9
9
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
|
-
userBalance: z.number(),
|
|
11
10
|
modelId: z.string(),
|
|
12
11
|
params: MusicJobParamsSchema,
|
|
12
|
+
tokenReservationId: z.string().uuid(),
|
|
13
|
+
precalculatedPrice: z.number(),
|
|
13
14
|
});
|
|
14
15
|
export type Request = z.infer<typeof RequestSchema>;
|
|
15
16
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
+
import { MusicJobParamsSchema } from '../models';
|
|
4
|
+
|
|
5
|
+
export namespace GetMusicPriceCommand {
|
|
6
|
+
export const RequestSchema = z.object({
|
|
7
|
+
modelId: z.string(),
|
|
8
|
+
userId: z.string().uuid().nullable().optional(),
|
|
9
|
+
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
|
+
params: MusicJobParamsSchema,
|
|
11
|
+
});
|
|
12
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
13
|
+
|
|
14
|
+
export const ResponseDataSchema = z.object({
|
|
15
|
+
price: z.number(),
|
|
16
|
+
});
|
|
17
|
+
export type ResponseData = z.infer<typeof ResponseDataSchema>;
|
|
18
|
+
|
|
19
|
+
export const ResponseSchema = ICommandResponseSchema(ResponseDataSchema);
|
|
20
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
21
|
+
}
|
package/music/commands/index.ts
CHANGED
|
@@ -3,7 +3,9 @@ export * from './delete-all-music-jobs.command';
|
|
|
3
3
|
export * from './retry-music-job.command';
|
|
4
4
|
export * from './set-reaction-to-music-job.command';
|
|
5
5
|
export * from './generate-music.command';
|
|
6
|
+
export * from './get-music-price.command';
|
|
6
7
|
export * from './update-music-job-title.command';
|
|
7
8
|
export * from './convert-to-wav.command';
|
|
8
9
|
export * from './generate-lyrics.command';
|
|
9
10
|
export * from './music-model';
|
|
11
|
+
export * from './update-published-status-music-jobs.command';
|
|
@@ -5,9 +5,10 @@ import { MusicJobParamsSchema, MusicJobSchema } from '../models/music-job.schema
|
|
|
5
5
|
export namespace RetryMusicJobCommand {
|
|
6
6
|
export const RequestSchema = z.object({
|
|
7
7
|
uuid: z.string().uuid(),
|
|
8
|
-
userBalance: z.number(),
|
|
9
8
|
userId: z.string().uuid().nullable().optional(),
|
|
10
9
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
|
+
tokenReservationId: z.string().uuid(),
|
|
11
|
+
precalculatedPrice: z.number(),
|
|
11
12
|
modelId: z.string().uuid().optional(),
|
|
12
13
|
params: MusicJobParamsSchema.optional(),
|
|
13
14
|
});
|