@purpleschool/gptbot 0.12.29 → 0.12.31
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.
- package/api/controllers/http/tool.ts +1 -0
- package/api/routes.ts +1 -0
- package/build/api/controllers/http/tool.js +1 -0
- package/build/api/routes.js +1 -0
- package/build/commands/tools/tool/find-grouped-tools.command.js +11 -0
- package/build/commands/tools/tool/index.js +1 -0
- package/build/commands/unregistered-user/create-unregistered-user.command.js +1 -0
- package/build/constants/tool/enums/index.js +1 -0
- package/build/constants/tool/enums/tool-group.enum.js +12 -0
- package/build/models/index.js +1 -0
- package/build/models/tool-group.schema.js +11 -0
- package/commands/tools/tool/find-grouped-tools.command.ts +12 -0
- package/commands/tools/tool/index.ts +1 -0
- package/commands/unregistered-user/create-unregistered-user.command.ts +1 -0
- package/constants/tool/enums/index.ts +1 -0
- package/constants/tool/enums/tool-group.enum.ts +8 -0
- package/models/index.ts +1 -0
- package/models/tool-group.schema.ts +11 -0
- package/package.json +1 -1
package/api/routes.ts
CHANGED
|
@@ -394,6 +394,7 @@ export const REST_API = {
|
|
|
394
394
|
TOOL: {
|
|
395
395
|
FIND_ALL: `${ROOT}/${CONTROLLERS.TOOL_CONTROLLER}/${CONTROLLERS.TOOL_ROUTES.FIND_ALL}`,
|
|
396
396
|
GET_FORMATTED: `${ROOT}/${CONTROLLERS.TOOL_CONTROLLER}/${CONTROLLERS.TOOL_ROUTES.GET_FORMATTED}`,
|
|
397
|
+
GROUP_ALL: `${ROOT}/${CONTROLLERS.TOOL_CONTROLLER}/${CONTROLLERS.TOOL_ROUTES.GROUP_ALL}`,
|
|
397
398
|
},
|
|
398
399
|
TOOL_JOB_PRIVATE: {
|
|
399
400
|
FIND_BY_UUID: (uuid: string) =>
|
package/build/api/routes.js
CHANGED
|
@@ -349,6 +349,7 @@ exports.REST_API = {
|
|
|
349
349
|
TOOL: {
|
|
350
350
|
FIND_ALL: `${exports.ROOT}/${CONTROLLERS.TOOL_CONTROLLER}/${CONTROLLERS.TOOL_ROUTES.FIND_ALL}`,
|
|
351
351
|
GET_FORMATTED: `${exports.ROOT}/${CONTROLLERS.TOOL_CONTROLLER}/${CONTROLLERS.TOOL_ROUTES.GET_FORMATTED}`,
|
|
352
|
+
GROUP_ALL: `${exports.ROOT}/${CONTROLLERS.TOOL_CONTROLLER}/${CONTROLLERS.TOOL_ROUTES.GROUP_ALL}`,
|
|
352
353
|
},
|
|
353
354
|
TOOL_JOB_PRIVATE: {
|
|
354
355
|
FIND_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.TOOL_JOB_CONTROLLER_PRIVATE}/${CONTROLLERS.TOOL_JOB_ROUTES.FIND_BY_UUID(uuid)}`,
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FindGroupedToolsCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
|
+
var FindGroupedToolsCommand;
|
|
7
|
+
(function (FindGroupedToolsCommand) {
|
|
8
|
+
FindGroupedToolsCommand.ResponseSchema = zod_1.z.object({
|
|
9
|
+
data: zod_1.z.array(models_1.ToolGroupSchema),
|
|
10
|
+
});
|
|
11
|
+
})(FindGroupedToolsCommand || (exports.FindGroupedToolsCommand = FindGroupedToolsCommand = {}));
|
|
@@ -15,4 +15,5 @@ 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.command"), exports);
|
|
18
|
+
__exportStar(require("./find-grouped-tools.command"), exports);
|
|
18
19
|
__exportStar(require("./find-formatted-tools.command"), exports);
|
|
@@ -7,6 +7,7 @@ var UnregisteredUserCommand;
|
|
|
7
7
|
UnregisteredUserCommand.ResponseSchema = zod_1.z.object({
|
|
8
8
|
data: zod_1.z.object({
|
|
9
9
|
accessToken: zod_1.z.string(),
|
|
10
|
+
uuid: zod_1.z.string(),
|
|
10
11
|
}),
|
|
11
12
|
});
|
|
12
13
|
})(UnregisteredUserCommand || (exports.UnregisteredUserCommand = UnregisteredUserCommand = {}));
|
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./tool-content-type.enum"), exports);
|
|
18
|
+
__exportStar(require("./tool-group.enum"), exports);
|
|
18
19
|
__exportStar(require("./tool-job-status.enum"), exports);
|
|
19
20
|
__exportStar(require("./job-request-origin.enum"), exports);
|
|
20
21
|
__exportStar(require("./tool-type.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 = {}));
|
package/build/models/index.js
CHANGED
|
@@ -51,6 +51,7 @@ __exportStar(require("./subscription-upgrade-schema"), exports);
|
|
|
51
51
|
__exportStar(require("./subscription.schema"), exports);
|
|
52
52
|
__exportStar(require("./telegram-user-data.schema"), exports);
|
|
53
53
|
__exportStar(require("./tool-job.schema"), exports);
|
|
54
|
+
__exportStar(require("./tool-group.schema"), exports);
|
|
54
55
|
__exportStar(require("./tool.schema"), exports);
|
|
55
56
|
__exportStar(require("./unlocked-by-subscription.schema"), exports);
|
|
56
57
|
__exportStar(require("./unregistered-user.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 constants_1 = require("../constants");
|
|
6
|
+
const tool_schema_1 = require("./tool.schema");
|
|
7
|
+
exports.ToolGroupSchema = zod_1.z.object({
|
|
8
|
+
group: zod_1.z.nativeEnum(constants_1.TOOL_GROUP),
|
|
9
|
+
title: zod_1.z.string(),
|
|
10
|
+
tools: zod_1.z.array(tool_schema_1.ToolSchema),
|
|
11
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ToolGroupSchema } from '../../../models';
|
|
3
|
+
|
|
4
|
+
export namespace FindGroupedToolsCommand {
|
|
5
|
+
export type Request = void;
|
|
6
|
+
|
|
7
|
+
export const ResponseSchema = z.object({
|
|
8
|
+
data: z.array(ToolGroupSchema),
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
12
|
+
}
|
package/models/index.ts
CHANGED
|
@@ -35,6 +35,7 @@ export * from './subscription-upgrade-schema';
|
|
|
35
35
|
export * from './subscription.schema';
|
|
36
36
|
export * from './telegram-user-data.schema';
|
|
37
37
|
export * from './tool-job.schema';
|
|
38
|
+
export * from './tool-group.schema';
|
|
38
39
|
export * from './tool.schema';
|
|
39
40
|
export * from './unlocked-by-subscription.schema';
|
|
40
41
|
export * from './unregistered-user.schema';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { TOOL_GROUP } from '../constants';
|
|
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>;
|