/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 6a31121c5606 */ 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 { Person, Person$inboundSchema } from "./person.js"; import { RelatedDocuments, RelatedDocuments$inboundSchema, } from "./relateddocuments.js"; export type PeopleResponse = { /** * A Person for each ID in the request, each with PersonMetadata populated. */ results?: Array | undefined; /** * A list of documents related to this people response. This is only included if DOCUMENT_ACTIVITY is requested and only 1 person is included in the request. */ relatedDocuments?: Array | undefined; /** * A list of IDs that could not be found. */ errors?: Array | undefined; }; /** @internal */ export const PeopleResponse$inboundSchema: z.ZodType< PeopleResponse, z.ZodTypeDef, unknown > = z.object({ results: z.array(Person$inboundSchema).optional(), relatedDocuments: z.array(RelatedDocuments$inboundSchema).optional(), errors: z.array(z.string()).optional(), }); export function peopleResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PeopleResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PeopleResponse' from JSON`, ); }