@purpleschool/gptbot-tools 0.2.18-stage-2 → 0.2.20-stage
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 +0 -1
- package/build/diagrams/commands/diagrams.command.js +0 -1
- package/build/diagrams/commands/edit-diagrams-job.command.js +0 -1
- package/build/diagrams/commands/get-diagrams-price-calculation-data.command.js +23 -0
- package/build/diagrams/commands/index.js +1 -0
- package/build/diagrams/commands/retry-diagrams-job.command.js +0 -2
- package/build/diagrams/queries/get-diagrams-config.query.js +4 -3
- package/build/diagrams/routes/diagrams.amqp.routes.js +1 -0
- package/build/html-page-builder/commands/get-html-page-builder-price-calculation-data.command.js +36 -0
- package/build/html-page-builder/commands/html-page-builder-execute.command.js +1 -12
- package/build/html-page-builder/commands/index.js +1 -1
- package/build/html-page-builder/models/html-page-builder-session.schema.js +1 -0
- package/build/html-page-builder/queries/get-html-page-builder-config.query.js +2 -1
- package/build/html-page-builder/routes/html-page-builder.amqp.routes.js +1 -1
- package/build/image-editor/commands/image-editor-model/get-image-editor-model-by-uuid.command.js +0 -1
- package/build/image-editor/commands/image-editor.command.js +0 -2
- package/build/image-editor/commands/retry-image-editor-job.command.js +0 -2
- package/build/image-editor/queries/get-image-editor-config.query.js +2 -3
- package/build/image-generation/commands/execute-image-generation.command.js +2 -4
- package/build/image-generation/commands/image-generation-model/get-image-generation-model-by-uuid.command.js +0 -1
- package/build/image-generation/commands/retry-image-generation-job.command.js +0 -2
- package/build/image-generation/models/image-generation-job.schema.js +1 -3
- package/build/image-generation/queries/find-image-generation-jobs.query.js +2 -2
- package/build/image-generation/queries/get-image-generation-config.query.js +4 -3
- package/build/interior-design/commands/get-interior-design-price.command.js +0 -1
- package/build/interior-design/commands/interior-design-model/get-interior-design-model-by-uuid.command.js +0 -1
- package/build/interior-design/commands/interior-design.command.js +0 -1
- package/build/interior-design/commands/retry-interior-design-job.command.js +0 -2
- package/build/interior-design/queries/get-interior-design-config.query.js +2 -3
- package/build/marketplace-card/commands/execute-marketplace-card.command.js +0 -1
- package/build/marketplace-card/commands/retry-marketplace-card-job.command.js +0 -1
- package/build/marketplace-card/queries/get-marketplace-card-config.query.js +2 -1
- package/build/music/commands/generate-lyrics.command.js +0 -2
- package/build/music/commands/generate-music.command.js +0 -2
- package/build/music/commands/music-model/get-music-model-by-uuid.command.js +0 -1
- package/build/music/commands/retry-music-job.command.js +0 -2
- package/build/music/queries/get-music-config.query.js +2 -3
- package/build/paraphrase/queries/get-paraphrase-tool-config.query.js +2 -3
- package/build/presentation/commands/create-presentation.command.js +0 -1
- package/build/presentation/commands/generate-and-insert-slide.command.js +0 -1
- package/build/presentation/commands/generate-slides.command.js +0 -1
- package/build/presentation/queries/get-presentation-config.query.js +0 -1
- package/build/solving-edu-task/commands/retry-solving-edu-task-job.command.js +0 -2
- package/build/solving-edu-task/commands/solving-edu-task.command.js +0 -1
- package/build/solving-edu-task/queries/get-solving-edu-task-config.query.js +2 -1
- package/build/spell-corrector/queries/get-spell-corrector-tool-config.query.js +2 -3
- package/build/stt/queries/get-stt-config.query.js +2 -3
- package/build/tools/enums/index.js +1 -0
- package/build/tools/enums/job-request-origin.enum.js +8 -0
- package/build/tools/events/tool-job-complete.event.js +1 -2
- package/build/tools/queries/find-all-tools.query.js +0 -1
- package/build/tools/queries/find-grouped-tools.query.js +0 -1
- package/build/tools/queries/get-global-tools-config.query.js +2 -3
- package/build/tools/queries/get-tools-with-configs.query.js +2 -3
- package/build/tts/queries/get-tts-config.query.js +2 -3
- package/build/video/commands/retry-video-job.command.js +0 -2
- package/build/video/commands/video-model/get-video-model-by-uuid.command.js +0 -1
- package/build/video/commands/video.command.js +0 -2
- package/build/video/queries/get-video-config.query.js +2 -3
- package/build/video-editor/commands/video-editor-model/get-video-editor-model.command.js +0 -1
- package/build/video-editor/queries/get-video-editor-config.query.js +4 -3
- package/build/writer/commands/create-writer-document.command.js +0 -1
- package/build/writer/commands/generate-document-outline.command.js +0 -2
- package/build/writer/queries/get-writer-config.query.js +0 -1
- package/common/models/index.ts +0 -1
- package/diagrams/commands/diagrams.command.ts +1 -2
- package/diagrams/commands/edit-diagrams-job.command.ts +1 -2
- package/diagrams/commands/get-diagrams-price-calculation-data.command.ts +25 -0
- package/diagrams/commands/index.ts +1 -0
- package/diagrams/commands/retry-diagrams-job.command.ts +0 -2
- package/diagrams/queries/get-diagrams-config.query.ts +3 -3
- package/diagrams/routes/diagrams.amqp.routes.ts +1 -0
- package/html-page-builder/commands/get-html-page-builder-price-calculation-data.command.ts +38 -0
- package/html-page-builder/commands/html-page-builder-execute.command.ts +10 -24
- package/html-page-builder/commands/index.ts +1 -1
- package/html-page-builder/models/html-page-builder-session.schema.ts +1 -0
- package/html-page-builder/queries/get-html-page-builder-config.query.ts +2 -2
- package/html-page-builder/routes/html-page-builder.amqp.routes.ts +1 -1
- package/image-editor/commands/image-editor-model/get-image-editor-model-by-uuid.command.ts +1 -2
- package/image-editor/commands/image-editor.command.ts +0 -2
- package/image-editor/commands/retry-image-editor-job.command.ts +0 -2
- package/image-editor/queries/get-image-editor-config.query.ts +1 -4
- package/image-generation/commands/execute-image-generation.command.ts +2 -4
- package/image-generation/commands/image-generation-model/get-image-generation-model-by-uuid.command.ts +1 -2
- package/image-generation/commands/retry-image-generation-job.command.ts +0 -2
- package/image-generation/models/image-generation-job.schema.ts +2 -4
- 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/get-interior-design-price.command.ts +1 -2
- package/interior-design/commands/interior-design-model/get-interior-design-model-by-uuid.command.ts +1 -2
- package/interior-design/commands/interior-design.command.ts +1 -2
- package/interior-design/commands/retry-interior-design-job.command.ts +0 -2
- package/interior-design/queries/get-interior-design-config.query.ts +1 -4
- package/marketplace-card/commands/execute-marketplace-card.command.ts +1 -2
- package/marketplace-card/commands/retry-marketplace-card-job.command.ts +1 -2
- package/marketplace-card/queries/get-marketplace-card-config.query.ts +2 -2
- package/music/commands/generate-lyrics.command.ts +0 -2
- package/music/commands/generate-music.command.ts +0 -2
- package/music/commands/music-model/get-music-model-by-uuid.command.ts +1 -2
- package/music/commands/retry-music-job.command.ts +0 -2
- package/music/queries/get-music-config.query.ts +1 -4
- package/package.json +1 -2
- package/paraphrase/queries/get-paraphrase-tool-config.query.ts +1 -4
- package/presentation/commands/create-presentation.command.ts +1 -2
- package/presentation/commands/generate-and-insert-slide.command.ts +1 -2
- package/presentation/commands/generate-slides.command.ts +1 -2
- package/presentation/queries/get-presentation-config.query.ts +1 -4
- package/solving-edu-task/commands/retry-solving-edu-task-job.command.ts +0 -2
- package/solving-edu-task/commands/solving-edu-task.command.ts +1 -2
- 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 +1 -4
- package/stt/queries/get-stt-config.query.ts +1 -4
- package/tools/enums/index.ts +1 -0
- package/tools/enums/job-request-origin.enum.ts +4 -0
- package/tools/events/tool-job-complete.event.ts +2 -3
- package/tools/queries/find-all-tools.query.ts +1 -4
- package/tools/queries/find-grouped-tools.query.ts +1 -4
- package/tools/queries/get-global-tools-config.query.ts +1 -4
- package/tools/queries/get-tools-with-configs.query.ts +1 -4
- package/tts/queries/get-tts-config.query.ts +1 -4
- package/video/commands/retry-video-job.command.ts +0 -2
- package/video/commands/video-model/get-video-model-by-uuid.command.ts +1 -2
- package/video/commands/video.command.ts +0 -2
- package/video/queries/get-video-config.query.ts +1 -4
- package/video-editor/commands/video-editor-model/get-video-editor-model.command.ts +1 -2
- package/video-editor/queries/get-video-editor-config.query.ts +2 -2
- package/writer/commands/create-writer-document.command.ts +1 -2
- package/writer/commands/generate-document-outline.command.ts +0 -2
- package/writer/queries/get-writer-config.query.ts +1 -4
- package/build/common/models/locale.schema.js +0 -9
- package/build/html-page-builder/commands/get-html-page-builder-price.command.js +0 -17
- package/common/models/locale.schema.ts +0 -11
- package/html-page-builder/commands/get-html-page-builder-price.command.ts +0 -19
package/interior-design/commands/interior-design-model/get-interior-design-model-by-uuid.command.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ICommandResponseSchema
|
|
2
|
+
import { ICommandResponseSchema } from '../../../common';
|
|
3
3
|
import { InteriorDesignModelSchema } from '../../models';
|
|
4
4
|
|
|
5
5
|
export namespace GetInteriorDesignModelByUuidCommand {
|
|
6
6
|
export const RequestSchema = z.object({
|
|
7
7
|
uuid: z.string().uuid(),
|
|
8
|
-
locale: LocaleSchema,
|
|
9
8
|
});
|
|
10
9
|
export type Request = z.infer<typeof RequestSchema>;
|
|
11
10
|
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
3
|
import { InteriorDesignJobSchema } from '../models';
|
|
4
|
-
import { AttachedFileSchema
|
|
4
|
+
import { AttachedFileSchema } from '../../common';
|
|
5
5
|
import { INTERIOR_DESIGN_JOB_SOURCE } from '../enums';
|
|
6
6
|
|
|
7
7
|
export namespace InteriorDesignCommand {
|
|
8
8
|
export const RequestSchema = z.object({
|
|
9
|
-
locale: LocaleSchema,
|
|
10
9
|
userId: z.string().uuid().nullable().optional(),
|
|
11
10
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
12
11
|
prompt: z.string(),
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
-
import { LocaleSchema } from '../../common';
|
|
4
3
|
import { InteriorDesignJobParamsSchema, InteriorDesignJobSchema } from '../models';
|
|
5
4
|
|
|
6
5
|
export namespace RetryInteriorDesignJobCommand {
|
|
7
6
|
export const RequestSchema = z.object({
|
|
8
|
-
locale: LocaleSchema,
|
|
9
7
|
uuid: z.string().uuid(),
|
|
10
8
|
tokenReservationId: z.string().uuid(),
|
|
11
9
|
precalculatedPrice: z.number(),
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ICommandResponseSchema
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
3
|
import { InteriorDesignConfigSchema } from '../models/interior-design-config.schema';
|
|
4
4
|
|
|
5
5
|
export namespace GetInteriorDesignConfigQuery {
|
|
6
|
-
export const RequestSchema = LocaleRequestSchema;
|
|
7
|
-
export type Request = z.infer<typeof RequestSchema>;
|
|
8
|
-
|
|
9
6
|
export const ResponseSchema = ICommandResponseSchema(InteriorDesignConfigSchema);
|
|
10
7
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
11
8
|
}
|
|
@@ -3,11 +3,10 @@ import { ICommandResponseSchema } from '../../common/models/command-response.sch
|
|
|
3
3
|
import { MarketplaceCardJobSchema } from '../models';
|
|
4
4
|
import { TOOL_CONTENT_TYPE } from '../../tools';
|
|
5
5
|
import { TOOL_WORKSPACE_ITEM_SLOT } from '../../tool-workspace';
|
|
6
|
-
import { AttachedFileSchema
|
|
6
|
+
import { AttachedFileSchema } from '../../common';
|
|
7
7
|
|
|
8
8
|
export namespace ExecuteMarketplaceCardCommand {
|
|
9
9
|
export const RequestSchema = z.object({
|
|
10
|
-
locale: LocaleSchema,
|
|
11
10
|
userId: z.string().uuid().nullable().optional(),
|
|
12
11
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
13
12
|
workspaceId: z.string().uuid().nullable().optional(),
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
-
import { AttachedFileSchema
|
|
3
|
+
import { AttachedFileSchema } from '../../common';
|
|
4
4
|
import { MarketplaceCardJobSchema } from '../models';
|
|
5
5
|
|
|
6
6
|
export namespace RetryMarketplaceCardJobCommand {
|
|
7
7
|
export const RequestSchema = z.object({
|
|
8
|
-
locale: LocaleSchema,
|
|
9
8
|
uuid: z.string().uuid(),
|
|
10
9
|
tokenReservationId: z.string().uuid(),
|
|
11
10
|
precalculatedPrice: z.number(),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ICommandResponseSchema
|
|
2
|
+
import { ICommandResponseSchema } from '../../common';
|
|
3
3
|
import { MarketplaceCardConfigSchema } from '../models';
|
|
4
4
|
|
|
5
5
|
export namespace GetMarketplaceCardConfigQuery {
|
|
6
|
-
export const RequestSchema =
|
|
6
|
+
export const RequestSchema = z.object({});
|
|
7
7
|
export type Request = z.infer<typeof RequestSchema>;
|
|
8
8
|
export const ResponseSchema = ICommandResponseSchema(MarketplaceCardConfigSchema);
|
|
9
9
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
-
import { LocaleSchema } from '../../common/models/locale.schema';
|
|
4
3
|
|
|
5
4
|
export namespace GenerateLyricsCommand {
|
|
6
5
|
export const RequestSchema = z.object({
|
|
7
|
-
locale: LocaleSchema,
|
|
8
6
|
userId: z.string().uuid().nullable().optional(),
|
|
9
7
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
8
|
userBalance: z.number(),
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
-
import { LocaleSchema } from '../../common/models/locale.schema';
|
|
4
3
|
import { MusicJobSchema } from '../models/music-job.schema';
|
|
5
4
|
import { MusicJobParamsSchema } from '../models';
|
|
6
5
|
|
|
7
6
|
export namespace GenerateMusicCommand {
|
|
8
7
|
export const RequestSchema = z.object({
|
|
9
|
-
locale: LocaleSchema,
|
|
10
8
|
userId: z.string().uuid().nullable().optional(),
|
|
11
9
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
12
10
|
modelId: z.string(),
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { MusicModelSchema } from '../../models';
|
|
3
|
-
import { ICommandResponseSchema
|
|
3
|
+
import { ICommandResponseSchema } from '../../../common';
|
|
4
4
|
|
|
5
5
|
export namespace GetMusicModelByUuidCommand {
|
|
6
6
|
export const RequestSchema = z.object({
|
|
7
7
|
uuid: z.string().uuid(),
|
|
8
|
-
locale: LocaleSchema,
|
|
9
8
|
});
|
|
10
9
|
export type Request = z.infer<typeof RequestSchema>;
|
|
11
10
|
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
3
|
import { MusicJobParamsSchema, MusicJobSchema } from '../models/music-job.schema';
|
|
4
|
-
import { LocaleSchema } from '../../common';
|
|
5
4
|
|
|
6
5
|
export namespace RetryMusicJobCommand {
|
|
7
6
|
export const RequestSchema = z.object({
|
|
8
|
-
locale: LocaleSchema,
|
|
9
7
|
uuid: z.string().uuid(),
|
|
10
8
|
userId: z.string().uuid().nullable().optional(),
|
|
11
9
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ICommandResponseSchema
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
3
|
import { MusicConfigSchema } from '../models';
|
|
4
4
|
|
|
5
5
|
export namespace GetMusicConfigQuery {
|
|
6
|
-
export const RequestSchema = LocaleRequestSchema;
|
|
7
|
-
export type Request = z.infer<typeof RequestSchema>;
|
|
8
|
-
|
|
9
6
|
export const ResponseSchema = ICommandResponseSchema(MusicConfigSchema);
|
|
10
7
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
11
8
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@purpleschool/gptbot-tools",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.20-stage",
|
|
4
4
|
"main": "build/index.js",
|
|
5
5
|
"types": "build/index.d.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
"license": "ISC",
|
|
13
13
|
"description": "",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@purpleschool/rugpt-lib-common": "^0.0.21",
|
|
16
15
|
"zod": "^3.25.67"
|
|
17
16
|
}
|
|
18
17
|
}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ICommandResponseSchema
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
3
|
import { ParaphraseToolConfigSchema } from '../models';
|
|
4
4
|
|
|
5
5
|
export namespace GetParaphraseToolConfigQuery {
|
|
6
|
-
export const RequestSchema = LocaleRequestSchema;
|
|
7
|
-
export type Request = z.infer<typeof RequestSchema>;
|
|
8
|
-
|
|
9
6
|
export const ResponseSchema = ICommandResponseSchema(ParaphraseToolConfigSchema);
|
|
10
7
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
11
8
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ICommandResponseSchema
|
|
2
|
+
import { ICommandResponseSchema } from '../../common';
|
|
3
3
|
import { PresentationSchema } from '../models';
|
|
4
4
|
import { PRESENTATION_TARGET_AUDIENCE } from '../enums';
|
|
5
5
|
|
|
6
6
|
export namespace CreatePresentationCommand {
|
|
7
7
|
export const RequestSchema = z.object({
|
|
8
|
-
locale: LocaleSchema,
|
|
9
8
|
userId: z.string().uuid().nullable().optional(),
|
|
10
9
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
11
10
|
templateId: z.string().uuid(),
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ICommandResponseSchema
|
|
2
|
+
import { ICommandResponseSchema } from '../../common';
|
|
3
3
|
import { SLIDE_CONTENT_TYPE, SLIDE_LAYOUT } from '../enums';
|
|
4
4
|
import { SlideSchema } from '../models';
|
|
5
5
|
|
|
6
6
|
export namespace GenerateAndInsertSlideCommand {
|
|
7
7
|
export const RequestSchema = z.object({
|
|
8
|
-
locale: LocaleSchema,
|
|
9
8
|
userId: z.string().uuid().nullable().optional(),
|
|
10
9
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
11
10
|
userBalance: z.number(),
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ICommandResponseSchema
|
|
2
|
+
import { ICommandResponseSchema } from '../../common';
|
|
3
3
|
import { PresentationSchema, PresentationTitlePageSchema } from '../models';
|
|
4
4
|
|
|
5
5
|
export namespace GenerateSlidesCommand {
|
|
6
6
|
export const RequestSchema = z.object({
|
|
7
|
-
locale: LocaleSchema,
|
|
8
7
|
uuid: z.string().uuid(),
|
|
9
8
|
userId: z.string().uuid().nullable().optional(),
|
|
10
9
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ICommandResponseSchema
|
|
2
|
+
import { ICommandResponseSchema } from '../../common';
|
|
3
3
|
import { PresentationConfigSchema } from '../models';
|
|
4
4
|
|
|
5
5
|
export namespace GetPresentationConfigQuery {
|
|
6
|
-
export const RequestSchema = LocaleRequestSchema;
|
|
7
|
-
export type Request = z.infer<typeof RequestSchema>;
|
|
8
|
-
|
|
9
6
|
export const ResponseSchema = ICommandResponseSchema(PresentationConfigSchema);
|
|
10
7
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
11
8
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
-
import { LocaleSchema } from '../../common/models/locale.schema';
|
|
4
3
|
import { SolvingEduTaskJobSchema } from '../models';
|
|
5
4
|
import { AttachedFileSchema } from '../../common';
|
|
6
5
|
|
|
7
6
|
export namespace RetrySolvingEduTaskJobCommand {
|
|
8
7
|
export const RequestSchema = z.object({
|
|
9
|
-
locale: LocaleSchema,
|
|
10
8
|
uuid: z.string().uuid(),
|
|
11
9
|
tokenReservationId: z.string().uuid().optional(),
|
|
12
10
|
precalculatedPrice: z.number().optional(),
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
3
|
import { SolvingEduTaskJobSchema } from '../models';
|
|
4
|
-
import { AttachedFileSchema
|
|
4
|
+
import { AttachedFileSchema } from '../../common';
|
|
5
5
|
|
|
6
6
|
export namespace SolvingEduTaskCommand {
|
|
7
7
|
export const RequestSchema = z.object({
|
|
8
|
-
locale: LocaleSchema,
|
|
9
8
|
userId: z.string().uuid().nullable().optional(),
|
|
10
9
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
11
10
|
prompt: z.string(),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ICommandResponseSchema
|
|
2
|
+
import { ICommandResponseSchema } from '../../common';
|
|
3
3
|
import { SolvingEduTaskConfigSchema } from '../models';
|
|
4
4
|
|
|
5
5
|
export namespace GetSolvingEduTaskConfigQuery {
|
|
6
|
-
export const RequestSchema =
|
|
6
|
+
export const RequestSchema = z.object({});
|
|
7
7
|
export type Request = z.infer<typeof RequestSchema>;
|
|
8
8
|
|
|
9
9
|
export const ResponseSchema = ICommandResponseSchema(SolvingEduTaskConfigSchema);
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ICommandResponseSchema
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
3
|
import { SpellCorrectorToolConfigSchema } from '../models';
|
|
4
4
|
|
|
5
5
|
export namespace GetSpellCorrectorToolConfigQuery {
|
|
6
|
-
export const RequestSchema = LocaleRequestSchema;
|
|
7
|
-
export type Request = z.infer<typeof RequestSchema>;
|
|
8
|
-
|
|
9
6
|
export const ResponseSchema = ICommandResponseSchema(SpellCorrectorToolConfigSchema);
|
|
10
7
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
11
8
|
}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ICommandResponseSchema
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
3
|
import { STTConfigSchema } from '../models';
|
|
4
4
|
|
|
5
5
|
export namespace GetSTTConfigQuery {
|
|
6
|
-
export const RequestSchema = LocaleRequestSchema;
|
|
7
|
-
export type Request = z.infer<typeof RequestSchema>;
|
|
8
|
-
|
|
9
6
|
export const ResponseSchema = ICommandResponseSchema(STTConfigSchema);
|
|
10
7
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
11
8
|
}
|
package/tools/enums/index.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { TOOL_TYPE } from '../enums';
|
|
1
|
+
import { JOB_REQUEST_ORIGIN, TOOL_TYPE } from '../enums';
|
|
3
2
|
import { ToolJobSchema } from '../models';
|
|
4
3
|
import { z } from 'zod';
|
|
5
4
|
|
|
@@ -7,7 +6,7 @@ export namespace ToolJobCompleteEvent {
|
|
|
7
6
|
export const PayloadSchema = z.object({
|
|
8
7
|
job: ToolJobSchema.extend({
|
|
9
8
|
toolType: z.nativeEnum(TOOL_TYPE),
|
|
10
|
-
|
|
9
|
+
origin: z.nativeEnum(JOB_REQUEST_ORIGIN).optional(),
|
|
11
10
|
}),
|
|
12
11
|
});
|
|
13
12
|
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ToolSchema } from '../models';
|
|
3
|
-
import { ICommandResponseSchema
|
|
3
|
+
import { ICommandResponseSchema } from '../../common';
|
|
4
4
|
|
|
5
5
|
export namespace FindAllToolsQuery {
|
|
6
|
-
export const RequestSchema = LocaleRequestSchema;
|
|
7
|
-
export type Request = z.infer<typeof RequestSchema>;
|
|
8
|
-
|
|
9
6
|
export const ResponseSchema = ICommandResponseSchema(z.array(ToolSchema));
|
|
10
7
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
11
8
|
}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ToolGroupSchema } from '../models';
|
|
3
|
-
import { ICommandResponseSchema
|
|
3
|
+
import { ICommandResponseSchema } from '../../common';
|
|
4
4
|
|
|
5
5
|
export namespace FindGroupedToolsQuery {
|
|
6
|
-
export const RequestSchema = LocaleRequestSchema;
|
|
7
|
-
export type Request = z.infer<typeof RequestSchema>;
|
|
8
|
-
|
|
9
6
|
export const ResponseSchema = ICommandResponseSchema(z.array(ToolGroupSchema));
|
|
10
7
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
11
8
|
}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ICommandResponseSchema
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
3
|
import { GlobalToolsConfigSchema } from '../models';
|
|
4
4
|
|
|
5
5
|
export namespace GetGlobalToolsConfigQuery {
|
|
6
|
-
export const RequestSchema = LocaleRequestSchema;
|
|
7
|
-
export type Request = z.infer<typeof RequestSchema>;
|
|
8
|
-
|
|
9
6
|
export const ResponseSchema = ICommandResponseSchema(GlobalToolsConfigSchema);
|
|
10
7
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
11
8
|
}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ICommandResponseSchema
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
3
|
import { ToolsWithConfigsSchema } from '../models';
|
|
4
4
|
|
|
5
5
|
export namespace GetToolsWithConfigsQuery {
|
|
6
|
-
export const RequestSchema = LocaleRequestSchema;
|
|
7
|
-
export type Request = z.infer<typeof RequestSchema>;
|
|
8
|
-
|
|
9
6
|
export const ResponseSchema = ICommandResponseSchema(ToolsWithConfigsSchema);
|
|
10
7
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
11
8
|
}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ICommandResponseSchema
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
3
|
import { TTSConfigSchema } from '../models';
|
|
4
4
|
|
|
5
5
|
export namespace GetTTSConfigQuery {
|
|
6
|
-
export const RequestSchema = LocaleRequestSchema;
|
|
7
|
-
export type Request = z.infer<typeof RequestSchema>;
|
|
8
|
-
|
|
9
6
|
export const ResponseSchema = ICommandResponseSchema(TTSConfigSchema);
|
|
10
7
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
11
8
|
}
|
|
@@ -2,11 +2,9 @@ import { z } from 'zod';
|
|
|
2
2
|
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
3
|
import { VideoJobSchema } from '../models/video-job.schema';
|
|
4
4
|
import { VideoGenerationRequestParamsSchema } from '../models';
|
|
5
|
-
import { LocaleSchema } from '../../common';
|
|
6
5
|
|
|
7
6
|
export namespace RetryVideoJobCommand {
|
|
8
7
|
export const RequestSchema = z.object({
|
|
9
|
-
locale: LocaleSchema,
|
|
10
8
|
uuid: z.string().uuid(),
|
|
11
9
|
userId: z.string().uuid().nullable().optional(),
|
|
12
10
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { VideoModelSchema } from '../../models';
|
|
3
|
-
import { ICommandResponseSchema
|
|
3
|
+
import { ICommandResponseSchema } from '../../../common';
|
|
4
4
|
|
|
5
5
|
export namespace GetVideoModelByUuidCommand {
|
|
6
6
|
export const RequestSchema = z.object({
|
|
7
7
|
uuid: z.string().uuid(),
|
|
8
|
-
locale: LocaleSchema,
|
|
9
8
|
});
|
|
10
9
|
export type Request = z.infer<typeof RequestSchema>;
|
|
11
10
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
-
import { LocaleSchema } from '../../common/models/locale.schema';
|
|
4
3
|
import { TOOL_WORKSPACE_ITEM_SLOT } from '../../tool-workspace';
|
|
5
4
|
import { TOOL_CONTENT_TYPE } from '../../tools';
|
|
6
5
|
import { VideoJobSchema } from '../models/video-job.schema';
|
|
@@ -8,7 +7,6 @@ import { VideoGenerationRequestParamsSchema } from '../models';
|
|
|
8
7
|
|
|
9
8
|
export namespace VideoCommand {
|
|
10
9
|
export const RequestSchema = z.object({
|
|
11
|
-
locale: LocaleSchema,
|
|
12
10
|
userId: z.string().uuid().nullable().optional(),
|
|
13
11
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
14
12
|
workspaceId: z.string().uuid().nullable().optional(),
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ICommandResponseSchema
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
3
|
import { VideoConfigSchema } from '../models';
|
|
4
4
|
|
|
5
5
|
export namespace GetVideoConfigQuery {
|
|
6
|
-
export const RequestSchema = LocaleRequestSchema;
|
|
7
|
-
export type Request = z.infer<typeof RequestSchema>;
|
|
8
|
-
|
|
9
6
|
export const ResponseSchema = ICommandResponseSchema(VideoConfigSchema);
|
|
10
7
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
11
8
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ICommandResponseSchema
|
|
2
|
+
import { ICommandResponseSchema } from '../../../common';
|
|
3
3
|
import { VideoEditorModelSchema } from '../../models';
|
|
4
4
|
|
|
5
5
|
export namespace GetVideoEditorModelByUuidCommand {
|
|
6
6
|
export const RequestSchema = z.object({
|
|
7
7
|
uuid: z.string().uuid(),
|
|
8
|
-
locale: LocaleSchema,
|
|
9
8
|
});
|
|
10
9
|
export type Request = z.infer<typeof RequestSchema>;
|
|
11
10
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ICommandResponseSchema
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
3
|
import { VideoEditorConfigSchema } from '../models';
|
|
4
4
|
|
|
5
5
|
export namespace GetVideoEditorConfigQuery {
|
|
6
|
-
export const RequestSchema =
|
|
6
|
+
export const RequestSchema = z.object({});
|
|
7
7
|
export type Request = z.infer<typeof RequestSchema>;
|
|
8
8
|
|
|
9
9
|
export const ResponseSchema = ICommandResponseSchema(VideoEditorConfigSchema);
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ICommandResponseSchema
|
|
2
|
+
import { ICommandResponseSchema } from '../../common';
|
|
3
3
|
import { WriterDocumentSchema } from '../models';
|
|
4
4
|
|
|
5
5
|
export namespace CreateWriterDocumentCommand {
|
|
6
6
|
export const RequestSchema = z.object({
|
|
7
|
-
locale: LocaleSchema,
|
|
8
7
|
userId: z.string().uuid().nullable().optional(),
|
|
9
8
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
9
|
prompt: z.string(),
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
-
import { LocaleSchema } from '../../common/models/locale.schema';
|
|
4
3
|
import { WriterDocumentSchema } from '../models';
|
|
5
4
|
|
|
6
5
|
export namespace GenerateWriterDocumentOutlineCommand {
|
|
7
6
|
export const RequestSchema = z.object({
|
|
8
7
|
uuid: z.string().uuid(),
|
|
9
|
-
locale: LocaleSchema,
|
|
10
8
|
numPages: z.number(),
|
|
11
9
|
description: z.string().nullable().optional(),
|
|
12
10
|
userId: z.string().uuid().nullable().optional(),
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ICommandResponseSchema
|
|
2
|
+
import { ICommandResponseSchema } from '../../common';
|
|
3
3
|
import { WriterConfigSchema } from '../models';
|
|
4
4
|
|
|
5
5
|
export namespace GetWriterConfigQuery {
|
|
6
|
-
export const RequestSchema = LocaleRequestSchema;
|
|
7
|
-
export type Request = z.infer<typeof RequestSchema>;
|
|
8
|
-
|
|
9
6
|
export const ResponseSchema = ICommandResponseSchema(WriterConfigSchema);
|
|
10
7
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
11
8
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
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
|
-
});
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GetHtmlPageBuilderPriceCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
-
var GetHtmlPageBuilderPriceCommand;
|
|
7
|
-
(function (GetHtmlPageBuilderPriceCommand) {
|
|
8
|
-
GetHtmlPageBuilderPriceCommand.RequestSchema = zod_1.z.object({
|
|
9
|
-
modelId: zod_1.z.string().uuid(),
|
|
10
|
-
userPrompt: zod_1.z.string(),
|
|
11
|
-
sessionId: zod_1.z.string().uuid().nullable().optional(),
|
|
12
|
-
});
|
|
13
|
-
GetHtmlPageBuilderPriceCommand.ResponseDataSchema = zod_1.z.object({
|
|
14
|
-
price: zod_1.z.number(),
|
|
15
|
-
});
|
|
16
|
-
GetHtmlPageBuilderPriceCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(GetHtmlPageBuilderPriceCommand.ResponseDataSchema);
|
|
17
|
-
})(GetHtmlPageBuilderPriceCommand || (exports.GetHtmlPageBuilderPriceCommand = GetHtmlPageBuilderPriceCommand = {}));
|
|
@@ -1,11 +0,0 @@
|
|
|
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,19 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
-
|
|
4
|
-
export namespace GetHtmlPageBuilderPriceCommand {
|
|
5
|
-
export const RequestSchema = z.object({
|
|
6
|
-
modelId: z.string().uuid(),
|
|
7
|
-
userPrompt: z.string(),
|
|
8
|
-
sessionId: z.string().uuid().nullable().optional(),
|
|
9
|
-
});
|
|
10
|
-
export type Request = z.infer<typeof RequestSchema>;
|
|
11
|
-
|
|
12
|
-
export const ResponseDataSchema = z.object({
|
|
13
|
-
price: z.number(),
|
|
14
|
-
});
|
|
15
|
-
export type ResponseData = z.infer<typeof ResponseDataSchema>;
|
|
16
|
-
|
|
17
|
-
export const ResponseSchema = ICommandResponseSchema(ResponseDataSchema);
|
|
18
|
-
export type Response = z.infer<typeof ResponseSchema>;
|
|
19
|
-
}
|