Skip to content

v4.5.0

Compare
Choose a tag to compare
@laurent-yoti laurent-yoti released this 07 Sep 12:55

New Identity Verification Features

Allowing non-latin documents

A new method withAllowNonLatinDocuments(value: Boolean) on both OrthogonalRestrictionsFilterBuilder and DocumentRestrictionsFilterBuilder filter builders is now available.

with OrthogonalRestrictionsFilterBuilder
  const orthogonalRestrictionsFilter = new OrthogonalRestrictionsFilterBuilder()
    .withWhitelistedDocumentTypes(['PASSPORT'])
    .withAllowNonLatinDocuments(true)
    .build();
     
  const requiredIdDocument = new RequiredIdDocumentBuilder()
    .withFilter(orthogonalRestrictionsFilter)
    .build();

or

withDocumentRestrictionsFilterBuilder
  const documentRestriction = new DocumentRestrictionBuilder()
    .withDocumentTypes(['PASSPORT'])
    .build();

  const documentRestrictionsFilter = new DocumentRestrictionsFilterBuilder()
    .withDocumentRestriction(documentRestriction)
    .forWhitelist()
    .withAllowNonLatinDocuments(true)
    .build();

  const requiredIdDocument = new RequiredIdDocumentBuilder()
    .withFilter(documentRestrictionsFilter)
    .build();

Getting the list of documents supported, including non-latin or not

This is generic feature related to the API capabilities (ie, not bound to any specific session).
One can call the method getSupportedDocuments(includeNonLatin: Boolean), the includeNonLatin is new.

const supportedDocumentsResponse = await idvClient.getSupportedDocuments(true);