/* * 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"; /** * The person's information comes from an integration. */ export type IntegrationBasedPersonInfoSource = { integrationId: string; resourceId: string | null; type: "INTEGRATION"; }; /** @internal */ export const IntegrationBasedPersonInfoSource$inboundSchema: z.ZodType< IntegrationBasedPersonInfoSource, z.ZodTypeDef, unknown > = z.object({ integrationId: z.string(), resourceId: z.nullable(z.string()), type: z.literal("INTEGRATION"), }); export function integrationBasedPersonInfoSourceFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => IntegrationBasedPersonInfoSource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IntegrationBasedPersonInfoSource' from JSON`, ); }