@purpleschool/gptbot 0.7.12 → 0.7.14

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 (91) hide show
  1. package/api/controllers/http/index.ts +1 -0
  2. package/api/controllers/http/presentation.ts +26 -0
  3. package/build/api/controllers/http/index.js +1 -0
  4. package/build/api/controllers/http/presentation.js +25 -0
  5. package/build/commands/file/calculate-file-cost.command.js +1 -1
  6. package/build/commands/file/upload.command.js +1 -1
  7. package/build/commands/tools/index.js +1 -0
  8. package/build/commands/tools/presentation/create-presentation.command.js +17 -0
  9. package/build/commands/tools/presentation/delete-all-user-presentations.command.js +8 -0
  10. package/build/commands/tools/presentation/delete-presentation.command.js +11 -0
  11. package/build/commands/tools/presentation/delete-slide-outline.command.js +12 -0
  12. package/build/commands/tools/presentation/export-presentation-as-pptx.command.js +17 -0
  13. package/build/commands/tools/presentation/find-presentation-by-uuid.command.js +14 -0
  14. package/build/commands/tools/presentation/find-presentation-outline.command.js +14 -0
  15. package/build/commands/tools/presentation/find-presentations.command.js +18 -0
  16. package/build/commands/tools/presentation/generate-presentation-slides.command.js +14 -0
  17. package/build/commands/tools/presentation/get-presentation-config.command.js +11 -0
  18. package/build/commands/tools/presentation/index.js +31 -0
  19. package/build/commands/tools/presentation/reposition-slide-outline.command.js +15 -0
  20. package/build/commands/tools/presentation/update-presentation-outline.command.js +15 -0
  21. package/build/commands/tools/presentation/update-presentation.command.js +17 -0
  22. package/build/commands/tools/presentation/update-slide-outline.command.js +23 -0
  23. package/build/constants/errors/errors.js +65 -0
  24. package/build/constants/index.js +1 -0
  25. package/build/constants/presentation/enums/index.js +21 -0
  26. package/build/constants/presentation/enums/presentation-stage.enum.js +14 -0
  27. package/build/constants/presentation/enums/slide-content-type.enum.js +15 -0
  28. package/build/constants/presentation/enums/slide-icon-slot-status.enum.js +10 -0
  29. package/build/constants/presentation/enums/slide-image-slot.status.enum.js +10 -0
  30. package/build/constants/presentation/enums/slide-layout.enum.js +8 -0
  31. package/build/constants/presentation/index.js +18 -0
  32. package/build/constants/presentation/maps/index.js +17 -0
  33. package/build/constants/presentation/maps/slide-layout-map.constant.js +16 -0
  34. package/build/models/tools/index.js +1 -0
  35. package/build/models/tools/language/index.js +17 -0
  36. package/build/models/tools/language/language.schema.js +11 -0
  37. package/build/models/tools/presentation/index.js +23 -0
  38. package/build/models/tools/presentation/pptx-export-payload.schema.js +183 -0
  39. package/build/models/tools/presentation/presentation-config.schema.js +17 -0
  40. package/build/models/tools/presentation/presentation-template.schema.js +13 -0
  41. package/build/models/tools/presentation/presentation.schema.js +24 -0
  42. package/build/models/tools/presentation/slide-content-type.schema.js +14 -0
  43. package/build/models/tools/presentation/slide-content.schema.js +177 -0
  44. package/build/models/tools/presentation/slide-icon-slot.schema.js +15 -0
  45. package/build/models/tools/presentation/slide-image-slot.schema.js +16 -0
  46. package/build/models/tools/presentation/slide-outline.schema.js +50 -0
  47. package/build/models/tools/presentation/slide.schema.js +20 -0
  48. package/commands/file/calculate-file-cost.command.ts +1 -1
  49. package/commands/file/upload.command.ts +1 -1
  50. package/commands/tools/index.ts +1 -0
  51. package/commands/tools/presentation/create-presentation.command.ts +19 -0
  52. package/commands/tools/presentation/delete-all-user-presentations.command.ts +6 -0
  53. package/commands/tools/presentation/delete-presentation.command.ts +11 -0
  54. package/commands/tools/presentation/delete-slide-outline.command.ts +12 -0
  55. package/commands/tools/presentation/export-presentation-as-pptx.command.ts +20 -0
  56. package/commands/tools/presentation/find-presentation-by-uuid.command.ts +16 -0
  57. package/commands/tools/presentation/find-presentation-outline.command.ts +16 -0
  58. package/commands/tools/presentation/find-presentations.command.ts +18 -0
  59. package/commands/tools/presentation/generate-presentation-slides.command.ts +16 -0
  60. package/commands/tools/presentation/get-presentation-config.command.ts +10 -0
  61. package/commands/tools/presentation/index.ts +15 -0
  62. package/commands/tools/presentation/reposition-slide-outline.command.ts +17 -0
  63. package/commands/tools/presentation/update-presentation-outline.command.ts +21 -0
  64. package/commands/tools/presentation/update-presentation.command.ts +20 -0
  65. package/commands/tools/presentation/update-slide-outline.command.ts +26 -0
  66. package/constants/errors/errors.ts +66 -0
  67. package/constants/index.ts +1 -0
  68. package/constants/presentation/enums/index.ts +5 -0
  69. package/constants/presentation/enums/presentation-stage.enum.ts +13 -0
  70. package/constants/presentation/enums/slide-content-type.enum.ts +11 -0
  71. package/constants/presentation/enums/slide-icon-slot-status.enum.ts +6 -0
  72. package/constants/presentation/enums/slide-image-slot.status.enum.ts +6 -0
  73. package/constants/presentation/enums/slide-layout.enum.ts +4 -0
  74. package/constants/presentation/index.ts +2 -0
  75. package/constants/presentation/maps/index.ts +1 -0
  76. package/constants/presentation/maps/slide-layout-map.constant.ts +14 -0
  77. package/models/tools/index.ts +1 -0
  78. package/models/tools/language/index.ts +1 -0
  79. package/models/tools/language/language.schema.ts +9 -0
  80. package/models/tools/presentation/index.ts +7 -0
  81. package/models/tools/presentation/pptx-export-payload.schema.ts +212 -0
  82. package/models/tools/presentation/presentation-config.schema.ts +16 -0
  83. package/models/tools/presentation/presentation-template.schema.ts +11 -0
  84. package/models/tools/presentation/presentation.schema.ts +25 -0
  85. package/models/tools/presentation/slide-content-type.schema.ts +13 -0
  86. package/models/tools/presentation/slide-content.schema.ts +218 -0
  87. package/models/tools/presentation/slide-icon-slot.schema.ts +13 -0
  88. package/models/tools/presentation/slide-image-slot.schema.ts +14 -0
  89. package/models/tools/presentation/slide-outline.schema.ts +58 -0
  90. package/models/tools/presentation/slide.schema.ts +19 -0
  91. package/package.json +2 -1
@@ -17,6 +17,7 @@ export * from './message';
17
17
  export * from './midjourney';
18
18
  export * from './page';
19
19
  export * from './payment';
20
+ export * from './presentation';
20
21
  export * from './product';
21
22
  export * from './question';
22
23
  export * from './stt';
@@ -0,0 +1,26 @@
1
+ export const PRESENTATION_PRIVATE_CONTROLLER = 'private/presentation';
2
+ export const PRESENTATION_PUBLIC_CONTROLLER = 'public/presentation';
3
+
4
+ export const PRESENTATION_ROUTES = {
5
+ CONFIG: 'config',
6
+ CONFIG_INTERNAL: 'internal/config',
7
+ CREATE: '',
8
+ FIND_ALL: '',
9
+ DELETE: (uuid: string) => `${uuid}`,
10
+ UPDATE: (uuid: string) => `${uuid}`,
11
+ FIND_BY_UUID_INTERNAL: (uuid: string) => `internal/${uuid}`,
12
+ FIND_BY_UUID: (uuid: string) => `${uuid}`,
13
+ FIND_PRESENTATION_OUTLINE: (uuid: string) => `${uuid}/outline`,
14
+ GENERATE_OUTLINE: (uuid: string) => `${uuid}/outline/generate`,
15
+ GENERATE_SLIDES: (uuid: string) => `${uuid}/slides/generate`,
16
+ UPDATE_PRESENTATION_OUTLINE: (uuid: string) => `${uuid}/outline`,
17
+ UPDATE_SLIDE_OUTLINE: (presentationId: string, slideOutlineId: string) =>
18
+ `${presentationId}/outline/${slideOutlineId}`,
19
+ REPOSITION_SLIDE_OUTLINE: (presentationId: string, slideOutlineId: string) =>
20
+ `${presentationId}/outline/${slideOutlineId}/move`,
21
+ DELETE_SLIDE_OUTLINE: (presentationId: string, slideOutlineId: string) =>
22
+ `${presentationId}/outline/${slideOutlineId}`,
23
+ CREATE_SLIDE_OUTLINE: (presentationId: string) => `${presentationId}/outline`,
24
+ EXPORT_AS_PPTX: (uuid: string) => `${uuid}/export-as-pptx`,
25
+ DELETE_ALL: '',
26
+ } as const;
@@ -33,6 +33,7 @@ __exportStar(require("./message"), exports);
33
33
  __exportStar(require("./midjourney"), exports);
34
34
  __exportStar(require("./page"), exports);
35
35
  __exportStar(require("./payment"), exports);
36
+ __exportStar(require("./presentation"), exports);
36
37
  __exportStar(require("./product"), exports);
37
38
  __exportStar(require("./question"), exports);
38
39
  __exportStar(require("./stt"), exports);
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PRESENTATION_ROUTES = exports.PRESENTATION_PUBLIC_CONTROLLER = exports.PRESENTATION_PRIVATE_CONTROLLER = void 0;
4
+ exports.PRESENTATION_PRIVATE_CONTROLLER = 'private/presentation';
5
+ exports.PRESENTATION_PUBLIC_CONTROLLER = 'public/presentation';
6
+ exports.PRESENTATION_ROUTES = {
7
+ CONFIG: 'config',
8
+ CONFIG_INTERNAL: 'internal/config',
9
+ CREATE: '',
10
+ FIND_ALL: '',
11
+ DELETE: (uuid) => `${uuid}`,
12
+ UPDATE: (uuid) => `${uuid}`,
13
+ FIND_BY_UUID_INTERNAL: (uuid) => `internal/${uuid}`,
14
+ FIND_BY_UUID: (uuid) => `${uuid}`,
15
+ FIND_PRESENTATION_OUTLINE: (uuid) => `${uuid}/outline`,
16
+ GENERATE_OUTLINE: (uuid) => `${uuid}/outline/generate`,
17
+ GENERATE_SLIDES: (uuid) => `${uuid}/slides/generate`,
18
+ UPDATE_PRESENTATION_OUTLINE: (uuid) => `${uuid}/outline`,
19
+ UPDATE_SLIDE_OUTLINE: (presentationId, slideOutlineId) => `${presentationId}/outline/${slideOutlineId}`,
20
+ REPOSITION_SLIDE_OUTLINE: (presentationId, slideOutlineId) => `${presentationId}/outline/${slideOutlineId}/move`,
21
+ DELETE_SLIDE_OUTLINE: (presentationId, slideOutlineId) => `${presentationId}/outline/${slideOutlineId}`,
22
+ CREATE_SLIDE_OUTLINE: (presentationId) => `${presentationId}/outline`,
23
+ EXPORT_AS_PPTX: (uuid) => `${uuid}/export-as-pptx`,
24
+ DELETE_ALL: '',
25
+ };
@@ -9,7 +9,7 @@ var CalculateFileCostCommand;
9
9
  uuid: true,
10
10
  });
11
11
  CalculateFileCostCommand.RequestSchema = zod_1.z.object({
12
- model: zod_1.z.string(),
12
+ modelId: zod_1.z.string().uuid(),
13
13
  });
14
14
  CalculateFileCostCommand.ResponseSchema = zod_1.z.object({
15
15
  data: models_1.FileSchema,
@@ -6,7 +6,7 @@ const zod_1 = require("zod");
6
6
  var UploadFileCommand;
7
7
  (function (UploadFileCommand) {
8
8
  UploadFileCommand.RequestSchema = zod_1.z.object({
9
- model: zod_1.z.string().optional(),
9
+ modelId: zod_1.z.string().uuid().optional(),
10
10
  });
11
11
  UploadFileCommand.ResponseSchema = zod_1.z.object({
12
12
  data: models_1.FileSchema,
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./paraphrase"), exports);
18
+ __exportStar(require("./presentation"), exports);
18
19
  __exportStar(require("./stt"), exports);
19
20
  __exportStar(require("./tool"), exports);
20
21
  __exportStar(require("./tts"), exports);
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreatePresentationCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const presentation_1 = require("../../../models/tools/presentation");
6
+ var CreatePresentationCommand;
7
+ (function (CreatePresentationCommand) {
8
+ CreatePresentationCommand.RequestSchema = zod_1.z.object({
9
+ prompt: zod_1.z.string().min(1).max(10000),
10
+ slideCount: zod_1.z.number().min(1).max(20),
11
+ templateId: zod_1.z.string().uuid(),
12
+ languageId: zod_1.z.string().uuid(),
13
+ });
14
+ CreatePresentationCommand.ResponseSchema = zod_1.z.object({
15
+ data: presentation_1.PresentationSchema,
16
+ });
17
+ })(CreatePresentationCommand || (exports.CreatePresentationCommand = CreatePresentationCommand = {}));
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeleteAllUserPresentationsCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ var DeleteAllUserPresentationsCommand;
6
+ (function (DeleteAllUserPresentationsCommand) {
7
+ DeleteAllUserPresentationsCommand.ResponseSchema = zod_1.z.void();
8
+ })(DeleteAllUserPresentationsCommand || (exports.DeleteAllUserPresentationsCommand = DeleteAllUserPresentationsCommand = {}));
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeletePresentationCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ var DeletePresentationCommand;
6
+ (function (DeletePresentationCommand) {
7
+ DeletePresentationCommand.RequestParamsSchema = zod_1.z.object({
8
+ uuid: zod_1.z.string().uuid(),
9
+ });
10
+ DeletePresentationCommand.ResponseSchema = zod_1.z.void();
11
+ })(DeletePresentationCommand || (exports.DeletePresentationCommand = DeletePresentationCommand = {}));
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeleteSlideOutlineCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ var DeleteSlideOutlineCommand;
6
+ (function (DeleteSlideOutlineCommand) {
7
+ DeleteSlideOutlineCommand.RequestParamsSchema = zod_1.z.object({
8
+ presentationId: zod_1.z.string().uuid(),
9
+ slideOutlineId: zod_1.z.string().uuid(),
10
+ });
11
+ DeleteSlideOutlineCommand.ResponseSchema = zod_1.z.void();
12
+ })(DeleteSlideOutlineCommand || (exports.DeleteSlideOutlineCommand = DeleteSlideOutlineCommand = {}));
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ExportPresentationAsPptxCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const presentation_1 = require("../../../models/tools/presentation");
6
+ var ExportPresentationAsPptxCommand;
7
+ (function (ExportPresentationAsPptxCommand) {
8
+ ExportPresentationAsPptxCommand.RequestSchema = presentation_1.PPTXExportPayloadSchema;
9
+ ExportPresentationAsPptxCommand.RequestParamsSchema = zod_1.z.object({
10
+ uuid: zod_1.z.string().uuid(),
11
+ });
12
+ ExportPresentationAsPptxCommand.ResponseSchema = zod_1.z.object({
13
+ data: zod_1.z.object({
14
+ url: zod_1.z.string(),
15
+ }),
16
+ });
17
+ })(ExportPresentationAsPptxCommand || (exports.ExportPresentationAsPptxCommand = ExportPresentationAsPptxCommand = {}));
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FindPresentationByUuidCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const presentation_1 = require("../../../models/tools/presentation");
6
+ var FindPresentationByUuidCommand;
7
+ (function (FindPresentationByUuidCommand) {
8
+ FindPresentationByUuidCommand.RequestParamsSchema = zod_1.z.object({
9
+ uuid: zod_1.z.string().uuid(),
10
+ });
11
+ FindPresentationByUuidCommand.ResponseSchema = zod_1.z.object({
12
+ data: presentation_1.PresentationWithSlidesSchema,
13
+ });
14
+ })(FindPresentationByUuidCommand || (exports.FindPresentationByUuidCommand = FindPresentationByUuidCommand = {}));
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FindPresentationOutlineCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const presentation_1 = require("../../../models/tools/presentation");
6
+ var FindPresentationOutlineCommand;
7
+ (function (FindPresentationOutlineCommand) {
8
+ FindPresentationOutlineCommand.RequestParamsSchema = zod_1.z.object({
9
+ uuid: zod_1.z.string().uuid(),
10
+ });
11
+ FindPresentationOutlineCommand.ResponseSchema = zod_1.z.object({
12
+ data: zod_1.z.array(presentation_1.SlideOutlineSchema),
13
+ });
14
+ })(FindPresentationOutlineCommand || (exports.FindPresentationOutlineCommand = FindPresentationOutlineCommand = {}));
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FindPresentationsCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const presentation_1 = require("../../../models/tools/presentation");
6
+ var FindPresentationsCommand;
7
+ (function (FindPresentationsCommand) {
8
+ FindPresentationsCommand.RequestQuerySchema = zod_1.z.object({
9
+ limit: zod_1.z.coerce.number().min(1).optional(),
10
+ offset: zod_1.z.coerce.number().min(0).default(0).optional(),
11
+ title: zod_1.z.string().optional(),
12
+ });
13
+ FindPresentationsCommand.ResponseSchema = zod_1.z.object({
14
+ data: zod_1.z.array(presentation_1.PresentationSchema),
15
+ totalPages: zod_1.z.number(),
16
+ page: zod_1.z.number(),
17
+ });
18
+ })(FindPresentationsCommand || (exports.FindPresentationsCommand = FindPresentationsCommand = {}));
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GeneratePresentationSlidesCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const presentation_1 = require("../../../models/tools/presentation");
6
+ var GeneratePresentationSlidesCommand;
7
+ (function (GeneratePresentationSlidesCommand) {
8
+ GeneratePresentationSlidesCommand.RequestParamsSchema = zod_1.z.object({
9
+ uuid: zod_1.z.string().uuid(),
10
+ });
11
+ GeneratePresentationSlidesCommand.ResponseSchema = zod_1.z.object({
12
+ data: presentation_1.PresentationSchema,
13
+ });
14
+ })(GeneratePresentationSlidesCommand || (exports.GeneratePresentationSlidesCommand = GeneratePresentationSlidesCommand = {}));
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetPresentationConfigCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const presentation_1 = require("../../../models/tools/presentation");
6
+ var GetPresentationConfigCommand;
7
+ (function (GetPresentationConfigCommand) {
8
+ GetPresentationConfigCommand.ResponseSchema = zod_1.z.object({
9
+ data: presentation_1.PresentationConfigSchema,
10
+ });
11
+ })(GetPresentationConfigCommand || (exports.GetPresentationConfigCommand = GetPresentationConfigCommand = {}));
@@ -0,0 +1,31 @@
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("./create-presentation.command"), exports);
18
+ __exportStar(require("./delete-all-user-presentations.command"), exports);
19
+ __exportStar(require("./delete-slide-outline.command"), exports);
20
+ __exportStar(require("./delete-presentation.command"), exports);
21
+ __exportStar(require("./export-presentation-as-pptx.command"), exports);
22
+ __exportStar(require("./find-presentation-by-uuid.command"), exports);
23
+ __exportStar(require("./find-presentation-outline.command"), exports);
24
+ __exportStar(require("./find-presentations.command"), exports);
25
+ __exportStar(require("./generate-presentation-slides.command"), exports);
26
+ __exportStar(require("./get-presentation-config.command"), exports);
27
+ __exportStar(require("./reposition-slide-outline.command"), exports);
28
+ __exportStar(require("./update-slide-outline.command"), exports);
29
+ __exportStar(require("./update-presentation-outline.command"), exports);
30
+ __exportStar(require("./update-presentation.command"), exports);
31
+ __exportStar(require("./update-slide-outline.command"), exports);
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RepositionSlideOutlineCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ var RepositionSlideOutlineCommand;
6
+ (function (RepositionSlideOutlineCommand) {
7
+ RepositionSlideOutlineCommand.RequestParamsSchema = zod_1.z.object({
8
+ presentationId: zod_1.z.string().uuid(),
9
+ slideOutlineId: zod_1.z.string().uuid(),
10
+ });
11
+ RepositionSlideOutlineCommand.RequestBodySchema = zod_1.z.object({
12
+ newPosition: zod_1.z.number().min(0),
13
+ });
14
+ RepositionSlideOutlineCommand.ResponseSchema = zod_1.z.void();
15
+ })(RepositionSlideOutlineCommand || (exports.RepositionSlideOutlineCommand = RepositionSlideOutlineCommand = {}));
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdatePresentationOutlineCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const presentation_1 = require("../../../models/tools/presentation");
6
+ var UpdatePresentationOutlineCommand;
7
+ (function (UpdatePresentationOutlineCommand) {
8
+ UpdatePresentationOutlineCommand.RequestParamsSchema = zod_1.z.object({
9
+ uuid: zod_1.z.string().uuid(),
10
+ });
11
+ UpdatePresentationOutlineCommand.RequestBodySchema = presentation_1.SlideOutlineBulkUpdateSchema;
12
+ UpdatePresentationOutlineCommand.ResponseSchema = zod_1.z.object({
13
+ data: presentation_1.SlideOutlineSchema.array(),
14
+ });
15
+ })(UpdatePresentationOutlineCommand || (exports.UpdatePresentationOutlineCommand = UpdatePresentationOutlineCommand = {}));
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdatePresentationCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const presentation_1 = require("../../../models/tools/presentation");
6
+ var UpdatePresentationCommand;
7
+ (function (UpdatePresentationCommand) {
8
+ UpdatePresentationCommand.RequestParamsSchema = zod_1.z.object({
9
+ uuid: zod_1.z.string().uuid(),
10
+ });
11
+ UpdatePresentationCommand.RequestBodySchema = zod_1.z.object({
12
+ title: zod_1.z.string(),
13
+ });
14
+ UpdatePresentationCommand.ResponseSchema = zod_1.z.object({
15
+ data: presentation_1.PresentationSchema,
16
+ });
17
+ })(UpdatePresentationCommand || (exports.UpdatePresentationCommand = UpdatePresentationCommand = {}));
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateSlideOutlineCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const presentation_1 = require("../../../models/tools/presentation");
6
+ const constants_1 = require("../../../constants");
7
+ var UpdateSlideOutlineCommand;
8
+ (function (UpdateSlideOutlineCommand) {
9
+ UpdateSlideOutlineCommand.RequestParamsSchema = zod_1.z.object({
10
+ presentationId: zod_1.z.string().uuid(),
11
+ slideOutlineId: zod_1.z.string().uuid(),
12
+ });
13
+ UpdateSlideOutlineCommand.RequestBodySchema = zod_1.z
14
+ .object({
15
+ title: zod_1.z.string(),
16
+ body: zod_1.z.string(),
17
+ contentTypeId: zod_1.z.nativeEnum(constants_1.SLIDE_CONTENT_TYPE),
18
+ })
19
+ .partial();
20
+ UpdateSlideOutlineCommand.ResponseSchema = zod_1.z.object({
21
+ data: presentation_1.SlideOutlineSchema,
22
+ });
23
+ })(UpdateSlideOutlineCommand || (exports.UpdateSlideOutlineCommand = UpdateSlideOutlineCommand = {}));
@@ -1582,4 +1582,69 @@ exports.ERRORS = {
1582
1582
  message: 'Вложения изображений и текстовых файлов нельзя использовать вместе',
1583
1583
  httpCode: 400,
1584
1584
  },
1585
+ PRESENTATION_CONFIG_ERROR: {
1586
+ code: 'A338',
1587
+ message: 'Произошла ошибка при получении конфигурации презентации',
1588
+ httpCode: 500,
1589
+ },
1590
+ PRESENTATION_CREATE_ERROR: {
1591
+ code: 'A335',
1592
+ message: 'Произошла ошибка при создании презентации',
1593
+ httpCode: 500,
1594
+ },
1595
+ PRESENTATION_FIND_ERROR: {
1596
+ code: 'A336',
1597
+ message: 'Произошла ошибка при поиске презентации',
1598
+ httpCode: 500,
1599
+ },
1600
+ PRESENTATION_NOT_FOUND: {
1601
+ code: 'A337',
1602
+ message: 'Презентация не найдена',
1603
+ httpCode: 404,
1604
+ },
1605
+ PRESENTATION_SLIDES_GENERATE_ERROR: {
1606
+ code: 'A338',
1607
+ message: 'Произошла ошибка при генерации слайдов презентации',
1608
+ httpCode: 500,
1609
+ },
1610
+ PRESENTATION_UPDATE_SLIDE_OUTLINE_ERROR: {
1611
+ code: 'A339',
1612
+ message: 'Произошла ошибка при редактировании макета слайда',
1613
+ httpCode: 500,
1614
+ },
1615
+ PRESENTATION_REPOSITION_SLIDE_OUTLINE_ERROR: {
1616
+ code: 'A340',
1617
+ message: 'Произошла ошибка при перемещении макета слайда',
1618
+ httpCode: 500,
1619
+ },
1620
+ PRESENTATION_DELETE_SLIDE_OUTLINE_ERROR: {
1621
+ code: 'A341',
1622
+ message: 'Произошла ошибка при удалении макета слайда',
1623
+ httpCode: 500,
1624
+ },
1625
+ PRESENTATION_DELETE_PRESENTATION_ERROR: {
1626
+ code: 'A342',
1627
+ message: 'Произошла ошибка при удалении презентации',
1628
+ httpCode: 500,
1629
+ },
1630
+ PRESENTATION_UPDATE_PRESENTATION_OUTLINE_ERROR: {
1631
+ code: 'A343',
1632
+ message: 'Произошла ошибка при обновлении макета презентации',
1633
+ httpCode: 500,
1634
+ },
1635
+ PRESENTATION_EXPORT_AS_PPTX_ERROR: {
1636
+ code: 'A344',
1637
+ message: 'Произошла ошибка при экспорте презентации в PPTX',
1638
+ httpCode: 500,
1639
+ },
1640
+ PRESENTATION_DELETE_ALL_USER_PRESENTATIONS_ERROR: {
1641
+ code: 'A345',
1642
+ message: 'Произошла ошибка при удалении презентаций пользователя',
1643
+ httpCode: 500,
1644
+ },
1645
+ PRESENTATION_UPDATE_ERROR: {
1646
+ code: 'A346',
1647
+ message: 'Произошла ошибка при обновлении презентации',
1648
+ httpCode: 500,
1649
+ },
1585
1650
  };
@@ -31,6 +31,7 @@ __exportStar(require("./midjourney"), exports);
31
31
  __exportStar(require("./order"), exports);
32
32
  __exportStar(require("./page"), exports);
33
33
  __exportStar(require("./payment"), exports);
34
+ __exportStar(require("./presentation"), exports);
34
35
  __exportStar(require("./product"), exports);
35
36
  __exportStar(require("./referral"), exports);
36
37
  __exportStar(require("./roles"), exports);
@@ -0,0 +1,21 @@
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("./presentation-stage.enum"), exports);
18
+ __exportStar(require("./slide-content-type.enum"), exports);
19
+ __exportStar(require("./slide-icon-slot-status.enum"), exports);
20
+ __exportStar(require("./slide-image-slot.status.enum"), exports);
21
+ __exportStar(require("./slide-layout.enum"), exports);
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PRESENTATION_STAGE = void 0;
4
+ var PRESENTATION_STAGE;
5
+ (function (PRESENTATION_STAGE) {
6
+ PRESENTATION_STAGE["CREATED"] = "CREATED";
7
+ PRESENTATION_STAGE["GENERATING_OUTLINE"] = "GENERATING_OUTLINE";
8
+ PRESENTATION_STAGE["OUTLINE_GENERATED"] = "OUTLINE_GENERATED";
9
+ PRESENTATION_STAGE["OUTLINE_GENERATION_FAILED"] = "OUTLINE_GENERATION_FAILED";
10
+ PRESENTATION_STAGE["GENERATING_SLIDES"] = "GENERATING_SLIDES";
11
+ PRESENTATION_STAGE["SLIDES_GENERATED"] = "SLIDES_GENERATED";
12
+ PRESENTATION_STAGE["SLIDES_GENERATION_FAILED"] = "SLIDES_GENERATION_FAILED";
13
+ PRESENTATION_STAGE["DELETED"] = "DELETED";
14
+ })(PRESENTATION_STAGE || (exports.PRESENTATION_STAGE = PRESENTATION_STAGE = {}));
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SLIDE_CONTENT_TYPE = void 0;
4
+ var SLIDE_CONTENT_TYPE;
5
+ (function (SLIDE_CONTENT_TYPE) {
6
+ SLIDE_CONTENT_TYPE["COVER"] = "COVER";
7
+ SLIDE_CONTENT_TYPE["TEXT"] = "TEXT";
8
+ SLIDE_CONTENT_TYPE["SECTION_BREAK"] = "SECTION_BREAK";
9
+ SLIDE_CONTENT_TYPE["STRUCTURED_LIST"] = "STRUCTURED_LIST";
10
+ SLIDE_CONTENT_TYPE["CONTENTS"] = "CONTENTS";
11
+ SLIDE_CONTENT_TYPE["IMAGE"] = "IMAGE";
12
+ SLIDE_CONTENT_TYPE["THANK_YOU"] = "THANK_YOU";
13
+ SLIDE_CONTENT_TYPE["TABLE"] = "TABLE";
14
+ SLIDE_CONTENT_TYPE["CHART"] = "CHART";
15
+ })(SLIDE_CONTENT_TYPE || (exports.SLIDE_CONTENT_TYPE = SLIDE_CONTENT_TYPE = {}));
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SLIDE_ICON_SLOT_STATUS = void 0;
4
+ var SLIDE_ICON_SLOT_STATUS;
5
+ (function (SLIDE_ICON_SLOT_STATUS) {
6
+ SLIDE_ICON_SLOT_STATUS["PENDING"] = "PENDING";
7
+ SLIDE_ICON_SLOT_STATUS["IN_PROGRESS"] = "IN_PROGRESS";
8
+ SLIDE_ICON_SLOT_STATUS["READY"] = "READY";
9
+ SLIDE_ICON_SLOT_STATUS["ERROR"] = "ERROR";
10
+ })(SLIDE_ICON_SLOT_STATUS || (exports.SLIDE_ICON_SLOT_STATUS = SLIDE_ICON_SLOT_STATUS = {}));
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SLIDE_IMAGE_SLOT_STATUS = void 0;
4
+ var SLIDE_IMAGE_SLOT_STATUS;
5
+ (function (SLIDE_IMAGE_SLOT_STATUS) {
6
+ SLIDE_IMAGE_SLOT_STATUS["PENDING"] = "PENDING";
7
+ SLIDE_IMAGE_SLOT_STATUS["IN_PROGRESS"] = "IN_PROGRESS";
8
+ SLIDE_IMAGE_SLOT_STATUS["READY"] = "READY";
9
+ SLIDE_IMAGE_SLOT_STATUS["ERROR"] = "ERROR";
10
+ })(SLIDE_IMAGE_SLOT_STATUS || (exports.SLIDE_IMAGE_SLOT_STATUS = SLIDE_IMAGE_SLOT_STATUS = {}));
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SLIDE_LAYOUT = void 0;
4
+ var SLIDE_LAYOUT;
5
+ (function (SLIDE_LAYOUT) {
6
+ SLIDE_LAYOUT["TYPE_1"] = "TYPE_1";
7
+ SLIDE_LAYOUT["TYPE_2"] = "TYPE_2";
8
+ })(SLIDE_LAYOUT || (exports.SLIDE_LAYOUT = SLIDE_LAYOUT = {}));
@@ -0,0 +1,18 @@
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("./enums"), exports);
18
+ __exportStar(require("./maps"), 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("./slide-layout-map.constant"), exports);
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SLIDE_LAYOUT_MAP = void 0;
4
+ const enums_1 = require("../enums");
5
+ const slide_layout_enum_1 = require("../enums/slide-layout.enum");
6
+ exports.SLIDE_LAYOUT_MAP = new Map([
7
+ [enums_1.SLIDE_CONTENT_TYPE.COVER, [slide_layout_enum_1.SLIDE_LAYOUT.TYPE_1]],
8
+ [enums_1.SLIDE_CONTENT_TYPE.STRUCTURED_LIST, [slide_layout_enum_1.SLIDE_LAYOUT.TYPE_1, slide_layout_enum_1.SLIDE_LAYOUT.TYPE_2]],
9
+ [enums_1.SLIDE_CONTENT_TYPE.TEXT, [slide_layout_enum_1.SLIDE_LAYOUT.TYPE_1, slide_layout_enum_1.SLIDE_LAYOUT.TYPE_2]],
10
+ [enums_1.SLIDE_CONTENT_TYPE.SECTION_BREAK, [slide_layout_enum_1.SLIDE_LAYOUT.TYPE_1]],
11
+ [enums_1.SLIDE_CONTENT_TYPE.CONTENTS, [slide_layout_enum_1.SLIDE_LAYOUT.TYPE_1]],
12
+ [enums_1.SLIDE_CONTENT_TYPE.IMAGE, [slide_layout_enum_1.SLIDE_LAYOUT.TYPE_1]],
13
+ [enums_1.SLIDE_CONTENT_TYPE.THANK_YOU, [slide_layout_enum_1.SLIDE_LAYOUT.TYPE_1]],
14
+ [enums_1.SLIDE_CONTENT_TYPE.TABLE, [slide_layout_enum_1.SLIDE_LAYOUT.TYPE_1]],
15
+ [enums_1.SLIDE_CONTENT_TYPE.CHART, [slide_layout_enum_1.SLIDE_LAYOUT.TYPE_1]],
16
+ ]);
@@ -14,6 +14,7 @@ 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("./language"), exports);
17
18
  __exportStar(require("./paraphrase"), exports);
18
19
  __exportStar(require("./stt"), exports);
19
20
  __exportStar(require("./tts"), 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("./language.schema"), exports);
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LanguageSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.LanguageSchema = zod_1.z.object({
6
+ uuid: zod_1.z.string(),
7
+ name: zod_1.z.string(),
8
+ order: zod_1.z.number(),
9
+ createdAt: zod_1.z.date(),
10
+ updatedAt: zod_1.z.date(),
11
+ });