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.

Arguments
  • name (string()) – Name of the configuration variable.

  • defaultValue (any()) – 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 name as a list of values rather than a single value.

Arguments
  • name (string()) – Name of the configuration variable.

Config.getPhoneSpaceless()

Return the company’s phone number without spaces.

Config.isFooterEnabled()

Return true if the application’s footer is presented for the default TrustID web client.

Config.isRightToWorkSystemEnabled()

Return true if 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 true if operators are required to decide whether a document’s photo matches the person presenting the document.

Config.isPersonNotSeenRequired()

Return true if 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 true if the TrustID Cloud supports pagination when accessing the archive.

Config.multipleDocumentPerApplicationDisabled()

Return true if multiple documents are not allowed per application.

Config.requiresBackSideForDocumentType(documentType)

Return true if the given documentType requires a back side to be provided when uploading document images.

Arguments
  • documentType (int()) – The type of document.