diff --git a/src/js/basic-kyc.js b/src/js/basic-kyc.js index f7d6d1fe..9e09b0ad 100644 --- a/src/js/basic-kyc.js +++ b/src/js/basic-kyc.js @@ -1,4 +1,5 @@ import validate from "validate.js"; +import { version as sdkVersion } from "../../package.json"; (function basicKyc() { "use strict"; @@ -723,7 +724,7 @@ import validate from "validate.js"; callback_url, token, source_sdk: config.sdk || "hosted_web", - source_sdk_version: config.sdk_version || "v1.1.0", + source_sdk_version: config.sdk_version || sdkVersion, }; const URL = `${endpoints[config.environment]}/v2/verify_async`; diff --git a/src/js/biometric-kyc.js b/src/js/biometric-kyc.js index 89182cfb..28912e24 100644 --- a/src/js/biometric-kyc.js +++ b/src/js/biometric-kyc.js @@ -1,5 +1,6 @@ import JSZip from "jszip"; import validate from "validate.js"; +import { version as sdkVersion } from "../../package.json"; (function biometricKyc() { "use strict"; @@ -770,7 +771,7 @@ import validate from "validate.js"; async function getUploadURL() { const payload = { source_sdk: config.sdk || "hosted_web", - source_sdk_version: config.sdk_version || "v1.1.0", + source_sdk_version: config.sdk_version || sdkVersion, file_name: `${config.product}.zip`, smile_client_id: config.partner_details.partner_id, callback_url: config.callback_url, diff --git a/src/js/doc-verification.js b/src/js/doc-verification.js index 2050bc3e..45bedcf0 100644 --- a/src/js/doc-verification.js +++ b/src/js/doc-verification.js @@ -1,4 +1,5 @@ import JSZip from "jszip"; +import { version as sdkVersion } from "../../package.json"; (function documentVerification() { "use strict"; @@ -385,7 +386,7 @@ import JSZip from "jszip"; async function getUploadURL() { const payload = { source_sdk: config.sdk || "hosted_web", - source_sdk_version: config.sdk_version || "v1.1.0", + source_sdk_version: config.sdk_version || sdkVersion, file_name: `${config.product}.zip`, smile_client_id: config.partner_details.partner_id, callback_url: config.callback_url, diff --git a/src/js/ekyc.js b/src/js/ekyc.js index c2a29749..0bebcf2f 100644 --- a/src/js/ekyc.js +++ b/src/js/ekyc.js @@ -1,4 +1,5 @@ import validate from "validate.js"; +import { version as sdkVersion } from "../../package.json"; (function eKYC() { "use strict"; @@ -724,7 +725,7 @@ import validate from "validate.js"; callback_url, token, source_sdk: config.sdk || "hosted_web", - source_sdk_version: config.sdk_version || "v1.1.0", + source_sdk_version: config.sdk_version || sdkVersion, partner_params: { ...partner_params, job_type: 5, diff --git a/src/js/enhanced-document-verification.js b/src/js/enhanced-document-verification.js index 57f53b28..7ed834b0 100644 --- a/src/js/enhanced-document-verification.js +++ b/src/js/enhanced-document-verification.js @@ -1,4 +1,5 @@ import JSZip from "jszip"; +import { version as sdkVersion } from "../../package.json"; (function enhancedDocumentVerification() { "use strict"; @@ -379,7 +380,7 @@ import JSZip from "jszip"; async function getUploadURL() { const payload = { source_sdk: config.sdk || "hosted_web", - source_sdk_version: config.sdk_version || "v1.1.0", + source_sdk_version: config.sdk_version || sdkVersion, file_name: `${config.product}.zip`, smile_client_id: config.partner_details.partner_id, callback_url: config.callback_url, diff --git a/src/js/smartselfie-auth.js b/src/js/smartselfie-auth.js index a8c414fe..0f70fc78 100644 --- a/src/js/smartselfie-auth.js +++ b/src/js/smartselfie-auth.js @@ -1,4 +1,5 @@ import JSZip from "jszip"; +import { version as sdkVersion } from "../../package.json"; (function SmartSelfie() { "use strict"; @@ -186,7 +187,7 @@ import JSZip from "jszip"; async function getUploadURL() { const payload = { source_sdk: config.sdk || "hosted_web", - source_sdk_version: config.sdk_version || "v1.1.0", + source_sdk_version: config.sdk_version || sdkVersion, file_name: `${config.product}.zip`, smile_client_id: config.partner_details.partner_id, callback_url: config.callback_url,