diff --git a/src/schematic/index.ts b/src/schematic/index.ts index 0505a78..b145164 100644 --- a/src/schematic/index.ts +++ b/src/schematic/index.ts @@ -6,3 +6,4 @@ export * from "./schematic_trace" export * from "./schematic_text" export * from "./schematic_port" export * from "./schematic_net_label" +export * from "./schematic_error" diff --git a/src/schematic/schematic_error.ts b/src/schematic/schematic_error.ts new file mode 100644 index 0000000..fd05b8d --- /dev/null +++ b/src/schematic/schematic_error.ts @@ -0,0 +1,14 @@ +import { z } from "zod" + +export const schematic_error = z + .object({ + schematic_error_id: z.string(), + type: z.literal("schematic_error"), + // eventually each error type should be broken out into a dir of files + error_type: z.literal("schematic_port_not_found"), + message: z.string(), + }) + .describe("Defines a schematic error on the schematic") + +export type SchematicErrorInput = z.input +export type SchematicError = z.infer