@ray-js/api 0.20.0-beta.0 → 0.20.0-beta.2
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/@types/BaseKit.d.ts +82 -1
- package/@types/BizKit.d.ts +1 -1
- package/@types/DeviceKit.d.ts +18 -18
- package/@types/PlayNetKit.d.ts +444 -0
- package/lib/PlayNetKit-1.1.3.d.ts +27 -0
- package/lib/PlayNetKit-1.1.3.js +28 -0
- package/lib/all-kits.d.ts +1 -0
- package/lib/all-kits.js +1 -0
- package/lib/cloud/alarm.d.ts +14 -0
- package/lib/cloud/alarm.js +35 -0
- package/lib/cloud/core.d.ts +5 -0
- package/lib/cloud/core.js +16 -0
- package/lib/cloud/device.d.ts +63 -0
- package/lib/cloud/device.js +148 -0
- package/lib/cloud/index.d.ts +6 -0
- package/lib/cloud/index.js +6 -0
- package/lib/cloud/interface.d.ts +960 -0
- package/lib/cloud/interface.js +1 -0
- package/lib/cloud/linkage.d.ts +61 -0
- package/lib/cloud/linkage.js +159 -0
- package/lib/cloud/statistic.d.ts +111 -0
- package/lib/cloud/statistic.js +199 -0
- package/lib/cloud/timer.d.ts +146 -0
- package/lib/cloud/timer.js +275 -0
- package/lib/constants.d.ts +2 -0
- package/lib/constants.js +3 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/package.json +7 -10
- package/lib/panel/README.md +0 -3
- package/lib/panel/index.d.ts +0 -4
- package/lib/panel/index.js +0 -13
- package/lib/panel/index.thing.d.ts +0 -4
- package/lib/panel/index.thing.js +0 -6
package/@types/BaseKit.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* BaseKit
|
3
3
|
*
|
4
|
-
* @version 3.
|
4
|
+
* @version 3.3.13
|
5
5
|
*/
|
6
6
|
declare namespace ty {
|
7
7
|
/**
|
@@ -73,6 +73,7 @@ declare namespace ty {
|
|
73
73
|
* scope.camera 摄像头权限
|
74
74
|
* scope.userLocation 低精度定位权限
|
75
75
|
* scope.userPreciseLocation 高精度定位权限
|
76
|
+
* scope.userInfo 用户信息
|
76
77
|
*/
|
77
78
|
scope: string
|
78
79
|
complete?: () => void
|
@@ -101,6 +102,7 @@ declare namespace ty {
|
|
101
102
|
* scope.camera 摄像头权限
|
102
103
|
* scope.userLocation 低精度定位权限
|
103
104
|
* scope.userPreciseLocation 高精度定位权限
|
105
|
+
* scope.userInfo 用户信息
|
104
106
|
*/
|
105
107
|
scope: string
|
106
108
|
complete?: () => void
|
@@ -698,6 +700,15 @@ declare namespace ty {
|
|
698
700
|
export function updateVolume(params: {
|
699
701
|
/** 音量,阈值【0 - 1】 */
|
700
702
|
value: number
|
703
|
+
/**
|
704
|
+
* 音量类型(仅Android生效)
|
705
|
+
* 0:语音电话的声音
|
706
|
+
* 2:响铃,通知,系统默认音等
|
707
|
+
* 3:手机音乐的声音
|
708
|
+
* 4:手机闹铃的声音
|
709
|
+
* 6:蓝牙音量
|
710
|
+
*/
|
711
|
+
volumeMode?: number[]
|
701
712
|
complete?: () => void
|
702
713
|
success?: (params: null) => void
|
703
714
|
fail?: (params: {
|
@@ -718,6 +729,15 @@ declare namespace ty {
|
|
718
729
|
success?: (params: {
|
719
730
|
/** 音量,阈值【0 - 1】 */
|
720
731
|
value: number
|
732
|
+
/**
|
733
|
+
* 音量类型(仅Android生效)
|
734
|
+
* 0:语音电话的声音
|
735
|
+
* 2:响铃,通知,系统默认音等
|
736
|
+
* 3:手机音乐的声音
|
737
|
+
* 4:手机闹铃的声音
|
738
|
+
* 6:蓝牙音量
|
739
|
+
*/
|
740
|
+
volumeMode: number
|
721
741
|
}) => void
|
722
742
|
fail?: (params: {
|
723
743
|
errorMsg: string
|
@@ -874,6 +894,10 @@ declare namespace ty {
|
|
874
894
|
screenHeight: number
|
875
895
|
windowWidth: number
|
876
896
|
windowHeight: number
|
897
|
+
/** 可使用窗口宽度 */
|
898
|
+
useableWindowWidth: number
|
899
|
+
/** 可使用窗口高度 */
|
900
|
+
useableWindowHeight: number
|
877
901
|
statusBarHeight: number
|
878
902
|
language: string
|
879
903
|
safeArea: SafeArea
|
@@ -890,6 +914,8 @@ declare namespace ty {
|
|
890
914
|
wifiEnabled: boolean
|
891
915
|
theme?: Themes
|
892
916
|
deviceOrientation?: Orientation
|
917
|
+
/** 设备等级(低:low-中:middle-高:high) */
|
918
|
+
deviceLevel: string
|
893
919
|
}) => void
|
894
920
|
fail?: (params: {
|
895
921
|
errorMsg: string
|
@@ -916,6 +942,10 @@ declare namespace ty {
|
|
916
942
|
screenHeight: number
|
917
943
|
windowWidth: number
|
918
944
|
windowHeight: number
|
945
|
+
/** 可使用窗口宽度 */
|
946
|
+
useableWindowWidth: number
|
947
|
+
/** 可使用窗口高度 */
|
948
|
+
useableWindowHeight: number
|
919
949
|
statusBarHeight: number
|
920
950
|
language: string
|
921
951
|
safeArea: SafeArea
|
@@ -932,6 +962,8 @@ declare namespace ty {
|
|
932
962
|
wifiEnabled: boolean
|
933
963
|
theme?: Themes
|
934
964
|
deviceOrientation?: Orientation
|
965
|
+
/** 设备等级(低:low-中:middle-高:high) */
|
966
|
+
deviceLevel: string
|
935
967
|
}
|
936
968
|
|
937
969
|
/**
|
@@ -1120,6 +1152,12 @@ declare namespace ty {
|
|
1120
1152
|
export function scanCode(params?: {
|
1121
1153
|
/** 是否只能从相机扫码,不允许从相册选择图片 */
|
1122
1154
|
onlyFromCamera?: boolean
|
1155
|
+
/** 是否显示动作标题(仅Android生效) */
|
1156
|
+
isShowActionTitle?: boolean
|
1157
|
+
/** 是否显示闪关灯(仅Android生效) */
|
1158
|
+
isShowTorch?: boolean
|
1159
|
+
/** 自定义提示标语(仅Android生效) */
|
1160
|
+
customTips?: string
|
1123
1161
|
/** 扫码类型 */
|
1124
1162
|
scanType?: string[]
|
1125
1163
|
complete?: () => void
|
@@ -1745,6 +1783,15 @@ declare namespace ty {
|
|
1745
1783
|
export type CurrentVolumeResponse = {
|
1746
1784
|
/** 音量,阈值【0 - 1】 */
|
1747
1785
|
value: number
|
1786
|
+
/**
|
1787
|
+
* 音量类型(仅Android生效)
|
1788
|
+
* 0:语音电话的声音
|
1789
|
+
* 2:响铃,通知,系统默认音等
|
1790
|
+
* 3:手机音乐的声音
|
1791
|
+
* 4:手机闹铃的声音
|
1792
|
+
* 6:蓝牙音量
|
1793
|
+
*/
|
1794
|
+
volumeMode: number
|
1748
1795
|
}
|
1749
1796
|
|
1750
1797
|
export type WifiListResponse = {
|
@@ -1810,6 +1857,7 @@ declare namespace ty {
|
|
1810
1857
|
* scope.camera 摄像头权限
|
1811
1858
|
* scope.userLocation 低精度定位权限
|
1812
1859
|
* scope.userPreciseLocation 高精度定位权限
|
1860
|
+
* scope.userInfo 用户信息
|
1813
1861
|
*/
|
1814
1862
|
scope: string
|
1815
1863
|
}
|
@@ -2220,6 +2268,27 @@ declare namespace ty {
|
|
2220
2268
|
export type UpdateVolumeParams = {
|
2221
2269
|
/** 音量,阈值【0 - 1】 */
|
2222
2270
|
value: number
|
2271
|
+
/**
|
2272
|
+
* 音量类型(仅Android生效)
|
2273
|
+
* 0:语音电话的声音
|
2274
|
+
* 2:响铃,通知,系统默认音等
|
2275
|
+
* 3:手机音乐的声音
|
2276
|
+
* 4:手机闹铃的声音
|
2277
|
+
* 6:蓝牙音量
|
2278
|
+
*/
|
2279
|
+
volumeMode?: number[]
|
2280
|
+
}
|
2281
|
+
|
2282
|
+
export type CurrentVolumeParams = {
|
2283
|
+
/**
|
2284
|
+
* 音量类型(仅Android生效)
|
2285
|
+
* 0:语音电话的声音
|
2286
|
+
* 2:响铃,通知,系统默认音等
|
2287
|
+
* 3:手机音乐的声音
|
2288
|
+
* 4:手机闹铃的声音
|
2289
|
+
* 6:蓝牙音量
|
2290
|
+
*/
|
2291
|
+
volumeMode?: number
|
2223
2292
|
}
|
2224
2293
|
|
2225
2294
|
export type SystemSetting = {
|
@@ -2261,6 +2330,10 @@ declare namespace ty {
|
|
2261
2330
|
screenHeight: number
|
2262
2331
|
windowWidth: number
|
2263
2332
|
windowHeight: number
|
2333
|
+
/** 可使用窗口宽度 */
|
2334
|
+
useableWindowWidth: number
|
2335
|
+
/** 可使用窗口高度 */
|
2336
|
+
useableWindowHeight: number
|
2264
2337
|
statusBarHeight: number
|
2265
2338
|
language: string
|
2266
2339
|
safeArea: SafeArea
|
@@ -2277,6 +2350,8 @@ declare namespace ty {
|
|
2277
2350
|
wifiEnabled: boolean
|
2278
2351
|
theme?: Themes
|
2279
2352
|
deviceOrientation?: Orientation
|
2353
|
+
/** 设备等级(低:low-中:middle-高:high) */
|
2354
|
+
deviceLevel: string
|
2280
2355
|
}
|
2281
2356
|
|
2282
2357
|
export type GetConnectedWifiParams = {
|
@@ -2350,6 +2425,12 @@ declare namespace ty {
|
|
2350
2425
|
export type ScanCodeBean = {
|
2351
2426
|
/** 是否只能从相机扫码,不允许从相册选择图片 */
|
2352
2427
|
onlyFromCamera?: boolean
|
2428
|
+
/** 是否显示动作标题(仅Android生效) */
|
2429
|
+
isShowActionTitle?: boolean
|
2430
|
+
/** 是否显示闪关灯(仅Android生效) */
|
2431
|
+
isShowTorch?: boolean
|
2432
|
+
/** 自定义提示标语(仅Android生效) */
|
2433
|
+
customTips?: string
|
2353
2434
|
/** 扫码类型 */
|
2354
2435
|
scanType?: string[]
|
2355
2436
|
}
|
package/@types/BizKit.d.ts
CHANGED
package/@types/DeviceKit.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* DeviceKit
|
3
3
|
*
|
4
|
-
* @version 3.
|
4
|
+
* @version 3.4.0
|
5
5
|
*/
|
6
6
|
declare namespace ty.device {
|
7
7
|
/**
|
@@ -3050,7 +3050,7 @@ declare namespace ty.device {
|
|
3050
3050
|
/** groupId 群组id */
|
3051
3051
|
groupId: string
|
3052
3052
|
/** deviceList 设备列表 */
|
3053
|
-
deviceList:
|
3053
|
+
deviceList: DeviceInfo_cBjmel[]
|
3054
3054
|
}) => void
|
3055
3055
|
fail?: (params: {
|
3056
3056
|
errorMsg: string
|
@@ -3303,7 +3303,7 @@ declare namespace ty.device {
|
|
3303
3303
|
/** The custom DP name. */
|
3304
3304
|
dpName: {}
|
3305
3305
|
/** The device list. */
|
3306
|
-
deviceList:
|
3306
|
+
deviceList: DeviceInfo_cBjmel[]
|
3307
3307
|
/** The local short address of groups. */
|
3308
3308
|
localId: string
|
3309
3309
|
/** The subclass. */
|
@@ -3818,12 +3818,12 @@ declare namespace ty.device {
|
|
3818
3818
|
/**
|
3819
3819
|
* 设备信息变化
|
3820
3820
|
*/
|
3821
|
-
export function onDeviceInfoUpdated(listener: (params:
|
3821
|
+
export function onDeviceInfoUpdated(listener: (params: Device_UB2pYG) => void): void
|
3822
3822
|
|
3823
3823
|
/**
|
3824
3824
|
* 取消监听:设备信息变化
|
3825
3825
|
*/
|
3826
|
-
export function offDeviceInfoUpdated(listener: (params:
|
3826
|
+
export function offDeviceInfoUpdated(listener: (params: Device_UB2pYG) => void): void
|
3827
3827
|
|
3828
3828
|
/**
|
3829
3829
|
* 设备移除事件
|
@@ -3848,42 +3848,42 @@ declare namespace ty.device {
|
|
3848
3848
|
/**
|
3849
3849
|
* 网关子设备dp信息变化事件
|
3850
3850
|
*/
|
3851
|
-
export function onSubDeviceDpUpdate(listener: (params:
|
3851
|
+
export function onSubDeviceDpUpdate(listener: (params: Device_UB2pYG) => void): void
|
3852
3852
|
|
3853
3853
|
/**
|
3854
3854
|
* 取消监听:网关子设备dp信息变化事件
|
3855
3855
|
*/
|
3856
|
-
export function offSubDeviceDpUpdate(listener: (params:
|
3856
|
+
export function offSubDeviceDpUpdate(listener: (params: Device_UB2pYG) => void): void
|
3857
3857
|
|
3858
3858
|
/**
|
3859
3859
|
* 网关子设备被移除事件
|
3860
3860
|
*/
|
3861
|
-
export function onSubDeviceRemoved(listener: (params:
|
3861
|
+
export function onSubDeviceRemoved(listener: (params: Device_UB2pYG) => void): void
|
3862
3862
|
|
3863
3863
|
/**
|
3864
3864
|
* 取消监听:网关子设备被移除事件
|
3865
3865
|
*/
|
3866
|
-
export function offSubDeviceRemoved(listener: (params:
|
3866
|
+
export function offSubDeviceRemoved(listener: (params: Device_UB2pYG) => void): void
|
3867
3867
|
|
3868
3868
|
/**
|
3869
3869
|
* 网关添加子设备的事件
|
3870
3870
|
*/
|
3871
|
-
export function onSubDeviceAdded(listener: (params:
|
3871
|
+
export function onSubDeviceAdded(listener: (params: Device_UB2pYG) => void): void
|
3872
3872
|
|
3873
3873
|
/**
|
3874
3874
|
* 取消监听:网关添加子设备的事件
|
3875
3875
|
*/
|
3876
|
-
export function offSubDeviceAdded(listener: (params:
|
3876
|
+
export function offSubDeviceAdded(listener: (params: Device_UB2pYG) => void): void
|
3877
3877
|
|
3878
3878
|
/**
|
3879
3879
|
* 网关子设备信息变化的事件
|
3880
3880
|
*/
|
3881
|
-
export function onSubDeviceInfoUpdate(listener: (params:
|
3881
|
+
export function onSubDeviceInfoUpdate(listener: (params: Device_UB2pYG) => void): void
|
3882
3882
|
|
3883
3883
|
/**
|
3884
3884
|
* 取消监听:网关子设备信息变化的事件
|
3885
3885
|
*/
|
3886
|
-
export function offSubDeviceInfoUpdate(listener: (params:
|
3886
|
+
export function offSubDeviceInfoUpdate(listener: (params: Device_UB2pYG) => void): void
|
3887
3887
|
|
3888
3888
|
/**
|
3889
3889
|
* 定时变化事件
|
@@ -4365,7 +4365,7 @@ declare namespace ty.device {
|
|
4365
4365
|
cityName: string
|
4366
4366
|
}
|
4367
4367
|
|
4368
|
-
export type
|
4368
|
+
export type DeviceInfo_cBjmel = {
|
4369
4369
|
/** 产品信息,schema,功能定义都在里面 */
|
4370
4370
|
schema: {}[]
|
4371
4371
|
/**
|
@@ -4673,7 +4673,7 @@ declare namespace ty.device {
|
|
4673
4673
|
onlineType: number
|
4674
4674
|
}
|
4675
4675
|
|
4676
|
-
export type
|
4676
|
+
export type Device_UB2pYG = {
|
4677
4677
|
/**
|
4678
4678
|
* deviceId 设备id
|
4679
4679
|
* 支持跨面板获取其他的设备信息,当前面板可以传当前设备的 id 来进行获取
|
@@ -5382,7 +5382,7 @@ declare namespace ty.device {
|
|
5382
5382
|
warningText: string
|
5383
5383
|
}
|
5384
5384
|
|
5385
|
-
export type
|
5385
|
+
export type Device_fDm5Lu = {
|
5386
5386
|
/**
|
5387
5387
|
* deviceId
|
5388
5388
|
* 设备 id
|
@@ -5632,7 +5632,7 @@ declare namespace ty.device {
|
|
5632
5632
|
/** groupId 群组id */
|
5633
5633
|
groupId: string
|
5634
5634
|
/** deviceList 设备列表 */
|
5635
|
-
deviceList:
|
5635
|
+
deviceList: DeviceInfo_cBjmel[]
|
5636
5636
|
}
|
5637
5637
|
|
5638
5638
|
export type DeviceNumResponse = {
|
@@ -5786,7 +5786,7 @@ declare namespace ty.device {
|
|
5786
5786
|
/** The custom DP name. */
|
5787
5787
|
dpName: {}
|
5788
5788
|
/** The device list. */
|
5789
|
-
deviceList:
|
5789
|
+
deviceList: DeviceInfo_cBjmel[]
|
5790
5790
|
/** The local short address of groups. */
|
5791
5791
|
localId: string
|
5792
5792
|
/** The subclass. */
|