@purpleschool/gptbot-tools 0.1.3 → 0.1.4

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,5 @@ 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";
19
20
  })(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,7 @@ 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");
18
19
  exports.GlobalToolsConfigSchema = zod_1.z.object({
19
20
  [enums_1.TOOL_CONTENT_TYPE.VIDEO]: video_1.VideoConfigSchema,
20
21
  [enums_1.TOOL_CONTENT_TYPE.MUSIC]: music_1.MusicConfigSchema,
@@ -28,4 +29,5 @@ exports.GlobalToolsConfigSchema = zod_1.z.object({
28
29
  [enums_1.TOOL_CONTENT_TYPE.SPEECH_TO_TEXT]: stt_1.STTConfigSchema,
29
30
  [enums_1.TOOL_CONTENT_TYPE.MARKETPLACE_CARD_GENERATION]: models_1.MarketplaceCardConfigSchema,
30
31
  [enums_1.TOOL_CONTENT_TYPE.INTERIOR_DESIGN]: interior_design_1.InteriorDesignConfigSchema,
32
+ [enums_1.TOOL_CONTENT_TYPE.SOLVING_EDU_TASK]: solving_edu_task_1.SolvingEduTaskConfigSchema,
31
33
  });
@@ -16,6 +16,7 @@ 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");
19
20
  // Discriminated union array: Tools with their configs
20
21
  exports.ToolWithConfigSchema = zod_1.z.discriminatedUnion('contentType', [
21
22
  tool_schema_1.ToolSchema.merge(zod_1.z.object({
@@ -66,5 +67,9 @@ exports.ToolWithConfigSchema = zod_1.z.discriminatedUnion('contentType', [
66
67
  contentType: zod_1.z.literal(enums_1.TOOL_CONTENT_TYPE.INTERIOR_DESIGN),
67
68
  config: interior_design_1.InteriorDesignConfigSchema,
68
69
  })),
70
+ tool_schema_1.ToolSchema.merge(zod_1.z.object({
71
+ contentType: zod_1.z.literal(enums_1.TOOL_CONTENT_TYPE.SOLVING_EDU_TASK),
72
+ config: solving_edu_task_1.SolvingEduTaskConfigSchema,
73
+ })),
69
74
  ]);
70
75
  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.4",
4
4
  "main": "build/index.js",
5
5
  "types": "build/index.d.ts",
6
6
  "scripts": {
@@ -12,4 +12,5 @@ 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',
15
16
  }
@@ -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,7 @@ 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';
15
16
 
16
17
  export const GlobalToolsConfigSchema = z.object({
17
18
  [TOOL_CONTENT_TYPE.VIDEO]: VideoConfigSchema,
@@ -26,6 +27,7 @@ export const GlobalToolsConfigSchema = z.object({
26
27
  [TOOL_CONTENT_TYPE.SPEECH_TO_TEXT]: STTConfigSchema,
27
28
  [TOOL_CONTENT_TYPE.MARKETPLACE_CARD_GENERATION]: MarketplaceCardConfigSchema,
28
29
  [TOOL_CONTENT_TYPE.INTERIOR_DESIGN]: InteriorDesignConfigSchema,
30
+ [TOOL_CONTENT_TYPE.SOLVING_EDU_TASK]: SolvingEduTaskConfigSchema,
29
31
  });
30
32
 
31
33
  export type GlobalToolsConfig = z.infer<typeof GlobalToolsConfigSchema>;
@@ -13,6 +13,7 @@ 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';
16
17
 
17
18
  // Discriminated union array: Tools with their configs
18
19
  export const ToolWithConfigSchema = z.discriminatedUnion('contentType', [
@@ -88,6 +89,12 @@ export const ToolWithConfigSchema = z.discriminatedUnion('contentType', [
88
89
  config: InteriorDesignConfigSchema,
89
90
  }),
90
91
  ),
92
+ ToolSchema.merge(
93
+ z.object({
94
+ contentType: z.literal(TOOL_CONTENT_TYPE.SOLVING_EDU_TASK),
95
+ config: SolvingEduTaskConfigSchema,
96
+ }),
97
+ ),
91
98
  ]);
92
99
 
93
100
  export type ToolWithConfig = z.infer<typeof ToolWithConfigSchema>;