@ray-js/ray-ipc-utils 1.1.0-beta-6 → 1.1.0-beta-8
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/lib/index.d.ts +5 -5
- package/lib/kit/device/index.d.ts +2 -2
- package/lib/kit/device/index.js +6 -2
- package/lib/kit/ipc/index.d.ts +1 -1
- package/lib/kit/ipc/index.js +31 -11
- package/lib/service/index.d.ts +3 -3
- package/lib/service/index.js +1 -1
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
declare const IpcUtils: {
|
|
2
2
|
getCameraConfigInfo: <T>(deviceId: string) => Promise<IRes<T>>;
|
|
3
3
|
getCollectionPointsInfo: <T_1>(deviceId: string) => Promise<IRes<T_1>>;
|
|
4
|
-
updateCollectionPointsInfo: <T_2>(deviceId: string, id:
|
|
4
|
+
updateCollectionPointsInfo: <T_2>(deviceId: string, id: string, name: string) => Promise<IRes<T_2>>;
|
|
5
5
|
delCollectionPointsInfo: <T_3>(deviceId: string, pointData: [{
|
|
6
6
|
devId: string;
|
|
7
|
-
mpId:
|
|
7
|
+
mpId: string;
|
|
8
8
|
}]) => Promise<IRes<T_3>>;
|
|
9
9
|
addCollectionPointsInfo: <T_4>(deviceId: string, name: string) => Promise<IRes<T_4>>;
|
|
10
10
|
getServiceUrl: <T_5>(deviceId: string, serveType: import("./interface").ServeTpe, paramData?: Record<string, any>, action?: boolean, utm_rtid?: string) => Promise<IRes<T_5>>;
|
|
@@ -32,7 +32,7 @@ declare const IpcUtils: {
|
|
|
32
32
|
} | undefined, isGeneral?: false | undefined) => Promise<import("./kit/interface").IRes<T>>;
|
|
33
33
|
goToGeneralHelpMini: () => Promise<import("./kit/interface").IRes<T>>;
|
|
34
34
|
goToIpcHelpMini: (errCode: number, deviceId: string, helpNum: number, helpFeedBack: boolean, brandColor?: string) => Promise<import("./kit/interface").IRes<T>>;
|
|
35
|
-
|
|
35
|
+
getIsSupportedCloudStorageSync: (deviceId: string) => Promise<{
|
|
36
36
|
code: number;
|
|
37
37
|
data: boolean;
|
|
38
38
|
msg?: undefined;
|
|
@@ -41,8 +41,8 @@ declare const IpcUtils: {
|
|
|
41
41
|
data: boolean;
|
|
42
42
|
msg: string | boolean | import("./kit/interface").IApiError | undefined;
|
|
43
43
|
}>;
|
|
44
|
-
requestWifiSignal: <T_20>(deviceId: string, dps?: {}) => Promise<
|
|
45
|
-
wakeUpDevice: <T_21>(deviceId: string, dps?: {}) => Promise<
|
|
44
|
+
requestWifiSignal: <T_20>(deviceId: string, dps?: {}) => Promise<import("./kit/interface").IRes<T_20>>;
|
|
45
|
+
wakeUpDevice: <T_21>(deviceId: string, dps?: {}) => Promise<import("./kit/interface").IRes<T_21>>;
|
|
46
46
|
useTrafficViewTip: () => boolean;
|
|
47
47
|
};
|
|
48
48
|
export default IpcUtils;
|
|
@@ -5,11 +5,11 @@ import { IRes } from '../interface';
|
|
|
5
5
|
* @param dps 扩展参数
|
|
6
6
|
* @returns
|
|
7
7
|
*/
|
|
8
|
-
export declare const requestWifiSignal: <T>(deviceId: string, dps?: {}) => Promise<IRes
|
|
8
|
+
export declare const requestWifiSignal: <T>(deviceId: string, dps?: {}) => Promise<IRes<T>>;
|
|
9
9
|
/**
|
|
10
10
|
* IPC-低功耗唤醒:低功耗唤醒,唤醒门铃设备
|
|
11
11
|
* 需引入DeviceKit,且在>=3.1.0-ipcwake.1版本才可使用
|
|
12
12
|
* @param deviceId
|
|
13
13
|
* @returns
|
|
14
14
|
*/
|
|
15
|
-
export declare const wakeUpDevice: <T>(deviceId: string, dps?: {}) => Promise<IRes
|
|
15
|
+
export declare const wakeUpDevice: <T>(deviceId: string, dps?: {}) => Promise<IRes<T>>;
|
package/lib/kit/device/index.js
CHANGED
|
@@ -12,12 +12,14 @@ export const requestWifiSignal = function (deviceId) {
|
|
|
12
12
|
deviceId,
|
|
13
13
|
dps: dps,
|
|
14
14
|
success: res => {
|
|
15
|
+
console.log('res===requestWifiSignal success', res);
|
|
15
16
|
resolve({
|
|
16
17
|
code: 0,
|
|
17
18
|
data: res
|
|
18
19
|
});
|
|
19
20
|
},
|
|
20
21
|
fail: err => {
|
|
22
|
+
console.log('res===requestWifiSignal err', err);
|
|
21
23
|
resolve({
|
|
22
24
|
code: -1,
|
|
23
25
|
msg: err
|
|
@@ -47,14 +49,16 @@ export const wakeUpDevice = function (deviceId) {
|
|
|
47
49
|
deviceId,
|
|
48
50
|
dps: dps,
|
|
49
51
|
success: res => {
|
|
52
|
+
console.log('res===wakeUpDevice success', res);
|
|
50
53
|
resolve({
|
|
51
54
|
data: res
|
|
52
55
|
});
|
|
53
56
|
},
|
|
54
|
-
fail:
|
|
57
|
+
fail: err => {
|
|
58
|
+
console.log('res===wakeUpDevice err', err);
|
|
55
59
|
resolve({
|
|
56
60
|
code: -1,
|
|
57
|
-
msg:
|
|
61
|
+
msg: err
|
|
58
62
|
});
|
|
59
63
|
}
|
|
60
64
|
});
|
package/lib/kit/ipc/index.d.ts
CHANGED
|
@@ -127,7 +127,7 @@ export declare const goToIpcHelpMini: (errCode: number, deviceId: string, helpNu
|
|
|
127
127
|
* @param deviceId 设备id
|
|
128
128
|
* @returns true/false
|
|
129
129
|
*/
|
|
130
|
-
export declare const
|
|
130
|
+
export declare const getIsSupportedCloudStorageSync: (deviceId: string) => Promise<{
|
|
131
131
|
code: number;
|
|
132
132
|
data: boolean;
|
|
133
133
|
msg?: undefined;
|
package/lib/kit/ipc/index.js
CHANGED
|
@@ -297,11 +297,14 @@ export const getVideoBitrateKbps = function (deviceId) {
|
|
|
297
297
|
deviceId,
|
|
298
298
|
extendParam: extendParam,
|
|
299
299
|
success: res => {
|
|
300
|
+
console.log('res===getVideoBitrateKbps success', res);
|
|
300
301
|
resolve({
|
|
302
|
+
code: 0,
|
|
301
303
|
data: res
|
|
302
304
|
});
|
|
303
305
|
},
|
|
304
306
|
fail: err => {
|
|
307
|
+
console.log('res===getVideoBitrateKbps err', err);
|
|
305
308
|
resolve({
|
|
306
309
|
code: -1,
|
|
307
310
|
msg: err
|
|
@@ -338,14 +341,17 @@ export const getMobileOrientation = () => {
|
|
|
338
341
|
const {
|
|
339
342
|
deviceOrientation = ''
|
|
340
343
|
} = res;
|
|
344
|
+
console.log('res===getMobileOrientation success', deviceOrientation);
|
|
341
345
|
resolve({
|
|
346
|
+
code: 0,
|
|
342
347
|
data: deviceOrientation
|
|
343
348
|
});
|
|
344
349
|
},
|
|
345
|
-
fail:
|
|
350
|
+
fail: err => {
|
|
351
|
+
console.log('res===getMobileOrientation err', err);
|
|
346
352
|
resolve({
|
|
347
353
|
code: -1,
|
|
348
|
-
msg:
|
|
354
|
+
msg: err
|
|
349
355
|
});
|
|
350
356
|
}
|
|
351
357
|
});
|
|
@@ -403,14 +409,17 @@ export const setScreenOrientation = pageOrientation => {
|
|
|
403
409
|
ty.setPageOrientation({
|
|
404
410
|
pageOrientation: pageOrientation,
|
|
405
411
|
success: res => {
|
|
412
|
+
console.log('res===setScreenOrientation success', res);
|
|
406
413
|
resolve({
|
|
414
|
+
code: 0,
|
|
407
415
|
data: res
|
|
408
416
|
});
|
|
409
417
|
},
|
|
410
|
-
fail:
|
|
418
|
+
fail: err => {
|
|
419
|
+
console.log('res===setScreenOrientation err', err);
|
|
411
420
|
resolve({
|
|
412
421
|
code: -1,
|
|
413
|
-
msg:
|
|
422
|
+
msg: err
|
|
414
423
|
});
|
|
415
424
|
}
|
|
416
425
|
});
|
|
@@ -437,14 +446,17 @@ export const isSupportFloatWindow = function (deviceId) {
|
|
|
437
446
|
deviceId,
|
|
438
447
|
extendParam: extendParam,
|
|
439
448
|
success: res => {
|
|
449
|
+
console.log('res===isSupportFloatWindow success', res);
|
|
440
450
|
resolve({
|
|
451
|
+
code: 0,
|
|
441
452
|
data: res
|
|
442
453
|
});
|
|
443
454
|
},
|
|
444
|
-
fail:
|
|
455
|
+
fail: err => {
|
|
456
|
+
console.log('res===isSupportFloatWindow err', err);
|
|
445
457
|
resolve({
|
|
446
458
|
code: -1,
|
|
447
|
-
msg:
|
|
459
|
+
msg: err
|
|
448
460
|
});
|
|
449
461
|
}
|
|
450
462
|
});
|
|
@@ -471,11 +483,14 @@ export const openFloatWindow = function (deviceId) {
|
|
|
471
483
|
deviceId,
|
|
472
484
|
extendParam: extendParam,
|
|
473
485
|
success: res => {
|
|
486
|
+
console.log('res===openFloatWindow success', res);
|
|
474
487
|
resolve({
|
|
488
|
+
code: 0,
|
|
475
489
|
data: res
|
|
476
490
|
});
|
|
477
491
|
},
|
|
478
492
|
fail: err => {
|
|
493
|
+
console.log('res===openFloatWindow err', err);
|
|
479
494
|
resolve({
|
|
480
495
|
code: -1,
|
|
481
496
|
msg: err
|
|
@@ -505,14 +520,17 @@ export const isSupportedTalk = function (deviceId) {
|
|
|
505
520
|
deviceId,
|
|
506
521
|
extendParam: extendParam,
|
|
507
522
|
success: res => {
|
|
523
|
+
console.log('res===isSupportedTalk success', res);
|
|
508
524
|
resolve({
|
|
525
|
+
code: 0,
|
|
509
526
|
data: res
|
|
510
527
|
});
|
|
511
528
|
},
|
|
512
|
-
fail:
|
|
529
|
+
fail: err => {
|
|
530
|
+
console.log('res===isSupportedTalk err', err);
|
|
513
531
|
resolve({
|
|
514
532
|
code: -1,
|
|
515
|
-
msg:
|
|
533
|
+
msg: err
|
|
516
534
|
});
|
|
517
535
|
}
|
|
518
536
|
});
|
|
@@ -539,15 +557,17 @@ export const getCurrentSupportedTalkMode = function (deviceId) {
|
|
|
539
557
|
deviceId,
|
|
540
558
|
extendParam: extendParam,
|
|
541
559
|
success: res => {
|
|
560
|
+
console.log('res===getCurrentSupportedTalkMode success', res);
|
|
542
561
|
resolve({
|
|
543
562
|
code: 0,
|
|
544
563
|
data: res
|
|
545
564
|
});
|
|
546
565
|
},
|
|
547
|
-
fail:
|
|
566
|
+
fail: err => {
|
|
567
|
+
console.log('res===getCurrentSupportedTalkMode err', err);
|
|
548
568
|
resolve({
|
|
549
569
|
code: -1,
|
|
550
|
-
msg:
|
|
570
|
+
msg: err
|
|
551
571
|
});
|
|
552
572
|
}
|
|
553
573
|
});
|
|
@@ -720,7 +740,7 @@ export const goToIpcHelpMini = async function (errCode, deviceId, helpNum, helpF
|
|
|
720
740
|
* @param deviceId 设备id
|
|
721
741
|
* @returns true/false
|
|
722
742
|
*/
|
|
723
|
-
export const
|
|
743
|
+
export const getIsSupportedCloudStorageSync = async deviceId => {
|
|
724
744
|
const res = await getDevInfo(deviceId);
|
|
725
745
|
const {
|
|
726
746
|
code,
|
package/lib/service/index.d.ts
CHANGED
|
@@ -14,17 +14,17 @@ export declare const getCollectionPointsInfo: <T>(deviceId: string) => Promise<I
|
|
|
14
14
|
/**
|
|
15
15
|
* 更新IPC设备单个收藏点信息
|
|
16
16
|
* @param {string} deviceId 设备id
|
|
17
|
-
* @param {
|
|
17
|
+
* @param {string} id 收藏点id
|
|
18
18
|
* @param {string} name 收藏点名称
|
|
19
19
|
*/
|
|
20
|
-
export declare const updateCollectionPointsInfo: <T>(deviceId: string, id:
|
|
20
|
+
export declare const updateCollectionPointsInfo: <T>(deviceId: string, id: string, name: string) => Promise<IRes<T>>;
|
|
21
21
|
/**
|
|
22
22
|
* 删除IPC设备单个收藏点信息
|
|
23
23
|
* @param {string} deviceId 设备id
|
|
24
24
|
*/
|
|
25
25
|
export declare const delCollectionPointsInfo: <T>(deviceId: string, pointData: [{
|
|
26
26
|
devId: string;
|
|
27
|
-
mpId:
|
|
27
|
+
mpId: string;
|
|
28
28
|
}]) => Promise<IRes<T>>;
|
|
29
29
|
/**
|
|
30
30
|
* 添加IPC设备单个收藏点信息
|
package/lib/service/index.js
CHANGED