@purpleschool/gptbot-tools 0.0.47-texteditor → 0.0.49-texteditor

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.
@@ -605,6 +605,11 @@ exports.ERRORS = {
605
605
  message: 'Тип документа не найден',
606
606
  httpCode: 404,
607
607
  },
608
+ DOCX_EXPORT_ERROR: {
609
+ code: 'WRITER_DOCUMENT.DOCX_EXPORT_ERROR',
610
+ message: 'Произошла ошибка при экспорте документа в docx',
611
+ httpCode: 500,
612
+ },
608
613
  },
609
614
  WRITER_AI_ACTION: {
610
615
  AI_ERROR: {
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TOOL_CONTENT_TYPE = void 0;
4
+ var TOOL_CONTENT_TYPE;
5
+ (function (TOOL_CONTENT_TYPE) {
6
+ TOOL_CONTENT_TYPE["IMAGE_EDITOR"] = "IMAGE_EDITOR";
7
+ TOOL_CONTENT_TYPE["TEXT_TO_SPEECH"] = "TEXT_TO_SPEECH";
8
+ TOOL_CONTENT_TYPE["SPEECH_TO_TEXT"] = "SPEECH_TO_TEXT";
9
+ TOOL_CONTENT_TYPE["REPHRASE"] = "REPHRASE";
10
+ TOOL_CONTENT_TYPE["VIDEO"] = "VIDEO";
11
+ TOOL_CONTENT_TYPE["PRESENTATION"] = "PRESENTATION";
12
+ TOOL_CONTENT_TYPE["WRITER"] = "WRITER";
13
+ TOOL_CONTENT_TYPE["NONE"] = "NONE";
14
+ })(TOOL_CONTENT_TYPE || (exports.TOOL_CONTENT_TYPE = TOOL_CONTENT_TYPE = {}));
@@ -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("./job-status.enum"), exports);
18
+ __exportStar(require("./content-type.enum"), exports);
@@ -2,12 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ToolSchema = void 0;
4
4
  const zod_1 = require("zod");
5
+ const enums_1 = require("../enums");
5
6
  exports.ToolSchema = zod_1.z.object({
6
7
  uuid: zod_1.z.string(),
7
8
  title: zod_1.z.string(),
8
9
  description: zod_1.z.string(),
9
10
  icon: zod_1.z.string(),
10
11
  order: zod_1.z.number(),
12
+ contentType: zod_1.z.nativeEnum(enums_1.TOOL_CONTENT_TYPE),
11
13
  createdAt: zod_1.z.date(),
12
14
  updatedAt: zod_1.z.date(),
13
15
  });
@@ -604,6 +604,11 @@ export const ERRORS = {
604
604
  message: 'Тип документа не найден',
605
605
  httpCode: 404,
606
606
  },
607
+ DOCX_EXPORT_ERROR: {
608
+ code: 'WRITER_DOCUMENT.DOCX_EXPORT_ERROR',
609
+ message: 'Произошла ошибка при экспорте документа в docx',
610
+ httpCode: 500,
611
+ },
607
612
  },
608
613
  WRITER_AI_ACTION: {
609
614
  AI_ERROR: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot-tools",
3
- "version": "0.0.47-texteditor",
3
+ "version": "0.0.49-texteditor",
4
4
  "main": "build/index.js",
5
5
  "types": "build/index.d.ts",
6
6
  "scripts": {
@@ -0,0 +1,10 @@
1
+ export enum TOOL_CONTENT_TYPE {
2
+ IMAGE_EDITOR = 'IMAGE_EDITOR',
3
+ TEXT_TO_SPEECH = 'TEXT_TO_SPEECH',
4
+ SPEECH_TO_TEXT = 'SPEECH_TO_TEXT',
5
+ REPHRASE = 'REPHRASE',
6
+ VIDEO = 'VIDEO',
7
+ PRESENTATION = 'PRESENTATION',
8
+ WRITER = 'WRITER',
9
+ NONE = 'NONE',
10
+ }
@@ -1 +1,2 @@
1
1
  export * from './job-status.enum';
2
+ export * from './content-type.enum';
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { TOOL_CONTENT_TYPE } from '../enums';
2
3
 
3
4
  export const ToolSchema = z.object({
4
5
  uuid: z.string(),
@@ -6,6 +7,7 @@ export const ToolSchema = z.object({
6
7
  description: z.string(),
7
8
  icon: z.string(),
8
9
  order: z.number(),
10
+ contentType: z.nativeEnum(TOOL_CONTENT_TYPE),
9
11
  createdAt: z.date(),
10
12
  updatedAt: z.date(),
11
13
  });