@purpleschool/gptbot 0.8.49 → 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.
@@ -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;
@@ -29,4 +29,5 @@ exports.PRESENTATION_ROUTES = {
29
29
  CREATE_SLIDE_OUTLINE: (presentationId) => `${presentationId}/outline`,
30
30
  EXPORT_AS_PPTX: (uuid) => `${uuid}/export-as-pptx`,
31
31
  DELETE_ALL: '',
32
+ SET_REACTION: (uuid) => `${uuid}/reaction`,
32
33
  };
@@ -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
  };
@@ -20,3 +20,4 @@ export * from './update-slide-outline.command';
20
20
  export * from './presentation-paraphrase.command';
21
21
  export * from './presentation-generate-report.command';
22
22
  export * from './update-slide.command';
23
+ export * from './set-reaction-to-presentation.command';
@@ -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
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.8.49",
3
+ "version": "0.8.50",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",