react-native-rdservice-fingerprintscanner 1.1.3 → 1.1.6

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 CHANGED
@@ -86,7 +86,6 @@ rdServicePackage | Device Package
86
86
  message | Message about Success or Failure
87
87
 
88
88
 
89
-
90
89
  ## Contributing
91
90
 
92
91
  See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "react-native-rdservice-fingerprintscanner",
3
- "version": "1.1.3",
3
+ "version": "1.1.6",
4
4
  "description": "FingerPrint Scanner RD Service",
5
- "main": "lib/commonjs/index",
5
+ "main": "src/index.js",
6
6
  "module": "lib/module/index",
7
- "types": "lib/typescript/index.d.ts",
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,28 @@
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
+ }
24
+
25
+ export function getDeviceInfo(): Promise<deviceInfoProps | optionalInfo>;
26
+ export function captureFinger(pidOptions: string):Promise<fingerprintDataProps>;
27
+
28
+ }
package/src/index.js CHANGED
@@ -17,7 +17,7 @@ const RdserviceFingerprintscanner = NativeModules.RdserviceFingerprintscanner
17
17
  }
18
18
  );
19
19
 
20
- function getDeviceInfo() {
20
+ export function getDeviceInfo(){
21
21
  return new Promise((resolve, reject) => {
22
22
  RdserviceFingerprintscanner.getDeviceInfo()
23
23
  .then((res) => {
@@ -45,7 +45,7 @@ function getDeviceInfo() {
45
45
  });
46
46
  }
47
47
 
48
- function captureFinger(pidOptions) {
48
+ export function captureFinger(pidOptions) {
49
49
  return new Promise((resolve, reject) => {
50
50
  RdserviceFingerprintscanner.captureFinger(pidOptions)
51
51
  .then((res) => {
@@ -65,8 +65,3 @@ function captureFinger(pidOptions) {
65
65
  });
66
66
  });
67
67
  }
68
-
69
- module.exports = {
70
- getDeviceInfo,
71
- captureFinger
72
- }