/* * 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"; import { EndpointScan, EndpointScan$inboundSchema } from "./endpointscan.js"; import { FieldDiff, FieldDiff$inboundSchema } from "./fielddiff.js"; export type EndpointScanned = { diff?: { [k: string]: FieldDiff } | undefined; scan?: EndpointScan | undefined; }; /** @internal */ export const EndpointScanned$inboundSchema: z.ZodType< EndpointScanned, z.ZodTypeDef, unknown > = z.object({ diff: z.record(FieldDiff$inboundSchema).optional(), scan: EndpointScan$inboundSchema.optional(), }); export function endpointScannedFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => EndpointScanned$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EndpointScanned' from JSON`, ); }