@purpleschool/gptbot-tools 0.0.77-ai-proxy → 0.0.78-ai-proxy
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/ai-vendor/index.ts +1 -0
- package/ai-vendor/models/ai-vendor.schema.ts +13 -0
- package/ai-vendor/models/index.ts +1 -0
- package/build/ai-vendor/index.js +17 -0
- package/build/ai-vendor/models/ai-vendor.schema.js +13 -0
- package/build/ai-vendor/models/index.js +17 -0
- package/build/common/errors/errors.js +163 -0
- package/build/common/models/attached-file.schema.js +13 -0
- package/build/common/models/index.js +1 -0
- package/build/image-editor/commands/image-editor-model/get-image-editor-model-by-uuid.command.js +13 -0
- package/build/image-editor/commands/image-editor-model/index.js +17 -0
- package/build/image-editor/commands/image-editor.command.js +3 -1
- package/build/image-editor/commands/index.js +1 -0
- package/build/image-editor/commands/retry-image-editor-job.command.js +4 -0
- package/build/image-editor/commands/set-reaction-to-image-editor-job.command.js +12 -2
- package/build/image-editor/enums/image-editor-model-type.enum.js +2 -0
- package/build/image-editor/enums/image-editor-strategy.enum.js +4 -0
- package/build/image-editor/models/image-editor-config.schema.js +1 -0
- package/build/image-editor/models/image-editor-job.schema.js +2 -0
- package/build/image-editor/models/image-editor-model.schema.js +9 -1
- package/build/image-editor/routes/image-editor-model.amqp.routes.js +6 -0
- package/build/image-editor/routes/image-editor.http.routes.js +1 -0
- package/build/image-editor/routes/index.js +1 -0
- package/build/image-generation/commands/execute-image-generation.command.js +20 -0
- package/build/image-generation/commands/forward-image-generation-job.command.js +32 -0
- package/build/image-generation/commands/index.js +23 -0
- package/build/image-generation/commands/save-image-generation-job.command.js +17 -0
- package/build/image-generation/commands/set-reaction-to-image-generation-job.command.js +27 -0
- package/build/image-generation/commands/soft-delete-image-generation-job-by-uuid.command.js +14 -0
- package/build/image-generation/commands/soft-delete-image-generation-jobs-by-criteria.command.js +13 -0
- package/build/image-generation/commands/update-image-generation-job-title.command.js +16 -0
- package/build/image-generation/enums/image-generation-model-strategy.enum.js +23 -0
- package/build/image-generation/enums/image-generation-models.enum.js +8 -0
- package/build/image-generation/enums/image-generation-resolution.enum.js +9 -0
- package/build/image-generation/enums/index.js +19 -0
- package/build/image-generation/index.js +21 -0
- package/build/image-generation/models/image-generation-config.schema.js +12 -0
- package/build/image-generation/models/image-generation-job.schema.js +35 -0
- package/build/image-generation/models/image-generation-model.schema.js +51 -0
- package/build/image-generation/models/image-generation-preset.schema.js +13 -0
- package/build/image-generation/models/index.js +20 -0
- package/build/image-generation/queries/find-image-generation-job-by-id.query.js +19 -0
- package/build/image-generation/queries/find-image-generation-jobs.query.js +28 -0
- package/build/image-generation/queries/get-image-generation-config.query.js +11 -0
- package/build/image-generation/queries/index.js +19 -0
- package/build/image-generation/routes/image-generation.amqp.routes.js +14 -0
- package/build/image-generation/routes/image-generation.http.routes.js +9 -0
- package/build/image-generation/routes/index.js +18 -0
- package/build/index.js +6 -0
- package/build/music/commands/index.js +1 -0
- package/build/music/commands/music-model/get-music-model-by-uuid.command.js +13 -0
- package/build/music/commands/music-model/index.js +17 -0
- package/build/music/commands/retry-music-job.command.js +2 -0
- package/build/music/commands/set-reaction-to-music-job.command.js +12 -2
- package/build/music/models/music-job.schema.js +1 -0
- package/build/music/models/music-track.schema.js +1 -0
- package/build/music/routes/index.js +1 -0
- package/build/music/routes/music-model.amqp.routes.js +6 -0
- package/build/paraphrase/commands/delete-all-paraphrase-jobs.command.js +13 -0
- package/build/paraphrase/commands/delete-paraphrase-job-by-uuid.command.js +14 -0
- package/build/paraphrase/commands/index.js +5 -0
- package/build/paraphrase/commands/retry-paraphrase-job.command.js +16 -0
- package/build/paraphrase/commands/set-reaction-to-paraphrase-job.command.js +27 -0
- package/build/paraphrase/commands/update-paraphrase-job-title.command.js +16 -0
- package/build/paraphrase/models/paraphrase-job.schema.js +7 -0
- package/build/paraphrase/queries/find-paraphrase-jobs.query.js +28 -0
- package/build/paraphrase/queries/index.js +1 -0
- package/build/paraphrase/routes/paraphrase.amqp.routes.js +6 -0
- package/build/presentation/commands/index.js +1 -0
- package/build/presentation/commands/set-reaction-to-presentation.command.js +26 -0
- package/build/presentation/constants/slide-layout-map.constant.js +1 -0
- package/build/presentation/enums/slide-content-type.enum.js +1 -0
- package/build/presentation/models/pptx-export-payload.js +19 -1
- package/build/presentation/models/presentation.schema.js +3 -0
- package/build/presentation/models/slide-content-edit.schema.js +18 -1
- package/build/presentation/models/slide-content.schema.js +30 -1
- package/build/presentation/routes/presentation.routes.js +1 -0
- package/build/stt/commands/set-reaction-to-stt-job.command.js +12 -2
- package/build/stt/models/stt-job.schema.js +2 -0
- package/build/tools/enums/tool-content-type.enum.js +1 -0
- package/build/tools/enums/tool-type.enum.js +1 -0
- package/build/tools/models/global-tools-config.schema.js +2 -0
- package/build/tools/models/tool.schema.js +3 -0
- package/build/tools/models/tools-with-configs.schema.js +5 -0
- package/build/tts/commands/set-reaction-to-tts-job.command.js +12 -2
- package/build/tts/models/tts-job.schema.js +2 -0
- package/build/video/commands/index.js +1 -0
- package/build/video/commands/retry-video-job.command.js +4 -0
- package/build/video/commands/set-reaction-to-video-job.command.js +12 -2
- package/build/video/commands/video-model/get-video-model-by-uuid.command.js +13 -0
- package/build/video/commands/video-model/index.js +17 -0
- package/build/video/enums/video-pricing-rule-type.enum.js +1 -0
- package/build/video/enums/video-strategy.enum.js +1 -0
- package/build/video/models/video-job.schema.js +3 -0
- package/build/video/models/video-model.schema.js +9 -1
- package/build/video/routes/index.js +1 -0
- package/build/video/routes/video-model.amqp.routes.js +6 -0
- package/build/video/routes/video.http.routes.js +1 -0
- package/build/video/utils/calculate-video-generation-price.util.js +5 -1
- package/build/video-editor/commands/edit-video.command.js +2 -1
- package/build/video-editor/commands/index.js +1 -0
- package/build/video-editor/commands/retry-video-editor-job.command.js +5 -0
- package/build/video-editor/commands/set-reaction-to-video-editor-job.command.js +12 -2
- package/build/video-editor/commands/video-editor-model/get-video-editor-model.command.js +13 -0
- package/build/video-editor/commands/video-editor-model/index.js +17 -0
- package/build/video-editor/models/video-editor-job.schema.js +3 -0
- package/build/video-editor/routes/index.js +1 -0
- package/build/video-editor/routes/video-editor-model.amqp.routes.js +6 -0
- package/build/writer/commands/set-reaction-writer-document.command.js +11 -1
- package/build/writer/models/writer-document.schema.js +1 -0
- package/common/errors/errors.ts +163 -0
- package/common/models/attached-file.schema.ts +11 -0
- package/common/models/index.ts +1 -0
- package/image-editor/commands/image-editor-model/get-image-editor-model-by-uuid.command.ts +13 -0
- package/image-editor/commands/image-editor-model/index.ts +1 -0
- package/image-editor/commands/image-editor.command.ts +3 -1
- package/image-editor/commands/index.ts +1 -0
- package/image-editor/commands/retry-image-editor-job.command.ts +5 -1
- package/image-editor/commands/set-reaction-to-image-editor-job.command.ts +19 -6
- package/image-editor/enums/image-editor-model-type.enum.ts +2 -0
- package/image-editor/enums/image-editor-strategy.enum.ts +4 -0
- package/image-editor/models/image-editor-config.schema.ts +1 -0
- package/image-editor/models/image-editor-job.schema.ts +3 -1
- package/image-editor/models/image-editor-model.schema.ts +16 -0
- package/image-editor/routes/image-editor-model.amqp.routes.ts +3 -0
- package/image-editor/routes/image-editor.http.routes.ts +1 -0
- package/image-editor/routes/index.ts +1 -0
- package/image-generation/commands/execute-image-generation.command.ts +20 -0
- package/image-generation/commands/forward-image-generation-job.command.ts +32 -0
- package/image-generation/commands/index.ts +7 -0
- package/image-generation/commands/save-image-generation-job.command.ts +17 -0
- package/image-generation/commands/set-reaction-to-image-generation-job.command.ts +30 -0
- package/image-generation/commands/soft-delete-image-generation-job-by-uuid.command.ts +14 -0
- package/image-generation/commands/soft-delete-image-generation-jobs-by-criteria.command.ts +13 -0
- package/image-generation/commands/update-image-generation-job-title.command.ts +16 -0
- package/image-generation/enums/image-generation-model-strategy.enum.ts +24 -0
- package/image-generation/enums/image-generation-models.enum.ts +4 -0
- package/image-generation/enums/image-generation-resolution.enum.ts +5 -0
- package/image-generation/enums/index.ts +3 -0
- package/image-generation/index.ts +5 -0
- package/image-generation/models/image-generation-config.schema.ts +11 -0
- package/image-generation/models/image-generation-job.schema.ts +37 -0
- package/image-generation/models/image-generation-model.schema.ts +64 -0
- package/image-generation/models/image-generation-preset.schema.ts +13 -0
- package/image-generation/models/index.ts +4 -0
- package/image-generation/queries/find-image-generation-job-by-id.query.ts +19 -0
- package/image-generation/queries/find-image-generation-jobs.query.ts +33 -0
- package/image-generation/queries/get-image-generation-config.query.ts +11 -0
- package/image-generation/queries/index.ts +3 -0
- package/image-generation/routes/image-generation.amqp.routes.ts +11 -0
- package/image-generation/routes/image-generation.http.routes.ts +7 -0
- package/image-generation/routes/index.ts +2 -0
- package/index.ts +6 -0
- package/music/commands/index.ts +1 -0
- package/music/commands/music-model/get-music-model-by-uuid.command.ts +13 -0
- package/music/commands/music-model/index.ts +1 -0
- package/music/commands/retry-music-job.command.ts +3 -1
- package/music/commands/set-reaction-to-music-job.command.ts +19 -6
- package/music/models/music-job.schema.ts +1 -0
- package/music/models/music-track.schema.ts +1 -0
- package/music/routes/index.ts +1 -0
- package/music/routes/music-model.amqp.routes.ts +3 -0
- package/package.json +1 -1
- package/paraphrase/commands/delete-all-paraphrase-jobs.command.ts +13 -0
- package/paraphrase/commands/delete-paraphrase-job-by-uuid.command.ts +14 -0
- package/paraphrase/commands/index.ts +5 -0
- package/paraphrase/commands/retry-paraphrase-job.command.ts +16 -0
- package/paraphrase/commands/set-reaction-to-paraphrase-job.command.ts +30 -0
- package/paraphrase/commands/update-paraphrase-job-title.command.ts +16 -0
- package/paraphrase/models/paraphrase-job.schema.ts +7 -0
- package/paraphrase/queries/find-paraphrase-jobs.query.ts +33 -0
- package/paraphrase/queries/index.ts +1 -0
- package/paraphrase/routes/paraphrase.amqp.routes.ts +6 -0
- package/presentation/commands/index.ts +1 -0
- package/presentation/commands/set-reaction-to-presentation.command.ts +29 -0
- package/presentation/constants/slide-layout-map.constant.ts +1 -0
- package/presentation/enums/slide-content-type.enum.ts +1 -0
- package/presentation/models/pptx-export-payload.ts +20 -0
- package/presentation/models/presentation.schema.ts +3 -0
- package/presentation/models/slide-content-edit.schema.ts +21 -0
- package/presentation/models/slide-content.schema.ts +51 -0
- package/presentation/routes/presentation.routes.ts +1 -0
- package/stt/commands/set-reaction-to-stt-job.command.ts +19 -6
- package/stt/models/stt-job.schema.ts +2 -0
- package/tools/enums/tool-content-type.enum.ts +1 -0
- package/tools/enums/tool-type.enum.ts +1 -0
- package/tools/models/global-tools-config.schema.ts +2 -0
- package/tools/models/tool.schema.ts +3 -0
- package/tools/models/tools-with-configs.schema.ts +7 -0
- package/tts/commands/set-reaction-to-tts-job.command.ts +19 -6
- package/tts/models/tts-job.schema.ts +2 -0
- package/video/commands/index.ts +1 -0
- package/video/commands/retry-video-job.command.ts +4 -0
- package/video/commands/set-reaction-to-video-job.command.ts +19 -6
- package/video/commands/video-model/get-video-model-by-uuid.command.ts +13 -0
- package/video/commands/video-model/index.ts +1 -0
- package/video/enums/video-pricing-rule-type.enum.ts +1 -0
- package/video/enums/video-strategy.enum.ts +1 -0
- package/video/models/video-job.schema.ts +3 -0
- package/video/models/video-model.schema.ts +9 -1
- package/video/routes/index.ts +1 -0
- package/video/routes/video-model.amqp.routes.ts +3 -0
- package/video/routes/video.http.routes.ts +1 -0
- package/video/utils/calculate-video-generation-price.util.ts +7 -1
- package/video-editor/commands/edit-video.command.ts +2 -1
- package/video-editor/commands/index.ts +1 -0
- package/video-editor/commands/retry-video-editor-job.command.ts +5 -0
- package/video-editor/commands/set-reaction-to-video-editor-job.command.ts +19 -6
- package/video-editor/commands/video-editor-model/get-video-editor-model.command.ts +13 -0
- package/video-editor/commands/video-editor-model/index.ts +1 -0
- package/video-editor/models/video-editor-job.schema.ts +3 -0
- package/video-editor/routes/index.ts +1 -0
- package/video-editor/routes/video-editor-model.amqp.routes.ts +3 -0
- package/writer/commands/set-reaction-writer-document.command.ts +19 -6
- package/writer/models/writer-document.schema.ts +1 -0
package/build/image-generation/commands/soft-delete-image-generation-jobs-by-criteria.command.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SoftDeleteImageGenerationJobsByCriteriaCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
var SoftDeleteImageGenerationJobsByCriteriaCommand;
|
|
7
|
+
(function (SoftDeleteImageGenerationJobsByCriteriaCommand) {
|
|
8
|
+
SoftDeleteImageGenerationJobsByCriteriaCommand.RequestSchema = zod_1.z.object({
|
|
9
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
10
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
11
|
+
});
|
|
12
|
+
SoftDeleteImageGenerationJobsByCriteriaCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(zod_1.z.boolean());
|
|
13
|
+
})(SoftDeleteImageGenerationJobsByCriteriaCommand || (exports.SoftDeleteImageGenerationJobsByCriteriaCommand = SoftDeleteImageGenerationJobsByCriteriaCommand = {}));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateImageGenerationJobTitleCommand = 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 UpdateImageGenerationJobTitleCommand;
|
|
8
|
+
(function (UpdateImageGenerationJobTitleCommand) {
|
|
9
|
+
UpdateImageGenerationJobTitleCommand.RequestSchema = zod_1.z.object({
|
|
10
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
11
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
12
|
+
uuid: zod_1.z.string(),
|
|
13
|
+
title: zod_1.z.string(),
|
|
14
|
+
});
|
|
15
|
+
UpdateImageGenerationJobTitleCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.ImageGenerationJobSchema);
|
|
16
|
+
})(UpdateImageGenerationJobTitleCommand || (exports.UpdateImageGenerationJobTitleCommand = UpdateImageGenerationJobTitleCommand = {}));
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IMAGE_GENERATION_MODEL_STRATEGY = void 0;
|
|
4
|
+
var IMAGE_GENERATION_MODEL_STRATEGY;
|
|
5
|
+
(function (IMAGE_GENERATION_MODEL_STRATEGY) {
|
|
6
|
+
// Together AI Models
|
|
7
|
+
IMAGE_GENERATION_MODEL_STRATEGY["FLUX_IMAGE_GENERATION"] = "FLUX_IMAGE_GENERATION";
|
|
8
|
+
IMAGE_GENERATION_MODEL_STRATEGY["FLUX_DEV_IMAGE_GENERATION"] = "FLUX_DEV_IMAGE_GENERATION";
|
|
9
|
+
IMAGE_GENERATION_MODEL_STRATEGY["STABLE_DIFFUSION_IMAGE_GENERATION"] = "STABLE_DIFFUSION_IMAGE_GENERATION";
|
|
10
|
+
// Grok AI
|
|
11
|
+
IMAGE_GENERATION_MODEL_STRATEGY["GROK_IMAGE_GENERATION"] = "GROK_IMAGE_GENERATION";
|
|
12
|
+
// OpenAI
|
|
13
|
+
IMAGE_GENERATION_MODEL_STRATEGY["DALLE_IMAGE_GENERATION"] = "DALLE_IMAGE_GENERATION";
|
|
14
|
+
IMAGE_GENERATION_MODEL_STRATEGY["OPENAI_IMAGE_1_GENERATION"] = "OPENAI_IMAGE_1_GENERATION";
|
|
15
|
+
// Google AI
|
|
16
|
+
IMAGE_GENERATION_MODEL_STRATEGY["GEMINI_IMAGE_GENERATION"] = "GEMINI_IMAGE_GENERATION";
|
|
17
|
+
IMAGE_GENERATION_MODEL_STRATEGY["IMAGEN_IMAGE_GENERATION"] = "IMAGEN_IMAGE_GENERATION";
|
|
18
|
+
// Midjourney
|
|
19
|
+
IMAGE_GENERATION_MODEL_STRATEGY["MIDJOURNEY_IMAGE_GENERATION"] = "MIDJOURNEY_IMAGE_GENERATION";
|
|
20
|
+
IMAGE_GENERATION_MODEL_STRATEGY["NANO_BANANA_IMAGE_GENERATION"] = "NANO_BANANA_IMAGE_GENERATION";
|
|
21
|
+
// Flux
|
|
22
|
+
IMAGE_GENERATION_MODEL_STRATEGY["KIE_FLUX_IMAGE_GENERATION"] = "KIE_FLUX_IMAGE_GENERATION";
|
|
23
|
+
})(IMAGE_GENERATION_MODEL_STRATEGY || (exports.IMAGE_GENERATION_MODEL_STRATEGY = IMAGE_GENERATION_MODEL_STRATEGY = {}));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IMAGE_GENERATION_MODELS = void 0;
|
|
4
|
+
var IMAGE_GENERATION_MODELS;
|
|
5
|
+
(function (IMAGE_GENERATION_MODELS) {
|
|
6
|
+
IMAGE_GENERATION_MODELS["NANO_BANANA"] = "google/nano-banana";
|
|
7
|
+
IMAGE_GENERATION_MODELS["NANO_BANANA_PRO"] = "nano-banana-pro";
|
|
8
|
+
})(IMAGE_GENERATION_MODELS || (exports.IMAGE_GENERATION_MODELS = IMAGE_GENERATION_MODELS = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IMAGE_GENERATION_RESOLUTION = void 0;
|
|
4
|
+
var IMAGE_GENERATION_RESOLUTION;
|
|
5
|
+
(function (IMAGE_GENERATION_RESOLUTION) {
|
|
6
|
+
IMAGE_GENERATION_RESOLUTION["LOW"] = "1K";
|
|
7
|
+
IMAGE_GENERATION_RESOLUTION["MEDIUM"] = "2K";
|
|
8
|
+
IMAGE_GENERATION_RESOLUTION["HIGH"] = "4K";
|
|
9
|
+
})(IMAGE_GENERATION_RESOLUTION || (exports.IMAGE_GENERATION_RESOLUTION = IMAGE_GENERATION_RESOLUTION = {}));
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./image-generation-model-strategy.enum"), exports);
|
|
18
|
+
__exportStar(require("./image-generation-resolution.enum"), exports);
|
|
19
|
+
__exportStar(require("./image-generation-models.enum"), exports);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./enums"), exports);
|
|
18
|
+
__exportStar(require("./models"), exports);
|
|
19
|
+
__exportStar(require("./commands"), exports);
|
|
20
|
+
__exportStar(require("./queries"), exports);
|
|
21
|
+
__exportStar(require("./routes"), exports);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ImageGenerationConfigSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const image_generation_model_schema_1 = require("./image-generation-model.schema");
|
|
6
|
+
const image_generation_preset_schema_1 = require("./image-generation-preset.schema");
|
|
7
|
+
const ai_vendor_1 = require("../../ai-vendor");
|
|
8
|
+
exports.ImageGenerationConfigSchema = zod_1.z.object({
|
|
9
|
+
vendors: zod_1.z.array(ai_vendor_1.AiVendorSchema),
|
|
10
|
+
models: zod_1.z.array(image_generation_model_schema_1.ImageGenerationModelSchema),
|
|
11
|
+
presets: zod_1.z.array(image_generation_preset_schema_1.ImageGenerationPresetSchema),
|
|
12
|
+
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ImageGenerationJobSchema = exports.ImageGenerationJobParamsSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const tools_1 = require("../../tools");
|
|
6
|
+
const common_1 = require("../../common");
|
|
7
|
+
const enums_1 = require("../enums");
|
|
8
|
+
exports.ImageGenerationJobParamsSchema = zod_1.z.object({
|
|
9
|
+
aspectRatio: zod_1.z.string(),
|
|
10
|
+
attachedFiles: zod_1.z.array(common_1.AttachedFileSchema),
|
|
11
|
+
enhancePrompt: zod_1.z.boolean(),
|
|
12
|
+
resolution: zod_1.z.nativeEnum(enums_1.IMAGE_GENERATION_RESOLUTION).optional(),
|
|
13
|
+
});
|
|
14
|
+
exports.ImageGenerationJobSchema = zod_1.z.object({
|
|
15
|
+
uuid: zod_1.z.string(),
|
|
16
|
+
prompt: zod_1.z.string(),
|
|
17
|
+
title: zod_1.z.string(),
|
|
18
|
+
status: zod_1.z.nativeEnum(tools_1.JOB_STATUS),
|
|
19
|
+
error: zod_1.z.string().nullable(),
|
|
20
|
+
price: zod_1.z.number(),
|
|
21
|
+
reaction: zod_1.z.nativeEnum(common_1.USER_REACTION).nullable(),
|
|
22
|
+
dislikeReason: zod_1.z.string().nullable(),
|
|
23
|
+
externalId: zod_1.z.string().nullable(),
|
|
24
|
+
params: exports.ImageGenerationJobParamsSchema,
|
|
25
|
+
output: zod_1.z.array(zod_1.z.string()),
|
|
26
|
+
presetId: zod_1.z.string().nullable().optional(),
|
|
27
|
+
modelId: zod_1.z.string(),
|
|
28
|
+
attempts: zod_1.z.array(zod_1.z.any()),
|
|
29
|
+
userId: zod_1.z.string().nullable().optional(),
|
|
30
|
+
unregisteredUserId: zod_1.z.string().nullable().optional(),
|
|
31
|
+
isDeleted: zod_1.z.boolean(),
|
|
32
|
+
internalError: zod_1.z.string().nullable(),
|
|
33
|
+
createdAt: zod_1.z.date(),
|
|
34
|
+
updatedAt: zod_1.z.date(),
|
|
35
|
+
});
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ImageGenerationModelSchema = exports.ImageModelPricingRulesSchema = exports.ImageModelPricingRuleConditionSchema = exports.ImageGenerationModelParamsSchema = exports.ImageGenerationRequestParamsSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const common_1 = require("../../common");
|
|
6
|
+
const enums_1 = require("../enums");
|
|
7
|
+
exports.ImageGenerationRequestParamsSchema = zod_1.z.object({
|
|
8
|
+
aspectRatio: zod_1.z.string(),
|
|
9
|
+
attachedFiles: zod_1.z.array(common_1.AttachedFileSchema),
|
|
10
|
+
enhancePrompt: zod_1.z.boolean(),
|
|
11
|
+
resolution: zod_1.z.nativeEnum(enums_1.IMAGE_GENERATION_RESOLUTION).optional(),
|
|
12
|
+
});
|
|
13
|
+
exports.ImageGenerationModelParamsSchema = zod_1.z.object({
|
|
14
|
+
aspectRatio: zod_1.z.record(zod_1.z.string(), zod_1.z.object({
|
|
15
|
+
width: zod_1.z.number(),
|
|
16
|
+
height: zod_1.z.number(),
|
|
17
|
+
})),
|
|
18
|
+
quality: zod_1.z.string().optional(),
|
|
19
|
+
resolution: zod_1.z
|
|
20
|
+
.object({
|
|
21
|
+
options: zod_1.z.array(zod_1.z.nativeEnum(enums_1.IMAGE_GENERATION_RESOLUTION)),
|
|
22
|
+
})
|
|
23
|
+
.optional(),
|
|
24
|
+
});
|
|
25
|
+
exports.ImageModelPricingRuleConditionSchema = zod_1.z.object({
|
|
26
|
+
resolution: zod_1.z.string().optional(),
|
|
27
|
+
withoutSub: zod_1.z.boolean().optional(),
|
|
28
|
+
});
|
|
29
|
+
exports.ImageModelPricingRulesSchema = zod_1.z.array(zod_1.z.object({
|
|
30
|
+
condition: exports.ImageModelPricingRuleConditionSchema,
|
|
31
|
+
value: zod_1.z.number(),
|
|
32
|
+
}));
|
|
33
|
+
exports.ImageGenerationModelSchema = zod_1.z.object({
|
|
34
|
+
uuid: zod_1.z.string(),
|
|
35
|
+
title: zod_1.z.string(),
|
|
36
|
+
description: zod_1.z.string(),
|
|
37
|
+
aiModel: zod_1.z.string(),
|
|
38
|
+
price: zod_1.z.number(),
|
|
39
|
+
order: zod_1.z.number(),
|
|
40
|
+
params: exports.ImageGenerationModelParamsSchema,
|
|
41
|
+
strategy: zod_1.z.nativeEnum(enums_1.IMAGE_GENERATION_MODEL_STRATEGY),
|
|
42
|
+
status: zod_1.z.nativeEnum(common_1.TOOL_MODEL_STATUS),
|
|
43
|
+
maxPromptLength: zod_1.z.number(),
|
|
44
|
+
iconVariants: common_1.IconVariantsSchema,
|
|
45
|
+
supportsImageAttachment: zod_1.z.boolean(),
|
|
46
|
+
maxAttachedImages: zod_1.z.number(),
|
|
47
|
+
vendorId: zod_1.z.string().uuid(),
|
|
48
|
+
pricingRules: exports.ImageModelPricingRulesSchema,
|
|
49
|
+
createdAt: zod_1.z.date(),
|
|
50
|
+
updatedAt: zod_1.z.date(),
|
|
51
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ImageGenerationPresetSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.ImageGenerationPresetSchema = zod_1.z.object({
|
|
6
|
+
uuid: zod_1.z.string().uuid(),
|
|
7
|
+
title: zod_1.z.string(),
|
|
8
|
+
prompt: zod_1.z.string(),
|
|
9
|
+
sample: zod_1.z.string(),
|
|
10
|
+
order: zod_1.z.number(),
|
|
11
|
+
createdAt: zod_1.z.date(),
|
|
12
|
+
updatedAt: zod_1.z.date(),
|
|
13
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./image-generation-job.schema"), exports);
|
|
18
|
+
__exportStar(require("./image-generation-model.schema"), exports);
|
|
19
|
+
__exportStar(require("./image-generation-preset.schema"), exports);
|
|
20
|
+
__exportStar(require("./image-generation-config.schema"), exports);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FindImageGenerationJobByIdQuery = 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 FindImageGenerationJobByIdQuery;
|
|
8
|
+
(function (FindImageGenerationJobByIdQuery) {
|
|
9
|
+
FindImageGenerationJobByIdQuery.RequestSchema = zod_1.z
|
|
10
|
+
.object({
|
|
11
|
+
uuid: zod_1.z.string(),
|
|
12
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
|
+
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
|
+
});
|
|
18
|
+
FindImageGenerationJobByIdQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.ImageGenerationJobSchema);
|
|
19
|
+
})(FindImageGenerationJobByIdQuery || (exports.FindImageGenerationJobByIdQuery = FindImageGenerationJobByIdQuery = {}));
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FindImageGenerationJobsQuery = 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 FindImageGenerationJobsQuery;
|
|
8
|
+
(function (FindImageGenerationJobsQuery) {
|
|
9
|
+
FindImageGenerationJobsQuery.RequestSchema = zod_1.z
|
|
10
|
+
.object({
|
|
11
|
+
userId: zod_1.z.string().uuid().optional(),
|
|
12
|
+
unregisteredUserId: zod_1.z.string().uuid().optional(),
|
|
13
|
+
title: zod_1.z.string().optional(),
|
|
14
|
+
limit: zod_1.z.coerce.number().min(1).optional(),
|
|
15
|
+
offset: zod_1.z.coerce.number().min(0).default(0).optional(),
|
|
16
|
+
})
|
|
17
|
+
.refine((data) => {
|
|
18
|
+
return Boolean(data.userId) !== Boolean(data.unregisteredUserId);
|
|
19
|
+
}, {
|
|
20
|
+
message: 'At least userId or unregisteredUserId must be present',
|
|
21
|
+
path: ['userId', 'unregisteredUserId'],
|
|
22
|
+
});
|
|
23
|
+
FindImageGenerationJobsQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(zod_1.z.object({
|
|
24
|
+
data: zod_1.z.array(models_1.ImageGenerationJobSchema),
|
|
25
|
+
page: zod_1.z.number(),
|
|
26
|
+
totalPages: zod_1.z.number(),
|
|
27
|
+
}));
|
|
28
|
+
})(FindImageGenerationJobsQuery || (exports.FindImageGenerationJobsQuery = FindImageGenerationJobsQuery = {}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetImageGenerationConfigQuery = 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 GetImageGenerationConfigQuery;
|
|
8
|
+
(function (GetImageGenerationConfigQuery) {
|
|
9
|
+
GetImageGenerationConfigQuery.RequestSchema = zod_1.z.object({});
|
|
10
|
+
GetImageGenerationConfigQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.ImageGenerationConfigSchema);
|
|
11
|
+
})(GetImageGenerationConfigQuery || (exports.GetImageGenerationConfigQuery = GetImageGenerationConfigQuery = {}));
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./get-image-generation-config.query"), exports);
|
|
18
|
+
__exportStar(require("./find-image-generation-job-by-id.query"), exports);
|
|
19
|
+
__exportStar(require("./find-image-generation-jobs.query"), exports);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IMAGE_GENERATION_AMQP_ROUTES = void 0;
|
|
4
|
+
exports.IMAGE_GENERATION_AMQP_ROUTES = {
|
|
5
|
+
EXECUTE: 'tools.image-generation.execute.rpc',
|
|
6
|
+
CONFIG: 'tools.image-generation.config.rpc',
|
|
7
|
+
FORWARD_JOB: 'tools.image-generation.jobs.forward.rpc',
|
|
8
|
+
GET_JOB: 'tools.image-generation.jobs.get.rpc',
|
|
9
|
+
LIST_JOBS: 'tools.image-generation.jobs.list.rpc',
|
|
10
|
+
SET_REACTION: 'tools.image-generation.jobs.set-reaction.rpc',
|
|
11
|
+
UPDATE_TITLE: 'tools.image-generation.jobs.update-title.rpc',
|
|
12
|
+
SOFT_DELETE: 'tools.image-generation.jobs.soft-delete.rpc',
|
|
13
|
+
SOFT_DELETE_ALL: 'tools.image-generation.jobs.soft-delete-all.rpc',
|
|
14
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IMAGE_GENERATION_ROUTES = exports.IMAGE_GENERATION_CONTROLLER = void 0;
|
|
4
|
+
exports.IMAGE_GENERATION_CONTROLLER = 'image-generation';
|
|
5
|
+
exports.IMAGE_GENERATION_ROUTES = {
|
|
6
|
+
KIE_MIDJOURNEY_CALLBACK: 'kie/midjourney/callback',
|
|
7
|
+
KIE_NANO_BANANA_CALLBACK: 'kie/nano-banana/callback',
|
|
8
|
+
KIE_FLUX_CALLBACK: 'kie/flux/callback',
|
|
9
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./image-generation.amqp.routes"), exports);
|
|
18
|
+
__exportStar(require("./image-generation.http.routes"), exports);
|
package/build/index.js
CHANGED
|
@@ -46,9 +46,11 @@ __exportStar(require("./language"), exports);
|
|
|
46
46
|
__exportStar(require("./video"), exports);
|
|
47
47
|
__exportStar(require("./writer"), exports);
|
|
48
48
|
__exportStar(require("./image-editor"), exports);
|
|
49
|
+
__exportStar(require("./image-generation"), exports);
|
|
49
50
|
__exportStar(require("./video-editor"), exports);
|
|
50
51
|
__exportStar(require("./music"), exports);
|
|
51
52
|
__exportStar(require("./ai-proxy"), exports);
|
|
53
|
+
__exportStar(require("./ai-vendor"), exports);
|
|
52
54
|
const common = __importStar(require("./common"));
|
|
53
55
|
const paraphrase = __importStar(require("./paraphrase"));
|
|
54
56
|
const tools = __importStar(require("./tools"));
|
|
@@ -59,8 +61,10 @@ const language = __importStar(require("./language"));
|
|
|
59
61
|
const video = __importStar(require("./video"));
|
|
60
62
|
const writer = __importStar(require("./writer"));
|
|
61
63
|
const imageEditor = __importStar(require("./image-editor"));
|
|
64
|
+
const imageGeneration = __importStar(require("./image-generation"));
|
|
62
65
|
const videoEditor = __importStar(require("./video-editor"));
|
|
63
66
|
const music = __importStar(require("./music"));
|
|
67
|
+
const aiVendor = __importStar(require("./ai-vendor"));
|
|
64
68
|
var ToolService;
|
|
65
69
|
(function (ToolService) {
|
|
66
70
|
ToolService.Common = common;
|
|
@@ -73,6 +77,8 @@ var ToolService;
|
|
|
73
77
|
ToolService.Video = video;
|
|
74
78
|
ToolService.Writer = writer;
|
|
75
79
|
ToolService.ImageEditor = imageEditor;
|
|
80
|
+
ToolService.ImageGeneration = imageGeneration;
|
|
76
81
|
ToolService.VideoEditor = videoEditor;
|
|
77
82
|
ToolService.Music = music;
|
|
83
|
+
ToolService.AiVendor = aiVendor;
|
|
78
84
|
})(ToolService || (exports.ToolService = ToolService = {}));
|
|
@@ -22,3 +22,4 @@ __exportStar(require("./generate-music.command"), exports);
|
|
|
22
22
|
__exportStar(require("./update-music-job-title.command"), exports);
|
|
23
23
|
__exportStar(require("./convert-to-wav.command"), exports);
|
|
24
24
|
__exportStar(require("./generate-lyrics.command"), exports);
|
|
25
|
+
__exportStar(require("./music-model"), exports);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetMusicModelByUuidCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../models");
|
|
6
|
+
const common_1 = require("../../../common");
|
|
7
|
+
var GetMusicModelByUuidCommand;
|
|
8
|
+
(function (GetMusicModelByUuidCommand) {
|
|
9
|
+
GetMusicModelByUuidCommand.RequestSchema = zod_1.z.object({
|
|
10
|
+
uuid: zod_1.z.string().uuid(),
|
|
11
|
+
});
|
|
12
|
+
GetMusicModelByUuidCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.MusicModelSchema);
|
|
13
|
+
})(GetMusicModelByUuidCommand || (exports.GetMusicModelByUuidCommand = GetMusicModelByUuidCommand = {}));
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./get-music-model-by-uuid.command"), exports);
|
|
@@ -11,6 +11,8 @@ var RetryMusicJobCommand;
|
|
|
11
11
|
userBalance: zod_1.z.number(),
|
|
12
12
|
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
13
|
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
14
|
+
modelId: zod_1.z.string().uuid().optional(),
|
|
15
|
+
params: music_job_schema_1.MusicJobParamsSchema.optional(),
|
|
14
16
|
});
|
|
15
17
|
RetryMusicJobCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(music_job_schema_1.MusicJobSchema);
|
|
16
18
|
})(RetryMusicJobCommand || (exports.RetryMusicJobCommand = RetryMusicJobCommand = {}));
|
|
@@ -7,11 +7,21 @@ const music_job_schema_1 = require("../models/music-job.schema");
|
|
|
7
7
|
const common_1 = require("../../common");
|
|
8
8
|
var SetReactionToMusicJobCommand;
|
|
9
9
|
(function (SetReactionToMusicJobCommand) {
|
|
10
|
-
SetReactionToMusicJobCommand.RequestSchema = zod_1.z
|
|
10
|
+
SetReactionToMusicJobCommand.RequestSchema = zod_1.z
|
|
11
|
+
.object({
|
|
11
12
|
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
12
13
|
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
|
-
uuid: zod_1.z.string(),
|
|
14
|
+
uuid: zod_1.z.string().uuid(),
|
|
14
15
|
reaction: zod_1.z.nativeEnum(common_1.USER_REACTION).nullable(),
|
|
16
|
+
dislikeReason: zod_1.z.string().nullable().default(null),
|
|
17
|
+
})
|
|
18
|
+
.refine((data) => {
|
|
19
|
+
if (data.reaction !== common_1.USER_REACTION.DISLIKED && data.dislikeReason) {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
return true;
|
|
23
|
+
}, {
|
|
24
|
+
message: 'Dislike reason is not allowed when reaction is not disliked',
|
|
15
25
|
});
|
|
16
26
|
SetReactionToMusicJobCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(music_job_schema_1.MusicJobSchema);
|
|
17
27
|
})(SetReactionToMusicJobCommand || (exports.SetReactionToMusicJobCommand = SetReactionToMusicJobCommand = {}));
|
|
@@ -34,6 +34,7 @@ exports.MusicJobSchema = zod_1.z.object({
|
|
|
34
34
|
uuid: zod_1.z.string(),
|
|
35
35
|
prompt: zod_1.z.string(),
|
|
36
36
|
reaction: zod_1.z.nativeEnum(common_1.USER_REACTION).nullable(),
|
|
37
|
+
dislikeReason: zod_1.z.string().nullable(),
|
|
37
38
|
externalId: zod_1.z.string().nullable(),
|
|
38
39
|
title: zod_1.z.string(),
|
|
39
40
|
status: zod_1.z.nativeEnum(tools_1.JOB_STATUS),
|
|
@@ -8,6 +8,7 @@ exports.MusicTrackSchema = zod_1.z.object({
|
|
|
8
8
|
audioId: zod_1.z.string(),
|
|
9
9
|
audioUrl: zod_1.z.string(),
|
|
10
10
|
coverUrl: zod_1.z.string(),
|
|
11
|
+
prompt: zod_1.z.string().nullable(),
|
|
11
12
|
tags: zod_1.z.string(),
|
|
12
13
|
duration: zod_1.z.number(),
|
|
13
14
|
genJobId: zod_1.z.string().nullable().optional(),
|
|
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./music.amqp.routes"), exports);
|
|
18
18
|
__exportStar(require("./music.http.routes"), exports);
|
|
19
|
+
__exportStar(require("./music-model.amqp.routes"), exports);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeleteAllParaphraseJobsCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
var DeleteAllParaphraseJobsCommand;
|
|
7
|
+
(function (DeleteAllParaphraseJobsCommand) {
|
|
8
|
+
DeleteAllParaphraseJobsCommand.RequestSchema = zod_1.z.object({
|
|
9
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
10
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
11
|
+
});
|
|
12
|
+
DeleteAllParaphraseJobsCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(zod_1.z.boolean());
|
|
13
|
+
})(DeleteAllParaphraseJobsCommand || (exports.DeleteAllParaphraseJobsCommand = DeleteAllParaphraseJobsCommand = {}));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeleteParaphraseJobByUuidCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
var DeleteParaphraseJobByUuidCommand;
|
|
7
|
+
(function (DeleteParaphraseJobByUuidCommand) {
|
|
8
|
+
DeleteParaphraseJobByUuidCommand.RequestSchema = zod_1.z.object({
|
|
9
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
10
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
11
|
+
uuid: zod_1.z.string(),
|
|
12
|
+
});
|
|
13
|
+
DeleteParaphraseJobByUuidCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(zod_1.z.boolean());
|
|
14
|
+
})(DeleteParaphraseJobByUuidCommand || (exports.DeleteParaphraseJobByUuidCommand = DeleteParaphraseJobByUuidCommand = {}));
|
|
@@ -15,3 +15,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./paraphrase.command"), exports);
|
|
18
|
+
__exportStar(require("./delete-paraphrase-job-by-uuid.command"), exports);
|
|
19
|
+
__exportStar(require("./delete-all-paraphrase-jobs.command"), exports);
|
|
20
|
+
__exportStar(require("./set-reaction-to-paraphrase-job.command"), exports);
|
|
21
|
+
__exportStar(require("./update-paraphrase-job-title.command"), exports);
|
|
22
|
+
__exportStar(require("./retry-paraphrase-job.command"), exports);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RetryParaphraseJobCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
const paraphrase_job_schema_1 = require("../models/paraphrase-job.schema");
|
|
7
|
+
var RetryParaphraseJobCommand;
|
|
8
|
+
(function (RetryParaphraseJobCommand) {
|
|
9
|
+
RetryParaphraseJobCommand.RequestSchema = zod_1.z.object({
|
|
10
|
+
uuid: zod_1.z.string().uuid(),
|
|
11
|
+
userBalance: zod_1.z.number(),
|
|
12
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
14
|
+
});
|
|
15
|
+
RetryParaphraseJobCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(paraphrase_job_schema_1.ParaphraseJobSchema);
|
|
16
|
+
})(RetryParaphraseJobCommand || (exports.RetryParaphraseJobCommand = RetryParaphraseJobCommand = {}));
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SetReactionToParaphraseJobCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
const paraphrase_job_schema_1 = require("../models/paraphrase-job.schema");
|
|
7
|
+
const common_1 = require("../../common");
|
|
8
|
+
var SetReactionToParaphraseJobCommand;
|
|
9
|
+
(function (SetReactionToParaphraseJobCommand) {
|
|
10
|
+
SetReactionToParaphraseJobCommand.RequestSchema = zod_1.z
|
|
11
|
+
.object({
|
|
12
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
14
|
+
uuid: zod_1.z.string().uuid(),
|
|
15
|
+
reaction: zod_1.z.nativeEnum(common_1.USER_REACTION).nullable(),
|
|
16
|
+
dislikeReason: zod_1.z.string().nullable().default(null),
|
|
17
|
+
})
|
|
18
|
+
.refine((data) => {
|
|
19
|
+
if (data.reaction !== common_1.USER_REACTION.DISLIKED && data.dislikeReason) {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
return true;
|
|
23
|
+
}, {
|
|
24
|
+
message: 'Dislike reason is not allowed when reaction is not disliked',
|
|
25
|
+
});
|
|
26
|
+
SetReactionToParaphraseJobCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(paraphrase_job_schema_1.ParaphraseJobSchema);
|
|
27
|
+
})(SetReactionToParaphraseJobCommand || (exports.SetReactionToParaphraseJobCommand = SetReactionToParaphraseJobCommand = {}));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateParaphraseJobTitleCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
const paraphrase_job_schema_1 = require("../models/paraphrase-job.schema");
|
|
7
|
+
var UpdateParaphraseJobTitleCommand;
|
|
8
|
+
(function (UpdateParaphraseJobTitleCommand) {
|
|
9
|
+
UpdateParaphraseJobTitleCommand.RequestSchema = zod_1.z.object({
|
|
10
|
+
uuid: zod_1.z.string().uuid(),
|
|
11
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
12
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
|
+
title: zod_1.z.string().min(1).max(40),
|
|
14
|
+
});
|
|
15
|
+
UpdateParaphraseJobTitleCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(paraphrase_job_schema_1.ParaphraseJobSchema);
|
|
16
|
+
})(UpdateParaphraseJobTitleCommand || (exports.UpdateParaphraseJobTitleCommand = UpdateParaphraseJobTitleCommand = {}));
|