@finos_sdk/sdk-ekyc 1.2.2 → 1.2.8

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 (86) hide show
  1. package/LICENSE +13 -10
  2. package/README.md +41 -42
  3. package/android/build.gradle +42 -11
  4. package/android/gradle.properties +7 -1
  5. package/android/settings.gradle +53 -0
  6. package/android/src/main/java/finos/sdk/ekyc/EKYCModule.kt +778 -81
  7. package/dist/EKYCModule.d.ts +72 -0
  8. package/dist/EKYCModule.js +650 -71
  9. package/dist/finos_sdk-sdk-ekyc-1.2.8.tgz +0 -0
  10. package/dist/index.d.ts +6 -1
  11. package/dist/index.js +5 -1
  12. package/dist/package.json +31 -21
  13. package/dist/src/modules/FinosEKYCModule.d.ts +144 -0
  14. package/dist/src/modules/FinosEKYCModule.js +468 -2
  15. package/dist/src/modules/FinosESignModule.d.ts +270 -0
  16. package/dist/src/modules/FinosESignModule.js +752 -0
  17. package/dist/src/types/ekycESignType.d.ts +67 -0
  18. package/dist/src/types/ekycESignType.js +2 -0
  19. package/dist/src/types/ekycSmsOtpType.d.ts +52 -0
  20. package/dist/src/types/ekycSmsOtpType.js +2 -0
  21. package/package.json +31 -21
  22. package/src/modules/FinosEKYCModule.ts +554 -2
  23. package/src/modules/FinosESignModule.ts +919 -0
  24. package/src/modules/README.md +3 -3
  25. package/src/types/ekycESignType.ts +76 -0
  26. package/src/types/ekycSmsOtpType.ts +59 -0
  27. package/android/SDKeKYC/finos/sdk/ekyc/c06/1.2.2/c06-1.2.2-sources.jar +0 -0
  28. package/android/SDKeKYC/finos/sdk/ekyc/c06/1.2.2/c06-1.2.2.aar +0 -0
  29. package/android/SDKeKYC/finos/sdk/ekyc/c06/1.2.2/c06-1.2.2.module +0 -110
  30. package/android/SDKeKYC/finos/sdk/ekyc/c06/1.2.2/c06-1.2.2.pom +0 -37
  31. package/android/SDKeKYC/finos/sdk/ekyc/c06/maven-metadata-local.xml +0 -13
  32. package/android/SDKeKYC/finos/sdk/ekyc/ekyc/1.2.2/ekyc-1.2.2-sources.jar +0 -0
  33. package/android/SDKeKYC/finos/sdk/ekyc/ekyc/1.2.2/ekyc-1.2.2.aar +0 -0
  34. package/android/SDKeKYC/finos/sdk/ekyc/ekyc/1.2.2/ekyc-1.2.2.module +0 -201
  35. package/android/SDKeKYC/finos/sdk/ekyc/ekyc/1.2.2/ekyc-1.2.2.pom +0 -73
  36. package/android/SDKeKYC/finos/sdk/ekyc/ekyc/maven-metadata-local.xml +0 -13
  37. package/android/SDKeKYC/finos/sdk/ekyc/ekycui/1.2.2/ekycui-1.2.2-sources.jar +0 -0
  38. package/android/SDKeKYC/finos/sdk/ekyc/ekycui/1.2.2/ekycui-1.2.2.aar +0 -0
  39. package/android/SDKeKYC/finos/sdk/ekyc/ekycui/1.2.2/ekycui-1.2.2.module +0 -131
  40. package/android/SDKeKYC/finos/sdk/ekyc/ekycui/1.2.2/ekycui-1.2.2.pom +0 -43
  41. package/android/SDKeKYC/finos/sdk/ekyc/ekycui/maven-metadata-local.xml +0 -13
  42. package/android/SDKeKYC/finos/sdk/ekyc/faceservice/1.2.2/faceservice-1.2.2-sources.jar +0 -0
  43. package/android/SDKeKYC/finos/sdk/ekyc/faceservice/1.2.2/faceservice-1.2.2.aar +0 -0
  44. package/android/SDKeKYC/finos/sdk/ekyc/faceservice/1.2.2/faceservice-1.2.2.module +0 -110
  45. package/android/SDKeKYC/finos/sdk/ekyc/faceservice/1.2.2/faceservice-1.2.2.pom +0 -37
  46. package/android/SDKeKYC/finos/sdk/ekyc/faceservice/maven-metadata-local.xml +0 -13
  47. package/android/SDKeKYC/finos/sdk/ekyc/liveness/1.2.2/liveness-1.2.2-sources.jar +0 -0
  48. package/android/SDKeKYC/finos/sdk/ekyc/liveness/1.2.2/liveness-1.2.2.aar +0 -0
  49. package/android/SDKeKYC/finos/sdk/ekyc/liveness/1.2.2/liveness-1.2.2.module +0 -138
  50. package/android/SDKeKYC/finos/sdk/ekyc/liveness/1.2.2/liveness-1.2.2.pom +0 -55
  51. package/android/SDKeKYC/finos/sdk/ekyc/liveness/maven-metadata-local.xml +0 -13
  52. package/android/SDKeKYC/finos/sdk/ekyc/nfc/1.2.2/nfc-1.2.2-sources.jar +0 -0
  53. package/android/SDKeKYC/finos/sdk/ekyc/nfc/1.2.2/nfc-1.2.2.aar +0 -0
  54. package/android/SDKeKYC/finos/sdk/ekyc/nfc/1.2.2/nfc-1.2.2.module +0 -131
  55. package/android/SDKeKYC/finos/sdk/ekyc/nfc/1.2.2/nfc-1.2.2.pom +0 -55
  56. package/android/SDKeKYC/finos/sdk/ekyc/nfc/maven-metadata-local.xml +0 -13
  57. package/android/SDKeKYC/finos/sdk/ekyc/ocr/1.2.2/ocr-1.2.2-sources.jar +0 -0
  58. package/android/SDKeKYC/finos/sdk/ekyc/ocr/1.2.2/ocr-1.2.2.aar +0 -0
  59. package/android/SDKeKYC/finos/sdk/ekyc/ocr/1.2.2/ocr-1.2.2.module +0 -124
  60. package/android/SDKeKYC/finos/sdk/ekyc/ocr/1.2.2/ocr-1.2.2.pom +0 -43
  61. package/android/SDKeKYC/finos/sdk/ekyc/ocr/maven-metadata-local.xml +0 -13
  62. package/android/SDKeKYC/finos/sdk/ekyc/qrcode/1.2.2/qrcode-1.2.2-sources.jar +0 -0
  63. package/android/SDKeKYC/finos/sdk/ekyc/qrcode/1.2.2/qrcode-1.2.2.aar +0 -0
  64. package/android/SDKeKYC/finos/sdk/ekyc/qrcode/1.2.2/qrcode-1.2.2.module +0 -138
  65. package/android/SDKeKYC/finos/sdk/ekyc/qrcode/1.2.2/qrcode-1.2.2.pom +0 -55
  66. package/android/SDKeKYC/finos/sdk/ekyc/qrcode/maven-metadata-local.xml +0 -13
  67. package/android/SDKeKYC/finos/sdk/ekyc/sdkcore/1.2.2/sdkcore-1.2.2-sources.jar +0 -0
  68. package/android/SDKeKYC/finos/sdk/ekyc/sdkcore/1.2.2/sdkcore-1.2.2.aar +0 -0
  69. package/android/SDKeKYC/finos/sdk/ekyc/sdkcore/1.2.2/sdkcore-1.2.2.module +0 -341
  70. package/android/SDKeKYC/finos/sdk/ekyc/sdkcore/1.2.2/sdkcore-1.2.2.pom +0 -139
  71. package/android/SDKeKYC/finos/sdk/ekyc/sdkcore/maven-metadata-local.xml +0 -13
  72. package/android/SDKeKYC/finos/sdk/ekyc/sdkcorecamera/1.2.2/sdkcorecamera-1.2.2-sources.jar +0 -0
  73. package/android/SDKeKYC/finos/sdk/ekyc/sdkcorecamera/1.2.2/sdkcorecamera-1.2.2.aar +0 -0
  74. package/android/SDKeKYC/finos/sdk/ekyc/sdkcorecamera/1.2.2/sdkcorecamera-1.2.2.module +0 -201
  75. package/android/SDKeKYC/finos/sdk/ekyc/sdkcorecamera/1.2.2/sdkcorecamera-1.2.2.pom +0 -85
  76. package/android/SDKeKYC/finos/sdk/ekyc/sdkcorecamera/maven-metadata-local.xml +0 -13
  77. package/android/SDKeKYC/finos/sdk/ekyc/sdkui/1.2.2/sdkui-1.2.2-sources.jar +0 -0
  78. package/android/SDKeKYC/finos/sdk/ekyc/sdkui/1.2.2/sdkui-1.2.2.aar +0 -0
  79. package/android/SDKeKYC/finos/sdk/ekyc/sdkui/1.2.2/sdkui-1.2.2.module +0 -208
  80. package/android/SDKeKYC/finos/sdk/ekyc/sdkui/1.2.2/sdkui-1.2.2.pom +0 -103
  81. package/android/SDKeKYC/finos/sdk/ekyc/sdkui/maven-metadata-local.xml +0 -13
  82. package/android/src/main/AndroidManifest.xml +0 -22
  83. package/android/src/main/build.gradle +0 -31
  84. package/dist/App.d.ts +0 -3
  85. package/dist/App.js +0 -497
  86. package/dist/finos_sdk-sdk-ekyc-1.2.2.tgz +0 -0
@@ -0,0 +1,67 @@
1
+ /**
2
+ * User Information Model for eSign
3
+ */
4
+ export interface UserEsignModel {
5
+ /**
6
+ * ID card number (CCCD/CMND)
7
+ */
8
+ cccd: string;
9
+ /**
10
+ * User name
11
+ */
12
+ name: string;
13
+ /**
14
+ * Device type (e.g., "Android", "iOS")
15
+ */
16
+ device: string;
17
+ /**
18
+ * Device ID
19
+ */
20
+ deviceId: string;
21
+ }
22
+ /**
23
+ * eSign Initialize Result
24
+ */
25
+ export interface ESignInitResult {
26
+ code: string;
27
+ message: string;
28
+ }
29
+ /**
30
+ * eSign Open Session Result
31
+ */
32
+ export interface ESignOpenSessionResult {
33
+ deviceState: string;
34
+ code: string;
35
+ message: string;
36
+ }
37
+ /**
38
+ * eSign Certificate Info
39
+ */
40
+ export interface ESignCertificate {
41
+ serial: string;
42
+ subject: string;
43
+ validFrom?: string;
44
+ validTo?: string;
45
+ }
46
+ /**
47
+ * eSign Sign Request Info
48
+ */
49
+ export interface ESignSignRequest {
50
+ requestId: string;
51
+ documentName?: string;
52
+ status?: string;
53
+ }
54
+ /**
55
+ * eSign Error Result
56
+ */
57
+ export interface ESignError {
58
+ code: string;
59
+ message: string;
60
+ }
61
+ /**
62
+ * eSign Authenticate Result
63
+ */
64
+ export interface ESignAuthenticateResult {
65
+ token: string;
66
+ userId: string;
67
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,52 @@
1
+ /**
2
+ * SMS OTP Configuration
3
+ */
4
+ export interface SmsOtpConfig {
5
+ /**
6
+ * Phone number with country code (e.g., +84901234567)
7
+ */
8
+ phoneNumber: string;
9
+ /**
10
+ * Purpose of OTP (default: "transaction")
11
+ */
12
+ purpose?: string;
13
+ /**
14
+ * Your reference ID for tracking
15
+ */
16
+ referenceId: string;
17
+ /**
18
+ * Request ID from sendOtp response (required for verify/resend)
19
+ */
20
+ requestId?: string;
21
+ }
22
+ /**
23
+ * SMS OTP Error Result
24
+ */
25
+ export interface SmsOtpError {
26
+ /**
27
+ * Error event code
28
+ */
29
+ code: string;
30
+ /**
31
+ * Error message
32
+ */
33
+ message: string;
34
+ }
35
+ /**
36
+ * SMS OTP Success Result
37
+ */
38
+ export interface SmsOtpResult {
39
+ /**
40
+ * Event type
41
+ */
42
+ event: string;
43
+ /**
44
+ * Response data
45
+ */
46
+ data?: {
47
+ requestId?: string;
48
+ expiresIn?: string;
49
+ verifiedAt?: string;
50
+ [key: string]: any;
51
+ };
52
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,32 +1,32 @@
1
1
  {
2
2
  "name": "@finos_sdk/sdk-ekyc",
3
- "version": "1.2.2",
4
- "description": "React Native SDK for eKYC - Vietnamese CCCD NFC reading, OCR, Liveness detection, Face matching, and C06 residence verification",
3
+ "version": "1.2.8",
4
+ "description": "React Native SDK for eKYC - Vietnamese CCCD NFC reading, OCR, Liveness detection, Face matching, and C06, eSign, SmsOTP residence verification",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "files": [
8
8
  "dist",
9
9
  "react-native.config.js",
10
- "android/src",
10
+ "android/src/main/java",
11
11
  "android/build.gradle",
12
+ "android/settings.gradle",
12
13
  "android/gradle.properties",
13
14
  "android/gradle/wrapper/**",
14
15
  "android/gradlew",
15
16
  "android/gradlew.bat",
16
17
  "android/consumer-rules.pro",
17
- "android/SDKeKYC/**",
18
18
  "src/**"
19
19
  ],
20
20
  "repository": {
21
21
  "type": "git",
22
- "url": "git+https://github.com/finos/sdk-ekyc.git"
22
+ "url": "git+https://github.com/finosvn/finos.ekyc.sdk.git"
23
23
  },
24
24
  "author": "FinOS",
25
25
  "license": "MIT",
26
26
  "bugs": {
27
- "url": "https://github.com/finos/sdk-ekyc/issues"
27
+ "url": "https://github.com/finosvn/finos.ekyc.sdk/issues"
28
28
  },
29
- "homepage": "https://github.com/finos/sdk-ekyc#readme",
29
+ "homepage": "https://github.com/finosvn/finos.ekyc.sdk#readme",
30
30
  "keywords": [
31
31
  "react-native",
32
32
  "ekyc",
@@ -42,36 +42,46 @@
42
42
  "typescript"
43
43
  ],
44
44
  "scripts": {
45
- "android": "npx react-native run-android",
45
+ "android": "npm run build && npm run bundle:android && npx react-native run-android",
46
+ "bundle:android": "mkdir -p android/app/src/main/assets && curl -s \"http://localhost:8081/index.bundle?platform=android&dev=false&minify=false\" -o android/app/src/main/assets/index.android.bundle || echo \"⚠️ Metro không chạy, bỏ qua bundle\"",
47
+ "android:log": "npm run build && npm run bundle:android && npx react-native run-android && sleep 8 && npm run log:all",
48
+ "reload": "npm run log:reload",
46
49
  "ios": "react-native run-ios",
47
- "start": "react-native start --reset-cache",
50
+ "start": "react-native start",
51
+ "reset": "react-native start --reset-cache",
48
52
  "clean": "cd android && ./gradlew clean && cd ..",
49
53
  "npm-install": "npm install",
50
- "build": "tsc",
54
+ "build": "npx --package=typescript tsc",
51
55
  "prepare": "npm run build",
52
56
  "publish-sdk-local": "npm pack",
53
57
  "publish-sdk": "npm run build && npm publish --access public",
54
58
  "publish-sdk-version": "npm run build && npm version patch --force && npm publish --access public",
55
59
  "prepublishOnly": "npm run build",
56
- "unpublish:1.2.2": "node -e \"if(process.env.CONFIRM_UNPUBLISH==='YES'){process.exit(0)}else{console.error('Set CONFIRM_UNPUBLISH=YES to confirm');process.exit(1)}\" && npm unpublish @finos_sdk/sdk-ekyc@1.2.2"
60
+ "unpublish:1.2.2": "node -e \"if(process.env.CONFIRM_UNPUBLISH==='YES'){process.exit(0)}else{console.error('Set CONFIRM_UNPUBLISH=YES to confirm');process.exit(1)}\" && npm unpublish @finos_sdk/sdk-ekyc@1.2.2",
61
+ "log:android": "npx react-native log-android",
62
+ "log:ios": "npx react-native log-ios",
63
+ "log:sdk": "./watch-sdk-logs.sh",
64
+ "log:buffer": "./watch-logs-with-buffer.sh",
65
+ "log:native": "./watch-native-logs.sh",
66
+ "log:all": "./watch-all-logs.sh",
67
+ "log:reload": "./reload-and-watch.sh",
68
+ "log:clear": "adb logcat -c && echo '✅ Logs cleared'"
57
69
  },
58
70
  "dependencies": {
59
71
  "react": "18.3.1",
60
- "react-native": "0.76.9",
61
- "tsyringe": "^4.10.0",
62
- "reflect-metadata": "^0.2.1"
72
+ "react-native": "0.77.0",
73
+ "reflect-metadata": "^0.2.1",
74
+ "tsyringe": "^4.10.0"
63
75
  },
64
76
  "devDependencies": {
65
77
  "@babel/core": "^7.25.2",
66
78
  "@babel/preset-env": "^7.25.3",
67
79
  "@babel/runtime": "^7.25.0",
68
- "@react-native-community/cli": "15.0.1",
69
- "@react-native-community/cli-platform-android": "15.0.1",
70
- "@react-native-community/cli-platform-ios": "15.0.1",
71
- "@react-native/babel-preset": "0.76.9",
72
- "@react-native/eslint-config": "0.76.9",
73
- "@react-native/metro-config": "0.76.9",
74
- "@react-native/typescript-config": "0.76.9",
80
+ "@react-native-community/cli": "16.0.3",
81
+ "@react-native/babel-preset": "0.77.0",
82
+ "@react-native/eslint-config": "0.77.0",
83
+ "@react-native/metro-config": "0.77.0",
84
+ "@react-native/typescript-config": "0.77.0",
75
85
  "@types/react": "^18.2.6",
76
86
  "@types/react-test-renderer": "^18.0.0",
77
87
  "babel-jest": "^29.6.3",