/* * 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 * as components from "../components/index.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type IdentityLookupServiceVerifyIdentityLookupRequest = { /** * The correspondent id. */ correspondentId: string; /** * The identityLookup id. */ identityLookupId: string; verifyIdentityLookupRequestCreate: components.VerifyIdentityLookupRequestCreate; }; export type IdentityLookupServiceVerifyIdentityLookupResponse = { httpMeta: components.HTTPMetadata; /** * OK */ identityLookup?: components.IdentityLookup | undefined; /** * INVALID_ARGUMENT: The identity lookup name is malformed or verification code is invalid */ status?: components.Status | undefined; }; /** @internal */ export const IdentityLookupServiceVerifyIdentityLookupRequest$inboundSchema: z.ZodType< IdentityLookupServiceVerifyIdentityLookupRequest, z.ZodTypeDef, unknown > = z.object({ correspondent_id: z.string(), identityLookup_id: z.string(), VerifyIdentityLookupRequestCreate: components.VerifyIdentityLookupRequestCreate$inboundSchema, }).transform((v) => { return remap$(v, { "correspondent_id": "correspondentId", "identityLookup_id": "identityLookupId", "VerifyIdentityLookupRequestCreate": "verifyIdentityLookupRequestCreate", }); }); /** @internal */ export type IdentityLookupServiceVerifyIdentityLookupRequest$Outbound = { correspondent_id: string; identityLookup_id: string; VerifyIdentityLookupRequestCreate: components.VerifyIdentityLookupRequestCreate$Outbound; }; /** @internal */ export const IdentityLookupServiceVerifyIdentityLookupRequest$outboundSchema: z.ZodType< IdentityLookupServiceVerifyIdentityLookupRequest$Outbound, z.ZodTypeDef, IdentityLookupServiceVerifyIdentityLookupRequest > = z.object({ correspondentId: z.string(), identityLookupId: z.string(), verifyIdentityLookupRequestCreate: components.VerifyIdentityLookupRequestCreate$outboundSchema, }).transform((v) => { return remap$(v, { correspondentId: "correspondent_id", identityLookupId: "identityLookup_id", verifyIdentityLookupRequestCreate: "VerifyIdentityLookupRequestCreate", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace IdentityLookupServiceVerifyIdentityLookupRequest$ { /** @deprecated use `IdentityLookupServiceVerifyIdentityLookupRequest$inboundSchema` instead. */ export const inboundSchema = IdentityLookupServiceVerifyIdentityLookupRequest$inboundSchema; /** @deprecated use `IdentityLookupServiceVerifyIdentityLookupRequest$outboundSchema` instead. */ export const outboundSchema = IdentityLookupServiceVerifyIdentityLookupRequest$outboundSchema; /** @deprecated use `IdentityLookupServiceVerifyIdentityLookupRequest$Outbound` instead. */ export type Outbound = IdentityLookupServiceVerifyIdentityLookupRequest$Outbound; } export function identityLookupServiceVerifyIdentityLookupRequestToJSON( identityLookupServiceVerifyIdentityLookupRequest: IdentityLookupServiceVerifyIdentityLookupRequest, ): string { return JSON.stringify( IdentityLookupServiceVerifyIdentityLookupRequest$outboundSchema.parse( identityLookupServiceVerifyIdentityLookupRequest, ), ); } export function identityLookupServiceVerifyIdentityLookupRequestFromJSON( jsonString: string, ): SafeParseResult< IdentityLookupServiceVerifyIdentityLookupRequest, SDKValidationError > { return safeParse( jsonString, (x) => IdentityLookupServiceVerifyIdentityLookupRequest$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'IdentityLookupServiceVerifyIdentityLookupRequest' from JSON`, ); } /** @internal */ export const IdentityLookupServiceVerifyIdentityLookupResponse$inboundSchema: z.ZodType< IdentityLookupServiceVerifyIdentityLookupResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: components.HTTPMetadata$inboundSchema, IdentityLookup: components.IdentityLookup$inboundSchema.optional(), Status: components.Status$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "IdentityLookup": "identityLookup", "Status": "status", }); }); /** @internal */ export type IdentityLookupServiceVerifyIdentityLookupResponse$Outbound = { HttpMeta: components.HTTPMetadata$Outbound; IdentityLookup?: components.IdentityLookup$Outbound | undefined; Status?: components.Status$Outbound | undefined; }; /** @internal */ export const IdentityLookupServiceVerifyIdentityLookupResponse$outboundSchema: z.ZodType< IdentityLookupServiceVerifyIdentityLookupResponse$Outbound, z.ZodTypeDef, IdentityLookupServiceVerifyIdentityLookupResponse > = z.object({ httpMeta: components.HTTPMetadata$outboundSchema, identityLookup: components.IdentityLookup$outboundSchema.optional(), status: components.Status$outboundSchema.optional(), }).transform((v) => { return remap$(v, { httpMeta: "HttpMeta", identityLookup: "IdentityLookup", status: "Status", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace IdentityLookupServiceVerifyIdentityLookupResponse$ { /** @deprecated use `IdentityLookupServiceVerifyIdentityLookupResponse$inboundSchema` instead. */ export const inboundSchema = IdentityLookupServiceVerifyIdentityLookupResponse$inboundSchema; /** @deprecated use `IdentityLookupServiceVerifyIdentityLookupResponse$outboundSchema` instead. */ export const outboundSchema = IdentityLookupServiceVerifyIdentityLookupResponse$outboundSchema; /** @deprecated use `IdentityLookupServiceVerifyIdentityLookupResponse$Outbound` instead. */ export type Outbound = IdentityLookupServiceVerifyIdentityLookupResponse$Outbound; } export function identityLookupServiceVerifyIdentityLookupResponseToJSON( identityLookupServiceVerifyIdentityLookupResponse: IdentityLookupServiceVerifyIdentityLookupResponse, ): string { return JSON.stringify( IdentityLookupServiceVerifyIdentityLookupResponse$outboundSchema.parse( identityLookupServiceVerifyIdentityLookupResponse, ), ); } export function identityLookupServiceVerifyIdentityLookupResponseFromJSON( jsonString: string, ): SafeParseResult< IdentityLookupServiceVerifyIdentityLookupResponse, SDKValidationError > { return safeParse( jsonString, (x) => IdentityLookupServiceVerifyIdentityLookupResponse$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'IdentityLookupServiceVerifyIdentityLookupResponse' from JSON`, ); }