@ray-js/api 1.2.0 → 1.2.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 +17 -17
- package/@types/MiniKit.d.ts +2 -2
- package/lib/all-kits.d.ts +0 -2
- package/lib/panel/publishDps.d.ts +0 -12
- package/package.json +5 -5
- package/lib/HomeKit-3.1.4.d.ts +0 -7
- package/lib/MapKit-3.0.7.d.ts +0 -12
package/@types/BaseKit.d.ts
CHANGED
@@ -112,7 +112,7 @@ declare namespace ty {
|
|
112
112
|
*/
|
113
113
|
export function startAccelerometer(params?: {
|
114
114
|
/** 监听加速度数据回调函数的执行频率 */
|
115
|
-
interval?:
|
115
|
+
interval?: keyof typeof AccelerometerInterval
|
116
116
|
complete?: () => void
|
117
117
|
success?: (params: null) => void
|
118
118
|
failure?: (params: {
|
@@ -269,7 +269,7 @@ declare namespace ty {
|
|
269
269
|
*/
|
270
270
|
export function startDeviceMotionListening(params?: {
|
271
271
|
/** 监听加速度数据回调函数的执行频率 */
|
272
|
-
interval?:
|
272
|
+
interval?: keyof typeof DeviceMotionInterval
|
273
273
|
complete?: () => void
|
274
274
|
success?: (params: null) => void
|
275
275
|
failure?: (params: {
|
@@ -322,7 +322,7 @@ declare namespace ty {
|
|
322
322
|
*/
|
323
323
|
export function startGyroscope(params?: {
|
324
324
|
/** 监听陀螺仪数据回调函数的执行频率 */
|
325
|
-
interval?:
|
325
|
+
interval?: keyof typeof GyroscopeInterval
|
326
326
|
complete?: () => void
|
327
327
|
success?: (params: null) => void
|
328
328
|
failure?: (params: {
|
@@ -999,8 +999,8 @@ declare namespace ty {
|
|
999
999
|
bluetoothEnabled: boolean
|
1000
1000
|
locationEnabled: boolean
|
1001
1001
|
wifiEnabled: boolean
|
1002
|
-
theme?:
|
1003
|
-
deviceOrientation?:
|
1002
|
+
theme?: keyof typeof Themes
|
1003
|
+
deviceOrientation?: keyof typeof Orientation
|
1004
1004
|
/** 设备等级(低:low-中:middle-高:high) */
|
1005
1005
|
deviceLevel: string
|
1006
1006
|
}) => void
|
@@ -1047,8 +1047,8 @@ declare namespace ty {
|
|
1047
1047
|
bluetoothEnabled: boolean
|
1048
1048
|
locationEnabled: boolean
|
1049
1049
|
wifiEnabled: boolean
|
1050
|
-
theme?:
|
1051
|
-
deviceOrientation?:
|
1050
|
+
theme?: keyof typeof Themes
|
1051
|
+
deviceOrientation?: keyof typeof Orientation
|
1052
1052
|
/** 设备等级(低:low-中:middle-高:high) */
|
1053
1053
|
deviceLevel: string
|
1054
1054
|
}
|
@@ -1891,11 +1891,11 @@ declare namespace ty {
|
|
1891
1891
|
/** 小部件样式,默认middle */
|
1892
1892
|
style?: string
|
1893
1893
|
/** 版本类型,默认release */
|
1894
|
-
versionType?:
|
1894
|
+
versionType?: keyof typeof WidgetVersionType
|
1895
1895
|
/** 版本号 */
|
1896
1896
|
version?: string
|
1897
1897
|
/** 展示位置,默认bottom */
|
1898
|
-
position?:
|
1898
|
+
position?: keyof typeof WidgetPosition
|
1899
1899
|
/** 点击空白处是否关闭 */
|
1900
1900
|
autoDismiss?: boolean
|
1901
1901
|
/**
|
@@ -1914,7 +1914,7 @@ declare namespace ty {
|
|
1914
1914
|
|
1915
1915
|
export type DeviceMotionBean = {
|
1916
1916
|
/** 监听加速度数据回调函数的执行频率 */
|
1917
|
-
interval?:
|
1917
|
+
interval?: keyof typeof DeviceMotionInterval
|
1918
1918
|
}
|
1919
1919
|
|
1920
1920
|
export type DownLoadBean = {
|
@@ -1980,7 +1980,7 @@ declare namespace ty {
|
|
1980
1980
|
|
1981
1981
|
export type GyroscopeBean = {
|
1982
1982
|
/** 监听陀螺仪数据回调函数的执行频率 */
|
1983
|
-
interval?:
|
1983
|
+
interval?: keyof typeof GyroscopeInterval
|
1984
1984
|
}
|
1985
1985
|
|
1986
1986
|
export type ChooseImageBean = {
|
@@ -2194,7 +2194,7 @@ declare namespace ty {
|
|
2194
2194
|
/** 超时时间,单位为毫秒 */
|
2195
2195
|
timeout?: number
|
2196
2196
|
/** HTTP 请求方法 */
|
2197
|
-
method?:
|
2197
|
+
method?: keyof typeof HTTPMethod
|
2198
2198
|
/** 返回的数据格式 */
|
2199
2199
|
dataType?: any
|
2200
2200
|
/** 返回的数据类型 */
|
@@ -2348,8 +2348,8 @@ declare namespace ty {
|
|
2348
2348
|
bluetoothEnabled: boolean
|
2349
2349
|
locationEnabled: boolean
|
2350
2350
|
wifiEnabled: boolean
|
2351
|
-
theme?:
|
2352
|
-
deviceOrientation?:
|
2351
|
+
theme?: keyof typeof Themes
|
2352
|
+
deviceOrientation?: keyof typeof Orientation
|
2353
2353
|
/** 设备等级(低:low-中:middle-高:high) */
|
2354
2354
|
deviceLevel: string
|
2355
2355
|
}
|
@@ -2668,11 +2668,11 @@ declare namespace ty {
|
|
2668
2668
|
/** 小部件样式,默认middle */
|
2669
2669
|
style?: string
|
2670
2670
|
/** 版本类型,默认release */
|
2671
|
-
versionType?:
|
2671
|
+
versionType?: keyof typeof WidgetVersionType
|
2672
2672
|
/** 版本号 */
|
2673
2673
|
version?: string
|
2674
2674
|
/** 展示位置,默认bottom */
|
2675
|
-
position?:
|
2675
|
+
position?: keyof typeof WidgetPosition
|
2676
2676
|
/** 点击空白处是否关闭 */
|
2677
2677
|
autoDismiss?: boolean
|
2678
2678
|
/**
|
@@ -3095,7 +3095,7 @@ declare namespace ty {
|
|
3095
3095
|
/** 超时时间,单位为毫秒 */
|
3096
3096
|
timeout?: number
|
3097
3097
|
/** HTTP 请求方法 */
|
3098
|
-
method?:
|
3098
|
+
method?: keyof typeof HTTPMethod
|
3099
3099
|
/** 返回的数据格式 */
|
3100
3100
|
dataType?: any
|
3101
3101
|
/** 返回的数据类型 */
|
package/@types/MiniKit.d.ts
CHANGED
@@ -325,7 +325,7 @@ declare namespace ty {
|
|
325
325
|
/** data 请求入参 */
|
326
326
|
data?: Record<string, any>
|
327
327
|
/** method 请求方法 */
|
328
|
-
method?:
|
328
|
+
method?: keyof typeof HighwayMethod
|
329
329
|
complete?: () => void
|
330
330
|
success?: (params: {
|
331
331
|
/**
|
@@ -1245,7 +1245,7 @@ declare namespace ty {
|
|
1245
1245
|
/** data 请求入参 */
|
1246
1246
|
data?: Record<string, any>
|
1247
1247
|
/** method 请求方法 */
|
1248
|
-
method?:
|
1248
|
+
method?: keyof typeof HighwayMethod
|
1249
1249
|
}
|
1250
1250
|
|
1251
1251
|
export type HighwayRequestResponse = {
|
package/lib/all-kits.d.ts
CHANGED
@@ -3,7 +3,5 @@ export * from './BizKit-3.2.7';
|
|
3
3
|
export * from './DeviceKit-3.3.1';
|
4
4
|
export * from './MiniKit-3.1.0';
|
5
5
|
export * from './PlayNetKit-1.1.3';
|
6
|
-
export * from './MapKit-3.0.7';
|
7
|
-
export * from './HomeKit-3.1.4';
|
8
6
|
import * as device from './DeviceKit-3.3.1';
|
9
7
|
export { device };
|
@@ -1,18 +1,6 @@
|
|
1
1
|
import { publishDpsBase } from '../';
|
2
2
|
import { GetTTTAllParams, DpState } from './types';
|
3
3
|
declare type PublishDpsOptions = Omit<GetTTTAllParams<typeof publishDpsBase>, 'deviceId' | 'dps'>;
|
4
|
-
/**
|
5
|
-
* 下发 DP 点控制设备
|
6
|
-
*
|
7
|
-
* @param data - 当前要下发的 DP 数据,同时支持 key 为 dp code 或 dp id
|
8
|
-
* @param options - publishDps 的高阶配置
|
9
|
-
|
10
|
-
* @example
|
11
|
-
*
|
12
|
-
* publishDps({ switch: false });
|
13
|
-
* publishDps({ '1': false })
|
14
|
-
*/
|
15
|
-
export declare function sendDps(data: DpState, options?: PublishDpsOptions): Promise<boolean>;
|
16
4
|
/**
|
17
5
|
* 兼容新旧 publishDps,可以使用原有小程序提供的调用方式,也可以使用 SDK 提供的调用方式。
|
18
6
|
* @param data ty.device.publishDps的参数 或 当前要下发的 DP 数据,同时支持 key 为 dp code 或 dp id
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ray-js/api",
|
3
|
-
"version": "1.2.
|
3
|
+
"version": "1.2.2",
|
4
4
|
"description": "Ray universal api",
|
5
5
|
"keywords": [
|
6
6
|
"ray"
|
@@ -26,13 +26,13 @@
|
|
26
26
|
"build:kit:api": "node scripts/api-creator.mjs"
|
27
27
|
},
|
28
28
|
"dependencies": {
|
29
|
-
"@ray-js/framework": "^1.2.
|
30
|
-
"@ray-js/router": "^1.2.
|
29
|
+
"@ray-js/framework": "^1.2.2",
|
30
|
+
"@ray-js/router": "^1.2.2",
|
31
31
|
"@ray-js/wechat": "^0.0.16",
|
32
32
|
"base64-browser": "^1.0.1"
|
33
33
|
},
|
34
34
|
"devDependencies": {
|
35
|
-
"@ray-js/cli": "^1.2.
|
35
|
+
"@ray-js/cli": "^1.2.2",
|
36
36
|
"art-template": "^4.13.2",
|
37
37
|
"fs-extra": "^10.1.0",
|
38
38
|
"miniprogram-api-typings": "^3.4.3",
|
@@ -44,6 +44,6 @@
|
|
44
44
|
"email": "tuyafe@tuya.com"
|
45
45
|
}
|
46
46
|
],
|
47
|
-
"gitHead": "
|
47
|
+
"gitHead": "e517fe5da418e0caa4c69c9331499d510472dc5e",
|
48
48
|
"repository": {}
|
49
49
|
}
|
package/lib/HomeKit-3.1.4.d.ts
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
/// <reference path="../@types/PlayNetKit.d.ts" />
|
2
|
-
export declare const home: {
|
3
|
-
getCurrentHomeInfo: typeof ty.home.getCurrentHomeInfo;
|
4
|
-
getDeviceIdList: typeof ty.home.getDeviceIdList;
|
5
|
-
getRoomList: typeof ty.home.getRoomList;
|
6
|
-
getDeviceRoomInfo: typeof ty.home.getDeviceRoomInfo;
|
7
|
-
};
|
package/lib/MapKit-3.0.7.d.ts
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
/// <reference path="../@types/PlayNetKit.d.ts" />
|
2
|
-
export declare const map: {
|
3
|
-
chooseLocation: typeof ty.map.chooseLocation;
|
4
|
-
getLocation: typeof ty.map.getLocation;
|
5
|
-
getMapList: typeof ty.map.getMapList;
|
6
|
-
isGeofenceReachLimit: typeof ty.map.isGeofenceReachLimit;
|
7
|
-
openGeofenceMap: typeof ty.map.openGeofenceMap;
|
8
|
-
openMapAppLocation: typeof ty.map.openMapAppLocation;
|
9
|
-
registerGeofence: typeof ty.map.registerGeofence;
|
10
|
-
unregisterGeofence: typeof ty.map.unregisterGeofence;
|
11
|
-
updateGeofence: typeof ty.map.updateGeofence;
|
12
|
-
};
|