@purpleschool/gptbot-tools 0.2.26-stage → 0.2.28-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 (61) hide show
  1. package/build/common/enums/index.js +1 -0
  2. package/build/common/enums/job-scope.enum.js +8 -0
  3. package/build/html-page-builder/commands/create-html-page-builder-session.command.js +2 -0
  4. package/build/html-page-builder/commands/html-page-builder-execute.command.js +2 -0
  5. package/build/html-page-builder/commands/soft-delete-all-html-page-builder-sessions.command.js +2 -0
  6. package/build/html-page-builder/queries/find-html-page-builder-sessions.query.js +2 -0
  7. package/build/image-editor/commands/delete-all-image-editor-jobs.command.js +2 -0
  8. package/build/image-editor/commands/image-editor.command.js +2 -1
  9. package/build/image-generation/commands/execute-image-generation.command.js +2 -0
  10. package/build/image-generation/commands/forward-image-generation-job.command.js +2 -0
  11. package/build/image-generation/commands/soft-delete-image-generation-jobs-by-criteria.command.js +2 -0
  12. package/build/image-generation/queries/find-image-generation-jobs.query.js +2 -0
  13. package/build/stt/commands/delete-all-stt-jobs.command.js +2 -0
  14. package/build/stt/commands/stt.command.js +2 -0
  15. package/build/stt/queries/find-stt-jobs.query.js +2 -0
  16. package/build/tts/commands/delete-all-tts-jobs.command.js +2 -0
  17. package/build/tts/commands/tts.command.js +2 -0
  18. package/build/tts/queries/find-tts-jobs.query.js +2 -0
  19. package/build/video/commands/delete-all-video-jobs.command.js +2 -0
  20. package/build/video/commands/index.js +1 -0
  21. package/build/video/commands/moderate-video-before-post.command.js +18 -0
  22. package/build/video/commands/video.command.js +2 -0
  23. package/build/video/enums/index.js +1 -0
  24. package/build/video/enums/video-publish-moderation-status.enum.js +9 -0
  25. package/build/video/models/video-job.schema.js +2 -0
  26. package/build/video/queries/find-video-jobs.query.js +2 -0
  27. package/build/video/routes/video.amqp.routes.js +1 -0
  28. package/build/video-editor/commands/delete-all-video-editor-jobs.command.js +2 -0
  29. package/build/video-editor/commands/edit-video.command.js +2 -0
  30. package/build/video-editor/queries/find-video-editor-jobs.query.js +2 -0
  31. package/common/enums/index.ts +1 -0
  32. package/common/enums/job-scope.enum.ts +4 -0
  33. package/html-page-builder/commands/create-html-page-builder-session.command.ts +2 -0
  34. package/html-page-builder/commands/html-page-builder-execute.command.ts +2 -0
  35. package/html-page-builder/commands/soft-delete-all-html-page-builder-sessions.command.ts +2 -0
  36. package/html-page-builder/queries/find-html-page-builder-sessions.query.ts +2 -0
  37. package/image-editor/commands/delete-all-image-editor-jobs.command.ts +2 -0
  38. package/image-editor/commands/image-editor.command.ts +2 -1
  39. package/image-generation/commands/execute-image-generation.command.ts +2 -0
  40. package/image-generation/commands/forward-image-generation-job.command.ts +2 -0
  41. package/image-generation/commands/soft-delete-image-generation-jobs-by-criteria.command.ts +2 -0
  42. package/image-generation/queries/find-image-generation-jobs.query.ts +2 -0
  43. package/package.json +1 -1
  44. package/stt/commands/delete-all-stt-jobs.command.ts +2 -0
  45. package/stt/commands/stt.command.ts +2 -0
  46. package/stt/queries/find-stt-jobs.query.ts +2 -0
  47. package/tts/commands/delete-all-tts-jobs.command.ts +2 -0
  48. package/tts/commands/tts.command.ts +2 -0
  49. package/tts/queries/find-tts-jobs.query.ts +2 -0
  50. package/video/commands/delete-all-video-jobs.command.ts +2 -0
  51. package/video/commands/index.ts +1 -0
  52. package/video/commands/moderate-video-before-post.command.ts +20 -0
  53. package/video/commands/video.command.ts +2 -0
  54. package/video/enums/index.ts +1 -0
  55. package/video/enums/video-publish-moderation-status.enum.ts +5 -0
  56. package/video/models/video-job.schema.ts +2 -0
  57. package/video/queries/find-video-jobs.query.ts +2 -0
  58. package/video/routes/video.amqp.routes.ts +1 -0
  59. package/video-editor/commands/delete-all-video-editor-jobs.command.ts +2 -0
  60. package/video-editor/commands/edit-video.command.ts +2 -0
  61. package/video-editor/queries/find-video-editor-jobs.query.ts +2 -0
@@ -18,3 +18,4 @@ __exportStar(require("./reasoning-effort.enum"), exports);
18
18
  __exportStar(require("./user-reaction.enum"), exports);
19
19
  __exportStar(require("./tool-model-status.enum"), exports);
20
20
  __exportStar(require("./file-type.enum"), exports);
21
+ __exportStar(require("./job-scope.enum"), exports);
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.JOB_SCOPE = void 0;
4
+ var JOB_SCOPE;
5
+ (function (JOB_SCOPE) {
6
+ JOB_SCOPE["TOOL"] = "tool";
7
+ JOB_SCOPE["CANVAS"] = "canvas";
8
+ })(JOB_SCOPE || (exports.JOB_SCOPE = JOB_SCOPE = {}));
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CreateHtmlPageBuilderSessionCommand = void 0;
4
4
  const zod_1 = require("zod");
5
+ const common_1 = require("../../common");
5
6
  const command_response_schema_1 = require("../../common/models/command-response.schema");
6
7
  const models_1 = require("../models");
7
8
  var CreateHtmlPageBuilderSessionCommand;
@@ -10,6 +11,7 @@ var CreateHtmlPageBuilderSessionCommand;
10
11
  .object({
11
12
  userId: zod_1.z.string().uuid().nullable().optional(),
12
13
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
14
+ scope: zod_1.z.nativeEnum(common_1.JOB_SCOPE).default(common_1.JOB_SCOPE.TOOL),
13
15
  title: zod_1.z.string().optional(),
14
16
  })
15
17
  .refine((data) => {
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.HtmlPageBuilderExecuteCommand = void 0;
4
4
  const zod_1 = require("zod");
5
+ const common_1 = require("../../common");
5
6
  const command_response_schema_1 = require("../../common/models/command-response.schema");
6
7
  const models_1 = require("../models");
7
8
  var HtmlPageBuilderExecuteCommand;
@@ -9,6 +10,7 @@ var HtmlPageBuilderExecuteCommand;
9
10
  HtmlPageBuilderExecuteCommand.RequestSchema = zod_1.z.object({
10
11
  userId: zod_1.z.string().uuid().nullable().optional(),
11
12
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
13
+ scope: zod_1.z.nativeEnum(common_1.JOB_SCOPE).default(common_1.JOB_SCOPE.TOOL),
12
14
  sessionId: zod_1.z.string().uuid().optional(),
13
15
  userPrompt: zod_1.z.string(),
14
16
  modelId: zod_1.z.string().uuid(),
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SoftDeleteAllHtmlPageBuilderSessionsCommand = void 0;
4
4
  const zod_1 = require("zod");
5
+ const common_1 = require("../../common");
5
6
  const command_response_schema_1 = require("../../common/models/command-response.schema");
6
7
  var SoftDeleteAllHtmlPageBuilderSessionsCommand;
7
8
  (function (SoftDeleteAllHtmlPageBuilderSessionsCommand) {
@@ -9,6 +10,7 @@ var SoftDeleteAllHtmlPageBuilderSessionsCommand;
9
10
  .object({
10
11
  userId: zod_1.z.string().uuid().optional(),
11
12
  unregisteredUserId: zod_1.z.string().uuid().optional(),
13
+ scope: zod_1.z.nativeEnum(common_1.JOB_SCOPE).default(common_1.JOB_SCOPE.TOOL),
12
14
  })
13
15
  .refine((data) => {
14
16
  return !(data.userId && data.unregisteredUserId);
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FindHtmlPageBuilderSessionsQuery = void 0;
4
4
  const zod_1 = require("zod");
5
+ const common_1 = require("../../common");
5
6
  const command_response_schema_1 = require("../../common/models/command-response.schema");
6
7
  const models_1 = require("../models");
7
8
  var FindHtmlPageBuilderSessionsQuery;
@@ -10,6 +11,7 @@ var FindHtmlPageBuilderSessionsQuery;
10
11
  .object({
11
12
  userId: zod_1.z.string().uuid().optional(),
12
13
  unregisteredUserId: zod_1.z.string().uuid().optional(),
14
+ scope: zod_1.z.nativeEnum(common_1.JOB_SCOPE).default(common_1.JOB_SCOPE.TOOL),
13
15
  title: zod_1.z.string().optional(),
14
16
  limit: zod_1.z.coerce.number().min(1).optional(),
15
17
  offset: zod_1.z.coerce.number().min(0).default(0).optional(),
@@ -2,12 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DeleteAllImageEditorJobsCommand = void 0;
4
4
  const zod_1 = require("zod");
5
+ const common_1 = require("../../common");
5
6
  const command_response_schema_1 = require("../../common/models/command-response.schema");
6
7
  var DeleteAllImageEditorJobsCommand;
7
8
  (function (DeleteAllImageEditorJobsCommand) {
8
9
  DeleteAllImageEditorJobsCommand.RequestSchema = zod_1.z.object({
9
10
  userId: zod_1.z.string().uuid().nullable().optional(),
10
11
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
12
+ scope: zod_1.z.nativeEnum(common_1.JOB_SCOPE).default(common_1.JOB_SCOPE.TOOL),
11
13
  });
12
14
  DeleteAllImageEditorJobsCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(zod_1.z.boolean());
13
15
  })(DeleteAllImageEditorJobsCommand || (exports.DeleteAllImageEditorJobsCommand = DeleteAllImageEditorJobsCommand = {}));
@@ -2,10 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ImageEditorCommand = void 0;
4
4
  const zod_1 = require("zod");
5
+ const common_1 = require("../../common");
5
6
  const command_response_schema_1 = require("../../common/models/command-response.schema");
6
7
  const locale_schema_1 = require("../../common/models/locale.schema");
7
8
  const models_1 = require("../models");
8
- const common_1 = require("../../common");
9
9
  const tool_workspace_1 = require("../../tool-workspace");
10
10
  const tools_1 = require("../../tools");
11
11
  var ImageEditorCommand;
@@ -14,6 +14,7 @@ var ImageEditorCommand;
14
14
  locale: locale_schema_1.LocaleSchema,
15
15
  userId: zod_1.z.string().uuid().nullable().optional(),
16
16
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
17
+ scope: zod_1.z.nativeEnum(common_1.JOB_SCOPE).default(common_1.JOB_SCOPE.TOOL),
17
18
  workspaceId: zod_1.z.string().uuid().nullable().optional(),
18
19
  workspaceItemId: zod_1.z.string().uuid().nullable().optional(),
19
20
  workspaceToolType: zod_1.z.nativeEnum(tools_1.TOOL_CONTENT_TYPE).nullable().optional(),
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ExecuteImageGenerationCommand = void 0;
4
4
  const zod_1 = require("zod");
5
+ const common_1 = require("../../common");
5
6
  const command_response_schema_1 = require("../../common/models/command-response.schema");
6
7
  const locale_schema_1 = require("../../common/models/locale.schema");
7
8
  const models_1 = require("../models");
@@ -12,6 +13,7 @@ var ExecuteImageGenerationCommand;
12
13
  locale: locale_schema_1.LocaleSchema,
13
14
  userId: zod_1.z.string().uuid().nullable().optional(),
14
15
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
16
+ scope: zod_1.z.nativeEnum(common_1.JOB_SCOPE).default(common_1.JOB_SCOPE.TOOL),
15
17
  prompt: zod_1.z.string(),
16
18
  modelId: zod_1.z.string().uuid(),
17
19
  params: models_1.ImageGenerationRequestParamsSchema,
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ForwardImageGenerationJobCommand = void 0;
4
4
  const zod_1 = require("zod");
5
+ const common_1 = require("../../common");
5
6
  const command_response_schema_1 = require("../../common/models/command-response.schema");
6
7
  const models_1 = require("../models");
7
8
  const job_status_enum_1 = require("../../tools/enums/job-status.enum");
@@ -13,6 +14,7 @@ var ForwardImageGenerationJobCommand;
13
14
  prompt: zod_1.z.string(),
14
15
  title: zod_1.z.string(),
15
16
  status: zod_1.z.nativeEnum(job_status_enum_1.JOB_STATUS),
17
+ scope: zod_1.z.nativeEnum(common_1.JOB_SCOPE).default(common_1.JOB_SCOPE.TOOL),
16
18
  error: zod_1.z.string().nullable(),
17
19
  price: zod_1.z.number(),
18
20
  reaction: zod_1.z.nativeEnum(user_reaction_enum_1.USER_REACTION).nullable(),
@@ -2,12 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SoftDeleteImageGenerationJobsByCriteriaCommand = void 0;
4
4
  const zod_1 = require("zod");
5
+ const common_1 = require("../../common");
5
6
  const command_response_schema_1 = require("../../common/models/command-response.schema");
6
7
  var SoftDeleteImageGenerationJobsByCriteriaCommand;
7
8
  (function (SoftDeleteImageGenerationJobsByCriteriaCommand) {
8
9
  SoftDeleteImageGenerationJobsByCriteriaCommand.RequestSchema = zod_1.z.object({
9
10
  userId: zod_1.z.string().uuid().nullable().optional(),
10
11
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
12
+ scope: zod_1.z.nativeEnum(common_1.JOB_SCOPE).default(common_1.JOB_SCOPE.TOOL),
11
13
  });
12
14
  SoftDeleteImageGenerationJobsByCriteriaCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(zod_1.z.boolean());
13
15
  })(SoftDeleteImageGenerationJobsByCriteriaCommand || (exports.SoftDeleteImageGenerationJobsByCriteriaCommand = SoftDeleteImageGenerationJobsByCriteriaCommand = {}));
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FindImageGenerationJobsQuery = void 0;
4
4
  const zod_1 = require("zod");
5
+ const common_1 = require("../../common");
5
6
  const command_response_schema_1 = require("../../common/models/command-response.schema");
6
7
  const models_1 = require("../models");
7
8
  const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
@@ -11,6 +12,7 @@ var FindImageGenerationJobsQuery;
11
12
  .object({
12
13
  userId: zod_1.z.string().uuid().optional(),
13
14
  unregisteredUserId: zod_1.z.string().uuid().optional(),
15
+ scope: zod_1.z.nativeEnum(common_1.JOB_SCOPE).default(common_1.JOB_SCOPE.TOOL),
14
16
  title: zod_1.z.string().optional(),
15
17
  limit: zod_1.z.coerce.number().min(1).optional(),
16
18
  offset: zod_1.z.coerce.number().min(0).default(0).optional(),
@@ -2,12 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DeleteAllSTTJobsCommand = void 0;
4
4
  const zod_1 = require("zod");
5
+ const common_1 = require("../../common");
5
6
  const command_response_schema_1 = require("../../common/models/command-response.schema");
6
7
  var DeleteAllSTTJobsCommand;
7
8
  (function (DeleteAllSTTJobsCommand) {
8
9
  DeleteAllSTTJobsCommand.RequestSchema = zod_1.z.object({
9
10
  userId: zod_1.z.string().uuid().nullable().optional(),
10
11
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
12
+ scope: zod_1.z.nativeEnum(common_1.JOB_SCOPE).default(common_1.JOB_SCOPE.TOOL),
11
13
  });
12
14
  DeleteAllSTTJobsCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(zod_1.z.boolean());
13
15
  })(DeleteAllSTTJobsCommand || (exports.DeleteAllSTTJobsCommand = DeleteAllSTTJobsCommand = {}));
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.STTCommand = void 0;
4
4
  const zod_1 = require("zod");
5
+ const common_1 = require("../../common");
5
6
  const command_response_schema_1 = require("../../common/models/command-response.schema");
6
7
  const stt_job_schema_1 = require("../models/stt-job.schema");
7
8
  var STTCommand;
@@ -9,6 +10,7 @@ var STTCommand;
9
10
  STTCommand.RequestSchema = zod_1.z.object({
10
11
  userId: zod_1.z.string().uuid().nullable().optional(),
11
12
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
13
+ scope: zod_1.z.nativeEnum(common_1.JOB_SCOPE).default(common_1.JOB_SCOPE.TOOL),
12
14
  modelId: zod_1.z.string(),
13
15
  fileId: zod_1.z.string(),
14
16
  fileKey: zod_1.z.string(),
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FindSTTJobsQuery = void 0;
4
4
  const zod_1 = require("zod");
5
+ const common_1 = require("../../common");
5
6
  const command_response_schema_1 = require("../../common/models/command-response.schema");
6
7
  const stt_job_schema_1 = require("../models/stt-job.schema");
7
8
  var FindSTTJobsQuery;
@@ -10,6 +11,7 @@ var FindSTTJobsQuery;
10
11
  .object({
11
12
  userId: zod_1.z.string().uuid().optional(),
12
13
  unregisteredUserId: zod_1.z.string().uuid().optional(),
14
+ scope: zod_1.z.nativeEnum(common_1.JOB_SCOPE).default(common_1.JOB_SCOPE.TOOL),
13
15
  title: zod_1.z.string().optional(),
14
16
  limit: zod_1.z.coerce.number().min(1).optional(),
15
17
  offset: zod_1.z.coerce.number().min(0).optional(),
@@ -2,12 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DeleteAllTTSJobsCommand = void 0;
4
4
  const zod_1 = require("zod");
5
+ const common_1 = require("../../common");
5
6
  const command_response_schema_1 = require("../../common/models/command-response.schema");
6
7
  var DeleteAllTTSJobsCommand;
7
8
  (function (DeleteAllTTSJobsCommand) {
8
9
  DeleteAllTTSJobsCommand.RequestSchema = zod_1.z.object({
9
10
  userId: zod_1.z.string().uuid().nullable().optional(),
10
11
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
12
+ scope: zod_1.z.nativeEnum(common_1.JOB_SCOPE).default(common_1.JOB_SCOPE.TOOL),
11
13
  });
12
14
  DeleteAllTTSJobsCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(zod_1.z.boolean());
13
15
  })(DeleteAllTTSJobsCommand || (exports.DeleteAllTTSJobsCommand = DeleteAllTTSJobsCommand = {}));
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TTSCommand = void 0;
4
4
  const zod_1 = require("zod");
5
+ const common_1 = require("../../common");
5
6
  const command_response_schema_1 = require("../../common/models/command-response.schema");
6
7
  const tts_job_schema_1 = require("../models/tts-job.schema");
7
8
  var TTSCommand;
@@ -9,6 +10,7 @@ var TTSCommand;
9
10
  TTSCommand.RequestSchema = zod_1.z.object({
10
11
  userId: zod_1.z.string().uuid().nullable().optional(),
11
12
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
13
+ scope: zod_1.z.nativeEnum(common_1.JOB_SCOPE).default(common_1.JOB_SCOPE.TOOL),
12
14
  modelId: zod_1.z.string(),
13
15
  voiceId: zod_1.z.string(),
14
16
  userInput: zod_1.z.string(),
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FindTTSJobsQuery = void 0;
4
4
  const zod_1 = require("zod");
5
+ const common_1 = require("../../common");
5
6
  const command_response_schema_1 = require("../../common/models/command-response.schema");
6
7
  const tts_job_schema_1 = require("../models/tts-job.schema");
7
8
  var FindTTSJobsQuery;
@@ -10,6 +11,7 @@ var FindTTSJobsQuery;
10
11
  .object({
11
12
  userId: zod_1.z.string().uuid().optional(),
12
13
  unregisteredUserId: zod_1.z.string().uuid().optional(),
14
+ scope: zod_1.z.nativeEnum(common_1.JOB_SCOPE).default(common_1.JOB_SCOPE.TOOL),
13
15
  title: zod_1.z.string().optional(),
14
16
  limit: zod_1.z.coerce.number().min(1).optional(),
15
17
  offset: zod_1.z.coerce.number().min(0).default(0).optional(),
@@ -2,12 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DeleteAllVideoJobsCommand = void 0;
4
4
  const zod_1 = require("zod");
5
+ const common_1 = require("../../common");
5
6
  const command_response_schema_1 = require("../../common/models/command-response.schema");
6
7
  var DeleteAllVideoJobsCommand;
7
8
  (function (DeleteAllVideoJobsCommand) {
8
9
  DeleteAllVideoJobsCommand.RequestSchema = zod_1.z.object({
9
10
  userId: zod_1.z.string().uuid().nullable().optional(),
10
11
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
12
+ scope: zod_1.z.nativeEnum(common_1.JOB_SCOPE).default(common_1.JOB_SCOPE.TOOL),
11
13
  });
12
14
  DeleteAllVideoJobsCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(zod_1.z.boolean());
13
15
  })(DeleteAllVideoJobsCommand || (exports.DeleteAllVideoJobsCommand = DeleteAllVideoJobsCommand = {}));
@@ -23,3 +23,4 @@ __exportStar(require("./get-video-price.command"), exports);
23
23
  __exportStar(require("./update-video-job-title.command"), exports);
24
24
  __exportStar(require("./video-model"), exports);
25
25
  __exportStar(require("./update-published-status-video-jobs.command"), exports);
26
+ __exportStar(require("./moderate-video-before-post.command"), exports);
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ModerateVideoBeforePostCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const command_response_schema_1 = require("../../common/models/command-response.schema");
6
+ var ModerateVideoBeforePostCommand;
7
+ (function (ModerateVideoBeforePostCommand) {
8
+ ModerateVideoBeforePostCommand.RequestSchema = zod_1.z.object({
9
+ criteria: zod_1.z.object({
10
+ uuid: zod_1.z.string().uuid(),
11
+ userId: zod_1.z.string().uuid().nullable().optional(),
12
+ unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
13
+ }),
14
+ });
15
+ ModerateVideoBeforePostCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(zod_1.z.object({
16
+ isAllowed: zod_1.z.boolean(),
17
+ }));
18
+ })(ModerateVideoBeforePostCommand || (exports.ModerateVideoBeforePostCommand = ModerateVideoBeforePostCommand = {}));
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VideoCommand = void 0;
4
4
  const zod_1 = require("zod");
5
+ const common_1 = require("../../common");
5
6
  const command_response_schema_1 = require("../../common/models/command-response.schema");
6
7
  const locale_schema_1 = require("../../common/models/locale.schema");
7
8
  const tool_workspace_1 = require("../../tool-workspace");
@@ -14,6 +15,7 @@ var VideoCommand;
14
15
  locale: locale_schema_1.LocaleSchema,
15
16
  userId: zod_1.z.string().uuid().nullable().optional(),
16
17
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
18
+ scope: zod_1.z.nativeEnum(common_1.JOB_SCOPE).default(common_1.JOB_SCOPE.TOOL),
17
19
  workspaceId: zod_1.z.string().uuid().nullable().optional(),
18
20
  workspaceItemId: zod_1.z.string().uuid().nullable().optional(),
19
21
  workspaceToolType: zod_1.z.nativeEnum(tools_1.TOOL_CONTENT_TYPE).nullable().optional(),
@@ -24,3 +24,4 @@ __exportStar(require("./veo-job-params-type.enum"), exports);
24
24
  __exportStar(require("./video-resolution.enum"), exports);
25
25
  __exportStar(require("./video-pricing-rule-type.enum"), exports);
26
26
  __exportStar(require("./video-generation-model-limitation.enum"), exports);
27
+ __exportStar(require("./video-publish-moderation-status.enum"), exports);
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VIDEO_PUBLISH_MODERATION_STATUS = void 0;
4
+ var VIDEO_PUBLISH_MODERATION_STATUS;
5
+ (function (VIDEO_PUBLISH_MODERATION_STATUS) {
6
+ VIDEO_PUBLISH_MODERATION_STATUS["NOT_CHECKED"] = "NOT_CHECKED";
7
+ VIDEO_PUBLISH_MODERATION_STATUS["PASSED"] = "PASSED";
8
+ VIDEO_PUBLISH_MODERATION_STATUS["FAILED"] = "FAILED";
9
+ })(VIDEO_PUBLISH_MODERATION_STATUS || (exports.VIDEO_PUBLISH_MODERATION_STATUS = VIDEO_PUBLISH_MODERATION_STATUS = {}));
@@ -4,6 +4,7 @@ exports.VideoJobSchema = exports.VideoJobParamsSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const tools_1 = require("../../tools");
6
6
  const common_1 = require("../../common");
7
+ const enums_1 = require("../enums");
7
8
  exports.VideoJobParamsSchema = zod_1.z.object({
8
9
  imageUrls: zod_1.z.string().array().optional(),
9
10
  imageIds: zod_1.z.array(zod_1.z.string()).optional(),
@@ -23,6 +24,7 @@ exports.VideoJobSchema = zod_1.z.object({
23
24
  prompt: zod_1.z.string(),
24
25
  reaction: zod_1.z.nativeEnum(common_1.USER_REACTION).nullable(),
25
26
  isPublished: zod_1.z.boolean(),
27
+ publishModerationStatus: zod_1.z.nativeEnum(enums_1.VIDEO_PUBLISH_MODERATION_STATUS),
26
28
  postId: zod_1.z.string().nullable(),
27
29
  dislikeReason: zod_1.z.string().nullable(),
28
30
  externalId: zod_1.z.string().nullable(),
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FindVideoJobsQuery = void 0;
4
4
  const zod_1 = require("zod");
5
+ const common_1 = require("../../common");
5
6
  const command_response_schema_1 = require("../../common/models/command-response.schema");
6
7
  const video_job_schema_1 = require("../models/video-job.schema");
7
8
  var FindVideoJobsQuery;
@@ -10,6 +11,7 @@ var FindVideoJobsQuery;
10
11
  .object({
11
12
  userId: zod_1.z.string().uuid().optional(),
12
13
  unregisteredUserId: zod_1.z.string().uuid().optional(),
14
+ scope: zod_1.z.nativeEnum(common_1.JOB_SCOPE).default(common_1.JOB_SCOPE.TOOL),
13
15
  workspaceId: zod_1.z.string().uuid().nullable().optional(),
14
16
  title: zod_1.z.string().optional(),
15
17
  limit: zod_1.z.coerce.number().min(1).optional(),
@@ -13,4 +13,5 @@ exports.VIDEO_AMQP_ROUTES = {
13
13
  SOFT_DELETE_ALL: 'tools.video.jobs.soft-delete-all.rpc',
14
14
  RETRY: 'tools.video.jobs.retry.rpc',
15
15
  UPDATE_JOB: 'tools.video.jobs.update.rpc',
16
+ MODERATE_BEFORE_POST: 'tools.video.jobs.moderate-before-post.rpc',
16
17
  };
@@ -2,12 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DeleteAllVideoEditorJobsCommand = void 0;
4
4
  const zod_1 = require("zod");
5
+ const common_1 = require("../../common");
5
6
  const command_response_schema_1 = require("../../common/models/command-response.schema");
6
7
  var DeleteAllVideoEditorJobsCommand;
7
8
  (function (DeleteAllVideoEditorJobsCommand) {
8
9
  DeleteAllVideoEditorJobsCommand.RequestSchema = zod_1.z.object({
9
10
  userId: zod_1.z.string().uuid().nullable().optional(),
10
11
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
12
+ scope: zod_1.z.nativeEnum(common_1.JOB_SCOPE).default(common_1.JOB_SCOPE.TOOL),
11
13
  });
12
14
  DeleteAllVideoEditorJobsCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(zod_1.z.boolean());
13
15
  })(DeleteAllVideoEditorJobsCommand || (exports.DeleteAllVideoEditorJobsCommand = DeleteAllVideoEditorJobsCommand = {}));
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EditVideoCommand = void 0;
4
4
  const zod_1 = require("zod");
5
+ const common_1 = require("../../common");
5
6
  const command_response_schema_1 = require("../../common/models/command-response.schema");
6
7
  const models_1 = require("../models");
7
8
  var EditVideoCommand;
@@ -9,6 +10,7 @@ var EditVideoCommand;
9
10
  EditVideoCommand.RequestSchema = zod_1.z.object({
10
11
  userId: zod_1.z.string().uuid().nullable().optional(),
11
12
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
13
+ scope: zod_1.z.nativeEnum(common_1.JOB_SCOPE).default(common_1.JOB_SCOPE.TOOL),
12
14
  prompt: zod_1.z.string(),
13
15
  inputVideoId: zod_1.z.string().uuid(),
14
16
  inputVideoUrl: zod_1.z.string(),
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FindVideoEditorJobsQuery = void 0;
4
4
  const zod_1 = require("zod");
5
+ const common_1 = require("../../common");
5
6
  const command_response_schema_1 = require("../../common/models/command-response.schema");
6
7
  const video_editor_job_schema_1 = require("../models/video-editor-job.schema");
7
8
  var FindVideoEditorJobsQuery;
@@ -10,6 +11,7 @@ var FindVideoEditorJobsQuery;
10
11
  .object({
11
12
  userId: zod_1.z.string().uuid().optional(),
12
13
  unregisteredUserId: zod_1.z.string().uuid().optional(),
14
+ scope: zod_1.z.nativeEnum(common_1.JOB_SCOPE).default(common_1.JOB_SCOPE.TOOL),
13
15
  title: zod_1.z.string().optional(),
14
16
  limit: zod_1.z.coerce.number().min(1).optional(),
15
17
  offset: zod_1.z.coerce.number().min(0).default(0).optional(),
@@ -2,3 +2,4 @@ export * from './reasoning-effort.enum';
2
2
  export * from './user-reaction.enum';
3
3
  export * from './tool-model-status.enum';
4
4
  export * from './file-type.enum';
5
+ export * from './job-scope.enum';
@@ -0,0 +1,4 @@
1
+ export enum JOB_SCOPE {
2
+ TOOL = 'tool',
3
+ CANVAS = 'canvas',
4
+ }
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { JOB_SCOPE } from '../../common';
2
3
  import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
4
  import { HtmlPageBuilderSessionSchema } from '../models';
4
5
 
@@ -7,6 +8,7 @@ export namespace CreateHtmlPageBuilderSessionCommand {
7
8
  .object({
8
9
  userId: z.string().uuid().nullable().optional(),
9
10
  unregisteredUserId: z.string().uuid().nullable().optional(),
11
+ scope: z.nativeEnum(JOB_SCOPE).default(JOB_SCOPE.TOOL),
10
12
  title: z.string().optional(),
11
13
  })
12
14
  .refine(
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { JOB_SCOPE } from '../../common';
2
3
  import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
4
  import { HtmlPageBuilderJobParamsSchema, HtmlPageBuilderSessionSchema } from '../models';
4
5
 
@@ -6,6 +7,7 @@ export namespace HtmlPageBuilderExecuteCommand {
6
7
  export const RequestSchema = z.object({
7
8
  userId: z.string().uuid().nullable().optional(),
8
9
  unregisteredUserId: z.string().uuid().nullable().optional(),
10
+ scope: z.nativeEnum(JOB_SCOPE).default(JOB_SCOPE.TOOL),
9
11
  sessionId: z.string().uuid().optional(),
10
12
  userPrompt: z.string(),
11
13
  modelId: z.string().uuid(),
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { JOB_SCOPE } from '../../common';
2
3
  import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
4
 
4
5
  export namespace SoftDeleteAllHtmlPageBuilderSessionsCommand {
@@ -6,6 +7,7 @@ export namespace SoftDeleteAllHtmlPageBuilderSessionsCommand {
6
7
  .object({
7
8
  userId: z.string().uuid().optional(),
8
9
  unregisteredUserId: z.string().uuid().optional(),
10
+ scope: z.nativeEnum(JOB_SCOPE).default(JOB_SCOPE.TOOL),
9
11
  })
10
12
  .refine(
11
13
  (data) => {
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { JOB_SCOPE } from '../../common';
2
3
  import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
4
  import { HtmlPageBuilderSessionSchema } from '../models';
4
5
 
@@ -7,6 +8,7 @@ export namespace FindHtmlPageBuilderSessionsQuery {
7
8
  .object({
8
9
  userId: z.string().uuid().optional(),
9
10
  unregisteredUserId: z.string().uuid().optional(),
11
+ scope: z.nativeEnum(JOB_SCOPE).default(JOB_SCOPE.TOOL),
10
12
  title: z.string().optional(),
11
13
  limit: z.coerce.number().min(1).optional(),
12
14
  offset: z.coerce.number().min(0).default(0).optional(),
@@ -1,10 +1,12 @@
1
1
  import { z } from 'zod';
2
+ import { JOB_SCOPE } from '../../common';
2
3
  import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
4
 
4
5
  export namespace DeleteAllImageEditorJobsCommand {
5
6
  export const RequestSchema = z.object({
6
7
  userId: z.string().uuid().nullable().optional(),
7
8
  unregisteredUserId: z.string().uuid().nullable().optional(),
9
+ scope: z.nativeEnum(JOB_SCOPE).default(JOB_SCOPE.TOOL),
8
10
  });
9
11
  export type Request = z.infer<typeof RequestSchema>;
10
12
 
@@ -1,8 +1,8 @@
1
1
  import { z } from 'zod';
2
+ import { AttachedFileSchema, JOB_SCOPE } from '../../common';
2
3
  import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
4
  import { LocaleSchema } from '../../common/models/locale.schema';
4
5
  import { ImageEditorJobSchema } from '../models';
5
- import { AttachedFileSchema } from '../../common';
6
6
  import { TOOL_WORKSPACE_ITEM_SLOT } from '../../tool-workspace';
7
7
  import { TOOL_CONTENT_TYPE } from '../../tools';
8
8
 
@@ -11,6 +11,7 @@ export namespace ImageEditorCommand {
11
11
  locale: LocaleSchema,
12
12
  userId: z.string().uuid().nullable().optional(),
13
13
  unregisteredUserId: z.string().uuid().nullable().optional(),
14
+ scope: z.nativeEnum(JOB_SCOPE).default(JOB_SCOPE.TOOL),
14
15
  workspaceId: z.string().uuid().nullable().optional(),
15
16
  workspaceItemId: z.string().uuid().nullable().optional(),
16
17
  workspaceToolType: z.nativeEnum(TOOL_CONTENT_TYPE).nullable().optional(),
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { JOB_SCOPE } from '../../common';
2
3
  import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
4
  import { LocaleSchema } from '../../common/models/locale.schema';
4
5
  import { ImageGenerationJobSchema, ImageGenerationRequestParamsSchema } from '../models';
@@ -9,6 +10,7 @@ export namespace ExecuteImageGenerationCommand {
9
10
  locale: LocaleSchema,
10
11
  userId: z.string().uuid().nullable().optional(),
11
12
  unregisteredUserId: z.string().uuid().nullable().optional(),
13
+ scope: z.nativeEnum(JOB_SCOPE).default(JOB_SCOPE.TOOL),
12
14
  prompt: z.string(),
13
15
  modelId: z.string().uuid(),
14
16
  params: ImageGenerationRequestParamsSchema,
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { JOB_SCOPE } from '../../common';
2
3
  import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
4
  import { ImageGenerationJobSchema, ImageGenerationJobParamsSchema } from '../models';
4
5
  import { JOB_STATUS } from '../../tools/enums/job-status.enum';
@@ -10,6 +11,7 @@ export namespace ForwardImageGenerationJobCommand {
10
11
  prompt: z.string(),
11
12
  title: z.string(),
12
13
  status: z.nativeEnum(JOB_STATUS),
14
+ scope: z.nativeEnum(JOB_SCOPE).default(JOB_SCOPE.TOOL),
13
15
  error: z.string().nullable(),
14
16
  price: z.number(),
15
17
  reaction: z.nativeEnum(USER_REACTION).nullable(),
@@ -1,10 +1,12 @@
1
1
  import { z } from 'zod';
2
+ import { JOB_SCOPE } from '../../common';
2
3
  import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
4
 
4
5
  export namespace SoftDeleteImageGenerationJobsByCriteriaCommand {
5
6
  export const RequestSchema = z.object({
6
7
  userId: z.string().uuid().nullable().optional(),
7
8
  unregisteredUserId: z.string().uuid().nullable().optional(),
9
+ scope: z.nativeEnum(JOB_SCOPE).default(JOB_SCOPE.TOOL),
8
10
  });
9
11
  export type Request = z.infer<typeof RequestSchema>;
10
12
 
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { JOB_SCOPE } from '../../common';
2
3
  import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
4
  import { ImageGenerationJobSchema } from '../models';
4
5
  import { STATISTICS_CALL_ORIGIN } from '@purpleschool/rugpt-lib-common';
@@ -8,6 +9,7 @@ export namespace FindImageGenerationJobsQuery {
8
9
  .object({
9
10
  userId: z.string().uuid().optional(),
10
11
  unregisteredUserId: z.string().uuid().optional(),
12
+ scope: z.nativeEnum(JOB_SCOPE).default(JOB_SCOPE.TOOL),
11
13
  title: z.string().optional(),
12
14
  limit: z.coerce.number().min(1).optional(),
13
15
  offset: z.coerce.number().min(0).default(0).optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot-tools",
3
- "version": "0.2.26-stage",
3
+ "version": "0.2.28-stage",
4
4
  "main": "build/index.js",
5
5
  "types": "build/index.d.ts",
6
6
  "scripts": {
@@ -1,10 +1,12 @@
1
1
  import { z } from 'zod';
2
+ import { JOB_SCOPE } from '../../common';
2
3
  import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
4
 
4
5
  export namespace DeleteAllSTTJobsCommand {
5
6
  export const RequestSchema = z.object({
6
7
  userId: z.string().uuid().nullable().optional(),
7
8
  unregisteredUserId: z.string().uuid().nullable().optional(),
9
+ scope: z.nativeEnum(JOB_SCOPE).default(JOB_SCOPE.TOOL),
8
10
  });
9
11
  export type Request = z.infer<typeof RequestSchema>;
10
12
 
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { JOB_SCOPE } from '../../common';
2
3
  import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
4
  import { STTJobSchema } from '../models/stt-job.schema';
4
5
 
@@ -6,6 +7,7 @@ export namespace STTCommand {
6
7
  export const RequestSchema = z.object({
7
8
  userId: z.string().uuid().nullable().optional(),
8
9
  unregisteredUserId: z.string().uuid().nullable().optional(),
10
+ scope: z.nativeEnum(JOB_SCOPE).default(JOB_SCOPE.TOOL),
9
11
  modelId: z.string(),
10
12
  fileId: z.string(),
11
13
  fileKey: z.string(),
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { JOB_SCOPE } from '../../common';
2
3
  import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
4
  import { STTJobSchema } from '../models/stt-job.schema';
4
5
 
@@ -7,6 +8,7 @@ export namespace FindSTTJobsQuery {
7
8
  .object({
8
9
  userId: z.string().uuid().optional(),
9
10
  unregisteredUserId: z.string().uuid().optional(),
11
+ scope: z.nativeEnum(JOB_SCOPE).default(JOB_SCOPE.TOOL),
10
12
  title: z.string().optional(),
11
13
  limit: z.coerce.number().min(1).optional(),
12
14
  offset: z.coerce.number().min(0).optional(),
@@ -1,10 +1,12 @@
1
1
  import { z } from 'zod';
2
+ import { JOB_SCOPE } from '../../common';
2
3
  import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
4
 
4
5
  export namespace DeleteAllTTSJobsCommand {
5
6
  export const RequestSchema = z.object({
6
7
  userId: z.string().uuid().nullable().optional(),
7
8
  unregisteredUserId: z.string().uuid().nullable().optional(),
9
+ scope: z.nativeEnum(JOB_SCOPE).default(JOB_SCOPE.TOOL),
8
10
  });
9
11
  export type Request = z.infer<typeof RequestSchema>;
10
12
 
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { JOB_SCOPE } from '../../common';
2
3
  import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
4
  import { TTSJobSchema } from '../models/tts-job.schema';
4
5
 
@@ -6,6 +7,7 @@ export namespace TTSCommand {
6
7
  export const RequestSchema = z.object({
7
8
  userId: z.string().uuid().nullable().optional(),
8
9
  unregisteredUserId: z.string().uuid().nullable().optional(),
10
+ scope: z.nativeEnum(JOB_SCOPE).default(JOB_SCOPE.TOOL),
9
11
  modelId: z.string(),
10
12
  voiceId: z.string(),
11
13
  userInput: z.string(),
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { JOB_SCOPE } from '../../common';
2
3
  import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
4
  import { TTSJobSchema } from '../models/tts-job.schema';
4
5
 
@@ -7,6 +8,7 @@ export namespace FindTTSJobsQuery {
7
8
  .object({
8
9
  userId: z.string().uuid().optional(),
9
10
  unregisteredUserId: z.string().uuid().optional(),
11
+ scope: z.nativeEnum(JOB_SCOPE).default(JOB_SCOPE.TOOL),
10
12
  title: z.string().optional(),
11
13
  limit: z.coerce.number().min(1).optional(),
12
14
  offset: z.coerce.number().min(0).default(0).optional(),
@@ -1,10 +1,12 @@
1
1
  import { z } from 'zod';
2
+ import { JOB_SCOPE } from '../../common';
2
3
  import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
4
 
4
5
  export namespace DeleteAllVideoJobsCommand {
5
6
  export const RequestSchema = z.object({
6
7
  userId: z.string().uuid().nullable().optional(),
7
8
  unregisteredUserId: z.string().uuid().nullable().optional(),
9
+ scope: z.nativeEnum(JOB_SCOPE).default(JOB_SCOPE.TOOL),
8
10
  });
9
11
  export type Request = z.infer<typeof RequestSchema>;
10
12
 
@@ -7,3 +7,4 @@ export * from './get-video-price.command';
7
7
  export * from './update-video-job-title.command';
8
8
  export * from './video-model';
9
9
  export * from './update-published-status-video-jobs.command';
10
+ export * from './moderate-video-before-post.command';
@@ -0,0 +1,20 @@
1
+ import { z } from 'zod';
2
+ import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
+
4
+ export namespace ModerateVideoBeforePostCommand {
5
+ export const RequestSchema = z.object({
6
+ criteria: z.object({
7
+ uuid: z.string().uuid(),
8
+ userId: z.string().uuid().nullable().optional(),
9
+ unregisteredUserId: z.string().uuid().nullable().optional(),
10
+ }),
11
+ });
12
+ export type Request = z.infer<typeof RequestSchema>;
13
+
14
+ export const ResponseSchema = ICommandResponseSchema(
15
+ z.object({
16
+ isAllowed: z.boolean(),
17
+ }),
18
+ );
19
+ export type Response = z.infer<typeof ResponseSchema>;
20
+ }
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { JOB_SCOPE } from '../../common';
2
3
  import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
4
  import { LocaleSchema } from '../../common/models/locale.schema';
4
5
  import { TOOL_WORKSPACE_ITEM_SLOT } from '../../tool-workspace';
@@ -11,6 +12,7 @@ export namespace VideoCommand {
11
12
  locale: LocaleSchema,
12
13
  userId: z.string().uuid().nullable().optional(),
13
14
  unregisteredUserId: z.string().uuid().nullable().optional(),
15
+ scope: z.nativeEnum(JOB_SCOPE).default(JOB_SCOPE.TOOL),
14
16
  workspaceId: z.string().uuid().nullable().optional(),
15
17
  workspaceItemId: z.string().uuid().nullable().optional(),
16
18
  workspaceToolType: z.nativeEnum(TOOL_CONTENT_TYPE).nullable().optional(),
@@ -8,3 +8,4 @@ export * from './veo-job-params-type.enum';
8
8
  export * from './video-resolution.enum';
9
9
  export * from './video-pricing-rule-type.enum';
10
10
  export * from './video-generation-model-limitation.enum';
11
+ export * from './video-publish-moderation-status.enum';
@@ -0,0 +1,5 @@
1
+ export enum VIDEO_PUBLISH_MODERATION_STATUS {
2
+ NOT_CHECKED = 'NOT_CHECKED',
3
+ PASSED = 'PASSED',
4
+ FAILED = 'FAILED',
5
+ }
@@ -1,6 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import { JOB_STATUS } from '../../tools';
3
3
  import { USER_REACTION } from '../../common';
4
+ import { VIDEO_PUBLISH_MODERATION_STATUS } from '../enums';
4
5
 
5
6
  export const VideoJobParamsSchema = z.object({
6
7
  imageUrls: z.string().array().optional(),
@@ -24,6 +25,7 @@ export const VideoJobSchema = z.object({
24
25
  prompt: z.string(),
25
26
  reaction: z.nativeEnum(USER_REACTION).nullable(),
26
27
  isPublished: z.boolean(),
28
+ publishModerationStatus: z.nativeEnum(VIDEO_PUBLISH_MODERATION_STATUS),
27
29
  postId: z.string().nullable(),
28
30
  dislikeReason: z.string().nullable(),
29
31
  externalId: z.string().nullable(),
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { JOB_SCOPE } from '../../common';
2
3
  import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
4
  import { VideoJobSchema } from '../models/video-job.schema';
4
5
 
@@ -7,6 +8,7 @@ export namespace FindVideoJobsQuery {
7
8
  .object({
8
9
  userId: z.string().uuid().optional(),
9
10
  unregisteredUserId: z.string().uuid().optional(),
11
+ scope: z.nativeEnum(JOB_SCOPE).default(JOB_SCOPE.TOOL),
10
12
  workspaceId: z.string().uuid().nullable().optional(),
11
13
  title: z.string().optional(),
12
14
  limit: z.coerce.number().min(1).optional(),
@@ -10,4 +10,5 @@ export const VIDEO_AMQP_ROUTES = {
10
10
  SOFT_DELETE_ALL: 'tools.video.jobs.soft-delete-all.rpc',
11
11
  RETRY: 'tools.video.jobs.retry.rpc',
12
12
  UPDATE_JOB: 'tools.video.jobs.update.rpc',
13
+ MODERATE_BEFORE_POST: 'tools.video.jobs.moderate-before-post.rpc',
13
14
  } as const;
@@ -1,10 +1,12 @@
1
1
  import { z } from 'zod';
2
+ import { JOB_SCOPE } from '../../common';
2
3
  import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
4
 
4
5
  export namespace DeleteAllVideoEditorJobsCommand {
5
6
  export const RequestSchema = z.object({
6
7
  userId: z.string().uuid().nullable().optional(),
7
8
  unregisteredUserId: z.string().uuid().nullable().optional(),
9
+ scope: z.nativeEnum(JOB_SCOPE).default(JOB_SCOPE.TOOL),
8
10
  });
9
11
  export type Request = z.infer<typeof RequestSchema>;
10
12
 
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { JOB_SCOPE } from '../../common';
2
3
  import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
4
  import { VideoEditorJobSchema, VideoEditorJobParamsSchema } from '../models';
4
5
 
@@ -6,6 +7,7 @@ export namespace EditVideoCommand {
6
7
  export const RequestSchema = z.object({
7
8
  userId: z.string().uuid().nullable().optional(),
8
9
  unregisteredUserId: z.string().uuid().nullable().optional(),
10
+ scope: z.nativeEnum(JOB_SCOPE).default(JOB_SCOPE.TOOL),
9
11
  prompt: z.string(),
10
12
  inputVideoId: z.string().uuid(),
11
13
  inputVideoUrl: z.string(),
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { JOB_SCOPE } from '../../common';
2
3
  import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
4
  import { VideoEditorJobSchema } from '../models/video-editor-job.schema';
4
5
 
@@ -7,6 +8,7 @@ export namespace FindVideoEditorJobsQuery {
7
8
  .object({
8
9
  userId: z.string().uuid().optional(),
9
10
  unregisteredUserId: z.string().uuid().optional(),
11
+ scope: z.nativeEnum(JOB_SCOPE).default(JOB_SCOPE.TOOL),
10
12
  title: z.string().optional(),
11
13
  limit: z.coerce.number().min(1).optional(),
12
14
  offset: z.coerce.number().min(0).default(0).optional(),