/* * 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 { catchUnrecognizedEnum, OpenEnum, Unrecognized, } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * Whether or not the customer birth date was verified */ export enum BirthDateVerified { VerificationStateUnspecified = "VERIFICATION_STATE_UNSPECIFIED", NotInScope = "NOT_IN_SCOPE", Verified = "VERIFIED", Unverified = "UNVERIFIED", Inconclusive = "INCONCLUSIVE", } /** * Whether or not the customer birth date was verified */ export type BirthDateVerifiedOpen = OpenEnum; /** * Whether or not the document authenticity is verified or not Will be NOT_IN_SCOPE if the check being done is not documentary */ export enum DocumentAuthenticityVerified { VerificationStateUnspecified = "VERIFICATION_STATE_UNSPECIFIED", NotInScope = "NOT_IN_SCOPE", Verified = "VERIFIED", Unverified = "UNVERIFIED", Inconclusive = "INCONCLUSIVE", } /** * Whether or not the document authenticity is verified or not Will be NOT_IN_SCOPE if the check being done is not documentary */ export type DocumentAuthenticityVerifiedOpen = OpenEnum< typeof DocumentAuthenticityVerified >; /** * Whether or not the document expiry was verified This is only in scope for document verification checks If document is expired this will be set to EXPIRED */ export enum DocumentExpiryStatus { ExpirationStateUnspecified = "EXPIRATION_STATE_UNSPECIFIED", Unexpired = "UNEXPIRED", Expired = "EXPIRED", NotApplicable = "NOT_APPLICABLE", } /** * Whether or not the document expiry was verified This is only in scope for document verification checks If document is expired this will be set to EXPIRED */ export type DocumentExpiryStatusOpen = OpenEnum; /** * Whether or not the customer email was verified */ export enum EmailVerified { VerificationStateUnspecified = "VERIFICATION_STATE_UNSPECIFIED", NotInScope = "NOT_IN_SCOPE", Verified = "VERIFIED", Unverified = "UNVERIFIED", Inconclusive = "INCONCLUSIVE", } /** * Whether or not the customer email was verified */ export type EmailVerifiedOpen = OpenEnum; /** * Whether or not the customer identification number was verified */ export enum IdentificationNumberVerified { VerificationStateUnspecified = "VERIFICATION_STATE_UNSPECIFIED", NotInScope = "NOT_IN_SCOPE", Verified = "VERIFIED", Unverified = "UNVERIFIED", Inconclusive = "INCONCLUSIVE", } /** * Whether or not the customer identification number was verified */ export type IdentificationNumberVerifiedOpen = OpenEnum< typeof IdentificationNumberVerified >; /** * Whether or not the identity has been reported as deceased This is determined by parsing the vendor response for deceased indicators from the SSA Death Master File Equifax-specific indicators: reason codes "90" (SSN Death Indicator) or "SQ" (SSN reported as deceased) null/unset = not checked or unable to determine, false = checked and not deceased, true = deceased */ export enum IdentityReportedDeceased { DeceasedUnspecified = "DECEASED_UNSPECIFIED", Deceased = "DECEASED", NotDeceased = "NOT_DECEASED", Unknown = "UNKNOWN", } /** * Whether or not the identity has been reported as deceased This is determined by parsing the vendor response for deceased indicators from the SSA Death Master File Equifax-specific indicators: reason codes "90" (SSN Death Indicator) or "SQ" (SSN reported as deceased) null/unset = not checked or unable to determine, false = checked and not deceased, true = deceased */ export type IdentityReportedDeceasedOpen = OpenEnum< typeof IdentityReportedDeceased >; export enum IdentityVerificationTypes { IdentityVerificationTypeUnspecified = "IDENTITY_VERIFICATION_TYPE_UNSPECIFIED", Database = "DATABASE", Documentary = "DOCUMENTARY", Selfie = "SELFIE", } export type IdentityVerificationTypesOpen = OpenEnum< typeof IdentityVerificationTypes >; /** * Whether or not the customer legal address was verified */ export enum LegalAddressVerified { VerificationStateUnspecified = "VERIFICATION_STATE_UNSPECIFIED", NotInScope = "NOT_IN_SCOPE", Verified = "VERIFIED", Unverified = "UNVERIFIED", Inconclusive = "INCONCLUSIVE", } /** * Whether or not the customer legal address was verified */ export type LegalAddressVerifiedOpen = OpenEnum; /** * Presents verified results e.g. if name or birth date have been verified */ export enum NameVerified { VerificationStateUnspecified = "VERIFICATION_STATE_UNSPECIFIED", NotInScope = "NOT_IN_SCOPE", Verified = "VERIFIED", Unverified = "UNVERIFIED", Inconclusive = "INCONCLUSIVE", } /** * Presents verified results e.g. if name or birth date have been verified */ export type NameVerifiedOpen = OpenEnum; /** * Whether or not the customer phone number was verified */ export enum PhoneNumberVerified { VerificationStateUnspecified = "VERIFICATION_STATE_UNSPECIFIED", NotInScope = "NOT_IN_SCOPE", Verified = "VERIFIED", Unverified = "UNVERIFIED", Inconclusive = "INCONCLUSIVE", } /** * Whether or not the customer phone number was verified */ export type PhoneNumberVerifiedOpen = OpenEnum; /** * Whether or not the customer photo identification was verified Will be NOT_IN_SCOPE if the check being done is not selfie */ export enum SelfieVerified { VerificationStateUnspecified = "VERIFICATION_STATE_UNSPECIFIED", NotInScope = "NOT_IN_SCOPE", Verified = "VERIFIED", Unverified = "UNVERIFIED", Inconclusive = "INCONCLUSIVE", } /** * Whether or not the customer photo identification was verified Will be NOT_IN_SCOPE if the check being done is not selfie */ export type SelfieVerifiedOpen = OpenEnum; /** * Result from a customer identification check */ export type CustomerIdentificationResult = { /** * Whether or not the customer birth date was verified */ birthDateVerified?: BirthDateVerifiedOpen | undefined; /** * Whether or not the result is completed Must be true to be linked to an Investigation or used to Create/Update an LegalNaturalPerson */ completed?: boolean | undefined; /** * Whether or not the document authenticity is verified or not Will be NOT_IN_SCOPE if the check being done is not documentary */ documentAuthenticityVerified?: DocumentAuthenticityVerifiedOpen | undefined; /** * Whether or not the document expiry was verified This is only in scope for document verification checks If document is expired this will be set to EXPIRED */ documentExpiryStatus?: DocumentExpiryStatusOpen | undefined; /** * One or more ULIDs from the documents api of the image(s) of the document that relates to the identification check for a DOCUMENTARY check, these will be the images provided in the session */ documentVerificationIds?: Array | undefined; /** * The URI to complete documentary session Will be populated if the CheckType is DOCUMENTARY */ documentarySessionUri?: string | undefined; /** * Whether or not the customer email was verified */ emailVerified?: EmailVerifiedOpen | undefined; /** * Whether or not the result is expired An expired result will cause all `VerificationState`'s to be `UNVERIFIED`, the `ExpirationState` will be `EXPIRED` Will always be `false` for synchronous checks such as `DATABASE` Will be `true` when an asynchronous check such as `DOCUMENTARY` hasn't been completed within the timeframe If `true` the `completed` field will be `false` since a check was never completed */ expired?: boolean | undefined; /** * The name of the external vendor */ externalVendor?: string | undefined; /** * The id relating to the external vendor */ externalVendorId?: string | undefined; /** * Whether or not the customer identification number was verified */ identificationNumberVerified?: IdentificationNumberVerifiedOpen | undefined; /** * Whether or not the identity has been reported as deceased This is determined by parsing the vendor response for deceased indicators from the SSA Death Master File Equifax-specific indicators: reason codes "90" (SSN Death Indicator) or "SQ" (SSN reported as deceased) null/unset = not checked or unable to determine, false = checked and not deceased, true = deceased */ identityReportedDeceased?: IdentityReportedDeceasedOpen | undefined; /** * Describes the type(s) of Identity Verification that was performed */ identityVerificationTypes?: Array | undefined; /** * Whether or not the customer legal address was verified */ legalAddressVerified?: LegalAddressVerifiedOpen | undefined; /** * Presents verified results e.g. if name or birth date have been verified */ nameVerified?: NameVerifiedOpen | undefined; /** * Whether or not the customer phone number was verified */ phoneNumberVerified?: PhoneNumberVerifiedOpen | undefined; /** * Raw vendor result will return full json response from vendor if view is set to FULL */ rawVendorResult?: string | undefined; /** * Whether or not the customer photo identification was verified Will be NOT_IN_SCOPE if the check being done is not selfie */ selfieVerified?: SelfieVerifiedOpen | undefined; }; /** @internal */ export const BirthDateVerified$inboundSchema: z.ZodType< BirthDateVerifiedOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(BirthDateVerified), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const BirthDateVerified$outboundSchema: z.ZodType< BirthDateVerifiedOpen, z.ZodTypeDef, BirthDateVerifiedOpen > = z.union([ z.nativeEnum(BirthDateVerified), z.string().and(z.custom>()), ]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace BirthDateVerified$ { /** @deprecated use `BirthDateVerified$inboundSchema` instead. */ export const inboundSchema = BirthDateVerified$inboundSchema; /** @deprecated use `BirthDateVerified$outboundSchema` instead. */ export const outboundSchema = BirthDateVerified$outboundSchema; } /** @internal */ export const DocumentAuthenticityVerified$inboundSchema: z.ZodType< DocumentAuthenticityVerifiedOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(DocumentAuthenticityVerified), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const DocumentAuthenticityVerified$outboundSchema: z.ZodType< DocumentAuthenticityVerifiedOpen, z.ZodTypeDef, DocumentAuthenticityVerifiedOpen > = z.union([ z.nativeEnum(DocumentAuthenticityVerified), z.string().and(z.custom>()), ]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DocumentAuthenticityVerified$ { /** @deprecated use `DocumentAuthenticityVerified$inboundSchema` instead. */ export const inboundSchema = DocumentAuthenticityVerified$inboundSchema; /** @deprecated use `DocumentAuthenticityVerified$outboundSchema` instead. */ export const outboundSchema = DocumentAuthenticityVerified$outboundSchema; } /** @internal */ export const DocumentExpiryStatus$inboundSchema: z.ZodType< DocumentExpiryStatusOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(DocumentExpiryStatus), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const DocumentExpiryStatus$outboundSchema: z.ZodType< DocumentExpiryStatusOpen, z.ZodTypeDef, DocumentExpiryStatusOpen > = z.union([ z.nativeEnum(DocumentExpiryStatus), z.string().and(z.custom>()), ]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DocumentExpiryStatus$ { /** @deprecated use `DocumentExpiryStatus$inboundSchema` instead. */ export const inboundSchema = DocumentExpiryStatus$inboundSchema; /** @deprecated use `DocumentExpiryStatus$outboundSchema` instead. */ export const outboundSchema = DocumentExpiryStatus$outboundSchema; } /** @internal */ export const EmailVerified$inboundSchema: z.ZodType< EmailVerifiedOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(EmailVerified), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const EmailVerified$outboundSchema: z.ZodType< EmailVerifiedOpen, z.ZodTypeDef, EmailVerifiedOpen > = z.union([ z.nativeEnum(EmailVerified), z.string().and(z.custom>()), ]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace EmailVerified$ { /** @deprecated use `EmailVerified$inboundSchema` instead. */ export const inboundSchema = EmailVerified$inboundSchema; /** @deprecated use `EmailVerified$outboundSchema` instead. */ export const outboundSchema = EmailVerified$outboundSchema; } /** @internal */ export const IdentificationNumberVerified$inboundSchema: z.ZodType< IdentificationNumberVerifiedOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(IdentificationNumberVerified), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const IdentificationNumberVerified$outboundSchema: z.ZodType< IdentificationNumberVerifiedOpen, z.ZodTypeDef, IdentificationNumberVerifiedOpen > = z.union([ z.nativeEnum(IdentificationNumberVerified), z.string().and(z.custom>()), ]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace IdentificationNumberVerified$ { /** @deprecated use `IdentificationNumberVerified$inboundSchema` instead. */ export const inboundSchema = IdentificationNumberVerified$inboundSchema; /** @deprecated use `IdentificationNumberVerified$outboundSchema` instead. */ export const outboundSchema = IdentificationNumberVerified$outboundSchema; } /** @internal */ export const IdentityReportedDeceased$inboundSchema: z.ZodType< IdentityReportedDeceasedOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(IdentityReportedDeceased), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const IdentityReportedDeceased$outboundSchema: z.ZodType< IdentityReportedDeceasedOpen, z.ZodTypeDef, IdentityReportedDeceasedOpen > = z.union([ z.nativeEnum(IdentityReportedDeceased), z.string().and(z.custom>()), ]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace IdentityReportedDeceased$ { /** @deprecated use `IdentityReportedDeceased$inboundSchema` instead. */ export const inboundSchema = IdentityReportedDeceased$inboundSchema; /** @deprecated use `IdentityReportedDeceased$outboundSchema` instead. */ export const outboundSchema = IdentityReportedDeceased$outboundSchema; } /** @internal */ export const IdentityVerificationTypes$inboundSchema: z.ZodType< IdentityVerificationTypesOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(IdentityVerificationTypes), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const IdentityVerificationTypes$outboundSchema: z.ZodType< IdentityVerificationTypesOpen, z.ZodTypeDef, IdentityVerificationTypesOpen > = z.union([ z.nativeEnum(IdentityVerificationTypes), z.string().and(z.custom>()), ]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace IdentityVerificationTypes$ { /** @deprecated use `IdentityVerificationTypes$inboundSchema` instead. */ export const inboundSchema = IdentityVerificationTypes$inboundSchema; /** @deprecated use `IdentityVerificationTypes$outboundSchema` instead. */ export const outboundSchema = IdentityVerificationTypes$outboundSchema; } /** @internal */ export const LegalAddressVerified$inboundSchema: z.ZodType< LegalAddressVerifiedOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(LegalAddressVerified), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const LegalAddressVerified$outboundSchema: z.ZodType< LegalAddressVerifiedOpen, z.ZodTypeDef, LegalAddressVerifiedOpen > = z.union([ z.nativeEnum(LegalAddressVerified), z.string().and(z.custom>()), ]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace LegalAddressVerified$ { /** @deprecated use `LegalAddressVerified$inboundSchema` instead. */ export const inboundSchema = LegalAddressVerified$inboundSchema; /** @deprecated use `LegalAddressVerified$outboundSchema` instead. */ export const outboundSchema = LegalAddressVerified$outboundSchema; } /** @internal */ export const NameVerified$inboundSchema: z.ZodType< NameVerifiedOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(NameVerified), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const NameVerified$outboundSchema: z.ZodType< NameVerifiedOpen, z.ZodTypeDef, NameVerifiedOpen > = z.union([ z.nativeEnum(NameVerified), z.string().and(z.custom>()), ]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace NameVerified$ { /** @deprecated use `NameVerified$inboundSchema` instead. */ export const inboundSchema = NameVerified$inboundSchema; /** @deprecated use `NameVerified$outboundSchema` instead. */ export const outboundSchema = NameVerified$outboundSchema; } /** @internal */ export const PhoneNumberVerified$inboundSchema: z.ZodType< PhoneNumberVerifiedOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(PhoneNumberVerified), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const PhoneNumberVerified$outboundSchema: z.ZodType< PhoneNumberVerifiedOpen, z.ZodTypeDef, PhoneNumberVerifiedOpen > = z.union([ z.nativeEnum(PhoneNumberVerified), z.string().and(z.custom>()), ]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PhoneNumberVerified$ { /** @deprecated use `PhoneNumberVerified$inboundSchema` instead. */ export const inboundSchema = PhoneNumberVerified$inboundSchema; /** @deprecated use `PhoneNumberVerified$outboundSchema` instead. */ export const outboundSchema = PhoneNumberVerified$outboundSchema; } /** @internal */ export const SelfieVerified$inboundSchema: z.ZodType< SelfieVerifiedOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(SelfieVerified), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const SelfieVerified$outboundSchema: z.ZodType< SelfieVerifiedOpen, z.ZodTypeDef, SelfieVerifiedOpen > = z.union([ z.nativeEnum(SelfieVerified), z.string().and(z.custom>()), ]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SelfieVerified$ { /** @deprecated use `SelfieVerified$inboundSchema` instead. */ export const inboundSchema = SelfieVerified$inboundSchema; /** @deprecated use `SelfieVerified$outboundSchema` instead. */ export const outboundSchema = SelfieVerified$outboundSchema; } /** @internal */ export const CustomerIdentificationResult$inboundSchema: z.ZodType< CustomerIdentificationResult, z.ZodTypeDef, unknown > = z.object({ birth_date_verified: BirthDateVerified$inboundSchema.optional(), completed: z.boolean().optional(), document_authenticity_verified: DocumentAuthenticityVerified$inboundSchema .optional(), document_expiry_status: DocumentExpiryStatus$inboundSchema.optional(), document_verification_ids: z.array(z.string()).optional(), documentary_session_uri: z.string().optional(), email_verified: EmailVerified$inboundSchema.optional(), expired: z.boolean().optional(), external_vendor: z.string().optional(), external_vendor_id: z.string().optional(), identification_number_verified: IdentificationNumberVerified$inboundSchema .optional(), identity_reported_deceased: IdentityReportedDeceased$inboundSchema.optional(), identity_verification_types: z.array(IdentityVerificationTypes$inboundSchema) .optional(), legal_address_verified: LegalAddressVerified$inboundSchema.optional(), name_verified: NameVerified$inboundSchema.optional(), phone_number_verified: PhoneNumberVerified$inboundSchema.optional(), raw_vendor_result: z.string().optional(), selfie_verified: SelfieVerified$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "birth_date_verified": "birthDateVerified", "document_authenticity_verified": "documentAuthenticityVerified", "document_expiry_status": "documentExpiryStatus", "document_verification_ids": "documentVerificationIds", "documentary_session_uri": "documentarySessionUri", "email_verified": "emailVerified", "external_vendor": "externalVendor", "external_vendor_id": "externalVendorId", "identification_number_verified": "identificationNumberVerified", "identity_reported_deceased": "identityReportedDeceased", "identity_verification_types": "identityVerificationTypes", "legal_address_verified": "legalAddressVerified", "name_verified": "nameVerified", "phone_number_verified": "phoneNumberVerified", "raw_vendor_result": "rawVendorResult", "selfie_verified": "selfieVerified", }); }); /** @internal */ export type CustomerIdentificationResult$Outbound = { birth_date_verified?: string | undefined; completed?: boolean | undefined; document_authenticity_verified?: string | undefined; document_expiry_status?: string | undefined; document_verification_ids?: Array | undefined; documentary_session_uri?: string | undefined; email_verified?: string | undefined; expired?: boolean | undefined; external_vendor?: string | undefined; external_vendor_id?: string | undefined; identification_number_verified?: string | undefined; identity_reported_deceased?: string | undefined; identity_verification_types?: Array | undefined; legal_address_verified?: string | undefined; name_verified?: string | undefined; phone_number_verified?: string | undefined; raw_vendor_result?: string | undefined; selfie_verified?: string | undefined; }; /** @internal */ export const CustomerIdentificationResult$outboundSchema: z.ZodType< CustomerIdentificationResult$Outbound, z.ZodTypeDef, CustomerIdentificationResult > = z.object({ birthDateVerified: BirthDateVerified$outboundSchema.optional(), completed: z.boolean().optional(), documentAuthenticityVerified: DocumentAuthenticityVerified$outboundSchema .optional(), documentExpiryStatus: DocumentExpiryStatus$outboundSchema.optional(), documentVerificationIds: z.array(z.string()).optional(), documentarySessionUri: z.string().optional(), emailVerified: EmailVerified$outboundSchema.optional(), expired: z.boolean().optional(), externalVendor: z.string().optional(), externalVendorId: z.string().optional(), identificationNumberVerified: IdentificationNumberVerified$outboundSchema .optional(), identityReportedDeceased: IdentityReportedDeceased$outboundSchema.optional(), identityVerificationTypes: z.array(IdentityVerificationTypes$outboundSchema) .optional(), legalAddressVerified: LegalAddressVerified$outboundSchema.optional(), nameVerified: NameVerified$outboundSchema.optional(), phoneNumberVerified: PhoneNumberVerified$outboundSchema.optional(), rawVendorResult: z.string().optional(), selfieVerified: SelfieVerified$outboundSchema.optional(), }).transform((v) => { return remap$(v, { birthDateVerified: "birth_date_verified", documentAuthenticityVerified: "document_authenticity_verified", documentExpiryStatus: "document_expiry_status", documentVerificationIds: "document_verification_ids", documentarySessionUri: "documentary_session_uri", emailVerified: "email_verified", externalVendor: "external_vendor", externalVendorId: "external_vendor_id", identificationNumberVerified: "identification_number_verified", identityReportedDeceased: "identity_reported_deceased", identityVerificationTypes: "identity_verification_types", legalAddressVerified: "legal_address_verified", nameVerified: "name_verified", phoneNumberVerified: "phone_number_verified", rawVendorResult: "raw_vendor_result", selfieVerified: "selfie_verified", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CustomerIdentificationResult$ { /** @deprecated use `CustomerIdentificationResult$inboundSchema` instead. */ export const inboundSchema = CustomerIdentificationResult$inboundSchema; /** @deprecated use `CustomerIdentificationResult$outboundSchema` instead. */ export const outboundSchema = CustomerIdentificationResult$outboundSchema; /** @deprecated use `CustomerIdentificationResult$Outbound` instead. */ export type Outbound = CustomerIdentificationResult$Outbound; } export function customerIdentificationResultToJSON( customerIdentificationResult: CustomerIdentificationResult, ): string { return JSON.stringify( CustomerIdentificationResult$outboundSchema.parse( customerIdentificationResult, ), ); } export function customerIdentificationResultFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CustomerIdentificationResult$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CustomerIdentificationResult' from JSON`, ); }