import * as z from "zod"; import { OpenEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { Identification, Identification$Outbound } from "./identification.js"; import { PostalAddress, PostalAddress$Outbound } from "./postaladdress.js"; /** * The type of device (e.g., mobile, desktop, tablet) */ export declare enum IdentityLookupDeviceType { DeviceTypeUnspecified = "DEVICE_TYPE_UNSPECIFIED", Desktop = "DESKTOP", Mobile = "MOBILE", Tablet = "TABLET" } /** * The type of device (e.g., mobile, desktop, tablet) */ export type IdentityLookupDeviceTypeOpen = OpenEnum; /** * Geographic location coordinates of the end-user's device */ export type Geolocation = { /** * The latitude in degrees. It must be in the range [-90.0, +90.0]. */ latitude?: number | undefined; /** * The longitude in degrees. It must be in the range [-180.0, +180.0]. */ longitude?: number | undefined; }; /** * Method used to determine the end-user's device geolocation */ export declare enum IdentityLookupGeolocationMechanism { GeolocationMechanismUnspecified = "GEOLOCATION_MECHANISM_UNSPECIFIED", DeviceGps = "DEVICE_GPS", IpLookup = "IP_LOOKUP" } /** * Method used to determine the end-user's device geolocation */ export type IdentityLookupGeolocationMechanismOpen = OpenEnum; /** * End-user device metadata for fraud detection and compliance purposes This must be the metadata from the actual end-user's device, not from any intermediate proxy or client server */ export type DeviceMetadata = { /** * Unique identifier for the device */ deviceId?: string | undefined; /** * The type of device (e.g., mobile, desktop, tablet) */ deviceType?: IdentityLookupDeviceTypeOpen | undefined; /** * Geographic location coordinates of the end-user's device */ geolocation?: Geolocation | null | undefined; /** * Method used to determine the end-user's device geolocation */ geolocationMechanism?: IdentityLookupGeolocationMechanismOpen | undefined; /** * The IP address of the end-user's device This must be the actual end-user's IP address, not the IP of any proxy or client server Must be a valid IPv4 or IPv6 address format IPv4 examples: "203.0.113.42", "198.51.100.1", "8.8.8.8" IPv6 examples: "2001:0db8:85a3::8a2e:0370:7334", "2606:4700:4700::1111" */ ipAddress?: string | undefined; /** * The user agent string from the end-user's device browser or application */ userAgent?: string | undefined; }; /** * The type of identification document */ export declare enum IdentityLookupType { TypeUnspecified = "TYPE_UNSPECIFIED", Ssn = "SSN", Cpf = "CPF" } /** * The type of identification document */ export type IdentityLookupTypeOpen = OpenEnum; /** * Identification document for verification */ export type IdentityLookupIdentification = { /** * CLDR format */ regionCode?: string | undefined; /** * The type of identification document */ type?: IdentityLookupTypeOpen | undefined; /** * The value of the identification document */ value?: string | undefined; }; /** * Birth date of the identity */ export type IdentityLookupBirthDate = { /** * Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. */ day?: number | undefined; /** * Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. */ month?: number | undefined; /** * Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. */ year?: number | undefined; }; /** * A short code. * * @remarks * * Reference(s): * - https://en.wikipedia.org/wiki/Short_code */ export type IdentityLookupLookupResultShortCode = { /** * Required. The short code digits, without a leading plus ('+') or country calling code, e.g. "611". */ number?: string | undefined; /** * Required. The BCP-47 region code of the location where calls to this short code can be made, such as "US" and "BB". * * @remarks * * Reference(s): * - http://www.unicode.org/reports/tr35/#unicode_region_subtag */ regionCode?: string | undefined; }; /** * Phone number associated with the identity */ export type IdentityLookupLookupResultPhoneNumber = { /** * The phone number, represented as a leading plus sign ('+'), followed by a phone number that uses a relaxed ITU E.164 format consisting of the country calling code (1 to 3 digits) and the subscriber number, with no additional spaces or formatting, e.g.: - correct: "+15552220123" - incorrect: "+1 (555) 222-01234 x123". * * @remarks * * The ITU E.164 format limits the latter to 12 digits, but in practice not all countries respect that, so we relax that restriction here. National-only numbers are not allowed. * * References: - https://www.itu.int/rec/T-REC-E.164-201011-I - https://en.wikipedia.org/wiki/E.164. - https://en.wikipedia.org/wiki/List_of_country_calling_codes */ e164Number?: string | undefined; /** * The phone number's extension. The extension is not standardized in ITU recommendations, except for being defined as a series of numbers with a maximum length of 40 digits. Other than digits, some other dialing characters such as ',' (indicating a wait) or '#' may be stored here. * * @remarks * * Note that no regions currently use extensions with short codes, so this field is normally only set in conjunction with an E.164 number. It is held separately from the E.164 number to allow for short code extensions in the future. */ extension?: string | undefined; /** * A short code. * * @remarks * * Reference(s): * - https://en.wikipedia.org/wiki/Short_code */ shortCode?: IdentityLookupLookupResultShortCode | null | undefined; }; /** * Will be populated when `state` is `IDENTITY_FOUND` Depending on the confidence level, some fields may be missing */ export type LookupResult = { /** * Addresses associated with the identity */ addresses?: Array | undefined; /** * Birth date of the identity */ birthDate?: IdentityLookupBirthDate | null | undefined; /** * Email addresses associated with the identity */ emails?: Array | undefined; /** * Family name of the identity */ familyName?: string | undefined; /** * Given name of the identity */ givenName?: string | undefined; /** * Identification documents associated with the identity */ identification?: Array | undefined; /** * Middle name of the identity */ middleName?: string | undefined; /** * Phone number associated with the identity */ phoneNumber?: IdentityLookupLookupResultPhoneNumber | null | undefined; }; /** * A short code. * * @remarks * * Reference(s): * - https://en.wikipedia.org/wiki/Short_code */ export type IdentityLookupShortCode = { /** * Required. The short code digits, without a leading plus ('+') or country calling code, e.g. "611". */ number?: string | undefined; /** * Required. The BCP-47 region code of the location where calls to this short code can be made, such as "US" and "BB". * * @remarks * * Reference(s): * - http://www.unicode.org/reports/tr35/#unicode_region_subtag */ regionCode?: string | undefined; }; /** * Phone number to be used for 2FA in E.164 format */ export type IdentityLookupPhoneNumber = { /** * The phone number, represented as a leading plus sign ('+'), followed by a phone number that uses a relaxed ITU E.164 format consisting of the country calling code (1 to 3 digits) and the subscriber number, with no additional spaces or formatting, e.g.: - correct: "+15552220123" - incorrect: "+1 (555) 222-01234 x123". * * @remarks * * The ITU E.164 format limits the latter to 12 digits, but in practice not all countries respect that, so we relax that restriction here. National-only numbers are not allowed. * * References: - https://www.itu.int/rec/T-REC-E.164-201011-I - https://en.wikipedia.org/wiki/E.164. - https://en.wikipedia.org/wiki/List_of_country_calling_codes */ e164Number?: string | undefined; /** * The phone number's extension. The extension is not standardized in ITU recommendations, except for being defined as a series of numbers with a maximum length of 40 digits. Other than digits, some other dialing characters such as ',' (indicating a wait) or '#' may be stored here. * * @remarks * * Note that no regions currently use extensions with short codes, so this field is normally only set in conjunction with an E.164 number. It is held separately from the E.164 number to allow for short code extensions in the future. */ extension?: string | undefined; /** * A short code. * * @remarks * * Reference(s): * - https://en.wikipedia.org/wiki/Short_code */ shortCode?: IdentityLookupShortCode | null | undefined; }; /** * Current state of the identity lookup */ export declare enum IdentityLookupState { StateUnspecified = "STATE_UNSPECIFIED", VerificationPending = "VERIFICATION_PENDING", VerificationExpired = "VERIFICATION_EXPIRED", IdentityFound = "IDENTITY_FOUND", NoIdentityFound = "NO_IDENTITY_FOUND" } /** * Current state of the identity lookup */ export type IdentityLookupStateOpen = OpenEnum; /** * Represents an identity lookup resource */ export type IdentityLookup = { /** * Time when the identity lookup was created */ createTime?: Date | null | undefined; /** * End-user device metadata for fraud detection and compliance purposes This must be the metadata from the actual end-user's device, not from any intermediate proxy or client server */ deviceMetadata?: DeviceMetadata | null | undefined; /** * Identification document for verification */ identification?: IdentityLookupIdentification | null | undefined; /** * Will be populated when `state` is `IDENTITY_FOUND` Depending on the confidence level, some fields may be missing */ lookupResult?: LookupResult | null | undefined; /** * The resource name of the identity lookup */ name?: string | undefined; /** * Phone number to be used for 2FA in E.164 format */ phoneNumber?: IdentityLookupPhoneNumber | null | undefined; /** * Current state of the identity lookup */ state?: IdentityLookupStateOpen | undefined; /** * Time when the identity lookup was last updated */ updateTime?: Date | null | undefined; /** * Verify User has consented to an identity lookup */ userConsent?: boolean | undefined; }; /** @internal */ export declare const IdentityLookupDeviceType$inboundSchema: z.ZodType; /** @internal */ export declare const IdentityLookupDeviceType$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace IdentityLookupDeviceType$ { /** @deprecated use `IdentityLookupDeviceType$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `IdentityLookupDeviceType$outboundSchema` instead. */ const outboundSchema: z.ZodType; } /** @internal */ export declare const Geolocation$inboundSchema: z.ZodType; /** @internal */ export type Geolocation$Outbound = { latitude?: number | undefined; longitude?: number | undefined; }; /** @internal */ export declare const Geolocation$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace Geolocation$ { /** @deprecated use `Geolocation$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `Geolocation$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `Geolocation$Outbound` instead. */ type Outbound = Geolocation$Outbound; } export declare function geolocationToJSON(geolocation: Geolocation): string; export declare function geolocationFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const IdentityLookupGeolocationMechanism$inboundSchema: z.ZodType; /** @internal */ export declare const IdentityLookupGeolocationMechanism$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace IdentityLookupGeolocationMechanism$ { /** @deprecated use `IdentityLookupGeolocationMechanism$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `IdentityLookupGeolocationMechanism$outboundSchema` instead. */ const outboundSchema: z.ZodType; } /** @internal */ export declare const DeviceMetadata$inboundSchema: z.ZodType; /** @internal */ export type DeviceMetadata$Outbound = { device_id?: string | undefined; device_type?: string | undefined; geolocation?: Geolocation$Outbound | null | undefined; geolocation_mechanism?: string | undefined; ip_address?: string | undefined; user_agent?: string | undefined; }; /** @internal */ export declare const DeviceMetadata$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace DeviceMetadata$ { /** @deprecated use `DeviceMetadata$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `DeviceMetadata$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `DeviceMetadata$Outbound` instead. */ type Outbound = DeviceMetadata$Outbound; } export declare function deviceMetadataToJSON(deviceMetadata: DeviceMetadata): string; export declare function deviceMetadataFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const IdentityLookupType$inboundSchema: z.ZodType; /** @internal */ export declare const IdentityLookupType$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace IdentityLookupType$ { /** @deprecated use `IdentityLookupType$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `IdentityLookupType$outboundSchema` instead. */ const outboundSchema: z.ZodType; } /** @internal */ export declare const IdentityLookupIdentification$inboundSchema: z.ZodType; /** @internal */ export type IdentityLookupIdentification$Outbound = { region_code?: string | undefined; type?: string | undefined; value?: string | undefined; }; /** @internal */ export declare const IdentityLookupIdentification$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace IdentityLookupIdentification$ { /** @deprecated use `IdentityLookupIdentification$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `IdentityLookupIdentification$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `IdentityLookupIdentification$Outbound` instead. */ type Outbound = IdentityLookupIdentification$Outbound; } export declare function identityLookupIdentificationToJSON(identityLookupIdentification: IdentityLookupIdentification): string; export declare function identityLookupIdentificationFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const IdentityLookupBirthDate$inboundSchema: z.ZodType; /** @internal */ export type IdentityLookupBirthDate$Outbound = { day?: number | undefined; month?: number | undefined; year?: number | undefined; }; /** @internal */ export declare const IdentityLookupBirthDate$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace IdentityLookupBirthDate$ { /** @deprecated use `IdentityLookupBirthDate$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `IdentityLookupBirthDate$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `IdentityLookupBirthDate$Outbound` instead. */ type Outbound = IdentityLookupBirthDate$Outbound; } export declare function identityLookupBirthDateToJSON(identityLookupBirthDate: IdentityLookupBirthDate): string; export declare function identityLookupBirthDateFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const IdentityLookupLookupResultShortCode$inboundSchema: z.ZodType; /** @internal */ export type IdentityLookupLookupResultShortCode$Outbound = { number?: string | undefined; region_code?: string | undefined; }; /** @internal */ export declare const IdentityLookupLookupResultShortCode$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace IdentityLookupLookupResultShortCode$ { /** @deprecated use `IdentityLookupLookupResultShortCode$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `IdentityLookupLookupResultShortCode$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `IdentityLookupLookupResultShortCode$Outbound` instead. */ type Outbound = IdentityLookupLookupResultShortCode$Outbound; } export declare function identityLookupLookupResultShortCodeToJSON(identityLookupLookupResultShortCode: IdentityLookupLookupResultShortCode): string; export declare function identityLookupLookupResultShortCodeFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const IdentityLookupLookupResultPhoneNumber$inboundSchema: z.ZodType; /** @internal */ export type IdentityLookupLookupResultPhoneNumber$Outbound = { e164_number?: string | undefined; extension?: string | undefined; short_code?: IdentityLookupLookupResultShortCode$Outbound | null | undefined; }; /** @internal */ export declare const IdentityLookupLookupResultPhoneNumber$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace IdentityLookupLookupResultPhoneNumber$ { /** @deprecated use `IdentityLookupLookupResultPhoneNumber$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `IdentityLookupLookupResultPhoneNumber$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `IdentityLookupLookupResultPhoneNumber$Outbound` instead. */ type Outbound = IdentityLookupLookupResultPhoneNumber$Outbound; } export declare function identityLookupLookupResultPhoneNumberToJSON(identityLookupLookupResultPhoneNumber: IdentityLookupLookupResultPhoneNumber): string; export declare function identityLookupLookupResultPhoneNumberFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const LookupResult$inboundSchema: z.ZodType; /** @internal */ export type LookupResult$Outbound = { addresses?: Array | undefined; birth_date?: IdentityLookupBirthDate$Outbound | null | undefined; emails?: Array | undefined; family_name?: string | undefined; given_name?: string | undefined; identification?: Array | undefined; middle_name?: string | undefined; phone_number?: IdentityLookupLookupResultPhoneNumber$Outbound | null | undefined; }; /** @internal */ export declare const LookupResult$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace LookupResult$ { /** @deprecated use `LookupResult$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `LookupResult$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `LookupResult$Outbound` instead. */ type Outbound = LookupResult$Outbound; } export declare function lookupResultToJSON(lookupResult: LookupResult): string; export declare function lookupResultFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const IdentityLookupShortCode$inboundSchema: z.ZodType; /** @internal */ export type IdentityLookupShortCode$Outbound = { number?: string | undefined; region_code?: string | undefined; }; /** @internal */ export declare const IdentityLookupShortCode$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace IdentityLookupShortCode$ { /** @deprecated use `IdentityLookupShortCode$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `IdentityLookupShortCode$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `IdentityLookupShortCode$Outbound` instead. */ type Outbound = IdentityLookupShortCode$Outbound; } export declare function identityLookupShortCodeToJSON(identityLookupShortCode: IdentityLookupShortCode): string; export declare function identityLookupShortCodeFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const IdentityLookupPhoneNumber$inboundSchema: z.ZodType; /** @internal */ export type IdentityLookupPhoneNumber$Outbound = { e164_number?: string | undefined; extension?: string | undefined; short_code?: IdentityLookupShortCode$Outbound | null | undefined; }; /** @internal */ export declare const IdentityLookupPhoneNumber$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace IdentityLookupPhoneNumber$ { /** @deprecated use `IdentityLookupPhoneNumber$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `IdentityLookupPhoneNumber$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `IdentityLookupPhoneNumber$Outbound` instead. */ type Outbound = IdentityLookupPhoneNumber$Outbound; } export declare function identityLookupPhoneNumberToJSON(identityLookupPhoneNumber: IdentityLookupPhoneNumber): string; export declare function identityLookupPhoneNumberFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const IdentityLookupState$inboundSchema: z.ZodType; /** @internal */ export declare const IdentityLookupState$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace IdentityLookupState$ { /** @deprecated use `IdentityLookupState$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `IdentityLookupState$outboundSchema` instead. */ const outboundSchema: z.ZodType; } /** @internal */ export declare const IdentityLookup$inboundSchema: z.ZodType; /** @internal */ export type IdentityLookup$Outbound = { create_time?: string | null | undefined; device_metadata?: DeviceMetadata$Outbound | null | undefined; identification?: IdentityLookupIdentification$Outbound | null | undefined; lookup_result?: LookupResult$Outbound | null | undefined; name?: string | undefined; phone_number?: IdentityLookupPhoneNumber$Outbound | null | undefined; state?: string | undefined; update_time?: string | null | undefined; user_consent?: boolean | undefined; }; /** @internal */ export declare const IdentityLookup$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace IdentityLookup$ { /** @deprecated use `IdentityLookup$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `IdentityLookup$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `IdentityLookup$Outbound` instead. */ type Outbound = IdentityLookup$Outbound; } export declare function identityLookupToJSON(identityLookup: IdentityLookup): string; export declare function identityLookupFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=identitylookup.d.ts.map