@purpleschool/gptbot-tools 0.2.18-stage → 0.2.18-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.
Files changed (125) hide show
  1. package/build/common/models/index.js +1 -0
  2. package/build/common/models/locale.schema.js +9 -0
  3. package/build/diagrams/commands/diagrams.command.js +1 -0
  4. package/build/diagrams/commands/edit-diagrams-job.command.js +1 -0
  5. package/build/diagrams/commands/retry-diagrams-job.command.js +2 -0
  6. package/build/diagrams/queries/get-diagrams-config.query.js +3 -4
  7. package/build/html-page-builder/commands/get-html-page-builder-price.command.js +17 -0
  8. package/build/html-page-builder/commands/html-page-builder-execute.command.js +12 -1
  9. package/build/html-page-builder/commands/index.js +1 -1
  10. package/build/html-page-builder/queries/get-html-page-builder-config.query.js +1 -2
  11. package/build/html-page-builder/routes/html-page-builder.amqp.routes.js +1 -1
  12. package/build/image-editor/commands/image-editor-model/get-image-editor-model-by-uuid.command.js +1 -0
  13. package/build/image-editor/commands/image-editor.command.js +2 -0
  14. package/build/image-editor/commands/retry-image-editor-job.command.js +2 -0
  15. package/build/image-editor/queries/get-image-editor-config.query.js +3 -2
  16. package/build/image-generation/commands/execute-image-generation.command.js +4 -2
  17. package/build/image-generation/commands/image-generation-model/get-image-generation-model-by-uuid.command.js +1 -0
  18. package/build/image-generation/commands/retry-image-generation-job.command.js +2 -0
  19. package/build/image-generation/models/image-generation-job.schema.js +3 -1
  20. package/build/image-generation/queries/find-image-generation-jobs.query.js +2 -2
  21. package/build/image-generation/queries/get-image-generation-config.query.js +3 -4
  22. package/build/interior-design/commands/get-interior-design-price.command.js +1 -0
  23. package/build/interior-design/commands/interior-design-model/get-interior-design-model-by-uuid.command.js +1 -0
  24. package/build/interior-design/commands/interior-design.command.js +1 -0
  25. package/build/interior-design/commands/retry-interior-design-job.command.js +2 -0
  26. package/build/interior-design/queries/get-interior-design-config.query.js +3 -2
  27. package/build/marketplace-card/commands/execute-marketplace-card.command.js +1 -0
  28. package/build/marketplace-card/commands/retry-marketplace-card-job.command.js +1 -0
  29. package/build/marketplace-card/queries/get-marketplace-card-config.query.js +1 -2
  30. package/build/music/commands/generate-lyrics.command.js +2 -0
  31. package/build/music/commands/generate-music.command.js +2 -0
  32. package/build/music/commands/music-model/get-music-model-by-uuid.command.js +1 -0
  33. package/build/music/commands/retry-music-job.command.js +2 -0
  34. package/build/music/queries/get-music-config.query.js +3 -2
  35. package/build/paraphrase/queries/get-paraphrase-tool-config.query.js +3 -2
  36. package/build/presentation/commands/create-presentation.command.js +1 -0
  37. package/build/presentation/commands/generate-and-insert-slide.command.js +1 -0
  38. package/build/presentation/commands/generate-slides.command.js +1 -0
  39. package/build/presentation/queries/get-presentation-config.query.js +1 -0
  40. package/build/solving-edu-task/commands/retry-solving-edu-task-job.command.js +2 -0
  41. package/build/solving-edu-task/commands/solving-edu-task.command.js +1 -0
  42. package/build/solving-edu-task/queries/get-solving-edu-task-config.query.js +1 -2
  43. package/build/spell-corrector/queries/get-spell-corrector-tool-config.query.js +3 -2
  44. package/build/stt/queries/get-stt-config.query.js +3 -2
  45. package/build/tools/enums/index.js +0 -1
  46. package/build/tools/events/tool-job-complete.event.js +2 -1
  47. package/build/tools/queries/find-all-tools.query.js +1 -0
  48. package/build/tools/queries/find-grouped-tools.query.js +1 -0
  49. package/build/tools/queries/get-global-tools-config.query.js +3 -2
  50. package/build/tools/queries/get-tools-with-configs.query.js +3 -2
  51. package/build/tts/queries/get-tts-config.query.js +3 -2
  52. package/build/video/commands/retry-video-job.command.js +2 -0
  53. package/build/video/commands/video-model/get-video-model-by-uuid.command.js +1 -0
  54. package/build/video/commands/video.command.js +2 -0
  55. package/build/video/queries/get-video-config.query.js +3 -2
  56. package/build/video-editor/commands/video-editor-model/get-video-editor-model.command.js +1 -0
  57. package/build/video-editor/queries/get-video-editor-config.query.js +3 -4
  58. package/build/writer/commands/create-writer-document.command.js +1 -0
  59. package/build/writer/commands/generate-document-outline.command.js +2 -0
  60. package/build/writer/queries/get-writer-config.query.js +1 -0
  61. package/common/models/index.ts +1 -0
  62. package/common/models/locale.schema.ts +11 -0
  63. package/diagrams/commands/diagrams.command.ts +2 -1
  64. package/diagrams/commands/edit-diagrams-job.command.ts +2 -1
  65. package/diagrams/commands/retry-diagrams-job.command.ts +2 -0
  66. package/diagrams/queries/get-diagrams-config.query.ts +3 -3
  67. package/html-page-builder/commands/get-html-page-builder-price.command.ts +19 -0
  68. package/html-page-builder/commands/html-page-builder-execute.command.ts +24 -10
  69. package/html-page-builder/commands/index.ts +1 -1
  70. package/html-page-builder/queries/get-html-page-builder-config.query.ts +2 -2
  71. package/html-page-builder/routes/html-page-builder.amqp.routes.ts +1 -1
  72. package/image-editor/commands/image-editor-model/get-image-editor-model-by-uuid.command.ts +2 -1
  73. package/image-editor/commands/image-editor.command.ts +2 -0
  74. package/image-editor/commands/retry-image-editor-job.command.ts +2 -0
  75. package/image-editor/queries/get-image-editor-config.query.ts +4 -1
  76. package/image-generation/commands/execute-image-generation.command.ts +4 -2
  77. package/image-generation/commands/image-generation-model/get-image-generation-model-by-uuid.command.ts +2 -1
  78. package/image-generation/commands/retry-image-generation-job.command.ts +2 -0
  79. package/image-generation/models/image-generation-job.schema.ts +4 -2
  80. package/image-generation/queries/find-image-generation-jobs.query.ts +2 -2
  81. package/image-generation/queries/get-image-generation-config.query.ts +2 -2
  82. package/interior-design/commands/get-interior-design-price.command.ts +2 -1
  83. package/interior-design/commands/interior-design-model/get-interior-design-model-by-uuid.command.ts +2 -1
  84. package/interior-design/commands/interior-design.command.ts +2 -1
  85. package/interior-design/commands/retry-interior-design-job.command.ts +2 -0
  86. package/interior-design/queries/get-interior-design-config.query.ts +4 -1
  87. package/marketplace-card/commands/execute-marketplace-card.command.ts +2 -1
  88. package/marketplace-card/commands/retry-marketplace-card-job.command.ts +2 -1
  89. package/marketplace-card/queries/get-marketplace-card-config.query.ts +2 -2
  90. package/music/commands/generate-lyrics.command.ts +2 -0
  91. package/music/commands/generate-music.command.ts +2 -0
  92. package/music/commands/music-model/get-music-model-by-uuid.command.ts +2 -1
  93. package/music/commands/retry-music-job.command.ts +2 -0
  94. package/music/queries/get-music-config.query.ts +4 -1
  95. package/package.json +2 -1
  96. package/paraphrase/queries/get-paraphrase-tool-config.query.ts +4 -1
  97. package/presentation/commands/create-presentation.command.ts +2 -1
  98. package/presentation/commands/generate-and-insert-slide.command.ts +2 -1
  99. package/presentation/commands/generate-slides.command.ts +2 -1
  100. package/presentation/queries/get-presentation-config.query.ts +4 -1
  101. package/solving-edu-task/commands/retry-solving-edu-task-job.command.ts +2 -0
  102. package/solving-edu-task/commands/solving-edu-task.command.ts +2 -1
  103. package/solving-edu-task/queries/get-solving-edu-task-config.query.ts +2 -2
  104. package/spell-corrector/queries/get-spell-corrector-tool-config.query.ts +4 -1
  105. package/stt/queries/get-stt-config.query.ts +4 -1
  106. package/tools/enums/index.ts +0 -1
  107. package/tools/events/tool-job-complete.event.ts +3 -2
  108. package/tools/queries/find-all-tools.query.ts +4 -1
  109. package/tools/queries/find-grouped-tools.query.ts +4 -1
  110. package/tools/queries/get-global-tools-config.query.ts +4 -1
  111. package/tools/queries/get-tools-with-configs.query.ts +4 -1
  112. package/tts/queries/get-tts-config.query.ts +4 -1
  113. package/video/commands/retry-video-job.command.ts +2 -0
  114. package/video/commands/video-model/get-video-model-by-uuid.command.ts +2 -1
  115. package/video/commands/video.command.ts +2 -0
  116. package/video/queries/get-video-config.query.ts +4 -1
  117. package/video-editor/commands/video-editor-model/get-video-editor-model.command.ts +2 -1
  118. package/video-editor/queries/get-video-editor-config.query.ts +2 -2
  119. package/writer/commands/create-writer-document.command.ts +2 -1
  120. package/writer/commands/generate-document-outline.command.ts +2 -0
  121. package/writer/queries/get-writer-config.query.ts +4 -1
  122. package/build/html-page-builder/commands/get-html-page-builder-price-calculation-data.command.js +0 -36
  123. package/build/tools/enums/job-request-origin.enum.js +0 -8
  124. package/html-page-builder/commands/get-html-page-builder-price-calculation-data.command.ts +0 -38
  125. package/tools/enums/job-request-origin.enum.ts +0 -4
@@ -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,9 +1,11 @@
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';
4
5
 
5
6
  export namespace RetryMusicJobCommand {
6
7
  export const RequestSchema = z.object({
8
+ locale: LocaleSchema,
7
9
  uuid: z.string().uuid(),
8
10
  userId: z.string().uuid().nullable().optional(),
9
11
  unregisteredUserId: z.string().uuid().nullable().optional(),
@@ -1,8 +1,11 @@
1
1
  import { z } from 'zod';
2
- import { ICommandResponseSchema } from '../../common/models/command-response.schema';
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.2.18-stage",
3
+ "version": "0.2.18-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/models/command-response.schema';
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,10 +1,11 @@
1
1
  import { z } from 'zod';
2
- import { ICommandResponseSchema } from '../../common';
2
+ import { ICommandResponseSchema, LocaleSchema } 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,
8
9
  userId: z.string().uuid().nullable().optional(),
9
10
  unregisteredUserId: z.string().uuid().nullable().optional(),
10
11
  templateId: z.string().uuid(),
@@ -1,10 +1,11 @@
1
1
  import { z } from 'zod';
2
- import { ICommandResponseSchema } from '../../common';
2
+ import { ICommandResponseSchema, LocaleSchema } 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,
8
9
  userId: z.string().uuid().nullable().optional(),
9
10
  unregisteredUserId: z.string().uuid().nullable().optional(),
10
11
  userBalance: z.number(),
@@ -1,9 +1,10 @@
1
1
  import { z } from 'zod';
2
- import { ICommandResponseSchema } from '../../common';
2
+ import { ICommandResponseSchema, LocaleSchema } 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,
7
8
  uuid: z.string().uuid(),
8
9
  userId: z.string().uuid().nullable().optional(),
9
10
  unregisteredUserId: z.string().uuid().nullable().optional(),
@@ -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,10 +1,12 @@
1
1
  import { z } from 'zod';
2
2
  import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
+ import { LocaleSchema } from '../../common/models/locale.schema';
3
4
  import { SolvingEduTaskJobSchema } from '../models';
4
5
  import { AttachedFileSchema } from '../../common';
5
6
 
6
7
  export namespace RetrySolvingEduTaskJobCommand {
7
8
  export const RequestSchema = z.object({
9
+ locale: LocaleSchema,
8
10
  uuid: z.string().uuid(),
9
11
  tokenReservationId: z.string().uuid().optional(),
10
12
  precalculatedPrice: z.number().optional(),
@@ -1,10 +1,11 @@
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 } from '../../common';
4
+ import { AttachedFileSchema, LocaleSchema } from '../../common';
5
5
 
6
6
  export namespace SolvingEduTaskCommand {
7
7
  export const RequestSchema = z.object({
8
+ locale: LocaleSchema,
8
9
  userId: z.string().uuid().nullable().optional(),
9
10
  unregisteredUserId: z.string().uuid().nullable().optional(),
10
11
  prompt: z.string(),
@@ -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 = z.object({});
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/models/command-response.schema';
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/models/command-response.schema';
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
  }
@@ -2,4 +2,3 @@ export * from './job-status.enum';
2
2
  export * from './tool-type.enum';
3
3
  export * from './tool-content-type.enum';
4
4
  export * from './tool-group.enum';
5
- export * from './job-request-origin.enum';
@@ -1,4 +1,5 @@
1
- import { JOB_REQUEST_ORIGIN, TOOL_TYPE } from '../enums';
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
- origin: z.nativeEnum(JOB_REQUEST_ORIGIN).optional(),
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
2
  import { ToolGroupSchema } from '../models';
3
- import { ICommandResponseSchema } from '../../common';
3
+ import { ICommandResponseSchema, LocaleRequestSchema } from '../../common';
4
4
 
5
5
  export namespace FindGroupedToolsQuery {
6
+ export const RequestSchema = LocaleRequestSchema;
7
+ export type Request = z.infer<typeof RequestSchema>;
8
+
6
9
  export const ResponseSchema = ICommandResponseSchema(z.array(ToolGroupSchema));
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/models/command-response.schema';
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/models/command-response.schema';
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,8 +1,11 @@
1
1
  import { z } from 'zod';
2
- import { ICommandResponseSchema } from '../../common/models/command-response.schema';
2
+ import { ICommandResponseSchema, LocaleRequestSchema } from '../../common';
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
+
6
9
  export const ResponseSchema = ICommandResponseSchema(TTSConfigSchema);
7
10
  export type Response = z.infer<typeof ResponseSchema>;
8
11
  }
@@ -2,9 +2,11 @@ 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';
5
6
 
6
7
  export namespace RetryVideoJobCommand {
7
8
  export const RequestSchema = z.object({
9
+ locale: LocaleSchema,
8
10
  uuid: z.string().uuid(),
9
11
  userId: z.string().uuid().nullable().optional(),
10
12
  unregisteredUserId: z.string().uuid().nullable().optional(),
@@ -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,5 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
+ import { LocaleSchema } from '../../common/models/locale.schema';
3
4
  import { TOOL_WORKSPACE_ITEM_SLOT } from '../../tool-workspace';
4
5
  import { TOOL_CONTENT_TYPE } from '../../tools';
5
6
  import { VideoJobSchema } from '../models/video-job.schema';
@@ -7,6 +8,7 @@ import { VideoGenerationRequestParamsSchema } from '../models';
7
8
 
8
9
  export namespace VideoCommand {
9
10
  export const RequestSchema = z.object({
11
+ locale: LocaleSchema,
10
12
  userId: z.string().uuid().nullable().optional(),
11
13
  unregisteredUserId: z.string().uuid().nullable().optional(),
12
14
  workspaceId: z.string().uuid().nullable().optional(),
@@ -1,8 +1,11 @@
1
1
  import { z } from 'zod';
2
- import { ICommandResponseSchema } from '../../common/models/command-response.schema';
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/models/command-response.schema';
2
+ import { ICommandResponseSchema, LocaleRequestSchema } from '../../common';
3
3
  import { VideoEditorConfigSchema } from '../models';
4
4
 
5
5
  export namespace GetVideoEditorConfigQuery {
6
- export const RequestSchema = z.object({});
6
+ export const RequestSchema = LocaleRequestSchema;
7
7
  export type Request = z.infer<typeof RequestSchema>;
8
8
 
9
9
  export const ResponseSchema = ICommandResponseSchema(VideoEditorConfigSchema);
@@ -1,9 +1,10 @@
1
1
  import { z } from 'zod';
2
- import { ICommandResponseSchema } from '../../common';
2
+ import { ICommandResponseSchema, LocaleSchema } 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,
7
8
  userId: z.string().uuid().nullable().optional(),
8
9
  unregisteredUserId: z.string().uuid().nullable().optional(),
9
10
  prompt: z.string(),
@@ -1,10 +1,12 @@
1
1
  import { z } from 'zod';
2
2
  import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
+ import { LocaleSchema } from '../../common/models/locale.schema';
3
4
  import { WriterDocumentSchema } from '../models';
4
5
 
5
6
  export namespace GenerateWriterDocumentOutlineCommand {
6
7
  export const RequestSchema = z.object({
7
8
  uuid: z.string().uuid(),
9
+ locale: LocaleSchema,
8
10
  numPages: z.number(),
9
11
  description: z.string().nullable().optional(),
10
12
  userId: z.string().uuid().nullable().optional(),
@@ -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,36 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetHtmlPageBuilderPriceCalculationDataCommand = void 0;
4
- const zod_1 = require("zod");
5
- const command_response_schema_1 = require("../../common/models/command-response.schema");
6
- const enums_1 = require("../enums");
7
- var GetHtmlPageBuilderPriceCalculationDataCommand;
8
- (function (GetHtmlPageBuilderPriceCalculationDataCommand) {
9
- GetHtmlPageBuilderPriceCalculationDataCommand.RequestSchema = zod_1.z.object({
10
- modelId: zod_1.z.string().uuid(),
11
- inputLength: zod_1.z.number().int().nonnegative(),
12
- sessionId: zod_1.z.string().uuid().nullable().optional(),
13
- });
14
- GetHtmlPageBuilderPriceCalculationDataCommand.ResponseDataSchema = zod_1.z.object({
15
- modelPricing: zod_1.z.object({
16
- inputPrice: zod_1.z.number(),
17
- outputPrice: zod_1.z.number(),
18
- }),
19
- effectivePromptLength: zod_1.z.number(),
20
- breakdown: zod_1.z.object({
21
- systemPromptLength: zod_1.z.number(),
22
- inputLength: zod_1.z.number(),
23
- currentHtmlLength: zod_1.z.number(),
24
- userPromptTemplateOverheadLength: zod_1.z.number(),
25
- modeHintLength: zod_1.z.number(),
26
- userMessageLength: zod_1.z.number(),
27
- attachmentsTextLength: zod_1.z.number(),
28
- }),
29
- metadata: zod_1.z.object({
30
- mode: zod_1.z.nativeEnum(enums_1.HTML_PAGE_BUILDER_SESSION_STAGE),
31
- modelId: zod_1.z.string().uuid(),
32
- sessionId: zod_1.z.string().uuid().nullable(),
33
- }),
34
- });
35
- GetHtmlPageBuilderPriceCalculationDataCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(GetHtmlPageBuilderPriceCalculationDataCommand.ResponseDataSchema);
36
- })(GetHtmlPageBuilderPriceCalculationDataCommand || (exports.GetHtmlPageBuilderPriceCalculationDataCommand = GetHtmlPageBuilderPriceCalculationDataCommand = {}));
@@ -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,38 +0,0 @@
1
- import { z } from 'zod';
2
- import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
- import { HTML_PAGE_BUILDER_SESSION_STAGE } from '../enums';
4
-
5
- export namespace GetHtmlPageBuilderPriceCalculationDataCommand {
6
- export const RequestSchema = z.object({
7
- modelId: z.string().uuid(),
8
- inputLength: z.number().int().nonnegative(),
9
- sessionId: z.string().uuid().nullable().optional(),
10
- });
11
- export type Request = z.infer<typeof RequestSchema>;
12
-
13
- export const ResponseDataSchema = z.object({
14
- modelPricing: z.object({
15
- inputPrice: z.number(),
16
- outputPrice: z.number(),
17
- }),
18
- effectivePromptLength: z.number(),
19
- breakdown: z.object({
20
- systemPromptLength: z.number(),
21
- inputLength: z.number(),
22
- currentHtmlLength: z.number(),
23
- userPromptTemplateOverheadLength: z.number(),
24
- modeHintLength: z.number(),
25
- userMessageLength: z.number(),
26
- attachmentsTextLength: z.number(),
27
- }),
28
- metadata: z.object({
29
- mode: z.nativeEnum(HTML_PAGE_BUILDER_SESSION_STAGE),
30
- modelId: z.string().uuid(),
31
- sessionId: z.string().uuid().nullable(),
32
- }),
33
- });
34
- export type ResponseData = z.infer<typeof ResponseDataSchema>;
35
-
36
- export const ResponseSchema = ICommandResponseSchema(ResponseDataSchema);
37
- export type Response = z.infer<typeof ResponseSchema>;
38
- }
@@ -1,4 +0,0 @@
1
- export enum JOB_REQUEST_ORIGIN {
2
- API = 'api',
3
- B2B = 'b2b',
4
- }