@purpleschool/gptbot-tools 0.0.55 → 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 (186) 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/enums/index.js +1 -0
  85. package/build/writer/enums/writer-content-generation-strategy.enum.js +8 -0
  86. package/build/writer/index.js +1 -0
  87. package/build/writer/models/index.js +1 -0
  88. package/build/writer/models/writer-config.schema.js +2 -0
  89. package/build/writer/models/writer-document-type.schema.js +1 -0
  90. package/build/writer/models/writer-document.schema.js +1 -0
  91. package/build/writer/models/writer-model.schema.js +21 -0
  92. package/build/writer/utils/calculate-writer-content-generation-price.util.js +2 -2
  93. package/common/errors/errors.ts +408 -3
  94. package/index.ts +6 -0
  95. package/music/commands/convert-to-wav.command.ts +15 -0
  96. package/music/commands/delete-all-music-jobs.command.ts +13 -0
  97. package/music/commands/delete-music-job-by-uuid.command.ts +14 -0
  98. package/music/commands/generate-lyrics.command.ts +20 -0
  99. package/music/commands/generate-music.command.ts +18 -0
  100. package/music/commands/index.ts +8 -0
  101. package/music/commands/retry-music-job.command.ts +16 -0
  102. package/music/commands/set-reaction-to-music-job.command.ts +17 -0
  103. package/music/commands/update-music-job-title.command.ts +16 -0
  104. package/music/enums/index.ts +6 -0
  105. package/music/enums/music-action-type.enum.ts +3 -0
  106. package/music/enums/music-pricing-rule-type.enum.ts +3 -0
  107. package/music/enums/music-strategy.enum.ts +3 -0
  108. package/music/enums/music-vocal-gender.enum.ts +4 -0
  109. package/music/enums/suno-mode-type.enum.ts +6 -0
  110. package/music/enums/suno-model-type.enum.ts +6 -0
  111. package/music/index.ts +6 -0
  112. package/music/models/index.ts +4 -0
  113. package/music/models/music-config.schema.ts +8 -0
  114. package/music/models/music-job.schema.ts +57 -0
  115. package/music/models/music-model.schema.ts +40 -0
  116. package/music/models/music-track.schema.ts +19 -0
  117. package/music/queries/find-music-job-by-id.query.ts +11 -0
  118. package/music/queries/find-music-jobs.query.ts +33 -0
  119. package/music/queries/get-music-config.query.ts +8 -0
  120. package/music/queries/index.ts +3 -0
  121. package/music/routes/index.ts +1 -0
  122. package/music/routes/music.amqp.routes.ts +13 -0
  123. package/music/utils/calculate-music-generation-price.util.ts +5 -0
  124. package/music/utils/index.ts +1 -0
  125. package/package.json +1 -1
  126. package/presentation/commands/build-blank-slide.command.ts +15 -0
  127. package/presentation/commands/generate-and-insert-slide.command.ts +22 -0
  128. package/presentation/commands/index.ts +7 -0
  129. package/presentation/commands/presentation-generate-report.command.ts +20 -0
  130. package/presentation/commands/presentation-paraphrase.command.ts +21 -0
  131. package/presentation/commands/update-presentation-slides.command.ts +16 -0
  132. package/presentation/commands/update-slide-image-slot.command.ts +39 -0
  133. package/presentation/commands/update-slide.command.ts +17 -0
  134. package/presentation/enums/index.ts +4 -0
  135. package/presentation/enums/presentation-ai-action-call-status.enum.ts +5 -0
  136. package/presentation/enums/presentation-ai-action-pricing-type.enum.ts +4 -0
  137. package/presentation/enums/presentation-ai-action-type.enum.ts +4 -0
  138. package/presentation/enums/slide-image-slot-action.enum.ts +4 -0
  139. package/presentation/index.ts +1 -0
  140. package/presentation/models/index.ts +1 -0
  141. package/presentation/models/presentation-ai-action.schema.ts +30 -0
  142. package/presentation/models/presentation-config.schema.ts +3 -0
  143. package/presentation/models/presentation.schema.ts +4 -1
  144. package/presentation/models/slide-content-edit.schema.ts +160 -0
  145. package/presentation/models/slide-content.schema.ts +104 -11
  146. package/presentation/models/slide-image-slot.schema.ts +1 -0
  147. package/presentation/models/slide.schema.ts +47 -0
  148. package/presentation/routes/presentation.routes.ts +7 -0
  149. package/presentation/utils/calculate-presentation-ai-action-price.util.ts +20 -0
  150. package/presentation/utils/index.ts +1 -0
  151. package/tools/enums/tool-type.enum.ts +4 -0
  152. package/video/enums/video-strategy.enum.ts +2 -0
  153. package/video/routes/video.http.routes.ts +1 -0
  154. package/video-editor/commands/delete-all-video-editor-jobs.command.ts +13 -0
  155. package/video-editor/commands/delete-video-editor-job-by-uuid.command.ts +14 -0
  156. package/video-editor/commands/edit-video.command.ts +19 -0
  157. package/video-editor/commands/index.ts +6 -0
  158. package/video-editor/commands/retry-video-editor-job.command.ts +16 -0
  159. package/video-editor/commands/set-reaction-to-video-editor-job.command.ts +17 -0
  160. package/video-editor/commands/update-video-editor-job-title.command.ts +16 -0
  161. package/video-editor/enums/index.ts +1 -0
  162. package/video-editor/enums/video-editor-model-strategy.enum.ts +6 -0
  163. package/video-editor/index.ts +6 -0
  164. package/video-editor/models/index.ts +3 -0
  165. package/video-editor/models/video-editor-config.schema.ts +7 -0
  166. package/video-editor/models/video-editor-job.schema.ts +27 -0
  167. package/video-editor/models/video-editor-model.schema.ts +23 -0
  168. package/video-editor/queries/find-video-editor-job-by-id.query.ts +19 -0
  169. package/video-editor/queries/find-video-editor-jobs.query.ts +33 -0
  170. package/video-editor/queries/get-video-editor-config.query.ts +11 -0
  171. package/video-editor/queries/index.ts +3 -0
  172. package/video-editor/routes/index.ts +2 -0
  173. package/video-editor/routes/video-editor.amqp.routes.ts +11 -0
  174. package/video-editor/routes/video-editor.http.routes.ts +6 -0
  175. package/video-editor/utils/calculate-video-editing-price.ts +12 -0
  176. package/video-editor/utils/index.ts +1 -0
  177. package/writer/commands/generate-document-contents.command.ts +1 -0
  178. package/writer/enums/index.ts +1 -0
  179. package/writer/enums/writer-content-generation-strategy.enum.ts +4 -0
  180. package/writer/index.ts +1 -0
  181. package/writer/models/index.ts +1 -0
  182. package/writer/models/writer-config.schema.ts +2 -0
  183. package/writer/models/writer-document-type.schema.ts +1 -0
  184. package/writer/models/writer-document.schema.ts +1 -0
  185. package/writer/models/writer-model.schema.ts +21 -0
  186. package/writer/utils/calculate-writer-content-generation-price.util.ts +4 -2
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MUSIC_ACTION_TYPE = void 0;
4
+ var MUSIC_ACTION_TYPE;
5
+ (function (MUSIC_ACTION_TYPE) {
6
+ MUSIC_ACTION_TYPE["LYRICS"] = "LYRICS";
7
+ })(MUSIC_ACTION_TYPE || (exports.MUSIC_ACTION_TYPE = MUSIC_ACTION_TYPE = {}));
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MUSIC_PRICING_RULE_TYPE = void 0;
4
+ var MUSIC_PRICING_RULE_TYPE;
5
+ (function (MUSIC_PRICING_RULE_TYPE) {
6
+ MUSIC_PRICING_RULE_TYPE["FLAT"] = "flat";
7
+ })(MUSIC_PRICING_RULE_TYPE || (exports.MUSIC_PRICING_RULE_TYPE = MUSIC_PRICING_RULE_TYPE = {}));
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MUSIC_GENERATION_STRATEGY = void 0;
4
+ var MUSIC_GENERATION_STRATEGY;
5
+ (function (MUSIC_GENERATION_STRATEGY) {
6
+ MUSIC_GENERATION_STRATEGY["SUNO_POLLING"] = "SUNO_POLLING";
7
+ })(MUSIC_GENERATION_STRATEGY || (exports.MUSIC_GENERATION_STRATEGY = MUSIC_GENERATION_STRATEGY = {}));
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MUSIC_VOCAL_GENDER = void 0;
4
+ var MUSIC_VOCAL_GENDER;
5
+ (function (MUSIC_VOCAL_GENDER) {
6
+ MUSIC_VOCAL_GENDER["MALE"] = "m";
7
+ MUSIC_VOCAL_GENDER["FEMALE"] = "f";
8
+ })(MUSIC_VOCAL_GENDER || (exports.MUSIC_VOCAL_GENDER = MUSIC_VOCAL_GENDER = {}));
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SUNO_MODE_TYPE = void 0;
4
+ var SUNO_MODE_TYPE;
5
+ (function (SUNO_MODE_TYPE) {
6
+ SUNO_MODE_TYPE["SIMPLE"] = "simple";
7
+ SUNO_MODE_TYPE["SIMPLE_INSTRUMENTAL"] = "simple_instrumental";
8
+ SUNO_MODE_TYPE["CUSTOM"] = "custom";
9
+ SUNO_MODE_TYPE["CUSTOM_INSTRUMENTAL"] = "custom_instrumental";
10
+ })(SUNO_MODE_TYPE || (exports.SUNO_MODE_TYPE = SUNO_MODE_TYPE = {}));
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SUNO_MODEL_TYPE = void 0;
4
+ var SUNO_MODEL_TYPE;
5
+ (function (SUNO_MODEL_TYPE) {
6
+ SUNO_MODEL_TYPE["V4"] = "V4";
7
+ SUNO_MODEL_TYPE["V4_5"] = "V4_5";
8
+ SUNO_MODEL_TYPE["V4_5PLUS"] = "V4_5PLUS";
9
+ SUNO_MODEL_TYPE["V5"] = "V5";
10
+ })(SUNO_MODEL_TYPE || (exports.SUNO_MODEL_TYPE = SUNO_MODEL_TYPE = {}));
@@ -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,20 @@
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("./music-config.schema"), exports);
18
+ __exportStar(require("./music-job.schema"), exports);
19
+ __exportStar(require("./music-model.schema"), exports);
20
+ __exportStar(require("./music-track.schema"), exports);
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MusicConfigSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const music_model_schema_1 = require("./music-model.schema");
6
+ exports.MusicConfigSchema = zod_1.z.object({
7
+ models: zod_1.z.array(music_model_schema_1.MusicModelSchema),
8
+ });
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MusicJobSchema = exports.MusicJobParamsSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const tools_1 = require("../../tools");
6
+ const common_1 = require("../../common");
7
+ const enums_1 = require("../enums");
8
+ const music_track_schema_1 = require("./music-track.schema");
9
+ const suno_mode_type_enum_1 = require("../enums/suno-mode-type.enum");
10
+ exports.MusicJobParamsSchema = zod_1.z.discriminatedUnion('mode', [
11
+ zod_1.z.object({
12
+ mode: zod_1.z.literal(suno_mode_type_enum_1.SUNO_MODE_TYPE.SIMPLE),
13
+ prompt: zod_1.z.string().min(1).max(450),
14
+ style: zod_1.z.string(),
15
+ vocalGender: zod_1.z.nativeEnum(enums_1.MUSIC_VOCAL_GENDER),
16
+ }),
17
+ zod_1.z.object({
18
+ mode: zod_1.z.literal(suno_mode_type_enum_1.SUNO_MODE_TYPE.SIMPLE_INSTRUMENTAL),
19
+ prompt: zod_1.z.string().min(1).max(450),
20
+ style: zod_1.z.string(),
21
+ }),
22
+ zod_1.z.object({
23
+ mode: zod_1.z.literal(suno_mode_type_enum_1.SUNO_MODE_TYPE.CUSTOM),
24
+ prompt: zod_1.z.string().min(1).max(5000),
25
+ title: zod_1.z.string().min(1).max(80),
26
+ style: zod_1.z.string().min(1).max(1000),
27
+ vocalGender: zod_1.z.nativeEnum(enums_1.MUSIC_VOCAL_GENDER),
28
+ }),
29
+ zod_1.z.object({
30
+ mode: zod_1.z.literal(suno_mode_type_enum_1.SUNO_MODE_TYPE.CUSTOM_INSTRUMENTAL),
31
+ title: zod_1.z.string().min(1).max(80),
32
+ style: zod_1.z.string().min(1).max(1000),
33
+ }),
34
+ ]);
35
+ exports.MusicJobSchema = zod_1.z.object({
36
+ uuid: zod_1.z.string(),
37
+ prompt: zod_1.z.string(),
38
+ reaction: zod_1.z.nativeEnum(common_1.USER_REACTION).nullable(),
39
+ externalId: zod_1.z.string().nullable(),
40
+ title: zod_1.z.string(),
41
+ status: zod_1.z.nativeEnum(tools_1.JOB_STATUS),
42
+ error: zod_1.z.string().nullable(),
43
+ modelId: zod_1.z.string(),
44
+ price: zod_1.z.number(),
45
+ params: exports.MusicJobParamsSchema,
46
+ tracks: zod_1.z.array(music_track_schema_1.MusicTrackSchema),
47
+ attempts: zod_1.z.array(zod_1.z.any()),
48
+ userId: zod_1.z.string().nullable().optional(),
49
+ unregisteredUserId: zod_1.z.string().nullable().optional(),
50
+ isDeleted: zod_1.z.boolean(),
51
+ createdAt: zod_1.z.date(),
52
+ completedAt: zod_1.z.date().nullable().optional(),
53
+ updatedAt: zod_1.z.date(),
54
+ });
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MusicModelSchema = exports.MusicModelParamsSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const common_1 = require("../../common");
6
+ const enums_1 = require("../enums");
7
+ const enums_2 = require("../enums");
8
+ exports.MusicModelParamsSchema = zod_1.z.object({
9
+ vocalGender: zod_1.z.object({
10
+ options: zod_1.z.array(zod_1.z.nativeEnum(enums_1.MUSIC_VOCAL_GENDER)),
11
+ }),
12
+ styles: zod_1.z.object({
13
+ maxStyles: zod_1.z.number(),
14
+ options: zod_1.z.array(zod_1.z.object({
15
+ title: zod_1.z.string(),
16
+ style: zod_1.z.string(),
17
+ })),
18
+ }),
19
+ });
20
+ exports.MusicModelSchema = zod_1.z.object({
21
+ uuid: zod_1.z.string(),
22
+ title: zod_1.z.string(),
23
+ description: zod_1.z.string(),
24
+ aiModel: zod_1.z.nativeEnum(enums_2.SUNO_MODEL_TYPE),
25
+ pricePerTrack: zod_1.z.number(),
26
+ order: zod_1.z.number(),
27
+ status: zod_1.z.nativeEnum(common_1.TOOL_MODEL_STATUS),
28
+ icons: common_1.IconVariantsSchema,
29
+ strategy: zod_1.z.nativeEnum(enums_1.MUSIC_GENERATION_STRATEGY),
30
+ maxPromptLength: zod_1.z.number(),
31
+ maxLyricsLength: zod_1.z.number(),
32
+ params: exports.MusicModelParamsSchema,
33
+ createdAt: zod_1.z.date(),
34
+ updatedAt: zod_1.z.date(),
35
+ });
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MusicTrackSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.MusicTrackSchema = zod_1.z.object({
6
+ uuid: zod_1.z.string(),
7
+ title: zod_1.z.string(),
8
+ audioId: zod_1.z.string(),
9
+ audioUrl: zod_1.z.string(),
10
+ coverUrl: zod_1.z.string(),
11
+ tags: zod_1.z.string(),
12
+ duration: zod_1.z.number(),
13
+ genJobId: zod_1.z.string().nullable().optional(),
14
+ editorJobId: zod_1.z.string().nullable().optional(),
15
+ createdAt: zod_1.z.date(),
16
+ updatedAt: zod_1.z.date(),
17
+ });
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FindMusicJobByIdQuery = void 0;
4
+ const command_response_schema_1 = require("../../common/models/command-response.schema");
5
+ const music_job_schema_1 = require("../models/music-job.schema");
6
+ var FindMusicJobByIdQuery;
7
+ (function (FindMusicJobByIdQuery) {
8
+ FindMusicJobByIdQuery.RequestSchema = music_job_schema_1.MusicJobSchema.pick({ uuid: true });
9
+ FindMusicJobByIdQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(music_job_schema_1.MusicJobSchema);
10
+ })(FindMusicJobByIdQuery || (exports.FindMusicJobByIdQuery = FindMusicJobByIdQuery = {}));
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FindMusicJobsQuery = void 0;
4
+ const zod_1 = require("zod");
5
+ const command_response_schema_1 = require("../../common/models/command-response.schema");
6
+ const music_job_schema_1 = require("../models/music-job.schema");
7
+ var FindMusicJobsQuery;
8
+ (function (FindMusicJobsQuery) {
9
+ FindMusicJobsQuery.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
+ FindMusicJobsQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(zod_1.z.object({
24
+ data: zod_1.z.array(music_job_schema_1.MusicJobSchema),
25
+ page: zod_1.z.number(),
26
+ totalPages: zod_1.z.number(),
27
+ }));
28
+ })(FindMusicJobsQuery || (exports.FindMusicJobsQuery = FindMusicJobsQuery = {}));
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetMusicConfigQuery = void 0;
4
+ const command_response_schema_1 = require("../../common/models/command-response.schema");
5
+ const models_1 = require("../models");
6
+ var GetMusicConfigQuery;
7
+ (function (GetMusicConfigQuery) {
8
+ GetMusicConfigQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.MusicConfigSchema);
9
+ })(GetMusicConfigQuery || (exports.GetMusicConfigQuery = GetMusicConfigQuery = {}));
@@ -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("./find-music-job-by-id.query"), exports);
18
+ __exportStar(require("./find-music-jobs.query"), exports);
19
+ __exportStar(require("./get-music-config.query"), exports);
@@ -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("./music.amqp.routes"), exports);
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MUSIC_AMQP_ROUTES = void 0;
4
+ exports.MUSIC_AMQP_ROUTES = {
5
+ EXECUTE: 'tools.music.execute.rpc',
6
+ GENERATE_LYRICS: 'tools.music.generate-lyrics.rpc',
7
+ CONVERT_TO_WAV: 'tools.music.convert-to-wav.rpc',
8
+ CONFIG: 'tools.music.config.rpc',
9
+ GET_JOB: 'tools.music.jobs.get.rpc',
10
+ LIST_JOBS: 'tools.music.jobs.list.rpc',
11
+ SET_REACTION: 'tools.music.jobs.set-reaction.rpc',
12
+ UPDATE_TITLE: 'tools.music.jobs.update-title.rpc',
13
+ SOFT_DELETE: 'tools.music.jobs.soft-delete.rpc',
14
+ SOFT_DELETE_ALL: 'tools.music.jobs.soft-delete-all.rpc',
15
+ RETRY: 'tools.music.jobs.retry.rpc',
16
+ };
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.calculateMusicGenerationPrice = calculateMusicGenerationPrice;
4
+ function calculateMusicGenerationPrice({ pricePerTrack }) {
5
+ const base = pricePerTrack;
6
+ return Math.ceil(base);
7
+ }
@@ -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-music-generation-price.util"), exports);
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BuildBlankSlideCommand = void 0;
4
+ const common_1 = require("../../common");
5
+ const enums_1 = require("../enums");
6
+ const zod_1 = require("zod");
7
+ const models_1 = require("../models");
8
+ var BuildBlankSlideCommand;
9
+ (function (BuildBlankSlideCommand) {
10
+ BuildBlankSlideCommand.RequestSchema = zod_1.z.object({
11
+ slideContentType: zod_1.z.nativeEnum(enums_1.SLIDE_CONTENT_TYPE),
12
+ layoutId: zod_1.z.nativeEnum(enums_1.SLIDE_LAYOUT).optional(),
13
+ });
14
+ BuildBlankSlideCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.SlideSchema);
15
+ })(BuildBlankSlideCommand || (exports.BuildBlankSlideCommand = BuildBlankSlideCommand = {}));
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GenerateAndInsertSlideCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const common_1 = require("../../common");
6
+ const enums_1 = require("../enums");
7
+ const models_1 = require("../models");
8
+ var GenerateAndInsertSlideCommand;
9
+ (function (GenerateAndInsertSlideCommand) {
10
+ GenerateAndInsertSlideCommand.RequestSchema = zod_1.z.object({
11
+ userId: zod_1.z.string().uuid().nullable().optional(),
12
+ unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
13
+ userBalance: zod_1.z.number(),
14
+ presentationId: zod_1.z.string().uuid(),
15
+ contentTypeId: zod_1.z.nativeEnum(enums_1.SLIDE_CONTENT_TYPE),
16
+ prompt: zod_1.z.string().min(1).max(1000).optional(),
17
+ title: zod_1.z.string().max(80),
18
+ position: zod_1.z.number().int().min(0),
19
+ layoutId: zod_1.z.nativeEnum(enums_1.SLIDE_LAYOUT).optional(),
20
+ });
21
+ GenerateAndInsertSlideCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.SlideSchema.array());
22
+ })(GenerateAndInsertSlideCommand || (exports.GenerateAndInsertSlideCommand = GenerateAndInsertSlideCommand = {}));
@@ -14,14 +14,21 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./build-blank-slide.command"), exports);
17
18
  __exportStar(require("./create-presentation.command"), exports);
18
19
  __exportStar(require("./delete-all-user-presentations.command"), exports);
19
20
  __exportStar(require("./delete-presentation.command"), exports);
20
21
  __exportStar(require("./delete-slide-outline.command"), exports);
21
22
  __exportStar(require("./generate-presentation-outline.command"), exports);
23
+ __exportStar(require("./generate-and-insert-slide.command"), exports);
22
24
  __exportStar(require("./export-as-pptx.command"), exports);
23
25
  __exportStar(require("./generate-slides.command"), exports);
24
26
  __exportStar(require("./reposition-slide-outline.command"), exports);
25
27
  __exportStar(require("./update-slide-outline.command"), exports);
26
28
  __exportStar(require("./update-presentation.command"), exports);
27
29
  __exportStar(require("./update-presentation-outline.command"), exports);
30
+ __exportStar(require("./update-presentation-slides.command"), exports);
31
+ __exportStar(require("./update-slide-image-slot.command"), exports);
32
+ __exportStar(require("./update-slide.command"), exports);
33
+ __exportStar(require("./presentation-paraphrase.command"), exports);
34
+ __exportStar(require("./presentation-generate-report.command"), exports);
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PresentationGenerateReportCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const common_1 = require("../../common");
6
+ var PresentationGenerateReportCommand;
7
+ (function (PresentationGenerateReportCommand) {
8
+ PresentationGenerateReportCommand.RequestSchema = zod_1.z.object({
9
+ userId: zod_1.z.string().uuid().nullable().optional(),
10
+ unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
11
+ presentationId: zod_1.z.string().uuid(),
12
+ userBalance: zod_1.z.number(),
13
+ });
14
+ PresentationGenerateReportCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(zod_1.z.object({
15
+ output: zod_1.z.string(),
16
+ docxUrl: zod_1.z.string(),
17
+ }));
18
+ })(PresentationGenerateReportCommand || (exports.PresentationGenerateReportCommand = PresentationGenerateReportCommand = {}));
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PresentationParaphraseCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const common_1 = require("../../common");
6
+ var PresentationParaphraseCommand;
7
+ (function (PresentationParaphraseCommand) {
8
+ PresentationParaphraseCommand.RequestSchema = zod_1.z.object({
9
+ userId: zod_1.z.string().uuid().nullable().optional(),
10
+ unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
11
+ presentationId: zod_1.z.string().uuid(),
12
+ slideId: zod_1.z.string().uuid(),
13
+ selectionText: zod_1.z.string(),
14
+ userBalance: zod_1.z.number(),
15
+ });
16
+ PresentationParaphraseCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(zod_1.z.object({
17
+ output: zod_1.z.string(),
18
+ }));
19
+ })(PresentationParaphraseCommand || (exports.PresentationParaphraseCommand = PresentationParaphraseCommand = {}));
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdatePresentationSlidesCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../models");
6
+ const common_1 = require("../../common");
7
+ var UpdatePresentationSlidesCommand;
8
+ (function (UpdatePresentationSlidesCommand) {
9
+ UpdatePresentationSlidesCommand.RequestSchema = zod_1.z.object({
10
+ userId: zod_1.z.string().uuid().nullable().optional(),
11
+ unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
12
+ presentationId: zod_1.z.string().uuid(),
13
+ data: models_1.SlideBulkUpdateSchema,
14
+ });
15
+ UpdatePresentationSlidesCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(zod_1.z.array(models_1.SlideSchema));
16
+ })(UpdatePresentationSlidesCommand || (exports.UpdatePresentationSlidesCommand = UpdatePresentationSlidesCommand = {}));
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateSlideImageSlotCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const common_1 = require("../../common");
6
+ const models_1 = require("../models");
7
+ const enums_1 = require("../enums");
8
+ var UpdateSlideImageSlotCommand;
9
+ (function (UpdateSlideImageSlotCommand) {
10
+ const ReplacePayload = zod_1.z.object({
11
+ action: zod_1.z.literal(enums_1.SLIDE_IMAGE_SLOT_ACTION.REPLACE),
12
+ url: zod_1.z.string().url(),
13
+ });
14
+ const GeneratePayload = zod_1.z.object({
15
+ action: zod_1.z.literal(enums_1.SLIDE_IMAGE_SLOT_ACTION.GENERATE),
16
+ prompt: zod_1.z.string().min(1).max(1000).optional(),
17
+ });
18
+ const UpdateImageSlotPayload = zod_1.z.discriminatedUnion('action', [
19
+ ReplacePayload,
20
+ GeneratePayload,
21
+ ]);
22
+ UpdateSlideImageSlotCommand.RequestSchema = zod_1.z.object({
23
+ userId: zod_1.z.string().uuid().nullable().optional(),
24
+ unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
25
+ presentationId: zod_1.z.string().uuid(),
26
+ slideId: zod_1.z.string().uuid(),
27
+ slotId: zod_1.z.string().uuid().optional(),
28
+ payload: UpdateImageSlotPayload,
29
+ userBalance: zod_1.z.number(),
30
+ });
31
+ UpdateSlideImageSlotCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(zod_1.z.object({
32
+ imageSlot: models_1.SlideImageSlotSchema,
33
+ }));
34
+ })(UpdateSlideImageSlotCommand || (exports.UpdateSlideImageSlotCommand = UpdateSlideImageSlotCommand = {}));
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateSlideCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../models");
6
+ const common_1 = require("../../common");
7
+ var UpdateSlideCommand;
8
+ (function (UpdateSlideCommand) {
9
+ UpdateSlideCommand.RequestSchema = zod_1.z.object({
10
+ userId: zod_1.z.string().uuid().nullable().optional(),
11
+ unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
12
+ presentationId: zod_1.z.string().uuid(),
13
+ slideId: zod_1.z.string().uuid(),
14
+ data: models_1.SlideUpdateSchema,
15
+ });
16
+ UpdateSlideCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.SlideSchema);
17
+ })(UpdateSlideCommand || (exports.UpdateSlideCommand = UpdateSlideCommand = {}));
@@ -20,3 +20,7 @@ __exportStar(require("./slide-image-job-status.enum"), exports);
20
20
  __exportStar(require("./slide-image-slot-status.enum"), exports);
21
21
  __exportStar(require("./slide-icon-slot-status.enum"), exports);
22
22
  __exportStar(require("./slide-layout.enum"), exports);
23
+ __exportStar(require("./slide-image-slot-action.enum"), exports);
24
+ __exportStar(require("./presentation-ai-action-call-status.enum"), exports);
25
+ __exportStar(require("./presentation-ai-action-type.enum"), exports);
26
+ __exportStar(require("./presentation-ai-action-pricing-type.enum"), exports);
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PRESENTATION_AI_ACTION_CALL_STATUS = void 0;
4
+ var PRESENTATION_AI_ACTION_CALL_STATUS;
5
+ (function (PRESENTATION_AI_ACTION_CALL_STATUS) {
6
+ PRESENTATION_AI_ACTION_CALL_STATUS["PROCESSING"] = "processing";
7
+ PRESENTATION_AI_ACTION_CALL_STATUS["COMPLETED"] = "completed";
8
+ PRESENTATION_AI_ACTION_CALL_STATUS["FAILED"] = "failed";
9
+ })(PRESENTATION_AI_ACTION_CALL_STATUS || (exports.PRESENTATION_AI_ACTION_CALL_STATUS = PRESENTATION_AI_ACTION_CALL_STATUS = {}));
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PRESENTATION_AI_ACTION_PRICING_TYPE = void 0;
4
+ var PRESENTATION_AI_ACTION_PRICING_TYPE;
5
+ (function (PRESENTATION_AI_ACTION_PRICING_TYPE) {
6
+ PRESENTATION_AI_ACTION_PRICING_TYPE["PER_CHARACTER"] = "PER_CHARACTER";
7
+ PRESENTATION_AI_ACTION_PRICING_TYPE["FLAT"] = "FLAT";
8
+ })(PRESENTATION_AI_ACTION_PRICING_TYPE || (exports.PRESENTATION_AI_ACTION_PRICING_TYPE = PRESENTATION_AI_ACTION_PRICING_TYPE = {}));
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PRESENTATION_AI_ACTION_TYPE = void 0;
4
+ var PRESENTATION_AI_ACTION_TYPE;
5
+ (function (PRESENTATION_AI_ACTION_TYPE) {
6
+ PRESENTATION_AI_ACTION_TYPE["PARAPHRASE"] = "PARAPHRASE";
7
+ PRESENTATION_AI_ACTION_TYPE["GENERATE_REPORT"] = "GENERATE_REPORT";
8
+ })(PRESENTATION_AI_ACTION_TYPE || (exports.PRESENTATION_AI_ACTION_TYPE = PRESENTATION_AI_ACTION_TYPE = {}));
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SLIDE_IMAGE_SLOT_ACTION = void 0;
4
+ var SLIDE_IMAGE_SLOT_ACTION;
5
+ (function (SLIDE_IMAGE_SLOT_ACTION) {
6
+ SLIDE_IMAGE_SLOT_ACTION["REPLACE"] = "REPLACE";
7
+ SLIDE_IMAGE_SLOT_ACTION["GENERATE"] = "GENERATE";
8
+ })(SLIDE_IMAGE_SLOT_ACTION || (exports.SLIDE_IMAGE_SLOT_ACTION = SLIDE_IMAGE_SLOT_ACTION = {}));
@@ -20,3 +20,4 @@ __exportStar(require("./models"), exports);
20
20
  __exportStar(require("./enums"), exports);
21
21
  __exportStar(require("./routes"), exports);
22
22
  __exportStar(require("./queries"), exports);
23
+ __exportStar(require("./utils"), exports);
@@ -23,3 +23,4 @@ __exportStar(require("./slide-outline.schema"), exports);
23
23
  __exportStar(require("./slide.schema"), exports);
24
24
  __exportStar(require("./slide-image-slot.schema"), exports);
25
25
  __exportStar(require("./slide-content.schema"), exports);
26
+ __exportStar(require("./presentation-ai-action.schema"), exports);
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PresentationAiActionSchema = exports.PresentationAiActionPricingRulesSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const enums_1 = require("../enums");
6
+ exports.PresentationAiActionPricingRulesSchema = zod_1.z.discriminatedUnion('type', [
7
+ zod_1.z.object({
8
+ type: zod_1.z.literal(enums_1.PRESENTATION_AI_ACTION_PRICING_TYPE.PER_CHARACTER),
9
+ price: zod_1.z.number(),
10
+ }),
11
+ zod_1.z.object({
12
+ type: zod_1.z.literal(enums_1.PRESENTATION_AI_ACTION_PRICING_TYPE.FLAT),
13
+ price: zod_1.z.number(),
14
+ }),
15
+ ]);
16
+ exports.PresentationAiActionSchema = zod_1.z.object({
17
+ uuid: zod_1.z.string(),
18
+ type: zod_1.z.nativeEnum(enums_1.PRESENTATION_AI_ACTION_TYPE),
19
+ pricingRules: exports.PresentationAiActionPricingRulesSchema,
20
+ maxPromptLength: zod_1.z.number(),
21
+ aiModel: zod_1.z.string(),
22
+ title: zod_1.z.string(),
23
+ icon: zod_1.z.string(),
24
+ order: zod_1.z.number(),
25
+ createdAt: zod_1.z.date(),
26
+ updatedAt: zod_1.z.date(),
27
+ });