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.
- package/ios/GizwitsiOSSDK.framework/GizwitsiOSSDK +0 -0
- package/ios/GizwitsiOSSDK.framework/Modules/GizwitsiOSSDK.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
- package/ios/GizwitsiOSSDK.framework/Modules/GizwitsiOSSDK.swiftmodule/arm64-apple-ios.swiftmodule +0 -0
- package/ios/RNGizDeviceManagerModule.swift +1 -1
- package/lib/device.d.ts +3 -3
- package/lib/types.d.ts +2 -5
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
package/ios/GizwitsiOSSDK.framework/Modules/GizwitsiOSSDK.swiftmodule/arm64-apple-ios.swiftmodule
CHANGED
|
Binary file
|
|
@@ -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<
|
|
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 {
|
|
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<
|
|
5
|
-
getDp(id: string, type: GizCapability, attrs?: string[]): Promise<GizResult<
|
|
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<
|
|
12
|
-
getDp: (attrs?: string[]) => Promise<GizResult<
|
|
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;
|