react-native-zyprotectabio-module 1.1.12 → 1.1.13
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/android/.gradle/9.0.0/checksums/checksums.lock +0 -0
- package/android/.gradle/9.0.0/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/9.0.0/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -2
- package/android/build.gradle +2 -2
- package/android/src/main/java/com/reactnativezyprotectabiomodule/ZyprotectabioModuleModule.kt +12 -12
- package/android/src/main/java/com/reactnativezyprotectabiomodule/bean/Opcional.kt +1 -1
- package/ios/ZyprotectabioModule.m +29 -5
- package/package.json +1 -1
- package/react-native-zyprotectabio-module.podspec +1 -1
- package/android/.gradle/9.0-milestone-1/checksums/checksums.lock +0 -0
- package/android/.gradle/9.0-milestone-1/fileHashes/fileHashes.lock +0 -0
- /package/android/.gradle/{9.0-milestone-1 → 9.0.0}/fileChanges/last-build.bin +0 -0
- /package/android/.gradle/{9.0-milestone-1 → 9.0.0}/gc.properties +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
#Wed
|
|
2
|
-
gradle.version=9.0
|
|
1
|
+
#Wed May 06 17:05:04 PET 2026
|
|
2
|
+
gradle.version=9.0.0
|
package/android/build.gradle
CHANGED
|
@@ -139,11 +139,11 @@ dependencies {
|
|
|
139
139
|
//INICIO_ZY_ZYTRUST
|
|
140
140
|
implementation 'androidx.appcompat:appcompat:1.4.0'
|
|
141
141
|
implementation 'com.google.android.material:material:1.5.0'
|
|
142
|
-
implementation(group: 'com.zy.multiempresa.android.lib.protecta', name: 'sdk', version: '1.1.
|
|
142
|
+
implementation(group: 'com.zy.multiempresa.android.lib.protecta', name: 'sdk', version: '1.1.14', ext: 'aar'){
|
|
143
143
|
transitive = true
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
implementation(group: 'com.zy.identy.face.protecta', name: 'sdk', version: '6.7.
|
|
146
|
+
implementation(group: 'com.zy.identy.face.protecta', name: 'sdk', version: '6.7.5', ext: 'aar'){
|
|
147
147
|
transitive = true
|
|
148
148
|
}
|
|
149
149
|
debugImplementation(group: 'com.identy.face', name: 'face', version: '6.3.3-develop', ext: 'aar')
|
package/android/src/main/java/com/reactnativezyprotectabiomodule/ZyprotectabioModuleModule.kt
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
package com.reactnativezyprotectabiomodule
|
|
2
2
|
|
|
3
|
+
|
|
4
|
+
import android.util.Log
|
|
5
|
+
import com.facebook.react.bridge.Promise
|
|
3
6
|
import com.facebook.react.bridge.ReactApplicationContext
|
|
4
7
|
import com.facebook.react.bridge.ReactContextBaseJavaModule
|
|
5
8
|
import com.facebook.react.bridge.ReactMethod
|
|
6
|
-
import com.facebook.react.bridge.Promise
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import android.util.Log
|
|
10
9
|
import com.facebook.react.bridge.ReadableMap
|
|
11
10
|
import com.facebook.react.bridge.WritableMap
|
|
12
11
|
import com.facebook.react.bridge.WritableNativeMap
|
|
@@ -15,9 +14,6 @@ import com.zy.multicompany.android.lib.sdk.validacionfacial.api.IZyApiCapturaFac
|
|
|
15
14
|
import com.zy.multicompany.android.lib.sdk.validacionfacial.api.ZyApiCapturaFacial
|
|
16
15
|
import com.zy.multicompany.android.lib.sdk.validacionfacial.api.ZyRequest
|
|
17
16
|
import com.zy.multicompany.android.lib.sdk.validacionfacial.api.ZyResponse
|
|
18
|
-
import com.zy.multicompany.android.lib.sdk.validacionfacial.api.bean.visual.ScreenEnum
|
|
19
|
-
import com.zy.multicompany.android.lib.sdk.validacionfacial.api.bean.visual.Stepper
|
|
20
|
-
import com.zy.multicompany.android.lib.sdk.validacionfacial.api.bean.visual.VisualScreenError
|
|
21
17
|
|
|
22
18
|
|
|
23
19
|
class ZyprotectabioModuleModule(reactContext: ReactApplicationContext) : ReactContextBaseJavaModule(reactContext) {
|
|
@@ -38,7 +34,7 @@ class ZyprotectabioModuleModule(reactContext: ReactApplicationContext) : ReactCo
|
|
|
38
34
|
zyRequestApi.bioNuDoc = opcionalData.nuDocumento
|
|
39
35
|
zyRequestApi.token = opcionalData.accessToken
|
|
40
36
|
zyRequestApi.bioPais = opcionalData.bioPais
|
|
41
|
-
zyRequestApi.
|
|
37
|
+
zyRequestApi.idFlujo = opcionalData.idFlujo
|
|
42
38
|
zyRequestApi.url = opcionalData.urlSource
|
|
43
39
|
|
|
44
40
|
Log.i(TAG, "calling onZyBioCapture")
|
|
@@ -65,8 +61,10 @@ class ZyprotectabioModuleModule(reactContext: ReactApplicationContext) : ReactCo
|
|
|
65
61
|
Log.i(TAG, "onSuccess")
|
|
66
62
|
Log.i(TAG, "=====>>> zyResponse: $zyResponse")
|
|
67
63
|
val result: WritableMap = WritableNativeMap().apply {
|
|
68
|
-
putString("
|
|
64
|
+
putString("codError", if (zyResponse.codError.isNotEmpty()) zyResponse.codError else "")
|
|
69
65
|
putString("deError", if (zyResponse.deError.isNotEmpty()) zyResponse.deError else "")
|
|
66
|
+
putString("codBioError", if (zyResponse.codBioError.isNotEmpty()) zyResponse.codBioError else "")
|
|
67
|
+
putString("deBioError", if (zyResponse.deBioError.isNotEmpty()) zyResponse.deBioError else "")
|
|
70
68
|
putString("coErrorButton", if (zyResponse.coErrorButton.isNotEmpty()) zyResponse.coErrorButton else "")
|
|
71
69
|
putString("deErrorButton", if (zyResponse.deErrorButton.isNotEmpty()) zyResponse.deErrorButton else "")
|
|
72
70
|
putString("idSolicitud", if (zyResponse.bmoNuSolicitud.isNotEmpty()) zyResponse.bmoNuSolicitud else "")
|
|
@@ -82,8 +80,10 @@ class ZyprotectabioModuleModule(reactContext: ReactApplicationContext) : ReactCo
|
|
|
82
80
|
Log.i(TAG, "=====>>> zyError: $zyError")
|
|
83
81
|
|
|
84
82
|
val result: WritableMap = WritableNativeMap().apply {
|
|
85
|
-
putString("
|
|
83
|
+
putString("codError", if (zyError.codError.isNotEmpty()) zyError.codError else "")
|
|
86
84
|
putString("deError", if (zyError.deError.isNotEmpty()) zyError.deError else "")
|
|
85
|
+
putString("codBioError", if (zyError.codBioError.isNotEmpty()) zyError.codBioError else "")
|
|
86
|
+
putString("deBioError", if (zyError.deBioError.isNotEmpty()) zyError.deBioError else "")
|
|
87
87
|
putString("coErrorButton", zyError.coErrorButton?.takeIf { it.isNotEmpty() } ?: "")
|
|
88
88
|
putString("deErrorButton", zyError.deErrorButton?.takeIf { it.isNotEmpty() } ?: "")
|
|
89
89
|
putString("idSolicitud", if (zyError.bmoNuSolicitud.isNotEmpty()) zyError.bmoNuSolicitud else "")
|
|
@@ -98,7 +98,7 @@ class ZyprotectabioModuleModule(reactContext: ReactApplicationContext) : ReactCo
|
|
|
98
98
|
|
|
99
99
|
override fun onRetries(zyError: ZyResponse) {
|
|
100
100
|
Log.i(TAG, "onRetries")
|
|
101
|
-
Log.i(TAG,"
|
|
101
|
+
Log.i(TAG,"codError: " + zyError.codError + " , " + "deError: " + zyError.deError + " , " + "codBioError: " + zyError.codBioError + " , " + "deBioError: " + zyError.deBioError + " , " + "bmoNuSolicitud " + zyError.bmoNuSolicitud
|
|
102
102
|
)
|
|
103
103
|
}
|
|
104
104
|
})
|
|
@@ -110,7 +110,7 @@ class ZyprotectabioModuleModule(reactContext: ReactApplicationContext) : ReactCo
|
|
|
110
110
|
|
|
111
111
|
zyRequest.token = zyRequestApi?.token ?: ""
|
|
112
112
|
zyRequest.bioPais = zyRequestApi?.bioPais?.takeIf { it.isNotBlank() } ?: "PE"
|
|
113
|
-
zyRequest.
|
|
113
|
+
zyRequest.idFlujo = zyRequestApi?.idFlujo?.takeIf { it != 0 } ?: 185
|
|
114
114
|
zyRequest.isDialogActivated = true
|
|
115
115
|
zyRequest.url = zyRequestApi?.url?.takeIf { it.isNotBlank() } ?: "POC"
|
|
116
116
|
zyRequest.flujoExterno = ""
|
|
@@ -8,7 +8,7 @@ internal class Opcional {
|
|
|
8
8
|
var nuDocumento: String = ""
|
|
9
9
|
var accessToken: String = ""
|
|
10
10
|
var bioPais: String = ""
|
|
11
|
-
var
|
|
11
|
+
var idFlujo: Int = 0
|
|
12
12
|
var urlSource: String = ""
|
|
13
13
|
lateinit var stepper: StepperRN
|
|
14
14
|
lateinit var errores: ErroresPantallaRN
|
|
@@ -19,11 +19,11 @@ RCT_EXPORT_METHOD(onZyBioCapture:(NSDictionary *)opcional
|
|
|
19
19
|
|
|
20
20
|
ReactRequest *request = [ReactRequest new];
|
|
21
21
|
request.token = opcional[@"accessToken"];
|
|
22
|
-
request.bioTiDoc = opcional[@"tiDocumento"];
|
|
22
|
+
request.bioTiDoc = [self safeString:opcional[@"tiDocumento"] defaultValue:@""];
|
|
23
23
|
request.bioNuDoc = opcional[@"nuDocumento"];
|
|
24
|
-
request.bioPais = opcional[@"bioPais"];
|
|
25
|
-
request.
|
|
26
|
-
request.url = opcional[@"urlSource"];
|
|
24
|
+
request.bioPais = [self safeString:opcional[@"bioPais"] defaultValue:@"PE"];
|
|
25
|
+
request.idFlujo = [[self safeNumber:opcional[@"idFlujo"] defaultValue:@185] integerValue];
|
|
26
|
+
request.url = [self safeString:opcional[@"urlSource"] defaultValue:@"POC"];
|
|
27
27
|
request.company = @"PROTECTA";
|
|
28
28
|
|
|
29
29
|
ZyReactComp *biomatch = [[ZyReactComp alloc] initOnView:ctrl];
|
|
@@ -32,8 +32,10 @@ RCT_EXPORT_METHOD(onZyBioCapture:(NSDictionary *)opcional
|
|
|
32
32
|
completion:^(ReactResponse *response) {
|
|
33
33
|
|
|
34
34
|
resolve(@{
|
|
35
|
-
@"
|
|
35
|
+
@"codError": response.codError ?: @"",
|
|
36
36
|
@"deError": response.deError ?: @"",
|
|
37
|
+
@"codBioError": response.codBioError ?: @"",
|
|
38
|
+
@"deBioError": response.deBioError ?: @"",
|
|
37
39
|
@"coErrorButton": response.coErrorButton ?: @"",
|
|
38
40
|
@"deErrorButton": response.deErrorButton ?: @"",
|
|
39
41
|
@"idSolicitud": response.bmoNuSolicitud ?: @""
|
|
@@ -47,4 +49,26 @@ RCT_EXPORT_METHOD(onZyBioCapture:(NSDictionary *)opcional
|
|
|
47
49
|
});
|
|
48
50
|
}
|
|
49
51
|
|
|
52
|
+
#pragma mark - Safe helpers
|
|
53
|
+
|
|
54
|
+
- (NSString *)safeString:(id)value defaultValue:(NSString *)defaultValue {
|
|
55
|
+
if (value == nil || value == [NSNull null]) {
|
|
56
|
+
return defaultValue;
|
|
57
|
+
}
|
|
58
|
+
if ([value isKindOfClass:[NSString class]]) {
|
|
59
|
+
return value;
|
|
60
|
+
}
|
|
61
|
+
return [value description];
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
- (NSNumber *)safeNumber:(id)value defaultValue:(NSNumber *)defaultValue {
|
|
65
|
+
if (value == nil || value == [NSNull null]) {
|
|
66
|
+
return defaultValue;
|
|
67
|
+
}
|
|
68
|
+
if ([value isKindOfClass:[NSNumber class]]) {
|
|
69
|
+
return value;
|
|
70
|
+
}
|
|
71
|
+
return defaultValue;
|
|
72
|
+
}
|
|
73
|
+
|
|
50
74
|
@end
|
package/package.json
CHANGED
|
@@ -14,6 +14,6 @@ Pod::Spec.new do |s|
|
|
|
14
14
|
s.source = { :git => "https://github.com/ZY-PROTECTA/react-native-zyprotectabio-module.git", :tag => "#{s.version}" }
|
|
15
15
|
s.source_files = "ios/**/*.{h,m,mm,swift}"
|
|
16
16
|
|
|
17
|
-
s.dependency 'zy_multicompany_bio_lib_ios_protecta', '1.0.
|
|
17
|
+
s.dependency 'zy_multicompany_bio_lib_ios_protecta', '1.0.7'
|
|
18
18
|
s.dependency "React-Core"
|
|
19
19
|
end
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
File without changes
|