@purpleschool/gptbot-tools 0.2.12-stage → 0.2.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.
Files changed (77) 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/queries/get-diagrams-config.query.js +3 -4
  4. package/build/html-page-builder/queries/get-html-page-builder-config.query.js +1 -2
  5. package/build/image-editor/commands/image-editor-model/get-image-editor-model-by-uuid.command.js +1 -0
  6. package/build/image-editor/queries/get-image-editor-config.query.js +3 -2
  7. package/build/image-generation/commands/execute-image-generation.command.js +2 -2
  8. package/build/image-generation/commands/image-generation-model/get-image-generation-model-by-uuid.command.js +1 -0
  9. package/build/image-generation/models/image-generation-job.schema.js +3 -1
  10. package/build/image-generation/queries/find-image-generation-jobs.query.js +2 -2
  11. package/build/image-generation/queries/get-image-generation-config.query.js +3 -4
  12. package/build/interior-design/commands/interior-design-model/get-interior-design-model-by-uuid.command.js +1 -0
  13. package/build/interior-design/queries/get-interior-design-config.query.js +3 -2
  14. package/build/marketplace-card/queries/get-marketplace-card-config.query.js +1 -2
  15. package/build/music/commands/music-model/get-music-model-by-uuid.command.js +1 -0
  16. package/build/music/queries/get-music-config.query.js +3 -2
  17. package/build/paraphrase/queries/get-paraphrase-tool-config.query.js +3 -2
  18. package/build/presentation/commands/create-presentation.command.js +1 -0
  19. package/build/presentation/queries/get-presentation-config.query.js +1 -0
  20. package/build/solving-edu-task/queries/get-solving-edu-task-config.query.js +1 -2
  21. package/build/spell-corrector/queries/get-spell-corrector-tool-config.query.js +3 -2
  22. package/build/stt/queries/get-stt-config.query.js +3 -2
  23. package/build/tools/enums/index.js +0 -1
  24. package/build/tools/events/tool-job-complete.event.js +2 -1
  25. package/build/tools/queries/find-all-tools.query.js +1 -0
  26. package/build/tools/queries/find-grouped-tools.query.js +1 -0
  27. package/build/tools/queries/get-global-tools-config.query.js +3 -2
  28. package/build/tools/queries/get-tools-with-configs.query.js +3 -2
  29. package/build/tts/queries/get-tts-config.query.js +3 -2
  30. package/build/video/commands/video-model/get-video-model-by-uuid.command.js +1 -0
  31. package/build/video/enums/video-strategy.enum.js +1 -0
  32. package/build/video/queries/get-video-config.query.js +3 -2
  33. package/build/video-editor/commands/video-editor-model/get-video-editor-model.command.js +1 -0
  34. package/build/video-editor/queries/get-video-editor-config.query.js +3 -4
  35. package/build/writer/commands/create-writer-document.command.js +1 -0
  36. package/build/writer/commands/generate-document-outline.command.js +2 -0
  37. package/build/writer/queries/get-writer-config.query.js +1 -0
  38. package/common/models/index.ts +1 -0
  39. package/common/models/locale.schema.ts +11 -0
  40. package/diagrams/queries/get-diagrams-config.query.ts +3 -3
  41. package/html-page-builder/queries/get-html-page-builder-config.query.ts +2 -2
  42. package/image-editor/commands/image-editor-model/get-image-editor-model-by-uuid.command.ts +2 -1
  43. package/image-editor/queries/get-image-editor-config.query.ts +4 -1
  44. package/image-generation/commands/execute-image-generation.command.ts +2 -2
  45. package/image-generation/commands/image-generation-model/get-image-generation-model-by-uuid.command.ts +2 -1
  46. package/image-generation/models/image-generation-job.schema.ts +4 -2
  47. package/image-generation/queries/find-image-generation-jobs.query.ts +2 -2
  48. package/image-generation/queries/get-image-generation-config.query.ts +2 -2
  49. package/interior-design/commands/interior-design-model/get-interior-design-model-by-uuid.command.ts +2 -1
  50. package/interior-design/queries/get-interior-design-config.query.ts +4 -1
  51. package/marketplace-card/queries/get-marketplace-card-config.query.ts +2 -2
  52. package/music/commands/music-model/get-music-model-by-uuid.command.ts +2 -1
  53. package/music/queries/get-music-config.query.ts +4 -1
  54. package/package.json +2 -1
  55. package/paraphrase/queries/get-paraphrase-tool-config.query.ts +4 -1
  56. package/presentation/commands/create-presentation.command.ts +2 -1
  57. package/presentation/queries/get-presentation-config.query.ts +4 -1
  58. package/solving-edu-task/queries/get-solving-edu-task-config.query.ts +2 -2
  59. package/spell-corrector/queries/get-spell-corrector-tool-config.query.ts +4 -1
  60. package/stt/queries/get-stt-config.query.ts +4 -1
  61. package/tools/enums/index.ts +0 -1
  62. package/tools/events/tool-job-complete.event.ts +3 -2
  63. package/tools/queries/find-all-tools.query.ts +4 -1
  64. package/tools/queries/find-grouped-tools.query.ts +4 -1
  65. package/tools/queries/get-global-tools-config.query.ts +4 -1
  66. package/tools/queries/get-tools-with-configs.query.ts +4 -1
  67. package/tts/queries/get-tts-config.query.ts +4 -1
  68. package/video/commands/video-model/get-video-model-by-uuid.command.ts +2 -1
  69. package/video/enums/video-strategy.enum.ts +1 -0
  70. package/video/queries/get-video-config.query.ts +4 -1
  71. package/video-editor/commands/video-editor-model/get-video-editor-model.command.ts +2 -1
  72. package/video-editor/queries/get-video-editor-config.query.ts +2 -2
  73. package/writer/commands/create-writer-document.command.ts +2 -1
  74. package/writer/commands/generate-document-outline.command.ts +2 -0
  75. package/writer/queries/get-writer-config.query.ts +4 -1
  76. package/build/tools/enums/job-request-origin.enum.js +0 -8
  77. package/tools/enums/job-request-origin.enum.ts +0 -4
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./command-response.schema"), exports);
18
18
  __exportStar(require("./icon-variants.schema"), exports);
19
19
  __exportStar(require("./attached-file.schema"), exports);
20
+ __exportStar(require("./locale.schema"), exports);
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LocaleRequestSchema = exports.LocaleSchema = void 0;
4
+ const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
5
+ const zod_1 = require("zod");
6
+ exports.LocaleSchema = zod_1.z.nativeEnum(rugpt_lib_common_1.LOCALE);
7
+ exports.LocaleRequestSchema = zod_1.z.object({
8
+ locale: exports.LocaleSchema,
9
+ });
@@ -1,11 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GetDiagramsConfigQuery = void 0;
4
- const zod_1 = require("zod");
5
- const command_response_schema_1 = require("../../common/models/command-response.schema");
4
+ const common_1 = require("../../common");
6
5
  const models_1 = require("../models");
7
6
  var GetDiagramsConfigQuery;
8
7
  (function (GetDiagramsConfigQuery) {
9
- GetDiagramsConfigQuery.Request = zod_1.z.object({});
10
- GetDiagramsConfigQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.DiagramsConfigSchema);
8
+ GetDiagramsConfigQuery.RequestSchema = common_1.LocaleRequestSchema;
9
+ GetDiagramsConfigQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.DiagramsConfigSchema);
11
10
  })(GetDiagramsConfigQuery || (exports.GetDiagramsConfigQuery = GetDiagramsConfigQuery = {}));
@@ -1,11 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GetHtmlPageBuilderConfigQuery = void 0;
4
- const zod_1 = require("zod");
5
4
  const common_1 = require("../../common");
6
5
  const models_1 = require("../models");
7
6
  var GetHtmlPageBuilderConfigQuery;
8
7
  (function (GetHtmlPageBuilderConfigQuery) {
9
- GetHtmlPageBuilderConfigQuery.RequestSchema = zod_1.z.object({});
8
+ GetHtmlPageBuilderConfigQuery.RequestSchema = common_1.LocaleRequestSchema;
10
9
  GetHtmlPageBuilderConfigQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.HtmlPageBuilderConfigSchema);
11
10
  })(GetHtmlPageBuilderConfigQuery || (exports.GetHtmlPageBuilderConfigQuery = GetHtmlPageBuilderConfigQuery = {}));
@@ -8,6 +8,7 @@ var GetImageEditorModelByUuidCommand;
8
8
  (function (GetImageEditorModelByUuidCommand) {
9
9
  GetImageEditorModelByUuidCommand.RequestSchema = zod_1.z.object({
10
10
  uuid: zod_1.z.string().uuid(),
11
+ locale: common_1.LocaleSchema,
11
12
  });
12
13
  GetImageEditorModelByUuidCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.ImageEditorModelSchema);
13
14
  })(GetImageEditorModelByUuidCommand || (exports.GetImageEditorModelByUuidCommand = GetImageEditorModelByUuidCommand = {}));
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GetImageEditorConfigQuery = void 0;
4
- const command_response_schema_1 = require("../../common/models/command-response.schema");
4
+ const common_1 = require("../../common");
5
5
  const models_1 = require("../models");
6
6
  var GetImageEditorConfigQuery;
7
7
  (function (GetImageEditorConfigQuery) {
8
- GetImageEditorConfigQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.ImageEditorConfigSchema);
8
+ GetImageEditorConfigQuery.RequestSchema = common_1.LocaleRequestSchema;
9
+ GetImageEditorConfigQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.ImageEditorConfigSchema);
9
10
  })(GetImageEditorConfigQuery || (exports.GetImageEditorConfigQuery = GetImageEditorConfigQuery = {}));
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ExecuteImageGenerationCommand = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const command_response_schema_1 = require("../../common/models/command-response.schema");
6
- const tools_1 = require("../../tools");
7
6
  const models_1 = require("../models");
7
+ const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
8
8
  var ExecuteImageGenerationCommand;
9
9
  (function (ExecuteImageGenerationCommand) {
10
10
  ExecuteImageGenerationCommand.RequestSchema = zod_1.z.object({
@@ -14,7 +14,7 @@ var ExecuteImageGenerationCommand;
14
14
  modelId: zod_1.z.string().uuid(),
15
15
  params: models_1.ImageGenerationRequestParamsSchema,
16
16
  presetId: zod_1.z.string().uuid().nullable().optional(),
17
- origin: zod_1.z.nativeEnum(tools_1.JOB_REQUEST_ORIGIN).default(tools_1.JOB_REQUEST_ORIGIN.API),
17
+ callOrigin: zod_1.z.nativeEnum(rugpt_lib_common_1.STATISTICS_CALL_ORIGIN).default(rugpt_lib_common_1.STATISTICS_CALL_ORIGIN.WEB),
18
18
  userHasActiveSubscriptionOrProduct: zod_1.z.boolean(),
19
19
  tokenReservationId: zod_1.z.string().uuid(),
20
20
  precalculatedPrice: zod_1.z.number(),
@@ -8,6 +8,7 @@ var GetImageGenerationModelByUuidCommand;
8
8
  (function (GetImageGenerationModelByUuidCommand) {
9
9
  GetImageGenerationModelByUuidCommand.RequestSchema = zod_1.z.object({
10
10
  uuid: zod_1.z.string().uuid(),
11
+ locale: common_1.LocaleSchema,
11
12
  });
12
13
  GetImageGenerationModelByUuidCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.ImageGenerationModelSchema);
13
14
  })(GetImageGenerationModelByUuidCommand || (exports.GetImageGenerationModelByUuidCommand = GetImageGenerationModelByUuidCommand = {}));
@@ -5,6 +5,7 @@ const zod_1 = require("zod");
5
5
  const tools_1 = require("../../tools");
6
6
  const common_1 = require("../../common");
7
7
  const enums_1 = require("../enums");
8
+ const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
8
9
  exports.ImageGenerationJobParamsSchema = zod_1.z.object({
9
10
  aspectRatio: zod_1.z.string(),
10
11
  attachedFiles: zod_1.z.array(common_1.AttachedFileSchema),
@@ -30,7 +31,8 @@ exports.ImageGenerationJobSchema = zod_1.z.object({
30
31
  userId: zod_1.z.string().nullable().optional(),
31
32
  unregisteredUserId: zod_1.z.string().nullable().optional(),
32
33
  isPublished: zod_1.z.boolean(),
33
- origin: zod_1.z.nativeEnum(tools_1.JOB_REQUEST_ORIGIN),
34
+ origin: zod_1.z.string(),
35
+ callOrigin: zod_1.z.nativeEnum(rugpt_lib_common_1.STATISTICS_CALL_ORIGIN),
34
36
  postId: zod_1.z.string().nullable(),
35
37
  isDeleted: zod_1.z.boolean(),
36
38
  internalError: zod_1.z.string().nullable(),
@@ -4,7 +4,7 @@ exports.FindImageGenerationJobsQuery = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const command_response_schema_1 = require("../../common/models/command-response.schema");
6
6
  const models_1 = require("../models");
7
- const job_request_origin_enum_1 = require("../../tools/enums/job-request-origin.enum");
7
+ const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
8
8
  var FindImageGenerationJobsQuery;
9
9
  (function (FindImageGenerationJobsQuery) {
10
10
  FindImageGenerationJobsQuery.RequestSchema = zod_1.z
@@ -14,7 +14,7 @@ var FindImageGenerationJobsQuery;
14
14
  title: zod_1.z.string().optional(),
15
15
  limit: zod_1.z.coerce.number().min(1).optional(),
16
16
  offset: zod_1.z.coerce.number().min(0).default(0).optional(),
17
- origin: zod_1.z.nativeEnum(job_request_origin_enum_1.JOB_REQUEST_ORIGIN).optional(),
17
+ callOrigin: zod_1.z.nativeEnum(rugpt_lib_common_1.STATISTICS_CALL_ORIGIN).optional(),
18
18
  })
19
19
  .refine((data) => {
20
20
  return Boolean(data.userId) !== Boolean(data.unregisteredUserId);
@@ -1,11 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GetImageGenerationConfigQuery = void 0;
4
- const zod_1 = require("zod");
5
- const command_response_schema_1 = require("../../common/models/command-response.schema");
4
+ const common_1 = require("../../common");
6
5
  const models_1 = require("../models");
7
6
  var GetImageGenerationConfigQuery;
8
7
  (function (GetImageGenerationConfigQuery) {
9
- GetImageGenerationConfigQuery.RequestSchema = zod_1.z.object({});
10
- GetImageGenerationConfigQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.ImageGenerationConfigSchema);
8
+ GetImageGenerationConfigQuery.RequestSchema = common_1.LocaleRequestSchema;
9
+ GetImageGenerationConfigQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.ImageGenerationConfigSchema);
11
10
  })(GetImageGenerationConfigQuery || (exports.GetImageGenerationConfigQuery = GetImageGenerationConfigQuery = {}));
@@ -8,6 +8,7 @@ var GetInteriorDesignModelByUuidCommand;
8
8
  (function (GetInteriorDesignModelByUuidCommand) {
9
9
  GetInteriorDesignModelByUuidCommand.RequestSchema = zod_1.z.object({
10
10
  uuid: zod_1.z.string().uuid(),
11
+ locale: common_1.LocaleSchema,
11
12
  });
12
13
  GetInteriorDesignModelByUuidCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.InteriorDesignModelSchema);
13
14
  })(GetInteriorDesignModelByUuidCommand || (exports.GetInteriorDesignModelByUuidCommand = GetInteriorDesignModelByUuidCommand = {}));
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GetInteriorDesignConfigQuery = void 0;
4
- const command_response_schema_1 = require("../../common/models/command-response.schema");
4
+ const common_1 = require("../../common");
5
5
  const interior_design_config_schema_1 = require("../models/interior-design-config.schema");
6
6
  var GetInteriorDesignConfigQuery;
7
7
  (function (GetInteriorDesignConfigQuery) {
8
- GetInteriorDesignConfigQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(interior_design_config_schema_1.InteriorDesignConfigSchema);
8
+ GetInteriorDesignConfigQuery.RequestSchema = common_1.LocaleRequestSchema;
9
+ GetInteriorDesignConfigQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(interior_design_config_schema_1.InteriorDesignConfigSchema);
9
10
  })(GetInteriorDesignConfigQuery || (exports.GetInteriorDesignConfigQuery = GetInteriorDesignConfigQuery = {}));
@@ -1,11 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GetMarketplaceCardConfigQuery = void 0;
4
- const zod_1 = require("zod");
5
4
  const common_1 = require("../../common");
6
5
  const models_1 = require("../models");
7
6
  var GetMarketplaceCardConfigQuery;
8
7
  (function (GetMarketplaceCardConfigQuery) {
9
- GetMarketplaceCardConfigQuery.RequestSchema = zod_1.z.object({});
8
+ GetMarketplaceCardConfigQuery.RequestSchema = common_1.LocaleRequestSchema;
10
9
  GetMarketplaceCardConfigQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.MarketplaceCardConfigSchema);
11
10
  })(GetMarketplaceCardConfigQuery || (exports.GetMarketplaceCardConfigQuery = GetMarketplaceCardConfigQuery = {}));
@@ -8,6 +8,7 @@ var GetMusicModelByUuidCommand;
8
8
  (function (GetMusicModelByUuidCommand) {
9
9
  GetMusicModelByUuidCommand.RequestSchema = zod_1.z.object({
10
10
  uuid: zod_1.z.string().uuid(),
11
+ locale: common_1.LocaleSchema,
11
12
  });
12
13
  GetMusicModelByUuidCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.MusicModelSchema);
13
14
  })(GetMusicModelByUuidCommand || (exports.GetMusicModelByUuidCommand = GetMusicModelByUuidCommand = {}));
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GetMusicConfigQuery = void 0;
4
- const command_response_schema_1 = require("../../common/models/command-response.schema");
4
+ const common_1 = require("../../common");
5
5
  const models_1 = require("../models");
6
6
  var GetMusicConfigQuery;
7
7
  (function (GetMusicConfigQuery) {
8
- GetMusicConfigQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.MusicConfigSchema);
8
+ GetMusicConfigQuery.RequestSchema = common_1.LocaleRequestSchema;
9
+ GetMusicConfigQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.MusicConfigSchema);
9
10
  })(GetMusicConfigQuery || (exports.GetMusicConfigQuery = GetMusicConfigQuery = {}));
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GetParaphraseToolConfigQuery = void 0;
4
- const command_response_schema_1 = require("../../common/models/command-response.schema");
4
+ const common_1 = require("../../common");
5
5
  const models_1 = require("../models");
6
6
  var GetParaphraseToolConfigQuery;
7
7
  (function (GetParaphraseToolConfigQuery) {
8
- GetParaphraseToolConfigQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.ParaphraseToolConfigSchema);
8
+ GetParaphraseToolConfigQuery.RequestSchema = common_1.LocaleRequestSchema;
9
+ GetParaphraseToolConfigQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.ParaphraseToolConfigSchema);
9
10
  })(GetParaphraseToolConfigQuery || (exports.GetParaphraseToolConfigQuery = GetParaphraseToolConfigQuery = {}));
@@ -8,6 +8,7 @@ const enums_1 = require("../enums");
8
8
  var CreatePresentationCommand;
9
9
  (function (CreatePresentationCommand) {
10
10
  CreatePresentationCommand.RequestSchema = zod_1.z.object({
11
+ locale: common_1.LocaleSchema,
11
12
  userId: zod_1.z.string().uuid().nullable().optional(),
12
13
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
13
14
  templateId: zod_1.z.string().uuid(),
@@ -5,5 +5,6 @@ const common_1 = require("../../common");
5
5
  const models_1 = require("../models");
6
6
  var GetPresentationConfigQuery;
7
7
  (function (GetPresentationConfigQuery) {
8
+ GetPresentationConfigQuery.RequestSchema = common_1.LocaleRequestSchema;
8
9
  GetPresentationConfigQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.PresentationConfigSchema);
9
10
  })(GetPresentationConfigQuery || (exports.GetPresentationConfigQuery = GetPresentationConfigQuery = {}));
@@ -1,11 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GetSolvingEduTaskConfigQuery = void 0;
4
- const zod_1 = require("zod");
5
4
  const common_1 = require("../../common");
6
5
  const models_1 = require("../models");
7
6
  var GetSolvingEduTaskConfigQuery;
8
7
  (function (GetSolvingEduTaskConfigQuery) {
9
- GetSolvingEduTaskConfigQuery.RequestSchema = zod_1.z.object({});
8
+ GetSolvingEduTaskConfigQuery.RequestSchema = common_1.LocaleRequestSchema;
10
9
  GetSolvingEduTaskConfigQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.SolvingEduTaskConfigSchema);
11
10
  })(GetSolvingEduTaskConfigQuery || (exports.GetSolvingEduTaskConfigQuery = GetSolvingEduTaskConfigQuery = {}));
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GetSpellCorrectorToolConfigQuery = void 0;
4
- const command_response_schema_1 = require("../../common/models/command-response.schema");
4
+ const common_1 = require("../../common");
5
5
  const models_1 = require("../models");
6
6
  var GetSpellCorrectorToolConfigQuery;
7
7
  (function (GetSpellCorrectorToolConfigQuery) {
8
- GetSpellCorrectorToolConfigQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.SpellCorrectorToolConfigSchema);
8
+ GetSpellCorrectorToolConfigQuery.RequestSchema = common_1.LocaleRequestSchema;
9
+ GetSpellCorrectorToolConfigQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.SpellCorrectorToolConfigSchema);
9
10
  })(GetSpellCorrectorToolConfigQuery || (exports.GetSpellCorrectorToolConfigQuery = GetSpellCorrectorToolConfigQuery = {}));
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GetSTTConfigQuery = void 0;
4
- const command_response_schema_1 = require("../../common/models/command-response.schema");
4
+ const common_1 = require("../../common");
5
5
  const models_1 = require("../models");
6
6
  var GetSTTConfigQuery;
7
7
  (function (GetSTTConfigQuery) {
8
- GetSTTConfigQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.STTConfigSchema);
8
+ GetSTTConfigQuery.RequestSchema = common_1.LocaleRequestSchema;
9
+ GetSTTConfigQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.STTConfigSchema);
9
10
  })(GetSTTConfigQuery || (exports.GetSTTConfigQuery = GetSTTConfigQuery = {}));
@@ -18,4 +18,3 @@ __exportStar(require("./job-status.enum"), exports);
18
18
  __exportStar(require("./tool-type.enum"), exports);
19
19
  __exportStar(require("./tool-content-type.enum"), exports);
20
20
  __exportStar(require("./tool-group.enum"), exports);
21
- __exportStar(require("./job-request-origin.enum"), exports);
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ToolJobCompleteEvent = void 0;
4
+ const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
4
5
  const enums_1 = require("../enums");
5
6
  const models_1 = require("../models");
6
7
  const zod_1 = require("zod");
@@ -9,7 +10,7 @@ var ToolJobCompleteEvent;
9
10
  ToolJobCompleteEvent.PayloadSchema = zod_1.z.object({
10
11
  job: models_1.ToolJobSchema.extend({
11
12
  toolType: zod_1.z.nativeEnum(enums_1.TOOL_TYPE),
12
- origin: zod_1.z.nativeEnum(enums_1.JOB_REQUEST_ORIGIN).optional(),
13
+ callOrigin: zod_1.z.nativeEnum(rugpt_lib_common_1.STATISTICS_CALL_ORIGIN).optional(),
13
14
  }),
14
15
  });
15
16
  })(ToolJobCompleteEvent || (exports.ToolJobCompleteEvent = ToolJobCompleteEvent = {}));
@@ -6,5 +6,6 @@ const models_1 = require("../models");
6
6
  const common_1 = require("../../common");
7
7
  var FindAllToolsQuery;
8
8
  (function (FindAllToolsQuery) {
9
+ FindAllToolsQuery.RequestSchema = common_1.LocaleRequestSchema;
9
10
  FindAllToolsQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(zod_1.z.array(models_1.ToolSchema));
10
11
  })(FindAllToolsQuery || (exports.FindAllToolsQuery = FindAllToolsQuery = {}));
@@ -6,5 +6,6 @@ const models_1 = require("../models");
6
6
  const common_1 = require("../../common");
7
7
  var FindGroupedToolsQuery;
8
8
  (function (FindGroupedToolsQuery) {
9
+ FindGroupedToolsQuery.RequestSchema = common_1.LocaleRequestSchema;
9
10
  FindGroupedToolsQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(zod_1.z.array(models_1.ToolGroupSchema));
10
11
  })(FindGroupedToolsQuery || (exports.FindGroupedToolsQuery = FindGroupedToolsQuery = {}));
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GetGlobalToolsConfigQuery = void 0;
4
- const command_response_schema_1 = require("../../common/models/command-response.schema");
4
+ const common_1 = require("../../common");
5
5
  const models_1 = require("../models");
6
6
  var GetGlobalToolsConfigQuery;
7
7
  (function (GetGlobalToolsConfigQuery) {
8
- GetGlobalToolsConfigQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.GlobalToolsConfigSchema);
8
+ GetGlobalToolsConfigQuery.RequestSchema = common_1.LocaleRequestSchema;
9
+ GetGlobalToolsConfigQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.GlobalToolsConfigSchema);
9
10
  })(GetGlobalToolsConfigQuery || (exports.GetGlobalToolsConfigQuery = GetGlobalToolsConfigQuery = {}));
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GetToolsWithConfigsQuery = void 0;
4
- const command_response_schema_1 = require("../../common/models/command-response.schema");
4
+ const common_1 = require("../../common");
5
5
  const models_1 = require("../models");
6
6
  var GetToolsWithConfigsQuery;
7
7
  (function (GetToolsWithConfigsQuery) {
8
- GetToolsWithConfigsQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.ToolsWithConfigsSchema);
8
+ GetToolsWithConfigsQuery.RequestSchema = common_1.LocaleRequestSchema;
9
+ GetToolsWithConfigsQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.ToolsWithConfigsSchema);
9
10
  })(GetToolsWithConfigsQuery || (exports.GetToolsWithConfigsQuery = GetToolsWithConfigsQuery = {}));
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GetTTSConfigQuery = void 0;
4
- const command_response_schema_1 = require("../../common/models/command-response.schema");
4
+ const common_1 = require("../../common");
5
5
  const models_1 = require("../models");
6
6
  var GetTTSConfigQuery;
7
7
  (function (GetTTSConfigQuery) {
8
- GetTTSConfigQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.TTSConfigSchema);
8
+ GetTTSConfigQuery.RequestSchema = common_1.LocaleRequestSchema;
9
+ GetTTSConfigQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.TTSConfigSchema);
9
10
  })(GetTTSConfigQuery || (exports.GetTTSConfigQuery = GetTTSConfigQuery = {}));
@@ -8,6 +8,7 @@ var GetVideoModelByUuidCommand;
8
8
  (function (GetVideoModelByUuidCommand) {
9
9
  GetVideoModelByUuidCommand.RequestSchema = zod_1.z.object({
10
10
  uuid: zod_1.z.string().uuid(),
11
+ locale: common_1.LocaleSchema,
11
12
  });
12
13
  GetVideoModelByUuidCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.VideoModelSchema);
13
14
  })(GetVideoModelByUuidCommand || (exports.GetVideoModelByUuidCommand = GetVideoModelByUuidCommand = {}));
@@ -10,6 +10,7 @@ var VIDEO_GENERATION_STRATEGY;
10
10
  VIDEO_GENERATION_STRATEGY["SORA_2_VIDEO_GENERATION_POLLING"] = "SORA_2_VIDEO_GENERATION_POLLING";
11
11
  VIDEO_GENERATION_STRATEGY["SORA_2_VIDEO_GENERATION_CALLBACK"] = "SORA_2_VIDEO_GENERATION_CALLBACK";
12
12
  VIDEO_GENERATION_STRATEGY["SEEDANCE_VIDEO_GENERATION_CALLBACK"] = "SEEDANCE_VIDEO_GENERATION_CALLBACK";
13
+ VIDEO_GENERATION_STRATEGY["SEEDANCE_2_0_VIDEO_GENERATION_CALLBACK"] = "SEEDANCE_2_0_VIDEO_GENERATION_CALLBACK";
13
14
  VIDEO_GENERATION_STRATEGY["KLING_VIDEO_GENERATION_CALLBACK"] = "KLING_VIDEO_GENERATION_CALLBACK";
14
15
  VIDEO_GENERATION_STRATEGY["WAN_2_6_VIDEO_GENERATION_CALLBACK"] = "WAN_2_6_VIDEO_GENERATION_CALLBACK";
15
16
  VIDEO_GENERATION_STRATEGY["WAN_2_7_VIDEO_GENERATION_CALLBACK"] = "WAN_2_7_VIDEO_GENERATION_CALLBACK";
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GetVideoConfigQuery = void 0;
4
- const command_response_schema_1 = require("../../common/models/command-response.schema");
4
+ const common_1 = require("../../common");
5
5
  const models_1 = require("../models");
6
6
  var GetVideoConfigQuery;
7
7
  (function (GetVideoConfigQuery) {
8
- GetVideoConfigQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.VideoConfigSchema);
8
+ GetVideoConfigQuery.RequestSchema = common_1.LocaleRequestSchema;
9
+ GetVideoConfigQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.VideoConfigSchema);
9
10
  })(GetVideoConfigQuery || (exports.GetVideoConfigQuery = GetVideoConfigQuery = {}));
@@ -8,6 +8,7 @@ var GetVideoEditorModelByUuidCommand;
8
8
  (function (GetVideoEditorModelByUuidCommand) {
9
9
  GetVideoEditorModelByUuidCommand.RequestSchema = zod_1.z.object({
10
10
  uuid: zod_1.z.string().uuid(),
11
+ locale: common_1.LocaleSchema,
11
12
  });
12
13
  GetVideoEditorModelByUuidCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.VideoEditorModelSchema);
13
14
  })(GetVideoEditorModelByUuidCommand || (exports.GetVideoEditorModelByUuidCommand = GetVideoEditorModelByUuidCommand = {}));
@@ -1,11 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GetVideoEditorConfigQuery = void 0;
4
- const zod_1 = require("zod");
5
- const command_response_schema_1 = require("../../common/models/command-response.schema");
4
+ const common_1 = require("../../common");
6
5
  const models_1 = require("../models");
7
6
  var GetVideoEditorConfigQuery;
8
7
  (function (GetVideoEditorConfigQuery) {
9
- GetVideoEditorConfigQuery.RequestSchema = zod_1.z.object({});
10
- GetVideoEditorConfigQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.VideoEditorConfigSchema);
8
+ GetVideoEditorConfigQuery.RequestSchema = common_1.LocaleRequestSchema;
9
+ GetVideoEditorConfigQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.VideoEditorConfigSchema);
11
10
  })(GetVideoEditorConfigQuery || (exports.GetVideoEditorConfigQuery = GetVideoEditorConfigQuery = {}));
@@ -7,6 +7,7 @@ const models_1 = require("../models");
7
7
  var CreateWriterDocumentCommand;
8
8
  (function (CreateWriterDocumentCommand) {
9
9
  CreateWriterDocumentCommand.RequestSchema = zod_1.z.object({
10
+ locale: common_1.LocaleSchema,
10
11
  userId: zod_1.z.string().uuid().nullable().optional(),
11
12
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
12
13
  prompt: zod_1.z.string(),
@@ -3,11 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GenerateWriterDocumentOutlineCommand = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const command_response_schema_1 = require("../../common/models/command-response.schema");
6
+ const locale_schema_1 = require("../../common/models/locale.schema");
6
7
  const models_1 = require("../models");
7
8
  var GenerateWriterDocumentOutlineCommand;
8
9
  (function (GenerateWriterDocumentOutlineCommand) {
9
10
  GenerateWriterDocumentOutlineCommand.RequestSchema = zod_1.z.object({
10
11
  uuid: zod_1.z.string().uuid(),
12
+ locale: locale_schema_1.LocaleSchema,
11
13
  numPages: zod_1.z.number(),
12
14
  description: zod_1.z.string().nullable().optional(),
13
15
  userId: zod_1.z.string().uuid().nullable().optional(),
@@ -5,5 +5,6 @@ const common_1 = require("../../common");
5
5
  const models_1 = require("../models");
6
6
  var GetWriterConfigQuery;
7
7
  (function (GetWriterConfigQuery) {
8
+ GetWriterConfigQuery.RequestSchema = common_1.LocaleRequestSchema;
8
9
  GetWriterConfigQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.WriterConfigSchema);
9
10
  })(GetWriterConfigQuery || (exports.GetWriterConfigQuery = GetWriterConfigQuery = {}));
@@ -1,3 +1,4 @@
1
1
  export * from './command-response.schema';
2
2
  export * from './icon-variants.schema';
3
3
  export * from './attached-file.schema';
4
+ export * from './locale.schema';
@@ -0,0 +1,11 @@
1
+ import { LOCALE } from '@purpleschool/rugpt-lib-common';
2
+ import { z } from 'zod';
3
+
4
+ export const LocaleSchema = z.nativeEnum(LOCALE);
5
+
6
+ export const LocaleRequestSchema = z.object({
7
+ locale: LocaleSchema,
8
+ });
9
+
10
+ export type Locale = z.infer<typeof LocaleSchema>;
11
+ export type LocaleRequest = z.infer<typeof LocaleRequestSchema>;
@@ -1,10 +1,10 @@
1
1
  import { z } from 'zod';
2
- import { ICommandResponseSchema } from '../../common/models/command-response.schema';
2
+ import { ICommandResponseSchema, LocaleRequestSchema } from '../../common';
3
3
  import { DiagramsConfigSchema } from '../models';
4
4
 
5
5
  export namespace GetDiagramsConfigQuery {
6
- export const Request = z.object({});
7
- export type Request = z.infer<typeof Request>;
6
+ export const RequestSchema = LocaleRequestSchema;
7
+ export type Request = z.infer<typeof RequestSchema>;
8
8
  export const ResponseSchema = ICommandResponseSchema(DiagramsConfigSchema);
9
9
  export type Response = z.infer<typeof ResponseSchema>;
10
10
  }
@@ -1,9 +1,9 @@
1
1
  import { z } from 'zod';
2
- import { ICommandResponseSchema } from '../../common';
2
+ import { ICommandResponseSchema, LocaleRequestSchema } from '../../common';
3
3
  import { HtmlPageBuilderConfigSchema } from '../models';
4
4
 
5
5
  export namespace GetHtmlPageBuilderConfigQuery {
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(HtmlPageBuilderConfigSchema);
@@ -1,10 +1,11 @@
1
1
  import { z } from 'zod';
2
2
  import { ImageEditorModelSchema } from '../../models';
3
- import { ICommandResponseSchema } from '../../../common';
3
+ import { ICommandResponseSchema, LocaleSchema } from '../../../common';
4
4
 
5
5
  export namespace GetImageEditorModelByUuidCommand {
6
6
  export const RequestSchema = z.object({
7
7
  uuid: z.string().uuid(),
8
+ locale: LocaleSchema,
8
9
  });
9
10
  export type Request = z.infer<typeof RequestSchema>;
10
11
 
@@ -1,8 +1,11 @@
1
1
  import { z } from 'zod';
2
- import { ICommandResponseSchema } from '../../common/models/command-response.schema';
2
+ import { ICommandResponseSchema, LocaleRequestSchema } from '../../common';
3
3
  import { ImageEditorConfigSchema } from '../models';
4
4
 
5
5
  export namespace GetImageEditorConfigQuery {
6
+ export const RequestSchema = LocaleRequestSchema;
7
+ export type Request = z.infer<typeof RequestSchema>;
8
+
6
9
  export const ResponseSchema = ICommandResponseSchema(ImageEditorConfigSchema);
7
10
  export type Response = z.infer<typeof ResponseSchema>;
8
11
  }
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
- import { JOB_REQUEST_ORIGIN } from '../../tools';
4
3
  import { ImageGenerationJobSchema, ImageGenerationRequestParamsSchema } from '../models';
4
+ import { STATISTICS_CALL_ORIGIN } from '@purpleschool/rugpt-lib-common';
5
5
 
6
6
  export namespace ExecuteImageGenerationCommand {
7
7
  export const RequestSchema = z.object({
@@ -11,7 +11,7 @@ export namespace ExecuteImageGenerationCommand {
11
11
  modelId: z.string().uuid(),
12
12
  params: ImageGenerationRequestParamsSchema,
13
13
  presetId: z.string().uuid().nullable().optional(),
14
- origin: z.nativeEnum(JOB_REQUEST_ORIGIN).default(JOB_REQUEST_ORIGIN.API),
14
+ callOrigin: z.nativeEnum(STATISTICS_CALL_ORIGIN).default(STATISTICS_CALL_ORIGIN.WEB),
15
15
  userHasActiveSubscriptionOrProduct: z.boolean(),
16
16
  tokenReservationId: z.string().uuid(),
17
17
  precalculatedPrice: z.number(),
@@ -1,10 +1,11 @@
1
1
  import { z } from 'zod';
2
2
  import { ImageGenerationModelSchema } from '../../models';
3
- import { ICommandResponseSchema } from '../../../common';
3
+ import { ICommandResponseSchema, LocaleSchema } from '../../../common';
4
4
 
5
5
  export namespace GetImageGenerationModelByUuidCommand {
6
6
  export const RequestSchema = z.object({
7
7
  uuid: z.string().uuid(),
8
+ locale: LocaleSchema,
8
9
  });
9
10
  export type Request = z.infer<typeof RequestSchema>;
10
11
 
@@ -1,7 +1,8 @@
1
1
  import { z } from 'zod';
2
- import { JOB_REQUEST_ORIGIN, JOB_STATUS } from '../../tools';
2
+ import { JOB_STATUS } from '../../tools';
3
3
  import { AttachedFileSchema, USER_REACTION } from '../../common';
4
4
  import { IMAGE_GENERATION_RESOLUTION } from '../enums';
5
+ import { STATISTICS_CALL_ORIGIN } from '@purpleschool/rugpt-lib-common';
5
6
 
6
7
  export const ImageGenerationJobParamsSchema = z.object({
7
8
  aspectRatio: z.string(),
@@ -30,7 +31,8 @@ export const ImageGenerationJobSchema = z.object({
30
31
  userId: z.string().nullable().optional(),
31
32
  unregisteredUserId: z.string().nullable().optional(),
32
33
  isPublished: z.boolean(),
33
- origin: z.nativeEnum(JOB_REQUEST_ORIGIN),
34
+ origin: z.string(),
35
+ callOrigin: z.nativeEnum(STATISTICS_CALL_ORIGIN),
34
36
  postId: z.string().nullable(),
35
37
  isDeleted: z.boolean(),
36
38
  internalError: z.string().nullable(),
@@ -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 { JOB_REQUEST_ORIGIN } from '../../tools/enums/job-request-origin.enum';
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
- origin: z.nativeEnum(JOB_REQUEST_ORIGIN).optional(),
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/models/command-response.schema';
2
+ import { ICommandResponseSchema, LocaleRequestSchema } from '../../common';
3
3
  import { ImageGenerationConfigSchema } from '../models';
4
4
 
5
5
  export namespace GetImageGenerationConfigQuery {
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(ImageGenerationConfigSchema);
@@ -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/models/command-response.schema';
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 = z.object({});
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/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.12-stage",
3
+ "version": "0.2.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/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,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 = 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
  }
@@ -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
 
@@ -6,6 +6,7 @@ export enum VIDEO_GENERATION_STRATEGY {
6
6
  SORA_2_VIDEO_GENERATION_POLLING = 'SORA_2_VIDEO_GENERATION_POLLING',
7
7
  SORA_2_VIDEO_GENERATION_CALLBACK = 'SORA_2_VIDEO_GENERATION_CALLBACK',
8
8
  SEEDANCE_VIDEO_GENERATION_CALLBACK = 'SEEDANCE_VIDEO_GENERATION_CALLBACK',
9
+ SEEDANCE_2_0_VIDEO_GENERATION_CALLBACK = 'SEEDANCE_2_0_VIDEO_GENERATION_CALLBACK',
9
10
  KLING_VIDEO_GENERATION_CALLBACK = 'KLING_VIDEO_GENERATION_CALLBACK',
10
11
  WAN_2_6_VIDEO_GENERATION_CALLBACK = 'WAN_2_6_VIDEO_GENERATION_CALLBACK',
11
12
  WAN_2_7_VIDEO_GENERATION_CALLBACK = 'WAN_2_7_VIDEO_GENERATION_CALLBACK',
@@ -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
- }