@purpleschool/gptbot-tools 0.0.11 → 0.0.12

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.
@@ -14,4 +14,4 @@ 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("./reasoning-effoert.enum"), exports);
17
+ __exportStar(require("./reasoning-effort.enum"), exports);
@@ -4,6 +4,14 @@ exports.ERRORS = void 0;
4
4
  exports.ERRORS = {
5
5
  // INTERNAL
6
6
  INTERNAL_SERVER_ERROR: { code: 'A001', message: 'Ошибка севера', httpCode: 500 },
7
+ // TOOLS
8
+ TOOL: {
9
+ FIND_ERROR: {
10
+ code: 'TOOL.FIND_ERROR',
11
+ message: 'Произошла ошибка при поиске инструмента',
12
+ httpCode: 500,
13
+ },
14
+ },
7
15
  // PARAPHRASE
8
16
  PARAPHRASE: {
9
17
  INTERNAL_ERROR: {
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./enums"), exports);
18
18
  __exportStar(require("./events"), exports);
19
19
  __exportStar(require("./models"), exports);
20
+ __exportStar(require("./queries"), exports);
20
21
  __exportStar(require("./routes"), exports);
@@ -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("./tool-job.schema"), exports);
18
+ __exportStar(require("./tool.schema"), exports);
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ToolSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.ToolSchema = zod_1.z.object({
6
+ uuid: zod_1.z.string(),
7
+ title: zod_1.z.string(),
8
+ icon: zod_1.z.string(),
9
+ createdAt: zod_1.z.date(),
10
+ updatedAt: zod_1.z.date(),
11
+ });
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FindAllToolsQuery = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../models");
6
+ const common_1 = require("../../common");
7
+ var FindAllToolsQuery;
8
+ (function (FindAllToolsQuery) {
9
+ FindAllToolsQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(zod_1.z.array(models_1.ToolSchema));
10
+ })(FindAllToolsQuery || (exports.FindAllToolsQuery = FindAllToolsQuery = {}));
@@ -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("./find-all-tools.query"), exports);
@@ -3,5 +3,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TOOLS_AQMP_ROUTES = void 0;
4
4
  exports.TOOLS_AQMP_ROUTES = {
5
5
  JOB_COMPLETED: 'tools.job.completed',
6
- JOB_FAILED: 'tools.job.failed',
6
+ FIND_ALL: 'tools.find.all.rpc',
7
7
  };
@@ -1 +1 @@
1
- export * from './reasoning-effoert.enum';
1
+ export * from './reasoning-effort.enum';
@@ -2,6 +2,15 @@ export const ERRORS = {
2
2
  // INTERNAL
3
3
  INTERNAL_SERVER_ERROR: { code: 'A001', message: 'Ошибка севера', httpCode: 500 },
4
4
 
5
+ // TOOLS
6
+ TOOL: {
7
+ FIND_ERROR: {
8
+ code: 'TOOL.FIND_ERROR',
9
+ message: 'Произошла ошибка при поиске инструмента',
10
+ httpCode: 500,
11
+ },
12
+ },
13
+
5
14
  // PARAPHRASE
6
15
  PARAPHRASE: {
7
16
  INTERNAL_ERROR: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot-tools",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
4
4
  "main": "build/index.js",
5
5
  "types": "build/index.d.ts",
6
6
  "scripts": {
package/tools/index.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './enums';
2
2
  export * from './events';
3
3
  export * from './models';
4
+ export * from './queries';
4
5
  export * from './routes';
@@ -1 +1,2 @@
1
1
  export * from './tool-job.schema';
2
+ export * from './tool.schema';
@@ -0,0 +1,9 @@
1
+ import { z } from 'zod';
2
+
3
+ export const ToolSchema = z.object({
4
+ uuid: z.string(),
5
+ title: z.string(),
6
+ icon: z.string(),
7
+ createdAt: z.date(),
8
+ updatedAt: z.date(),
9
+ });
@@ -0,0 +1,8 @@
1
+ import { z } from 'zod';
2
+ import { ToolSchema } from '../models';
3
+ import { ICommandResponseSchema } from '../../common';
4
+
5
+ export namespace FindAllToolsQuery {
6
+ export const ResponseSchema = ICommandResponseSchema(z.array(ToolSchema));
7
+ export type Response = z.infer<typeof ResponseSchema>;
8
+ }
@@ -0,0 +1 @@
1
+ export * from './find-all-tools.query';
@@ -1,4 +1,4 @@
1
1
  export const TOOLS_AQMP_ROUTES = {
2
2
  JOB_COMPLETED: 'tools.job.completed',
3
- JOB_FAILED: 'tools.job.failed',
3
+ FIND_ALL: 'tools.find.all.rpc',
4
4
  };