Releases: getyoti/yoti-node-sdk
v4.13.2
v4.13.1
NEW
In the IDV package
Introduces new method getExtractionImageIds() in the PageResponse class.
Example:
const sessionId = 'some_session_id';
const sessionResult = await idvClient.getSession(sessionId);
const firstIdDocument = sessionResult.getResources().getIdDocuments()[0];
const firstPage = firstIdDocument.getPages()[0];
// new method usage
firstPage.getExtractionImageIds(); // ['image_id_1', 'image_id_2']Others
Chores - updates for vulnerable libraries versions.
Upgrade to eslint-9
v4.13.0
NEW
RTW Share-code in ID Verification
Create a session with Advanced Identity Profile
To enable the RTW Share Code - which acts as a fallback when documents provided are not RTW compatible, include an AdvancedIdentityProfileScheme with type GBR_RTW_SHARECODE in the AdvancedIdentityProfile of type YOTI_GLOBAL when defining the AdvancedIdentityProfileRequirements.
// Create RTW scheme
const advancedIdentityProfileSchemeRTW = new AdvancedIdentityProfileSchemeBuilder()
.withType('RTW')
.withLabel('label-for-RTW')
.build();
// Setup advanced identity profile, with the RTW scheme for the UK_TFIDA framework
const advancedIdentityProfileUKTFIDA = new AdvancedIdentityProfileBuilder()
.withTrustFramework('UK_TFIDA')
.withScheme(advancedIdentityProfileSchemeRTW)
.build();
// NEW - Setup advanced identity profile, with the GBR_RTW_SHARECODE scheme
const advancedIdentityProfileSchemeGbrRtwSharecode = new AdvancedIdentityProfileSchemeBuilder()
.withType('GBR_RTW_SHARECODE')
.withLabel('label-for-GBR-RTW-SHARECODE')
.build();
// Setup advanced identity profile, with the GBR_RTW_SHARECODE scheme for the YOTI_GLOBAL framework
const advancedIdentityProfileYotiGlobal = new AdvancedIdentityProfileBuilder()
.withTrustFramework('YOTI_GLOBAL')
.withScheme(advancedIdentityProfileSchemeGbrRtwSharecode)
.build();
// Finally assemble an advanced identity profile requirements, using the two profiles
const advancedIdentityProfileRequirements = new AdvancedIdentityProfileRequirementsBuilder()
.withProfile(advancedIdentityProfileUKTFIDA)
.withProfile(advancedIdentityProfileYotiGlobal)
.build();Retrieve session
Given a session is retrieved, there can be multiple share code resources (as per the user attempts) but only one is successful (eg, include collected details):
const sessionResult = await idvClient.getSession(sessionId);
const shareCodeResources = sessionResult.getResources().getShareCodeResources();
const firstShareCodeResource = shareCodeResources[0];
// Submitted details (share-code and date of birth)
const lookupProfileMedia = firstShareCodeResource.getLookupProfile().getMedia();
// Collected details (full-name and RTW expiration date)
const returnedProfileMedia = firstShareCodeResource.getReturnedProfile().getMedia();
// Collected PDF file media
const pdfFileMedia = firstShareCodeResource.getFile().getMedia();
// Collected ID Photo media
const idPhotoMedia = firstShareCodeResource.getIdPhoto().getMedia();v4.12.2
Maintenance only
- node-forge: 1.3.2
- body-parser: 1.20.4 (examples)
v4.12.1
Fixes
In the IDV service, when retrieving the device events, the clientVersion is now optional.
v4.12.0
NEW
IDV session configuration suppressed_screens
.withSdkConfig(
new SdkConfigBuilder()
.withLocale('en-GB')
// ...more options
// [NEW] option to set which screens should be suppressed
.withSuppressedScreens([
'ID_DOCUMENT_EDUCATION',
'ID_DOCUMENT_REQUIREMENTS',
])
.build()
)IDV session result breakdown item now includes process
const session = await getSession('some-id');
const [firstAuthenticityCheck] = session.getAuthenticityChecks()
const report = firstAuthenticityCheck.getReport();
const [firstBreakdownItem] = report.getBreakdown();
// [NEW] method to get the process
const process = firstBreakdownItem.getProcess();
console.log(process); // 'AUTOMATED' or 'EXPERT_REVIEW'v4.11.1
Vulnerability fixes
On package
Bump form-data from 4.0.2 to 4.0.4
GHSA-fjxv-7rqg-78g4
Bump on @babel/helpers
GHSA-968p-4wvh-cqc8
Bump on brace-expansion
GHSA-v6h2-p8h4-qcjw
On examples
Bump on-headers and express-session in /examples/idv-identity-checks
v4.11.0
NEW
Can now set for dynamic_sharing_service policy with attributes that have alternative names, or that are optional:
const wantedAttribute = new WantedAttributeBuilder()
.withName("common_name")
.withAlternativeName("alt-name-1")
.build()or
const wantedAttribute = new WantedAttributeBuilder()
.withName("common_name")
.withAlternativeNames(["alt-name-1", "alt-name-2"])
.build()and
const wantedAttribute = new WantedAttributeBuilder()
.withName("some_attribute_name")
.withOptional(true)
.build()FIXES
- AgeVerification parsing to support names like of
age_over:20:5 - Typing of the
getMedia()to possibly returnnull
v4.10.1
New
Digital Identity service
Added to WantedAttribute the "optional" option as well as "alternativeName"
Fixes
Identity Verification service
Validation of AdvancedIdentityProfileResponse - the field subject_id is now optional
Validation of IdentityProfileRequirementsNotMetDetailResponse - the field details is now optional
v4.10.0
NEW
Identity Verification service
Given a session, one can now request the devices that interacted with the session using the method getSessionTrackedDevices(sessionId). The devices resources can also be deleted, using deleteSessionTrackedDevices(sessionId).
Example
const sessionId = 'session-xxx';
// Getting the device events
const devicesResponse = await idvClient.getSessionTrackedDevices(sessionId);
const events = devicesResponse.getDeviceEvents()
const firstEvent = events[0]
firstEvent.getEvent(); // string: CONFIG_FIRST_LOADED, RESOURCE_CREATED...
firstEvent.getCreated(); // Date
const firstEventDevice = firstEvent.getDevice(); // Device
firstEventDevice.getIpAddress(); // string | undefined
firstEventDevice.getIpISOCountryCode() // string | undefined
firstEventDevice.getManufactureName() // string | undefined
firstEventDevice.getModelName() // string | undefined
firstEventDevice.getOSName() // string | undefined
firstEventDevice.getOSVersion() // string | undefined
firstEventDevice.getBrowserName() // string | undefined
firstEventDevice.getBrowserVersion() // string | undefined
firstEventDevice.getLocale() // string | undefined
firstEventDevice.getClientVersion() // string
// Deleting the device events
await idvClient.deleteSessionTrackedDevices(sessionId);