/* * 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 { FrameworkCodesByFramework, FrameworkCodesByFramework$inboundSchema, } from "./frameworkcodesbyframework.js"; /** * Framework codes response resource */ export type FrameworkCodes = { /** * Valid framework codes for this audit. * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ frameworkCodes: Array; /** * Valid codes grouped by each distinct in-scope framework. A code that exists * * @remarks * on two frameworks appears in both groups. Two segments that share a * framework contribute one group. `framework` is the display name. */ codesByFramework: Array; }; /** @internal */ export const FrameworkCodes$inboundSchema: z.ZodType< FrameworkCodes, z.ZodTypeDef, unknown > = z.object({ frameworkCodes: z.array(z.string()), codesByFramework: z.array(FrameworkCodesByFramework$inboundSchema), }); export function frameworkCodesFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => FrameworkCodes$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FrameworkCodes' from JSON`, ); }