@finos_sdk/sdk-ekyc 1.4.2 → 1.4.5
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/README.md +26 -9
- package/android/build.gradle +1 -1
- package/android/src/main/java/finos/sdk/ekyc/EKYCModule.kt +107 -71
- package/dist/EKYCModule.d.ts +2 -0
- package/dist/EKYCModule.js +33 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +24 -10
- package/dist/package.json +2 -2
- package/dist/src/modules/FinosEKYCModule.d.ts +8 -0
- package/dist/src/modules/FinosEKYCModule.js +29 -10
- package/dist/src/modules/FinosESignModule.js +17 -7
- package/dist/src/services/sharingService.js +2 -2
- package/dist/src/types/EKYCErrorResult.d.ts +34 -0
- package/dist/src/types/EKYCErrorResult.js +57 -7
- package/dist/src/types/EKYCEvent.d.ts +60 -0
- package/dist/src/types/EKYCEvent.js +65 -0
- package/dist/src/types/ekycESignType.d.ts +2 -0
- package/dist/src/types/ekycESignType.js +1 -1
- package/dist/src/types/ekycFlowType.js +3 -3
- package/dist/src/types/ekycLivenessType.d.ts +1 -2
- package/dist/src/types/ekycLivenessType.js +3 -3
- package/dist/src/types/ekycType.js +3 -3
- package/dist/src/utils/utils.js +1 -2
- package/ios/EKYCModule.swift +5 -4
- package/ios/EKYCModuleBridge.m +8 -8
- package/package.json +2 -2
- package/src/modules/FinosEKYCModule.ts +14 -5
- package/src/types/EKYCErrorResult.ts +51 -0
- package/src/types/EKYCEvent.ts +76 -0
- package/src/types/ekycESignType.ts +2 -0
- package/src/types/ekycLivenessType.ts +1 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.AppIDType = void 0;
|
|
4
|
+
exports.getEkycError = getEkycError;
|
|
4
5
|
/**
|
|
5
6
|
* AppIDType – loại app ID truyền vào SDK.
|
|
6
7
|
* Map native: Android AppIDType.NONE / AppIDType.HD_BANK / AppIDType.VIKKI,
|
|
@@ -11,7 +12,7 @@ var AppIDType;
|
|
|
11
12
|
AppIDType["NONE"] = "NONE";
|
|
12
13
|
AppIDType["HD_BANK"] = "HD_BANK";
|
|
13
14
|
AppIDType["VIKKI"] = "VIKKI";
|
|
14
|
-
})(AppIDType
|
|
15
|
+
})(AppIDType || (exports.AppIDType = AppIDType = {}));
|
|
15
16
|
/**
|
|
16
17
|
* Parse chuỗi lỗi cũ từ native (trước khi gửi object): "CustomError(customCode=109, customMessage=Lỗi Face compare...)"
|
|
17
18
|
* Giúp app vẫn lấy được customCode/customMessage khi dùng bản native chưa có userInfo.
|
|
@@ -55,4 +56,3 @@ function getEkycError(error) {
|
|
|
55
56
|
message,
|
|
56
57
|
};
|
|
57
58
|
}
|
|
58
|
-
exports.getEkycError = getEkycError;
|
package/dist/src/utils/utils.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.parseNfcResponse =
|
|
3
|
+
exports.parseNfcResponse = parseNfcResponse;
|
|
4
4
|
// Utility function to parse NFC response string to NFCData
|
|
5
5
|
function parseNfcResponse(nfcResponseStr) {
|
|
6
6
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -41,5 +41,4 @@ function parseNfcResponse(nfcResponseStr) {
|
|
|
41
41
|
return null;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
exports.parseNfcResponse = parseNfcResponse;
|
|
45
44
|
;
|
package/ios/EKYCModule.swift
CHANGED
|
@@ -161,8 +161,8 @@ class EKYCModule: RCTEventEmitter {
|
|
|
161
161
|
|
|
162
162
|
// MARK: - Liveness
|
|
163
163
|
|
|
164
|
-
@objc(startLiveness:selfieImage:transactionId:
|
|
165
|
-
func startLiveness(_ appKey: String, selfieImage: String, transactionId: String,
|
|
164
|
+
@objc(startLiveness:selfieImage:transactionId:isActiveLiveness:isShowCameraFont:customActionsArray:activeActionCount:forceCaptureTimeout:isActiveLivenessColor:resolver:rejecter:)
|
|
165
|
+
func startLiveness(_ appKey: String, selfieImage: String, transactionId: String, isActiveLiveness: Bool, isShowCameraFont: Bool, customActionsArray: [String]?, activeActionCount: Int, forceCaptureTimeout: Double, isActiveLivenessColor: Bool, resolver resolve: @escaping RCTPromiseResolveBlock, rejecter reject: @escaping RCTPromiseRejectBlock) {
|
|
166
166
|
DispatchQueue.main.async { [weak self] in
|
|
167
167
|
guard let vc = self?.rootVC else { reject("NO_VC", "No root view controller", nil); return }
|
|
168
168
|
guard let selfieUIImage = self?.resolveImageInput(selfieImage) else {
|
|
@@ -172,8 +172,9 @@ class EKYCModule: RCTEventEmitter {
|
|
|
172
172
|
switch $0 { case "LEFT": return .left; case "RIGHT": return .right; case "STRAIGHT": return .straight; default: return nil }
|
|
173
173
|
}
|
|
174
174
|
let livenessConfig = LivenessConfig(
|
|
175
|
-
isActiveLiveness:
|
|
176
|
-
|
|
175
|
+
isActiveLiveness: isActiveLiveness,
|
|
176
|
+
isActiveLivenessColor: isActiveLivenessColor,
|
|
177
|
+
isShowCameraFont: isShowCameraFont,
|
|
177
178
|
customActions: customActions?.isEmpty == false ? customActions : nil,
|
|
178
179
|
activeActionCount: activeActionCount > 0 ? activeActionCount : 2,
|
|
179
180
|
forceCaptureTimeout: Int64(forceCaptureTimeout * 1000),
|
package/ios/EKYCModuleBridge.m
CHANGED
|
@@ -47,14 +47,14 @@ RCT_EXTERN_METHOD(startOcr : (NSString *)appKey idImage : (
|
|
|
47
47
|
// MARK: - Liveness
|
|
48
48
|
RCT_EXTERN_METHOD(
|
|
49
49
|
startLiveness : (NSString *)appKey selfieImage : (NSString *)selfieImage
|
|
50
|
-
transactionId : (NSString *)transactionId
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
50
|
+
transactionId : (NSString *)transactionId isActiveLiveness : (BOOL)
|
|
51
|
+
isActiveLiveness isShowCameraFont : (BOOL)isShowCameraFont
|
|
52
|
+
customActionsArray : (NSArray *)customActionsArray
|
|
53
|
+
activeActionCount : (NSInteger)activeActionCount
|
|
54
|
+
forceCaptureTimeout : (double)forceCaptureTimeout
|
|
55
|
+
isActiveLivenessColor : (BOOL)isActiveLivenessColor
|
|
56
|
+
resolver : (RCTPromiseResolveBlock)resolve
|
|
57
|
+
rejecter : (RCTPromiseRejectBlock)reject)
|
|
58
58
|
|
|
59
59
|
// MARK: - FaceCompare
|
|
60
60
|
RCT_EXTERN_METHOD(startFaceCompare : (NSString *)appKey transactionId : (
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finos_sdk/sdk-ekyc",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.5",
|
|
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",
|
|
@@ -83,4 +83,4 @@
|
|
|
83
83
|
"engines": {
|
|
84
84
|
"node": ">=18"
|
|
85
85
|
}
|
|
86
|
-
}
|
|
86
|
+
}
|
|
@@ -207,11 +207,6 @@ export class FinosEKYCModule {
|
|
|
207
207
|
} else if (config.activeActionCount !== undefined) {
|
|
208
208
|
console.log('🎲 Random actions count:', config.activeActionCount);
|
|
209
209
|
}
|
|
210
|
-
if (config.switchFrontCamera !== undefined) {
|
|
211
|
-
console.log('📷 Front camera setting:', config.switchFrontCamera ? 'ON' : 'OFF');
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
|
|
215
210
|
|
|
216
211
|
const result = await this.sdk.startLiveness(config);
|
|
217
212
|
console.log('✅ Liveness detection completed:', result.event);
|
|
@@ -366,6 +361,20 @@ export class FinosEKYCModule {
|
|
|
366
361
|
return this.sdk.onFaceCompareError(callback);
|
|
367
362
|
}
|
|
368
363
|
|
|
364
|
+
/**
|
|
365
|
+
* Listen for eKYC UI success events (including LOG_SUCCESS from Liveness/FaceService submit)
|
|
366
|
+
*/
|
|
367
|
+
public onEkycUISuccess(callback: (data: any) => void) {
|
|
368
|
+
return this.sdk.onEkycUISuccess(callback);
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* Listen for eKYC UI error events
|
|
373
|
+
*/
|
|
374
|
+
public onEkycUIError(callback: (error: any) => void) {
|
|
375
|
+
return this.sdk.onEkycUIError(callback);
|
|
376
|
+
}
|
|
377
|
+
|
|
369
378
|
/**
|
|
370
379
|
* Remove all event listeners
|
|
371
380
|
*/
|
|
@@ -150,6 +150,44 @@ export const ESIGN_INVALID_LICENSE_CODE = def('611', 'Mã license không đượ
|
|
|
150
150
|
export const ESIGN_INVALID_RECOVERY_CODE = def('612', 'Mã recovery không được để trống (8 chữ số)', 'Recovery code cannot be empty (8 digits required)');
|
|
151
151
|
export const ESIGN_INVALID_PIN_CODE = def('613', 'Mã PIN không được để trống (6 chữ số)', 'PIN code cannot be empty (6 digits required)');
|
|
152
152
|
|
|
153
|
+
// ========================================
|
|
154
|
+
// ESIGN VALIDATION ERRORS (614 -> 649)
|
|
155
|
+
// ========================================
|
|
156
|
+
export const ESIGN_MISSING_NAME = def('614', 'Thiếu tên người dùng', 'User name is required');
|
|
157
|
+
export const ESIGN_MISSING_DEVICE_ID = def('615', 'Thiếu Device ID', 'Device ID is required');
|
|
158
|
+
export const ESIGN_INVALID_REQUEST_JSON = def('616', 'Request JSON không hợp lệ (không parse được)', 'Request JSON is invalid (cannot parse)');
|
|
159
|
+
export const ESIGN_MISSING_PIN_CODE = def('617', 'Thiếu mã PIN', 'PIN code is required');
|
|
160
|
+
export const ESIGN_MISSING_USER_PIN = def('618', 'Thiếu mã PIN người dùng', 'User PIN is required');
|
|
161
|
+
export const ESIGN_INVALID_PAGE_PARAMS = def('619', 'pageNumber và pageSize phải lớn hơn 0', 'pageNumber and pageSize must be greater than 0');
|
|
162
|
+
export const ESIGN_INVALID_QUANTITY = def('620', 'Số lượng (quantity) phải lớn hơn 0', 'Quantity must be greater than 0');
|
|
163
|
+
export const ESIGN_INVALID_TIME = def('621', 'Thời gian (time) phải lớn hơn 0', 'Time must be greater than 0');
|
|
164
|
+
export const ESIGN_INVALID_PIN_FORMAT = def('622', 'Mã PIN phải đúng 6 chữ số', 'PIN code must be exactly 6 digits');
|
|
165
|
+
export const ESIGN_INVALID_RECOVERY_FORMAT = def('623', 'Mã recovery phải đúng 8 chữ số', 'Recovery code must be exactly 8 digits');
|
|
166
|
+
export const ESIGN_MISSING_USER_INFO = def('624', 'Thiếu object userInfo trong request JSON', 'userInfo object is required in request JSON');
|
|
167
|
+
export const ESIGN_MISSING_FIELD_IDENTITY = def('625', 'Thiếu userInfo.identity trong request JSON', 'userInfo.identity is required in request JSON');
|
|
168
|
+
export const ESIGN_MISSING_FIELD_SOD = def('626', 'Thiếu userInfo.sod trong request JSON', 'userInfo.sod is required in request JSON');
|
|
169
|
+
export const ESIGN_MISSING_FIELD_REGISTER_DATE = def('627', 'Thiếu userInfo.registerDate trong request JSON', 'userInfo.registerDate is required in request JSON');
|
|
170
|
+
export const ESIGN_MISSING_FIELD_EXPIRED_DATE = def('628', 'Thiếu userInfo.expiredDate trong request JSON', 'userInfo.expiredDate is required in request JSON');
|
|
171
|
+
export const ESIGN_MISSING_SIGNING_CONTENTS = def('629', 'Thiếu signingRequestContents trong request JSON', 'signingRequestContents is required in request JSON');
|
|
172
|
+
export const ESIGN_MISSING_FIELD_DATA = def('630', 'Thiếu data (PDF base64) trong signingRequestContents', 'data (PDF base64) is required in signingRequestContents');
|
|
173
|
+
export const ESIGN_MISSING_TOKEN_INFO = def('631', 'Thiếu tokenInfo trong request JSON', 'tokenInfo object is required in request JSON');
|
|
174
|
+
export const ESIGN_MISSING_FIELD_USERNAME = def('632', 'Thiếu tokenInfo.username trong request JSON', 'tokenInfo.username is required in request JSON');
|
|
175
|
+
export const ESIGN_MISSING_FIELD_SERIAL_TOKEN = def('633', 'Thiếu tokenInfo.serial trong request JSON', 'tokenInfo.serial is required in request JSON');
|
|
176
|
+
export const ESIGN_MISSING_FIELD_SESSION_ID = def('634', 'Thiếu sessionId trong request JSON', 'sessionId is required in request JSON');
|
|
177
|
+
export const ESIGN_MISSING_FIELD_NAME = def('635', 'Thiếu userInfo.name trong request JSON', 'userInfo.name is required in request JSON');
|
|
178
|
+
export const ESIGN_MISSING_FIELD_ADDRESS = def('636', 'Thiếu userInfo.address trong request JSON', 'userInfo.address is required in request JSON');
|
|
179
|
+
export const ESIGN_MISSING_FIELD_SIGNATURE = def('637', 'Thiếu userInfo.signature trong request JSON', 'userInfo.signature is required in request JSON');
|
|
180
|
+
export const ESIGN_MISSING_EMAIL_OR_PHONE = def('638', 'Phải có ít nhất email hoặc phone trong request JSON', 'At least email or phone is required in request JSON');
|
|
181
|
+
export const ESIGN_MISSING_POLICY_AGREEMENT = def('639', 'Thiếu policyAgreement trong request JSON', 'policyAgreement object is required in request JSON');
|
|
182
|
+
export const ESIGN_MISSING_FIELD_POLICY_STATUS = def('640', 'Thiếu policyAgreement.policyStatus trong request JSON', 'policyAgreement.policyStatus is required in request JSON');
|
|
183
|
+
export const ESIGN_MISSING_FIELD_ACCEPT_TIME = def('641', 'Thiếu policyAgreement.acceptTime trong request JSON', 'policyAgreement.acceptTime is required in request JSON');
|
|
184
|
+
export const ESIGN_MISSING_FIELD_DEVICE = def('642', 'Thiếu policyAgreement.device trong request JSON', 'policyAgreement.device is required in request JSON');
|
|
185
|
+
export const ESIGN_MISSING_SIGN_POSITIONS = def('645', 'Thiếu signPositions trong signingRequestContents (API multiple positions)', 'signPositions array is required in signingRequestContents');
|
|
186
|
+
export const ESIGN_MISSING_SIGN_POSITION_LOCATION = def('646', 'Thiếu location trong signPositions', 'location object is required in each signPosition');
|
|
187
|
+
export const ESIGN_MISSING_FIELD_DOCUMENT_NAME = def('647', 'Thiếu documentName trong signingRequestContents', 'documentName is required in signingRequestContents');
|
|
188
|
+
export const ESIGN_INVALID_REGISTER_DATE_FORMAT = def('648', 'userInfo.registerDate phải đúng định dạng dd/MM/yyyy', 'userInfo.registerDate must be in dd/MM/yyyy format');
|
|
189
|
+
export const ESIGN_INVALID_EXPIRED_DATE_FORMAT = def('649', 'userInfo.expiredDate phải đúng định dạng dd/MM/yyyy', 'userInfo.expiredDate must be in dd/MM/yyyy format');
|
|
190
|
+
|
|
153
191
|
// ========================================
|
|
154
192
|
// Predefined list & code map (companion object)
|
|
155
193
|
// ========================================
|
|
@@ -179,6 +217,19 @@ const PREDEFINED_ERRORS: EKYCErrorResultLike[] = [
|
|
|
179
217
|
ESIGN_INVALID_USER_ACCOUNT, ESIGN_SESSION_INVALID_REGISTER, ESIGN_INVALID_RECOVERY_OR_PIN,
|
|
180
218
|
ESIGN_SESSION_INVALID_LIST_CERT, ESIGN_AUTH_EXISTS, ESIGN_INVALID_SIGN_COUNT_OR_TIME,
|
|
181
219
|
ESIGN_INVALID_CERT_FOR_AUTH, ESIGN_AUTH_REQUEST_EXISTS,
|
|
220
|
+
ESIGN_MISSING_NAME, ESIGN_MISSING_DEVICE_ID, ESIGN_INVALID_REQUEST_JSON,
|
|
221
|
+
ESIGN_MISSING_PIN_CODE, ESIGN_MISSING_USER_PIN, ESIGN_INVALID_PAGE_PARAMS,
|
|
222
|
+
ESIGN_INVALID_QUANTITY, ESIGN_INVALID_TIME, ESIGN_INVALID_PIN_FORMAT, ESIGN_INVALID_RECOVERY_FORMAT,
|
|
223
|
+
ESIGN_MISSING_USER_INFO, ESIGN_MISSING_FIELD_IDENTITY, ESIGN_MISSING_FIELD_SOD,
|
|
224
|
+
ESIGN_MISSING_FIELD_REGISTER_DATE, ESIGN_MISSING_FIELD_EXPIRED_DATE,
|
|
225
|
+
ESIGN_MISSING_SIGNING_CONTENTS, ESIGN_MISSING_FIELD_DATA, ESIGN_MISSING_TOKEN_INFO,
|
|
226
|
+
ESIGN_MISSING_FIELD_USERNAME, ESIGN_MISSING_FIELD_SERIAL_TOKEN, ESIGN_MISSING_FIELD_SESSION_ID,
|
|
227
|
+
ESIGN_MISSING_FIELD_NAME, ESIGN_MISSING_FIELD_ADDRESS, ESIGN_MISSING_FIELD_SIGNATURE,
|
|
228
|
+
ESIGN_MISSING_EMAIL_OR_PHONE, ESIGN_MISSING_POLICY_AGREEMENT,
|
|
229
|
+
ESIGN_MISSING_FIELD_POLICY_STATUS, ESIGN_MISSING_FIELD_ACCEPT_TIME, ESIGN_MISSING_FIELD_DEVICE,
|
|
230
|
+
ESIGN_MISSING_SIGN_POSITIONS, ESIGN_MISSING_SIGN_POSITION_LOCATION,
|
|
231
|
+
ESIGN_MISSING_FIELD_DOCUMENT_NAME,
|
|
232
|
+
ESIGN_INVALID_REGISTER_DATE_FORMAT, ESIGN_INVALID_EXPIRED_DATE_FORMAT,
|
|
182
233
|
USER_CANCEL,
|
|
183
234
|
];
|
|
184
235
|
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React Native port of EkycNativeAndroid EKYCEvent.kt
|
|
3
|
+
* Enum các sự kiện SDK trả về qua callback, đồng bộ 1:1 với Android enum.
|
|
4
|
+
*
|
|
5
|
+
* @see EkycNativeAndroid/Module/SDKCore/src/main/java/finos/sdk/core/define/EKYCEvent.kt
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* EKYCEvent – tên event trả về từ native callback success.
|
|
10
|
+
* Giá trị string map chính xác với Android enum name.
|
|
11
|
+
*/
|
|
12
|
+
export enum EKYCEvent {
|
|
13
|
+
/** SDK khởi tạo thành công, activity/flow vừa mở. */
|
|
14
|
+
SDK_START_SUCCESS = 'SDK_START_SUCCESS',
|
|
15
|
+
|
|
16
|
+
/** SDK flow hoàn thành, có data kết quả. */
|
|
17
|
+
SDK_END_SUCCESS = 'SDK_END_SUCCESS',
|
|
18
|
+
|
|
19
|
+
/** Bắt đầu quét NFC (đang chờ thẻ). */
|
|
20
|
+
SCAN_NFC_START = 'SCAN_NFC_START',
|
|
21
|
+
|
|
22
|
+
/** Quét NFC thành công, có dữ liệu thẻ. */
|
|
23
|
+
SCAN_NFC_SUCCESS = 'SCAN_NFC_SUCCESS',
|
|
24
|
+
|
|
25
|
+
/** Xác minh C06 thành công. */
|
|
26
|
+
C06_SUCCESS = 'C06_SUCCESS',
|
|
27
|
+
|
|
28
|
+
/** Liveness detection thành công. */
|
|
29
|
+
LIVENESS_SUCCESS = 'LIVENESS_SUCCESS',
|
|
30
|
+
|
|
31
|
+
/** Face detection đang xử lý (progress). */
|
|
32
|
+
FACE_PROGRESS = 'FACE_PROGRESS',
|
|
33
|
+
|
|
34
|
+
/** Face compare thành công. */
|
|
35
|
+
FACE_SUCCESS = 'FACE_SUCCESS',
|
|
36
|
+
|
|
37
|
+
/** OCR xử lý thành công. */
|
|
38
|
+
OCR_SUCCESS = 'OCR_SUCCESS',
|
|
39
|
+
|
|
40
|
+
/** QR Code quét thành công. */
|
|
41
|
+
QRCODE_SUCCESS = 'QRCODE_SUCCESS',
|
|
42
|
+
|
|
43
|
+
/** Lấy lịch sử giao dịch thành công. */
|
|
44
|
+
FETCH_LATEST_TRANSACTION_SUCCESS = 'FETCH_LATEST_TRANSACTION_SUCCESS',
|
|
45
|
+
|
|
46
|
+
/** Gửi SMS OTP thành công. */
|
|
47
|
+
SMS_OTP_SEND_SUCCESS = 'SMS_OTP_SEND_SUCCESS',
|
|
48
|
+
|
|
49
|
+
/** Xác minh SMS OTP thành công. */
|
|
50
|
+
SMS_OTP_VERIFY_SUCCESS = 'SMS_OTP_VERIFY_SUCCESS',
|
|
51
|
+
|
|
52
|
+
/** Gửi lại SMS OTP thành công. */
|
|
53
|
+
SMS_OTP_RESEND_SUCCESS = 'SMS_OTP_RESEND_SUCCESS',
|
|
54
|
+
|
|
55
|
+
/** Kết quả NFC/Liveness/FaceService đã submit lên server thành công (v1.4.5). */
|
|
56
|
+
LOG_SUCCESS = 'LOG_SUCCESS',
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* EKYCErrorEvent – tên event trả về từ native callback error.
|
|
61
|
+
* Đồng bộ với Android enum EKYCErrorEvent.
|
|
62
|
+
*
|
|
63
|
+
* @see EkycNativeAndroid/Module/SDKCore/src/main/java/finos/sdk/core/define/EKYCErrorEvent.kt
|
|
64
|
+
*/
|
|
65
|
+
export enum EKYCErrorEvent {
|
|
66
|
+
SDK_START_ERROR = 'SDK_START_ERROR',
|
|
67
|
+
OCR_ERROR = 'OCR_ERROR',
|
|
68
|
+
LIVENESS_ERROR = 'LIVENESS_ERROR',
|
|
69
|
+
FACE_ERROR = 'FACE_ERROR',
|
|
70
|
+
NFC_ERROR = 'NFC_ERROR',
|
|
71
|
+
C06_ERROR = 'C06_ERROR',
|
|
72
|
+
SDK_DETAIL = 'SDK_DETAIL',
|
|
73
|
+
SMS_OTP_ERROR = 'SMS_OTP_ERROR',
|
|
74
|
+
ESIGN_ERROR = 'ESIGN_ERROR',
|
|
75
|
+
USER_CANCEL = 'USER_CANCEL',
|
|
76
|
+
}
|
|
@@ -64,6 +64,7 @@ export interface ESignSignRequestConfirm {
|
|
|
64
64
|
export interface ESignApiResponse {
|
|
65
65
|
status: number;
|
|
66
66
|
msg: string;
|
|
67
|
+
errorCode?: string;
|
|
67
68
|
data?: {
|
|
68
69
|
sessionId?: string;
|
|
69
70
|
[key: string]: any;
|
|
@@ -78,6 +79,7 @@ export interface ESignApiResponse {
|
|
|
78
79
|
export interface ESignPdfResult {
|
|
79
80
|
status: number;
|
|
80
81
|
msg: string;
|
|
82
|
+
errorCode?: string;
|
|
81
83
|
data?: {
|
|
82
84
|
transactionId: string;
|
|
83
85
|
[key: string]: any; // Cho phép các field động khác
|
|
@@ -45,10 +45,9 @@ export interface LivenessConfig {
|
|
|
45
45
|
// usingRandomAction: boolean;
|
|
46
46
|
// isStraight: boolean;
|
|
47
47
|
selfieImage: string;
|
|
48
|
-
switchFrontCamera?: boolean;
|
|
49
48
|
// New fields for version 1.3.0
|
|
50
49
|
isActiveLiveness?: boolean;
|
|
51
|
-
|
|
50
|
+
isActiveLivenessColor?: boolean;
|
|
52
51
|
isShowCameraFont?: boolean;
|
|
53
52
|
customActions?: SDKFaceDetectStatus[];
|
|
54
53
|
activeActionCount?: number;
|