/* * 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 IdentityLookupServiceCreateIdentityLookupRequest = { /** * The correspondent id. */ correspondentId: string; identityLookupCreate: components.IdentityLookupCreate; }; export type IdentityLookupServiceCreateIdentityLookupResponse = { httpMeta: components.HTTPMetadata; /** * OK */ identityLookup?: components.IdentityLookup | undefined; /** * INVALID_ARGUMENT: The request contains invalid fields or formatting */ status?: components.Status | undefined; }; /** @internal */ export const IdentityLookupServiceCreateIdentityLookupRequest$inboundSchema: z.ZodType< IdentityLookupServiceCreateIdentityLookupRequest, z.ZodTypeDef, unknown > = z.object({ correspondent_id: z.string(), IdentityLookupCreate: components.IdentityLookupCreate$inboundSchema, }).transform((v) => { return remap$(v, { "correspondent_id": "correspondentId", "IdentityLookupCreate": "identityLookupCreate", }); }); /** @internal */ export type IdentityLookupServiceCreateIdentityLookupRequest$Outbound = { correspondent_id: string; IdentityLookupCreate: components.IdentityLookupCreate$Outbound; }; /** @internal */ export const IdentityLookupServiceCreateIdentityLookupRequest$outboundSchema: z.ZodType< IdentityLookupServiceCreateIdentityLookupRequest$Outbound, z.ZodTypeDef, IdentityLookupServiceCreateIdentityLookupRequest > = z.object({ correspondentId: z.string(), identityLookupCreate: components.IdentityLookupCreate$outboundSchema, }).transform((v) => { return remap$(v, { correspondentId: "correspondent_id", identityLookupCreate: "IdentityLookupCreate", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace IdentityLookupServiceCreateIdentityLookupRequest$ { /** @deprecated use `IdentityLookupServiceCreateIdentityLookupRequest$inboundSchema` instead. */ export const inboundSchema = IdentityLookupServiceCreateIdentityLookupRequest$inboundSchema; /** @deprecated use `IdentityLookupServiceCreateIdentityLookupRequest$outboundSchema` instead. */ export const outboundSchema = IdentityLookupServiceCreateIdentityLookupRequest$outboundSchema; /** @deprecated use `IdentityLookupServiceCreateIdentityLookupRequest$Outbound` instead. */ export type Outbound = IdentityLookupServiceCreateIdentityLookupRequest$Outbound; } export function identityLookupServiceCreateIdentityLookupRequestToJSON( identityLookupServiceCreateIdentityLookupRequest: IdentityLookupServiceCreateIdentityLookupRequest, ): string { return JSON.stringify( IdentityLookupServiceCreateIdentityLookupRequest$outboundSchema.parse( identityLookupServiceCreateIdentityLookupRequest, ), ); } export function identityLookupServiceCreateIdentityLookupRequestFromJSON( jsonString: string, ): SafeParseResult< IdentityLookupServiceCreateIdentityLookupRequest, SDKValidationError > { return safeParse( jsonString, (x) => IdentityLookupServiceCreateIdentityLookupRequest$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'IdentityLookupServiceCreateIdentityLookupRequest' from JSON`, ); } /** @internal */ export const IdentityLookupServiceCreateIdentityLookupResponse$inboundSchema: z.ZodType< IdentityLookupServiceCreateIdentityLookupResponse, 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 IdentityLookupServiceCreateIdentityLookupResponse$Outbound = { HttpMeta: components.HTTPMetadata$Outbound; IdentityLookup?: components.IdentityLookup$Outbound | undefined; Status?: components.Status$Outbound | undefined; }; /** @internal */ export const IdentityLookupServiceCreateIdentityLookupResponse$outboundSchema: z.ZodType< IdentityLookupServiceCreateIdentityLookupResponse$Outbound, z.ZodTypeDef, IdentityLookupServiceCreateIdentityLookupResponse > = 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 IdentityLookupServiceCreateIdentityLookupResponse$ { /** @deprecated use `IdentityLookupServiceCreateIdentityLookupResponse$inboundSchema` instead. */ export const inboundSchema = IdentityLookupServiceCreateIdentityLookupResponse$inboundSchema; /** @deprecated use `IdentityLookupServiceCreateIdentityLookupResponse$outboundSchema` instead. */ export const outboundSchema = IdentityLookupServiceCreateIdentityLookupResponse$outboundSchema; /** @deprecated use `IdentityLookupServiceCreateIdentityLookupResponse$Outbound` instead. */ export type Outbound = IdentityLookupServiceCreateIdentityLookupResponse$Outbound; } export function identityLookupServiceCreateIdentityLookupResponseToJSON( identityLookupServiceCreateIdentityLookupResponse: IdentityLookupServiceCreateIdentityLookupResponse, ): string { return JSON.stringify( IdentityLookupServiceCreateIdentityLookupResponse$outboundSchema.parse( identityLookupServiceCreateIdentityLookupResponse, ), ); } export function identityLookupServiceCreateIdentityLookupResponseFromJSON( jsonString: string, ): SafeParseResult< IdentityLookupServiceCreateIdentityLookupResponse, SDKValidationError > { return safeParse( jsonString, (x) => IdentityLookupServiceCreateIdentityLookupResponse$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'IdentityLookupServiceCreateIdentityLookupResponse' from JSON`, ); }