/* * 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 { SDKValidationError } from "./errors/sdk-validation-error.js"; export type ErrorT = { code: string; message: string; details?: { [k: string]: any } | undefined; }; /** @internal */ export const ErrorT$inboundSchema: z.ZodMiniType = z.object({ code: types.string(), message: types.string(), details: types.optional(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`, ); }