@ray-js/api 1.7.69 → 1.7.71

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 (154) hide show
  1. package/@types/AIKit.d.ts +5509 -610
  2. package/@types/AIStreamKit.d.ts +2641 -0
  3. package/@types/AVideoKit.d.ts +1827 -0
  4. package/@types/BaseKit.d.ts +8682 -1893
  5. package/@types/BizKit.d.ts +6639 -1038
  6. package/@types/CategoryCommonBizKit.d.ts +1459 -0
  7. package/@types/CommunityKit.d.ts +154 -0
  8. package/@types/DeviceKit.d.ts +18475 -5662
  9. package/@types/GroupCITestKit.d.ts +651 -0
  10. package/@types/HealthKit.d.ts +2290 -357
  11. package/@types/HomeKit.d.ts +4068 -182
  12. package/@types/IPCKit.d.ts +4327 -1227
  13. package/@types/LightKit.d.ts +125 -0
  14. package/@types/MapKit.d.ts +1560 -204
  15. package/@types/MediaKit.d.ts +136 -16
  16. package/@types/MediaPlayerKit.d.ts +47 -0
  17. package/@types/MiniKit.d.ts +2976 -628
  18. package/@types/OutdoorKit.d.ts +1337 -24
  19. package/@types/P2PKit.d.ts +622 -103
  20. package/@types/PayKit.d.ts +115 -0
  21. package/@types/PlayNetKit.d.ts +3454 -1309
  22. package/@types/SweeperKit.d.ts +154 -0
  23. package/@types/ThirdAuthKit.d.ts +324 -0
  24. package/@types/ThirdPartyDeviceKit.d.ts +410 -0
  25. package/@types/WearKit.d.ts +10177 -375
  26. package/@types/gateway.d.ts +349 -61
  27. package/@types/health.d.ts +486 -304
  28. package/lib/AIKit-1.6.0.d.ts +265 -41
  29. package/lib/AIKit-1.6.0.js +374 -120
  30. package/lib/BaseKit-3.17.7.d.ts +704 -0
  31. package/lib/BaseKit-3.17.7.js +720 -1
  32. package/lib/BizKit-4.10.4.d.ts +336 -0
  33. package/lib/BizKit-4.10.4.js +342 -5
  34. package/lib/DeviceKit-4.13.1.d.ts +996 -0
  35. package/lib/DeviceKit-4.13.1.js +1247 -249
  36. package/lib/HealthKit-6.5.0.d.ts +210 -44
  37. package/lib/HealthKit-6.5.0.js +295 -128
  38. package/lib/HomeKit-3.1.4.d.ts +20 -6
  39. package/lib/HomeKit-3.1.4.js +29 -14
  40. package/lib/IPCKit-6.4.5.d.ts +375 -77
  41. package/lib/IPCKit-6.4.5.js +525 -228
  42. package/lib/MapKit-3.4.13.d.ts +70 -16
  43. package/lib/MapKit-3.4.13.js +98 -47
  44. package/lib/MediaKit-3.4.1.d.ts +5 -3
  45. package/lib/MediaKit-3.4.1.js +7 -6
  46. package/lib/MiniKit-3.14.1.d.ts +300 -0
  47. package/lib/MiniKit-3.14.1.js +302 -0
  48. package/lib/OutdoorKit-1.0.4.d.ts +55 -13
  49. package/lib/OutdoorKit-1.0.4.js +78 -35
  50. package/lib/P2PKit-2.0.3.d.ts +125 -27
  51. package/lib/P2PKit-2.0.3.js +175 -78
  52. package/lib/PlayNetKit-1.3.30.d.ts +290 -60
  53. package/lib/PlayNetKit-1.3.30.js +407 -176
  54. package/lib/WearKit-1.1.6.d.ts +125 -27
  55. package/lib/WearKit-1.1.6.js +176 -77
  56. package/lib/all-kits.d.ts +10 -10
  57. package/lib/all-kits.js +10 -10
  58. package/lib/cloud/core.d.ts +31 -1
  59. package/lib/cloud/core.js +31 -1
  60. package/lib/cloud/device.d.ts +155 -24
  61. package/lib/cloud/device.js +153 -22
  62. package/lib/cloud/gateway.d.ts +254 -0
  63. package/lib/cloud/gateway.js +269 -9
  64. package/lib/cloud/health.d.ts +1 -0
  65. package/lib/cloud/health.js +121 -0
  66. package/lib/cloud/interface.d.ts +222 -44
  67. package/lib/cloud/interface.js +15 -2
  68. package/lib/cloud/laser-clean/deleteCleaningRecord/index.d.ts +27 -0
  69. package/lib/cloud/laser-clean/deleteCleaningRecord/index.js +28 -0
  70. package/lib/cloud/laser-clean/deleteCleaningRecord/type.d.ts +7 -0
  71. package/lib/cloud/laser-clean/deleteCleaningRecord/type.js +1 -0
  72. package/lib/cloud/laser-clean/deleteGyroCleanRecord/index.d.ts +27 -0
  73. package/lib/cloud/laser-clean/deleteGyroCleanRecord/index.js +28 -0
  74. package/lib/cloud/laser-clean/deleteGyroCleanRecord/type.d.ts +7 -0
  75. package/lib/cloud/laser-clean/deleteGyroCleanRecord/type.js +1 -0
  76. package/lib/cloud/laser-clean/deleteMultipleMapFiles/index.d.ts +27 -0
  77. package/lib/cloud/laser-clean/deleteMultipleMapFiles/index.js +28 -0
  78. package/lib/cloud/laser-clean/deleteMultipleMapFiles/type.d.ts +7 -0
  79. package/lib/cloud/laser-clean/deleteMultipleMapFiles/type.js +1 -0
  80. package/lib/cloud/laser-clean/getCleaningRecords/index.d.ts +30 -0
  81. package/lib/cloud/laser-clean/getCleaningRecords/index.js +31 -0
  82. package/lib/cloud/laser-clean/getCleaningRecords/type.d.ts +39 -0
  83. package/lib/cloud/laser-clean/getCleaningRecords/type.js +1 -0
  84. package/lib/cloud/laser-clean/getGyroCleanRecordDetail/index.d.ts +29 -0
  85. package/lib/cloud/laser-clean/getGyroCleanRecordDetail/index.js +30 -0
  86. package/lib/cloud/laser-clean/getGyroCleanRecordDetail/type.d.ts +30 -0
  87. package/lib/cloud/laser-clean/getGyroCleanRecordDetail/type.js +1 -0
  88. package/lib/cloud/laser-clean/getGyroCleanRecords/index.d.ts +29 -0
  89. package/lib/cloud/laser-clean/getGyroCleanRecords/index.js +30 -0
  90. package/lib/cloud/laser-clean/getGyroCleanRecords/type.d.ts +35 -0
  91. package/lib/cloud/laser-clean/getGyroCleanRecords/type.js +1 -0
  92. package/lib/cloud/laser-clean/getGyroLatestCleanMap/index.d.ts +28 -0
  93. package/lib/cloud/laser-clean/getGyroLatestCleanMap/index.js +29 -0
  94. package/lib/cloud/laser-clean/getGyroLatestCleanMap/type.d.ts +28 -0
  95. package/lib/cloud/laser-clean/getGyroLatestCleanMap/type.js +1 -0
  96. package/lib/cloud/laser-clean/getMultipleMapFiles/index.d.ts +24 -0
  97. package/lib/cloud/laser-clean/getMultipleMapFiles/index.js +25 -0
  98. package/lib/cloud/laser-clean/getMultipleMapFiles/type.d.ts +29 -0
  99. package/lib/cloud/laser-clean/getMultipleMapFiles/type.js +1 -0
  100. package/lib/cloud/laser-clean/getSweeperStorageConfig/index.d.ts +24 -0
  101. package/lib/cloud/laser-clean/getSweeperStorageConfig/index.js +25 -0
  102. package/lib/cloud/laser-clean/getSweeperStorageConfig/type.d.ts +26 -0
  103. package/lib/cloud/laser-clean/getSweeperStorageConfig/type.js +1 -0
  104. package/lib/cloud/laser-clean/getVoiceList/index.d.ts +28 -0
  105. package/lib/cloud/laser-clean/getVoiceList/index.js +29 -0
  106. package/lib/cloud/laser-clean/getVoiceList/type.d.ts +48 -0
  107. package/lib/cloud/laser-clean/getVoiceList/type.js +1 -0
  108. package/lib/cloud/laser-clean/index.d.ts +1 -1
  109. package/lib/cloud/laser-clean/index.js +1 -1
  110. package/lib/cloud/laser-clean/map.d.ts +5 -7
  111. package/lib/cloud/laser-clean/map.js +5 -9
  112. package/lib/cloud/laser-clean/record.d.ts +5 -6
  113. package/lib/cloud/laser-clean/record.js +5 -7
  114. package/lib/cloud/laser-clean/renameHistoryMap/index.d.ts +28 -0
  115. package/lib/cloud/laser-clean/renameHistoryMap/index.js +29 -0
  116. package/lib/cloud/laser-clean/renameHistoryMap/type.d.ts +9 -0
  117. package/lib/cloud/laser-clean/renameHistoryMap/type.js +1 -0
  118. package/lib/cloud/laser-clean/voice.d.ts +1 -3
  119. package/lib/cloud/laser-clean/voice.js +1 -4
  120. package/lib/cloud/linkage.d.ts +271 -53
  121. package/lib/cloud/linkage.js +256 -51
  122. package/lib/cloud/remoteGroup.d.ts +37 -0
  123. package/lib/cloud/remoteGroup.js +37 -0
  124. package/lib/cloud/timer.d.ts +104 -26
  125. package/lib/cloud/timer.js +104 -26
  126. package/lib/getApp/index.thing.d.ts +47 -1
  127. package/lib/getApp/index.thing.js +40 -2
  128. package/lib/getBoundingClientRect/index.thing.d.ts +101 -1
  129. package/lib/getBoundingClientRect/index.thing.js +59 -0
  130. package/lib/getCurrentPages/index.thing.d.ts +40 -15
  131. package/lib/getCurrentPages/index.thing.js +36 -15
  132. package/lib/getCustomConfig/index.d.ts +5 -2
  133. package/lib/getCustomConfig/index.thing.d.ts +68 -2
  134. package/lib/getCustomConfig/index.thing.js +62 -0
  135. package/lib/getCustomConfig/index.wechat.d.ts +5 -2
  136. package/lib/getCustomConfig/type.d.ts +26 -15
  137. package/lib/getElementById/index.thing.d.ts +42 -1
  138. package/lib/getElementById/index.thing.js +40 -0
  139. package/lib/index.d.ts +3 -0
  140. package/lib/index.js +4 -2
  141. package/lib/nativeRouters/common.d.ts +8 -0
  142. package/lib/nativeRouters/device.d.ts +137 -5
  143. package/lib/nativeRouters/device.js +138 -6
  144. package/lib/nativeRouters/gw.d.ts +58 -8
  145. package/lib/nativeRouters/gw.js +57 -8
  146. package/lib/nativeRouters/outdoors.d.ts +16 -3
  147. package/lib/nativeRouters/outdoors.js +16 -3
  148. package/lib/nativeRouters/remoteGroup.d.ts +23 -0
  149. package/lib/nativeRouters/remoteGroup.js +23 -0
  150. package/lib/nativeRouters/root.d.ts +19 -0
  151. package/lib/nativeRouters/root.js +17 -0
  152. package/lib/openGroupCreate/index.d.ts +45 -0
  153. package/lib/openGroupCreate/index.js +32 -0
  154. package/package.json +5 -5
@@ -1,1241 +1,3174 @@
1
1
  /**
2
2
  * HealthKit
3
3
  *
4
- * @version 6.5.0
4
+ * @version 7.2.3
5
5
  */
6
6
  declare namespace ty.health {
7
7
  /**
8
- *@description health connect sdk状态获取[Android only]*/
8
+ * 获取 Health Connect SDK 可用与授权状态 [Android only]
9
+ * @public
10
+ * @since HealthKit 5.18.0
11
+ * @platform Android
12
+ */
9
13
  export function getHealthConnectStatus(params?: {
10
- success?: (params: {
11
- /**
12
- * -2 服务不可用(需要提示用户去更改自启动和电源管理),建议面板收到-2直接跳转到授权页。授权页做弹窗提示
13
- * -1 Health Connect不可用/不支持]
14
- * 0 已授权
15
- * 1 未安装Health Connect
16
- * 2 未授权
17
- */
18
- value: number
19
- }) => void
14
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
15
+ complete?: () => void
16
+ /** 接口调用成功的回调函数 */
17
+ success?: (params: number) => void
18
+ /** 接口调用失败的回调函数 */
20
19
  fail?: (params: {
20
+ /** 错误信息 */
21
21
  errorMsg: string
22
+ /** 错误码 */
22
23
  errorCode: string | number
24
+ /** 错误扩展 */
23
25
  innerError: {
26
+ /** 错误扩展码 */
24
27
  errorCode: string | number
28
+ /** 错误扩展信息 */
25
29
  errorMsg: string
26
30
  }
27
31
  }) => void
32
+ }): void
33
+
34
+ /**
35
+ * 获取 Health Connect SDK 可用与授权状态 [Android only]
36
+ * @public
37
+ * @since HealthKit 5.18.0
38
+ * @platform Android
39
+ */
40
+ export function getHealthConnectStatusSync(): number
41
+
42
+ /**
43
+ * 检测 Health Connect 读取权限状态 [Android only]
44
+ * @public
45
+ * @since HealthKit 7.1.5
46
+ * @platform Android
47
+ */
48
+ export function checkHealthConnectReadStatus(params?: {
49
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
28
50
  complete?: () => void
51
+ /** 接口调用成功的回调函数 */
52
+ success?: (params: number) => void
53
+ /** 接口调用失败的回调函数 */
54
+ fail?: (params: {
55
+ /** 错误信息 */
56
+ errorMsg: string
57
+ /** 错误码 */
58
+ errorCode: string | number
59
+ /** 错误扩展 */
60
+ innerError: {
61
+ /** 错误扩展码 */
62
+ errorCode: string | number
63
+ /** 错误扩展信息 */
64
+ errorMsg: string
65
+ }
66
+ }) => void
29
67
  }): void
30
68
 
31
69
  /**
32
- *@description health connect sdk状态获取[Android only]*/
33
- export function getHealthConnectStatusSync(): {
34
- /**
35
- * -2 服务不可用(需要提示用户去更改自启动和电源管理),建议面板收到-2直接跳转到授权页。授权页做弹窗提示
36
- * -1 Health Connect不可用/不支持]
37
- * 0 已授权
38
- * 1 未安装Health Connect
39
- * 2 未授权
40
- */
41
- value: number
42
- }
70
+ * 检测 Health Connect 读取权限状态 [Android only]
71
+ * @public
72
+ * @since HealthKit 7.1.5
73
+ * @platform Android
74
+ */
75
+ export function checkHealthConnectReadStatusSync(): number
43
76
 
44
77
  /**
45
- *@description 数据同步到health connect [Android only]
46
- *@error {-1005: 'service error,please check if Health Connect is set to auto-start and if power management has no restrictions'} | {-1004: 'error when commit to Health Connect'} | {-1003: 'data is null'} | {-1002: 'data conversion error'} | {-1001: 'phone is not support'}*/
78
+ * 将健康记录批量写入 Health Connect [Android only]
79
+ * @public
80
+ * @since HealthKit 5.18.0
81
+ * @platform Android
82
+ * @error {-1001} phone is not support
83
+ * @error {-1002} data conversion error
84
+ * @error {-1003} data is null
85
+ * @error {-1004} error when commit to Health Connect
86
+ * @error {-1005} service error,please check if Health Connect is set to auto-start and if power management has no restrictions
87
+ */
47
88
  export function insertRecords(params: {
48
- /** RecordData数据列表的json array字符串 */
89
+ /**
90
+ * RecordData数据列表的json array字符串
91
+ * @since HealthKit 5.18.0
92
+ */
49
93
  request: string
94
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
95
+ complete?: () => void
96
+ /** 接口调用成功的回调函数 */
50
97
  success?: (params: boolean) => void
98
+ /** 接口调用失败的回调函数 */
51
99
  fail?: (params: {
100
+ /** 错误信息 */
52
101
  errorMsg: string
102
+ /** 错误码 */
53
103
  errorCode: string | number
104
+ /** 错误扩展 */
54
105
  innerError: {
106
+ /** 错误扩展码 */
55
107
  errorCode: string | number
108
+ /** 错误扩展信息 */
56
109
  errorMsg: string
57
110
  }
58
111
  }) => void
59
- complete?: () => void
60
112
  }): void
61
113
 
62
114
  /**
63
- *@description 数据同步到health connect [Android only]
64
- *@error {-1005: 'service error,please check if Health Connect is set to auto-start and if power management has no restrictions'} | {-1004: 'error when commit to Health Connect'} | {-1003: 'data is null'} | {-1002: 'data conversion error'} | {-1001: 'phone is not support'}*/
115
+ * 将健康记录批量写入 Health Connect [Android only]
116
+ * @public
117
+ * @since HealthKit 5.18.0
118
+ * @platform Android
119
+ * @error {-1001} phone is not support
120
+ * @error {-1002} data conversion error
121
+ * @error {-1003} data is null
122
+ * @error {-1004} error when commit to Health Connect
123
+ * @error {-1005} service error,please check if Health Connect is set to auto-start and if power management has no restrictions
124
+ */
65
125
  export function insertRecordsSync(request?: RecordParams): boolean
66
126
 
67
127
  /**
68
- *@description 用户是否已经做过授权操作(针对Quantity类型数据)[iOS only]
69
- *需要参数为readPermissions,writePermissions
70
- *@error {1: 'AppleHealthParamsError'}*/
128
+ * 按条件查询 Health Connect 健康记录 [Android only]
129
+ * @public
130
+ * @since HealthKit 7.1.5
131
+ * @platform Android
132
+ */
133
+ export function readHealthRecords(params: {
134
+ /**
135
+ * 数据类型(dpCode)
136
+ * @since HealthKit 7.1.5
137
+ */
138
+ code: string
139
+ /**
140
+ * 开始时间
141
+ * @since HealthKit 7.1.5
142
+ */
143
+ startTime: number
144
+ /**
145
+ * 结束时间
146
+ * @since HealthKit 7.1.5
147
+ */
148
+ endTime: number
149
+ /**
150
+ * 查询条数 0:全部 1:最近1条 2:最近2条,以此类推
151
+ * @since HealthKit 7.1.5
152
+ */
153
+ limit: number
154
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
155
+ complete?: () => void
156
+ /** 接口调用成功的回调函数 */
157
+ success?: (params: {
158
+ /**
159
+ * 数据列表
160
+ * @since HealthKit 7.1.5
161
+ */
162
+ list: QueryRecordsData[]
163
+ /**
164
+ * 总量
165
+ * @since HealthKit 7.1.5
166
+ */
167
+ count: number
168
+ }) => void
169
+ /** 接口调用失败的回调函数 */
170
+ fail?: (params: {
171
+ /** 错误信息 */
172
+ errorMsg: string
173
+ /** 错误码 */
174
+ errorCode: string | number
175
+ /** 错误扩展 */
176
+ innerError: {
177
+ /** 错误扩展码 */
178
+ errorCode: string | number
179
+ /** 错误扩展信息 */
180
+ errorMsg: string
181
+ }
182
+ }) => void
183
+ }): void
184
+
185
+ /**
186
+ * 按条件查询 Health Connect 健康记录 [Android only]
187
+ * @public
188
+ * @since HealthKit 7.1.5
189
+ * @platform Android
190
+ */
191
+ export function readHealthRecordsSync(request?: QueryRecordsParams): {
192
+ /**
193
+ * 数据列表
194
+ * @since HealthKit 7.1.5
195
+ */
196
+ list: QueryRecordsData[]
197
+ /**
198
+ * 总量
199
+ * @since HealthKit 7.1.5
200
+ */
201
+ count: number
202
+ }
203
+
204
+ /**
205
+ * 查询用户是否已对 Quantity 类型数据完成读写授权 [iOS only]
206
+ * @public
207
+ * @since HealthKit 5.18.3
208
+ * @platform iOS
209
+ * @error {1} AppleHealthParamsError
210
+ */
71
211
  export function authStatusPermissions(params?: {
72
212
  /**
73
213
  * 权限类型(申请读写权限的接口使用),具体枚举值查看下文的枚举列表
74
214
  * eg. ["1","2"]
215
+ * @since HealthKit 5.18.3
75
216
  */
76
217
  permissions?: string[]
77
218
  /**
78
219
  * 读取权限类型(查询用户是否已经做过授权操作的接口使用),具体枚举值查看下文的枚举列表
79
220
  * eg. ["1","2"]
221
+ * @since HealthKit 5.18.3
80
222
  */
81
223
  readPermissions?: string[]
82
224
  /**
83
225
  * 写入权限类型(查询用户是否已经做过授权操作的接口使用),具体枚举值查看下文的枚举列表
84
226
  * eg. ["1","2"]
227
+ * @since HealthKit 5.18.3
85
228
  */
86
229
  writePermissions?: string[]
87
- /** 写入权限类型(查询是否有写权限的接口使用),具体枚举值查看下文的枚举列表 */
230
+ /**
231
+ * 写入权限类型(查询是否有写权限的接口使用),具体枚举值查看下文的枚举列表
232
+ * @since HealthKit 5.18.3
233
+ */
88
234
  writePermission?: number
89
- /** 写入值 */
235
+ /**
236
+ * 写入数值(Quantity 或 Category 类型数据的具体测量值)
237
+ * @since HealthKit 5.18.3
238
+ */
90
239
  value?: number
91
240
  /**
92
241
  * 传入单位 比如"mg/dL","g","cm","count",查询和写入Quantity类型数据时需要
93
242
  * 数据类型对应单位可参考苹果官方的HKTypeIdentifiers.h文件
243
+ * @since HealthKit 5.18.3
94
244
  */
95
245
  unitType?: string
96
- /** 开始时间,秒级时间戳 */
246
+ /**
247
+ * 开始时间,秒级时间戳
248
+ * @since HealthKit 5.18.3
249
+ */
97
250
  startTime?: number
98
- /** 结束时间,秒级时间戳 */
251
+ /**
252
+ * 结束时间,秒级时间戳
253
+ * @since HealthKit 5.18.3
254
+ */
99
255
  endTime?: number
100
- /** 需要读写的数据类型(读写数据的接口使用),具体枚举值查看下文的枚举列表 */
256
+ /**
257
+ * 需要读写的数据类型(读写数据的接口使用),具体枚举值查看下文的枚举列表
258
+ * @since HealthKit 5.18.3
259
+ */
101
260
  type?: number
261
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
262
+ complete?: () => void
263
+ /** 接口调用成功的回调函数 */
102
264
  success?: (params: {
103
265
  /**
104
- * 1 代表传入的类型都申请过对应的读写权限
105
- * 0 代表传入的类型至少有一个没有请求过对应的读写权限
266
+ * 授权状态:1 表示传入类型均已申请过对应读写权限;0 表示至少有一项未申请
267
+ * @since HealthKit 5.18.4
106
268
  */
107
269
  value: number
108
270
  }) => void
271
+ /** 接口调用失败的回调函数 */
109
272
  fail?: (params: {
273
+ /** 错误信息 */
110
274
  errorMsg: string
275
+ /** 错误码 */
111
276
  errorCode: string | number
277
+ /** 错误扩展 */
112
278
  innerError: {
279
+ /** 错误扩展码 */
113
280
  errorCode: string | number
281
+ /** 错误扩展信息 */
114
282
  errorMsg: string
115
283
  }
116
284
  }) => void
117
- complete?: () => void
118
285
  }): void
119
286
 
120
287
  /**
121
- *@description 用户是否已经做过授权操作(针对Quantity类型数据)[iOS only]
122
- *需要参数为readPermissions,writePermissions
123
- *@error {1: 'AppleHealthParamsError'}*/
288
+ * 查询用户是否已对 Quantity 类型数据完成读写授权 [iOS only]
289
+ * @public
290
+ * @since HealthKit 5.18.3
291
+ * @platform iOS
292
+ * @error {1} AppleHealthParamsError
293
+ */
124
294
  export function authStatusPermissionsSync(paramModel?: ParamModel): {
125
295
  /**
126
- * 1 代表传入的类型都申请过对应的读写权限
127
- * 0 代表传入的类型至少有一个没有请求过对应的读写权限
296
+ * 授权状态:1 表示传入类型均已申请过对应读写权限;0 表示至少有一项未申请
297
+ * @since HealthKit 5.18.4
128
298
  */
129
299
  value: number
130
300
  }
131
301
 
132
302
  /**
133
- *@description 用户是否有Quantity类型数据写入权限[iOS only]
134
- *需要参数为writePermission
135
- *@error {1: 'AppleHealthParamsError'}*/
303
+ * 查询用户是否拥有指定 Quantity 类型的写入权限 [iOS only]
304
+ * @public
305
+ * @since HealthKit 5.18.3
306
+ * @platform iOS
307
+ * @error {1} AppleHealthParamsError
308
+ */
136
309
  export function getSaveQuantityPermission(params?: {
137
310
  /**
138
311
  * 权限类型(申请读写权限的接口使用),具体枚举值查看下文的枚举列表
139
312
  * eg. ["1","2"]
313
+ * @since HealthKit 5.18.3
140
314
  */
141
315
  permissions?: string[]
142
316
  /**
143
317
  * 读取权限类型(查询用户是否已经做过授权操作的接口使用),具体枚举值查看下文的枚举列表
144
318
  * eg. ["1","2"]
319
+ * @since HealthKit 5.18.3
145
320
  */
146
321
  readPermissions?: string[]
147
322
  /**
148
323
  * 写入权限类型(查询用户是否已经做过授权操作的接口使用),具体枚举值查看下文的枚举列表
149
324
  * eg. ["1","2"]
325
+ * @since HealthKit 5.18.3
150
326
  */
151
327
  writePermissions?: string[]
152
- /** 写入权限类型(查询是否有写权限的接口使用),具体枚举值查看下文的枚举列表 */
328
+ /**
329
+ * 写入权限类型(查询是否有写权限的接口使用),具体枚举值查看下文的枚举列表
330
+ * @since HealthKit 5.18.3
331
+ */
153
332
  writePermission?: number
154
- /** 写入值 */
333
+ /**
334
+ * 写入数值(Quantity 或 Category 类型数据的具体测量值)
335
+ * @since HealthKit 5.18.3
336
+ */
155
337
  value?: number
156
338
  /**
157
339
  * 传入单位 比如"mg/dL","g","cm","count",查询和写入Quantity类型数据时需要
158
340
  * 数据类型对应单位可参考苹果官方的HKTypeIdentifiers.h文件
341
+ * @since HealthKit 5.18.3
159
342
  */
160
343
  unitType?: string
161
- /** 开始时间,秒级时间戳 */
344
+ /**
345
+ * 开始时间,秒级时间戳
346
+ * @since HealthKit 5.18.3
347
+ */
162
348
  startTime?: number
163
- /** 结束时间,秒级时间戳 */
349
+ /**
350
+ * 结束时间,秒级时间戳
351
+ * @since HealthKit 5.18.3
352
+ */
164
353
  endTime?: number
165
- /** 需要读写的数据类型(读写数据的接口使用),具体枚举值查看下文的枚举列表 */
354
+ /**
355
+ * 需要读写的数据类型(读写数据的接口使用),具体枚举值查看下文的枚举列表
356
+ * @since HealthKit 5.18.3
357
+ */
166
358
  type?: number
359
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
360
+ complete?: () => void
361
+ /** 接口调用成功的回调函数 */
167
362
  success?: (params: {
168
363
  /**
169
- * 1 有写入权限
170
- * 0 无写入权限
364
+ * 写入权限状态:1 有写入权限;0 无写入权限
365
+ * @since HealthKit 5.18.4
171
366
  */
172
367
  value: number
173
368
  }) => void
369
+ /** 接口调用失败的回调函数 */
174
370
  fail?: (params: {
371
+ /** 错误信息 */
175
372
  errorMsg: string
373
+ /** 错误码 */
176
374
  errorCode: string | number
375
+ /** 错误扩展 */
177
376
  innerError: {
377
+ /** 错误扩展码 */
178
378
  errorCode: string | number
379
+ /** 错误扩展信息 */
179
380
  errorMsg: string
180
381
  }
181
382
  }) => void
182
- complete?: () => void
183
383
  }): void
184
384
 
185
385
  /**
186
- *@description 用户是否有Quantity类型数据写入权限[iOS only]
187
- *需要参数为writePermission
188
- *@error {1: 'AppleHealthParamsError'}*/
386
+ * 查询用户是否拥有指定 Quantity 类型的写入权限 [iOS only]
387
+ * @public
388
+ * @since HealthKit 5.18.3
389
+ * @platform iOS
390
+ * @error {1} AppleHealthParamsError
391
+ */
189
392
  export function getSaveQuantityPermissionSync(paramModel?: ParamModel): {
190
393
  /**
191
- * 1 有写入权限
192
- * 0 无写入权限
394
+ * 写入权限状态:1 有写入权限;0 无写入权限
395
+ * @since HealthKit 5.18.4
193
396
  */
194
397
  value: number
195
398
  }
196
399
 
197
400
  /**
198
- *@description Quantity写入权限申请接口[iOS only]
199
- *需要参数为permissions
200
- *@error {1: 'AppleHealthParamsError'}*/
401
+ * 申请 Quantity 类型数据的写入权限 [iOS only]
402
+ * @public
403
+ * @since HealthKit 5.18.3
404
+ * @platform iOS
405
+ * @error {1} AppleHealthParamsError
406
+ */
201
407
  export function authQuantityWritePermissions(params?: {
202
408
  /**
203
409
  * 权限类型(申请读写权限的接口使用),具体枚举值查看下文的枚举列表
204
410
  * eg. ["1","2"]
411
+ * @since HealthKit 5.18.3
205
412
  */
206
413
  permissions?: string[]
207
414
  /**
208
415
  * 读取权限类型(查询用户是否已经做过授权操作的接口使用),具体枚举值查看下文的枚举列表
209
416
  * eg. ["1","2"]
417
+ * @since HealthKit 5.18.3
210
418
  */
211
419
  readPermissions?: string[]
212
420
  /**
213
421
  * 写入权限类型(查询用户是否已经做过授权操作的接口使用),具体枚举值查看下文的枚举列表
214
422
  * eg. ["1","2"]
423
+ * @since HealthKit 5.18.3
215
424
  */
216
425
  writePermissions?: string[]
217
- /** 写入权限类型(查询是否有写权限的接口使用),具体枚举值查看下文的枚举列表 */
426
+ /**
427
+ * 写入权限类型(查询是否有写权限的接口使用),具体枚举值查看下文的枚举列表
428
+ * @since HealthKit 5.18.3
429
+ */
218
430
  writePermission?: number
219
- /** 写入值 */
431
+ /**
432
+ * 写入数值(Quantity 或 Category 类型数据的具体测量值)
433
+ * @since HealthKit 5.18.3
434
+ */
220
435
  value?: number
221
436
  /**
222
437
  * 传入单位 比如"mg/dL","g","cm","count",查询和写入Quantity类型数据时需要
223
438
  * 数据类型对应单位可参考苹果官方的HKTypeIdentifiers.h文件
439
+ * @since HealthKit 5.18.3
224
440
  */
225
441
  unitType?: string
226
- /** 开始时间,秒级时间戳 */
442
+ /**
443
+ * 开始时间,秒级时间戳
444
+ * @since HealthKit 5.18.3
445
+ */
227
446
  startTime?: number
228
- /** 结束时间,秒级时间戳 */
447
+ /**
448
+ * 结束时间,秒级时间戳
449
+ * @since HealthKit 5.18.3
450
+ */
229
451
  endTime?: number
230
- /** 需要读写的数据类型(读写数据的接口使用),具体枚举值查看下文的枚举列表 */
452
+ /**
453
+ * 需要读写的数据类型(读写数据的接口使用),具体枚举值查看下文的枚举列表
454
+ * @since HealthKit 5.18.3
455
+ */
231
456
  type?: number
457
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
458
+ complete?: () => void
459
+ /** 接口调用成功的回调函数 */
232
460
  success?: (params: null) => void
461
+ /** 接口调用失败的回调函数 */
233
462
  fail?: (params: {
463
+ /** 错误信息 */
234
464
  errorMsg: string
465
+ /** 错误码 */
235
466
  errorCode: string | number
467
+ /** 错误扩展 */
236
468
  innerError: {
469
+ /** 错误扩展码 */
237
470
  errorCode: string | number
471
+ /** 错误扩展信息 */
238
472
  errorMsg: string
239
473
  }
240
474
  }) => void
241
- complete?: () => void
242
475
  }): void
243
476
 
244
477
  /**
245
- *@description Quantity写入权限申请接口[iOS only]
246
- *需要参数为permissions
247
- *@error {1: 'AppleHealthParamsError'}*/
248
- export function authQuantityWritePermissionsSync(paramModel?: ParamModel): null
478
+ * 申请 Quantity 类型数据的写入权限 [iOS only]
479
+ * @public
480
+ * @since HealthKit 5.18.3
481
+ * @platform iOS
482
+ * @error {1} AppleHealthParamsError
483
+ */
484
+ export function authQuantityWritePermissionsSync(
485
+ paramModel?: ParamModel
486
+ ): null
249
487
 
250
488
  /**
251
- *@description Category写入权限申请接口[iOS only]
252
- *需要参数为permissions
253
- *@error {1: 'AppleHealthParamsError'}*/
489
+ * 申请 Category 类型数据的写入权限 [iOS only]
490
+ * @public
491
+ * @since HealthKit 5.18.0
492
+ * @platform iOS
493
+ * @error {1} AppleHealthParamsError
494
+ */
254
495
  export function authCategoryWritePermissions(params?: {
255
496
  /**
256
497
  * 权限类型(申请读写权限的接口使用),具体枚举值查看下文的枚举列表
257
498
  * eg. ["1","2"]
499
+ * @since HealthKit 5.18.3
258
500
  */
259
501
  permissions?: string[]
260
502
  /**
261
503
  * 读取权限类型(查询用户是否已经做过授权操作的接口使用),具体枚举值查看下文的枚举列表
262
504
  * eg. ["1","2"]
505
+ * @since HealthKit 5.18.3
263
506
  */
264
507
  readPermissions?: string[]
265
508
  /**
266
509
  * 写入权限类型(查询用户是否已经做过授权操作的接口使用),具体枚举值查看下文的枚举列表
267
510
  * eg. ["1","2"]
511
+ * @since HealthKit 5.18.3
268
512
  */
269
513
  writePermissions?: string[]
270
- /** 写入权限类型(查询是否有写权限的接口使用),具体枚举值查看下文的枚举列表 */
514
+ /**
515
+ * 写入权限类型(查询是否有写权限的接口使用),具体枚举值查看下文的枚举列表
516
+ * @since HealthKit 5.18.3
517
+ */
271
518
  writePermission?: number
272
- /** 写入值 */
519
+ /**
520
+ * 写入数值(Quantity 或 Category 类型数据的具体测量值)
521
+ * @since HealthKit 5.18.3
522
+ */
273
523
  value?: number
274
524
  /**
275
525
  * 传入单位 比如"mg/dL","g","cm","count",查询和写入Quantity类型数据时需要
276
526
  * 数据类型对应单位可参考苹果官方的HKTypeIdentifiers.h文件
527
+ * @since HealthKit 5.18.3
277
528
  */
278
529
  unitType?: string
279
- /** 开始时间,秒级时间戳 */
530
+ /**
531
+ * 开始时间,秒级时间戳
532
+ * @since HealthKit 5.18.3
533
+ */
280
534
  startTime?: number
281
- /** 结束时间,秒级时间戳 */
535
+ /**
536
+ * 结束时间,秒级时间戳
537
+ * @since HealthKit 5.18.3
538
+ */
282
539
  endTime?: number
283
- /** 需要读写的数据类型(读写数据的接口使用),具体枚举值查看下文的枚举列表 */
540
+ /**
541
+ * 需要读写的数据类型(读写数据的接口使用),具体枚举值查看下文的枚举列表
542
+ * @since HealthKit 5.18.3
543
+ */
284
544
  type?: number
545
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
546
+ complete?: () => void
547
+ /** 接口调用成功的回调函数 */
285
548
  success?: (params: null) => void
549
+ /** 接口调用失败的回调函数 */
286
550
  fail?: (params: {
551
+ /** 错误信息 */
287
552
  errorMsg: string
553
+ /** 错误码 */
288
554
  errorCode: string | number
555
+ /** 错误扩展 */
289
556
  innerError: {
557
+ /** 错误扩展码 */
290
558
  errorCode: string | number
559
+ /** 错误扩展信息 */
291
560
  errorMsg: string
292
561
  }
293
562
  }) => void
294
- complete?: () => void
295
563
  }): void
296
564
 
297
565
  /**
298
- *@description Category写入权限申请接口[iOS only]
299
- *需要参数为permissions
300
- *@error {1: 'AppleHealthParamsError'}*/
301
- export function authCategoryWritePermissionsSync(paramModel?: ParamModel): null
566
+ * 申请 Category 类型数据的写入权限 [iOS only]
567
+ * @public
568
+ * @since HealthKit 5.18.0
569
+ * @platform iOS
570
+ * @error {1} AppleHealthParamsError
571
+ */
572
+ export function authCategoryWritePermissionsSync(
573
+ paramModel?: ParamModel
574
+ ): null
302
575
 
303
576
  /**
304
- *@description Quantity读取权限申请[iOS only]
305
- *需要参数为permissions
306
- *@error {1: 'AppleHealthParamsError'}*/
577
+ * 申请 Quantity 类型数据的读取权限 [iOS only]
578
+ * @public
579
+ * @since HealthKit 5.18.3
580
+ * @platform iOS
581
+ * @error {1} AppleHealthParamsError
582
+ */
307
583
  export function authQuantityReadPermissions(params?: {
308
584
  /**
309
585
  * 权限类型(申请读写权限的接口使用),具体枚举值查看下文的枚举列表
310
586
  * eg. ["1","2"]
587
+ * @since HealthKit 5.18.3
311
588
  */
312
589
  permissions?: string[]
313
590
  /**
314
591
  * 读取权限类型(查询用户是否已经做过授权操作的接口使用),具体枚举值查看下文的枚举列表
315
592
  * eg. ["1","2"]
593
+ * @since HealthKit 5.18.3
316
594
  */
317
595
  readPermissions?: string[]
318
596
  /**
319
597
  * 写入权限类型(查询用户是否已经做过授权操作的接口使用),具体枚举值查看下文的枚举列表
320
598
  * eg. ["1","2"]
599
+ * @since HealthKit 5.18.3
321
600
  */
322
601
  writePermissions?: string[]
323
- /** 写入权限类型(查询是否有写权限的接口使用),具体枚举值查看下文的枚举列表 */
602
+ /**
603
+ * 写入权限类型(查询是否有写权限的接口使用),具体枚举值查看下文的枚举列表
604
+ * @since HealthKit 5.18.3
605
+ */
324
606
  writePermission?: number
325
- /** 写入值 */
607
+ /**
608
+ * 写入数值(Quantity 或 Category 类型数据的具体测量值)
609
+ * @since HealthKit 5.18.3
610
+ */
326
611
  value?: number
327
612
  /**
328
613
  * 传入单位 比如"mg/dL","g","cm","count",查询和写入Quantity类型数据时需要
329
614
  * 数据类型对应单位可参考苹果官方的HKTypeIdentifiers.h文件
615
+ * @since HealthKit 5.18.3
330
616
  */
331
617
  unitType?: string
332
- /** 开始时间,秒级时间戳 */
618
+ /**
619
+ * 开始时间,秒级时间戳
620
+ * @since HealthKit 5.18.3
621
+ */
333
622
  startTime?: number
334
- /** 结束时间,秒级时间戳 */
623
+ /**
624
+ * 结束时间,秒级时间戳
625
+ * @since HealthKit 5.18.3
626
+ */
335
627
  endTime?: number
336
- /** 需要读写的数据类型(读写数据的接口使用),具体枚举值查看下文的枚举列表 */
628
+ /**
629
+ * 需要读写的数据类型(读写数据的接口使用),具体枚举值查看下文的枚举列表
630
+ * @since HealthKit 5.18.3
631
+ */
337
632
  type?: number
633
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
634
+ complete?: () => void
635
+ /** 接口调用成功的回调函数 */
338
636
  success?: (params: null) => void
637
+ /** 接口调用失败的回调函数 */
339
638
  fail?: (params: {
639
+ /** 错误信息 */
340
640
  errorMsg: string
641
+ /** 错误码 */
341
642
  errorCode: string | number
643
+ /** 错误扩展 */
342
644
  innerError: {
645
+ /** 错误扩展码 */
343
646
  errorCode: string | number
647
+ /** 错误扩展信息 */
344
648
  errorMsg: string
345
649
  }
346
650
  }) => void
347
- complete?: () => void
348
651
  }): void
349
652
 
350
653
  /**
351
- *@description Quantity读取权限申请[iOS only]
352
- *需要参数为permissions
353
- *@error {1: 'AppleHealthParamsError'}*/
654
+ * 申请 Quantity 类型数据的读取权限 [iOS only]
655
+ * @public
656
+ * @since HealthKit 5.18.3
657
+ * @platform iOS
658
+ * @error {1} AppleHealthParamsError
659
+ */
354
660
  export function authQuantityReadPermissionsSync(paramModel?: ParamModel): null
355
661
 
356
662
  /**
357
- *@description Category 读取权限申请[iOS only]
358
- *需要参数为permissions
359
- *@error {1: 'AppleHealthParamsError'}*/
663
+ * 申请 Category 类型数据的读取权限 [iOS only]
664
+ * @public
665
+ * @since HealthKit 5.18.0
666
+ * @platform iOS
667
+ * @error {1} AppleHealthParamsError
668
+ */
360
669
  export function authCategoryReadPermissions(params?: {
361
670
  /**
362
671
  * 权限类型(申请读写权限的接口使用),具体枚举值查看下文的枚举列表
363
672
  * eg. ["1","2"]
673
+ * @since HealthKit 5.18.3
364
674
  */
365
675
  permissions?: string[]
366
676
  /**
367
677
  * 读取权限类型(查询用户是否已经做过授权操作的接口使用),具体枚举值查看下文的枚举列表
368
678
  * eg. ["1","2"]
679
+ * @since HealthKit 5.18.3
369
680
  */
370
681
  readPermissions?: string[]
371
682
  /**
372
683
  * 写入权限类型(查询用户是否已经做过授权操作的接口使用),具体枚举值查看下文的枚举列表
373
684
  * eg. ["1","2"]
685
+ * @since HealthKit 5.18.3
374
686
  */
375
687
  writePermissions?: string[]
376
- /** 写入权限类型(查询是否有写权限的接口使用),具体枚举值查看下文的枚举列表 */
688
+ /**
689
+ * 写入权限类型(查询是否有写权限的接口使用),具体枚举值查看下文的枚举列表
690
+ * @since HealthKit 5.18.3
691
+ */
377
692
  writePermission?: number
378
- /** 写入值 */
693
+ /**
694
+ * 写入数值(Quantity 或 Category 类型数据的具体测量值)
695
+ * @since HealthKit 5.18.3
696
+ */
379
697
  value?: number
380
698
  /**
381
699
  * 传入单位 比如"mg/dL","g","cm","count",查询和写入Quantity类型数据时需要
382
700
  * 数据类型对应单位可参考苹果官方的HKTypeIdentifiers.h文件
701
+ * @since HealthKit 5.18.3
383
702
  */
384
703
  unitType?: string
385
- /** 开始时间,秒级时间戳 */
704
+ /**
705
+ * 开始时间,秒级时间戳
706
+ * @since HealthKit 5.18.3
707
+ */
386
708
  startTime?: number
387
- /** 结束时间,秒级时间戳 */
709
+ /**
710
+ * 结束时间,秒级时间戳
711
+ * @since HealthKit 5.18.3
712
+ */
388
713
  endTime?: number
389
- /** 需要读写的数据类型(读写数据的接口使用),具体枚举值查看下文的枚举列表 */
714
+ /**
715
+ * 需要读写的数据类型(读写数据的接口使用),具体枚举值查看下文的枚举列表
716
+ * @since HealthKit 5.18.3
717
+ */
390
718
  type?: number
719
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
720
+ complete?: () => void
721
+ /** 接口调用成功的回调函数 */
391
722
  success?: (params: null) => void
723
+ /** 接口调用失败的回调函数 */
392
724
  fail?: (params: {
725
+ /** 错误信息 */
393
726
  errorMsg: string
727
+ /** 错误码 */
394
728
  errorCode: string | number
729
+ /** 错误扩展 */
395
730
  innerError: {
731
+ /** 错误扩展码 */
396
732
  errorCode: string | number
733
+ /** 错误扩展信息 */
397
734
  errorMsg: string
398
735
  }
399
736
  }) => void
400
- complete?: () => void
401
737
  }): void
402
738
 
403
739
  /**
404
- *@description Category 读取权限申请[iOS only]
405
- *需要参数为permissions
406
- *@error {1: 'AppleHealthParamsError'}*/
740
+ * 申请 Category 类型数据的读取权限 [iOS only]
741
+ * @public
742
+ * @since HealthKit 5.18.0
743
+ * @platform iOS
744
+ * @error {1} AppleHealthParamsError
745
+ */
407
746
  export function authCategoryReadPermissionsSync(paramModel?: ParamModel): null
408
747
 
409
748
  /**
410
- *@description Characteristic 读取权限申请[iOS only]
411
- *需要参数为permissions
412
- *@error {1: 'AppleHealthParamsError'}*/
749
+ * 申请 Characteristic 类型数据的读取权限 [iOS only]
750
+ * @public
751
+ * @since HealthKit 5.18.0
752
+ * @platform iOS
753
+ * @error {1} AppleHealthParamsError
754
+ */
413
755
  export function authCharacteristicReadPermissions(params?: {
414
756
  /**
415
757
  * 权限类型(申请读写权限的接口使用),具体枚举值查看下文的枚举列表
416
758
  * eg. ["1","2"]
759
+ * @since HealthKit 5.18.3
417
760
  */
418
761
  permissions?: string[]
419
762
  /**
420
763
  * 读取权限类型(查询用户是否已经做过授权操作的接口使用),具体枚举值查看下文的枚举列表
421
764
  * eg. ["1","2"]
765
+ * @since HealthKit 5.18.3
422
766
  */
423
767
  readPermissions?: string[]
424
768
  /**
425
769
  * 写入权限类型(查询用户是否已经做过授权操作的接口使用),具体枚举值查看下文的枚举列表
426
770
  * eg. ["1","2"]
771
+ * @since HealthKit 5.18.3
427
772
  */
428
773
  writePermissions?: string[]
429
- /** 写入权限类型(查询是否有写权限的接口使用),具体枚举值查看下文的枚举列表 */
774
+ /**
775
+ * 写入权限类型(查询是否有写权限的接口使用),具体枚举值查看下文的枚举列表
776
+ * @since HealthKit 5.18.3
777
+ */
430
778
  writePermission?: number
431
- /** 写入值 */
779
+ /**
780
+ * 写入数值(Quantity 或 Category 类型数据的具体测量值)
781
+ * @since HealthKit 5.18.3
782
+ */
432
783
  value?: number
433
784
  /**
434
785
  * 传入单位 比如"mg/dL","g","cm","count",查询和写入Quantity类型数据时需要
435
786
  * 数据类型对应单位可参考苹果官方的HKTypeIdentifiers.h文件
787
+ * @since HealthKit 5.18.3
436
788
  */
437
789
  unitType?: string
438
- /** 开始时间,秒级时间戳 */
790
+ /**
791
+ * 开始时间,秒级时间戳
792
+ * @since HealthKit 5.18.3
793
+ */
439
794
  startTime?: number
440
- /** 结束时间,秒级时间戳 */
795
+ /**
796
+ * 结束时间,秒级时间戳
797
+ * @since HealthKit 5.18.3
798
+ */
441
799
  endTime?: number
442
- /** 需要读写的数据类型(读写数据的接口使用),具体枚举值查看下文的枚举列表 */
800
+ /**
801
+ * 需要读写的数据类型(读写数据的接口使用),具体枚举值查看下文的枚举列表
802
+ * @since HealthKit 5.18.3
803
+ */
443
804
  type?: number
805
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
806
+ complete?: () => void
807
+ /** 接口调用成功的回调函数 */
808
+ success?: (params: null) => void
809
+ /** 接口调用失败的回调函数 */
810
+ fail?: (params: {
811
+ /** 错误信息 */
812
+ errorMsg: string
813
+ /** 错误码 */
814
+ errorCode: string | number
815
+ /** 错误扩展 */
816
+ innerError: {
817
+ /** 错误扩展码 */
818
+ errorCode: string | number
819
+ /** 错误扩展信息 */
820
+ errorMsg: string
821
+ }
822
+ }) => void
823
+ }): void
824
+
825
+ /**
826
+ * 申请 Characteristic 类型数据的读取权限 [iOS only]
827
+ * @public
828
+ * @since HealthKit 5.18.0
829
+ * @platform iOS
830
+ * @error {1} AppleHealthParamsError
831
+ */
832
+ export function authCharacteristicReadPermissionsSync(
833
+ paramModel?: ParamModel
834
+ ): null
835
+
836
+ /**
837
+ * 批量申请 Quantity、Category、Characteristic 的读取权限 [iOS only]
838
+ * @public
839
+ * @since HealthKit 7.1.5
840
+ * @platform Android
841
+ * @error {1} AppleHealthParamsError
842
+ */
843
+ export function authiOSAllReadPermissions(params: {
844
+ /**
845
+ * Quantity 类型权限或数据参数
846
+ * @since HealthKit 7.1.5
847
+ */
848
+ quantityParam?: ParamModel
849
+ /**
850
+ * Category 类型权限或数据参数
851
+ * @since HealthKit 7.1.5
852
+ */
853
+ categoryParam?: ParamModel
854
+ /**
855
+ * Characteristic 类型权限或数据参数
856
+ * @since HealthKit 7.1.5
857
+ */
858
+ characteristicParam?: ParamModel
859
+ /**
860
+ * 是否包含运动记录(Workout)相关权限或数据
861
+ * @since HealthKit 7.1.5
862
+ */
863
+ workoutType: boolean
864
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
865
+ complete?: () => void
866
+ /** 接口调用成功的回调函数 */
444
867
  success?: (params: null) => void
868
+ /** 接口调用失败的回调函数 */
869
+ fail?: (params: {
870
+ /** 错误信息 */
871
+ errorMsg: string
872
+ /** 错误码 */
873
+ errorCode: string | number
874
+ /** 错误扩展 */
875
+ innerError: {
876
+ /** 错误扩展码 */
877
+ errorCode: string | number
878
+ /** 错误扩展信息 */
879
+ errorMsg: string
880
+ }
881
+ }) => void
882
+ }): void
883
+
884
+ /**
885
+ * 批量申请 Quantity、Category、Characteristic 的读取权限 [iOS only]
886
+ * @public
887
+ * @since HealthKit 7.1.5
888
+ * @platform Android
889
+ * @error {1} AppleHealthParamsError
890
+ */
891
+ export function authiOSAllReadPermissionsSync(
892
+ paramModel?: IOSParamModel
893
+ ): null
894
+
895
+ /**
896
+ * 批量查询 Quantity、Category、Characteristic 是否已完成读取授权 [iOS only]
897
+ * @public
898
+ * @since HealthKit 7.1.5
899
+ * @platform Android
900
+ * @error {1} AppleHealthParamsError
901
+ */
902
+ export function authiOSAllStatuPermissions(params: {
903
+ /**
904
+ * Quantity 类型权限或数据参数
905
+ * @since HealthKit 7.1.5
906
+ */
907
+ quantityParam?: ParamModel
908
+ /**
909
+ * Category 类型权限或数据参数
910
+ * @since HealthKit 7.1.5
911
+ */
912
+ categoryParam?: ParamModel
913
+ /**
914
+ * Characteristic 类型权限或数据参数
915
+ * @since HealthKit 7.1.5
916
+ */
917
+ characteristicParam?: ParamModel
918
+ /**
919
+ * 是否包含运动记录(Workout)相关权限或数据
920
+ * @since HealthKit 7.1.5
921
+ */
922
+ workoutType: boolean
923
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
924
+ complete?: () => void
925
+ /** 接口调用成功的回调函数 */
926
+ success?: (params: {
927
+ /**
928
+ * 授权状态:1 表示传入类型均已申请过对应读写权限;0 表示至少有一项未申请
929
+ * @since HealthKit 7.1.5
930
+ */
931
+ value: number
932
+ }) => void
933
+ /** 接口调用失败的回调函数 */
445
934
  fail?: (params: {
935
+ /** 错误信息 */
446
936
  errorMsg: string
937
+ /** 错误码 */
447
938
  errorCode: string | number
939
+ /** 错误扩展 */
448
940
  innerError: {
941
+ /** 错误扩展码 */
449
942
  errorCode: string | number
943
+ /** 错误扩展信息 */
450
944
  errorMsg: string
451
945
  }
452
946
  }) => void
947
+ }): void
948
+
949
+ /**
950
+ * 批量查询 Quantity、Category、Characteristic 是否已完成读取授权 [iOS only]
951
+ * @public
952
+ * @since HealthKit 7.1.5
953
+ * @platform Android
954
+ * @error {1} AppleHealthParamsError
955
+ */
956
+ export function authiOSAllStatuPermissionsSync(paramModel?: IOSParamModel): {
957
+ /**
958
+ * 授权状态:1 表示传入类型均已申请过对应读写权限;0 表示至少有一项未申请
959
+ * @since HealthKit 7.1.5
960
+ */
961
+ value: number
962
+ }
963
+
964
+ /**
965
+ * 将健康记录批量写入 iOS HealthKit [iOS only]
966
+ * @public
967
+ * @since HealthKit 7.1.5
968
+ * @platform iOS
969
+ * @error {1} AppleHealthParamsError
970
+ */
971
+ export function insertiOSRecords(params: {
972
+ /**
973
+ * RecordData数据列表的json array字符串
974
+ * @since HealthKit 7.1.5
975
+ */
976
+ request: string
977
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
453
978
  complete?: () => void
979
+ /** 接口调用成功的回调函数 */
980
+ success?: (params: boolean) => void
981
+ /** 接口调用失败的回调函数 */
982
+ fail?: (params: {
983
+ /** 错误信息 */
984
+ errorMsg: string
985
+ /** 错误码 */
986
+ errorCode: string | number
987
+ /** 错误扩展 */
988
+ innerError: {
989
+ /** 错误扩展码 */
990
+ errorCode: string | number
991
+ /** 错误扩展信息 */
992
+ errorMsg: string
993
+ }
994
+ }) => void
454
995
  }): void
455
996
 
456
997
  /**
457
- *@description Characteristic 读取权限申请[iOS only]
458
- *需要参数为permissions
459
- *@error {1: 'AppleHealthParamsError'}*/
460
- export function authCharacteristicReadPermissionsSync(paramModel?: ParamModel): null
998
+ * 将健康记录批量写入 iOS HealthKit [iOS only]
999
+ * @public
1000
+ * @since HealthKit 7.1.5
1001
+ * @platform iOS
1002
+ * @error {1} AppleHealthParamsError
1003
+ */
1004
+ export function insertiOSRecordsSync(request?: RecordIOSParams): boolean
461
1005
 
462
1006
  /**
463
- *@description Quantity读写权限申请[iOS only]
464
- *需要参数为permissions
465
- *@error {1: 'AppleHealthParamsError'}*/
1007
+ * 申请 Quantity 类型数据的读写权限 [iOS only]
1008
+ * @public
1009
+ * @since HealthKit 5.18.3
1010
+ * @platform iOS
1011
+ * @error {1} AppleHealthParamsError
1012
+ */
466
1013
  export function authQuantityRWPermissions(params?: {
467
1014
  /**
468
1015
  * 权限类型(申请读写权限的接口使用),具体枚举值查看下文的枚举列表
469
1016
  * eg. ["1","2"]
1017
+ * @since HealthKit 5.18.3
470
1018
  */
471
1019
  permissions?: string[]
472
1020
  /**
473
1021
  * 读取权限类型(查询用户是否已经做过授权操作的接口使用),具体枚举值查看下文的枚举列表
474
1022
  * eg. ["1","2"]
1023
+ * @since HealthKit 5.18.3
475
1024
  */
476
1025
  readPermissions?: string[]
477
1026
  /**
478
1027
  * 写入权限类型(查询用户是否已经做过授权操作的接口使用),具体枚举值查看下文的枚举列表
479
1028
  * eg. ["1","2"]
1029
+ * @since HealthKit 5.18.3
480
1030
  */
481
1031
  writePermissions?: string[]
482
- /** 写入权限类型(查询是否有写权限的接口使用),具体枚举值查看下文的枚举列表 */
1032
+ /**
1033
+ * 写入权限类型(查询是否有写权限的接口使用),具体枚举值查看下文的枚举列表
1034
+ * @since HealthKit 5.18.3
1035
+ */
483
1036
  writePermission?: number
484
- /** 写入值 */
1037
+ /**
1038
+ * 写入数值(Quantity 或 Category 类型数据的具体测量值)
1039
+ * @since HealthKit 5.18.3
1040
+ */
485
1041
  value?: number
486
1042
  /**
487
1043
  * 传入单位 比如"mg/dL","g","cm","count",查询和写入Quantity类型数据时需要
488
1044
  * 数据类型对应单位可参考苹果官方的HKTypeIdentifiers.h文件
1045
+ * @since HealthKit 5.18.3
489
1046
  */
490
1047
  unitType?: string
491
- /** 开始时间,秒级时间戳 */
1048
+ /**
1049
+ * 开始时间,秒级时间戳
1050
+ * @since HealthKit 5.18.3
1051
+ */
492
1052
  startTime?: number
493
- /** 结束时间,秒级时间戳 */
1053
+ /**
1054
+ * 结束时间,秒级时间戳
1055
+ * @since HealthKit 5.18.3
1056
+ */
494
1057
  endTime?: number
495
- /** 需要读写的数据类型(读写数据的接口使用),具体枚举值查看下文的枚举列表 */
1058
+ /**
1059
+ * 需要读写的数据类型(读写数据的接口使用),具体枚举值查看下文的枚举列表
1060
+ * @since HealthKit 5.18.3
1061
+ */
496
1062
  type?: number
1063
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
1064
+ complete?: () => void
1065
+ /** 接口调用成功的回调函数 */
497
1066
  success?: (params: null) => void
1067
+ /** 接口调用失败的回调函数 */
498
1068
  fail?: (params: {
1069
+ /** 错误信息 */
499
1070
  errorMsg: string
1071
+ /** 错误码 */
500
1072
  errorCode: string | number
1073
+ /** 错误扩展 */
501
1074
  innerError: {
1075
+ /** 错误扩展码 */
502
1076
  errorCode: string | number
1077
+ /** 错误扩展信息 */
503
1078
  errorMsg: string
504
1079
  }
505
1080
  }) => void
506
- complete?: () => void
507
1081
  }): void
508
1082
 
509
1083
  /**
510
- *@description Quantity读写权限申请[iOS only]
511
- *需要参数为permissions
512
- *@error {1: 'AppleHealthParamsError'}*/
1084
+ * 申请 Quantity 类型数据的读写权限 [iOS only]
1085
+ * @public
1086
+ * @since HealthKit 5.18.3
1087
+ * @platform iOS
1088
+ * @error {1} AppleHealthParamsError
1089
+ */
513
1090
  export function authQuantityRWPermissionsSync(paramModel?: ParamModel): null
514
1091
 
515
1092
  /**
516
- *@description Category 读写权限申请[iOS only]
517
- *需要参数为permissions
518
- *@error {1: 'AppleHealthParamsError'}*/
1093
+ * 申请 Category 类型数据的读写权限 [iOS only]
1094
+ * @public
1095
+ * @since HealthKit 5.18.0
1096
+ * @platform iOS
1097
+ * @error {1} AppleHealthParamsError
1098
+ */
519
1099
  export function authCategoryRWPermissions(params?: {
520
1100
  /**
521
1101
  * 权限类型(申请读写权限的接口使用),具体枚举值查看下文的枚举列表
522
1102
  * eg. ["1","2"]
1103
+ * @since HealthKit 5.18.3
523
1104
  */
524
1105
  permissions?: string[]
525
1106
  /**
526
1107
  * 读取权限类型(查询用户是否已经做过授权操作的接口使用),具体枚举值查看下文的枚举列表
527
1108
  * eg. ["1","2"]
1109
+ * @since HealthKit 5.18.3
528
1110
  */
529
1111
  readPermissions?: string[]
530
1112
  /**
531
1113
  * 写入权限类型(查询用户是否已经做过授权操作的接口使用),具体枚举值查看下文的枚举列表
532
1114
  * eg. ["1","2"]
1115
+ * @since HealthKit 5.18.3
533
1116
  */
534
1117
  writePermissions?: string[]
535
- /** 写入权限类型(查询是否有写权限的接口使用),具体枚举值查看下文的枚举列表 */
1118
+ /**
1119
+ * 写入权限类型(查询是否有写权限的接口使用),具体枚举值查看下文的枚举列表
1120
+ * @since HealthKit 5.18.3
1121
+ */
536
1122
  writePermission?: number
537
- /** 写入值 */
1123
+ /**
1124
+ * 写入数值(Quantity 或 Category 类型数据的具体测量值)
1125
+ * @since HealthKit 5.18.3
1126
+ */
538
1127
  value?: number
539
1128
  /**
540
1129
  * 传入单位 比如"mg/dL","g","cm","count",查询和写入Quantity类型数据时需要
541
1130
  * 数据类型对应单位可参考苹果官方的HKTypeIdentifiers.h文件
1131
+ * @since HealthKit 5.18.3
542
1132
  */
543
1133
  unitType?: string
544
- /** 开始时间,秒级时间戳 */
1134
+ /**
1135
+ * 开始时间,秒级时间戳
1136
+ * @since HealthKit 5.18.3
1137
+ */
545
1138
  startTime?: number
546
- /** 结束时间,秒级时间戳 */
1139
+ /**
1140
+ * 结束时间,秒级时间戳
1141
+ * @since HealthKit 5.18.3
1142
+ */
547
1143
  endTime?: number
548
- /** 需要读写的数据类型(读写数据的接口使用),具体枚举值查看下文的枚举列表 */
1144
+ /**
1145
+ * 需要读写的数据类型(读写数据的接口使用),具体枚举值查看下文的枚举列表
1146
+ * @since HealthKit 5.18.3
1147
+ */
549
1148
  type?: number
1149
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
1150
+ complete?: () => void
1151
+ /** 接口调用成功的回调函数 */
550
1152
  success?: (params: null) => void
1153
+ /** 接口调用失败的回调函数 */
551
1154
  fail?: (params: {
1155
+ /** 错误信息 */
552
1156
  errorMsg: string
1157
+ /** 错误码 */
553
1158
  errorCode: string | number
1159
+ /** 错误扩展 */
554
1160
  innerError: {
1161
+ /** 错误扩展码 */
555
1162
  errorCode: string | number
1163
+ /** 错误扩展信息 */
556
1164
  errorMsg: string
557
1165
  }
558
1166
  }) => void
559
- complete?: () => void
560
1167
  }): void
561
1168
 
562
1169
  /**
563
- *@description Category 读写权限申请[iOS only]
564
- *需要参数为permissions
565
- *@error {1: 'AppleHealthParamsError'}*/
1170
+ * 申请 Category 类型数据的读写权限 [iOS only]
1171
+ * @public
1172
+ * @since HealthKit 5.18.0
1173
+ * @platform iOS
1174
+ * @error {1} AppleHealthParamsError
1175
+ */
566
1176
  export function authCategoryRWPermissionsSync(paramModel?: ParamModel): null
567
1177
 
568
1178
  /**
569
- *@description 写入Quantity类型的数据[iOS only]
570
- *需要参数为value,type,unitType,startTime,endTime
571
- *@error {1: 'AppleHealthParamsError'} | {2: 'AppleHealthNoPermission'}*/
1179
+ * 写入 Quantity 类型健康数据(含起止时间) [iOS only]
1180
+ * @public
1181
+ * @since HealthKit 5.18.3
1182
+ * @platform iOS
1183
+ * @error {1} AppleHealthParamsError
1184
+ * @error {2} AppleHealthNoPermission
1185
+ */
572
1186
  export function saveQuantityData(params?: {
573
1187
  /**
574
1188
  * 权限类型(申请读写权限的接口使用),具体枚举值查看下文的枚举列表
575
1189
  * eg. ["1","2"]
1190
+ * @since HealthKit 5.18.3
576
1191
  */
577
1192
  permissions?: string[]
578
1193
  /**
579
1194
  * 读取权限类型(查询用户是否已经做过授权操作的接口使用),具体枚举值查看下文的枚举列表
580
1195
  * eg. ["1","2"]
1196
+ * @since HealthKit 5.18.3
581
1197
  */
582
1198
  readPermissions?: string[]
583
1199
  /**
584
1200
  * 写入权限类型(查询用户是否已经做过授权操作的接口使用),具体枚举值查看下文的枚举列表
585
1201
  * eg. ["1","2"]
1202
+ * @since HealthKit 5.18.3
586
1203
  */
587
1204
  writePermissions?: string[]
588
- /** 写入权限类型(查询是否有写权限的接口使用),具体枚举值查看下文的枚举列表 */
1205
+ /**
1206
+ * 写入权限类型(查询是否有写权限的接口使用),具体枚举值查看下文的枚举列表
1207
+ * @since HealthKit 5.18.3
1208
+ */
589
1209
  writePermission?: number
590
- /** 写入值 */
1210
+ /**
1211
+ * 写入数值(Quantity 或 Category 类型数据的具体测量值)
1212
+ * @since HealthKit 5.18.3
1213
+ */
591
1214
  value?: number
592
1215
  /**
593
1216
  * 传入单位 比如"mg/dL","g","cm","count",查询和写入Quantity类型数据时需要
594
1217
  * 数据类型对应单位可参考苹果官方的HKTypeIdentifiers.h文件
1218
+ * @since HealthKit 5.18.3
595
1219
  */
596
1220
  unitType?: string
597
- /** 开始时间,秒级时间戳 */
1221
+ /**
1222
+ * 开始时间,秒级时间戳
1223
+ * @since HealthKit 5.18.3
1224
+ */
598
1225
  startTime?: number
599
- /** 结束时间,秒级时间戳 */
1226
+ /**
1227
+ * 结束时间,秒级时间戳
1228
+ * @since HealthKit 5.18.3
1229
+ */
600
1230
  endTime?: number
601
- /** 需要读写的数据类型(读写数据的接口使用),具体枚举值查看下文的枚举列表 */
1231
+ /**
1232
+ * 需要读写的数据类型(读写数据的接口使用),具体枚举值查看下文的枚举列表
1233
+ * @since HealthKit 5.18.3
1234
+ */
602
1235
  type?: number
1236
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
1237
+ complete?: () => void
1238
+ /** 接口调用成功的回调函数 */
603
1239
  success?: (params: null) => void
1240
+ /** 接口调用失败的回调函数 */
604
1241
  fail?: (params: {
1242
+ /** 错误信息 */
605
1243
  errorMsg: string
1244
+ /** 错误码 */
606
1245
  errorCode: string | number
1246
+ /** 错误扩展 */
607
1247
  innerError: {
1248
+ /** 错误扩展码 */
608
1249
  errorCode: string | number
1250
+ /** 错误扩展信息 */
609
1251
  errorMsg: string
610
1252
  }
611
1253
  }) => void
612
- complete?: () => void
613
1254
  }): void
614
1255
 
615
1256
  /**
616
- *@description 写入Quantity类型的数据[iOS only]
617
- *需要参数为value,type,unitType,startTime,endTime
618
- *@error {1: 'AppleHealthParamsError'} | {2: 'AppleHealthNoPermission'}*/
1257
+ * 写入 Quantity 类型健康数据(含起止时间) [iOS only]
1258
+ * @public
1259
+ * @since HealthKit 5.18.3
1260
+ * @platform iOS
1261
+ * @error {1} AppleHealthParamsError
1262
+ * @error {2} AppleHealthNoPermission
1263
+ */
619
1264
  export function saveQuantityDataSync(paramModel?: ParamModel): null
620
1265
 
621
1266
  /**
622
- *@description 写入Quantity类型的数据,不用传时间,开始时间和结束时间默认设置为当前时间[iOS only]
623
- *需要参数为value,type,unitType
624
- *@error {1: 'AppleHealthParamsError'} | {2: 'AppleHealthNoPermission'}*/
1267
+ * 写入 Quantity 类型健康数据(不传时间,起止时间默认为当前时刻) [iOS only]
1268
+ * @public
1269
+ * @since HealthKit 5.18.3
1270
+ * @platform iOS
1271
+ * @error {1} AppleHealthParamsError
1272
+ * @error {2} AppleHealthNoPermission
1273
+ */
625
1274
  export function saveQuantityNoTimeWithData(params?: {
626
1275
  /**
627
1276
  * 权限类型(申请读写权限的接口使用),具体枚举值查看下文的枚举列表
628
1277
  * eg. ["1","2"]
1278
+ * @since HealthKit 5.18.3
629
1279
  */
630
1280
  permissions?: string[]
631
1281
  /**
632
1282
  * 读取权限类型(查询用户是否已经做过授权操作的接口使用),具体枚举值查看下文的枚举列表
633
1283
  * eg. ["1","2"]
1284
+ * @since HealthKit 5.18.3
634
1285
  */
635
1286
  readPermissions?: string[]
636
1287
  /**
637
1288
  * 写入权限类型(查询用户是否已经做过授权操作的接口使用),具体枚举值查看下文的枚举列表
638
1289
  * eg. ["1","2"]
1290
+ * @since HealthKit 5.18.3
639
1291
  */
640
1292
  writePermissions?: string[]
641
- /** 写入权限类型(查询是否有写权限的接口使用),具体枚举值查看下文的枚举列表 */
1293
+ /**
1294
+ * 写入权限类型(查询是否有写权限的接口使用),具体枚举值查看下文的枚举列表
1295
+ * @since HealthKit 5.18.3
1296
+ */
642
1297
  writePermission?: number
643
- /** 写入值 */
1298
+ /**
1299
+ * 写入数值(Quantity 或 Category 类型数据的具体测量值)
1300
+ * @since HealthKit 5.18.3
1301
+ */
644
1302
  value?: number
645
1303
  /**
646
1304
  * 传入单位 比如"mg/dL","g","cm","count",查询和写入Quantity类型数据时需要
647
1305
  * 数据类型对应单位可参考苹果官方的HKTypeIdentifiers.h文件
1306
+ * @since HealthKit 5.18.3
648
1307
  */
649
1308
  unitType?: string
650
- /** 开始时间,秒级时间戳 */
1309
+ /**
1310
+ * 开始时间,秒级时间戳
1311
+ * @since HealthKit 5.18.3
1312
+ */
651
1313
  startTime?: number
652
- /** 结束时间,秒级时间戳 */
1314
+ /**
1315
+ * 结束时间,秒级时间戳
1316
+ * @since HealthKit 5.18.3
1317
+ */
653
1318
  endTime?: number
654
- /** 需要读写的数据类型(读写数据的接口使用),具体枚举值查看下文的枚举列表 */
1319
+ /**
1320
+ * 需要读写的数据类型(读写数据的接口使用),具体枚举值查看下文的枚举列表
1321
+ * @since HealthKit 5.18.3
1322
+ */
655
1323
  type?: number
1324
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
1325
+ complete?: () => void
1326
+ /** 接口调用成功的回调函数 */
656
1327
  success?: (params: null) => void
1328
+ /** 接口调用失败的回调函数 */
657
1329
  fail?: (params: {
1330
+ /** 错误信息 */
658
1331
  errorMsg: string
1332
+ /** 错误码 */
659
1333
  errorCode: string | number
1334
+ /** 错误扩展 */
660
1335
  innerError: {
1336
+ /** 错误扩展码 */
661
1337
  errorCode: string | number
1338
+ /** 错误扩展信息 */
662
1339
  errorMsg: string
663
1340
  }
664
1341
  }) => void
665
- complete?: () => void
666
1342
  }): void
667
1343
 
668
1344
  /**
669
- *@description 写入Quantity类型的数据,不用传时间,开始时间和结束时间默认设置为当前时间[iOS only]
670
- *需要参数为value,type,unitType
671
- *@error {1: 'AppleHealthParamsError'} | {2: 'AppleHealthNoPermission'}*/
1345
+ * 写入 Quantity 类型健康数据(不传时间,起止时间默认为当前时刻) [iOS only]
1346
+ * @public
1347
+ * @since HealthKit 5.18.3
1348
+ * @platform iOS
1349
+ * @error {1} AppleHealthParamsError
1350
+ * @error {2} AppleHealthNoPermission
1351
+ */
672
1352
  export function saveQuantityNoTimeWithDataSync(paramModel?: ParamModel): null
673
1353
 
674
1354
  /**
675
- *@description 写入血压数据[iOS only]
676
- *@error {1: 'AppleHealthParamsError'} | {2: 'AppleHealthNoPermission'}*/
1355
+ * 写入血压数据(收缩压、舒张压及起止时间) [iOS only]
1356
+ * @public
1357
+ * @since HealthKit 5.18.0
1358
+ * @platform iOS
1359
+ * @error {1} AppleHealthParamsError
1360
+ * @error {2} AppleHealthNoPermission
1361
+ */
677
1362
  export function saveBloodPressureData(params: {
678
- /** 收缩压 */
1363
+ /**
1364
+ * 收缩压
1365
+ * @since HealthKit 5.18.0
1366
+ */
679
1367
  systolic: number
680
- /** 舒张压 */
1368
+ /**
1369
+ * 舒张压
1370
+ * @since HealthKit 5.18.0
1371
+ */
681
1372
  diastolic: number
682
- /** 开始时间,秒级时间戳 */
1373
+ /**
1374
+ * 开始时间,秒级时间戳
1375
+ * @since HealthKit 5.18.0
1376
+ */
683
1377
  startTime: number
684
- /** 结束时间,秒级时间戳 */
1378
+ /**
1379
+ * 结束时间,秒级时间戳
1380
+ * @since HealthKit 5.18.0
1381
+ */
685
1382
  endTime: number
1383
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
1384
+ complete?: () => void
1385
+ /** 接口调用成功的回调函数 */
686
1386
  success?: (params: null) => void
1387
+ /** 接口调用失败的回调函数 */
687
1388
  fail?: (params: {
1389
+ /** 错误信息 */
688
1390
  errorMsg: string
1391
+ /** 错误码 */
689
1392
  errorCode: string | number
1393
+ /** 错误扩展 */
690
1394
  innerError: {
1395
+ /** 错误扩展码 */
691
1396
  errorCode: string | number
1397
+ /** 错误扩展信息 */
692
1398
  errorMsg: string
693
1399
  }
694
1400
  }) => void
695
- complete?: () => void
696
1401
  }): void
697
1402
 
698
1403
  /**
699
- *@description 写入血压数据[iOS only]
700
- *@error {1: 'AppleHealthParamsError'} | {2: 'AppleHealthNoPermission'}*/
701
- export function saveBloodPressureDataSync(paramModel?: BloodPressureParams): null
1404
+ * 写入血压数据(收缩压、舒张压及起止时间) [iOS only]
1405
+ * @public
1406
+ * @since HealthKit 5.18.0
1407
+ * @platform iOS
1408
+ * @error {1} AppleHealthParamsError
1409
+ * @error {2} AppleHealthNoPermission
1410
+ */
1411
+ export function saveBloodPressureDataSync(
1412
+ paramModel?: BloodPressureParams
1413
+ ): null
702
1414
 
703
1415
  /**
704
- *@description 读取 Quantity[iOS only]
705
- *需要参数为type,unitType,startTime,endTime
706
- *@error {1: 'AppleHealthParamsError'}*/
1416
+ * 按类型与时间范围读取 Quantity 健康数据 [iOS only]
1417
+ * @public
1418
+ * @since HealthKit 5.18.3
1419
+ * @platform iOS
1420
+ * @error {1} AppleHealthParamsError
1421
+ */
707
1422
  export function readQuantityDataWithType(params?: {
708
1423
  /**
709
1424
  * 权限类型(申请读写权限的接口使用),具体枚举值查看下文的枚举列表
710
1425
  * eg. ["1","2"]
1426
+ * @since HealthKit 5.18.3
711
1427
  */
712
1428
  permissions?: string[]
713
1429
  /**
714
1430
  * 读取权限类型(查询用户是否已经做过授权操作的接口使用),具体枚举值查看下文的枚举列表
715
1431
  * eg. ["1","2"]
1432
+ * @since HealthKit 5.18.3
716
1433
  */
717
1434
  readPermissions?: string[]
718
1435
  /**
719
1436
  * 写入权限类型(查询用户是否已经做过授权操作的接口使用),具体枚举值查看下文的枚举列表
720
1437
  * eg. ["1","2"]
1438
+ * @since HealthKit 5.18.3
721
1439
  */
722
1440
  writePermissions?: string[]
723
- /** 写入权限类型(查询是否有写权限的接口使用),具体枚举值查看下文的枚举列表 */
1441
+ /**
1442
+ * 写入权限类型(查询是否有写权限的接口使用),具体枚举值查看下文的枚举列表
1443
+ * @since HealthKit 5.18.3
1444
+ */
724
1445
  writePermission?: number
725
- /** 写入值 */
1446
+ /**
1447
+ * 写入数值(Quantity 或 Category 类型数据的具体测量值)
1448
+ * @since HealthKit 5.18.3
1449
+ */
726
1450
  value?: number
727
1451
  /**
728
1452
  * 传入单位 比如"mg/dL","g","cm","count",查询和写入Quantity类型数据时需要
729
1453
  * 数据类型对应单位可参考苹果官方的HKTypeIdentifiers.h文件
1454
+ * @since HealthKit 5.18.3
730
1455
  */
731
1456
  unitType?: string
732
- /** 开始时间,秒级时间戳 */
1457
+ /**
1458
+ * 开始时间,秒级时间戳
1459
+ * @since HealthKit 5.18.3
1460
+ */
733
1461
  startTime?: number
734
- /** 结束时间,秒级时间戳 */
1462
+ /**
1463
+ * 结束时间,秒级时间戳
1464
+ * @since HealthKit 5.18.3
1465
+ */
735
1466
  endTime?: number
736
- /** 需要读写的数据类型(读写数据的接口使用),具体枚举值查看下文的枚举列表 */
1467
+ /**
1468
+ * 需要读写的数据类型(读写数据的接口使用),具体枚举值查看下文的枚举列表
1469
+ * @since HealthKit 5.18.3
1470
+ */
737
1471
  type?: number
1472
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
1473
+ complete?: () => void
1474
+ /** 接口调用成功的回调函数 */
738
1475
  success?: (params: {
739
1476
  /**
740
1477
  * 读取到的数据,是一个数组,数组中每一项是一个字典,具体定义如下
741
1478
  * value: Integer 读取到的值,不同的含义参考苹果官方文档
742
1479
  * startDate: Double 读取到的条目的起始时间戳
743
1480
  * endDate: Double 读取到的条目的截止时间戳
1481
+ * @since HealthKit 5.18.4
744
1482
  */
745
- value: Object[]
1483
+ value: Record<string, any>[]
746
1484
  }) => void
1485
+ /** 接口调用失败的回调函数 */
747
1486
  fail?: (params: {
1487
+ /** 错误信息 */
748
1488
  errorMsg: string
1489
+ /** 错误码 */
749
1490
  errorCode: string | number
1491
+ /** 错误扩展 */
750
1492
  innerError: {
1493
+ /** 错误扩展码 */
751
1494
  errorCode: string | number
1495
+ /** 错误扩展信息 */
752
1496
  errorMsg: string
753
1497
  }
754
1498
  }) => void
755
- complete?: () => void
756
1499
  }): void
757
1500
 
758
1501
  /**
759
- *@description 读取 Quantity[iOS only]
760
- *需要参数为type,unitType,startTime,endTime
761
- *@error {1: 'AppleHealthParamsError'}*/
1502
+ * 按类型与时间范围读取 Quantity 健康数据 [iOS only]
1503
+ * @public
1504
+ * @since HealthKit 5.18.3
1505
+ * @platform iOS
1506
+ * @error {1} AppleHealthParamsError
1507
+ */
762
1508
  export function readQuantityDataWithTypeSync(paramModel?: ParamModel): {
763
1509
  /**
764
1510
  * 读取到的数据,是一个数组,数组中每一项是一个字典,具体定义如下
765
1511
  * value: Integer 读取到的值,不同的含义参考苹果官方文档
766
1512
  * startDate: Double 读取到的条目的起始时间戳
767
1513
  * endDate: Double 读取到的条目的截止时间戳
1514
+ * @since HealthKit 5.18.4
768
1515
  */
769
- value: Object[]
1516
+ value: Record<string, any>[]
770
1517
  }
771
1518
 
772
1519
  /**
773
- *@description 删除QuantityData数据,基于起止时间删除[iOS only]
774
- *需要参数为type,startTime,endTime
775
- *@error {1: 'AppleHealthParamsError'} | {2: 'AppleHealthNoPermission'}*/
1520
+ * 按类型与时间范围删除 Quantity 健康数据 [iOS only]
1521
+ * @public
1522
+ * @since HealthKit 5.18.3
1523
+ * @platform iOS
1524
+ * @error {1} AppleHealthParamsError
1525
+ * @error {2} AppleHealthNoPermission
1526
+ */
776
1527
  export function deleteQuantityDataType(params?: {
777
1528
  /**
778
1529
  * 权限类型(申请读写权限的接口使用),具体枚举值查看下文的枚举列表
779
1530
  * eg. ["1","2"]
1531
+ * @since HealthKit 5.18.3
780
1532
  */
781
1533
  permissions?: string[]
782
1534
  /**
783
1535
  * 读取权限类型(查询用户是否已经做过授权操作的接口使用),具体枚举值查看下文的枚举列表
784
1536
  * eg. ["1","2"]
1537
+ * @since HealthKit 5.18.3
785
1538
  */
786
1539
  readPermissions?: string[]
787
1540
  /**
788
1541
  * 写入权限类型(查询用户是否已经做过授权操作的接口使用),具体枚举值查看下文的枚举列表
789
1542
  * eg. ["1","2"]
1543
+ * @since HealthKit 5.18.3
790
1544
  */
791
1545
  writePermissions?: string[]
792
- /** 写入权限类型(查询是否有写权限的接口使用),具体枚举值查看下文的枚举列表 */
1546
+ /**
1547
+ * 写入权限类型(查询是否有写权限的接口使用),具体枚举值查看下文的枚举列表
1548
+ * @since HealthKit 5.18.3
1549
+ */
793
1550
  writePermission?: number
794
- /** 写入值 */
1551
+ /**
1552
+ * 写入数值(Quantity 或 Category 类型数据的具体测量值)
1553
+ * @since HealthKit 5.18.3
1554
+ */
795
1555
  value?: number
796
1556
  /**
797
1557
  * 传入单位 比如"mg/dL","g","cm","count",查询和写入Quantity类型数据时需要
798
1558
  * 数据类型对应单位可参考苹果官方的HKTypeIdentifiers.h文件
1559
+ * @since HealthKit 5.18.3
799
1560
  */
800
1561
  unitType?: string
801
- /** 开始时间,秒级时间戳 */
1562
+ /**
1563
+ * 开始时间,秒级时间戳
1564
+ * @since HealthKit 5.18.3
1565
+ */
802
1566
  startTime?: number
803
- /** 结束时间,秒级时间戳 */
1567
+ /**
1568
+ * 结束时间,秒级时间戳
1569
+ * @since HealthKit 5.18.3
1570
+ */
804
1571
  endTime?: number
805
- /** 需要读写的数据类型(读写数据的接口使用),具体枚举值查看下文的枚举列表 */
1572
+ /**
1573
+ * 需要读写的数据类型(读写数据的接口使用),具体枚举值查看下文的枚举列表
1574
+ * @since HealthKit 5.18.3
1575
+ */
806
1576
  type?: number
1577
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
1578
+ complete?: () => void
1579
+ /** 接口调用成功的回调函数 */
807
1580
  success?: (params: null) => void
1581
+ /** 接口调用失败的回调函数 */
808
1582
  fail?: (params: {
1583
+ /** 错误信息 */
809
1584
  errorMsg: string
1585
+ /** 错误码 */
810
1586
  errorCode: string | number
1587
+ /** 错误扩展 */
811
1588
  innerError: {
1589
+ /** 错误扩展码 */
812
1590
  errorCode: string | number
1591
+ /** 错误扩展信息 */
813
1592
  errorMsg: string
814
1593
  }
815
1594
  }) => void
816
- complete?: () => void
817
1595
  }): void
818
1596
 
819
1597
  /**
820
- *@description 删除QuantityData数据,基于起止时间删除[iOS only]
821
- *需要参数为type,startTime,endTime
822
- *@error {1: 'AppleHealthParamsError'} | {2: 'AppleHealthNoPermission'}*/
1598
+ * 按类型与时间范围删除 Quantity 健康数据 [iOS only]
1599
+ * @public
1600
+ * @since HealthKit 5.18.3
1601
+ * @platform iOS
1602
+ * @error {1} AppleHealthParamsError
1603
+ * @error {2} AppleHealthNoPermission
1604
+ */
823
1605
  export function deleteQuantityDataTypeSync(paramModel?: ParamModel): null
824
1606
 
825
1607
  /**
826
- *@description 读取 Characteristic[iOS only]
827
- *需要参数为type
828
- *@error {1: 'AppleHealthParamsError'}*/
1608
+ * 按类型读取 Characteristic 健康数据 [iOS only]
1609
+ * @public
1610
+ * @since HealthKit 5.18.0
1611
+ * @platform iOS
1612
+ * @error {1} AppleHealthParamsError
1613
+ */
829
1614
  export function readCharacteristicDataWithType(params?: {
830
1615
  /**
831
1616
  * 权限类型(申请读写权限的接口使用),具体枚举值查看下文的枚举列表
832
1617
  * eg. ["1","2"]
1618
+ * @since HealthKit 5.18.3
833
1619
  */
834
1620
  permissions?: string[]
835
1621
  /**
836
1622
  * 读取权限类型(查询用户是否已经做过授权操作的接口使用),具体枚举值查看下文的枚举列表
837
1623
  * eg. ["1","2"]
1624
+ * @since HealthKit 5.18.3
838
1625
  */
839
1626
  readPermissions?: string[]
840
1627
  /**
841
1628
  * 写入权限类型(查询用户是否已经做过授权操作的接口使用),具体枚举值查看下文的枚举列表
842
1629
  * eg. ["1","2"]
1630
+ * @since HealthKit 5.18.3
843
1631
  */
844
1632
  writePermissions?: string[]
845
- /** 写入权限类型(查询是否有写权限的接口使用),具体枚举值查看下文的枚举列表 */
1633
+ /**
1634
+ * 写入权限类型(查询是否有写权限的接口使用),具体枚举值查看下文的枚举列表
1635
+ * @since HealthKit 5.18.3
1636
+ */
846
1637
  writePermission?: number
847
- /** 写入值 */
1638
+ /**
1639
+ * 写入数值(Quantity 或 Category 类型数据的具体测量值)
1640
+ * @since HealthKit 5.18.3
1641
+ */
848
1642
  value?: number
849
1643
  /**
850
1644
  * 传入单位 比如"mg/dL","g","cm","count",查询和写入Quantity类型数据时需要
851
1645
  * 数据类型对应单位可参考苹果官方的HKTypeIdentifiers.h文件
1646
+ * @since HealthKit 5.18.3
852
1647
  */
853
1648
  unitType?: string
854
- /** 开始时间,秒级时间戳 */
1649
+ /**
1650
+ * 开始时间,秒级时间戳
1651
+ * @since HealthKit 5.18.3
1652
+ */
855
1653
  startTime?: number
856
- /** 结束时间,秒级时间戳 */
1654
+ /**
1655
+ * 结束时间,秒级时间戳
1656
+ * @since HealthKit 5.18.3
1657
+ */
857
1658
  endTime?: number
858
- /** 需要读写的数据类型(读写数据的接口使用),具体枚举值查看下文的枚举列表 */
1659
+ /**
1660
+ * 需要读写的数据类型(读写数据的接口使用),具体枚举值查看下文的枚举列表
1661
+ * @since HealthKit 5.18.3
1662
+ */
859
1663
  type?: number
1664
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
1665
+ complete?: () => void
1666
+ /** 接口调用成功的回调函数 */
860
1667
  success?: (params: {
861
1668
  /**
862
1669
  * 读取到的数据,是一个数组,数组中每一项是一个字典,具体定义如下
863
1670
  * value: Integer 读取到的值,不同的含义参考苹果官方文档
864
1671
  * startDate: Double 读取到的条目的起始时间戳
865
1672
  * endDate: Double 读取到的条目的截止时间戳
1673
+ * @since HealthKit 5.18.4
866
1674
  */
867
- value: Object[]
1675
+ value: Record<string, any>[]
868
1676
  }) => void
1677
+ /** 接口调用失败的回调函数 */
869
1678
  fail?: (params: {
1679
+ /** 错误信息 */
870
1680
  errorMsg: string
1681
+ /** 错误码 */
871
1682
  errorCode: string | number
1683
+ /** 错误扩展 */
872
1684
  innerError: {
1685
+ /** 错误扩展码 */
873
1686
  errorCode: string | number
1687
+ /** 错误扩展信息 */
874
1688
  errorMsg: string
875
1689
  }
876
1690
  }) => void
877
- complete?: () => void
878
1691
  }): void
879
1692
 
880
1693
  /**
881
- *@description 读取 Characteristic[iOS only]
882
- *需要参数为type
883
- *@error {1: 'AppleHealthParamsError'}*/
1694
+ * 按类型读取 Characteristic 健康数据 [iOS only]
1695
+ * @public
1696
+ * @since HealthKit 5.18.0
1697
+ * @platform iOS
1698
+ * @error {1} AppleHealthParamsError
1699
+ */
884
1700
  export function readCharacteristicDataWithTypeSync(paramModel?: ParamModel): {
885
1701
  /**
886
1702
  * 读取到的数据,是一个数组,数组中每一项是一个字典,具体定义如下
887
1703
  * value: Integer 读取到的值,不同的含义参考苹果官方文档
888
1704
  * startDate: Double 读取到的条目的起始时间戳
889
1705
  * endDate: Double 读取到的条目的截止时间戳
1706
+ * @since HealthKit 5.18.4
890
1707
  */
891
- value: Object[]
1708
+ value: Record<string, any>[]
892
1709
  }
893
1710
 
894
1711
  /**
895
- *@description 写入Category类型的数据[iOS only]
896
- *需要参数为value,type,startTime,endTime
897
- *Category类型数据的写入参考苹果官方文档的定义
898
- *@error {1: 'AppleHealthParamsError'} | {2: 'AppleHealthNoPermission'}*/
1712
+ * 写入 Category 类型健康数据(含起止时间) [iOS only]
1713
+ * @public
1714
+ * @since HealthKit 5.18.3
1715
+ * @platform iOS
1716
+ * @error {1} AppleHealthParamsError
1717
+ * @error {2} AppleHealthNoPermission
1718
+ */
899
1719
  export function saveCategoryData(params?: {
900
1720
  /**
901
1721
  * 权限类型(申请读写权限的接口使用),具体枚举值查看下文的枚举列表
902
1722
  * eg. ["1","2"]
1723
+ * @since HealthKit 5.18.3
903
1724
  */
904
1725
  permissions?: string[]
905
1726
  /**
906
1727
  * 读取权限类型(查询用户是否已经做过授权操作的接口使用),具体枚举值查看下文的枚举列表
907
1728
  * eg. ["1","2"]
1729
+ * @since HealthKit 5.18.3
908
1730
  */
909
1731
  readPermissions?: string[]
910
1732
  /**
911
1733
  * 写入权限类型(查询用户是否已经做过授权操作的接口使用),具体枚举值查看下文的枚举列表
912
1734
  * eg. ["1","2"]
1735
+ * @since HealthKit 5.18.3
913
1736
  */
914
1737
  writePermissions?: string[]
915
- /** 写入权限类型(查询是否有写权限的接口使用),具体枚举值查看下文的枚举列表 */
1738
+ /**
1739
+ * 写入权限类型(查询是否有写权限的接口使用),具体枚举值查看下文的枚举列表
1740
+ * @since HealthKit 5.18.3
1741
+ */
916
1742
  writePermission?: number
917
- /** 写入值 */
1743
+ /**
1744
+ * 写入数值(Quantity 或 Category 类型数据的具体测量值)
1745
+ * @since HealthKit 5.18.3
1746
+ */
918
1747
  value?: number
919
1748
  /**
920
1749
  * 传入单位 比如"mg/dL","g","cm","count",查询和写入Quantity类型数据时需要
921
1750
  * 数据类型对应单位可参考苹果官方的HKTypeIdentifiers.h文件
1751
+ * @since HealthKit 5.18.3
922
1752
  */
923
1753
  unitType?: string
924
- /** 开始时间,秒级时间戳 */
1754
+ /**
1755
+ * 开始时间,秒级时间戳
1756
+ * @since HealthKit 5.18.3
1757
+ */
925
1758
  startTime?: number
926
- /** 结束时间,秒级时间戳 */
1759
+ /**
1760
+ * 结束时间,秒级时间戳
1761
+ * @since HealthKit 5.18.3
1762
+ */
927
1763
  endTime?: number
928
- /** 需要读写的数据类型(读写数据的接口使用),具体枚举值查看下文的枚举列表 */
1764
+ /**
1765
+ * 需要读写的数据类型(读写数据的接口使用),具体枚举值查看下文的枚举列表
1766
+ * @since HealthKit 5.18.3
1767
+ */
929
1768
  type?: number
1769
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
1770
+ complete?: () => void
1771
+ /** 接口调用成功的回调函数 */
930
1772
  success?: (params: null) => void
1773
+ /** 接口调用失败的回调函数 */
931
1774
  fail?: (params: {
1775
+ /** 错误信息 */
932
1776
  errorMsg: string
1777
+ /** 错误码 */
933
1778
  errorCode: string | number
1779
+ /** 错误扩展 */
934
1780
  innerError: {
1781
+ /** 错误扩展码 */
935
1782
  errorCode: string | number
1783
+ /** 错误扩展信息 */
936
1784
  errorMsg: string
937
1785
  }
938
1786
  }) => void
939
- complete?: () => void
940
1787
  }): void
941
1788
 
942
1789
  /**
943
- *@description 写入Category类型的数据[iOS only]
944
- *需要参数为value,type,startTime,endTime
945
- *Category类型数据的写入参考苹果官方文档的定义
946
- *@error {1: 'AppleHealthParamsError'} | {2: 'AppleHealthNoPermission'}*/
1790
+ * 写入 Category 类型健康数据(含起止时间) [iOS only]
1791
+ * @public
1792
+ * @since HealthKit 5.18.3
1793
+ * @platform iOS
1794
+ * @error {1} AppleHealthParamsError
1795
+ * @error {2} AppleHealthNoPermission
1796
+ */
947
1797
  export function saveCategoryDataSync(paramModel?: ParamModel): null
948
1798
 
949
1799
  /**
950
- *@description 写入Category类型的数据,不用传时间,开始时间和结束时间默认设置为当前时间[iOS only]
951
- *需要参数为value,type
952
- *@error {1: 'AppleHealthParamsError'} | {2: 'AppleHealthNoPermission'}*/
1800
+ * 写入 Category 类型健康数据(不传时间,起止时间默认为当前时刻) [iOS only]
1801
+ * @public
1802
+ * @since HealthKit 5.18.0
1803
+ * @platform iOS
1804
+ * @error {1} AppleHealthParamsError
1805
+ * @error {2} AppleHealthNoPermission
1806
+ */
953
1807
  export function saveCategoryNoTimeWithData(params?: {
954
1808
  /**
955
1809
  * 权限类型(申请读写权限的接口使用),具体枚举值查看下文的枚举列表
956
1810
  * eg. ["1","2"]
1811
+ * @since HealthKit 5.18.3
957
1812
  */
958
1813
  permissions?: string[]
959
1814
  /**
960
1815
  * 读取权限类型(查询用户是否已经做过授权操作的接口使用),具体枚举值查看下文的枚举列表
961
1816
  * eg. ["1","2"]
1817
+ * @since HealthKit 5.18.3
962
1818
  */
963
1819
  readPermissions?: string[]
964
1820
  /**
965
1821
  * 写入权限类型(查询用户是否已经做过授权操作的接口使用),具体枚举值查看下文的枚举列表
966
1822
  * eg. ["1","2"]
1823
+ * @since HealthKit 5.18.3
967
1824
  */
968
1825
  writePermissions?: string[]
969
- /** 写入权限类型(查询是否有写权限的接口使用),具体枚举值查看下文的枚举列表 */
1826
+ /**
1827
+ * 写入权限类型(查询是否有写权限的接口使用),具体枚举值查看下文的枚举列表
1828
+ * @since HealthKit 5.18.3
1829
+ */
970
1830
  writePermission?: number
971
- /** 写入值 */
1831
+ /**
1832
+ * 写入数值(Quantity 或 Category 类型数据的具体测量值)
1833
+ * @since HealthKit 5.18.3
1834
+ */
972
1835
  value?: number
973
1836
  /**
974
1837
  * 传入单位 比如"mg/dL","g","cm","count",查询和写入Quantity类型数据时需要
975
1838
  * 数据类型对应单位可参考苹果官方的HKTypeIdentifiers.h文件
1839
+ * @since HealthKit 5.18.3
976
1840
  */
977
1841
  unitType?: string
978
- /** 开始时间,秒级时间戳 */
1842
+ /**
1843
+ * 开始时间,秒级时间戳
1844
+ * @since HealthKit 5.18.3
1845
+ */
979
1846
  startTime?: number
980
- /** 结束时间,秒级时间戳 */
1847
+ /**
1848
+ * 结束时间,秒级时间戳
1849
+ * @since HealthKit 5.18.3
1850
+ */
981
1851
  endTime?: number
982
- /** 需要读写的数据类型(读写数据的接口使用),具体枚举值查看下文的枚举列表 */
1852
+ /**
1853
+ * 需要读写的数据类型(读写数据的接口使用),具体枚举值查看下文的枚举列表
1854
+ * @since HealthKit 5.18.3
1855
+ */
983
1856
  type?: number
1857
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
1858
+ complete?: () => void
1859
+ /** 接口调用成功的回调函数 */
984
1860
  success?: (params: null) => void
1861
+ /** 接口调用失败的回调函数 */
985
1862
  fail?: (params: {
1863
+ /** 错误信息 */
986
1864
  errorMsg: string
1865
+ /** 错误码 */
987
1866
  errorCode: string | number
1867
+ /** 错误扩展 */
988
1868
  innerError: {
1869
+ /** 错误扩展码 */
989
1870
  errorCode: string | number
1871
+ /** 错误扩展信息 */
990
1872
  errorMsg: string
991
1873
  }
992
1874
  }) => void
993
- complete?: () => void
994
1875
  }): void
995
1876
 
996
1877
  /**
997
- *@description 写入Category类型的数据,不用传时间,开始时间和结束时间默认设置为当前时间[iOS only]
998
- *需要参数为value,type
999
- *@error {1: 'AppleHealthParamsError'} | {2: 'AppleHealthNoPermission'}*/
1878
+ * 写入 Category 类型健康数据(不传时间,起止时间默认为当前时刻) [iOS only]
1879
+ * @public
1880
+ * @since HealthKit 5.18.0
1881
+ * @platform iOS
1882
+ * @error {1} AppleHealthParamsError
1883
+ * @error {2} AppleHealthNoPermission
1884
+ */
1000
1885
  export function saveCategoryNoTimeWithDataSync(paramModel?: ParamModel): null
1001
1886
 
1002
1887
  /**
1003
- *@description 读取 Category类型的数据[iOS only]
1004
- *需要参数为type,startTime,endTime
1005
- *@error {1: 'AppleHealthParamsError'}*/
1888
+ * 按类型与时间范围读取 Category 健康数据 [iOS only]
1889
+ * @public
1890
+ * @since HealthKit 5.18.0
1891
+ * @platform iOS
1892
+ * @error {1} AppleHealthParamsError
1893
+ */
1006
1894
  export function readCategoryDataWithType(params?: {
1007
1895
  /**
1008
1896
  * 权限类型(申请读写权限的接口使用),具体枚举值查看下文的枚举列表
1009
1897
  * eg. ["1","2"]
1898
+ * @since HealthKit 5.18.3
1010
1899
  */
1011
1900
  permissions?: string[]
1012
1901
  /**
1013
1902
  * 读取权限类型(查询用户是否已经做过授权操作的接口使用),具体枚举值查看下文的枚举列表
1014
1903
  * eg. ["1","2"]
1904
+ * @since HealthKit 5.18.3
1015
1905
  */
1016
1906
  readPermissions?: string[]
1017
1907
  /**
1018
1908
  * 写入权限类型(查询用户是否已经做过授权操作的接口使用),具体枚举值查看下文的枚举列表
1019
1909
  * eg. ["1","2"]
1910
+ * @since HealthKit 5.18.3
1020
1911
  */
1021
1912
  writePermissions?: string[]
1022
- /** 写入权限类型(查询是否有写权限的接口使用),具体枚举值查看下文的枚举列表 */
1913
+ /**
1914
+ * 写入权限类型(查询是否有写权限的接口使用),具体枚举值查看下文的枚举列表
1915
+ * @since HealthKit 5.18.3
1916
+ */
1023
1917
  writePermission?: number
1024
- /** 写入值 */
1918
+ /**
1919
+ * 写入数值(Quantity 或 Category 类型数据的具体测量值)
1920
+ * @since HealthKit 5.18.3
1921
+ */
1025
1922
  value?: number
1026
1923
  /**
1027
1924
  * 传入单位 比如"mg/dL","g","cm","count",查询和写入Quantity类型数据时需要
1028
1925
  * 数据类型对应单位可参考苹果官方的HKTypeIdentifiers.h文件
1926
+ * @since HealthKit 5.18.3
1029
1927
  */
1030
1928
  unitType?: string
1031
- /** 开始时间,秒级时间戳 */
1929
+ /**
1930
+ * 开始时间,秒级时间戳
1931
+ * @since HealthKit 5.18.3
1932
+ */
1032
1933
  startTime?: number
1033
- /** 结束时间,秒级时间戳 */
1934
+ /**
1935
+ * 结束时间,秒级时间戳
1936
+ * @since HealthKit 5.18.3
1937
+ */
1034
1938
  endTime?: number
1035
- /** 需要读写的数据类型(读写数据的接口使用),具体枚举值查看下文的枚举列表 */
1939
+ /**
1940
+ * 需要读写的数据类型(读写数据的接口使用),具体枚举值查看下文的枚举列表
1941
+ * @since HealthKit 5.18.3
1942
+ */
1036
1943
  type?: number
1944
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
1945
+ complete?: () => void
1946
+ /** 接口调用成功的回调函数 */
1037
1947
  success?: (params: {
1038
1948
  /**
1039
1949
  * 读取到的数据,是一个数组,数组中每一项是一个字典,具体定义如下
1040
1950
  * value: Integer 读取到的值,不同的含义参考苹果官方文档
1041
1951
  * startDate: Double 读取到的条目的起始时间戳
1042
1952
  * endDate: Double 读取到的条目的截止时间戳
1953
+ * @since HealthKit 5.18.4
1043
1954
  */
1044
- value: Object[]
1955
+ value: Record<string, any>[]
1045
1956
  }) => void
1957
+ /** 接口调用失败的回调函数 */
1046
1958
  fail?: (params: {
1959
+ /** 错误信息 */
1047
1960
  errorMsg: string
1961
+ /** 错误码 */
1048
1962
  errorCode: string | number
1963
+ /** 错误扩展 */
1049
1964
  innerError: {
1965
+ /** 错误扩展码 */
1050
1966
  errorCode: string | number
1967
+ /** 错误扩展信息 */
1051
1968
  errorMsg: string
1052
1969
  }
1053
1970
  }) => void
1054
- complete?: () => void
1055
1971
  }): void
1056
1972
 
1057
1973
  /**
1058
- *@description 读取 Category类型的数据[iOS only]
1059
- *需要参数为type,startTime,endTime
1060
- *@error {1: 'AppleHealthParamsError'}*/
1974
+ * 按类型与时间范围读取 Category 健康数据 [iOS only]
1975
+ * @public
1976
+ * @since HealthKit 5.18.0
1977
+ * @platform iOS
1978
+ * @error {1} AppleHealthParamsError
1979
+ */
1061
1980
  export function readCategoryDataWithTypeSync(paramModel?: ParamModel): {
1062
1981
  /**
1063
1982
  * 读取到的数据,是一个数组,数组中每一项是一个字典,具体定义如下
1064
1983
  * value: Integer 读取到的值,不同的含义参考苹果官方文档
1065
1984
  * startDate: Double 读取到的条目的起始时间戳
1066
1985
  * endDate: Double 读取到的条目的截止时间戳
1986
+ * @since HealthKit 5.18.4
1067
1987
  */
1068
- value: Object[]
1988
+ value: Record<string, any>[]
1069
1989
  }
1070
1990
 
1071
1991
  /**
1072
- *@description 获取体脂秤算法数据*/
1992
+ * 根据体脂秤测量数据计算身体成分指标 [Android only]
1993
+ * @public
1994
+ * @since HealthKit 6.5.0
1995
+ * @platform Android
1996
+ */
1073
1997
  export function queryBodyFatScaleAlgorithm(params: {
1074
- /** 性别(1-男、2-女) */
1998
+ /**
1999
+ * 性别:1 男,2 女
2000
+ * @since HealthKit 6.5.0
2001
+ */
1075
2002
  sex: number
1076
- /** 体重(单位kg) */
2003
+ /**
2004
+ * 体重(单位kg)
2005
+ * @since HealthKit 6.5.0
2006
+ */
1077
2007
  weight: number
1078
- /** 阻抗 */
2008
+ /**
2009
+ * 阻抗
2010
+ * @since HealthKit 6.5.0
2011
+ */
1079
2012
  imp: number
1080
- /** 身高(单位cm) */
2013
+ /**
2014
+ * 身高(单位cm)
2015
+ * @since HealthKit 6.5.0
2016
+ */
1081
2017
  height: number
1082
- /** 生日(13位、毫秒) */
2018
+ /**
2019
+ * 生日(13位、毫秒)
2020
+ * @since HealthKit 6.5.0
2021
+ */
1083
2022
  birthday: number
1084
- /** 测量时间(13位、毫秒) */
2023
+ /**
2024
+ * 测量时间(13位、毫秒)
2025
+ * @since HealthKit 6.5.0
2026
+ */
1085
2027
  time: number
2028
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
2029
+ complete?: () => void
2030
+ /** 接口调用成功的回调函数 */
1086
2031
  success?: (params: {
1087
- /** bmi */
2032
+ /**
2033
+ * bmi
2034
+ * @since HealthKit 6.5.0
2035
+ */
1088
2036
  bmi: string
1089
- /** 体脂率 */
2037
+ /**
2038
+ * 体脂率
2039
+ * @since HealthKit 6.5.0
2040
+ */
1090
2041
  fat: string
1091
- /** 水份率 */
2042
+ /**
2043
+ * 水份率
2044
+ * @since HealthKit 6.5.0
2045
+ */
1092
2046
  water: string
1093
- /** 肌肉量 */
2047
+ /**
2048
+ * 肌肉量
2049
+ * @since HealthKit 6.5.0
2050
+ */
1094
2051
  muscle: string
1095
- /** 蛋白率 */
2052
+ /**
2053
+ * 蛋白率
2054
+ * @since HealthKit 6.5.0
2055
+ */
1096
2056
  protein: string
1097
- /** 骨量 */
2057
+ /**
2058
+ * 骨量
2059
+ * @since HealthKit 6.5.0
2060
+ */
1098
2061
  bones: string
1099
- /** 基础代谢率 */
2062
+ /**
2063
+ * 基础代谢率
2064
+ * @since HealthKit 6.5.0
2065
+ */
1100
2066
  metabolism: string
1101
- /** 身体年龄 */
2067
+ /**
2068
+ * 身体年龄
2069
+ * @since HealthKit 6.5.0
2070
+ */
1102
2071
  bodyAge: string
1103
- /** 身体得分 */
2072
+ /**
2073
+ * 身体得分
2074
+ * @since HealthKit 6.5.0
2075
+ */
1104
2076
  bodyScore: string
1105
- /** 内脂肪等级 */
2077
+ /**
2078
+ * 内脂肪等级
2079
+ * @since HealthKit 6.5.0
2080
+ */
1106
2081
  visceralFat: string
1107
- /** 体型 */
2082
+ /**
2083
+ * 体型
2084
+ * @since HealthKit 6.5.0
2085
+ */
1108
2086
  bodyType: string
1109
- /** 去脂指数 */
2087
+ /**
2088
+ * 去脂指数
2089
+ * @since HealthKit 6.5.0
2090
+ */
1110
2091
  ffm: string
1111
- /** 脂肪量 */
2092
+ /**
2093
+ * 脂肪量
2094
+ * @since HealthKit 6.5.0
2095
+ */
1112
2096
  fatMass: string
1113
- /** 体脂指数 */
2097
+ /**
2098
+ * 体脂指数
2099
+ * @since HealthKit 6.5.0
2100
+ */
1114
2101
  bodyFatIndex: string
1115
- /** 肥胖等级 */
2102
+ /**
2103
+ * 肥胖等级
2104
+ * @since HealthKit 6.5.0
2105
+ */
1116
2106
  fatLevel: string
1117
- /** 标准体重 */
2107
+ /**
2108
+ * 标准体重
2109
+ * @since HealthKit 6.5.0
2110
+ */
1118
2111
  standardWeight: string
1119
- /** 体重控制 */
2112
+ /**
2113
+ * 体重控制
2114
+ * @since HealthKit 6.5.0
2115
+ */
1120
2116
  weightControl: string
1121
- /** 肌肉率 */
2117
+ /**
2118
+ * 肌肉率
2119
+ * @since HealthKit 6.5.0
2120
+ */
1122
2121
  muscleRatio: string
1123
2122
  }) => void
2123
+ /** 接口调用失败的回调函数 */
1124
2124
  fail?: (params: {
2125
+ /** 错误信息 */
1125
2126
  errorMsg: string
2127
+ /** 错误码 */
1126
2128
  errorCode: string | number
2129
+ /** 错误扩展 */
1127
2130
  innerError: {
2131
+ /** 错误扩展码 */
1128
2132
  errorCode: string | number
2133
+ /** 错误扩展信息 */
1129
2134
  errorMsg: string
1130
2135
  }
1131
2136
  }) => void
1132
- complete?: () => void
1133
2137
  }): void
1134
2138
 
1135
2139
  /**
1136
- *@description 获取体脂秤算法数据*/
2140
+ * 根据体脂秤测量数据计算身体成分指标 [Android only]
2141
+ * @public
2142
+ * @since HealthKit 6.5.0
2143
+ * @platform Android
2144
+ */
1137
2145
  export function queryBodyFatScaleAlgorithmSync(request?: BodyScaleParam): {
1138
- /** bmi */
2146
+ /**
2147
+ * bmi
2148
+ * @since HealthKit 6.5.0
2149
+ */
1139
2150
  bmi: string
1140
- /** 体脂率 */
2151
+ /**
2152
+ * 体脂率
2153
+ * @since HealthKit 6.5.0
2154
+ */
1141
2155
  fat: string
1142
- /** 水份率 */
2156
+ /**
2157
+ * 水份率
2158
+ * @since HealthKit 6.5.0
2159
+ */
1143
2160
  water: string
1144
- /** 肌肉量 */
2161
+ /**
2162
+ * 肌肉量
2163
+ * @since HealthKit 6.5.0
2164
+ */
1145
2165
  muscle: string
1146
- /** 蛋白率 */
2166
+ /**
2167
+ * 蛋白率
2168
+ * @since HealthKit 6.5.0
2169
+ */
1147
2170
  protein: string
1148
- /** 骨量 */
2171
+ /**
2172
+ * 骨量
2173
+ * @since HealthKit 6.5.0
2174
+ */
1149
2175
  bones: string
1150
- /** 基础代谢率 */
2176
+ /**
2177
+ * 基础代谢率
2178
+ * @since HealthKit 6.5.0
2179
+ */
1151
2180
  metabolism: string
1152
- /** 身体年龄 */
2181
+ /**
2182
+ * 身体年龄
2183
+ * @since HealthKit 6.5.0
2184
+ */
1153
2185
  bodyAge: string
1154
- /** 身体得分 */
2186
+ /**
2187
+ * 身体得分
2188
+ * @since HealthKit 6.5.0
2189
+ */
1155
2190
  bodyScore: string
1156
- /** 内脂肪等级 */
2191
+ /**
2192
+ * 内脂肪等级
2193
+ * @since HealthKit 6.5.0
2194
+ */
1157
2195
  visceralFat: string
1158
- /** 体型 */
2196
+ /**
2197
+ * 体型
2198
+ * @since HealthKit 6.5.0
2199
+ */
1159
2200
  bodyType: string
1160
- /** 去脂指数 */
2201
+ /**
2202
+ * 去脂指数
2203
+ * @since HealthKit 6.5.0
2204
+ */
1161
2205
  ffm: string
1162
- /** 脂肪量 */
2206
+ /**
2207
+ * 脂肪量
2208
+ * @since HealthKit 6.5.0
2209
+ */
1163
2210
  fatMass: string
1164
- /** 体脂指数 */
2211
+ /**
2212
+ * 体脂指数
2213
+ * @since HealthKit 6.5.0
2214
+ */
1165
2215
  bodyFatIndex: string
1166
- /** 肥胖等级 */
2216
+ /**
2217
+ * 肥胖等级
2218
+ * @since HealthKit 6.5.0
2219
+ */
1167
2220
  fatLevel: string
1168
- /** 标准体重 */
2221
+ /**
2222
+ * 标准体重
2223
+ * @since HealthKit 6.5.0
2224
+ */
1169
2225
  standardWeight: string
1170
- /** 体重控制 */
2226
+ /**
2227
+ * 体重控制
2228
+ * @since HealthKit 6.5.0
2229
+ */
1171
2230
  weightControl: string
1172
- /** 肌肉率 */
2231
+ /**
2232
+ * 肌肉率
2233
+ * @since HealthKit 6.5.0
2234
+ */
1173
2235
  muscleRatio: string
1174
2236
  }
1175
2237
 
1176
- export type RecordParams = {
1177
- /** RecordData数据列表的json array字符串 */
1178
- request: string
1179
- }
2238
+ /**
2239
+ * 判断设备是否为健康本地化数据设备 [Android only]
2240
+ * @public
2241
+ * @since HealthKit 7.0.5
2242
+ * @platform Android
2243
+ */
2244
+ export function isLocalDataDevice(params: {
2245
+ /**
2246
+ * 设备id
2247
+ * @since HealthKit 7.0.5
2248
+ */
2249
+ devId: string
2250
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
2251
+ complete?: () => void
2252
+ /** 接口调用成功的回调函数 */
2253
+ success?: (params: {
2254
+ /**
2255
+ * 是否本地化数据设备
2256
+ * @since HealthKit 7.0.5
2257
+ */
2258
+ isLocal: boolean
2259
+ }) => void
2260
+ /** 接口调用失败的回调函数 */
2261
+ fail?: (params: {
2262
+ /** 错误信息 */
2263
+ errorMsg: string
2264
+ /** 错误码 */
2265
+ errorCode: string | number
2266
+ /** 错误扩展 */
2267
+ innerError: {
2268
+ /** 错误扩展码 */
2269
+ errorCode: string | number
2270
+ /** 错误扩展信息 */
2271
+ errorMsg: string
2272
+ }
2273
+ }) => void
2274
+ }): void
1180
2275
 
1181
- export type ParamModel = {
2276
+ /**
2277
+ * 判断设备是否为健康本地化数据设备 [Android only]
2278
+ * @public
2279
+ * @since HealthKit 7.0.5
2280
+ * @platform Android
2281
+ */
2282
+ export function isLocalDataDeviceSync(param?: HealthDataIsLocalParams): {
1182
2283
  /**
1183
- * 权限类型(申请读写权限的接口使用),具体枚举值查看下文的枚举列表
1184
- * eg. ["1","2"]
2284
+ * 是否本地化数据设备
2285
+ * @since HealthKit 7.0.5
1185
2286
  */
1186
- permissions?: string[]
2287
+ isLocal: boolean
2288
+ }
2289
+
2290
+ /**
2291
+ * 向本地化数据设备提交大数据通道数据 [Android only]
2292
+ * @public
2293
+ * @since HealthKit 7.0.5
2294
+ * @platform Android
2295
+ */
2296
+ export function postLocalDataChannel(params: {
1187
2297
  /**
1188
- * 读取权限类型(查询用户是否已经做过授权操作的接口使用),具体枚举值查看下文的枚举列表
1189
- * eg. ["1","2"]
2298
+ * 产品id
2299
+ * @since HealthKit 7.0.5
1190
2300
  */
1191
- readPermissions?: string[]
2301
+ productId: string
1192
2302
  /**
1193
- * 写入权限类型(查询用户是否已经做过授权操作的接口使用),具体枚举值查看下文的枚举列表
1194
- * eg. ["1","2"]
2303
+ * 设备id
2304
+ * @since HealthKit 7.0.5
1195
2305
  */
1196
- writePermissions?: string[]
1197
- /** 写入权限类型(查询是否有写权限的接口使用),具体枚举值查看下文的枚举列表 */
1198
- writePermission?: number
1199
- /** 写入值 */
1200
- value?: number
2306
+ devId: string
2307
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
2308
+ complete?: () => void
2309
+ /** 接口调用成功的回调函数 */
2310
+ success?: (params: null) => void
2311
+ /** 接口调用失败的回调函数 */
2312
+ fail?: (params: {
2313
+ /** 错误信息 */
2314
+ errorMsg: string
2315
+ /** 错误码 */
2316
+ errorCode: string | number
2317
+ /** 错误扩展 */
2318
+ innerError: {
2319
+ /** 错误扩展码 */
2320
+ errorCode: string | number
2321
+ /** 错误扩展信息 */
2322
+ errorMsg: string
2323
+ }
2324
+ }) => void
2325
+ }): void
2326
+
2327
+ /**
2328
+ * 向本地化数据设备提交大数据通道数据 [Android only]
2329
+ * @public
2330
+ * @since HealthKit 7.0.5
2331
+ * @platform Android
2332
+ */
2333
+ export function postLocalDataChannelSync(
2334
+ param?: HealthDataPostDataParams
2335
+ ): null
2336
+
2337
+ /**
2338
+ * 获取健康本地化数据库当前版本号 [Android only]
2339
+ * @public
2340
+ * @since HealthKit 7.0.5
2341
+ * @platform Android
2342
+ */
2343
+ export function getLocalDataVersion(params?: {
2344
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
2345
+ complete?: () => void
2346
+ /** 接口调用成功的回调函数 */
2347
+ success?: (params: {
2348
+ /**
2349
+ * 版本号
2350
+ * @since HealthKit 7.0.5
2351
+ */
2352
+ version: number
2353
+ }) => void
2354
+ /** 接口调用失败的回调函数 */
2355
+ fail?: (params: {
2356
+ /** 错误信息 */
2357
+ errorMsg: string
2358
+ /** 错误码 */
2359
+ errorCode: string | number
2360
+ /** 错误扩展 */
2361
+ innerError: {
2362
+ /** 错误扩展码 */
2363
+ errorCode: string | number
2364
+ /** 错误扩展信息 */
2365
+ errorMsg: string
2366
+ }
2367
+ }) => void
2368
+ }): void
2369
+
2370
+ /**
2371
+ * 获取健康本地化数据库当前版本号 [Android only]
2372
+ * @public
2373
+ * @since HealthKit 7.0.5
2374
+ * @platform Android
2375
+ */
2376
+ export function getLocalDataVersionSync(): {
1201
2377
  /**
1202
- * 传入单位 比如"mg/dL","g","cm","count",查询和写入Quantity类型数据时需要
1203
- * 数据类型对应单位可参考苹果官方的HKTypeIdentifiers.h文件
2378
+ * 版本号
2379
+ * @since HealthKit 7.0.5
1204
2380
  */
1205
- unitType?: string
1206
- /** 开始时间,秒级时间戳 */
1207
- startTime?: number
1208
- /** 结束时间,秒级时间戳 */
1209
- endTime?: number
1210
- /** 需要读写的数据类型(读写数据的接口使用),具体枚举值查看下文的枚举列表 */
1211
- type?: number
1212
- }
1213
-
1214
- export type BloodPressureParams = {
1215
- /** 收缩压 */
1216
- systolic: number
1217
- /** 舒张压 */
1218
- diastolic: number
1219
- /** 开始时间,秒级时间戳 */
1220
- startTime: number
1221
- /** 结束时间,秒级时间戳 */
1222
- endTime: number
2381
+ version: number
1223
2382
  }
1224
2383
 
1225
- export type Object = {}
1226
-
1227
- export type BodyScaleParam = {
1228
- /** 性别(1-男、2-女) */
1229
- sex: number
1230
- /** 体重(单位kg) */
1231
- weight: number
1232
- /** 阻抗 */
1233
- imp: number
1234
- /** 身高(单位cm) */
1235
- height: number
1236
- /** 生日(13位、毫秒) */
2384
+ /**
2385
+ * 健康本地化数据库的统一读写接口(按 apiName 路由) [Android only]
2386
+ * @public
2387
+ * @since HealthKit 7.0.5
2388
+ * @platform Android
2389
+ */
2390
+ export function requestLocalDataApi(params: {
2391
+ /**
2392
+ * 接口名称
2393
+ * @since HealthKit 7.0.5
2394
+ */
2395
+ apiName: string
2396
+ /**
2397
+ * 请求具体参数
2398
+ * @since HealthKit 7.0.5
2399
+ */
2400
+ request?: Record<string, any>
2401
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
2402
+ complete?: () => void
2403
+ /** 接口调用成功的回调函数 */
2404
+ success?: (params: {
2405
+ /**
2406
+ * 业务返回数据(JSON 字符串,具体结构由 apiName 决定)
2407
+ * @since HealthKit 7.0.5
2408
+ */
2409
+ result: string
2410
+ }) => void
2411
+ /** 接口调用失败的回调函数 */
2412
+ fail?: (params: {
2413
+ /** 错误信息 */
2414
+ errorMsg: string
2415
+ /** 错误码 */
2416
+ errorCode: string | number
2417
+ /** 错误扩展 */
2418
+ innerError: {
2419
+ /** 错误扩展码 */
2420
+ errorCode: string | number
2421
+ /** 错误扩展信息 */
2422
+ errorMsg: string
2423
+ }
2424
+ }) => void
2425
+ }): void
2426
+
2427
+ /**
2428
+ * 健康本地化数据库的统一读写接口(按 apiName 路由) [Android only]
2429
+ * @public
2430
+ * @since HealthKit 7.0.5
2431
+ * @platform Android
2432
+ */
2433
+ export function requestLocalDataApiSync(param?: HealthDataLocalParams): {
2434
+ /**
2435
+ * 业务返回数据(JSON 字符串,具体结构由 apiName 决定)
2436
+ * @since HealthKit 7.0.5
2437
+ */
2438
+ result: string
2439
+ }
2440
+
2441
+ /**
2442
+ * 初始化健康 AI 小程序本地化数据库 [Android only]
2443
+ * @public
2444
+ * @since HealthKit 7.1.5
2445
+ * @platform Android
2446
+ */
2447
+ export function aiHealthInit(params?: {
2448
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
2449
+ complete?: () => void
2450
+ /** 接口调用成功的回调函数 */
2451
+ success?: (params: null) => void
2452
+ /** 接口调用失败的回调函数 */
2453
+ fail?: (params: {
2454
+ /** 错误信息 */
2455
+ errorMsg: string
2456
+ /** 错误码 */
2457
+ errorCode: string | number
2458
+ /** 错误扩展 */
2459
+ innerError: {
2460
+ /** 错误扩展码 */
2461
+ errorCode: string | number
2462
+ /** 错误扩展信息 */
2463
+ errorMsg: string
2464
+ }
2465
+ }) => void
2466
+ }): void
2467
+
2468
+ /**
2469
+ * 初始化健康 AI 小程序本地化数据库 [Android only]
2470
+ * @public
2471
+ * @since HealthKit 7.1.5
2472
+ * @platform Android
2473
+ */
2474
+ export function aiHealthInitSync(): null
2475
+
2476
+ /**
2477
+ * 健康 AI 小程序本地化数据库的统一读写接口(按 apiName 路由) [Android only]
2478
+ * @public
2479
+ * @since HealthKit 7.1.5
2480
+ * @platform Android
2481
+ */
2482
+ export function requestAiHealthDataApi(params: {
2483
+ /**
2484
+ * 接口名称
2485
+ * @since HealthKit 7.1.5
2486
+ */
2487
+ apiName: string
2488
+ /**
2489
+ * 请求具体参数
2490
+ * @since HealthKit 7.1.5
2491
+ */
2492
+ request?: Record<string, any>
2493
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
2494
+ complete?: () => void
2495
+ /** 接口调用成功的回调函数 */
2496
+ success?: (params: {
2497
+ /**
2498
+ * 业务返回数据(JSON 字符串,具体结构由 apiName 决定)
2499
+ * @since HealthKit 7.1.5
2500
+ */
2501
+ result?: string
2502
+ /**
2503
+ * 响应时间戳(毫秒)
2504
+ * @since HealthKit 7.1.5
2505
+ */
2506
+ t: number
2507
+ /**
2508
+ * 接口调用是否成功
2509
+ * @since HealthKit 7.1.5
2510
+ */
2511
+ success: boolean
2512
+ }) => void
2513
+ /** 接口调用失败的回调函数 */
2514
+ fail?: (params: {
2515
+ /** 错误信息 */
2516
+ errorMsg: string
2517
+ /** 错误码 */
2518
+ errorCode: string | number
2519
+ /** 错误扩展 */
2520
+ innerError: {
2521
+ /** 错误扩展码 */
2522
+ errorCode: string | number
2523
+ /** 错误扩展信息 */
2524
+ errorMsg: string
2525
+ }
2526
+ }) => void
2527
+ }): void
2528
+
2529
+ /**
2530
+ * 健康 AI 小程序本地化数据库的统一读写接口(按 apiName 路由) [Android only]
2531
+ * @public
2532
+ * @since HealthKit 7.1.5
2533
+ * @platform Android
2534
+ */
2535
+ export function requestAiHealthDataApiSync(param?: AIHealthDataParams): {
2536
+ /**
2537
+ * 业务返回数据(JSON 字符串,具体结构由 apiName 决定)
2538
+ * @since HealthKit 7.1.5
2539
+ */
2540
+ result?: string
2541
+ /**
2542
+ * 响应时间戳(毫秒)
2543
+ * @since HealthKit 7.1.5
2544
+ */
2545
+ t: number
2546
+ /**
2547
+ * 接口调用是否成功
2548
+ * @since HealthKit 7.1.5
2549
+ */
2550
+ success: boolean
2551
+ }
2552
+
2553
+ /**
2554
+ * Health Connect 批量写入入参
2555
+ * @since HealthKit 5.18.0
2556
+ */
2557
+ export interface RecordParams {
2558
+ /**
2559
+ * RecordData数据列表的json array字符串
2560
+ * @since HealthKit 5.18.0
2561
+ */
2562
+ request: string
2563
+ }
2564
+
2565
+ /**
2566
+ * 查询记录入参结构
2567
+ * @since HealthKit 7.1.5
2568
+ */
2569
+ export interface QueryRecordsParams {
2570
+ /**
2571
+ * 数据类型(dpCode)
2572
+ * @since HealthKit 7.1.5
2573
+ */
2574
+ code: string
2575
+ /**
2576
+ * 开始时间
2577
+ * @since HealthKit 7.1.5
2578
+ */
2579
+ startTime: number
2580
+ /**
2581
+ * 结束时间
2582
+ * @since HealthKit 7.1.5
2583
+ */
2584
+ endTime: number
2585
+ /**
2586
+ * 查询条数 0:全部 1:最近1条 2:最近2条,以此类推
2587
+ * @since HealthKit 7.1.5
2588
+ */
2589
+ limit: number
2590
+ }
2591
+
2592
+ /**
2593
+ * 睡眠阶段结构
2594
+ * @since HealthKit 7.1.5
2595
+ */
2596
+ export interface SleepStage {
2597
+ /**
2598
+ * 开始时间
2599
+ * @since HealthKit 7.1.5
2600
+ */
2601
+ startTime: number
2602
+ /**
2603
+ * 结束时间
2604
+ * @since HealthKit 7.1.5
2605
+ */
2606
+ endTime: number
2607
+ /**
2608
+ * 睡眠阶段
2609
+ * - 清醒状态: STAGE_TYPE_AWAKE
2610
+ * - 浅睡阶段: STAGE_TYPE_LIGHT
2611
+ * - 深睡阶段: STAGE_TYPE_DEEP
2612
+ * - 快速眼动: STAGE_TYPE_REM
2613
+ * - 未知状态: STAGE_TYPE_UNKNOWN
2614
+ * @since HealthKit 7.1.5
2615
+ */
2616
+ stage: string
2617
+ }
2618
+
2619
+ /**
2620
+ * 查询记录数据结构
2621
+ * @since HealthKit 7.1.5
2622
+ */
2623
+ export interface QueryRecordsData {
2624
+ /**
2625
+ * 上报时间
2626
+ * @since HealthKit 7.1.5
2627
+ */
2628
+ time?: number
2629
+ /**
2630
+ * 时间段类型数据--开始时间
2631
+ * @since HealthKit 7.1.5
2632
+ */
2633
+ startTime?: number
2634
+ /**
2635
+ * 时间段类型数据--结束时间
2636
+ * @since HealthKit 7.1.5
2637
+ */
2638
+ endTime?: number
2639
+ /**
2640
+ * 单值类型数据的测量值(如步数、心率等)
2641
+ * @since HealthKit 7.1.5
2642
+ */
2643
+ value?: number
2644
+ /**
2645
+ * 舒张压
2646
+ * @since HealthKit 7.1.5
2647
+ */
2648
+ diastolic?: number
2649
+ /**
2650
+ * 收缩压
2651
+ * @since HealthKit 7.1.5
2652
+ */
2653
+ systolic?: number
2654
+ /**
2655
+ * 睡眠记录具体时间段
2656
+ * @since HealthKit 7.1.5
2657
+ */
2658
+ stageList?: SleepStage[]
2659
+ /**
2660
+ * 总睡眠时间
2661
+ * @since HealthKit 7.1.5
2662
+ */
2663
+ sleepTotal?: number
2664
+ /**
2665
+ * 深睡时间
2666
+ * @since HealthKit 7.1.5
2667
+ */
2668
+ sleepDeep?: number
2669
+ /**
2670
+ * 浅睡时间
2671
+ * @since HealthKit 7.1.5
2672
+ */
2673
+ sleepLight?: number
2674
+ /**
2675
+ * 眼动时间
2676
+ * @since HealthKit 7.1.5
2677
+ */
2678
+ sleepRem?: number
2679
+ /**
2680
+ * 清醒时间
2681
+ * @since HealthKit 7.1.5
2682
+ */
2683
+ sleepWake?: number
2684
+ /**
2685
+ * 运动时长,秒
2686
+ * @since HealthKit 7.1.5
2687
+ */
2688
+ duration?: number
2689
+ /**
2690
+ * 运动卡路里,卡
2691
+ * @since HealthKit 7.1.5
2692
+ */
2693
+ calorie?: number
2694
+ /**
2695
+ * 运动里程,米
2696
+ * @since HealthKit 7.1.5
2697
+ */
2698
+ mileage?: number
2699
+ /**
2700
+ * 运动类型
2701
+ * - 健走: EXERCISE_TYPE_WALKING
2702
+ * - 户外跑: EXERCISE_TYPE_RUNNING
2703
+ * - 室内跑: EXERCISE_TYPE_TREADMILL
2704
+ * - 登山: EXERCISE_TYPE_HIKING
2705
+ * - 越野跑: EXERCISE_TYPE_TRAIL_RUNNING
2706
+ * - 半马: EXERCISE_TYPE_HALF_MARATHON
2707
+ * - 全马: EXERCISE_TYPE_FULL_MARATHON
2708
+ * - 跳绳: EXERCISE_TYPE_JUMP_ROPE
2709
+ * - 羽毛球: EXERCISE_TYPE_BADMINTON
2710
+ * - 篮球: EXERCISE_TYPE_BASKETBALL
2711
+ * - 骑行: EXERCISE_TYPE_CYCLING
2712
+ * - 滑冰: EXERCISE_TYPE_SKATING
2713
+ * - 健身房: EXERCISE_TYPE_STRENGTH_TRAINING
2714
+ * - 瑜伽: EXERCISE_TYPE_YOGA
2715
+ * - 网球: EXERCISE_TYPE_TENNIS
2716
+ * - 乒乓球: EXERCISE_TYPE_TABLE_TENNIS
2717
+ * - 足球: EXERCISE_TYPE_SOCCER
2718
+ * - 游泳: EXERCISE_TYPE_SWIMMING_POOL
2719
+ * - 性爱: EXERCISE_TYPE_SEXUAL_ACTIVITY
2720
+ * - 室内骑行: EXERCISE_TYPE_BIKING_STATIONARY
2721
+ * - 室内健走: EXERCISE_TYPE_WALKING_TREADMILL
2722
+ * - 自由训练: EXERCISE_TYPE_WORKOUT
2723
+ * @since HealthKit 7.1.5
2724
+ */
2725
+ type?: string
2726
+ /**
2727
+ * 扩展字段
2728
+ * @since HealthKit 7.1.5
2729
+ */
2730
+ extInfo?: string
2731
+ }
2732
+
2733
+ /** @since HealthKit 7.1.5 */
2734
+ export interface QueryRecordsResult {
2735
+ /**
2736
+ * 数据列表
2737
+ * @since HealthKit 7.1.5
2738
+ */
2739
+ list: QueryRecordsData[]
2740
+ /**
2741
+ * 总量
2742
+ * @since HealthKit 7.1.5
2743
+ */
2744
+ count: number
2745
+ }
2746
+
2747
+ /**
2748
+ * iOS HealthKit 通用入参(权限申请、数据读写)
2749
+ * @since HealthKit 5.18.0
2750
+ */
2751
+ export interface ParamModel {
2752
+ /**
2753
+ * 权限类型(申请读写权限的接口使用),具体枚举值查看下文的枚举列表
2754
+ * eg. ["1","2"]
2755
+ * @since HealthKit 5.18.3
2756
+ */
2757
+ permissions?: string[]
2758
+ /**
2759
+ * 读取权限类型(查询用户是否已经做过授权操作的接口使用),具体枚举值查看下文的枚举列表
2760
+ * eg. ["1","2"]
2761
+ * @since HealthKit 5.18.3
2762
+ */
2763
+ readPermissions?: string[]
2764
+ /**
2765
+ * 写入权限类型(查询用户是否已经做过授权操作的接口使用),具体枚举值查看下文的枚举列表
2766
+ * eg. ["1","2"]
2767
+ * @since HealthKit 5.18.3
2768
+ */
2769
+ writePermissions?: string[]
2770
+ /**
2771
+ * 写入权限类型(查询是否有写权限的接口使用),具体枚举值查看下文的枚举列表
2772
+ * @since HealthKit 5.18.3
2773
+ */
2774
+ writePermission?: number
2775
+ /**
2776
+ * 写入数值(Quantity 或 Category 类型数据的具体测量值)
2777
+ * @since HealthKit 5.18.3
2778
+ */
2779
+ value?: number
2780
+ /**
2781
+ * 传入单位 比如"mg/dL","g","cm","count",查询和写入Quantity类型数据时需要
2782
+ * 数据类型对应单位可参考苹果官方的HKTypeIdentifiers.h文件
2783
+ * @since HealthKit 5.18.3
2784
+ */
2785
+ unitType?: string
2786
+ /**
2787
+ * 开始时间,秒级时间戳
2788
+ * @since HealthKit 5.18.3
2789
+ */
2790
+ startTime?: number
2791
+ /**
2792
+ * 结束时间,秒级时间戳
2793
+ * @since HealthKit 5.18.3
2794
+ */
2795
+ endTime?: number
2796
+ /**
2797
+ * 需要读写的数据类型(读写数据的接口使用),具体枚举值查看下文的枚举列表
2798
+ * @since HealthKit 5.18.3
2799
+ */
2800
+ type?: number
2801
+ }
2802
+
2803
+ /**
2804
+ * 授权状态查询结果
2805
+ * @since HealthKit 5.18.4
2806
+ */
2807
+ export interface StatusPermissionsResp {
2808
+ /**
2809
+ * 授权状态:1 表示传入类型均已申请过对应读写权限;0 表示至少有一项未申请
2810
+ * @since HealthKit 5.18.4
2811
+ */
2812
+ value: number
2813
+ }
2814
+
2815
+ /**
2816
+ * 写入权限查询结果
2817
+ * @since HealthKit 5.18.4
2818
+ */
2819
+ export interface GetWritePermissionResp {
2820
+ /**
2821
+ * 写入权限状态:1 有写入权限;0 无写入权限
2822
+ * @since HealthKit 5.18.4
2823
+ */
2824
+ value: number
2825
+ }
2826
+
2827
+ /**
2828
+ * iOS 多类型健康数据组合入参(Quantity / Category / Characteristic)
2829
+ * @since HealthKit 7.1.5
2830
+ */
2831
+ export interface IOSParamModel {
2832
+ /**
2833
+ * Quantity 类型权限或数据参数
2834
+ * @since HealthKit 7.1.5
2835
+ */
2836
+ quantityParam?: ParamModel
2837
+ /**
2838
+ * Category 类型权限或数据参数
2839
+ * @since HealthKit 7.1.5
2840
+ */
2841
+ categoryParam?: ParamModel
2842
+ /**
2843
+ * Characteristic 类型权限或数据参数
2844
+ * @since HealthKit 7.1.5
2845
+ */
2846
+ characteristicParam?: ParamModel
2847
+ /**
2848
+ * 是否包含运动记录(Workout)相关权限或数据
2849
+ * @since HealthKit 7.1.5
2850
+ */
2851
+ workoutType: boolean
2852
+ }
2853
+
2854
+ /**
2855
+ * iOS HealthKit 批量写入入参
2856
+ * @since HealthKit 7.1.5
2857
+ */
2858
+ export interface RecordIOSParams {
2859
+ /**
2860
+ * RecordData数据列表的json array字符串
2861
+ * @since HealthKit 7.1.5
2862
+ */
2863
+ request: string
2864
+ }
2865
+
2866
+ /**
2867
+ * 写入血压用到的结构
2868
+ * @since HealthKit 5.18.0
2869
+ */
2870
+ export interface BloodPressureParams {
2871
+ /**
2872
+ * 收缩压
2873
+ * @since HealthKit 5.18.0
2874
+ */
2875
+ systolic: number
2876
+ /**
2877
+ * 舒张压
2878
+ * @since HealthKit 5.18.0
2879
+ */
2880
+ diastolic: number
2881
+ /**
2882
+ * 开始时间,秒级时间戳
2883
+ * @since HealthKit 5.18.0
2884
+ */
2885
+ startTime: number
2886
+ /**
2887
+ * 结束时间,秒级时间戳
2888
+ * @since HealthKit 5.18.0
2889
+ */
2890
+ endTime: number
2891
+ }
2892
+
2893
+ /**
2894
+ * 健康数据读取结果
2895
+ * @since HealthKit 5.18.4
2896
+ */
2897
+ export interface ReadDataResp {
2898
+ /**
2899
+ * 读取到的数据,是一个数组,数组中每一项是一个字典,具体定义如下
2900
+ * value: Integer 读取到的值,不同的含义参考苹果官方文档
2901
+ * startDate: Double 读取到的条目的起始时间戳
2902
+ * endDate: Double 读取到的条目的截止时间戳
2903
+ * @since HealthKit 5.18.4
2904
+ */
2905
+ value: Record<string, any>[]
2906
+ }
2907
+
2908
+ /**
2909
+ * 体脂秤算法计算入参
2910
+ * @since HealthKit 6.5.0
2911
+ */
2912
+ export interface BodyScaleParam {
2913
+ /**
2914
+ * 性别:1 男,2 女
2915
+ * @since HealthKit 6.5.0
2916
+ */
2917
+ sex: number
2918
+ /**
2919
+ * 体重(单位kg)
2920
+ * @since HealthKit 6.5.0
2921
+ */
2922
+ weight: number
2923
+ /**
2924
+ * 阻抗
2925
+ * @since HealthKit 6.5.0
2926
+ */
2927
+ imp: number
2928
+ /**
2929
+ * 身高(单位cm)
2930
+ * @since HealthKit 6.5.0
2931
+ */
2932
+ height: number
2933
+ /**
2934
+ * 生日(13位、毫秒)
2935
+ * @since HealthKit 6.5.0
2936
+ */
1237
2937
  birthday: number
1238
- /** 测量时间(13位、毫秒) */
2938
+ /**
2939
+ * 测量时间(13位、毫秒)
2940
+ * @since HealthKit 6.5.0
2941
+ */
1239
2942
  time: number
1240
2943
  }
2944
+
2945
+ /**
2946
+ * 体脂秤算法计算结果
2947
+ * @since HealthKit 6.5.0
2948
+ */
2949
+ export interface BodyScaleResponse {
2950
+ /**
2951
+ * bmi
2952
+ * @since HealthKit 6.5.0
2953
+ */
2954
+ bmi: string
2955
+ /**
2956
+ * 体脂率
2957
+ * @since HealthKit 6.5.0
2958
+ */
2959
+ fat: string
2960
+ /**
2961
+ * 水份率
2962
+ * @since HealthKit 6.5.0
2963
+ */
2964
+ water: string
2965
+ /**
2966
+ * 肌肉量
2967
+ * @since HealthKit 6.5.0
2968
+ */
2969
+ muscle: string
2970
+ /**
2971
+ * 蛋白率
2972
+ * @since HealthKit 6.5.0
2973
+ */
2974
+ protein: string
2975
+ /**
2976
+ * 骨量
2977
+ * @since HealthKit 6.5.0
2978
+ */
2979
+ bones: string
2980
+ /**
2981
+ * 基础代谢率
2982
+ * @since HealthKit 6.5.0
2983
+ */
2984
+ metabolism: string
2985
+ /**
2986
+ * 身体年龄
2987
+ * @since HealthKit 6.5.0
2988
+ */
2989
+ bodyAge: string
2990
+ /**
2991
+ * 身体得分
2992
+ * @since HealthKit 6.5.0
2993
+ */
2994
+ bodyScore: string
2995
+ /**
2996
+ * 内脂肪等级
2997
+ * @since HealthKit 6.5.0
2998
+ */
2999
+ visceralFat: string
3000
+ /**
3001
+ * 体型
3002
+ * @since HealthKit 6.5.0
3003
+ */
3004
+ bodyType: string
3005
+ /**
3006
+ * 去脂指数
3007
+ * @since HealthKit 6.5.0
3008
+ */
3009
+ ffm: string
3010
+ /**
3011
+ * 脂肪量
3012
+ * @since HealthKit 6.5.0
3013
+ */
3014
+ fatMass: string
3015
+ /**
3016
+ * 体脂指数
3017
+ * @since HealthKit 6.5.0
3018
+ */
3019
+ bodyFatIndex: string
3020
+ /**
3021
+ * 肥胖等级
3022
+ * @since HealthKit 6.5.0
3023
+ */
3024
+ fatLevel: string
3025
+ /**
3026
+ * 标准体重
3027
+ * @since HealthKit 6.5.0
3028
+ */
3029
+ standardWeight: string
3030
+ /**
3031
+ * 体重控制
3032
+ * @since HealthKit 6.5.0
3033
+ */
3034
+ weightControl: string
3035
+ /**
3036
+ * 肌肉率
3037
+ * @since HealthKit 6.5.0
3038
+ */
3039
+ muscleRatio: string
3040
+ }
3041
+
3042
+ /**
3043
+ * 是否本地化数据设备入参配置
3044
+ * @since HealthKit 7.0.5
3045
+ */
3046
+ export interface HealthDataIsLocalParams {
3047
+ /**
3048
+ * 设备id
3049
+ * @since HealthKit 7.0.5
3050
+ */
3051
+ devId: string
3052
+ }
3053
+
3054
+ /**
3055
+ * 是否本地化数据设备返回结果
3056
+ * @since HealthKit 7.0.5
3057
+ */
3058
+ export interface HealthDataIsLocalRequest {
3059
+ /**
3060
+ * 是否本地化数据设备
3061
+ * @since HealthKit 7.0.5
3062
+ */
3063
+ isLocal: boolean
3064
+ }
3065
+
3066
+ /**
3067
+ * 本地化数据设备 - Post大数据通道数据入参配置
3068
+ * @since HealthKit 7.0.5
3069
+ */
3070
+ export interface HealthDataPostDataParams {
3071
+ /**
3072
+ * 产品id
3073
+ * @since HealthKit 7.0.5
3074
+ */
3075
+ productId: string
3076
+ /**
3077
+ * 设备id
3078
+ * @since HealthKit 7.0.5
3079
+ */
3080
+ devId: string
3081
+ }
3082
+
3083
+ /**
3084
+ * 健康本地化数据设备 - 获取当前数据库版本号
3085
+ * @since HealthKit 7.0.5
3086
+ */
3087
+ export interface HealthDataLocalVersion {
3088
+ /**
3089
+ * 版本号
3090
+ * @since HealthKit 7.0.5
3091
+ */
3092
+ version: number
3093
+ }
3094
+
3095
+ /**
3096
+ * 健康本地化数据库信息获取和存储逻辑入参配置
3097
+ * @since HealthKit 7.0.5
3098
+ */
3099
+ export interface HealthDataLocalParams {
3100
+ /**
3101
+ * 接口名称
3102
+ * @since HealthKit 7.0.5
3103
+ */
3104
+ apiName: string
3105
+ /**
3106
+ * 请求具体参数
3107
+ * @since HealthKit 7.0.5
3108
+ */
3109
+ request?: Record<string, any>
3110
+ }
3111
+
3112
+ /**
3113
+ * 健康本地化数据库信息获取和存储逻辑返回结果
3114
+ * @since HealthKit 7.0.5
3115
+ */
3116
+ export interface HealthDataLocalRequest {
3117
+ /**
3118
+ * 业务返回数据(JSON 字符串,具体结构由 apiName 决定)
3119
+ * @since HealthKit 7.0.5
3120
+ */
3121
+ result: string
3122
+ }
3123
+
3124
+ /**
3125
+ * 健康 AI 小程序本地化数据库接口入参
3126
+ * @since HealthKit 7.1.5
3127
+ */
3128
+ export interface AIHealthDataParams {
3129
+ /**
3130
+ * 接口名称
3131
+ * @since HealthKit 7.1.5
3132
+ */
3133
+ apiName: string
3134
+ /**
3135
+ * 请求具体参数
3136
+ * @since HealthKit 7.1.5
3137
+ */
3138
+ request?: Record<string, any>
3139
+ }
3140
+
3141
+ /**
3142
+ * 健康 AI 小程序本地化数据库接口返回结果
3143
+ * @since HealthKit 7.1.5
3144
+ */
3145
+ export interface AIHealthDataRequest {
3146
+ /**
3147
+ * 业务返回数据(JSON 字符串,具体结构由 apiName 决定)
3148
+ * @since HealthKit 7.1.5
3149
+ */
3150
+ result?: string
3151
+ /**
3152
+ * 响应时间戳(毫秒)
3153
+ * @since HealthKit 7.1.5
3154
+ */
3155
+ t: number
3156
+ /**
3157
+ * 接口调用是否成功
3158
+ * @since HealthKit 7.1.5
3159
+ */
3160
+ success: boolean
3161
+ }
3162
+
3163
+ /**
3164
+ * Health Connect 状态码说明(与 getHealthConnectStatus、checkHealthConnectReadStatus 返回值对应)
3165
+ * @since HealthKit 5.18.4
3166
+ */
3167
+ export interface HealthConnectStatusCode {
3168
+ /**
3169
+ * 状态码:-2 服务不可用;-1 不支持;0 已授权;1 未安装 Health Connect;2 未授权
3170
+ * @since HealthKit 5.18.4
3171
+ */
3172
+ value: number
3173
+ }
1241
3174
  }