/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: db2bfcd6fdcd */ import * as z from "zod/v4"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type StreamError = { error: string; reason: string; }; /** @internal */ export const StreamError$inboundSchema: z.ZodType = z .object({ error: z.string(), reason: z.string(), }); export function streamErrorFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => StreamError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StreamError' from JSON`, ); }