@purpleschool/gptbot-tools 0.2.6-stage-2 → 0.2.7-stage-2
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/build/image-editor/models/image-editor-job.schema.js +1 -0
- package/build/image-generation/models/image-generation-job.schema.js +1 -0
- package/build/interior-design/models/interior-design-job.schema.js +1 -0
- package/build/marketplace-card/models/marketplace-card-job.schema.js +1 -0
- package/build/tools/enums/index.js +1 -0
- package/build/tools/enums/tool-group.enum.js +12 -0
- package/build/tools/models/index.js +1 -0
- package/build/tools/models/tool-group.schema.js +11 -0
- package/build/tools/queries/find-grouped-tools.query.js +11 -0
- package/build/tools/queries/index.js +1 -0
- package/build/tools/routes/tools.aqmp.routes.js +1 -0
- package/image-editor/models/image-editor-job.schema.ts +1 -0
- package/image-generation/models/image-generation-job.schema.ts +1 -0
- package/interior-design/models/interior-design-job.schema.ts +1 -0
- package/marketplace-card/models/marketplace-card-job.schema.ts +1 -0
- package/package.json +1 -1
- package/tools/enums/index.ts +1 -0
- package/tools/enums/tool-group.enum.ts +8 -0
- package/tools/models/index.ts +1 -0
- package/tools/models/tool-group.schema.ts +11 -0
- package/tools/queries/find-grouped-tools.query.ts +11 -0
- package/tools/queries/index.ts +1 -0
- package/tools/routes/tools.aqmp.routes.ts +1 -0
|
@@ -22,6 +22,7 @@ exports.ImageEditorJobSchema = zod_1.z.object({
|
|
|
22
22
|
error: zod_1.z.string().nullable(),
|
|
23
23
|
modelId: zod_1.z.string(),
|
|
24
24
|
price: zod_1.z.number(),
|
|
25
|
+
previewUrl: zod_1.z.string().nullable(),
|
|
25
26
|
params: exports.ImageEditorJobParamsSchema,
|
|
26
27
|
imageUrls: zod_1.z.array(zod_1.z.string()).nullable(),
|
|
27
28
|
attempts: zod_1.z.array(zod_1.z.any()),
|
|
@@ -19,6 +19,7 @@ exports.ImageGenerationJobSchema = zod_1.z.object({
|
|
|
19
19
|
status: zod_1.z.nativeEnum(tools_1.JOB_STATUS),
|
|
20
20
|
error: zod_1.z.string().nullable(),
|
|
21
21
|
price: zod_1.z.number(),
|
|
22
|
+
previewUrl: zod_1.z.string().nullable(),
|
|
22
23
|
reaction: zod_1.z.nativeEnum(common_1.USER_REACTION).nullable(),
|
|
23
24
|
dislikeReason: zod_1.z.string().nullable(),
|
|
24
25
|
externalId: zod_1.z.string().nullable(),
|
|
@@ -22,6 +22,7 @@ exports.InteriorDesignJobSchema = zod_1.z.object({
|
|
|
22
22
|
internalError: zod_1.z.string().nullable().optional(),
|
|
23
23
|
modelId: zod_1.z.string(),
|
|
24
24
|
price: zod_1.z.number(),
|
|
25
|
+
previewUrl: zod_1.z.string().nullable(),
|
|
25
26
|
params: exports.InteriorDesignJobParamsSchema,
|
|
26
27
|
imageUrls: zod_1.z.array(zod_1.z.string()).nullable(),
|
|
27
28
|
attempts: zod_1.z.array(zod_1.z.any()),
|
|
@@ -22,6 +22,7 @@ exports.MarketplaceCardJobSchema = zod_1.z.object({
|
|
|
22
22
|
tokenReservationId: zod_1.z.string().nullable().optional(),
|
|
23
23
|
title: zod_1.z.string(),
|
|
24
24
|
subtitle: zod_1.z.string().nullable(),
|
|
25
|
+
previewUrl: zod_1.z.string().nullable(),
|
|
25
26
|
reaction: zod_1.z.nativeEnum(common_1.USER_REACTION).nullable(),
|
|
26
27
|
dislikeReason: zod_1.z.string().nullable(),
|
|
27
28
|
advantages: zod_1.z.array(zod_1.z.string()),
|
|
@@ -17,3 +17,4 @@ 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);
|
|
@@ -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,11 @@
|
|
|
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.RequestSchema = common_1.LocaleRequestSchema;
|
|
10
|
+
FindGroupedToolsQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(zod_1.z.array(models_1.ToolGroupSchema));
|
|
11
|
+
})(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
|
};
|
|
@@ -23,6 +23,7 @@ export const ImageEditorJobSchema = z.object({
|
|
|
23
23
|
error: z.string().nullable(),
|
|
24
24
|
modelId: z.string(),
|
|
25
25
|
price: z.number(),
|
|
26
|
+
previewUrl: z.string().nullable(),
|
|
26
27
|
params: ImageEditorJobParamsSchema,
|
|
27
28
|
imageUrls: z.array(z.string()).nullable(),
|
|
28
29
|
attempts: z.array(z.any()),
|
|
@@ -19,6 +19,7 @@ export const ImageGenerationJobSchema = z.object({
|
|
|
19
19
|
status: z.nativeEnum(JOB_STATUS),
|
|
20
20
|
error: z.string().nullable(),
|
|
21
21
|
price: z.number(),
|
|
22
|
+
previewUrl: z.string().nullable(),
|
|
22
23
|
reaction: z.nativeEnum(USER_REACTION).nullable(),
|
|
23
24
|
dislikeReason: z.string().nullable(),
|
|
24
25
|
externalId: z.string().nullable(),
|
|
@@ -23,6 +23,7 @@ export const InteriorDesignJobSchema = z.object({
|
|
|
23
23
|
internalError: z.string().nullable().optional(),
|
|
24
24
|
modelId: z.string(),
|
|
25
25
|
price: z.number(),
|
|
26
|
+
previewUrl: z.string().nullable(),
|
|
26
27
|
params: InteriorDesignJobParamsSchema,
|
|
27
28
|
imageUrls: z.array(z.string()).nullable(),
|
|
28
29
|
attempts: z.array(z.any()),
|
|
@@ -28,6 +28,7 @@ export const MarketplaceCardJobSchema = z.object({
|
|
|
28
28
|
tokenReservationId: z.string().nullable().optional(),
|
|
29
29
|
title: z.string(),
|
|
30
30
|
subtitle: z.string().nullable(),
|
|
31
|
+
previewUrl: z.string().nullable(),
|
|
31
32
|
reaction: z.nativeEnum(USER_REACTION).nullable(),
|
|
32
33
|
dislikeReason: z.string().nullable(),
|
|
33
34
|
advantages: z.array(z.string()),
|
package/package.json
CHANGED
package/tools/enums/index.ts
CHANGED
package/tools/models/index.ts
CHANGED
|
@@ -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,11 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ToolGroupSchema } from '../models';
|
|
3
|
+
import { ICommandResponseSchema, LocaleRequestSchema } from '../../common';
|
|
4
|
+
|
|
5
|
+
export namespace FindGroupedToolsQuery {
|
|
6
|
+
export const RequestSchema = LocaleRequestSchema;
|
|
7
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
8
|
+
|
|
9
|
+
export const ResponseSchema = ICommandResponseSchema(z.array(ToolGroupSchema));
|
|
10
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
11
|
+
}
|
package/tools/queries/index.ts
CHANGED
|
@@ -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
|
};
|