@purpleschool/gptbot 0.8.48 → 0.8.50
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.
- package/api/controllers/http/presentation.ts +1 -0
- package/build/api/controllers/http/presentation.js +1 -0
- package/build/commands/folder/find-folder-by-uuid-with-chats.command.js +1 -0
- package/build/commands/folder/find-folders-by-user.command.js +1 -0
- package/build/commands/tools/presentation/index.js +1 -0
- package/build/commands/tools/presentation/set-reaction-to-presentation.command.js +18 -0
- package/build/constants/errors/errors.js +5 -0
- package/commands/folder/find-folder-by-uuid-with-chats.command.ts +1 -0
- package/commands/folder/find-folders-by-user.command.ts +1 -0
- package/commands/tools/presentation/index.ts +1 -0
- package/commands/tools/presentation/set-reaction-to-presentation.command.ts +20 -0
- package/constants/errors/errors.ts +5 -0
- package/package.json +1 -1
|
@@ -33,4 +33,5 @@ export const PRESENTATION_ROUTES = {
|
|
|
33
33
|
CREATE_SLIDE_OUTLINE: (presentationId: string) => `${presentationId}/outline`,
|
|
34
34
|
EXPORT_AS_PPTX: (uuid: string) => `${uuid}/export-as-pptx`,
|
|
35
35
|
DELETE_ALL: '',
|
|
36
|
+
SET_REACTION: (uuid: string) => `${uuid}/reaction`,
|
|
36
37
|
} as const;
|
|
@@ -14,6 +14,7 @@ var FindFolderByUuidWithChatsCommand;
|
|
|
14
14
|
FindFolderByUuidWithChatsCommand.RequestSchema = zod_1.default.object({
|
|
15
15
|
limit: zod_1.default.coerce.number().min(1),
|
|
16
16
|
offset: zod_1.default.coerce.number().min(0).default(0),
|
|
17
|
+
title: zod_1.default.string().optional(),
|
|
17
18
|
});
|
|
18
19
|
FindFolderByUuidWithChatsCommand.ResponseSchema = zod_1.default.object({
|
|
19
20
|
data: models_1.FolderSchema.extend({
|
|
@@ -11,6 +11,7 @@ var FindFoldersByUserCommand;
|
|
|
11
11
|
FindFoldersByUserCommand.RequestSchema = zod_1.default.object({
|
|
12
12
|
limit: zod_1.default.coerce.number().min(1),
|
|
13
13
|
offset: zod_1.default.coerce.number().min(0).default(0),
|
|
14
|
+
title: zod_1.default.string().optional(),
|
|
14
15
|
});
|
|
15
16
|
FindFoldersByUserCommand.ResponseSchema = zod_1.default.object({
|
|
16
17
|
data: zod_1.default.array(models_1.FolderSchema),
|
|
@@ -36,3 +36,4 @@ __exportStar(require("./update-slide-outline.command"), exports);
|
|
|
36
36
|
__exportStar(require("./presentation-paraphrase.command"), exports);
|
|
37
37
|
__exportStar(require("./presentation-generate-report.command"), exports);
|
|
38
38
|
__exportStar(require("./update-slide.command"), exports);
|
|
39
|
+
__exportStar(require("./set-reaction-to-presentation.command"), exports);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SetReactionToPresentationCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
|
+
const constants_1 = require("../../../constants");
|
|
7
|
+
var SetReactionToPresentationCommand;
|
|
8
|
+
(function (SetReactionToPresentationCommand) {
|
|
9
|
+
SetReactionToPresentationCommand.RequestSchema = zod_1.z.object({
|
|
10
|
+
uuid: zod_1.z.string().uuid(),
|
|
11
|
+
});
|
|
12
|
+
SetReactionToPresentationCommand.RequestBodySchema = zod_1.z.object({
|
|
13
|
+
reaction: zod_1.z.nativeEnum(constants_1.USER_REACTION).nullable(),
|
|
14
|
+
});
|
|
15
|
+
SetReactionToPresentationCommand.ResponseSchema = zod_1.z.object({
|
|
16
|
+
data: models_1.PresentationSchema,
|
|
17
|
+
});
|
|
18
|
+
})(SetReactionToPresentationCommand || (exports.SetReactionToPresentationCommand = SetReactionToPresentationCommand = {}));
|
|
@@ -2597,4 +2597,9 @@ exports.ERRORS = {
|
|
|
2597
2597
|
message: 'Нельзя провести возврат платежа за покупку пакета',
|
|
2598
2598
|
httpCode: 400,
|
|
2599
2599
|
},
|
|
2600
|
+
PRESENTATION_SET_REACTION_ERROR: {
|
|
2601
|
+
code: 'A530',
|
|
2602
|
+
message: 'Произошла ошибка при установке оценки презентации',
|
|
2603
|
+
httpCode: 500,
|
|
2604
|
+
},
|
|
2600
2605
|
};
|
|
@@ -11,6 +11,7 @@ export namespace FindFolderByUuidWithChatsCommand {
|
|
|
11
11
|
export const RequestSchema = z.object({
|
|
12
12
|
limit: z.coerce.number().min(1),
|
|
13
13
|
offset: z.coerce.number().min(0).default(0),
|
|
14
|
+
title: z.string().optional(),
|
|
14
15
|
});
|
|
15
16
|
|
|
16
17
|
export type Request = z.infer<typeof RequestSchema>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { PresentationSchema } from '../../../models';
|
|
3
|
+
import { USER_REACTION } from '../../../constants';
|
|
4
|
+
|
|
5
|
+
export namespace SetReactionToPresentationCommand {
|
|
6
|
+
export const RequestSchema = z.object({
|
|
7
|
+
uuid: z.string().uuid(),
|
|
8
|
+
});
|
|
9
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
10
|
+
|
|
11
|
+
export const RequestBodySchema = z.object({
|
|
12
|
+
reaction: z.nativeEnum(USER_REACTION).nullable(),
|
|
13
|
+
});
|
|
14
|
+
export type RequestParams = z.infer<typeof RequestBodySchema>;
|
|
15
|
+
|
|
16
|
+
export const ResponseSchema = z.object({
|
|
17
|
+
data: PresentationSchema,
|
|
18
|
+
});
|
|
19
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
20
|
+
}
|
|
@@ -2606,4 +2606,9 @@ export const ERRORS = {
|
|
|
2606
2606
|
message: 'Нельзя провести возврат платежа за покупку пакета',
|
|
2607
2607
|
httpCode: 400,
|
|
2608
2608
|
},
|
|
2609
|
+
PRESENTATION_SET_REACTION_ERROR: {
|
|
2610
|
+
code: 'A530',
|
|
2611
|
+
message: 'Произошла ошибка при установке оценки презентации',
|
|
2612
|
+
httpCode: 500,
|
|
2613
|
+
},
|
|
2609
2614
|
};
|