@asiriindatissa/capacitor-health 8.2.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/dist/docs.json ADDED
@@ -0,0 +1,773 @@
1
+ {
2
+ "api": {
3
+ "name": "HealthPlugin",
4
+ "slug": "healthplugin",
5
+ "docs": "",
6
+ "tags": [],
7
+ "methods": [
8
+ {
9
+ "name": "isAvailable",
10
+ "signature": "() => Promise<AvailabilityResult>",
11
+ "parameters": [],
12
+ "returns": "Promise<AvailabilityResult>",
13
+ "tags": [],
14
+ "docs": "Returns whether the current platform supports the native health SDK.",
15
+ "complexTypes": [
16
+ "AvailabilityResult"
17
+ ],
18
+ "slug": "isavailable"
19
+ },
20
+ {
21
+ "name": "requestAuthorization",
22
+ "signature": "(options: AuthorizationOptions) => Promise<AuthorizationStatus>",
23
+ "parameters": [
24
+ {
25
+ "name": "options",
26
+ "docs": "",
27
+ "type": "AuthorizationOptions"
28
+ }
29
+ ],
30
+ "returns": "Promise<AuthorizationStatus>",
31
+ "tags": [],
32
+ "docs": "Requests read/write access to the provided data types.",
33
+ "complexTypes": [
34
+ "AuthorizationStatus",
35
+ "AuthorizationOptions"
36
+ ],
37
+ "slug": "requestauthorization"
38
+ },
39
+ {
40
+ "name": "checkAuthorization",
41
+ "signature": "(options: AuthorizationOptions) => Promise<AuthorizationStatus>",
42
+ "parameters": [
43
+ {
44
+ "name": "options",
45
+ "docs": "",
46
+ "type": "AuthorizationOptions"
47
+ }
48
+ ],
49
+ "returns": "Promise<AuthorizationStatus>",
50
+ "tags": [],
51
+ "docs": "Checks authorization status for the provided data types without prompting the user.",
52
+ "complexTypes": [
53
+ "AuthorizationStatus",
54
+ "AuthorizationOptions"
55
+ ],
56
+ "slug": "checkauthorization"
57
+ },
58
+ {
59
+ "name": "readSamples",
60
+ "signature": "(options: QueryOptions) => Promise<ReadSamplesResult>",
61
+ "parameters": [
62
+ {
63
+ "name": "options",
64
+ "docs": "",
65
+ "type": "QueryOptions"
66
+ }
67
+ ],
68
+ "returns": "Promise<ReadSamplesResult>",
69
+ "tags": [],
70
+ "docs": "Reads samples for the given data type within the specified time frame.",
71
+ "complexTypes": [
72
+ "ReadSamplesResult",
73
+ "QueryOptions"
74
+ ],
75
+ "slug": "readsamples"
76
+ },
77
+ {
78
+ "name": "saveSample",
79
+ "signature": "(options: WriteSampleOptions) => Promise<void>",
80
+ "parameters": [
81
+ {
82
+ "name": "options",
83
+ "docs": "",
84
+ "type": "WriteSampleOptions"
85
+ }
86
+ ],
87
+ "returns": "Promise<void>",
88
+ "tags": [],
89
+ "docs": "Writes a single sample to the native health store.",
90
+ "complexTypes": [
91
+ "WriteSampleOptions"
92
+ ],
93
+ "slug": "savesample"
94
+ },
95
+ {
96
+ "name": "getPluginVersion",
97
+ "signature": "() => Promise<{ version: string; }>",
98
+ "parameters": [],
99
+ "returns": "Promise<{ version: string; }>",
100
+ "tags": [
101
+ {
102
+ "name": "returns",
103
+ "text": "a Promise with version for this device"
104
+ },
105
+ {
106
+ "name": "throws",
107
+ "text": "An error if something went wrong"
108
+ }
109
+ ],
110
+ "docs": "Get the native Capacitor plugin version",
111
+ "complexTypes": [],
112
+ "slug": "getpluginversion"
113
+ },
114
+ {
115
+ "name": "openHealthConnectSettings",
116
+ "signature": "() => Promise<void>",
117
+ "parameters": [],
118
+ "returns": "Promise<void>",
119
+ "tags": [
120
+ {
121
+ "name": "throws",
122
+ "text": "An error if Health Connect settings cannot be opened"
123
+ }
124
+ ],
125
+ "docs": "Opens the Health Connect settings screen.\n\nUse this to direct users to manage their Health Connect permissions\nor to install Health Connect if not available.",
126
+ "complexTypes": [],
127
+ "slug": "openhealthconnectsettings"
128
+ },
129
+ {
130
+ "name": "showPrivacyPolicy",
131
+ "signature": "() => Promise<void>",
132
+ "parameters": [],
133
+ "returns": "Promise<void>",
134
+ "tags": [
135
+ {
136
+ "name": "throws",
137
+ "text": "An error if the privacy policy cannot be displayed"
138
+ }
139
+ ],
140
+ "docs": "Shows the app's privacy policy for Health Connect.\n\nThis displays the same privacy policy screen that Health Connect shows\nwhen the user taps \"Privacy policy\" in the permissions dialog.\n\nThe privacy policy URL can be configured by adding a string resource\nnamed \"health_connect_privacy_policy_url\" in your app's strings.xml,\nor by placing an HTML file at www/privacypolicy.html in your assets.",
141
+ "complexTypes": [],
142
+ "slug": "showprivacypolicy"
143
+ },
144
+ {
145
+ "name": "queryWorkouts",
146
+ "signature": "(options: QueryWorkoutsOptions) => Promise<QueryWorkoutsResult>",
147
+ "parameters": [
148
+ {
149
+ "name": "options",
150
+ "docs": "Query options including optional workout type filter, date range, limit, and sort order",
151
+ "type": "QueryWorkoutsOptions"
152
+ }
153
+ ],
154
+ "returns": "Promise<QueryWorkoutsResult>",
155
+ "tags": [
156
+ {
157
+ "name": "param",
158
+ "text": "options Query options including optional workout type filter, date range, limit, and sort order"
159
+ },
160
+ {
161
+ "name": "returns",
162
+ "text": "A promise that resolves with the workout sessions"
163
+ },
164
+ {
165
+ "name": "throws",
166
+ "text": "An error if something went wrong"
167
+ }
168
+ ],
169
+ "docs": "Queries workout sessions from the native health store on Android (Health Connect).",
170
+ "complexTypes": [
171
+ "QueryWorkoutsResult",
172
+ "QueryWorkoutsOptions"
173
+ ],
174
+ "slug": "queryworkouts"
175
+ }
176
+ ],
177
+ "properties": []
178
+ },
179
+ "interfaces": [
180
+ {
181
+ "name": "AvailabilityResult",
182
+ "slug": "availabilityresult",
183
+ "docs": "",
184
+ "tags": [],
185
+ "methods": [],
186
+ "properties": [
187
+ {
188
+ "name": "available",
189
+ "tags": [],
190
+ "docs": "",
191
+ "complexTypes": [],
192
+ "type": "boolean"
193
+ },
194
+ {
195
+ "name": "platform",
196
+ "tags": [],
197
+ "docs": "Platform specific details (for debugging/diagnostics).",
198
+ "complexTypes": [],
199
+ "type": "'android' | 'web' | undefined"
200
+ },
201
+ {
202
+ "name": "reason",
203
+ "tags": [],
204
+ "docs": "",
205
+ "complexTypes": [],
206
+ "type": "string | undefined"
207
+ }
208
+ ]
209
+ },
210
+ {
211
+ "name": "AuthorizationStatus",
212
+ "slug": "authorizationstatus",
213
+ "docs": "",
214
+ "tags": [],
215
+ "methods": [],
216
+ "properties": [
217
+ {
218
+ "name": "readAuthorized",
219
+ "tags": [],
220
+ "docs": "",
221
+ "complexTypes": [
222
+ "HealthDataType"
223
+ ],
224
+ "type": "HealthDataType[]"
225
+ },
226
+ {
227
+ "name": "readDenied",
228
+ "tags": [],
229
+ "docs": "",
230
+ "complexTypes": [
231
+ "HealthDataType"
232
+ ],
233
+ "type": "HealthDataType[]"
234
+ },
235
+ {
236
+ "name": "writeAuthorized",
237
+ "tags": [],
238
+ "docs": "",
239
+ "complexTypes": [
240
+ "HealthDataType"
241
+ ],
242
+ "type": "HealthDataType[]"
243
+ },
244
+ {
245
+ "name": "writeDenied",
246
+ "tags": [],
247
+ "docs": "",
248
+ "complexTypes": [
249
+ "HealthDataType"
250
+ ],
251
+ "type": "HealthDataType[]"
252
+ }
253
+ ]
254
+ },
255
+ {
256
+ "name": "AuthorizationOptions",
257
+ "slug": "authorizationoptions",
258
+ "docs": "",
259
+ "tags": [],
260
+ "methods": [],
261
+ "properties": [
262
+ {
263
+ "name": "read",
264
+ "tags": [],
265
+ "docs": "Data types that should be readable after authorization.",
266
+ "complexTypes": [
267
+ "HealthDataType"
268
+ ],
269
+ "type": "HealthDataType[] | undefined"
270
+ },
271
+ {
272
+ "name": "write",
273
+ "tags": [],
274
+ "docs": "Data types that should be writable after authorization.",
275
+ "complexTypes": [
276
+ "HealthDataType"
277
+ ],
278
+ "type": "HealthDataType[] | undefined"
279
+ }
280
+ ]
281
+ },
282
+ {
283
+ "name": "ReadSamplesResult",
284
+ "slug": "readsamplesresult",
285
+ "docs": "",
286
+ "tags": [],
287
+ "methods": [],
288
+ "properties": [
289
+ {
290
+ "name": "samples",
291
+ "tags": [],
292
+ "docs": "",
293
+ "complexTypes": [
294
+ "HealthSample"
295
+ ],
296
+ "type": "HealthSample[]"
297
+ }
298
+ ]
299
+ },
300
+ {
301
+ "name": "HealthSample",
302
+ "slug": "healthsample",
303
+ "docs": "",
304
+ "tags": [],
305
+ "methods": [],
306
+ "properties": [
307
+ {
308
+ "name": "dataType",
309
+ "tags": [],
310
+ "docs": "",
311
+ "complexTypes": [
312
+ "HealthDataType"
313
+ ],
314
+ "type": "HealthDataType"
315
+ },
316
+ {
317
+ "name": "value",
318
+ "tags": [],
319
+ "docs": "",
320
+ "complexTypes": [],
321
+ "type": "number"
322
+ },
323
+ {
324
+ "name": "unit",
325
+ "tags": [],
326
+ "docs": "",
327
+ "complexTypes": [
328
+ "HealthUnit"
329
+ ],
330
+ "type": "HealthUnit"
331
+ },
332
+ {
333
+ "name": "startDate",
334
+ "tags": [],
335
+ "docs": "",
336
+ "complexTypes": [],
337
+ "type": "string"
338
+ },
339
+ {
340
+ "name": "endDate",
341
+ "tags": [],
342
+ "docs": "",
343
+ "complexTypes": [],
344
+ "type": "string"
345
+ },
346
+ {
347
+ "name": "sourceName",
348
+ "tags": [],
349
+ "docs": "",
350
+ "complexTypes": [],
351
+ "type": "string | undefined"
352
+ },
353
+ {
354
+ "name": "sourceId",
355
+ "tags": [],
356
+ "docs": "",
357
+ "complexTypes": [],
358
+ "type": "string | undefined"
359
+ }
360
+ ]
361
+ },
362
+ {
363
+ "name": "QueryOptions",
364
+ "slug": "queryoptions",
365
+ "docs": "",
366
+ "tags": [],
367
+ "methods": [],
368
+ "properties": [
369
+ {
370
+ "name": "dataType",
371
+ "tags": [],
372
+ "docs": "The type of data to retrieve from the health store.",
373
+ "complexTypes": [
374
+ "HealthDataType"
375
+ ],
376
+ "type": "HealthDataType"
377
+ },
378
+ {
379
+ "name": "startDate",
380
+ "tags": [],
381
+ "docs": "Inclusive ISO 8601 start date (defaults to now - 1 day).",
382
+ "complexTypes": [],
383
+ "type": "string | undefined"
384
+ },
385
+ {
386
+ "name": "endDate",
387
+ "tags": [],
388
+ "docs": "Exclusive ISO 8601 end date (defaults to now).",
389
+ "complexTypes": [],
390
+ "type": "string | undefined"
391
+ },
392
+ {
393
+ "name": "limit",
394
+ "tags": [],
395
+ "docs": "Maximum number of samples to return (defaults to 100).",
396
+ "complexTypes": [],
397
+ "type": "number | undefined"
398
+ },
399
+ {
400
+ "name": "ascending",
401
+ "tags": [],
402
+ "docs": "Return results sorted ascending by start date (defaults to false).",
403
+ "complexTypes": [],
404
+ "type": "boolean | undefined"
405
+ }
406
+ ]
407
+ },
408
+ {
409
+ "name": "WriteSampleOptions",
410
+ "slug": "writesampleoptions",
411
+ "docs": "",
412
+ "tags": [],
413
+ "methods": [],
414
+ "properties": [
415
+ {
416
+ "name": "dataType",
417
+ "tags": [],
418
+ "docs": "",
419
+ "complexTypes": [
420
+ "HealthDataType"
421
+ ],
422
+ "type": "HealthDataType"
423
+ },
424
+ {
425
+ "name": "value",
426
+ "tags": [],
427
+ "docs": "",
428
+ "complexTypes": [],
429
+ "type": "number"
430
+ },
431
+ {
432
+ "name": "unit",
433
+ "tags": [],
434
+ "docs": "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`).",
435
+ "complexTypes": [
436
+ "HealthUnit"
437
+ ],
438
+ "type": "HealthUnit"
439
+ },
440
+ {
441
+ "name": "startDate",
442
+ "tags": [],
443
+ "docs": "ISO 8601 start date for the sample. Defaults to now.",
444
+ "complexTypes": [],
445
+ "type": "string | undefined"
446
+ },
447
+ {
448
+ "name": "endDate",
449
+ "tags": [],
450
+ "docs": "ISO 8601 end date for the sample. Defaults to startDate.",
451
+ "complexTypes": [],
452
+ "type": "string | undefined"
453
+ },
454
+ {
455
+ "name": "metadata",
456
+ "tags": [],
457
+ "docs": "Metadata key-value pairs forwarded to the native APIs where supported.",
458
+ "complexTypes": [
459
+ "Record"
460
+ ],
461
+ "type": "Record<string, string>"
462
+ }
463
+ ]
464
+ },
465
+ {
466
+ "name": "QueryWorkoutsResult",
467
+ "slug": "queryworkoutsresult",
468
+ "docs": "",
469
+ "tags": [],
470
+ "methods": [],
471
+ "properties": [
472
+ {
473
+ "name": "workouts",
474
+ "tags": [],
475
+ "docs": "",
476
+ "complexTypes": [
477
+ "Workout"
478
+ ],
479
+ "type": "Workout[]"
480
+ }
481
+ ]
482
+ },
483
+ {
484
+ "name": "Workout",
485
+ "slug": "workout",
486
+ "docs": "",
487
+ "tags": [],
488
+ "methods": [],
489
+ "properties": [
490
+ {
491
+ "name": "workoutType",
492
+ "tags": [],
493
+ "docs": "The type of workout.",
494
+ "complexTypes": [
495
+ "WorkoutType"
496
+ ],
497
+ "type": "WorkoutType"
498
+ },
499
+ {
500
+ "name": "duration",
501
+ "tags": [],
502
+ "docs": "Duration of the workout in seconds.",
503
+ "complexTypes": [],
504
+ "type": "number"
505
+ },
506
+ {
507
+ "name": "totalEnergyBurned",
508
+ "tags": [],
509
+ "docs": "Total energy burned in kilocalories (if available).",
510
+ "complexTypes": [],
511
+ "type": "number | undefined"
512
+ },
513
+ {
514
+ "name": "totalDistance",
515
+ "tags": [],
516
+ "docs": "Total distance in meters (if available).",
517
+ "complexTypes": [],
518
+ "type": "number | undefined"
519
+ },
520
+ {
521
+ "name": "startDate",
522
+ "tags": [],
523
+ "docs": "ISO 8601 start date of the workout.",
524
+ "complexTypes": [],
525
+ "type": "string"
526
+ },
527
+ {
528
+ "name": "endDate",
529
+ "tags": [],
530
+ "docs": "ISO 8601 end date of the workout.",
531
+ "complexTypes": [],
532
+ "type": "string"
533
+ },
534
+ {
535
+ "name": "sourceName",
536
+ "tags": [],
537
+ "docs": "Source name that recorded the workout.",
538
+ "complexTypes": [],
539
+ "type": "string | undefined"
540
+ },
541
+ {
542
+ "name": "sourceId",
543
+ "tags": [],
544
+ "docs": "Source bundle identifier.",
545
+ "complexTypes": [],
546
+ "type": "string | undefined"
547
+ },
548
+ {
549
+ "name": "metadata",
550
+ "tags": [],
551
+ "docs": "Additional metadata (if available).",
552
+ "complexTypes": [
553
+ "Record"
554
+ ],
555
+ "type": "Record<string, string>"
556
+ }
557
+ ]
558
+ },
559
+ {
560
+ "name": "QueryWorkoutsOptions",
561
+ "slug": "queryworkoutsoptions",
562
+ "docs": "",
563
+ "tags": [],
564
+ "methods": [],
565
+ "properties": [
566
+ {
567
+ "name": "workoutType",
568
+ "tags": [],
569
+ "docs": "Optional workout type filter. If omitted, all workout types are returned.",
570
+ "complexTypes": [
571
+ "WorkoutType"
572
+ ],
573
+ "type": "WorkoutType"
574
+ },
575
+ {
576
+ "name": "startDate",
577
+ "tags": [],
578
+ "docs": "Inclusive ISO 8601 start date (defaults to now - 1 day).",
579
+ "complexTypes": [],
580
+ "type": "string | undefined"
581
+ },
582
+ {
583
+ "name": "endDate",
584
+ "tags": [],
585
+ "docs": "Exclusive ISO 8601 end date (defaults to now).",
586
+ "complexTypes": [],
587
+ "type": "string | undefined"
588
+ },
589
+ {
590
+ "name": "limit",
591
+ "tags": [],
592
+ "docs": "Maximum number of workouts to return (defaults to 100).",
593
+ "complexTypes": [],
594
+ "type": "number | undefined"
595
+ },
596
+ {
597
+ "name": "ascending",
598
+ "tags": [],
599
+ "docs": "Return results sorted ascending by start date (defaults to false).",
600
+ "complexTypes": [],
601
+ "type": "boolean | undefined"
602
+ }
603
+ ]
604
+ }
605
+ ],
606
+ "enums": [],
607
+ "typeAliases": [
608
+ {
609
+ "name": "HealthDataType",
610
+ "slug": "healthdatatype",
611
+ "docs": "",
612
+ "types": [
613
+ {
614
+ "text": "'steps'",
615
+ "complexTypes": []
616
+ },
617
+ {
618
+ "text": "'distance'",
619
+ "complexTypes": []
620
+ },
621
+ {
622
+ "text": "'calories'",
623
+ "complexTypes": []
624
+ },
625
+ {
626
+ "text": "'heartRate'",
627
+ "complexTypes": []
628
+ },
629
+ {
630
+ "text": "'weight'",
631
+ "complexTypes": []
632
+ }
633
+ ]
634
+ },
635
+ {
636
+ "name": "HealthUnit",
637
+ "slug": "healthunit",
638
+ "docs": "",
639
+ "types": [
640
+ {
641
+ "text": "'count'",
642
+ "complexTypes": []
643
+ },
644
+ {
645
+ "text": "'meter'",
646
+ "complexTypes": []
647
+ },
648
+ {
649
+ "text": "'kilocalorie'",
650
+ "complexTypes": []
651
+ },
652
+ {
653
+ "text": "'bpm'",
654
+ "complexTypes": []
655
+ },
656
+ {
657
+ "text": "'kilogram'",
658
+ "complexTypes": []
659
+ }
660
+ ]
661
+ },
662
+ {
663
+ "name": "Record",
664
+ "slug": "record",
665
+ "docs": "Construct a type with a set of properties K of type T",
666
+ "types": [
667
+ {
668
+ "text": "{\r\n [P in K]: T;\r\n}",
669
+ "complexTypes": [
670
+ "K",
671
+ "T"
672
+ ]
673
+ }
674
+ ]
675
+ },
676
+ {
677
+ "name": "WorkoutType",
678
+ "slug": "workouttype",
679
+ "docs": "",
680
+ "types": [
681
+ {
682
+ "text": "'running'",
683
+ "complexTypes": []
684
+ },
685
+ {
686
+ "text": "'cycling'",
687
+ "complexTypes": []
688
+ },
689
+ {
690
+ "text": "'walking'",
691
+ "complexTypes": []
692
+ },
693
+ {
694
+ "text": "'swimming'",
695
+ "complexTypes": []
696
+ },
697
+ {
698
+ "text": "'yoga'",
699
+ "complexTypes": []
700
+ },
701
+ {
702
+ "text": "'strengthTraining'",
703
+ "complexTypes": []
704
+ },
705
+ {
706
+ "text": "'hiking'",
707
+ "complexTypes": []
708
+ },
709
+ {
710
+ "text": "'tennis'",
711
+ "complexTypes": []
712
+ },
713
+ {
714
+ "text": "'basketball'",
715
+ "complexTypes": []
716
+ },
717
+ {
718
+ "text": "'soccer'",
719
+ "complexTypes": []
720
+ },
721
+ {
722
+ "text": "'americanFootball'",
723
+ "complexTypes": []
724
+ },
725
+ {
726
+ "text": "'baseball'",
727
+ "complexTypes": []
728
+ },
729
+ {
730
+ "text": "'crossTraining'",
731
+ "complexTypes": []
732
+ },
733
+ {
734
+ "text": "'elliptical'",
735
+ "complexTypes": []
736
+ },
737
+ {
738
+ "text": "'rowing'",
739
+ "complexTypes": []
740
+ },
741
+ {
742
+ "text": "'stairClimbing'",
743
+ "complexTypes": []
744
+ },
745
+ {
746
+ "text": "'traditionalStrengthTraining'",
747
+ "complexTypes": []
748
+ },
749
+ {
750
+ "text": "'waterFitness'",
751
+ "complexTypes": []
752
+ },
753
+ {
754
+ "text": "'waterPolo'",
755
+ "complexTypes": []
756
+ },
757
+ {
758
+ "text": "'waterSports'",
759
+ "complexTypes": []
760
+ },
761
+ {
762
+ "text": "'wrestling'",
763
+ "complexTypes": []
764
+ },
765
+ {
766
+ "text": "'other'",
767
+ "complexTypes": []
768
+ }
769
+ ]
770
+ }
771
+ ],
772
+ "pluginConfigs": []
773
+ }