/* * 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 { ThreatListItem, ThreatListItem$inboundSchema, } from "./threatlistitem.js"; export type ThreatsListResponse = { /** * List of active threats observed on the platform. */ threats: Array | null; }; /** @internal */ export const ThreatsListResponse$inboundSchema: z.ZodType< ThreatsListResponse, z.ZodTypeDef, unknown > = z.object({ threats: z.nullable(z.array(ThreatListItem$inboundSchema)), }); export function threatsListResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ThreatsListResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreatsListResponse' from JSON`, ); }