@regulaforensics/idv 3.10.231-beta → 3.10.240-nightly
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/Package.swift +1 -1
- package/android/build.gradle.kts +1 -1
- package/android/cordova.gradle.kts +1 -1
- package/examples/capacitor/README.md +2 -2
- package/examples/capacitor/package-lock.json +2517 -0
- package/examples/capacitor/package.json +5 -5
- package/examples/capacitor/src/main.tsx +50 -28
- package/examples/ionic/README.md +2 -2
- package/examples/ionic/package-lock.json +14067 -0
- package/examples/ionic/package.json +5 -5
- package/examples/ionic/src/main.tsx +50 -28
- package/examples/react_native/README.md +2 -2
- package/examples/react_native/package-lock.json +7258 -0
- package/examples/react_native/package.json +5 -5
- package/examples/react_native/src/main.tsx +50 -28
- package/package.json +1 -1
- package/plugin.xml +2 -2
- package/react-native-idv.podspec +2 -2
- package/test/package-lock.json +2 -5
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
"start": "expo start --port \"$npm_package_config_metroPort\""
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@regulaforensics/idv": "3.10.
|
|
12
|
-
"@regulaforensics/idv-module-document-reader": "3.10.
|
|
13
|
-
"@regulaforensics/idv-module-face": "3.10.
|
|
14
|
-
"@regulaforensics/document-reader-core-fullauthrfid": "9.9.
|
|
15
|
-
"@regulaforensics/face-core-basic": "8.4.
|
|
11
|
+
"@regulaforensics/idv": "3.10.240-nightly",
|
|
12
|
+
"@regulaforensics/idv-module-document-reader": "3.10.290-nightly",
|
|
13
|
+
"@regulaforensics/idv-module-face": "3.10.291-nightly",
|
|
14
|
+
"@regulaforensics/document-reader-core-fullauthrfid": "9.9.3258-nightly",
|
|
15
|
+
"@regulaforensics/face-core-basic": "8.4.879-nightly",
|
|
16
16
|
"expo": "58.0.0-preview.3",
|
|
17
17
|
"expo-dev-client": "58.0.3",
|
|
18
18
|
"expo-build-properties": "58.0.3",
|
|
@@ -9,29 +9,65 @@ const password = "password_placeholder"
|
|
|
9
9
|
const tokenUrl = "token_placeholder"
|
|
10
10
|
const apiKey = "api_key_placeholder"
|
|
11
11
|
|
|
12
|
-
var idv = IDV.instance
|
|
13
12
|
var selectedWorkflow = ""
|
|
14
|
-
|
|
13
|
+
|
|
14
|
+
var idv = IDV.instance
|
|
15
|
+
var workflowFilter: string[] = []
|
|
15
16
|
|
|
16
17
|
async function init() {
|
|
18
|
+
setStatus("Initializing...")
|
|
17
19
|
var [_, iError] = await idv.initialize()
|
|
18
20
|
if (handleException(iError, "initialize")) return
|
|
19
21
|
|
|
20
|
-
var
|
|
22
|
+
var login = ({
|
|
21
23
|
[Configuration.credentials]: async () => await configureWithCredentials(),
|
|
22
24
|
[Configuration.token]: async () => await configureWithToken(),
|
|
23
25
|
[Configuration.apiKey]: async () => await configureApiKey(),
|
|
24
26
|
})[loginType]!
|
|
25
|
-
if (!await
|
|
27
|
+
if (!await login()) return
|
|
28
|
+
|
|
29
|
+
if (selectedWorkflow.length > 0) {
|
|
30
|
+
workflowFilter = [] // Reset the filter in case both workflow and filter are specified.
|
|
31
|
+
// Show a list of 1 element just to show the workflow name.
|
|
32
|
+
var workflow = await prepareSelectedWorkflow()
|
|
33
|
+
if (workflow != null) setWorkflows([workflow])
|
|
34
|
+
return
|
|
35
|
+
}
|
|
36
|
+
if (workflowFilter.length > 0) {
|
|
37
|
+
showWorkflowList()
|
|
38
|
+
return
|
|
39
|
+
}
|
|
40
|
+
setStatus("No workflow selected!")
|
|
41
|
+
setDescription("Manually set `selectedWorkflow` to your workflow ID")
|
|
42
|
+
}
|
|
26
43
|
|
|
27
|
-
|
|
44
|
+
async function showWorkflowList() {
|
|
45
|
+
setStatus("Fetching workflows...")
|
|
46
|
+
let [wfs, error] = await idv.getWorkflows()
|
|
28
47
|
if (handleException(error, "getWorkflows")) return
|
|
29
|
-
|
|
30
|
-
|
|
48
|
+
wfs = workflowFilter.flatMap(id => wfs!.filter(wf => wf.id === id))
|
|
49
|
+
if (wfs.length > 0) {
|
|
50
|
+
setWorkflows(wfs)
|
|
51
|
+
return
|
|
31
52
|
}
|
|
53
|
+
setStatus("Empty workflow list!")
|
|
54
|
+
setDescription("No workflows remain after filtration")
|
|
55
|
+
}
|
|
32
56
|
|
|
33
|
-
|
|
34
|
-
setStatus("
|
|
57
|
+
async function prepareSelectedWorkflow() {
|
|
58
|
+
setStatus("Preparing Workflow...")
|
|
59
|
+
const [workflow, prepareError] = await idv.prepareWorkflow({ workflowId: selectedWorkflow })
|
|
60
|
+
handleException(prepareError, "prepareWorkflow")
|
|
61
|
+
return workflow
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
async function startWorkflow(): Promise<void> {
|
|
65
|
+
// If workflow is chosen from the list then it's not prepared yet.
|
|
66
|
+
if (workflowFilter.length > 0 && await prepareSelectedWorkflow() == null) return
|
|
67
|
+
var [result, error] = await idv.startWorkflow()
|
|
68
|
+
if (handleException(error, "startWorkflow")) return
|
|
69
|
+
setStatus("Success")
|
|
70
|
+
setDescription(`SessionID: ${result?.sessionId}`)
|
|
35
71
|
}
|
|
36
72
|
|
|
37
73
|
async function configureWithCredentials(): Promise<boolean> {
|
|
@@ -45,9 +81,10 @@ async function configureWithCredentials(): Promise<boolean> {
|
|
|
45
81
|
}
|
|
46
82
|
|
|
47
83
|
async function configureWithToken(): Promise<boolean> {
|
|
48
|
-
var [
|
|
84
|
+
var [workflowIds, error] = await idv.configureWithToken({ url: tokenUrl })
|
|
49
85
|
if (handleException(error, "configureWithToken")) return false
|
|
50
|
-
|
|
86
|
+
// Filter the IDs to the ones allowed by the token.
|
|
87
|
+
workflowFilter = workflowFilter.filter(wf => workflowIds!.includes(wf))
|
|
51
88
|
return true
|
|
52
89
|
}
|
|
53
90
|
|
|
@@ -57,20 +94,6 @@ async function configureApiKey(): Promise<boolean> {
|
|
|
57
94
|
return success
|
|
58
95
|
}
|
|
59
96
|
|
|
60
|
-
async function startWorkflow(): Promise<void> {
|
|
61
|
-
if (selectedWorkflow.length == 0) return
|
|
62
|
-
setStatus("Preparing Workflow...")
|
|
63
|
-
|
|
64
|
-
var [_, prepareError] = await idv.prepareWorkflow({ workflowId: selectedWorkflow })
|
|
65
|
-
if (handleException(prepareError, "prepareWorkflow")) return
|
|
66
|
-
|
|
67
|
-
var [result, error] = await idv.startWorkflow()
|
|
68
|
-
if (handleException(error, "startWorkflow")) return
|
|
69
|
-
|
|
70
|
-
setStatus("Success")
|
|
71
|
-
setDescription(`SessionID: ${result?.sessionId}`)
|
|
72
|
-
}
|
|
73
|
-
|
|
74
97
|
function handleException(error?: string | null, tag?: string): boolean {
|
|
75
98
|
if (error == null) return false
|
|
76
99
|
setStatus(`Error - IDV.${tag}()`)
|
|
@@ -97,9 +120,8 @@ var workflows: Workflow[] = []
|
|
|
97
120
|
function setWorkflows(data: Workflow[]) {
|
|
98
121
|
var radioGroup = document.getElementById("radio-group")!
|
|
99
122
|
workflows = data
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
123
|
+
selectedWorkflow = workflows[0].id
|
|
124
|
+
setStatus("Ready")
|
|
103
125
|
|
|
104
126
|
data.forEach(item => {
|
|
105
127
|
var checked = selectedWorkflow == item.id ? "checked" : ""
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@regulaforensics/idv",
|
|
3
|
-
"version": "3.10.
|
|
3
|
+
"version": "3.10.240-nightly",
|
|
4
4
|
"description": "This is an npm module for Regula IDV, which unifies access to all Regula products. This plugin makes possible to use it with react-native, cordova and capacitor applications. Supports Android and iOS.",
|
|
5
5
|
"main": "www/react-native/index.js",
|
|
6
6
|
"module": "www/capacitor/index.js",
|
package/plugin.xml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<?xml version='1.0' encoding='utf-8'?>
|
|
2
|
-
<plugin id="@regulaforensics/idv" version="3.10.
|
|
2
|
+
<plugin id="@regulaforensics/idv" version="3.10.240-nightly" xmlns="http://apache.org/cordova/ns/plugins/1.0">
|
|
3
3
|
<name>IDV</name>
|
|
4
4
|
<description>Cordova plugin for Regula IDV</description>
|
|
5
5
|
<license>commercial</license>
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
<source url="https://github.com/regulaforensics/podspecs.git" />
|
|
27
27
|
</config>
|
|
28
28
|
<pods>
|
|
29
|
-
<pod name="
|
|
29
|
+
<pod name="IDVSDKNightly" spec="3.10.2102" nospm="true" />
|
|
30
30
|
</pods>
|
|
31
31
|
</podspec>
|
|
32
32
|
</platform>
|
package/react-native-idv.podspec
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Pod::Spec.new do |s|
|
|
2
2
|
s.name = 'react-native-idv'
|
|
3
|
-
s.version = '3.10.
|
|
3
|
+
s.version = '3.10.240-nightly'
|
|
4
4
|
s.summary = 'Regula React Native plugin.'
|
|
5
5
|
s.license = 'commercial'
|
|
6
6
|
s.authors = { 'RegulaForensics' => 'support@regulaforensics.com' }
|
|
@@ -9,6 +9,6 @@ Pod::Spec.new do |s|
|
|
|
9
9
|
s.ios.deployment_target = '15.0'
|
|
10
10
|
s.source_files = [ 'ios/*.swift', 'ios/RN*.m' ]
|
|
11
11
|
s.exclude_files = [ 'ios/CDVIDV.swift' ]
|
|
12
|
-
s.dependency '
|
|
12
|
+
s.dependency 'IDVSDKNightly', '3.10.2102'
|
|
13
13
|
s.dependency 'React'
|
|
14
14
|
end
|
package/test/package-lock.json
CHANGED
|
@@ -13,12 +13,9 @@
|
|
|
13
13
|
},
|
|
14
14
|
"..": {
|
|
15
15
|
"name": "@regulaforensics/idv",
|
|
16
|
-
"version": "
|
|
16
|
+
"version": "1.0.0",
|
|
17
17
|
"dev": true,
|
|
18
|
-
"license": "commercial"
|
|
19
|
-
"dependencies": {
|
|
20
|
-
"@expo/config-plugins": "^10.0.0"
|
|
21
|
-
}
|
|
18
|
+
"license": "commercial"
|
|
22
19
|
},
|
|
23
20
|
"node_modules/@esbuild/aix-ppc64": {
|
|
24
21
|
"version": "0.25.9",
|