@purpleschool/gptbot 0.14.12-avatar-studio → 0.14.13-avatar-studio

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.
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CANVAS_NODE_ERROR_KIND = void 0;
4
+ var CANVAS_NODE_ERROR_KIND;
5
+ (function (CANVAS_NODE_ERROR_KIND) {
6
+ CANVAS_NODE_ERROR_KIND["RUNTIME_VALIDATION"] = "RUNTIME_VALIDATION";
7
+ CANVAS_NODE_ERROR_KIND["EXECUTION_ERROR"] = "EXECUTION_ERROR";
8
+ })(CANVAS_NODE_ERROR_KIND || (exports.CANVAS_NODE_ERROR_KIND = CANVAS_NODE_ERROR_KIND = {}));
@@ -14,5 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./canvas-node-error-kind.enum"), exports);
17
18
  __exportStar(require("./canvas-node-type.enum"), exports);
18
19
  __exportStar(require("./node-run-status.enum"), exports);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CanvasNodeSchema = exports.CanvasNodeBaseSchema = exports.validateCanvasNodeOutputByType = exports.validateCanvasNodeParamsByType = exports.CanvasNodeErrorSchema = exports.CanvasNodeOutputSchemaByType = exports.CanvasNodeParamsSchemaByType = exports.AudioBlockOutputSchema = exports.VarBlockOutputSchema = exports.NoteOutputSchema = exports.FileBlockOutputSchema = exports.VideoBlockOutputSchema = exports.ImageBlockOutputSchema = exports.TextBlockOutputSchema = exports.HtmlGenOutputSchema = exports.VarGenOutputSchema = exports.MotionControlOutputSchema = exports.ColorPaletteOutputSchema = exports.AudioGenSTTOutputSchema = exports.AudioGenTTSOutputSchema = exports.VideoGenOutputSchema = exports.ImageGenOutputSchema = exports.TextGenOutputSchema = exports.NoParamsSchema = exports.HtmlGenParamsSchema = exports.VarGenParamsSchema = exports.MotionControlParamsSchema = exports.ColorPaletteParamsSchema = exports.AudioGenParamsSchema = exports.VideoGenParamsSchema = exports.ImageGenParamsSchema = exports.TextGenParamsSchema = exports.CanvasNodePositionSchema = exports.CanvasFileRefSchema = void 0;
3
+ exports.CanvasNodeSchema = exports.CanvasNodeBaseSchema = exports.validateCanvasNodeOutputByType = exports.validateCanvasNodeParamsByType = exports.CanvasNodeErrorSchema = exports.CanvasNodeErrorDetailsSchema = exports.CanvasNodeOutputSchemaByType = exports.CanvasNodeParamsSchemaByType = exports.AudioBlockOutputSchema = exports.VarBlockOutputSchema = exports.NoteOutputSchema = exports.FileBlockOutputSchema = exports.VideoBlockOutputSchema = exports.ImageBlockOutputSchema = exports.TextBlockOutputSchema = exports.HtmlGenOutputSchema = exports.VarGenOutputSchema = exports.MotionControlOutputSchema = exports.ColorPaletteOutputSchema = exports.AudioGenSTTOutputSchema = exports.AudioGenTTSOutputSchema = exports.VideoGenOutputSchema = exports.ImageGenOutputSchema = exports.TextGenOutputSchema = exports.NoParamsSchema = exports.HtmlGenParamsSchema = exports.VarGenParamsSchema = exports.MotionControlParamsSchema = exports.ColorPaletteParamsSchema = exports.AudioGenParamsSchema = exports.VideoGenParamsSchema = exports.ImageGenParamsSchema = exports.TextGenParamsSchema = exports.CanvasNodePositionSchema = exports.CanvasFileRefSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const constants_1 = require("../constants");
6
6
  const strictObject = (shape) => zod_1.z.object(shape).strict();
@@ -170,10 +170,16 @@ exports.CanvasNodeOutputSchemaByType = {
170
170
  [constants_1.CANVAS_NODE_TYPE.htmlGen]: exports.HtmlGenOutputSchema,
171
171
  [constants_1.CANVAS_NODE_TYPE.audioBlock]: exports.AudioBlockOutputSchema,
172
172
  };
173
+ exports.CanvasNodeErrorDetailsSchema = zod_1.z
174
+ .object({
175
+ nodeId: zod_1.z.string().uuid().optional(),
176
+ errorKind: zod_1.z.nativeEnum(constants_1.CANVAS_NODE_ERROR_KIND).optional(),
177
+ })
178
+ .catchall(zod_1.z.unknown());
173
179
  exports.CanvasNodeErrorSchema = zod_1.z.object({
174
180
  code: zod_1.z.string(),
175
181
  message: zod_1.z.string(),
176
- details: zod_1.z.record(zod_1.z.unknown()).optional(),
182
+ details: exports.CanvasNodeErrorDetailsSchema.optional(),
177
183
  retryable: zod_1.z.boolean().optional(),
178
184
  });
179
185
  const validateCanvasNodeParamsByType = (nodeDefinitionId, params, ctx) => {
@@ -0,0 +1,4 @@
1
+ export enum CANVAS_NODE_ERROR_KIND {
2
+ RUNTIME_VALIDATION = 'RUNTIME_VALIDATION',
3
+ EXECUTION_ERROR = 'EXECUTION_ERROR',
4
+ }
@@ -1,2 +1,3 @@
1
+ export * from './canvas-node-error-kind.enum';
1
2
  export * from './canvas-node-type.enum';
2
3
  export * from './node-run-status.enum';
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { CANVAS_NODE_TYPE, NODE_RUN_STATUS } from '../constants';
2
+ import { CANVAS_NODE_ERROR_KIND, CANVAS_NODE_TYPE, NODE_RUN_STATUS } from '../constants';
3
3
 
4
4
  const strictObject = <T extends z.ZodRawShape>(shape: T): z.ZodObject<T, 'strict'> =>
5
5
  z.object(shape).strict();
@@ -226,10 +226,17 @@ export const CanvasNodeOutputSchemaByType = {
226
226
  [CANVAS_NODE_TYPE.audioBlock]: AudioBlockOutputSchema,
227
227
  } as const;
228
228
 
229
+ export const CanvasNodeErrorDetailsSchema = z
230
+ .object({
231
+ nodeId: z.string().uuid().optional(),
232
+ errorKind: z.nativeEnum(CANVAS_NODE_ERROR_KIND).optional(),
233
+ })
234
+ .catchall(z.unknown());
235
+
229
236
  export const CanvasNodeErrorSchema = z.object({
230
237
  code: z.string(),
231
238
  message: z.string(),
232
- details: z.record(z.unknown()).optional(),
239
+ details: CanvasNodeErrorDetailsSchema.optional(),
233
240
  retryable: z.boolean().optional(),
234
241
  });
235
242
  export type CanvasNodeError = z.infer<typeof CanvasNodeErrorSchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.14.12-avatar-studio",
3
+ "version": "0.14.13-avatar-studio",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",