@ray-js/api 1.7.81 → 1.7.82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/AIKit.d.ts +2296 -1291
- package/@types/AIStreamKit.d.ts +687 -444
- package/@types/AVideoKit.d.ts +148 -62
- package/@types/BaseKit.d.ts +3881 -333
- package/@types/BizKit.d.ts +2450 -325
- package/@types/CategoryCommonBizKit.d.ts +17 -17
- package/@types/DeviceKit.d.ts +2334 -331
- package/@types/HealthKit.d.ts +479 -299
- package/@types/HomeKit.d.ts +2026 -1093
- package/@types/IPCKit.d.ts +1838 -103
- package/@types/LightKit.d.ts +38 -2
- package/@types/MapKit.d.ts +780 -600
- package/@types/MediaKit.d.ts +34 -28
- package/@types/MediaPlayerKit.d.ts +28 -4
- package/@types/MiniKit.d.ts +1320 -230
- package/@types/OutdoorKit.d.ts +1966 -64
- package/@types/P2PKit.d.ts +461 -150
- package/@types/PayKit.d.ts +79 -10
- package/@types/PlayNetKit.d.ts +1542 -158
- package/@types/ThirdAuthKit.d.ts +252 -28
- package/@types/ThirdPartyDeviceKit.d.ts +2 -2
- package/@types/WearKit.d.ts +1706 -661
- package/LICENSE.md +9 -0
- package/lib/WearKit-3.1.0.d.ts +426 -0
- package/lib/WearKit-3.1.0.js +599 -0
- package/lib/all-kits.d.ts +1 -1
- package/lib/all-kits.js +1 -1
- package/package.json +5 -5
- package/lib/WearKit-1.1.6.d.ts +0 -126
- package/lib/WearKit-1.1.6.js +0 -180
package/@types/HealthKit.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* HealthKit
|
|
3
3
|
*
|
|
4
|
-
* @version 7.
|
|
4
|
+
* @version 7.9.4
|
|
5
5
|
*/
|
|
6
6
|
declare namespace ty.health {
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* 获取 Health Connect SDK 可用与授权状态 [Android only]
|
|
9
9
|
* @public
|
|
10
10
|
* @since HealthKit 5.18.0
|
|
11
11
|
* @platform Android
|
|
@@ -32,7 +32,7 @@ declare namespace ty.health {
|
|
|
32
32
|
}): void
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* 获取 Health Connect SDK 可用与授权状态 [Android only]
|
|
36
36
|
* @public
|
|
37
37
|
* @since HealthKit 5.18.0
|
|
38
38
|
* @platform Android
|
|
@@ -40,12 +40,7 @@ declare namespace ty.health {
|
|
|
40
40
|
export function getHealthConnectStatusSync(): number
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
|
-
* 检测
|
|
44
|
-
* -2 服务不可用(需要提示用户去更改自启动和电源管理),建议面板收到-2直接跳转到授权页。授权页做弹窗提示
|
|
45
|
-
* -1 Health Connect不支持
|
|
46
|
-
* 0 已授权
|
|
47
|
-
* 1 未安装 Health Connect
|
|
48
|
-
* 2 未授权
|
|
43
|
+
* 检测 Health Connect 读取权限状态 [Android only]
|
|
49
44
|
* @public
|
|
50
45
|
* @since HealthKit 7.1.5
|
|
51
46
|
* @platform Android
|
|
@@ -72,12 +67,7 @@ declare namespace ty.health {
|
|
|
72
67
|
}): void
|
|
73
68
|
|
|
74
69
|
/**
|
|
75
|
-
* 检测
|
|
76
|
-
* -2 服务不可用(需要提示用户去更改自启动和电源管理),建议面板收到-2直接跳转到授权页。授权页做弹窗提示
|
|
77
|
-
* -1 Health Connect不支持
|
|
78
|
-
* 0 已授权
|
|
79
|
-
* 1 未安装 Health Connect
|
|
80
|
-
* 2 未授权
|
|
70
|
+
* 检测 Health Connect 读取权限状态 [Android only]
|
|
81
71
|
* @public
|
|
82
72
|
* @since HealthKit 7.1.5
|
|
83
73
|
* @platform Android
|
|
@@ -85,15 +75,15 @@ declare namespace ty.health {
|
|
|
85
75
|
export function checkHealthConnectReadStatusSync(): number
|
|
86
76
|
|
|
87
77
|
/**
|
|
88
|
-
*
|
|
78
|
+
* 将健康记录批量写入 Health Connect [Android only]
|
|
89
79
|
* @public
|
|
90
80
|
* @since HealthKit 5.18.0
|
|
91
81
|
* @platform Android
|
|
92
|
-
* @error {-1001}
|
|
93
|
-
* @error {-1002}
|
|
94
|
-
* @error {-1003}
|
|
95
|
-
* @error {-1004}
|
|
96
|
-
* @error {-1005}
|
|
82
|
+
* @error {-1001} 手机版本不支持
|
|
83
|
+
* @error {-1002} 数据转换异常
|
|
84
|
+
* @error {-1003} 数据为空
|
|
85
|
+
* @error {-1004} 提交 Health Connect 失败
|
|
86
|
+
* @error {-1005} 服务异常,请检查 Health Connect 是否已开启自启动且电源管理无限制
|
|
97
87
|
*/
|
|
98
88
|
export function insertRecords(params: {
|
|
99
89
|
/**
|
|
@@ -122,20 +112,20 @@ declare namespace ty.health {
|
|
|
122
112
|
}): void
|
|
123
113
|
|
|
124
114
|
/**
|
|
125
|
-
*
|
|
115
|
+
* 将健康记录批量写入 Health Connect [Android only]
|
|
126
116
|
* @public
|
|
127
117
|
* @since HealthKit 5.18.0
|
|
128
118
|
* @platform Android
|
|
129
|
-
* @error {-1001}
|
|
130
|
-
* @error {-1002}
|
|
131
|
-
* @error {-1003}
|
|
132
|
-
* @error {-1004}
|
|
133
|
-
* @error {-1005}
|
|
119
|
+
* @error {-1001} 手机版本不支持
|
|
120
|
+
* @error {-1002} 数据转换异常
|
|
121
|
+
* @error {-1003} 数据为空
|
|
122
|
+
* @error {-1004} 提交 Health Connect 失败
|
|
123
|
+
* @error {-1005} 服务异常,请检查 Health Connect 是否已开启自启动且电源管理无限制
|
|
134
124
|
*/
|
|
135
125
|
export function insertRecordsSync(request?: RecordParams): boolean
|
|
136
126
|
|
|
137
127
|
/**
|
|
138
|
-
*
|
|
128
|
+
* 按条件查询 Health Connect 健康记录 [Android only]
|
|
139
129
|
* @public
|
|
140
130
|
* @since HealthKit 7.1.5
|
|
141
131
|
* @platform Android
|
|
@@ -193,7 +183,7 @@ declare namespace ty.health {
|
|
|
193
183
|
}): void
|
|
194
184
|
|
|
195
185
|
/**
|
|
196
|
-
*
|
|
186
|
+
* 按条件查询 Health Connect 健康记录 [Android only]
|
|
197
187
|
* @public
|
|
198
188
|
* @since HealthKit 7.1.5
|
|
199
189
|
* @platform Android
|
|
@@ -212,8 +202,7 @@ declare namespace ty.health {
|
|
|
212
202
|
}
|
|
213
203
|
|
|
214
204
|
/**
|
|
215
|
-
*
|
|
216
|
-
* 需要参数为readPermissions,writePermissions
|
|
205
|
+
* 查询用户是否已对 Quantity 类型数据完成读写授权 [iOS only]
|
|
217
206
|
* @public
|
|
218
207
|
* @since HealthKit 5.18.3
|
|
219
208
|
* @platform iOS
|
|
@@ -244,7 +233,7 @@ declare namespace ty.health {
|
|
|
244
233
|
*/
|
|
245
234
|
writePermission?: number
|
|
246
235
|
/**
|
|
247
|
-
*
|
|
236
|
+
* 写入数值(Quantity 或 Category 类型数据的具体测量值)
|
|
248
237
|
* @since HealthKit 5.18.3
|
|
249
238
|
*/
|
|
250
239
|
value?: number
|
|
@@ -274,8 +263,7 @@ declare namespace ty.health {
|
|
|
274
263
|
/** 接口调用成功的回调函数 */
|
|
275
264
|
success?: (params: {
|
|
276
265
|
/**
|
|
277
|
-
* 1
|
|
278
|
-
* 0 代表传入的类型至少有一个没有请求过对应的读写权限
|
|
266
|
+
* 授权状态:1 表示传入类型均已申请过对应读写权限;0 表示至少有一项未申请
|
|
279
267
|
* @since HealthKit 5.18.4
|
|
280
268
|
*/
|
|
281
269
|
value: number
|
|
@@ -297,8 +285,7 @@ declare namespace ty.health {
|
|
|
297
285
|
}): void
|
|
298
286
|
|
|
299
287
|
/**
|
|
300
|
-
*
|
|
301
|
-
* 需要参数为readPermissions,writePermissions
|
|
288
|
+
* 查询用户是否已对 Quantity 类型数据完成读写授权 [iOS only]
|
|
302
289
|
* @public
|
|
303
290
|
* @since HealthKit 5.18.3
|
|
304
291
|
* @platform iOS
|
|
@@ -306,16 +293,14 @@ declare namespace ty.health {
|
|
|
306
293
|
*/
|
|
307
294
|
export function authStatusPermissionsSync(paramModel?: ParamModel): {
|
|
308
295
|
/**
|
|
309
|
-
* 1
|
|
310
|
-
* 0 代表传入的类型至少有一个没有请求过对应的读写权限
|
|
296
|
+
* 授权状态:1 表示传入类型均已申请过对应读写权限;0 表示至少有一项未申请
|
|
311
297
|
* @since HealthKit 5.18.4
|
|
312
298
|
*/
|
|
313
299
|
value: number
|
|
314
300
|
}
|
|
315
301
|
|
|
316
302
|
/**
|
|
317
|
-
*
|
|
318
|
-
* 需要参数为writePermission
|
|
303
|
+
* 查询用户是否拥有指定 Quantity 类型的写入权限 [iOS only]
|
|
319
304
|
* @public
|
|
320
305
|
* @since HealthKit 5.18.3
|
|
321
306
|
* @platform iOS
|
|
@@ -346,7 +331,7 @@ declare namespace ty.health {
|
|
|
346
331
|
*/
|
|
347
332
|
writePermission?: number
|
|
348
333
|
/**
|
|
349
|
-
*
|
|
334
|
+
* 写入数值(Quantity 或 Category 类型数据的具体测量值)
|
|
350
335
|
* @since HealthKit 5.18.3
|
|
351
336
|
*/
|
|
352
337
|
value?: number
|
|
@@ -376,8 +361,7 @@ declare namespace ty.health {
|
|
|
376
361
|
/** 接口调用成功的回调函数 */
|
|
377
362
|
success?: (params: {
|
|
378
363
|
/**
|
|
379
|
-
* 1
|
|
380
|
-
* 0 无写入权限
|
|
364
|
+
* 写入权限状态:1 有写入权限;0 无写入权限
|
|
381
365
|
* @since HealthKit 5.18.4
|
|
382
366
|
*/
|
|
383
367
|
value: number
|
|
@@ -399,8 +383,7 @@ declare namespace ty.health {
|
|
|
399
383
|
}): void
|
|
400
384
|
|
|
401
385
|
/**
|
|
402
|
-
*
|
|
403
|
-
* 需要参数为writePermission
|
|
386
|
+
* 查询用户是否拥有指定 Quantity 类型的写入权限 [iOS only]
|
|
404
387
|
* @public
|
|
405
388
|
* @since HealthKit 5.18.3
|
|
406
389
|
* @platform iOS
|
|
@@ -408,16 +391,14 @@ declare namespace ty.health {
|
|
|
408
391
|
*/
|
|
409
392
|
export function getSaveQuantityPermissionSync(paramModel?: ParamModel): {
|
|
410
393
|
/**
|
|
411
|
-
* 1
|
|
412
|
-
* 0 无写入权限
|
|
394
|
+
* 写入权限状态:1 有写入权限;0 无写入权限
|
|
413
395
|
* @since HealthKit 5.18.4
|
|
414
396
|
*/
|
|
415
397
|
value: number
|
|
416
398
|
}
|
|
417
399
|
|
|
418
400
|
/**
|
|
419
|
-
* Quantity
|
|
420
|
-
* 需要参数为permissions
|
|
401
|
+
* 申请 Quantity 类型数据的写入权限 [iOS only]
|
|
421
402
|
* @public
|
|
422
403
|
* @since HealthKit 5.18.3
|
|
423
404
|
* @platform iOS
|
|
@@ -448,7 +429,7 @@ declare namespace ty.health {
|
|
|
448
429
|
*/
|
|
449
430
|
writePermission?: number
|
|
450
431
|
/**
|
|
451
|
-
*
|
|
432
|
+
* 写入数值(Quantity 或 Category 类型数据的具体测量值)
|
|
452
433
|
* @since HealthKit 5.18.3
|
|
453
434
|
*/
|
|
454
435
|
value?: number
|
|
@@ -476,7 +457,7 @@ declare namespace ty.health {
|
|
|
476
457
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
477
458
|
complete?: () => void
|
|
478
459
|
/** 接口调用成功的回调函数 */
|
|
479
|
-
success?: (
|
|
460
|
+
success?: () => void
|
|
480
461
|
/** 接口调用失败的回调函数 */
|
|
481
462
|
fail?: (params: {
|
|
482
463
|
/** 错误信息 */
|
|
@@ -494,8 +475,7 @@ declare namespace ty.health {
|
|
|
494
475
|
}): void
|
|
495
476
|
|
|
496
477
|
/**
|
|
497
|
-
* Quantity
|
|
498
|
-
* 需要参数为permissions
|
|
478
|
+
* 申请 Quantity 类型数据的写入权限 [iOS only]
|
|
499
479
|
* @public
|
|
500
480
|
* @since HealthKit 5.18.3
|
|
501
481
|
* @platform iOS
|
|
@@ -506,8 +486,7 @@ declare namespace ty.health {
|
|
|
506
486
|
): null
|
|
507
487
|
|
|
508
488
|
/**
|
|
509
|
-
* Category
|
|
510
|
-
* 需要参数为permissions
|
|
489
|
+
* 申请 Category 类型数据的写入权限 [iOS only]
|
|
511
490
|
* @public
|
|
512
491
|
* @since HealthKit 5.18.0
|
|
513
492
|
* @platform iOS
|
|
@@ -538,7 +517,7 @@ declare namespace ty.health {
|
|
|
538
517
|
*/
|
|
539
518
|
writePermission?: number
|
|
540
519
|
/**
|
|
541
|
-
*
|
|
520
|
+
* 写入数值(Quantity 或 Category 类型数据的具体测量值)
|
|
542
521
|
* @since HealthKit 5.18.3
|
|
543
522
|
*/
|
|
544
523
|
value?: number
|
|
@@ -566,7 +545,7 @@ declare namespace ty.health {
|
|
|
566
545
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
567
546
|
complete?: () => void
|
|
568
547
|
/** 接口调用成功的回调函数 */
|
|
569
|
-
success?: (
|
|
548
|
+
success?: () => void
|
|
570
549
|
/** 接口调用失败的回调函数 */
|
|
571
550
|
fail?: (params: {
|
|
572
551
|
/** 错误信息 */
|
|
@@ -584,8 +563,7 @@ declare namespace ty.health {
|
|
|
584
563
|
}): void
|
|
585
564
|
|
|
586
565
|
/**
|
|
587
|
-
* Category
|
|
588
|
-
* 需要参数为permissions
|
|
566
|
+
* 申请 Category 类型数据的写入权限 [iOS only]
|
|
589
567
|
* @public
|
|
590
568
|
* @since HealthKit 5.18.0
|
|
591
569
|
* @platform iOS
|
|
@@ -596,8 +574,7 @@ declare namespace ty.health {
|
|
|
596
574
|
): null
|
|
597
575
|
|
|
598
576
|
/**
|
|
599
|
-
* Quantity
|
|
600
|
-
* 需要参数为permissions
|
|
577
|
+
* 申请 Quantity 类型数据的读取权限 [iOS only]
|
|
601
578
|
* @public
|
|
602
579
|
* @since HealthKit 5.18.3
|
|
603
580
|
* @platform iOS
|
|
@@ -628,7 +605,7 @@ declare namespace ty.health {
|
|
|
628
605
|
*/
|
|
629
606
|
writePermission?: number
|
|
630
607
|
/**
|
|
631
|
-
*
|
|
608
|
+
* 写入数值(Quantity 或 Category 类型数据的具体测量值)
|
|
632
609
|
* @since HealthKit 5.18.3
|
|
633
610
|
*/
|
|
634
611
|
value?: number
|
|
@@ -656,7 +633,7 @@ declare namespace ty.health {
|
|
|
656
633
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
657
634
|
complete?: () => void
|
|
658
635
|
/** 接口调用成功的回调函数 */
|
|
659
|
-
success?: (
|
|
636
|
+
success?: () => void
|
|
660
637
|
/** 接口调用失败的回调函数 */
|
|
661
638
|
fail?: (params: {
|
|
662
639
|
/** 错误信息 */
|
|
@@ -674,8 +651,7 @@ declare namespace ty.health {
|
|
|
674
651
|
}): void
|
|
675
652
|
|
|
676
653
|
/**
|
|
677
|
-
* Quantity
|
|
678
|
-
* 需要参数为permissions
|
|
654
|
+
* 申请 Quantity 类型数据的读取权限 [iOS only]
|
|
679
655
|
* @public
|
|
680
656
|
* @since HealthKit 5.18.3
|
|
681
657
|
* @platform iOS
|
|
@@ -684,8 +660,7 @@ declare namespace ty.health {
|
|
|
684
660
|
export function authQuantityReadPermissionsSync(paramModel?: ParamModel): null
|
|
685
661
|
|
|
686
662
|
/**
|
|
687
|
-
* Category
|
|
688
|
-
* 需要参数为permissions
|
|
663
|
+
* 申请 Category 类型数据的读取权限 [iOS only]
|
|
689
664
|
* @public
|
|
690
665
|
* @since HealthKit 5.18.0
|
|
691
666
|
* @platform iOS
|
|
@@ -716,7 +691,7 @@ declare namespace ty.health {
|
|
|
716
691
|
*/
|
|
717
692
|
writePermission?: number
|
|
718
693
|
/**
|
|
719
|
-
*
|
|
694
|
+
* 写入数值(Quantity 或 Category 类型数据的具体测量值)
|
|
720
695
|
* @since HealthKit 5.18.3
|
|
721
696
|
*/
|
|
722
697
|
value?: number
|
|
@@ -744,7 +719,7 @@ declare namespace ty.health {
|
|
|
744
719
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
745
720
|
complete?: () => void
|
|
746
721
|
/** 接口调用成功的回调函数 */
|
|
747
|
-
success?: (
|
|
722
|
+
success?: () => void
|
|
748
723
|
/** 接口调用失败的回调函数 */
|
|
749
724
|
fail?: (params: {
|
|
750
725
|
/** 错误信息 */
|
|
@@ -762,8 +737,7 @@ declare namespace ty.health {
|
|
|
762
737
|
}): void
|
|
763
738
|
|
|
764
739
|
/**
|
|
765
|
-
* Category
|
|
766
|
-
* 需要参数为permissions
|
|
740
|
+
* 申请 Category 类型数据的读取权限 [iOS only]
|
|
767
741
|
* @public
|
|
768
742
|
* @since HealthKit 5.18.0
|
|
769
743
|
* @platform iOS
|
|
@@ -772,8 +746,7 @@ declare namespace ty.health {
|
|
|
772
746
|
export function authCategoryReadPermissionsSync(paramModel?: ParamModel): null
|
|
773
747
|
|
|
774
748
|
/**
|
|
775
|
-
* Characteristic
|
|
776
|
-
* 需要参数为permissions
|
|
749
|
+
* 申请 Characteristic 类型数据的读取权限 [iOS only]
|
|
777
750
|
* @public
|
|
778
751
|
* @since HealthKit 5.18.0
|
|
779
752
|
* @platform iOS
|
|
@@ -804,7 +777,7 @@ declare namespace ty.health {
|
|
|
804
777
|
*/
|
|
805
778
|
writePermission?: number
|
|
806
779
|
/**
|
|
807
|
-
*
|
|
780
|
+
* 写入数值(Quantity 或 Category 类型数据的具体测量值)
|
|
808
781
|
* @since HealthKit 5.18.3
|
|
809
782
|
*/
|
|
810
783
|
value?: number
|
|
@@ -832,7 +805,7 @@ declare namespace ty.health {
|
|
|
832
805
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
833
806
|
complete?: () => void
|
|
834
807
|
/** 接口调用成功的回调函数 */
|
|
835
|
-
success?: (
|
|
808
|
+
success?: () => void
|
|
836
809
|
/** 接口调用失败的回调函数 */
|
|
837
810
|
fail?: (params: {
|
|
838
811
|
/** 错误信息 */
|
|
@@ -850,8 +823,7 @@ declare namespace ty.health {
|
|
|
850
823
|
}): void
|
|
851
824
|
|
|
852
825
|
/**
|
|
853
|
-
* Characteristic
|
|
854
|
-
* 需要参数为permissions
|
|
826
|
+
* 申请 Characteristic 类型数据的读取权限 [iOS only]
|
|
855
827
|
* @public
|
|
856
828
|
* @since HealthKit 5.18.0
|
|
857
829
|
* @platform iOS
|
|
@@ -862,8 +834,7 @@ declare namespace ty.health {
|
|
|
862
834
|
): null
|
|
863
835
|
|
|
864
836
|
/**
|
|
865
|
-
* Quantity
|
|
866
|
-
* 需要参数为permissions
|
|
837
|
+
* 批量申请 Quantity、Category、Characteristic 的读取权限 [iOS only]
|
|
867
838
|
* @public
|
|
868
839
|
* @since HealthKit 7.1.5
|
|
869
840
|
* @platform Android
|
|
@@ -871,29 +842,29 @@ declare namespace ty.health {
|
|
|
871
842
|
*/
|
|
872
843
|
export function authiOSAllReadPermissions(params: {
|
|
873
844
|
/**
|
|
874
|
-
*
|
|
845
|
+
* Quantity 类型权限或数据参数
|
|
875
846
|
* @since HealthKit 7.1.5
|
|
876
847
|
*/
|
|
877
848
|
quantityParam?: ParamModel
|
|
878
849
|
/**
|
|
879
|
-
*
|
|
850
|
+
* Category 类型权限或数据参数
|
|
880
851
|
* @since HealthKit 7.1.5
|
|
881
852
|
*/
|
|
882
853
|
categoryParam?: ParamModel
|
|
883
854
|
/**
|
|
884
|
-
*
|
|
855
|
+
* Characteristic 类型权限或数据参数
|
|
885
856
|
* @since HealthKit 7.1.5
|
|
886
857
|
*/
|
|
887
858
|
characteristicParam?: ParamModel
|
|
888
859
|
/**
|
|
889
|
-
*
|
|
860
|
+
* 是否包含运动记录(Workout)相关权限或数据
|
|
890
861
|
* @since HealthKit 7.1.5
|
|
891
862
|
*/
|
|
892
863
|
workoutType: boolean
|
|
893
864
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
894
865
|
complete?: () => void
|
|
895
866
|
/** 接口调用成功的回调函数 */
|
|
896
|
-
success?: (
|
|
867
|
+
success?: () => void
|
|
897
868
|
/** 接口调用失败的回调函数 */
|
|
898
869
|
fail?: (params: {
|
|
899
870
|
/** 错误信息 */
|
|
@@ -911,8 +882,7 @@ declare namespace ty.health {
|
|
|
911
882
|
}): void
|
|
912
883
|
|
|
913
884
|
/**
|
|
914
|
-
* Quantity
|
|
915
|
-
* 需要参数为permissions
|
|
885
|
+
* 批量申请 Quantity、Category、Characteristic 的读取权限 [iOS only]
|
|
916
886
|
* @public
|
|
917
887
|
* @since HealthKit 7.1.5
|
|
918
888
|
* @platform Android
|
|
@@ -923,8 +893,7 @@ declare namespace ty.health {
|
|
|
923
893
|
): null
|
|
924
894
|
|
|
925
895
|
/**
|
|
926
|
-
* Quantity
|
|
927
|
-
* 需要参数为permissions
|
|
896
|
+
* 批量查询 Quantity、Category、Characteristic 是否已完成读取授权 [iOS only]
|
|
928
897
|
* @public
|
|
929
898
|
* @since HealthKit 7.1.5
|
|
930
899
|
* @platform Android
|
|
@@ -932,22 +901,22 @@ declare namespace ty.health {
|
|
|
932
901
|
*/
|
|
933
902
|
export function authiOSAllStatuPermissions(params: {
|
|
934
903
|
/**
|
|
935
|
-
*
|
|
904
|
+
* Quantity 类型权限或数据参数
|
|
936
905
|
* @since HealthKit 7.1.5
|
|
937
906
|
*/
|
|
938
907
|
quantityParam?: ParamModel
|
|
939
908
|
/**
|
|
940
|
-
*
|
|
909
|
+
* Category 类型权限或数据参数
|
|
941
910
|
* @since HealthKit 7.1.5
|
|
942
911
|
*/
|
|
943
912
|
categoryParam?: ParamModel
|
|
944
913
|
/**
|
|
945
|
-
*
|
|
914
|
+
* Characteristic 类型权限或数据参数
|
|
946
915
|
* @since HealthKit 7.1.5
|
|
947
916
|
*/
|
|
948
917
|
characteristicParam?: ParamModel
|
|
949
918
|
/**
|
|
950
|
-
*
|
|
919
|
+
* 是否包含运动记录(Workout)相关权限或数据
|
|
951
920
|
* @since HealthKit 7.1.5
|
|
952
921
|
*/
|
|
953
922
|
workoutType: boolean
|
|
@@ -956,8 +925,7 @@ declare namespace ty.health {
|
|
|
956
925
|
/** 接口调用成功的回调函数 */
|
|
957
926
|
success?: (params: {
|
|
958
927
|
/**
|
|
959
|
-
* 1
|
|
960
|
-
* 0 代表传入的类型至少有一个没有请求过对应的读写权限
|
|
928
|
+
* 授权状态:1 表示传入类型均已申请过对应读写权限;0 表示至少有一项未申请
|
|
961
929
|
* @since HealthKit 7.1.5
|
|
962
930
|
*/
|
|
963
931
|
value: number
|
|
@@ -979,8 +947,7 @@ declare namespace ty.health {
|
|
|
979
947
|
}): void
|
|
980
948
|
|
|
981
949
|
/**
|
|
982
|
-
* Quantity
|
|
983
|
-
* 需要参数为permissions
|
|
950
|
+
* 批量查询 Quantity、Category、Characteristic 是否已完成读取授权 [iOS only]
|
|
984
951
|
* @public
|
|
985
952
|
* @since HealthKit 7.1.5
|
|
986
953
|
* @platform Android
|
|
@@ -988,16 +955,14 @@ declare namespace ty.health {
|
|
|
988
955
|
*/
|
|
989
956
|
export function authiOSAllStatuPermissionsSync(paramModel?: IOSParamModel): {
|
|
990
957
|
/**
|
|
991
|
-
* 1
|
|
992
|
-
* 0 代表传入的类型至少有一个没有请求过对应的读写权限
|
|
958
|
+
* 授权状态:1 表示传入类型均已申请过对应读写权限;0 表示至少有一项未申请
|
|
993
959
|
* @since HealthKit 7.1.5
|
|
994
960
|
*/
|
|
995
961
|
value: number
|
|
996
962
|
}
|
|
997
963
|
|
|
998
964
|
/**
|
|
999
|
-
*
|
|
1000
|
-
* 需要参数为permissions
|
|
965
|
+
* 将健康记录批量写入 iOS HealthKit [iOS only]
|
|
1001
966
|
* @public
|
|
1002
967
|
* @since HealthKit 7.1.5
|
|
1003
968
|
* @platform iOS
|
|
@@ -1030,8 +995,7 @@ declare namespace ty.health {
|
|
|
1030
995
|
}): void
|
|
1031
996
|
|
|
1032
997
|
/**
|
|
1033
|
-
*
|
|
1034
|
-
* 需要参数为permissions
|
|
998
|
+
* 将健康记录批量写入 iOS HealthKit [iOS only]
|
|
1035
999
|
* @public
|
|
1036
1000
|
* @since HealthKit 7.1.5
|
|
1037
1001
|
* @platform iOS
|
|
@@ -1040,8 +1004,7 @@ declare namespace ty.health {
|
|
|
1040
1004
|
export function insertiOSRecordsSync(request?: RecordIOSParams): boolean
|
|
1041
1005
|
|
|
1042
1006
|
/**
|
|
1043
|
-
* Quantity
|
|
1044
|
-
* 需要参数为permissions
|
|
1007
|
+
* 申请 Quantity 类型数据的读写权限 [iOS only]
|
|
1045
1008
|
* @public
|
|
1046
1009
|
* @since HealthKit 5.18.3
|
|
1047
1010
|
* @platform iOS
|
|
@@ -1072,7 +1035,7 @@ declare namespace ty.health {
|
|
|
1072
1035
|
*/
|
|
1073
1036
|
writePermission?: number
|
|
1074
1037
|
/**
|
|
1075
|
-
*
|
|
1038
|
+
* 写入数值(Quantity 或 Category 类型数据的具体测量值)
|
|
1076
1039
|
* @since HealthKit 5.18.3
|
|
1077
1040
|
*/
|
|
1078
1041
|
value?: number
|
|
@@ -1100,7 +1063,7 @@ declare namespace ty.health {
|
|
|
1100
1063
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1101
1064
|
complete?: () => void
|
|
1102
1065
|
/** 接口调用成功的回调函数 */
|
|
1103
|
-
success?: (
|
|
1066
|
+
success?: () => void
|
|
1104
1067
|
/** 接口调用失败的回调函数 */
|
|
1105
1068
|
fail?: (params: {
|
|
1106
1069
|
/** 错误信息 */
|
|
@@ -1118,8 +1081,7 @@ declare namespace ty.health {
|
|
|
1118
1081
|
}): void
|
|
1119
1082
|
|
|
1120
1083
|
/**
|
|
1121
|
-
* Quantity
|
|
1122
|
-
* 需要参数为permissions
|
|
1084
|
+
* 申请 Quantity 类型数据的读写权限 [iOS only]
|
|
1123
1085
|
* @public
|
|
1124
1086
|
* @since HealthKit 5.18.3
|
|
1125
1087
|
* @platform iOS
|
|
@@ -1128,8 +1090,7 @@ declare namespace ty.health {
|
|
|
1128
1090
|
export function authQuantityRWPermissionsSync(paramModel?: ParamModel): null
|
|
1129
1091
|
|
|
1130
1092
|
/**
|
|
1131
|
-
* Category
|
|
1132
|
-
* 需要参数为permissions
|
|
1093
|
+
* 申请 Category 类型数据的读写权限 [iOS only]
|
|
1133
1094
|
* @public
|
|
1134
1095
|
* @since HealthKit 5.18.0
|
|
1135
1096
|
* @platform iOS
|
|
@@ -1160,7 +1121,7 @@ declare namespace ty.health {
|
|
|
1160
1121
|
*/
|
|
1161
1122
|
writePermission?: number
|
|
1162
1123
|
/**
|
|
1163
|
-
*
|
|
1124
|
+
* 写入数值(Quantity 或 Category 类型数据的具体测量值)
|
|
1164
1125
|
* @since HealthKit 5.18.3
|
|
1165
1126
|
*/
|
|
1166
1127
|
value?: number
|
|
@@ -1188,7 +1149,7 @@ declare namespace ty.health {
|
|
|
1188
1149
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1189
1150
|
complete?: () => void
|
|
1190
1151
|
/** 接口调用成功的回调函数 */
|
|
1191
|
-
success?: (
|
|
1152
|
+
success?: () => void
|
|
1192
1153
|
/** 接口调用失败的回调函数 */
|
|
1193
1154
|
fail?: (params: {
|
|
1194
1155
|
/** 错误信息 */
|
|
@@ -1206,8 +1167,7 @@ declare namespace ty.health {
|
|
|
1206
1167
|
}): void
|
|
1207
1168
|
|
|
1208
1169
|
/**
|
|
1209
|
-
* Category
|
|
1210
|
-
* 需要参数为permissions
|
|
1170
|
+
* 申请 Category 类型数据的读写权限 [iOS only]
|
|
1211
1171
|
* @public
|
|
1212
1172
|
* @since HealthKit 5.18.0
|
|
1213
1173
|
* @platform iOS
|
|
@@ -1216,8 +1176,7 @@ declare namespace ty.health {
|
|
|
1216
1176
|
export function authCategoryRWPermissionsSync(paramModel?: ParamModel): null
|
|
1217
1177
|
|
|
1218
1178
|
/**
|
|
1219
|
-
* 写入Quantity
|
|
1220
|
-
* 需要参数为value,type,unitType,startTime,endTime
|
|
1179
|
+
* 写入 Quantity 类型健康数据(含起止时间) [iOS only]
|
|
1221
1180
|
* @public
|
|
1222
1181
|
* @since HealthKit 5.18.3
|
|
1223
1182
|
* @platform iOS
|
|
@@ -1249,7 +1208,7 @@ declare namespace ty.health {
|
|
|
1249
1208
|
*/
|
|
1250
1209
|
writePermission?: number
|
|
1251
1210
|
/**
|
|
1252
|
-
*
|
|
1211
|
+
* 写入数值(Quantity 或 Category 类型数据的具体测量值)
|
|
1253
1212
|
* @since HealthKit 5.18.3
|
|
1254
1213
|
*/
|
|
1255
1214
|
value?: number
|
|
@@ -1277,7 +1236,7 @@ declare namespace ty.health {
|
|
|
1277
1236
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1278
1237
|
complete?: () => void
|
|
1279
1238
|
/** 接口调用成功的回调函数 */
|
|
1280
|
-
success?: (
|
|
1239
|
+
success?: () => void
|
|
1281
1240
|
/** 接口调用失败的回调函数 */
|
|
1282
1241
|
fail?: (params: {
|
|
1283
1242
|
/** 错误信息 */
|
|
@@ -1295,8 +1254,7 @@ declare namespace ty.health {
|
|
|
1295
1254
|
}): void
|
|
1296
1255
|
|
|
1297
1256
|
/**
|
|
1298
|
-
* 写入Quantity
|
|
1299
|
-
* 需要参数为value,type,unitType,startTime,endTime
|
|
1257
|
+
* 写入 Quantity 类型健康数据(含起止时间) [iOS only]
|
|
1300
1258
|
* @public
|
|
1301
1259
|
* @since HealthKit 5.18.3
|
|
1302
1260
|
* @platform iOS
|
|
@@ -1306,8 +1264,7 @@ declare namespace ty.health {
|
|
|
1306
1264
|
export function saveQuantityDataSync(paramModel?: ParamModel): null
|
|
1307
1265
|
|
|
1308
1266
|
/**
|
|
1309
|
-
* 写入Quantity
|
|
1310
|
-
* 需要参数为value,type,unitType
|
|
1267
|
+
* 写入 Quantity 类型健康数据(不传时间,起止时间默认为当前时刻) [iOS only]
|
|
1311
1268
|
* @public
|
|
1312
1269
|
* @since HealthKit 5.18.3
|
|
1313
1270
|
* @platform iOS
|
|
@@ -1339,7 +1296,7 @@ declare namespace ty.health {
|
|
|
1339
1296
|
*/
|
|
1340
1297
|
writePermission?: number
|
|
1341
1298
|
/**
|
|
1342
|
-
*
|
|
1299
|
+
* 写入数值(Quantity 或 Category 类型数据的具体测量值)
|
|
1343
1300
|
* @since HealthKit 5.18.3
|
|
1344
1301
|
*/
|
|
1345
1302
|
value?: number
|
|
@@ -1367,7 +1324,7 @@ declare namespace ty.health {
|
|
|
1367
1324
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1368
1325
|
complete?: () => void
|
|
1369
1326
|
/** 接口调用成功的回调函数 */
|
|
1370
|
-
success?: (
|
|
1327
|
+
success?: () => void
|
|
1371
1328
|
/** 接口调用失败的回调函数 */
|
|
1372
1329
|
fail?: (params: {
|
|
1373
1330
|
/** 错误信息 */
|
|
@@ -1385,8 +1342,7 @@ declare namespace ty.health {
|
|
|
1385
1342
|
}): void
|
|
1386
1343
|
|
|
1387
1344
|
/**
|
|
1388
|
-
* 写入Quantity
|
|
1389
|
-
* 需要参数为value,type,unitType
|
|
1345
|
+
* 写入 Quantity 类型健康数据(不传时间,起止时间默认为当前时刻) [iOS only]
|
|
1390
1346
|
* @public
|
|
1391
1347
|
* @since HealthKit 5.18.3
|
|
1392
1348
|
* @platform iOS
|
|
@@ -1396,7 +1352,7 @@ declare namespace ty.health {
|
|
|
1396
1352
|
export function saveQuantityNoTimeWithDataSync(paramModel?: ParamModel): null
|
|
1397
1353
|
|
|
1398
1354
|
/**
|
|
1399
|
-
*
|
|
1355
|
+
* 写入血压数据(收缩压、舒张压及起止时间) [iOS only]
|
|
1400
1356
|
* @public
|
|
1401
1357
|
* @since HealthKit 5.18.0
|
|
1402
1358
|
* @platform iOS
|
|
@@ -1427,7 +1383,7 @@ declare namespace ty.health {
|
|
|
1427
1383
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1428
1384
|
complete?: () => void
|
|
1429
1385
|
/** 接口调用成功的回调函数 */
|
|
1430
|
-
success?: (
|
|
1386
|
+
success?: () => void
|
|
1431
1387
|
/** 接口调用失败的回调函数 */
|
|
1432
1388
|
fail?: (params: {
|
|
1433
1389
|
/** 错误信息 */
|
|
@@ -1445,7 +1401,7 @@ declare namespace ty.health {
|
|
|
1445
1401
|
}): void
|
|
1446
1402
|
|
|
1447
1403
|
/**
|
|
1448
|
-
*
|
|
1404
|
+
* 写入血压数据(收缩压、舒张压及起止时间) [iOS only]
|
|
1449
1405
|
* @public
|
|
1450
1406
|
* @since HealthKit 5.18.0
|
|
1451
1407
|
* @platform iOS
|
|
@@ -1457,8 +1413,7 @@ declare namespace ty.health {
|
|
|
1457
1413
|
): null
|
|
1458
1414
|
|
|
1459
1415
|
/**
|
|
1460
|
-
*
|
|
1461
|
-
* 需要参数为type,unitType,startTime,endTime
|
|
1416
|
+
* 按类型与时间范围读取 Quantity 健康数据 [iOS only]
|
|
1462
1417
|
* @public
|
|
1463
1418
|
* @since HealthKit 5.18.3
|
|
1464
1419
|
* @platform iOS
|
|
@@ -1489,7 +1444,7 @@ declare namespace ty.health {
|
|
|
1489
1444
|
*/
|
|
1490
1445
|
writePermission?: number
|
|
1491
1446
|
/**
|
|
1492
|
-
*
|
|
1447
|
+
* 写入数值(Quantity 或 Category 类型数据的具体测量值)
|
|
1493
1448
|
* @since HealthKit 5.18.3
|
|
1494
1449
|
*/
|
|
1495
1450
|
value?: number
|
|
@@ -1525,7 +1480,7 @@ declare namespace ty.health {
|
|
|
1525
1480
|
* endDate: Double 读取到的条目的截止时间戳
|
|
1526
1481
|
* @since HealthKit 5.18.4
|
|
1527
1482
|
*/
|
|
1528
|
-
value:
|
|
1483
|
+
value: Record<string, any>[]
|
|
1529
1484
|
}) => void
|
|
1530
1485
|
/** 接口调用失败的回调函数 */
|
|
1531
1486
|
fail?: (params: {
|
|
@@ -1544,8 +1499,7 @@ declare namespace ty.health {
|
|
|
1544
1499
|
}): void
|
|
1545
1500
|
|
|
1546
1501
|
/**
|
|
1547
|
-
*
|
|
1548
|
-
* 需要参数为type,unitType,startTime,endTime
|
|
1502
|
+
* 按类型与时间范围读取 Quantity 健康数据 [iOS only]
|
|
1549
1503
|
* @public
|
|
1550
1504
|
* @since HealthKit 5.18.3
|
|
1551
1505
|
* @platform iOS
|
|
@@ -1559,12 +1513,11 @@ declare namespace ty.health {
|
|
|
1559
1513
|
* endDate: Double 读取到的条目的截止时间戳
|
|
1560
1514
|
* @since HealthKit 5.18.4
|
|
1561
1515
|
*/
|
|
1562
|
-
value:
|
|
1516
|
+
value: Record<string, any>[]
|
|
1563
1517
|
}
|
|
1564
1518
|
|
|
1565
1519
|
/**
|
|
1566
|
-
*
|
|
1567
|
-
* 需要参数为type,startTime,endTime
|
|
1520
|
+
* 按类型与时间范围删除 Quantity 健康数据 [iOS only]
|
|
1568
1521
|
* @public
|
|
1569
1522
|
* @since HealthKit 5.18.3
|
|
1570
1523
|
* @platform iOS
|
|
@@ -1596,7 +1549,7 @@ declare namespace ty.health {
|
|
|
1596
1549
|
*/
|
|
1597
1550
|
writePermission?: number
|
|
1598
1551
|
/**
|
|
1599
|
-
*
|
|
1552
|
+
* 写入数值(Quantity 或 Category 类型数据的具体测量值)
|
|
1600
1553
|
* @since HealthKit 5.18.3
|
|
1601
1554
|
*/
|
|
1602
1555
|
value?: number
|
|
@@ -1624,7 +1577,7 @@ declare namespace ty.health {
|
|
|
1624
1577
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1625
1578
|
complete?: () => void
|
|
1626
1579
|
/** 接口调用成功的回调函数 */
|
|
1627
|
-
success?: (
|
|
1580
|
+
success?: () => void
|
|
1628
1581
|
/** 接口调用失败的回调函数 */
|
|
1629
1582
|
fail?: (params: {
|
|
1630
1583
|
/** 错误信息 */
|
|
@@ -1642,8 +1595,7 @@ declare namespace ty.health {
|
|
|
1642
1595
|
}): void
|
|
1643
1596
|
|
|
1644
1597
|
/**
|
|
1645
|
-
*
|
|
1646
|
-
* 需要参数为type,startTime,endTime
|
|
1598
|
+
* 按类型与时间范围删除 Quantity 健康数据 [iOS only]
|
|
1647
1599
|
* @public
|
|
1648
1600
|
* @since HealthKit 5.18.3
|
|
1649
1601
|
* @platform iOS
|
|
@@ -1653,8 +1605,7 @@ declare namespace ty.health {
|
|
|
1653
1605
|
export function deleteQuantityDataTypeSync(paramModel?: ParamModel): null
|
|
1654
1606
|
|
|
1655
1607
|
/**
|
|
1656
|
-
*
|
|
1657
|
-
* 需要参数为type
|
|
1608
|
+
* 按类型读取 Characteristic 健康数据 [iOS only]
|
|
1658
1609
|
* @public
|
|
1659
1610
|
* @since HealthKit 5.18.0
|
|
1660
1611
|
* @platform iOS
|
|
@@ -1685,7 +1636,7 @@ declare namespace ty.health {
|
|
|
1685
1636
|
*/
|
|
1686
1637
|
writePermission?: number
|
|
1687
1638
|
/**
|
|
1688
|
-
*
|
|
1639
|
+
* 写入数值(Quantity 或 Category 类型数据的具体测量值)
|
|
1689
1640
|
* @since HealthKit 5.18.3
|
|
1690
1641
|
*/
|
|
1691
1642
|
value?: number
|
|
@@ -1721,7 +1672,7 @@ declare namespace ty.health {
|
|
|
1721
1672
|
* endDate: Double 读取到的条目的截止时间戳
|
|
1722
1673
|
* @since HealthKit 5.18.4
|
|
1723
1674
|
*/
|
|
1724
|
-
value:
|
|
1675
|
+
value: Record<string, any>[]
|
|
1725
1676
|
}) => void
|
|
1726
1677
|
/** 接口调用失败的回调函数 */
|
|
1727
1678
|
fail?: (params: {
|
|
@@ -1740,8 +1691,7 @@ declare namespace ty.health {
|
|
|
1740
1691
|
}): void
|
|
1741
1692
|
|
|
1742
1693
|
/**
|
|
1743
|
-
*
|
|
1744
|
-
* 需要参数为type
|
|
1694
|
+
* 按类型读取 Characteristic 健康数据 [iOS only]
|
|
1745
1695
|
* @public
|
|
1746
1696
|
* @since HealthKit 5.18.0
|
|
1747
1697
|
* @platform iOS
|
|
@@ -1755,13 +1705,11 @@ declare namespace ty.health {
|
|
|
1755
1705
|
* endDate: Double 读取到的条目的截止时间戳
|
|
1756
1706
|
* @since HealthKit 5.18.4
|
|
1757
1707
|
*/
|
|
1758
|
-
value:
|
|
1708
|
+
value: Record<string, any>[]
|
|
1759
1709
|
}
|
|
1760
1710
|
|
|
1761
1711
|
/**
|
|
1762
|
-
* 写入Category
|
|
1763
|
-
* 需要参数为value,type,startTime,endTime
|
|
1764
|
-
* Category类型数据的写入参考苹果官方文档的定义
|
|
1712
|
+
* 写入 Category 类型健康数据(含起止时间) [iOS only]
|
|
1765
1713
|
* @public
|
|
1766
1714
|
* @since HealthKit 5.18.3
|
|
1767
1715
|
* @platform iOS
|
|
@@ -1793,7 +1741,7 @@ declare namespace ty.health {
|
|
|
1793
1741
|
*/
|
|
1794
1742
|
writePermission?: number
|
|
1795
1743
|
/**
|
|
1796
|
-
*
|
|
1744
|
+
* 写入数值(Quantity 或 Category 类型数据的具体测量值)
|
|
1797
1745
|
* @since HealthKit 5.18.3
|
|
1798
1746
|
*/
|
|
1799
1747
|
value?: number
|
|
@@ -1821,7 +1769,7 @@ declare namespace ty.health {
|
|
|
1821
1769
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1822
1770
|
complete?: () => void
|
|
1823
1771
|
/** 接口调用成功的回调函数 */
|
|
1824
|
-
success?: (
|
|
1772
|
+
success?: () => void
|
|
1825
1773
|
/** 接口调用失败的回调函数 */
|
|
1826
1774
|
fail?: (params: {
|
|
1827
1775
|
/** 错误信息 */
|
|
@@ -1839,9 +1787,7 @@ declare namespace ty.health {
|
|
|
1839
1787
|
}): void
|
|
1840
1788
|
|
|
1841
1789
|
/**
|
|
1842
|
-
* 写入Category
|
|
1843
|
-
* 需要参数为value,type,startTime,endTime
|
|
1844
|
-
* Category类型数据的写入参考苹果官方文档的定义
|
|
1790
|
+
* 写入 Category 类型健康数据(含起止时间) [iOS only]
|
|
1845
1791
|
* @public
|
|
1846
1792
|
* @since HealthKit 5.18.3
|
|
1847
1793
|
* @platform iOS
|
|
@@ -1851,8 +1797,7 @@ declare namespace ty.health {
|
|
|
1851
1797
|
export function saveCategoryDataSync(paramModel?: ParamModel): null
|
|
1852
1798
|
|
|
1853
1799
|
/**
|
|
1854
|
-
* 写入Category
|
|
1855
|
-
* 需要参数为value,type
|
|
1800
|
+
* 写入 Category 类型健康数据(不传时间,起止时间默认为当前时刻) [iOS only]
|
|
1856
1801
|
* @public
|
|
1857
1802
|
* @since HealthKit 5.18.0
|
|
1858
1803
|
* @platform iOS
|
|
@@ -1884,7 +1829,7 @@ declare namespace ty.health {
|
|
|
1884
1829
|
*/
|
|
1885
1830
|
writePermission?: number
|
|
1886
1831
|
/**
|
|
1887
|
-
*
|
|
1832
|
+
* 写入数值(Quantity 或 Category 类型数据的具体测量值)
|
|
1888
1833
|
* @since HealthKit 5.18.3
|
|
1889
1834
|
*/
|
|
1890
1835
|
value?: number
|
|
@@ -1912,7 +1857,7 @@ declare namespace ty.health {
|
|
|
1912
1857
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1913
1858
|
complete?: () => void
|
|
1914
1859
|
/** 接口调用成功的回调函数 */
|
|
1915
|
-
success?: (
|
|
1860
|
+
success?: () => void
|
|
1916
1861
|
/** 接口调用失败的回调函数 */
|
|
1917
1862
|
fail?: (params: {
|
|
1918
1863
|
/** 错误信息 */
|
|
@@ -1930,8 +1875,7 @@ declare namespace ty.health {
|
|
|
1930
1875
|
}): void
|
|
1931
1876
|
|
|
1932
1877
|
/**
|
|
1933
|
-
* 写入Category
|
|
1934
|
-
* 需要参数为value,type
|
|
1878
|
+
* 写入 Category 类型健康数据(不传时间,起止时间默认为当前时刻) [iOS only]
|
|
1935
1879
|
* @public
|
|
1936
1880
|
* @since HealthKit 5.18.0
|
|
1937
1881
|
* @platform iOS
|
|
@@ -1941,8 +1885,7 @@ declare namespace ty.health {
|
|
|
1941
1885
|
export function saveCategoryNoTimeWithDataSync(paramModel?: ParamModel): null
|
|
1942
1886
|
|
|
1943
1887
|
/**
|
|
1944
|
-
*
|
|
1945
|
-
* 需要参数为type,startTime,endTime
|
|
1888
|
+
* 按类型与时间范围读取 Category 健康数据 [iOS only]
|
|
1946
1889
|
* @public
|
|
1947
1890
|
* @since HealthKit 5.18.0
|
|
1948
1891
|
* @platform iOS
|
|
@@ -1973,7 +1916,7 @@ declare namespace ty.health {
|
|
|
1973
1916
|
*/
|
|
1974
1917
|
writePermission?: number
|
|
1975
1918
|
/**
|
|
1976
|
-
*
|
|
1919
|
+
* 写入数值(Quantity 或 Category 类型数据的具体测量值)
|
|
1977
1920
|
* @since HealthKit 5.18.3
|
|
1978
1921
|
*/
|
|
1979
1922
|
value?: number
|
|
@@ -2009,7 +1952,7 @@ declare namespace ty.health {
|
|
|
2009
1952
|
* endDate: Double 读取到的条目的截止时间戳
|
|
2010
1953
|
* @since HealthKit 5.18.4
|
|
2011
1954
|
*/
|
|
2012
|
-
value:
|
|
1955
|
+
value: Record<string, any>[]
|
|
2013
1956
|
}) => void
|
|
2014
1957
|
/** 接口调用失败的回调函数 */
|
|
2015
1958
|
fail?: (params: {
|
|
@@ -2028,8 +1971,7 @@ declare namespace ty.health {
|
|
|
2028
1971
|
}): void
|
|
2029
1972
|
|
|
2030
1973
|
/**
|
|
2031
|
-
*
|
|
2032
|
-
* 需要参数为type,startTime,endTime
|
|
1974
|
+
* 按类型与时间范围读取 Category 健康数据 [iOS only]
|
|
2033
1975
|
* @public
|
|
2034
1976
|
* @since HealthKit 5.18.0
|
|
2035
1977
|
* @platform iOS
|
|
@@ -2043,44 +1985,44 @@ declare namespace ty.health {
|
|
|
2043
1985
|
* endDate: Double 读取到的条目的截止时间戳
|
|
2044
1986
|
* @since HealthKit 5.18.4
|
|
2045
1987
|
*/
|
|
2046
|
-
value:
|
|
1988
|
+
value: Record<string, any>[]
|
|
2047
1989
|
}
|
|
2048
1990
|
|
|
2049
1991
|
/**
|
|
2050
|
-
*
|
|
1992
|
+
* 根据体脂秤测量数据计算身体成分指标 [Android only]
|
|
2051
1993
|
* @public
|
|
2052
|
-
* @since HealthKit 5.
|
|
1994
|
+
* @since HealthKit 6.5.0
|
|
2053
1995
|
* @platform Android
|
|
2054
1996
|
*/
|
|
2055
1997
|
export function queryBodyFatScaleAlgorithm(params: {
|
|
2056
1998
|
/**
|
|
2057
|
-
*
|
|
2058
|
-
* @since HealthKit 5.
|
|
1999
|
+
* 性别:1 男,2 女
|
|
2000
|
+
* @since HealthKit 6.5.0
|
|
2059
2001
|
*/
|
|
2060
2002
|
sex: number
|
|
2061
2003
|
/**
|
|
2062
2004
|
* 体重(单位kg)
|
|
2063
|
-
* @since HealthKit 5.
|
|
2005
|
+
* @since HealthKit 6.5.0
|
|
2064
2006
|
*/
|
|
2065
2007
|
weight: number
|
|
2066
2008
|
/**
|
|
2067
2009
|
* 阻抗
|
|
2068
|
-
* @since HealthKit 5.
|
|
2010
|
+
* @since HealthKit 6.5.0
|
|
2069
2011
|
*/
|
|
2070
2012
|
imp: number
|
|
2071
2013
|
/**
|
|
2072
2014
|
* 身高(单位cm)
|
|
2073
|
-
* @since HealthKit 5.
|
|
2015
|
+
* @since HealthKit 6.5.0
|
|
2074
2016
|
*/
|
|
2075
2017
|
height: number
|
|
2076
2018
|
/**
|
|
2077
2019
|
* 生日(13位、毫秒)
|
|
2078
|
-
* @since HealthKit 5.
|
|
2020
|
+
* @since HealthKit 6.5.0
|
|
2079
2021
|
*/
|
|
2080
2022
|
birthday: number
|
|
2081
2023
|
/**
|
|
2082
2024
|
* 测量时间(13位、毫秒)
|
|
2083
|
-
* @since HealthKit 5.
|
|
2025
|
+
* @since HealthKit 6.5.0
|
|
2084
2026
|
*/
|
|
2085
2027
|
time: number
|
|
2086
2028
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
@@ -2089,92 +2031,92 @@ declare namespace ty.health {
|
|
|
2089
2031
|
success?: (params: {
|
|
2090
2032
|
/**
|
|
2091
2033
|
* bmi
|
|
2092
|
-
* @since HealthKit 5.
|
|
2034
|
+
* @since HealthKit 6.5.0
|
|
2093
2035
|
*/
|
|
2094
2036
|
bmi: string
|
|
2095
2037
|
/**
|
|
2096
2038
|
* 体脂率
|
|
2097
|
-
* @since HealthKit 5.
|
|
2039
|
+
* @since HealthKit 6.5.0
|
|
2098
2040
|
*/
|
|
2099
2041
|
fat: string
|
|
2100
2042
|
/**
|
|
2101
2043
|
* 水份率
|
|
2102
|
-
* @since HealthKit 5.
|
|
2044
|
+
* @since HealthKit 6.5.0
|
|
2103
2045
|
*/
|
|
2104
2046
|
water: string
|
|
2105
2047
|
/**
|
|
2106
2048
|
* 肌肉量
|
|
2107
|
-
* @since HealthKit 5.
|
|
2049
|
+
* @since HealthKit 6.5.0
|
|
2108
2050
|
*/
|
|
2109
2051
|
muscle: string
|
|
2110
2052
|
/**
|
|
2111
2053
|
* 蛋白率
|
|
2112
|
-
* @since HealthKit 5.
|
|
2054
|
+
* @since HealthKit 6.5.0
|
|
2113
2055
|
*/
|
|
2114
2056
|
protein: string
|
|
2115
2057
|
/**
|
|
2116
2058
|
* 骨量
|
|
2117
|
-
* @since HealthKit 5.
|
|
2059
|
+
* @since HealthKit 6.5.0
|
|
2118
2060
|
*/
|
|
2119
2061
|
bones: string
|
|
2120
2062
|
/**
|
|
2121
2063
|
* 基础代谢率
|
|
2122
|
-
* @since HealthKit 5.
|
|
2064
|
+
* @since HealthKit 6.5.0
|
|
2123
2065
|
*/
|
|
2124
2066
|
metabolism: string
|
|
2125
2067
|
/**
|
|
2126
2068
|
* 身体年龄
|
|
2127
|
-
* @since HealthKit 5.
|
|
2069
|
+
* @since HealthKit 6.5.0
|
|
2128
2070
|
*/
|
|
2129
2071
|
bodyAge: string
|
|
2130
2072
|
/**
|
|
2131
2073
|
* 身体得分
|
|
2132
|
-
* @since HealthKit 5.
|
|
2074
|
+
* @since HealthKit 6.5.0
|
|
2133
2075
|
*/
|
|
2134
2076
|
bodyScore: string
|
|
2135
2077
|
/**
|
|
2136
2078
|
* 内脂肪等级
|
|
2137
|
-
* @since HealthKit 5.
|
|
2079
|
+
* @since HealthKit 6.5.0
|
|
2138
2080
|
*/
|
|
2139
2081
|
visceralFat: string
|
|
2140
2082
|
/**
|
|
2141
2083
|
* 体型
|
|
2142
|
-
* @since HealthKit 5.
|
|
2084
|
+
* @since HealthKit 6.5.0
|
|
2143
2085
|
*/
|
|
2144
2086
|
bodyType: string
|
|
2145
2087
|
/**
|
|
2146
2088
|
* 去脂指数
|
|
2147
|
-
* @since HealthKit 5.
|
|
2089
|
+
* @since HealthKit 6.5.0
|
|
2148
2090
|
*/
|
|
2149
2091
|
ffm: string
|
|
2150
2092
|
/**
|
|
2151
2093
|
* 脂肪量
|
|
2152
|
-
* @since HealthKit 5.
|
|
2094
|
+
* @since HealthKit 6.5.0
|
|
2153
2095
|
*/
|
|
2154
2096
|
fatMass: string
|
|
2155
2097
|
/**
|
|
2156
2098
|
* 体脂指数
|
|
2157
|
-
* @since HealthKit 5.
|
|
2099
|
+
* @since HealthKit 6.5.0
|
|
2158
2100
|
*/
|
|
2159
2101
|
bodyFatIndex: string
|
|
2160
2102
|
/**
|
|
2161
2103
|
* 肥胖等级
|
|
2162
|
-
* @since HealthKit 5.
|
|
2104
|
+
* @since HealthKit 6.5.0
|
|
2163
2105
|
*/
|
|
2164
2106
|
fatLevel: string
|
|
2165
2107
|
/**
|
|
2166
2108
|
* 标准体重
|
|
2167
|
-
* @since HealthKit 5.
|
|
2109
|
+
* @since HealthKit 6.5.0
|
|
2168
2110
|
*/
|
|
2169
2111
|
standardWeight: string
|
|
2170
2112
|
/**
|
|
2171
2113
|
* 体重控制
|
|
2172
|
-
* @since HealthKit 5.
|
|
2114
|
+
* @since HealthKit 6.5.0
|
|
2173
2115
|
*/
|
|
2174
2116
|
weightControl: string
|
|
2175
2117
|
/**
|
|
2176
2118
|
* 肌肉率
|
|
2177
|
-
* @since HealthKit 5.
|
|
2119
|
+
* @since HealthKit 6.5.0
|
|
2178
2120
|
*/
|
|
2179
2121
|
muscleRatio: string
|
|
2180
2122
|
}) => void
|
|
@@ -2195,106 +2137,106 @@ declare namespace ty.health {
|
|
|
2195
2137
|
}): void
|
|
2196
2138
|
|
|
2197
2139
|
/**
|
|
2198
|
-
*
|
|
2140
|
+
* 根据体脂秤测量数据计算身体成分指标 [Android only]
|
|
2199
2141
|
* @public
|
|
2200
|
-
* @since HealthKit 5.
|
|
2142
|
+
* @since HealthKit 6.5.0
|
|
2201
2143
|
* @platform Android
|
|
2202
2144
|
*/
|
|
2203
2145
|
export function queryBodyFatScaleAlgorithmSync(request?: BodyScaleParam): {
|
|
2204
2146
|
/**
|
|
2205
2147
|
* bmi
|
|
2206
|
-
* @since HealthKit 5.
|
|
2148
|
+
* @since HealthKit 6.5.0
|
|
2207
2149
|
*/
|
|
2208
2150
|
bmi: string
|
|
2209
2151
|
/**
|
|
2210
2152
|
* 体脂率
|
|
2211
|
-
* @since HealthKit 5.
|
|
2153
|
+
* @since HealthKit 6.5.0
|
|
2212
2154
|
*/
|
|
2213
2155
|
fat: string
|
|
2214
2156
|
/**
|
|
2215
2157
|
* 水份率
|
|
2216
|
-
* @since HealthKit 5.
|
|
2158
|
+
* @since HealthKit 6.5.0
|
|
2217
2159
|
*/
|
|
2218
2160
|
water: string
|
|
2219
2161
|
/**
|
|
2220
2162
|
* 肌肉量
|
|
2221
|
-
* @since HealthKit 5.
|
|
2163
|
+
* @since HealthKit 6.5.0
|
|
2222
2164
|
*/
|
|
2223
2165
|
muscle: string
|
|
2224
2166
|
/**
|
|
2225
2167
|
* 蛋白率
|
|
2226
|
-
* @since HealthKit 5.
|
|
2168
|
+
* @since HealthKit 6.5.0
|
|
2227
2169
|
*/
|
|
2228
2170
|
protein: string
|
|
2229
2171
|
/**
|
|
2230
2172
|
* 骨量
|
|
2231
|
-
* @since HealthKit 5.
|
|
2173
|
+
* @since HealthKit 6.5.0
|
|
2232
2174
|
*/
|
|
2233
2175
|
bones: string
|
|
2234
2176
|
/**
|
|
2235
2177
|
* 基础代谢率
|
|
2236
|
-
* @since HealthKit 5.
|
|
2178
|
+
* @since HealthKit 6.5.0
|
|
2237
2179
|
*/
|
|
2238
2180
|
metabolism: string
|
|
2239
2181
|
/**
|
|
2240
2182
|
* 身体年龄
|
|
2241
|
-
* @since HealthKit 5.
|
|
2183
|
+
* @since HealthKit 6.5.0
|
|
2242
2184
|
*/
|
|
2243
2185
|
bodyAge: string
|
|
2244
2186
|
/**
|
|
2245
2187
|
* 身体得分
|
|
2246
|
-
* @since HealthKit 5.
|
|
2188
|
+
* @since HealthKit 6.5.0
|
|
2247
2189
|
*/
|
|
2248
2190
|
bodyScore: string
|
|
2249
2191
|
/**
|
|
2250
2192
|
* 内脂肪等级
|
|
2251
|
-
* @since HealthKit 5.
|
|
2193
|
+
* @since HealthKit 6.5.0
|
|
2252
2194
|
*/
|
|
2253
2195
|
visceralFat: string
|
|
2254
2196
|
/**
|
|
2255
2197
|
* 体型
|
|
2256
|
-
* @since HealthKit 5.
|
|
2198
|
+
* @since HealthKit 6.5.0
|
|
2257
2199
|
*/
|
|
2258
2200
|
bodyType: string
|
|
2259
2201
|
/**
|
|
2260
2202
|
* 去脂指数
|
|
2261
|
-
* @since HealthKit 5.
|
|
2203
|
+
* @since HealthKit 6.5.0
|
|
2262
2204
|
*/
|
|
2263
2205
|
ffm: string
|
|
2264
2206
|
/**
|
|
2265
2207
|
* 脂肪量
|
|
2266
|
-
* @since HealthKit 5.
|
|
2208
|
+
* @since HealthKit 6.5.0
|
|
2267
2209
|
*/
|
|
2268
2210
|
fatMass: string
|
|
2269
2211
|
/**
|
|
2270
2212
|
* 体脂指数
|
|
2271
|
-
* @since HealthKit 5.
|
|
2213
|
+
* @since HealthKit 6.5.0
|
|
2272
2214
|
*/
|
|
2273
2215
|
bodyFatIndex: string
|
|
2274
2216
|
/**
|
|
2275
2217
|
* 肥胖等级
|
|
2276
|
-
* @since HealthKit 5.
|
|
2218
|
+
* @since HealthKit 6.5.0
|
|
2277
2219
|
*/
|
|
2278
2220
|
fatLevel: string
|
|
2279
2221
|
/**
|
|
2280
2222
|
* 标准体重
|
|
2281
|
-
* @since HealthKit 5.
|
|
2223
|
+
* @since HealthKit 6.5.0
|
|
2282
2224
|
*/
|
|
2283
2225
|
standardWeight: string
|
|
2284
2226
|
/**
|
|
2285
2227
|
* 体重控制
|
|
2286
|
-
* @since HealthKit 5.
|
|
2228
|
+
* @since HealthKit 6.5.0
|
|
2287
2229
|
*/
|
|
2288
2230
|
weightControl: string
|
|
2289
2231
|
/**
|
|
2290
2232
|
* 肌肉率
|
|
2291
|
-
* @since HealthKit 5.
|
|
2233
|
+
* @since HealthKit 6.5.0
|
|
2292
2234
|
*/
|
|
2293
2235
|
muscleRatio: string
|
|
2294
2236
|
}
|
|
2295
2237
|
|
|
2296
2238
|
/**
|
|
2297
|
-
*
|
|
2239
|
+
* 判断设备是否为健康本地化数据设备 [Android only]
|
|
2298
2240
|
* @public
|
|
2299
2241
|
* @since HealthKit 7.0.5
|
|
2300
2242
|
* @platform Android
|
|
@@ -2332,7 +2274,7 @@ declare namespace ty.health {
|
|
|
2332
2274
|
}): void
|
|
2333
2275
|
|
|
2334
2276
|
/**
|
|
2335
|
-
*
|
|
2277
|
+
* 判断设备是否为健康本地化数据设备 [Android only]
|
|
2336
2278
|
* @public
|
|
2337
2279
|
* @since HealthKit 7.0.5
|
|
2338
2280
|
* @platform Android
|
|
@@ -2346,7 +2288,7 @@ declare namespace ty.health {
|
|
|
2346
2288
|
}
|
|
2347
2289
|
|
|
2348
2290
|
/**
|
|
2349
|
-
*
|
|
2291
|
+
* 向本地化数据设备提交大数据通道数据 [Android only]
|
|
2350
2292
|
* @public
|
|
2351
2293
|
* @since HealthKit 7.0.5
|
|
2352
2294
|
* @platform Android
|
|
@@ -2365,7 +2307,7 @@ declare namespace ty.health {
|
|
|
2365
2307
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
2366
2308
|
complete?: () => void
|
|
2367
2309
|
/** 接口调用成功的回调函数 */
|
|
2368
|
-
success?: (
|
|
2310
|
+
success?: () => void
|
|
2369
2311
|
/** 接口调用失败的回调函数 */
|
|
2370
2312
|
fail?: (params: {
|
|
2371
2313
|
/** 错误信息 */
|
|
@@ -2383,7 +2325,7 @@ declare namespace ty.health {
|
|
|
2383
2325
|
}): void
|
|
2384
2326
|
|
|
2385
2327
|
/**
|
|
2386
|
-
*
|
|
2328
|
+
* 向本地化数据设备提交大数据通道数据 [Android only]
|
|
2387
2329
|
* @public
|
|
2388
2330
|
* @since HealthKit 7.0.5
|
|
2389
2331
|
* @platform Android
|
|
@@ -2393,7 +2335,7 @@ declare namespace ty.health {
|
|
|
2393
2335
|
): null
|
|
2394
2336
|
|
|
2395
2337
|
/**
|
|
2396
|
-
*
|
|
2338
|
+
* 获取健康本地化数据库当前版本号 [Android only]
|
|
2397
2339
|
* @public
|
|
2398
2340
|
* @since HealthKit 7.0.5
|
|
2399
2341
|
* @platform Android
|
|
@@ -2426,7 +2368,7 @@ declare namespace ty.health {
|
|
|
2426
2368
|
}): void
|
|
2427
2369
|
|
|
2428
2370
|
/**
|
|
2429
|
-
*
|
|
2371
|
+
* 获取健康本地化数据库当前版本号 [Android only]
|
|
2430
2372
|
* @public
|
|
2431
2373
|
* @since HealthKit 7.0.5
|
|
2432
2374
|
* @platform Android
|
|
@@ -2440,7 +2382,7 @@ declare namespace ty.health {
|
|
|
2440
2382
|
}
|
|
2441
2383
|
|
|
2442
2384
|
/**
|
|
2443
|
-
*
|
|
2385
|
+
* 健康本地化数据库的统一读写接口(按 apiName 路由) [Android only]
|
|
2444
2386
|
* @public
|
|
2445
2387
|
* @since HealthKit 7.0.5
|
|
2446
2388
|
* @platform Android
|
|
@@ -2461,7 +2403,7 @@ declare namespace ty.health {
|
|
|
2461
2403
|
/** 接口调用成功的回调函数 */
|
|
2462
2404
|
success?: (params: {
|
|
2463
2405
|
/**
|
|
2464
|
-
*
|
|
2406
|
+
* 业务返回数据(JSON 字符串,具体结构由 apiName 决定)
|
|
2465
2407
|
* @since HealthKit 7.0.5
|
|
2466
2408
|
*/
|
|
2467
2409
|
result: string
|
|
@@ -2483,21 +2425,21 @@ declare namespace ty.health {
|
|
|
2483
2425
|
}): void
|
|
2484
2426
|
|
|
2485
2427
|
/**
|
|
2486
|
-
*
|
|
2428
|
+
* 健康本地化数据库的统一读写接口(按 apiName 路由) [Android only]
|
|
2487
2429
|
* @public
|
|
2488
2430
|
* @since HealthKit 7.0.5
|
|
2489
2431
|
* @platform Android
|
|
2490
2432
|
*/
|
|
2491
2433
|
export function requestLocalDataApiSync(param?: HealthDataLocalParams): {
|
|
2492
2434
|
/**
|
|
2493
|
-
*
|
|
2435
|
+
* 业务返回数据(JSON 字符串,具体结构由 apiName 决定)
|
|
2494
2436
|
* @since HealthKit 7.0.5
|
|
2495
2437
|
*/
|
|
2496
2438
|
result: string
|
|
2497
2439
|
}
|
|
2498
2440
|
|
|
2499
2441
|
/**
|
|
2500
|
-
*
|
|
2442
|
+
* 初始化健康 AI 小程序本地化数据库 [Android only]
|
|
2501
2443
|
* @public
|
|
2502
2444
|
* @since HealthKit 7.1.5
|
|
2503
2445
|
* @platform Android
|
|
@@ -2506,7 +2448,7 @@ declare namespace ty.health {
|
|
|
2506
2448
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
2507
2449
|
complete?: () => void
|
|
2508
2450
|
/** 接口调用成功的回调函数 */
|
|
2509
|
-
success?: (
|
|
2451
|
+
success?: () => void
|
|
2510
2452
|
/** 接口调用失败的回调函数 */
|
|
2511
2453
|
fail?: (params: {
|
|
2512
2454
|
/** 错误信息 */
|
|
@@ -2524,7 +2466,7 @@ declare namespace ty.health {
|
|
|
2524
2466
|
}): void
|
|
2525
2467
|
|
|
2526
2468
|
/**
|
|
2527
|
-
*
|
|
2469
|
+
* 初始化健康 AI 小程序本地化数据库 [Android only]
|
|
2528
2470
|
* @public
|
|
2529
2471
|
* @since HealthKit 7.1.5
|
|
2530
2472
|
* @platform Android
|
|
@@ -2532,7 +2474,7 @@ declare namespace ty.health {
|
|
|
2532
2474
|
export function aiHealthInitSync(): null
|
|
2533
2475
|
|
|
2534
2476
|
/**
|
|
2535
|
-
* 健康AI
|
|
2477
|
+
* 健康 AI 小程序本地化数据库的统一读写接口(按 apiName 路由) [Android only]
|
|
2536
2478
|
* @public
|
|
2537
2479
|
* @since HealthKit 7.1.5
|
|
2538
2480
|
* @platform Android
|
|
@@ -2553,17 +2495,17 @@ declare namespace ty.health {
|
|
|
2553
2495
|
/** 接口调用成功的回调函数 */
|
|
2554
2496
|
success?: (params: {
|
|
2555
2497
|
/**
|
|
2556
|
-
*
|
|
2498
|
+
* 业务返回数据(JSON 字符串,具体结构由 apiName 决定)
|
|
2557
2499
|
* @since HealthKit 7.1.5
|
|
2558
2500
|
*/
|
|
2559
2501
|
result?: string
|
|
2560
2502
|
/**
|
|
2561
|
-
*
|
|
2503
|
+
* 响应时间戳(毫秒)
|
|
2562
2504
|
* @since HealthKit 7.1.5
|
|
2563
2505
|
*/
|
|
2564
2506
|
t: number
|
|
2565
2507
|
/**
|
|
2566
|
-
*
|
|
2508
|
+
* 接口调用是否成功
|
|
2567
2509
|
* @since HealthKit 7.1.5
|
|
2568
2510
|
*/
|
|
2569
2511
|
success: boolean
|
|
@@ -2585,31 +2527,225 @@ declare namespace ty.health {
|
|
|
2585
2527
|
}): void
|
|
2586
2528
|
|
|
2587
2529
|
/**
|
|
2588
|
-
* 健康AI
|
|
2530
|
+
* 健康 AI 小程序本地化数据库的统一读写接口(按 apiName 路由) [Android only]
|
|
2589
2531
|
* @public
|
|
2590
2532
|
* @since HealthKit 7.1.5
|
|
2591
2533
|
* @platform Android
|
|
2592
2534
|
*/
|
|
2593
2535
|
export function requestAiHealthDataApiSync(param?: AIHealthDataParams): {
|
|
2594
2536
|
/**
|
|
2595
|
-
*
|
|
2537
|
+
* 业务返回数据(JSON 字符串,具体结构由 apiName 决定)
|
|
2596
2538
|
* @since HealthKit 7.1.5
|
|
2597
2539
|
*/
|
|
2598
2540
|
result?: string
|
|
2599
2541
|
/**
|
|
2600
|
-
*
|
|
2542
|
+
* 响应时间戳(毫秒)
|
|
2601
2543
|
* @since HealthKit 7.1.5
|
|
2602
2544
|
*/
|
|
2603
2545
|
t: number
|
|
2604
2546
|
/**
|
|
2605
|
-
*
|
|
2547
|
+
* 接口调用是否成功
|
|
2606
2548
|
* @since HealthKit 7.1.5
|
|
2607
2549
|
*/
|
|
2608
2550
|
success: boolean
|
|
2609
2551
|
}
|
|
2610
2552
|
|
|
2611
2553
|
/**
|
|
2612
|
-
*
|
|
2554
|
+
* 面板自定义 DP 本地化数据库的统一读写接口
|
|
2555
|
+
* 通过 apiName 路由到具体操作,支持建表/查表/记录增删改查及离线 DP 存储。
|
|
2556
|
+
* 面板只能指定表名,列结构由 App 固定。
|
|
2557
|
+
* apiName 枚举:
|
|
2558
|
+
* table.create 新建数据表
|
|
2559
|
+
* table.exist 判断表是否存在
|
|
2560
|
+
* table.list 查询已注册表列表
|
|
2561
|
+
* record.insert 写入 DP 记录(必填 devId、userId、time 毫秒时间戳)
|
|
2562
|
+
* record.query 查询 DP 记录(必填 startTime、endTime;devId 推荐;支持 readStatus 过滤)
|
|
2563
|
+
* record.update 更新 DP 记录(仅 dpValue / extra 可改)
|
|
2564
|
+
* record.delete 删除 DP 记录
|
|
2565
|
+
* record.readMark 修改已读/未读(离线表 is_read)
|
|
2566
|
+
* offline.init 首次建离线表 + 登记 (devId, dpCode) 映射
|
|
2567
|
+
* offline.bind.list 查询已登记 DP 映射
|
|
2568
|
+
* offline.unbind 移除映射(不停表、不删历史行)
|
|
2569
|
+
* offline.sync.pull 面板拉 BLE 大数据通道,批量写入离线表
|
|
2570
|
+
* @public
|
|
2571
|
+
* @since HealthKit 7.9.0
|
|
2572
|
+
* @example Demo
|
|
2573
|
+
* ```tsx
|
|
2574
|
+
* function callCommonDataApi(apiName, request = {}) {
|
|
2575
|
+
* return new Promise((resolve, reject) => {
|
|
2576
|
+
* ty.health.requestCommonDataApi({
|
|
2577
|
+
* apiName,
|
|
2578
|
+
* request,
|
|
2579
|
+
* success: data => resolve(data),
|
|
2580
|
+
* fail: reject,
|
|
2581
|
+
* });
|
|
2582
|
+
* });
|
|
2583
|
+
* }
|
|
2584
|
+
*
|
|
2585
|
+
* const tableName = "panel_step_data";
|
|
2586
|
+
* const devId = "vdev123";
|
|
2587
|
+
* const userId = "u001";
|
|
2588
|
+
* const time = Date.now();
|
|
2589
|
+
* const startTime = new Date().setHours(0, 0, 0, 0);
|
|
2590
|
+
* const endTime = new Date().setHours(23, 59, 59, 999);
|
|
2591
|
+
*
|
|
2592
|
+
* const existRes = await callCommonDataApi("table.exist", { tableName });
|
|
2593
|
+
* const existData = JSON.parse(existRes.result || "{}");
|
|
2594
|
+
* if (!existData.exist) {
|
|
2595
|
+
* await callCommonDataApi("table.create", { tableName, enableExtra: false });
|
|
2596
|
+
* }
|
|
2597
|
+
*
|
|
2598
|
+
* await callCommonDataApi("table.list", {});
|
|
2599
|
+
*
|
|
2600
|
+
* const insertRes = await callCommonDataApi("record.insert", {
|
|
2601
|
+
* tableName,
|
|
2602
|
+
* devId,
|
|
2603
|
+
* userId,
|
|
2604
|
+
* time,
|
|
2605
|
+
* dpCode: "step_count",
|
|
2606
|
+
* dpValue: "8000",
|
|
2607
|
+
* });
|
|
2608
|
+
* const recordId = JSON.parse(insertRes.result || "{}").id;
|
|
2609
|
+
*
|
|
2610
|
+
* await callCommonDataApi("record.query", {
|
|
2611
|
+
* tableName,
|
|
2612
|
+
* devId,
|
|
2613
|
+
* userId,
|
|
2614
|
+
* dpCode: "step_count",
|
|
2615
|
+
* startTime,
|
|
2616
|
+
* endTime,
|
|
2617
|
+
* pageSize: 50,
|
|
2618
|
+
* pageIndex: 0,
|
|
2619
|
+
* });
|
|
2620
|
+
*
|
|
2621
|
+
* await callCommonDataApi("record.update", {
|
|
2622
|
+
* tableName,
|
|
2623
|
+
* id: recordId,
|
|
2624
|
+
* dpValue: "8500",
|
|
2625
|
+
* });
|
|
2626
|
+
*
|
|
2627
|
+
* await callCommonDataApi("record.delete", {
|
|
2628
|
+
* tableName,
|
|
2629
|
+
* id: recordId,
|
|
2630
|
+
* });
|
|
2631
|
+
* ```
|
|
2632
|
+
* @example Demo
|
|
2633
|
+
* ```tsx
|
|
2634
|
+
* function callCommonDataApi(apiName, request = {}) {
|
|
2635
|
+
* return new Promise((resolve, reject) => {
|
|
2636
|
+
* ty.health.requestCommonDataApi({
|
|
2637
|
+
* apiName,
|
|
2638
|
+
* request,
|
|
2639
|
+
* success: data => resolve(data),
|
|
2640
|
+
* fail: reject,
|
|
2641
|
+
* });
|
|
2642
|
+
* });
|
|
2643
|
+
* }
|
|
2644
|
+
*
|
|
2645
|
+
* const tableName = 'offline_data';
|
|
2646
|
+
* const devId = 'vdev123';
|
|
2647
|
+
* const userId = 'u001';
|
|
2648
|
+
* const panelDpCodes = ['step_count', 'calorie'];
|
|
2649
|
+
* const startTime = new Date().setHours(0, 0, 0, 0);
|
|
2650
|
+
* const endTime = new Date().setHours(23, 59, 59, 999);
|
|
2651
|
+
*
|
|
2652
|
+
* // 1. 查已有映射,只补新 dpCode
|
|
2653
|
+
* const bindRes = await callCommonDataApi('offline.bind.list', { devId });
|
|
2654
|
+
* const bindData = JSON.parse(bindRes.result || '{}');
|
|
2655
|
+
* const existing = new Set((bindData.bindings || []).map(b => b.dpCode));
|
|
2656
|
+
* const needRegister = panelDpCodes.filter(c => !existing.has(c));
|
|
2657
|
+
*
|
|
2658
|
+
* if (needRegister.length > 0) {
|
|
2659
|
+
* await callCommonDataApi('offline.init', {
|
|
2660
|
+
* userId,
|
|
2661
|
+
* deviceBindings: [{ devId, dpCodes: needRegister }],
|
|
2662
|
+
* });
|
|
2663
|
+
* }
|
|
2664
|
+
*
|
|
2665
|
+
* // 拉设备端大批量历史 DP(进入面板时调用)
|
|
2666
|
+
* const pullRes = await callCommonDataApi('offline.sync.pull', { devId });
|
|
2667
|
+
* const pullData = JSON.parse(pullRes.result || '{}');
|
|
2668
|
+
* console.log('sync.pull', pullData);
|
|
2669
|
+
*
|
|
2670
|
+
* // 2. 查未读
|
|
2671
|
+
* const unreadRes = await callCommonDataApi('record.query', {
|
|
2672
|
+
* tableName,
|
|
2673
|
+
* devId,
|
|
2674
|
+
* userId,
|
|
2675
|
+
* readStatus: 0,
|
|
2676
|
+
* startTime,
|
|
2677
|
+
* endTime,
|
|
2678
|
+
* pageSize: 50,
|
|
2679
|
+
* pageIndex: 0,
|
|
2680
|
+
* });
|
|
2681
|
+
* const unread = JSON.parse(unreadRes.result || '{}');
|
|
2682
|
+
*
|
|
2683
|
+
* // 3. 标已读
|
|
2684
|
+
* if ((unread.list || []).length > 0) {
|
|
2685
|
+
* await callCommonDataApi('record.readMark', {
|
|
2686
|
+
* tableName,
|
|
2687
|
+
* ids: unread.list.map(r => r.id),
|
|
2688
|
+
* readStatus: 1,
|
|
2689
|
+
* });
|
|
2690
|
+
* }
|
|
2691
|
+
*
|
|
2692
|
+
* // 4. 面板手动补数据(可选)
|
|
2693
|
+
* await callCommonDataApi('record.insert', {
|
|
2694
|
+
* tableName,
|
|
2695
|
+
* devId,
|
|
2696
|
+
* userId,
|
|
2697
|
+
* time: Date.now(),
|
|
2698
|
+
* dpCode: 'step_count',
|
|
2699
|
+
* dpValue: '8000',
|
|
2700
|
+
* });
|
|
2701
|
+
*
|
|
2702
|
+
* // 5. 停止自动 sync(可选,保留历史)
|
|
2703
|
+
* // await callCommonDataApi('offline.unbind', { devId });
|
|
2704
|
+
*
|
|
2705
|
+
* // 6. 清理历史数据(可选)
|
|
2706
|
+
* // await callCommonDataApi('record.delete', { tableName, devId, startTime, endTime });
|
|
2707
|
+
* ```
|
|
2708
|
+
* @platform iOS Android
|
|
2709
|
+
*/
|
|
2710
|
+
export function requestCommonDataApi(params: {
|
|
2711
|
+
/**
|
|
2712
|
+
* 接口名称,见 requestCommonDataApi 文档中的 apiName 枚举
|
|
2713
|
+
* @since HealthKit 7.9.0
|
|
2714
|
+
*/
|
|
2715
|
+
apiName: string
|
|
2716
|
+
/**
|
|
2717
|
+
* 业务参数,具体字段由各 apiName 定义
|
|
2718
|
+
* @since HealthKit 7.9.0
|
|
2719
|
+
*/
|
|
2720
|
+
request?: Record<string, any>
|
|
2721
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
2722
|
+
complete?: () => void
|
|
2723
|
+
/** 接口调用成功的回调函数 */
|
|
2724
|
+
success?: (params: {
|
|
2725
|
+
/**
|
|
2726
|
+
* JSON 字符串,具体结构由各 apiName 定义
|
|
2727
|
+
* @since HealthKit 7.9.0
|
|
2728
|
+
*/
|
|
2729
|
+
result?: string
|
|
2730
|
+
}) => void
|
|
2731
|
+
/** 接口调用失败的回调函数 */
|
|
2732
|
+
fail?: (params: {
|
|
2733
|
+
/** 错误信息 */
|
|
2734
|
+
errorMsg: string
|
|
2735
|
+
/** 错误码 */
|
|
2736
|
+
errorCode: string | number
|
|
2737
|
+
/** 错误扩展 */
|
|
2738
|
+
innerError: {
|
|
2739
|
+
/** 错误扩展码 */
|
|
2740
|
+
errorCode: string | number
|
|
2741
|
+
/** 错误扩展信息 */
|
|
2742
|
+
errorMsg: string
|
|
2743
|
+
}
|
|
2744
|
+
}) => void
|
|
2745
|
+
}): void
|
|
2746
|
+
|
|
2747
|
+
/**
|
|
2748
|
+
* Health Connect 批量写入入参
|
|
2613
2749
|
* @since HealthKit 5.18.0
|
|
2614
2750
|
*/
|
|
2615
2751
|
export interface RecordParams {
|
|
@@ -2695,7 +2831,7 @@ declare namespace ty.health {
|
|
|
2695
2831
|
*/
|
|
2696
2832
|
endTime?: number
|
|
2697
2833
|
/**
|
|
2698
|
-
*
|
|
2834
|
+
* 单值类型数据的测量值(如步数、心率等)
|
|
2699
2835
|
* @since HealthKit 7.1.5
|
|
2700
2836
|
*/
|
|
2701
2837
|
value?: number
|
|
@@ -2802,7 +2938,10 @@ declare namespace ty.health {
|
|
|
2802
2938
|
count: number
|
|
2803
2939
|
}
|
|
2804
2940
|
|
|
2805
|
-
/**
|
|
2941
|
+
/**
|
|
2942
|
+
* iOS HealthKit 通用入参(权限申请、数据读写)
|
|
2943
|
+
* @since HealthKit 5.18.0
|
|
2944
|
+
*/
|
|
2806
2945
|
export interface ParamModel {
|
|
2807
2946
|
/**
|
|
2808
2947
|
* 权限类型(申请读写权限的接口使用),具体枚举值查看下文的枚举列表
|
|
@@ -2828,7 +2967,7 @@ declare namespace ty.health {
|
|
|
2828
2967
|
*/
|
|
2829
2968
|
writePermission?: number
|
|
2830
2969
|
/**
|
|
2831
|
-
*
|
|
2970
|
+
* 写入数值(Quantity 或 Category 类型数据的具体测量值)
|
|
2832
2971
|
* @since HealthKit 5.18.3
|
|
2833
2972
|
*/
|
|
2834
2973
|
value?: number
|
|
@@ -2855,52 +2994,59 @@ declare namespace ty.health {
|
|
|
2855
2994
|
type?: number
|
|
2856
2995
|
}
|
|
2857
2996
|
|
|
2858
|
-
/**
|
|
2997
|
+
/**
|
|
2998
|
+
* 授权状态查询结果
|
|
2999
|
+
* @since HealthKit 5.18.4
|
|
3000
|
+
*/
|
|
2859
3001
|
export interface StatusPermissionsResp {
|
|
2860
3002
|
/**
|
|
2861
|
-
* 1
|
|
2862
|
-
* 0 代表传入的类型至少有一个没有请求过对应的读写权限
|
|
3003
|
+
* 授权状态:1 表示传入类型均已申请过对应读写权限;0 表示至少有一项未申请
|
|
2863
3004
|
* @since HealthKit 5.18.4
|
|
2864
3005
|
*/
|
|
2865
3006
|
value: number
|
|
2866
3007
|
}
|
|
2867
3008
|
|
|
2868
|
-
/**
|
|
3009
|
+
/**
|
|
3010
|
+
* 写入权限查询结果
|
|
3011
|
+
* @since HealthKit 5.18.4
|
|
3012
|
+
*/
|
|
2869
3013
|
export interface GetWritePermissionResp {
|
|
2870
3014
|
/**
|
|
2871
|
-
* 1
|
|
2872
|
-
* 0 无写入权限
|
|
3015
|
+
* 写入权限状态:1 有写入权限;0 无写入权限
|
|
2873
3016
|
* @since HealthKit 5.18.4
|
|
2874
3017
|
*/
|
|
2875
3018
|
value: number
|
|
2876
3019
|
}
|
|
2877
3020
|
|
|
2878
|
-
/**
|
|
3021
|
+
/**
|
|
3022
|
+
* iOS 多类型健康数据组合入参(Quantity / Category / Characteristic)
|
|
3023
|
+
* @since HealthKit 7.1.5
|
|
3024
|
+
*/
|
|
2879
3025
|
export interface IOSParamModel {
|
|
2880
3026
|
/**
|
|
2881
|
-
*
|
|
3027
|
+
* Quantity 类型权限或数据参数
|
|
2882
3028
|
* @since HealthKit 7.1.5
|
|
2883
3029
|
*/
|
|
2884
3030
|
quantityParam?: ParamModel
|
|
2885
3031
|
/**
|
|
2886
|
-
*
|
|
3032
|
+
* Category 类型权限或数据参数
|
|
2887
3033
|
* @since HealthKit 7.1.5
|
|
2888
3034
|
*/
|
|
2889
3035
|
categoryParam?: ParamModel
|
|
2890
3036
|
/**
|
|
2891
|
-
*
|
|
3037
|
+
* Characteristic 类型权限或数据参数
|
|
2892
3038
|
* @since HealthKit 7.1.5
|
|
2893
3039
|
*/
|
|
2894
3040
|
characteristicParam?: ParamModel
|
|
2895
3041
|
/**
|
|
2896
|
-
*
|
|
3042
|
+
* 是否包含运动记录(Workout)相关权限或数据
|
|
2897
3043
|
* @since HealthKit 7.1.5
|
|
2898
3044
|
*/
|
|
2899
3045
|
workoutType: boolean
|
|
2900
3046
|
}
|
|
2901
3047
|
|
|
2902
3048
|
/**
|
|
2903
|
-
*
|
|
3049
|
+
* iOS HealthKit 批量写入入参
|
|
2904
3050
|
* @since HealthKit 7.1.5
|
|
2905
3051
|
*/
|
|
2906
3052
|
export interface RecordIOSParams {
|
|
@@ -2938,10 +3084,10 @@ declare namespace ty.health {
|
|
|
2938
3084
|
endTime: number
|
|
2939
3085
|
}
|
|
2940
3086
|
|
|
2941
|
-
/**
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
3087
|
+
/**
|
|
3088
|
+
* 健康数据读取结果
|
|
3089
|
+
* @since HealthKit 5.18.4
|
|
3090
|
+
*/
|
|
2945
3091
|
export interface ReadDataResp {
|
|
2946
3092
|
/**
|
|
2947
3093
|
* 读取到的数据,是一个数组,数组中每一项是一个字典,具体定义如下
|
|
@@ -2950,133 +3096,139 @@ declare namespace ty.health {
|
|
|
2950
3096
|
* endDate: Double 读取到的条目的截止时间戳
|
|
2951
3097
|
* @since HealthKit 5.18.4
|
|
2952
3098
|
*/
|
|
2953
|
-
value:
|
|
3099
|
+
value: Record<string, any>[]
|
|
2954
3100
|
}
|
|
2955
3101
|
|
|
2956
|
-
/**
|
|
3102
|
+
/**
|
|
3103
|
+
* 体脂秤算法计算入参
|
|
3104
|
+
* @since HealthKit 6.5.0
|
|
3105
|
+
*/
|
|
2957
3106
|
export interface BodyScaleParam {
|
|
2958
3107
|
/**
|
|
2959
|
-
*
|
|
2960
|
-
* @since HealthKit 5.
|
|
3108
|
+
* 性别:1 男,2 女
|
|
3109
|
+
* @since HealthKit 6.5.0
|
|
2961
3110
|
*/
|
|
2962
3111
|
sex: number
|
|
2963
3112
|
/**
|
|
2964
3113
|
* 体重(单位kg)
|
|
2965
|
-
* @since HealthKit 5.
|
|
3114
|
+
* @since HealthKit 6.5.0
|
|
2966
3115
|
*/
|
|
2967
3116
|
weight: number
|
|
2968
3117
|
/**
|
|
2969
3118
|
* 阻抗
|
|
2970
|
-
* @since HealthKit 5.
|
|
3119
|
+
* @since HealthKit 6.5.0
|
|
2971
3120
|
*/
|
|
2972
3121
|
imp: number
|
|
2973
3122
|
/**
|
|
2974
3123
|
* 身高(单位cm)
|
|
2975
|
-
* @since HealthKit 5.
|
|
3124
|
+
* @since HealthKit 6.5.0
|
|
2976
3125
|
*/
|
|
2977
3126
|
height: number
|
|
2978
3127
|
/**
|
|
2979
3128
|
* 生日(13位、毫秒)
|
|
2980
|
-
* @since HealthKit 5.
|
|
3129
|
+
* @since HealthKit 6.5.0
|
|
2981
3130
|
*/
|
|
2982
3131
|
birthday: number
|
|
2983
3132
|
/**
|
|
2984
3133
|
* 测量时间(13位、毫秒)
|
|
2985
|
-
* @since HealthKit 5.
|
|
3134
|
+
* @since HealthKit 6.5.0
|
|
2986
3135
|
*/
|
|
2987
3136
|
time: number
|
|
2988
3137
|
}
|
|
2989
3138
|
|
|
2990
|
-
/**
|
|
3139
|
+
/**
|
|
3140
|
+
* 体脂秤算法计算结果
|
|
3141
|
+
* @since HealthKit 6.5.0
|
|
3142
|
+
*/
|
|
2991
3143
|
export interface BodyScaleResponse {
|
|
2992
3144
|
/**
|
|
2993
3145
|
* bmi
|
|
2994
|
-
* @since HealthKit 5.
|
|
3146
|
+
* @since HealthKit 6.5.0
|
|
2995
3147
|
*/
|
|
2996
3148
|
bmi: string
|
|
2997
3149
|
/**
|
|
2998
3150
|
* 体脂率
|
|
2999
|
-
* @since HealthKit 5.
|
|
3151
|
+
* @since HealthKit 6.5.0
|
|
3000
3152
|
*/
|
|
3001
3153
|
fat: string
|
|
3002
3154
|
/**
|
|
3003
3155
|
* 水份率
|
|
3004
|
-
* @since HealthKit 5.
|
|
3156
|
+
* @since HealthKit 6.5.0
|
|
3005
3157
|
*/
|
|
3006
3158
|
water: string
|
|
3007
3159
|
/**
|
|
3008
3160
|
* 肌肉量
|
|
3009
|
-
* @since HealthKit 5.
|
|
3161
|
+
* @since HealthKit 6.5.0
|
|
3010
3162
|
*/
|
|
3011
3163
|
muscle: string
|
|
3012
3164
|
/**
|
|
3013
3165
|
* 蛋白率
|
|
3014
|
-
* @since HealthKit 5.
|
|
3166
|
+
* @since HealthKit 6.5.0
|
|
3015
3167
|
*/
|
|
3016
3168
|
protein: string
|
|
3017
3169
|
/**
|
|
3018
3170
|
* 骨量
|
|
3019
|
-
* @since HealthKit 5.
|
|
3171
|
+
* @since HealthKit 6.5.0
|
|
3020
3172
|
*/
|
|
3021
3173
|
bones: string
|
|
3022
3174
|
/**
|
|
3023
3175
|
* 基础代谢率
|
|
3024
|
-
* @since HealthKit 5.
|
|
3176
|
+
* @since HealthKit 6.5.0
|
|
3025
3177
|
*/
|
|
3026
3178
|
metabolism: string
|
|
3027
3179
|
/**
|
|
3028
3180
|
* 身体年龄
|
|
3029
|
-
* @since HealthKit 5.
|
|
3181
|
+
* @since HealthKit 6.5.0
|
|
3030
3182
|
*/
|
|
3031
3183
|
bodyAge: string
|
|
3032
3184
|
/**
|
|
3033
3185
|
* 身体得分
|
|
3034
|
-
* @since HealthKit 5.
|
|
3186
|
+
* @since HealthKit 6.5.0
|
|
3035
3187
|
*/
|
|
3036
3188
|
bodyScore: string
|
|
3037
3189
|
/**
|
|
3038
3190
|
* 内脂肪等级
|
|
3039
|
-
* @since HealthKit 5.
|
|
3191
|
+
* @since HealthKit 6.5.0
|
|
3040
3192
|
*/
|
|
3041
3193
|
visceralFat: string
|
|
3042
3194
|
/**
|
|
3043
3195
|
* 体型
|
|
3044
|
-
* @since HealthKit 5.
|
|
3196
|
+
* @since HealthKit 6.5.0
|
|
3045
3197
|
*/
|
|
3046
3198
|
bodyType: string
|
|
3047
3199
|
/**
|
|
3048
3200
|
* 去脂指数
|
|
3049
|
-
* @since HealthKit 5.
|
|
3201
|
+
* @since HealthKit 6.5.0
|
|
3050
3202
|
*/
|
|
3051
3203
|
ffm: string
|
|
3052
3204
|
/**
|
|
3053
3205
|
* 脂肪量
|
|
3054
|
-
* @since HealthKit 5.
|
|
3206
|
+
* @since HealthKit 6.5.0
|
|
3055
3207
|
*/
|
|
3056
3208
|
fatMass: string
|
|
3057
3209
|
/**
|
|
3058
3210
|
* 体脂指数
|
|
3059
|
-
* @since HealthKit 5.
|
|
3211
|
+
* @since HealthKit 6.5.0
|
|
3060
3212
|
*/
|
|
3061
3213
|
bodyFatIndex: string
|
|
3062
3214
|
/**
|
|
3063
3215
|
* 肥胖等级
|
|
3064
|
-
* @since HealthKit 5.
|
|
3216
|
+
* @since HealthKit 6.5.0
|
|
3065
3217
|
*/
|
|
3066
3218
|
fatLevel: string
|
|
3067
3219
|
/**
|
|
3068
3220
|
* 标准体重
|
|
3069
|
-
* @since HealthKit 5.
|
|
3221
|
+
* @since HealthKit 6.5.0
|
|
3070
3222
|
*/
|
|
3071
3223
|
standardWeight: string
|
|
3072
3224
|
/**
|
|
3073
3225
|
* 体重控制
|
|
3074
|
-
* @since HealthKit 5.
|
|
3226
|
+
* @since HealthKit 6.5.0
|
|
3075
3227
|
*/
|
|
3076
3228
|
weightControl: string
|
|
3077
3229
|
/**
|
|
3078
3230
|
* 肌肉率
|
|
3079
|
-
* @since HealthKit 5.
|
|
3231
|
+
* @since HealthKit 6.5.0
|
|
3080
3232
|
*/
|
|
3081
3233
|
muscleRatio: string
|
|
3082
3234
|
}
|
|
@@ -3157,14 +3309,14 @@ declare namespace ty.health {
|
|
|
3157
3309
|
*/
|
|
3158
3310
|
export interface HealthDataLocalRequest {
|
|
3159
3311
|
/**
|
|
3160
|
-
*
|
|
3312
|
+
* 业务返回数据(JSON 字符串,具体结构由 apiName 决定)
|
|
3161
3313
|
* @since HealthKit 7.0.5
|
|
3162
3314
|
*/
|
|
3163
3315
|
result: string
|
|
3164
3316
|
}
|
|
3165
3317
|
|
|
3166
3318
|
/**
|
|
3167
|
-
* 健康AI
|
|
3319
|
+
* 健康 AI 小程序本地化数据库接口入参
|
|
3168
3320
|
* @since HealthKit 7.1.5
|
|
3169
3321
|
*/
|
|
3170
3322
|
export interface AIHealthDataParams {
|
|
@@ -3181,35 +3333,63 @@ declare namespace ty.health {
|
|
|
3181
3333
|
}
|
|
3182
3334
|
|
|
3183
3335
|
/**
|
|
3184
|
-
* 健康AI
|
|
3336
|
+
* 健康 AI 小程序本地化数据库接口返回结果
|
|
3185
3337
|
* @since HealthKit 7.1.5
|
|
3186
3338
|
*/
|
|
3187
3339
|
export interface AIHealthDataRequest {
|
|
3188
3340
|
/**
|
|
3189
|
-
*
|
|
3341
|
+
* 业务返回数据(JSON 字符串,具体结构由 apiName 决定)
|
|
3190
3342
|
* @since HealthKit 7.1.5
|
|
3191
3343
|
*/
|
|
3192
3344
|
result?: string
|
|
3193
3345
|
/**
|
|
3194
|
-
*
|
|
3346
|
+
* 响应时间戳(毫秒)
|
|
3195
3347
|
* @since HealthKit 7.1.5
|
|
3196
3348
|
*/
|
|
3197
3349
|
t: number
|
|
3198
3350
|
/**
|
|
3199
|
-
*
|
|
3351
|
+
* 接口调用是否成功
|
|
3200
3352
|
* @since HealthKit 7.1.5
|
|
3201
3353
|
*/
|
|
3202
3354
|
success: boolean
|
|
3203
3355
|
}
|
|
3204
3356
|
|
|
3205
|
-
/**
|
|
3357
|
+
/**
|
|
3358
|
+
* 面板 DP 本地化数据库请求参数
|
|
3359
|
+
* @since HealthKit 7.9.0
|
|
3360
|
+
*/
|
|
3361
|
+
export interface CommonDataParams {
|
|
3362
|
+
/**
|
|
3363
|
+
* 接口名称,见 requestCommonDataApi 文档中的 apiName 枚举
|
|
3364
|
+
* @since HealthKit 7.9.0
|
|
3365
|
+
*/
|
|
3366
|
+
apiName: string
|
|
3367
|
+
/**
|
|
3368
|
+
* 业务参数,具体字段由各 apiName 定义
|
|
3369
|
+
* @since HealthKit 7.9.0
|
|
3370
|
+
*/
|
|
3371
|
+
request?: Record<string, any>
|
|
3372
|
+
}
|
|
3373
|
+
|
|
3374
|
+
/**
|
|
3375
|
+
* 面板 DP 本地化数据库返回结果
|
|
3376
|
+
* @since HealthKit 7.9.0
|
|
3377
|
+
*/
|
|
3378
|
+
export interface CommonDataResult {
|
|
3379
|
+
/**
|
|
3380
|
+
* JSON 字符串,具体结构由各 apiName 定义
|
|
3381
|
+
* @since HealthKit 7.9.0
|
|
3382
|
+
*/
|
|
3383
|
+
result?: string
|
|
3384
|
+
}
|
|
3385
|
+
|
|
3386
|
+
/**
|
|
3387
|
+
* Health Connect 状态码说明(与 getHealthConnectStatus、checkHealthConnectReadStatus 返回值对应)
|
|
3388
|
+
* @since HealthKit 5.18.4
|
|
3389
|
+
*/
|
|
3206
3390
|
export interface HealthConnectStatusCode {
|
|
3207
3391
|
/**
|
|
3208
|
-
*
|
|
3209
|
-
* -1 Health Connect不可用/不支持]
|
|
3210
|
-
* 0 已授权
|
|
3211
|
-
* 1 未安装Health Connect
|
|
3212
|
-
* 2 未授权
|
|
3392
|
+
* 状态码:-2 服务不可用;-1 不支持;0 已授权;1 未安装 Health Connect;2 未授权
|
|
3213
3393
|
* @since HealthKit 5.18.4
|
|
3214
3394
|
*/
|
|
3215
3395
|
value: number
|