@ray-js/api 1.4.47 → 1.4.49
Sign up to get free protection for your applications and to get access to all the features.
- package/@types/api-extend.d.ts +6 -0
- package/lib/MiniKit-3.1.0.js +1 -1
- package/lib/nativeRouters/device.d.ts +7 -54
- package/lib/nativeRouters/device.js +8 -53
- package/lib/nativeRouters/index.d.ts +1 -0
- package/lib/nativeRouters/index.js +2 -1
- package/lib/nativeRouters/ipc.d.ts +30 -0
- package/lib/nativeRouters/ipc.js +44 -0
- package/lib/nativeRouters/outdoors.d.ts +3 -3
- package/lib/nativeRouters/outdoors.js +6 -6
- package/lib/nativeRouters/root.d.ts +8 -22
- package/lib/nativeRouters/root.js +9 -27
- package/lib/viewAPI.d.ts +1 -0
- package/lib/viewAPI.js +2 -1
- package/package.json +5 -5
package/@types/api-extend.d.ts
CHANGED
@@ -221,6 +221,11 @@ interface CameraContext {
|
|
221
221
|
): void
|
222
222
|
setZoom(res: Callback & { zoom: number; success(res: { zoom: number }): void }): void
|
223
223
|
}
|
224
|
+
|
225
|
+
interface WebviewContext {
|
226
|
+
postMessage(options: { data: Record<string, any> }): void
|
227
|
+
reload(options: Callback): void
|
228
|
+
}
|
224
229
|
declare namespace ty {
|
225
230
|
/**
|
226
231
|
* 小程序云能力
|
@@ -275,6 +280,7 @@ declare namespace ty {
|
|
275
280
|
export function createMapContext(mapId: string): MapContext
|
276
281
|
export function createIpcPlayerContext(deviceId: string): IpcContext
|
277
282
|
export function createCameraContext(): CameraContext
|
283
|
+
export function createWebviewContext(): WebviewContext
|
278
284
|
export type env = {
|
279
285
|
USER_DATA_PATH: string
|
280
286
|
}
|
package/lib/MiniKit-3.1.0.js
CHANGED
@@ -7,7 +7,7 @@ export const getPermissionConfig = factory('getPermissionConfig');
|
|
7
7
|
export const getPermissionConfigSync = factory('getPermissionConfigSync');
|
8
8
|
export const openSetting = factory('openSetting');
|
9
9
|
export const changeDebugMode = factory('changeDebugMode');
|
10
|
-
export const openHelpCenter = factory('openHelpCenter');
|
10
|
+
export const openHelpCenter = factory('openHelpCenter'); // 已废弃TTT能力封装有问题使用ty.router封装的api,见nativeRouters
|
11
11
|
export const showTabBarRedDot = factory('showTabBarRedDot');
|
12
12
|
export const showTabBar = factory('showTabBar');
|
13
13
|
export const setTabBarStyle = factory('setTabBarStyle');
|
@@ -30,39 +30,6 @@ type OpenConfigDevice = {
|
|
30
30
|
* @returns
|
31
31
|
*/
|
32
32
|
export declare function openConfigDevice(params?: OpenConfigDevice): Promise<void>;
|
33
|
-
type OpenFamilyAddMember = {
|
34
|
-
/**
|
35
|
-
* 家庭 ID
|
36
|
-
*/
|
37
|
-
homeId?: string;
|
38
|
-
} & ICommon;
|
39
|
-
/**
|
40
|
-
* 跳转到app家庭成员添加页面
|
41
|
-
* @param params { homeId?: string }
|
42
|
-
* @returns
|
43
|
-
*/
|
44
|
-
export declare function openFamilyAddMember(params?: OpenFamilyAddMember): Promise<void>;
|
45
|
-
type OpenDeviceDetail = {
|
46
|
-
/**
|
47
|
-
* 设备 Id
|
48
|
-
*/
|
49
|
-
devId: string;
|
50
|
-
} & ICommon;
|
51
|
-
/**
|
52
|
-
* 跳转设备详情
|
53
|
-
* @param params { devId?: string }
|
54
|
-
* @returns
|
55
|
-
*/
|
56
|
-
export declare function openDeviceDetail(params?: OpenDeviceDetail): Promise<void>;
|
57
|
-
type OpenDeviceOnlySearchConfigGwSub = {
|
58
|
-
gwId?: string;
|
59
|
-
} & ICommon;
|
60
|
-
/**
|
61
|
-
* 搜索子设备
|
62
|
-
* @param params {gwId?: string}
|
63
|
-
* @returns
|
64
|
-
*/
|
65
|
-
export declare function openDeviceOnlySearchConfigGwSub(params?: OpenDeviceOnlySearchConfigGwSub): Promise<void>;
|
66
33
|
type OpenDevNetworkCheck = {} & ICommon;
|
67
34
|
/**
|
68
35
|
* 检测设备网络
|
@@ -70,32 +37,11 @@ type OpenDevNetworkCheck = {} & ICommon;
|
|
70
37
|
* @returns
|
71
38
|
*/
|
72
39
|
export declare function openDevNetworkCheck(params?: OpenDevNetworkCheck): Promise<void>;
|
73
|
-
type OpenDeviceGwSubDeviceHelpList = {
|
74
|
-
gwId?: string;
|
75
|
-
} & ICommon;
|
76
|
-
/**
|
77
|
-
* 跳转配网帮助列表
|
78
|
-
*/
|
79
|
-
export declare function openDeviceGwSubDeviceHelpList(params?: OpenDeviceGwSubDeviceHelpList): Promise<void>;
|
80
|
-
type OpenUpgradeDetail = {
|
81
|
-
devId?: string;
|
82
|
-
} & ICommon;
|
83
|
-
/**
|
84
|
-
* 跳转设备升级详情
|
85
|
-
*/
|
86
|
-
export declare function openUpgradeDetail(params?: OpenUpgradeDetail): Promise<void>;
|
87
40
|
type OpenSmartScene = {} & ICommon;
|
88
41
|
/**
|
89
42
|
* 跳转场景
|
90
43
|
*/
|
91
44
|
export declare function openSmartScene(params?: OpenSmartScene): Promise<void>;
|
92
|
-
type OpenDeviceOfflineReconnect = {
|
93
|
-
device_id?: string;
|
94
|
-
} & ICommon;
|
95
|
-
/**
|
96
|
-
* 面板设备离线-重新连接
|
97
|
-
*/
|
98
|
-
export declare function openDeviceOfflineReconnect(params?: OpenDeviceOfflineReconnect): Promise<void>;
|
99
45
|
type OpenDevManualAndSmart = {
|
100
46
|
devId?: string;
|
101
47
|
} & ICommon;
|
@@ -103,4 +49,11 @@ type OpenDevManualAndSmart = {
|
|
103
49
|
* 打开 “一键执行”和“自动化”
|
104
50
|
*/
|
105
51
|
export declare function openDevManualAndSmart(params?: OpenDevManualAndSmart): Promise<void>;
|
52
|
+
type OpenDeviceOnlySearchConfigGwSub = {
|
53
|
+
gwId?: string;
|
54
|
+
} & ICommon;
|
55
|
+
/**
|
56
|
+
* 搜索网关子设备
|
57
|
+
*/
|
58
|
+
export declare function openDeviceOnlySearchConfigGwSub(params?: OpenDeviceOnlySearchConfigGwSub): Promise<void>;
|
106
59
|
export {};
|
@@ -29,33 +29,6 @@ export function openGuideScene(params) {
|
|
29
29
|
export function openConfigDevice(params) {
|
30
30
|
return nativeRouter('config_device', params);
|
31
31
|
}
|
32
|
-
/**
|
33
|
-
* 跳转到app家庭成员添加页面
|
34
|
-
* @param params { homeId?: string }
|
35
|
-
* @returns
|
36
|
-
*/
|
37
|
-
export function openFamilyAddMember(params) {
|
38
|
-
return nativeRouter('tysh_family_add_member_rn', params);
|
39
|
-
}
|
40
|
-
/**
|
41
|
-
* 跳转设备详情
|
42
|
-
* @param params { devId?: string }
|
43
|
-
* @returns
|
44
|
-
*/
|
45
|
-
export function openDeviceDetail(params) {
|
46
|
-
return nativeRouter('device_detail', params);
|
47
|
-
}
|
48
|
-
|
49
|
-
// 搜索子设备 device_only_search_config_gw_sub
|
50
|
-
|
51
|
-
/**
|
52
|
-
* 搜索子设备
|
53
|
-
* @param params {gwId?: string}
|
54
|
-
* @returns
|
55
|
-
*/
|
56
|
-
export function openDeviceOnlySearchConfigGwSub(params) {
|
57
|
-
return nativeRouter('device_only_search_config_gw_sub', params);
|
58
|
-
}
|
59
32
|
|
60
33
|
// dev_network_check
|
61
34
|
|
@@ -68,24 +41,6 @@ export function openDevNetworkCheck(params) {
|
|
68
41
|
return nativeRouter('dev_network_check', params);
|
69
42
|
}
|
70
43
|
|
71
|
-
// device_gw_sub_device_help_list
|
72
|
-
|
73
|
-
/**
|
74
|
-
* 跳转配网帮助列表
|
75
|
-
*/
|
76
|
-
export function openDeviceGwSubDeviceHelpList(params) {
|
77
|
-
return nativeRouter('device_gw_sub_device_help_list', params);
|
78
|
-
}
|
79
|
-
|
80
|
-
// upgrade_detail
|
81
|
-
|
82
|
-
/**
|
83
|
-
* 跳转设备升级详情
|
84
|
-
*/
|
85
|
-
export function openUpgradeDetail(params) {
|
86
|
-
return nativeRouter('upgrade_detail', params);
|
87
|
-
}
|
88
|
-
|
89
44
|
// 跳转场景 smartScene
|
90
45
|
|
91
46
|
/**
|
@@ -95,20 +50,20 @@ export function openSmartScene(params) {
|
|
95
50
|
return nativeRouter('smartScene', params);
|
96
51
|
}
|
97
52
|
|
98
|
-
//
|
53
|
+
// 打开 “一键执行”和“自动化” devManualAndSmart
|
99
54
|
|
100
55
|
/**
|
101
|
-
*
|
56
|
+
* 打开 “一键执行”和“自动化”
|
102
57
|
*/
|
103
|
-
export function
|
104
|
-
return nativeRouter('
|
58
|
+
export function openDevManualAndSmart(params) {
|
59
|
+
return nativeRouter('devManualAndSmart', params);
|
105
60
|
}
|
106
61
|
|
107
|
-
//
|
62
|
+
// device_only_search_config_gw_sub
|
108
63
|
|
109
64
|
/**
|
110
|
-
*
|
65
|
+
* 搜索网关子设备
|
111
66
|
*/
|
112
|
-
export function
|
113
|
-
return nativeRouter('
|
67
|
+
export function openDeviceOnlySearchConfigGwSub(params) {
|
68
|
+
return nativeRouter('device_only_search_config_gw_sub', params);
|
114
69
|
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import { ICommon } from './common';
|
2
|
+
type OpenIpcCameraPlayBack = {} & ICommon;
|
3
|
+
/**
|
4
|
+
* 打开IPC回访页
|
5
|
+
* @param params {}
|
6
|
+
* @returns
|
7
|
+
*/
|
8
|
+
export declare function openIpcCameraPlayBack(params?: OpenIpcCameraPlayBack): Promise<void>;
|
9
|
+
type OpenIpcCameraAlbum = {} & ICommon;
|
10
|
+
/**
|
11
|
+
* 打开IPC相册页
|
12
|
+
* @param params {}
|
13
|
+
* @returns
|
14
|
+
*/
|
15
|
+
export declare function openIpcCameraAlbum(params?: OpenIpcCameraAlbum): Promise<void>;
|
16
|
+
type OpenIpcCameraCloud = {} & ICommon;
|
17
|
+
/**
|
18
|
+
* 打开IPC云存储页
|
19
|
+
* @param params {}
|
20
|
+
* @returns
|
21
|
+
*/
|
22
|
+
export declare function openIpcCameraCloud(params?: OpenIpcCameraCloud): Promise<void>;
|
23
|
+
type OpenIpcCameraModeSetting = {} & ICommon;
|
24
|
+
/**
|
25
|
+
* 打开IPC布撤防模式
|
26
|
+
* @param params {}
|
27
|
+
* @returns
|
28
|
+
*/
|
29
|
+
export declare function openIpcModeSetting(params?: OpenIpcCameraModeSetting): Promise<void>;
|
30
|
+
export {};
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import { nativeRouter } from './common';
|
2
|
+
|
3
|
+
// 打开IPC回访页 camera_playback_panel
|
4
|
+
|
5
|
+
/**
|
6
|
+
* 打开IPC回访页
|
7
|
+
* @param params {}
|
8
|
+
* @returns
|
9
|
+
*/
|
10
|
+
export function openIpcCameraPlayBack(params) {
|
11
|
+
return nativeRouter('camera_playback_panel', params);
|
12
|
+
}
|
13
|
+
// 打开IPC相册页 ipc_album_panel
|
14
|
+
|
15
|
+
/**
|
16
|
+
* 打开IPC相册页
|
17
|
+
* @param params {}
|
18
|
+
* @returns
|
19
|
+
*/
|
20
|
+
export function openIpcCameraAlbum(params) {
|
21
|
+
return nativeRouter('ipc_album_panel', params);
|
22
|
+
}
|
23
|
+
|
24
|
+
// 打开IPC云存储页 camera_cloud_panel
|
25
|
+
|
26
|
+
/**
|
27
|
+
* 打开IPC云存储页
|
28
|
+
* @param params {}
|
29
|
+
* @returns
|
30
|
+
*/
|
31
|
+
export function openIpcCameraCloud(params) {
|
32
|
+
return nativeRouter('camera_cloud_panel', params);
|
33
|
+
}
|
34
|
+
|
35
|
+
// 打开IPC布撤防模式 camera_mode_setting
|
36
|
+
|
37
|
+
/**
|
38
|
+
* 打开IPC布撤防模式
|
39
|
+
* @param params {}
|
40
|
+
* @returns
|
41
|
+
*/
|
42
|
+
export function openIpcModeSetting(params) {
|
43
|
+
return nativeRouter('modeSetting', params);
|
44
|
+
}
|
@@ -12,7 +12,7 @@ type OpenAdditionalUnlockMethodsParams = {
|
|
12
12
|
devId?: string;
|
13
13
|
} & ICommon;
|
14
14
|
/**
|
15
|
-
*
|
15
|
+
* 打开车辆解锁方式页面
|
16
16
|
* @param params {devId: string}
|
17
17
|
* @returns
|
18
18
|
*/
|
@@ -40,8 +40,8 @@ type OpenOutdoorConfigDeviceHomeParams = {
|
|
40
40
|
} & ICommon;
|
41
41
|
/**
|
42
42
|
* 打开配网
|
43
|
-
* @param params {
|
43
|
+
* @param params {productId: string}
|
44
44
|
* @returns
|
45
45
|
*/
|
46
|
-
export declare function openOutdoorConfigDeviceHome(params
|
46
|
+
export declare function openOutdoorConfigDeviceHome(params: OpenOutdoorConfigDeviceHomeParams): Promise<void>;
|
47
47
|
export {};
|
@@ -5,10 +5,10 @@ import { nativeRouter } from './common';
|
|
5
5
|
* @returns
|
6
6
|
*/
|
7
7
|
export function openOutdoorCyclingNavigation(params) {
|
8
|
-
return nativeRouter('
|
8
|
+
return nativeRouter('tsod_cycling_navigation', params);
|
9
9
|
}
|
10
10
|
/**
|
11
|
-
*
|
11
|
+
* 打开车辆解锁方式页面
|
12
12
|
* @param params {devId: string}
|
13
13
|
* @returns
|
14
14
|
*/
|
@@ -21,7 +21,7 @@ export function openAdditionalUnlockMethods(params) {
|
|
21
21
|
* @returns
|
22
22
|
*/
|
23
23
|
export function openOutdoorAmbientLighting(params) {
|
24
|
-
return nativeRouter('
|
24
|
+
return nativeRouter('tsod_ambient_lighting', params);
|
25
25
|
}
|
26
26
|
/**
|
27
27
|
* 打开Siri页面,仅iOS
|
@@ -29,13 +29,13 @@ export function openOutdoorAmbientLighting(params) {
|
|
29
29
|
* @returns
|
30
30
|
*/
|
31
31
|
export function openOutdoorShortcutSiri(params) {
|
32
|
-
return nativeRouter('
|
32
|
+
return nativeRouter('tsod_shortcut_siri', params);
|
33
33
|
}
|
34
34
|
/**
|
35
35
|
* 打开配网
|
36
|
-
* @param params {
|
36
|
+
* @param params {productId: string}
|
37
37
|
* @returns
|
38
38
|
*/
|
39
39
|
export function openOutdoorConfigDeviceHome(params) {
|
40
|
-
return nativeRouter('
|
40
|
+
return nativeRouter('config_device_home', params);
|
41
41
|
}
|
@@ -21,30 +21,11 @@ type OpenMoreService = {} & ICommon;
|
|
21
21
|
* 跳转到更多服务
|
22
22
|
*/
|
23
23
|
export declare function openMoreService(params?: OpenMoreService): Promise<void>;
|
24
|
-
type
|
25
|
-
devId?: string;
|
26
|
-
} & ICommon;
|
27
|
-
/**
|
28
|
-
* 跳转到帮助中心
|
29
|
-
*/
|
30
|
-
export declare function openAppHelpCenter(params?: OpenHelpCenter): Promise<void>;
|
31
|
-
type OpenUserSetting = {} & ICommon;
|
32
|
-
/**
|
33
|
-
* 跳转到用户设置
|
34
|
-
*/
|
35
|
-
export declare function openUserSetting(params?: OpenUserSetting): Promise<void>;
|
36
|
-
type OpenFamilySetting = {
|
37
|
-
homeId: string;
|
38
|
-
} & ICommon;
|
39
|
-
/**
|
40
|
-
* 跳转到家庭设置
|
41
|
-
*/
|
42
|
-
export declare function openFamilySetting(params?: OpenFamilySetting): Promise<void>;
|
43
|
-
type OpenJumpHome = {} & ICommon;
|
24
|
+
type OpenAppHelpCenter = {} & ICommon;
|
44
25
|
/**
|
45
|
-
*
|
26
|
+
* 跳转到App帮助与反馈页
|
46
27
|
*/
|
47
|
-
export declare function
|
28
|
+
export declare function openAppHelpCenter(params?: OpenAppHelpCenter): Promise<void>;
|
48
29
|
type OpenMessageCenter = {
|
49
30
|
category?: 0 | 1 | 2;
|
50
31
|
} & ICommon;
|
@@ -52,4 +33,9 @@ type OpenMessageCenter = {
|
|
52
33
|
* 跳转到消息中心
|
53
34
|
*/
|
54
35
|
export declare function openMessageCenter(params?: OpenMessageCenter): Promise<void>;
|
36
|
+
type OpenCompleteUserInfo = {} & ICommon;
|
37
|
+
/**
|
38
|
+
* 完善用户信息
|
39
|
+
*/
|
40
|
+
export declare function openCompleteUserInfo(params?: OpenCompleteUserInfo): Promise<void>;
|
55
41
|
export {};
|
@@ -28,44 +28,26 @@ export function openMoreService(params) {
|
|
28
28
|
// helpCenter
|
29
29
|
|
30
30
|
/**
|
31
|
-
*
|
31
|
+
* 跳转到App帮助与反馈页
|
32
32
|
*/
|
33
33
|
export function openAppHelpCenter(params) {
|
34
34
|
return nativeRouter('helpCenter', params);
|
35
35
|
}
|
36
36
|
|
37
|
-
//
|
38
|
-
|
39
|
-
/**
|
40
|
-
* 跳转到用户设置
|
41
|
-
*/
|
42
|
-
export function openUserSetting(params) {
|
43
|
-
return nativeRouter('ty_user_setting', params);
|
44
|
-
}
|
45
|
-
|
46
|
-
// tysh_family_setting
|
47
|
-
|
48
|
-
/**
|
49
|
-
* 跳转到家庭设置
|
50
|
-
*/
|
51
|
-
export function openFamilySetting(params) {
|
52
|
-
return nativeRouter('tysh_family_setting', params);
|
53
|
-
}
|
54
|
-
|
55
|
-
// jumpHome
|
37
|
+
// messageCenter
|
56
38
|
|
57
39
|
/**
|
58
|
-
*
|
40
|
+
* 跳转到消息中心
|
59
41
|
*/
|
60
|
-
export function
|
61
|
-
return nativeRouter('
|
42
|
+
export function openMessageCenter(params) {
|
43
|
+
return nativeRouter('messageCenter', params);
|
62
44
|
}
|
63
45
|
|
64
|
-
//
|
46
|
+
// 完善用户信息 complete_user_information
|
65
47
|
|
66
48
|
/**
|
67
|
-
*
|
49
|
+
* 完善用户信息
|
68
50
|
*/
|
69
|
-
export function
|
70
|
-
return nativeRouter('
|
51
|
+
export function openCompleteUserInfo(params) {
|
52
|
+
return nativeRouter('complete_user_information', params);
|
71
53
|
}
|
package/lib/viewAPI.d.ts
CHANGED
@@ -12,3 +12,4 @@ export declare const createNativeVideoContext: typeof ty.createNativeVideoContex
|
|
12
12
|
export declare const createMapContext: typeof ty.createMapContext;
|
13
13
|
export declare const createIpcPlayerContext: typeof ty.createIpcPlayerContext;
|
14
14
|
export declare const createCameraContext: typeof ty.createCameraContext;
|
15
|
+
export declare const createWebviewContext: typeof ty.createWebviewContext;
|
package/lib/viewAPI.js
CHANGED
@@ -13,4 +13,5 @@ export const createVideoContext = factory('createVideoContext');
|
|
13
13
|
export const createNativeVideoContext = factory('createNativeVideoContext');
|
14
14
|
export const createMapContext = factory('createMapContext');
|
15
15
|
export const createIpcPlayerContext = factory('createIpcPlayerContext');
|
16
|
-
export const createCameraContext = factory('createCameraContext');
|
16
|
+
export const createCameraContext = factory('createCameraContext');
|
17
|
+
export const createWebviewContext = factory('createWebviewContext');
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ray-js/api",
|
3
|
-
"version": "1.4.
|
3
|
+
"version": "1.4.49",
|
4
4
|
"description": "Ray universal api",
|
5
5
|
"keywords": [
|
6
6
|
"ray"
|
@@ -29,14 +29,14 @@
|
|
29
29
|
"watch": "ray start --type=component"
|
30
30
|
},
|
31
31
|
"dependencies": {
|
32
|
-
"@ray-js/framework": "1.4.
|
33
|
-
"@ray-js/router": "1.4.
|
32
|
+
"@ray-js/framework": "1.4.49",
|
33
|
+
"@ray-js/router": "1.4.49",
|
34
34
|
"@ray-js/wechat": "^0.0.33",
|
35
35
|
"base64-browser": "^1.0.1",
|
36
36
|
"query-string": "^7.1.3"
|
37
37
|
},
|
38
38
|
"devDependencies": {
|
39
|
-
"@ray-js/cli": "1.4.
|
39
|
+
"@ray-js/cli": "1.4.49",
|
40
40
|
"art-template": "^4.13.2",
|
41
41
|
"fs-extra": "^10.1.0",
|
42
42
|
"miniprogram-api-typings": "^3.12.2",
|
@@ -46,5 +46,5 @@
|
|
46
46
|
"access": "public",
|
47
47
|
"registry": "https://registry.npmjs.org"
|
48
48
|
},
|
49
|
-
"gitHead": "
|
49
|
+
"gitHead": "f713bf263556c73672caf98970f5709cd925163e"
|
50
50
|
}
|