/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; 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"; /** * Request message for VerifyIdentityLookup method */ export type VerifyIdentityLookupRequestCreate = { /** * The name of the identity lookup to verify. */ name: string; /** * The verification code to complete the identity lookup. */ verificationCode: string; }; /** @internal */ export const VerifyIdentityLookupRequestCreate$inboundSchema: z.ZodType< VerifyIdentityLookupRequestCreate, z.ZodTypeDef, unknown > = z.object({ name: z.string(), verification_code: z.string(), }).transform((v) => { return remap$(v, { "verification_code": "verificationCode", }); }); /** @internal */ export type VerifyIdentityLookupRequestCreate$Outbound = { name: string; verification_code: string; }; /** @internal */ export const VerifyIdentityLookupRequestCreate$outboundSchema: z.ZodType< VerifyIdentityLookupRequestCreate$Outbound, z.ZodTypeDef, VerifyIdentityLookupRequestCreate > = z.object({ name: z.string(), verificationCode: z.string(), }).transform((v) => { return remap$(v, { verificationCode: "verification_code", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace VerifyIdentityLookupRequestCreate$ { /** @deprecated use `VerifyIdentityLookupRequestCreate$inboundSchema` instead. */ export const inboundSchema = VerifyIdentityLookupRequestCreate$inboundSchema; /** @deprecated use `VerifyIdentityLookupRequestCreate$outboundSchema` instead. */ export const outboundSchema = VerifyIdentityLookupRequestCreate$outboundSchema; /** @deprecated use `VerifyIdentityLookupRequestCreate$Outbound` instead. */ export type Outbound = VerifyIdentityLookupRequestCreate$Outbound; } export function verifyIdentityLookupRequestCreateToJSON( verifyIdentityLookupRequestCreate: VerifyIdentityLookupRequestCreate, ): string { return JSON.stringify( VerifyIdentityLookupRequestCreate$outboundSchema.parse( verifyIdentityLookupRequestCreate, ), ); } export function verifyIdentityLookupRequestCreateFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => VerifyIdentityLookupRequestCreate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'VerifyIdentityLookupRequestCreate' from JSON`, ); }