@purpleschool/gptbot-tools 0.0.64 → 0.0.65

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 (62) hide show
  1. package/build/common/errors/errors.js +0 -89
  2. package/build/image-editor/routes/image-editor.http.routes.js +1 -1
  3. package/build/music/enums/music-strategy.enum.js +1 -0
  4. package/build/music/routes/index.js +1 -0
  5. package/build/music/routes/music.http.routes.js +7 -0
  6. package/build/presentation/commands/index.js +0 -7
  7. package/build/presentation/enums/index.js +0 -4
  8. package/build/presentation/index.js +0 -1
  9. package/build/presentation/models/index.js +0 -1
  10. package/build/presentation/models/presentation-config.schema.js +0 -3
  11. package/build/presentation/models/presentation.schema.js +1 -4
  12. package/build/presentation/models/slide-content.schema.js +1 -5
  13. package/build/presentation/models/slide.schema.js +1 -39
  14. package/build/presentation/routes/presentation.routes.js +0 -7
  15. package/build/tools/enums/tool-type.enum.js +0 -1
  16. package/common/errors/errors.ts +0 -89
  17. package/image-editor/routes/image-editor.http.routes.ts +1 -1
  18. package/music/enums/music-strategy.enum.ts +1 -0
  19. package/music/routes/index.ts +1 -0
  20. package/music/routes/music.http.routes.ts +5 -0
  21. package/package.json +1 -1
  22. package/presentation/commands/index.ts +0 -7
  23. package/presentation/enums/index.ts +0 -4
  24. package/presentation/index.ts +0 -1
  25. package/presentation/models/index.ts +0 -1
  26. package/presentation/models/presentation-config.schema.ts +0 -3
  27. package/presentation/models/presentation.schema.ts +1 -4
  28. package/presentation/models/slide-content.schema.ts +11 -104
  29. package/presentation/models/slide-image-slot.schema.ts +0 -1
  30. package/presentation/models/slide.schema.ts +0 -47
  31. package/presentation/routes/presentation.routes.ts +0 -7
  32. package/tools/enums/tool-type.enum.ts +0 -1
  33. package/build/presentation/commands/build-blank-slide.command.js +0 -15
  34. package/build/presentation/commands/generate-and-insert-slide.command.js +0 -22
  35. package/build/presentation/commands/presentation-generate-report.command.js +0 -18
  36. package/build/presentation/commands/presentation-paraphrase.command.js +0 -19
  37. package/build/presentation/commands/update-presentation-slides.command.js +0 -16
  38. package/build/presentation/commands/update-slide-image-slot.command.js +0 -34
  39. package/build/presentation/commands/update-slide.command.js +0 -17
  40. package/build/presentation/enums/presentation-ai-action-call-status.enum.js +0 -9
  41. package/build/presentation/enums/presentation-ai-action-pricing-type.enum.js +0 -8
  42. package/build/presentation/enums/presentation-ai-action-type.enum.js +0 -8
  43. package/build/presentation/enums/slide-image-slot-action.enum.js +0 -8
  44. package/build/presentation/models/presentation-ai-action.schema.js +0 -27
  45. package/build/presentation/models/slide-content-edit.schema.js +0 -135
  46. package/build/presentation/utils/calculate-presentation-ai-action-price.util.js +0 -16
  47. package/build/presentation/utils/index.js +0 -17
  48. package/presentation/commands/build-blank-slide.command.ts +0 -15
  49. package/presentation/commands/generate-and-insert-slide.command.ts +0 -22
  50. package/presentation/commands/presentation-generate-report.command.ts +0 -20
  51. package/presentation/commands/presentation-paraphrase.command.ts +0 -21
  52. package/presentation/commands/update-presentation-slides.command.ts +0 -16
  53. package/presentation/commands/update-slide-image-slot.command.ts +0 -39
  54. package/presentation/commands/update-slide.command.ts +0 -17
  55. package/presentation/enums/presentation-ai-action-call-status.enum.ts +0 -5
  56. package/presentation/enums/presentation-ai-action-pricing-type.enum.ts +0 -4
  57. package/presentation/enums/presentation-ai-action-type.enum.ts +0 -4
  58. package/presentation/enums/slide-image-slot-action.enum.ts +0 -4
  59. package/presentation/models/presentation-ai-action.schema.ts +0 -30
  60. package/presentation/models/slide-content-edit.schema.ts +0 -160
  61. package/presentation/utils/calculate-presentation-ai-action-price.util.ts +0 -20
  62. package/presentation/utils/index.ts +0 -1
@@ -343,95 +343,6 @@ exports.ERRORS = {
343
343
  message: 'У пользователя недостаточно средств для генерации слайдов',
344
344
  httpCode: 400,
345
345
  },
346
- CREATE_BLANK_SLIDE_ERROR: {
347
- code: 'PRESENTATION.CREATE_BLANK_SLIDE_ERROR',
348
- message: 'Произошла ошибка при создании пустого слайда',
349
- httpCode: 500,
350
- },
351
- INVALID_CONTENT_TYPE_CHANGE: {
352
- code: 'PRESENTATION.INVALID_CONTENT_TYPE_CHANGE',
353
- message: 'Невозможно изменить тип существующего слайда',
354
- httpCode: 400,
355
- },
356
- INVALID_SLIDE_POSITION: {
357
- code: 'PRESENTATION.INVALID_SLIDE_POSITION',
358
- message: 'Неверная позиция для вставки слайда',
359
- httpCode: 400,
360
- },
361
- SLIDES_UPDATE_ERROR: {
362
- code: 'PRESENTATION.SLIDES_UPDATE_ERROR',
363
- message: 'Произошла ошибка при обновлении слайдов презентации',
364
- httpCode: 500,
365
- },
366
- SLIDE_NOT_FOUND: {
367
- code: 'PRESENTATION.SLIDE_NOT_FOUND',
368
- message: 'Слайд не найден',
369
- httpCode: 404,
370
- },
371
- SLIDE_IMAGE_SLOT_NOT_FOUND: {
372
- code: 'PRESENTATION.SLIDE_IMAGE_SLOT_NOT_FOUND',
373
- message: 'Слот изображения слайда не найден',
374
- httpCode: 404,
375
- },
376
- SLIDE_IMAGE_UPDATE_ERROR: {
377
- code: 'PRESENTATION.SLIDE_IMAGE_UPDATE_ERROR',
378
- message: 'Произошла ошибка при обновлении слота изображения слайда',
379
- httpCode: 500,
380
- },
381
- INSUFFICIENT_BALANCE_FOR_IMAGE_GENERATION: {
382
- code: 'PRESENTATION.INSUFFICIENT_BALANCE_FOR_IMAGE_GENERATION',
383
- message: 'У пользователя недостаточно средств для генерации изображения',
384
- httpCode: 400,
385
- },
386
- },
387
- PRESENTATION_AI_ACTION: {
388
- NOT_FOUND: {
389
- code: 'PRESENTATION_AI_ACTION.NOT_FOUND',
390
- message: 'ИИ операция для презентации не найдено',
391
- httpCode: 404,
392
- },
393
- PROMPT_TOO_LONG: {
394
- code: 'PRESENTATION_AI_ACTION.PROMPT_TOO_LONG',
395
- message: 'Превышена максимальная длина запроса',
396
- httpCode: 400,
397
- },
398
- INSUFFICIENT_BALANCE: {
399
- code: 'PRESENTATION_AI_ACTION.INSUFFICIENT_BALANCE',
400
- message: 'У пользователя недостаточно средств для выполнения операции',
401
- httpCode: 400,
402
- },
403
- AI_ERROR: {
404
- code: 'PRESENTATION_AI_ACTION.AI_ERROR',
405
- message: 'Произошла ошибка во время запроса к ИИ',
406
- httpCode: 500,
407
- },
408
- SAVE_ERROR: {
409
- code: 'PRESENTATION_AI_ACTION.SAVE_ERROR',
410
- message: 'Произошла ошибка при сохранении ИИ операции для презентации',
411
- httpCode: 500,
412
- },
413
- FIND_ERROR: {
414
- code: 'PRESENTATION_AI_ACTION.FIND_ERROR',
415
- message: 'Произошла ошибка при поиске ИИ операций для презентации',
416
- httpCode: 500,
417
- },
418
- },
419
- PRESENTATION_AI_ACTION_CALL: {
420
- NOT_FOUND: {
421
- code: 'PRESENTATION_AI_ACTION_CALL.NOT_FOUND',
422
- message: 'Вызов ИИ операции для презентации не найден',
423
- httpCode: 404,
424
- },
425
- SAVE_ERROR: {
426
- code: 'PRESENTATION_AI_ACTION_CALL.SAVE_ERROR',
427
- message: 'Произошла ошибка при сохранении вызова ИИ операции для презентации',
428
- httpCode: 500,
429
- },
430
- FIND_ERROR: {
431
- code: 'PRESENTATION_AI_ACTION_CALL.FIND_ERROR',
432
- message: 'Произошла ошибка при поиске вызова ИИ операции для презентации',
433
- httpCode: 500,
434
- },
435
346
  },
436
347
  SLIDE_OUTLINE: {
437
348
  DELETE_ERROR: {
@@ -3,5 +3,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.IMAGE_EDITOR_ROUTES = exports.IMAGE_EDITOR_CONTROLLER = void 0;
4
4
  exports.IMAGE_EDITOR_CONTROLLER = 'image-editor';
5
5
  exports.IMAGE_EDITOR_ROUTES = {
6
- KIE_NANO_BANANA_CALLBACK: 'kie/nano-banana/callback',
6
+ KIE_NANO_BANANA_CALLBACK: '/kie/nano-banana/callback',
7
7
  };
@@ -4,4 +4,5 @@ exports.MUSIC_GENERATION_STRATEGY = void 0;
4
4
  var MUSIC_GENERATION_STRATEGY;
5
5
  (function (MUSIC_GENERATION_STRATEGY) {
6
6
  MUSIC_GENERATION_STRATEGY["SUNO_POLLING"] = "SUNO_POLLING";
7
+ MUSIC_GENERATION_STRATEGY["SUNO_CALLBACK"] = "SUNO_CALLBACK";
7
8
  })(MUSIC_GENERATION_STRATEGY || (exports.MUSIC_GENERATION_STRATEGY = MUSIC_GENERATION_STRATEGY = {}));
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./music.amqp.routes"), exports);
18
+ __exportStar(require("./music.http.routes"), exports);
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MUSIC_ROUTES = exports.MUSIC_CONTROLLER = void 0;
4
+ exports.MUSIC_CONTROLLER = 'music';
5
+ exports.MUSIC_ROUTES = {
6
+ KIE_SUNO_CALLBACK: '/kie/suno/callback',
7
+ };
@@ -14,21 +14,14 @@ 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);
18
17
  __exportStar(require("./create-presentation.command"), exports);
19
18
  __exportStar(require("./delete-all-user-presentations.command"), exports);
20
19
  __exportStar(require("./delete-presentation.command"), exports);
21
20
  __exportStar(require("./delete-slide-outline.command"), exports);
22
21
  __exportStar(require("./generate-presentation-outline.command"), exports);
23
- __exportStar(require("./generate-and-insert-slide.command"), exports);
24
22
  __exportStar(require("./export-as-pptx.command"), exports);
25
23
  __exportStar(require("./generate-slides.command"), exports);
26
24
  __exportStar(require("./reposition-slide-outline.command"), exports);
27
25
  __exportStar(require("./update-slide-outline.command"), exports);
28
26
  __exportStar(require("./update-presentation.command"), exports);
29
27
  __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);
@@ -20,7 +20,3 @@ __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);
@@ -20,4 +20,3 @@ __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,4 +23,3 @@ __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);
@@ -5,17 +5,14 @@ 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");
9
8
  exports.PresentationConfigSchema = zod_1.z.object({
10
9
  slideContentTypes: zod_1.z.array(slide_content_type_schema_1.SlideContentTypeSchema),
11
10
  languages: zod_1.z.array(language_1.LanguageSchema),
12
11
  templates: zod_1.z.array(presentation_template_schema_1.PresentationTemplateSchema),
13
- aiActions: zod_1.z.array(presentation_ai_action_schema_1.PresentationAiActionSchema),
14
12
  slideGenerationPrice: zod_1.z.number(),
15
13
  maxSlides: zod_1.z.number(),
16
14
  minSlides: zod_1.z.number(),
17
15
  maxSlideTitleLength: zod_1.z.number(),
18
16
  maxSlideOutlineLength: zod_1.z.number(),
19
17
  maxPromptLength: zod_1.z.number(),
20
- imageGenerationPrice: zod_1.z.number(),
21
18
  });
@@ -18,8 +18,6 @@ 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(),
23
21
  createdAt: zod_1.z.date(),
24
22
  updatedAt: zod_1.z.date(),
25
23
  });
@@ -29,5 +27,4 @@ exports.PresentationWithSlidesSchema = exports.PresentationSchema.extend({
29
27
  });
30
28
  exports.PresentationUpdateSchema = exports.PresentationSchema.pick({
31
29
  title: true,
32
- templateId: true,
33
- }).partial();
30
+ });
@@ -72,11 +72,7 @@ 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
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),
75
+ description: zod_1.z.string().describe('One clear short framing sentence').max(100),
80
76
  }))
81
77
  .length(4),
82
78
  version: zod_1.z.literal(1),
@@ -1,12 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SlideBulkUpdateSchema = exports.SlideUpdateSchema = exports.SlideSchema = void 0;
3
+ 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");
10
9
  exports.SlideSchema = zod_1.z.object({
11
10
  uuid: zod_1.z.string().uuid(),
12
11
  order: zod_1.z.number(),
@@ -19,40 +18,3 @@ exports.SlideSchema = zod_1.z.object({
19
18
  createdAt: zod_1.z.date(),
20
19
  updatedAt: zod_1.z.date(),
21
20
  });
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,7 +7,6 @@ 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',
11
10
  UPDATE_PRESENTATION_OUTLINE: 'tools.presentation.update-presentation-outline.rpc',
12
11
  LIST_PRESENTATIONS: 'tools.presentation.list-presentations.rpc',
13
12
  DELETE_PRESENTATION: 'tools.presentation.delete-presentation.rpc',
@@ -15,12 +14,6 @@ exports.PRESENTATION_AMQP_ROUTES = {
15
14
  EXPORT_AS_PPTX: 'tools.presentation.export-as-pptx.rpc',
16
15
  UPDATE_PRESENTATION: 'tools.presentation.update-presentation.rpc',
17
16
  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',
24
17
  };
25
18
  exports.PRESENTATION_SLIDE_OUTLINE_AMQP_ROUTES = {
26
19
  REPOSITION: 'tools.presentation.slide-outline.reposition-slide-outline.rpc',
@@ -8,7 +8,6 @@ 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";
12
11
  TOOL_TYPE["WRITER"] = "WRITER";
13
12
  TOOL_TYPE["PARAPHRASE"] = "PARAPHRASE";
14
13
  TOOL_TYPE["WRITER_ACTION"] = "WRITER_ACTION";
@@ -342,95 +342,6 @@ export const ERRORS = {
342
342
  message: 'У пользователя недостаточно средств для генерации слайдов',
343
343
  httpCode: 400,
344
344
  },
345
- CREATE_BLANK_SLIDE_ERROR: {
346
- code: 'PRESENTATION.CREATE_BLANK_SLIDE_ERROR',
347
- message: 'Произошла ошибка при создании пустого слайда',
348
- httpCode: 500,
349
- },
350
- INVALID_CONTENT_TYPE_CHANGE: {
351
- code: 'PRESENTATION.INVALID_CONTENT_TYPE_CHANGE',
352
- message: 'Невозможно изменить тип существующего слайда',
353
- httpCode: 400,
354
- },
355
- INVALID_SLIDE_POSITION: {
356
- code: 'PRESENTATION.INVALID_SLIDE_POSITION',
357
- message: 'Неверная позиция для вставки слайда',
358
- httpCode: 400,
359
- },
360
- SLIDES_UPDATE_ERROR: {
361
- code: 'PRESENTATION.SLIDES_UPDATE_ERROR',
362
- message: 'Произошла ошибка при обновлении слайдов презентации',
363
- httpCode: 500,
364
- },
365
- SLIDE_NOT_FOUND: {
366
- code: 'PRESENTATION.SLIDE_NOT_FOUND',
367
- message: 'Слайд не найден',
368
- httpCode: 404,
369
- },
370
- SLIDE_IMAGE_SLOT_NOT_FOUND: {
371
- code: 'PRESENTATION.SLIDE_IMAGE_SLOT_NOT_FOUND',
372
- message: 'Слот изображения слайда не найден',
373
- httpCode: 404,
374
- },
375
- SLIDE_IMAGE_UPDATE_ERROR: {
376
- code: 'PRESENTATION.SLIDE_IMAGE_UPDATE_ERROR',
377
- message: 'Произошла ошибка при обновлении слота изображения слайда',
378
- httpCode: 500,
379
- },
380
- INSUFFICIENT_BALANCE_FOR_IMAGE_GENERATION: {
381
- code: 'PRESENTATION.INSUFFICIENT_BALANCE_FOR_IMAGE_GENERATION',
382
- message: 'У пользователя недостаточно средств для генерации изображения',
383
- httpCode: 400,
384
- },
385
- },
386
- PRESENTATION_AI_ACTION: {
387
- NOT_FOUND: {
388
- code: 'PRESENTATION_AI_ACTION.NOT_FOUND',
389
- message: 'ИИ операция для презентации не найдено',
390
- httpCode: 404,
391
- },
392
- PROMPT_TOO_LONG: {
393
- code: 'PRESENTATION_AI_ACTION.PROMPT_TOO_LONG',
394
- message: 'Превышена максимальная длина запроса',
395
- httpCode: 400,
396
- },
397
- INSUFFICIENT_BALANCE: {
398
- code: 'PRESENTATION_AI_ACTION.INSUFFICIENT_BALANCE',
399
- message: 'У пользователя недостаточно средств для выполнения операции',
400
- httpCode: 400,
401
- },
402
- AI_ERROR: {
403
- code: 'PRESENTATION_AI_ACTION.AI_ERROR',
404
- message: 'Произошла ошибка во время запроса к ИИ',
405
- httpCode: 500,
406
- },
407
- SAVE_ERROR: {
408
- code: 'PRESENTATION_AI_ACTION.SAVE_ERROR',
409
- message: 'Произошла ошибка при сохранении ИИ операции для презентации',
410
- httpCode: 500,
411
- },
412
- FIND_ERROR: {
413
- code: 'PRESENTATION_AI_ACTION.FIND_ERROR',
414
- message: 'Произошла ошибка при поиске ИИ операций для презентации',
415
- httpCode: 500,
416
- },
417
- },
418
- PRESENTATION_AI_ACTION_CALL: {
419
- NOT_FOUND: {
420
- code: 'PRESENTATION_AI_ACTION_CALL.NOT_FOUND',
421
- message: 'Вызов ИИ операции для презентации не найден',
422
- httpCode: 404,
423
- },
424
- SAVE_ERROR: {
425
- code: 'PRESENTATION_AI_ACTION_CALL.SAVE_ERROR',
426
- message: 'Произошла ошибка при сохранении вызова ИИ операции для презентации',
427
- httpCode: 500,
428
- },
429
- FIND_ERROR: {
430
- code: 'PRESENTATION_AI_ACTION_CALL.FIND_ERROR',
431
- message: 'Произошла ошибка при поиске вызова ИИ операции для презентации',
432
- httpCode: 500,
433
- },
434
345
  },
435
346
  SLIDE_OUTLINE: {
436
347
  DELETE_ERROR: {
@@ -1,5 +1,5 @@
1
1
  export const IMAGE_EDITOR_CONTROLLER = 'image-editor';
2
2
 
3
3
  export const IMAGE_EDITOR_ROUTES = {
4
- KIE_NANO_BANANA_CALLBACK: 'kie/nano-banana/callback',
4
+ KIE_NANO_BANANA_CALLBACK: '/kie/nano-banana/callback',
5
5
  };
@@ -1,3 +1,4 @@
1
1
  export enum MUSIC_GENERATION_STRATEGY {
2
2
  SUNO_POLLING = 'SUNO_POLLING',
3
+ SUNO_CALLBACK = 'SUNO_CALLBACK',
3
4
  }
@@ -1 +1,2 @@
1
1
  export * from './music.amqp.routes';
2
+ export * from './music.http.routes';
@@ -0,0 +1,5 @@
1
+ export const MUSIC_CONTROLLER = 'music';
2
+
3
+ export const MUSIC_ROUTES = {
4
+ KIE_SUNO_CALLBACK: '/kie/suno/callback',
5
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot-tools",
3
- "version": "0.0.64",
3
+ "version": "0.0.65",
4
4
  "main": "build/index.js",
5
5
  "types": "build/index.d.ts",
6
6
  "scripts": {
@@ -1,18 +1,11 @@
1
- export * from './build-blank-slide.command';
2
1
  export * from './create-presentation.command';
3
2
  export * from './delete-all-user-presentations.command';
4
3
  export * from './delete-presentation.command';
5
4
  export * from './delete-slide-outline.command';
6
5
  export * from './generate-presentation-outline.command';
7
- export * from './generate-and-insert-slide.command';
8
6
  export * from './export-as-pptx.command';
9
7
  export * from './generate-slides.command';
10
8
  export * from './reposition-slide-outline.command';
11
9
  export * from './update-slide-outline.command';
12
10
  export * from './update-presentation.command';
13
11
  export * from './update-presentation-outline.command';
14
- export * from './update-presentation-slides.command';
15
- export * from './update-slide-image-slot.command';
16
- export * from './update-slide.command';
17
- export * from './presentation-paraphrase.command';
18
- export * from './presentation-generate-report.command';
@@ -4,7 +4,3 @@ export * from './slide-image-job-status.enum';
4
4
  export * from './slide-image-slot-status.enum';
5
5
  export * from './slide-icon-slot-status.enum';
6
6
  export * from './slide-layout.enum';
7
- export * from './slide-image-slot-action.enum';
8
- export * from './presentation-ai-action-call-status.enum';
9
- export * from './presentation-ai-action-type.enum';
10
- export * from './presentation-ai-action-pricing-type.enum';
@@ -4,4 +4,3 @@ export * from './models';
4
4
  export * from './enums';
5
5
  export * from './routes';
6
6
  export * from './queries';
7
- export * from './utils';
@@ -7,4 +7,3 @@ export * from './slide-outline.schema';
7
7
  export * from './slide.schema';
8
8
  export * from './slide-image-slot.schema';
9
9
  export * from './slide-content.schema';
10
- export * from './presentation-ai-action.schema';
@@ -2,19 +2,16 @@ import { z } from 'zod';
2
2
  import { SlideContentTypeSchema } from './slide-content-type.schema';
3
3
  import { LanguageSchema } from '../../language';
4
4
  import { PresentationTemplateSchema } from './presentation-template.schema';
5
- import { PresentationAiActionSchema } from './presentation-ai-action.schema';
6
5
 
7
6
  export const PresentationConfigSchema = z.object({
8
7
  slideContentTypes: z.array(SlideContentTypeSchema),
9
8
  languages: z.array(LanguageSchema),
10
9
  templates: z.array(PresentationTemplateSchema),
11
- aiActions: z.array(PresentationAiActionSchema),
12
10
  slideGenerationPrice: z.number(),
13
11
  maxSlides: z.number(),
14
12
  minSlides: z.number(),
15
13
  maxSlideTitleLength: z.number(),
16
14
  maxSlideOutlineLength: z.number(),
17
15
  maxPromptLength: z.number(),
18
- imageGenerationPrice: z.number(),
19
16
  });
20
17
  export type PresentationConfig = z.infer<typeof PresentationConfigSchema>;
@@ -16,8 +16,6 @@ export const PresentationSchema = z.object({
16
16
  unregisteredUserId: z.string().uuid().nullable().optional(),
17
17
  slideCount: z.number(),
18
18
  isDeleted: z.boolean(),
19
- lastContentUpdateAt: z.date().nullable(),
20
- lastPptxExportedAt: z.date().nullable(),
21
19
  createdAt: z.date(),
22
20
  updatedAt: z.date(),
23
21
  });
@@ -31,6 +29,5 @@ export type PresentationWithSlides = z.infer<typeof PresentationWithSlidesSchema
31
29
 
32
30
  export const PresentationUpdateSchema = PresentationSchema.pick({
33
31
  title: true,
34
- templateId: true,
35
- }).partial();
32
+ });
36
33
  export type PresentationUpdate = z.infer<typeof PresentationUpdateSchema>;