Skip to content

Commit

Permalink
read package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
mldangelo committed Oct 4, 2023
1 parent 9b73a9d commit 808f0bc
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/js/basic-kyc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import validate from "validate.js";
import { version as sdkVersion } from "../../package.json";

(function basicKyc() {
"use strict";
Expand Down Expand Up @@ -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`;
Expand Down
3 changes: 2 additions & 1 deletion src/js/biometric-kyc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import JSZip from "jszip";
import validate from "validate.js";
import { version as sdkVersion } from "../../package.json";

(function biometricKyc() {
"use strict";
Expand Down Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion src/js/doc-verification.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import JSZip from "jszip";
import { version as sdkVersion } from "../../package.json";

(function documentVerification() {
"use strict";
Expand Down Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion src/js/ekyc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import validate from "validate.js";
import { version as sdkVersion } from "../../package.json";

(function eKYC() {
"use strict";
Expand Down Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion src/js/enhanced-document-verification.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import JSZip from "jszip";
import { version as sdkVersion } from "../../package.json";

(function enhancedDocumentVerification() {
"use strict";
Expand Down Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion src/js/smartselfie-auth.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import JSZip from "jszip";
import { version as sdkVersion } from "../../package.json";

(function SmartSelfie() {
"use strict";
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 808f0bc

Please sign in to comment.