/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type OracleDescriptor = { /** * The dot-delimited path to the parsed value from the error received when the initial handshake is refused. */ key?: string | undefined; /** * The parsed value from the error received when the initial handshake is refused. */ value?: string | undefined; }; /** @internal */ export const OracleDescriptor$inboundSchema: z.ZodType< OracleDescriptor, z.ZodTypeDef, unknown > = z.object({ key: z.string().optional(), value: z.string().optional(), }); export function oracleDescriptorFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => OracleDescriptor$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OracleDescriptor' from JSON`, ); }