@purpleschool/gptbot-tools 0.2.1-stage → 0.2.2-stage

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.
@@ -5,11 +5,18 @@ const zod_1 = require("zod");
5
5
  const command_response_schema_1 = require("../../common/models/command-response.schema");
6
6
  const models_1 = require("../models");
7
7
  const common_1 = require("../../common");
8
+ const tool_workspace_1 = require("../../tool-workspace");
9
+ const tools_1 = require("../../tools");
8
10
  var ImageEditorCommand;
9
11
  (function (ImageEditorCommand) {
10
12
  ImageEditorCommand.RequestSchema = zod_1.z.object({
11
13
  userId: zod_1.z.string().uuid().nullable().optional(),
12
14
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
15
+ workspaceId: zod_1.z.string().uuid().nullable().optional(),
16
+ workspaceItemId: zod_1.z.string().uuid().nullable().optional(),
17
+ workspaceToolType: zod_1.z.nativeEnum(tools_1.TOOL_CONTENT_TYPE).nullable().optional(),
18
+ workspaceSlot: zod_1.z.nativeEnum(tool_workspace_1.TOOL_WORKSPACE_ITEM_SLOT).optional(),
19
+ workspaceOrder: zod_1.z.number().int().min(0).optional(),
13
20
  prompt: zod_1.z.string(),
14
21
  modelId: zod_1.z.string(),
15
22
  params: zod_1.z.object({
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ToolWorkspaceJobSchema = void 0;
4
4
  const zod_1 = require("zod");
5
+ const image_editor_1 = require("../../image-editor");
5
6
  const marketplace_card_1 = require("../../marketplace-card");
6
7
  const tools_1 = require("../../tools");
7
8
  const video_1 = require("../../video");
@@ -10,6 +11,10 @@ exports.ToolWorkspaceJobSchema = zod_1.z.discriminatedUnion('type', [
10
11
  type: zod_1.z.literal(tools_1.TOOL_TYPE.MARKETPLACE_CARD_GENERATION),
11
12
  job: marketplace_card_1.MarketplaceCardJobSchema,
12
13
  }),
14
+ zod_1.z.object({
15
+ type: zod_1.z.literal(tools_1.TOOL_TYPE.IMAGE),
16
+ job: image_editor_1.ImageEditorJobSchema,
17
+ }),
13
18
  zod_1.z.object({
14
19
  type: zod_1.z.literal(tools_1.TOOL_TYPE.VIDEO),
15
20
  job: video_1.VideoJobSchema,
@@ -2,11 +2,18 @@ import { z } from 'zod';
2
2
  import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
3
  import { ImageEditorJobSchema } from '../models';
4
4
  import { AttachedFileSchema } from '../../common';
5
+ import { TOOL_WORKSPACE_ITEM_SLOT } from '../../tool-workspace';
6
+ import { TOOL_CONTENT_TYPE } from '../../tools';
5
7
 
6
8
  export namespace ImageEditorCommand {
7
9
  export const RequestSchema = z.object({
8
10
  userId: z.string().uuid().nullable().optional(),
9
11
  unregisteredUserId: z.string().uuid().nullable().optional(),
12
+ workspaceId: z.string().uuid().nullable().optional(),
13
+ workspaceItemId: z.string().uuid().nullable().optional(),
14
+ workspaceToolType: z.nativeEnum(TOOL_CONTENT_TYPE).nullable().optional(),
15
+ workspaceSlot: z.nativeEnum(TOOL_WORKSPACE_ITEM_SLOT).optional(),
16
+ workspaceOrder: z.number().int().min(0).optional(),
10
17
  prompt: z.string(),
11
18
  modelId: z.string(),
12
19
  params: z.object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot-tools",
3
- "version": "0.2.1-stage",
3
+ "version": "0.2.2-stage",
4
4
  "main": "build/index.js",
5
5
  "types": "build/index.d.ts",
6
6
  "scripts": {
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { ImageEditorJobSchema } from '../../image-editor';
2
3
  import { MarketplaceCardJobSchema } from '../../marketplace-card';
3
4
  import { TOOL_TYPE } from '../../tools';
4
5
  import { VideoJobSchema } from '../../video';
@@ -8,6 +9,10 @@ export const ToolWorkspaceJobSchema = z.discriminatedUnion('type', [
8
9
  type: z.literal(TOOL_TYPE.MARKETPLACE_CARD_GENERATION),
9
10
  job: MarketplaceCardJobSchema,
10
11
  }),
12
+ z.object({
13
+ type: z.literal(TOOL_TYPE.IMAGE),
14
+ job: ImageEditorJobSchema,
15
+ }),
11
16
  z.object({
12
17
  type: z.literal(TOOL_TYPE.VIDEO),
13
18
  job: VideoJobSchema,