/* * 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"; /** * Optional. The view to return. Defaults to BASIC. */ export enum CustomerIdentificationResultServiceGetCustomerIdentificationQueryParamView { ViewUnspecified = "VIEW_UNSPECIFIED", Basic = "BASIC", Full = "FULL", } export type CustomerIdentificationResultServiceGetCustomerIdentificationRequest = { /** * The correspondent id. */ correspondentId: string; /** * The customerIdentification id. */ customerIdentificationId: string; /** * Optional. The view to return. Defaults to BASIC. */ view?: | CustomerIdentificationResultServiceGetCustomerIdentificationQueryParamView | undefined; }; export type CustomerIdentificationResultServiceGetCustomerIdentificationResponse = { httpMeta: components.HTTPMetadata; /** * OK */ customerIdentification?: components.CustomerIdentification | undefined; /** * INVALID_ARGUMENT: The request is not valid, additional information may be present in the BadRequest details. */ status?: components.Status | undefined; }; /** @internal */ export const CustomerIdentificationResultServiceGetCustomerIdentificationQueryParamView$inboundSchema: z.ZodNativeEnum< typeof CustomerIdentificationResultServiceGetCustomerIdentificationQueryParamView > = z.nativeEnum( CustomerIdentificationResultServiceGetCustomerIdentificationQueryParamView, ); /** @internal */ export const CustomerIdentificationResultServiceGetCustomerIdentificationQueryParamView$outboundSchema: z.ZodNativeEnum< typeof CustomerIdentificationResultServiceGetCustomerIdentificationQueryParamView > = CustomerIdentificationResultServiceGetCustomerIdentificationQueryParamView$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CustomerIdentificationResultServiceGetCustomerIdentificationQueryParamView$ { /** @deprecated use `CustomerIdentificationResultServiceGetCustomerIdentificationQueryParamView$inboundSchema` instead. */ export const inboundSchema = CustomerIdentificationResultServiceGetCustomerIdentificationQueryParamView$inboundSchema; /** @deprecated use `CustomerIdentificationResultServiceGetCustomerIdentificationQueryParamView$outboundSchema` instead. */ export const outboundSchema = CustomerIdentificationResultServiceGetCustomerIdentificationQueryParamView$outboundSchema; } /** @internal */ export const CustomerIdentificationResultServiceGetCustomerIdentificationRequest$inboundSchema: z.ZodType< CustomerIdentificationResultServiceGetCustomerIdentificationRequest, z.ZodTypeDef, unknown > = z.object({ correspondent_id: z.string(), customerIdentification_id: z.string(), view: CustomerIdentificationResultServiceGetCustomerIdentificationQueryParamView$inboundSchema .optional(), }).transform((v) => { return remap$(v, { "correspondent_id": "correspondentId", "customerIdentification_id": "customerIdentificationId", }); }); /** @internal */ export type CustomerIdentificationResultServiceGetCustomerIdentificationRequest$Outbound = { correspondent_id: string; customerIdentification_id: string; view?: string | undefined; }; /** @internal */ export const CustomerIdentificationResultServiceGetCustomerIdentificationRequest$outboundSchema: z.ZodType< CustomerIdentificationResultServiceGetCustomerIdentificationRequest$Outbound, z.ZodTypeDef, CustomerIdentificationResultServiceGetCustomerIdentificationRequest > = z.object({ correspondentId: z.string(), customerIdentificationId: z.string(), view: CustomerIdentificationResultServiceGetCustomerIdentificationQueryParamView$outboundSchema .optional(), }).transform((v) => { return remap$(v, { correspondentId: "correspondent_id", customerIdentificationId: "customerIdentification_id", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CustomerIdentificationResultServiceGetCustomerIdentificationRequest$ { /** @deprecated use `CustomerIdentificationResultServiceGetCustomerIdentificationRequest$inboundSchema` instead. */ export const inboundSchema = CustomerIdentificationResultServiceGetCustomerIdentificationRequest$inboundSchema; /** @deprecated use `CustomerIdentificationResultServiceGetCustomerIdentificationRequest$outboundSchema` instead. */ export const outboundSchema = CustomerIdentificationResultServiceGetCustomerIdentificationRequest$outboundSchema; /** @deprecated use `CustomerIdentificationResultServiceGetCustomerIdentificationRequest$Outbound` instead. */ export type Outbound = CustomerIdentificationResultServiceGetCustomerIdentificationRequest$Outbound; } export function customerIdentificationResultServiceGetCustomerIdentificationRequestToJSON( customerIdentificationResultServiceGetCustomerIdentificationRequest: CustomerIdentificationResultServiceGetCustomerIdentificationRequest, ): string { return JSON.stringify( CustomerIdentificationResultServiceGetCustomerIdentificationRequest$outboundSchema .parse( customerIdentificationResultServiceGetCustomerIdentificationRequest, ), ); } export function customerIdentificationResultServiceGetCustomerIdentificationRequestFromJSON( jsonString: string, ): SafeParseResult< CustomerIdentificationResultServiceGetCustomerIdentificationRequest, SDKValidationError > { return safeParse( jsonString, (x) => CustomerIdentificationResultServiceGetCustomerIdentificationRequest$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'CustomerIdentificationResultServiceGetCustomerIdentificationRequest' from JSON`, ); } /** @internal */ export const CustomerIdentificationResultServiceGetCustomerIdentificationResponse$inboundSchema: z.ZodType< CustomerIdentificationResultServiceGetCustomerIdentificationResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: components.HTTPMetadata$inboundSchema, CustomerIdentification: components.CustomerIdentification$inboundSchema .optional(), Status: components.Status$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "CustomerIdentification": "customerIdentification", "Status": "status", }); }); /** @internal */ export type CustomerIdentificationResultServiceGetCustomerIdentificationResponse$Outbound = { HttpMeta: components.HTTPMetadata$Outbound; CustomerIdentification?: | components.CustomerIdentification$Outbound | undefined; Status?: components.Status$Outbound | undefined; }; /** @internal */ export const CustomerIdentificationResultServiceGetCustomerIdentificationResponse$outboundSchema: z.ZodType< CustomerIdentificationResultServiceGetCustomerIdentificationResponse$Outbound, z.ZodTypeDef, CustomerIdentificationResultServiceGetCustomerIdentificationResponse > = z.object({ httpMeta: components.HTTPMetadata$outboundSchema, customerIdentification: components.CustomerIdentification$outboundSchema .optional(), status: components.Status$outboundSchema.optional(), }).transform((v) => { return remap$(v, { httpMeta: "HttpMeta", customerIdentification: "CustomerIdentification", 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 CustomerIdentificationResultServiceGetCustomerIdentificationResponse$ { /** @deprecated use `CustomerIdentificationResultServiceGetCustomerIdentificationResponse$inboundSchema` instead. */ export const inboundSchema = CustomerIdentificationResultServiceGetCustomerIdentificationResponse$inboundSchema; /** @deprecated use `CustomerIdentificationResultServiceGetCustomerIdentificationResponse$outboundSchema` instead. */ export const outboundSchema = CustomerIdentificationResultServiceGetCustomerIdentificationResponse$outboundSchema; /** @deprecated use `CustomerIdentificationResultServiceGetCustomerIdentificationResponse$Outbound` instead. */ export type Outbound = CustomerIdentificationResultServiceGetCustomerIdentificationResponse$Outbound; } export function customerIdentificationResultServiceGetCustomerIdentificationResponseToJSON( customerIdentificationResultServiceGetCustomerIdentificationResponse: CustomerIdentificationResultServiceGetCustomerIdentificationResponse, ): string { return JSON.stringify( CustomerIdentificationResultServiceGetCustomerIdentificationResponse$outboundSchema .parse( customerIdentificationResultServiceGetCustomerIdentificationResponse, ), ); } export function customerIdentificationResultServiceGetCustomerIdentificationResponseFromJSON( jsonString: string, ): SafeParseResult< CustomerIdentificationResultServiceGetCustomerIdentificationResponse, SDKValidationError > { return safeParse( jsonString, (x) => CustomerIdentificationResultServiceGetCustomerIdentificationResponse$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'CustomerIdentificationResultServiceGetCustomerIdentificationResponse' from JSON`, ); }