/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import * as openEnums from "../../types/enums.js"; import { OpenEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * The source checked to determine whether the CVE is in the KEV catalog. */ export const KEVSource = { Unknown: "", Cisa: "cisa", ThirdParty: "third_party", } as const; /** * The source checked to determine whether the CVE is in the KEV catalog. */ export type KEVSource = OpenEnum; export type Kev = { /** * The date the vulnerability was added to the KEV catalog. */ dateAdded?: string | undefined; /** * Per CISA’s Binding Operation Directive 22-01, the date all federal civilian executive branch (FCEB) agencies are required to remediate vulnerabilities in the KEV catalog. */ dateDue?: string | undefined; /** * The source checked to determine whether the CVE is in the KEV catalog. */ source?: KEVSource | undefined; }; /** @internal */ export const KEVSource$inboundSchema: z.ZodType< KEVSource, z.ZodTypeDef, unknown > = openEnums.inboundSchema(KEVSource); /** @internal */ export const Kev$inboundSchema: z.ZodType = z .object({ date_added: z.string().optional(), date_due: z.string().optional(), source: KEVSource$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "date_added": "dateAdded", "date_due": "dateDue", }); }); export function kevFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Kev$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Kev' from JSON`, ); }