@haroldtran/react-native-pax 1.0.11 → 1.0.12

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haroldtran/react-native-pax",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "description": "React Native native module for PAX devices",
5
5
  "main": "./src/index.ts",
6
6
  "files": [
package/src/index.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { NativeModules, Platform } from 'react-native';
2
- import { PaxResponseModel } from './type';
2
+ import { PaxInitModel, PaxResponseModel } from './type';
3
3
  export * from './type';
4
4
  // This package is Android-only. Provide clear errors on non-Android platforms
5
5
  const ANDROID_ONLY_ERROR =
@@ -38,9 +38,9 @@ const PaxPosLink = isAndroid
38
38
  /**
39
39
  * Initializes the POSLink connection.
40
40
  * @param {string} [ip] - The IP address of the POS device.
41
- * @returns {*} The result of the native initPOSLink call.
41
+ * @returns {Promise<PaxInitModel>} A promise resolving to the initPOSLink result.
42
42
  */
43
- export function initPOSLink(ip: string) {
43
+ export function initPOSLink(ip: string): Promise<PaxInitModel> {
44
44
  return PaxPosLink.initPOSLink(ip);
45
45
  }
46
46
 
package/src/type.ts CHANGED
@@ -1,3 +1,12 @@
1
+ export interface PaxInitModel {
2
+ serialNumber?: {
3
+ modelName: string;
4
+ appName: string;
5
+ serialNumber: string;
6
+ };
7
+ status: boolean;
8
+ }
9
+
1
10
  export interface PaxRequestModel {
2
11
  id?: string;
3
12
  amount?: number;
package/.yarnrc.yml DELETED
@@ -1 +0,0 @@
1
- nodeLinker: node-modules