/* * 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 { CVSSv4Components, CVSSv4Components$inboundSchema, } from "./cvssv4components.js"; export type CVSSv4 = { components?: CVSSv4Components | undefined; /** * Score of the vulnerability; 0.1 is the lowest, 10 is the maximum */ score?: number | undefined; /** * The path, method, or scenario used to exploit the vulnerability. Each section represents components that contribute to the overall CVSS score. */ vector?: string | undefined; }; /** @internal */ export const CVSSv4$inboundSchema: z.ZodType = z .object({ components: CVSSv4Components$inboundSchema.optional(), score: z.number().optional(), vector: z.string().optional(), }); export function cvsSv4FromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CVSSv4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CVSSv4' from JSON`, ); }