/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; import * as types from "../types/primitives.js"; import { smartUnion } from "../types/smart-union.js"; import { SDKValidationError } from "./errors/sdk-validation-error.js"; export type ErrorT = string | { [k: string]: any }; /** @internal */ export const ErrorT$inboundSchema: z.ZodMiniType = smartUnion([ types.string(), z.record(z.string(), z.any()), ]); export function errorFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ErrorT$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ErrorT' from JSON`, ); }