@ray-js/api 1.7.78 → 1.7.80

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.
Files changed (56) hide show
  1. package/@types/AIKit.d.ts +1140 -1009
  2. package/@types/AVideoKit.d.ts +26 -101
  3. package/@types/BaseKit.d.ts +234 -210
  4. package/@types/BizKit.d.ts +271 -296
  5. package/@types/DeviceKit.d.ts +57 -88
  6. package/@types/GroupCITestKit.d.ts +1 -3
  7. package/@types/HealthKit.d.ts +273 -230
  8. package/@types/HomeKit.d.ts +1062 -891
  9. package/@types/IPCKit.d.ts +23 -50
  10. package/@types/LightKit.d.ts +2 -2
  11. package/@types/MapKit.d.ts +592 -381
  12. package/@types/MediaPlayerKit.d.ts +4 -28
  13. package/@types/MiniKit.d.ts +198 -375
  14. package/@types/P2PKit.d.ts +139 -205
  15. package/@types/PayKit.d.ts +10 -79
  16. package/@types/SweeperKit.d.ts +10 -10
  17. package/@types/ThirdAuthKit.d.ts +28 -252
  18. package/@types/WearKit.d.ts +630 -1593
  19. package/@types/api-extend.d.ts +15 -63
  20. package/lib/AIKit-1.6.0.d.ts +732 -35
  21. package/lib/AIKit-1.6.0.js +732 -51
  22. package/lib/BaseKit-3.17.7.d.ts +0 -214
  23. package/lib/BaseKit-3.17.7.js +1 -227
  24. package/lib/DeviceKit-4.13.1.d.ts +3666 -0
  25. package/lib/DeviceKit-4.13.1.js +3666 -0
  26. package/lib/HealthKit-6.5.0.d.ts +603 -0
  27. package/lib/HealthKit-6.5.0.js +603 -0
  28. package/lib/HomeKit-3.1.4.d.ts +4 -0
  29. package/lib/HomeKit-3.1.4.js +4 -0
  30. package/lib/IPCKit-6.4.5.d.ts +0 -1
  31. package/lib/IPCKit-6.4.5.js +0 -1
  32. package/lib/MapKit-3.4.13.d.ts +251 -0
  33. package/lib/MapKit-3.4.13.js +251 -0
  34. package/lib/MediaKit-3.4.1.d.ts +16 -0
  35. package/lib/MediaKit-3.4.1.js +16 -0
  36. package/lib/PlayNetKit-1.3.30.d.ts +930 -0
  37. package/lib/PlayNetKit-1.3.30.js +930 -0
  38. package/lib/cloud/alarm.d.ts +38 -5
  39. package/lib/cloud/alarm.js +38 -5
  40. package/lib/cloud/device.d.ts +42 -6
  41. package/lib/cloud/device.js +42 -6
  42. package/lib/cloud/gateway.d.ts +16 -0
  43. package/lib/cloud/gateway.js +16 -0
  44. package/lib/cloud/health.d.ts +1 -0
  45. package/lib/cloud/health.js +272 -0
  46. package/lib/cloud/interface.d.ts +161 -0
  47. package/lib/cloud/interface.js +18 -0
  48. package/lib/cloud/statistic.d.ts +112 -26
  49. package/lib/cloud/statistic.js +112 -26
  50. package/lib/cloud/timer.d.ts +2 -4
  51. package/lib/nativeRouters/outdoors.d.ts +2 -0
  52. package/lib/nativeRouters/outdoors.js +2 -0
  53. package/lib/nativeRouters/remoteGroup.d.ts +2 -0
  54. package/lib/nativeRouters/remoteGroup.js +2 -0
  55. package/lib/panel/publishDps.js +1 -1
  56. package/package.json +5 -5
@@ -68,26 +68,80 @@ export interface Automation {
68
68
  uid: string;
69
69
  }
70
70
  export interface AlarmList {
71
+ /**
72
+ * 审核状态
73
+ */
71
74
  auditStatus: number;
75
+ /**
76
+ * 是否被场景面板绑定
77
+ */
72
78
  boundForPanel: boolean;
79
+ /**
80
+ * 是否被 WIFI 场景面板绑定
81
+ */
73
82
  boundForWiFiPanel: boolean;
83
+ /**
84
+ * 是否启用
85
+ */
74
86
  enabled: boolean;
87
+ /**
88
+ * 多语言数据体
89
+ */
75
90
  i18nData: {
91
+ /**
92
+ * 名称
93
+ */
76
94
  name: {
95
+ /**
96
+ * 英文名称
97
+ */
77
98
  en: string;
99
+ /**
100
+ * 中文名称
101
+ */
78
102
  zh: string;
79
103
  };
104
+ /**
105
+ * 内容
106
+ */
80
107
  content: {
108
+ /**
109
+ * 英文内容
110
+ */
81
111
  en: string;
112
+ /**
113
+ * 中文内容
114
+ */
82
115
  zh: string;
83
116
  };
84
117
  };
118
+ /**
119
+ * 规则 ID
120
+ */
85
121
  id: string;
122
+ /**
123
+ * 是否为 IoT 自动告警
124
+ */
86
125
  iotAutoAlarm: boolean;
126
+ /**
127
+ * 是否为逻辑规则
128
+ */
87
129
  isLogicRule: boolean;
130
+ /**
131
+ * 是否为本地联动
132
+ */
88
133
  localLinkage: boolean;
134
+ /**
135
+ * 规则名称
136
+ */
89
137
  name: string;
138
+ /**
139
+ * 是否为 APP 管控本地联动
140
+ */
90
141
  newLocalScene: boolean;
142
+ /**
143
+ * 场景是否显示在首页
144
+ */
91
145
  stickyOnTop: boolean;
92
146
  }
93
147
  export interface ISelectedScene {
@@ -446,6 +500,10 @@ export interface IUpdateAstronomicalStatus {
446
500
  */
447
501
  status: number;
448
502
  }
503
+ export interface IRemoveAstronomicalParams {
504
+ /** 天文定时 ID */
505
+ id: string;
506
+ }
449
507
  export interface IUpdateBillConfigure {
450
508
  devId: string;
451
509
  unit: number;
@@ -550,11 +608,23 @@ export interface IUpdateGroupDpName {
550
608
  */
551
609
  name: string;
552
610
  }
611
+ /**
612
+ * 获取天气及空气质量请求参数
613
+ */
553
614
  export interface IGetWeatherQuality {
615
+ /**
616
+ * 设备 ID
617
+ */
554
618
  devId: string;
619
+ /**
620
+ * 是否查询本地天气
621
+ */
555
622
  isLocal: boolean;
556
623
  }
557
624
  export interface IGetWeatherQualityResponse {
625
+ /**
626
+ * 城市列表
627
+ * */
558
628
  c: Array<{
559
629
  /**
560
630
  * 城市名称
@@ -565,6 +635,9 @@ export interface IGetWeatherQualityResponse {
565
635
  */
566
636
  id: number;
567
637
  }>;
638
+ /**
639
+ * 天气及空气质量信息
640
+ */
568
641
  w: Array<{
569
642
  /**
570
643
  * 风向
@@ -664,11 +737,23 @@ export interface IGetWeatherQualityResponse {
664
737
  sunRiseTimestamp: number;
665
738
  }>;
666
739
  }
740
+ /**
741
+ * 获取天气预报请求参数
742
+ */
667
743
  export interface IGetWeathers {
744
+ /**
745
+ * 设备 ID
746
+ */
668
747
  devId: string;
748
+ /**
749
+ * 预报天数(默认值为 7,最大可预报天数为 7)
750
+ */
669
751
  dataRange?: number;
670
752
  }
671
753
  export interface IGetWeathersResponse {
754
+ /**
755
+ * 城市信息
756
+ */
672
757
  c: Array<{
673
758
  /**
674
759
  * 城市名称
@@ -679,6 +764,9 @@ export interface IGetWeathersResponse {
679
764
  */
680
765
  id: number;
681
766
  }>;
767
+ /**
768
+ * 天气预报数据
769
+ */
682
770
  weathers: Array<{
683
771
  /**
684
772
  * 风向
@@ -788,13 +876,37 @@ export interface IGetCustomizePositionResponse {
788
876
  */
789
877
  lat: string;
790
878
  }
879
+ /**
880
+ * 获取指定时间段上报日志请求参数
881
+ */
791
882
  export interface IGetLogInSpecifiedTime {
883
+ /**
884
+ * 设备 ID
885
+ */
792
886
  devId: string;
887
+ /**
888
+ * DP 点 ID,多个 ID 用英文逗号隔开
889
+ */
793
890
  dpIds: string;
891
+ /**
892
+ * 分页偏移量
893
+ */
794
894
  offset: number;
895
+ /**
896
+ * 每页数量,最大值上限为 1000
897
+ */
795
898
  limit: number;
899
+ /**
900
+ * 排序方式:'DESC' 倒序(默认)或 'ASC' 顺序
901
+ */
796
902
  sortType?: 'DESC' | 'ASC';
903
+ /**
904
+ * 查询起始时间戳(毫秒)
905
+ */
797
906
  startTime?: string;
907
+ /**
908
+ * 查询结束时间戳(毫秒)
909
+ */
798
910
  endTime?: string;
799
911
  }
800
912
  export type Dp = {
@@ -829,11 +941,29 @@ export interface IGetLogInSpecifiedTimeResponse {
829
941
  */
830
942
  hasNext: boolean;
831
943
  }
944
+ /**
945
+ * 获取 DP 点上报日志请求参数
946
+ */
832
947
  export interface IGetDpReportLog {
948
+ /**
949
+ * 设备 ID
950
+ */
833
951
  devId: string;
952
+ /**
953
+ * DP 点 ID,多个 ID 用英文逗号隔开
954
+ */
834
955
  dpIds: string;
956
+ /**
957
+ * 分页偏移量
958
+ */
835
959
  offset: number;
960
+ /**
961
+ * 每页数量,最大值上限为 1000
962
+ */
836
963
  limit: number;
964
+ /**
965
+ * 排序方式:'DESC' 倒序(默认)或 'ASC' 顺序
966
+ */
837
967
  sortType?: 'DESC' | 'ASC';
838
968
  }
839
969
  export interface IGetDpReportLogResponse {
@@ -850,11 +980,29 @@ export interface IGetDpReportLogResponse {
850
980
  */
851
981
  hasNext: boolean;
852
982
  }
983
+ /**
984
+ * 获取 DP 点每日统计数据请求参数
985
+ */
853
986
  export interface IGetDpLogDays {
987
+ /**
988
+ * 设备 ID
989
+ */
854
990
  devId: string;
991
+ /**
992
+ * DP 点 ID
993
+ */
855
994
  dpId: string;
995
+ /**
996
+ * 统计类型:sum(求和)、min(最小值)或 max(最大值)
997
+ */
856
998
  type?: string;
999
+ /**
1000
+ * 开始日期,格式为 yyyyMMdd,例如 20180529
1001
+ */
857
1002
  startDay: string;
1003
+ /**
1004
+ * 结束日期,格式为 yyyyMMdd,例如 20180531
1005
+ */
858
1006
  endDay: string;
859
1007
  }
860
1008
  export interface IGetDpLogDaysResponse {
@@ -963,9 +1111,21 @@ export interface IGetMultiDpsAllResultResponse {
963
1111
  */
964
1112
  value: string;
965
1113
  }
1114
+ /**
1115
+ * 设置告警开关请求参数
1116
+ */
966
1117
  export interface ISetAlarmSwitch {
1118
+ /**
1119
+ * 设备 ID
1120
+ */
967
1121
  devId: string;
1122
+ /**
1123
+ * 要开启或关闭的告警规则 ID,多个 ID 用英文逗号隔开
1124
+ */
968
1125
  ruleIds: string;
1126
+ /**
1127
+ * 是否禁用告警,'true' 表示禁用,'false' 表示启用
1128
+ */
969
1129
  disabled: string;
970
1130
  }
971
1131
  export interface IAlarmSdk {
@@ -1531,6 +1691,7 @@ export interface IZigbeeLocalGroupRelationItem {
1531
1691
  categoryCode: string;
1532
1692
  }
1533
1693
  export type IGetZigbeeLocalGroupRelationResponse = {
1694
+ /** 遥控器群组 localId 关系列表 */
1534
1695
  locals: IZigbeeLocalGroupRelationItem[];
1535
1696
  };
1536
1697
  export interface IGetZigbeeLocalGroupDeviceList {
@@ -8,8 +8,26 @@
8
8
  // 云端定时接口
9
9
  // 电费统计接口
10
10
  // 设备接口
11
+ /**
12
+ * 获取天气及空气质量请求参数
13
+ */
14
+ /**
15
+ * 获取天气预报请求参数
16
+ */
11
17
  // 数据统计接口
18
+ /**
19
+ * 获取指定时间段上报日志请求参数
20
+ */
21
+ /**
22
+ * 获取 DP 点上报日志请求参数
23
+ */
24
+ /**
25
+ * 获取 DP 点每日统计数据请求参数
26
+ */
12
27
  // 告警相关接口
28
+ /**
29
+ * 设置告警开关请求参数
30
+ */
13
31
  // 联动相关
14
32
  /**
15
33
  * 一键执行类型的联动规则数据
@@ -1,40 +1,126 @@
1
1
  import { IGetLogInSpecifiedTime, IGetDpReportLog, IGetDpLogDays, IGetDpResultByMonth, IGetDpResultByHour, IGetDataWithSpecified, IGetWeekWithSpecified, IGetMonthWithSpecified, IGetMultiDpsAllResult, IGetLogInSpecifiedTimeResponse, IGetDpReportLogResponse, IGetDpLogDaysResponse, IGetDpResultByMonthResponse, IGetDpResultByHourResponse, IGetDataWithSpecifiedResponse, IGetWeekWithSpecifiedResponse, IGetMonthWithSpecifiedResponse, IGetMultiDpsAllResultResponse } from './interface';
2
2
  /**
3
- * 获取 DP 点指定时间段上报日志
4
- * @param {string} devId 设备Id
5
- * @param {string} dpIds dpId
6
- * @param {number} offset 偏离值
7
- * @param {number} limit 最大值, 最大值上限为 1000,
8
- * @param {string} startTime 设备上报的时间, 查询起始时间,单位为毫秒
9
- * @param {string} endTime 设备上报的时间,查询结束时间,单位为毫秒
10
- * @param {string} sortType DESC 倒序 或 ASC 顺序, 默认为 DESC
3
+ * 获取 DP 点指定时间段内的上报日志(支持分页)
4
+ *
5
+ * @public
6
+ * @since @ray-js/ray 1.5.2
7
+ * @param params - 请求参数
8
+ * @param params.devId - 设备 ID
9
+ * @param params.dpIds - DP 点 ID,多个 ID 用英文逗号隔开
10
+ * @param params.offset - 分页偏移量
11
+ * @param params.limit - 每页数量,最大值上限为 1000
12
+ * @param params.startTime - 查询起始时间戳(毫秒)
13
+ * @param params.endTime - 查询结束时间戳(毫秒)
14
+ * @param params.sortType - 排序方式:'DESC' 倒序(默认)或 'ASC' 顺序
15
+ * @returns 日志数据,包含总条数、DP 日志列表、是否有下一页
16
+ * @example 基础用法
17
+ * ```ts
18
+ * import { getLogInSpecifiedTime } from '@ray-js/ray';
19
+ *
20
+ * getLogInSpecifiedTime({
21
+ * devId: 'vdevo169477319679442',
22
+ * dpIds: '1,2',
23
+ * offset: 0,
24
+ * limit: 50,
25
+ * startTime: '1620000000000',
26
+ * endTime: '1629999999999',
27
+ * sortType: 'DESC',
28
+ * }).then((res) => {
29
+ * console.log('日志数据:', res);
30
+ * }).catch((error) => {
31
+ * console.error(error);
32
+ * });
33
+ * ```
11
34
  */
12
35
  declare const getLogInSpecifiedTime: (params: IGetLogInSpecifiedTime) => Promise<IGetLogInSpecifiedTimeResponse>;
13
36
  /**
14
- * 获取 DP 点上报日志
15
- * @param {string} devId 设备Id
16
- * @param {string} dpIds dpId
17
- * @param {number} offset 偏离值
18
- * @param {number} limit 最大值, 最大值上限为 1000,
19
- * @param {string} sortType 'DESC' 倒序 或 'ASC' 顺序, 默认为 'DESC'
37
+ * 获取 DP 点上报日志(支持分页)
38
+ *
39
+ * @public
40
+ * @since @ray-js/ray 1.5.2
41
+ * @param params - 请求参数
42
+ * @param params.devId - 设备 ID
43
+ * @param params.dpIds - DP 点 ID,多个 ID 用英文逗号隔开
44
+ * @param params.offset - 分页偏移量
45
+ * @param params.limit - 每页数量,最大值上限为 1000
46
+ * @param params.sortType - 排序方式:'DESC' 倒序(默认)或 'ASC' 顺序
47
+ * @returns 日志数据,包含总条数、DP 日志列表、是否有下一页
48
+ * @example 基础用法
49
+ * ```ts
50
+ * import { getDpReportLog } from '@ray-js/ray';
51
+ *
52
+ * getDpReportLog({
53
+ * devId: 'vdevo169477319679442',
54
+ * dpIds: '1,2',
55
+ * offset: 0,
56
+ * limit: 50,
57
+ * sortType: 'DESC',
58
+ * }).then((res) => {
59
+ * console.log('上报日志:', res);
60
+ * }).catch((error) => {
61
+ * console.error(error);
62
+ * });
63
+ * ```
20
64
  */
21
65
  declare const getDpReportLog: (params: IGetDpReportLog) => Promise<IGetDpReportLogResponse>;
22
66
  /**
23
- * 获取用户操作的下发日志
24
- * @param {string} devId 设备Id
25
- * @param {string} dpIds dpId
26
- * @param {number} offset 偏离值
27
- * @param {number} limit 最大值, 最大值上限为 1000,
28
- * @param {string} sortType 'DESC' 倒序 或 'ASC' 顺序, 默认为 'DESC'
67
+ * 获取用户操作的下发日志(支持分页)
68
+ *
69
+ * @public
70
+ * @since @ray-js/ray 1.5.2
71
+ * @param params - 请求参数
72
+ * @param params.devId - 设备 ID
73
+ * @param params.dpIds - DP 点 ID,多个 ID 用英文逗号隔开
74
+ * @param params.offset - 分页偏移量
75
+ * @param params.limit - 每页数量,最大值上限为 1000
76
+ * @param params.sortType - 排序方式:'DESC' 倒序(默认)或 'ASC' 顺序
77
+ * @returns 用户操作日志数据,包含总条数、DP 日志列表、是否有下一页
78
+ * @example 基础用法
79
+ * ```ts
80
+ * import { getLogUserAction } from '@ray-js/ray';
81
+ *
82
+ * getLogUserAction({
83
+ * devId: 'vdevo169477319679442',
84
+ * dpIds: '1,2',
85
+ * offset: 0,
86
+ * limit: 50,
87
+ * sortType: 'DESC',
88
+ * }).then((res) => {
89
+ * console.log('用户操作日志:', res);
90
+ * }).catch((error) => {
91
+ * console.error(error);
92
+ * });
93
+ * ```
29
94
  */
30
95
  declare const getLogUserAction: (params: IGetDpReportLog) => Promise<IGetDpReportLogResponse>;
31
96
  /**
32
- * 获取设备月的每日上报的数据统计
33
- * @param {string} devId 设备Id
34
- * @param {string} dpId dpId
35
- * @param {string} startDay 开始日期,例如20180529
36
- * @param {string} endDay 结束日期,例如20180531
37
- * @param {string} type 统计的类型,sum、minux 或 max
97
+ * 获取指定日期范围内 DP 点每日上报的数据统计
98
+ *
99
+ * @public
100
+ * @since @ray-js/ray 1.5.2
101
+ * @param params - 请求参数
102
+ * @param params.devId - 设备 ID
103
+ * @param params.dpId - DP 点 ID
104
+ * @param params.startDay - 开始日期,格式为 yyyyMMdd,例如 20180529
105
+ * @param params.endDay - 结束日期,格式为 yyyyMMdd,例如 20180531
106
+ * @param params.type - 统计类型:sum(求和)、min(最小值)或 max(最大值)
107
+ * @returns 每日统计数据,包含总条数、日期列表、对应每天的值列表
108
+ * @example 基础用法
109
+ * ```ts
110
+ * import { getDpLogDays } from '@ray-js/ray';
111
+ *
112
+ * getDpLogDays({
113
+ * devId: 'vdevo169477319679442',
114
+ * dpId: '1',
115
+ * startDay: '20240101',
116
+ * endDay: '20240131',
117
+ * type: 'sum',
118
+ * }).then((res) => {
119
+ * console.log('每日统计:', res);
120
+ * }).catch((error) => {
121
+ * console.error(error);
122
+ * });
123
+ * ```
38
124
  */
39
125
  declare const getDpLogDays: (params: IGetDpLogDays) => Promise<IGetDpLogDaysResponse>;
40
126
  /**
@@ -3,14 +3,37 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
3
  import { requestCloud } from '../';
4
4
  import { THING } from '../constants';
5
5
  /**
6
- * 获取 DP 点指定时间段上报日志
7
- * @param {string} devId 设备Id
8
- * @param {string} dpIds dpId
9
- * @param {number} offset 偏离值
10
- * @param {number} limit 最大值, 最大值上限为 1000,
11
- * @param {string} startTime 设备上报的时间, 查询起始时间,单位为毫秒
12
- * @param {string} endTime 设备上报的时间,查询结束时间,单位为毫秒
13
- * @param {string} sortType DESC 倒序 或 ASC 顺序, 默认为 DESC
6
+ * 获取 DP 点指定时间段内的上报日志(支持分页)
7
+ *
8
+ * @public
9
+ * @since @ray-js/ray 1.5.2
10
+ * @param params - 请求参数
11
+ * @param params.devId - 设备 ID
12
+ * @param params.dpIds - DP 点 ID,多个 ID 用英文逗号隔开
13
+ * @param params.offset - 分页偏移量
14
+ * @param params.limit - 每页数量,最大值上限为 1000
15
+ * @param params.startTime - 查询起始时间戳(毫秒)
16
+ * @param params.endTime - 查询结束时间戳(毫秒)
17
+ * @param params.sortType - 排序方式:'DESC' 倒序(默认)或 'ASC' 顺序
18
+ * @returns 日志数据,包含总条数、DP 日志列表、是否有下一页
19
+ * @example 基础用法
20
+ * ```ts
21
+ * import { getLogInSpecifiedTime } from '@ray-js/ray';
22
+ *
23
+ * getLogInSpecifiedTime({
24
+ * devId: 'vdevo169477319679442',
25
+ * dpIds: '1,2',
26
+ * offset: 0,
27
+ * limit: 50,
28
+ * startTime: '1620000000000',
29
+ * endTime: '1629999999999',
30
+ * sortType: 'DESC',
31
+ * }).then((res) => {
32
+ * console.log('日志数据:', res);
33
+ * }).catch((error) => {
34
+ * console.error(error);
35
+ * });
36
+ * ```
14
37
  */
15
38
  const getLogInSpecifiedTime = params => {
16
39
  return requestCloud({
@@ -21,12 +44,33 @@ const getLogInSpecifiedTime = params => {
21
44
  };
22
45
 
23
46
  /**
24
- * 获取 DP 点上报日志
25
- * @param {string} devId 设备Id
26
- * @param {string} dpIds dpId
27
- * @param {number} offset 偏离值
28
- * @param {number} limit 最大值, 最大值上限为 1000,
29
- * @param {string} sortType 'DESC' 倒序 或 'ASC' 顺序, 默认为 'DESC'
47
+ * 获取 DP 点上报日志(支持分页)
48
+ *
49
+ * @public
50
+ * @since @ray-js/ray 1.5.2
51
+ * @param params - 请求参数
52
+ * @param params.devId - 设备 ID
53
+ * @param params.dpIds - DP 点 ID,多个 ID 用英文逗号隔开
54
+ * @param params.offset - 分页偏移量
55
+ * @param params.limit - 每页数量,最大值上限为 1000
56
+ * @param params.sortType - 排序方式:'DESC' 倒序(默认)或 'ASC' 顺序
57
+ * @returns 日志数据,包含总条数、DP 日志列表、是否有下一页
58
+ * @example 基础用法
59
+ * ```ts
60
+ * import { getDpReportLog } from '@ray-js/ray';
61
+ *
62
+ * getDpReportLog({
63
+ * devId: 'vdevo169477319679442',
64
+ * dpIds: '1,2',
65
+ * offset: 0,
66
+ * limit: 50,
67
+ * sortType: 'DESC',
68
+ * }).then((res) => {
69
+ * console.log('上报日志:', res);
70
+ * }).catch((error) => {
71
+ * console.error(error);
72
+ * });
73
+ * ```
30
74
  */
31
75
  const getDpReportLog = params => {
32
76
  return requestCloud({
@@ -37,12 +81,33 @@ const getDpReportLog = params => {
37
81
  };
38
82
 
39
83
  /**
40
- * 获取用户操作的下发日志
41
- * @param {string} devId 设备Id
42
- * @param {string} dpIds dpId
43
- * @param {number} offset 偏离值
44
- * @param {number} limit 最大值, 最大值上限为 1000,
45
- * @param {string} sortType 'DESC' 倒序 或 'ASC' 顺序, 默认为 'DESC'
84
+ * 获取用户操作的下发日志(支持分页)
85
+ *
86
+ * @public
87
+ * @since @ray-js/ray 1.5.2
88
+ * @param params - 请求参数
89
+ * @param params.devId - 设备 ID
90
+ * @param params.dpIds - DP 点 ID,多个 ID 用英文逗号隔开
91
+ * @param params.offset - 分页偏移量
92
+ * @param params.limit - 每页数量,最大值上限为 1000
93
+ * @param params.sortType - 排序方式:'DESC' 倒序(默认)或 'ASC' 顺序
94
+ * @returns 用户操作日志数据,包含总条数、DP 日志列表、是否有下一页
95
+ * @example 基础用法
96
+ * ```ts
97
+ * import { getLogUserAction } from '@ray-js/ray';
98
+ *
99
+ * getLogUserAction({
100
+ * devId: 'vdevo169477319679442',
101
+ * dpIds: '1,2',
102
+ * offset: 0,
103
+ * limit: 50,
104
+ * sortType: 'DESC',
105
+ * }).then((res) => {
106
+ * console.log('用户操作日志:', res);
107
+ * }).catch((error) => {
108
+ * console.error(error);
109
+ * });
110
+ * ```
46
111
  */
47
112
  const getLogUserAction = params => {
48
113
  return requestCloud({
@@ -53,12 +118,33 @@ const getLogUserAction = params => {
53
118
  };
54
119
 
55
120
  /**
56
- * 获取设备月的每日上报的数据统计
57
- * @param {string} devId 设备Id
58
- * @param {string} dpId dpId
59
- * @param {string} startDay 开始日期,例如20180529
60
- * @param {string} endDay 结束日期,例如20180531
61
- * @param {string} type 统计的类型,sum、minux 或 max
121
+ * 获取指定日期范围内 DP 点每日上报的数据统计
122
+ *
123
+ * @public
124
+ * @since @ray-js/ray 1.5.2
125
+ * @param params - 请求参数
126
+ * @param params.devId - 设备 ID
127
+ * @param params.dpId - DP 点 ID
128
+ * @param params.startDay - 开始日期,格式为 yyyyMMdd,例如 20180529
129
+ * @param params.endDay - 结束日期,格式为 yyyyMMdd,例如 20180531
130
+ * @param params.type - 统计类型:sum(求和)、min(最小值)或 max(最大值)
131
+ * @returns 每日统计数据,包含总条数、日期列表、对应每天的值列表
132
+ * @example 基础用法
133
+ * ```ts
134
+ * import { getDpLogDays } from '@ray-js/ray';
135
+ *
136
+ * getDpLogDays({
137
+ * devId: 'vdevo169477319679442',
138
+ * dpId: '1',
139
+ * startDay: '20240101',
140
+ * endDay: '20240131',
141
+ * type: 'sum',
142
+ * }).then((res) => {
143
+ * console.log('每日统计:', res);
144
+ * }).catch((error) => {
145
+ * console.error(error);
146
+ * });
147
+ * ```
62
148
  */
63
149
  const getDpLogDays = params => {
64
150
  return requestCloud({
@@ -1,4 +1,4 @@
1
- import { IAndSingleTime, IQueryTimerTasks, IModifySingleTimer, IAndGroupTimer, IModifyGroupTimer, IModDeleteTaskByIds, IModDeleteTaskByCategory, IGetDpLastTimer, IGetLastTimerPeriod, IGetAstronomicalList, IAstronomical, IUpdateAstronomicalStatus, IQueryTimerTasksResponse, IGetDpLastTimerResponse, IGetLastTimerPeriodResponse, IGetAstronomicalListResponse } from './interface';
1
+ import { IAndSingleTime, IQueryTimerTasks, IModifySingleTimer, IAndGroupTimer, IModifyGroupTimer, IModDeleteTaskByIds, IModDeleteTaskByCategory, IGetDpLastTimer, IGetLastTimerPeriod, IGetAstronomicalList, IAstronomical, IUpdateAstronomicalStatus, IRemoveAstronomicalParams, IQueryTimerTasksResponse, IGetDpLastTimerResponse, IGetLastTimerPeriodResponse, IGetAstronomicalListResponse } from './interface';
2
2
  /**
3
3
  * 添加单次定时
4
4
  * @param {string} bizId 单设备 ID(devId) 或者群组设备 ID(groupId)
@@ -218,7 +218,5 @@ declare const updateAstronomicalStatus: (params: IUpdateAstronomicalStatus) => P
218
218
  * });
219
219
  * ```
220
220
  */
221
- declare const removeAstronomical: (params: {
222
- id: string;
223
- }) => Promise<boolean>;
221
+ declare const removeAstronomical: (params: IRemoveAstronomicalParams) => Promise<boolean>;
224
222
  export { addSingleTimer, queryTimerTasks, modifySingleTimer, addGroupTimer, queryGroupTimerTasks, modifyGroupTimer, modDeleteTaskByIds, modDeleteTaskByCategory, getDpLastTimer, getDpsLastTimer, getLastTimerPeriod, getAstronomicalList, addAstronomical, updateAstronomical, updateAstronomicalStatus, removeAstronomical, };
@@ -8,7 +8,9 @@ type OpenOutdoorCyclingNavigationParams = {
8
8
  * @public
9
9
  * @since @ray-js/ray 1.4.29
10
10
  * @param params - 请求参数
11
+ * @returns 跳转成功时 resolve
11
12
  * @remarks 当前功能仅在智慧出行 App 开通使用,开发者工具环境无法使用,需要打包后或真机调试使用
13
+ * @returns 无
12
14
  * @example 基础用法
13
15
  * ```ts
14
16
  * import { openOutdoorCyclingNavigation } from '@ray-js/ray';
@@ -5,7 +5,9 @@ import { nativeRouter } from './common';
5
5
  * @public
6
6
  * @since @ray-js/ray 1.4.29
7
7
  * @param params - 请求参数
8
+ * @returns 跳转成功时 resolve
8
9
  * @remarks 当前功能仅在智慧出行 App 开通使用,开发者工具环境无法使用,需要打包后或真机调试使用
10
+ * @returns 无
9
11
  * @example 基础用法
10
12
  * ```ts
11
13
  * import { openOutdoorCyclingNavigation } from '@ray-js/ray';
@@ -24,7 +24,9 @@ type OpenZigbeeLocalGroupParams = {
24
24
  * @public
25
25
  * @since @ray-js/ray 1.5.2
26
26
  * @param params - 请求参数
27
+ * @returns 跳转成功时 resolve
27
28
  * @remarks 当前仅针对 Zigbee 的部分品类开通了此类能力
29
+ * @returns 无
28
30
  * @example 基础用法
29
31
  * ```ts
30
32
  * import { openZigbeeLocalGroup } from '@ray-js/ray';
@@ -6,7 +6,9 @@ import { nativeRouter } from './common';
6
6
  * @public
7
7
  * @since @ray-js/ray 1.5.2
8
8
  * @param params - 请求参数
9
+ * @returns 跳转成功时 resolve
9
10
  * @remarks 当前仅针对 Zigbee 的部分品类开通了此类能力
11
+ * @returns 无
10
12
  * @example 基础用法
11
13
  * ```ts
12
14
  * import { openZigbeeLocalGroup } from '@ray-js/ray';