@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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
3
|
import { ImageGenerationJobSchema } from '../models';
|
|
4
|
-
import {
|
|
4
|
+
import { STATISTICS_CALL_ORIGIN } from '@purpleschool/rugpt-lib-common';
|
|
5
5
|
|
|
6
6
|
export namespace FindImageGenerationJobsQuery {
|
|
7
7
|
export const RequestSchema = z
|
|
@@ -11,7 +11,7 @@ export namespace FindImageGenerationJobsQuery {
|
|
|
11
11
|
title: z.string().optional(),
|
|
12
12
|
limit: z.coerce.number().min(1).optional(),
|
|
13
13
|
offset: z.coerce.number().min(0).default(0).optional(),
|
|
14
|
-
|
|
14
|
+
callOrigin: z.nativeEnum(STATISTICS_CALL_ORIGIN).optional(),
|
|
15
15
|
})
|
|
16
16
|
.refine(
|
|
17
17
|
(data) => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ICommandResponseSchema } from '../../common
|
|
2
|
+
import { ICommandResponseSchema, LocaleRequestSchema } from '../../common';
|
|
3
3
|
import { ImageGenerationConfigSchema } from '../models';
|
|
4
4
|
|
|
5
5
|
export namespace GetImageGenerationConfigQuery {
|
|
6
|
-
export const RequestSchema =
|
|
6
|
+
export const RequestSchema = LocaleRequestSchema;
|
|
7
7
|
export type Request = z.infer<typeof RequestSchema>;
|
|
8
8
|
|
|
9
9
|
export const ResponseSchema = ICommandResponseSchema(ImageGenerationConfigSchema);
|
package/interior-design/commands/interior-design-model/get-interior-design-model-by-uuid.command.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ICommandResponseSchema } from '../../../common';
|
|
2
|
+
import { ICommandResponseSchema, LocaleSchema } 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,
|
|
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 { 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
|
+
|
|
6
9
|
export const ResponseSchema = ICommandResponseSchema(InteriorDesignConfigSchema);
|
|
7
10
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
8
11
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ICommandResponseSchema } from '../../common';
|
|
2
|
+
import { ICommandResponseSchema, LocaleRequestSchema } from '../../common';
|
|
3
3
|
import { MarketplaceCardConfigSchema } from '../models';
|
|
4
4
|
|
|
5
5
|
export namespace GetMarketplaceCardConfigQuery {
|
|
6
|
-
export const RequestSchema =
|
|
6
|
+
export const RequestSchema = LocaleRequestSchema;
|
|
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,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { MusicModelSchema } from '../../models';
|
|
3
|
-
import { ICommandResponseSchema } from '../../../common';
|
|
3
|
+
import { ICommandResponseSchema, LocaleSchema } 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,
|
|
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 { MusicConfigSchema } from '../models';
|
|
4
4
|
|
|
5
5
|
export namespace GetMusicConfigQuery {
|
|
6
|
+
export const RequestSchema = LocaleRequestSchema;
|
|
7
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
8
|
+
|
|
6
9
|
export const ResponseSchema = ICommandResponseSchema(MusicConfigSchema);
|
|
7
10
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
8
11
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@purpleschool/gptbot-tools",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12-stage-2",
|
|
4
4
|
"main": "build/index.js",
|
|
5
5
|
"types": "build/index.d.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"license": "ISC",
|
|
13
13
|
"description": "",
|
|
14
14
|
"dependencies": {
|
|
15
|
+
"@purpleschool/rugpt-lib-common": "^0.0.21",
|
|
15
16
|
"zod": "^3.25.67"
|
|
16
17
|
}
|
|
17
18
|
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ICommandResponseSchema } from '../../common
|
|
2
|
+
import { ICommandResponseSchema, LocaleRequestSchema } from '../../common';
|
|
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
|
+
|
|
6
9
|
export const ResponseSchema = ICommandResponseSchema(ParaphraseToolConfigSchema);
|
|
7
10
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
8
11
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ICommandResponseSchema } from '../../common';
|
|
3
|
-
import { PresentationSchema
|
|
4
|
-
import { PRESENTATION_TARGET_AUDIENCE } from '../enums';
|
|
3
|
+
import { PresentationSchema } from '../models';
|
|
5
4
|
|
|
6
5
|
export namespace CreatePresentationCommand {
|
|
7
6
|
export const RequestSchema = z.object({
|
|
@@ -11,8 +10,6 @@ export namespace CreatePresentationCommand {
|
|
|
11
10
|
languageId: z.string(),
|
|
12
11
|
prompt: z.string(),
|
|
13
12
|
slideCount: z.number(),
|
|
14
|
-
titlePage: PresentationTitlePageSchema.optional().nullable(),
|
|
15
|
-
targetAudience: z.nativeEnum(PRESENTATION_TARGET_AUDIENCE).optional(),
|
|
16
13
|
});
|
|
17
14
|
export type Request = z.infer<typeof RequestSchema>;
|
|
18
15
|
|
|
@@ -4,7 +4,6 @@ import { ICommandResponseSchema } from '../../common';
|
|
|
4
4
|
export namespace GetPresentationSlidesGenerationPriceCommand {
|
|
5
5
|
export const RequestSchema = z.object({
|
|
6
6
|
slideCount: z.number().int().min(1),
|
|
7
|
-
templateId: z.string().uuid(),
|
|
8
7
|
});
|
|
9
8
|
export type Request = z.infer<typeof RequestSchema>;
|
|
10
9
|
|
|
@@ -8,4 +8,3 @@ export * from './slide-image-slot-action.enum';
|
|
|
8
8
|
export * from './presentation-ai-action-call-status.enum';
|
|
9
9
|
export * from './presentation-ai-action-type.enum';
|
|
10
10
|
export * from './presentation-ai-action-pricing-type.enum';
|
|
11
|
-
export * from './presentation-target-audience.enum';
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { PRESENTATION_STAGE
|
|
2
|
+
import { PRESENTATION_STAGE } from '../enums';
|
|
3
3
|
import { SlideOutlineSchema } from './slide-outline.schema';
|
|
4
4
|
import { SlideSchema } from './slide.schema';
|
|
5
5
|
import { USER_REACTION } from '../../common';
|
|
6
|
-
import { PresentationTitlePageSchema } from './presentation-title-page.schema';
|
|
7
6
|
|
|
8
7
|
export const PresentationSchema = z.object({
|
|
9
8
|
uuid: z.string().uuid(),
|
|
@@ -23,8 +22,6 @@ export const PresentationSchema = z.object({
|
|
|
23
22
|
tokenReservationId: z.string().nullable().optional(),
|
|
24
23
|
lastContentUpdateAt: z.date().nullable(),
|
|
25
24
|
lastPptxExportedAt: z.date().nullable(),
|
|
26
|
-
titlePage: PresentationTitlePageSchema.nullable(),
|
|
27
|
-
targetAudience: z.nativeEnum(PRESENTATION_TARGET_AUDIENCE),
|
|
28
25
|
createdAt: z.date(),
|
|
29
26
|
updatedAt: z.date(),
|
|
30
27
|
});
|
|
@@ -39,6 +36,5 @@ export type PresentationWithSlides = z.infer<typeof PresentationWithSlidesSchema
|
|
|
39
36
|
export const PresentationUpdateSchema = PresentationSchema.pick({
|
|
40
37
|
title: true,
|
|
41
38
|
templateId: true,
|
|
42
|
-
titlePage: true,
|
|
43
39
|
}).partial();
|
|
44
40
|
export type PresentationUpdate = z.infer<typeof PresentationUpdateSchema>;
|
|
@@ -19,24 +19,18 @@ import {
|
|
|
19
19
|
export const CoverSlideDataUserEditSchema = z.object({
|
|
20
20
|
contentType: z.literal(SLIDE_CONTENT_TYPE.COVER),
|
|
21
21
|
title: z.string().min(1).max(500),
|
|
22
|
-
author: z
|
|
23
|
-
.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
email: z
|
|
35
|
-
.object({
|
|
36
|
-
label: z.string().min(1).max(100),
|
|
37
|
-
value: z.string().min(1).max(200),
|
|
38
|
-
})
|
|
39
|
-
.optional(),
|
|
22
|
+
author: z.object({
|
|
23
|
+
label: z.string().min(1).max(100),
|
|
24
|
+
value: z.string().min(1).max(200),
|
|
25
|
+
}),
|
|
26
|
+
date: z.object({
|
|
27
|
+
label: z.string().min(1).max(100),
|
|
28
|
+
value: z.string().min(1).max(200),
|
|
29
|
+
}),
|
|
30
|
+
email: z.object({
|
|
31
|
+
label: z.string().min(1).max(100),
|
|
32
|
+
value: z.string().min(1).max(200),
|
|
33
|
+
}),
|
|
40
34
|
version: z.literal(1),
|
|
41
35
|
}) satisfies z.ZodType<ICoverSlideDataStructure>;
|
|
42
36
|
|
|
@@ -38,9 +38,9 @@ export type IconSlot = z.infer<typeof IconSlotSchema>;
|
|
|
38
38
|
export interface ICoverSlideDataStructure {
|
|
39
39
|
contentType: SLIDE_CONTENT_TYPE.COVER;
|
|
40
40
|
title: string;
|
|
41
|
-
author
|
|
42
|
-
date
|
|
43
|
-
email
|
|
41
|
+
author: { label: string; value: string };
|
|
42
|
+
date: { label: string; value: string };
|
|
43
|
+
email: { label: string; value: string };
|
|
44
44
|
version: 1;
|
|
45
45
|
}
|
|
46
46
|
|
|
@@ -137,28 +137,24 @@ export interface ITimelineSlideDataStructure {
|
|
|
137
137
|
export const CoverSlideDataSchema = z.object({
|
|
138
138
|
contentType: z.literal(SLIDE_CONTENT_TYPE.COVER),
|
|
139
139
|
title: z.string().describe('Slide title in about 6 words').min(10).max(150),
|
|
140
|
-
author: z
|
|
141
|
-
.
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
date: z
|
|
147
|
-
.
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
.
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
label: z.string().describe('Localized contact/email label'),
|
|
159
|
-
value: z.string().describe('Email value from titlePage if provided'),
|
|
160
|
-
})
|
|
161
|
-
.optional(),
|
|
140
|
+
author: z.object({
|
|
141
|
+
label: z.string().describe('Literal "Author" in presentation\'s language'),
|
|
142
|
+
value: z
|
|
143
|
+
.string()
|
|
144
|
+
.describe('Literal "Author of the presentation" in presentation\'s language'),
|
|
145
|
+
}),
|
|
146
|
+
date: z.object({
|
|
147
|
+
label: z.string().describe('Literal "Date" in presentation\'s language'),
|
|
148
|
+
value: z
|
|
149
|
+
.string()
|
|
150
|
+
.describe(
|
|
151
|
+
'Date of the presentation in the "dd month yyyy" format in presentation\'s locale',
|
|
152
|
+
),
|
|
153
|
+
}),
|
|
154
|
+
email: z.object({
|
|
155
|
+
label: z.string().describe('Just default word "Email"'),
|
|
156
|
+
value: z.string().describe('Just default "email@example.com"'),
|
|
157
|
+
}),
|
|
162
158
|
version: z.literal(1),
|
|
163
159
|
}) satisfies z.ZodType<ICoverSlideDataStructure>;
|
|
164
160
|
export type CoverSlideData = z.infer<typeof CoverSlideDataSchema>;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ICommandResponseSchema } from '../../common';
|
|
2
|
+
import { ICommandResponseSchema, LocaleRequestSchema } 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
|
+
|
|
6
9
|
export const ResponseSchema = ICommandResponseSchema(PresentationConfigSchema);
|
|
7
10
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
8
11
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ICommandResponseSchema } from '../../common';
|
|
2
|
+
import { ICommandResponseSchema, LocaleRequestSchema } from '../../common';
|
|
3
3
|
import { SolvingEduTaskConfigSchema } from '../models';
|
|
4
4
|
|
|
5
5
|
export namespace GetSolvingEduTaskConfigQuery {
|
|
6
|
-
export const RequestSchema =
|
|
6
|
+
export const RequestSchema = LocaleRequestSchema;
|
|
7
7
|
export type Request = z.infer<typeof RequestSchema>;
|
|
8
8
|
|
|
9
9
|
export const ResponseSchema = ICommandResponseSchema(SolvingEduTaskConfigSchema);
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ICommandResponseSchema } from '../../common
|
|
2
|
+
import { ICommandResponseSchema, LocaleRequestSchema } from '../../common';
|
|
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
|
+
|
|
6
9
|
export const ResponseSchema = ICommandResponseSchema(SpellCorrectorToolConfigSchema);
|
|
7
10
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
8
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 { STTConfigSchema } from '../models';
|
|
4
4
|
|
|
5
5
|
export namespace GetSTTConfigQuery {
|
|
6
|
+
export const RequestSchema = LocaleRequestSchema;
|
|
7
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
8
|
+
|
|
6
9
|
export const ResponseSchema = ICommandResponseSchema(STTConfigSchema);
|
|
7
10
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
8
11
|
}
|
package/tools/enums/index.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { STATISTICS_CALL_ORIGIN } from '@purpleschool/rugpt-lib-common';
|
|
2
|
+
import { TOOL_TYPE } from '../enums';
|
|
2
3
|
import { ToolJobSchema } from '../models';
|
|
3
4
|
import { z } from 'zod';
|
|
4
5
|
|
|
@@ -6,7 +7,7 @@ export namespace ToolJobCompleteEvent {
|
|
|
6
7
|
export const PayloadSchema = z.object({
|
|
7
8
|
job: ToolJobSchema.extend({
|
|
8
9
|
toolType: z.nativeEnum(TOOL_TYPE),
|
|
9
|
-
|
|
10
|
+
callOrigin: z.nativeEnum(STATISTICS_CALL_ORIGIN).optional(),
|
|
10
11
|
}),
|
|
11
12
|
});
|
|
12
13
|
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ToolSchema } from '../models';
|
|
3
|
-
import { ICommandResponseSchema } from '../../common';
|
|
3
|
+
import { ICommandResponseSchema, LocaleRequestSchema } from '../../common';
|
|
4
4
|
|
|
5
5
|
export namespace FindAllToolsQuery {
|
|
6
|
+
export const RequestSchema = LocaleRequestSchema;
|
|
7
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
8
|
+
|
|
6
9
|
export const ResponseSchema = ICommandResponseSchema(z.array(ToolSchema));
|
|
7
10
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
8
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 { GlobalToolsConfigSchema } from '../models';
|
|
4
4
|
|
|
5
5
|
export namespace GetGlobalToolsConfigQuery {
|
|
6
|
+
export const RequestSchema = LocaleRequestSchema;
|
|
7
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
8
|
+
|
|
6
9
|
export const ResponseSchema = ICommandResponseSchema(GlobalToolsConfigSchema);
|
|
7
10
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
8
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 { ToolsWithConfigsSchema } from '../models';
|
|
4
4
|
|
|
5
5
|
export namespace GetToolsWithConfigsQuery {
|
|
6
|
+
export const RequestSchema = LocaleRequestSchema;
|
|
7
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
8
|
+
|
|
6
9
|
export const ResponseSchema = ICommandResponseSchema(ToolsWithConfigsSchema);
|
|
7
10
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
8
11
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { VideoModelSchema } from '../../models';
|
|
3
|
-
import { ICommandResponseSchema } from '../../../common';
|
|
3
|
+
import { ICommandResponseSchema, LocaleSchema } 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,
|
|
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 { VideoConfigSchema } from '../models';
|
|
4
4
|
|
|
5
5
|
export namespace GetVideoConfigQuery {
|
|
6
|
+
export const RequestSchema = LocaleRequestSchema;
|
|
7
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
8
|
+
|
|
6
9
|
export const ResponseSchema = ICommandResponseSchema(VideoConfigSchema);
|
|
7
10
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
8
11
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ICommandResponseSchema } from '../../../common';
|
|
2
|
+
import { ICommandResponseSchema, LocaleSchema } 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,
|
|
8
9
|
});
|
|
9
10
|
export type Request = z.infer<typeof RequestSchema>;
|
|
10
11
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ICommandResponseSchema } from '../../common
|
|
2
|
+
import { ICommandResponseSchema, LocaleRequestSchema } from '../../common';
|
|
3
3
|
import { VideoEditorConfigSchema } from '../models';
|
|
4
4
|
|
|
5
5
|
export namespace GetVideoEditorConfigQuery {
|
|
6
|
-
export const RequestSchema =
|
|
6
|
+
export const RequestSchema = LocaleRequestSchema;
|
|
7
7
|
export type Request = z.infer<typeof RequestSchema>;
|
|
8
8
|
|
|
9
9
|
export const ResponseSchema = ICommandResponseSchema(VideoEditorConfigSchema);
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ICommandResponseSchema } from '../../common';
|
|
2
|
+
import { ICommandResponseSchema, LocaleRequestSchema } 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
|
+
|
|
6
9
|
export const ResponseSchema = ICommandResponseSchema(WriterConfigSchema);
|
|
7
10
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
8
11
|
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PRESENTATION_TARGET_AUDIENCE = void 0;
|
|
4
|
-
var PRESENTATION_TARGET_AUDIENCE;
|
|
5
|
-
(function (PRESENTATION_TARGET_AUDIENCE) {
|
|
6
|
-
PRESENTATION_TARGET_AUDIENCE["NONE"] = "NONE";
|
|
7
|
-
PRESENTATION_TARGET_AUDIENCE["SCHOOL"] = "SCHOOL";
|
|
8
|
-
PRESENTATION_TARGET_AUDIENCE["UNIVERSITY"] = "UNIVERSITY";
|
|
9
|
-
PRESENTATION_TARGET_AUDIENCE["BUSINESS"] = "BUSINESS";
|
|
10
|
-
})(PRESENTATION_TARGET_AUDIENCE || (exports.PRESENTATION_TARGET_AUDIENCE = PRESENTATION_TARGET_AUDIENCE = {}));
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PresentationTitlePageSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.PresentationTitlePageSchema = zod_1.z.object({
|
|
6
|
-
author: zod_1.z.string().optional().nullable(),
|
|
7
|
-
createdAt: zod_1.z.date().optional().nullable(),
|
|
8
|
-
email: zod_1.z.string().email().optional().nullable(),
|
|
9
|
-
});
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.JOB_REQUEST_ORIGIN = void 0;
|
|
4
|
-
var JOB_REQUEST_ORIGIN;
|
|
5
|
-
(function (JOB_REQUEST_ORIGIN) {
|
|
6
|
-
JOB_REQUEST_ORIGIN["API"] = "api";
|
|
7
|
-
JOB_REQUEST_ORIGIN["B2B"] = "b2b";
|
|
8
|
-
})(JOB_REQUEST_ORIGIN || (exports.JOB_REQUEST_ORIGIN = JOB_REQUEST_ORIGIN = {}));
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
export const PresentationTitlePageSchema = z.object({
|
|
4
|
-
author: z.string().optional().nullable(),
|
|
5
|
-
createdAt: z.date().optional().nullable(),
|
|
6
|
-
email: z.string().email().optional().nullable(),
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
export type PresentationTitlePage = z.infer<typeof PresentationTitlePageSchema>;
|