@purpleschool/gptbot-tools 0.2.6-stage → 0.2.7-stage

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 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./job-status.enum"), exports);
18
18
  __exportStar(require("./tool-type.enum"), exports);
19
19
  __exportStar(require("./tool-content-type.enum"), exports);
20
+ __exportStar(require("./tool-group.enum"), exports);
20
21
  __exportStar(require("./job-request-origin.enum"), exports);
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TOOL_GROUP = void 0;
4
+ var TOOL_GROUP;
5
+ (function (TOOL_GROUP) {
6
+ TOOL_GROUP["TEXT"] = "TEXT";
7
+ TOOL_GROUP["IMAGE"] = "IMAGE";
8
+ TOOL_GROUP["AUDIO"] = "AUDIO";
9
+ TOOL_GROUP["VIDEO"] = "VIDEO";
10
+ TOOL_GROUP["EDUCATION"] = "EDUCATION";
11
+ TOOL_GROUP["DESIGN"] = "DESIGN";
12
+ })(TOOL_GROUP || (exports.TOOL_GROUP = TOOL_GROUP = {}));
@@ -16,5 +16,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./tool-job.schema"), exports);
18
18
  __exportStar(require("./tool.schema"), exports);
19
+ __exportStar(require("./tool-group.schema"), exports);
19
20
  __exportStar(require("./global-tools-config.schema"), exports);
20
21
  __exportStar(require("./tools-with-configs.schema"), exports);
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ToolGroupSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const enums_1 = require("../enums");
6
+ const tool_schema_1 = require("./tool.schema");
7
+ exports.ToolGroupSchema = zod_1.z.object({
8
+ group: zod_1.z.nativeEnum(enums_1.TOOL_GROUP),
9
+ title: zod_1.z.string(),
10
+ tools: zod_1.z.array(tool_schema_1.ToolSchema),
11
+ });
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FindGroupedToolsQuery = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../models");
6
+ const common_1 = require("../../common");
7
+ var FindGroupedToolsQuery;
8
+ (function (FindGroupedToolsQuery) {
9
+ FindGroupedToolsQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(zod_1.z.array(models_1.ToolGroupSchema));
10
+ })(FindGroupedToolsQuery || (exports.FindGroupedToolsQuery = FindGroupedToolsQuery = {}));
@@ -15,5 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./find-all-tools.query"), exports);
18
+ __exportStar(require("./find-grouped-tools.query"), exports);
18
19
  __exportStar(require("./get-global-tools-config.query"), exports);
19
20
  __exportStar(require("./get-tools-with-configs.query"), exports);
@@ -5,6 +5,7 @@ exports.TOOLS_AMQP_ROUTES = {
5
5
  JOB_COMPLETED: 'tools.job.completed',
6
6
  JOB_FAILED: 'tools.job.failed',
7
7
  FIND_ALL: 'tools.find.all.rpc',
8
+ FIND_GROUPED: 'tools.find.grouped.rpc',
8
9
  GET_GLOBAL_TOOLS_CONFIG: 'tools.config.rpc',
9
10
  GET_TOOLS_WITH_CONFIGS: 'tools.with-configs.rpc',
10
11
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot-tools",
3
- "version": "0.2.6-stage",
3
+ "version": "0.2.7-stage",
4
4
  "main": "build/index.js",
5
5
  "types": "build/index.d.ts",
6
6
  "scripts": {
@@ -1,4 +1,5 @@
1
1
  export * from './job-status.enum';
2
2
  export * from './tool-type.enum';
3
3
  export * from './tool-content-type.enum';
4
+ export * from './tool-group.enum';
4
5
  export * from './job-request-origin.enum';
@@ -0,0 +1,8 @@
1
+ export enum TOOL_GROUP {
2
+ TEXT = 'TEXT',
3
+ IMAGE = 'IMAGE',
4
+ AUDIO = 'AUDIO',
5
+ VIDEO = 'VIDEO',
6
+ EDUCATION = 'EDUCATION',
7
+ DESIGN = 'DESIGN',
8
+ }
@@ -1,4 +1,5 @@
1
1
  export * from './tool-job.schema';
2
2
  export * from './tool.schema';
3
+ export * from './tool-group.schema';
3
4
  export * from './global-tools-config.schema';
4
5
  export * from './tools-with-configs.schema';
@@ -0,0 +1,11 @@
1
+ import { z } from 'zod';
2
+ import { TOOL_GROUP } from '../enums';
3
+ import { ToolSchema } from './tool.schema';
4
+
5
+ export const ToolGroupSchema = z.object({
6
+ group: z.nativeEnum(TOOL_GROUP),
7
+ title: z.string(),
8
+ tools: z.array(ToolSchema),
9
+ });
10
+
11
+ export type ToolGroup = z.infer<typeof ToolGroupSchema>;
@@ -0,0 +1,8 @@
1
+ import { z } from 'zod';
2
+ import { ToolGroupSchema } from '../models';
3
+ import { ICommandResponseSchema } from '../../common';
4
+
5
+ export namespace FindGroupedToolsQuery {
6
+ export const ResponseSchema = ICommandResponseSchema(z.array(ToolGroupSchema));
7
+ export type Response = z.infer<typeof ResponseSchema>;
8
+ }
@@ -1,3 +1,4 @@
1
1
  export * from './find-all-tools.query';
2
+ export * from './find-grouped-tools.query';
2
3
  export * from './get-global-tools-config.query';
3
4
  export * from './get-tools-with-configs.query';
@@ -2,6 +2,7 @@ export const TOOLS_AMQP_ROUTES = {
2
2
  JOB_COMPLETED: 'tools.job.completed',
3
3
  JOB_FAILED: 'tools.job.failed',
4
4
  FIND_ALL: 'tools.find.all.rpc',
5
+ FIND_GROUPED: 'tools.find.grouped.rpc',
5
6
  GET_GLOBAL_TOOLS_CONFIG: 'tools.config.rpc',
6
7
  GET_TOOLS_WITH_CONFIGS: 'tools.with-configs.rpc',
7
8
  };