@regulaforensics/idv 3.2.59-beta → 3.2.69-beta
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/RNIDV.podspec +3 -3
- package/android/CVDIDV.kt +3 -0
- package/android/build.gradle +1 -1
- package/android/cordova.gradle +1 -1
- package/android/src/main/java/com/regula/plugin/idv/JSONConstructor.kt +32 -0
- package/android/src/main/java/com/regula/plugin/idv/Main.kt +21 -1
- package/android/src/main/java/com/regula/plugin/idv/RNIDVModule.kt +3 -0
- package/examples/capacitor/android/app/src/main/AndroidManifest.xml +3 -0
- package/examples/capacitor/index.tsx +5 -5
- package/examples/capacitor/ios/App/App/Info.plist +8 -6
- package/examples/capacitor/ios/App/App.xcodeproj/project.pbxproj +4 -0
- package/examples/capacitor/package-lock.json +12 -12
- package/examples/capacitor/package.json +7 -7
- package/examples/capacitor/src/main.html +1 -1
- package/examples/capacitor/src/main.tsx +2 -2
- package/examples/ionic/config.xml +5 -0
- package/examples/ionic/index.tsx +5 -1
- package/examples/ionic/package-lock.json +4742 -2430
- package/examples/ionic/package.json +16 -16
- package/examples/ionic/src/main.html +1 -1
- package/examples/ionic/src/main.tsx +2 -2
- package/examples/react_native/app.config.ts +6 -1
- package/examples/react_native/index.html +5 -4
- package/examples/react_native/package-lock.json +40 -40
- package/examples/react_native/package.json +7 -7
- package/examples/react_native/src/main.html +1 -1
- package/examples/react_native/src/main.tsx +2 -2
- package/ios/CVDIDV.swift +26 -3
- package/ios/JSONConstructor.swift +24 -2
- package/ios/Main.swift +28 -12
- package/ios/RNIDV.m +11 -0
- package/ios/RNIDV.swift +35 -12
- package/ios/Utils.swift +0 -4
- package/package.json +1 -1
- package/plugin.xml +2 -2
- package/test/json.tsx +9 -0
- package/test/package-lock.json +1 -1
- package/test/test.tsx +4 -2
- package/www/capacitor/config/send_data_config.js +28 -0
- package/www/capacitor/config/start_session_config.js +24 -0
- package/www/capacitor/index.js +16 -8
- package/www/cordova.js +141 -43
- package/www/react-native/config/send_data_config.js +28 -0
- package/www/react-native/config/start_session_config.js +24 -0
- package/www/react-native/index.js +16 -8
- package/www/types/config/send_data_config.d.ts +5 -0
- package/www/types/config/start_session_config.d.ts +4 -0
- package/www/types/index.d.ts +7 -8
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export class SendDataConfig {
|
|
2
|
+
sessionId
|
|
3
|
+
step
|
|
4
|
+
data
|
|
5
|
+
|
|
6
|
+
constructor(params) {
|
|
7
|
+
this.sessionId = params?.sessionId
|
|
8
|
+
this.step = params?.step
|
|
9
|
+
this.data = params?.data
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
static fromJson(jsonObject) {
|
|
13
|
+
if (jsonObject == null) return null
|
|
14
|
+
const result = new SendDataConfig()
|
|
15
|
+
result.sessionId = jsonObject["sessionId"]
|
|
16
|
+
result.step = jsonObject["step"]
|
|
17
|
+
result.data = jsonObject["data"]
|
|
18
|
+
return result
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
toJson() {
|
|
22
|
+
return {
|
|
23
|
+
"sessionId": this.sessionId,
|
|
24
|
+
"step": this.step,
|
|
25
|
+
"data": this.data,
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export class StartSessionConfig {
|
|
2
|
+
workflowId
|
|
3
|
+
metadata
|
|
4
|
+
|
|
5
|
+
constructor(params) {
|
|
6
|
+
this.workflowId = params?.workflowId
|
|
7
|
+
this.metadata = params?.metadata
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
static fromJson(jsonObject) {
|
|
11
|
+
if (jsonObject == null) return null
|
|
12
|
+
const result = new StartSessionConfig()
|
|
13
|
+
result.workflowId = jsonObject["workflowId"]
|
|
14
|
+
result.metadata = jsonObject["metadata"]
|
|
15
|
+
return result
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
toJson() {
|
|
19
|
+
return {
|
|
20
|
+
"workflowId": this.workflowId,
|
|
21
|
+
"metadata": this.metadata,
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
package/www/capacitor/index.js
CHANGED
|
@@ -5,17 +5,13 @@ import { CredentialsConnectionConfig } from './config/credentials_connection_con
|
|
|
5
5
|
import { ApiKeyConnectionConfig } from './config/api_key_connection_config'
|
|
6
6
|
import { PrepareWorkflowConfig } from './config/prepare_workflow_config'
|
|
7
7
|
import { StartWorkflowConfig } from './config/start_workflow_config'
|
|
8
|
+
import { StartSessionConfig } from './config/start_session_config'
|
|
9
|
+
import { SendDataConfig } from './config/send_data_config'
|
|
8
10
|
import { Workflow } from './model/workflow'
|
|
9
11
|
import { WorkflowResult } from './model/workflow_result'
|
|
12
|
+
import { WorkflowStep } from './model/workflow_step'
|
|
10
13
|
|
|
11
|
-
export { TokenConnectionConfig }
|
|
12
|
-
export { CredentialsConnectionConfig }
|
|
13
|
-
export { ApiKeyConnectionConfig }
|
|
14
|
-
export { PrepareWorkflowConfig }
|
|
15
|
-
export { StartWorkflowConfig }
|
|
16
|
-
export { Workflow }
|
|
17
|
-
export { WorkflowResult }
|
|
18
|
-
export { WorkflowStep } from './model/workflow_step'
|
|
14
|
+
export { TokenConnectionConfig, CredentialsConnectionConfig, ApiKeyConnectionConfig, PrepareWorkflowConfig, StartWorkflowConfig, StartSessionConfig, SendDataConfig, Workflow, WorkflowResult, WorkflowStep }
|
|
19
15
|
|
|
20
16
|
export class IDV {
|
|
21
17
|
static get instance() { return IDV._instance }
|
|
@@ -88,6 +84,18 @@ export class IDV {
|
|
|
88
84
|
return result
|
|
89
85
|
})
|
|
90
86
|
}
|
|
87
|
+
|
|
88
|
+
async startSession(config) {
|
|
89
|
+
config = ensureInstance(config, StartSessionConfig)
|
|
90
|
+
const response = await exec('startSession', [config.toJson()])
|
|
91
|
+
return completionFromResponse(response)
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
async sendData(config) {
|
|
95
|
+
config = ensureInstance(config, SendDataConfig)
|
|
96
|
+
const response = await exec('sendData', [config.toJson()])
|
|
97
|
+
return completionFromResponse(response)
|
|
98
|
+
}
|
|
91
99
|
}
|
|
92
100
|
|
|
93
101
|
export const SessionRestoreMode = {
|
package/www/cordova.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
/******/ "use strict";
|
|
3
3
|
/******/ var __webpack_modules__ = ({
|
|
4
4
|
|
|
5
|
-
/***/ "./src/config/api_key_connection_config.js"
|
|
5
|
+
/***/ "./src/config/api_key_connection_config.js"
|
|
6
6
|
/*!*************************************************!*\
|
|
7
7
|
!*** ./src/config/api_key_connection_config.js ***!
|
|
8
8
|
\*************************************************/
|
|
9
|
-
|
|
9
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
10
10
|
|
|
11
11
|
__webpack_require__.r(__webpack_exports__);
|
|
12
12
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
@@ -46,13 +46,13 @@ class ApiKeyConnectionConfig {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
/***/ }
|
|
49
|
+
/***/ },
|
|
50
50
|
|
|
51
|
-
/***/ "./src/config/credentials_connection_config.js"
|
|
51
|
+
/***/ "./src/config/credentials_connection_config.js"
|
|
52
52
|
/*!*****************************************************!*\
|
|
53
53
|
!*** ./src/config/credentials_connection_config.js ***!
|
|
54
54
|
\*****************************************************/
|
|
55
|
-
|
|
55
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
56
56
|
|
|
57
57
|
__webpack_require__.r(__webpack_exports__);
|
|
58
58
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
@@ -92,13 +92,13 @@ class CredentialsConnectionConfig {
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
|
|
95
|
-
/***/ }
|
|
95
|
+
/***/ },
|
|
96
96
|
|
|
97
|
-
/***/ "./src/config/prepare_workflow_config.js"
|
|
97
|
+
/***/ "./src/config/prepare_workflow_config.js"
|
|
98
98
|
/*!***********************************************!*\
|
|
99
99
|
!*** ./src/config/prepare_workflow_config.js ***!
|
|
100
100
|
\***********************************************/
|
|
101
|
-
|
|
101
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
102
102
|
|
|
103
103
|
__webpack_require__.r(__webpack_exports__);
|
|
104
104
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
@@ -126,13 +126,93 @@ class PrepareWorkflowConfig {
|
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
|
|
129
|
-
/***/ }
|
|
129
|
+
/***/ },
|
|
130
130
|
|
|
131
|
-
/***/ "./src/config/
|
|
131
|
+
/***/ "./src/config/send_data_config.js"
|
|
132
|
+
/*!****************************************!*\
|
|
133
|
+
!*** ./src/config/send_data_config.js ***!
|
|
134
|
+
\****************************************/
|
|
135
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
136
|
+
|
|
137
|
+
__webpack_require__.r(__webpack_exports__);
|
|
138
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
139
|
+
/* harmony export */ SendDataConfig: () => (/* binding */ SendDataConfig)
|
|
140
|
+
/* harmony export */ });
|
|
141
|
+
class SendDataConfig {
|
|
142
|
+
sessionId
|
|
143
|
+
step
|
|
144
|
+
data
|
|
145
|
+
|
|
146
|
+
constructor(params) {
|
|
147
|
+
this.sessionId = params?.sessionId
|
|
148
|
+
this.step = params?.step
|
|
149
|
+
this.data = params?.data
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
static fromJson(jsonObject) {
|
|
153
|
+
if (jsonObject == null) return null
|
|
154
|
+
const result = new SendDataConfig()
|
|
155
|
+
result.sessionId = jsonObject["sessionId"]
|
|
156
|
+
result.step = jsonObject["step"]
|
|
157
|
+
result.data = jsonObject["data"]
|
|
158
|
+
return result
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
toJson() {
|
|
162
|
+
return {
|
|
163
|
+
"sessionId": this.sessionId,
|
|
164
|
+
"step": this.step,
|
|
165
|
+
"data": this.data,
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
/***/ },
|
|
172
|
+
|
|
173
|
+
/***/ "./src/config/start_session_config.js"
|
|
174
|
+
/*!********************************************!*\
|
|
175
|
+
!*** ./src/config/start_session_config.js ***!
|
|
176
|
+
\********************************************/
|
|
177
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
178
|
+
|
|
179
|
+
__webpack_require__.r(__webpack_exports__);
|
|
180
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
181
|
+
/* harmony export */ StartSessionConfig: () => (/* binding */ StartSessionConfig)
|
|
182
|
+
/* harmony export */ });
|
|
183
|
+
class StartSessionConfig {
|
|
184
|
+
workflowId
|
|
185
|
+
metadata
|
|
186
|
+
|
|
187
|
+
constructor(params) {
|
|
188
|
+
this.workflowId = params?.workflowId
|
|
189
|
+
this.metadata = params?.metadata
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
static fromJson(jsonObject) {
|
|
193
|
+
if (jsonObject == null) return null
|
|
194
|
+
const result = new StartSessionConfig()
|
|
195
|
+
result.workflowId = jsonObject["workflowId"]
|
|
196
|
+
result.metadata = jsonObject["metadata"]
|
|
197
|
+
return result
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
toJson() {
|
|
201
|
+
return {
|
|
202
|
+
"workflowId": this.workflowId,
|
|
203
|
+
"metadata": this.metadata,
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
/***/ },
|
|
210
|
+
|
|
211
|
+
/***/ "./src/config/start_workflow_config.js"
|
|
132
212
|
/*!*********************************************!*\
|
|
133
213
|
!*** ./src/config/start_workflow_config.js ***!
|
|
134
214
|
\*********************************************/
|
|
135
|
-
|
|
215
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
136
216
|
|
|
137
217
|
__webpack_require__.r(__webpack_exports__);
|
|
138
218
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
@@ -164,13 +244,13 @@ class StartWorkflowConfig {
|
|
|
164
244
|
}
|
|
165
245
|
|
|
166
246
|
|
|
167
|
-
/***/ }
|
|
247
|
+
/***/ },
|
|
168
248
|
|
|
169
|
-
/***/ "./src/config/token_connection_config.js"
|
|
249
|
+
/***/ "./src/config/token_connection_config.js"
|
|
170
250
|
/*!***********************************************!*\
|
|
171
251
|
!*** ./src/config/token_connection_config.js ***!
|
|
172
252
|
\***********************************************/
|
|
173
|
-
|
|
253
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
174
254
|
|
|
175
255
|
__webpack_require__.r(__webpack_exports__);
|
|
176
256
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
@@ -198,13 +278,13 @@ class TokenConnectionConfig {
|
|
|
198
278
|
}
|
|
199
279
|
|
|
200
280
|
|
|
201
|
-
/***/ }
|
|
281
|
+
/***/ },
|
|
202
282
|
|
|
203
|
-
/***/ "./src/internal/bridge.js"
|
|
283
|
+
/***/ "./src/internal/bridge.js"
|
|
204
284
|
/*!********************************!*\
|
|
205
285
|
!*** ./src/internal/bridge.js ***!
|
|
206
286
|
\********************************/
|
|
207
|
-
|
|
287
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
208
288
|
|
|
209
289
|
__webpack_require__.r(__webpack_exports__);
|
|
210
290
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
@@ -247,13 +327,13 @@ function setDidContinueRemoteSessionCompletion(completion) {
|
|
|
247
327
|
}
|
|
248
328
|
|
|
249
329
|
|
|
250
|
-
/***/ }
|
|
330
|
+
/***/ },
|
|
251
331
|
|
|
252
|
-
/***/ "./src/internal/cordova.js"
|
|
332
|
+
/***/ "./src/internal/cordova.js"
|
|
253
333
|
/*!*********************************!*\
|
|
254
334
|
!*** ./src/internal/cordova.js ***!
|
|
255
335
|
\*********************************/
|
|
256
|
-
|
|
336
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
257
337
|
|
|
258
338
|
__webpack_require__.r(__webpack_exports__);
|
|
259
339
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
@@ -278,13 +358,13 @@ class NativeEventEmitter {
|
|
|
278
358
|
}
|
|
279
359
|
}
|
|
280
360
|
|
|
281
|
-
/***/ }
|
|
361
|
+
/***/ },
|
|
282
362
|
|
|
283
|
-
/***/ "./src/model/workflow.js"
|
|
363
|
+
/***/ "./src/model/workflow.js"
|
|
284
364
|
/*!*******************************!*\
|
|
285
365
|
!*** ./src/model/workflow.js ***!
|
|
286
366
|
\*******************************/
|
|
287
|
-
|
|
367
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
288
368
|
|
|
289
369
|
__webpack_require__.r(__webpack_exports__);
|
|
290
370
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
@@ -320,13 +400,13 @@ class Workflow {
|
|
|
320
400
|
}
|
|
321
401
|
|
|
322
402
|
|
|
323
|
-
/***/ }
|
|
403
|
+
/***/ },
|
|
324
404
|
|
|
325
|
-
/***/ "./src/model/workflow_result.js"
|
|
405
|
+
/***/ "./src/model/workflow_result.js"
|
|
326
406
|
/*!**************************************!*\
|
|
327
407
|
!*** ./src/model/workflow_result.js ***!
|
|
328
408
|
\**************************************/
|
|
329
|
-
|
|
409
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
330
410
|
|
|
331
411
|
__webpack_require__.r(__webpack_exports__);
|
|
332
412
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
@@ -356,13 +436,13 @@ class WorkflowResult {
|
|
|
356
436
|
}
|
|
357
437
|
|
|
358
438
|
|
|
359
|
-
/***/ }
|
|
439
|
+
/***/ },
|
|
360
440
|
|
|
361
|
-
/***/ "./src/model/workflow_step.js"
|
|
441
|
+
/***/ "./src/model/workflow_step.js"
|
|
362
442
|
/*!************************************!*\
|
|
363
443
|
!*** ./src/model/workflow_step.js ***!
|
|
364
444
|
\************************************/
|
|
365
|
-
|
|
445
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
366
446
|
|
|
367
447
|
__webpack_require__.r(__webpack_exports__);
|
|
368
448
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
@@ -389,7 +469,7 @@ class WorkflowStep {
|
|
|
389
469
|
}
|
|
390
470
|
|
|
391
471
|
|
|
392
|
-
/***/ }
|
|
472
|
+
/***/ }
|
|
393
473
|
|
|
394
474
|
/******/ });
|
|
395
475
|
/************************************************************************/
|
|
@@ -403,6 +483,12 @@ class WorkflowStep {
|
|
|
403
483
|
/******/ if (cachedModule !== undefined) {
|
|
404
484
|
/******/ return cachedModule.exports;
|
|
405
485
|
/******/ }
|
|
486
|
+
/******/ // Check if module exists (development only)
|
|
487
|
+
/******/ if (__webpack_modules__[moduleId] === undefined) {
|
|
488
|
+
/******/ var e = new Error("Cannot find module '" + moduleId + "'");
|
|
489
|
+
/******/ e.code = 'MODULE_NOT_FOUND';
|
|
490
|
+
/******/ throw e;
|
|
491
|
+
/******/ }
|
|
406
492
|
/******/ // Create a new module (and put it into the cache)
|
|
407
493
|
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
408
494
|
/******/ // no module.id needed
|
|
@@ -459,12 +545,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
459
545
|
/* harmony export */ CredentialsConnectionConfig: () => (/* reexport safe */ _config_credentials_connection_config__WEBPACK_IMPORTED_MODULE_2__.CredentialsConnectionConfig),
|
|
460
546
|
/* harmony export */ IDV: () => (/* binding */ IDV),
|
|
461
547
|
/* harmony export */ PrepareWorkflowConfig: () => (/* reexport safe */ _config_prepare_workflow_config__WEBPACK_IMPORTED_MODULE_4__.PrepareWorkflowConfig),
|
|
548
|
+
/* harmony export */ SendDataConfig: () => (/* reexport safe */ _config_send_data_config__WEBPACK_IMPORTED_MODULE_7__.SendDataConfig),
|
|
462
549
|
/* harmony export */ SessionRestoreMode: () => (/* binding */ SessionRestoreMode),
|
|
550
|
+
/* harmony export */ StartSessionConfig: () => (/* reexport safe */ _config_start_session_config__WEBPACK_IMPORTED_MODULE_6__.StartSessionConfig),
|
|
463
551
|
/* harmony export */ StartWorkflowConfig: () => (/* reexport safe */ _config_start_workflow_config__WEBPACK_IMPORTED_MODULE_5__.StartWorkflowConfig),
|
|
464
552
|
/* harmony export */ TokenConnectionConfig: () => (/* reexport safe */ _config_token_connection_config__WEBPACK_IMPORTED_MODULE_1__.TokenConnectionConfig),
|
|
465
|
-
/* harmony export */ Workflow: () => (/* reexport safe */
|
|
466
|
-
/* harmony export */ WorkflowResult: () => (/* reexport safe */
|
|
467
|
-
/* harmony export */ WorkflowStep: () => (/* reexport safe */
|
|
553
|
+
/* harmony export */ Workflow: () => (/* reexport safe */ _model_workflow__WEBPACK_IMPORTED_MODULE_8__.Workflow),
|
|
554
|
+
/* harmony export */ WorkflowResult: () => (/* reexport safe */ _model_workflow_result__WEBPACK_IMPORTED_MODULE_9__.WorkflowResult),
|
|
555
|
+
/* harmony export */ WorkflowStep: () => (/* reexport safe */ _model_workflow_step__WEBPACK_IMPORTED_MODULE_10__.WorkflowStep)
|
|
468
556
|
/* harmony export */ });
|
|
469
557
|
/* harmony import */ var _internal_bridge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/bridge */ "./src/internal/bridge.js");
|
|
470
558
|
/* harmony import */ var _config_token_connection_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./config/token_connection_config */ "./src/config/token_connection_config.js");
|
|
@@ -472,13 +560,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
472
560
|
/* harmony import */ var _config_api_key_connection_config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./config/api_key_connection_config */ "./src/config/api_key_connection_config.js");
|
|
473
561
|
/* harmony import */ var _config_prepare_workflow_config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./config/prepare_workflow_config */ "./src/config/prepare_workflow_config.js");
|
|
474
562
|
/* harmony import */ var _config_start_workflow_config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./config/start_workflow_config */ "./src/config/start_workflow_config.js");
|
|
475
|
-
/* harmony import */ var
|
|
476
|
-
/* harmony import */ var
|
|
477
|
-
/* harmony import */ var
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
563
|
+
/* harmony import */ var _config_start_session_config__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./config/start_session_config */ "./src/config/start_session_config.js");
|
|
564
|
+
/* harmony import */ var _config_send_data_config__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./config/send_data_config */ "./src/config/send_data_config.js");
|
|
565
|
+
/* harmony import */ var _model_workflow__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./model/workflow */ "./src/model/workflow.js");
|
|
566
|
+
/* harmony import */ var _model_workflow_result__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./model/workflow_result */ "./src/model/workflow_result.js");
|
|
567
|
+
/* harmony import */ var _model_workflow_step__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./model/workflow_step */ "./src/model/workflow_step.js");
|
|
482
568
|
|
|
483
569
|
|
|
484
570
|
|
|
@@ -545,13 +631,13 @@ class IDV {
|
|
|
545
631
|
async prepareWorkflow(config) {
|
|
546
632
|
config = ensureInstance(config, _config_prepare_workflow_config__WEBPACK_IMPORTED_MODULE_4__.PrepareWorkflowConfig)
|
|
547
633
|
const response = await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)('prepareWorkflow', [config?.toJson()])
|
|
548
|
-
return completionFromResponse(response, json =>
|
|
634
|
+
return completionFromResponse(response, json => _model_workflow__WEBPACK_IMPORTED_MODULE_8__.Workflow.fromJson(json))
|
|
549
635
|
}
|
|
550
636
|
|
|
551
637
|
async startWorkflow(config) {
|
|
552
638
|
config = ensureInstance(config, _config_start_workflow_config__WEBPACK_IMPORTED_MODULE_5__.StartWorkflowConfig)
|
|
553
639
|
const response = await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)('startWorkflow', [config?.toJson()])
|
|
554
|
-
return completionFromResponse(response, json =>
|
|
640
|
+
return completionFromResponse(response, json => _model_workflow_result__WEBPACK_IMPORTED_MODULE_9__.WorkflowResult.fromJson(json))
|
|
555
641
|
}
|
|
556
642
|
|
|
557
643
|
async getWorkflows() {
|
|
@@ -559,12 +645,24 @@ class IDV {
|
|
|
559
645
|
return completionFromResponse(response, json => {
|
|
560
646
|
const result = []
|
|
561
647
|
if (json != null) for (const item of json) {
|
|
562
|
-
const workflow =
|
|
648
|
+
const workflow = _model_workflow__WEBPACK_IMPORTED_MODULE_8__.Workflow.fromJson(item)
|
|
563
649
|
if (workflow != null) result.push(workflow)
|
|
564
650
|
}
|
|
565
651
|
return result
|
|
566
652
|
})
|
|
567
653
|
}
|
|
654
|
+
|
|
655
|
+
async startSession(config) {
|
|
656
|
+
config = ensureInstance(config, _config_start_session_config__WEBPACK_IMPORTED_MODULE_6__.StartSessionConfig)
|
|
657
|
+
const response = await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)('startSession', [config.toJson()])
|
|
658
|
+
return completionFromResponse(response)
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
async sendData(config) {
|
|
662
|
+
config = ensureInstance(config, _config_send_data_config__WEBPACK_IMPORTED_MODULE_7__.SendDataConfig)
|
|
663
|
+
const response = await (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__.exec)('sendData', [config.toJson()])
|
|
664
|
+
return completionFromResponse(response)
|
|
665
|
+
}
|
|
568
666
|
}
|
|
569
667
|
|
|
570
668
|
const SessionRestoreMode = {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export class SendDataConfig {
|
|
2
|
+
sessionId
|
|
3
|
+
step
|
|
4
|
+
data
|
|
5
|
+
|
|
6
|
+
constructor(params) {
|
|
7
|
+
this.sessionId = params?.sessionId
|
|
8
|
+
this.step = params?.step
|
|
9
|
+
this.data = params?.data
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
static fromJson(jsonObject) {
|
|
13
|
+
if (jsonObject == null) return null
|
|
14
|
+
const result = new SendDataConfig()
|
|
15
|
+
result.sessionId = jsonObject["sessionId"]
|
|
16
|
+
result.step = jsonObject["step"]
|
|
17
|
+
result.data = jsonObject["data"]
|
|
18
|
+
return result
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
toJson() {
|
|
22
|
+
return {
|
|
23
|
+
"sessionId": this.sessionId,
|
|
24
|
+
"step": this.step,
|
|
25
|
+
"data": this.data,
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export class StartSessionConfig {
|
|
2
|
+
workflowId
|
|
3
|
+
metadata
|
|
4
|
+
|
|
5
|
+
constructor(params) {
|
|
6
|
+
this.workflowId = params?.workflowId
|
|
7
|
+
this.metadata = params?.metadata
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
static fromJson(jsonObject) {
|
|
11
|
+
if (jsonObject == null) return null
|
|
12
|
+
const result = new StartSessionConfig()
|
|
13
|
+
result.workflowId = jsonObject["workflowId"]
|
|
14
|
+
result.metadata = jsonObject["metadata"]
|
|
15
|
+
return result
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
toJson() {
|
|
19
|
+
return {
|
|
20
|
+
"workflowId": this.workflowId,
|
|
21
|
+
"metadata": this.metadata,
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -5,17 +5,13 @@ import { CredentialsConnectionConfig } from './config/credentials_connection_con
|
|
|
5
5
|
import { ApiKeyConnectionConfig } from './config/api_key_connection_config'
|
|
6
6
|
import { PrepareWorkflowConfig } from './config/prepare_workflow_config'
|
|
7
7
|
import { StartWorkflowConfig } from './config/start_workflow_config'
|
|
8
|
+
import { StartSessionConfig } from './config/start_session_config'
|
|
9
|
+
import { SendDataConfig } from './config/send_data_config'
|
|
8
10
|
import { Workflow } from './model/workflow'
|
|
9
11
|
import { WorkflowResult } from './model/workflow_result'
|
|
12
|
+
import { WorkflowStep } from './model/workflow_step'
|
|
10
13
|
|
|
11
|
-
export { TokenConnectionConfig }
|
|
12
|
-
export { CredentialsConnectionConfig }
|
|
13
|
-
export { ApiKeyConnectionConfig }
|
|
14
|
-
export { PrepareWorkflowConfig }
|
|
15
|
-
export { StartWorkflowConfig }
|
|
16
|
-
export { Workflow }
|
|
17
|
-
export { WorkflowResult }
|
|
18
|
-
export { WorkflowStep } from './model/workflow_step'
|
|
14
|
+
export { TokenConnectionConfig, CredentialsConnectionConfig, ApiKeyConnectionConfig, PrepareWorkflowConfig, StartWorkflowConfig, StartSessionConfig, SendDataConfig, Workflow, WorkflowResult, WorkflowStep }
|
|
19
15
|
|
|
20
16
|
export class IDV {
|
|
21
17
|
static get instance() { return IDV._instance }
|
|
@@ -88,6 +84,18 @@ export class IDV {
|
|
|
88
84
|
return result
|
|
89
85
|
})
|
|
90
86
|
}
|
|
87
|
+
|
|
88
|
+
async startSession(config) {
|
|
89
|
+
config = ensureInstance(config, StartSessionConfig)
|
|
90
|
+
const response = await exec('startSession', [config.toJson()])
|
|
91
|
+
return completionFromResponse(response)
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
async sendData(config) {
|
|
95
|
+
config = ensureInstance(config, SendDataConfig)
|
|
96
|
+
const response = await exec('sendData', [config.toJson()])
|
|
97
|
+
return completionFromResponse(response)
|
|
98
|
+
}
|
|
91
99
|
}
|
|
92
100
|
|
|
93
101
|
export const SessionRestoreMode = {
|
package/www/types/index.d.ts
CHANGED
|
@@ -3,18 +3,13 @@ import { CredentialsConnectionConfig } from './config/credentials_connection_con
|
|
|
3
3
|
import { ApiKeyConnectionConfig } from './config/api_key_connection_config'
|
|
4
4
|
import { PrepareWorkflowConfig } from './config/prepare_workflow_config'
|
|
5
5
|
import { StartWorkflowConfig } from './config/start_workflow_config'
|
|
6
|
+
import { StartSessionConfig } from './config/start_session_config'
|
|
7
|
+
import { SendDataConfig } from './config/send_data_config'
|
|
6
8
|
import { Workflow } from './model/workflow'
|
|
7
9
|
import { WorkflowResult } from './model/workflow_result'
|
|
8
10
|
import { WorkflowStep } from './model/workflow_step'
|
|
9
11
|
|
|
10
|
-
export { TokenConnectionConfig }
|
|
11
|
-
export { CredentialsConnectionConfig }
|
|
12
|
-
export { ApiKeyConnectionConfig }
|
|
13
|
-
export { PrepareWorkflowConfig }
|
|
14
|
-
export { StartWorkflowConfig }
|
|
15
|
-
export { Workflow }
|
|
16
|
-
export { WorkflowResult }
|
|
17
|
-
export { WorkflowStep }
|
|
12
|
+
export { TokenConnectionConfig, CredentialsConnectionConfig, ApiKeyConnectionConfig, PrepareWorkflowConfig, StartWorkflowConfig, StartSessionConfig, SendDataConfig, Workflow, WorkflowResult, WorkflowStep }
|
|
18
13
|
|
|
19
14
|
/**
|
|
20
15
|
* Entry point of the Regula IDV.
|
|
@@ -47,6 +42,10 @@ export class IDV {
|
|
|
47
42
|
startWorkflow(config?: StartWorkflowConfig): Promise<[WorkflowResult | null, string | null]>
|
|
48
43
|
|
|
49
44
|
getWorkflows(): Promise<[Workflow[] | null, string | null]>
|
|
45
|
+
|
|
46
|
+
startSession(config: StartSessionConfig): Promise<[string | null, string | null]>
|
|
47
|
+
|
|
48
|
+
sendData(config: SendDataConfig): Promise<[boolean, string | null]>
|
|
50
49
|
}
|
|
51
50
|
|
|
52
51
|
export enum SessionRestoreMode {
|