@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,270 @@
1
+ import { SDK_VERSION, SDK_NAME } from '../../EKYCModule';
2
+ import { SmsOtpConfig, SmsOtpResult, SmsOtpError } from '../types/ekycSmsOtpType';
3
+ import { UserEsignModel, ESignInitResult, ESignOpenSessionResult, ESignCertificate, ESignSignRequest, ESignError, ESignAuthenticateResult } from '../types/ekycESignType';
4
+ import { LivenessConfig } from '../types/ekycLivenessType';
5
+ import { FaceServiceConfig } from '../types/ekycFaceType';
6
+ import { SDKEkycResultStringWithEvent, SDKEkycResultWithEvent } from '../types/ekycType';
7
+ /**
8
+ * Finos eSign SDK Module
9
+ *
10
+ * A React Native module for eSign (Electronic Signature), SMS OTP, Liveness detection,
11
+ * and Face matching operations. This module excludes NFC, C06, and OCR features.
12
+ *
13
+ * @version Dynamic from package.json
14
+ * @author FinOS
15
+ * @license MIT
16
+ */
17
+ export declare class FinosESignModule {
18
+ private static instance;
19
+ private sdk;
20
+ private isInitialized;
21
+ private platform;
22
+ private constructor();
23
+ /**
24
+ * Get singleton instance of FinosESignModule
25
+ */
26
+ static getInstance(): FinosESignModule;
27
+ /**
28
+ * Get SDK information
29
+ */
30
+ getSDKInfo(): Promise<{
31
+ name: string;
32
+ version: string;
33
+ buildNumber: string;
34
+ platform: string;
35
+ isInitialized: boolean;
36
+ }>;
37
+ /**
38
+ * Initialize the eSign SDK
39
+ * Must be called before using any other methods
40
+ */
41
+ initialize(): Promise<string>;
42
+ /**
43
+ * Check if SDK is initialized
44
+ */
45
+ isSDKReady(): boolean;
46
+ /**
47
+ * Send SMS OTP
48
+ * @param config SMS OTP configuration
49
+ */
50
+ sendOtp(config: SmsOtpConfig): Promise<SmsOtpResult>;
51
+ /**
52
+ * Verify SMS OTP
53
+ * @param config SMS OTP configuration (must include requestId)
54
+ * @param otpCode OTP code from SMS
55
+ */
56
+ verifyOtp(config: SmsOtpConfig, otpCode: string): Promise<SmsOtpResult>;
57
+ /**
58
+ * Resend SMS OTP
59
+ * @param config SMS OTP configuration (must include requestId)
60
+ */
61
+ resendOtp(config: SmsOtpConfig): Promise<SmsOtpResult>;
62
+ onSmsOtpSendSuccess(callback: (data: SmsOtpResult) => void): import("react-native").EmitterSubscription | null;
63
+ onSmsOtpVerifySuccess(callback: (data: SmsOtpResult) => void): import("react-native").EmitterSubscription | null;
64
+ onSmsOtpResendSuccess(callback: (data: SmsOtpResult) => void): import("react-native").EmitterSubscription | null;
65
+ onSmsOtpError(callback: (error: SmsOtpError) => void): import("react-native").EmitterSubscription | null;
66
+ /**
67
+ * Initialize eSign SDK
68
+ */
69
+ initializeESign(): Promise<ESignInitResult>;
70
+ /**
71
+ * Open eSign session
72
+ * @param accessToken JWT access token (optional if using userEsignModel)
73
+ * @param username Optional username
74
+ * @param rememberMe Remember session
75
+ * @param userEsignModel User info for auto token creation (optional if using accessToken)
76
+ * @param privateKeyFilePath Path to private key file in assets (required if using userEsignModel)
77
+ */
78
+ openSessionId(accessToken?: string, username?: string, rememberMe?: boolean, userEsignModel?: UserEsignModel, privateKeyFilePath?: string): Promise<ESignOpenSessionResult>;
79
+ /**
80
+ * Register device for eSign
81
+ * @param recoverCode 8-digit recovery code
82
+ * @param pinCode 6-digit PIN code
83
+ * @param fcmToken Optional FCM token
84
+ */
85
+ registerDevice(recoverCode: string, pinCode: string, fcmToken?: string): Promise<{
86
+ code: string;
87
+ message: string;
88
+ }>;
89
+ /**
90
+ * List eSign certificates
91
+ * @param pageNumber Page number (default: 1)
92
+ * @param pageSize Page size (default: 10)
93
+ */
94
+ listCerts(pageNumber?: number, pageSize?: number): Promise<{
95
+ certs: ESignCertificate[];
96
+ }>;
97
+ /**
98
+ * Verify eSign certificate
99
+ * @param serial Certificate serial number
100
+ */
101
+ verifyCert(serial: string): Promise<{
102
+ code: string;
103
+ message: string;
104
+ }>;
105
+ /**
106
+ * List eSign sign requests
107
+ * @param pageNumber Page number (default: 1)
108
+ * @param pageSize Page size (default: 10)
109
+ */
110
+ listSignRequest(pageNumber?: number, pageSize?: number): Promise<{
111
+ requests: ESignSignRequest[];
112
+ }>;
113
+ /**
114
+ * Confirm eSign signature
115
+ * @param signRequestId Sign request ID
116
+ * @param pinCode 6-digit PIN code
117
+ * @param authId Optional auth ID
118
+ * @param authData Optional auth data
119
+ * @param confirm Confirm the signature (default: true)
120
+ */
121
+ confirmSign(signRequestId: string, pinCode: string, authId?: string, authData?: string, confirm?: boolean): Promise<{
122
+ code: string;
123
+ message: string;
124
+ }>;
125
+ /**
126
+ * Authenticate with eSign
127
+ * @param username eSign username
128
+ * @param password eSign password
129
+ */
130
+ authenticate(username: string, password: string): Promise<ESignAuthenticateResult>;
131
+ /**
132
+ * Register remote signing certificate
133
+ * @param accessToken JWT access token
134
+ * @param requestJson JSON request body
135
+ */
136
+ registerRemoteSigning(accessToken: string, requestJson: string): Promise<{
137
+ response: string;
138
+ }>;
139
+ /**
140
+ * Sign PDF document
141
+ * @param accessToken JWT access token
142
+ * @param requestJson JSON request body
143
+ */
144
+ signPdf(accessToken: string, requestJson: string): Promise<{
145
+ response: string;
146
+ }>;
147
+ /**
148
+ * Send confirmation document
149
+ * @param accessToken JWT access token
150
+ * @param requestJson JSON string containing request data
151
+ */
152
+ sendConfirmationDocument(accessToken: string, requestJson: string): Promise<{
153
+ response: string;
154
+ }>;
155
+ /**
156
+ * Remove all event listeners
157
+ */
158
+ removeAllListeners(): void;
159
+ onESignInitSuccess(callback: (data: ESignInitResult) => void): import("react-native").EmitterSubscription | null;
160
+ onESignOpenSessionSuccess(callback: (data: ESignOpenSessionResult) => void): import("react-native").EmitterSubscription | null;
161
+ onESignRegisterDeviceSuccess(callback: (data: {
162
+ code: string;
163
+ message: string;
164
+ }) => void): import("react-native").EmitterSubscription | null;
165
+ onESignListCertsSuccess(callback: (data: {
166
+ certs: ESignCertificate[];
167
+ }) => void): import("react-native").EmitterSubscription | null;
168
+ onESignVerifyCertSuccess(callback: (data: {
169
+ code: string;
170
+ message: string;
171
+ }) => void): import("react-native").EmitterSubscription | null;
172
+ onESignListSignRequestSuccess(callback: (data: {
173
+ requests: ESignSignRequest[];
174
+ }) => void): import("react-native").EmitterSubscription | null;
175
+ onESignConfirmSignSuccess(callback: (data: {
176
+ code: string;
177
+ message: string;
178
+ }) => void): import("react-native").EmitterSubscription | null;
179
+ onESignAuthenticateSuccess(callback: (data: ESignAuthenticateResult) => void): import("react-native").EmitterSubscription | null;
180
+ onESignRegisterRemoteSigningSuccess(callback: (data: {
181
+ response: string;
182
+ }) => void): import("react-native").EmitterSubscription | null;
183
+ onESignSignPdfSuccess(callback: (data: {
184
+ response: string;
185
+ }) => void): import("react-native").EmitterSubscription | null;
186
+ onESignSendConfirmationDocumentSuccess(callback: (data: {
187
+ response: string;
188
+ }) => void): import("react-native").EmitterSubscription | null;
189
+ onESignError(callback: (error: ESignError) => void): import("react-native").EmitterSubscription | null;
190
+ /**
191
+ * Start liveness detection
192
+ * @param config Liveness configuration (includes switchFrontCamera for camera control)
193
+ */
194
+ startLiveness(config: LivenessConfig): Promise<SDKEkycResultStringWithEvent>;
195
+ onLivenessSuccess(callback: (data: SDKEkycResultStringWithEvent) => void): import("react-native").EmitterSubscription | null;
196
+ onLivenessError(callback: (error: any) => void): import("react-native").EmitterSubscription | null;
197
+ /**
198
+ * Start face comparison
199
+ * @param config Face service configuration
200
+ */
201
+ startFaceCompare(config: FaceServiceConfig): Promise<SDKEkycResultStringWithEvent>;
202
+ onFaceCompareSuccess(callback: (data: SDKEkycResultWithEvent) => void): import("react-native").EmitterSubscription | null;
203
+ onFaceCompareError(callback: (error: any) => void): import("react-native").EmitterSubscription | null;
204
+ /**
205
+ * Start eKYC UI with flow (excluding NFC, C06, OCR)
206
+ * Only supports LIVENESS and FACE in flowSDK array
207
+ * @param appKey Main app key
208
+ * @param flowSDK Array of SDK types (only 'LIVENESS' and 'FACE' are allowed)
209
+ * @param language Language code (vi/en)
210
+ * @param transactionId Transaction ID
211
+ * @param appKeyConfig App key configuration
212
+ * @param optionConfig Optional configuration settings (includes switchFrontCamera for camera control)
213
+ * @param styleConfig Optional style configuration
214
+ */
215
+ startEkycUI(appKey: string, flowSDK: string[], language: string, transactionId: string, appKeyConfig: {
216
+ appKey: string;
217
+ appKeyLiveness: string;
218
+ appKeyFaceService: string;
219
+ }, optionConfig?: {
220
+ baseUrl?: string;
221
+ countMaxRetry?: number;
222
+ language?: string;
223
+ switchFrontCamera?: boolean;
224
+ }, styleConfig?: {
225
+ textSize?: number;
226
+ textFont?: string;
227
+ textColor?: number;
228
+ statusBarBackground?: number;
229
+ backIcon?: number;
230
+ titleStyle?: {
231
+ textSize?: number;
232
+ textFont?: string;
233
+ textColor?: number;
234
+ };
235
+ toolbarStyle?: {
236
+ textSize?: number;
237
+ textFont?: string;
238
+ textColor?: number;
239
+ };
240
+ instructionStyle?: {
241
+ textSize?: number;
242
+ textFont?: string;
243
+ textColor?: number;
244
+ };
245
+ errorStyle?: {
246
+ textSize?: number;
247
+ textFont?: string;
248
+ textColor?: number;
249
+ };
250
+ successStyle?: {
251
+ textSize?: number;
252
+ textFont?: string;
253
+ textColor?: number;
254
+ };
255
+ warningStyle?: {
256
+ textSize?: number;
257
+ textFont?: string;
258
+ textColor?: number;
259
+ };
260
+ }): Promise<any>;
261
+ private validateSDKReady;
262
+ }
263
+ export declare const FinosESign: FinosESignModule;
264
+ export type { SmsOtpConfig, SmsOtpResult, SmsOtpError } from '../types/ekycSmsOtpType';
265
+ export type { UserEsignModel, ESignInitResult, ESignOpenSessionResult, ESignCertificate, ESignSignRequest, ESignError, ESignAuthenticateResult } from '../types/ekycESignType';
266
+ export type { LivenessConfig } from '../types/ekycLivenessType';
267
+ export type { FaceServiceConfig } from '../types/ekycFaceType';
268
+ export type { SDKEkycResultStringWithEvent, SDKEkycResultWithEvent } from '../types/ekycType';
269
+ export { SDK_VERSION, SDK_NAME };
270
+ export default FinosESign;