@purpleschool/gptbot-tools 0.1.3 → 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.
@@ -16,4 +16,6 @@ var TOOL_CONTENT_TYPE;
16
16
  TOOL_CONTENT_TYPE["INTERIOR_DESIGN"] = "INTERIOR_DESIGN";
17
17
  TOOL_CONTENT_TYPE["NONE"] = "NONE";
18
18
  TOOL_CONTENT_TYPE["MARKETPLACE_CARD_GENERATION"] = "MARKETPLACE_CARD";
19
+ TOOL_CONTENT_TYPE["SOLVING_EDU_TASK"] = "SOLVING_EDU_TASK";
20
+ TOOL_CONTENT_TYPE["SPELL_CORRECTOR"] = "SPELL_CORRECTOR";
19
21
  })(TOOL_CONTENT_TYPE || (exports.TOOL_CONTENT_TYPE = TOOL_CONTENT_TYPE = {}));
@@ -19,4 +19,5 @@ var TOOL_TYPE;
19
19
  TOOL_TYPE["MARKETPLACE_CARD_GENERATION"] = "MARKETPLACE_CARD_GENERATION";
20
20
  TOOL_TYPE["INTERIOR_DESIGN"] = "INTERIOR_DESIGN";
21
21
  TOOL_TYPE["SPELL_CORRECTOR"] = "SPELL_CORRECTOR";
22
+ TOOL_TYPE["SOLVING_EDU_TASK"] = "SOLVING_EDU_TASK";
22
23
  })(TOOL_TYPE || (exports.TOOL_TYPE = TOOL_TYPE = {}));
@@ -15,6 +15,8 @@ const tts_1 = require("../../tts");
15
15
  const stt_1 = require("../../stt");
16
16
  const models_1 = require("../../marketplace-card/models");
17
17
  const interior_design_1 = require("../../interior-design");
18
+ const solving_edu_task_1 = require("../../solving-edu-task");
19
+ const spell_corrector_1 = require("../../spell-corrector");
18
20
  exports.GlobalToolsConfigSchema = zod_1.z.object({
19
21
  [enums_1.TOOL_CONTENT_TYPE.VIDEO]: video_1.VideoConfigSchema,
20
22
  [enums_1.TOOL_CONTENT_TYPE.MUSIC]: music_1.MusicConfigSchema,
@@ -28,4 +30,6 @@ exports.GlobalToolsConfigSchema = zod_1.z.object({
28
30
  [enums_1.TOOL_CONTENT_TYPE.SPEECH_TO_TEXT]: stt_1.STTConfigSchema,
29
31
  [enums_1.TOOL_CONTENT_TYPE.MARKETPLACE_CARD_GENERATION]: models_1.MarketplaceCardConfigSchema,
30
32
  [enums_1.TOOL_CONTENT_TYPE.INTERIOR_DESIGN]: interior_design_1.InteriorDesignConfigSchema,
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,
31
35
  });
@@ -16,6 +16,8 @@ const stt_1 = require("../../stt");
16
16
  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
+ const solving_edu_task_1 = require("../../solving-edu-task");
20
+ const spell_corrector_1 = require("../../spell-corrector");
19
21
  // Discriminated union array: Tools with their configs
20
22
  exports.ToolWithConfigSchema = zod_1.z.discriminatedUnion('contentType', [
21
23
  tool_schema_1.ToolSchema.merge(zod_1.z.object({
@@ -66,5 +68,13 @@ exports.ToolWithConfigSchema = zod_1.z.discriminatedUnion('contentType', [
66
68
  contentType: zod_1.z.literal(enums_1.TOOL_CONTENT_TYPE.INTERIOR_DESIGN),
67
69
  config: interior_design_1.InteriorDesignConfigSchema,
68
70
  })),
71
+ tool_schema_1.ToolSchema.merge(zod_1.z.object({
72
+ contentType: zod_1.z.literal(enums_1.TOOL_CONTENT_TYPE.SOLVING_EDU_TASK),
73
+ config: solving_edu_task_1.SolvingEduTaskConfigSchema,
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
+ })),
69
79
  ]);
70
80
  exports.ToolsWithConfigsSchema = zod_1.z.array(exports.ToolWithConfigSchema);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot-tools",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "main": "build/index.js",
5
5
  "types": "build/index.d.ts",
6
6
  "scripts": {
@@ -12,4 +12,6 @@ export enum TOOL_CONTENT_TYPE {
12
12
  INTERIOR_DESIGN = 'INTERIOR_DESIGN',
13
13
  NONE = 'NONE',
14
14
  MARKETPLACE_CARD_GENERATION = 'MARKETPLACE_CARD',
15
+ SOLVING_EDU_TASK = 'SOLVING_EDU_TASK',
16
+ SPELL_CORRECTOR = 'SPELL_CORRECTOR',
15
17
  }
@@ -15,4 +15,5 @@ export enum TOOL_TYPE {
15
15
  MARKETPLACE_CARD_GENERATION = 'MARKETPLACE_CARD_GENERATION',
16
16
  INTERIOR_DESIGN = 'INTERIOR_DESIGN',
17
17
  SPELL_CORRECTOR = 'SPELL_CORRECTOR',
18
+ SOLVING_EDU_TASK = 'SOLVING_EDU_TASK',
18
19
  }
@@ -12,6 +12,8 @@ import { TTSConfigSchema } from '../../tts';
12
12
  import { STTConfigSchema } from '../../stt';
13
13
  import { MarketplaceCardConfigSchema } from '../../marketplace-card/models';
14
14
  import { InteriorDesignConfigSchema } from '../../interior-design';
15
+ import { SolvingEduTaskConfigSchema } from '../../solving-edu-task';
16
+ import { SpellCorrectorToolConfigSchema } from '../../spell-corrector';
15
17
 
16
18
  export const GlobalToolsConfigSchema = z.object({
17
19
  [TOOL_CONTENT_TYPE.VIDEO]: VideoConfigSchema,
@@ -26,6 +28,8 @@ export const GlobalToolsConfigSchema = z.object({
26
28
  [TOOL_CONTENT_TYPE.SPEECH_TO_TEXT]: STTConfigSchema,
27
29
  [TOOL_CONTENT_TYPE.MARKETPLACE_CARD_GENERATION]: MarketplaceCardConfigSchema,
28
30
  [TOOL_CONTENT_TYPE.INTERIOR_DESIGN]: InteriorDesignConfigSchema,
31
+ [TOOL_CONTENT_TYPE.SOLVING_EDU_TASK]: SolvingEduTaskConfigSchema,
32
+ [TOOL_CONTENT_TYPE.SPELL_CORRECTOR]: SpellCorrectorToolConfigSchema,
29
33
  });
30
34
 
31
35
  export type GlobalToolsConfig = z.infer<typeof GlobalToolsConfigSchema>;
@@ -13,6 +13,8 @@ import { STTConfigSchema } from '../../stt';
13
13
  import { MarketplaceCardConfigSchema } from '../../marketplace-card/models';
14
14
  import { ToolSchema } from './tool.schema';
15
15
  import { InteriorDesignConfigSchema } from '../../interior-design';
16
+ import { SolvingEduTaskConfigSchema } from '../../solving-edu-task';
17
+ import { SpellCorrectorToolConfigSchema } from '../../spell-corrector';
16
18
 
17
19
  // Discriminated union array: Tools with their configs
18
20
  export const ToolWithConfigSchema = z.discriminatedUnion('contentType', [
@@ -88,6 +90,18 @@ export const ToolWithConfigSchema = z.discriminatedUnion('contentType', [
88
90
  config: InteriorDesignConfigSchema,
89
91
  }),
90
92
  ),
93
+ ToolSchema.merge(
94
+ z.object({
95
+ contentType: z.literal(TOOL_CONTENT_TYPE.SOLVING_EDU_TASK),
96
+ config: SolvingEduTaskConfigSchema,
97
+ }),
98
+ ),
99
+ ToolSchema.merge(
100
+ z.object({
101
+ contentType: z.literal(TOOL_CONTENT_TYPE.SPELL_CORRECTOR),
102
+ config: SpellCorrectorToolConfigSchema,
103
+ }),
104
+ ),
91
105
  ]);
92
106
 
93
107
  export type ToolWithConfig = z.infer<typeof ToolWithConfigSchema>;