/* * 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 { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type Evidence = { dataPath?: string | undefined; exists?: boolean | undefined; foundValue?: string | undefined; literalMatch?: string | undefined; negative?: boolean | undefined; proprietary?: boolean | undefined; regex?: string | undefined; semverExpression?: string | undefined; }; /** @internal */ export const Evidence$inboundSchema: z.ZodType< Evidence, z.ZodTypeDef, unknown > = z.object({ data_path: z.string().optional(), exists: z.boolean().optional(), found_value: z.string().optional(), literal_match: z.string().optional(), negative: z.boolean().optional(), proprietary: z.boolean().optional(), regex: z.string().optional(), semver_expression: z.string().optional(), }).transform((v) => { return remap$(v, { "data_path": "dataPath", "found_value": "foundValue", "literal_match": "literalMatch", "semver_expression": "semverExpression", }); }); export function evidenceFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Evidence$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Evidence' from JSON`, ); }