UNPKG

fathom-typescript

Version:

Fathom's official TypeScript SDK.

41 lines (36 loc) 1.01 kB
/* * 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 CRMContactMatch = { name: string; email: string; recordUrl: string; }; /** @internal */ export const CRMContactMatch$inboundSchema: z.ZodType< CRMContactMatch, z.ZodTypeDef, unknown > = z.object({ name: z.string(), email: z.string(), record_url: z.string(), }).transform((v) => { return remap$(v, { "record_url": "recordUrl", }); }); export function crmContactMatchFromJSON( jsonString: string, ): SafeParseResult<CRMContactMatch, SDKValidationError> { return safeParse( jsonString, (x) => CRMContactMatch$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CRMContactMatch' from JSON`, ); }