@onfido/api
Version:
Node.js library for the Onfido API
1,542 lines (1,541 loc) • 318 kB
TypeScript
/**
* Onfido Public API v3.6
* The Onfido Public API (v3.6)
*
* The version of the OpenAPI document: v3.6
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import type { Configuration } from './configuration';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import type { RequestArgs } from './base';
import { BaseAPI } from './base';
import { FileTransfer } from './file-transfer';
export interface Address {
/**
* The flat number of this address
*/
'flat_number'?: string;
/**
* The building number of this address
*/
'building_number'?: string;
/**
* The building name of this address
*/
'building_name'?: string;
/**
* The street of the applicant\'s address
*/
'street'?: string;
/**
* The sub-street of the applicant\'s address
*/
'sub_street'?: string;
/**
* The town of the applicant\'s address
*/
'town'?: string;
/**
* The postcode or ZIP of the applicant\'s address
*/
'postcode': string;
/**
* The 3 character ISO country code of this address. For example, GBR is the country code for the United Kingdom
*/
'country': CountryCodes;
/**
* The address state. US states must use the USPS abbreviation (see also ISO 3166-2:US), for example AK, CA, or TX.
*/
'state'?: string;
/**
* Line 1 of the applicant\'s address
*/
'line1'?: string | null;
/**
* Line 2 of the applicant\'s address
*/
'line2'?: string | null;
/**
* Line 3 of the applicant\'s address
*/
'line3'?: string | null;
}
export interface AddressBuilder {
/**
* The flat number of this address
*/
'flat_number'?: string;
/**
* The building number of this address
*/
'building_number'?: string;
/**
* The building name of this address
*/
'building_name'?: string;
/**
* The street of the applicant\'s address
*/
'street'?: string;
/**
* The sub-street of the applicant\'s address
*/
'sub_street'?: string;
/**
* The town of the applicant\'s address
*/
'town'?: string;
/**
* The postcode or ZIP of the applicant\'s address
*/
'postcode': string;
/**
* The 3 character ISO country code of this address. For example, GBR is the country code for the United Kingdom
*/
'country': CountryCodes;
/**
* The address state. US states must use the USPS abbreviation (see also ISO 3166-2:US), for example AK, CA, or TX.
*/
'state'?: string;
/**
* Line 1 of the applicant\'s address
*/
'line1'?: string | null;
/**
* Line 2 of the applicant\'s address
*/
'line2'?: string | null;
/**
* Line 3 of the applicant\'s address
*/
'line3'?: string | null;
}
export interface AddressShared {
/**
* The flat number of this address
*/
'flat_number'?: string;
/**
* The building number of this address
*/
'building_number'?: string;
/**
* The building name of this address
*/
'building_name'?: string;
/**
* The street of the applicant\'s address
*/
'street'?: string;
/**
* The sub-street of the applicant\'s address
*/
'sub_street'?: string;
/**
* The town of the applicant\'s address
*/
'town'?: string;
/**
* The postcode or ZIP of the applicant\'s address
*/
'postcode': string;
/**
* The 3 character ISO country code of this address. For example, GBR is the country code for the United Kingdom
*/
'country': CountryCodes;
/**
* The address state. US states must use the USPS abbreviation (see also ISO 3166-2:US), for example AK, CA, or TX.
*/
'state'?: string;
/**
* Line 1 of the applicant\'s address
*/
'line1'?: string | null;
/**
* Line 2 of the applicant\'s address
*/
'line2'?: string | null;
/**
* Line 3 of the applicant\'s address
*/
'line3'?: string | null;
}
export interface AddressesList {
'addresses'?: Array<Address>;
}
export interface Applicant {
/**
* The applicant\'s email address. Required if doing a US check, or a UK check for which `applicant_provides_data` is `true`.
*/
'email'?: string;
/**
* The applicant\'s date of birth
*/
'dob'?: string;
'id_numbers'?: Array<IdNumber>;
/**
* The applicant\'s phone number
*/
'phone_number'?: string;
/**
* The applicant\'s first name
*/
'first_name'?: string;
/**
* The applicant\'s surname
*/
'last_name'?: string;
/**
* The unique identifier for the applicant.
*/
'id': string;
/**
* The date and time when this applicant was created.
*/
'created_at'?: string;
/**
* The date and time when this applicant is scheduled to be deleted.
*/
'delete_at'?: string;
/**
* The uri of this resource.
*/
'href'?: string;
'sandbox'?: boolean;
'address'?: Address;
'location'?: Location;
}
export interface ApplicantBuilder {
/**
* The applicant\'s email address. Required if doing a US check, or a UK check for which `applicant_provides_data` is `true`.
*/
'email'?: string;
/**
* The applicant\'s date of birth
*/
'dob'?: string;
'id_numbers'?: Array<IdNumber>;
/**
* The applicant\'s phone number
*/
'phone_number'?: string;
/**
* The applicant\'s consents
*/
'consents'?: Array<ApplicantConsentBuilder>;
'address'?: AddressBuilder;
'location'?: LocationBuilder;
/**
* The applicant\'s first name
*/
'first_name': string;
/**
* The applicant\'s surname
*/
'last_name': string;
}
export interface ApplicantConsent {
'name': ApplicantConsentName;
'granted': boolean;
/**
* The date and time when this applicant consent was granted, if not granted the value is nil.
*/
'granted_at': string | null;
}
export interface ApplicantConsentBuilder {
'name': ApplicantConsentName;
'granted': boolean;
}
export declare const ApplicantConsentName: {
readonly PrivacyNoticesRead: "privacy_notices_read";
readonly SsnVerification: "ssn_verification";
readonly PhoneNumberVerification: "phone_number_verification";
readonly UnknownDefaultOpenApi: "11184809";
};
export type ApplicantConsentName = typeof ApplicantConsentName[keyof typeof ApplicantConsentName];
export interface ApplicantCreate {
/**
* The applicant\'s first name
*/
'first_name': string;
/**
* The applicant\'s surname
*/
'last_name': string;
}
export interface ApplicantRequest {
/**
* The applicant\'s consents
*/
'consents'?: Array<ApplicantConsentBuilder>;
'address'?: AddressBuilder;
'location'?: LocationBuilder;
}
export interface ApplicantResponse {
/**
* The applicant\'s first name
*/
'first_name'?: string;
/**
* The applicant\'s surname
*/
'last_name'?: string;
/**
* The unique identifier for the applicant.
*/
'id': string;
/**
* The date and time when this applicant was created.
*/
'created_at'?: string;
/**
* The date and time when this applicant is scheduled to be deleted.
*/
'delete_at'?: string;
/**
* The uri of this resource.
*/
'href'?: string;
'sandbox'?: boolean;
'address'?: Address;
'location'?: Location;
}
export interface ApplicantShared {
/**
* The applicant\'s email address. Required if doing a US check, or a UK check for which `applicant_provides_data` is `true`.
*/
'email'?: string;
/**
* The applicant\'s date of birth
*/
'dob'?: string;
'id_numbers'?: Array<IdNumber>;
/**
* The applicant\'s phone number
*/
'phone_number'?: string;
}
export interface ApplicantUpdate {
/**
* The applicant\'s first name
*/
'first_name'?: string;
/**
* The applicant\'s surname
*/
'last_name'?: string;
}
export interface ApplicantUpdater {
/**
* The applicant\'s email address. Required if doing a US check, or a UK check for which `applicant_provides_data` is `true`.
*/
'email'?: string;
/**
* The applicant\'s date of birth
*/
'dob'?: string;
'id_numbers'?: Array<IdNumber>;
/**
* The applicant\'s phone number
*/
'phone_number'?: string;
/**
* The applicant\'s consents
*/
'consents'?: Array<ApplicantConsentBuilder>;
'address'?: AddressBuilder;
'location'?: LocationBuilder;
/**
* The applicant\'s first name
*/
'first_name'?: string;
/**
* The applicant\'s surname
*/
'last_name'?: string;
}
export interface ApplicantsList {
'applicants': Array<Applicant>;
}
export interface Check {
/**
* An array of webhook ids describing which webhooks to trigger for this check.
*/
'webhook_ids'?: Array<string>;
/**
* The ID of the applicant to do the check on.
*/
'applicant_id': string;
/**
* Send an applicant form to applicant to complete to proceed with check. Defaults to false.
*/
'applicant_provides_data'?: boolean;
/**
* Array of tags being assigned to this check.
*/
'tags'?: Array<string>;
/**
* For checks where `applicant_provides_data` is `true`, redirect to this URI when the applicant has submitted their data.
*/
'redirect_uri'?: string;
'privacy_notices_read_consent_given'?: boolean;
/**
* The unique identifier for the check.
*/
'id': string;
/**
* The date and time when this check was created.
*/
'created_at'?: string;
/**
* The uri of this resource.
*/
'href'?: string;
'status'?: CheckStatus;
/**
* The overall result of the check, based on the results of the constituent reports.
*/
'result'?: CheckResultEnum;
/**
* A link to the applicant form, if `applicant_provides_data` is `true`.
*/
'form_uri'?: string;
/**
* A link to the corresponding results page on the Onfido dashboard.
*/
'results_uri'?: string;
/**
* An array of report ids.
*/
'report_ids'?: Array<string>;
/**
* Indicates whether the object was created in the sandbox or not.
*/
'sandbox'?: boolean;
'paused'?: boolean;
'version'?: string;
}
export declare const CheckResultEnum: {
readonly Clear: "clear";
readonly Consider: "consider";
readonly UnknownDefaultOpenApi: "11184809";
};
export type CheckResultEnum = typeof CheckResultEnum[keyof typeof CheckResultEnum];
export interface CheckBuilder {
/**
* An array of webhook ids describing which webhooks to trigger for this check.
*/
'webhook_ids'?: Array<string>;
/**
* The ID of the applicant to do the check on.
*/
'applicant_id': string;
/**
* Send an applicant form to applicant to complete to proceed with check. Defaults to false.
*/
'applicant_provides_data'?: boolean;
/**
* Array of tags being assigned to this check.
*/
'tags'?: Array<string>;
/**
* For checks where `applicant_provides_data` is `true`, redirect to this URI when the applicant has submitted their data.
*/
'redirect_uri'?: string;
'privacy_notices_read_consent_given'?: boolean;
/**
* An array of report names (strings).
*/
'report_names': Array<ReportName>;
/**
* Optional. An array of document ids, for use with Document reports only. If omitted, the Document report will use the most recently uploaded document by default.
*/
'document_ids'?: Array<string>;
/**
* Defaults to `true`. If set to `false`, you will only receive a response when all reports in your check have completed.
*/
'asynchronous'?: boolean;
/**
* For checks where `applicant_provides_data` is `true`, applicant form will not be automatically sent if `suppress_form_emails` is set to `true`. You can manually send the form at any time after the check has been created, using the link found in the form_uri attribute of the check object. Write-only. Defaults to false.
*/
'suppress_form_emails'?: boolean;
/**
* Triggers responses for particular sub-results for sandbox Document reports.
*/
'sub_result'?: string;
/**
* Array of names of particular reports to return consider as their results. This is a feature available in sandbox testing
*/
'consider'?: Array<ReportName>;
'us_driving_licence'?: UsDrivingLicenceBuilder;
/**
* @deprecated
*/
'report_configuration'?: ReportConfiguration;
}
export interface CheckRequest {
/**
* An array of report names (strings).
*/
'report_names': Array<ReportName>;
/**
* Optional. An array of document ids, for use with Document reports only. If omitted, the Document report will use the most recently uploaded document by default.
*/
'document_ids'?: Array<string>;
/**
* Send an applicant form to applicant to complete to proceed with check. Defaults to false.
*/
'applicant_provides_data'?: boolean;
/**
* Defaults to `true`. If set to `false`, you will only receive a response when all reports in your check have completed.
*/
'asynchronous'?: boolean;
/**
* For checks where `applicant_provides_data` is `true`, applicant form will not be automatically sent if `suppress_form_emails` is set to `true`. You can manually send the form at any time after the check has been created, using the link found in the form_uri attribute of the check object. Write-only. Defaults to false.
*/
'suppress_form_emails'?: boolean;
/**
* Triggers responses for particular sub-results for sandbox Document reports.
*/
'sub_result'?: string;
/**
* Array of names of particular reports to return consider as their results. This is a feature available in sandbox testing
*/
'consider'?: Array<ReportName>;
'us_driving_licence'?: UsDrivingLicenceBuilder;
/**
* @deprecated
*/
'report_configuration'?: ReportConfiguration;
}
export interface CheckResponse {
/**
* The unique identifier for the check.
*/
'id': string;
/**
* The date and time when this check was created.
*/
'created_at'?: string;
/**
* The uri of this resource.
*/
'href'?: string;
'status'?: CheckStatus;
/**
* The overall result of the check, based on the results of the constituent reports.
*/
'result'?: CheckResponseResultEnum;
/**
* A link to the applicant form, if `applicant_provides_data` is `true`.
*/
'form_uri'?: string;
/**
* A link to the corresponding results page on the Onfido dashboard.
*/
'results_uri'?: string;
/**
* An array of report ids.
*/
'report_ids'?: Array<string>;
/**
* Indicates whether the object was created in the sandbox or not.
*/
'sandbox'?: boolean;
'paused'?: boolean;
'version'?: string;
}
export declare const CheckResponseResultEnum: {
readonly Clear: "clear";
readonly Consider: "consider";
readonly UnknownDefaultOpenApi: "11184809";
};
export type CheckResponseResultEnum = typeof CheckResponseResultEnum[keyof typeof CheckResponseResultEnum];
export interface CheckShared {
/**
* An array of webhook ids describing which webhooks to trigger for this check.
*/
'webhook_ids'?: Array<string>;
/**
* The ID of the applicant to do the check on.
*/
'applicant_id': string;
/**
* Send an applicant form to applicant to complete to proceed with check. Defaults to false.
*/
'applicant_provides_data'?: boolean;
/**
* Array of tags being assigned to this check.
*/
'tags'?: Array<string>;
/**
* For checks where `applicant_provides_data` is `true`, redirect to this URI when the applicant has submitted their data.
*/
'redirect_uri'?: string;
'privacy_notices_read_consent_given'?: boolean;
}
/**
* The current state of the check in the checking process.
*/
export declare const CheckStatus: {
readonly InProgress: "in_progress";
readonly AwaitingApplicant: "awaiting_applicant";
readonly Complete: "complete";
readonly Withdrawn: "withdrawn";
readonly Paused: "paused";
readonly Reopened: "reopened";
readonly UnknownDefaultOpenApi: "11184809";
};
export type CheckStatus = typeof CheckStatus[keyof typeof CheckStatus];
export interface ChecksList {
'checks': Array<Check>;
}
export interface CompleteTaskBuilder {
'data': CompleteTaskDataBuilder;
}
/**
* @type CompleteTaskDataBuilder
* The Task completion payload.
*/
export type CompleteTaskDataBuilder = Array<object> | object;
export declare const CountryCodes: {
readonly Abw: "ABW";
readonly Afg: "AFG";
readonly Ago: "AGO";
readonly Aia: "AIA";
readonly Ala: "ALA";
readonly Alb: "ALB";
readonly And: "AND";
readonly Are: "ARE";
readonly Arg: "ARG";
readonly Arm: "ARM";
readonly Asm: "ASM";
readonly Ata: "ATA";
readonly Atf: "ATF";
readonly Atg: "ATG";
readonly Aus: "AUS";
readonly Aut: "AUT";
readonly Aze: "AZE";
readonly Bdi: "BDI";
readonly Bel: "BEL";
readonly Ben: "BEN";
readonly Bes: "BES";
readonly Bfa: "BFA";
readonly Bgd: "BGD";
readonly Bgr: "BGR";
readonly Bhr: "BHR";
readonly Bhs: "BHS";
readonly Bih: "BIH";
readonly Blm: "BLM";
readonly Blr: "BLR";
readonly Blz: "BLZ";
readonly Bmu: "BMU";
readonly Bol: "BOL";
readonly Bra: "BRA";
readonly Brb: "BRB";
readonly Brn: "BRN";
readonly Btn: "BTN";
readonly Bvt: "BVT";
readonly Bwa: "BWA";
readonly Caf: "CAF";
readonly Can: "CAN";
readonly Cck: "CCK";
readonly Che: "CHE";
readonly Chl: "CHL";
readonly Chn: "CHN";
readonly Civ: "CIV";
readonly Cmr: "CMR";
readonly Cod: "COD";
readonly Cog: "COG";
readonly Cok: "COK";
readonly Col: "COL";
readonly Com: "COM";
readonly Cpv: "CPV";
readonly Cri: "CRI";
readonly Cub: "CUB";
readonly Cuw: "CUW";
readonly Cxr: "CXR";
readonly Cym: "CYM";
readonly Cyp: "CYP";
readonly Cze: "CZE";
readonly Deu: "DEU";
readonly Dji: "DJI";
readonly Dma: "DMA";
readonly Dnk: "DNK";
readonly Dom: "DOM";
readonly Dza: "DZA";
readonly Ecu: "ECU";
readonly Egy: "EGY";
readonly Eri: "ERI";
readonly Esh: "ESH";
readonly Esp: "ESP";
readonly Est: "EST";
readonly Eth: "ETH";
readonly Fin: "FIN";
readonly Fji: "FJI";
readonly Flk: "FLK";
readonly Fra: "FRA";
readonly Fro: "FRO";
readonly Fsm: "FSM";
readonly Gab: "GAB";
readonly Gbr: "GBR";
readonly Geo: "GEO";
readonly Ggy: "GGY";
readonly Gha: "GHA";
readonly Gib: "GIB";
readonly Gin: "GIN";
readonly Glp: "GLP";
readonly Gmb: "GMB";
readonly Gnb: "GNB";
readonly Gnq: "GNQ";
readonly Grc: "GRC";
readonly Grd: "GRD";
readonly Grl: "GRL";
readonly Gtm: "GTM";
readonly Guf: "GUF";
readonly Gum: "GUM";
readonly Guy: "GUY";
readonly Hkg: "HKG";
readonly Hmd: "HMD";
readonly Hnd: "HND";
readonly Hrv: "HRV";
readonly Hti: "HTI";
readonly Hun: "HUN";
readonly Idn: "IDN";
readonly Imn: "IMN";
readonly Ind: "IND";
readonly Iot: "IOT";
readonly Irl: "IRL";
readonly Irn: "IRN";
readonly Irq: "IRQ";
readonly Isl: "ISL";
readonly Isr: "ISR";
readonly Ita: "ITA";
readonly Jam: "JAM";
readonly Jey: "JEY";
readonly Jor: "JOR";
readonly Jpn: "JPN";
readonly Kaz: "KAZ";
readonly Ken: "KEN";
readonly Kgz: "KGZ";
readonly Khm: "KHM";
readonly Kir: "KIR";
readonly Kna: "KNA";
readonly Kor: "KOR";
readonly Kwt: "KWT";
readonly Lao: "LAO";
readonly Lbn: "LBN";
readonly Lbr: "LBR";
readonly Lby: "LBY";
readonly Lca: "LCA";
readonly Lie: "LIE";
readonly Lka: "LKA";
readonly Lso: "LSO";
readonly Ltu: "LTU";
readonly Lux: "LUX";
readonly Lva: "LVA";
readonly Mac: "MAC";
readonly Maf: "MAF";
readonly Mar: "MAR";
readonly Mco: "MCO";
readonly Mda: "MDA";
readonly Mdg: "MDG";
readonly Mdv: "MDV";
readonly Mex: "MEX";
readonly Mhl: "MHL";
readonly Mkd: "MKD";
readonly Mli: "MLI";
readonly Mlt: "MLT";
readonly Mmr: "MMR";
readonly Mne: "MNE";
readonly Mng: "MNG";
readonly Mnp: "MNP";
readonly Moz: "MOZ";
readonly Mrt: "MRT";
readonly Msr: "MSR";
readonly Mtq: "MTQ";
readonly Mus: "MUS";
readonly Mwi: "MWI";
readonly Mys: "MYS";
readonly Myt: "MYT";
readonly Nam: "NAM";
readonly Ncl: "NCL";
readonly Ner: "NER";
readonly Nfk: "NFK";
readonly Nga: "NGA";
readonly Nic: "NIC";
readonly Niu: "NIU";
readonly Nld: "NLD";
readonly Nor: "NOR";
readonly Npl: "NPL";
readonly Nru: "NRU";
readonly Nzl: "NZL";
readonly Omn: "OMN";
readonly Pak: "PAK";
readonly Pan: "PAN";
readonly Pcn: "PCN";
readonly Per: "PER";
readonly Phl: "PHL";
readonly Plw: "PLW";
readonly Png: "PNG";
readonly Pol: "POL";
readonly Pri: "PRI";
readonly Prk: "PRK";
readonly Prt: "PRT";
readonly Pry: "PRY";
readonly Pse: "PSE";
readonly Pyf: "PYF";
readonly Qat: "QAT";
readonly Reu: "REU";
readonly Rks: "RKS";
readonly Rou: "ROU";
readonly Rus: "RUS";
readonly Rwa: "RWA";
readonly Sau: "SAU";
readonly Sdn: "SDN";
readonly Sen: "SEN";
readonly Sgp: "SGP";
readonly Sgs: "SGS";
readonly Shn: "SHN";
readonly Sjm: "SJM";
readonly Slb: "SLB";
readonly Sle: "SLE";
readonly Slv: "SLV";
readonly Smr: "SMR";
readonly Som: "SOM";
readonly Spm: "SPM";
readonly Srb: "SRB";
readonly Ssd: "SSD";
readonly Stp: "STP";
readonly Sur: "SUR";
readonly Svk: "SVK";
readonly Svn: "SVN";
readonly Swe: "SWE";
readonly Swz: "SWZ";
readonly Sxm: "SXM";
readonly Syc: "SYC";
readonly Syr: "SYR";
readonly Tca: "TCA";
readonly Tcd: "TCD";
readonly Tgo: "TGO";
readonly Tha: "THA";
readonly Tjk: "TJK";
readonly Tkl: "TKL";
readonly Tkm: "TKM";
readonly Tls: "TLS";
readonly Ton: "TON";
readonly Tto: "TTO";
readonly Tun: "TUN";
readonly Tur: "TUR";
readonly Tuv: "TUV";
readonly Twn: "TWN";
readonly Tza: "TZA";
readonly Uga: "UGA";
readonly Ukr: "UKR";
readonly Umi: "UMI";
readonly Ury: "URY";
readonly Usa: "USA";
readonly Uzb: "UZB";
readonly Vat: "VAT";
readonly Vct: "VCT";
readonly Ven: "VEN";
readonly Vgb: "VGB";
readonly Vir: "VIR";
readonly Vnm: "VNM";
readonly Vut: "VUT";
readonly Wlf: "WLF";
readonly Wsm: "WSM";
readonly Yem: "YEM";
readonly Zaf: "ZAF";
readonly Zmb: "ZMB";
readonly Zwe: "ZWE";
readonly UnknownDefaultOpenApi: "11184809";
};
export type CountryCodes = typeof CountryCodes[keyof typeof CountryCodes];
export interface DeviceIntelligenceBreakdown {
'device'?: DeviceIntelligenceBreakdownDevice;
}
/**
* Asserts whether the device used to upload the media is trustworthy, i.e. it is a real, physical device.
*/
export interface DeviceIntelligenceBreakdownDevice {
'breakdown'?: DeviceIntelligenceBreakdownDeviceBreakdown;
}
export interface DeviceIntelligenceBreakdownDeviceBreakdown {
'application_authenticity'?: DocumentBreakdownDataComparisonBreakdownIssuingCountry;
'device_integrity'?: DocumentBreakdownDataComparisonBreakdownIssuingCountry;
'device_reputation'?: DocumentBreakdownDataComparisonBreakdownIssuingCountry;
}
export interface DeviceIntelligenceProperties {
'device'?: DeviceIntelligencePropertiesDevice;
'ip'?: DeviceIntelligencePropertiesIp;
'geolocation'?: DeviceIntelligencePropertiesGeolocation;
}
export interface DeviceIntelligencePropertiesDevice {
/**
* The SDK version that was used.
*/
'sdk_version'?: string;
/**
* The SDK used to upload the media.
*/
'sdk_source'?: DeviceIntelligencePropertiesDeviceSdkSourceEnum;
/**
* The token used to authenticate the request.
*/
'authentication_type'?: DeviceIntelligencePropertiesDeviceAuthenticationTypeEnum;
/**
* The model as set by the phone manufacturer (for Android and iOS) or the browser manufacturer (for Web). The model can be presented in name or number form depending on each manufacturer implementation.
*/
'raw_model'?: string;
/**
* The operating system of the device. The value came from manufacturer implementation (for Android and iOS) or browser\'s user agent (for Web).
*/
'os'?: string;
/**
* The browser name reported by the browser\'s user agent.
*/
'browser'?: string;
/**
* Whether the device is an emulator.
*/
'emulator'?: boolean;
/**
* Whether the device is providing false randomized device and network information.
*/
'randomized_device'?: boolean;
/**
* Counts the number of distinct document reports submitted in the last 24 hours that are associated with the applicant’s IP address.
*/
'number_of_ip_reuse_reports'?: number;
/**
* Counts the number of distinct document reports from the last 24 hours associated with the applicant’s IP address that have a result of suspected and other document integrity or authenticity signals have been flagged.
*/
'number_of_suspected_ip_reuse_reports'?: number;
/**
* Whether device is using stolen security tokens to send the network information.
*/
'fake_network_request'?: boolean;
/**
* Whether there is highly suspicious traffic related to the IP address. The risk depends on the overall ratio of clear checks on a given IP.
*/
'ip_reputation'?: DeviceIntelligencePropertiesDeviceIpReputationEnum;
/**
* The number of times the device was used to create a report for a new applicant. A value greater than 1 indicates potential device reuse.
*/
'device_fingerprint_reuse'?: number;
/**
* Whether the document or biometric media were uploaded from a single device.
*/
'single_device_used'?: boolean | null;
/**
* Whether the document media were live captured from the device camera.
*/
'document_capture'?: DeviceIntelligencePropertiesDeviceDocumentCaptureEnum;
/**
* Whether the biometric media were live captured from the device camera.
*/
'biometric_capture'?: DeviceIntelligencePropertiesDeviceBiometricCaptureEnum;
}
export declare const DeviceIntelligencePropertiesDeviceSdkSourceEnum: {
readonly AndroidSdk: "onfido-android-sdk";
readonly IosSdk: "onfido-ios-sdk";
readonly WebSdk: "onfido-web-sdk";
readonly UnknownDefaultOpenApi: "11184809";
};
export type DeviceIntelligencePropertiesDeviceSdkSourceEnum = typeof DeviceIntelligencePropertiesDeviceSdkSourceEnum[keyof typeof DeviceIntelligencePropertiesDeviceSdkSourceEnum];
export declare const DeviceIntelligencePropertiesDeviceAuthenticationTypeEnum: {
readonly SdkToken: "sdk_token";
readonly MobileToken: "mobile_token";
readonly ApiToken: "api_token";
readonly UnknownDefaultOpenApi: "11184809";
};
export type DeviceIntelligencePropertiesDeviceAuthenticationTypeEnum = typeof DeviceIntelligencePropertiesDeviceAuthenticationTypeEnum[keyof typeof DeviceIntelligencePropertiesDeviceAuthenticationTypeEnum];
export declare const DeviceIntelligencePropertiesDeviceIpReputationEnum: {
readonly NotEnoughData: "NOT_ENOUGH_DATA";
readonly HighRisk: "HIGH_RISK";
readonly LowRisk: "LOW_RISK";
readonly UnknownDefaultOpenApi: "11184809";
};
export type DeviceIntelligencePropertiesDeviceIpReputationEnum = typeof DeviceIntelligencePropertiesDeviceIpReputationEnum[keyof typeof DeviceIntelligencePropertiesDeviceIpReputationEnum];
export declare const DeviceIntelligencePropertiesDeviceDocumentCaptureEnum: {
readonly Live: "live";
readonly UnknownMethod: "unknown_method";
readonly UnknownDefaultOpenApi: "11184809";
};
export type DeviceIntelligencePropertiesDeviceDocumentCaptureEnum = typeof DeviceIntelligencePropertiesDeviceDocumentCaptureEnum[keyof typeof DeviceIntelligencePropertiesDeviceDocumentCaptureEnum];
export declare const DeviceIntelligencePropertiesDeviceBiometricCaptureEnum: {
readonly Live: "live";
readonly UnknownMethod: "unknown_method";
readonly UnknownDefaultOpenApi: "11184809";
};
export type DeviceIntelligencePropertiesDeviceBiometricCaptureEnum = typeof DeviceIntelligencePropertiesDeviceBiometricCaptureEnum[keyof typeof DeviceIntelligencePropertiesDeviceBiometricCaptureEnum];
export interface DeviceIntelligencePropertiesGeolocation {
/**
* City location of the IP address.
*/
'city'?: string;
/**
* Region location of the IP address.
*/
'region'?: string;
/**
* Country location of the IP address in a three letter format.
*/
'country'?: CountryCodes;
}
export interface DeviceIntelligencePropertiesIp {
/**
* The IP address that uploaded the media.
*/
'address'?: string;
}
export interface DeviceIntelligenceReport {
/**
* The unique identifier for the report. Read-only.
*/
'id': string;
/**
* The date and time at which the report was first initiated. Read-only.
*/
'created_at'?: string;
/**
* The API endpoint to retrieve the report. Read-only.
*/
'href'?: string;
'status'?: ReportStatus;
'result'?: ReportResult;
'sub_result'?: ReportSubResult;
/**
* The ID of the check to which the report belongs. Read-only.
*/
'check_id'?: string;
'name': ReportName;
'breakdown'?: DeviceIntelligenceBreakdown;
'properties'?: DeviceIntelligenceProperties;
}
export interface Document {
/**
* The file type of the uploaded file
*/
'file_type'?: string;
/**
* The type of document
*/
'type'?: DocumentTypes;
/**
* The side of the document, if applicable. The possible values are front and back
*/
'side'?: DocumentSideEnum;
/**
* The issuing country of the document, a 3-letter ISO code.
*/
'issuing_country'?: CountryCodes;
/**
* The ID of the applicant whose document is being uploaded.
*/
'applicant_id'?: string;
/**
* The unique identifier for the document
*/
'id': string;
/**
* The date and time at which the document was uploaded
*/
'created_at'?: string;
/**
* The uri of this resource
*/
'href'?: string;
/**
* The uri that can be used to download the document
*/
'download_href'?: string;
/**
* The name of the uploaded file
*/
'file_name'?: string;
/**
* The size of the file in bytes
*/
'file_size'?: number;
}
export declare const DocumentSideEnum: {
readonly Front: "front";
readonly Back: "back";
readonly UnknownDefaultOpenApi: "11184809";
};
export type DocumentSideEnum = typeof DocumentSideEnum[keyof typeof DocumentSideEnum];
export interface DocumentBreakdown {
'data_comparison'?: DocumentBreakdownDataComparison;
'data_validation'?: DocumentBreakdownDataValidation;
'image_integrity'?: DocumentBreakdownImageIntegrity;
'visual_authenticity'?: DocumentBreakdownVisualAuthenticity;
'data_consistency'?: DocumentBreakdownDataConsistency;
'police_record'?: DocumentBreakdownPoliceRecord;
'compromised_document'?: DocumentBreakdownCompromisedDocument;
'age_validation'?: DocumentBreakdownAgeValidation;
'issuing_authority'?: DocumentBreakdownIssuingAuthority;
}
/**
* Asserts whether the age calculated from the document\'s date of birth data point is greater than or equal to the minimum accepted age.
*/
export interface DocumentBreakdownAgeValidation {
'result'?: string;
'breakdown'?: DocumentBreakdownAgeValidationBreakdown;
}
export interface DocumentBreakdownAgeValidationBreakdown {
'minimum_accepted_age'?: DocumentBreakdownDataComparisonBreakdownIssuingCountry;
}
/**
* Asserts whether the image of the document has been found in our internal database or if it was used in a suspicious way.
*/
export interface DocumentBreakdownCompromisedDocument {
'result'?: string;
'breakdown'?: DocumentBreakdownCompromisedDocumentBreakdown;
}
export interface DocumentBreakdownCompromisedDocumentBreakdown {
'document_database'?: DocumentBreakdownDataComparisonBreakdownIssuingCountry;
'repeat_attempts'?: DocumentBreakdownDataComparisonBreakdownIssuingCountry;
}
/**
* Asserts whether data on the document is consistent with data provided when creating an applicant through the API.
*/
export interface DocumentBreakdownDataComparison {
'result'?: string;
'breakdown'?: DocumentBreakdownDataComparisonBreakdown;
}
export interface DocumentBreakdownDataComparisonBreakdown {
'issuing_country'?: DocumentBreakdownDataComparisonBreakdownIssuingCountry;
'gender'?: DocumentBreakdownDataComparisonBreakdownIssuingCountry;
'date_of_expiry'?: DocumentBreakdownDataComparisonBreakdownIssuingCountry;
'last_name'?: DocumentBreakdownDataComparisonBreakdownIssuingCountry;
'document_type'?: DocumentBreakdownDataComparisonBreakdownIssuingCountry;
'document_numbers'?: DocumentBreakdownDataComparisonBreakdownIssuingCountry;
'first_name'?: DocumentBreakdownDataComparisonBreakdownIssuingCountry;
'date_of_birth'?: DocumentBreakdownDataComparisonBreakdownIssuingCountry;
}
export interface DocumentBreakdownDataComparisonBreakdownIssuingCountry {
'result'?: string;
'properties'?: object;
}
/**
* Asserts whether data represented in multiple places on the document is consistent.
*/
export interface DocumentBreakdownDataConsistency {
'result'?: string;
'breakdown'?: DocumentBreakdownDataConsistencyBreakdown;
}
export interface DocumentBreakdownDataConsistencyBreakdown {
'date_of_expiry'?: DocumentBreakdownDataComparisonBreakdownIssuingCountry;
'document_numbers'?: DocumentBreakdownDataComparisonBreakdownIssuingCountry;
'issuing_country'?: DocumentBreakdownDataComparisonBreakdownIssuingCountry;
'document_type'?: DocumentBreakdownDataComparisonBreakdownIssuingCountry;
'date_of_birth'?: DocumentBreakdownDataComparisonBreakdownIssuingCountry;
'gender'?: DocumentBreakdownDataComparisonBreakdownIssuingCountry;
'first_name'?: DocumentBreakdownDataComparisonBreakdownIssuingCountry;
'nationality'?: DocumentBreakdownDataComparisonBreakdownIssuingCountry;
'last_name'?: DocumentBreakdownDataComparisonBreakdownIssuingCountry;
'multiple_data_sources_present'?: DocumentBreakdownDataComparisonBreakdownIssuingCountry;
}
/**
* Asserts whether algorithmically validatable elements are correct.
*/
export interface DocumentBreakdownDataValidation {
'result'?: string;
'breakdown'?: DocumentBreakdownDataValidationBreakdown;
}
export interface DocumentBreakdownDataValidationBreakdown {
'gender'?: DocumentBreakdownDataComparisonBreakdownIssuingCountry;
'date_of_birth'?: DocumentBreakdownDataComparisonBreakdownIssuingCountry;
'document_numbers'?: DocumentBreakdownDataComparisonBreakdownIssuingCountry;
'document_expiration'?: DocumentBreakdownDataValidationBreakdownDocumentExpiration;
'expiry_date'?: DocumentBreakdownDataValidationBreakdownExpiryDate;
'mrz'?: DocumentBreakdownDataComparisonBreakdownIssuingCountry;
'barcode'?: DocumentBreakdownDataComparisonBreakdownIssuingCountry;
}
/**
* If this is flagged, the document has expired.
*/
export interface DocumentBreakdownDataValidationBreakdownDocumentExpiration {
'result'?: string;
'properties'?: object;
}
/**
* If this is flagged, the expiration date has the incorrect format.
*/
export interface DocumentBreakdownDataValidationBreakdownExpiryDate {
'result'?: string;
'properties'?: object;
}
/**
* Asserts if the document is of sufficient quality to verify.
*/
export interface DocumentBreakdownImageIntegrity {
'result'?: string;
'breakdown'?: DocumentBreakdownImageIntegrityBreakdown;
}
export interface DocumentBreakdownImageIntegrityBreakdown {
'image_quality'?: DocumentBreakdownImageIntegrityBreakdownImageQuality;
'supported_document'?: DocumentBreakdownImageIntegrityBreakdownSupportedDocument;
'colour_picture'?: DocumentBreakdownImageIntegrityBreakdownColourPicture;
'conclusive_document_quality'?: DocumentBreakdownImageIntegrityBreakdownConclusiveDocumentQuality;
}
/**
* Asserts whether the image was a colour one.
*/
export interface DocumentBreakdownImageIntegrityBreakdownColourPicture {
'result'?: string;
'properties'?: object;
}
/**
* Asserts if the document was of enough quality to be able to perform a fraud inspection.
*/
export interface DocumentBreakdownImageIntegrityBreakdownConclusiveDocumentQuality {
'result'?: string;
'properties'?: DocumentCDQReasons;
}
/**
* Asserts whether the quality of the image was sufficient for processing.
*/
export interface DocumentBreakdownImageIntegrityBreakdownImageQuality {
'result'?: string;
'properties'?: DocumentIQReasons;
}
/**
* Asserts whether the submitted document is supported.
*/
export interface DocumentBreakdownImageIntegrityBreakdownSupportedDocument {
'result'?: string;
'properties'?: object;
}
/**
* Asserts whether data on the document matches the issuing authority data.
*/
export interface DocumentBreakdownIssuingAuthority {
'result'?: string;
'breakdown'?: DocumentBreakdownIssuingAuthorityBreakdown;
}
export interface DocumentBreakdownIssuingAuthorityBreakdown {
'nfc_active_authentication'?: DocumentBreakdownIssuingAuthorityBreakdownNfcActiveAuthentication;
'nfc_passive_authentication'?: DocumentBreakdownIssuingAuthorityBreakdownNfcPassiveAuthentication;
}
/**
* Asserts whether the document NFC chip is original or cloned.
*/
export interface DocumentBreakdownIssuingAuthorityBreakdownNfcActiveAuthentication {
'result'?: string;
'properties'?: object;
}
/**
* Asserts whether the document NFC chip data was tampered.
*/
export interface DocumentBreakdownIssuingAuthorityBreakdownNfcPassiveAuthentication {
'result'?: string;
'properties'?: object;
}
/**
* Asserts whether the document had been identified as lost, stolen or otherwise compromised.
*/
export interface DocumentBreakdownPoliceRecord {
'result'?: string;
}
/**
* Asserts whether visual, non-textual, elements are correct given the type of document.
*/
export interface DocumentBreakdownVisualAuthenticity {
'result'?: string;
'breakdown'?: DocumentBreakdownVisualAuthenticityBreakdown;
}
export interface DocumentBreakdownVisualAuthenticityBreakdown {
'fonts'?: DocumentBreakdownVisualAuthenticityBreakdownFonts;
'picture_face_integrity'?: DocumentBreakdownVisualAuthenticityBreakdownPictureFaceIntegrity;
'template'?: DocumentBreakdownVisualAuthenticityBreakdownTemplate;
'security_features'?: DocumentBreakdownVisualAuthenticityBreakdownSecurityFeatures;
'original_document_present'?: DocumentBreakdownVisualAuthenticityBreakdownOriginalDocumentPresent;
'digital_tampering'?: DocumentBreakdownVisualAuthenticityBreakdownDigitalTampering;
'other'?: DocumentBreakdownVisualAuthenticityBreakdownOther;
'face_detection'?: DocumentBreakdownVisualAuthenticityBreakdownFaceDetection;
}
/**
* Indication of digital tampering in the image.
*/
export interface DocumentBreakdownVisualAuthenticityBreakdownDigitalTampering {
'result'?: string;
'properties'?: object;
}
/**
* No face was detected on the document.
*/
export interface DocumentBreakdownVisualAuthenticityBreakdownFaceDetection {
'result'?: string;
'properties'?: object;
}
/**
* Fonts in the document don\'t match the expected ones.
*/
export interface DocumentBreakdownVisualAuthenticityBreakdownFonts {
'result'?: string;
'properties'?: object;
}
/**
* The document was not present when the photo was taken.
*/
export interface DocumentBreakdownVisualAuthenticityBreakdownOriginalDocumentPresent {
'result'?: string;
'properties'?: DocumentODPReasons;
}
/**
* This sub-breakdown is returned for backward compatibility reasons. Its value will be consider when at least one of the other breakdowns is consider, and clear when all the other breakdowns are clear.
*/
export interface DocumentBreakdownVisualAuthenticityBreakdownOther {
'result'?: string;
'properties'?: object;
}
/**
* The pictures of the person identified on the document show signs of tampering or alteration.
*/
export interface DocumentBreakdownVisualAuthenticityBreakdownPictureFaceIntegrity {
'result'?: string;
'properties'?: object;
}
/**
* Security features expected on the document are missing or wrong.
*/
export interface DocumentBreakdownVisualAuthenticityBreakdownSecurityFeatures {
'result'?: string;
'properties'?: object;
}
/**
* The document doesn\'t match the expected template for the document type and country it is from.
*/
export interface DocumentBreakdownVisualAuthenticityBreakdownTemplate {
'result'?: string;
'properties'?: object;
}
export interface DocumentCDQReasons {
/**
* When data points are obscured to the point that we cannot confirm if the fonts match the expected ones.
*/
'obscured_data_points'?: string;
/**
* When a critical security feature is obscured. This can also refer to when the holder\'s wet signature, necessary for the document to be valid, is not present.
*/
'obscured_security_features'?: string;
/**
* One of 3 reasons (1) OCR Assisted Scans (i.e. when you\'re able to move the mouse and highlight part of text), (2) Severely Washed out Background, (3) Overlapping Text.
*/
'abnormal_document_features'?: string;
/**
* Any digital text or electronic watermarks on the document.
*/
'watermarks_digital_text_overlay'?: string;
/**
* If the corner has been physically cut off. This can be found on some documents that are no longer valid.
*/
'corner_removed'?: string;
/**
* A punched hole is present.
*/
'punctured_document'?: string;
/**
* When the back of a document is needed for processing, but is not available.
*/
'missing_back'?: string;
/**
* When a document has been published digitally, there aren\'t enough security features to review so we cannot perform a full fraud assessment.
*/
'digital_document'?: string;
}
export interface DocumentIQReasons {
/**
* When an image of the document is too dark to be able to see data points.
*/
'dark_photo'?: string;
/**
* When there is light reflecting on the document causing glare to obstruct data points.
*/
'glare_on_photo'?: string;
/**
* When data points are blurred and no reference can be made elsewhere in the document or if the data points are too blurry and \'they could be something else\'.
*/
'blurred_photo'?: string;
/**
* When data points have been covered either by the applicant or by another object such as a sticker.
*/
'covered_photo'?: string;
/**
* Any other reason not listed, such as when holograms are obscuring data points.
*/
'other_photo_issue'?: string;
/**
* When a document is damaged and we are unable to make out data points.
*/
'damaged_document'?: string;
/**
* When the incorrect side of a document has been uploaded, and we have not received the front.
*/
'incorrect_side'?: string;
/**
* When data points are not included in the image due to the document being cut off.
*/
'cut_off_document'?: string;
/**
* If no document has been uploaded or there is a blank image.
*/
'no_document_in_image'?: string;
/**
* When 2 different documents are submitted in the same check.
*/
'two_documents_uploaded'?: string;
}
export interface DocumentODPReasons {
/**
* When the applicant\'s document is on a physical screen or device.
*/
'photo_of_screen'?: string;
/**
* When the applicant has used their mobile phone, tablet, or computer to take a photo within the device.
*/
'screenshot'?: string;
/**
* When the applicant has previously captured an image of the document, printed it out, and has now taken a photo of this print out to upload.
*/
'document_on_printed_paper'?: string;
/**
* When the document has clearly been captured using a scanner and there are visible indicators of this
*/
'scan'?: string;
}
export interface DocumentProperties {
'date_of_birth'?: string;
'date_of_expiry'?: string;
'personal_number'?: string;
'document_numbers'?: Array<DocumentPropertiesDocumentNumbersInner>;
'document_type'?: string;
'first_name'?: string;
'middle_name'?: string;
'last_name'?: string;
'gender'?: string;
'issuing_country'?: string;
'nationality'?: string;
'issuing_state'?: string;
'issuing_date'?: string;
'valid_from'?: string;
'categorisation'?: string;
'mrz_line1'?: string;
'mrz_line2'?: string;
'mrz_line3'?: string;
'address'?: string;
'place_of_birth'?: string;
'spouse_name'?: string;
'widow_name'?: string;
'alias_name'?: string;
'issuing_authority'?: string;
'remarks'?: string;
'civil_state'?: string;
'expatriation'?: string;
'father_name'?: string;
'mother_name'?: string;
'religion'?: string;
'type_of_permit'?: string;
'version_number'?: string;
'document_subtype'?: string;
'profession'?: string;
'security_document_number'?: string;
'tax_number'?: string;
'nist_identity_evidence_strength'?: DocumentPropertiesNistIdentityEvidenceStrengthEnum;
'has_issuance_confirmation'?: DocumentPropertiesHasIssuanceConfirmationEnum;
'real_id_compliance'?: boolean;
'security_tier'?: DocumentPropertiesSecurityTierEnum;
'address_lines'?: DocumentPropertiesAddressLines;
'barcode'?: Array<DocumentPropertiesBarcodeInner>;
'nfc'?: DocumentPropertiesNfc;
'document_classification'?: DocumentPropertiesDocumentClassification;
'extracted_data'?: DocumentPropertiesExtractedData;
}
export declare const DocumentPropertiesNistIdentityEvidenceStrengthEnum: {
readonly Superior: "superior";
readonly Strong: "strong";
readonly Fair: "fair";
readonly Weak: "weak";
readonly Unacceptable: "unacceptable";
readonly UnspecifiedIdentityEvidenceStrength: "unspecified_identity_evidence_strength";
readonly UnknownDefaultOpenApi: "11184809";
};
export type DocumentPropertiesNistIdentityEvidenceStrengthEnum = typeof DocumentPropertiesNistIdentityEvidenceStrengthEnum[keyof typeof DocumentPropertiesNistIdentityEvidenceStrengthEnum];
export declare const DocumentPropertiesHasIssuanceConfirmationEnum: {
readonly True: "true";
readonly False: "false";
readonly Unspecified: "unspecified";
readonly UnknownDefaultOpenApi: "11184809";
};
export type DocumentPropertiesHasIssuanceConfirmationEnum = typeof DocumentPropertiesHasIssuanceConfirmationEnum[keyof typeof DocumentPropertiesHasIssuanceConfirmationEnum];
export declare const DocumentPropertiesSecurityTierEnum: {
readonly Tier1: "tier_1";
readonly Tier2: "tier_2";
readonly Tier3: "tier_3";
readonly Tier4: "tier_4";
readonly Tier5: "tier_5";
readonly UnspecifiedSecurityTier: "unspecified_security_tier";
readonly UnknownDefaultOpenApi: "11184809";
};
export type DocumentPropertiesSecurityTierEnum = typeof DocumentPropertiesSecurityTierEnum[keyof typeof DocumentPropertiesSecurityTierEnum];
export interface DocumentPropertiesAddressLines {
'street_address'?: string;
'state'?: string;
'postal_code'?: string;
'country'?: string;
'city'?: string;
'country_code'?: string;
}
export interface DocumentPropertiesBarcodeInner {
'first_name'?: string;
'middle_name'?: string;
'last_name'?: string;
'document_type'?: string;
'date_of_expiry'?: string;
'date_of_birth'?: string;
'issuing_date'?: string;
'address_line_1'?: string;
'address_line_2'?: string;
'address_line_3'?: string;
'address_line_4'?: string;
'address_line_5'?: string;
'issuing_state'?: string;
'class'?: string;
'gender'?: string;
'issuing_country'?: string;
'document_number'?: string;
'real_id_classification'?: string;
}
export interface DocumentPropertiesDocumentClassification {
'issuing_country'?: string;
'document_type'?: string;
'issuing_state'?: string;
}
export interface DocumentPropertiesDocumentNumbersInner {
'value'?: string;
'type'?: string;
}
export interface DocumentPropertiesDrivingLicenceInformationItem {
'category'?: string;
'obtainment_date'?: string;
'expiry_date'?: string;
'codes'?: string;
}
export interface DocumentPropertiesExtractedData {
'document_number'?: string;
'date_of_birth'?: string;
'date_of_expiry'?: string;
'first_name'?: string;
'last_name'?: string;
'middle_name'?: string;
'full_name'?: string;
'spouse_name'?: string;
'widow_name'?: string;
'alias_name'?: string;