@purpleschool/gptbot-tools 0.0.118 → 0.0.119-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 +1 -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 +7 -1
- package/build/image-editor/models/image-editor-job.schema.js +2 -0
- package/build/image-editor/routes/image-editor.amqp.routes.js +1 -0
- package/build/image-generation/commands/execute-image-generation.command.js +3 -2
- package/build/image-generation/commands/get-image-generation-price.command.js +22 -0
- package/build/image-generation/commands/index.js +1 -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 +7 -1
- package/build/image-generation/models/image-generation-job.schema.js +2 -0
- package/build/image-generation/queries/find-image-generation-job-by-id.query.js +1 -5
- package/build/image-generation/routes/image-generation.amqp.routes.js +1 -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 +1 -0
- package/build/music/commands/retry-music-job.command.js +2 -1
- package/build/music/commands/update-published-status-music-jobs.command.js +7 -1
- package/build/music/models/music-job.schema.js +2 -0
- package/build/music/routes/music.amqp.routes.js +1 -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/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 +1 -0
- package/build/video/commands/retry-video-job.command.js +2 -1
- package/build/video/commands/update-published-status-video-jobs.command.js +7 -1
- package/build/video/commands/video.command.js +2 -1
- package/build/video/models/video-job.schema.js +3 -0
- package/build/video/routes/video.amqp.routes.js +1 -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 +1 -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 +7 -1
- package/build/video-editor/models/video-editor-job.schema.js +2 -0
- package/build/video-editor/queries/find-video-editor-job-by-id.query.js +1 -5
- package/build/video-editor/routes/video-editor.amqp.routes.js +1 -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 +1 -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 +9 -3
- package/image-editor/models/image-editor-job.schema.ts +2 -0
- package/image-editor/routes/image-editor.amqp.routes.ts +1 -0
- package/image-generation/commands/execute-image-generation.command.ts +3 -2
- package/image-generation/commands/get-image-generation-price.command.ts +24 -0
- package/image-generation/commands/index.ts +1 -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 +9 -3
- package/image-generation/models/image-generation-job.schema.ts +2 -0
- package/image-generation/queries/find-image-generation-job-by-id.query.ts +5 -9
- package/image-generation/routes/image-generation.amqp.routes.ts +1 -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 +1 -0
- package/music/commands/retry-music-job.command.ts +2 -1
- package/music/commands/update-published-status-music-jobs.command.ts +9 -3
- package/music/models/music-job.schema.ts +2 -0
- package/music/routes/music.amqp.routes.ts +1 -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 -1
- package/tools/enums/job-request-origin.enum.ts +3 -3
- 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 +1 -0
- package/video/commands/retry-video-job.command.ts +2 -1
- package/video/commands/update-published-status-video-jobs.command.ts +9 -3
- package/video/commands/video.command.ts +2 -1
- package/video/models/video-job.schema.ts +3 -0
- package/video/routes/video.amqp.routes.ts +1 -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 +1 -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 +9 -3
- package/video-editor/models/video-editor-job.schema.ts +2 -0
- package/video-editor/queries/find-video-editor-job-by-id.query.ts +5 -9
- package/video-editor/routes/video-editor.amqp.routes.ts +1 -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
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetImageEditorPriceCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
const common_1 = require("../../common");
|
|
7
|
+
var GetImageEditorPriceCommand;
|
|
8
|
+
(function (GetImageEditorPriceCommand) {
|
|
9
|
+
GetImageEditorPriceCommand.RequestSchema = zod_1.z.object({
|
|
10
|
+
modelId: zod_1.z.string().uuid(),
|
|
11
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
12
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
|
+
prompt: zod_1.z.string(),
|
|
14
|
+
params: zod_1.z.object({
|
|
15
|
+
attachedFiles: zod_1.z.array(common_1.AttachedFileSchema),
|
|
16
|
+
systemPromptId: zod_1.z.string().optional(),
|
|
17
|
+
}),
|
|
18
|
+
userHasActiveSubscriptionOrProduct: zod_1.z.boolean(),
|
|
19
|
+
});
|
|
20
|
+
GetImageEditorPriceCommand.ResponseDataSchema = zod_1.z.object({
|
|
21
|
+
price: zod_1.z.number(),
|
|
22
|
+
});
|
|
23
|
+
GetImageEditorPriceCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(GetImageEditorPriceCommand.ResponseDataSchema);
|
|
24
|
+
})(GetImageEditorPriceCommand || (exports.GetImageEditorPriceCommand = GetImageEditorPriceCommand = {}));
|
|
@@ -11,13 +11,14 @@ var ImageEditorCommand;
|
|
|
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: zod_1.z.object({
|
|
17
16
|
attachedFiles: zod_1.z.array(common_1.AttachedFileSchema),
|
|
18
17
|
systemPromptId: zod_1.z.string().optional(),
|
|
19
18
|
}),
|
|
20
19
|
userHasActiveSubscriptionOrProduct: zod_1.z.boolean(),
|
|
20
|
+
tokenReservationId: zod_1.z.string().uuid(),
|
|
21
|
+
precalculatedPrice: zod_1.z.number(),
|
|
21
22
|
});
|
|
22
23
|
ImageEditorCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.ImageEditorJobSchema);
|
|
23
24
|
})(ImageEditorCommand || (exports.ImageEditorCommand = ImageEditorCommand = {}));
|
|
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./delete-image-editor-job-by-uuid.command"), exports);
|
|
18
18
|
__exportStar(require("./delete-all-image-editor-jobs.command"), exports);
|
|
19
|
+
__exportStar(require("./get-image-editor-price.command"), exports);
|
|
19
20
|
__exportStar(require("./retry-image-editor-job.command"), exports);
|
|
20
21
|
__exportStar(require("./set-reaction-to-image-editor-job.command"), exports);
|
|
21
22
|
__exportStar(require("./image-editor.command"), exports);
|
|
@@ -8,10 +8,11 @@ var RetryImageEditorJobCommand;
|
|
|
8
8
|
(function (RetryImageEditorJobCommand) {
|
|
9
9
|
RetryImageEditorJobCommand.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
|
userHasActiveSubscriptionOrProduct: zod_1.z.boolean(),
|
|
14
|
+
tokenReservationId: zod_1.z.string().uuid(),
|
|
15
|
+
precalculatedPrice: zod_1.z.number(),
|
|
15
16
|
modelId: zod_1.z.string().optional(),
|
|
16
17
|
prompt: zod_1.z.string().optional(),
|
|
17
18
|
params: models_1.ImageEditorJobParamsSchema.optional(),
|
|
@@ -12,8 +12,14 @@ var UpdatePublishedStatusImageEditorJobsCommand;
|
|
|
12
12
|
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
13
|
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
14
14
|
}),
|
|
15
|
-
data: zod_1.z
|
|
15
|
+
data: zod_1.z
|
|
16
|
+
.object({
|
|
16
17
|
isPublished: zod_1.z.boolean(),
|
|
18
|
+
postId: zod_1.z.string().nullable().optional(),
|
|
19
|
+
})
|
|
20
|
+
.refine((data) => (data.isPublished ? !!data.postId : true), {
|
|
21
|
+
message: 'Post ID is required when job is published',
|
|
22
|
+
path: ['postId'],
|
|
17
23
|
}),
|
|
18
24
|
});
|
|
19
25
|
UpdatePublishedStatusImageEditorJobsCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.ImageEditorJobSchema);
|
|
@@ -26,7 +26,9 @@ exports.ImageEditorJobSchema = zod_1.z.object({
|
|
|
26
26
|
userId: zod_1.z.string().nullable().optional(),
|
|
27
27
|
unregisteredUserId: zod_1.z.string().nullable().optional(),
|
|
28
28
|
isPublished: zod_1.z.boolean(),
|
|
29
|
+
postId: zod_1.z.string().nullable(),
|
|
29
30
|
isDeleted: zod_1.z.boolean(),
|
|
31
|
+
tokenReservationId: zod_1.z.string().nullable().optional(),
|
|
30
32
|
createdAt: zod_1.z.date(),
|
|
31
33
|
completedAt: zod_1.z.date().nullable().optional(),
|
|
32
34
|
updatedAt: zod_1.z.date(),
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.IMAGE_EDITOR_AMQP_ROUTES = void 0;
|
|
4
4
|
exports.IMAGE_EDITOR_AMQP_ROUTES = {
|
|
5
5
|
EXECUTE: 'tools.image.execute.rpc',
|
|
6
|
+
GET_PRICE: 'tools.image.get-price.rpc',
|
|
6
7
|
CONFIG: 'tools.image.config.rpc',
|
|
7
8
|
GET_JOB: 'tools.image.jobs.get.rpc',
|
|
8
9
|
LIST_JOBS: 'tools.image.jobs.list.rpc',
|
|
@@ -3,20 +3,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ExecuteImageGenerationCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
-
const models_1 = require("../models");
|
|
7
6
|
const tools_1 = require("../../tools");
|
|
7
|
+
const models_1 = require("../models");
|
|
8
8
|
var ExecuteImageGenerationCommand;
|
|
9
9
|
(function (ExecuteImageGenerationCommand) {
|
|
10
10
|
ExecuteImageGenerationCommand.RequestSchema = zod_1.z.object({
|
|
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().uuid(),
|
|
16
15
|
params: models_1.ImageGenerationRequestParamsSchema,
|
|
17
16
|
presetId: zod_1.z.string().uuid().nullable().optional(),
|
|
18
17
|
origin: zod_1.z.nativeEnum(tools_1.JOB_REQUEST_ORIGIN).default(tools_1.JOB_REQUEST_ORIGIN.API),
|
|
19
18
|
userHasActiveSubscriptionOrProduct: zod_1.z.boolean(),
|
|
19
|
+
tokenReservationId: zod_1.z.string().uuid(),
|
|
20
|
+
precalculatedPrice: zod_1.z.number(),
|
|
20
21
|
});
|
|
21
22
|
ExecuteImageGenerationCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.ImageGenerationJobSchema);
|
|
22
23
|
})(ExecuteImageGenerationCommand || (exports.ExecuteImageGenerationCommand = ExecuteImageGenerationCommand = {}));
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetImageGenerationPriceCommand = 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 GetImageGenerationPriceCommand;
|
|
8
|
+
(function (GetImageGenerationPriceCommand) {
|
|
9
|
+
GetImageGenerationPriceCommand.RequestSchema = zod_1.z.object({
|
|
10
|
+
modelId: zod_1.z.string().uuid(),
|
|
11
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
12
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
|
+
prompt: zod_1.z.string(),
|
|
14
|
+
params: models_1.ImageGenerationRequestParamsSchema,
|
|
15
|
+
presetId: zod_1.z.string().uuid().nullable().optional(),
|
|
16
|
+
userHasActiveSubscriptionOrProduct: zod_1.z.boolean(),
|
|
17
|
+
});
|
|
18
|
+
GetImageGenerationPriceCommand.ResponseDataSchema = zod_1.z.object({
|
|
19
|
+
price: zod_1.z.number(),
|
|
20
|
+
});
|
|
21
|
+
GetImageGenerationPriceCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(GetImageGenerationPriceCommand.ResponseDataSchema);
|
|
22
|
+
})(GetImageGenerationPriceCommand || (exports.GetImageGenerationPriceCommand = GetImageGenerationPriceCommand = {}));
|
|
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./execute-image-generation.command"), exports);
|
|
18
18
|
__exportStar(require("./forward-image-generation-job.command"), exports);
|
|
19
|
+
__exportStar(require("./get-image-generation-price.command"), exports);
|
|
19
20
|
__exportStar(require("./save-image-generation-job.command"), exports);
|
|
20
21
|
__exportStar(require("./soft-delete-image-generation-job-by-uuid.command"), exports);
|
|
21
22
|
__exportStar(require("./soft-delete-image-generation-jobs-by-criteria.command"), exports);
|
|
@@ -10,12 +10,13 @@ var RetryImageGenerationJobCommand;
|
|
|
10
10
|
uuid: 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
|
-
|
|
14
|
-
|
|
13
|
+
userHasActiveSubscriptionOrProduct: zod_1.z.boolean(),
|
|
14
|
+
tokenReservationId: zod_1.z.string().uuid(),
|
|
15
|
+
precalculatedPrice: zod_1.z.number(),
|
|
15
16
|
modelId: zod_1.z.string().uuid().optional(),
|
|
17
|
+
prompt: zod_1.z.string().optional(),
|
|
16
18
|
params: models_1.ImageGenerationRequestParamsSchema.optional(),
|
|
17
19
|
presetId: zod_1.z.string().uuid().nullable().optional(),
|
|
18
|
-
userHasActiveSubscriptionOrProduct: zod_1.z.boolean(),
|
|
19
20
|
});
|
|
20
21
|
RetryImageGenerationJobCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.ImageGenerationJobSchema);
|
|
21
22
|
})(RetryImageGenerationJobCommand || (exports.RetryImageGenerationJobCommand = RetryImageGenerationJobCommand = {}));
|
package/build/image-generation/commands/update-published-status-image-generation-jobs.command.js
CHANGED
|
@@ -12,8 +12,14 @@ var UpdatePublishedStatusImageGenerationJobsCommand;
|
|
|
12
12
|
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
13
|
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
14
14
|
}),
|
|
15
|
-
data: zod_1.z
|
|
15
|
+
data: zod_1.z
|
|
16
|
+
.object({
|
|
16
17
|
isPublished: zod_1.z.boolean(),
|
|
18
|
+
postId: zod_1.z.string().nullable().optional(),
|
|
19
|
+
})
|
|
20
|
+
.refine((data) => (data.isPublished ? !!data.postId : true), {
|
|
21
|
+
message: 'Post ID is required when job is published',
|
|
22
|
+
path: ['postId'],
|
|
17
23
|
}),
|
|
18
24
|
});
|
|
19
25
|
UpdatePublishedStatusImageGenerationJobsCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.ImageGenerationJobSchema);
|
|
@@ -29,8 +29,10 @@ exports.ImageGenerationJobSchema = zod_1.z.object({
|
|
|
29
29
|
userId: zod_1.z.string().nullable().optional(),
|
|
30
30
|
unregisteredUserId: zod_1.z.string().nullable().optional(),
|
|
31
31
|
isPublished: zod_1.z.boolean(),
|
|
32
|
+
postId: zod_1.z.string().nullable(),
|
|
32
33
|
isDeleted: zod_1.z.boolean(),
|
|
33
34
|
internalError: zod_1.z.string().nullable(),
|
|
35
|
+
tokenReservationId: zod_1.z.string().nullable().optional(),
|
|
34
36
|
createdAt: zod_1.z.date(),
|
|
35
37
|
updatedAt: zod_1.z.date(),
|
|
36
38
|
});
|
|
@@ -6,14 +6,10 @@ const command_response_schema_1 = require("../../common/models/command-response.
|
|
|
6
6
|
const models_1 = require("../models");
|
|
7
7
|
var FindImageGenerationJobByIdQuery;
|
|
8
8
|
(function (FindImageGenerationJobByIdQuery) {
|
|
9
|
-
FindImageGenerationJobByIdQuery.RequestSchema = zod_1.z
|
|
10
|
-
.object({
|
|
9
|
+
FindImageGenerationJobByIdQuery.RequestSchema = zod_1.z.object({
|
|
11
10
|
uuid: zod_1.z.string(),
|
|
12
11
|
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
12
|
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
14
|
-
})
|
|
15
|
-
.refine((data) => data.userId || data.unregisteredUserId, {
|
|
16
|
-
message: 'Either userId or unregisteredUserId must be provided',
|
|
17
13
|
});
|
|
18
14
|
FindImageGenerationJobByIdQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.ImageGenerationJobSchema);
|
|
19
15
|
})(FindImageGenerationJobByIdQuery || (exports.FindImageGenerationJobByIdQuery = FindImageGenerationJobByIdQuery = {}));
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.IMAGE_GENERATION_AMQP_ROUTES = void 0;
|
|
4
4
|
exports.IMAGE_GENERATION_AMQP_ROUTES = {
|
|
5
5
|
EXECUTE: 'tools.image-generation.execute.rpc',
|
|
6
|
+
GET_PRICE: 'tools.image-generation.get-price.rpc',
|
|
6
7
|
CONFIG: 'tools.image-generation.config.rpc',
|
|
7
8
|
FORWARD_JOB: 'tools.image-generation.jobs.forward.rpc',
|
|
8
9
|
GET_JOB: 'tools.image-generation.jobs.get.rpc',
|
|
@@ -10,9 +10,10 @@ var GenerateMusicCommand;
|
|
|
10
10
|
GenerateMusicCommand.RequestSchema = zod_1.z.object({
|
|
11
11
|
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
12
12
|
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
|
-
userBalance: zod_1.z.number(),
|
|
14
13
|
modelId: zod_1.z.string(),
|
|
15
14
|
params: models_1.MusicJobParamsSchema,
|
|
15
|
+
tokenReservationId: zod_1.z.string().uuid(),
|
|
16
|
+
precalculatedPrice: zod_1.z.number(),
|
|
16
17
|
});
|
|
17
18
|
GenerateMusicCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(music_job_schema_1.MusicJobSchema);
|
|
18
19
|
})(GenerateMusicCommand || (exports.GenerateMusicCommand = GenerateMusicCommand = {}));
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetMusicPriceCommand = 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 GetMusicPriceCommand;
|
|
8
|
+
(function (GetMusicPriceCommand) {
|
|
9
|
+
GetMusicPriceCommand.RequestSchema = zod_1.z.object({
|
|
10
|
+
modelId: zod_1.z.string(),
|
|
11
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
12
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
|
+
params: models_1.MusicJobParamsSchema,
|
|
14
|
+
});
|
|
15
|
+
GetMusicPriceCommand.ResponseDataSchema = zod_1.z.object({
|
|
16
|
+
price: zod_1.z.number(),
|
|
17
|
+
});
|
|
18
|
+
GetMusicPriceCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(GetMusicPriceCommand.ResponseDataSchema);
|
|
19
|
+
})(GetMusicPriceCommand || (exports.GetMusicPriceCommand = GetMusicPriceCommand = {}));
|
|
@@ -19,6 +19,7 @@ __exportStar(require("./delete-all-music-jobs.command"), exports);
|
|
|
19
19
|
__exportStar(require("./retry-music-job.command"), exports);
|
|
20
20
|
__exportStar(require("./set-reaction-to-music-job.command"), exports);
|
|
21
21
|
__exportStar(require("./generate-music.command"), exports);
|
|
22
|
+
__exportStar(require("./get-music-price.command"), exports);
|
|
22
23
|
__exportStar(require("./update-music-job-title.command"), exports);
|
|
23
24
|
__exportStar(require("./convert-to-wav.command"), exports);
|
|
24
25
|
__exportStar(require("./generate-lyrics.command"), exports);
|
|
@@ -8,9 +8,10 @@ var RetryMusicJobCommand;
|
|
|
8
8
|
(function (RetryMusicJobCommand) {
|
|
9
9
|
RetryMusicJobCommand.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
|
modelId: zod_1.z.string().uuid().optional(),
|
|
15
16
|
params: music_job_schema_1.MusicJobParamsSchema.optional(),
|
|
16
17
|
});
|
|
@@ -12,8 +12,14 @@ var UpdatePublishedStatusMusicJobsCommand;
|
|
|
12
12
|
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
13
|
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
14
14
|
}),
|
|
15
|
-
data: zod_1.z
|
|
15
|
+
data: zod_1.z
|
|
16
|
+
.object({
|
|
16
17
|
isPublished: zod_1.z.boolean(),
|
|
18
|
+
postId: zod_1.z.string().nullable().optional(),
|
|
19
|
+
})
|
|
20
|
+
.refine((data) => (data.isPublished ? !!data.postId : true), {
|
|
21
|
+
message: 'Post ID is required when job is published',
|
|
22
|
+
path: ['postId'],
|
|
17
23
|
}),
|
|
18
24
|
});
|
|
19
25
|
UpdatePublishedStatusMusicJobsCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.MusicJobSchema);
|
|
@@ -47,7 +47,9 @@ exports.MusicJobSchema = zod_1.z.object({
|
|
|
47
47
|
userId: zod_1.z.string().nullable().optional(),
|
|
48
48
|
unregisteredUserId: zod_1.z.string().nullable().optional(),
|
|
49
49
|
isPublished: zod_1.z.boolean(),
|
|
50
|
+
postId: zod_1.z.string().nullable(),
|
|
50
51
|
isDeleted: zod_1.z.boolean(),
|
|
52
|
+
tokenReservationId: zod_1.z.string().nullable().optional(),
|
|
51
53
|
createdAt: zod_1.z.date(),
|
|
52
54
|
completedAt: zod_1.z.date().nullable().optional(),
|
|
53
55
|
updatedAt: zod_1.z.date(),
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.MUSIC_AMQP_ROUTES = void 0;
|
|
4
4
|
exports.MUSIC_AMQP_ROUTES = {
|
|
5
5
|
EXECUTE: 'tools.music.execute.rpc',
|
|
6
|
+
GET_PRICE: 'tools.music.get-price.rpc',
|
|
6
7
|
GENERATE_LYRICS: 'tools.music.generate-lyrics.rpc',
|
|
7
8
|
CONVERT_TO_WAV: 'tools.music.convert-to-wav.rpc',
|
|
8
9
|
CONFIG: 'tools.music.config.rpc',
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetParaphrasePriceCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
var GetParaphrasePriceCommand;
|
|
7
|
+
(function (GetParaphrasePriceCommand) {
|
|
8
|
+
GetParaphrasePriceCommand.RequestSchema = zod_1.z.object({
|
|
9
|
+
typeId: zod_1.z.string().uuid(),
|
|
10
|
+
});
|
|
11
|
+
GetParaphrasePriceCommand.ResponseDataSchema = zod_1.z.object({
|
|
12
|
+
price: zod_1.z.number(),
|
|
13
|
+
});
|
|
14
|
+
GetParaphrasePriceCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(GetParaphrasePriceCommand.ResponseDataSchema);
|
|
15
|
+
})(GetParaphrasePriceCommand || (exports.GetParaphrasePriceCommand = GetParaphrasePriceCommand = {}));
|
|
@@ -20,3 +20,4 @@ __exportStar(require("./delete-all-paraphrase-jobs.command"), exports);
|
|
|
20
20
|
__exportStar(require("./set-reaction-to-paraphrase-job.command"), exports);
|
|
21
21
|
__exportStar(require("./update-paraphrase-job-title.command"), exports);
|
|
22
22
|
__exportStar(require("./retry-paraphrase-job.command"), exports);
|
|
23
|
+
__exportStar(require("./get-paraphrase-price.command"), exports);
|
|
@@ -10,11 +10,12 @@ var ParaphraseCommand;
|
|
|
10
10
|
ParaphraseCommand.RequestSchema = zod_1.z.object({
|
|
11
11
|
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
12
12
|
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
|
-
userBalance: zod_1.z.number(),
|
|
14
13
|
prompt: zod_1.z.string(),
|
|
15
14
|
typeId: zod_1.z.string().uuid(),
|
|
16
15
|
styleId: zod_1.z.string().uuid(),
|
|
17
16
|
intensity: zod_1.z.nativeEnum(enums_1.PARAPHRASING_INTENSITY),
|
|
17
|
+
tokenReservationId: zod_1.z.string().uuid(),
|
|
18
|
+
precalculatedPrice: zod_1.z.number(),
|
|
18
19
|
});
|
|
19
20
|
ParaphraseCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(paraphrase_job_schema_1.ParaphraseJobSchema);
|
|
20
21
|
})(ParaphraseCommand || (exports.ParaphraseCommand = ParaphraseCommand = {}));
|
|
@@ -8,9 +8,10 @@ var RetryParaphraseJobCommand;
|
|
|
8
8
|
(function (RetryParaphraseJobCommand) {
|
|
9
9
|
RetryParaphraseJobCommand.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
|
RetryParaphraseJobCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(paraphrase_job_schema_1.ParaphraseJobSchema);
|
|
16
17
|
})(RetryParaphraseJobCommand || (exports.RetryParaphraseJobCommand = RetryParaphraseJobCommand = {}));
|
|
@@ -21,6 +21,7 @@ exports.ParaphraseJobSchema = zod_1.z.object({
|
|
|
21
21
|
typeId: zod_1.z.string(),
|
|
22
22
|
styleId: zod_1.z.string(),
|
|
23
23
|
intensity: zod_1.z.nativeEnum(enums_1.PARAPHRASING_INTENSITY),
|
|
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(),
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PARAPHRASE_AMQP_ROUTES = void 0;
|
|
4
4
|
exports.PARAPHRASE_AMQP_ROUTES = {
|
|
5
5
|
EXECUTE: 'tools.paraphrase.execute.rpc',
|
|
6
|
+
GET_PRICE: 'tools.paraphrase.get-price.rpc',
|
|
6
7
|
CONFIG: 'tools.paraphrase.config.rpc',
|
|
7
8
|
GET_JOB: 'tools.paraphrase.jobs.get.rpc',
|
|
8
9
|
LIST_JOBS: 'tools.paraphrase.jobs.list.rpc',
|
|
@@ -10,7 +10,8 @@ var GenerateSlidesCommand;
|
|
|
10
10
|
uuid: 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
|
});
|
|
15
16
|
GenerateSlidesCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.PresentationSchema);
|
|
16
17
|
})(GenerateSlidesCommand || (exports.GenerateSlidesCommand = GenerateSlidesCommand = {}));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetPresentationSlidesGenerationPriceCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const common_1 = require("../../common");
|
|
6
|
+
var GetPresentationSlidesGenerationPriceCommand;
|
|
7
|
+
(function (GetPresentationSlidesGenerationPriceCommand) {
|
|
8
|
+
GetPresentationSlidesGenerationPriceCommand.RequestSchema = zod_1.z.object({
|
|
9
|
+
slideCount: zod_1.z.number().int().min(1),
|
|
10
|
+
});
|
|
11
|
+
GetPresentationSlidesGenerationPriceCommand.ResponseDataSchema = zod_1.z.object({
|
|
12
|
+
price: zod_1.z.number(),
|
|
13
|
+
});
|
|
14
|
+
GetPresentationSlidesGenerationPriceCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(GetPresentationSlidesGenerationPriceCommand.ResponseDataSchema);
|
|
15
|
+
})(GetPresentationSlidesGenerationPriceCommand || (exports.GetPresentationSlidesGenerationPriceCommand = GetPresentationSlidesGenerationPriceCommand = {}));
|
|
@@ -23,6 +23,7 @@ __exportStar(require("./generate-presentation-outline.command"), exports);
|
|
|
23
23
|
__exportStar(require("./generate-and-insert-slide.command"), exports);
|
|
24
24
|
__exportStar(require("./export-as-pptx.command"), exports);
|
|
25
25
|
__exportStar(require("./generate-slides.command"), exports);
|
|
26
|
+
__exportStar(require("./get-presentation-slides-generation-price.command"), exports);
|
|
26
27
|
__exportStar(require("./reposition-slide-outline.command"), exports);
|
|
27
28
|
__exportStar(require("./update-slide-outline.command"), exports);
|
|
28
29
|
__exportStar(require("./update-presentation.command"), exports);
|
|
@@ -21,6 +21,7 @@ exports.PresentationSchema = zod_1.z.object({
|
|
|
21
21
|
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
22
22
|
slideCount: zod_1.z.number(),
|
|
23
23
|
isDeleted: zod_1.z.boolean(),
|
|
24
|
+
tokenReservationId: zod_1.z.string().nullable().optional(),
|
|
24
25
|
lastContentUpdateAt: zod_1.z.date().nullable(),
|
|
25
26
|
lastPptxExportedAt: zod_1.z.date().nullable(),
|
|
26
27
|
createdAt: zod_1.z.date(),
|
|
@@ -7,6 +7,7 @@ exports.PRESENTATION_AMQP_ROUTES = {
|
|
|
7
7
|
FIND_BY_UUID: 'tools.presentation.find-by-uuid.rpc',
|
|
8
8
|
GENERATE_PRESENTATION_OUTLINE: 'tools.presentation.generate-outline.rpc',
|
|
9
9
|
GENERATE_PRESENTATION_SLIDES: 'tools.presentation.generate-slides.rpc',
|
|
10
|
+
GET_SLIDES_GENERATION_PRICE: 'tools.presentation.slides.get-price.rpc',
|
|
10
11
|
GENERATE_AND_INSERT_SLIDE: 'tools.presentation.generate-and-insert-slide.rpc',
|
|
11
12
|
UPDATE_PRESENTATION_OUTLINE: 'tools.presentation.update-presentation-outline.rpc',
|
|
12
13
|
LIST_PRESENTATIONS: 'tools.presentation.list-presentations.rpc',
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetSTTPriceCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
var GetSTTPriceCommand;
|
|
7
|
+
(function (GetSTTPriceCommand) {
|
|
8
|
+
GetSTTPriceCommand.RequestSchema = zod_1.z.object({
|
|
9
|
+
modelId: zod_1.z.string(),
|
|
10
|
+
durationInSeconds: zod_1.z.number(),
|
|
11
|
+
});
|
|
12
|
+
GetSTTPriceCommand.ResponseDataSchema = zod_1.z.object({
|
|
13
|
+
price: zod_1.z.number(),
|
|
14
|
+
});
|
|
15
|
+
GetSTTPriceCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(GetSTTPriceCommand.ResponseDataSchema);
|
|
16
|
+
})(GetSTTPriceCommand || (exports.GetSTTPriceCommand = GetSTTPriceCommand = {}));
|
|
@@ -19,4 +19,5 @@ __exportStar(require("./delete-all-stt-jobs.command"), exports);
|
|
|
19
19
|
__exportStar(require("./retry-stt-job.command"), exports);
|
|
20
20
|
__exportStar(require("./set-reaction-to-stt-job.command"), exports);
|
|
21
21
|
__exportStar(require("./stt.command"), exports);
|
|
22
|
+
__exportStar(require("./get-stt-price.command"), exports);
|
|
22
23
|
__exportStar(require("./update-stt-job-title.command"), exports);
|
|
@@ -8,9 +8,10 @@ var RetrySTTJobCommand;
|
|
|
8
8
|
(function (RetrySTTJobCommand) {
|
|
9
9
|
RetrySTTJobCommand.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
|
RetrySTTJobCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.STTJobSchema);
|
|
16
17
|
})(RetrySTTJobCommand || (exports.RetrySTTJobCommand = RetrySTTJobCommand = {}));
|
|
@@ -9,12 +9,13 @@ var STTCommand;
|
|
|
9
9
|
STTCommand.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
|
fileId: zod_1.z.string(),
|
|
15
14
|
fileKey: zod_1.z.string(),
|
|
16
15
|
fileUrl: zod_1.z.string(),
|
|
17
16
|
durationInSeconds: zod_1.z.number(),
|
|
17
|
+
tokenReservationId: zod_1.z.string().uuid(),
|
|
18
|
+
precalculatedPrice: zod_1.z.number(),
|
|
18
19
|
});
|
|
19
20
|
STTCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(stt_job_schema_1.STTJobSchema);
|
|
20
21
|
})(STTCommand || (exports.STTCommand = STTCommand = {}));
|
|
@@ -21,6 +21,7 @@ exports.STTJobSchema = zod_1.z.object({
|
|
|
21
21
|
userId: zod_1.z.string().nullable(),
|
|
22
22
|
unregisteredUserId: zod_1.z.string().nullable(),
|
|
23
23
|
price: zod_1.z.number(),
|
|
24
|
+
tokenReservationId: zod_1.z.string().nullable().optional(),
|
|
24
25
|
isDeleted: zod_1.z.boolean(),
|
|
25
26
|
createdAt: zod_1.z.date(),
|
|
26
27
|
completedAt: zod_1.z.date().nullable(),
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.STT_AMQP_ROUTES = void 0;
|
|
4
4
|
exports.STT_AMQP_ROUTES = {
|
|
5
5
|
EXECUTE: 'tools.stt.execute.rpc',
|
|
6
|
+
GET_PRICE: 'tools.stt.get-price.rpc',
|
|
6
7
|
CONFIG: 'tools.stt.config.rpc',
|
|
7
8
|
GET_JOB: 'tools.stt.jobs.get.rpc',
|
|
8
9
|
LIST_JOBS: 'tools.stt.jobs.list.rpc',
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ToolJobFailedEvent = void 0;
|
|
4
|
+
const enums_1 = require("../enums");
|
|
5
|
+
const models_1 = require("../models");
|
|
6
|
+
const zod_1 = require("zod");
|
|
7
|
+
var ToolJobFailedEvent;
|
|
8
|
+
(function (ToolJobFailedEvent) {
|
|
9
|
+
ToolJobFailedEvent.PayloadSchema = zod_1.z.object({
|
|
10
|
+
job: models_1.ToolJobSchema.extend({
|
|
11
|
+
toolType: zod_1.z.nativeEnum(enums_1.TOOL_TYPE),
|
|
12
|
+
}),
|
|
13
|
+
});
|
|
14
|
+
})(ToolJobFailedEvent || (exports.ToolJobFailedEvent = ToolJobFailedEvent = {}));
|
|
@@ -7,6 +7,7 @@ exports.ToolJobSchema = zod_1.z.object({
|
|
|
7
7
|
userId: zod_1.z.string().nullable(),
|
|
8
8
|
unregisteredUserId: zod_1.z.string().nullable(),
|
|
9
9
|
price: zod_1.z.number(),
|
|
10
|
+
tokenReservationId: zod_1.z.string().nullable().optional(),
|
|
10
11
|
createdAt: zod_1.z.date(),
|
|
11
12
|
updatedAt: zod_1.z.date(),
|
|
12
13
|
});
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TOOLS_AMQP_ROUTES = void 0;
|
|
4
4
|
exports.TOOLS_AMQP_ROUTES = {
|
|
5
5
|
JOB_COMPLETED: 'tools.job.completed',
|
|
6
|
+
JOB_FAILED: 'tools.job.failed',
|
|
6
7
|
FIND_ALL: 'tools.find.all.rpc',
|
|
7
8
|
GET_GLOBAL_TOOLS_CONFIG: 'tools.config.rpc',
|
|
8
9
|
GET_TOOLS_WITH_CONFIGS: 'tools.with-configs.rpc',
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetTTSPriceCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
var GetTTSPriceCommand;
|
|
7
|
+
(function (GetTTSPriceCommand) {
|
|
8
|
+
GetTTSPriceCommand.RequestSchema = zod_1.z.object({
|
|
9
|
+
modelId: zod_1.z.string(),
|
|
10
|
+
userInput: zod_1.z.string(),
|
|
11
|
+
});
|
|
12
|
+
GetTTSPriceCommand.ResponseDataSchema = zod_1.z.object({
|
|
13
|
+
price: zod_1.z.number(),
|
|
14
|
+
});
|
|
15
|
+
GetTTSPriceCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(GetTTSPriceCommand.ResponseDataSchema);
|
|
16
|
+
})(GetTTSPriceCommand || (exports.GetTTSPriceCommand = GetTTSPriceCommand = {}));
|
|
@@ -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 = {}));
|