Class Config
The configuration object is usually received as part of the login response and contains a number of properties that control the configuration of the TrustID Cloud, for example:
var api = new TVS.Api();
api.login('username', 'password').then(function(loginResponse) {
// list of supporting document types
console.log('supporting document types:', loginResponse.Config.getSupportingDocumentTypes());
// company's phone number
console.log('phone:', loginResponse.Config.get('ui.advisor.phone'));
// right to work?
console.log('RTW:', loginResponse.Config.isRightToWorkSystemEnabled());
});
- class Config()
Captures configuration data that is relevant for a client connected to the TrustID Cloud.
Methods
- Config.get(name, defaultValue)
Return the value of the configuration variable with the given
name.- param string name:
Name of the configuration variable.
- param any defaultValue:
The default value that is returned in case the configuration variable does not exist.
- Config.getList(name)
Return the configuration value of the configuration variable with given
nameas a list of values rather than a single value.- param string name:
Name of the configuration variable.
- Config.getPhoneSpaceless()
Return the company’s phone number without spaces.
Return
trueif the application’s footer is presented for the default TrustID web client.
- Config.isRightToWorkSystemEnabled()
Return
trueif the TrustID Cloud is configured for Right To Work.
- Config.getDocumentTypeSections()
Return a list of section names in which document types are organised.
- Config.requirePersonAndPhotoMatches()
Return
trueif operators are required to decide whether a document’s photo matches the person presenting the document.
- Config.isPersonNotSeenRequired()
Return
trueif a Not Seen option is available for operators to choose from when being asked whether the document’s photo matches the person presenting the document.
- Config.supportsPagination()
Return
trueif the TrustID Cloud supports pagination when accessing the archive.
- Config.multipleDocumentPerApplicationDisabled()
Return
trueif multiple documents are not allowed per application.
- Config.requiresBackSideForDocumentType(documentType)
Return
trueif the givendocumentTyperequires a back side to be provided when uploading document images.- param int documentType:
The type of document.