@purpleschool/gptbot-tools 0.2.21-stage → 0.2.23-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.
Files changed (117) 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/queries/get-html-page-builder-config.query.js +1 -2
  9. package/build/image-editor/commands/image-editor-model/get-image-editor-model-by-uuid.command.js +1 -0
  10. package/build/image-editor/commands/image-editor.command.js +2 -0
  11. package/build/image-editor/commands/retry-image-editor-job.command.js +2 -0
  12. package/build/image-editor/queries/get-image-editor-config.query.js +3 -2
  13. package/build/image-generation/commands/execute-image-generation.command.js +4 -2
  14. package/build/image-generation/commands/image-generation-model/get-image-generation-model-by-uuid.command.js +1 -0
  15. package/build/image-generation/commands/retry-image-generation-job.command.js +2 -0
  16. package/build/image-generation/models/image-generation-job.schema.js +3 -1
  17. package/build/image-generation/queries/find-image-generation-jobs.query.js +2 -2
  18. package/build/image-generation/queries/get-image-generation-config.query.js +3 -4
  19. package/build/interior-design/commands/get-interior-design-price.command.js +1 -0
  20. package/build/interior-design/commands/interior-design-model/get-interior-design-model-by-uuid.command.js +1 -0
  21. package/build/interior-design/commands/interior-design.command.js +1 -0
  22. package/build/interior-design/commands/retry-interior-design-job.command.js +2 -0
  23. package/build/interior-design/queries/get-interior-design-config.query.js +3 -2
  24. package/build/marketplace-card/commands/execute-marketplace-card.command.js +1 -0
  25. package/build/marketplace-card/commands/retry-marketplace-card-job.command.js +1 -0
  26. package/build/marketplace-card/queries/get-marketplace-card-config.query.js +1 -2
  27. package/build/music/commands/generate-lyrics.command.js +2 -0
  28. package/build/music/commands/generate-music.command.js +2 -0
  29. package/build/music/commands/music-model/get-music-model-by-uuid.command.js +1 -0
  30. package/build/music/commands/retry-music-job.command.js +2 -0
  31. package/build/music/queries/get-music-config.query.js +3 -2
  32. package/build/paraphrase/queries/get-paraphrase-tool-config.query.js +3 -2
  33. package/build/presentation/commands/create-presentation.command.js +1 -0
  34. package/build/presentation/commands/generate-and-insert-slide.command.js +1 -0
  35. package/build/presentation/commands/generate-slides.command.js +1 -0
  36. package/build/presentation/queries/get-presentation-config.query.js +1 -0
  37. package/build/solving-edu-task/commands/retry-solving-edu-task-job.command.js +2 -0
  38. package/build/solving-edu-task/commands/solving-edu-task.command.js +1 -0
  39. package/build/solving-edu-task/queries/get-solving-edu-task-config.query.js +1 -2
  40. package/build/spell-corrector/queries/get-spell-corrector-tool-config.query.js +3 -2
  41. package/build/stt/queries/get-stt-config.query.js +3 -2
  42. package/build/tools/enums/index.js +0 -1
  43. package/build/tools/events/tool-job-complete.event.js +2 -1
  44. package/build/tools/queries/find-all-tools.query.js +1 -0
  45. package/build/tools/queries/find-grouped-tools.query.js +1 -0
  46. package/build/tools/queries/get-global-tools-config.query.js +3 -2
  47. package/build/tools/queries/get-tools-with-configs.query.js +3 -2
  48. package/build/tts/queries/get-tts-config.query.js +3 -2
  49. package/build/video/commands/retry-video-job.command.js +2 -0
  50. package/build/video/commands/video-model/get-video-model-by-uuid.command.js +1 -0
  51. package/build/video/commands/video.command.js +2 -0
  52. package/build/video/queries/get-video-config.query.js +3 -2
  53. package/build/video-editor/commands/video-editor-model/get-video-editor-model.command.js +1 -0
  54. package/build/video-editor/queries/get-video-editor-config.query.js +3 -4
  55. package/build/writer/commands/create-writer-document.command.js +1 -0
  56. package/build/writer/commands/generate-document-outline.command.js +2 -0
  57. package/build/writer/queries/get-writer-config.query.js +1 -0
  58. package/common/models/index.ts +1 -0
  59. package/common/models/locale.schema.ts +11 -0
  60. package/diagrams/commands/diagrams.command.ts +2 -1
  61. package/diagrams/commands/edit-diagrams-job.command.ts +2 -1
  62. package/diagrams/commands/retry-diagrams-job.command.ts +2 -0
  63. package/diagrams/queries/get-diagrams-config.query.ts +3 -3
  64. package/html-page-builder/commands/get-html-page-builder-price.command.ts +19 -0
  65. package/html-page-builder/queries/get-html-page-builder-config.query.ts +2 -2
  66. package/image-editor/commands/image-editor-model/get-image-editor-model-by-uuid.command.ts +2 -1
  67. package/image-editor/commands/image-editor.command.ts +2 -0
  68. package/image-editor/commands/retry-image-editor-job.command.ts +2 -0
  69. package/image-editor/queries/get-image-editor-config.query.ts +4 -1
  70. package/image-generation/commands/execute-image-generation.command.ts +4 -2
  71. package/image-generation/commands/image-generation-model/get-image-generation-model-by-uuid.command.ts +2 -1
  72. package/image-generation/commands/retry-image-generation-job.command.ts +2 -0
  73. package/image-generation/models/image-generation-job.schema.ts +4 -2
  74. package/image-generation/queries/find-image-generation-jobs.query.ts +2 -2
  75. package/image-generation/queries/get-image-generation-config.query.ts +2 -2
  76. package/interior-design/commands/get-interior-design-price.command.ts +2 -1
  77. package/interior-design/commands/interior-design-model/get-interior-design-model-by-uuid.command.ts +2 -1
  78. package/interior-design/commands/interior-design.command.ts +2 -1
  79. package/interior-design/commands/retry-interior-design-job.command.ts +2 -0
  80. package/interior-design/queries/get-interior-design-config.query.ts +4 -1
  81. package/marketplace-card/commands/execute-marketplace-card.command.ts +2 -1
  82. package/marketplace-card/commands/retry-marketplace-card-job.command.ts +2 -1
  83. package/marketplace-card/queries/get-marketplace-card-config.query.ts +2 -2
  84. package/music/commands/generate-lyrics.command.ts +2 -0
  85. package/music/commands/generate-music.command.ts +2 -0
  86. package/music/commands/music-model/get-music-model-by-uuid.command.ts +2 -1
  87. package/music/commands/retry-music-job.command.ts +2 -0
  88. package/music/queries/get-music-config.query.ts +4 -1
  89. package/package.json +2 -1
  90. package/paraphrase/queries/get-paraphrase-tool-config.query.ts +4 -1
  91. package/presentation/commands/create-presentation.command.ts +2 -1
  92. package/presentation/commands/generate-and-insert-slide.command.ts +2 -1
  93. package/presentation/commands/generate-slides.command.ts +2 -1
  94. package/presentation/queries/get-presentation-config.query.ts +4 -1
  95. package/solving-edu-task/commands/retry-solving-edu-task-job.command.ts +2 -0
  96. package/solving-edu-task/commands/solving-edu-task.command.ts +2 -1
  97. package/solving-edu-task/queries/get-solving-edu-task-config.query.ts +2 -2
  98. package/spell-corrector/queries/get-spell-corrector-tool-config.query.ts +4 -1
  99. package/stt/queries/get-stt-config.query.ts +4 -1
  100. package/tools/enums/index.ts +0 -1
  101. package/tools/events/tool-job-complete.event.ts +3 -2
  102. package/tools/queries/find-all-tools.query.ts +4 -1
  103. package/tools/queries/find-grouped-tools.query.ts +4 -1
  104. package/tools/queries/get-global-tools-config.query.ts +4 -1
  105. package/tools/queries/get-tools-with-configs.query.ts +4 -1
  106. package/tts/queries/get-tts-config.query.ts +4 -1
  107. package/video/commands/retry-video-job.command.ts +2 -0
  108. package/video/commands/video-model/get-video-model-by-uuid.command.ts +2 -1
  109. package/video/commands/video.command.ts +2 -0
  110. package/video/queries/get-video-config.query.ts +4 -1
  111. package/video-editor/commands/video-editor-model/get-video-editor-model.command.ts +2 -1
  112. package/video-editor/queries/get-video-editor-config.query.ts +2 -2
  113. package/writer/commands/create-writer-document.command.ts +2 -1
  114. package/writer/commands/generate-document-outline.command.ts +2 -0
  115. package/writer/queries/get-writer-config.query.ts +4 -1
  116. package/build/tools/enums/job-request-origin.enum.js +0 -8
  117. package/tools/enums/job-request-origin.enum.ts +0 -4
@@ -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,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,4 +0,0 @@
1
- export enum JOB_REQUEST_ORIGIN {
2
- API = 'api',
3
- B2B = 'b2b',
4
- }