react-native-gizwits-sdk-v5 1.3.64 → 1.3.65

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.
@@ -58,11 +58,13 @@ class RNGizSDKManagerModule: RCTEventEmitter, GizSdkEventHandlerDelegate {
58
58
  sendEvent(withName: "DeviceDataListener", body: data)
59
59
  }
60
60
 
61
- func onDeviceState(device: GizwitsiOSSDK.GizDevice, state: GizwitsiOSSDK.GizWifiDeviceNetStatus, type: GizwitsiOSSDK.GizCapability) {
61
+ func onDeviceState(device: GizwitsiOSSDK.GizDevice, state: GizwitsiOSSDK.GizWifiDeviceNetStatus, isOnline: Bool, isLogin: Bool, type: GizwitsiOSSDK.GizCapability) {
62
62
  let data = [
63
63
  "device": GizRNCallbackManager.convertToDictionary(object: device) ?? [:],
64
64
  "state": state.rawValue,
65
- "type": type.rawValue
65
+ "type": type.rawValue,
66
+ "isOnline": isOnline,
67
+ "isLogin": isLogin
66
68
  ] as [String : Any]
67
69
  sendEvent(withName: "DeviceStateListener", body: data)
68
70
  }
package/lib/types.d.ts CHANGED
@@ -2,6 +2,8 @@ export declare type AuthenticationMethod = 0 | 1;
2
2
  export interface GizBaseCapability {
3
3
  name: string;
4
4
  isActive: boolean;
5
+ isOnline: boolean;
6
+ isLogin: boolean;
5
7
  netStatus: NetStatus;
6
8
  connect: () => Promise<GizResult<any, any>>;
7
9
  getDeviceInfo: () => Promise<GizResult<GizDeviceInfoProfile, any>>;
@@ -117,6 +119,8 @@ export interface DeviceDataRes {
117
119
  export interface DeviceStateRes {
118
120
  device: IDevice;
119
121
  state: GizDeviceNetStatus;
122
+ isOnline: boolean;
123
+ isLogin: boolean;
120
124
  type: GizCapability;
121
125
  }
122
126
  export interface DeviceBindRes {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-gizwits-sdk-v5",
3
- "version": "1.3.64",
3
+ "version": "1.3.65",
4
4
  "description": "Gizwits",
5
5
  "homepage": "https://github.com/demchenkoalex/react-native-gizwits-sdk-v5#readme",
6
6
  "main": "lib/index.js",