react-native-rdservice-fingerprintscanner 1.1.4 → 1.1.7
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 +2 -0
- package/package.json +3 -3
- package/src/index.d.ts +29 -0
- package/src/{index.tsx → index.js} +6 -29
package/README.md
CHANGED
|
@@ -69,6 +69,7 @@ isWhitelisted | true or false | iT is about the Device is Approved or not. ```tr
|
|
|
69
69
|
rdServiceInfoJson |JSON DATA | The device returns XML DATA of Device Information. this parameter contains converted JSON DATA of XML DATA
|
|
70
70
|
rdServiceInfoXML | XML DATA | Device Information
|
|
71
71
|
rdServicePackage | Device Package
|
|
72
|
+
message | Message about Success or Failure
|
|
72
73
|
|
|
73
74
|
|
|
74
75
|
|
|
@@ -82,6 +83,7 @@ errInfo | Error Message according to the ERROR CODE | Refer [UIDAI Document](htt
|
|
|
82
83
|
pidDataJson |JSON DATA | The device returns PID DATA of Captured Fingerprint. this parameter contains converted JSON pidData of XML pidData
|
|
83
84
|
pidDataXML | XML DATA | pidData Captured Fingerprint
|
|
84
85
|
rdServicePackage | Device Package
|
|
86
|
+
message | Message about Success or Failure
|
|
85
87
|
|
|
86
88
|
|
|
87
89
|
## Contributing
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-rdservice-fingerprintscanner",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"description": "FingerPrint Scanner RD Service",
|
|
5
|
-
"main": "src/index.
|
|
5
|
+
"main": "src/index.js",
|
|
6
6
|
"module": "lib/module/index",
|
|
7
|
-
"types": "
|
|
7
|
+
"types": "src/index.d.ts",
|
|
8
8
|
"react-native": "src/index",
|
|
9
9
|
"source": "src/index",
|
|
10
10
|
"files": [
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
declare module "react-native-rdservice-fingerprintscanner" {
|
|
2
|
+
export type deviceInfoProps = {
|
|
3
|
+
isWhitelisted: boolean,
|
|
4
|
+
rdServiceInfoJson: JSON,
|
|
5
|
+
rdServiceInfoXML: string,
|
|
6
|
+
rdServicePackage: string ,
|
|
7
|
+
status: number,
|
|
8
|
+
message: string,
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export type optionalInfo ={
|
|
12
|
+
status: number,
|
|
13
|
+
message: string,
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type fingerprintDataProps = {
|
|
17
|
+
pidDataJson: JSON,
|
|
18
|
+
pidDataXML: string,
|
|
19
|
+
rdServicePackage: string,
|
|
20
|
+
status: number,
|
|
21
|
+
errInfo: string,
|
|
22
|
+
errorCode: number,
|
|
23
|
+
message: string,
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function getDeviceInfo(): Promise<deviceInfoProps | optionalInfo>;
|
|
27
|
+
export function captureFinger(pidOptions: string):Promise<fingerprintDataProps>;
|
|
28
|
+
|
|
29
|
+
}
|
|
@@ -17,33 +17,10 @@ const RdserviceFingerprintscanner = NativeModules.RdserviceFingerprintscanner
|
|
|
17
17
|
}
|
|
18
18
|
);
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
isWhitelisted: boolean,
|
|
22
|
-
rdServiceInfoJson: JSON,
|
|
23
|
-
rdServiceInfoXML: string,
|
|
24
|
-
rdServicePackage: string ,
|
|
25
|
-
status: number,
|
|
26
|
-
message: string,
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
type optionalInfo ={
|
|
30
|
-
status: number,
|
|
31
|
-
message: string,
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
type fingerprintDataProps = {
|
|
35
|
-
pidDataJson: JSON,
|
|
36
|
-
pidDataXML: string,
|
|
37
|
-
rdServicePackage: string,
|
|
38
|
-
status: number,
|
|
39
|
-
errInfo: string,
|
|
40
|
-
errorCode: number,
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export function getDeviceInfo():Promise<deviceInfoProps | optionalInfo> {
|
|
20
|
+
export function getDeviceInfo(){
|
|
44
21
|
return new Promise((resolve, reject) => {
|
|
45
22
|
RdserviceFingerprintscanner.getDeviceInfo()
|
|
46
|
-
.then((res
|
|
23
|
+
.then((res) => {
|
|
47
24
|
if (res.status === -1) {
|
|
48
25
|
const resObj = {
|
|
49
26
|
status: res.status,
|
|
@@ -62,16 +39,16 @@ export function getDeviceInfo():Promise<deviceInfoProps | optionalInfo> {
|
|
|
62
39
|
resolve(resObj);
|
|
63
40
|
}
|
|
64
41
|
})
|
|
65
|
-
.catch((err
|
|
42
|
+
.catch((err) => {
|
|
66
43
|
reject(err);
|
|
67
44
|
});
|
|
68
45
|
});
|
|
69
46
|
}
|
|
70
47
|
|
|
71
|
-
export function captureFinger(pidOptions
|
|
48
|
+
export function captureFinger(pidOptions) {
|
|
72
49
|
return new Promise((resolve, reject) => {
|
|
73
50
|
RdserviceFingerprintscanner.captureFinger(pidOptions)
|
|
74
|
-
.then((res
|
|
51
|
+
.then((res) => {
|
|
75
52
|
const resObj = {
|
|
76
53
|
pidDataJson: JSON.parse(res.pidDataJsonString),
|
|
77
54
|
pidDataXML: res.pidDataXML,
|
|
@@ -83,7 +60,7 @@ export function captureFinger(pidOptions: string):Promise<fingerprintDataProps>
|
|
|
83
60
|
};
|
|
84
61
|
resolve(resObj);
|
|
85
62
|
})
|
|
86
|
-
.catch((err
|
|
63
|
+
.catch((err) => {
|
|
87
64
|
reject(err);
|
|
88
65
|
});
|
|
89
66
|
});
|