@ray-js/api 1.7.70 → 1.7.72
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/AIKit.d.ts +5509 -610
- package/@types/AIStreamKit.d.ts +2641 -0
- package/@types/AVideoKit.d.ts +1827 -0
- package/@types/BaseKit.d.ts +8682 -1893
- package/@types/BizKit.d.ts +6639 -1038
- package/@types/CategoryCommonBizKit.d.ts +1459 -0
- package/@types/CommunityKit.d.ts +154 -0
- package/@types/DeviceKit.d.ts +18475 -5662
- package/@types/GroupCITestKit.d.ts +651 -0
- package/@types/HealthKit.d.ts +2290 -357
- package/@types/HomeKit.d.ts +4068 -182
- package/@types/IPCKit.d.ts +4327 -1227
- package/@types/LightKit.d.ts +125 -0
- package/@types/MapKit.d.ts +1560 -204
- package/@types/MediaKit.d.ts +136 -16
- package/@types/MediaPlayerKit.d.ts +47 -0
- package/@types/MiniKit.d.ts +2976 -628
- package/@types/OutdoorKit.d.ts +1337 -24
- package/@types/P2PKit.d.ts +622 -103
- package/@types/PayKit.d.ts +115 -0
- package/@types/PlayNetKit.d.ts +3454 -1309
- package/@types/SweeperKit.d.ts +154 -0
- package/@types/ThirdAuthKit.d.ts +324 -0
- package/@types/ThirdPartyDeviceKit.d.ts +410 -0
- package/@types/WearKit.d.ts +10177 -375
- package/@types/gateway.d.ts +349 -61
- package/@types/health.d.ts +486 -304
- package/lib/AIKit-1.6.0.d.ts +265 -41
- package/lib/AIKit-1.6.0.js +374 -120
- package/lib/BaseKit-3.17.7.d.ts +704 -0
- package/lib/BaseKit-3.17.7.js +720 -1
- package/lib/BizKit-4.10.4.d.ts +336 -0
- package/lib/BizKit-4.10.4.js +342 -5
- package/lib/DeviceKit-4.13.1.d.ts +996 -0
- package/lib/DeviceKit-4.13.1.js +1247 -249
- package/lib/HealthKit-6.5.0.d.ts +210 -44
- package/lib/HealthKit-6.5.0.js +295 -128
- package/lib/HomeKit-3.1.4.d.ts +20 -6
- package/lib/HomeKit-3.1.4.js +29 -14
- package/lib/IPCKit-6.4.5.d.ts +375 -77
- package/lib/IPCKit-6.4.5.js +525 -228
- package/lib/MapKit-3.4.13.d.ts +70 -16
- package/lib/MapKit-3.4.13.js +98 -47
- package/lib/MediaKit-3.4.1.d.ts +5 -3
- package/lib/MediaKit-3.4.1.js +7 -6
- package/lib/MiniKit-3.14.1.d.ts +300 -0
- package/lib/MiniKit-3.14.1.js +302 -0
- package/lib/OutdoorKit-1.0.4.d.ts +55 -13
- package/lib/OutdoorKit-1.0.4.js +78 -35
- package/lib/P2PKit-2.0.3.d.ts +125 -27
- package/lib/P2PKit-2.0.3.js +175 -78
- package/lib/PlayNetKit-1.3.30.d.ts +290 -60
- package/lib/PlayNetKit-1.3.30.js +407 -176
- package/lib/WearKit-1.1.6.d.ts +125 -27
- package/lib/WearKit-1.1.6.js +176 -77
- package/lib/all-kits.d.ts +10 -10
- package/lib/all-kits.js +10 -10
- package/lib/cloud/core.d.ts +31 -1
- package/lib/cloud/core.js +31 -1
- package/lib/cloud/device.d.ts +155 -24
- package/lib/cloud/device.js +153 -22
- package/lib/cloud/gateway.d.ts +254 -0
- package/lib/cloud/gateway.js +269 -9
- package/lib/cloud/health.d.ts +1 -0
- package/lib/cloud/health.js +121 -0
- package/lib/cloud/interface.d.ts +222 -44
- package/lib/cloud/interface.js +15 -2
- package/lib/cloud/laser-clean/deleteCleaningRecord/index.d.ts +27 -0
- package/lib/cloud/laser-clean/deleteCleaningRecord/index.js +28 -0
- package/lib/cloud/laser-clean/deleteCleaningRecord/type.d.ts +7 -0
- package/lib/cloud/laser-clean/deleteCleaningRecord/type.js +1 -0
- package/lib/cloud/laser-clean/deleteGyroCleanRecord/index.d.ts +27 -0
- package/lib/cloud/laser-clean/deleteGyroCleanRecord/index.js +28 -0
- package/lib/cloud/laser-clean/deleteGyroCleanRecord/type.d.ts +7 -0
- package/lib/cloud/laser-clean/deleteGyroCleanRecord/type.js +1 -0
- package/lib/cloud/laser-clean/deleteMultipleMapFiles/index.d.ts +27 -0
- package/lib/cloud/laser-clean/deleteMultipleMapFiles/index.js +28 -0
- package/lib/cloud/laser-clean/deleteMultipleMapFiles/type.d.ts +7 -0
- package/lib/cloud/laser-clean/deleteMultipleMapFiles/type.js +1 -0
- package/lib/cloud/laser-clean/getCleaningRecords/index.d.ts +30 -0
- package/lib/cloud/laser-clean/getCleaningRecords/index.js +31 -0
- package/lib/cloud/laser-clean/getCleaningRecords/type.d.ts +39 -0
- package/lib/cloud/laser-clean/getCleaningRecords/type.js +1 -0
- package/lib/cloud/laser-clean/getGyroCleanRecordDetail/index.d.ts +29 -0
- package/lib/cloud/laser-clean/getGyroCleanRecordDetail/index.js +30 -0
- package/lib/cloud/laser-clean/getGyroCleanRecordDetail/type.d.ts +30 -0
- package/lib/cloud/laser-clean/getGyroCleanRecordDetail/type.js +1 -0
- package/lib/cloud/laser-clean/getGyroCleanRecords/index.d.ts +29 -0
- package/lib/cloud/laser-clean/getGyroCleanRecords/index.js +30 -0
- package/lib/cloud/laser-clean/getGyroCleanRecords/type.d.ts +35 -0
- package/lib/cloud/laser-clean/getGyroCleanRecords/type.js +1 -0
- package/lib/cloud/laser-clean/getGyroLatestCleanMap/index.d.ts +28 -0
- package/lib/cloud/laser-clean/getGyroLatestCleanMap/index.js +29 -0
- package/lib/cloud/laser-clean/getGyroLatestCleanMap/type.d.ts +28 -0
- package/lib/cloud/laser-clean/getGyroLatestCleanMap/type.js +1 -0
- package/lib/cloud/laser-clean/getMultipleMapFiles/index.d.ts +24 -0
- package/lib/cloud/laser-clean/getMultipleMapFiles/index.js +25 -0
- package/lib/cloud/laser-clean/getMultipleMapFiles/type.d.ts +29 -0
- package/lib/cloud/laser-clean/getMultipleMapFiles/type.js +1 -0
- package/lib/cloud/laser-clean/getSweeperStorageConfig/index.d.ts +24 -0
- package/lib/cloud/laser-clean/getSweeperStorageConfig/index.js +25 -0
- package/lib/cloud/laser-clean/getSweeperStorageConfig/type.d.ts +26 -0
- package/lib/cloud/laser-clean/getSweeperStorageConfig/type.js +1 -0
- package/lib/cloud/laser-clean/getVoiceList/index.d.ts +28 -0
- package/lib/cloud/laser-clean/getVoiceList/index.js +29 -0
- package/lib/cloud/laser-clean/getVoiceList/type.d.ts +48 -0
- package/lib/cloud/laser-clean/getVoiceList/type.js +1 -0
- package/lib/cloud/laser-clean/index.d.ts +1 -1
- package/lib/cloud/laser-clean/index.js +1 -1
- package/lib/cloud/laser-clean/map.d.ts +5 -7
- package/lib/cloud/laser-clean/map.js +5 -9
- package/lib/cloud/laser-clean/record.d.ts +5 -6
- package/lib/cloud/laser-clean/record.js +5 -7
- package/lib/cloud/laser-clean/renameHistoryMap/index.d.ts +28 -0
- package/lib/cloud/laser-clean/renameHistoryMap/index.js +29 -0
- package/lib/cloud/laser-clean/renameHistoryMap/type.d.ts +9 -0
- package/lib/cloud/laser-clean/renameHistoryMap/type.js +1 -0
- package/lib/cloud/laser-clean/voice.d.ts +1 -3
- package/lib/cloud/laser-clean/voice.js +1 -4
- package/lib/cloud/linkage.d.ts +271 -53
- package/lib/cloud/linkage.js +256 -51
- package/lib/cloud/remoteGroup.d.ts +37 -0
- package/lib/cloud/remoteGroup.js +37 -0
- package/lib/cloud/timer.d.ts +104 -26
- package/lib/cloud/timer.js +104 -26
- package/lib/getApp/index.thing.d.ts +47 -1
- package/lib/getApp/index.thing.js +40 -2
- package/lib/getBoundingClientRect/index.thing.d.ts +101 -1
- package/lib/getBoundingClientRect/index.thing.js +59 -0
- package/lib/getCurrentPages/index.thing.d.ts +40 -15
- package/lib/getCurrentPages/index.thing.js +36 -15
- package/lib/getCustomConfig/index.d.ts +5 -2
- package/lib/getCustomConfig/index.thing.d.ts +68 -2
- package/lib/getCustomConfig/index.thing.js +62 -0
- package/lib/getCustomConfig/index.wechat.d.ts +5 -2
- package/lib/getCustomConfig/type.d.ts +26 -15
- package/lib/getElementById/index.thing.d.ts +42 -1
- package/lib/getElementById/index.thing.js +40 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +4 -2
- package/lib/nativeRouters/common.d.ts +8 -0
- package/lib/nativeRouters/device.d.ts +137 -5
- package/lib/nativeRouters/device.js +138 -6
- package/lib/nativeRouters/gw.d.ts +58 -8
- package/lib/nativeRouters/gw.js +57 -8
- package/lib/nativeRouters/outdoors.d.ts +16 -3
- package/lib/nativeRouters/outdoors.js +16 -3
- package/lib/nativeRouters/remoteGroup.d.ts +23 -0
- package/lib/nativeRouters/remoteGroup.js +23 -0
- package/lib/nativeRouters/root.d.ts +19 -0
- package/lib/nativeRouters/root.js +17 -0
- package/lib/openGroupCreate/index.d.ts +45 -0
- package/lib/openGroupCreate/index.js +32 -0
- package/package.json +5 -5
package/lib/nativeRouters/gw.js
CHANGED
|
@@ -1,26 +1,75 @@
|
|
|
1
1
|
import { nativeRouter } from './common';
|
|
2
2
|
/**
|
|
3
3
|
* 打开 ZigBee 网关面板配网子设备(旧版)
|
|
4
|
-
* @param params
|
|
5
|
-
* @
|
|
4
|
+
* @param params - 网关参数
|
|
5
|
+
* @param params.gwId 网关 ID
|
|
6
|
+
* @returns void
|
|
7
|
+
* @public
|
|
8
|
+
* @since @ray-js/ray 1.7.60
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* import { openPresentGatewayCategroy } from '@ray-js/ray';
|
|
12
|
+
*
|
|
13
|
+
* const openGatewayCategory = async () => {
|
|
14
|
+
* try {
|
|
15
|
+
* await openPresentGatewayCategroy({ gwId: 'gateway_001' });
|
|
16
|
+
* console.log('已打开网关配网子设备页面');
|
|
17
|
+
* } catch (err) {
|
|
18
|
+
* console.error('打开失败:', err);
|
|
19
|
+
* }
|
|
20
|
+
* };
|
|
21
|
+
* ```
|
|
22
|
+
* @deprecated 请使用 openDeviceGWSubSearchConfigure 代替
|
|
6
23
|
*/
|
|
7
24
|
export function openPresentGatewayCategroy(params) {
|
|
8
25
|
return nativeRouter('presentGatewayCategroy', params);
|
|
9
26
|
}
|
|
10
27
|
|
|
11
28
|
/**
|
|
12
|
-
*
|
|
13
|
-
* @param params
|
|
14
|
-
* @
|
|
29
|
+
* 打开网关面板搜索配网页面,用于搜索并添加子设备
|
|
30
|
+
* @param params - 网关参数
|
|
31
|
+
* @param params.gwId 网关 ID
|
|
32
|
+
* @returns void
|
|
33
|
+
* @public
|
|
34
|
+
* @since @ray-js/ray 1.7.60
|
|
35
|
+
* @example
|
|
36
|
+
* ```typescript
|
|
37
|
+
* import { openDeviceGWSubSearchConfigure } from '@ray-js/ray';
|
|
38
|
+
*
|
|
39
|
+
* const openSearchPage = async () => {
|
|
40
|
+
* try {
|
|
41
|
+
* await openDeviceGWSubSearchConfigure({ gwId: 'gateway_001' });
|
|
42
|
+
* console.log('已打开搜索配网页面');
|
|
43
|
+
* } catch (err) {
|
|
44
|
+
* console.error('打开失败:', err);
|
|
45
|
+
* }
|
|
46
|
+
* };
|
|
47
|
+
* ```
|
|
15
48
|
*/
|
|
16
49
|
export function openDeviceGWSubSearchConfigure(params) {
|
|
17
50
|
return nativeRouter('device_only_search_config_gw_sub', params);
|
|
18
51
|
}
|
|
19
52
|
|
|
20
53
|
/**
|
|
21
|
-
*
|
|
22
|
-
* @param params
|
|
23
|
-
* @
|
|
54
|
+
* 打开网关面板配网子设备帮助列表页面
|
|
55
|
+
* @param params - 网关参数
|
|
56
|
+
* @param params.gwId 网关 ID
|
|
57
|
+
* @returns void
|
|
58
|
+
* @public
|
|
59
|
+
* @since @ray-js/ray 1.7.60
|
|
60
|
+
* @example
|
|
61
|
+
* ```typescript
|
|
62
|
+
* import { openDeviceGWSubHelpList } from '@ray-js/ray';
|
|
63
|
+
*
|
|
64
|
+
* const openHelpList = async () => {
|
|
65
|
+
* try {
|
|
66
|
+
* await openDeviceGWSubHelpList({ gwId: 'gateway_001' });
|
|
67
|
+
* console.log('已打开配网帮助列表');
|
|
68
|
+
* } catch (err) {
|
|
69
|
+
* console.error('打开失败:', err);
|
|
70
|
+
* }
|
|
71
|
+
* };
|
|
72
|
+
* ```
|
|
24
73
|
*/
|
|
25
74
|
export function openDeviceGWSubHelpList(params) {
|
|
26
75
|
return nativeRouter('device_gw_sub_device_help_list', params);
|
|
@@ -3,9 +3,22 @@ type OpenOutdoorCyclingNavigationParams = {
|
|
|
3
3
|
devId?: string;
|
|
4
4
|
} & ICommon;
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* @
|
|
6
|
+
* 跳转骑行导航页面
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
* @since @ray-js/ray 1.4.29
|
|
10
|
+
* @param params - 请求参数
|
|
11
|
+
* @remarks 当前功能仅在智慧出行 App 开通使用,开发者工具环境无法使用,需要打包后或真机调试使用
|
|
12
|
+
* @example 基础用法
|
|
13
|
+
* ```ts
|
|
14
|
+
* import { openOutdoorCyclingNavigation } from '@ray-js/ray';
|
|
15
|
+
*
|
|
16
|
+
* openOutdoorCyclingNavigation({
|
|
17
|
+
* devId: 'your_device_id',
|
|
18
|
+
* }).then(() => {
|
|
19
|
+
* console.log('已跳转骑行导航页面');
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
9
22
|
*/
|
|
10
23
|
export declare function openOutdoorCyclingNavigation(params?: OpenOutdoorCyclingNavigationParams): Promise<void>;
|
|
11
24
|
type OpenAdditionalUnlockMethodsParams = {
|
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
import { nativeRouter } from './common';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* @
|
|
3
|
+
* 跳转骑行导航页面
|
|
4
|
+
*
|
|
5
|
+
* @public
|
|
6
|
+
* @since @ray-js/ray 1.4.29
|
|
7
|
+
* @param params - 请求参数
|
|
8
|
+
* @remarks 当前功能仅在智慧出行 App 开通使用,开发者工具环境无法使用,需要打包后或真机调试使用
|
|
9
|
+
* @example 基础用法
|
|
10
|
+
* ```ts
|
|
11
|
+
* import { openOutdoorCyclingNavigation } from '@ray-js/ray';
|
|
12
|
+
*
|
|
13
|
+
* openOutdoorCyclingNavigation({
|
|
14
|
+
* devId: 'your_device_id',
|
|
15
|
+
* }).then(() => {
|
|
16
|
+
* console.log('已跳转骑行导航页面');
|
|
17
|
+
* });
|
|
18
|
+
* ```
|
|
6
19
|
*/
|
|
7
20
|
export function openOutdoorCyclingNavigation(params) {
|
|
8
21
|
return nativeRouter('tsod_cycling_navigation', params);
|
|
@@ -18,5 +18,28 @@ type OpenZigbeeLocalGroupParams = {
|
|
|
18
18
|
*/
|
|
19
19
|
codes: string;
|
|
20
20
|
} & ICommon;
|
|
21
|
+
/**
|
|
22
|
+
* 跳转 Zigbee 遥控器群组配对页面
|
|
23
|
+
*
|
|
24
|
+
* @public
|
|
25
|
+
* @since @ray-js/ray 1.5.2
|
|
26
|
+
* @param params - 请求参数
|
|
27
|
+
* @remarks 当前仅针对 Zigbee 的部分品类开通了此类能力
|
|
28
|
+
* @example 基础用法
|
|
29
|
+
* ```ts
|
|
30
|
+
* import { openZigbeeLocalGroup } from '@ray-js/ray';
|
|
31
|
+
*
|
|
32
|
+
* openZigbeeLocalGroup({
|
|
33
|
+
* deviceId: 'your_device_id',
|
|
34
|
+
* localId: '1234',
|
|
35
|
+
* categoryCode: '7001',
|
|
36
|
+
* codes: 'dj',
|
|
37
|
+
* }).then(() => {
|
|
38
|
+
* console.log('已跳转群组配对页面');
|
|
39
|
+
* }).catch((err) => {
|
|
40
|
+
* console.error(err);
|
|
41
|
+
* });
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
21
44
|
export declare function openZigbeeLocalGroup(params?: OpenZigbeeLocalGroupParams): Promise<void>;
|
|
22
45
|
export {};
|
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import { nativeRouter } from './common';
|
|
3
|
+
/**
|
|
4
|
+
* 跳转 Zigbee 遥控器群组配对页面
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
* @since @ray-js/ray 1.5.2
|
|
8
|
+
* @param params - 请求参数
|
|
9
|
+
* @remarks 当前仅针对 Zigbee 的部分品类开通了此类能力
|
|
10
|
+
* @example 基础用法
|
|
11
|
+
* ```ts
|
|
12
|
+
* import { openZigbeeLocalGroup } from '@ray-js/ray';
|
|
13
|
+
*
|
|
14
|
+
* openZigbeeLocalGroup({
|
|
15
|
+
* deviceId: 'your_device_id',
|
|
16
|
+
* localId: '1234',
|
|
17
|
+
* categoryCode: '7001',
|
|
18
|
+
* codes: 'dj',
|
|
19
|
+
* }).then(() => {
|
|
20
|
+
* console.log('已跳转群组配对页面');
|
|
21
|
+
* }).catch((err) => {
|
|
22
|
+
* console.error(err);
|
|
23
|
+
* });
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
3
26
|
export function openZigbeeLocalGroup(params) {
|
|
4
27
|
const realParams = _objectSpread({}, params);
|
|
5
28
|
// 统一成 TTT 的 deviceId 写法,但实际入参为 devId
|
|
@@ -22,11 +22,30 @@ type OpenMoreService = {} & ICommon;
|
|
|
22
22
|
*/
|
|
23
23
|
export declare function openMoreService(params?: OpenMoreService): Promise<void>;
|
|
24
24
|
type OpenAppHelpCenter = {
|
|
25
|
+
/** 业务编码 */
|
|
25
26
|
bizCode?: string;
|
|
27
|
+
/** 页面标识 */
|
|
26
28
|
key?: string;
|
|
27
29
|
} & ICommon;
|
|
28
30
|
/**
|
|
29
31
|
* 跳转到App帮助与反馈页
|
|
32
|
+
* @param params - 帮助中心页面参数,可指定业务编码和页面标识
|
|
33
|
+
* @returns 跳转结果的 Promise,成功时 resolve,失败时 reject
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* openAppHelpCenter({
|
|
37
|
+
* bizCode: 'help_center',
|
|
38
|
+
* key: 'main_page',
|
|
39
|
+
* success() {
|
|
40
|
+
* console.log('跳转帮助中心成功');
|
|
41
|
+
* },
|
|
42
|
+
* fail(err) {
|
|
43
|
+
* console.log('跳转失败', err);
|
|
44
|
+
* },
|
|
45
|
+
* });
|
|
46
|
+
* ```
|
|
47
|
+
* @public
|
|
48
|
+
* @since @ray-js/ray 1.4.48
|
|
30
49
|
*/
|
|
31
50
|
export declare function openAppHelpCenter(params?: OpenAppHelpCenter): Promise<void>;
|
|
32
51
|
type OpenMessageCenter = {
|
|
@@ -32,6 +32,23 @@ export function openMoreService(params) {
|
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* 跳转到App帮助与反馈页
|
|
35
|
+
* @param params - 帮助中心页面参数,可指定业务编码和页面标识
|
|
36
|
+
* @returns 跳转结果的 Promise,成功时 resolve,失败时 reject
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* openAppHelpCenter({
|
|
40
|
+
* bizCode: 'help_center',
|
|
41
|
+
* key: 'main_page',
|
|
42
|
+
* success() {
|
|
43
|
+
* console.log('跳转帮助中心成功');
|
|
44
|
+
* },
|
|
45
|
+
* fail(err) {
|
|
46
|
+
* console.log('跳转失败', err);
|
|
47
|
+
* },
|
|
48
|
+
* });
|
|
49
|
+
* ```
|
|
50
|
+
* @public
|
|
51
|
+
* @since @ray-js/ray 1.4.48
|
|
35
52
|
*/
|
|
36
53
|
export function openAppHelpCenter(params) {
|
|
37
54
|
const _ref = params || {},
|
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
interface OpenGroupCreateParams {
|
|
2
|
+
/** 设备 ID */
|
|
2
3
|
deviceId: string;
|
|
4
|
+
/** 名称 */
|
|
3
5
|
name?: string;
|
|
6
|
+
/** 子功能显示类型 */
|
|
4
7
|
type?: string;
|
|
8
|
+
/** 子功能分组类型 */
|
|
5
9
|
optionType?: string;
|
|
10
|
+
/** 子功能来源 */
|
|
6
11
|
from?: 'RN' | '小程序' | 'APP';
|
|
12
|
+
/** 排序 */
|
|
7
13
|
order?: number;
|
|
14
|
+
/** 是否显示 */
|
|
8
15
|
isShow?: boolean;
|
|
16
|
+
/** 接口调用成功的回调函数 */
|
|
9
17
|
success?: () => void;
|
|
18
|
+
/** 接口调用失败的回调函数 */
|
|
10
19
|
fail?: (err?: {
|
|
11
20
|
errorMsg: string;
|
|
12
21
|
errorCode: string | number;
|
|
@@ -15,15 +24,51 @@ interface OpenGroupCreateParams {
|
|
|
15
24
|
errorMsg: string;
|
|
16
25
|
};
|
|
17
26
|
}) => void;
|
|
27
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
18
28
|
complete?: () => void;
|
|
19
29
|
}
|
|
20
30
|
interface OnOpenSubFunctionCallbackParams {
|
|
31
|
+
/** 回调数据 */
|
|
21
32
|
data: {
|
|
33
|
+
/** 群组创建结果,true 表示创建成功 */
|
|
22
34
|
groupCreateResult: boolean;
|
|
23
35
|
};
|
|
36
|
+
/** 子功能标识 */
|
|
24
37
|
id: 'group_create';
|
|
38
|
+
/** 是否隐藏 */
|
|
25
39
|
isHide: boolean;
|
|
26
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* 监听创建群组结果
|
|
43
|
+
* @param callback - 创建群组结果的回调函数
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* onOpenGroupCreate((res) => {
|
|
47
|
+
* console.log('群组创建结果:', res.data.groupCreateResult);
|
|
48
|
+
* });
|
|
49
|
+
* ```
|
|
50
|
+
* @public
|
|
51
|
+
* @since @ray-js/ray 1.4.21
|
|
52
|
+
*/
|
|
27
53
|
export declare function onOpenGroupCreate(callback: (res: OnOpenSubFunctionCallbackParams) => void): void;
|
|
54
|
+
/**
|
|
55
|
+
* 打开创建群组页面
|
|
56
|
+
* @param params - 创建群组的参数
|
|
57
|
+
* @returns 打开创建群组页面的 Promise,成功时 resolve,失败时 reject
|
|
58
|
+
* @example
|
|
59
|
+
* ```ts
|
|
60
|
+
* openGroupCreate({
|
|
61
|
+
* deviceId: 'xxxx',
|
|
62
|
+
* success() {
|
|
63
|
+
* console.log('打开创建群组页面成功');
|
|
64
|
+
* },
|
|
65
|
+
* fail(err) {
|
|
66
|
+
* console.log('打开创建群组页面失败', err);
|
|
67
|
+
* },
|
|
68
|
+
* });
|
|
69
|
+
* ```
|
|
70
|
+
* @public
|
|
71
|
+
* @since @ray-js/ray 1.4.20
|
|
72
|
+
*/
|
|
28
73
|
export declare function openGroupCreate(params: OpenGroupCreateParams): Promise<void>;
|
|
29
74
|
export {};
|
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
3
|
const _excluded = ["deviceId", "success", "fail", "complete"];
|
|
4
|
+
/**
|
|
5
|
+
* 监听创建群组结果
|
|
6
|
+
* @param callback - 创建群组结果的回调函数
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* onOpenGroupCreate((res) => {
|
|
10
|
+
* console.log('群组创建结果:', res.data.groupCreateResult);
|
|
11
|
+
* });
|
|
12
|
+
* ```
|
|
13
|
+
* @public
|
|
14
|
+
* @since @ray-js/ray 1.4.21
|
|
15
|
+
*/
|
|
4
16
|
export function onOpenGroupCreate(callback) {
|
|
5
17
|
ty.device.onSubFunctionDataChange(res => {
|
|
6
18
|
if (res.id === 'group_create') {
|
|
@@ -8,6 +20,26 @@ export function onOpenGroupCreate(callback) {
|
|
|
8
20
|
}
|
|
9
21
|
});
|
|
10
22
|
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* 打开创建群组页面
|
|
26
|
+
* @param params - 创建群组的参数
|
|
27
|
+
* @returns 打开创建群组页面的 Promise,成功时 resolve,失败时 reject
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* openGroupCreate({
|
|
31
|
+
* deviceId: 'xxxx',
|
|
32
|
+
* success() {
|
|
33
|
+
* console.log('打开创建群组页面成功');
|
|
34
|
+
* },
|
|
35
|
+
* fail(err) {
|
|
36
|
+
* console.log('打开创建群组页面失败', err);
|
|
37
|
+
* },
|
|
38
|
+
* });
|
|
39
|
+
* ```
|
|
40
|
+
* @public
|
|
41
|
+
* @since @ray-js/ray 1.4.20
|
|
42
|
+
*/
|
|
11
43
|
export function openGroupCreate(params) {
|
|
12
44
|
const {
|
|
13
45
|
deviceId,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ray-js/api",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.72",
|
|
4
4
|
"description": "Ray universal api",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ray"
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"watch": "ray start --type=component"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@ray-js/framework": "1.7.
|
|
33
|
-
"@ray-js/router": "1.7.
|
|
32
|
+
"@ray-js/framework": "1.7.72",
|
|
33
|
+
"@ray-js/router": "1.7.72",
|
|
34
34
|
"base64-browser": "^1.0.1",
|
|
35
35
|
"query-string": "^7.1.3"
|
|
36
36
|
},
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@ray-js/wechat": "^0.3.13"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@ray-js/cli": "1.7.
|
|
41
|
+
"@ray-js/cli": "1.7.72",
|
|
42
42
|
"art-template": "^4.13.4",
|
|
43
43
|
"fs-extra": "^10.1.0",
|
|
44
44
|
"miniprogram-api-typings": "^3.12.3",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"access": "public",
|
|
49
49
|
"registry": "https://registry.npmjs.org"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "06415e2d0f0de0a3f27af53a0fece495cf4d9078"
|
|
52
52
|
}
|