@purpleschool/gptbot-tools 0.1.11 → 0.1.12-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/common/models/index.js +1 -0
- package/build/common/models/locale.schema.js +9 -0
- package/build/image-editor/commands/image-editor-model/get-image-editor-model-by-uuid.command.js +1 -0
- package/build/image-editor/queries/get-image-editor-config.query.js +3 -2
- package/build/image-generation/commands/execute-image-generation.command.js +2 -2
- package/build/image-generation/commands/image-generation-model/get-image-generation-model-by-uuid.command.js +1 -0
- package/build/image-generation/models/image-generation-job.schema.js +3 -1
- package/build/image-generation/queries/find-image-generation-jobs.query.js +2 -2
- package/build/image-generation/queries/get-image-generation-config.query.js +3 -4
- package/build/interior-design/commands/interior-design-model/get-interior-design-model-by-uuid.command.js +1 -0
- package/build/interior-design/queries/get-interior-design-config.query.js +3 -2
- package/build/marketplace-card/queries/get-marketplace-card-config.query.js +1 -2
- package/build/music/commands/music-model/get-music-model-by-uuid.command.js +1 -0
- package/build/music/queries/get-music-config.query.js +3 -2
- package/build/paraphrase/queries/get-paraphrase-tool-config.query.js +3 -2
- package/build/presentation/commands/create-presentation.command.js +0 -3
- package/build/presentation/commands/get-presentation-slides-generation-price.command.js +0 -1
- package/build/presentation/enums/index.js +0 -1
- package/build/presentation/models/index.js +0 -1
- package/build/presentation/models/presentation-template.schema.js +0 -1
- package/build/presentation/models/presentation.schema.js +0 -4
- package/build/presentation/models/slide-content-edit.schema.js +6 -12
- package/build/presentation/models/slide-content.schema.js +12 -16
- package/build/presentation/queries/get-presentation-config.query.js +1 -0
- package/build/solving-edu-task/queries/get-solving-edu-task-config.query.js +1 -2
- package/build/spell-corrector/queries/get-spell-corrector-tool-config.query.js +3 -2
- package/build/stt/queries/get-stt-config.query.js +3 -2
- package/build/tools/enums/index.js +0 -1
- package/build/tools/events/tool-job-complete.event.js +2 -1
- package/build/tools/queries/find-all-tools.query.js +1 -0
- package/build/tools/queries/get-global-tools-config.query.js +3 -2
- package/build/tools/queries/get-tools-with-configs.query.js +3 -2
- package/build/video/commands/video-model/get-video-model-by-uuid.command.js +1 -0
- package/build/video/queries/get-video-config.query.js +3 -2
- package/build/video-editor/commands/video-editor-model/get-video-editor-model.command.js +1 -0
- package/build/video-editor/queries/get-video-editor-config.query.js +3 -4
- package/build/writer/queries/get-writer-config.query.js +1 -0
- package/common/models/index.ts +1 -0
- package/common/models/locale.schema.ts +11 -0
- package/image-editor/commands/image-editor-model/get-image-editor-model-by-uuid.command.ts +2 -1
- package/image-editor/queries/get-image-editor-config.query.ts +4 -1
- package/image-generation/commands/execute-image-generation.command.ts +2 -2
- package/image-generation/commands/image-generation-model/get-image-generation-model-by-uuid.command.ts +2 -1
- package/image-generation/models/image-generation-job.schema.ts +4 -2
- package/image-generation/queries/find-image-generation-jobs.query.ts +2 -2
- package/image-generation/queries/get-image-generation-config.query.ts +2 -2
- package/interior-design/commands/interior-design-model/get-interior-design-model-by-uuid.command.ts +2 -1
- package/interior-design/queries/get-interior-design-config.query.ts +4 -1
- package/marketplace-card/queries/get-marketplace-card-config.query.ts +2 -2
- package/music/commands/music-model/get-music-model-by-uuid.command.ts +2 -1
- package/music/queries/get-music-config.query.ts +4 -1
- package/package.json +2 -1
- package/paraphrase/queries/get-paraphrase-tool-config.query.ts +4 -1
- package/presentation/commands/create-presentation.command.ts +1 -4
- package/presentation/commands/get-presentation-slides-generation-price.command.ts +0 -1
- package/presentation/enums/index.ts +0 -1
- package/presentation/models/index.ts +0 -1
- package/presentation/models/presentation-template.schema.ts +0 -1
- package/presentation/models/presentation.schema.ts +1 -5
- package/presentation/models/slide-content-edit.schema.ts +12 -18
- package/presentation/models/slide-content.schema.ts +21 -25
- package/presentation/queries/get-presentation-config.query.ts +4 -1
- package/solving-edu-task/queries/get-solving-edu-task-config.query.ts +2 -2
- package/spell-corrector/queries/get-spell-corrector-tool-config.query.ts +4 -1
- package/stt/queries/get-stt-config.query.ts +4 -1
- package/tools/enums/index.ts +0 -1
- package/tools/events/tool-job-complete.event.ts +3 -2
- package/tools/queries/find-all-tools.query.ts +4 -1
- package/tools/queries/get-global-tools-config.query.ts +4 -1
- package/tools/queries/get-tools-with-configs.query.ts +4 -1
- package/video/commands/video-model/get-video-model-by-uuid.command.ts +2 -1
- package/video/queries/get-video-config.query.ts +4 -1
- package/video-editor/commands/video-editor-model/get-video-editor-model.command.ts +2 -1
- package/video-editor/queries/get-video-editor-config.query.ts +2 -2
- package/writer/queries/get-writer-config.query.ts +4 -1
- package/build/presentation/enums/presentation-target-audience.enum.js +0 -10
- package/build/presentation/models/presentation-title-page.schema.js +0 -9
- package/build/tools/enums/job-request-origin.enum.js +0 -8
- package/presentation/enums/presentation-target-audience.enum.ts +0 -6
- package/presentation/models/presentation-title-page.schema.ts +0 -9
- package/tools/enums/job-request-origin.enum.ts +0 -4
|
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./command-response.schema"), exports);
|
|
18
18
|
__exportStar(require("./icon-variants.schema"), exports);
|
|
19
19
|
__exportStar(require("./attached-file.schema"), exports);
|
|
20
|
+
__exportStar(require("./locale.schema"), exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LocaleRequestSchema = exports.LocaleSchema = void 0;
|
|
4
|
+
const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
exports.LocaleSchema = zod_1.z.nativeEnum(rugpt_lib_common_1.LOCALE);
|
|
7
|
+
exports.LocaleRequestSchema = zod_1.z.object({
|
|
8
|
+
locale: exports.LocaleSchema,
|
|
9
|
+
});
|
package/build/image-editor/commands/image-editor-model/get-image-editor-model-by-uuid.command.js
CHANGED
|
@@ -8,6 +8,7 @@ var GetImageEditorModelByUuidCommand;
|
|
|
8
8
|
(function (GetImageEditorModelByUuidCommand) {
|
|
9
9
|
GetImageEditorModelByUuidCommand.RequestSchema = zod_1.z.object({
|
|
10
10
|
uuid: zod_1.z.string().uuid(),
|
|
11
|
+
locale: common_1.LocaleSchema,
|
|
11
12
|
});
|
|
12
13
|
GetImageEditorModelByUuidCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.ImageEditorModelSchema);
|
|
13
14
|
})(GetImageEditorModelByUuidCommand || (exports.GetImageEditorModelByUuidCommand = GetImageEditorModelByUuidCommand = {}));
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetImageEditorConfigQuery = void 0;
|
|
4
|
-
const
|
|
4
|
+
const common_1 = require("../../common");
|
|
5
5
|
const models_1 = require("../models");
|
|
6
6
|
var GetImageEditorConfigQuery;
|
|
7
7
|
(function (GetImageEditorConfigQuery) {
|
|
8
|
-
GetImageEditorConfigQuery.
|
|
8
|
+
GetImageEditorConfigQuery.RequestSchema = common_1.LocaleRequestSchema;
|
|
9
|
+
GetImageEditorConfigQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.ImageEditorConfigSchema);
|
|
9
10
|
})(GetImageEditorConfigQuery || (exports.GetImageEditorConfigQuery = GetImageEditorConfigQuery = {}));
|
|
@@ -3,8 +3,8 @@ 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 tools_1 = require("../../tools");
|
|
7
6
|
const models_1 = require("../models");
|
|
7
|
+
const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
|
|
8
8
|
var ExecuteImageGenerationCommand;
|
|
9
9
|
(function (ExecuteImageGenerationCommand) {
|
|
10
10
|
ExecuteImageGenerationCommand.RequestSchema = zod_1.z.object({
|
|
@@ -14,7 +14,7 @@ var ExecuteImageGenerationCommand;
|
|
|
14
14
|
modelId: zod_1.z.string().uuid(),
|
|
15
15
|
params: models_1.ImageGenerationRequestParamsSchema,
|
|
16
16
|
presetId: zod_1.z.string().uuid().nullable().optional(),
|
|
17
|
-
|
|
17
|
+
callOrigin: zod_1.z.nativeEnum(rugpt_lib_common_1.STATISTICS_CALL_ORIGIN).default(rugpt_lib_common_1.STATISTICS_CALL_ORIGIN.WEB),
|
|
18
18
|
userHasActiveSubscriptionOrProduct: zod_1.z.boolean(),
|
|
19
19
|
tokenReservationId: zod_1.z.string().uuid(),
|
|
20
20
|
precalculatedPrice: zod_1.z.number(),
|
|
@@ -8,6 +8,7 @@ var GetImageGenerationModelByUuidCommand;
|
|
|
8
8
|
(function (GetImageGenerationModelByUuidCommand) {
|
|
9
9
|
GetImageGenerationModelByUuidCommand.RequestSchema = zod_1.z.object({
|
|
10
10
|
uuid: zod_1.z.string().uuid(),
|
|
11
|
+
locale: common_1.LocaleSchema,
|
|
11
12
|
});
|
|
12
13
|
GetImageGenerationModelByUuidCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.ImageGenerationModelSchema);
|
|
13
14
|
})(GetImageGenerationModelByUuidCommand || (exports.GetImageGenerationModelByUuidCommand = GetImageGenerationModelByUuidCommand = {}));
|
|
@@ -5,6 +5,7 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const tools_1 = require("../../tools");
|
|
6
6
|
const common_1 = require("../../common");
|
|
7
7
|
const enums_1 = require("../enums");
|
|
8
|
+
const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
|
|
8
9
|
exports.ImageGenerationJobParamsSchema = zod_1.z.object({
|
|
9
10
|
aspectRatio: zod_1.z.string(),
|
|
10
11
|
attachedFiles: zod_1.z.array(common_1.AttachedFileSchema),
|
|
@@ -29,7 +30,8 @@ exports.ImageGenerationJobSchema = zod_1.z.object({
|
|
|
29
30
|
userId: zod_1.z.string().nullable().optional(),
|
|
30
31
|
unregisteredUserId: zod_1.z.string().nullable().optional(),
|
|
31
32
|
isPublished: zod_1.z.boolean(),
|
|
32
|
-
origin: zod_1.z.
|
|
33
|
+
origin: zod_1.z.string(),
|
|
34
|
+
callOrigin: zod_1.z.nativeEnum(rugpt_lib_common_1.STATISTICS_CALL_ORIGIN),
|
|
33
35
|
postId: zod_1.z.string().nullable(),
|
|
34
36
|
isDeleted: zod_1.z.boolean(),
|
|
35
37
|
internalError: zod_1.z.string().nullable(),
|
|
@@ -4,7 +4,7 @@ exports.FindImageGenerationJobsQuery = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
6
|
const models_1 = require("../models");
|
|
7
|
-
const
|
|
7
|
+
const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
|
|
8
8
|
var FindImageGenerationJobsQuery;
|
|
9
9
|
(function (FindImageGenerationJobsQuery) {
|
|
10
10
|
FindImageGenerationJobsQuery.RequestSchema = zod_1.z
|
|
@@ -14,7 +14,7 @@ var FindImageGenerationJobsQuery;
|
|
|
14
14
|
title: zod_1.z.string().optional(),
|
|
15
15
|
limit: zod_1.z.coerce.number().min(1).optional(),
|
|
16
16
|
offset: zod_1.z.coerce.number().min(0).default(0).optional(),
|
|
17
|
-
|
|
17
|
+
callOrigin: zod_1.z.nativeEnum(rugpt_lib_common_1.STATISTICS_CALL_ORIGIN).optional(),
|
|
18
18
|
})
|
|
19
19
|
.refine((data) => {
|
|
20
20
|
return Boolean(data.userId) !== Boolean(data.unregisteredUserId);
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetImageGenerationConfigQuery = void 0;
|
|
4
|
-
const
|
|
5
|
-
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
4
|
+
const common_1 = require("../../common");
|
|
6
5
|
const models_1 = require("../models");
|
|
7
6
|
var GetImageGenerationConfigQuery;
|
|
8
7
|
(function (GetImageGenerationConfigQuery) {
|
|
9
|
-
GetImageGenerationConfigQuery.RequestSchema =
|
|
10
|
-
GetImageGenerationConfigQuery.ResponseSchema = (0,
|
|
8
|
+
GetImageGenerationConfigQuery.RequestSchema = common_1.LocaleRequestSchema;
|
|
9
|
+
GetImageGenerationConfigQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.ImageGenerationConfigSchema);
|
|
11
10
|
})(GetImageGenerationConfigQuery || (exports.GetImageGenerationConfigQuery = GetImageGenerationConfigQuery = {}));
|
|
@@ -8,6 +8,7 @@ var GetInteriorDesignModelByUuidCommand;
|
|
|
8
8
|
(function (GetInteriorDesignModelByUuidCommand) {
|
|
9
9
|
GetInteriorDesignModelByUuidCommand.RequestSchema = zod_1.z.object({
|
|
10
10
|
uuid: zod_1.z.string().uuid(),
|
|
11
|
+
locale: common_1.LocaleSchema,
|
|
11
12
|
});
|
|
12
13
|
GetInteriorDesignModelByUuidCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.InteriorDesignModelSchema);
|
|
13
14
|
})(GetInteriorDesignModelByUuidCommand || (exports.GetInteriorDesignModelByUuidCommand = GetInteriorDesignModelByUuidCommand = {}));
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetInteriorDesignConfigQuery = void 0;
|
|
4
|
-
const
|
|
4
|
+
const common_1 = require("../../common");
|
|
5
5
|
const interior_design_config_schema_1 = require("../models/interior-design-config.schema");
|
|
6
6
|
var GetInteriorDesignConfigQuery;
|
|
7
7
|
(function (GetInteriorDesignConfigQuery) {
|
|
8
|
-
GetInteriorDesignConfigQuery.
|
|
8
|
+
GetInteriorDesignConfigQuery.RequestSchema = common_1.LocaleRequestSchema;
|
|
9
|
+
GetInteriorDesignConfigQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(interior_design_config_schema_1.InteriorDesignConfigSchema);
|
|
9
10
|
})(GetInteriorDesignConfigQuery || (exports.GetInteriorDesignConfigQuery = GetInteriorDesignConfigQuery = {}));
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetMarketplaceCardConfigQuery = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
4
|
const common_1 = require("../../common");
|
|
6
5
|
const models_1 = require("../models");
|
|
7
6
|
var GetMarketplaceCardConfigQuery;
|
|
8
7
|
(function (GetMarketplaceCardConfigQuery) {
|
|
9
|
-
GetMarketplaceCardConfigQuery.RequestSchema =
|
|
8
|
+
GetMarketplaceCardConfigQuery.RequestSchema = common_1.LocaleRequestSchema;
|
|
10
9
|
GetMarketplaceCardConfigQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.MarketplaceCardConfigSchema);
|
|
11
10
|
})(GetMarketplaceCardConfigQuery || (exports.GetMarketplaceCardConfigQuery = GetMarketplaceCardConfigQuery = {}));
|
|
@@ -8,6 +8,7 @@ var GetMusicModelByUuidCommand;
|
|
|
8
8
|
(function (GetMusicModelByUuidCommand) {
|
|
9
9
|
GetMusicModelByUuidCommand.RequestSchema = zod_1.z.object({
|
|
10
10
|
uuid: zod_1.z.string().uuid(),
|
|
11
|
+
locale: common_1.LocaleSchema,
|
|
11
12
|
});
|
|
12
13
|
GetMusicModelByUuidCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.MusicModelSchema);
|
|
13
14
|
})(GetMusicModelByUuidCommand || (exports.GetMusicModelByUuidCommand = GetMusicModelByUuidCommand = {}));
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetMusicConfigQuery = void 0;
|
|
4
|
-
const
|
|
4
|
+
const common_1 = require("../../common");
|
|
5
5
|
const models_1 = require("../models");
|
|
6
6
|
var GetMusicConfigQuery;
|
|
7
7
|
(function (GetMusicConfigQuery) {
|
|
8
|
-
GetMusicConfigQuery.
|
|
8
|
+
GetMusicConfigQuery.RequestSchema = common_1.LocaleRequestSchema;
|
|
9
|
+
GetMusicConfigQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.MusicConfigSchema);
|
|
9
10
|
})(GetMusicConfigQuery || (exports.GetMusicConfigQuery = GetMusicConfigQuery = {}));
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetParaphraseToolConfigQuery = void 0;
|
|
4
|
-
const
|
|
4
|
+
const common_1 = require("../../common");
|
|
5
5
|
const models_1 = require("../models");
|
|
6
6
|
var GetParaphraseToolConfigQuery;
|
|
7
7
|
(function (GetParaphraseToolConfigQuery) {
|
|
8
|
-
GetParaphraseToolConfigQuery.
|
|
8
|
+
GetParaphraseToolConfigQuery.RequestSchema = common_1.LocaleRequestSchema;
|
|
9
|
+
GetParaphraseToolConfigQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.ParaphraseToolConfigSchema);
|
|
9
10
|
})(GetParaphraseToolConfigQuery || (exports.GetParaphraseToolConfigQuery = GetParaphraseToolConfigQuery = {}));
|
|
@@ -4,7 +4,6 @@ exports.CreatePresentationCommand = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const common_1 = require("../../common");
|
|
6
6
|
const models_1 = require("../models");
|
|
7
|
-
const enums_1 = require("../enums");
|
|
8
7
|
var CreatePresentationCommand;
|
|
9
8
|
(function (CreatePresentationCommand) {
|
|
10
9
|
CreatePresentationCommand.RequestSchema = zod_1.z.object({
|
|
@@ -14,8 +13,6 @@ var CreatePresentationCommand;
|
|
|
14
13
|
languageId: zod_1.z.string(),
|
|
15
14
|
prompt: zod_1.z.string(),
|
|
16
15
|
slideCount: zod_1.z.number(),
|
|
17
|
-
titlePage: models_1.PresentationTitlePageSchema.optional().nullable(),
|
|
18
|
-
targetAudience: zod_1.z.nativeEnum(enums_1.PRESENTATION_TARGET_AUDIENCE).optional(),
|
|
19
16
|
});
|
|
20
17
|
CreatePresentationCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.PresentationSchema);
|
|
21
18
|
})(CreatePresentationCommand || (exports.CreatePresentationCommand = CreatePresentationCommand = {}));
|
|
@@ -7,7 +7,6 @@ var GetPresentationSlidesGenerationPriceCommand;
|
|
|
7
7
|
(function (GetPresentationSlidesGenerationPriceCommand) {
|
|
8
8
|
GetPresentationSlidesGenerationPriceCommand.RequestSchema = zod_1.z.object({
|
|
9
9
|
slideCount: zod_1.z.number().int().min(1),
|
|
10
|
-
templateId: zod_1.z.string().uuid(),
|
|
11
10
|
});
|
|
12
11
|
GetPresentationSlidesGenerationPriceCommand.ResponseDataSchema = zod_1.z.object({
|
|
13
12
|
price: zod_1.z.number(),
|
|
@@ -24,4 +24,3 @@ __exportStar(require("./slide-image-slot-action.enum"), exports);
|
|
|
24
24
|
__exportStar(require("./presentation-ai-action-call-status.enum"), exports);
|
|
25
25
|
__exportStar(require("./presentation-ai-action-type.enum"), exports);
|
|
26
26
|
__exportStar(require("./presentation-ai-action-pricing-type.enum"), exports);
|
|
27
|
-
__exportStar(require("./presentation-target-audience.enum"), exports);
|
|
@@ -24,4 +24,3 @@ __exportStar(require("./slide.schema"), exports);
|
|
|
24
24
|
__exportStar(require("./slide-image-slot.schema"), exports);
|
|
25
25
|
__exportStar(require("./slide-content.schema"), exports);
|
|
26
26
|
__exportStar(require("./presentation-ai-action.schema"), exports);
|
|
27
|
-
__exportStar(require("./presentation-title-page.schema"), exports);
|
|
@@ -6,7 +6,6 @@ const enums_1 = require("../enums");
|
|
|
6
6
|
const slide_outline_schema_1 = require("./slide-outline.schema");
|
|
7
7
|
const slide_schema_1 = require("./slide.schema");
|
|
8
8
|
const common_1 = require("../../common");
|
|
9
|
-
const presentation_title_page_schema_1 = require("./presentation-title-page.schema");
|
|
10
9
|
exports.PresentationSchema = zod_1.z.object({
|
|
11
10
|
uuid: zod_1.z.string().uuid(),
|
|
12
11
|
prompt: zod_1.z.string(),
|
|
@@ -25,8 +24,6 @@ exports.PresentationSchema = zod_1.z.object({
|
|
|
25
24
|
tokenReservationId: zod_1.z.string().nullable().optional(),
|
|
26
25
|
lastContentUpdateAt: zod_1.z.date().nullable(),
|
|
27
26
|
lastPptxExportedAt: zod_1.z.date().nullable(),
|
|
28
|
-
titlePage: presentation_title_page_schema_1.PresentationTitlePageSchema.nullable(),
|
|
29
|
-
targetAudience: zod_1.z.nativeEnum(enums_1.PRESENTATION_TARGET_AUDIENCE),
|
|
30
27
|
createdAt: zod_1.z.date(),
|
|
31
28
|
updatedAt: zod_1.z.date(),
|
|
32
29
|
});
|
|
@@ -37,5 +34,4 @@ exports.PresentationWithSlidesSchema = exports.PresentationSchema.extend({
|
|
|
37
34
|
exports.PresentationUpdateSchema = exports.PresentationSchema.pick({
|
|
38
35
|
title: true,
|
|
39
36
|
templateId: true,
|
|
40
|
-
titlePage: true,
|
|
41
37
|
}).partial();
|
|
@@ -10,24 +10,18 @@ const slide_content_schema_1 = require("./slide-content.schema");
|
|
|
10
10
|
exports.CoverSlideDataUserEditSchema = zod_1.default.object({
|
|
11
11
|
contentType: zod_1.default.literal(enums_1.SLIDE_CONTENT_TYPE.COVER),
|
|
12
12
|
title: zod_1.default.string().min(1).max(500),
|
|
13
|
-
author: zod_1.default
|
|
14
|
-
.object({
|
|
13
|
+
author: zod_1.default.object({
|
|
15
14
|
label: zod_1.default.string().min(1).max(100),
|
|
16
15
|
value: zod_1.default.string().min(1).max(200),
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
date: zod_1.default
|
|
20
|
-
.object({
|
|
16
|
+
}),
|
|
17
|
+
date: zod_1.default.object({
|
|
21
18
|
label: zod_1.default.string().min(1).max(100),
|
|
22
19
|
value: zod_1.default.string().min(1).max(200),
|
|
23
|
-
})
|
|
24
|
-
|
|
25
|
-
email: zod_1.default
|
|
26
|
-
.object({
|
|
20
|
+
}),
|
|
21
|
+
email: zod_1.default.object({
|
|
27
22
|
label: zod_1.default.string().min(1).max(100),
|
|
28
23
|
value: zod_1.default.string().min(1).max(200),
|
|
29
|
-
})
|
|
30
|
-
.optional(),
|
|
24
|
+
}),
|
|
31
25
|
version: zod_1.default.literal(1),
|
|
32
26
|
});
|
|
33
27
|
exports.ThankYouSlideDataUserEditSchema = zod_1.default.object({
|
|
@@ -34,26 +34,22 @@ exports.IconSlotSchema = zod_1.z.object({
|
|
|
34
34
|
exports.CoverSlideDataSchema = zod_1.z.object({
|
|
35
35
|
contentType: zod_1.z.literal(enums_1.SLIDE_CONTENT_TYPE.COVER),
|
|
36
36
|
title: zod_1.z.string().describe('Slide title in about 6 words').min(10).max(150),
|
|
37
|
-
author: zod_1.z
|
|
38
|
-
.object({
|
|
37
|
+
author: zod_1.z.object({
|
|
39
38
|
label: zod_1.z.string().describe('Literal "Author" in presentation\'s language'),
|
|
40
|
-
value: zod_1.z
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
39
|
+
value: zod_1.z
|
|
40
|
+
.string()
|
|
41
|
+
.describe('Literal "Author of the presentation" in presentation\'s language'),
|
|
42
|
+
}),
|
|
43
|
+
date: zod_1.z.object({
|
|
45
44
|
label: zod_1.z.string().describe('Literal "Date" in presentation\'s language'),
|
|
46
45
|
value: zod_1.z
|
|
47
46
|
.string()
|
|
48
|
-
.describe('Date
|
|
49
|
-
})
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
.
|
|
53
|
-
|
|
54
|
-
value: zod_1.z.string().describe('Email value from titlePage if provided'),
|
|
55
|
-
})
|
|
56
|
-
.optional(),
|
|
47
|
+
.describe('Date of the presentation in the "dd month yyyy" format in presentation\'s locale'),
|
|
48
|
+
}),
|
|
49
|
+
email: zod_1.z.object({
|
|
50
|
+
label: zod_1.z.string().describe('Just default word "Email"'),
|
|
51
|
+
value: zod_1.z.string().describe('Just default "email@example.com"'),
|
|
52
|
+
}),
|
|
57
53
|
version: zod_1.z.literal(1),
|
|
58
54
|
});
|
|
59
55
|
exports.ThankYouSlideDataSchema = zod_1.z.object({
|
|
@@ -5,5 +5,6 @@ const common_1 = require("../../common");
|
|
|
5
5
|
const models_1 = require("../models");
|
|
6
6
|
var GetPresentationConfigQuery;
|
|
7
7
|
(function (GetPresentationConfigQuery) {
|
|
8
|
+
GetPresentationConfigQuery.RequestSchema = common_1.LocaleRequestSchema;
|
|
8
9
|
GetPresentationConfigQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.PresentationConfigSchema);
|
|
9
10
|
})(GetPresentationConfigQuery || (exports.GetPresentationConfigQuery = GetPresentationConfigQuery = {}));
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetSolvingEduTaskConfigQuery = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
4
|
const common_1 = require("../../common");
|
|
6
5
|
const models_1 = require("../models");
|
|
7
6
|
var GetSolvingEduTaskConfigQuery;
|
|
8
7
|
(function (GetSolvingEduTaskConfigQuery) {
|
|
9
|
-
GetSolvingEduTaskConfigQuery.RequestSchema =
|
|
8
|
+
GetSolvingEduTaskConfigQuery.RequestSchema = common_1.LocaleRequestSchema;
|
|
10
9
|
GetSolvingEduTaskConfigQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.SolvingEduTaskConfigSchema);
|
|
11
10
|
})(GetSolvingEduTaskConfigQuery || (exports.GetSolvingEduTaskConfigQuery = GetSolvingEduTaskConfigQuery = {}));
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetSpellCorrectorToolConfigQuery = void 0;
|
|
4
|
-
const
|
|
4
|
+
const common_1 = require("../../common");
|
|
5
5
|
const models_1 = require("../models");
|
|
6
6
|
var GetSpellCorrectorToolConfigQuery;
|
|
7
7
|
(function (GetSpellCorrectorToolConfigQuery) {
|
|
8
|
-
GetSpellCorrectorToolConfigQuery.
|
|
8
|
+
GetSpellCorrectorToolConfigQuery.RequestSchema = common_1.LocaleRequestSchema;
|
|
9
|
+
GetSpellCorrectorToolConfigQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.SpellCorrectorToolConfigSchema);
|
|
9
10
|
})(GetSpellCorrectorToolConfigQuery || (exports.GetSpellCorrectorToolConfigQuery = GetSpellCorrectorToolConfigQuery = {}));
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetSTTConfigQuery = void 0;
|
|
4
|
-
const
|
|
4
|
+
const common_1 = require("../../common");
|
|
5
5
|
const models_1 = require("../models");
|
|
6
6
|
var GetSTTConfigQuery;
|
|
7
7
|
(function (GetSTTConfigQuery) {
|
|
8
|
-
GetSTTConfigQuery.
|
|
8
|
+
GetSTTConfigQuery.RequestSchema = common_1.LocaleRequestSchema;
|
|
9
|
+
GetSTTConfigQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.STTConfigSchema);
|
|
9
10
|
})(GetSTTConfigQuery || (exports.GetSTTConfigQuery = GetSTTConfigQuery = {}));
|
|
@@ -17,4 +17,3 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./job-status.enum"), exports);
|
|
18
18
|
__exportStar(require("./tool-type.enum"), exports);
|
|
19
19
|
__exportStar(require("./tool-content-type.enum"), exports);
|
|
20
|
-
__exportStar(require("./job-request-origin.enum"), exports);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ToolJobCompleteEvent = void 0;
|
|
4
|
+
const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
|
|
4
5
|
const enums_1 = require("../enums");
|
|
5
6
|
const models_1 = require("../models");
|
|
6
7
|
const zod_1 = require("zod");
|
|
@@ -9,7 +10,7 @@ var ToolJobCompleteEvent;
|
|
|
9
10
|
ToolJobCompleteEvent.PayloadSchema = zod_1.z.object({
|
|
10
11
|
job: models_1.ToolJobSchema.extend({
|
|
11
12
|
toolType: zod_1.z.nativeEnum(enums_1.TOOL_TYPE),
|
|
12
|
-
|
|
13
|
+
callOrigin: zod_1.z.nativeEnum(rugpt_lib_common_1.STATISTICS_CALL_ORIGIN).optional(),
|
|
13
14
|
}),
|
|
14
15
|
});
|
|
15
16
|
})(ToolJobCompleteEvent || (exports.ToolJobCompleteEvent = ToolJobCompleteEvent = {}));
|
|
@@ -6,5 +6,6 @@ const models_1 = require("../models");
|
|
|
6
6
|
const common_1 = require("../../common");
|
|
7
7
|
var FindAllToolsQuery;
|
|
8
8
|
(function (FindAllToolsQuery) {
|
|
9
|
+
FindAllToolsQuery.RequestSchema = common_1.LocaleRequestSchema;
|
|
9
10
|
FindAllToolsQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(zod_1.z.array(models_1.ToolSchema));
|
|
10
11
|
})(FindAllToolsQuery || (exports.FindAllToolsQuery = FindAllToolsQuery = {}));
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetGlobalToolsConfigQuery = void 0;
|
|
4
|
-
const
|
|
4
|
+
const common_1 = require("../../common");
|
|
5
5
|
const models_1 = require("../models");
|
|
6
6
|
var GetGlobalToolsConfigQuery;
|
|
7
7
|
(function (GetGlobalToolsConfigQuery) {
|
|
8
|
-
GetGlobalToolsConfigQuery.
|
|
8
|
+
GetGlobalToolsConfigQuery.RequestSchema = common_1.LocaleRequestSchema;
|
|
9
|
+
GetGlobalToolsConfigQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.GlobalToolsConfigSchema);
|
|
9
10
|
})(GetGlobalToolsConfigQuery || (exports.GetGlobalToolsConfigQuery = GetGlobalToolsConfigQuery = {}));
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetToolsWithConfigsQuery = void 0;
|
|
4
|
-
const
|
|
4
|
+
const common_1 = require("../../common");
|
|
5
5
|
const models_1 = require("../models");
|
|
6
6
|
var GetToolsWithConfigsQuery;
|
|
7
7
|
(function (GetToolsWithConfigsQuery) {
|
|
8
|
-
GetToolsWithConfigsQuery.
|
|
8
|
+
GetToolsWithConfigsQuery.RequestSchema = common_1.LocaleRequestSchema;
|
|
9
|
+
GetToolsWithConfigsQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.ToolsWithConfigsSchema);
|
|
9
10
|
})(GetToolsWithConfigsQuery || (exports.GetToolsWithConfigsQuery = GetToolsWithConfigsQuery = {}));
|
|
@@ -8,6 +8,7 @@ var GetVideoModelByUuidCommand;
|
|
|
8
8
|
(function (GetVideoModelByUuidCommand) {
|
|
9
9
|
GetVideoModelByUuidCommand.RequestSchema = zod_1.z.object({
|
|
10
10
|
uuid: zod_1.z.string().uuid(),
|
|
11
|
+
locale: common_1.LocaleSchema,
|
|
11
12
|
});
|
|
12
13
|
GetVideoModelByUuidCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.VideoModelSchema);
|
|
13
14
|
})(GetVideoModelByUuidCommand || (exports.GetVideoModelByUuidCommand = GetVideoModelByUuidCommand = {}));
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetVideoConfigQuery = void 0;
|
|
4
|
-
const
|
|
4
|
+
const common_1 = require("../../common");
|
|
5
5
|
const models_1 = require("../models");
|
|
6
6
|
var GetVideoConfigQuery;
|
|
7
7
|
(function (GetVideoConfigQuery) {
|
|
8
|
-
GetVideoConfigQuery.
|
|
8
|
+
GetVideoConfigQuery.RequestSchema = common_1.LocaleRequestSchema;
|
|
9
|
+
GetVideoConfigQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.VideoConfigSchema);
|
|
9
10
|
})(GetVideoConfigQuery || (exports.GetVideoConfigQuery = GetVideoConfigQuery = {}));
|
|
@@ -8,6 +8,7 @@ var GetVideoEditorModelByUuidCommand;
|
|
|
8
8
|
(function (GetVideoEditorModelByUuidCommand) {
|
|
9
9
|
GetVideoEditorModelByUuidCommand.RequestSchema = zod_1.z.object({
|
|
10
10
|
uuid: zod_1.z.string().uuid(),
|
|
11
|
+
locale: common_1.LocaleSchema,
|
|
11
12
|
});
|
|
12
13
|
GetVideoEditorModelByUuidCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.VideoEditorModelSchema);
|
|
13
14
|
})(GetVideoEditorModelByUuidCommand || (exports.GetVideoEditorModelByUuidCommand = GetVideoEditorModelByUuidCommand = {}));
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetVideoEditorConfigQuery = void 0;
|
|
4
|
-
const
|
|
5
|
-
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
4
|
+
const common_1 = require("../../common");
|
|
6
5
|
const models_1 = require("../models");
|
|
7
6
|
var GetVideoEditorConfigQuery;
|
|
8
7
|
(function (GetVideoEditorConfigQuery) {
|
|
9
|
-
GetVideoEditorConfigQuery.RequestSchema =
|
|
10
|
-
GetVideoEditorConfigQuery.ResponseSchema = (0,
|
|
8
|
+
GetVideoEditorConfigQuery.RequestSchema = common_1.LocaleRequestSchema;
|
|
9
|
+
GetVideoEditorConfigQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.VideoEditorConfigSchema);
|
|
11
10
|
})(GetVideoEditorConfigQuery || (exports.GetVideoEditorConfigQuery = GetVideoEditorConfigQuery = {}));
|
|
@@ -5,5 +5,6 @@ const common_1 = require("../../common");
|
|
|
5
5
|
const models_1 = require("../models");
|
|
6
6
|
var GetWriterConfigQuery;
|
|
7
7
|
(function (GetWriterConfigQuery) {
|
|
8
|
+
GetWriterConfigQuery.RequestSchema = common_1.LocaleRequestSchema;
|
|
8
9
|
GetWriterConfigQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.WriterConfigSchema);
|
|
9
10
|
})(GetWriterConfigQuery || (exports.GetWriterConfigQuery = GetWriterConfigQuery = {}));
|
package/common/models/index.ts
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LOCALE } from '@purpleschool/rugpt-lib-common';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
export const LocaleSchema = z.nativeEnum(LOCALE);
|
|
5
|
+
|
|
6
|
+
export const LocaleRequestSchema = z.object({
|
|
7
|
+
locale: LocaleSchema,
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export type Locale = z.infer<typeof LocaleSchema>;
|
|
11
|
+
export type LocaleRequest = z.infer<typeof LocaleRequestSchema>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ImageEditorModelSchema } from '../../models';
|
|
3
|
-
import { ICommandResponseSchema } from '../../../common';
|
|
3
|
+
import { ICommandResponseSchema, LocaleSchema } from '../../../common';
|
|
4
4
|
|
|
5
5
|
export namespace GetImageEditorModelByUuidCommand {
|
|
6
6
|
export const RequestSchema = z.object({
|
|
7
7
|
uuid: z.string().uuid(),
|
|
8
|
+
locale: LocaleSchema,
|
|
8
9
|
});
|
|
9
10
|
export type Request = z.infer<typeof RequestSchema>;
|
|
10
11
|
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ICommandResponseSchema } from '../../common
|
|
2
|
+
import { ICommandResponseSchema, LocaleRequestSchema } from '../../common';
|
|
3
3
|
import { ImageEditorConfigSchema } from '../models';
|
|
4
4
|
|
|
5
5
|
export namespace GetImageEditorConfigQuery {
|
|
6
|
+
export const RequestSchema = LocaleRequestSchema;
|
|
7
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
8
|
+
|
|
6
9
|
export const ResponseSchema = ICommandResponseSchema(ImageEditorConfigSchema);
|
|
7
10
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
8
11
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
-
import { JOB_REQUEST_ORIGIN } from '../../tools';
|
|
4
3
|
import { ImageGenerationJobSchema, ImageGenerationRequestParamsSchema } from '../models';
|
|
4
|
+
import { STATISTICS_CALL_ORIGIN } from '@purpleschool/rugpt-lib-common';
|
|
5
5
|
|
|
6
6
|
export namespace ExecuteImageGenerationCommand {
|
|
7
7
|
export const RequestSchema = z.object({
|
|
@@ -11,7 +11,7 @@ export namespace ExecuteImageGenerationCommand {
|
|
|
11
11
|
modelId: z.string().uuid(),
|
|
12
12
|
params: ImageGenerationRequestParamsSchema,
|
|
13
13
|
presetId: z.string().uuid().nullable().optional(),
|
|
14
|
-
|
|
14
|
+
callOrigin: z.nativeEnum(STATISTICS_CALL_ORIGIN).default(STATISTICS_CALL_ORIGIN.WEB),
|
|
15
15
|
userHasActiveSubscriptionOrProduct: z.boolean(),
|
|
16
16
|
tokenReservationId: z.string().uuid(),
|
|
17
17
|
precalculatedPrice: z.number(),
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ImageGenerationModelSchema } from '../../models';
|
|
3
|
-
import { ICommandResponseSchema } from '../../../common';
|
|
3
|
+
import { ICommandResponseSchema, LocaleSchema } from '../../../common';
|
|
4
4
|
|
|
5
5
|
export namespace GetImageGenerationModelByUuidCommand {
|
|
6
6
|
export const RequestSchema = z.object({
|
|
7
7
|
uuid: z.string().uuid(),
|
|
8
|
+
locale: LocaleSchema,
|
|
8
9
|
});
|
|
9
10
|
export type Request = z.infer<typeof RequestSchema>;
|
|
10
11
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { JOB_STATUS } from '../../tools';
|
|
3
3
|
import { AttachedFileSchema, USER_REACTION } from '../../common';
|
|
4
4
|
import { IMAGE_GENERATION_RESOLUTION } from '../enums';
|
|
5
|
+
import { STATISTICS_CALL_ORIGIN } from '@purpleschool/rugpt-lib-common';
|
|
5
6
|
|
|
6
7
|
export const ImageGenerationJobParamsSchema = z.object({
|
|
7
8
|
aspectRatio: z.string(),
|
|
@@ -29,7 +30,8 @@ export const ImageGenerationJobSchema = z.object({
|
|
|
29
30
|
userId: z.string().nullable().optional(),
|
|
30
31
|
unregisteredUserId: z.string().nullable().optional(),
|
|
31
32
|
isPublished: z.boolean(),
|
|
32
|
-
origin: z.
|
|
33
|
+
origin: z.string(),
|
|
34
|
+
callOrigin: z.nativeEnum(STATISTICS_CALL_ORIGIN),
|
|
33
35
|
postId: z.string().nullable(),
|
|
34
36
|
isDeleted: z.boolean(),
|
|
35
37
|
internalError: z.string().nullable(),
|