@purpleschool/gptbot-tools 0.1.4 → 0.1.5
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/tools/enums/tool-content-type.enum.js +1 -0
- package/build/tools/models/global-tools-config.schema.js +2 -0
- package/build/tools/models/tools-with-configs.schema.js +5 -0
- package/package.json +1 -1
- package/tools/enums/tool-content-type.enum.ts +1 -0
- package/tools/models/global-tools-config.schema.ts +2 -0
- package/tools/models/tools-with-configs.schema.ts +7 -0
|
@@ -17,4 +17,5 @@ var TOOL_CONTENT_TYPE;
|
|
|
17
17
|
TOOL_CONTENT_TYPE["NONE"] = "NONE";
|
|
18
18
|
TOOL_CONTENT_TYPE["MARKETPLACE_CARD_GENERATION"] = "MARKETPLACE_CARD";
|
|
19
19
|
TOOL_CONTENT_TYPE["SOLVING_EDU_TASK"] = "SOLVING_EDU_TASK";
|
|
20
|
+
TOOL_CONTENT_TYPE["SPELL_CORRECTOR"] = "SPELL_CORRECTOR";
|
|
20
21
|
})(TOOL_CONTENT_TYPE || (exports.TOOL_CONTENT_TYPE = TOOL_CONTENT_TYPE = {}));
|
|
@@ -16,6 +16,7 @@ const stt_1 = require("../../stt");
|
|
|
16
16
|
const models_1 = require("../../marketplace-card/models");
|
|
17
17
|
const interior_design_1 = require("../../interior-design");
|
|
18
18
|
const solving_edu_task_1 = require("../../solving-edu-task");
|
|
19
|
+
const spell_corrector_1 = require("../../spell-corrector");
|
|
19
20
|
exports.GlobalToolsConfigSchema = zod_1.z.object({
|
|
20
21
|
[enums_1.TOOL_CONTENT_TYPE.VIDEO]: video_1.VideoConfigSchema,
|
|
21
22
|
[enums_1.TOOL_CONTENT_TYPE.MUSIC]: music_1.MusicConfigSchema,
|
|
@@ -30,4 +31,5 @@ exports.GlobalToolsConfigSchema = zod_1.z.object({
|
|
|
30
31
|
[enums_1.TOOL_CONTENT_TYPE.MARKETPLACE_CARD_GENERATION]: models_1.MarketplaceCardConfigSchema,
|
|
31
32
|
[enums_1.TOOL_CONTENT_TYPE.INTERIOR_DESIGN]: interior_design_1.InteriorDesignConfigSchema,
|
|
32
33
|
[enums_1.TOOL_CONTENT_TYPE.SOLVING_EDU_TASK]: solving_edu_task_1.SolvingEduTaskConfigSchema,
|
|
34
|
+
[enums_1.TOOL_CONTENT_TYPE.SPELL_CORRECTOR]: spell_corrector_1.SpellCorrectorToolConfigSchema,
|
|
33
35
|
});
|
|
@@ -17,6 +17,7 @@ const models_1 = require("../../marketplace-card/models");
|
|
|
17
17
|
const tool_schema_1 = require("./tool.schema");
|
|
18
18
|
const interior_design_1 = require("../../interior-design");
|
|
19
19
|
const solving_edu_task_1 = require("../../solving-edu-task");
|
|
20
|
+
const spell_corrector_1 = require("../../spell-corrector");
|
|
20
21
|
// Discriminated union array: Tools with their configs
|
|
21
22
|
exports.ToolWithConfigSchema = zod_1.z.discriminatedUnion('contentType', [
|
|
22
23
|
tool_schema_1.ToolSchema.merge(zod_1.z.object({
|
|
@@ -71,5 +72,9 @@ exports.ToolWithConfigSchema = zod_1.z.discriminatedUnion('contentType', [
|
|
|
71
72
|
contentType: zod_1.z.literal(enums_1.TOOL_CONTENT_TYPE.SOLVING_EDU_TASK),
|
|
72
73
|
config: solving_edu_task_1.SolvingEduTaskConfigSchema,
|
|
73
74
|
})),
|
|
75
|
+
tool_schema_1.ToolSchema.merge(zod_1.z.object({
|
|
76
|
+
contentType: zod_1.z.literal(enums_1.TOOL_CONTENT_TYPE.SPELL_CORRECTOR),
|
|
77
|
+
config: spell_corrector_1.SpellCorrectorToolConfigSchema,
|
|
78
|
+
})),
|
|
74
79
|
]);
|
|
75
80
|
exports.ToolsWithConfigsSchema = zod_1.z.array(exports.ToolWithConfigSchema);
|
package/package.json
CHANGED
|
@@ -13,6 +13,7 @@ import { STTConfigSchema } from '../../stt';
|
|
|
13
13
|
import { MarketplaceCardConfigSchema } from '../../marketplace-card/models';
|
|
14
14
|
import { InteriorDesignConfigSchema } from '../../interior-design';
|
|
15
15
|
import { SolvingEduTaskConfigSchema } from '../../solving-edu-task';
|
|
16
|
+
import { SpellCorrectorToolConfigSchema } from '../../spell-corrector';
|
|
16
17
|
|
|
17
18
|
export const GlobalToolsConfigSchema = z.object({
|
|
18
19
|
[TOOL_CONTENT_TYPE.VIDEO]: VideoConfigSchema,
|
|
@@ -28,6 +29,7 @@ export const GlobalToolsConfigSchema = z.object({
|
|
|
28
29
|
[TOOL_CONTENT_TYPE.MARKETPLACE_CARD_GENERATION]: MarketplaceCardConfigSchema,
|
|
29
30
|
[TOOL_CONTENT_TYPE.INTERIOR_DESIGN]: InteriorDesignConfigSchema,
|
|
30
31
|
[TOOL_CONTENT_TYPE.SOLVING_EDU_TASK]: SolvingEduTaskConfigSchema,
|
|
32
|
+
[TOOL_CONTENT_TYPE.SPELL_CORRECTOR]: SpellCorrectorToolConfigSchema,
|
|
31
33
|
});
|
|
32
34
|
|
|
33
35
|
export type GlobalToolsConfig = z.infer<typeof GlobalToolsConfigSchema>;
|
|
@@ -14,6 +14,7 @@ import { MarketplaceCardConfigSchema } from '../../marketplace-card/models';
|
|
|
14
14
|
import { ToolSchema } from './tool.schema';
|
|
15
15
|
import { InteriorDesignConfigSchema } from '../../interior-design';
|
|
16
16
|
import { SolvingEduTaskConfigSchema } from '../../solving-edu-task';
|
|
17
|
+
import { SpellCorrectorToolConfigSchema } from '../../spell-corrector';
|
|
17
18
|
|
|
18
19
|
// Discriminated union array: Tools with their configs
|
|
19
20
|
export const ToolWithConfigSchema = z.discriminatedUnion('contentType', [
|
|
@@ -95,6 +96,12 @@ export const ToolWithConfigSchema = z.discriminatedUnion('contentType', [
|
|
|
95
96
|
config: SolvingEduTaskConfigSchema,
|
|
96
97
|
}),
|
|
97
98
|
),
|
|
99
|
+
ToolSchema.merge(
|
|
100
|
+
z.object({
|
|
101
|
+
contentType: z.literal(TOOL_CONTENT_TYPE.SPELL_CORRECTOR),
|
|
102
|
+
config: SpellCorrectorToolConfigSchema,
|
|
103
|
+
}),
|
|
104
|
+
),
|
|
98
105
|
]);
|
|
99
106
|
|
|
100
107
|
export type ToolWithConfig = z.infer<typeof ToolWithConfigSchema>;
|