Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/4.7.1 #474

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions examples/aml-check/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions examples/digital-identity/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions examples/idv-identity-checks/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions examples/idv/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions examples/profile-identity-checks/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions examples/profile/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "yoti",
"version": "4.7.0",
"version": "4.7.1",
"description": "Yoti NodeJS SDK for back-end integration",
"author": "Yoti LTD <[email protected]> (https://www.yoti.com/developers)",
"license": "MIT",
Expand Down Expand Up @@ -35,7 +35,7 @@
"dependencies": {
"form-data": "4.0.0",
"node-forge": "1.3.1",
"protobufjs": "7.2.6",
"protobufjs": "7.3.0",
"superagent": "9.0.2",
"uuid": "9.0.1"
},
Expand Down
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ sonar.organization = getyoti

sonar.projectKey = getyoti:node
sonar.projectName = Node SDK
sonar.projectVersion = 4.7.0
sonar.projectVersion = 4.7.1
sonar.exclusions=tests/**,examples/**,node_modules/**,coverage/**
sonar.javascript.lcov.reportPaths=coverage/lcov.info
sonar.verbose = true
Expand Down
6 changes: 0 additions & 6 deletions src/digital_identity_service/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ class DigitalIdentityService {
.withHeader('X-Yoti-Auth-Id', this.sdkId)
.withPemString(this.pem.toString())
.withEndpoint('/v2/sessions')
.withQueryParam('appId', this.sdkId)
.withMethod('POST')
.withPayload(payload);

Expand Down Expand Up @@ -107,7 +106,6 @@ class DigitalIdentityService {
.withHeader('X-Yoti-Auth-Id', this.sdkId)
.withPemString(this.pem.toString())
.withEndpoint(`/v2/sessions/${sessionId}`)
.withQueryParam('appId', this.sdkId)
.withMethod('GET');

const request = requestBuilder.build();
Expand Down Expand Up @@ -148,7 +146,6 @@ class DigitalIdentityService {
.withHeader('X-Yoti-Auth-Id', this.sdkId)
.withPemString(this.pem.toString())
.withEndpoint(`/v2/sessions/${sessionId}/qr-codes`)
.withQueryParam('appId', this.sdkId)
.withMethod('POST')
.withPayload(payload);

Expand Down Expand Up @@ -187,7 +184,6 @@ class DigitalIdentityService {
.withHeader('X-Yoti-Auth-Id', this.sdkId)
.withPemString(this.pem.toString())
.withEndpoint(`/v2/qr-codes/${qrCodeId}`)
.withQueryParam('appId', this.sdkId)
.withMethod('GET');

const request = requestBuilder.build();
Expand Down Expand Up @@ -225,7 +221,6 @@ class DigitalIdentityService {
.withHeader('X-Yoti-Auth-Id', this.sdkId)
.withPemString(this.pem.toString())
.withEndpoint(`/v2/receipts/${receiptIdUrl}`)
.withQueryParam('appId', this.sdkId)
.withMethod('GET')
.build();

Expand All @@ -250,7 +245,6 @@ class DigitalIdentityService {
.withHeader('X-Yoti-Auth-Id', this.sdkId)
.withPemString(this.pem.toString())
.withEndpoint(`/v2/wrapped-item-keys/${receiptItemKeyId}`)
.withQueryParam('appId', this.sdkId)
.withMethod('GET')
.build();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,61 +1,32 @@
'use strict';

const Validation = require('../../../yoti_common/validation');

/**
* @typedef {Object} RequirementsNotMetDetail
* @property {string} [failureType]
* @property {string} [documentType]
* @property {string} [documentCountryIsoCode]
* @property {string} [auditId]
* @property {string} [details]
*/
const IdentityProfileRequirementsNotMetDetailResponse = require('./identity.profile.requirements.not.met.detail.response');

class IdentityProfileFailureReasonResponse {
constructor(failureReason) {
Validation.isString(failureReason.reason_code, 'reason code');
/** @private */
/** @private @type {string} */
this.reasonCode = failureReason.reason_code;

/** @private */
/** @private @type {IdentityProfileRequirementsNotMetDetailResponse[]} */
this.requirementsNotMetDetails = [];

// eslint-disable-next-line camelcase
const { requirements_not_met_details: requirementsNotMetDetails } = failureReason;
if (requirementsNotMetDetails) {
Validation.isArray(requirementsNotMetDetails, 'requirements not met details');

this.requirementsNotMetDetails = requirementsNotMetDetails.map((detail) => {
const {
failure_type: failureType,
document_type: documentType,
document_country_iso_code: documentCountryIsoCode,
audit_id: auditId,
details,
} = detail;

return ({
failureType,
documentType,
documentCountryIsoCode,
auditId,
details,
});
});
this.requirementsNotMetDetails = requirementsNotMetDetails
// eslint-disable-next-line max-len
.map((requirementsNotMetDetail) => new IdentityProfileRequirementsNotMetDetailResponse(requirementsNotMetDetail));
}
/** @private */
}

/**
* @returns {string}
*/
getReasonCode() {
return this.reasonCode;
}

/**
* @returns {RequirementsNotMetDetail[]}
*/
getRequirementsNotMetDetails() {
return this.requirementsNotMetDetails;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ class IdentityProfileReportSchemesComplianceResponse {
this.scheme = schemesCompliance.scheme;

Validation.isBoolean(schemesCompliance.requirements_met, 'requirements_met');
/** @private */
/** @private @type {boolean} */
this.requirementsMet = schemesCompliance.requirements_met;

if (schemesCompliance.requirements_not_met_info) {
Validation.isString(schemesCompliance.requirements_not_met_info, 'requirements_not_met_info');
/** @private */
/** @private @type {string|undefined} */
this.requirementsNotMetInfo = schemesCompliance.requirements_not_met_info;
}
}
Expand All @@ -26,16 +26,10 @@ class IdentityProfileReportSchemesComplianceResponse {
return this.scheme;
}

/**
* @returns {boolean}
*/
isRequirementsMet() {
return this.requirementsMet;
}

/**
* @returns {string}
*/
getRequirementsNotMetInfo() {
return this.requirementsNotMetInfo;
}
Expand Down
Loading