@capgo/capacitor-health 8.2.18 → 8.3.1
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/README.md +9 -9
- package/android/src/main/java/app/capgo/plugin/health/WorkoutType.kt +150 -32
- package/dist/docs.json +441 -13
- package/dist/esm/definitions.d.ts +3 -2
- package/dist/esm/definitions.js.map +1 -1
- package/ios/Sources/HealthPlugin/Health.swift +519 -93
- package/ios/Sources/HealthPlugin/HealthPlugin.swift +1 -1
- package/package.json +1 -1
package/dist/docs.json
CHANGED
|
@@ -679,7 +679,7 @@
|
|
|
679
679
|
{
|
|
680
680
|
"name": "anchor",
|
|
681
681
|
"tags": [],
|
|
682
|
-
"docs": "Anchor for pagination. Use the anchor returned from a previous query to continue from that point.\nOn iOS, this
|
|
682
|
+
"docs": "Anchor for pagination. Use the anchor returned from a previous query to continue from that point.\nOn iOS, this is the ISO 8601 cursor returned by the previous query. On Android, this uses\nHealth Connect's pageToken.\nOmit this parameter to start from the beginning.",
|
|
683
683
|
"complexTypes": [],
|
|
684
684
|
"type": "string | undefined"
|
|
685
685
|
}
|
|
@@ -1000,7 +1000,47 @@
|
|
|
1000
1000
|
"docs": "",
|
|
1001
1001
|
"types": [
|
|
1002
1002
|
{
|
|
1003
|
-
"text": "'
|
|
1003
|
+
"text": "'americanFootball'",
|
|
1004
|
+
"complexTypes": []
|
|
1005
|
+
},
|
|
1006
|
+
{
|
|
1007
|
+
"text": "'australianFootball'",
|
|
1008
|
+
"complexTypes": []
|
|
1009
|
+
},
|
|
1010
|
+
{
|
|
1011
|
+
"text": "'badminton'",
|
|
1012
|
+
"complexTypes": []
|
|
1013
|
+
},
|
|
1014
|
+
{
|
|
1015
|
+
"text": "'baseball'",
|
|
1016
|
+
"complexTypes": []
|
|
1017
|
+
},
|
|
1018
|
+
{
|
|
1019
|
+
"text": "'basketball'",
|
|
1020
|
+
"complexTypes": []
|
|
1021
|
+
},
|
|
1022
|
+
{
|
|
1023
|
+
"text": "'bowling'",
|
|
1024
|
+
"complexTypes": []
|
|
1025
|
+
},
|
|
1026
|
+
{
|
|
1027
|
+
"text": "'boxing'",
|
|
1028
|
+
"complexTypes": []
|
|
1029
|
+
},
|
|
1030
|
+
{
|
|
1031
|
+
"text": "'climbing'",
|
|
1032
|
+
"complexTypes": []
|
|
1033
|
+
},
|
|
1034
|
+
{
|
|
1035
|
+
"text": "'cricket'",
|
|
1036
|
+
"complexTypes": []
|
|
1037
|
+
},
|
|
1038
|
+
{
|
|
1039
|
+
"text": "'crossTraining'",
|
|
1040
|
+
"complexTypes": []
|
|
1041
|
+
},
|
|
1042
|
+
{
|
|
1043
|
+
"text": "'curling'",
|
|
1004
1044
|
"complexTypes": []
|
|
1005
1045
|
},
|
|
1006
1046
|
{
|
|
@@ -1008,19 +1048,31 @@
|
|
|
1008
1048
|
"complexTypes": []
|
|
1009
1049
|
},
|
|
1010
1050
|
{
|
|
1011
|
-
"text": "'
|
|
1051
|
+
"text": "'dance'",
|
|
1012
1052
|
"complexTypes": []
|
|
1013
1053
|
},
|
|
1014
1054
|
{
|
|
1015
|
-
"text": "'
|
|
1055
|
+
"text": "'elliptical'",
|
|
1016
1056
|
"complexTypes": []
|
|
1017
1057
|
},
|
|
1018
1058
|
{
|
|
1019
|
-
"text": "'
|
|
1059
|
+
"text": "'fencing'",
|
|
1020
1060
|
"complexTypes": []
|
|
1021
1061
|
},
|
|
1022
1062
|
{
|
|
1023
|
-
"text": "'
|
|
1063
|
+
"text": "'functionalStrengthTraining'",
|
|
1064
|
+
"complexTypes": []
|
|
1065
|
+
},
|
|
1066
|
+
{
|
|
1067
|
+
"text": "'golf'",
|
|
1068
|
+
"complexTypes": []
|
|
1069
|
+
},
|
|
1070
|
+
{
|
|
1071
|
+
"text": "'gymnastics'",
|
|
1072
|
+
"complexTypes": []
|
|
1073
|
+
},
|
|
1074
|
+
{
|
|
1075
|
+
"text": "'handball'",
|
|
1024
1076
|
"complexTypes": []
|
|
1025
1077
|
},
|
|
1026
1078
|
{
|
|
@@ -1028,45 +1080,121 @@
|
|
|
1028
1080
|
"complexTypes": []
|
|
1029
1081
|
},
|
|
1030
1082
|
{
|
|
1031
|
-
"text": "'
|
|
1083
|
+
"text": "'hockey'",
|
|
1032
1084
|
"complexTypes": []
|
|
1033
1085
|
},
|
|
1034
1086
|
{
|
|
1035
|
-
"text": "'
|
|
1087
|
+
"text": "'jumpRope'",
|
|
1036
1088
|
"complexTypes": []
|
|
1037
1089
|
},
|
|
1038
1090
|
{
|
|
1039
|
-
"text": "'
|
|
1091
|
+
"text": "'kickboxing'",
|
|
1040
1092
|
"complexTypes": []
|
|
1041
1093
|
},
|
|
1042
1094
|
{
|
|
1043
|
-
"text": "'
|
|
1095
|
+
"text": "'lacrosse'",
|
|
1044
1096
|
"complexTypes": []
|
|
1045
1097
|
},
|
|
1046
1098
|
{
|
|
1047
|
-
"text": "'
|
|
1099
|
+
"text": "'martialArts'",
|
|
1048
1100
|
"complexTypes": []
|
|
1049
1101
|
},
|
|
1050
1102
|
{
|
|
1051
|
-
"text": "'
|
|
1103
|
+
"text": "'pilates'",
|
|
1052
1104
|
"complexTypes": []
|
|
1053
1105
|
},
|
|
1054
1106
|
{
|
|
1055
|
-
"text": "'
|
|
1107
|
+
"text": "'racquetball'",
|
|
1056
1108
|
"complexTypes": []
|
|
1057
1109
|
},
|
|
1058
1110
|
{
|
|
1059
1111
|
"text": "'rowing'",
|
|
1060
1112
|
"complexTypes": []
|
|
1061
1113
|
},
|
|
1114
|
+
{
|
|
1115
|
+
"text": "'rugby'",
|
|
1116
|
+
"complexTypes": []
|
|
1117
|
+
},
|
|
1118
|
+
{
|
|
1119
|
+
"text": "'running'",
|
|
1120
|
+
"complexTypes": []
|
|
1121
|
+
},
|
|
1122
|
+
{
|
|
1123
|
+
"text": "'sailing'",
|
|
1124
|
+
"complexTypes": []
|
|
1125
|
+
},
|
|
1126
|
+
{
|
|
1127
|
+
"text": "'skatingSports'",
|
|
1128
|
+
"complexTypes": []
|
|
1129
|
+
},
|
|
1130
|
+
{
|
|
1131
|
+
"text": "'skiing'",
|
|
1132
|
+
"complexTypes": []
|
|
1133
|
+
},
|
|
1134
|
+
{
|
|
1135
|
+
"text": "'snowboarding'",
|
|
1136
|
+
"complexTypes": []
|
|
1137
|
+
},
|
|
1138
|
+
{
|
|
1139
|
+
"text": "'soccer'",
|
|
1140
|
+
"complexTypes": []
|
|
1141
|
+
},
|
|
1142
|
+
{
|
|
1143
|
+
"text": "'softball'",
|
|
1144
|
+
"complexTypes": []
|
|
1145
|
+
},
|
|
1146
|
+
{
|
|
1147
|
+
"text": "'squash'",
|
|
1148
|
+
"complexTypes": []
|
|
1149
|
+
},
|
|
1062
1150
|
{
|
|
1063
1151
|
"text": "'stairClimbing'",
|
|
1064
1152
|
"complexTypes": []
|
|
1065
1153
|
},
|
|
1154
|
+
{
|
|
1155
|
+
"text": "'strengthTraining'",
|
|
1156
|
+
"complexTypes": []
|
|
1157
|
+
},
|
|
1158
|
+
{
|
|
1159
|
+
"text": "'surfing'",
|
|
1160
|
+
"complexTypes": []
|
|
1161
|
+
},
|
|
1162
|
+
{
|
|
1163
|
+
"text": "'swimming'",
|
|
1164
|
+
"complexTypes": []
|
|
1165
|
+
},
|
|
1166
|
+
{
|
|
1167
|
+
"text": "'swimmingPool'",
|
|
1168
|
+
"complexTypes": []
|
|
1169
|
+
},
|
|
1170
|
+
{
|
|
1171
|
+
"text": "'swimmingOpenWater'",
|
|
1172
|
+
"complexTypes": []
|
|
1173
|
+
},
|
|
1174
|
+
{
|
|
1175
|
+
"text": "'tableTennis'",
|
|
1176
|
+
"complexTypes": []
|
|
1177
|
+
},
|
|
1178
|
+
{
|
|
1179
|
+
"text": "'tennis'",
|
|
1180
|
+
"complexTypes": []
|
|
1181
|
+
},
|
|
1182
|
+
{
|
|
1183
|
+
"text": "'trackAndField'",
|
|
1184
|
+
"complexTypes": []
|
|
1185
|
+
},
|
|
1066
1186
|
{
|
|
1067
1187
|
"text": "'traditionalStrengthTraining'",
|
|
1068
1188
|
"complexTypes": []
|
|
1069
1189
|
},
|
|
1190
|
+
{
|
|
1191
|
+
"text": "'volleyball'",
|
|
1192
|
+
"complexTypes": []
|
|
1193
|
+
},
|
|
1194
|
+
{
|
|
1195
|
+
"text": "'walking'",
|
|
1196
|
+
"complexTypes": []
|
|
1197
|
+
},
|
|
1070
1198
|
{
|
|
1071
1199
|
"text": "'waterFitness'",
|
|
1072
1200
|
"complexTypes": []
|
|
@@ -1079,10 +1207,310 @@
|
|
|
1079
1207
|
"text": "'waterSports'",
|
|
1080
1208
|
"complexTypes": []
|
|
1081
1209
|
},
|
|
1210
|
+
{
|
|
1211
|
+
"text": "'weightlifting'",
|
|
1212
|
+
"complexTypes": []
|
|
1213
|
+
},
|
|
1214
|
+
{
|
|
1215
|
+
"text": "'wheelchair'",
|
|
1216
|
+
"complexTypes": []
|
|
1217
|
+
},
|
|
1218
|
+
{
|
|
1219
|
+
"text": "'yoga'",
|
|
1220
|
+
"complexTypes": []
|
|
1221
|
+
},
|
|
1222
|
+
{
|
|
1223
|
+
"text": "'archery'",
|
|
1224
|
+
"complexTypes": []
|
|
1225
|
+
},
|
|
1226
|
+
{
|
|
1227
|
+
"text": "'barre'",
|
|
1228
|
+
"complexTypes": []
|
|
1229
|
+
},
|
|
1230
|
+
{
|
|
1231
|
+
"text": "'cooldown'",
|
|
1232
|
+
"complexTypes": []
|
|
1233
|
+
},
|
|
1234
|
+
{
|
|
1235
|
+
"text": "'coreTraining'",
|
|
1236
|
+
"complexTypes": []
|
|
1237
|
+
},
|
|
1238
|
+
{
|
|
1239
|
+
"text": "'crossCountrySkiing'",
|
|
1240
|
+
"complexTypes": []
|
|
1241
|
+
},
|
|
1242
|
+
{
|
|
1243
|
+
"text": "'discSports'",
|
|
1244
|
+
"complexTypes": []
|
|
1245
|
+
},
|
|
1246
|
+
{
|
|
1247
|
+
"text": "'downhillSkiing'",
|
|
1248
|
+
"complexTypes": []
|
|
1249
|
+
},
|
|
1250
|
+
{
|
|
1251
|
+
"text": "'equestrianSports'",
|
|
1252
|
+
"complexTypes": []
|
|
1253
|
+
},
|
|
1254
|
+
{
|
|
1255
|
+
"text": "'fishing'",
|
|
1256
|
+
"complexTypes": []
|
|
1257
|
+
},
|
|
1258
|
+
{
|
|
1259
|
+
"text": "'fitnessGaming'",
|
|
1260
|
+
"complexTypes": []
|
|
1261
|
+
},
|
|
1262
|
+
{
|
|
1263
|
+
"text": "'flexibility'",
|
|
1264
|
+
"complexTypes": []
|
|
1265
|
+
},
|
|
1266
|
+
{
|
|
1267
|
+
"text": "'handCycling'",
|
|
1268
|
+
"complexTypes": []
|
|
1269
|
+
},
|
|
1270
|
+
{
|
|
1271
|
+
"text": "'highIntensityIntervalTraining'",
|
|
1272
|
+
"complexTypes": []
|
|
1273
|
+
},
|
|
1274
|
+
{
|
|
1275
|
+
"text": "'hunting'",
|
|
1276
|
+
"complexTypes": []
|
|
1277
|
+
},
|
|
1278
|
+
{
|
|
1279
|
+
"text": "'mindAndBody'",
|
|
1280
|
+
"complexTypes": []
|
|
1281
|
+
},
|
|
1282
|
+
{
|
|
1283
|
+
"text": "'mixedCardio'",
|
|
1284
|
+
"complexTypes": []
|
|
1285
|
+
},
|
|
1286
|
+
{
|
|
1287
|
+
"text": "'paddleSports'",
|
|
1288
|
+
"complexTypes": []
|
|
1289
|
+
},
|
|
1290
|
+
{
|
|
1291
|
+
"text": "'pickleball'",
|
|
1292
|
+
"complexTypes": []
|
|
1293
|
+
},
|
|
1294
|
+
{
|
|
1295
|
+
"text": "'play'",
|
|
1296
|
+
"complexTypes": []
|
|
1297
|
+
},
|
|
1298
|
+
{
|
|
1299
|
+
"text": "'preparationAndRecovery'",
|
|
1300
|
+
"complexTypes": []
|
|
1301
|
+
},
|
|
1302
|
+
{
|
|
1303
|
+
"text": "'snowSports'",
|
|
1304
|
+
"complexTypes": []
|
|
1305
|
+
},
|
|
1306
|
+
{
|
|
1307
|
+
"text": "'stairs'",
|
|
1308
|
+
"complexTypes": []
|
|
1309
|
+
},
|
|
1310
|
+
{
|
|
1311
|
+
"text": "'stepTraining'",
|
|
1312
|
+
"complexTypes": []
|
|
1313
|
+
},
|
|
1314
|
+
{
|
|
1315
|
+
"text": "'surfingSports'",
|
|
1316
|
+
"complexTypes": []
|
|
1317
|
+
},
|
|
1318
|
+
{
|
|
1319
|
+
"text": "'taiChi'",
|
|
1320
|
+
"complexTypes": []
|
|
1321
|
+
},
|
|
1322
|
+
{
|
|
1323
|
+
"text": "'transition'",
|
|
1324
|
+
"complexTypes": []
|
|
1325
|
+
},
|
|
1326
|
+
{
|
|
1327
|
+
"text": "'underwaterDiving'",
|
|
1328
|
+
"complexTypes": []
|
|
1329
|
+
},
|
|
1330
|
+
{
|
|
1331
|
+
"text": "'wheelchairRunPace'",
|
|
1332
|
+
"complexTypes": []
|
|
1333
|
+
},
|
|
1334
|
+
{
|
|
1335
|
+
"text": "'wheelchairWalkPace'",
|
|
1336
|
+
"complexTypes": []
|
|
1337
|
+
},
|
|
1082
1338
|
{
|
|
1083
1339
|
"text": "'wrestling'",
|
|
1084
1340
|
"complexTypes": []
|
|
1085
1341
|
},
|
|
1342
|
+
{
|
|
1343
|
+
"text": "'cardioDance'",
|
|
1344
|
+
"complexTypes": []
|
|
1345
|
+
},
|
|
1346
|
+
{
|
|
1347
|
+
"text": "'socialDance'",
|
|
1348
|
+
"complexTypes": []
|
|
1349
|
+
},
|
|
1350
|
+
{
|
|
1351
|
+
"text": "'backExtension'",
|
|
1352
|
+
"complexTypes": []
|
|
1353
|
+
},
|
|
1354
|
+
{
|
|
1355
|
+
"text": "'barbellShoulderPress'",
|
|
1356
|
+
"complexTypes": []
|
|
1357
|
+
},
|
|
1358
|
+
{
|
|
1359
|
+
"text": "'benchPress'",
|
|
1360
|
+
"complexTypes": []
|
|
1361
|
+
},
|
|
1362
|
+
{
|
|
1363
|
+
"text": "'benchSitUp'",
|
|
1364
|
+
"complexTypes": []
|
|
1365
|
+
},
|
|
1366
|
+
{
|
|
1367
|
+
"text": "'bikingStationary'",
|
|
1368
|
+
"complexTypes": []
|
|
1369
|
+
},
|
|
1370
|
+
{
|
|
1371
|
+
"text": "'bootCamp'",
|
|
1372
|
+
"complexTypes": []
|
|
1373
|
+
},
|
|
1374
|
+
{
|
|
1375
|
+
"text": "'burpee'",
|
|
1376
|
+
"complexTypes": []
|
|
1377
|
+
},
|
|
1378
|
+
{
|
|
1379
|
+
"text": "'calisthenics'",
|
|
1380
|
+
"complexTypes": []
|
|
1381
|
+
},
|
|
1382
|
+
{
|
|
1383
|
+
"text": "'crunch'",
|
|
1384
|
+
"complexTypes": []
|
|
1385
|
+
},
|
|
1386
|
+
{
|
|
1387
|
+
"text": "'dancing'",
|
|
1388
|
+
"complexTypes": []
|
|
1389
|
+
},
|
|
1390
|
+
{
|
|
1391
|
+
"text": "'deadlift'",
|
|
1392
|
+
"complexTypes": []
|
|
1393
|
+
},
|
|
1394
|
+
{
|
|
1395
|
+
"text": "'dumbbellCurlLeftArm'",
|
|
1396
|
+
"complexTypes": []
|
|
1397
|
+
},
|
|
1398
|
+
{
|
|
1399
|
+
"text": "'dumbbellCurlRightArm'",
|
|
1400
|
+
"complexTypes": []
|
|
1401
|
+
},
|
|
1402
|
+
{
|
|
1403
|
+
"text": "'dumbbellFrontRaise'",
|
|
1404
|
+
"complexTypes": []
|
|
1405
|
+
},
|
|
1406
|
+
{
|
|
1407
|
+
"text": "'dumbbellLateralRaise'",
|
|
1408
|
+
"complexTypes": []
|
|
1409
|
+
},
|
|
1410
|
+
{
|
|
1411
|
+
"text": "'dumbbellTricepsExtensionLeftArm'",
|
|
1412
|
+
"complexTypes": []
|
|
1413
|
+
},
|
|
1414
|
+
{
|
|
1415
|
+
"text": "'dumbbellTricepsExtensionRightArm'",
|
|
1416
|
+
"complexTypes": []
|
|
1417
|
+
},
|
|
1418
|
+
{
|
|
1419
|
+
"text": "'dumbbellTricepsExtensionTwoArm'",
|
|
1420
|
+
"complexTypes": []
|
|
1421
|
+
},
|
|
1422
|
+
{
|
|
1423
|
+
"text": "'exerciseClass'",
|
|
1424
|
+
"complexTypes": []
|
|
1425
|
+
},
|
|
1426
|
+
{
|
|
1427
|
+
"text": "'forwardTwist'",
|
|
1428
|
+
"complexTypes": []
|
|
1429
|
+
},
|
|
1430
|
+
{
|
|
1431
|
+
"text": "'frisbeedisc'",
|
|
1432
|
+
"complexTypes": []
|
|
1433
|
+
},
|
|
1434
|
+
{
|
|
1435
|
+
"text": "'guidedBreathing'",
|
|
1436
|
+
"complexTypes": []
|
|
1437
|
+
},
|
|
1438
|
+
{
|
|
1439
|
+
"text": "'iceHockey'",
|
|
1440
|
+
"complexTypes": []
|
|
1441
|
+
},
|
|
1442
|
+
{
|
|
1443
|
+
"text": "'iceSkating'",
|
|
1444
|
+
"complexTypes": []
|
|
1445
|
+
},
|
|
1446
|
+
{
|
|
1447
|
+
"text": "'jumpingJack'",
|
|
1448
|
+
"complexTypes": []
|
|
1449
|
+
},
|
|
1450
|
+
{
|
|
1451
|
+
"text": "'latPullDown'",
|
|
1452
|
+
"complexTypes": []
|
|
1453
|
+
},
|
|
1454
|
+
{
|
|
1455
|
+
"text": "'lunge'",
|
|
1456
|
+
"complexTypes": []
|
|
1457
|
+
},
|
|
1458
|
+
{
|
|
1459
|
+
"text": "'meditation'",
|
|
1460
|
+
"complexTypes": []
|
|
1461
|
+
},
|
|
1462
|
+
{
|
|
1463
|
+
"text": "'paddling'",
|
|
1464
|
+
"complexTypes": []
|
|
1465
|
+
},
|
|
1466
|
+
{
|
|
1467
|
+
"text": "'paraGliding'",
|
|
1468
|
+
"complexTypes": []
|
|
1469
|
+
},
|
|
1470
|
+
{
|
|
1471
|
+
"text": "'plank'",
|
|
1472
|
+
"complexTypes": []
|
|
1473
|
+
},
|
|
1474
|
+
{
|
|
1475
|
+
"text": "'rockClimbing'",
|
|
1476
|
+
"complexTypes": []
|
|
1477
|
+
},
|
|
1478
|
+
{
|
|
1479
|
+
"text": "'rollerHockey'",
|
|
1480
|
+
"complexTypes": []
|
|
1481
|
+
},
|
|
1482
|
+
{
|
|
1483
|
+
"text": "'rowingMachine'",
|
|
1484
|
+
"complexTypes": []
|
|
1485
|
+
},
|
|
1486
|
+
{
|
|
1487
|
+
"text": "'runningTreadmill'",
|
|
1488
|
+
"complexTypes": []
|
|
1489
|
+
},
|
|
1490
|
+
{
|
|
1491
|
+
"text": "'scubaDiving'",
|
|
1492
|
+
"complexTypes": []
|
|
1493
|
+
},
|
|
1494
|
+
{
|
|
1495
|
+
"text": "'skating'",
|
|
1496
|
+
"complexTypes": []
|
|
1497
|
+
},
|
|
1498
|
+
{
|
|
1499
|
+
"text": "'snowshoeing'",
|
|
1500
|
+
"complexTypes": []
|
|
1501
|
+
},
|
|
1502
|
+
{
|
|
1503
|
+
"text": "'stairClimbingMachine'",
|
|
1504
|
+
"complexTypes": []
|
|
1505
|
+
},
|
|
1506
|
+
{
|
|
1507
|
+
"text": "'stretching'",
|
|
1508
|
+
"complexTypes": []
|
|
1509
|
+
},
|
|
1510
|
+
{
|
|
1511
|
+
"text": "'upperTwist'",
|
|
1512
|
+
"complexTypes": []
|
|
1513
|
+
},
|
|
1086
1514
|
{
|
|
1087
1515
|
"text": "'other'",
|
|
1088
1516
|
"complexTypes": []
|
|
@@ -49,7 +49,7 @@ export interface HealthSample {
|
|
|
49
49
|
export interface ReadSamplesResult {
|
|
50
50
|
samples: HealthSample[];
|
|
51
51
|
}
|
|
52
|
-
export type WorkoutType = '
|
|
52
|
+
export type WorkoutType = 'americanFootball' | 'australianFootball' | 'badminton' | 'baseball' | 'basketball' | 'bowling' | 'boxing' | 'climbing' | 'cricket' | 'crossTraining' | 'curling' | 'cycling' | 'dance' | 'elliptical' | 'fencing' | 'functionalStrengthTraining' | 'golf' | 'gymnastics' | 'handball' | 'hiking' | 'hockey' | 'jumpRope' | 'kickboxing' | 'lacrosse' | 'martialArts' | 'pilates' | 'racquetball' | 'rowing' | 'rugby' | 'running' | 'sailing' | 'skatingSports' | 'skiing' | 'snowboarding' | 'soccer' | 'softball' | 'squash' | 'stairClimbing' | 'strengthTraining' | 'surfing' | 'swimming' | 'swimmingPool' | 'swimmingOpenWater' | 'tableTennis' | 'tennis' | 'trackAndField' | 'traditionalStrengthTraining' | 'volleyball' | 'walking' | 'waterFitness' | 'waterPolo' | 'waterSports' | 'weightlifting' | 'wheelchair' | 'yoga' | 'archery' | 'barre' | 'cooldown' | 'coreTraining' | 'crossCountrySkiing' | 'discSports' | 'downhillSkiing' | 'equestrianSports' | 'fishing' | 'fitnessGaming' | 'flexibility' | 'handCycling' | 'highIntensityIntervalTraining' | 'hunting' | 'mindAndBody' | 'mixedCardio' | 'paddleSports' | 'pickleball' | 'play' | 'preparationAndRecovery' | 'snowSports' | 'stairs' | 'stepTraining' | 'surfingSports' | 'taiChi' | 'transition' | 'underwaterDiving' | 'wheelchairRunPace' | 'wheelchairWalkPace' | 'wrestling' | 'cardioDance' | 'socialDance' | 'backExtension' | 'barbellShoulderPress' | 'benchPress' | 'benchSitUp' | 'bikingStationary' | 'bootCamp' | 'burpee' | 'calisthenics' | 'crunch' | 'dancing' | 'deadlift' | 'dumbbellCurlLeftArm' | 'dumbbellCurlRightArm' | 'dumbbellFrontRaise' | 'dumbbellLateralRaise' | 'dumbbellTricepsExtensionLeftArm' | 'dumbbellTricepsExtensionRightArm' | 'dumbbellTricepsExtensionTwoArm' | 'exerciseClass' | 'forwardTwist' | 'frisbeedisc' | 'guidedBreathing' | 'iceHockey' | 'iceSkating' | 'jumpingJack' | 'latPullDown' | 'lunge' | 'meditation' | 'paddling' | 'paraGliding' | 'plank' | 'rockClimbing' | 'rollerHockey' | 'rowingMachine' | 'runningTreadmill' | 'scubaDiving' | 'skating' | 'snowshoeing' | 'stairClimbingMachine' | 'stretching' | 'upperTwist' | 'other';
|
|
53
53
|
export interface QueryWorkoutsOptions {
|
|
54
54
|
/** Optional workout type filter. If omitted, all workout types are returned. */
|
|
55
55
|
workoutType?: WorkoutType;
|
|
@@ -63,7 +63,8 @@ export interface QueryWorkoutsOptions {
|
|
|
63
63
|
ascending?: boolean;
|
|
64
64
|
/**
|
|
65
65
|
* Anchor for pagination. Use the anchor returned from a previous query to continue from that point.
|
|
66
|
-
* On iOS, this
|
|
66
|
+
* On iOS, this is the ISO 8601 cursor returned by the previous query. On Android, this uses
|
|
67
|
+
* Health Connect's pageToken.
|
|
67
68
|
* Omit this parameter to start from the beginning.
|
|
68
69
|
*/
|
|
69
70
|
anchor?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export type HealthDataType =\n | 'steps'\n | 'distance'\n | 'calories'\n | 'heartRate'\n | 'weight'\n | 'sleep'\n | 'respiratoryRate'\n | 'oxygenSaturation'\n | 'restingHeartRate'\n | 'heartRateVariability'\n | 'bloodPressure'\n | 'bloodGlucose'\n | 'bodyTemperature'\n | 'height'\n | 'flightsClimbed'\n | 'exerciseTime'\n | 'distanceCycling'\n | 'bodyFat'\n | 'basalBodyTemperature'\n | 'basalCalories'\n | 'totalCalories'\n | 'mindfulness';\n\nexport type HealthUnit =\n | 'count'\n | 'meter'\n | 'kilocalorie'\n | 'bpm'\n | 'kilogram'\n | 'minute'\n | 'percent'\n | 'millisecond'\n | 'mmHg'\n | 'mg/dL'\n | 'celsius'\n | 'fahrenheit'\n | 'centimeter';\n\nexport interface AuthorizationOptions {\n /** Data types that should be readable after authorization. */\n read?: HealthDataType[];\n /** Data types that should be writable after authorization. */\n write?: HealthDataType[];\n}\n\nexport interface AuthorizationStatus {\n readAuthorized: HealthDataType[];\n readDenied: HealthDataType[];\n writeAuthorized: HealthDataType[];\n writeDenied: HealthDataType[];\n}\n\nexport interface AvailabilityResult {\n available: boolean;\n /** Platform specific details (for debugging/diagnostics). */\n platform?: 'ios' | 'android' | 'web';\n reason?: string;\n}\n\nexport interface QueryOptions {\n /** The type of data to retrieve from the health store. */\n dataType: HealthDataType;\n /** Inclusive ISO 8601 start date (defaults to now - 1 day). */\n startDate?: string;\n /** Exclusive ISO 8601 end date (defaults to now). */\n endDate?: string;\n /** Maximum number of samples to return (defaults to 100). */\n limit?: number;\n /** Return results sorted ascending by start date (defaults to false). */\n ascending?: boolean;\n}\n\nexport type SleepState = 'inBed' | 'asleep' | 'awake' | 'rem' | 'deep' | 'light';\n\nexport interface HealthSample {\n dataType: HealthDataType;\n value: number;\n unit: HealthUnit;\n startDate: string;\n endDate: string;\n sourceName?: string;\n sourceId?: string;\n /** For sleep data, indicates the sleep state (e.g., 'asleep', 'awake', 'rem', 'deep', 'light'). */\n sleepState?: SleepState;\n /** For blood pressure data, the systolic value in mmHg. */\n systolic?: number;\n /** For blood pressure data, the diastolic value in mmHg. */\n diastolic?: number;\n}\n\nexport interface ReadSamplesResult {\n samples: HealthSample[];\n}\n\nexport type WorkoutType =\n | 'running'\n | 'cycling'\n | 'walking'\n | 'swimming'\n | 'yoga'\n | 'strengthTraining'\n | 'hiking'\n | 'tennis'\n | 'basketball'\n | 'soccer'\n | 'americanFootball'\n | 'baseball'\n | 'crossTraining'\n | 'elliptical'\n | 'rowing'\n | 'stairClimbing'\n | 'traditionalStrengthTraining'\n | 'waterFitness'\n | 'waterPolo'\n | 'waterSports'\n | 'wrestling'\n | 'other';\n\nexport interface QueryWorkoutsOptions {\n /** Optional workout type filter. If omitted, all workout types are returned. */\n workoutType?: WorkoutType;\n /** Inclusive ISO 8601 start date (defaults to now - 1 day). */\n startDate?: string;\n /** Exclusive ISO 8601 end date (defaults to now). */\n endDate?: string;\n /** Maximum number of workouts to return (defaults to 100). */\n limit?: number;\n /** Return results sorted ascending by start date (defaults to false). */\n ascending?: boolean;\n /**\n * Anchor for pagination. Use the anchor returned from a previous query to continue from that point.\n * On iOS, this uses HKQueryAnchor. On Android, this uses Health Connect's pageToken.\n * Omit this parameter to start from the beginning.\n */\n anchor?: string;\n}\n\nexport interface Workout {\n /** The type of workout. */\n workoutType: WorkoutType;\n /** Duration of the workout in seconds. */\n duration: number;\n /** Total energy burned in kilocalories (if available). */\n totalEnergyBurned?: number;\n /** Total distance in meters (if available). */\n totalDistance?: number;\n /** ISO 8601 start date of the workout. */\n startDate: string;\n /** ISO 8601 end date of the workout. */\n endDate: string;\n /** Source name that recorded the workout. */\n sourceName?: string;\n /** Source bundle identifier. */\n sourceId?: string;\n /** Additional metadata (if available). */\n metadata?: Record<string, string>;\n}\n\nexport interface QueryWorkoutsResult {\n workouts: Workout[];\n /**\n * Anchor for the next page of results. Pass this value as the anchor parameter in the next query\n * to continue pagination. If undefined or null, there are no more results.\n */\n anchor?: string;\n}\n\nexport interface WriteSampleOptions {\n dataType: HealthDataType;\n value: number;\n /**\n * Optional unit override. If omitted, the default unit for the data type is used\n * (count for `steps`, meter for `distance`, kilocalorie for `calories`, bpm for `heartRate`, kilogram for `weight`).\n */\n unit?: HealthUnit;\n /** ISO 8601 start date for the sample. Defaults to now. */\n startDate?: string;\n /** ISO 8601 end date for the sample. Defaults to startDate. */\n endDate?: string;\n /** Metadata key-value pairs forwarded to the native APIs where supported. */\n metadata?: Record<string, string>;\n /** For blood pressure data, the systolic value in mmHg. Required when dataType is 'bloodPressure'. */\n systolic?: number;\n /** For blood pressure data, the diastolic value in mmHg. Required when dataType is 'bloodPressure'. */\n diastolic?: number;\n}\n\nexport type BucketType = 'hour' | 'day' | 'week' | 'month';\n\nexport type AggregationType = 'sum' | 'average' | 'min' | 'max';\n\nexport interface QueryAggregatedOptions {\n /** The type of data to aggregate from the health store. */\n dataType: HealthDataType;\n /** Inclusive ISO 8601 start date (defaults to now - 1 day). */\n startDate?: string;\n /** Exclusive ISO 8601 end date (defaults to now). */\n endDate?: string;\n /** Time bucket for aggregation (defaults to 'day'). */\n bucket?: BucketType;\n /** Aggregation operation to perform (defaults to 'sum'). */\n aggregation?: AggregationType;\n}\n\nexport interface AggregatedSample {\n /** ISO 8601 start date of the bucket. */\n startDate: string;\n /** ISO 8601 end date of the bucket. */\n endDate: string;\n /** Aggregated value for the bucket. */\n value: number;\n /** Unit of the aggregated value. */\n unit: HealthUnit;\n}\n\nexport interface QueryAggregatedResult {\n samples: AggregatedSample[];\n}\n\nexport interface HealthPlugin {\n /** Returns whether the current platform supports the native health SDK. */\n isAvailable(): Promise<AvailabilityResult>;\n /** Requests read/write access to the provided data types. */\n requestAuthorization(options: AuthorizationOptions): Promise<AuthorizationStatus>;\n /** Checks authorization status for the provided data types without prompting the user. */\n checkAuthorization(options: AuthorizationOptions): Promise<AuthorizationStatus>;\n /** Reads samples for the given data type within the specified time frame. */\n readSamples(options: QueryOptions): Promise<ReadSamplesResult>;\n /** Writes a single sample to the native health store. */\n saveSample(options: WriteSampleOptions): Promise<void>;\n\n /**\n * Get the native Capacitor plugin version\n *\n * @returns {Promise<{ version: string }>} a Promise with version for this device\n * @throws An error if something went wrong\n */\n getPluginVersion(): Promise<{ version: string }>;\n\n /**\n * Opens the Health Connect settings screen (Android only).\n * On iOS, this method does nothing.\n *\n * Use this to direct users to manage their Health Connect permissions\n * or to install Health Connect if not available.\n *\n * @throws An error if Health Connect settings cannot be opened\n */\n openHealthConnectSettings(): Promise<void>;\n\n /**\n * Shows the app's privacy policy for Health Connect (Android only).\n * On iOS, this method does nothing.\n *\n * This displays the same privacy policy screen that Health Connect shows\n * when the user taps \"Privacy policy\" in the permissions dialog.\n *\n * The privacy policy URL can be configured by adding a string resource\n * named \"health_connect_privacy_policy_url\" in your app's strings.xml,\n * or by placing an HTML file at www/privacypolicy.html in your assets.\n *\n * @throws An error if the privacy policy cannot be displayed\n */\n showPrivacyPolicy(): Promise<void>;\n\n /**\n * Queries workout sessions from the native health store.\n * Supported on iOS (HealthKit) and Android (Health Connect).\n *\n * @param options Query options including optional workout type filter, date range, limit, and sort order\n * @returns A promise that resolves with the workout sessions\n * @throws An error if something went wrong\n */\n queryWorkouts(options: QueryWorkoutsOptions): Promise<QueryWorkoutsResult>;\n\n /**\n * Queries aggregated health data from the native health store.\n * Aggregates data into time buckets (hour, day, week, month) with operations like sum, average, min, or max.\n * This is more efficient than fetching individual samples for large date ranges.\n *\n * Supported on iOS (HealthKit) and Android (Health Connect).\n *\n * @param options Query options including data type, date range, bucket size, and aggregation type\n * @returns A promise that resolves with the aggregated samples\n * @throws An error if something went wrong\n */\n queryAggregated(options: QueryAggregatedOptions): Promise<QueryAggregatedResult>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export type HealthDataType =\n | 'steps'\n | 'distance'\n | 'calories'\n | 'heartRate'\n | 'weight'\n | 'sleep'\n | 'respiratoryRate'\n | 'oxygenSaturation'\n | 'restingHeartRate'\n | 'heartRateVariability'\n | 'bloodPressure'\n | 'bloodGlucose'\n | 'bodyTemperature'\n | 'height'\n | 'flightsClimbed'\n | 'exerciseTime'\n | 'distanceCycling'\n | 'bodyFat'\n | 'basalBodyTemperature'\n | 'basalCalories'\n | 'totalCalories'\n | 'mindfulness';\n\nexport type HealthUnit =\n | 'count'\n | 'meter'\n | 'kilocalorie'\n | 'bpm'\n | 'kilogram'\n | 'minute'\n | 'percent'\n | 'millisecond'\n | 'mmHg'\n | 'mg/dL'\n | 'celsius'\n | 'fahrenheit'\n | 'centimeter';\n\nexport interface AuthorizationOptions {\n /** Data types that should be readable after authorization. */\n read?: HealthDataType[];\n /** Data types that should be writable after authorization. */\n write?: HealthDataType[];\n}\n\nexport interface AuthorizationStatus {\n readAuthorized: HealthDataType[];\n readDenied: HealthDataType[];\n writeAuthorized: HealthDataType[];\n writeDenied: HealthDataType[];\n}\n\nexport interface AvailabilityResult {\n available: boolean;\n /** Platform specific details (for debugging/diagnostics). */\n platform?: 'ios' | 'android' | 'web';\n reason?: string;\n}\n\nexport interface QueryOptions {\n /** The type of data to retrieve from the health store. */\n dataType: HealthDataType;\n /** Inclusive ISO 8601 start date (defaults to now - 1 day). */\n startDate?: string;\n /** Exclusive ISO 8601 end date (defaults to now). */\n endDate?: string;\n /** Maximum number of samples to return (defaults to 100). */\n limit?: number;\n /** Return results sorted ascending by start date (defaults to false). */\n ascending?: boolean;\n}\n\nexport type SleepState = 'inBed' | 'asleep' | 'awake' | 'rem' | 'deep' | 'light';\n\nexport interface HealthSample {\n dataType: HealthDataType;\n value: number;\n unit: HealthUnit;\n startDate: string;\n endDate: string;\n sourceName?: string;\n sourceId?: string;\n /** For sleep data, indicates the sleep state (e.g., 'asleep', 'awake', 'rem', 'deep', 'light'). */\n sleepState?: SleepState;\n /** For blood pressure data, the systolic value in mmHg. */\n systolic?: number;\n /** For blood pressure data, the diastolic value in mmHg. */\n diastolic?: number;\n}\n\nexport interface ReadSamplesResult {\n samples: HealthSample[];\n}\n\nexport type WorkoutType =\n // Common types (supported on both platforms)\n | 'americanFootball'\n | 'australianFootball'\n | 'badminton'\n | 'baseball'\n | 'basketball'\n | 'bowling'\n | 'boxing'\n | 'climbing'\n | 'cricket'\n | 'crossTraining'\n | 'curling'\n | 'cycling'\n | 'dance'\n | 'elliptical'\n | 'fencing'\n | 'functionalStrengthTraining'\n | 'golf'\n | 'gymnastics'\n | 'handball'\n | 'hiking'\n | 'hockey'\n | 'jumpRope'\n | 'kickboxing'\n | 'lacrosse'\n | 'martialArts'\n | 'pilates'\n | 'racquetball'\n | 'rowing'\n | 'rugby'\n | 'running'\n | 'sailing'\n | 'skatingSports'\n | 'skiing'\n | 'snowboarding'\n | 'soccer'\n | 'softball'\n | 'squash'\n | 'stairClimbing'\n | 'strengthTraining'\n | 'surfing'\n | 'swimming'\n | 'swimmingPool'\n | 'swimmingOpenWater'\n | 'tableTennis'\n | 'tennis'\n | 'trackAndField'\n | 'traditionalStrengthTraining'\n | 'volleyball'\n | 'walking'\n | 'waterFitness'\n | 'waterPolo'\n | 'waterSports'\n | 'weightlifting'\n | 'wheelchair'\n | 'yoga'\n // iOS specific types\n | 'archery'\n | 'barre'\n | 'cooldown'\n | 'coreTraining'\n | 'crossCountrySkiing'\n | 'discSports'\n | 'downhillSkiing'\n | 'equestrianSports'\n | 'fishing'\n | 'fitnessGaming'\n | 'flexibility'\n | 'handCycling'\n | 'highIntensityIntervalTraining'\n | 'hunting'\n | 'mindAndBody'\n | 'mixedCardio'\n | 'paddleSports'\n | 'pickleball'\n | 'play'\n | 'preparationAndRecovery'\n | 'snowSports'\n | 'stairs'\n | 'stepTraining'\n | 'surfingSports'\n | 'taiChi'\n | 'transition'\n | 'underwaterDiving'\n | 'wheelchairRunPace'\n | 'wheelchairWalkPace'\n | 'wrestling'\n | 'cardioDance'\n | 'socialDance'\n // Android specific types\n | 'backExtension'\n | 'barbellShoulderPress'\n | 'benchPress'\n | 'benchSitUp'\n | 'bikingStationary'\n | 'bootCamp'\n | 'burpee'\n | 'calisthenics'\n | 'crunch'\n | 'dancing'\n | 'deadlift'\n | 'dumbbellCurlLeftArm'\n | 'dumbbellCurlRightArm'\n | 'dumbbellFrontRaise'\n | 'dumbbellLateralRaise'\n | 'dumbbellTricepsExtensionLeftArm'\n | 'dumbbellTricepsExtensionRightArm'\n | 'dumbbellTricepsExtensionTwoArm'\n | 'exerciseClass'\n | 'forwardTwist'\n | 'frisbeedisc'\n | 'guidedBreathing'\n | 'iceHockey'\n | 'iceSkating'\n | 'jumpingJack'\n | 'latPullDown'\n | 'lunge'\n | 'meditation'\n | 'paddling'\n | 'paraGliding'\n | 'plank'\n | 'rockClimbing'\n | 'rollerHockey'\n | 'rowingMachine'\n | 'runningTreadmill'\n | 'scubaDiving'\n | 'skating'\n | 'snowshoeing'\n | 'stairClimbingMachine'\n | 'stretching'\n | 'upperTwist'\n | 'other';\n\nexport interface QueryWorkoutsOptions {\n /** Optional workout type filter. If omitted, all workout types are returned. */\n workoutType?: WorkoutType;\n /** Inclusive ISO 8601 start date (defaults to now - 1 day). */\n startDate?: string;\n /** Exclusive ISO 8601 end date (defaults to now). */\n endDate?: string;\n /** Maximum number of workouts to return (defaults to 100). */\n limit?: number;\n /** Return results sorted ascending by start date (defaults to false). */\n ascending?: boolean;\n /**\n * Anchor for pagination. Use the anchor returned from a previous query to continue from that point.\n * On iOS, this is the ISO 8601 cursor returned by the previous query. On Android, this uses\n * Health Connect's pageToken.\n * Omit this parameter to start from the beginning.\n */\n anchor?: string;\n}\n\nexport interface Workout {\n /** The type of workout. */\n workoutType: WorkoutType;\n /** Duration of the workout in seconds. */\n duration: number;\n /** Total energy burned in kilocalories (if available). */\n totalEnergyBurned?: number;\n /** Total distance in meters (if available). */\n totalDistance?: number;\n /** ISO 8601 start date of the workout. */\n startDate: string;\n /** ISO 8601 end date of the workout. */\n endDate: string;\n /** Source name that recorded the workout. */\n sourceName?: string;\n /** Source bundle identifier. */\n sourceId?: string;\n /** Additional metadata (if available). */\n metadata?: Record<string, string>;\n}\n\nexport interface QueryWorkoutsResult {\n workouts: Workout[];\n /**\n * Anchor for the next page of results. Pass this value as the anchor parameter in the next query\n * to continue pagination. If undefined or null, there are no more results.\n */\n anchor?: string;\n}\n\nexport interface WriteSampleOptions {\n dataType: HealthDataType;\n value: number;\n /**\n * Optional unit override. If omitted, the default unit for the data type is used\n * (count for `steps`, meter for `distance`, kilocalorie for `calories`, bpm for `heartRate`, kilogram for `weight`).\n */\n unit?: HealthUnit;\n /** ISO 8601 start date for the sample. Defaults to now. */\n startDate?: string;\n /** ISO 8601 end date for the sample. Defaults to startDate. */\n endDate?: string;\n /** Metadata key-value pairs forwarded to the native APIs where supported. */\n metadata?: Record<string, string>;\n /** For blood pressure data, the systolic value in mmHg. Required when dataType is 'bloodPressure'. */\n systolic?: number;\n /** For blood pressure data, the diastolic value in mmHg. Required when dataType is 'bloodPressure'. */\n diastolic?: number;\n}\n\nexport type BucketType = 'hour' | 'day' | 'week' | 'month';\n\nexport type AggregationType = 'sum' | 'average' | 'min' | 'max';\n\nexport interface QueryAggregatedOptions {\n /** The type of data to aggregate from the health store. */\n dataType: HealthDataType;\n /** Inclusive ISO 8601 start date (defaults to now - 1 day). */\n startDate?: string;\n /** Exclusive ISO 8601 end date (defaults to now). */\n endDate?: string;\n /** Time bucket for aggregation (defaults to 'day'). */\n bucket?: BucketType;\n /** Aggregation operation to perform (defaults to 'sum'). */\n aggregation?: AggregationType;\n}\n\nexport interface AggregatedSample {\n /** ISO 8601 start date of the bucket. */\n startDate: string;\n /** ISO 8601 end date of the bucket. */\n endDate: string;\n /** Aggregated value for the bucket. */\n value: number;\n /** Unit of the aggregated value. */\n unit: HealthUnit;\n}\n\nexport interface QueryAggregatedResult {\n samples: AggregatedSample[];\n}\n\nexport interface HealthPlugin {\n /** Returns whether the current platform supports the native health SDK. */\n isAvailable(): Promise<AvailabilityResult>;\n /** Requests read/write access to the provided data types. */\n requestAuthorization(options: AuthorizationOptions): Promise<AuthorizationStatus>;\n /** Checks authorization status for the provided data types without prompting the user. */\n checkAuthorization(options: AuthorizationOptions): Promise<AuthorizationStatus>;\n /** Reads samples for the given data type within the specified time frame. */\n readSamples(options: QueryOptions): Promise<ReadSamplesResult>;\n /** Writes a single sample to the native health store. */\n saveSample(options: WriteSampleOptions): Promise<void>;\n\n /**\n * Get the native Capacitor plugin version\n *\n * @returns {Promise<{ version: string }>} a Promise with version for this device\n * @throws An error if something went wrong\n */\n getPluginVersion(): Promise<{ version: string }>;\n\n /**\n * Opens the Health Connect settings screen (Android only).\n * On iOS, this method does nothing.\n *\n * Use this to direct users to manage their Health Connect permissions\n * or to install Health Connect if not available.\n *\n * @throws An error if Health Connect settings cannot be opened\n */\n openHealthConnectSettings(): Promise<void>;\n\n /**\n * Shows the app's privacy policy for Health Connect (Android only).\n * On iOS, this method does nothing.\n *\n * This displays the same privacy policy screen that Health Connect shows\n * when the user taps \"Privacy policy\" in the permissions dialog.\n *\n * The privacy policy URL can be configured by adding a string resource\n * named \"health_connect_privacy_policy_url\" in your app's strings.xml,\n * or by placing an HTML file at www/privacypolicy.html in your assets.\n *\n * @throws An error if the privacy policy cannot be displayed\n */\n showPrivacyPolicy(): Promise<void>;\n\n /**\n * Queries workout sessions from the native health store.\n * Supported on iOS (HealthKit) and Android (Health Connect).\n *\n * @param options Query options including optional workout type filter, date range, limit, and sort order\n * @returns A promise that resolves with the workout sessions\n * @throws An error if something went wrong\n */\n queryWorkouts(options: QueryWorkoutsOptions): Promise<QueryWorkoutsResult>;\n\n /**\n * Queries aggregated health data from the native health store.\n * Aggregates data into time buckets (hour, day, week, month) with operations like sum, average, min, or max.\n * This is more efficient than fetching individual samples for large date ranges.\n *\n * Supported on iOS (HealthKit) and Android (Health Connect).\n *\n * @param options Query options including data type, date range, bucket size, and aggregation type\n * @returns A promise that resolves with the aggregated samples\n * @throws An error if something went wrong\n */\n queryAggregated(options: QueryAggregatedOptions): Promise<QueryAggregatedResult>;\n}\n"]}
|