@finos_sdk/sdk-ekyc 0.0.31 → 0.0.33
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/android/SDKeKYC/finos/sdk/ekyc/c06/maven-metadata-local.xml +1 -1
- package/android/SDKeKYC/finos/sdk/ekyc/ekyc/maven-metadata-local.xml +1 -1
- package/android/SDKeKYC/finos/sdk/ekyc/ekycui/1.2.0/ekycui-1.2.0-javadoc.jar +0 -0
- package/android/SDKeKYC/finos/sdk/ekyc/ekycui/1.2.0/ekycui-1.2.0-sources.jar +0 -0
- package/android/SDKeKYC/finos/sdk/ekyc/ekycui/1.2.0/ekycui-1.2.0.aar +0 -0
- package/android/SDKeKYC/finos/sdk/ekyc/ekycui/1.2.0/ekycui-1.2.0.module +151 -0
- package/android/SDKeKYC/finos/sdk/ekyc/ekycui/1.2.0/ekycui-1.2.0.pom +43 -0
- package/android/SDKeKYC/finos/sdk/ekyc/ekycui/maven-metadata-local.xml +13 -0
- package/android/SDKeKYC/finos/sdk/ekyc/faceservice/maven-metadata-local.xml +1 -1
- package/android/SDKeKYC/finos/sdk/ekyc/liveness/maven-metadata-local.xml +1 -1
- package/android/SDKeKYC/finos/sdk/ekyc/nfc/maven-metadata-local.xml +1 -1
- package/android/SDKeKYC/finos/sdk/ekyc/ocr/maven-metadata-local.xml +1 -1
- package/android/SDKeKYC/finos/sdk/ekyc/qrcode/maven-metadata-local.xml +1 -1
- package/android/SDKeKYC/finos/sdk/ekyc/sdkcore/maven-metadata-local.xml +1 -1
- package/android/SDKeKYC/finos/sdk/ekyc/sdkcorecamera/maven-metadata-local.xml +1 -1
- package/android/SDKeKYC/finos/sdk/ekyc/sdkui/1.2.0/sdkui-1.2.0-javadoc.jar +0 -0
- package/android/SDKeKYC/finos/sdk/ekyc/sdkui/1.2.0/sdkui-1.2.0-sources.jar +0 -0
- package/android/SDKeKYC/finos/sdk/ekyc/sdkui/1.2.0/sdkui-1.2.0.aar +0 -0
- package/android/SDKeKYC/finos/sdk/ekyc/sdkui/1.2.0/sdkui-1.2.0.module +228 -0
- package/android/SDKeKYC/finos/sdk/ekyc/sdkui/1.2.0/sdkui-1.2.0.pom +103 -0
- package/android/SDKeKYC/finos/sdk/ekyc/sdkui/maven-metadata-local.xml +13 -0
- package/android/src/main/build/generated/source/buildConfig/debug/com/sdkekycrn/BuildConfig.java +10 -0
- package/android/src/main/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +7 -0
- package/android/src/main/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +18 -0
- package/android/src/main/build/intermediates/aar_main_jar/debug/syncDebugLibJars/classes.jar +0 -0
- package/android/src/main/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +6 -0
- package/android/src/main/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +1 -0
- package/android/src/main/build/intermediates/annotations_typedef_file/debug/extractDebugAnnotations/typedefs.txt +0 -0
- package/android/src/main/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
- package/android/src/main/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +0 -0
- package/android/src/main/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +1 -0
- package/android/src/main/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
- package/android/src/main/build/intermediates/incremental/debug-mergeJavaRes/merge-state +0 -0
- package/android/src/main/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
- package/android/src/main/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
- package/android/src/main/build/intermediates/incremental/packageDebugAssets/merger.xml +2 -0
- package/android/src/main/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/sdkekycrn/BuildConfig.class +0 -0
- package/android/src/main/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +2 -0
- package/android/src/main/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +7 -0
- package/android/src/main/build/intermediates/merged_java_res/debug/mergeDebugJavaResource/feature-main.jar +0 -0
- package/android/src/main/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +7 -0
- package/android/src/main/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +1 -0
- package/android/src/main/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +1 -0
- package/android/src/main/build/outputs/aar/main-debug.aar +0 -0
- package/android/src/main/build/outputs/logs/manifest-merger-debug-report.txt +16 -0
- package/android/src/main/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/dist/App.js +481 -12
- package/dist/EKYCModule.d.ts +60 -0
- package/dist/EKYCModule.js +140 -9
- package/dist/index.d.ts +4 -1
- package/dist/index.js +7 -2
- package/dist/src/modules/FinosEKYCModule.d.ts +206 -0
- package/dist/src/modules/FinosEKYCModule.js +352 -0
- package/package.json +2 -2
- package/src/modules/FinosEKYCModule.ts +450 -0
- package/src/modules/README.md +347 -0
package/dist/EKYCModule.d.ts
CHANGED
|
@@ -5,10 +5,22 @@ import { C06Config } from './src/types/ekycC06Type';
|
|
|
5
5
|
import { OcrConfig } from './src/types/ekycOCRType';
|
|
6
6
|
import { LivenessConfig } from './src/types/ekycLivenessType';
|
|
7
7
|
import { FaceServiceConfig } from './src/types/ekycFaceType';
|
|
8
|
+
export declare const SDK_VERSION = "0.0.31";
|
|
9
|
+
export declare const SDK_NAME = "@finos_sdk/sdk-ekyc";
|
|
8
10
|
declare class SDKeKYC {
|
|
9
11
|
private eventEmitter;
|
|
10
12
|
private listeners;
|
|
13
|
+
private isInitialized;
|
|
11
14
|
constructor();
|
|
15
|
+
getVersion(): Promise<string>;
|
|
16
|
+
getSDKInfo(): Promise<{
|
|
17
|
+
name: string;
|
|
18
|
+
version: string;
|
|
19
|
+
buildNumber: string;
|
|
20
|
+
}>;
|
|
21
|
+
initSdkEkyc(): Promise<string>;
|
|
22
|
+
isSDKInitialized(): boolean;
|
|
23
|
+
private validateConfig;
|
|
12
24
|
startOcr(config: OcrConfig): Promise<SDKEkycResultStringWithEvent>;
|
|
13
25
|
startNfcScan(config: NfcConfig): Promise<SDKEkycResultStringWithEvent>;
|
|
14
26
|
checkC06(config: C06Config): Promise<SDKEkycResultStringWithEvent>;
|
|
@@ -28,6 +40,54 @@ declare class SDKeKYC {
|
|
|
28
40
|
onFaceCompareSuccess(callback: (data: SDKEkycResultWithEvent) => void): EmitterSubscription | null;
|
|
29
41
|
onFaceCompareError(callback: (error: any) => void): EmitterSubscription | null;
|
|
30
42
|
removeAllListeners(): void;
|
|
43
|
+
startEkycUI(appKey: string, flowSDK: string[], language: string, transactionId: string, appKeyConfig: {
|
|
44
|
+
appKey: string;
|
|
45
|
+
appKeyNfc: string;
|
|
46
|
+
appKeyOcr: string;
|
|
47
|
+
appKeyLiveness: string;
|
|
48
|
+
appKeyC06: string;
|
|
49
|
+
appKeyFaceService: string;
|
|
50
|
+
}, optionConfig?: {
|
|
51
|
+
baseUrl?: string;
|
|
52
|
+
countMaxRetry?: number;
|
|
53
|
+
language?: string;
|
|
54
|
+
}, styleConfig?: {
|
|
55
|
+
textSize?: number;
|
|
56
|
+
textFont?: string;
|
|
57
|
+
textColor?: number;
|
|
58
|
+
statusBarBackground?: number;
|
|
59
|
+
backIcon?: number;
|
|
60
|
+
titleStyle?: {
|
|
61
|
+
textSize?: number;
|
|
62
|
+
textFont?: string;
|
|
63
|
+
textColor?: number;
|
|
64
|
+
};
|
|
65
|
+
toolbarStyle?: {
|
|
66
|
+
textSize?: number;
|
|
67
|
+
textFont?: string;
|
|
68
|
+
textColor?: number;
|
|
69
|
+
};
|
|
70
|
+
instructionStyle?: {
|
|
71
|
+
textSize?: number;
|
|
72
|
+
textFont?: string;
|
|
73
|
+
textColor?: number;
|
|
74
|
+
};
|
|
75
|
+
errorStyle?: {
|
|
76
|
+
textSize?: number;
|
|
77
|
+
textFont?: string;
|
|
78
|
+
textColor?: number;
|
|
79
|
+
};
|
|
80
|
+
successStyle?: {
|
|
81
|
+
textSize?: number;
|
|
82
|
+
textFont?: string;
|
|
83
|
+
textColor?: number;
|
|
84
|
+
};
|
|
85
|
+
warningStyle?: {
|
|
86
|
+
textSize?: number;
|
|
87
|
+
textFont?: string;
|
|
88
|
+
textColor?: number;
|
|
89
|
+
};
|
|
90
|
+
}): Promise<any>;
|
|
31
91
|
}
|
|
32
92
|
declare const sdkEKYC: SDKeKYC;
|
|
33
93
|
export { SDKeKYC };
|
package/dist/EKYCModule.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SDKeKYC = void 0;
|
|
3
|
+
exports.SDKeKYC = exports.SDK_NAME = exports.SDK_VERSION = void 0;
|
|
4
4
|
const react_native_1 = require("react-native");
|
|
5
|
+
// Version information
|
|
6
|
+
exports.SDK_VERSION = '0.0.31';
|
|
7
|
+
exports.SDK_NAME = '@finos_sdk/sdk-ekyc';
|
|
5
8
|
const EKYCNativeModule = react_native_1.NativeModules.EKYCModule;
|
|
6
9
|
// Validate that the module is available
|
|
7
10
|
if (!EKYCNativeModule) {
|
|
@@ -13,40 +16,145 @@ if (!EKYCNativeModule) {
|
|
|
13
16
|
' - rm -rf android/app/build\n' +
|
|
14
17
|
' - cd android && ./gradlew clean');
|
|
15
18
|
}
|
|
16
|
-
// Initialize the module
|
|
19
|
+
// Initialize the module with Koin error handling
|
|
17
20
|
try {
|
|
18
21
|
EKYCNativeModule.initSdkEkyc()
|
|
19
22
|
.then(() => console.log("✅ EKYCModule.initSdkEkyc called successfully"))
|
|
20
|
-
.catch(e =>
|
|
23
|
+
.catch(e => {
|
|
24
|
+
if (e && e.toString().includes('Koin Application has already been started')) {
|
|
25
|
+
console.log("✅ SDK already initialized (Koin Application started)");
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
console.warn("❌ Failed to initialize SDK EKYC:", e);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
21
31
|
}
|
|
22
32
|
catch (e) {
|
|
23
|
-
|
|
33
|
+
if (e && e.toString().includes('Koin Application has already been started')) {
|
|
34
|
+
console.log("✅ SDK already initialized (Koin Application started)");
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
console.warn("❌ Exception when calling initSdkEkyc:", e);
|
|
38
|
+
}
|
|
24
39
|
}
|
|
25
40
|
class SDKeKYC {
|
|
26
41
|
constructor() {
|
|
27
42
|
this.listeners = [];
|
|
43
|
+
this.isInitialized = false;
|
|
28
44
|
this.eventEmitter = new react_native_1.NativeEventEmitter(EKYCNativeModule);
|
|
29
45
|
}
|
|
46
|
+
// SDK Information methods
|
|
47
|
+
async getVersion() {
|
|
48
|
+
try {
|
|
49
|
+
return await EKYCNativeModule.getVersion();
|
|
50
|
+
}
|
|
51
|
+
catch (error) {
|
|
52
|
+
console.warn('Failed to get SDK version:', error);
|
|
53
|
+
return exports.SDK_VERSION;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
async getSDKInfo() {
|
|
57
|
+
try {
|
|
58
|
+
return await EKYCNativeModule.getSDKInfo();
|
|
59
|
+
}
|
|
60
|
+
catch (error) {
|
|
61
|
+
console.warn('Failed to get SDK info:', error);
|
|
62
|
+
return {
|
|
63
|
+
name: exports.SDK_NAME,
|
|
64
|
+
version: exports.SDK_VERSION,
|
|
65
|
+
buildNumber: '1'
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
// Initialize SDK with better error handling
|
|
70
|
+
async initSdkEkyc() {
|
|
71
|
+
try {
|
|
72
|
+
const result = await EKYCNativeModule.initSdkEkyc();
|
|
73
|
+
this.isInitialized = true;
|
|
74
|
+
console.log('✅ SDK EKYC initialized successfully');
|
|
75
|
+
return result;
|
|
76
|
+
}
|
|
77
|
+
catch (error) {
|
|
78
|
+
// Handle Koin Application already started error
|
|
79
|
+
if (error && error.toString().includes('Koin Application has already been started')) {
|
|
80
|
+
console.log('✅ SDK already initialized (Koin Application started)');
|
|
81
|
+
this.isInitialized = true;
|
|
82
|
+
return 'SDK already initialized (Koin Application started)';
|
|
83
|
+
}
|
|
84
|
+
console.error('❌ Failed to initialize SDK EKYC:', error);
|
|
85
|
+
throw error;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
// Check if SDK is initialized
|
|
89
|
+
isSDKInitialized() {
|
|
90
|
+
return this.isInitialized;
|
|
91
|
+
}
|
|
92
|
+
// Validate configuration before calling native methods
|
|
93
|
+
validateConfig(config, requiredFields) {
|
|
94
|
+
if (!this.isInitialized) {
|
|
95
|
+
throw new Error('SDK is not initialized. Please call initSdkEkyc() first.');
|
|
96
|
+
}
|
|
97
|
+
for (const field of requiredFields) {
|
|
98
|
+
if (!config[field]) {
|
|
99
|
+
throw new Error(`Required field '${field}' is missing in configuration`);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
30
103
|
async startOcr(config) {
|
|
31
104
|
var _a;
|
|
32
|
-
|
|
105
|
+
this.validateConfig(config, ['appKey', 'idImagePath', 'expectedDocumentSide', 'transactionId']);
|
|
106
|
+
try {
|
|
107
|
+
return await EKYCNativeModule.startOcr(config.appKey, config.idImagePath, config.expectedDocumentSide, (_a = config.transactionId) !== null && _a !== void 0 ? _a : '');
|
|
108
|
+
}
|
|
109
|
+
catch (error) {
|
|
110
|
+
console.error('OCR Error:', error);
|
|
111
|
+
throw error;
|
|
112
|
+
}
|
|
33
113
|
}
|
|
34
114
|
// Start NFC scanning
|
|
35
115
|
async startNfcScan(config) {
|
|
36
|
-
|
|
116
|
+
this.validateConfig(config, ['appKey', 'documentNumber', 'birthDate', 'expireDate']);
|
|
117
|
+
try {
|
|
118
|
+
return await EKYCNativeModule.startNfcScan(config.appKey, config.documentNumber, config.birthDate, config.expireDate, config.transactionId, config.facePathStorage);
|
|
119
|
+
}
|
|
120
|
+
catch (error) {
|
|
121
|
+
console.error('NFC Scan Error:', error);
|
|
122
|
+
throw error;
|
|
123
|
+
}
|
|
37
124
|
}
|
|
38
125
|
// Check C06 residence verification
|
|
39
126
|
async checkC06(config) {
|
|
40
127
|
var _a, _b;
|
|
41
|
-
|
|
128
|
+
this.validateConfig(config, ['appKey', 'sod', 'idCardNumber', 'recentLocation']);
|
|
129
|
+
try {
|
|
130
|
+
return await EKYCNativeModule.checkC06(config.appKey, config.sod, config.idCardNumber, (_a = config.recentLocation) !== null && _a !== void 0 ? _a : '', (_b = config.transactionId) !== null && _b !== void 0 ? _b : '');
|
|
131
|
+
}
|
|
132
|
+
catch (error) {
|
|
133
|
+
console.error('C06 Check Error:', error);
|
|
134
|
+
throw error;
|
|
135
|
+
}
|
|
42
136
|
}
|
|
43
137
|
async startLiveness(config) {
|
|
44
138
|
var _a;
|
|
45
|
-
|
|
139
|
+
this.validateConfig(config, ['appKey', 'selfieImage', 'transactionId']);
|
|
140
|
+
try {
|
|
141
|
+
return await EKYCNativeModule.startLiveness(config.appKey, config.selfieImage, config.usingRandomAction, (_a = config.transactionId) !== null && _a !== void 0 ? _a : '', config.isStraight);
|
|
142
|
+
}
|
|
143
|
+
catch (error) {
|
|
144
|
+
console.error('Liveness Error:', error);
|
|
145
|
+
throw error;
|
|
146
|
+
}
|
|
46
147
|
}
|
|
47
148
|
async startFaceCompare(config) {
|
|
48
149
|
var _a;
|
|
49
|
-
|
|
150
|
+
this.validateConfig(config, ['appKey', 'selfieImage', 'idImage']);
|
|
151
|
+
try {
|
|
152
|
+
return await EKYCNativeModule.startFaceCompare(config.appKey, (_a = config.transactionId) !== null && _a !== void 0 ? _a : '', config.selfieImage, config.idImage);
|
|
153
|
+
}
|
|
154
|
+
catch (error) {
|
|
155
|
+
console.error('Face Compare Error:', error);
|
|
156
|
+
throw error;
|
|
157
|
+
}
|
|
50
158
|
}
|
|
51
159
|
// Lifecycle methods
|
|
52
160
|
onResume() {
|
|
@@ -138,6 +246,29 @@ class SDKeKYC {
|
|
|
138
246
|
this.listeners.forEach(listener => listener.remove());
|
|
139
247
|
this.listeners = [];
|
|
140
248
|
}
|
|
249
|
+
// SdkEkycUI method
|
|
250
|
+
async startEkycUI(appKey, flowSDK, language, transactionId, appKeyConfig, optionConfig, styleConfig) {
|
|
251
|
+
if (!this.isInitialized) {
|
|
252
|
+
throw new Error('SDK is not initialized. Please call initSdkEkyc() first.');
|
|
253
|
+
}
|
|
254
|
+
try {
|
|
255
|
+
console.log('🚀 Starting SdkEkycUI with flow:', flowSDK);
|
|
256
|
+
console.log('🔧 OptionConfig:', optionConfig);
|
|
257
|
+
console.log('🔑 AppKeyConfig:', appKeyConfig);
|
|
258
|
+
console.log('🎨 StyleConfig:', styleConfig);
|
|
259
|
+
const flowSDKJson = JSON.stringify(flowSDK);
|
|
260
|
+
const optionConfigJson = optionConfig ? JSON.stringify(optionConfig) : '{}';
|
|
261
|
+
const appKeyConfigJson = JSON.stringify(appKeyConfig);
|
|
262
|
+
const styleConfigJson = styleConfig ? JSON.stringify(styleConfig) : '{}';
|
|
263
|
+
const result = await EKYCNativeModule.startEkycUI(appKey, flowSDKJson, language, transactionId, optionConfigJson, appKeyConfigJson, styleConfigJson);
|
|
264
|
+
console.log('✅ SdkEkycUI started successfully');
|
|
265
|
+
return result;
|
|
266
|
+
}
|
|
267
|
+
catch (error) {
|
|
268
|
+
console.error('❌ SdkEkycUI failed:', error);
|
|
269
|
+
throw error;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
141
272
|
}
|
|
142
273
|
exports.SDKeKYC = SDKeKYC;
|
|
143
274
|
// Create a singleton instance
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import sdkEKYC, { SDKeKYC } from './EKYCModule';
|
|
1
|
+
import sdkEKYC, { SDKeKYC, SDK_VERSION, SDK_NAME } from './EKYCModule';
|
|
2
|
+
import finosEKYC, { FinosEKYCModule } from './src/modules/FinosEKYCModule';
|
|
2
3
|
export default sdkEKYC;
|
|
3
4
|
export { sdkEKYC, SDKeKYC };
|
|
5
|
+
export { finosEKYC, FinosEKYCModule };
|
|
4
6
|
export type { NfcConfig, NFCData } from './src/types/ekycNFCType';
|
|
5
7
|
export type { C06Config } from './src/types/ekycC06Type';
|
|
6
8
|
export type { OcrConfig } from './src/types/ekycOCRType';
|
|
@@ -9,3 +11,4 @@ export type { FaceServiceConfig } from './src/types/ekycFaceType';
|
|
|
9
11
|
export type { SDKEkycResultWithEvent, SDKEkycResultStringWithEvent } from './src/types/ekycType';
|
|
10
12
|
export type { NfcError } from './src/types/ekycNFCType';
|
|
11
13
|
export { parseNfcResponse } from './src/utils/utils';
|
|
14
|
+
export { SDK_VERSION, SDK_NAME };
|
package/dist/index.js
CHANGED
|
@@ -23,11 +23,16 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.parseNfcResponse = exports.SDKeKYC = exports.sdkEKYC = void 0;
|
|
26
|
+
exports.SDK_NAME = exports.SDK_VERSION = exports.parseNfcResponse = exports.FinosEKYCModule = exports.finosEKYC = exports.SDKeKYC = exports.sdkEKYC = void 0;
|
|
27
27
|
const EKYCModule_1 = __importStar(require("./EKYCModule"));
|
|
28
28
|
exports.sdkEKYC = EKYCModule_1.default;
|
|
29
29
|
Object.defineProperty(exports, "SDKeKYC", { enumerable: true, get: function () { return EKYCModule_1.SDKeKYC; } });
|
|
30
|
-
|
|
30
|
+
Object.defineProperty(exports, "SDK_VERSION", { enumerable: true, get: function () { return EKYCModule_1.SDK_VERSION; } });
|
|
31
|
+
Object.defineProperty(exports, "SDK_NAME", { enumerable: true, get: function () { return EKYCModule_1.SDK_NAME; } });
|
|
32
|
+
const FinosEKYCModule_1 = __importStar(require("./src/modules/FinosEKYCModule"));
|
|
33
|
+
exports.finosEKYC = FinosEKYCModule_1.default;
|
|
34
|
+
Object.defineProperty(exports, "FinosEKYCModule", { enumerable: true, get: function () { return FinosEKYCModule_1.FinosEKYCModule; } });
|
|
35
|
+
// Export main SDK instance and class (legacy)
|
|
31
36
|
exports.default = EKYCModule_1.default;
|
|
32
37
|
// Export utility functions
|
|
33
38
|
var utils_1 = require("./src/utils/utils");
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { SDK_VERSION, SDK_NAME } from '../../EKYCModule';
|
|
2
|
+
import { NfcConfig, NfcError } from '../types/ekycNFCType';
|
|
3
|
+
import { SDKEkycResultWithEvent, SDKEkycResultStringWithEvent } from '../types/ekycType';
|
|
4
|
+
import { C06Config } from '../types/ekycC06Type';
|
|
5
|
+
import { OcrConfig } from '../types/ekycOCRType';
|
|
6
|
+
import { LivenessConfig } from '../types/ekycLivenessType';
|
|
7
|
+
import { FaceServiceConfig } from '../types/ekycFaceType';
|
|
8
|
+
/**
|
|
9
|
+
* Finos eKYC SDK Module v0.0.31
|
|
10
|
+
*
|
|
11
|
+
* A comprehensive React Native module for electronic Know Your Customer (eKYC) operations
|
|
12
|
+
* including Vietnamese CCCD NFC reading, OCR, Liveness detection, Face matching, and C06 residence verification.
|
|
13
|
+
*
|
|
14
|
+
* @version 0.0.31
|
|
15
|
+
* @author FinOS
|
|
16
|
+
* @license MIT
|
|
17
|
+
*/
|
|
18
|
+
export declare class FinosEKYCModule {
|
|
19
|
+
private static instance;
|
|
20
|
+
private sdk;
|
|
21
|
+
private isInitialized;
|
|
22
|
+
private platform;
|
|
23
|
+
private constructor();
|
|
24
|
+
/**
|
|
25
|
+
* Get singleton instance of FinosEKYCModule
|
|
26
|
+
*/
|
|
27
|
+
static getInstance(): FinosEKYCModule;
|
|
28
|
+
/**
|
|
29
|
+
* Get SDK information
|
|
30
|
+
*/
|
|
31
|
+
getSDKInfo(): Promise<{
|
|
32
|
+
name: string;
|
|
33
|
+
version: string;
|
|
34
|
+
buildNumber: string;
|
|
35
|
+
platform: string;
|
|
36
|
+
isInitialized: boolean;
|
|
37
|
+
}>;
|
|
38
|
+
/**
|
|
39
|
+
* Initialize the eKYC SDK
|
|
40
|
+
* Must be called before using any other methods
|
|
41
|
+
*/
|
|
42
|
+
initialize(): Promise<string>;
|
|
43
|
+
/**
|
|
44
|
+
* Check if SDK is initialized
|
|
45
|
+
*/
|
|
46
|
+
isSDKReady(): boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Start NFC scanning for Vietnamese CCCD
|
|
49
|
+
* @param config NFC configuration
|
|
50
|
+
*/
|
|
51
|
+
startNfcScan(config: NfcConfig): Promise<SDKEkycResultStringWithEvent>;
|
|
52
|
+
/**
|
|
53
|
+
* Check C06 residence verification
|
|
54
|
+
* @param config C06 configuration
|
|
55
|
+
*/
|
|
56
|
+
checkC06(config: C06Config): Promise<SDKEkycResultStringWithEvent>;
|
|
57
|
+
/**
|
|
58
|
+
* Start OCR document scanning
|
|
59
|
+
* @param config OCR configuration
|
|
60
|
+
*/
|
|
61
|
+
startOCR(config: OcrConfig): Promise<SDKEkycResultStringWithEvent>;
|
|
62
|
+
/**
|
|
63
|
+
* Start liveness detection
|
|
64
|
+
* @param config Liveness configuration
|
|
65
|
+
*/
|
|
66
|
+
startLiveness(config: LivenessConfig): Promise<SDKEkycResultStringWithEvent>;
|
|
67
|
+
/**
|
|
68
|
+
* Start face comparison
|
|
69
|
+
* @param config Face service configuration
|
|
70
|
+
*/
|
|
71
|
+
startFaceCompare(config: FaceServiceConfig): Promise<SDKEkycResultStringWithEvent>;
|
|
72
|
+
/**
|
|
73
|
+
* Extract NFC data for C06 verification
|
|
74
|
+
* @param nfcResultJson NFC result JSON string
|
|
75
|
+
*/
|
|
76
|
+
extractNfcDataForC06(nfcResultJson: string): Promise<any>;
|
|
77
|
+
/**
|
|
78
|
+
* Handle app lifecycle - Resume
|
|
79
|
+
*/
|
|
80
|
+
onResume(): void;
|
|
81
|
+
/**
|
|
82
|
+
* Handle app lifecycle - Pause
|
|
83
|
+
*/
|
|
84
|
+
onPause(): void;
|
|
85
|
+
/**
|
|
86
|
+
* Handle new intent (Android)
|
|
87
|
+
*/
|
|
88
|
+
handleNewIntent(): void;
|
|
89
|
+
/**
|
|
90
|
+
* Listen for NFC scan start events
|
|
91
|
+
*/
|
|
92
|
+
onNfcScanStart(callback: (data: SDKEkycResultWithEvent) => void): import("react-native").EmitterSubscription | null;
|
|
93
|
+
/**
|
|
94
|
+
* Listen for NFC scan success events
|
|
95
|
+
*/
|
|
96
|
+
onNfcScanSuccess(callback: (data: SDKEkycResultStringWithEvent) => void): import("react-native").EmitterSubscription | null;
|
|
97
|
+
/**
|
|
98
|
+
* Listen for NFC error events
|
|
99
|
+
*/
|
|
100
|
+
onNfcError(callback: (error: NfcError) => void): import("react-native").EmitterSubscription | null;
|
|
101
|
+
/**
|
|
102
|
+
* Listen for C06 success events
|
|
103
|
+
*/
|
|
104
|
+
onC06Success(callback: (data: SDKEkycResultWithEvent) => void): import("react-native").EmitterSubscription | null;
|
|
105
|
+
/**
|
|
106
|
+
* Listen for C06 error events
|
|
107
|
+
*/
|
|
108
|
+
onC06Error(callback: (error: NfcError) => void): import("react-native").EmitterSubscription | null;
|
|
109
|
+
/**
|
|
110
|
+
* Listen for OCR success events
|
|
111
|
+
*/
|
|
112
|
+
onOCRSuccess(callback: (data: SDKEkycResultStringWithEvent) => void): import("react-native").EmitterSubscription | null;
|
|
113
|
+
/**
|
|
114
|
+
* Listen for OCR error events
|
|
115
|
+
*/
|
|
116
|
+
onOCRError(callback: (error: any) => void): import("react-native").EmitterSubscription | null;
|
|
117
|
+
/**
|
|
118
|
+
* Listen for liveness success events
|
|
119
|
+
*/
|
|
120
|
+
onLivenessSuccess(callback: (data: SDKEkycResultStringWithEvent) => void): import("react-native").EmitterSubscription | null;
|
|
121
|
+
/**
|
|
122
|
+
* Listen for liveness error events
|
|
123
|
+
*/
|
|
124
|
+
onLivenessError(callback: (error: any) => void): import("react-native").EmitterSubscription | null;
|
|
125
|
+
/**
|
|
126
|
+
* Listen for face compare success events
|
|
127
|
+
*/
|
|
128
|
+
onFaceCompareSuccess(callback: (data: SDKEkycResultWithEvent) => void): import("react-native").EmitterSubscription | null;
|
|
129
|
+
/**
|
|
130
|
+
* Listen for face compare error events
|
|
131
|
+
*/
|
|
132
|
+
onFaceCompareError(callback: (error: any) => void): import("react-native").EmitterSubscription | null;
|
|
133
|
+
/**
|
|
134
|
+
* Remove all event listeners
|
|
135
|
+
*/
|
|
136
|
+
removeAllListeners(): void;
|
|
137
|
+
/**
|
|
138
|
+
* Start eKYC UI with flow (like MainActivity.kt)
|
|
139
|
+
* @param appKey Main app key
|
|
140
|
+
* @param flowSDK Array of SDK types
|
|
141
|
+
* @param language Language code (vi/en)
|
|
142
|
+
* @param transactionId Transaction ID
|
|
143
|
+
* @param optionConfig Optional configuration settings
|
|
144
|
+
* @param appKeyConfig Optional app key configuration
|
|
145
|
+
* @param styleConfig Optional style configuration
|
|
146
|
+
*/
|
|
147
|
+
startEkycUI(appKey: string, flowSDK: string[], language: string, transactionId: string, appKeyConfig: {
|
|
148
|
+
appKey: string;
|
|
149
|
+
appKeyNfc: string;
|
|
150
|
+
appKeyOcr: string;
|
|
151
|
+
appKeyLiveness: string;
|
|
152
|
+
appKeyC06: string;
|
|
153
|
+
appKeyFaceService: string;
|
|
154
|
+
}, optionConfig?: {
|
|
155
|
+
baseUrl?: string;
|
|
156
|
+
countMaxRetry?: number;
|
|
157
|
+
language?: string;
|
|
158
|
+
}, styleConfig?: {
|
|
159
|
+
textSize?: number;
|
|
160
|
+
textFont?: string;
|
|
161
|
+
textColor?: number;
|
|
162
|
+
statusBarBackground?: number;
|
|
163
|
+
backIcon?: number;
|
|
164
|
+
titleStyle?: {
|
|
165
|
+
textSize?: number;
|
|
166
|
+
textFont?: string;
|
|
167
|
+
textColor?: number;
|
|
168
|
+
};
|
|
169
|
+
toolbarStyle?: {
|
|
170
|
+
textSize?: number;
|
|
171
|
+
textFont?: string;
|
|
172
|
+
textColor?: number;
|
|
173
|
+
};
|
|
174
|
+
instructionStyle?: {
|
|
175
|
+
textSize?: number;
|
|
176
|
+
textFont?: string;
|
|
177
|
+
textColor?: number;
|
|
178
|
+
};
|
|
179
|
+
errorStyle?: {
|
|
180
|
+
textSize?: number;
|
|
181
|
+
textFont?: string;
|
|
182
|
+
textColor?: number;
|
|
183
|
+
};
|
|
184
|
+
successStyle?: {
|
|
185
|
+
textSize?: number;
|
|
186
|
+
textFont?: string;
|
|
187
|
+
textColor?: number;
|
|
188
|
+
};
|
|
189
|
+
warningStyle?: {
|
|
190
|
+
textSize?: number;
|
|
191
|
+
textFont?: string;
|
|
192
|
+
textColor?: number;
|
|
193
|
+
};
|
|
194
|
+
}): Promise<any>;
|
|
195
|
+
private validateSDKReady;
|
|
196
|
+
private validatePlatform;
|
|
197
|
+
}
|
|
198
|
+
export declare const FinosEKYC: FinosEKYCModule;
|
|
199
|
+
export type { NfcConfig, NfcError } from '../types/ekycNFCType';
|
|
200
|
+
export type { C06Config } from '../types/ekycC06Type';
|
|
201
|
+
export type { OcrConfig } from '../types/ekycOCRType';
|
|
202
|
+
export type { LivenessConfig } from '../types/ekycLivenessType';
|
|
203
|
+
export type { FaceServiceConfig } from '../types/ekycFaceType';
|
|
204
|
+
export type { SDKEkycResultWithEvent, SDKEkycResultStringWithEvent } from '../types/ekycType';
|
|
205
|
+
export { SDK_VERSION, SDK_NAME };
|
|
206
|
+
export default FinosEKYC;
|