@regulaforensics/idv 3.6.98-nightly → 3.8.122-rc

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 CHANGED
@@ -5,7 +5,7 @@ source = File.join(__dir__, 'ios')
5
5
 
6
6
  Pod::Spec.new do |s|
7
7
  s.name = 'RNIDV'
8
- s.version = '3.6.98-nightly'
8
+ s.version = '3.8.122-rc'
9
9
  s.summary = package['description']
10
10
  s.license = package['license']
11
11
 
@@ -16,6 +16,6 @@ Pod::Spec.new do |s|
16
16
  s.ios.deployment_target = '14.0'
17
17
  s.source_files = [ 'ios/**/*.swift', 'ios/**/RN*.m' ]
18
18
  s.exclude_files = [ 'ios/CDVIDV.swift' ]
19
- s.dependency 'IDVSDKNightly', '3.6.1898'
19
+ s.dependency 'IDVSDKStage', '3.8.1939'
20
20
  s.dependency 'React'
21
21
  end
@@ -18,14 +18,14 @@ android {
18
18
  rootProject.allprojects {
19
19
  repositories {
20
20
  maven {
21
- url "https://maven.regulaforensics.com/RegulaDocumentReader/Nightly"
21
+ url "https://maven.regulaforensics.com/RegulaDocumentReader/Stage"
22
22
  }
23
23
  }
24
24
  }
25
25
 
26
26
  dependencies {
27
27
  implementation 'com.facebook.react:react-native:+'
28
- implementation('com.regula.idv:api:3.6.265') {
28
+ implementation('com.regula.idv:api:3.6.310') {
29
29
  transitive = true
30
30
  }
31
31
  }
@@ -9,12 +9,12 @@ android {
9
9
 
10
10
  repositories {
11
11
  maven {
12
- url "https://maven.regulaforensics.com/RegulaDocumentReader/Nightly"
12
+ url "https://maven.regulaforensics.com/RegulaDocumentReader/Stage"
13
13
  }
14
14
  }
15
15
 
16
16
  dependencies {
17
- implementation('com.regula.idv:api:3.6.265') {
17
+ implementation('com.regula.idv:api:3.6.310') {
18
18
  transitive = true
19
19
  }
20
20
  }
@@ -4,6 +4,7 @@ package com.regula.plugin.idv
4
4
 
5
5
  import com.regula.idv.api.config.ApiKeyConnectionConfig
6
6
  import com.regula.idv.api.config.CredentialsConnectionConfig
7
+ import com.regula.idv.api.config.LoginConfig
7
8
  import com.regula.idv.api.config.PrepareWorkflowConfig
8
9
  import com.regula.idv.api.config.SendDataConfig
9
10
  import com.regula.idv.api.config.SessionConfig
@@ -116,6 +117,28 @@ fun generateStartSessionConfig(input: SessionConfig?) = input?.let {
116
117
  ).toJson()
117
118
  }
118
119
 
120
+ fun loginConfigFromJSON(input: JSONObject) = input.let {
121
+ val builder = LoginConfig.Builder()
122
+
123
+ builder.setApplicationId(input.getString("applicationId"))
124
+ builder.setBaseUrl(input.getString("baseUrl"))
125
+ input.getStringOrNull("locale")?.let { builder.setLocale(it) }
126
+ input.getJSONObjectOrNull("metadata")?.let { builder.setMetadata(it) }
127
+ input.getIntOrNull("httpTimeoutMs")?.let { builder.setHttpTimeoutMs(it) }
128
+
129
+ builder.build()
130
+ }
131
+
132
+ fun generateLoginConfig(input: LoginConfig) = input.let {
133
+ mapOf(
134
+ "applicationId" to it.applicationId,
135
+ "baseUrl" to it.baseUrl,
136
+ "locale" to it.locale,
137
+ "metadata" to it.metadata,
138
+ "httpTimeoutMs" to it.httpTimeoutMs,
139
+ ).toJson()
140
+ }
141
+
119
142
  // Model ------------------------------
120
143
 
121
144
  fun workflowFromJSON(input: JSONObject?) = input?.let {
@@ -33,8 +33,9 @@ fun methodCall(method: String, callback: Callback): Any = when (method) {
33
33
  "prepareWorkflow" -> prepareWorkflow(callback, args(0))
34
34
  "startWorkflow" -> startWorkflow(callback, argsNullable(0))
35
35
  "getWorkflows" -> getWorkflows(callback)
36
- "startSession" -> startSession(args(0), callback)
37
- "sendData" -> sendData(args(0), callback)
36
+ "startSession" -> startSession(callback, args(0))
37
+ "sendData" -> sendData(callback, args(0))
38
+ "startLogin" -> startLogin(callback, args(0))
38
39
  else -> Unit
39
40
  }
40
41
 
@@ -54,59 +55,44 @@ fun initialize(callback: Callback) {
54
55
  }
55
56
  }
56
57
 
57
- fun deinitialize(callback: Callback) {
58
- instance().deinitialize(context) {
59
- generateCompletion(
60
- it.isSuccess,
61
- it.exceptionOrNull() as BaseException?
62
- ).send(callback)
63
- }
58
+ fun deinitialize(callback: Callback) = instance().deinitialize {
59
+ generateCompletion(
60
+ it.isSuccess,
61
+ it.exceptionOrNull() as BaseException?
62
+ ).send(callback)
64
63
  }
65
64
 
66
-
67
- fun configureWithToken(callback: Callback, data: JSONObject) = instance().configure(
68
- context,
69
- tokenConnectionConfigFromJSON(data)
70
- ) {
65
+ fun configureWithToken(callback: Callback, config: JSONObject) = instance().configure(tokenConnectionConfigFromJSON(config)) {
71
66
  generateCompletion(
72
67
  it.getOrNull(),
73
68
  it.exceptionOrNull() as BaseException?
74
69
  ).send(callback)
75
70
  }
76
71
 
77
- fun configureWithCredentials(callback: Callback, data: JSONObject) = instance().configure(
78
- context,
79
- credentialsConnectionConfigFromJSON(data)
80
- ) {
72
+ fun configureWithCredentials(callback: Callback, config: JSONObject) = instance().configure(credentialsConnectionConfigFromJSON(config)) {
81
73
  generateCompletion(
82
74
  it.isSuccess,
83
75
  it.exceptionOrNull() as BaseException?
84
76
  ).send(callback)
85
77
  }
86
78
 
87
- fun configureWithApiKey(callback: Callback, data: JSONObject) = instance().configure(
88
- context,
89
- apiKeyConnectionConfigFromJSON(data)
90
- ) {
79
+ fun configureWithApiKey(callback: Callback, config: JSONObject) = instance().configure(apiKeyConnectionConfigFromJSON(config)) {
91
80
  generateCompletion(
92
81
  it.isSuccess,
93
82
  it.exceptionOrNull() as BaseException?
94
83
  ).send(callback)
95
84
  }
96
85
 
97
- fun prepareWorkflow(callback: Callback, data: JSONObject) = instance().prepareWorkflow(
98
- context,
99
- prepareWorkflowConfigFromJSON(data)
100
- ) {
86
+ fun prepareWorkflow(callback: Callback, config: JSONObject) = instance().prepareWorkflow(prepareWorkflowConfigFromJSON(config)) {
101
87
  generateCompletion(
102
88
  generateWorkflow(it.getOrNull()),
103
89
  it.exceptionOrNull() as BaseException?
104
90
  ).send(callback)
105
91
  }
106
92
 
107
- fun startWorkflow(callback: Callback, data: JSONObject?) = instance().startWorkflow(
93
+ fun startWorkflow(callback: Callback, config: JSONObject?) = instance().startWorkflow(
108
94
  activity,
109
- startWorkflowConfigFromJSON(data)
95
+ startWorkflowConfigFromJSON(config)
110
96
  ) {
111
97
  generateCompletion(
112
98
  generateWorkflowResult(it.getOrNull()),
@@ -121,7 +107,7 @@ fun getWorkflows(callback: Callback) = instance().getWorkflows {
121
107
  ).send(callback)
122
108
  }
123
109
 
124
- fun startSession(config: JSONObject, callback: Callback) = instance().startSession(
110
+ fun startSession(callback: Callback, config: JSONObject) = instance().startSession(
125
111
  startSessionConfigFromJSON(config)!!
126
112
  ) {
127
113
  generateCompletion(
@@ -130,7 +116,7 @@ fun startSession(config: JSONObject, callback: Callback) = instance().startSessi
130
116
  ).send(callback)
131
117
  }
132
118
 
133
- fun sendData(config: JSONObject, callback: Callback) = instance().sendData(
119
+ fun sendData(callback: Callback, config: JSONObject) = instance().sendData(
134
120
  sendDataConfigFromJSON(config)!!
135
121
  ) {
136
122
  generateCompletion(
@@ -139,6 +125,13 @@ fun sendData(config: JSONObject, callback: Callback) = instance().sendData(
139
125
  ).send(callback)
140
126
  }
141
127
 
128
+ fun startLogin(callback: Callback, config: JSONObject) = instance().startLogin(loginConfigFromJSON(config)) {
129
+ generateCompletion(
130
+ it.isSuccess,
131
+ it.exceptionOrNull() as BaseException?
132
+ ).send(callback)
133
+ }
134
+
142
135
  // Weak references
143
136
  var listener = object : IdvSdkListener {
144
137
  override fun didStartSession() = sendEvent(didStartSessionEvent)
package/app.plugin.js ADDED
@@ -0,0 +1,42 @@
1
+ const { createRequire } = require('module'); // passing vulnerability checks
2
+ const { withPodfile } = createRequire(process.cwd() + '/package.json')('@expo/config-plugins');
3
+
4
+ const SOURCES = [
5
+ 'https://github.com/CocoaPods/Specs.git',
6
+ 'https://github.com/regulaforensics/podspecs.git',
7
+ ];
8
+
9
+ module.exports = function withRegulaPodSources(config) {
10
+ return withPodfile(config, (config) => {
11
+ let podfile = config.modResults.contents;
12
+
13
+ const missingSources = SOURCES.filter(
14
+ (source) =>
15
+ !podfile.includes(`source '${source}'`) &&
16
+ !podfile.includes(`source "${source}"`)
17
+ );
18
+
19
+ if (missingSources.length === 0) {
20
+ return config;
21
+ }
22
+
23
+ const header = [
24
+ '# ============================================================================',
25
+ '# Regula Pod Sources',
26
+ '# Added automatically by @regulaforensics/idv',
27
+ '#',
28
+ '# Sources:',
29
+ ...SOURCES.map((s) => `# - ${s}`),
30
+ '# ============================================================================',
31
+ '',
32
+ ...missingSources.map((s) => `source '${s}'`),
33
+ '',
34
+ '',
35
+ '',
36
+ ].join('\n');
37
+
38
+ config.modResults.contents = header + podfile;
39
+
40
+ return config;
41
+ });
42
+ };
@@ -1,4 +1,5 @@
1
- source "https://github.com/CocoaPods/Specs.git"
1
+ source 'https://github.com/CocoaPods/Specs.git'
2
+ source 'https://github.com/regulaforensics/podspecs.git'
2
3
 
3
4
  require_relative '../../node_modules/@capacitor/ios/scripts/pods_helpers'
4
5
 
@@ -15,9 +15,9 @@
15
15
  "@ionic/react": "^8.7.17",
16
16
  "@regulaforensics/document-reader-core-fullauthrfid": "9.5.2382",
17
17
  "@regulaforensics/face-core-basic": "8.2.521",
18
- "@regulaforensics/idv": "3.6.96-nightly",
19
- "@regulaforensics/idv-module-document-reader": "3.6.78-nightly",
20
- "@regulaforensics/idv-module-face": "3.6.77-nightly",
18
+ "@regulaforensics/idv": "3.2.70",
19
+ "@regulaforensics/idv-module-document-reader": "3.2.50",
20
+ "@regulaforensics/idv-module-face": "3.2.51",
21
21
  "@types/react-router-dom": "^5.3.3",
22
22
  "@vitejs/plugin-react": "^5.1.2",
23
23
  "vite-plugin-static-copy": "^3.2.0"
@@ -682,21 +682,21 @@
682
682
  "license": "commercial"
683
683
  },
684
684
  "node_modules/@regulaforensics/idv": {
685
- "version": "3.6.96-nightly",
686
- "resolved": "https://registry.npmjs.org/@regulaforensics/idv/-/idv-3.6.96-nightly.tgz",
687
- "integrity": "sha512-gQRxYgNuPOn7tg91fUT+oBMAew/KdRmIuLfLx+uehY+cqZtcbhJGwlxffsiDfamdQk2eh0QulybeWuNIhevCiA==",
685
+ "version": "3.2.70",
686
+ "resolved": "https://registry.npmjs.org/@regulaforensics/idv/-/idv-3.2.70.tgz",
687
+ "integrity": "sha512-zfjUEhd7mwn0rbzpGmA12Q7aKRBFCvQAnB2J6jaaHPdoAgvwT/q/tmq/O0HGpZuC5alP2FCjZK+JX2Yi/PBBqg==",
688
688
  "license": "commercial"
689
689
  },
690
690
  "node_modules/@regulaforensics/idv-module-document-reader": {
691
- "version": "3.6.78-nightly",
692
- "resolved": "https://registry.npmjs.org/@regulaforensics/idv-module-document-reader/-/idv-module-document-reader-3.6.78-nightly.tgz",
693
- "integrity": "sha512-BZS2nkC/QFxjDJa6rUilM1JcVY3AK0Rb8j8MipVDkXl2OVnJ54EcJcM6thF0Kb8yRJbAd1DtK+kDEq2bJwDn6Q==",
691
+ "version": "3.2.50",
692
+ "resolved": "https://registry.npmjs.org/@regulaforensics/idv-module-document-reader/-/idv-module-document-reader-3.2.50.tgz",
693
+ "integrity": "sha512-vJQ5Mw+CBZ86AvvzYda0XA9lyE/L9f1NR/L+gYuwjZLCi26vzux8cOqTwUnkXhMATTSS0Ix1VZ8rc1WFGwW04g==",
694
694
  "license": "commercial"
695
695
  },
696
696
  "node_modules/@regulaforensics/idv-module-face": {
697
- "version": "3.6.77-nightly",
698
- "resolved": "https://registry.npmjs.org/@regulaforensics/idv-module-face/-/idv-module-face-3.6.77-nightly.tgz",
699
- "integrity": "sha512-3mMKumWmO9k/Hw0HXS8uvJJxal0ywd0tjg4oMXAyggwhS0aiHSQL7BONudNo6eCT/iDtF+VynMdwziPUL5ed7w==",
697
+ "version": "3.2.51",
698
+ "resolved": "https://registry.npmjs.org/@regulaforensics/idv-module-face/-/idv-module-face-3.2.51.tgz",
699
+ "integrity": "sha512-0BxcEQ84fP7POkDEiDavt/IimgclrNFnvjeXws3uiaDsuPjZT3FEe6FUM/NYsWtlvFOYOZNmaqFwG9CMTwRstA==",
700
700
  "license": "commercial"
701
701
  },
702
702
  "node_modules/@rolldown/binding-android-arm64": {
@@ -6,11 +6,11 @@
6
6
  "android": "scripts/android.sh"
7
7
  },
8
8
  "dependencies": {
9
- "@regulaforensics/idv": "3.6.98-nightly",
10
- "@regulaforensics/idv-module-document-reader": "3.6.78-nightly",
11
- "@regulaforensics/idv-module-face": "3.6.77-nightly",
12
- "@regulaforensics/document-reader-core-fullauthrfid": "9.5.2382",
13
- "@regulaforensics/face-core-basic": "8.2.521",
9
+ "@regulaforensics/idv": "3.8.122-rc",
10
+ "@regulaforensics/idv-module-document-reader": "9.6.106-rc",
11
+ "@regulaforensics/idv-module-face": "9.6.107-rc",
12
+ "@regulaforensics/document-reader-core-fullauthrfid": "9.7.2474-rc",
13
+ "@regulaforensics/face-core-basic": "8.3.622-rc",
14
14
  "@capacitor/cli": "^8.0.0",
15
15
  "@capacitor/core": "^8.0.0",
16
16
  "@capacitor/app": "^8.0.0",
@@ -21,5 +21,8 @@
21
21
  "@vitejs/plugin-react": "^5.1.2",
22
22
  "vite-plugin-static-copy": "^3.2.0",
23
23
  "@types/react-router-dom": "^5.3.3"
24
+ },
25
+ "overrides": {
26
+ "esbuild": "^0.28.1"
24
27
  }
25
28
  }
@@ -3,7 +3,7 @@ set -e
3
3
 
4
4
  if [[ $npm_config_o || $npm_config_open ]]; then
5
5
  ionic cap sync android
6
- studio android || open -a 'Android Studio' android
6
+ open -a 'Android Studio' android
7
7
  else
8
8
  ionic cap run android
9
9
  fi