react-native-gizwits-sdk-v5 1.1.5 → 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.
@@ -111,7 +111,7 @@ class RNGizDeviceManagerModule: RCTEventEmitter {
111
111
  // 先找到设备
112
112
  if let device = findDevice(id: params.id) {
113
113
  Task {
114
- var data: GizResult<GizJSON?, GizCtrlException?>
114
+ var data: GizResult<DeviceInfoProfile?, GizCtrlException?>
115
115
  switch(params.type) {
116
116
  case .GizBleCapability:
117
117
  data = await device.bleCapability.getDeviceInfo()
package/lib/device.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import Base from './Base';
2
- import { AttrsData, GizCapability, GizDeviceInfoProfile, GizResult } from './types';
2
+ import { GizCapability, GizDeviceData, GizDeviceInfoProfile, GizResult } from './types';
3
3
  declare class RNGizDeviceManagerModule extends Base {
4
- sendDp(id: string, type: GizCapability, data: Object): Promise<GizResult<AttrsData, any>>;
5
- getDp(id: string, type: GizCapability, attrs?: string[]): Promise<GizResult<AttrsData, any>>;
4
+ sendDp(id: string, type: GizCapability, data: Object): Promise<GizResult<GizDeviceData, any>>;
5
+ getDp(id: string, type: GizCapability, attrs?: string[]): Promise<GizResult<GizDeviceData, any>>;
6
6
  getDeviceInfo(id: string, type: GizCapability): Promise<GizResult<GizDeviceInfoProfile, any>>;
7
7
  connect(id: string, type: GizCapability): Promise<GizResult<any, any>>;
8
8
  }
package/lib/types.d.ts CHANGED
@@ -1,15 +1,12 @@
1
1
  export declare type AuthenticationMethod = 0 | 1;
2
- export interface AttrsData {
3
- [keyof: string]: any;
4
- }
5
2
  export interface GizBaseCapability {
6
3
  name: string;
7
4
  isActived: boolean;
8
5
  netStatus: NetStatus;
9
6
  connect: () => Promise<GizResult<any, any>>;
10
7
  getDeviceInfo: () => Promise<GizResult<GizDeviceInfoProfile, any>>;
11
- sendDp: (data: Object) => Promise<GizResult<AttrsData, any>>;
12
- getDp: (attrs?: string[]) => Promise<GizResult<AttrsData, any>>;
8
+ sendDp: (data: Object) => Promise<GizResult<GizDeviceData, any>>;
9
+ getDp: (attrs?: string[]) => Promise<GizResult<GizDeviceData, any>>;
13
10
  }
14
11
  export interface GizBaseProfile {
15
12
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-gizwits-sdk-v5",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "description": "Gizwits",
5
5
  "homepage": "https://github.com/demchenkoalex/react-native-gizwits-sdk-v5#readme",
6
6
  "main": "lib/index.js",