interface IWidgetConfiguration { |
idScanVerification: boolean | { |
releaseVersion: string; |
welcomeScreen: boolean | { |
title: string; |
content: string[]; |
ctaText: boolean | string; |
}; |
useMobileDevice: boolean; |
useLiveness: boolean; |
injectedCss: string; |
enableLiveDocumentCapture: boolean; |
language: { [key: string]: IWidgetConfiguration['phrases'] } | null; |
}; |
|
frankieBackendUrl: string; |
documentTypes: TDocumentTypes; |
|
welcomeScreen: boolean | { |
htmlContent: string | boolean; |
ctaText: boolean | string; |
}; |
|
maxAttemptCount: number; |
phrases: { [key: string]: unknown } | null; |
|
successScreen: { |
ctaUrl: string | null; |
ctaText: string; |
}; |
|
pendingScreen: boolean | { |
htmlContent: string | null; |
ctaActions: { url: string; text: string }[]; |
}; |
|
failureScreen: boolean | { |
ctaUrl: string | null; |
ctaText: string; |
}; |
|
progressBar: boolean; |
checkProfile: string; |
googleAPIKey: string | false; |
acceptedCountries: string[]; |
ageRange: [number, number]; |
dateOfBirth: TConfigDOB; |
organisationName: string; |
consentText: string | null; |
requestAddress: boolean; |
requestID: boolean; |
lazyIDCheck: boolean; |
disableThirdPartyAnalytics: boolean; |
injectedCss: string; |
injectedCssTagID: string | null; |
saveOnly: boolean; |
documentUploads: null | boolean | DocumentUploadConfig; |
} |
|
type TDocumentTypes = (TSupportedDocuments | UserDocConfig | DocConfigBody)[]; |
type TSupportedDocuments = 'PASSPORT' | 'DRIVERS_LICENCE' | 'NATIONAL_HEALTH_ID' | 'NATIONAL_ID'; |
|
type UserDocConfig = { type: TSupportedDocuments } | TPassportConfig | TDriversLicenceConfig | TCustomDocumentConfig; |
|
type TPassportConfig = { type: 'PASSPORT'; idExpiry?: boolean }; |
type TDriversLicenceConfig = { type: 'DRIVERS_LICENCE'; digitalLicence?: boolean }; |
|
type TCustomDocumentConfig = { |
type: string; |
label: string; |
subtitle?: string; |
customEventPayload: { [key: string]: unknown }; |
}; |
|
type TConfigDOB = { |
type: TDOBTypeSupport; |
}; |
|
type TDOBTypeSupport = 'gregorian' | 'buddhist'; |
|
type DocumentUploadConfig = { |
uploads: DocumentUpload[]; |
}; |
|
type DocumentUpload = { |
title: string; |
description?: string; |
types: TDocumentUploadType[]; |
}; |
|
type TDocumentUploadType = DocumentType | TDocumentUploadTypeObject; |
|
enum DocumentType { |
DRIVERS_LICENCE = "DRIVERS_LICENCE", |
PASSPORT = "PASSPORT", |
VISA = "VISA", |
IMMIGRATION = "IMMIGRATION", |
NATIONAL_ID = "NATIONAL_ID", |
NATIONAL_HEALTH_ID = "NATIONAL_HEALTH_ID", |
CONCESSION = "CONCESSION", |
HEALTH_CONCESSION = "HEALTH_CONCESSION", |
PENSION = "PENSION", |
MILITARY_ID = "MILITARY_ID", |
BIRTH_CERT = "BIRTH_CERT", |
CITIZENSHIP = "CITIZENSHIP", |
MARRIAGE_CERT = "MARRIAGE_CERT", |
DEATH_CERT = "DEATH_CERT", |
NAME_CHANGE = "NAME_CHANGE", |
UTILITY_BILL = "UTILITY_BILL", |
BANK_STATEMENT = "BANK_STATEMENT", |
BANK_ACCOUNT = "BANK_ACCOUNT", |
INTENT_PROOF = "INTENT_PROOF", |
SELF_IMAGE = "SELF_IMAGE", |
EMAIL_ADDRESS = "EMAIL_ADDRESS", |
MSISDN = "MSISDN", |
DEVICE = "DEVICE", |
VEHICLE_REGISTRATION = "VEHICLE_REGISTRATION", |
PROOF_OF_ADDRESS = "PROOF_OF_ADDRESS", |
EXTERNAL_ADMIN = "EXTERNAL_ADMIN", |
CHARGES = "CHARGES", |
PRE_ASIC = "PRE_ASIC", |
ANNUAL_RETURN = "ANNUAL_RETURN", |
REPORT = "REPORT", |
TRUST_DEED = "TRUST_DEED", |
PARTNERSHIP_AGREEMENT = "PARTNERSHIP_AGREEMENT", |
ADMIN_CHANGE = "ADMIN_CHANGE", |
COMPANY_REPORT = "COMPANY_REPORT", |
CHECK_RESULTS = "CHECK_RESULTS", |
OTHER = "OTHER", |
RENTAL_AGREEMENT = "RENTAL_AGREEMENT", |
TAX_STATEMENT = "TAX_STATEMENT", |
HOUSE_REGISTRATION = "HOUSE_REGISTRATION", |
YELLOW_HOUSE_REGISTRATION = "YELLOW_HOUSE_REGISTRATION", |
WORK_PERMIT = "WORK_PERMIT", |
EMPLOYMENT_CERTIFICATE = "EMPLOYMENT_CERTIFICATE", |
NOTARY_PUBLIC_ID = "NOTARY_PUBLIC_ID" |
} |
|
type TDocumentUploadTypeObject = { |
type: string; |
label: string; |
}; |