@purpleschool/gptbot 0.7.65 → 0.7.67

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.
@@ -17,4 +17,5 @@ export const WRITER_ROUTES = {
17
17
  FIX_ERRORS: (uuid: string) => `documents/${uuid}/actions/fix-errors`,
18
18
  GENERATE_TEXT: (uuid: string) => `documents/${uuid}/actions/generate-text`,
19
19
  EXPORT_AS_DOCX: (uuid: string) => `documents/${uuid}/export/docx`,
20
+ SET_REACTION: (uuid: string) => `documents/${uuid}/reaction`,
20
21
  } as const;
@@ -19,4 +19,5 @@ exports.WRITER_ROUTES = {
19
19
  FIX_ERRORS: (uuid) => `documents/${uuid}/actions/fix-errors`,
20
20
  GENERATE_TEXT: (uuid) => `documents/${uuid}/actions/generate-text`,
21
21
  EXPORT_AS_DOCX: (uuid) => `documents/${uuid}/export/docx`,
22
+ SET_REACTION: (uuid) => `documents/${uuid}/reaction`,
22
23
  };
@@ -29,3 +29,4 @@ __exportStar(require("./writer-shorten-text.command"), exports);
29
29
  __exportStar(require("./writer-fix-errors.command"), exports);
30
30
  __exportStar(require("./writer-generate-text.command"), exports);
31
31
  __exportStar(require("./export-writer-document-as-docx.command"), exports);
32
+ __exportStar(require("./set-reaction.writer-document.command"), exports);
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SetReactionWriterDocumentCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const constants_1 = require("../../../constants");
6
+ const models_1 = require("../../../models");
7
+ var SetReactionWriterDocumentCommand;
8
+ (function (SetReactionWriterDocumentCommand) {
9
+ SetReactionWriterDocumentCommand.RequestParamsSchema = zod_1.z.object({
10
+ uuid: zod_1.z.string().uuid(),
11
+ });
12
+ SetReactionWriterDocumentCommand.RequestBodySchema = zod_1.z.object({
13
+ reaction: zod_1.z.nativeEnum(constants_1.USER_REACTION),
14
+ });
15
+ SetReactionWriterDocumentCommand.ResponseSchema = zod_1.z.object({
16
+ data: models_1.WriterDocumentSchema,
17
+ });
18
+ })(SetReactionWriterDocumentCommand || (exports.SetReactionWriterDocumentCommand = SetReactionWriterDocumentCommand = {}));
@@ -7,4 +7,5 @@ var AI_MODEL_CONFIG_PARAM;
7
7
  AI_MODEL_CONFIG_PARAM["IMAGE_STYLE"] = "image-style";
8
8
  AI_MODEL_CONFIG_PARAM["WEB_SEARCH"] = "web-search";
9
9
  AI_MODEL_CONFIG_PARAM["EXTRA_SYMBOLS_PRICING"] = "extra-symbols-pricing";
10
+ AI_MODEL_CONFIG_PARAM["REASONING"] = "reasoning";
10
11
  })(AI_MODEL_CONFIG_PARAM || (exports.AI_MODEL_CONFIG_PARAM = AI_MODEL_CONFIG_PARAM = {}));
@@ -2171,4 +2171,9 @@ exports.ERRORS = {
2171
2171
  message: 'Произошла ошибка при отправке сообщения в телеграм канал',
2172
2172
  httpCode: 500,
2173
2173
  },
2174
+ WRITER_SET_REACTION_TO_WRITER_DOCUMENT_ERROR: {
2175
+ code: 'A445',
2176
+ message: 'Произошла ошибка при установке реакции на документ',
2177
+ httpCode: 500,
2178
+ },
2174
2179
  };
@@ -15,6 +15,7 @@ exports.WriterDocumentSchema = zod_1.z.object({
15
15
  finalMd: zod_1.z.string().nullable(),
16
16
  userId: zod_1.z.string().nullable(),
17
17
  unregisteredUserId: zod_1.z.string().nullable(),
18
+ reaction: zod_1.z.nativeEnum(constants_1.USER_REACTION).nullable(),
18
19
  pages: zod_1.z.number(),
19
20
  createdAt: zod_1.z.date(),
20
21
  updatedAt: zod_1.z.date(),
@@ -13,3 +13,4 @@ export * from './writer-shorten-text.command';
13
13
  export * from './writer-fix-errors.command';
14
14
  export * from './writer-generate-text.command';
15
15
  export * from './export-writer-document-as-docx.command';
16
+ export * from './set-reaction.writer-document.command';
@@ -0,0 +1,21 @@
1
+ import { z } from 'zod';
2
+ import { USER_REACTION } from '../../../constants';
3
+ import { WriterDocumentSchema } from '../../../models';
4
+
5
+ export namespace SetReactionWriterDocumentCommand {
6
+ export const RequestParamsSchema = z.object({
7
+ uuid: z.string().uuid(),
8
+ });
9
+ export type RequestParams = z.infer<typeof RequestParamsSchema>;
10
+
11
+ export const RequestBodySchema = z.object({
12
+ reaction: z.nativeEnum(USER_REACTION),
13
+ });
14
+ export type RequestBody = z.infer<typeof RequestBodySchema>;
15
+
16
+ export const ResponseSchema = z.object({
17
+ data: WriterDocumentSchema,
18
+ });
19
+
20
+ export type Response = z.infer<typeof ResponseSchema>;
21
+ }
@@ -3,4 +3,5 @@ export enum AI_MODEL_CONFIG_PARAM {
3
3
  IMAGE_STYLE = 'image-style',
4
4
  WEB_SEARCH = 'web-search',
5
5
  EXTRA_SYMBOLS_PRICING = 'extra-symbols-pricing',
6
+ REASONING = 'reasoning',
6
7
  }
@@ -2179,4 +2179,9 @@ export const ERRORS = {
2179
2179
  message: 'Произошла ошибка при отправке сообщения в телеграм канал',
2180
2180
  httpCode: 500,
2181
2181
  },
2182
+ WRITER_SET_REACTION_TO_WRITER_DOCUMENT_ERROR: {
2183
+ code: 'A445',
2184
+ message: 'Произошла ошибка при установке реакции на документ',
2185
+ httpCode: 500,
2186
+ },
2182
2187
  };
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { WriterDocumentOutlineSchema } from './writer-document-outline.schema';
3
- import { WRITER_DOCUMENT_STAGE } from '../../../constants';
3
+ import { USER_REACTION, WRITER_DOCUMENT_STAGE } from '../../../constants';
4
4
 
5
5
  export const WriterDocumentSchema = z.object({
6
6
  uuid: z.string().uuid(),
@@ -13,6 +13,7 @@ export const WriterDocumentSchema = z.object({
13
13
  finalMd: z.string().nullable(),
14
14
  userId: z.string().nullable(),
15
15
  unregisteredUserId: z.string().nullable(),
16
+ reaction: z.nativeEnum(USER_REACTION).nullable(),
16
17
  pages: z.number(),
17
18
  createdAt: z.date(),
18
19
  updatedAt: z.date(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.7.65",
3
+ "version": "0.7.67",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",