react-native-zyprotectabio-module 0.1.0

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.
Files changed (50) hide show
  1. package/.gitattributes +2 -0
  2. package/CODE_OF_CONDUCT.md +133 -0
  3. package/CONTRIBUTING.md +122 -0
  4. package/LICENSE +20 -0
  5. package/README.md +178 -0
  6. package/android/.gradle/8.8/checksums/checksums.lock +0 -0
  7. package/android/.gradle/8.8/dependencies-accessors/gc.properties +0 -0
  8. package/android/.gradle/8.8/fileChanges/last-build.bin +0 -0
  9. package/android/.gradle/8.8/fileHashes/fileHashes.lock +0 -0
  10. package/android/.gradle/8.8/gc.properties +0 -0
  11. package/android/.gradle/9.0-milestone-1/checksums/checksums.lock +0 -0
  12. package/android/.gradle/9.0-milestone-1/fileChanges/last-build.bin +0 -0
  13. package/android/.gradle/9.0-milestone-1/fileHashes/fileHashes.lock +0 -0
  14. package/android/.gradle/9.0-milestone-1/gc.properties +0 -0
  15. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  16. package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
  17. package/android/.gradle/config.properties +2 -0
  18. package/android/.gradle/vcs-1/gc.properties +0 -0
  19. package/android/.idea/AndroidProjectSystem.xml +6 -0
  20. package/android/.idea/android.iml +9 -0
  21. package/android/.idea/caches/deviceStreaming.xml +1186 -0
  22. package/android/.idea/gradle.xml +13 -0
  23. package/android/.idea/migrations.xml +10 -0
  24. package/android/.idea/misc.xml +9 -0
  25. package/android/.idea/modules.xml +8 -0
  26. package/android/.idea/runConfigurations.xml +17 -0
  27. package/android/.idea/vcs.xml +6 -0
  28. package/android/build.gradle +82 -0
  29. package/android/gradle.properties +5 -0
  30. package/android/local.properties +8 -0
  31. package/android/src/main/AndroidManifest.xml +7 -0
  32. package/android/src/main/AndroidManifestNew.xml +2 -0
  33. package/android/src/main/java/com/zyprotectabiomodule/ZyBioProtectaReactNativeModuleModule.kt +163 -0
  34. package/android/src/main/java/com/zyprotectabiomodule/ZyBioProtectaReactNativeModulePackage.kt +26 -0
  35. package/android/src/main/java/com/zyprotectabiomodule/bean/ErroresPantallaRN.kt +32 -0
  36. package/android/src/main/java/com/zyprotectabiomodule/bean/Opcional.kt +17 -0
  37. package/android/src/main/java/com/zyprotectabiomodule/bean/ScreenText.kt +27 -0
  38. package/android/src/main/java/com/zyprotectabiomodule/bean/StepperRN.kt +24 -0
  39. package/babel.config.js +5 -0
  40. package/ios/ZyBanbifBioRn.h +12 -0
  41. package/ios/ZyBanbifBioRn.m +90 -0
  42. package/lefthook.yml +14 -0
  43. package/package.json +32 -0
  44. package/react-native-zyprotectabio-module.podspec +23 -0
  45. package/scripts/postinstall.js +50 -0
  46. package/src/__tests__/index.test.tsx +1 -0
  47. package/src/index.tsx +22 -0
  48. package/tsconfig.build.json +4 -0
  49. package/tsconfig.json +29 -0
  50. package/turbo.json +36 -0
package/.gitattributes ADDED
@@ -0,0 +1,2 @@
1
+ # Auto detect text files and perform LF normalization
2
+ * text=auto
@@ -0,0 +1,133 @@
1
+
2
+ # Contributor Covenant Code of Conduct
3
+
4
+ ## Our Pledge
5
+
6
+ We as members, contributors, and leaders pledge to make participation in our
7
+ community a harassment-free experience for everyone, regardless of age, body
8
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
9
+ identity and expression, level of experience, education, socio-economic status,
10
+ nationality, personal appearance, race, caste, color, religion, or sexual
11
+ identity and orientation.
12
+
13
+ We pledge to act and interact in ways that contribute to an open, welcoming,
14
+ diverse, inclusive, and healthy community.
15
+
16
+ ## Our Standards
17
+
18
+ Examples of behavior that contributes to a positive environment for our
19
+ community include:
20
+
21
+ * Demonstrating empathy and kindness toward other people
22
+ * Being respectful of differing opinions, viewpoints, and experiences
23
+ * Giving and gracefully accepting constructive feedback
24
+ * Accepting responsibility and apologizing to those affected by our mistakes,
25
+ and learning from the experience
26
+ * Focusing on what is best not just for us as individuals, but for the overall
27
+ community
28
+
29
+ Examples of unacceptable behavior include:
30
+
31
+ * The use of sexualized language or imagery, and sexual attention or advances of
32
+ any kind
33
+ * Trolling, insulting or derogatory comments, and personal or political attacks
34
+ * Public or private harassment
35
+ * Publishing others' private information, such as a physical or email address,
36
+ without their explicit permission
37
+ * Other conduct which could reasonably be considered inappropriate in a
38
+ professional setting
39
+
40
+ ## Enforcement Responsibilities
41
+
42
+ Community leaders are responsible for clarifying and enforcing our standards of
43
+ acceptable behavior and will take appropriate and fair corrective action in
44
+ response to any behavior that they deem inappropriate, threatening, offensive,
45
+ or harmful.
46
+
47
+ Community leaders have the right and responsibility to remove, edit, or reject
48
+ comments, commits, code, wiki edits, issues, and other contributions that are
49
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
50
+ decisions when appropriate.
51
+
52
+ ## Scope
53
+
54
+ This Code of Conduct applies within all community spaces, and also applies when
55
+ an individual is officially representing the community in public spaces.
56
+ Examples of representing our community include using an official e-mail address,
57
+ posting via an official social media account, or acting as an appointed
58
+ representative at an online or offline event.
59
+
60
+ ## Enforcement
61
+
62
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
63
+ reported to the community leaders responsible for enforcement at
64
+ [INSERT CONTACT METHOD].
65
+ All complaints will be reviewed and investigated promptly and fairly.
66
+
67
+ All community leaders are obligated to respect the privacy and security of the
68
+ reporter of any incident.
69
+
70
+ ## Enforcement Guidelines
71
+
72
+ Community leaders will follow these Community Impact Guidelines in determining
73
+ the consequences for any action they deem in violation of this Code of Conduct:
74
+
75
+ ### 1. Correction
76
+
77
+ **Community Impact**: Use of inappropriate language or other behavior deemed
78
+ unprofessional or unwelcome in the community.
79
+
80
+ **Consequence**: A private, written warning from community leaders, providing
81
+ clarity around the nature of the violation and an explanation of why the
82
+ behavior was inappropriate. A public apology may be requested.
83
+
84
+ ### 2. Warning
85
+
86
+ **Community Impact**: A violation through a single incident or series of
87
+ actions.
88
+
89
+ **Consequence**: A warning with consequences for continued behavior. No
90
+ interaction with the people involved, including unsolicited interaction with
91
+ those enforcing the Code of Conduct, for a specified period of time. This
92
+ includes avoiding interactions in community spaces as well as external channels
93
+ like social media. Violating these terms may lead to a temporary or permanent
94
+ ban.
95
+
96
+ ### 3. Temporary Ban
97
+
98
+ **Community Impact**: A serious violation of community standards, including
99
+ sustained inappropriate behavior.
100
+
101
+ **Consequence**: A temporary ban from any sort of interaction or public
102
+ communication with the community for a specified period of time. No public or
103
+ private interaction with the people involved, including unsolicited interaction
104
+ with those enforcing the Code of Conduct, is allowed during this period.
105
+ Violating these terms may lead to a permanent ban.
106
+
107
+ ### 4. Permanent Ban
108
+
109
+ **Community Impact**: Demonstrating a pattern of violation of community
110
+ standards, including sustained inappropriate behavior, harassment of an
111
+ individual, or aggression toward or disparagement of classes of individuals.
112
+
113
+ **Consequence**: A permanent ban from any sort of public interaction within the
114
+ community.
115
+
116
+ ## Attribution
117
+
118
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
119
+ version 2.1, available at
120
+ [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
121
+
122
+ Community Impact Guidelines were inspired by
123
+ [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
124
+
125
+ For answers to common questions about this code of conduct, see the FAQ at
126
+ [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
127
+ [https://www.contributor-covenant.org/translations][translations].
128
+
129
+ [homepage]: https://www.contributor-covenant.org
130
+ [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
131
+ [Mozilla CoC]: https://github.com/mozilla/diversity
132
+ [FAQ]: https://www.contributor-covenant.org/faq
133
+ [translations]: https://www.contributor-covenant.org/translations
@@ -0,0 +1,122 @@
1
+ # Contributing
2
+
3
+ Contributions are always welcome, no matter how large or small!
4
+
5
+ We want this community to be friendly and respectful to each other. Please follow it in all your interactions with the project. Before contributing, please read the [code of conduct](./CODE_OF_CONDUCT.md).
6
+
7
+ ## Development workflow
8
+
9
+ This project is a monorepo managed using [Yarn workspaces](https://yarnpkg.com/features/workspaces). It contains the following packages:
10
+
11
+ - The library package in the root directory.
12
+ - An example app in the `example/` directory.
13
+
14
+ To get started with the project, run `yarn` in the root directory to install the required dependencies for each package:
15
+
16
+ ```sh
17
+ yarn
18
+ ```
19
+
20
+ > Since the project relies on Yarn workspaces, you cannot use [`npm`](https://github.com/npm/cli) for development.
21
+
22
+ The [example app](/example/) demonstrates usage of the library. You need to run it to test any changes you make.
23
+
24
+ It is configured to use the local version of the library, so any changes you make to the library's source code will be reflected in the example app. Changes to the library's JavaScript code will be reflected in the example app without a rebuild, but native code changes will require a rebuild of the example app.
25
+
26
+ If you want to use Android Studio or XCode to edit the native code, you can open the `example/android` or `example/ios` directories respectively in those editors. To edit the Objective-C or Swift files, open `example/ios/ZyprotectabioModuleExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > react-native-zyprotectabio-module`.
27
+
28
+ To edit the Java or Kotlin files, open `example/android` in Android studio and find the source files at `react-native-zyprotectabio-module` under `Android`.
29
+
30
+ You can use various commands from the root directory to work with the project.
31
+
32
+ To start the packager:
33
+
34
+ ```sh
35
+ yarn example start
36
+ ```
37
+
38
+ To run the example app on Android:
39
+
40
+ ```sh
41
+ yarn example android
42
+ ```
43
+
44
+ To run the example app on iOS:
45
+
46
+ ```sh
47
+ yarn example ios
48
+ ```
49
+
50
+ Make sure your code passes TypeScript and ESLint. Run the following to verify:
51
+
52
+ ```sh
53
+ yarn typecheck
54
+ yarn lint
55
+ ```
56
+
57
+ To fix formatting errors, run the following:
58
+
59
+ ```sh
60
+ yarn lint --fix
61
+ ```
62
+
63
+ Remember to add tests for your change if possible. Run the unit tests by:
64
+
65
+ ```sh
66
+ yarn test
67
+ ```
68
+
69
+ ### Commit message convention
70
+
71
+ We follow the [conventional commits specification](https://www.conventionalcommits.org/en) for our commit messages:
72
+
73
+ - `fix`: bug fixes, e.g. fix crash due to deprecated method.
74
+ - `feat`: new features, e.g. add new method to the module.
75
+ - `refactor`: code refactor, e.g. migrate from class components to hooks.
76
+ - `docs`: changes into documentation, e.g. add usage example for the module..
77
+ - `test`: adding or updating tests, e.g. add integration tests using detox.
78
+ - `chore`: tooling changes, e.g. change CI config.
79
+
80
+ Our pre-commit hooks verify that your commit message matches this format when committing.
81
+
82
+ ### Linting and tests
83
+
84
+ [ESLint](https://eslint.org/), [Prettier](https://prettier.io/), [TypeScript](https://www.typescriptlang.org/)
85
+
86
+ We use [TypeScript](https://www.typescriptlang.org/) for type checking, [ESLint](https://eslint.org/) with [Prettier](https://prettier.io/) for linting and formatting the code, and [Jest](https://jestjs.io/) for testing.
87
+
88
+ Our pre-commit hooks verify that the linter and tests pass when committing.
89
+
90
+ ### Publishing to npm
91
+
92
+ We use [release-it](https://github.com/release-it/release-it) to make it easier to publish new versions. It handles common tasks like bumping version based on semver, creating tags and releases etc.
93
+
94
+ To publish new versions, run the following:
95
+
96
+ ```sh
97
+ yarn release
98
+ ```
99
+
100
+ ### Scripts
101
+
102
+ The `package.json` file contains various scripts for common tasks:
103
+
104
+ - `yarn`: setup project by installing dependencies.
105
+ - `yarn typecheck`: type-check files with TypeScript.
106
+ - `yarn lint`: lint files with ESLint.
107
+ - `yarn test`: run unit tests with Jest.
108
+ - `yarn example start`: start the Metro server for the example app.
109
+ - `yarn example android`: run the example app on Android.
110
+ - `yarn example ios`: run the example app on iOS.
111
+
112
+ ### Sending a pull request
113
+
114
+ > **Working on your first pull request?** You can learn how from this _free_ series: [How to Contribute to an Open Source Project on GitHub](https://app.egghead.io/playlists/how-to-contribute-to-an-open-source-project-on-github).
115
+
116
+ When you're sending a pull request:
117
+
118
+ - Prefer small pull requests focused on one change.
119
+ - Verify that linters and tests are passing.
120
+ - Review the documentation to make sure it looks good.
121
+ - Follow the pull request template when opening a pull request.
122
+ - For pull requests that change the API or implementation, discuss with maintainers first by opening an issue.
package/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Iván Cáceres
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is
9
+ furnished to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all
12
+ copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,178 @@
1
+ # react-native-zyprotectabio-module
2
+
3
+ Libreria la cual es encargada de verificación biométrica de personas peruanas.
4
+ Esta libreria esta diseñada especificamente para le empresa 11 poc.
5
+
6
+ ## Anotaciones
7
+
8
+ ### iOS: version para iOS fue compilada con XCODE 15.4, es decir que el preoyecto debe utilizar XCODE 15.3 o superior , ademas el tarjet minimo es ios 13.0
9
+ ### Android: version minima de android es 24, version compilada con compileSDK 34, se recomienda usar compileSDK 34 o superior
10
+ ### MOVIL: Libreria solo será valida apartir de la version 0.10.9 .
11
+
12
+
13
+ ## NOTAS:
14
+ ```
15
+
16
+ ```
17
+ ```
18
+
19
+ ```
20
+
21
+ ## Installation
22
+
23
+ ```sh
24
+ npm install react-native-zyprotectabio-module
25
+ ```
26
+
27
+ ## Usage
28
+
29
+ ### MÉTODO
30
+ ```js
31
+ import { NativeModules } from 'react-native';
32
+
33
+ // ...
34
+
35
+ const opciones = {
36
+ tiDocumento: "1", // tipo Documento : DNI: 1 nuDocumento: documentNumber, // Numero de documento
37
+ nuDocumento: "00112233", // Número de documento
38
+ accessToken: "abcdfghi12345", // Access token generado por ambiente
39
+ bioPais: "PE", //Pais de verificacion (siempre PE)
40
+ tiOperacion: "FULL", //Operacion puede ser FULL o FACIAL
41
+ urlSource: "DEV2", // Ambiente a la conexion DEV2 , POC , DEVX , SIGN (PRODUCCION)
42
+ };
43
+ NativeModules.ZyProtectaBioRn.validacionFacialOcr(opciones)
44
+ .then(result => {
45
+ })
46
+
47
+ //..
48
+
49
+ //para mas información revisar el documento de especificación.
50
+ ```
51
+ ## ANDROID FIRMA
52
+ - Para su funcionamiento es necesario correr el app con la firma(SHA-1) compartida a ZyTrust, tanto en debug/release porque la licensia esta vinculada al applicationId y SHA-1 de la firma
53
+
54
+ - EJEMPLO:
55
+ A nivel del build.gradle(App)
56
+ ```
57
+ android {
58
+ ...
59
+
60
+ signingConfigs {
61
+ debug {
62
+ keyAlias 'miFirma'
63
+ keyPassword 'miFirma'
64
+ storeFile file('../miFirma.jks')
65
+ storePassword 'miFirma'
66
+ }
67
+ release {
68
+ keyAlias 'miFirma'
69
+ keyPassword 'miFirma'
70
+ storeFile file('../miFirma.jks')
71
+ storePassword 'miFirma'
72
+ }
73
+ }
74
+ defaultConfig {
75
+ ...
76
+ }
77
+ ...
78
+ }
79
+
80
+ ```
81
+ ## ANDROID REGLAS OFUSCAMIENTO
82
+ ```
83
+
84
+ ####################### INICIO Zy Lib #################################
85
+ -dontwarn org.bouncycastle.jce.provider.BouncyCastleProvider
86
+ -dontwarn com.google.gson.**
87
+ -dontwarn com.facebook.jni.**
88
+ -dontwarn com.facebook.react.**
89
+
90
+ # Mantener Zytrust
91
+ -keep class com.zy.protecta.android.lib.sdk.validacionfacial.** { *; }
92
+ -keep interface com.zy.protecta.android.lib.sdk.validacionfacial.** { *; }
93
+
94
+ # Mantener auth0
95
+ -keep class com.auth0.** { *; }
96
+
97
+ # Mantener FACE IDENTY
98
+ -keep class com.identy.face.** { *; }
99
+ -keep enum * {*;}
100
+
101
+ # Mantener Regula OCR
102
+ -keep class com.regula.documentreader.** { *; }
103
+ -keep class com.regula.common.** { *; }
104
+ -keep class androidx.appcompat.widget.FitWindowsLinearLayout { *; }
105
+
106
+
107
+ # Mantener todo React Native
108
+ -keep class com.facebook.react.** { *; }
109
+ -keep class com.zyprotectabiomodule.** { *; }
110
+ -keep class com.testprotecta_new.** { *; } # es del app test no es necesario incluirlo
111
+
112
+ # Mantener todos los managers y eventos nativos
113
+ -keep class com.facebook.react.uimanager.** { *; }
114
+ -keep class com.facebook.react.bridge.** { *; }
115
+
116
+ # Mantener componentes que usan reflexión (ViewManagers, NativeModules)
117
+ -keepclassmembers class * {
118
+ @com.facebook.react.uimanager.annotations.ReactProp <methods>;
119
+ }
120
+
121
+ # Mantener clases usadas por JavaScriptCore
122
+ -keep class com.facebook.jni.** { *; }
123
+
124
+ # Mantener atributos de anotaciones (ReactProp, ReactModule, etc.)
125
+ -keepattributes *Annotation*
126
+
127
+
128
+ # Mantener Retrofit interfaces y métodos
129
+ -keep interface retrofit2.** { *; }
130
+ -keep class retrofit2.** { *; }
131
+ -dontwarn retrofit2.**
132
+
133
+ # Mantener métodos anotados de Retrofit
134
+ -keepclassmembers class * {
135
+ @retrofit2.http.* <methods>;
136
+ }
137
+
138
+ # Mantener OkHttp
139
+ -keep class okhttp3.** { *; }
140
+ -dontwarn okhttp3.**
141
+
142
+ # Mantener Okio (usado por OkHttp)
143
+ -keep class okio.** { *; }
144
+ -dontwarn okio.**
145
+
146
+ # Mantener adaptadores de conversión (si usas Gson, Moshi, etc.)
147
+ -keep class com.google.gson.** { *; }
148
+
149
+
150
+ ####################### FIN Zy Lib #################################
151
+
152
+ ```
153
+ ## Contributing
154
+
155
+ - Elaborado por Zytrust S.A.
156
+
157
+ - Compañia ZyTrust S.A. Perú
158
+
159
+
160
+ ## License
161
+
162
+ ZyTrust S.A. Perú
163
+
164
+
165
+ ## Contact
166
+
167
+ - Webpage: https://www.zytrust.com/
168
+
169
+ - Oficina: Av. República de Panamá 3609, San Isidro. Lima, Perú.
170
+
171
+ - Teléfono: +51 1 321 4444 || (+51) 974 260 111
172
+
173
+ - Email: info@zytrust.com || support@zytrust.com || ztmobile@zytrust.com
174
+
175
+
176
+ ---
177
+
178
+ Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)
File without changes
File without changes
@@ -0,0 +1,2 @@
1
+ #Thu Dec 18 19:32:36 PET 2025
2
+ gradle.version=9.0-milestone-1
@@ -0,0 +1,2 @@
1
+ #Thu Dec 04 11:39:59 PET 2025
2
+ java.home=/Applications/Android Studio.app/Contents/jbr/Contents/Home
File without changes
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="AndroidProjectSystem">
4
+ <option name="providerId" value="com.android.tools.idea.GradleProjectSystem" />
5
+ </component>
6
+ </project>
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="JAVA_MODULE" version="4">
3
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
4
+ <exclude-output />
5
+ <content url="file://$MODULE_DIR$" />
6
+ <orderEntry type="inheritedJdk" />
7
+ <orderEntry type="sourceFolder" forTests="false" />
8
+ </component>
9
+ </module>