@ray-js/api 1.4.0-alpha.4 → 1.4.0-alpha.6
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/cloud/interface.d.ts +7 -7
- package/lib/panel/i18n/index.d.ts +1 -1
- package/lib/panel/i18n/index.wechat.d.ts +1 -1
- package/lib/panel/normalizeNetwork.d.ts +2 -2
- package/lib/panel/publishDps.d.ts +1 -1
- package/lib/panel/types/devInfo.d.ts +3 -3
- package/lib/panel/types/utilities.d.ts +8 -8
- package/lib/utils.d.ts +1 -1
- package/lib/utils.wechat.d.ts +1 -1
- package/package.json +7 -7
- package/LICENSE.md +0 -9
package/lib/cloud/interface.d.ts
CHANGED
@@ -108,7 +108,7 @@ export interface IQueryTimerTasks {
|
|
108
108
|
bizType: string;
|
109
109
|
category: string;
|
110
110
|
}
|
111
|
-
export
|
111
|
+
export type Timers = Array<{
|
112
112
|
/**
|
113
113
|
* 初始化状态,0:关闭;1:开启。
|
114
114
|
*/
|
@@ -655,7 +655,7 @@ export interface IGetLogInSpecifiedTime {
|
|
655
655
|
startTime?: string;
|
656
656
|
endTime?: string;
|
657
657
|
}
|
658
|
-
export
|
658
|
+
export type Dp = {
|
659
659
|
/**
|
660
660
|
* 上报数据的时间戳格式
|
661
661
|
*/
|
@@ -834,7 +834,7 @@ export interface IGetLinkageDeviceList {
|
|
834
834
|
gid: number;
|
835
835
|
sourceType: string;
|
836
836
|
}
|
837
|
-
export
|
837
|
+
export type IGetLinkageDeviceListResponse = Array<{
|
838
838
|
category: string;
|
839
839
|
datapoints: any[];
|
840
840
|
devId: string;
|
@@ -842,7 +842,7 @@ export declare type IGetLinkageDeviceListResponse = Array<{
|
|
842
842
|
name: string;
|
843
843
|
productId: string;
|
844
844
|
}>;
|
845
|
-
export
|
845
|
+
export type IGetSceneListResponse = Array<{
|
846
846
|
actions: any[];
|
847
847
|
attribute: number;
|
848
848
|
auditStatus: number;
|
@@ -906,7 +906,7 @@ export interface IGetBindRuleList {
|
|
906
906
|
sourceEntityId: string;
|
907
907
|
entityType: number;
|
908
908
|
}
|
909
|
-
export
|
909
|
+
export type IGetBindRuleListResponse = Array<{
|
910
910
|
associativeEntityId: string;
|
911
911
|
associativeEntityValueList: any[];
|
912
912
|
bizDomain: string;
|
@@ -932,7 +932,7 @@ export interface IGetDevProperty {
|
|
932
932
|
*/
|
933
933
|
code: string;
|
934
934
|
}
|
935
|
-
export
|
935
|
+
export type IGetDevPropertyResponse = string;
|
936
936
|
export interface ISaveDevProperty {
|
937
937
|
/**
|
938
938
|
* 设备 ID
|
@@ -957,4 +957,4 @@ export interface DeviceProperty {
|
|
957
957
|
*/
|
958
958
|
value: string;
|
959
959
|
}
|
960
|
-
export
|
960
|
+
export type ISaveDevPropertyResponse = boolean;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { getNetworkType, onNetworkStatusChange } from '../..';
|
2
2
|
import { GetTTTSuccessData, GetTTTEventListenerParams, NetworkState } from './types';
|
3
|
-
|
4
|
-
|
3
|
+
type GetNetworkResult = GetTTTSuccessData<typeof getNetworkType>;
|
4
|
+
type NetworkStatusChangeParam = GetTTTEventListenerParams<typeof onNetworkStatusChange>;
|
5
5
|
/**
|
6
6
|
* 规范统一处理 network 返回值
|
7
7
|
*
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { publishDpsBase } from '../..';
|
2
2
|
import { GetTTTAllParams, DpState } from './types';
|
3
|
-
|
3
|
+
type PublishDpsOptions = Omit<GetTTTAllParams<typeof publishDpsBase>, 'deviceId' | 'dps'>;
|
4
4
|
/**
|
5
5
|
* 下发 DP 点控制设备
|
6
6
|
*
|
@@ -1,5 +1,5 @@
|
|
1
|
-
export
|
2
|
-
export
|
1
|
+
export type DpValue = boolean | number | string;
|
2
|
+
export type DpState = Record<string, DpValue>;
|
3
3
|
export interface DpSchema {
|
4
4
|
attr: number;
|
5
5
|
canTrigger: boolean;
|
@@ -85,7 +85,7 @@ interface PanelConfig {
|
|
85
85
|
/**
|
86
86
|
* 设备信息
|
87
87
|
*/
|
88
|
-
export
|
88
|
+
export type DevInfo = Omit<ty.device.DeviceInfo, 'schema' | 'panelConfig'> & {
|
89
89
|
/**
|
90
90
|
* dp id 与 dp code 的映射
|
91
91
|
*/
|
@@ -1,9 +1,9 @@
|
|
1
|
-
|
2
|
-
export
|
3
|
-
export
|
4
|
-
export
|
5
|
-
export
|
6
|
-
export
|
7
|
-
export
|
8
|
-
export
|
1
|
+
type AnyFn = (...args: any) => any;
|
2
|
+
export type GetTTTAllParams<Fn extends AnyFn> = Parameters<Fn>['0'];
|
3
|
+
export type GetTTTParams<Fn extends AnyFn> = Omit<GetTTTAllParams<Fn>, 'complete' | 'success' | 'fail'>;
|
4
|
+
export type GetTTTSuccessData<Fn extends AnyFn, TTTParams extends AnyFn = GetTTTAllParams<Fn>['success']> = Parameters<TTTParams>['0'];
|
5
|
+
export type GetTTTFailData<Fn extends AnyFn, TTTParams extends AnyFn = GetTTTAllParams<Fn>['failed']> = Parameters<TTTParams>['0'];
|
6
|
+
export type GetTTTEventListener<Fn extends AnyFn> = GetTTTAllParams<Fn>;
|
7
|
+
export type GetTTTEventListenerParams<Fn extends AnyFn, TTTEventListener extends AnyFn = GetTTTEventListener<Fn>> = Parameters<TTTEventListener>['0'];
|
8
|
+
export type PromisifyTTT<Fn extends AnyFn> = (params: GetTTTParams<Fn>) => Promise<GetTTTSuccessData<Fn>>;
|
9
9
|
export {};
|
package/lib/utils.d.ts
CHANGED
package/lib/utils.wechat.d.ts
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ray-js/api",
|
3
|
-
"version": "1.4.0-alpha.
|
3
|
+
"version": "1.4.0-alpha.6",
|
4
4
|
"description": "Ray universal api",
|
5
5
|
"keywords": [
|
6
6
|
"ray"
|
@@ -26,16 +26,16 @@
|
|
26
26
|
"build:kit:api": "node scripts/api-creator.mjs"
|
27
27
|
},
|
28
28
|
"dependencies": {
|
29
|
-
"@ray-js/framework": "^1.4.0-alpha.
|
30
|
-
"@ray-js/router": "^1.4.0-alpha.
|
31
|
-
"@ray-js/wechat": "^0.0.
|
29
|
+
"@ray-js/framework": "^1.4.0-alpha.6",
|
30
|
+
"@ray-js/router": "^1.4.0-alpha.6",
|
31
|
+
"@ray-js/wechat": "^0.0.32",
|
32
32
|
"base64-browser": "^1.0.1"
|
33
33
|
},
|
34
34
|
"devDependencies": {
|
35
|
-
"@ray-js/cli": "^1.4.0-alpha.
|
35
|
+
"@ray-js/cli": "^1.4.0-alpha.6",
|
36
36
|
"art-template": "^4.13.2",
|
37
37
|
"fs-extra": "^10.1.0",
|
38
|
-
"miniprogram-api-typings": "^3.
|
38
|
+
"miniprogram-api-typings": "^3.11.0",
|
39
39
|
"react": "^17.0.2"
|
40
40
|
},
|
41
41
|
"maintainers": [
|
@@ -44,6 +44,6 @@
|
|
44
44
|
"email": "tuyafe@tuya.com"
|
45
45
|
}
|
46
46
|
],
|
47
|
-
"gitHead": "
|
47
|
+
"gitHead": "14cb935df10f020e714b44bb41d4899646db751c",
|
48
48
|
"repository": {}
|
49
49
|
}
|
package/LICENSE.md
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
Copyright © 2014-2022 Tuya.inc
|
2
|
-
|
3
|
-
MIT License
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
6
|
-
|
7
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
8
|
-
|
9
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|