@ray-js/api 1.4.47 → 1.4.49

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.
@@ -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
  }
@@ -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
- // 面板设备离线-重新连接 device_offline_reconnect
53
+ // 打开 “一键执行”和“自动化” devManualAndSmart
99
54
 
100
55
  /**
101
- * 面板设备离线-重新连接
56
+ * 打开 “一键执行”和“自动化”
102
57
  */
103
- export function openDeviceOfflineReconnect(params) {
104
- return nativeRouter('device_offline_reconnect', params);
58
+ export function openDevManualAndSmart(params) {
59
+ return nativeRouter('devManualAndSmart', params);
105
60
  }
106
61
 
107
- // 打开 “一键执行”和“自动化” devManualAndSmart
62
+ // device_only_search_config_gw_sub
108
63
 
109
64
  /**
110
- * 打开 “一键执行”和“自动化”
65
+ * 搜索网关子设备
111
66
  */
112
- export function openDevManualAndSmart(params) {
113
- return nativeRouter('devManualAndSmart', params);
67
+ export function openDeviceOnlySearchConfigGwSub(params) {
68
+ return nativeRouter('device_only_search_config_gw_sub', params);
114
69
  }
@@ -1,3 +1,4 @@
1
1
  export * from './device';
2
2
  export * from './outdoors';
3
3
  export * from './root';
4
+ export * from './ipc';
@@ -1,3 +1,4 @@
1
1
  export * from './device';
2
2
  export * from './outdoors';
3
- export * from './root';
3
+ export * from './root';
4
+ export * from './ipc';
@@ -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 {devId: string}
43
+ * @param params {productId: string}
44
44
  * @returns
45
45
  */
46
- export declare function openOutdoorConfigDeviceHome(params?: OpenOutdoorConfigDeviceHomeParams): Promise<void>;
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('tsod_outdoor_cycling_navigation', params);
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('tsod_outdoor_ambient_lighting', params);
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('tsod_outdoor_shortcut_siri', params);
32
+ return nativeRouter('tsod_shortcut_siri', params);
33
33
  }
34
34
  /**
35
35
  * 打开配网
36
- * @param params {devId: string}
36
+ * @param params {productId: string}
37
37
  * @returns
38
38
  */
39
39
  export function openOutdoorConfigDeviceHome(params) {
40
- return nativeRouter('tsod_outdoor_config_device_home', params);
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 OpenHelpCenter = {
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 openJumpHome(params?: OpenJumpHome): Promise<void>;
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
- // ty_user_setting
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 openJumpHome(params) {
61
- return nativeRouter('jumpHome', params);
42
+ export function openMessageCenter(params) {
43
+ return nativeRouter('messageCenter', params);
62
44
  }
63
45
 
64
- // messageCenter
46
+ // 完善用户信息 complete_user_information
65
47
 
66
48
  /**
67
- * 跳转到消息中心
49
+ * 完善用户信息
68
50
  */
69
- export function openMessageCenter(params) {
70
- return nativeRouter('messageCenter', params);
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.47",
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.47",
33
- "@ray-js/router": "1.4.47",
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.47",
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": "aff8c7e09d9166412b41104b7dc31f2d7dda18a5"
49
+ "gitHead": "f713bf263556c73672caf98970f5709cd925163e"
50
50
  }