/* * 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"; import { AmlTypeListResponseInternal, AmlTypeListResponseInternal$inboundSchema, AmlTypeListResponseInternal$Outbound, AmlTypeListResponseInternal$outboundSchema, } from "./amltypelistresponseinternal.js"; export type KYCInternal = { amlTypeLists?: Array | undefined; totalHits?: number | undefined; }; /** @internal */ export const KYCInternal$inboundSchema: z.ZodType< KYCInternal, z.ZodTypeDef, unknown > = z.object({ amlTypeLists: z.array(AmlTypeListResponseInternal$inboundSchema).optional(), totalHits: z.number().int().optional(), }); /** @internal */ export type KYCInternal$Outbound = { amlTypeLists?: Array | undefined; totalHits?: number | undefined; }; /** @internal */ export const KYCInternal$outboundSchema: z.ZodType< KYCInternal$Outbound, z.ZodTypeDef, KYCInternal > = z.object({ amlTypeLists: z.array(AmlTypeListResponseInternal$outboundSchema).optional(), totalHits: z.number().int().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace KYCInternal$ { /** @deprecated use `KYCInternal$inboundSchema` instead. */ export const inboundSchema = KYCInternal$inboundSchema; /** @deprecated use `KYCInternal$outboundSchema` instead. */ export const outboundSchema = KYCInternal$outboundSchema; /** @deprecated use `KYCInternal$Outbound` instead. */ export type Outbound = KYCInternal$Outbound; } export function kycInternalToJSON(kycInternal: KYCInternal): string { return JSON.stringify(KYCInternal$outboundSchema.parse(kycInternal)); } export function kycInternalFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => KYCInternal$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'KYCInternal' from JSON`, ); }