/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type KYCFieldTypeResponseInternal = { name?: string | undefined; source?: string | undefined; value?: string | undefined; }; /** @internal */ export const KYCFieldTypeResponseInternal$inboundSchema: z.ZodType< KYCFieldTypeResponseInternal, z.ZodTypeDef, unknown > = z.object({ name: z.string().optional(), source: z.string().optional(), value: z.string().optional(), }); /** @internal */ export type KYCFieldTypeResponseInternal$Outbound = { name?: string | undefined; source?: string | undefined; value?: string | undefined; }; /** @internal */ export const KYCFieldTypeResponseInternal$outboundSchema: z.ZodType< KYCFieldTypeResponseInternal$Outbound, z.ZodTypeDef, KYCFieldTypeResponseInternal > = z.object({ name: z.string().optional(), source: z.string().optional(), value: z.string().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace KYCFieldTypeResponseInternal$ { /** @deprecated use `KYCFieldTypeResponseInternal$inboundSchema` instead. */ export const inboundSchema = KYCFieldTypeResponseInternal$inboundSchema; /** @deprecated use `KYCFieldTypeResponseInternal$outboundSchema` instead. */ export const outboundSchema = KYCFieldTypeResponseInternal$outboundSchema; /** @deprecated use `KYCFieldTypeResponseInternal$Outbound` instead. */ export type Outbound = KYCFieldTypeResponseInternal$Outbound; } export function kycFieldTypeResponseInternalToJSON( kycFieldTypeResponseInternal: KYCFieldTypeResponseInternal, ): string { return JSON.stringify( KYCFieldTypeResponseInternal$outboundSchema.parse( kycFieldTypeResponseInternal, ), ); } export function kycFieldTypeResponseInternalFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => KYCFieldTypeResponseInternal$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'KYCFieldTypeResponseInternal' from JSON`, ); }