smartcomply-web-sdk 1.0.92 → 1.0.94
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/Smartcomply.d.ts +1 -1
- package/dist/client/Smartcomply.js +1 -1
- package/dist/esm/client/Smartcomply.d.ts +1 -1
- package/dist/esm/client/Smartcomply.js +1 -1
- package/dist/esm/flow/SmartComplyFlow.d.ts +19 -1
- package/dist/esm/flow/SmartComplyFlow.d.ts.map +1 -1
- package/dist/esm/flow/SmartComplyFlow.js +38 -9
- package/dist/esm/flow/SmartComplyFlow.js.map +1 -1
- package/dist/esm/types/liveness.d.ts +1 -0
- package/dist/esm/types/liveness.d.ts.map +1 -1
- package/dist/flow/SmartComplyFlow.d.ts +19 -1
- package/dist/flow/SmartComplyFlow.d.ts.map +1 -1
- package/dist/flow/SmartComplyFlow.js +39 -9
- package/dist/flow/SmartComplyFlow.js.map +1 -1
- package/dist/smartcomply.browser.js +8 -7
- package/dist/smartcomply.browser.js.map +3 -3
- package/dist/types/liveness.d.ts +1 -0
- package/dist/types/liveness.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -5837,7 +5837,7 @@ var SmartComplySDK = (() => {
|
|
|
5837
5837
|
* CDN tag they installed with (e.g. @1, which floats to the latest
|
|
5838
5838
|
* matching release) actually resolved to the version they expect.
|
|
5839
5839
|
*/
|
|
5840
|
-
_SmartComply.VERSION = "1.0.
|
|
5840
|
+
_SmartComply.VERSION = "1.0.94";
|
|
5841
5841
|
var SmartComply = _SmartComply;
|
|
5842
5842
|
|
|
5843
5843
|
// src/flow/theme.ts
|
|
@@ -7361,6 +7361,10 @@ var SmartComplySDK = (() => {
|
|
|
7361
7361
|
function isUploadFieldType(type) {
|
|
7362
7362
|
return type === "upload" || type === "image" || type === "file";
|
|
7363
7363
|
}
|
|
7364
|
+
function isChannelDocumentFlow(idType, globalDocFlow) {
|
|
7365
|
+
if (typeof idType === "string") return globalDocFlow;
|
|
7366
|
+
return (idType.fields || []).some((f2) => isUploadFieldType(f2.type));
|
|
7367
|
+
}
|
|
7364
7368
|
function isResumeLinkErrorMessage(message) {
|
|
7365
7369
|
return /resume link|resubmit link/i.test(message);
|
|
7366
7370
|
}
|
|
@@ -7883,6 +7887,7 @@ var SmartComplySDK = (() => {
|
|
|
7883
7887
|
// legitimately need document_capture.
|
|
7884
7888
|
info.failure_stage === "data_match") {
|
|
7885
7889
|
this.selectedCountry = info.country || this.selectedCountry || "global";
|
|
7890
|
+
this.identityCheckId = info.identity_check_id ?? null;
|
|
7886
7891
|
return "liveness";
|
|
7887
7892
|
}
|
|
7888
7893
|
if (info.failure_stage === "document" && info.country && info.identifier_type) {
|
|
@@ -8215,8 +8220,7 @@ var SmartComplySDK = (() => {
|
|
|
8215
8220
|
for (const idType of idTypes) {
|
|
8216
8221
|
const typeName = typeof idType === "string" ? idType : idType.name;
|
|
8217
8222
|
const typeCode = typeof idType === "string" ? idType : idType.code || idType.name;
|
|
8218
|
-
const
|
|
8219
|
-
const isThisDocFlow = channelFields.some((f2) => isUploadFieldType(f2.type)) || globalDocFlow;
|
|
8223
|
+
const isThisDocFlow = isChannelDocumentFlow(idType, globalDocFlow);
|
|
8220
8224
|
const info = resolveIdTypeInfo(typeName, isThisDocFlow);
|
|
8221
8225
|
const requiresBackFromBackend = typeof idType !== "string" ? idType.requires_back_side : void 0;
|
|
8222
8226
|
const requiresBack = requiresBackFromBackend ?? info.requiresBack;
|
|
@@ -8245,10 +8249,7 @@ var SmartComplySDK = (() => {
|
|
|
8245
8249
|
this.selectedChannelId = idType.id;
|
|
8246
8250
|
this.selectedChannelFields = idType.fields || [];
|
|
8247
8251
|
}
|
|
8248
|
-
const
|
|
8249
|
-
const vType = this.sdkConfig?.verification_type;
|
|
8250
|
-
const vTypes = vType ? Array.isArray(vType) ? vType : [vType] : [];
|
|
8251
|
-
const isDocChannel = hasUpload || vTypes.length > 0 && vTypes.includes("document_verification");
|
|
8252
|
+
const isDocChannel = isChannelDocumentFlow(idType, globalDocFlow);
|
|
8252
8253
|
this.showStep(isDocChannel ? "document_capture" : "id_input");
|
|
8253
8254
|
}
|
|
8254
8255
|
);
|