@finos_sdk/sdk-ekyc 1.2.8 → 1.3.1

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.
@@ -1,6 +1,6 @@
1
1
  import { SDK_VERSION, SDK_NAME } from '../../EKYCModule';
2
2
  import { SmsOtpConfig, SmsOtpResult, SmsOtpError } from '../types/ekycSmsOtpType';
3
- import { UserEsignModel, ESignInitResult, ESignOpenSessionResult, ESignCertificate, ESignSignRequest, ESignError, ESignAuthenticateResult } from '../types/ekycESignType';
3
+ import { UserEsignModel, ESignInitResult, ESignOpenSessionResult, ESignCertificate, ESignSignRequest, ESignError } from '../types/ekycESignType';
4
4
  import { LivenessConfig } from '../types/ekycLivenessType';
5
5
  import { FaceServiceConfig } from '../types/ekycFaceType';
6
6
  import { SDKEkycResultStringWithEvent, SDKEkycResultWithEvent } from '../types/ekycType';
@@ -65,8 +65,16 @@ export declare class FinosESignModule {
65
65
  onSmsOtpError(callback: (error: SmsOtpError) => void): import("react-native").EmitterSubscription | null;
66
66
  /**
67
67
  * Initialize eSign SDK
68
+ * @param finosToken Optional access token (Client Credentials)
68
69
  */
69
- initializeESign(): Promise<ESignInitResult>;
70
+ initializeESign(finosToken?: string): Promise<ESignInitResult>;
71
+ /**
72
+ * Get SDK Token for Session
73
+ * @param identity User Identity (CCCD/CMND)
74
+ * @param name User Name
75
+ * @param deviceId Device ID
76
+ */
77
+ getSdkToken(identity: string, name: string, deviceId: string): Promise<string>;
70
78
  /**
71
79
  * Open eSign session
72
80
  * @param accessToken JWT access token (optional if using userEsignModel)
@@ -122,34 +130,25 @@ export declare class FinosESignModule {
122
130
  code: string;
123
131
  message: string;
124
132
  }>;
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
133
  /**
132
134
  * Register remote signing certificate
133
- * @param accessToken JWT access token
134
135
  * @param requestJson JSON request body
135
136
  */
136
- registerRemoteSigning(accessToken: string, requestJson: string): Promise<{
137
+ registerRemoteSigning(requestJson: string): Promise<{
137
138
  response: string;
138
139
  }>;
139
140
  /**
140
141
  * Sign PDF document
141
- * @param accessToken JWT access token
142
142
  * @param requestJson JSON request body
143
143
  */
144
- signPdf(accessToken: string, requestJson: string): Promise<{
144
+ signPdf(requestJson: string): Promise<{
145
145
  response: string;
146
146
  }>;
147
147
  /**
148
148
  * Send confirmation document
149
- * @param accessToken JWT access token
150
149
  * @param requestJson JSON string containing request data
151
150
  */
152
- sendConfirmationDocument(accessToken: string, requestJson: string): Promise<{
151
+ sendConfirmationDocument(requestJson: string): Promise<{
153
152
  response: string;
154
153
  }>;
155
154
  /**
@@ -176,7 +175,6 @@ export declare class FinosESignModule {
176
175
  code: string;
177
176
  message: string;
178
177
  }) => void): import("react-native").EmitterSubscription | null;
179
- onESignAuthenticateSuccess(callback: (data: ESignAuthenticateResult) => void): import("react-native").EmitterSubscription | null;
180
178
  onESignRegisterRemoteSigningSuccess(callback: (data: {
181
179
  response: string;
182
180
  }) => void): import("react-native").EmitterSubscription | null;
@@ -189,7 +187,13 @@ export declare class FinosESignModule {
189
187
  onESignError(callback: (error: ESignError) => void): import("react-native").EmitterSubscription | null;
190
188
  /**
191
189
  * Start liveness detection
192
- * @param config Liveness configuration (includes switchFrontCamera for camera control)
190
+ * @param config Liveness configuration
191
+ * @param config.isActiveLiveness - Enable active liveness detection (default: false)
192
+ * @param config.autoCapture - Enable auto capture (default: true)
193
+ * @param config.isShowCameraFont - Show camera font (default: true)
194
+ * @param config.customActions - Custom actions array (LEFT, RIGHT, STRAIGHT). If provided, uses these actions instead of random
195
+ * @param config.activeActionCount - Number of random actions (1-10), only used when customActions is null (default: 2)
196
+ * @param config.switchFrontCamera - Use front camera (default: false)
193
197
  */
194
198
  startLiveness(config: LivenessConfig): Promise<SDKEkycResultStringWithEvent>;
195
199
  onLivenessSuccess(callback: (data: SDKEkycResultStringWithEvent) => void): import("react-native").EmitterSubscription | null;
@@ -264,6 +268,7 @@ export declare const FinosESign: FinosESignModule;
264
268
  export type { SmsOtpConfig, SmsOtpResult, SmsOtpError } from '../types/ekycSmsOtpType';
265
269
  export type { UserEsignModel, ESignInitResult, ESignOpenSessionResult, ESignCertificate, ESignSignRequest, ESignError, ESignAuthenticateResult } from '../types/ekycESignType';
266
270
  export type { LivenessConfig } from '../types/ekycLivenessType';
271
+ export { SDKFaceDetectStatus } from '../types/ekycLivenessType';
267
272
  export type { FaceServiceConfig } from '../types/ekycFaceType';
268
273
  export type { SDKEkycResultStringWithEvent, SDKEkycResultWithEvent } from '../types/ekycType';
269
274
  export { SDK_VERSION, SDK_NAME };
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.SDK_NAME = exports.SDK_VERSION = exports.FinosESign = exports.FinosESignModule = void 0;
26
+ exports.SDK_NAME = exports.SDK_VERSION = exports.SDKFaceDetectStatus = exports.FinosESign = exports.FinosESignModule = void 0;
27
27
  const react_native_1 = require("react-native");
28
28
  const EKYCModule_1 = __importStar(require("../../EKYCModule"));
29
29
  Object.defineProperty(exports, "SDK_VERSION", { enumerable: true, get: function () { return EKYCModule_1.SDK_VERSION; } });
@@ -116,16 +116,8 @@ class FinosESignModule {
116
116
  */
117
117
  async sendOtp(config) {
118
118
  this.validateSDKReady();
119
- try {
120
- console.log('📱 Sending SMS OTP...');
121
- const result = await this.sdk.sendOtp(config);
122
- console.log('✅ SMS OTP sent successfully');
123
- return result;
124
- }
125
- catch (error) {
126
- console.error('❌ SMS OTP send failed:', error);
127
- throw error;
128
- }
119
+ // Pass through to SDK - error handling is done in EKYCModule.ts
120
+ return await this.sdk.sendOtp(config);
129
121
  }
130
122
  /**
131
123
  * Verify SMS OTP
@@ -134,16 +126,8 @@ class FinosESignModule {
134
126
  */
135
127
  async verifyOtp(config, otpCode) {
136
128
  this.validateSDKReady();
137
- try {
138
- console.log('🔐 Verifying SMS OTP...');
139
- const result = await this.sdk.verifyOtp(config, otpCode);
140
- console.log('✅ SMS OTP verified successfully');
141
- return result;
142
- }
143
- catch (error) {
144
- console.error('❌ SMS OTP verification failed:', error);
145
- throw error;
146
- }
129
+ // Pass through to SDK - error handling is done in EKYCModule.ts
130
+ return await this.sdk.verifyOtp(config, otpCode);
147
131
  }
148
132
  /**
149
133
  * Resend SMS OTP
@@ -151,16 +135,8 @@ class FinosESignModule {
151
135
  */
152
136
  async resendOtp(config) {
153
137
  this.validateSDKReady();
154
- try {
155
- console.log('📱 Resending SMS OTP...');
156
- const result = await this.sdk.resendOtp(config);
157
- console.log('✅ SMS OTP resent successfully');
158
- return result;
159
- }
160
- catch (error) {
161
- console.error('❌ SMS OTP resend failed:', error);
162
- throw error;
163
- }
138
+ // Pass through to SDK - error handling is done in EKYCModule.ts
139
+ return await this.sdk.resendOtp(config);
164
140
  }
165
141
  // SMS OTP Event Listeners
166
142
  onSmsOtpSendSuccess(callback) {
@@ -194,19 +170,23 @@ class FinosESignModule {
194
170
  // ==================== eSign Methods ====================
195
171
  /**
196
172
  * Initialize eSign SDK
173
+ * @param finosToken Optional access token (Client Credentials)
197
174
  */
198
- async initializeESign() {
175
+ async initializeESign(finosToken) {
199
176
  this.validateSDKReady();
200
- try {
201
- console.log('🔐 Initializing eSign SDK...');
202
- const result = await this.sdk.initializeESign();
203
- console.log('✅ eSign SDK initialized successfully');
204
- return result;
205
- }
206
- catch (error) {
207
- console.error('❌ eSign initialization failed:', error);
208
- throw error;
209
- }
177
+ // Pass through to SDK - error handling is done in EKYCModule.ts
178
+ return await this.sdk.initializeESign(finosToken);
179
+ }
180
+ /**
181
+ * Get SDK Token for Session
182
+ * @param identity User Identity (CCCD/CMND)
183
+ * @param name User Name
184
+ * @param deviceId Device ID
185
+ */
186
+ async getSdkToken(identity, name, deviceId) {
187
+ this.validateSDKReady();
188
+ // Pass through to SDK - error handling is done in EKYCModule.ts
189
+ return await this.sdk.getSdkToken(identity, name, deviceId);
210
190
  }
211
191
  /**
212
192
  * Open eSign session
@@ -218,16 +198,8 @@ class FinosESignModule {
218
198
  */
219
199
  async openSessionId(accessToken, username, rememberMe, userEsignModel, privateKeyFilePath) {
220
200
  this.validateSDKReady();
221
- try {
222
- console.log('🔓 Opening eSign session...');
223
- const result = await this.sdk.openSessionId(accessToken, username, rememberMe, userEsignModel, privateKeyFilePath);
224
- console.log('✅ eSign session opened successfully');
225
- return result;
226
- }
227
- catch (error) {
228
- console.error('❌ eSign session open failed:', error);
229
- throw error;
230
- }
201
+ // Pass through to SDK - error handling is done in EKYCModule.ts
202
+ return await this.sdk.openSessionId(accessToken, username, rememberMe, userEsignModel, privateKeyFilePath);
231
203
  }
232
204
  /**
233
205
  * Register device for eSign
@@ -237,16 +209,8 @@ class FinosESignModule {
237
209
  */
238
210
  async registerDevice(recoverCode, pinCode, fcmToken) {
239
211
  this.validateSDKReady();
240
- try {
241
- console.log('📱 Registering eSign device...');
242
- const result = await this.sdk.registerDevice(recoverCode, pinCode, fcmToken);
243
- console.log('✅ eSign device registered successfully');
244
- return result;
245
- }
246
- catch (error) {
247
- console.error('❌ eSign device registration failed:', error);
248
- throw error;
249
- }
212
+ // Pass through to SDK - error handling is done in EKYCModule.ts
213
+ return await this.sdk.registerDevice(recoverCode, pinCode, fcmToken);
250
214
  }
251
215
  /**
252
216
  * List eSign certificates
@@ -255,16 +219,8 @@ class FinosESignModule {
255
219
  */
256
220
  async listCerts(pageNumber = 1, pageSize = 10) {
257
221
  this.validateSDKReady();
258
- try {
259
- console.log('📋 Listing eSign certificates...');
260
- const result = await this.sdk.listCerts(pageNumber, pageSize);
261
- console.log(`✅ Found ${result.certs.length} certificates`);
262
- return result;
263
- }
264
- catch (error) {
265
- console.error('❌ eSign list certificates failed:', error);
266
- throw error;
267
- }
222
+ // Pass through to SDK - error handling is done in EKYCModule.ts
223
+ return await this.sdk.listCerts(pageNumber, pageSize);
268
224
  }
269
225
  /**
270
226
  * Verify eSign certificate
@@ -272,16 +228,8 @@ class FinosESignModule {
272
228
  */
273
229
  async verifyCert(serial) {
274
230
  this.validateSDKReady();
275
- try {
276
- console.log('✅ Verifying eSign certificate...');
277
- const result = await this.sdk.verifyCert(serial);
278
- console.log('✅ eSign certificate verified successfully');
279
- return result;
280
- }
281
- catch (error) {
282
- console.error('❌ eSign certificate verification failed:', error);
283
- throw error;
284
- }
231
+ // Pass through to SDK - error handling is done in EKYCModule.ts
232
+ return await this.sdk.verifyCert(serial);
285
233
  }
286
234
  /**
287
235
  * List eSign sign requests
@@ -290,16 +238,8 @@ class FinosESignModule {
290
238
  */
291
239
  async listSignRequest(pageNumber = 1, pageSize = 10) {
292
240
  this.validateSDKReady();
293
- try {
294
- console.log('📋 Listing eSign sign requests...');
295
- const result = await this.sdk.listSignRequest(pageNumber, pageSize);
296
- console.log(`✅ Found ${result.requests.length} sign requests`);
297
- return result;
298
- }
299
- catch (error) {
300
- console.error('❌ eSign list sign requests failed:', error);
301
- throw error;
302
- }
241
+ // Pass through to SDK - error handling is done in EKYCModule.ts
242
+ return await this.sdk.listSignRequest(pageNumber, pageSize);
303
243
  }
304
244
  /**
305
245
  * Confirm eSign signature
@@ -311,88 +251,35 @@ class FinosESignModule {
311
251
  */
312
252
  async confirmSign(signRequestId, pinCode, authId, authData, confirm = true) {
313
253
  this.validateSDKReady();
314
- try {
315
- console.log('✍️ Confirming eSign signature...');
316
- const result = await this.sdk.confirmSign(signRequestId, pinCode, authId, authData, confirm);
317
- console.log('✅ eSign signature confirmed successfully');
318
- return result;
319
- }
320
- catch (error) {
321
- console.error('❌ eSign signature confirmation failed:', error);
322
- throw error;
323
- }
324
- }
325
- /**
326
- * Authenticate with eSign
327
- * @param username eSign username
328
- * @param password eSign password
329
- */
330
- async authenticate(username, password) {
331
- this.validateSDKReady();
332
- try {
333
- console.log('🔐 Authenticating with eSign...');
334
- const result = await this.sdk.authenticate(username, password);
335
- console.log('✅ eSign authentication successful');
336
- return result;
337
- }
338
- catch (error) {
339
- console.error('❌ eSign authentication failed:', error);
340
- throw error;
341
- }
254
+ // Pass through to SDK - error handling is done in EKYCModule.ts
255
+ return await this.sdk.confirmSign(signRequestId, pinCode, authId, authData, confirm);
342
256
  }
343
257
  /**
344
258
  * Register remote signing certificate
345
- * @param accessToken JWT access token
346
259
  * @param requestJson JSON request body
347
260
  */
348
- async registerRemoteSigning(accessToken, requestJson) {
261
+ async registerRemoteSigning(requestJson) {
349
262
  this.validateSDKReady();
350
- try {
351
- console.log('📝 Registering remote signing certificate...');
352
- const result = await this.sdk.registerRemoteSigning(accessToken, requestJson);
353
- console.log('✅ Remote signing certificate registered successfully');
354
- return result;
355
- }
356
- catch (error) {
357
- console.error('❌ Remote signing certificate registration failed:', error);
358
- throw error;
359
- }
263
+ // Pass through to SDK - error handling is done in EKYCModule.ts
264
+ return await this.sdk.registerRemoteSigning(requestJson);
360
265
  }
361
266
  /**
362
267
  * Sign PDF document
363
- * @param accessToken JWT access token
364
268
  * @param requestJson JSON request body
365
269
  */
366
- async signPdf(accessToken, requestJson) {
270
+ async signPdf(requestJson) {
367
271
  this.validateSDKReady();
368
- try {
369
- console.log('📄 Signing PDF document...');
370
- const result = await this.sdk.signPdf(accessToken, requestJson);
371
- console.log('✅ PDF document signed successfully');
372
- return result;
373
- }
374
- catch (error) {
375
- console.error('❌ PDF document signing failed:', error);
376
- throw error;
377
- }
272
+ // Pass through to SDK - error handling is done in EKYCModule.ts
273
+ return await this.sdk.signPdf(requestJson);
378
274
  }
379
275
  /**
380
276
  * Send confirmation document
381
- * @param accessToken JWT access token
382
277
  * @param requestJson JSON string containing request data
383
278
  */
384
- async sendConfirmationDocument(accessToken, requestJson) {
279
+ async sendConfirmationDocument(requestJson) {
385
280
  this.validateSDKReady();
386
- try {
387
- console.log('📧 Sending confirmation document...');
388
- const result = await this.sdk.sendConfirmationDocument(accessToken, requestJson);
389
- console.log('✅ Confirmation document sent successfully');
390
- return result;
391
- }
392
- catch (error) {
393
- console.error('❌ Confirmation document sending failed:', error);
394
- throw error;
395
- }
281
+ // Pass through to SDK - error handling is done in EKYCModule.ts
282
+ return await this.sdk.sendConfirmationDocument(requestJson);
396
283
  }
397
284
  /**
398
285
  * Remove all event listeners
@@ -451,13 +338,6 @@ class FinosESignModule {
451
338
  }
452
339
  return listener;
453
340
  }
454
- onESignAuthenticateSuccess(callback) {
455
- const listener = this.sdk.onESignAuthenticateSuccess(callback);
456
- if (!listener) {
457
- console.warn('⚠️ onESignAuthenticateSuccess: Event emitter not ready.');
458
- }
459
- return listener;
460
- }
461
341
  onESignRegisterRemoteSigningSuccess(callback) {
462
342
  const listener = this.sdk.onESignRegisterRemoteSigningSuccess(callback);
463
343
  if (!listener) {
@@ -489,23 +369,18 @@ class FinosESignModule {
489
369
  // ==================== Liveness Methods ====================
490
370
  /**
491
371
  * Start liveness detection
492
- * @param config Liveness configuration (includes switchFrontCamera for camera control)
372
+ * @param config Liveness configuration
373
+ * @param config.isActiveLiveness - Enable active liveness detection (default: false)
374
+ * @param config.autoCapture - Enable auto capture (default: true)
375
+ * @param config.isShowCameraFont - Show camera font (default: true)
376
+ * @param config.customActions - Custom actions array (LEFT, RIGHT, STRAIGHT). If provided, uses these actions instead of random
377
+ * @param config.activeActionCount - Number of random actions (1-10), only used when customActions is null (default: 2)
378
+ * @param config.switchFrontCamera - Use front camera (default: false)
493
379
  */
494
380
  async startLiveness(config) {
495
381
  this.validateSDKReady();
496
- try {
497
- console.log('👁️ Starting liveness detection...');
498
- if (config.switchFrontCamera !== undefined) {
499
- console.log('📷 Front camera setting:', config.switchFrontCamera ? 'ON' : 'OFF');
500
- }
501
- const result = await this.sdk.startLiveness(config);
502
- console.log('✅ Liveness detection completed:', result.event);
503
- return result;
504
- }
505
- catch (error) {
506
- console.error('❌ Liveness detection failed:', error);
507
- throw error;
508
- }
382
+ // Pass through to SDK - error handling is done in EKYCModule.ts
383
+ return await this.sdk.startLiveness(config);
509
384
  }
510
385
  // Liveness Event Listeners
511
386
  onLivenessSuccess(callback) {
@@ -521,16 +396,8 @@ class FinosESignModule {
521
396
  */
522
397
  async startFaceCompare(config) {
523
398
  this.validateSDKReady();
524
- try {
525
- console.log('👤 Starting face comparison...');
526
- const result = await this.sdk.startFaceCompare(config);
527
- console.log('✅ Face comparison completed:', result.event);
528
- return result;
529
- }
530
- catch (error) {
531
- console.error('❌ Face comparison failed:', error);
532
- throw error;
533
- }
399
+ // Pass through to SDK - error handling is done in EKYCModule.ts
400
+ return await this.sdk.startFaceCompare(config);
534
401
  }
535
402
  // Face Compare Event Listeners
536
403
  onFaceCompareSuccess(callback) {
@@ -562,31 +429,17 @@ class FinosESignModule {
562
429
  if (flowSDK.length === 0) {
563
430
  throw new Error('flowSDK must contain at least one SDK type (LIVENESS or FACE)');
564
431
  }
565
- try {
566
- console.log('🚀 Starting eKYC UI with flow:', flowSDK);
567
- console.log('🔧 OptionConfig:', optionConfig);
568
- if ((optionConfig === null || optionConfig === void 0 ? void 0 : optionConfig.switchFrontCamera) !== undefined) {
569
- console.log('📷 Front camera setting:', optionConfig.switchFrontCamera ? 'ON' : 'OFF');
570
- }
571
- console.log('🔑 AppKeyConfig:', appKeyConfig);
572
- console.log('🎨 StyleConfig:', styleConfig);
573
- // Create full appKeyConfig with empty values for excluded modules
574
- const fullAppKeyConfig = {
575
- appKey: appKeyConfig.appKey,
576
- appKeyNfc: '',
577
- appKeyOcr: '',
578
- appKeyLiveness: appKeyConfig.appKeyLiveness,
579
- appKeyC06: '',
580
- appKeyFaceService: appKeyConfig.appKeyFaceService,
581
- };
582
- const result = await this.sdk.startEkycUI(appKey, flowSDK, language, transactionId, fullAppKeyConfig, optionConfig, styleConfig);
583
- console.log('✅ eKYC UI started successfully');
584
- return result;
585
- }
586
- catch (error) {
587
- console.error('❌ eKYC UI failed:', error);
588
- throw error;
589
- }
432
+ // Create full appKeyConfig with empty values for excluded modules
433
+ const fullAppKeyConfig = {
434
+ appKey: appKeyConfig.appKey,
435
+ appKeyNfc: '',
436
+ appKeyOcr: '',
437
+ appKeyLiveness: appKeyConfig.appKeyLiveness,
438
+ appKeyC06: '',
439
+ appKeyFaceService: appKeyConfig.appKeyFaceService,
440
+ };
441
+ // Pass through to SDK - error handling is done in EKYCModule.ts
442
+ return await this.sdk.startEkycUI(appKey, flowSDK, language, transactionId, fullAppKeyConfig, optionConfig, styleConfig);
590
443
  }
591
444
  // Private validation methods
592
445
  validateSDKReady() {
@@ -636,7 +489,6 @@ const isMethod = (prop) => {
636
489
  prop === 'verifyCert' ||
637
490
  prop === 'listSignRequest' ||
638
491
  prop === 'confirmSign' ||
639
- prop === 'authenticate' ||
640
492
  prop === 'registerRemoteSigning' ||
641
493
  prop === 'signPdf' ||
642
494
  prop === 'sendConfirmationDocument' ||
@@ -693,7 +545,7 @@ const createFinosESignStub = () => {
693
545
  'onSmsOtpSendSuccess', 'onSmsOtpVerifySuccess', 'onSmsOtpResendSuccess', 'onSmsOtpError',
694
546
  'onESignInitSuccess', 'onESignOpenSessionSuccess', 'onESignRegisterDeviceSuccess',
695
547
  'onESignListCertsSuccess', 'onESignVerifyCertSuccess', 'onESignListSignRequestSuccess',
696
- 'onESignConfirmSignSuccess', 'onESignAuthenticateSuccess', 'onESignRegisterRemoteSigningSuccess',
548
+ 'onESignConfirmSignSuccess', 'onESignRegisterRemoteSigningSuccess',
697
549
  'onESignSignPdfSuccess', 'onESignSendConfirmationDocumentSuccess', 'onESignError',
698
550
  'onLivenessSuccess', 'onLivenessError', 'onFaceCompareSuccess', 'onFaceCompareError'
699
551
  ];
@@ -705,10 +557,11 @@ const createFinosESignStub = () => {
705
557
  });
706
558
  // Add all other methods
707
559
  const otherMethods = [
708
- 'initialize', 'initializeESign', 'sendOtp', 'verifyOtp', 'resendOtp',
709
- 'openSessionId', 'registerDevice', 'listCerts', 'verifyCert', 'listSignRequest',
710
- 'confirmSign', 'authenticate', 'registerRemoteSigning', 'signPdf', 'sendConfirmationDocument',
711
- 'startLiveness', 'startFaceCompare', 'startEkycUI', 'isSDKReady', 'getSDKInfo'
560
+ 'initialize', 'startNfcScan', 'checkC06', 'startOcr', 'startLiveness', 'startFaceCompare',
561
+ 'startEkycUI', 'sendOtp', 'verifyOtp', 'resendOtp', 'initializeESign', 'openSessionId',
562
+ 'registerDevice', 'listCerts', 'verifyCert', 'listSignRequest', 'confirmSign',
563
+ 'registerRemoteSigning', 'signPdf', 'sendConfirmationDocument',
564
+ 'onResume', 'onPause', 'isSDKReady', 'getSDKInfo'
712
565
  ];
713
566
  otherMethods.forEach(method => {
714
567
  stub[method] = async (...args) => {
@@ -748,5 +601,7 @@ const createFinosESignWrapper = () => {
748
601
  };
749
602
  // Export - this ensures FinosESign is never undefined
750
603
  exports.FinosESign = createFinosESignWrapper();
604
+ var ekycLivenessType_1 = require("../types/ekycLivenessType");
605
+ Object.defineProperty(exports, "SDKFaceDetectStatus", { enumerable: true, get: function () { return ekycLivenessType_1.SDKFaceDetectStatus; } });
751
606
  // Default export
752
607
  exports.default = exports.FinosESign;
@@ -1,11 +1,20 @@
1
1
  import { CheckSummaryResponse } from "./ekycOCRType";
2
+ export declare enum SDKFaceDetectStatus {
3
+ LEFT = "LEFT",
4
+ RIGHT = "RIGHT",
5
+ STRAIGHT = "STRAIGHT"
6
+ }
2
7
  export interface LivenessConfig {
3
8
  appKey: string;
4
9
  transactionId?: string;
5
- usingRandomAction: boolean;
6
- isStraight: boolean;
7
10
  selfieImage: string;
8
11
  switchFrontCamera?: boolean;
12
+ isActiveLiveness?: boolean;
13
+ autoCapture?: boolean;
14
+ isShowCameraFont?: boolean;
15
+ customActions?: SDKFaceDetectStatus[];
16
+ activeActionCount?: number;
17
+ forceCaptureTimeout?: number;
9
18
  }
10
19
  export interface CheckLivenessResponse {
11
20
  metadata?: Metadata;
@@ -1,2 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SDKFaceDetectStatus = void 0;
4
+ var SDKFaceDetectStatus;
5
+ (function (SDKFaceDetectStatus) {
6
+ SDKFaceDetectStatus["LEFT"] = "LEFT";
7
+ SDKFaceDetectStatus["RIGHT"] = "RIGHT";
8
+ SDKFaceDetectStatus["STRAIGHT"] = "STRAIGHT";
9
+ })(SDKFaceDetectStatus = exports.SDKFaceDetectStatus || (exports.SDKFaceDetectStatus = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finos_sdk/sdk-ekyc",
3
- "version": "1.2.8",
3
+ "version": "1.3.1",
4
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",
@@ -94,4 +94,4 @@
94
94
  "engines": {
95
95
  "node": ">=18"
96
96
  }
97
- }
97
+ }