@purpleschool/gptbot-tools 0.0.54 → 0.0.56-presentation

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 (188) hide show
  1. package/build/common/errors/errors.js +399 -2
  2. package/build/index.js +6 -0
  3. package/build/music/commands/convert-to-wav.command.js +15 -0
  4. package/build/music/commands/delete-all-music-jobs.command.js +13 -0
  5. package/build/music/commands/delete-music-job-by-uuid.command.js +14 -0
  6. package/build/music/commands/generate-lyrics.command.js +18 -0
  7. package/build/music/commands/generate-music.command.js +18 -0
  8. package/build/music/commands/index.js +24 -0
  9. package/build/music/commands/retry-music-job.command.js +16 -0
  10. package/build/music/commands/set-reaction-to-music-job.command.js +17 -0
  11. package/build/music/commands/update-music-job-title.command.js +16 -0
  12. package/build/music/enums/index.js +22 -0
  13. package/build/music/enums/music-action-type.enum.js +7 -0
  14. package/build/music/enums/music-pricing-rule-type.enum.js +7 -0
  15. package/build/music/enums/music-strategy.enum.js +7 -0
  16. package/build/music/enums/music-vocal-gender.enum.js +8 -0
  17. package/build/music/enums/suno-mode-type.enum.js +10 -0
  18. package/build/music/enums/suno-model-type.enum.js +10 -0
  19. package/build/music/index.js +22 -0
  20. package/build/music/models/index.js +20 -0
  21. package/build/music/models/music-config.schema.js +8 -0
  22. package/build/music/models/music-job.schema.js +54 -0
  23. package/build/music/models/music-model.schema.js +35 -0
  24. package/build/music/models/music-track.schema.js +17 -0
  25. package/build/music/queries/find-music-job-by-id.query.js +10 -0
  26. package/build/music/queries/find-music-jobs.query.js +28 -0
  27. package/build/music/queries/get-music-config.query.js +9 -0
  28. package/build/music/queries/index.js +19 -0
  29. package/build/music/routes/index.js +17 -0
  30. package/build/music/routes/music.amqp.routes.js +16 -0
  31. package/build/music/utils/calculate-music-generation-price.util.js +7 -0
  32. package/build/music/utils/index.js +17 -0
  33. package/build/presentation/commands/build-blank-slide.command.js +15 -0
  34. package/build/presentation/commands/generate-and-insert-slide.command.js +22 -0
  35. package/build/presentation/commands/index.js +7 -0
  36. package/build/presentation/commands/presentation-generate-report.command.js +18 -0
  37. package/build/presentation/commands/presentation-paraphrase.command.js +19 -0
  38. package/build/presentation/commands/update-presentation-slides.command.js +16 -0
  39. package/build/presentation/commands/update-slide-image-slot.command.js +34 -0
  40. package/build/presentation/commands/update-slide.command.js +17 -0
  41. package/build/presentation/enums/index.js +4 -0
  42. package/build/presentation/enums/presentation-ai-action-call-status.enum.js +9 -0
  43. package/build/presentation/enums/presentation-ai-action-pricing-type.enum.js +8 -0
  44. package/build/presentation/enums/presentation-ai-action-type.enum.js +8 -0
  45. package/build/presentation/enums/slide-image-slot-action.enum.js +8 -0
  46. package/build/presentation/index.js +1 -0
  47. package/build/presentation/models/index.js +1 -0
  48. package/build/presentation/models/presentation-ai-action.schema.js +27 -0
  49. package/build/presentation/models/presentation-config.schema.js +3 -0
  50. package/build/presentation/models/presentation.schema.js +4 -1
  51. package/build/presentation/models/slide-content-edit.schema.js +135 -0
  52. package/build/presentation/models/slide-content.schema.js +5 -1
  53. package/build/presentation/models/slide.schema.js +39 -1
  54. package/build/presentation/routes/presentation.routes.js +7 -0
  55. package/build/presentation/utils/calculate-presentation-ai-action-price.util.js +16 -0
  56. package/build/presentation/utils/index.js +17 -0
  57. package/build/tools/enums/tool-type.enum.js +4 -0
  58. package/build/video/enums/video-strategy.enum.js +2 -0
  59. package/build/video/routes/video.http.routes.js +1 -0
  60. package/build/video-editor/commands/delete-all-video-editor-jobs.command.js +13 -0
  61. package/build/video-editor/commands/delete-video-editor-job-by-uuid.command.js +14 -0
  62. package/build/video-editor/commands/edit-video.command.js +19 -0
  63. package/build/video-editor/commands/index.js +22 -0
  64. package/build/video-editor/commands/retry-video-editor-job.command.js +16 -0
  65. package/build/video-editor/commands/set-reaction-to-video-editor-job.command.js +17 -0
  66. package/build/video-editor/commands/update-video-editor-job-title.command.js +16 -0
  67. package/build/video-editor/enums/index.js +17 -0
  68. package/build/video-editor/enums/video-editor-model-strategy.enum.js +10 -0
  69. package/build/video-editor/index.js +22 -0
  70. package/build/video-editor/models/index.js +19 -0
  71. package/build/video-editor/models/video-editor-config.schema.js +11 -0
  72. package/build/video-editor/models/video-editor-job.schema.js +27 -0
  73. package/build/video-editor/models/video-editor-model.schema.js +24 -0
  74. package/build/video-editor/queries/find-video-editor-job-by-id.query.js +19 -0
  75. package/build/video-editor/queries/find-video-editor-jobs.query.js +28 -0
  76. package/build/video-editor/queries/get-video-editor-config.query.js +11 -0
  77. package/build/video-editor/queries/index.js +19 -0
  78. package/build/video-editor/routes/index.js +18 -0
  79. package/build/video-editor/routes/video-editor.amqp.routes.js +14 -0
  80. package/build/video-editor/routes/video-editor.http.routes.js +8 -0
  81. package/build/video-editor/utils/calculate-video-editing-price.js +10 -0
  82. package/build/video-editor/utils/index.js +17 -0
  83. package/build/writer/commands/generate-document-contents.command.js +1 -0
  84. package/build/writer/commands/index.js +1 -0
  85. package/build/writer/enums/index.js +1 -0
  86. package/build/writer/enums/writer-content-generation-strategy.enum.js +8 -0
  87. package/build/writer/index.js +1 -0
  88. package/build/writer/models/index.js +1 -0
  89. package/build/writer/models/writer-config.schema.js +2 -0
  90. package/build/writer/models/writer-document-type.schema.js +1 -0
  91. package/build/writer/models/writer-document.schema.js +1 -0
  92. package/build/writer/models/writer-model.schema.js +21 -0
  93. package/build/writer/utils/calculate-writer-content-generation-price.util.js +2 -2
  94. package/common/errors/errors.ts +408 -3
  95. package/index.ts +6 -0
  96. package/music/commands/convert-to-wav.command.ts +15 -0
  97. package/music/commands/delete-all-music-jobs.command.ts +13 -0
  98. package/music/commands/delete-music-job-by-uuid.command.ts +14 -0
  99. package/music/commands/generate-lyrics.command.ts +20 -0
  100. package/music/commands/generate-music.command.ts +18 -0
  101. package/music/commands/index.ts +8 -0
  102. package/music/commands/retry-music-job.command.ts +16 -0
  103. package/music/commands/set-reaction-to-music-job.command.ts +17 -0
  104. package/music/commands/update-music-job-title.command.ts +16 -0
  105. package/music/enums/index.ts +6 -0
  106. package/music/enums/music-action-type.enum.ts +3 -0
  107. package/music/enums/music-pricing-rule-type.enum.ts +3 -0
  108. package/music/enums/music-strategy.enum.ts +3 -0
  109. package/music/enums/music-vocal-gender.enum.ts +4 -0
  110. package/music/enums/suno-mode-type.enum.ts +6 -0
  111. package/music/enums/suno-model-type.enum.ts +6 -0
  112. package/music/index.ts +6 -0
  113. package/music/models/index.ts +4 -0
  114. package/music/models/music-config.schema.ts +8 -0
  115. package/music/models/music-job.schema.ts +57 -0
  116. package/music/models/music-model.schema.ts +40 -0
  117. package/music/models/music-track.schema.ts +19 -0
  118. package/music/queries/find-music-job-by-id.query.ts +11 -0
  119. package/music/queries/find-music-jobs.query.ts +33 -0
  120. package/music/queries/get-music-config.query.ts +8 -0
  121. package/music/queries/index.ts +3 -0
  122. package/music/routes/index.ts +1 -0
  123. package/music/routes/music.amqp.routes.ts +13 -0
  124. package/music/utils/calculate-music-generation-price.util.ts +5 -0
  125. package/music/utils/index.ts +1 -0
  126. package/package.json +1 -1
  127. package/presentation/commands/build-blank-slide.command.ts +15 -0
  128. package/presentation/commands/generate-and-insert-slide.command.ts +22 -0
  129. package/presentation/commands/index.ts +7 -0
  130. package/presentation/commands/presentation-generate-report.command.ts +20 -0
  131. package/presentation/commands/presentation-paraphrase.command.ts +21 -0
  132. package/presentation/commands/update-presentation-slides.command.ts +16 -0
  133. package/presentation/commands/update-slide-image-slot.command.ts +39 -0
  134. package/presentation/commands/update-slide.command.ts +17 -0
  135. package/presentation/enums/index.ts +4 -0
  136. package/presentation/enums/presentation-ai-action-call-status.enum.ts +5 -0
  137. package/presentation/enums/presentation-ai-action-pricing-type.enum.ts +4 -0
  138. package/presentation/enums/presentation-ai-action-type.enum.ts +4 -0
  139. package/presentation/enums/slide-image-slot-action.enum.ts +4 -0
  140. package/presentation/index.ts +1 -0
  141. package/presentation/models/index.ts +1 -0
  142. package/presentation/models/presentation-ai-action.schema.ts +30 -0
  143. package/presentation/models/presentation-config.schema.ts +3 -0
  144. package/presentation/models/presentation.schema.ts +4 -1
  145. package/presentation/models/slide-content-edit.schema.ts +160 -0
  146. package/presentation/models/slide-content.schema.ts +104 -11
  147. package/presentation/models/slide-image-slot.schema.ts +1 -0
  148. package/presentation/models/slide.schema.ts +47 -0
  149. package/presentation/routes/presentation.routes.ts +7 -0
  150. package/presentation/utils/calculate-presentation-ai-action-price.util.ts +20 -0
  151. package/presentation/utils/index.ts +1 -0
  152. package/tools/enums/tool-type.enum.ts +4 -0
  153. package/video/enums/video-strategy.enum.ts +2 -0
  154. package/video/routes/video.http.routes.ts +1 -0
  155. package/video-editor/commands/delete-all-video-editor-jobs.command.ts +13 -0
  156. package/video-editor/commands/delete-video-editor-job-by-uuid.command.ts +14 -0
  157. package/video-editor/commands/edit-video.command.ts +19 -0
  158. package/video-editor/commands/index.ts +6 -0
  159. package/video-editor/commands/retry-video-editor-job.command.ts +16 -0
  160. package/video-editor/commands/set-reaction-to-video-editor-job.command.ts +17 -0
  161. package/video-editor/commands/update-video-editor-job-title.command.ts +16 -0
  162. package/video-editor/enums/index.ts +1 -0
  163. package/video-editor/enums/video-editor-model-strategy.enum.ts +6 -0
  164. package/video-editor/index.ts +6 -0
  165. package/video-editor/models/index.ts +3 -0
  166. package/video-editor/models/video-editor-config.schema.ts +7 -0
  167. package/video-editor/models/video-editor-job.schema.ts +27 -0
  168. package/video-editor/models/video-editor-model.schema.ts +23 -0
  169. package/video-editor/queries/find-video-editor-job-by-id.query.ts +19 -0
  170. package/video-editor/queries/find-video-editor-jobs.query.ts +33 -0
  171. package/video-editor/queries/get-video-editor-config.query.ts +11 -0
  172. package/video-editor/queries/index.ts +3 -0
  173. package/video-editor/routes/index.ts +2 -0
  174. package/video-editor/routes/video-editor.amqp.routes.ts +11 -0
  175. package/video-editor/routes/video-editor.http.routes.ts +6 -0
  176. package/video-editor/utils/calculate-video-editing-price.ts +12 -0
  177. package/video-editor/utils/index.ts +1 -0
  178. package/writer/commands/generate-document-contents.command.ts +1 -0
  179. package/writer/commands/index.ts +1 -0
  180. package/writer/enums/index.ts +1 -0
  181. package/writer/enums/writer-content-generation-strategy.enum.ts +4 -0
  182. package/writer/index.ts +1 -0
  183. package/writer/models/index.ts +1 -0
  184. package/writer/models/writer-config.schema.ts +2 -0
  185. package/writer/models/writer-document-type.schema.ts +1 -0
  186. package/writer/models/writer-document.schema.ts +1 -0
  187. package/writer/models/writer-model.schema.ts +21 -0
  188. package/writer/utils/calculate-writer-content-generation-price.util.ts +4 -2
@@ -5,14 +5,17 @@ const zod_1 = require("zod");
5
5
  const slide_content_type_schema_1 = require("./slide-content-type.schema");
6
6
  const language_1 = require("../../language");
7
7
  const presentation_template_schema_1 = require("./presentation-template.schema");
8
+ const presentation_ai_action_schema_1 = require("./presentation-ai-action.schema");
8
9
  exports.PresentationConfigSchema = zod_1.z.object({
9
10
  slideContentTypes: zod_1.z.array(slide_content_type_schema_1.SlideContentTypeSchema),
10
11
  languages: zod_1.z.array(language_1.LanguageSchema),
11
12
  templates: zod_1.z.array(presentation_template_schema_1.PresentationTemplateSchema),
13
+ aiActions: zod_1.z.array(presentation_ai_action_schema_1.PresentationAiActionSchema),
12
14
  slideGenerationPrice: zod_1.z.number(),
13
15
  maxSlides: zod_1.z.number(),
14
16
  minSlides: zod_1.z.number(),
15
17
  maxSlideTitleLength: zod_1.z.number(),
16
18
  maxSlideOutlineLength: zod_1.z.number(),
17
19
  maxPromptLength: zod_1.z.number(),
20
+ imageGenerationPrice: zod_1.z.number(),
18
21
  });
@@ -18,6 +18,8 @@ exports.PresentationSchema = zod_1.z.object({
18
18
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
19
19
  slideCount: zod_1.z.number(),
20
20
  isDeleted: zod_1.z.boolean(),
21
+ lastContentUpdateAt: zod_1.z.date().nullable(),
22
+ lastPptxExportedAt: zod_1.z.date().nullable(),
21
23
  createdAt: zod_1.z.date(),
22
24
  updatedAt: zod_1.z.date(),
23
25
  });
@@ -27,4 +29,5 @@ exports.PresentationWithSlidesSchema = exports.PresentationSchema.extend({
27
29
  });
28
30
  exports.PresentationUpdateSchema = exports.PresentationSchema.pick({
29
31
  title: true,
30
- });
32
+ templateId: true,
33
+ }).partial();
@@ -0,0 +1,135 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.SlideContentUserEditSchema = exports.ChartSlideDataUserEditSchema = exports.BarChartSlideDataUserEditSchema = exports.TableSlideDataUserEditSchema = exports.SectionBreakSlideDataUserEditSchema = exports.ImageSlideDataUserEditSchema = exports.ContentsSlideDataUserEditSchema = exports.StructuredListSlideDataUserEditSchema = exports.TextSlideDataUserEditSchema = exports.ThankYouSlideDataUserEditSchema = exports.CoverSlideDataUserEditSchema = void 0;
7
+ const zod_1 = __importDefault(require("zod"));
8
+ const enums_1 = require("../enums");
9
+ const slide_content_schema_1 = require("./slide-content.schema");
10
+ exports.CoverSlideDataUserEditSchema = zod_1.default.object({
11
+ contentType: zod_1.default.literal(enums_1.SLIDE_CONTENT_TYPE.COVER),
12
+ title: zod_1.default.string().min(1).max(500),
13
+ author: zod_1.default.object({
14
+ label: zod_1.default.string().min(1).max(100),
15
+ value: zod_1.default.string().min(1).max(200),
16
+ }),
17
+ date: zod_1.default.object({
18
+ label: zod_1.default.string().min(1).max(100),
19
+ value: zod_1.default.string().min(1).max(200),
20
+ }),
21
+ email: zod_1.default.object({
22
+ label: zod_1.default.string().min(1).max(100),
23
+ value: zod_1.default.string().min(1).max(200),
24
+ }),
25
+ version: zod_1.default.literal(1),
26
+ });
27
+ exports.ThankYouSlideDataUserEditSchema = zod_1.default.object({
28
+ contentType: zod_1.default.literal(enums_1.SLIDE_CONTENT_TYPE.THANK_YOU),
29
+ title: zod_1.default.string().min(1).max(500),
30
+ author: zod_1.default.object({
31
+ label: zod_1.default.string().min(1).max(100),
32
+ value: zod_1.default.string().min(1).max(200),
33
+ }),
34
+ date: zod_1.default.object({
35
+ label: zod_1.default.string().min(1).max(100),
36
+ value: zod_1.default.string().min(1).max(200),
37
+ }),
38
+ email: zod_1.default.object({
39
+ label: zod_1.default.string().min(1).max(100),
40
+ value: zod_1.default.string().min(1).max(200),
41
+ }),
42
+ version: zod_1.default.literal(1),
43
+ });
44
+ exports.TextSlideDataUserEditSchema = zod_1.default.object({
45
+ contentType: zod_1.default.literal(enums_1.SLIDE_CONTENT_TYPE.TEXT),
46
+ title: zod_1.default.string().min(1).max(500),
47
+ description: zod_1.default.string().min(1).max(3000),
48
+ version: zod_1.default.literal(1),
49
+ });
50
+ exports.StructuredListSlideDataUserEditSchema = zod_1.default.object({
51
+ contentType: zod_1.default.literal(enums_1.SLIDE_CONTENT_TYPE.STRUCTURED_LIST),
52
+ title: zod_1.default.string().min(1).max(500),
53
+ description: zod_1.default.string().min(1).max(1000),
54
+ list: zod_1.default
55
+ .array(zod_1.default.object({
56
+ title: zod_1.default.string().min(1).max(200),
57
+ description: zod_1.default.string().min(1).max(500),
58
+ }))
59
+ .min(1)
60
+ .max(10),
61
+ version: zod_1.default.literal(1),
62
+ });
63
+ exports.ContentsSlideDataUserEditSchema = zod_1.default.object({
64
+ contentType: zod_1.default.literal(enums_1.SLIDE_CONTENT_TYPE.CONTENTS),
65
+ title: zod_1.default.string().min(1).max(500),
66
+ items: zod_1.default
67
+ .array(zod_1.default.object({
68
+ pageNumber: zod_1.default.number(),
69
+ title: zod_1.default.string().min(1).max(500),
70
+ }))
71
+ .min(1)
72
+ .max(50),
73
+ version: zod_1.default.literal(1),
74
+ });
75
+ exports.ImageSlideDataUserEditSchema = zod_1.default.object({
76
+ contentType: zod_1.default.literal(enums_1.SLIDE_CONTENT_TYPE.TEXT_WITH_IMAGE),
77
+ title: zod_1.default.string().min(1).max(500),
78
+ description: zod_1.default.string().min(1).max(2000),
79
+ imageSlot: slide_content_schema_1.ImageSlotSchema,
80
+ version: zod_1.default.literal(1),
81
+ });
82
+ exports.SectionBreakSlideDataUserEditSchema = zod_1.default.object({
83
+ contentType: zod_1.default.literal(enums_1.SLIDE_CONTENT_TYPE.SECTION_BREAK),
84
+ title: zod_1.default.string().min(1).max(500),
85
+ description: zod_1.default.string().min(1).max(500),
86
+ version: zod_1.default.literal(1),
87
+ });
88
+ exports.TableSlideDataUserEditSchema = zod_1.default.object({
89
+ contentType: zod_1.default.literal(enums_1.SLIDE_CONTENT_TYPE.TABLE),
90
+ title: zod_1.default.string().min(1).max(500),
91
+ description: zod_1.default.string().min(1).max(1000),
92
+ table: zod_1.default.object({
93
+ columnHeaders: zod_1.default.array(zod_1.default.string().min(1).max(200)).min(1).max(20),
94
+ rows: zod_1.default
95
+ .array(zod_1.default.array(zod_1.default.string().min(1).max(500)))
96
+ .min(1)
97
+ .max(20),
98
+ hasRowHeaders: zod_1.default.boolean(),
99
+ hasSummaryRow: zod_1.default.boolean(),
100
+ }),
101
+ version: zod_1.default.literal(1),
102
+ });
103
+ exports.BarChartSlideDataUserEditSchema = zod_1.default.object({
104
+ type: zod_1.default.literal(slide_content_schema_1.SLIDE_CHART_TYPE.BAR),
105
+ categories: zod_1.default.array(zod_1.default.string().min(1).max(200)).min(1).max(50),
106
+ series: zod_1.default
107
+ .array(zod_1.default.object({
108
+ name: zod_1.default.string().min(1).max(200),
109
+ data: zod_1.default.array(zod_1.default.number()),
110
+ type: zod_1.default.number().min(0).max(11),
111
+ }))
112
+ .min(1)
113
+ .max(5),
114
+ yAxisLabel: zod_1.default.string().max(200).optional(),
115
+ unit: zod_1.default.string().max(50).optional(),
116
+ version: zod_1.default.literal(1),
117
+ });
118
+ exports.ChartSlideDataUserEditSchema = zod_1.default.object({
119
+ contentType: zod_1.default.literal(enums_1.SLIDE_CONTENT_TYPE.CHART),
120
+ title: zod_1.default.string().min(1).max(500),
121
+ description: zod_1.default.string().min(1).max(2000),
122
+ chart: zod_1.default.discriminatedUnion('type', [exports.BarChartSlideDataUserEditSchema]),
123
+ version: zod_1.default.literal(1),
124
+ });
125
+ exports.SlideContentUserEditSchema = zod_1.default.discriminatedUnion('contentType', [
126
+ exports.CoverSlideDataUserEditSchema,
127
+ exports.StructuredListSlideDataUserEditSchema,
128
+ exports.TextSlideDataUserEditSchema,
129
+ exports.ContentsSlideDataUserEditSchema,
130
+ exports.SectionBreakSlideDataUserEditSchema,
131
+ exports.ImageSlideDataUserEditSchema,
132
+ exports.ThankYouSlideDataUserEditSchema,
133
+ exports.TableSlideDataUserEditSchema,
134
+ exports.ChartSlideDataUserEditSchema,
135
+ ]);
@@ -72,7 +72,11 @@ exports.StructuredListSlideDataSchema = zod_1.z.object({
72
72
  list: zod_1.z
73
73
  .array(zod_1.z.object({
74
74
  title: zod_1.z.string().describe('2–4 words, concrete'),
75
- description: zod_1.z.string().describe('One clear short framing sentence').max(100),
75
+ description: zod_1.z
76
+ .string()
77
+ .describe("One clear short framing sentence. DON'T CUT THE TEXT SHORT MID WORD/SENTENCE!. Generate less content if that happened")
78
+ .min(50)
79
+ .max(120),
76
80
  }))
77
81
  .length(4),
78
82
  version: zod_1.z.literal(1),
@@ -1,11 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SlideSchema = void 0;
3
+ exports.SlideBulkUpdateSchema = exports.SlideUpdateSchema = exports.SlideSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const slide_content_schema_1 = require("./slide-content.schema");
6
6
  const enums_1 = require("../enums");
7
7
  const slide_icon_slot_schema_1 = require("./slide-icon-slot.schema");
8
8
  const slide_image_slot_schema_1 = require("./slide-image-slot.schema");
9
+ const slide_content_edit_schema_1 = require("./slide-content-edit.schema");
9
10
  exports.SlideSchema = zod_1.z.object({
10
11
  uuid: zod_1.z.string().uuid(),
11
12
  order: zod_1.z.number(),
@@ -18,3 +19,40 @@ exports.SlideSchema = zod_1.z.object({
18
19
  createdAt: zod_1.z.date(),
19
20
  updatedAt: zod_1.z.date(),
20
21
  });
22
+ exports.SlideUpdateSchema = exports.SlideSchema.pick({
23
+ layoutId: true,
24
+ })
25
+ .extend({
26
+ content: slide_content_edit_schema_1.SlideContentUserEditSchema,
27
+ })
28
+ .partial();
29
+ exports.SlideBulkUpdateSchema = exports.SlideSchema.pick({
30
+ order: true,
31
+ contentTypeId: true,
32
+ layoutId: true,
33
+ presentationId: true,
34
+ })
35
+ .extend({
36
+ uuid: zod_1.z.string().uuid().optional(),
37
+ content: slide_content_edit_schema_1.SlideContentUserEditSchema,
38
+ })
39
+ .array()
40
+ .min(1, 'Must include at least one slide')
41
+ .refine((arr) => {
42
+ const orders = arr.map((s) => s.order);
43
+ const unique = new Set(orders);
44
+ if (unique.size !== orders.length)
45
+ return false;
46
+ const sorted = [...orders].sort((a, b) => a - b);
47
+ return sorted.every((val, idx) => val === idx);
48
+ }, {
49
+ message: 'Slide orders must be unique and sequential starting at 0',
50
+ path: ['order'],
51
+ })
52
+ .refine((arr) => {
53
+ const [firstId, ...rest] = arr.map((s) => s.presentationId);
54
+ return rest.every((id) => id === firstId);
55
+ }, {
56
+ message: 'All slides must belong to the same presentation',
57
+ path: ['presentationId'],
58
+ });
@@ -7,6 +7,7 @@ exports.PRESENTATION_AMQP_ROUTES = {
7
7
  FIND_BY_UUID: 'tools.presentation.find-by-uuid.rpc',
8
8
  GENERATE_PRESENTATION_OUTLINE: 'tools.presentation.generate-outline.rpc',
9
9
  GENERATE_PRESENTATION_SLIDES: 'tools.presentation.generate-slides.rpc',
10
+ GENERATE_AND_INSERT_SLIDE: 'tools.presentation.generate-and-insert-slide.rpc',
10
11
  UPDATE_PRESENTATION_OUTLINE: 'tools.presentation.update-presentation-outline.rpc',
11
12
  LIST_PRESENTATIONS: 'tools.presentation.list-presentations.rpc',
12
13
  DELETE_PRESENTATION: 'tools.presentation.delete-presentation.rpc',
@@ -14,6 +15,12 @@ exports.PRESENTATION_AMQP_ROUTES = {
14
15
  EXPORT_AS_PPTX: 'tools.presentation.export-as-pptx.rpc',
15
16
  UPDATE_PRESENTATION: 'tools.presentation.update-presentation.rpc',
16
17
  DELETE_ALL_USER_PRESENTATIONS: 'tools.presentation.delete-all-user-presentations.rpc',
18
+ BUILD_BLANK_SLIDE: 'tools.presentation.build-blank-slide.rpc',
19
+ UPDATE_PRESENTATION_SLIDES: 'tools.presentation.update-presentation-slides.rpc',
20
+ UPDATE_SLIDE_IMAGE_SLOT: 'tools.presentation.update-slide-image-slot.rpc',
21
+ UPDATE_SLIDE: 'tools.presentation.update-slide.rpc',
22
+ PARAPHRASE: 'tools.presentation.actions.paraphrase.rpc',
23
+ GENERATE_REPORT: 'tools.presentation.actions.generate-report.rpc',
17
24
  };
18
25
  exports.PRESENTATION_SLIDE_OUTLINE_AMQP_ROUTES = {
19
26
  REPOSITION: 'tools.presentation.slide-outline.reposition-slide-outline.rpc',
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.calculatePresentationAiActionPrice = calculatePresentationAiActionPrice;
4
+ const enums_1 = require("../enums");
5
+ function calculatePresentationAiActionPrice(pricingRules, selectionText) {
6
+ switch (pricingRules.type) {
7
+ case enums_1.PRESENTATION_AI_ACTION_PRICING_TYPE.PER_CHARACTER:
8
+ const characterCount = selectionText.length;
9
+ const price = characterCount * pricingRules.price;
10
+ return Math.max(1, Math.ceil(price));
11
+ case enums_1.PRESENTATION_AI_ACTION_PRICING_TYPE.FLAT:
12
+ return Math.max(1, Math.ceil(pricingRules.price));
13
+ default:
14
+ throw new Error(`Unknown pricing type`);
15
+ }
16
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./calculate-presentation-ai-action-price.util"), exports);
@@ -8,7 +8,11 @@ var TOOL_TYPE;
8
8
  TOOL_TYPE["VIDEO"] = "VIDEO";
9
9
  TOOL_TYPE["AUDIO"] = "AUDIO";
10
10
  TOOL_TYPE["PRESENTATION"] = "PRESENTATION";
11
+ TOOL_TYPE["PRESENTATION_AI_ACTION"] = "PRESENTATION_AI_ACTION";
11
12
  TOOL_TYPE["WRITER"] = "WRITER";
12
13
  TOOL_TYPE["PARAPHRASE"] = "PARAPHRASE";
13
14
  TOOL_TYPE["WRITER_ACTION"] = "WRITER_ACTION";
15
+ TOOL_TYPE["VIDEO_EDITOR"] = "VIDEO_EDITOR";
16
+ TOOL_TYPE["MUSIC"] = "MUSIC";
17
+ TOOL_TYPE["MUSIC_ACTION"] = "MUSIC_ACTION";
14
18
  })(TOOL_TYPE || (exports.TOOL_TYPE = TOOL_TYPE = {}));
@@ -7,4 +7,6 @@ var VIDEO_GENERATION_STRATEGY;
7
7
  VIDEO_GENERATION_STRATEGY["VEO_CALLBACK"] = "VEO_CALLBACK";
8
8
  VIDEO_GENERATION_STRATEGY["RUNWAY_POLLING"] = "RUNWAY_POLLING";
9
9
  VIDEO_GENERATION_STRATEGY["RUNWAY_CALLBACK"] = "RUNWAY_CALLBACK";
10
+ VIDEO_GENERATION_STRATEGY["SORA_2_VIDEO_GENERATION_POLLING"] = "SORA_2_VIDEO_GENERATION_POLLING";
11
+ VIDEO_GENERATION_STRATEGY["SORA_2_VIDEO_GENERATION_CALLBACK"] = "SORA_2_VIDEO_GENERATION_CALLBACK";
10
12
  })(VIDEO_GENERATION_STRATEGY || (exports.VIDEO_GENERATION_STRATEGY = VIDEO_GENERATION_STRATEGY = {}));
@@ -5,4 +5,5 @@ exports.VIDEO_GENERATION_CONTROLLER = 'video-generation';
5
5
  exports.VIDEO_GENERATION_ROUTES = {
6
6
  KIE_VEO_CALLBACK: 'kie/veo/callback',
7
7
  KIE_RUNWAY_CALLBACK: 'kie/runway/callback',
8
+ KIE_SORA_2_CALLBACK: 'kie/sora-2/callback',
8
9
  };
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeleteAllVideoEditorJobsCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const command_response_schema_1 = require("../../common/models/command-response.schema");
6
+ var DeleteAllVideoEditorJobsCommand;
7
+ (function (DeleteAllVideoEditorJobsCommand) {
8
+ DeleteAllVideoEditorJobsCommand.RequestSchema = zod_1.z.object({
9
+ userId: zod_1.z.string().uuid().nullable().optional(),
10
+ unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
11
+ });
12
+ DeleteAllVideoEditorJobsCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(zod_1.z.boolean());
13
+ })(DeleteAllVideoEditorJobsCommand || (exports.DeleteAllVideoEditorJobsCommand = DeleteAllVideoEditorJobsCommand = {}));
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeleteVideoEditorJobByUuidCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const command_response_schema_1 = require("../../common/models/command-response.schema");
6
+ var DeleteVideoEditorJobByUuidCommand;
7
+ (function (DeleteVideoEditorJobByUuidCommand) {
8
+ DeleteVideoEditorJobByUuidCommand.RequestSchema = zod_1.z.object({
9
+ userId: zod_1.z.string().uuid().nullable().optional(),
10
+ unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
11
+ uuid: zod_1.z.string(),
12
+ });
13
+ DeleteVideoEditorJobByUuidCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(zod_1.z.boolean());
14
+ })(DeleteVideoEditorJobByUuidCommand || (exports.DeleteVideoEditorJobByUuidCommand = DeleteVideoEditorJobByUuidCommand = {}));
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EditVideoCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const command_response_schema_1 = require("../../common/models/command-response.schema");
6
+ const models_1 = require("../models");
7
+ var EditVideoCommand;
8
+ (function (EditVideoCommand) {
9
+ EditVideoCommand.RequestSchema = zod_1.z.object({
10
+ userId: zod_1.z.string().uuid().nullable().optional(),
11
+ unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
12
+ prompt: zod_1.z.string(),
13
+ inputVideoUrl: zod_1.z.string(),
14
+ duration: zod_1.z.number(),
15
+ userBalance: zod_1.z.number(),
16
+ modelId: zod_1.z.string(),
17
+ });
18
+ EditVideoCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.VideoEditorJobSchema);
19
+ })(EditVideoCommand || (exports.EditVideoCommand = EditVideoCommand = {}));
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./delete-all-video-editor-jobs.command"), exports);
18
+ __exportStar(require("./delete-video-editor-job-by-uuid.command"), exports);
19
+ __exportStar(require("./retry-video-editor-job.command"), exports);
20
+ __exportStar(require("./set-reaction-to-video-editor-job.command"), exports);
21
+ __exportStar(require("./update-video-editor-job-title.command"), exports);
22
+ __exportStar(require("./edit-video.command"), exports);
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RetryVideoEditorJobCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const command_response_schema_1 = require("../../common/models/command-response.schema");
6
+ const video_editor_job_schema_1 = require("../models/video-editor-job.schema");
7
+ var RetryVideoEditorJobCommand;
8
+ (function (RetryVideoEditorJobCommand) {
9
+ RetryVideoEditorJobCommand.RequestSchema = zod_1.z.object({
10
+ uuid: zod_1.z.string().uuid(),
11
+ userBalance: zod_1.z.number(),
12
+ userId: zod_1.z.string().uuid().nullable().optional(),
13
+ unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
14
+ });
15
+ RetryVideoEditorJobCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(video_editor_job_schema_1.VideoEditorJobSchema);
16
+ })(RetryVideoEditorJobCommand || (exports.RetryVideoEditorJobCommand = RetryVideoEditorJobCommand = {}));
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SetReactionToVideoEditorJobCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const command_response_schema_1 = require("../../common/models/command-response.schema");
6
+ const video_editor_job_schema_1 = require("../models/video-editor-job.schema");
7
+ const common_1 = require("../../common");
8
+ var SetReactionToVideoEditorJobCommand;
9
+ (function (SetReactionToVideoEditorJobCommand) {
10
+ SetReactionToVideoEditorJobCommand.RequestSchema = zod_1.z.object({
11
+ userId: zod_1.z.string().uuid().nullable().optional(),
12
+ unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
13
+ uuid: zod_1.z.string(),
14
+ reaction: zod_1.z.nativeEnum(common_1.USER_REACTION).nullable(),
15
+ });
16
+ SetReactionToVideoEditorJobCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(video_editor_job_schema_1.VideoEditorJobSchema);
17
+ })(SetReactionToVideoEditorJobCommand || (exports.SetReactionToVideoEditorJobCommand = SetReactionToVideoEditorJobCommand = {}));
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateVideoEditorJobTitleCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const command_response_schema_1 = require("../../common/models/command-response.schema");
6
+ const video_editor_job_schema_1 = require("../models/video-editor-job.schema");
7
+ var UpdateVideoEditorJobTitleCommand;
8
+ (function (UpdateVideoEditorJobTitleCommand) {
9
+ UpdateVideoEditorJobTitleCommand.RequestSchema = zod_1.z.object({
10
+ userId: zod_1.z.string().uuid().nullable().optional(),
11
+ unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
12
+ uuid: zod_1.z.string(),
13
+ title: zod_1.z.string(),
14
+ });
15
+ UpdateVideoEditorJobTitleCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(video_editor_job_schema_1.VideoEditorJobSchema);
16
+ })(UpdateVideoEditorJobTitleCommand || (exports.UpdateVideoEditorJobTitleCommand = UpdateVideoEditorJobTitleCommand = {}));
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./video-editor-model-strategy.enum"), exports);
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VIDEO_EDITOR_MODEL_STRATEGY = void 0;
4
+ var VIDEO_EDITOR_MODEL_STRATEGY;
5
+ (function (VIDEO_EDITOR_MODEL_STRATEGY) {
6
+ VIDEO_EDITOR_MODEL_STRATEGY["LUMA_MODIFY_POLLING"] = "LUMA_MODIFY_POLLING";
7
+ VIDEO_EDITOR_MODEL_STRATEGY["ALEPH_EDITING_POLLING"] = "ALEPH_EDITING_POLLING";
8
+ VIDEO_EDITOR_MODEL_STRATEGY["LUMA_MODIFY_CALLBACK"] = "LUMA_MODIFY_CALLBACK";
9
+ VIDEO_EDITOR_MODEL_STRATEGY["ALEPH_EDITING_CALLBACK"] = "ALEPH_EDITING_CALLBACK";
10
+ })(VIDEO_EDITOR_MODEL_STRATEGY || (exports.VIDEO_EDITOR_MODEL_STRATEGY = VIDEO_EDITOR_MODEL_STRATEGY = {}));
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./commands"), exports);
18
+ __exportStar(require("./enums"), exports);
19
+ __exportStar(require("./models"), exports);
20
+ __exportStar(require("./queries"), exports);
21
+ __exportStar(require("./routes"), exports);
22
+ __exportStar(require("./utils"), exports);
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./video-editor-config.schema"), exports);
18
+ __exportStar(require("./video-editor-model.schema"), exports);
19
+ __exportStar(require("./video-editor-job.schema"), exports);
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.VideoEditorConfigSchema = void 0;
7
+ const zod_1 = __importDefault(require("zod"));
8
+ const video_editor_model_schema_1 = require("./video-editor-model.schema");
9
+ exports.VideoEditorConfigSchema = zod_1.default.object({
10
+ models: zod_1.default.array(video_editor_model_schema_1.VideoEditorModelSchema),
11
+ });
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VideoEditorJobSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const tools_1 = require("../../tools");
6
+ const common_1 = require("../../common");
7
+ exports.VideoEditorJobSchema = zod_1.z.object({
8
+ uuid: zod_1.z.string(),
9
+ prompt: zod_1.z.string(),
10
+ title: zod_1.z.string(),
11
+ status: zod_1.z.nativeEnum(tools_1.JOB_STATUS),
12
+ error: zod_1.z.string().nullable(),
13
+ price: zod_1.z.number(),
14
+ reaction: zod_1.z.nativeEnum(common_1.USER_REACTION).nullable(),
15
+ externalId: zod_1.z.string().nullable(),
16
+ modelId: zod_1.z.string(),
17
+ inputVideoUrl: zod_1.z.string(),
18
+ outputVideoUrl: zod_1.z.string().nullable(),
19
+ duration: zod_1.z.number(),
20
+ attempts: zod_1.z.array(zod_1.z.any()),
21
+ userId: zod_1.z.string().nullable().optional(),
22
+ unregisteredUserId: zod_1.z.string().nullable().optional(),
23
+ isDeleted: zod_1.z.boolean(),
24
+ createdAt: zod_1.z.date(),
25
+ completedAt: zod_1.z.date().nullable().optional(),
26
+ updatedAt: zod_1.z.date(),
27
+ });
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VideoEditorModelSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const common_1 = require("../../common");
6
+ const enums_1 = require("../enums");
7
+ exports.VideoEditorModelSchema = zod_1.z.object({
8
+ uuid: zod_1.z.string(),
9
+ title: zod_1.z.string(),
10
+ description: zod_1.z.string(),
11
+ aiModel: zod_1.z.string(),
12
+ pricePerSecond: zod_1.z.number(),
13
+ order: zod_1.z.number(),
14
+ status: zod_1.z.nativeEnum(common_1.TOOL_MODEL_STATUS),
15
+ icons: common_1.IconVariantsSchema,
16
+ strategy: zod_1.z.nativeEnum(enums_1.VIDEO_EDITOR_MODEL_STRATEGY),
17
+ maxPromptLength: zod_1.z.number(),
18
+ maxInputVideoSizeBytes: zod_1.z.number(),
19
+ maxInputVideoDurationInSeconds: zod_1.z.number(),
20
+ supportedFormats: zod_1.z.array(zod_1.z.string()),
21
+ needsTranslation: zod_1.z.boolean(),
22
+ createdAt: zod_1.z.date(),
23
+ updatedAt: zod_1.z.date(),
24
+ });
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FindVideoEditorJobByIdQuery = void 0;
4
+ const zod_1 = require("zod");
5
+ const command_response_schema_1 = require("../../common/models/command-response.schema");
6
+ const video_editor_job_schema_1 = require("../models/video-editor-job.schema");
7
+ var FindVideoEditorJobByIdQuery;
8
+ (function (FindVideoEditorJobByIdQuery) {
9
+ FindVideoEditorJobByIdQuery.RequestSchema = zod_1.z
10
+ .object({
11
+ uuid: zod_1.z.string(),
12
+ userId: zod_1.z.string().uuid().nullable().optional(),
13
+ unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
14
+ })
15
+ .refine((data) => data.userId || data.unregisteredUserId, {
16
+ message: 'Either userId or unregisteredUserId must be provided',
17
+ });
18
+ FindVideoEditorJobByIdQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(video_editor_job_schema_1.VideoEditorJobSchema);
19
+ })(FindVideoEditorJobByIdQuery || (exports.FindVideoEditorJobByIdQuery = FindVideoEditorJobByIdQuery = {}));
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FindVideoEditorJobsQuery = void 0;
4
+ const zod_1 = require("zod");
5
+ const command_response_schema_1 = require("../../common/models/command-response.schema");
6
+ const video_editor_job_schema_1 = require("../models/video-editor-job.schema");
7
+ var FindVideoEditorJobsQuery;
8
+ (function (FindVideoEditorJobsQuery) {
9
+ FindVideoEditorJobsQuery.RequestSchema = zod_1.z
10
+ .object({
11
+ userId: zod_1.z.string().uuid().optional(),
12
+ unregisteredUserId: zod_1.z.string().uuid().optional(),
13
+ title: zod_1.z.string().optional(),
14
+ limit: zod_1.z.coerce.number().min(1).optional(),
15
+ offset: zod_1.z.coerce.number().min(0).default(0).optional(),
16
+ })
17
+ .refine((data) => {
18
+ return Boolean(data.userId) !== Boolean(data.unregisteredUserId);
19
+ }, {
20
+ message: 'At least userId or unregisteredUserId must be present',
21
+ path: ['userId', 'unregisteredUserId'],
22
+ });
23
+ FindVideoEditorJobsQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(zod_1.z.object({
24
+ data: zod_1.z.array(video_editor_job_schema_1.VideoEditorJobSchema),
25
+ page: zod_1.z.number(),
26
+ totalPages: zod_1.z.number(),
27
+ }));
28
+ })(FindVideoEditorJobsQuery || (exports.FindVideoEditorJobsQuery = FindVideoEditorJobsQuery = {}));