@googleapis/health 1.0.0 → 2.0.0
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/CHANGELOG.md +11 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/v4.d.ts +1430 -104
- package/build/v4.js +244 -0
- package/build/v4.js.map +1 -1
- package/package.json +1 -1
- package/v4.ts +2043 -167
package/build/v4.d.ts
CHANGED
|
@@ -71,6 +71,28 @@ export declare namespace health_v4 {
|
|
|
71
71
|
users: Resource$Users;
|
|
72
72
|
constructor(options: GlobalOptions, google?: GoogleConfigurable);
|
|
73
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* Energy burned as part of an activity, excluding the basal energy burn.
|
|
76
|
+
*/
|
|
77
|
+
export interface Schema$ActiveEnergyBurned {
|
|
78
|
+
/**
|
|
79
|
+
* Required. Observed interval
|
|
80
|
+
*/
|
|
81
|
+
interval?: Schema$ObservationTimeInterval;
|
|
82
|
+
/**
|
|
83
|
+
* Required. Energy burned during an activity, measured in kilocalories.
|
|
84
|
+
*/
|
|
85
|
+
kcal?: number | null;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Represents the result of the rollup of active energy burned.
|
|
89
|
+
*/
|
|
90
|
+
export interface Schema$ActiveEnergyBurnedRollupValue {
|
|
91
|
+
/**
|
|
92
|
+
* Output only. Sum of the active energy burned in kilocalories.
|
|
93
|
+
*/
|
|
94
|
+
kcalSum?: number | null;
|
|
95
|
+
}
|
|
74
96
|
/**
|
|
75
97
|
* Record of active minutes in a given time interval.
|
|
76
98
|
*/
|
|
@@ -188,6 +210,43 @@ export declare namespace health_v4 {
|
|
|
188
210
|
*/
|
|
189
211
|
activityLevelRollupsByActivityLevelType?: Schema$ActivityLevelRollupByActivityLevelType[];
|
|
190
212
|
}
|
|
213
|
+
/**
|
|
214
|
+
* An analysis window evaluated for AFib. Note: The current version of the algorithm will only produce alerts if all windows are positive. So anything returned from the API will always have the positive bit set to true. Internally, windows can be negative, however. We never save "inconclusive" windows (they aren't produced by the algorithm).
|
|
215
|
+
*/
|
|
216
|
+
export interface Schema$AlertWindow {
|
|
217
|
+
/**
|
|
218
|
+
* Output only. Observed interval end time in civil time in the timezone the subject is in at the end of the observed interval
|
|
219
|
+
*/
|
|
220
|
+
civilEndTime?: Schema$CivilDateTime;
|
|
221
|
+
/**
|
|
222
|
+
* Output only. Observed interval start time in civil time in the timezone the subject is in at the start of the observed interval
|
|
223
|
+
*/
|
|
224
|
+
civilStartTime?: Schema$CivilDateTime;
|
|
225
|
+
/**
|
|
226
|
+
* Required. The end time of the analysis window.
|
|
227
|
+
*/
|
|
228
|
+
endTime?: string | null;
|
|
229
|
+
/**
|
|
230
|
+
* Required. The UTC offset of the user's timezone when the analysis window ended.
|
|
231
|
+
*/
|
|
232
|
+
endUtcOffset?: string | null;
|
|
233
|
+
/**
|
|
234
|
+
* Optional. All heart beats in the interval contained in this analysis window.
|
|
235
|
+
*/
|
|
236
|
+
heartBeats?: Schema$HeartBeat[];
|
|
237
|
+
/**
|
|
238
|
+
* Optional. Flag indicating whether the window was positive for AFib or not. A `true` value indicates that AFib was detected in this window. A `false` value means AFib was not detected, but does not guarantee the absence of AFib.
|
|
239
|
+
*/
|
|
240
|
+
positive?: boolean | null;
|
|
241
|
+
/**
|
|
242
|
+
* Required. Observed interval. The start time of the analysis window.
|
|
243
|
+
*/
|
|
244
|
+
startTime?: string | null;
|
|
245
|
+
/**
|
|
246
|
+
* Required. The UTC offset of the user's timezone when the analysis window started.
|
|
247
|
+
*/
|
|
248
|
+
startUtcOffset?: string | null;
|
|
249
|
+
}
|
|
191
250
|
/**
|
|
192
251
|
* Captures the altitude gain (i.e. deltas), and not level above sea, for a user in millimeters.
|
|
193
252
|
*/
|
|
@@ -249,6 +308,48 @@ export declare namespace health_v4 {
|
|
|
249
308
|
*/
|
|
250
309
|
names?: string[] | null;
|
|
251
310
|
}
|
|
311
|
+
/**
|
|
312
|
+
* Represents a blood glucose level measurement. LINT: LEGACY_NAMES
|
|
313
|
+
*/
|
|
314
|
+
export interface Schema$BloodGlucose {
|
|
315
|
+
/**
|
|
316
|
+
* Required. Blood glucose level concentration in mg/dL.
|
|
317
|
+
*/
|
|
318
|
+
bloodGlucoseMilligramsPerDeciliter?: number | null;
|
|
319
|
+
/**
|
|
320
|
+
* Optional. Meal type of the measurement.
|
|
321
|
+
*/
|
|
322
|
+
mealType?: string | null;
|
|
323
|
+
/**
|
|
324
|
+
* Optional. Source of the measurement.
|
|
325
|
+
*/
|
|
326
|
+
measurementSource?: string | null;
|
|
327
|
+
/**
|
|
328
|
+
* Optional. Timing of the measurement.
|
|
329
|
+
*/
|
|
330
|
+
measurementTiming?: string | null;
|
|
331
|
+
/**
|
|
332
|
+
* Optional. Standard free-form notes captured at manual logging.
|
|
333
|
+
*/
|
|
334
|
+
notes?: string | null;
|
|
335
|
+
/**
|
|
336
|
+
* Required. The time at which blood glucose was measured.
|
|
337
|
+
*/
|
|
338
|
+
sampleTime?: Schema$ObservationSampleTime;
|
|
339
|
+
/**
|
|
340
|
+
* Optional. Type of body fluid used to measure the blood glucose.
|
|
341
|
+
*/
|
|
342
|
+
specimen?: string | null;
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* Represents the result of the rollup of the blood glucose data type. LINT: LEGACY_NAMES
|
|
346
|
+
*/
|
|
347
|
+
export interface Schema$BloodGlucoseRollupValue {
|
|
348
|
+
/**
|
|
349
|
+
* Average blood glucose level in mg/dL.
|
|
350
|
+
*/
|
|
351
|
+
bloodGlucoseMilligramsPerDeciliterAvg?: number | null;
|
|
352
|
+
}
|
|
252
353
|
/**
|
|
253
354
|
* Body fat measurement.
|
|
254
355
|
*/
|
|
@@ -319,6 +420,44 @@ export declare namespace health_v4 {
|
|
|
319
420
|
*/
|
|
320
421
|
start?: Schema$CivilDateTime;
|
|
321
422
|
}
|
|
423
|
+
/**
|
|
424
|
+
* Core body temperature measurement, distinct from peripheral body temperature, reflects the temperature of the body's internal organs.
|
|
425
|
+
*/
|
|
426
|
+
export interface Schema$CoreBodyTemperature {
|
|
427
|
+
/**
|
|
428
|
+
* Optional. The unique identifier of the core body temperature measurement.
|
|
429
|
+
*/
|
|
430
|
+
id?: string | null;
|
|
431
|
+
/**
|
|
432
|
+
* Optional. The location of the core body temperature measurement.
|
|
433
|
+
*/
|
|
434
|
+
measurementLocation?: string | null;
|
|
435
|
+
/**
|
|
436
|
+
* Required. The time at which core body temperature was measured.
|
|
437
|
+
*/
|
|
438
|
+
sampleTime?: Schema$ObservationSampleTime;
|
|
439
|
+
/**
|
|
440
|
+
* Required. The core body temperature in Celsius.
|
|
441
|
+
*/
|
|
442
|
+
temperatureCelsius?: number | null;
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* Represents the result of the rollup of the core body temperature data type.
|
|
446
|
+
*/
|
|
447
|
+
export interface Schema$CoreBodyTemperatureRollupValue {
|
|
448
|
+
/**
|
|
449
|
+
* Average core body temperature in Celsius.
|
|
450
|
+
*/
|
|
451
|
+
temperatureCelsiusAvg?: number | null;
|
|
452
|
+
/**
|
|
453
|
+
* Maximum core body temperature in Celsius.
|
|
454
|
+
*/
|
|
455
|
+
temperatureCelsiusMax?: number | null;
|
|
456
|
+
/**
|
|
457
|
+
* Minimum core body temperature in Celsius.
|
|
458
|
+
*/
|
|
459
|
+
temperatureCelsiusMin?: number | null;
|
|
460
|
+
}
|
|
322
461
|
/**
|
|
323
462
|
* Payload for creating a subscriber.
|
|
324
463
|
*/
|
|
@@ -336,6 +475,19 @@ export declare namespace health_v4 {
|
|
|
336
475
|
*/
|
|
337
476
|
subscriberConfigs?: Schema$SubscriberConfig[];
|
|
338
477
|
}
|
|
478
|
+
/**
|
|
479
|
+
* Payload for creating a subscription.
|
|
480
|
+
*/
|
|
481
|
+
export interface Schema$CreateSubscriptionPayload {
|
|
482
|
+
/**
|
|
483
|
+
* Optional. Data types subscribed to.
|
|
484
|
+
*/
|
|
485
|
+
dataTypes?: string[] | null;
|
|
486
|
+
/**
|
|
487
|
+
* Required. Immutable. The resource name of the user for whom this subscription is active. Format: `users/{user\}` where `{user\}` is the public `healthUserId` as returned by the `GetIdentity` action in the profile PAPI (see `google.devicesandservices.health.v4main.HealthProfileService.GetIdentity`).
|
|
488
|
+
*/
|
|
489
|
+
user?: string | null;
|
|
490
|
+
}
|
|
339
491
|
/**
|
|
340
492
|
* Represents the daily heart rate variability data type. At least one of the following fields must be set: - `average_heart_rate_variability_milliseconds` - `non_rem_heart_rate_beats_per_minute` - `entropy` - `deep_sleep_root_mean_square_of_successive_differences_milliseconds`
|
|
341
493
|
*/
|
|
@@ -439,9 +591,13 @@ export declare namespace health_v4 {
|
|
|
439
591
|
calculationMethod?: string | null;
|
|
440
592
|
}
|
|
441
593
|
/**
|
|
442
|
-
* Value of a daily rollup for a single civil time interval (aggregation window)
|
|
594
|
+
* Value of a daily rollup for a single civil time interval (aggregation window) of reconciled data points from all data sources, excluding those data points that are identified as recorded by wearables in intervals when they were not actually worn.
|
|
443
595
|
*/
|
|
444
596
|
export interface Schema$DailyRollupDataPoint {
|
|
597
|
+
/**
|
|
598
|
+
* Returned by default when rolling up data points from the `active-energy-burned` data type.
|
|
599
|
+
*/
|
|
600
|
+
activeEnergyBurned?: Schema$ActiveEnergyBurnedRollupValue;
|
|
445
601
|
/**
|
|
446
602
|
* Returned by default when rolling up data points from the `active-minutes` data type, or when requested explicitly using the `active-minutes` rollup type identifier.
|
|
447
603
|
*/
|
|
@@ -458,6 +614,10 @@ export declare namespace health_v4 {
|
|
|
458
614
|
* Returned by default when rolling up data points from the `altitude` data type, or when requested explicitly using the `altitude` rollup type identifier.
|
|
459
615
|
*/
|
|
460
616
|
altitude?: Schema$AltitudeRollupValue;
|
|
617
|
+
/**
|
|
618
|
+
* Returned by default when rolling up data points from the `blood-glucose` data type.
|
|
619
|
+
*/
|
|
620
|
+
bloodGlucose?: Schema$BloodGlucoseRollupValue;
|
|
461
621
|
/**
|
|
462
622
|
* Returned by default when rolling up data points from the `body-fat` data type, or when requested explicitly using the `body-fat` rollup type identifier.
|
|
463
623
|
*/
|
|
@@ -474,6 +634,10 @@ export declare namespace health_v4 {
|
|
|
474
634
|
* Start time of the window this value aggregates over
|
|
475
635
|
*/
|
|
476
636
|
civilStartTime?: Schema$CivilDateTime;
|
|
637
|
+
/**
|
|
638
|
+
* Returned by default when rolling up data points from the `core-body-temperature` data type, or when requested explicitly using the `core-body-temperature` rollup type identifier.
|
|
639
|
+
*/
|
|
640
|
+
coreBodyTemperature?: Schema$CoreBodyTemperatureRollupValue;
|
|
477
641
|
/**
|
|
478
642
|
* Returned by default when rolling up data points from the `distance` data type, or when requested explicitly using the `distance` rollup type identifier.
|
|
479
643
|
*/
|
|
@@ -494,6 +658,10 @@ export declare namespace health_v4 {
|
|
|
494
658
|
* Returned by default when rolling up data points from the `hydration-log` data type, or when requested explicitly using the `hydration-log` rollup type identifier.
|
|
495
659
|
*/
|
|
496
660
|
hydrationLog?: Schema$HydrationLogRollupValue;
|
|
661
|
+
/**
|
|
662
|
+
* Returned by default when rolling up data points from the `nutrition-log` data type, or when requested explicitly using the `nutrition-log` rollup type identifier.
|
|
663
|
+
*/
|
|
664
|
+
nutritionLog?: Schema$NutritionLogRollupValue;
|
|
497
665
|
/**
|
|
498
666
|
* Returned by default when rolling up data points from the `daily-resting-heart-rate` data type, or when requested explicitly using the `resting-heart-rate-personal-range` rollup type identifier.
|
|
499
667
|
*/
|
|
@@ -611,6 +779,10 @@ export declare namespace health_v4 {
|
|
|
611
779
|
* A computed or recorded metric.
|
|
612
780
|
*/
|
|
613
781
|
export interface Schema$DataPoint {
|
|
782
|
+
/**
|
|
783
|
+
* Optional. Data for points in the `active-energy-burned` interval data type collection.
|
|
784
|
+
*/
|
|
785
|
+
activeEnergyBurned?: Schema$ActiveEnergyBurned;
|
|
614
786
|
/**
|
|
615
787
|
* Optional. Data for points in the `active-minutes` interval data type collection.
|
|
616
788
|
*/
|
|
@@ -631,10 +803,18 @@ export declare namespace health_v4 {
|
|
|
631
803
|
* Optional. Data for points in the `basal-energy-burned` interval data type collection.
|
|
632
804
|
*/
|
|
633
805
|
basalEnergyBurned?: Schema$BasalEnergyBurned;
|
|
806
|
+
/**
|
|
807
|
+
* Optional. Data for points in the `blood-glucose` sample data type collection.
|
|
808
|
+
*/
|
|
809
|
+
bloodGlucose?: Schema$BloodGlucose;
|
|
634
810
|
/**
|
|
635
811
|
* Optional. Data for points in the `body-fat` sample data type collection.
|
|
636
812
|
*/
|
|
637
813
|
bodyFat?: Schema$BodyFat;
|
|
814
|
+
/**
|
|
815
|
+
* Optional. Data for points in the `core-body-temperature` sample data type collection.
|
|
816
|
+
*/
|
|
817
|
+
coreBodyTemperature?: Schema$CoreBodyTemperature;
|
|
638
818
|
/**
|
|
639
819
|
* Optional. Data for points in the `daily-heart-rate-variability` daily data type collection.
|
|
640
820
|
*/
|
|
@@ -671,6 +851,10 @@ export declare namespace health_v4 {
|
|
|
671
851
|
* Optional. Data for points in the `distance` interval data type collection.
|
|
672
852
|
*/
|
|
673
853
|
distance?: Schema$Distance;
|
|
854
|
+
/**
|
|
855
|
+
* Optional. Data for points in the `electrocardiogram` session data type collection.
|
|
856
|
+
*/
|
|
857
|
+
electrocardiogram?: Schema$Electrocardiogram;
|
|
674
858
|
/**
|
|
675
859
|
* Optional. Data for points in the `exercise` session data type collection.
|
|
676
860
|
*/
|
|
@@ -679,6 +863,14 @@ export declare namespace health_v4 {
|
|
|
679
863
|
* Optional. Data for points in the `floors` interval data type collection.
|
|
680
864
|
*/
|
|
681
865
|
floors?: Schema$Floors;
|
|
866
|
+
/**
|
|
867
|
+
* Optional. The food details.
|
|
868
|
+
*/
|
|
869
|
+
food?: Schema$Food;
|
|
870
|
+
/**
|
|
871
|
+
* Optional. The food measurement unit details.
|
|
872
|
+
*/
|
|
873
|
+
foodMeasurementUnit?: Schema$FoodMeasurementUnit;
|
|
682
874
|
/**
|
|
683
875
|
* Optional. Data for points in the `heart-rate` sample data type collection.
|
|
684
876
|
*/
|
|
@@ -695,10 +887,18 @@ export declare namespace health_v4 {
|
|
|
695
887
|
* Optional. Data for points in the `hydration-log` session data type collection.
|
|
696
888
|
*/
|
|
697
889
|
hydrationLog?: Schema$HydrationLog;
|
|
890
|
+
/**
|
|
891
|
+
* Optional. Data for points in the `irregular-rhythm-notification` session data type collection.
|
|
892
|
+
*/
|
|
893
|
+
irregularRhythmNotification?: Schema$IrregularRhythmNotification;
|
|
698
894
|
/**
|
|
699
895
|
* Identifier. Data point name, only supported for the subset of identifiable data types. For the majority of the data types, individual data points do not need to be identified and this field would be empty. Format: `users/{user\}/dataTypes/{data_type\}/dataPoints/{data_point\}` Example: `users/abcd1234/dataTypes/sleep/dataPoints/a1b2c3d4-e5f6-7890-1234-567890abcdef` The `{user\}` ID is a system-generated identifier, as described in Identity.health_user_id. The `{data_type\}` ID corresponds to the kebab-case version of the field names in the DataPoint data union field, e.g. `total-calories` for the `total_calories` field. The `{data_point\}` ID can be client-provided or system-generated. If client-provided, it must be a string of 4-63 characters, containing only lowercase letters, numbers, and hyphens.
|
|
700
896
|
*/
|
|
701
897
|
name?: string | null;
|
|
898
|
+
/**
|
|
899
|
+
* Optional. Data for points in the `nutrition-log` session data type collection.
|
|
900
|
+
*/
|
|
901
|
+
nutritionLog?: Schema$NutritionLog;
|
|
702
902
|
/**
|
|
703
903
|
* Optional. Data for points in the `oxygen-saturation` sample data type collection.
|
|
704
904
|
*/
|
|
@@ -858,6 +1058,48 @@ export declare namespace health_v4 {
|
|
|
858
1058
|
*/
|
|
859
1059
|
millimetersSum?: string | null;
|
|
860
1060
|
}
|
|
1061
|
+
/**
|
|
1062
|
+
* Represents an Electrocardiogram (ECG) measurement session. This data type is based on SaMD feature and any changes to it may require additional review.
|
|
1063
|
+
*/
|
|
1064
|
+
export interface Schema$Electrocardiogram {
|
|
1065
|
+
/**
|
|
1066
|
+
* Optional. Average heart rate recorded during ECG reading in beats per minute.
|
|
1067
|
+
*/
|
|
1068
|
+
beatsPerMinuteAvg?: string | null;
|
|
1069
|
+
/**
|
|
1070
|
+
* Required. Observed interval. NOTE: Historical ECG data lacks timezone offsets, so `start_utc_offset` and `end_utc_offset` will be missing or default to zero. As a result, the civil time fields within this interval will default to UTC. It is recommended to use physical time fields instead for accurate time referencing. NOTE: The `start_time` and `end_time` of the interval are equal, representing the reading time.
|
|
1071
|
+
*/
|
|
1072
|
+
interval?: Schema$SessionTimeInterval;
|
|
1073
|
+
/**
|
|
1074
|
+
* Optional. The number of leads used for ECG reading.
|
|
1075
|
+
*/
|
|
1076
|
+
leadNumber?: number | null;
|
|
1077
|
+
/**
|
|
1078
|
+
* Output only. The meta information for the compatible device used to conduct the measurement. ECG measurements typically populate `firmware_version`, `feature_version`, and `device_model`.
|
|
1079
|
+
*/
|
|
1080
|
+
medicalDeviceInfo?: Schema$MedicalDeviceInfo;
|
|
1081
|
+
/**
|
|
1082
|
+
* Optional. The factor by which to divide waveform samples to get voltage in millivolts: millivolts = waveform_sample / millivolts_scaling_factor.
|
|
1083
|
+
*/
|
|
1084
|
+
millivoltsScalingFactor?: number | null;
|
|
1085
|
+
/**
|
|
1086
|
+
* Optional. The result classification of the ECG reading.
|
|
1087
|
+
*/
|
|
1088
|
+
resultClassification?: string | null;
|
|
1089
|
+
/**
|
|
1090
|
+
* Optional. The sampling frequency of waveform samples in hertz.
|
|
1091
|
+
*/
|
|
1092
|
+
samplingFrequencyHertz?: number | null;
|
|
1093
|
+
/**
|
|
1094
|
+
* Optional. An array of voltage values representing lead I ECG values. Each sample represents voltage difference in ECG graph. The first value in array corresponds to the start of the reading.
|
|
1095
|
+
*/
|
|
1096
|
+
waveformSamples?: number[] | null;
|
|
1097
|
+
}
|
|
1098
|
+
/**
|
|
1099
|
+
* A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); \}
|
|
1100
|
+
*/
|
|
1101
|
+
export interface Schema$Empty {
|
|
1102
|
+
}
|
|
861
1103
|
/**
|
|
862
1104
|
* Authorization mechanism for a subscriber endpoint. For all requests sent by the Webhooks service, the JSON payload is cryptographically signed. The signature is delivered in the `X-HEALTHAPI-SIGNATURE` HTTP header. This is an ECDSA (NIST P256) signature of the JSON payload. Clients must verify this signature using Google Health API's public key to confirm the payload was sent by the Health API.
|
|
863
1105
|
*/
|
|
@@ -871,6 +1113,32 @@ export declare namespace health_v4 {
|
|
|
871
1113
|
*/
|
|
872
1114
|
secretSet?: boolean | null;
|
|
873
1115
|
}
|
|
1116
|
+
/**
|
|
1117
|
+
* Represents the energy quantity.
|
|
1118
|
+
*/
|
|
1119
|
+
export interface Schema$EnergyQuantity {
|
|
1120
|
+
/**
|
|
1121
|
+
* Required. Value representing the energy in kilocalories.
|
|
1122
|
+
*/
|
|
1123
|
+
kcal?: number | null;
|
|
1124
|
+
/**
|
|
1125
|
+
* Optional. Value representing the user provided unit.
|
|
1126
|
+
*/
|
|
1127
|
+
userProvidedUnit?: string | null;
|
|
1128
|
+
}
|
|
1129
|
+
/**
|
|
1130
|
+
* Rollup for the energy quantity.
|
|
1131
|
+
*/
|
|
1132
|
+
export interface Schema$EnergyQuantityRollup {
|
|
1133
|
+
/**
|
|
1134
|
+
* Required. The sum of the energy in kilocalories.
|
|
1135
|
+
*/
|
|
1136
|
+
kcalSum?: number | null;
|
|
1137
|
+
/**
|
|
1138
|
+
* Optional. The user provided unit on the last element.
|
|
1139
|
+
*/
|
|
1140
|
+
userProvidedUnitLast?: string | null;
|
|
1141
|
+
}
|
|
874
1142
|
/**
|
|
875
1143
|
* An exercise that stores information about a physical activity.
|
|
876
1144
|
*/
|
|
@@ -959,7 +1227,7 @@ export declare namespace health_v4 {
|
|
|
959
1227
|
*/
|
|
960
1228
|
export interface Schema$ExportExerciseTcxResponse {
|
|
961
1229
|
/**
|
|
962
|
-
* Contains the exported TCX data.
|
|
1230
|
+
* Contains the exported TCX data. This field is intended for gRPC clients, as media download integration is not supported for gRPC. HTTP clients should instead use the `alt=media` query parameter to download the raw binary TCX file.
|
|
963
1231
|
*/
|
|
964
1232
|
tcxData?: string | null;
|
|
965
1233
|
}
|
|
@@ -985,6 +1253,109 @@ export declare namespace health_v4 {
|
|
|
985
1253
|
*/
|
|
986
1254
|
countSum?: string | null;
|
|
987
1255
|
}
|
|
1256
|
+
/**
|
|
1257
|
+
* Represents a food item.
|
|
1258
|
+
*/
|
|
1259
|
+
export interface Schema$Food {
|
|
1260
|
+
/**
|
|
1261
|
+
* Required. The access level of the food.
|
|
1262
|
+
*/
|
|
1263
|
+
accessLevel?: string | null;
|
|
1264
|
+
/**
|
|
1265
|
+
* Optional. The brand of the food.
|
|
1266
|
+
*/
|
|
1267
|
+
brand?: string | null;
|
|
1268
|
+
/**
|
|
1269
|
+
* Required. Value representing the default serving of the food.
|
|
1270
|
+
*/
|
|
1271
|
+
defaultServing?: Schema$FoodServing;
|
|
1272
|
+
/**
|
|
1273
|
+
* Optional. The description of the food.
|
|
1274
|
+
*/
|
|
1275
|
+
description?: string | null;
|
|
1276
|
+
/**
|
|
1277
|
+
* Required. The display name of the food.
|
|
1278
|
+
*/
|
|
1279
|
+
displayName?: string | null;
|
|
1280
|
+
/**
|
|
1281
|
+
* Optional. Value representing the average energy of the food for the default serving.
|
|
1282
|
+
*/
|
|
1283
|
+
energyAvg?: Schema$EnergyQuantity;
|
|
1284
|
+
/**
|
|
1285
|
+
* Optional. Value representing the energy from fat of the food for the default serving.
|
|
1286
|
+
*/
|
|
1287
|
+
energyFromFat?: Schema$EnergyQuantity;
|
|
1288
|
+
/**
|
|
1289
|
+
* Optional. Value representing the maximum energy of the food for the default serving.
|
|
1290
|
+
*/
|
|
1291
|
+
energyMax?: Schema$EnergyQuantity;
|
|
1292
|
+
/**
|
|
1293
|
+
* Optional. Value representing the minimum energy of the food for the default serving.
|
|
1294
|
+
*/
|
|
1295
|
+
energyMin?: Schema$EnergyQuantity;
|
|
1296
|
+
/**
|
|
1297
|
+
* Optional. The language code where the food is available in format xx-XX. Supported values are defined in Settings.food_language_code.
|
|
1298
|
+
*/
|
|
1299
|
+
languageCode?: string | null;
|
|
1300
|
+
/**
|
|
1301
|
+
* Optional. The meal type associated with this food.
|
|
1302
|
+
*/
|
|
1303
|
+
mealType?: string | null;
|
|
1304
|
+
/**
|
|
1305
|
+
* Optional. Value representing the nutrients of the food for the default serving.
|
|
1306
|
+
*/
|
|
1307
|
+
nutrients?: Schema$NutrientQuantity[];
|
|
1308
|
+
/**
|
|
1309
|
+
* Optional. The serving of the food.
|
|
1310
|
+
*/
|
|
1311
|
+
servings?: Schema$FoodServing[];
|
|
1312
|
+
/**
|
|
1313
|
+
* Optional. Value representing the total carbohydrate of the food for the default serving.
|
|
1314
|
+
*/
|
|
1315
|
+
totalCarbohydrate?: Schema$WeightQuantity;
|
|
1316
|
+
/**
|
|
1317
|
+
* Optional. Value representing the total fat of the food for the default serving.
|
|
1318
|
+
*/
|
|
1319
|
+
totalFat?: Schema$WeightQuantity;
|
|
1320
|
+
}
|
|
1321
|
+
/**
|
|
1322
|
+
* Represents a food measurement unit.
|
|
1323
|
+
*/
|
|
1324
|
+
export interface Schema$FoodMeasurementUnit {
|
|
1325
|
+
/**
|
|
1326
|
+
* Required. The display name of the food measurement unit (e.g., "gram", "piece").
|
|
1327
|
+
*/
|
|
1328
|
+
displayName?: string | null;
|
|
1329
|
+
/**
|
|
1330
|
+
* Optional. The plural display name of the food measurement unit (e.g., "grams", "pieces").
|
|
1331
|
+
*/
|
|
1332
|
+
pluralDisplayName?: string | null;
|
|
1333
|
+
}
|
|
1334
|
+
/**
|
|
1335
|
+
* Represents different properties and information about the serving of a specific food.
|
|
1336
|
+
*/
|
|
1337
|
+
export interface Schema$FoodServing {
|
|
1338
|
+
/**
|
|
1339
|
+
* Optional. Amount of food consumed, fractional values are supported.
|
|
1340
|
+
*/
|
|
1341
|
+
amount?: number | null;
|
|
1342
|
+
/**
|
|
1343
|
+
* Required. Food measurement unit
|
|
1344
|
+
*/
|
|
1345
|
+
foodMeasurementUnit?: string | null;
|
|
1346
|
+
/**
|
|
1347
|
+
* Output only. Legacy measurement unit for serving size in singular form (e.g. "piece", "gram").
|
|
1348
|
+
*/
|
|
1349
|
+
foodMeasurementUnitDisplayName?: string | null;
|
|
1350
|
+
/**
|
|
1351
|
+
* Output only. Legacy measurement unit for serving size in plural form (e.g. "pieces", "grams").
|
|
1352
|
+
*/
|
|
1353
|
+
foodMeasurementUnitDisplayNamePlural?: string | null;
|
|
1354
|
+
/**
|
|
1355
|
+
* Optional. Value representing the multiplier used to compute the energy when using this serving instead of the default serving.
|
|
1356
|
+
*/
|
|
1357
|
+
multiplier?: number | null;
|
|
1358
|
+
}
|
|
988
1359
|
/**
|
|
989
1360
|
* Represents a type of health data a user can have data points recorded for. It matches the parent resource of collection containing data points of the given type. Clients currently do not need to interact with this resource directly.
|
|
990
1361
|
*/
|
|
@@ -1003,6 +1374,27 @@ export declare namespace health_v4 {
|
|
|
1003
1374
|
*/
|
|
1004
1375
|
httpResponse?: Schema$HttpResponse;
|
|
1005
1376
|
}
|
|
1377
|
+
/**
|
|
1378
|
+
* A single heart beat measurement.
|
|
1379
|
+
*/
|
|
1380
|
+
export interface Schema$HeartBeat {
|
|
1381
|
+
/**
|
|
1382
|
+
* Required. The beats-per-minute value extrapolated from the time before the following heart beat. This is calculated as 60000 / rr, where rr is the gap between heart beats in milliseconds (IBI - Interbeat Interval).
|
|
1383
|
+
*/
|
|
1384
|
+
beatsPerMinute?: number | null;
|
|
1385
|
+
/**
|
|
1386
|
+
* Output only. The civil time in the timezone the subject is in at the time of the observation.
|
|
1387
|
+
*/
|
|
1388
|
+
civilTime?: Schema$CivilDateTime;
|
|
1389
|
+
/**
|
|
1390
|
+
* Required. The time of the heart beat measurement.
|
|
1391
|
+
*/
|
|
1392
|
+
physicalTime?: string | null;
|
|
1393
|
+
/**
|
|
1394
|
+
* Required. The UTC offset of the user's timezone when the heart beat measurement occurred.
|
|
1395
|
+
*/
|
|
1396
|
+
utcOffset?: string | null;
|
|
1397
|
+
}
|
|
1006
1398
|
/**
|
|
1007
1399
|
* A heart rate measurement.
|
|
1008
1400
|
*/
|
|
@@ -1055,7 +1447,7 @@ export declare namespace health_v4 {
|
|
|
1055
1447
|
*/
|
|
1056
1448
|
export interface Schema$HeartRateVariability {
|
|
1057
1449
|
/**
|
|
1058
|
-
* Optional. The root mean square of successive differences between normal heartbeats. This is a measure of heart rate variability used by
|
|
1450
|
+
* Optional. The root mean square of successive differences between normal heartbeats. This is a measure of heart rate variability used by Google Health.
|
|
1059
1451
|
*/
|
|
1060
1452
|
rootMeanSquareOfSuccessiveDifferencesMilliseconds?: number | null;
|
|
1061
1453
|
/**
|
|
@@ -1197,35 +1589,124 @@ export declare namespace health_v4 {
|
|
|
1197
1589
|
startTime?: string | null;
|
|
1198
1590
|
}
|
|
1199
1591
|
/**
|
|
1200
|
-
*
|
|
1592
|
+
* Irregular Rhythm Notifications (IRN) Profile details. The Irregular Rhythm Notifications (IRN) feature checks for signs of atrial fibrillation (AFib). The IrnProfile details include information about the user's onboarding status, enrollment status, and the last update time of analyzable data for this feature.
|
|
1201
1593
|
*/
|
|
1202
|
-
export interface Schema$
|
|
1594
|
+
export interface Schema$IrnProfile {
|
|
1203
1595
|
/**
|
|
1204
|
-
*
|
|
1596
|
+
* Required. Whether or not the user is currently enrolled in having their data processed for IRN alerts.
|
|
1205
1597
|
*/
|
|
1206
|
-
|
|
1598
|
+
enrollmentStatus?: boolean | null;
|
|
1207
1599
|
/**
|
|
1208
|
-
*
|
|
1600
|
+
* Identifier. The resource name of this IrnProfile resource. Format: `users/{user\}/irnProfile` Example: `users/1234567890/irnProfile` or `users/me/irnProfile` The {user\} ID is a system-generated Google Health API user ID, a string of 1-63 characters consisting of lowercase and uppercase letters, numbers, and hyphens. The literal `me` can also be used to refer to the authenticated user.
|
|
1209
1601
|
*/
|
|
1210
|
-
|
|
1602
|
+
name?: string | null;
|
|
1603
|
+
/**
|
|
1604
|
+
* Required. Whether or not the user has onboarded onto the IRN feature.
|
|
1605
|
+
*/
|
|
1606
|
+
onboardingStatus?: boolean | null;
|
|
1607
|
+
/**
|
|
1608
|
+
* Output only. The timestamp of the last piece of analyzable data synced by the user.
|
|
1609
|
+
*/
|
|
1610
|
+
updateTime?: string | null;
|
|
1211
1611
|
}
|
|
1212
1612
|
/**
|
|
1213
|
-
*
|
|
1613
|
+
* Represents an Irregular Rhythm Notification alert, indicating a potential sign of atrial fibrillation (AFib). This data type is based on SaMD feature and any changes to it may require additional review.
|
|
1214
1614
|
*/
|
|
1215
|
-
export interface Schema$
|
|
1615
|
+
export interface Schema$IrregularRhythmNotification {
|
|
1216
1616
|
/**
|
|
1217
|
-
*
|
|
1617
|
+
* Optional. The overlapping analysis windows that were used to evaluate rhythm for potential AFib, containing specific information about the user's heart rhythm.
|
|
1218
1618
|
*/
|
|
1219
|
-
|
|
1619
|
+
alertWindows?: Schema$AlertWindow[];
|
|
1220
1620
|
/**
|
|
1221
|
-
*
|
|
1621
|
+
* Required. Observed interval.
|
|
1222
1622
|
*/
|
|
1223
|
-
|
|
1623
|
+
interval?: Schema$SessionTimeInterval;
|
|
1224
1624
|
/**
|
|
1225
|
-
* The
|
|
1625
|
+
* Output only. The meta information for the compatible device used to conduct the measurement. Irregular Rhythm Notification measurements typically populate `algorithm_version`, `service_version`, and `device_model`.
|
|
1626
|
+
*/
|
|
1627
|
+
medicalDeviceInfo?: Schema$MedicalDeviceInfo;
|
|
1628
|
+
}
|
|
1629
|
+
/**
|
|
1630
|
+
* Response containing raw data points matching the query
|
|
1631
|
+
*/
|
|
1632
|
+
export interface Schema$ListDataPointsResponse {
|
|
1633
|
+
/**
|
|
1634
|
+
* Data points matching the query
|
|
1635
|
+
*/
|
|
1636
|
+
dataPoints?: Schema$DataPoint[];
|
|
1637
|
+
/**
|
|
1638
|
+
* Next page token, empty if the response is complete
|
|
1639
|
+
*/
|
|
1640
|
+
nextPageToken?: string | null;
|
|
1641
|
+
}
|
|
1642
|
+
/**
|
|
1643
|
+
* Response message for ListPairedDevices.
|
|
1644
|
+
*/
|
|
1645
|
+
export interface Schema$ListPairedDevicesResponse {
|
|
1646
|
+
/**
|
|
1647
|
+
* A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
|
|
1648
|
+
*/
|
|
1649
|
+
nextPageToken?: string | null;
|
|
1650
|
+
/**
|
|
1651
|
+
* The paired devices of the user.
|
|
1652
|
+
*/
|
|
1653
|
+
pairedDevices?: Schema$PairedDevice[];
|
|
1654
|
+
}
|
|
1655
|
+
/**
|
|
1656
|
+
* Response message for ListSubscribers.
|
|
1657
|
+
*/
|
|
1658
|
+
export interface Schema$ListSubscribersResponse {
|
|
1659
|
+
/**
|
|
1660
|
+
* A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
|
|
1661
|
+
*/
|
|
1662
|
+
nextPageToken?: string | null;
|
|
1663
|
+
/**
|
|
1664
|
+
* Subscribers from the specified project.
|
|
1665
|
+
*/
|
|
1666
|
+
subscribers?: Schema$Subscriber[];
|
|
1667
|
+
/**
|
|
1668
|
+
* The total number of subscribers matching the request.
|
|
1226
1669
|
*/
|
|
1227
1670
|
totalSize?: number | null;
|
|
1228
1671
|
}
|
|
1672
|
+
/**
|
|
1673
|
+
* Response message for ListSubscriptions.
|
|
1674
|
+
*/
|
|
1675
|
+
export interface Schema$ListSubscriptionsResponse {
|
|
1676
|
+
/**
|
|
1677
|
+
* A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
|
|
1678
|
+
*/
|
|
1679
|
+
nextPageToken?: string | null;
|
|
1680
|
+
/**
|
|
1681
|
+
* The subscriptions from the specified subscriber.
|
|
1682
|
+
*/
|
|
1683
|
+
subscriptions?: Schema$Subscription[];
|
|
1684
|
+
}
|
|
1685
|
+
/**
|
|
1686
|
+
* Software as Medical Device (SaMD) metadata. Used to construct the Unique Device Identifier (UDI).
|
|
1687
|
+
*/
|
|
1688
|
+
export interface Schema$MedicalDeviceInfo {
|
|
1689
|
+
/**
|
|
1690
|
+
* Output only. The algorithm version used by the feature.
|
|
1691
|
+
*/
|
|
1692
|
+
algorithmVersion?: string | null;
|
|
1693
|
+
/**
|
|
1694
|
+
* Output only. The model name or device type of the compatible device used to collect the data.
|
|
1695
|
+
*/
|
|
1696
|
+
deviceModel?: string | null;
|
|
1697
|
+
/**
|
|
1698
|
+
* Output only. The version of the feature/app running on the device.
|
|
1699
|
+
*/
|
|
1700
|
+
featureVersion?: string | null;
|
|
1701
|
+
/**
|
|
1702
|
+
* Output only. The firmware version running on the compatible device used to collect the data.
|
|
1703
|
+
*/
|
|
1704
|
+
firmwareVersion?: string | null;
|
|
1705
|
+
/**
|
|
1706
|
+
* Output only. The service version used by the feature.
|
|
1707
|
+
*/
|
|
1708
|
+
serviceVersion?: string | null;
|
|
1709
|
+
}
|
|
1229
1710
|
/**
|
|
1230
1711
|
* Summary metrics for an exercise.
|
|
1231
1712
|
*/
|
|
@@ -1304,6 +1785,102 @@ export declare namespace health_v4 {
|
|
|
1304
1785
|
*/
|
|
1305
1786
|
avgVerticalRatio?: number | null;
|
|
1306
1787
|
}
|
|
1788
|
+
/**
|
|
1789
|
+
* Represents the quantity of a nutrient.
|
|
1790
|
+
*/
|
|
1791
|
+
export interface Schema$NutrientQuantity {
|
|
1792
|
+
/**
|
|
1793
|
+
* Required. Value representing the nutrient.
|
|
1794
|
+
*/
|
|
1795
|
+
nutrient?: string | null;
|
|
1796
|
+
/**
|
|
1797
|
+
* Required. Value representing the quantity of the nutrient.
|
|
1798
|
+
*/
|
|
1799
|
+
quantity?: Schema$WeightQuantity;
|
|
1800
|
+
}
|
|
1801
|
+
/**
|
|
1802
|
+
* Nutrient quantity rollup.
|
|
1803
|
+
*/
|
|
1804
|
+
export interface Schema$NutrientQuantityRollup {
|
|
1805
|
+
/**
|
|
1806
|
+
* Required. Aggregated nutrient.
|
|
1807
|
+
*/
|
|
1808
|
+
nutrient?: string | null;
|
|
1809
|
+
/**
|
|
1810
|
+
* Required. Aggregated nutrient weight.
|
|
1811
|
+
*/
|
|
1812
|
+
quantity?: Schema$WeightQuantityRollup;
|
|
1813
|
+
}
|
|
1814
|
+
/**
|
|
1815
|
+
* Holds information about a user logged food. There are two ways of creating a nutrition log based on the food type: 1. Identified food: Using the food field, which is a reference to a Food resource. In this case fields `nutrients`, `energy`, `energy_from_fat`, `total_carbohydrate`, `total_fat`, `food_display_name` will be populated based on the referenced food. 2. Anonymous food: Using the `food_display_name` field and setting the `nutrients`, `energy`, `energy_from_fat`, `total_carbohydrate`, `total_fat` fields manually. The identified food is preferred over the anonymous food. Nutrition logs created from anonymous food are not be editable.
|
|
1816
|
+
*/
|
|
1817
|
+
export interface Schema$NutritionLog {
|
|
1818
|
+
/**
|
|
1819
|
+
* Optional. Value representing the energy of the nutrition log. For nutrition logs created from an identified food, this field will be populated based on the referenced food. For anonymous food, this field will be populated manually.
|
|
1820
|
+
*/
|
|
1821
|
+
energy?: Schema$EnergyQuantity;
|
|
1822
|
+
/**
|
|
1823
|
+
* Optional. Value representing the energy from fat of the nutrition log. For nutrition logs created from an identified food, this field will be populated based on the referenced food. For anonymous food, this field will be populated manually.
|
|
1824
|
+
*/
|
|
1825
|
+
energyFromFat?: Schema$EnergyQuantity;
|
|
1826
|
+
/**
|
|
1827
|
+
* Required. Represents the food ID.
|
|
1828
|
+
*/
|
|
1829
|
+
food?: string | null;
|
|
1830
|
+
/**
|
|
1831
|
+
* Value representing the display name of the food. For nutrition logs created from an identified food, this field will be populated based on the referenced food. For anonymous food, this field will be populated manually.
|
|
1832
|
+
*/
|
|
1833
|
+
foodDisplayName?: string | null;
|
|
1834
|
+
/**
|
|
1835
|
+
* Required. Observed interval.
|
|
1836
|
+
*/
|
|
1837
|
+
interval?: Schema$SessionTimeInterval;
|
|
1838
|
+
/**
|
|
1839
|
+
* Optional. Value representing the meal type of the nutrition log.
|
|
1840
|
+
*/
|
|
1841
|
+
mealType?: string | null;
|
|
1842
|
+
/**
|
|
1843
|
+
* Optional. Value representing the nutrients of the nutrition log.
|
|
1844
|
+
*/
|
|
1845
|
+
nutrients?: Schema$NutrientQuantity[];
|
|
1846
|
+
/**
|
|
1847
|
+
* Optional. Value representing the nutrition log serving.
|
|
1848
|
+
*/
|
|
1849
|
+
serving?: Schema$Serving;
|
|
1850
|
+
/**
|
|
1851
|
+
* Optional. Value representing the total carbohydrate of the nutrition log. For nutrition logs created from an identified food, this field will be populated based on the referenced food. For anonymous food, this field will be populated manually.
|
|
1852
|
+
*/
|
|
1853
|
+
totalCarbohydrate?: Schema$WeightQuantity;
|
|
1854
|
+
/**
|
|
1855
|
+
* Optional. Value representing the total fat of the nutrition log. For nutrition logs created from an identified food, this field will be populated based on the referenced food. For anonymous food, this field will be populated manually.
|
|
1856
|
+
*/
|
|
1857
|
+
totalFat?: Schema$WeightQuantity;
|
|
1858
|
+
}
|
|
1859
|
+
/**
|
|
1860
|
+
* Represents the result of the rollup of the nutrition log data type.
|
|
1861
|
+
*/
|
|
1862
|
+
export interface Schema$NutritionLogRollupValue {
|
|
1863
|
+
/**
|
|
1864
|
+
* Energy rollup.
|
|
1865
|
+
*/
|
|
1866
|
+
energy?: Schema$EnergyQuantityRollup;
|
|
1867
|
+
/**
|
|
1868
|
+
* Value Energy from fat rollup.
|
|
1869
|
+
*/
|
|
1870
|
+
energyFromFat?: Schema$EnergyQuantityRollup;
|
|
1871
|
+
/**
|
|
1872
|
+
* List of the nutrient roll-ups by the nutrient type.
|
|
1873
|
+
*/
|
|
1874
|
+
nutrients?: Schema$NutrientQuantityRollup[];
|
|
1875
|
+
/**
|
|
1876
|
+
* Total carbohydrate rollup.
|
|
1877
|
+
*/
|
|
1878
|
+
totalCarbohydrate?: Schema$WeightQuantityRollup;
|
|
1879
|
+
/**
|
|
1880
|
+
* Total fat rollup.
|
|
1881
|
+
*/
|
|
1882
|
+
totalFat?: Schema$WeightQuantityRollup;
|
|
1883
|
+
}
|
|
1307
1884
|
/**
|
|
1308
1885
|
* Represents a sample time of an observed data point.
|
|
1309
1886
|
*/
|
|
@@ -1413,6 +1990,43 @@ export declare namespace health_v4 {
|
|
|
1413
1990
|
*/
|
|
1414
1991
|
sampleTime?: Schema$ObservationSampleTime;
|
|
1415
1992
|
}
|
|
1993
|
+
/**
|
|
1994
|
+
* User's Paired 1P Device The PairedDevice details include information about the device type, battery status, battery level, last sync time, device version, mac address, and features.
|
|
1995
|
+
*/
|
|
1996
|
+
export interface Schema$PairedDevice {
|
|
1997
|
+
/**
|
|
1998
|
+
* Output only. The battery level of the device.
|
|
1999
|
+
*/
|
|
2000
|
+
batteryLevel?: number | null;
|
|
2001
|
+
/**
|
|
2002
|
+
* Output only. The battery status of the device. Supported: High | Medium | Low | Empty
|
|
2003
|
+
*/
|
|
2004
|
+
batteryStatus?: string | null;
|
|
2005
|
+
/**
|
|
2006
|
+
* Output only. The device type. Supported: TRACKER | SCALE
|
|
2007
|
+
*/
|
|
2008
|
+
deviceType?: string | null;
|
|
2009
|
+
/**
|
|
2010
|
+
* Output only. The product name of the device
|
|
2011
|
+
*/
|
|
2012
|
+
deviceVersion?: string | null;
|
|
2013
|
+
/**
|
|
2014
|
+
* Output only. Lists of unique features supported by the device. Comprehensive list of supported features: **Fitness Tracking** - `ACTIVE_MINUTES`: Legacy active minutes. - `AUTOSTRIDE`: Automatic stride length calculation. - `BIKE_ONBOARDING`: Cycling UI support. - `CALORIES`: Daily burned calories. - `DISTANCE`: Daily distance tracking. - `ELEVATION`: Floors climbed. - `INACTIVITY_ALERTS`: Reminders to move. - `SEDENTARY_TIME`: Tracks inactive time. - `STEPS`: Daily steps. - `SWIM`: Swim tracking (laps/strokes). - `AUTORUN`: Automatic run detection. - `ACTIVE_ZONE_MINUTES`: Active Zone Minutes (AZM). **Heart Rate & Health** - `HEART_RATE`: Continuous heart rate (PPG). - `BAT_SIGNAL`: High/Low Heart Rate Alerts. **Advanced Sensors** - `SPO2`: Blood oxygen saturation. - `NIGHTTIME_OXYGEN_SATURATION`: Sleep SpO2. - `ESTIMATED_OXYGEN_VARIATION`: Estimated Oxygen Variation. - `EDA`: Electrodermal Activity (stress). - `SKIN_TEMPERATURE`: Skin temperature variation. - `INTERNAL_DEVICE_TEMPERATURE`: Internal device temperature. **Sleep & Wellness** - `SLEEP`: Basic sleep tracking. - `SMART_SLEEP`: Advanced sleep tracking (stages/score). - `BEDTIME_REMINDER`: Bedtime reminders. - `SOUNDSCAPE`: Snore and noise detection. **Advanced Workouts** - `WB`: Custom Workout Builder. - `AUTOCUES`: Auto Cues / Auto Lap. - `DWR_RUN`: Daily Run Recommendations. - `ADVANCED_RUNNING`: Advanced Running Dynamics (e.g., GCT, VO). **GPS & Location** - `GPS`: Built-in GPS. - `CONNECTED_GPS`: Connected GPS (uses phone). - `LOCATION_HINT`: Location helper. **Payments & NFC** - `PAYMENTS`: NFC payments (Fitbit Pay/Google Wallet). - `FELICA`: FeliCa support (Japan payments/transit). **Activity Detection** - `GROK`: SmartTrack automatic activity detection. - `RETRO_AR`: Retroactive Activity Recognition prompts. **Smart Features & UI** - `ALARMS`: Silent alarms. - `BLE_MUSIC_CONTROL`: BLE music control. - `MUSIC`: Direct music storage/control. - `YOUTUBE_MUSIC_SUPPORTED`: YouTube Music support. - `GALLERY`: App Gallery. - `TUTORIAL_SUPPORTED`: On-screen tutorials. - `SMILEY_EMOTE`: Legacy Zip face. - `MOBILE_TO_DEVICE_DEEPLINK`: Mobile to device settings deep link. - `HIDE_GALLERY`: Option to hide Gallery. - `HIDE_GOAL_SELECTION`: Option to hide goal selection. - `DIGITAL_WARRANTY_SUPPORTED`: Digital warranty display. - `DIRECT_DEVICE_SETTINGS_SUPPORTED`: Direct device settings management. **Gym HR Broadcasting** - `ASPEN_SUPPORTED`: Broadcast HR to gym equipment. - `ASPEN_REMOTE_UI_SUPPORTED`: Remote UI for HR sharing. **Privacy & Security** - `FINITE_IMPROBABILITY`: BLE Resolvable Private Address (RPA) privacy. - `DOMAIN_KEY_SYNC`: Domain key synchronization. **BLE Protocol** - `BONDING`: Secure BLE bonding. - `ADVERTISES_SERIAL`: Advertises serial number. - `STATUS_CHARACTERISTIC`: BLE Status Characteristic. - `TRACKER_CHANNEL_CHARACTERISTIC`: BLE Tracker Channel Characteristic. - `PING_CHARACTERISTIC`: BLE Ping Characteristic. **Cellular & Wi-Fi** - `MOBILE_DATA`: LTE cellular support. - `SINGLE_AP_WIFI`: Single AP Wi-Fi. - `MULTI_AP_WIFI`: Multi AP Wi-Fi. - `WIFI_FWUP`: Firmware updates over Wi-Fi. **Data Sync & Transfer** - `APP_SYNC`: Background app sync. - `LIVE_DATA`: Real-time data streaming. - `EVENT_BASED_SYNC_SUPPORTED`: Event-based sync. - `TIME_SERVICE`: Time synchronization service. - `REMOTE_FILE_PROVIDER`: Remote file transfer. - `DIRECT_COMMS_ALARMS`: Direct communication for alarms. - `DIRECT_COMMS_EXERCISE`: Direct communication for exercise. - `DIRECT_COMMS_BATTERY_ALERTS`: Direct communication for battery alerts. **Google Integrations** - `PARROT_TREE_SUPPORTED`: Find My Device support.
|
|
2015
|
+
*/
|
|
2016
|
+
features?: string[] | null;
|
|
2017
|
+
/**
|
|
2018
|
+
* Output only. The time of last sync with the Fitbit mobile application.
|
|
2019
|
+
*/
|
|
2020
|
+
lastSyncTime?: string | null;
|
|
2021
|
+
/**
|
|
2022
|
+
* Output only. Mac ID number of the device.
|
|
2023
|
+
*/
|
|
2024
|
+
macAddress?: string | null;
|
|
2025
|
+
/**
|
|
2026
|
+
* Identifier. The resource name of this Device resource. Format: `users/{user\}/pairedDevices/{paired_device\}` Example: `users/1234567890/pairedDevices/123` or `users/me/pairedDevices/123`
|
|
2027
|
+
*/
|
|
2028
|
+
name?: string | null;
|
|
2029
|
+
}
|
|
1416
2030
|
/**
|
|
1417
2031
|
* Profile details.
|
|
1418
2032
|
*/
|
|
@@ -1463,6 +2077,10 @@ export declare namespace health_v4 {
|
|
|
1463
2077
|
* A reconciled computed or recorded metric.
|
|
1464
2078
|
*/
|
|
1465
2079
|
export interface Schema$ReconciledDataPoint {
|
|
2080
|
+
/**
|
|
2081
|
+
* Data for points in the `active-energy-burned` interval data type collection.
|
|
2082
|
+
*/
|
|
2083
|
+
activeEnergyBurned?: Schema$ActiveEnergyBurned;
|
|
1466
2084
|
/**
|
|
1467
2085
|
* Data for points in the `active-minutes` interval data type collection.
|
|
1468
2086
|
*/
|
|
@@ -1483,10 +2101,18 @@ export declare namespace health_v4 {
|
|
|
1483
2101
|
* Data for points in the `basal-energy-burned` interval data type collection.
|
|
1484
2102
|
*/
|
|
1485
2103
|
basalEnergyBurned?: Schema$BasalEnergyBurned;
|
|
2104
|
+
/**
|
|
2105
|
+
* Data for points in the `blood-glucose` sample data type collection.
|
|
2106
|
+
*/
|
|
2107
|
+
bloodGlucose?: Schema$BloodGlucose;
|
|
1486
2108
|
/**
|
|
1487
2109
|
* Data for points in the `body-fat` sample data type collection.
|
|
1488
2110
|
*/
|
|
1489
2111
|
bodyFat?: Schema$BodyFat;
|
|
2112
|
+
/**
|
|
2113
|
+
* Data for points in the `core-body-temperature` sample data type collection.
|
|
2114
|
+
*/
|
|
2115
|
+
coreBodyTemperature?: Schema$CoreBodyTemperature;
|
|
1490
2116
|
/**
|
|
1491
2117
|
* Data for points in the `daily-heart-rate-variability` daily data type collection.
|
|
1492
2118
|
*/
|
|
@@ -1547,6 +2173,10 @@ export declare namespace health_v4 {
|
|
|
1547
2173
|
* Data for points in the `hydration-log` session data type collection.
|
|
1548
2174
|
*/
|
|
1549
2175
|
hydrationLog?: Schema$HydrationLog;
|
|
2176
|
+
/**
|
|
2177
|
+
* Data for points in the `nutrition-log` session data type collection.
|
|
2178
|
+
*/
|
|
2179
|
+
nutritionLog?: Schema$NutritionLog;
|
|
1550
2180
|
/**
|
|
1551
2181
|
* Data for points in the `oxygen-saturation` sample data type collection.
|
|
1552
2182
|
*/
|
|
@@ -1644,9 +2274,13 @@ export declare namespace health_v4 {
|
|
|
1644
2274
|
beatsPerMinuteMin?: number | null;
|
|
1645
2275
|
}
|
|
1646
2276
|
/**
|
|
1647
|
-
* Value of a rollup for a single physical time interval (aggregation window)
|
|
2277
|
+
* Value of a rollup for a single physical time interval (aggregation window) of reconciled data points from all data sources, excluding those data points that are identified as recorded by wearables in intervals when they were not actually worn.
|
|
1648
2278
|
*/
|
|
1649
2279
|
export interface Schema$RollupDataPoint {
|
|
2280
|
+
/**
|
|
2281
|
+
* Returned by default when rolling up data points from the `active-energy-burned` data type.
|
|
2282
|
+
*/
|
|
2283
|
+
activeEnergyBurned?: Schema$ActiveEnergyBurnedRollupValue;
|
|
1650
2284
|
/**
|
|
1651
2285
|
* Returned by default when rolling up data points from the `active-minutes` data type, or when requested explicitly using the `active-minutes` rollup type identifier.
|
|
1652
2286
|
*/
|
|
@@ -1663,6 +2297,10 @@ export declare namespace health_v4 {
|
|
|
1663
2297
|
* Returned by default when rolling up data points from the `altitude` data type, or when requested explicitly using the `altitude` rollup type identifier.
|
|
1664
2298
|
*/
|
|
1665
2299
|
altitude?: Schema$AltitudeRollupValue;
|
|
2300
|
+
/**
|
|
2301
|
+
* Returned by default when rolling up data points from the `blood-glucose` data type.
|
|
2302
|
+
*/
|
|
2303
|
+
bloodGlucose?: Schema$BloodGlucoseRollupValue;
|
|
1666
2304
|
/**
|
|
1667
2305
|
* Returned by default when rolling up data points from the `body-fat` data type, or when requested explicitly using the `body-fat` rollup type identifier.
|
|
1668
2306
|
*/
|
|
@@ -1671,6 +2309,10 @@ export declare namespace health_v4 {
|
|
|
1671
2309
|
* Returned by default when rolling up data points from the `calories-in-heart-rate-zone` data type, or when requested explicitly using the `calories-in-heart-rate-zone` rollup type identifier.
|
|
1672
2310
|
*/
|
|
1673
2311
|
caloriesInHeartRateZone?: Schema$CaloriesInHeartRateZoneRollupValue;
|
|
2312
|
+
/**
|
|
2313
|
+
* Returned by default when rolling up data points from the `core-body-temperature` data type, or when requested explicitly using the `core-body-temperature` rollup type identifier.
|
|
2314
|
+
*/
|
|
2315
|
+
coreBodyTemperature?: Schema$CoreBodyTemperatureRollupValue;
|
|
1674
2316
|
/**
|
|
1675
2317
|
* Returned by default when rolling up data points from the `distance` data type, or when requested explicitly using the `distance` rollup type identifier.
|
|
1676
2318
|
*/
|
|
@@ -1691,6 +2333,10 @@ export declare namespace health_v4 {
|
|
|
1691
2333
|
* Returned by default when rolling up data points from the `hydration-log` data type, or when requested explicitly using the `hydration-log` rollup type identifier.
|
|
1692
2334
|
*/
|
|
1693
2335
|
hydrationLog?: Schema$HydrationLogRollupValue;
|
|
2336
|
+
/**
|
|
2337
|
+
* Returned by default when rolling up data points from the `nutrition-log` data type, or when requested explicitly using the `nutrition-log` rollup type identifier.
|
|
2338
|
+
*/
|
|
2339
|
+
nutritionLog?: Schema$NutritionLogRollupValue;
|
|
1694
2340
|
/**
|
|
1695
2341
|
* Returned by default when rolling up data points from the `run-vo2-max` data type, or when requested explicitly using the `run-vo2-max` rollup type identifier.
|
|
1696
2342
|
*/
|
|
@@ -1810,6 +2456,23 @@ export declare namespace health_v4 {
|
|
|
1810
2456
|
*/
|
|
1811
2457
|
durationSum?: string | null;
|
|
1812
2458
|
}
|
|
2459
|
+
/**
|
|
2460
|
+
* Represents different properties and information about the serving of a specific food.
|
|
2461
|
+
*/
|
|
2462
|
+
export interface Schema$Serving {
|
|
2463
|
+
/**
|
|
2464
|
+
* Optional. Amount of food consumed, fractional values are supported.
|
|
2465
|
+
*/
|
|
2466
|
+
amount?: number | null;
|
|
2467
|
+
/**
|
|
2468
|
+
* Required. Food measurement unit
|
|
2469
|
+
*/
|
|
2470
|
+
foodMeasurementUnit?: string | null;
|
|
2471
|
+
/**
|
|
2472
|
+
* Output only. Legacy measurement unit for serving size in singular form (e.g. "piece", "gram").
|
|
2473
|
+
*/
|
|
2474
|
+
foodMeasurementUnitDisplayName?: string | null;
|
|
2475
|
+
}
|
|
1813
2476
|
/**
|
|
1814
2477
|
* Represents a time interval of session data point, which bundles multiple observed metrics together.
|
|
1815
2478
|
*/
|
|
@@ -1851,6 +2514,10 @@ export declare namespace health_v4 {
|
|
|
1851
2514
|
* Optional. The measurement unit defined in the user's account settings. Updates to this field are currently not supported.
|
|
1852
2515
|
*/
|
|
1853
2516
|
distanceUnit?: string | null;
|
|
2517
|
+
/**
|
|
2518
|
+
* Output only. The food language code derived from the user's food database. Possible values: `'en-US'`, `'en-GB'`, `'de-DE'`, `'es-ES'`, `'fr-FR'`, `'zh-CN'`, `'zh-TW'`, `'ja-JP'`, `'en-AU'`, `'en-CA'`, `'it-IT'`, `'ko-KR'`, `'es-MX'`, `'en-IN'`, `'en-SG'`, `'en-PH'`, `'en-IE'`, `'fr-CA'`. Updates to this field are currently not supported.
|
|
2519
|
+
*/
|
|
2520
|
+
foodLanguageCode?: string | null;
|
|
1854
2521
|
/**
|
|
1855
2522
|
* Optional. The measurement unit defined in the user's account settings.
|
|
1856
2523
|
*/
|
|
@@ -2153,7 +2820,7 @@ export declare namespace health_v4 {
|
|
|
2153
2820
|
*/
|
|
2154
2821
|
export interface Schema$SubscriberConfig {
|
|
2155
2822
|
/**
|
|
2156
|
-
* Required.
|
|
2823
|
+
* Required. See [Google Health API data types](https://developers.google.com/health/data-types) for the list of supported data types. Values should be in kebab-case.
|
|
2157
2824
|
*/
|
|
2158
2825
|
dataTypes?: string[] | null;
|
|
2159
2826
|
/**
|
|
@@ -2161,6 +2828,23 @@ export declare namespace health_v4 {
|
|
|
2161
2828
|
*/
|
|
2162
2829
|
subscriptionCreatePolicy?: string | null;
|
|
2163
2830
|
}
|
|
2831
|
+
/**
|
|
2832
|
+
* A subscription to a data collection for a specific user, to be delivered to a subscriber.
|
|
2833
|
+
*/
|
|
2834
|
+
export interface Schema$Subscription {
|
|
2835
|
+
/**
|
|
2836
|
+
* Optional. Data types subscribed to. A subscriber will only receive notifications for data types that are declared here. A subscription can only subscribe to the data types of the subscriber. Supported data types are: "altitude", "distance", "floors", "sleep", "steps", "weight".
|
|
2837
|
+
*/
|
|
2838
|
+
dataTypes?: string[] | null;
|
|
2839
|
+
/**
|
|
2840
|
+
* Identifier. The resource name of the Subscription. Format: `projects/{project\}/subscribers/{subscriber\}/subscriptions/{subscription\}` Example: `projects/my-project/subscribers/my-subscriber-123/subscriptions/my-subscription-456` The {project\} ID is mandatory (6-30 characters, matching /a-z{6,30\}/) The {subscriber\} ID is user-settable (4-36 characters, matching /[a-z]([a-z0-9-]{2,34\}[a-z0-9])/) if provided during creation, or system-generated otherwise. The {subscription\} ID is user-settable (4-36 chars, matching /[a-z]([a-z0-9-]{2,34\}[a-z0-9])/) or system-generated otherwise.
|
|
2841
|
+
*/
|
|
2842
|
+
name?: string | null;
|
|
2843
|
+
/**
|
|
2844
|
+
* Immutable. The resource name of the user for whom this subscription is active. Format: `users/{user\}` where `{user\}` is the public `healthUserId` as returned by the `GetIdentity` action in the profile PAPI (see `google.devicesandservices.health.v4main.HealthProfileService.GetIdentity`).
|
|
2845
|
+
*/
|
|
2846
|
+
user?: string | null;
|
|
2847
|
+
}
|
|
2164
2848
|
/**
|
|
2165
2849
|
* Swim lengths data over the time interval.
|
|
2166
2850
|
*/
|
|
@@ -2312,7 +2996,7 @@ export declare namespace health_v4 {
|
|
|
2312
2996
|
*/
|
|
2313
2997
|
milliliters?: number | null;
|
|
2314
2998
|
/**
|
|
2315
|
-
* Optional. Value representing the user provided unit.
|
|
2999
|
+
* Optional. Value representing the user provided unit, used only for user-facing input and display purposes. In the API format, all volume quantities are converted to milliliters.
|
|
2316
3000
|
*/
|
|
2317
3001
|
userProvidedUnit?: string | null;
|
|
2318
3002
|
}
|
|
@@ -2346,6 +3030,32 @@ export declare namespace health_v4 {
|
|
|
2346
3030
|
*/
|
|
2347
3031
|
weightGrams?: number | null;
|
|
2348
3032
|
}
|
|
3033
|
+
/**
|
|
3034
|
+
* Represents the weight quantity.
|
|
3035
|
+
*/
|
|
3036
|
+
export interface Schema$WeightQuantity {
|
|
3037
|
+
/**
|
|
3038
|
+
* Required. Value representing the weight in grams.
|
|
3039
|
+
*/
|
|
3040
|
+
grams?: number | null;
|
|
3041
|
+
/**
|
|
3042
|
+
* Optional. Value representing the user provided unit.
|
|
3043
|
+
*/
|
|
3044
|
+
userProvidedUnit?: string | null;
|
|
3045
|
+
}
|
|
3046
|
+
/**
|
|
3047
|
+
* Rollup for the weight.
|
|
3048
|
+
*/
|
|
3049
|
+
export interface Schema$WeightQuantityRollup {
|
|
3050
|
+
/**
|
|
3051
|
+
* Required. The sum of the weight in grams.
|
|
3052
|
+
*/
|
|
3053
|
+
gramsSum?: number | null;
|
|
3054
|
+
/**
|
|
3055
|
+
* Optional. The user provided unit on the last element.
|
|
3056
|
+
*/
|
|
3057
|
+
userProvidedUnitLast?: string | null;
|
|
3058
|
+
}
|
|
2349
3059
|
/**
|
|
2350
3060
|
* Represents the result of the rollup of the weight data type.
|
|
2351
3061
|
*/
|
|
@@ -2362,6 +3072,7 @@ export declare namespace health_v4 {
|
|
|
2362
3072
|
}
|
|
2363
3073
|
export class Resource$Projects$Subscribers {
|
|
2364
3074
|
context: APIRequestContext;
|
|
3075
|
+
subscriptions: Resource$Projects$Subscribers$Subscriptions;
|
|
2365
3076
|
constructor(context: APIRequestContext);
|
|
2366
3077
|
/**
|
|
2367
3078
|
* Registers a new subscriber endpoint to receive notifications. A subscriber represents an application or service that wishes to receive data change notifications for users who have granted consent. **Endpoint Verification:** For a subscriber to be successfully created, the provided `endpoint_uri` must be a valid HTTPS endpoint and must pass an automated verification check. The backend will send two HTTP POST requests to the `endpoint_uri`: 1. **Verification with Authorization:** * **Headers:** Includes `Content-Type: application/json` and `Authorization` (with the exact value from `CreateSubscriberPayload.endpoint_authorization.secret`). * **Body:** `{"type": "verification"\}` * **Expected Response:** HTTP `201 Created`. 2. **Verification without Authorization:** * **Headers:** Includes `Content-Type: application/json`. The `Authorization` header is OMITTED. * **Body:** `{"type": "verification"\}` * **Expected Response:** HTTP `401 Unauthorized` or `403 Forbidden`. Both tests must pass for the subscriber creation to succeed. If verification fails, the operation will not be completed and an error will be returned. This process ensures the endpoint is reachable and correctly validates the `Authorization` header.
|
|
@@ -2440,7 +3151,348 @@ export declare namespace health_v4 {
|
|
|
2440
3151
|
create(params: Params$Resource$Projects$Subscribers$Create, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2441
3152
|
create(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2442
3153
|
/**
|
|
2443
|
-
* Deletes a subscriber registration. This will stop all notifications to the subscriber's endpoint.
|
|
3154
|
+
* Deletes a subscriber registration. This will stop all notifications to the subscriber's endpoint.
|
|
3155
|
+
* @example
|
|
3156
|
+
* ```js
|
|
3157
|
+
* // Before running the sample:
|
|
3158
|
+
* // - Enable the API at:
|
|
3159
|
+
* // https://console.developers.google.com/apis/api/health.googleapis.com
|
|
3160
|
+
* // - Login into gcloud by running:
|
|
3161
|
+
* // ```sh
|
|
3162
|
+
* // $ gcloud auth application-default login
|
|
3163
|
+
* // ```
|
|
3164
|
+
* // - Install the npm module by running:
|
|
3165
|
+
* // ```sh
|
|
3166
|
+
* // $ npm install googleapis
|
|
3167
|
+
* // ```
|
|
3168
|
+
*
|
|
3169
|
+
* const {google} = require('googleapis');
|
|
3170
|
+
* const health = google.health('v4');
|
|
3171
|
+
*
|
|
3172
|
+
* async function main() {
|
|
3173
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3174
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3175
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3176
|
+
* });
|
|
3177
|
+
*
|
|
3178
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3179
|
+
* const authClient = await auth.getClient();
|
|
3180
|
+
* google.options({auth: authClient});
|
|
3181
|
+
*
|
|
3182
|
+
* // Do the magic
|
|
3183
|
+
* const res = await health.projects.subscribers.delete({
|
|
3184
|
+
* // Optional. If set to true, any child resources (e.g., subscriptions) will also be deleted. If false (default) and child resources exist, the request will fail.
|
|
3185
|
+
* force: 'placeholder-value',
|
|
3186
|
+
* // Required. The name of the subscriber to delete. Format: projects/{project\}/subscribers/{subscriber\} Example: projects/my-project/subscribers/my-subscriber-123 The {subscriber\} ID is user-settable (4-36 characters, matching /[a-z]([a-z0-9-]{2,34\}[a-z0-9])/) or system-generated if not provided during creation.
|
|
3187
|
+
* name: 'projects/my-project/subscribers/my-subscriber',
|
|
3188
|
+
* });
|
|
3189
|
+
* console.log(res.data);
|
|
3190
|
+
*
|
|
3191
|
+
* // Example response
|
|
3192
|
+
* // {
|
|
3193
|
+
* // "done": false,
|
|
3194
|
+
* // "error": {},
|
|
3195
|
+
* // "metadata": {},
|
|
3196
|
+
* // "name": "my_name",
|
|
3197
|
+
* // "response": {}
|
|
3198
|
+
* // }
|
|
3199
|
+
* }
|
|
3200
|
+
*
|
|
3201
|
+
* main().catch(e => {
|
|
3202
|
+
* console.error(e);
|
|
3203
|
+
* throw e;
|
|
3204
|
+
* });
|
|
3205
|
+
*
|
|
3206
|
+
* ```
|
|
3207
|
+
*
|
|
3208
|
+
* @param params - Parameters for request
|
|
3209
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
3210
|
+
* @param callback - Optional callback that handles the response.
|
|
3211
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
3212
|
+
*/
|
|
3213
|
+
delete(params: Params$Resource$Projects$Subscribers$Delete, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
3214
|
+
delete(params?: Params$Resource$Projects$Subscribers$Delete, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
3215
|
+
delete(params: Params$Resource$Projects$Subscribers$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
3216
|
+
delete(params: Params$Resource$Projects$Subscribers$Delete, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
3217
|
+
delete(params: Params$Resource$Projects$Subscribers$Delete, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
3218
|
+
delete(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
3219
|
+
/**
|
|
3220
|
+
* Lists all subscribers registered within the owned Google Cloud Project.
|
|
3221
|
+
* @example
|
|
3222
|
+
* ```js
|
|
3223
|
+
* // Before running the sample:
|
|
3224
|
+
* // - Enable the API at:
|
|
3225
|
+
* // https://console.developers.google.com/apis/api/health.googleapis.com
|
|
3226
|
+
* // - Login into gcloud by running:
|
|
3227
|
+
* // ```sh
|
|
3228
|
+
* // $ gcloud auth application-default login
|
|
3229
|
+
* // ```
|
|
3230
|
+
* // - Install the npm module by running:
|
|
3231
|
+
* // ```sh
|
|
3232
|
+
* // $ npm install googleapis
|
|
3233
|
+
* // ```
|
|
3234
|
+
*
|
|
3235
|
+
* const {google} = require('googleapis');
|
|
3236
|
+
* const health = google.health('v4');
|
|
3237
|
+
*
|
|
3238
|
+
* async function main() {
|
|
3239
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3240
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3241
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3242
|
+
* });
|
|
3243
|
+
*
|
|
3244
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3245
|
+
* const authClient = await auth.getClient();
|
|
3246
|
+
* google.options({auth: authClient});
|
|
3247
|
+
*
|
|
3248
|
+
* // Do the magic
|
|
3249
|
+
* const res = await health.projects.subscribers.list({
|
|
3250
|
+
* // Optional. The maximum number of subscribers to return. The service may return fewer than this value. If unspecified, at most 50 subscribers will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
|
|
3251
|
+
* pageSize: 'placeholder-value',
|
|
3252
|
+
* // Optional. A page token, received from a previous `ListSubscribers` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListSubscribers` must match the call that provided the page token.
|
|
3253
|
+
* pageToken: 'placeholder-value',
|
|
3254
|
+
* // Required. The parent, which owns this collection of subscribers. Format: projects/{project\}
|
|
3255
|
+
* parent: 'projects/my-project',
|
|
3256
|
+
* });
|
|
3257
|
+
* console.log(res.data);
|
|
3258
|
+
*
|
|
3259
|
+
* // Example response
|
|
3260
|
+
* // {
|
|
3261
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
3262
|
+
* // "subscribers": [],
|
|
3263
|
+
* // "totalSize": 0
|
|
3264
|
+
* // }
|
|
3265
|
+
* }
|
|
3266
|
+
*
|
|
3267
|
+
* main().catch(e => {
|
|
3268
|
+
* console.error(e);
|
|
3269
|
+
* throw e;
|
|
3270
|
+
* });
|
|
3271
|
+
*
|
|
3272
|
+
* ```
|
|
3273
|
+
*
|
|
3274
|
+
* @param params - Parameters for request
|
|
3275
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
3276
|
+
* @param callback - Optional callback that handles the response.
|
|
3277
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
3278
|
+
*/
|
|
3279
|
+
list(params: Params$Resource$Projects$Subscribers$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
3280
|
+
list(params?: Params$Resource$Projects$Subscribers$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ListSubscribersResponse>>;
|
|
3281
|
+
list(params: Params$Resource$Projects$Subscribers$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
3282
|
+
list(params: Params$Resource$Projects$Subscribers$List, options: MethodOptions | BodyResponseCallback<Schema$ListSubscribersResponse>, callback: BodyResponseCallback<Schema$ListSubscribersResponse>): void;
|
|
3283
|
+
list(params: Params$Resource$Projects$Subscribers$List, callback: BodyResponseCallback<Schema$ListSubscribersResponse>): void;
|
|
3284
|
+
list(callback: BodyResponseCallback<Schema$ListSubscribersResponse>): void;
|
|
3285
|
+
/**
|
|
3286
|
+
* Updates the configuration of an existing subscriber, such as the endpoint URI or the data types it's interested in. **Endpoint Verification:** If the `endpoint_uri` or `endpoint_authorization` field is included in the `update_mask`, the backend will re-verify the endpoint. The verification process is the same as described in `CreateSubscriber`: 1. **Verification with Authorization:** POST to the new or existing `endpoint_uri` with the new or existing `Authorization` secret. Expects HTTP `201 Created`. 2. **Verification without Authorization:** POST to the `endpoint_uri` without the `Authorization` header. Expects HTTP `401 Unauthorized` or `403 Forbidden`. Both tests must pass using the potentially updated values for the subscriber update to succeed. If verification fails, the update will not be applied, and an error will be returned.
|
|
3287
|
+
* @example
|
|
3288
|
+
* ```js
|
|
3289
|
+
* // Before running the sample:
|
|
3290
|
+
* // - Enable the API at:
|
|
3291
|
+
* // https://console.developers.google.com/apis/api/health.googleapis.com
|
|
3292
|
+
* // - Login into gcloud by running:
|
|
3293
|
+
* // ```sh
|
|
3294
|
+
* // $ gcloud auth application-default login
|
|
3295
|
+
* // ```
|
|
3296
|
+
* // - Install the npm module by running:
|
|
3297
|
+
* // ```sh
|
|
3298
|
+
* // $ npm install googleapis
|
|
3299
|
+
* // ```
|
|
3300
|
+
*
|
|
3301
|
+
* const {google} = require('googleapis');
|
|
3302
|
+
* const health = google.health('v4');
|
|
3303
|
+
*
|
|
3304
|
+
* async function main() {
|
|
3305
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3306
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3307
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3308
|
+
* });
|
|
3309
|
+
*
|
|
3310
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3311
|
+
* const authClient = await auth.getClient();
|
|
3312
|
+
* google.options({auth: authClient});
|
|
3313
|
+
*
|
|
3314
|
+
* // Do the magic
|
|
3315
|
+
* const res = await health.projects.subscribers.patch({
|
|
3316
|
+
* // Identifier. The resource name of the Subscriber. Format: projects/{project\}/subscribers/{subscriber\} The {project\} ID is a Google Cloud Project ID or Project Number. The {subscriber\} ID is user-settable (4-36 characters, matching /[a-z]([a-z0-9-]{2,34\}[a-z0-9])/) if provided during creation, or system-generated otherwise (e.g., a UUID). Example (User-settable subscriber ID): projects/my-project/subscribers/my-sub-123 Example (System-generated subscriber ID): projects/my-project/subscribers/a1b2c3d4-e5f6-7890-1234-567890abcdef
|
|
3317
|
+
* name: 'projects/my-project/subscribers/my-subscriber',
|
|
3318
|
+
* // Optional. A field mask that specifies which fields of the Subscriber message are to be updated. This allows for partial updates. Supported fields: - endpoint_uri - subscriber_configs - endpoint_authorization
|
|
3319
|
+
* updateMask: 'placeholder-value',
|
|
3320
|
+
*
|
|
3321
|
+
* // Request body metadata
|
|
3322
|
+
* requestBody: {
|
|
3323
|
+
* // request body parameters
|
|
3324
|
+
* // {
|
|
3325
|
+
* // "createTime": "my_createTime",
|
|
3326
|
+
* // "endpointAuthorization": {},
|
|
3327
|
+
* // "endpointUri": "my_endpointUri",
|
|
3328
|
+
* // "name": "my_name",
|
|
3329
|
+
* // "state": "my_state",
|
|
3330
|
+
* // "subscriberConfigs": [],
|
|
3331
|
+
* // "updateTime": "my_updateTime"
|
|
3332
|
+
* // }
|
|
3333
|
+
* },
|
|
3334
|
+
* });
|
|
3335
|
+
* console.log(res.data);
|
|
3336
|
+
*
|
|
3337
|
+
* // Example response
|
|
3338
|
+
* // {
|
|
3339
|
+
* // "done": false,
|
|
3340
|
+
* // "error": {},
|
|
3341
|
+
* // "metadata": {},
|
|
3342
|
+
* // "name": "my_name",
|
|
3343
|
+
* // "response": {}
|
|
3344
|
+
* // }
|
|
3345
|
+
* }
|
|
3346
|
+
*
|
|
3347
|
+
* main().catch(e => {
|
|
3348
|
+
* console.error(e);
|
|
3349
|
+
* throw e;
|
|
3350
|
+
* });
|
|
3351
|
+
*
|
|
3352
|
+
* ```
|
|
3353
|
+
*
|
|
3354
|
+
* @param params - Parameters for request
|
|
3355
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
3356
|
+
* @param callback - Optional callback that handles the response.
|
|
3357
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
3358
|
+
*/
|
|
3359
|
+
patch(params: Params$Resource$Projects$Subscribers$Patch, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
3360
|
+
patch(params?: Params$Resource$Projects$Subscribers$Patch, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
3361
|
+
patch(params: Params$Resource$Projects$Subscribers$Patch, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
3362
|
+
patch(params: Params$Resource$Projects$Subscribers$Patch, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
3363
|
+
patch(params: Params$Resource$Projects$Subscribers$Patch, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
3364
|
+
patch(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
3365
|
+
}
|
|
3366
|
+
export interface Params$Resource$Projects$Subscribers$Create extends StandardParameters {
|
|
3367
|
+
/**
|
|
3368
|
+
* Required. The parent resource where this subscriber will be created. Format: projects/{project\} Example: projects/my-project-123
|
|
3369
|
+
*/
|
|
3370
|
+
parent?: string;
|
|
3371
|
+
/**
|
|
3372
|
+
* Optional. The ID to use for the subscriber, which will become the final component of the subscriber's resource name. This value should be 4-36 characters, and valid characters are /[a-z]([a-z0-9-]{2,34\}[a-z0-9])/.
|
|
3373
|
+
*/
|
|
3374
|
+
subscriberId?: string;
|
|
3375
|
+
/**
|
|
3376
|
+
* Request body metadata
|
|
3377
|
+
*/
|
|
3378
|
+
requestBody?: Schema$CreateSubscriberPayload;
|
|
3379
|
+
}
|
|
3380
|
+
export interface Params$Resource$Projects$Subscribers$Delete extends StandardParameters {
|
|
3381
|
+
/**
|
|
3382
|
+
* Optional. If set to true, any child resources (e.g., subscriptions) will also be deleted. If false (default) and child resources exist, the request will fail.
|
|
3383
|
+
*/
|
|
3384
|
+
force?: boolean;
|
|
3385
|
+
/**
|
|
3386
|
+
* Required. The name of the subscriber to delete. Format: projects/{project\}/subscribers/{subscriber\} Example: projects/my-project/subscribers/my-subscriber-123 The {subscriber\} ID is user-settable (4-36 characters, matching /[a-z]([a-z0-9-]{2,34\}[a-z0-9])/) or system-generated if not provided during creation.
|
|
3387
|
+
*/
|
|
3388
|
+
name?: string;
|
|
3389
|
+
}
|
|
3390
|
+
export interface Params$Resource$Projects$Subscribers$List extends StandardParameters {
|
|
3391
|
+
/**
|
|
3392
|
+
* Optional. The maximum number of subscribers to return. The service may return fewer than this value. If unspecified, at most 50 subscribers will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
|
|
3393
|
+
*/
|
|
3394
|
+
pageSize?: number;
|
|
3395
|
+
/**
|
|
3396
|
+
* Optional. A page token, received from a previous `ListSubscribers` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListSubscribers` must match the call that provided the page token.
|
|
3397
|
+
*/
|
|
3398
|
+
pageToken?: string;
|
|
3399
|
+
/**
|
|
3400
|
+
* Required. The parent, which owns this collection of subscribers. Format: projects/{project\}
|
|
3401
|
+
*/
|
|
3402
|
+
parent?: string;
|
|
3403
|
+
}
|
|
3404
|
+
export interface Params$Resource$Projects$Subscribers$Patch extends StandardParameters {
|
|
3405
|
+
/**
|
|
3406
|
+
* Identifier. The resource name of the Subscriber. Format: projects/{project\}/subscribers/{subscriber\} The {project\} ID is a Google Cloud Project ID or Project Number. The {subscriber\} ID is user-settable (4-36 characters, matching /[a-z]([a-z0-9-]{2,34\}[a-z0-9])/) if provided during creation, or system-generated otherwise (e.g., a UUID). Example (User-settable subscriber ID): projects/my-project/subscribers/my-sub-123 Example (System-generated subscriber ID): projects/my-project/subscribers/a1b2c3d4-e5f6-7890-1234-567890abcdef
|
|
3407
|
+
*/
|
|
3408
|
+
name?: string;
|
|
3409
|
+
/**
|
|
3410
|
+
* Optional. A field mask that specifies which fields of the Subscriber message are to be updated. This allows for partial updates. Supported fields: - endpoint_uri - subscriber_configs - endpoint_authorization
|
|
3411
|
+
*/
|
|
3412
|
+
updateMask?: string;
|
|
3413
|
+
/**
|
|
3414
|
+
* Request body metadata
|
|
3415
|
+
*/
|
|
3416
|
+
requestBody?: Schema$Subscriber;
|
|
3417
|
+
}
|
|
3418
|
+
export class Resource$Projects$Subscribers$Subscriptions {
|
|
3419
|
+
context: APIRequestContext;
|
|
3420
|
+
constructor(context: APIRequestContext);
|
|
3421
|
+
/**
|
|
3422
|
+
* Creates a subscription for a specific user to a specific subscriber. This method requires the subscriber to have a `SubscriptionCreatePolicy` set to `MANUAL` for the given data types.
|
|
3423
|
+
* @example
|
|
3424
|
+
* ```js
|
|
3425
|
+
* // Before running the sample:
|
|
3426
|
+
* // - Enable the API at:
|
|
3427
|
+
* // https://console.developers.google.com/apis/api/health.googleapis.com
|
|
3428
|
+
* // - Login into gcloud by running:
|
|
3429
|
+
* // ```sh
|
|
3430
|
+
* // $ gcloud auth application-default login
|
|
3431
|
+
* // ```
|
|
3432
|
+
* // - Install the npm module by running:
|
|
3433
|
+
* // ```sh
|
|
3434
|
+
* // $ npm install googleapis
|
|
3435
|
+
* // ```
|
|
3436
|
+
*
|
|
3437
|
+
* const {google} = require('googleapis');
|
|
3438
|
+
* const health = google.health('v4');
|
|
3439
|
+
*
|
|
3440
|
+
* async function main() {
|
|
3441
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3442
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3443
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3444
|
+
* });
|
|
3445
|
+
*
|
|
3446
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3447
|
+
* const authClient = await auth.getClient();
|
|
3448
|
+
* google.options({auth: authClient});
|
|
3449
|
+
*
|
|
3450
|
+
* // Do the magic
|
|
3451
|
+
* const res = await health.projects.subscribers.subscriptions.create({
|
|
3452
|
+
* // Required. The parent subscriber. Format: projects/{project\}/subscribers/{subscriber\} The {subscriber\} ID is user-settable (4-36 characters, matching /[a-z]([a-z0-9-]{2,34\}[a-z0-9])/) if provided during creation, or system-generated otherwise.
|
|
3453
|
+
* parent: 'projects/my-project/subscribers/my-subscriber',
|
|
3454
|
+
* // Optional. The {subscription_id\} is user-settable (4-36 chars, matching /[a-z]([a-z0-9-]{2,34\}[a-z0-9])/) or system-generated otherwise. If provided, the ID must be unique within the parent subscriber.
|
|
3455
|
+
* subscriptionId: 'placeholder-value',
|
|
3456
|
+
*
|
|
3457
|
+
* // Request body metadata
|
|
3458
|
+
* requestBody: {
|
|
3459
|
+
* // request body parameters
|
|
3460
|
+
* // {
|
|
3461
|
+
* // "dataTypes": [],
|
|
3462
|
+
* // "user": "my_user"
|
|
3463
|
+
* // }
|
|
3464
|
+
* },
|
|
3465
|
+
* });
|
|
3466
|
+
* console.log(res.data);
|
|
3467
|
+
*
|
|
3468
|
+
* // Example response
|
|
3469
|
+
* // {
|
|
3470
|
+
* // "dataTypes": [],
|
|
3471
|
+
* // "name": "my_name",
|
|
3472
|
+
* // "user": "my_user"
|
|
3473
|
+
* // }
|
|
3474
|
+
* }
|
|
3475
|
+
*
|
|
3476
|
+
* main().catch(e => {
|
|
3477
|
+
* console.error(e);
|
|
3478
|
+
* throw e;
|
|
3479
|
+
* });
|
|
3480
|
+
*
|
|
3481
|
+
* ```
|
|
3482
|
+
*
|
|
3483
|
+
* @param params - Parameters for request
|
|
3484
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
3485
|
+
* @param callback - Optional callback that handles the response.
|
|
3486
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
3487
|
+
*/
|
|
3488
|
+
create(params: Params$Resource$Projects$Subscribers$Subscriptions$Create, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
3489
|
+
create(params?: Params$Resource$Projects$Subscribers$Subscriptions$Create, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Subscription>>;
|
|
3490
|
+
create(params: Params$Resource$Projects$Subscribers$Subscriptions$Create, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
3491
|
+
create(params: Params$Resource$Projects$Subscribers$Subscriptions$Create, options: MethodOptions | BodyResponseCallback<Schema$Subscription>, callback: BodyResponseCallback<Schema$Subscription>): void;
|
|
3492
|
+
create(params: Params$Resource$Projects$Subscribers$Subscriptions$Create, callback: BodyResponseCallback<Schema$Subscription>): void;
|
|
3493
|
+
create(callback: BodyResponseCallback<Schema$Subscription>): void;
|
|
3494
|
+
/**
|
|
3495
|
+
* Deletes a specific user subscription, stopping notifications for this user to this subscriber.
|
|
2444
3496
|
* @example
|
|
2445
3497
|
* ```js
|
|
2446
3498
|
* // Before running the sample:
|
|
@@ -2469,22 +3521,14 @@ export declare namespace health_v4 {
|
|
|
2469
3521
|
* google.options({auth: authClient});
|
|
2470
3522
|
*
|
|
2471
3523
|
* // Do the magic
|
|
2472
|
-
* const res = await health.projects.subscribers.delete({
|
|
2473
|
-
* //
|
|
2474
|
-
*
|
|
2475
|
-
* // Required. The name of the subscriber to delete. Format: projects/{project\}/subscribers/{subscriber\} Example: projects/my-project/subscribers/my-subscriber-123 The {subscriber\} ID is user-settable (4-36 characters, matching /[a-z]([a-z0-9-]{2,34\}[a-z0-9])/) or system-generated if not provided during creation.
|
|
2476
|
-
* name: 'projects/my-project/subscribers/my-subscriber',
|
|
3524
|
+
* const res = await health.projects.subscribers.subscriptions.delete({
|
|
3525
|
+
* // Required. The resource name of the subscription to delete. Format: `projects/{project\}/subscribers/{subscriber\}/subscriptions/{subscription\}` Example: `projects/my-project/subscribers/my-subscriber-123/subscriptions/my-subscription-456` The {subscriber\} ID is user-settable (4-36 characters, matching /[a-z]([a-z0-9-]{2,34\}[a-z0-9])/) if provided during creation, or system-generated otherwise. The {subscription\} ID is user-settable (4-36 characters, matching /[a-z]([a-z0-9-]{2,34\}[a-z0-9])/) or system-generated if not provided during creation.
|
|
3526
|
+
* name: 'projects/my-project/subscribers/my-subscriber/subscriptions/my-subscription',
|
|
2477
3527
|
* });
|
|
2478
3528
|
* console.log(res.data);
|
|
2479
3529
|
*
|
|
2480
3530
|
* // Example response
|
|
2481
|
-
* // {
|
|
2482
|
-
* // "done": false,
|
|
2483
|
-
* // "error": {},
|
|
2484
|
-
* // "metadata": {},
|
|
2485
|
-
* // "name": "my_name",
|
|
2486
|
-
* // "response": {}
|
|
2487
|
-
* // }
|
|
3531
|
+
* // {}
|
|
2488
3532
|
* }
|
|
2489
3533
|
*
|
|
2490
3534
|
* main().catch(e => {
|
|
@@ -2499,14 +3543,14 @@ export declare namespace health_v4 {
|
|
|
2499
3543
|
* @param callback - Optional callback that handles the response.
|
|
2500
3544
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2501
3545
|
*/
|
|
2502
|
-
delete(params: Params$Resource$Projects$Subscribers$Delete, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
2503
|
-
delete(params?: Params$Resource$Projects$Subscribers$Delete, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$
|
|
2504
|
-
delete(params: Params$Resource$Projects$Subscribers$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
2505
|
-
delete(params: Params$Resource$Projects$Subscribers$Delete, options: MethodOptions | BodyResponseCallback<Schema$
|
|
2506
|
-
delete(params: Params$Resource$Projects$Subscribers$Delete, callback: BodyResponseCallback<Schema$
|
|
2507
|
-
delete(callback: BodyResponseCallback<Schema$
|
|
3546
|
+
delete(params: Params$Resource$Projects$Subscribers$Subscriptions$Delete, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
3547
|
+
delete(params?: Params$Resource$Projects$Subscribers$Subscriptions$Delete, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
|
|
3548
|
+
delete(params: Params$Resource$Projects$Subscribers$Subscriptions$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
3549
|
+
delete(params: Params$Resource$Projects$Subscribers$Subscriptions$Delete, options: MethodOptions | BodyResponseCallback<Schema$Empty>, callback: BodyResponseCallback<Schema$Empty>): void;
|
|
3550
|
+
delete(params: Params$Resource$Projects$Subscribers$Subscriptions$Delete, callback: BodyResponseCallback<Schema$Empty>): void;
|
|
3551
|
+
delete(callback: BodyResponseCallback<Schema$Empty>): void;
|
|
2508
3552
|
/**
|
|
2509
|
-
* Lists all
|
|
3553
|
+
* Lists all active subscriptions for a given subscriber. This can be filtered, for example, by user or data type.
|
|
2510
3554
|
* @example
|
|
2511
3555
|
* ```js
|
|
2512
3556
|
* // Before running the sample:
|
|
@@ -2535,21 +3579,22 @@ export declare namespace health_v4 {
|
|
|
2535
3579
|
* google.options({auth: authClient});
|
|
2536
3580
|
*
|
|
2537
3581
|
* // Do the magic
|
|
2538
|
-
* const res = await health.projects.subscribers.list({
|
|
2539
|
-
* // Optional.
|
|
3582
|
+
* const res = await health.projects.subscribers.subscriptions.list({
|
|
3583
|
+
* // Optional. A filter to apply to the list of subscriptions. The filter syntax is described in https://google.aip.dev/160. The filter can be applied to the following fields: - `user` - `data_type` The `user` identifier (e.g., `user1` in `users/user1`) refers to the public `healthUserId` Example: user = "users/user1" Example: user = "users/user1" OR user = "users/user2" Example: user = "users/user1" AND (data_type = "sleep" OR data_type = "weight")
|
|
3584
|
+
* filter: 'placeholder-value',
|
|
3585
|
+
* // Optional. The maximum number of subscriptions to return. The service may return fewer than this value. If unspecified, at most 50 subscriptions will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
|
|
2540
3586
|
* pageSize: 'placeholder-value',
|
|
2541
|
-
* // Optional. A page token, received from a previous `
|
|
3587
|
+
* // Optional. A page token, received from a previous `ListSubscriptions` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListSubscriptions` must match the call that provided the page token.
|
|
2542
3588
|
* pageToken: 'placeholder-value',
|
|
2543
|
-
* // Required. The parent
|
|
2544
|
-
* parent: 'projects/my-project',
|
|
3589
|
+
* // Required. The parent subscriber. Format: projects/{project\}/subscribers/{subscriber\} The {subscriber\} ID is user-settable (4-36 characters, matching /[a-z]([a-z0-9-]{2,34\}[a-z0-9])/) if provided during creation, or system-generated otherwise.
|
|
3590
|
+
* parent: 'projects/my-project/subscribers/my-subscriber',
|
|
2545
3591
|
* });
|
|
2546
3592
|
* console.log(res.data);
|
|
2547
3593
|
*
|
|
2548
3594
|
* // Example response
|
|
2549
3595
|
* // {
|
|
2550
3596
|
* // "nextPageToken": "my_nextPageToken",
|
|
2551
|
-
* // "
|
|
2552
|
-
* // "totalSize": 0
|
|
3597
|
+
* // "subscriptions": []
|
|
2553
3598
|
* // }
|
|
2554
3599
|
* }
|
|
2555
3600
|
*
|
|
@@ -2565,14 +3610,14 @@ export declare namespace health_v4 {
|
|
|
2565
3610
|
* @param callback - Optional callback that handles the response.
|
|
2566
3611
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2567
3612
|
*/
|
|
2568
|
-
list(params: Params$Resource$Projects$Subscribers$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
2569
|
-
list(params?: Params$Resource$Projects$Subscribers$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$
|
|
2570
|
-
list(params: Params$Resource$Projects$Subscribers$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
2571
|
-
list(params: Params$Resource$Projects$Subscribers$List, options: MethodOptions | BodyResponseCallback<Schema$
|
|
2572
|
-
list(params: Params$Resource$Projects$Subscribers$List, callback: BodyResponseCallback<Schema$
|
|
2573
|
-
list(callback: BodyResponseCallback<Schema$
|
|
3613
|
+
list(params: Params$Resource$Projects$Subscribers$Subscriptions$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
3614
|
+
list(params?: Params$Resource$Projects$Subscribers$Subscriptions$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ListSubscriptionsResponse>>;
|
|
3615
|
+
list(params: Params$Resource$Projects$Subscribers$Subscriptions$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
3616
|
+
list(params: Params$Resource$Projects$Subscribers$Subscriptions$List, options: MethodOptions | BodyResponseCallback<Schema$ListSubscriptionsResponse>, callback: BodyResponseCallback<Schema$ListSubscriptionsResponse>): void;
|
|
3617
|
+
list(params: Params$Resource$Projects$Subscribers$Subscriptions$List, callback: BodyResponseCallback<Schema$ListSubscriptionsResponse>): void;
|
|
3618
|
+
list(callback: BodyResponseCallback<Schema$ListSubscriptionsResponse>): void;
|
|
2574
3619
|
/**
|
|
2575
|
-
* Updates the
|
|
3620
|
+
* Updates the data types for an existing user subscription.
|
|
2576
3621
|
* @example
|
|
2577
3622
|
* ```js
|
|
2578
3623
|
* // Before running the sample:
|
|
@@ -2601,23 +3646,19 @@ export declare namespace health_v4 {
|
|
|
2601
3646
|
* google.options({auth: authClient});
|
|
2602
3647
|
*
|
|
2603
3648
|
* // Do the magic
|
|
2604
|
-
* const res = await health.projects.subscribers.patch({
|
|
2605
|
-
* // Identifier. The resource name of the
|
|
2606
|
-
* name: 'projects/my-project/subscribers/my-subscriber',
|
|
2607
|
-
* // Optional.
|
|
3649
|
+
* const res = await health.projects.subscribers.subscriptions.patch({
|
|
3650
|
+
* // Identifier. The resource name of the Subscription. Format: `projects/{project\}/subscribers/{subscriber\}/subscriptions/{subscription\}` Example: `projects/my-project/subscribers/my-subscriber-123/subscriptions/my-subscription-456` The {project\} ID is mandatory (6-30 characters, matching /a-z{6,30\}/) The {subscriber\} ID is user-settable (4-36 characters, matching /[a-z]([a-z0-9-]{2,34\}[a-z0-9])/) if provided during creation, or system-generated otherwise. The {subscription\} ID is user-settable (4-36 chars, matching /[a-z]([a-z0-9-]{2,34\}[a-z0-9])/) or system-generated otherwise.
|
|
3651
|
+
* name: 'projects/my-project/subscribers/my-subscriber/subscriptions/my-subscription',
|
|
3652
|
+
* // Optional. The list of fields to update.
|
|
2608
3653
|
* updateMask: 'placeholder-value',
|
|
2609
3654
|
*
|
|
2610
3655
|
* // Request body metadata
|
|
2611
3656
|
* requestBody: {
|
|
2612
3657
|
* // request body parameters
|
|
2613
3658
|
* // {
|
|
2614
|
-
* // "
|
|
2615
|
-
* // "endpointAuthorization": {},
|
|
2616
|
-
* // "endpointUri": "my_endpointUri",
|
|
3659
|
+
* // "dataTypes": [],
|
|
2617
3660
|
* // "name": "my_name",
|
|
2618
|
-
* // "
|
|
2619
|
-
* // "subscriberConfigs": [],
|
|
2620
|
-
* // "updateTime": "my_updateTime"
|
|
3661
|
+
* // "user": "my_user"
|
|
2621
3662
|
* // }
|
|
2622
3663
|
* },
|
|
2623
3664
|
* });
|
|
@@ -2625,11 +3666,9 @@ export declare namespace health_v4 {
|
|
|
2625
3666
|
*
|
|
2626
3667
|
* // Example response
|
|
2627
3668
|
* // {
|
|
2628
|
-
* // "
|
|
2629
|
-
* // "error": {},
|
|
2630
|
-
* // "metadata": {},
|
|
3669
|
+
* // "dataTypes": [],
|
|
2631
3670
|
* // "name": "my_name",
|
|
2632
|
-
* // "
|
|
3671
|
+
* // "user": "my_user"
|
|
2633
3672
|
* // }
|
|
2634
3673
|
* }
|
|
2635
3674
|
*
|
|
@@ -2645,68 +3684,69 @@ export declare namespace health_v4 {
|
|
|
2645
3684
|
* @param callback - Optional callback that handles the response.
|
|
2646
3685
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2647
3686
|
*/
|
|
2648
|
-
patch(params: Params$Resource$Projects$Subscribers$Patch, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
2649
|
-
patch(params?: Params$Resource$Projects$Subscribers$Patch, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$
|
|
2650
|
-
patch(params: Params$Resource$Projects$Subscribers$Patch, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
2651
|
-
patch(params: Params$Resource$Projects$Subscribers$Patch, options: MethodOptions | BodyResponseCallback<Schema$
|
|
2652
|
-
patch(params: Params$Resource$Projects$Subscribers$Patch, callback: BodyResponseCallback<Schema$
|
|
2653
|
-
patch(callback: BodyResponseCallback<Schema$
|
|
3687
|
+
patch(params: Params$Resource$Projects$Subscribers$Subscriptions$Patch, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
3688
|
+
patch(params?: Params$Resource$Projects$Subscribers$Subscriptions$Patch, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Subscription>>;
|
|
3689
|
+
patch(params: Params$Resource$Projects$Subscribers$Subscriptions$Patch, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
3690
|
+
patch(params: Params$Resource$Projects$Subscribers$Subscriptions$Patch, options: MethodOptions | BodyResponseCallback<Schema$Subscription>, callback: BodyResponseCallback<Schema$Subscription>): void;
|
|
3691
|
+
patch(params: Params$Resource$Projects$Subscribers$Subscriptions$Patch, callback: BodyResponseCallback<Schema$Subscription>): void;
|
|
3692
|
+
patch(callback: BodyResponseCallback<Schema$Subscription>): void;
|
|
2654
3693
|
}
|
|
2655
|
-
export interface Params$Resource$Projects$Subscribers$Create extends StandardParameters {
|
|
3694
|
+
export interface Params$Resource$Projects$Subscribers$Subscriptions$Create extends StandardParameters {
|
|
2656
3695
|
/**
|
|
2657
|
-
* Required. The parent
|
|
3696
|
+
* Required. The parent subscriber. Format: projects/{project\}/subscribers/{subscriber\} The {subscriber\} ID is user-settable (4-36 characters, matching /[a-z]([a-z0-9-]{2,34\}[a-z0-9])/) if provided during creation, or system-generated otherwise.
|
|
2658
3697
|
*/
|
|
2659
3698
|
parent?: string;
|
|
2660
3699
|
/**
|
|
2661
|
-
* Optional. The
|
|
3700
|
+
* Optional. The {subscription_id\} is user-settable (4-36 chars, matching /[a-z]([a-z0-9-]{2,34\}[a-z0-9])/) or system-generated otherwise. If provided, the ID must be unique within the parent subscriber.
|
|
2662
3701
|
*/
|
|
2663
|
-
|
|
3702
|
+
subscriptionId?: string;
|
|
2664
3703
|
/**
|
|
2665
3704
|
* Request body metadata
|
|
2666
3705
|
*/
|
|
2667
|
-
requestBody?: Schema$
|
|
3706
|
+
requestBody?: Schema$CreateSubscriptionPayload;
|
|
2668
3707
|
}
|
|
2669
|
-
export interface Params$Resource$Projects$Subscribers$Delete extends StandardParameters {
|
|
2670
|
-
/**
|
|
2671
|
-
* Optional. If set to true, any child resources (e.g., subscriptions) will also be deleted. If false (default) and child resources exist, the request will fail.
|
|
2672
|
-
*/
|
|
2673
|
-
force?: boolean;
|
|
3708
|
+
export interface Params$Resource$Projects$Subscribers$Subscriptions$Delete extends StandardParameters {
|
|
2674
3709
|
/**
|
|
2675
|
-
* Required. The name of the
|
|
3710
|
+
* Required. The resource name of the subscription to delete. Format: `projects/{project\}/subscribers/{subscriber\}/subscriptions/{subscription\}` Example: `projects/my-project/subscribers/my-subscriber-123/subscriptions/my-subscription-456` The {subscriber\} ID is user-settable (4-36 characters, matching /[a-z]([a-z0-9-]{2,34\}[a-z0-9])/) if provided during creation, or system-generated otherwise. The {subscription\} ID is user-settable (4-36 characters, matching /[a-z]([a-z0-9-]{2,34\}[a-z0-9])/) or system-generated if not provided during creation.
|
|
2676
3711
|
*/
|
|
2677
3712
|
name?: string;
|
|
2678
3713
|
}
|
|
2679
|
-
export interface Params$Resource$Projects$Subscribers$List extends StandardParameters {
|
|
3714
|
+
export interface Params$Resource$Projects$Subscribers$Subscriptions$List extends StandardParameters {
|
|
2680
3715
|
/**
|
|
2681
|
-
* Optional.
|
|
3716
|
+
* Optional. A filter to apply to the list of subscriptions. The filter syntax is described in https://google.aip.dev/160. The filter can be applied to the following fields: - `user` - `data_type` The `user` identifier (e.g., `user1` in `users/user1`) refers to the public `healthUserId` Example: user = "users/user1" Example: user = "users/user1" OR user = "users/user2" Example: user = "users/user1" AND (data_type = "sleep" OR data_type = "weight")
|
|
3717
|
+
*/
|
|
3718
|
+
filter?: string;
|
|
3719
|
+
/**
|
|
3720
|
+
* Optional. The maximum number of subscriptions to return. The service may return fewer than this value. If unspecified, at most 50 subscriptions will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
|
|
2682
3721
|
*/
|
|
2683
3722
|
pageSize?: number;
|
|
2684
3723
|
/**
|
|
2685
|
-
* Optional. A page token, received from a previous `
|
|
3724
|
+
* Optional. A page token, received from a previous `ListSubscriptions` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListSubscriptions` must match the call that provided the page token.
|
|
2686
3725
|
*/
|
|
2687
3726
|
pageToken?: string;
|
|
2688
3727
|
/**
|
|
2689
|
-
* Required. The parent
|
|
3728
|
+
* Required. The parent subscriber. Format: projects/{project\}/subscribers/{subscriber\} The {subscriber\} ID is user-settable (4-36 characters, matching /[a-z]([a-z0-9-]{2,34\}[a-z0-9])/) if provided during creation, or system-generated otherwise.
|
|
2690
3729
|
*/
|
|
2691
3730
|
parent?: string;
|
|
2692
3731
|
}
|
|
2693
|
-
export interface Params$Resource$Projects$Subscribers$Patch extends StandardParameters {
|
|
3732
|
+
export interface Params$Resource$Projects$Subscribers$Subscriptions$Patch extends StandardParameters {
|
|
2694
3733
|
/**
|
|
2695
|
-
* Identifier. The resource name of the
|
|
3734
|
+
* Identifier. The resource name of the Subscription. Format: `projects/{project\}/subscribers/{subscriber\}/subscriptions/{subscription\}` Example: `projects/my-project/subscribers/my-subscriber-123/subscriptions/my-subscription-456` The {project\} ID is mandatory (6-30 characters, matching /a-z{6,30\}/) The {subscriber\} ID is user-settable (4-36 characters, matching /[a-z]([a-z0-9-]{2,34\}[a-z0-9])/) if provided during creation, or system-generated otherwise. The {subscription\} ID is user-settable (4-36 chars, matching /[a-z]([a-z0-9-]{2,34\}[a-z0-9])/) or system-generated otherwise.
|
|
2696
3735
|
*/
|
|
2697
3736
|
name?: string;
|
|
2698
3737
|
/**
|
|
2699
|
-
* Optional.
|
|
3738
|
+
* Optional. The list of fields to update.
|
|
2700
3739
|
*/
|
|
2701
3740
|
updateMask?: string;
|
|
2702
3741
|
/**
|
|
2703
3742
|
* Request body metadata
|
|
2704
3743
|
*/
|
|
2705
|
-
requestBody?: Schema$
|
|
3744
|
+
requestBody?: Schema$Subscription;
|
|
2706
3745
|
}
|
|
2707
3746
|
export class Resource$Users {
|
|
2708
3747
|
context: APIRequestContext;
|
|
2709
3748
|
dataTypes: Resource$Users$Datatypes;
|
|
3749
|
+
pairedDevices: Resource$Users$Paireddevices;
|
|
2710
3750
|
constructor(context: APIRequestContext);
|
|
2711
3751
|
/**
|
|
2712
3752
|
* Gets the user's identity. It includes the legacy Fitbit user ID and the Google user ID and it can be used by migrating clients to map identifiers between the two systems.
|
|
@@ -2730,7 +3770,13 @@ export declare namespace health_v4 {
|
|
|
2730
3770
|
* async function main() {
|
|
2731
3771
|
* const auth = new google.auth.GoogleAuth({
|
|
2732
3772
|
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2733
|
-
* scopes: [
|
|
3773
|
+
* scopes: [
|
|
3774
|
+
* 'https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly',
|
|
3775
|
+
* 'https://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.readonly',
|
|
3776
|
+
* 'https://www.googleapis.com/auth/googlehealth.profile.readonly',
|
|
3777
|
+
* 'https://www.googleapis.com/auth/googlehealth.settings.readonly',
|
|
3778
|
+
* 'https://www.googleapis.com/auth/googlehealth.sleep.readonly',
|
|
3779
|
+
* ],
|
|
2734
3780
|
* });
|
|
2735
3781
|
*
|
|
2736
3782
|
* // Acquire an auth client, and bind it to all future calls
|
|
@@ -2770,6 +3816,69 @@ export declare namespace health_v4 {
|
|
|
2770
3816
|
getIdentity(params: Params$Resource$Users$Getidentity, options: MethodOptions | BodyResponseCallback<Schema$Identity>, callback: BodyResponseCallback<Schema$Identity>): void;
|
|
2771
3817
|
getIdentity(params: Params$Resource$Users$Getidentity, callback: BodyResponseCallback<Schema$Identity>): void;
|
|
2772
3818
|
getIdentity(callback: BodyResponseCallback<Schema$Identity>): void;
|
|
3819
|
+
/**
|
|
3820
|
+
* Returns user's IRN Profile details.
|
|
3821
|
+
* @example
|
|
3822
|
+
* ```js
|
|
3823
|
+
* // Before running the sample:
|
|
3824
|
+
* // - Enable the API at:
|
|
3825
|
+
* // https://console.developers.google.com/apis/api/health.googleapis.com
|
|
3826
|
+
* // - Login into gcloud by running:
|
|
3827
|
+
* // ```sh
|
|
3828
|
+
* // $ gcloud auth application-default login
|
|
3829
|
+
* // ```
|
|
3830
|
+
* // - Install the npm module by running:
|
|
3831
|
+
* // ```sh
|
|
3832
|
+
* // $ npm install googleapis
|
|
3833
|
+
* // ```
|
|
3834
|
+
*
|
|
3835
|
+
* const {google} = require('googleapis');
|
|
3836
|
+
* const health = google.health('v4');
|
|
3837
|
+
*
|
|
3838
|
+
* async function main() {
|
|
3839
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3840
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3841
|
+
* scopes: ['https://www.googleapis.com/auth/googlehealth.irn.readonly'],
|
|
3842
|
+
* });
|
|
3843
|
+
*
|
|
3844
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3845
|
+
* const authClient = await auth.getClient();
|
|
3846
|
+
* google.options({auth: authClient});
|
|
3847
|
+
*
|
|
3848
|
+
* // Do the magic
|
|
3849
|
+
* const res = await health.users.getIrnProfile({
|
|
3850
|
+
* // Required. The resource name of the IRN Profile. Format: `users/{user\}/irnProfile` Example: `users/1234567890/irnProfile` or `users/me/irnProfile` The {user\} ID is a system-generated Google Health API user ID, a string of 1-63 characters consisting of lowercase and uppercase letters, numbers, and hyphens. The literal `me` can also be used to refer to the authenticated user.
|
|
3851
|
+
* name: 'users/my-user/irnProfile',
|
|
3852
|
+
* });
|
|
3853
|
+
* console.log(res.data);
|
|
3854
|
+
*
|
|
3855
|
+
* // Example response
|
|
3856
|
+
* // {
|
|
3857
|
+
* // "enrollmentStatus": false,
|
|
3858
|
+
* // "name": "my_name",
|
|
3859
|
+
* // "onboardingStatus": false,
|
|
3860
|
+
* // "updateTime": "my_updateTime"
|
|
3861
|
+
* // }
|
|
3862
|
+
* }
|
|
3863
|
+
*
|
|
3864
|
+
* main().catch(e => {
|
|
3865
|
+
* console.error(e);
|
|
3866
|
+
* throw e;
|
|
3867
|
+
* });
|
|
3868
|
+
*
|
|
3869
|
+
* ```
|
|
3870
|
+
*
|
|
3871
|
+
* @param params - Parameters for request
|
|
3872
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
3873
|
+
* @param callback - Optional callback that handles the response.
|
|
3874
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
3875
|
+
*/
|
|
3876
|
+
getIrnProfile(params: Params$Resource$Users$Getirnprofile, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
3877
|
+
getIrnProfile(params?: Params$Resource$Users$Getirnprofile, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$IrnProfile>>;
|
|
3878
|
+
getIrnProfile(params: Params$Resource$Users$Getirnprofile, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
3879
|
+
getIrnProfile(params: Params$Resource$Users$Getirnprofile, options: MethodOptions | BodyResponseCallback<Schema$IrnProfile>, callback: BodyResponseCallback<Schema$IrnProfile>): void;
|
|
3880
|
+
getIrnProfile(params: Params$Resource$Users$Getirnprofile, callback: BodyResponseCallback<Schema$IrnProfile>): void;
|
|
3881
|
+
getIrnProfile(callback: BodyResponseCallback<Schema$IrnProfile>): void;
|
|
2773
3882
|
/**
|
|
2774
3883
|
* Returns user Profile details.
|
|
2775
3884
|
* @example
|
|
@@ -2792,7 +3901,7 @@ export declare namespace health_v4 {
|
|
|
2792
3901
|
* async function main() {
|
|
2793
3902
|
* const auth = new google.auth.GoogleAuth({
|
|
2794
3903
|
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2795
|
-
* scopes: [],
|
|
3904
|
+
* scopes: ['https://www.googleapis.com/auth/googlehealth.profile.readonly'],
|
|
2796
3905
|
* });
|
|
2797
3906
|
*
|
|
2798
3907
|
* // Acquire an auth client, and bind it to all future calls
|
|
@@ -2858,7 +3967,7 @@ export declare namespace health_v4 {
|
|
|
2858
3967
|
* async function main() {
|
|
2859
3968
|
* const auth = new google.auth.GoogleAuth({
|
|
2860
3969
|
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2861
|
-
* scopes: [],
|
|
3970
|
+
* scopes: ['https://www.googleapis.com/auth/googlehealth.settings.readonly'],
|
|
2862
3971
|
* });
|
|
2863
3972
|
*
|
|
2864
3973
|
* // Acquire an auth client, and bind it to all future calls
|
|
@@ -2876,6 +3985,7 @@ export declare namespace health_v4 {
|
|
|
2876
3985
|
* // {
|
|
2877
3986
|
* // "autoStrideEnabled": false,
|
|
2878
3987
|
* // "distanceUnit": "my_distanceUnit",
|
|
3988
|
+
* // "foodLanguageCode": "my_foodLanguageCode",
|
|
2879
3989
|
* // "glucoseUnit": "my_glucoseUnit",
|
|
2880
3990
|
* // "heightUnit": "my_heightUnit",
|
|
2881
3991
|
* // "languageLocale": "my_languageLocale",
|
|
@@ -3033,6 +4143,7 @@ export declare namespace health_v4 {
|
|
|
3033
4143
|
* // {
|
|
3034
4144
|
* // "autoStrideEnabled": false,
|
|
3035
4145
|
* // "distanceUnit": "my_distanceUnit",
|
|
4146
|
+
* // "foodLanguageCode": "my_foodLanguageCode",
|
|
3036
4147
|
* // "glucoseUnit": "my_glucoseUnit",
|
|
3037
4148
|
* // "heightUnit": "my_heightUnit",
|
|
3038
4149
|
* // "languageLocale": "my_languageLocale",
|
|
@@ -3054,6 +4165,7 @@ export declare namespace health_v4 {
|
|
|
3054
4165
|
* // {
|
|
3055
4166
|
* // "autoStrideEnabled": false,
|
|
3056
4167
|
* // "distanceUnit": "my_distanceUnit",
|
|
4168
|
+
* // "foodLanguageCode": "my_foodLanguageCode",
|
|
3057
4169
|
* // "glucoseUnit": "my_glucoseUnit",
|
|
3058
4170
|
* // "heightUnit": "my_heightUnit",
|
|
3059
4171
|
* // "languageLocale": "my_languageLocale",
|
|
@@ -3094,6 +4206,12 @@ export declare namespace health_v4 {
|
|
|
3094
4206
|
*/
|
|
3095
4207
|
name?: string;
|
|
3096
4208
|
}
|
|
4209
|
+
export interface Params$Resource$Users$Getirnprofile extends StandardParameters {
|
|
4210
|
+
/**
|
|
4211
|
+
* Required. The resource name of the IRN Profile. Format: `users/{user\}/irnProfile` Example: `users/1234567890/irnProfile` or `users/me/irnProfile` The {user\} ID is a system-generated Google Health API user ID, a string of 1-63 characters consisting of lowercase and uppercase letters, numbers, and hyphens. The literal `me` can also be used to refer to the authenticated user.
|
|
4212
|
+
*/
|
|
4213
|
+
name?: string;
|
|
4214
|
+
}
|
|
3097
4215
|
export interface Params$Resource$Users$Getprofile extends StandardParameters {
|
|
3098
4216
|
/**
|
|
3099
4217
|
* Required. The name of the Profile. Format: `users/me/profile`.
|
|
@@ -3252,12 +4370,15 @@ export declare namespace health_v4 {
|
|
|
3252
4370
|
* requestBody: {
|
|
3253
4371
|
* // request body parameters
|
|
3254
4372
|
* // {
|
|
4373
|
+
* // "activeEnergyBurned": {},
|
|
3255
4374
|
* // "activeMinutes": {},
|
|
3256
4375
|
* // "activeZoneMinutes": {},
|
|
3257
4376
|
* // "activityLevel": {},
|
|
3258
4377
|
* // "altitude": {},
|
|
3259
4378
|
* // "basalEnergyBurned": {},
|
|
4379
|
+
* // "bloodGlucose": {},
|
|
3260
4380
|
* // "bodyFat": {},
|
|
4381
|
+
* // "coreBodyTemperature": {},
|
|
3261
4382
|
* // "dailyHeartRateVariability": {},
|
|
3262
4383
|
* // "dailyHeartRateZones": {},
|
|
3263
4384
|
* // "dailyOxygenSaturation": {},
|
|
@@ -3267,13 +4388,18 @@ export declare namespace health_v4 {
|
|
|
3267
4388
|
* // "dailyVo2Max": {},
|
|
3268
4389
|
* // "dataSource": {},
|
|
3269
4390
|
* // "distance": {},
|
|
4391
|
+
* // "electrocardiogram": {},
|
|
3270
4392
|
* // "exercise": {},
|
|
3271
4393
|
* // "floors": {},
|
|
4394
|
+
* // "food": {},
|
|
4395
|
+
* // "foodMeasurementUnit": {},
|
|
3272
4396
|
* // "heartRate": {},
|
|
3273
4397
|
* // "heartRateVariability": {},
|
|
3274
4398
|
* // "height": {},
|
|
3275
4399
|
* // "hydrationLog": {},
|
|
4400
|
+
* // "irregularRhythmNotification": {},
|
|
3276
4401
|
* // "name": "my_name",
|
|
4402
|
+
* // "nutritionLog": {},
|
|
3277
4403
|
* // "oxygenSaturation": {},
|
|
3278
4404
|
* // "respiratoryRateSleepSummary": {},
|
|
3279
4405
|
* // "runVo2Max": {},
|
|
@@ -3339,7 +4465,12 @@ export declare namespace health_v4 {
|
|
|
3339
4465
|
* async function main() {
|
|
3340
4466
|
* const auth = new google.auth.GoogleAuth({
|
|
3341
4467
|
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3342
|
-
* scopes: [
|
|
4468
|
+
* scopes: [
|
|
4469
|
+
* 'https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly',
|
|
4470
|
+
* 'https://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.readonly',
|
|
4471
|
+
* 'https://www.googleapis.com/auth/googlehealth.location.readonly',
|
|
4472
|
+
* 'https://www.googleapis.com/auth/googlehealth.sleep.readonly',
|
|
4473
|
+
* ],
|
|
3343
4474
|
* });
|
|
3344
4475
|
*
|
|
3345
4476
|
* // Acquire an auth client, and bind it to all future calls
|
|
@@ -3390,7 +4521,7 @@ export declare namespace health_v4 {
|
|
|
3390
4521
|
dailyRollUp(params: Params$Resource$Users$Datatypes$Datapoints$Dailyrollup, callback: BodyResponseCallback<Schema$DailyRollUpDataPointsResponse>): void;
|
|
3391
4522
|
dailyRollUp(callback: BodyResponseCallback<Schema$DailyRollUpDataPointsResponse>): void;
|
|
3392
4523
|
/**
|
|
3393
|
-
* Exports exercise data in TCX format.
|
|
4524
|
+
* Exports exercise data in TCX format. **IMPORTANT:** HTTP clients must append `?alt=media` to the request URL to download the raw TCX file. Example: `https://health.googleapis.com/v4/users/me/dataTypes/exercise/dataPoints/EXERCISE_ID:exportExerciseTcx?alt=media` Without `alt=media`, the server returns a JSON response (`ExportExerciseTcxResponse`) which is intended primarily for gRPC clients. **Note:** While the Authorization section below states that any one of the listed scopes is accepted, this specific method requires the user to provide both one of the `activity_and_fitness` scopes (`normal` or `readonly`) AND one of the `location` scopes (`normal` or `readonly`) in their access token to succeed.
|
|
3394
4525
|
* @example
|
|
3395
4526
|
* ```js
|
|
3396
4527
|
* // Before running the sample:
|
|
@@ -3411,7 +4542,10 @@ export declare namespace health_v4 {
|
|
|
3411
4542
|
* async function main() {
|
|
3412
4543
|
* const auth = new google.auth.GoogleAuth({
|
|
3413
4544
|
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3414
|
-
* scopes: [
|
|
4545
|
+
* scopes: [
|
|
4546
|
+
* 'https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly',
|
|
4547
|
+
* 'https://www.googleapis.com/auth/googlehealth.location.readonly',
|
|
4548
|
+
* ],
|
|
3415
4549
|
* });
|
|
3416
4550
|
*
|
|
3417
4551
|
* // Acquire an auth client, and bind it to all future calls
|
|
@@ -3473,7 +4607,12 @@ export declare namespace health_v4 {
|
|
|
3473
4607
|
* async function main() {
|
|
3474
4608
|
* const auth = new google.auth.GoogleAuth({
|
|
3475
4609
|
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3476
|
-
* scopes: [
|
|
4610
|
+
* scopes: [
|
|
4611
|
+
* 'https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly',
|
|
4612
|
+
* 'https://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.readonly',
|
|
4613
|
+
* 'https://www.googleapis.com/auth/googlehealth.location.readonly',
|
|
4614
|
+
* 'https://www.googleapis.com/auth/googlehealth.sleep.readonly',
|
|
4615
|
+
* ],
|
|
3477
4616
|
* });
|
|
3478
4617
|
*
|
|
3479
4618
|
* // Acquire an auth client, and bind it to all future calls
|
|
@@ -3489,12 +4628,15 @@ export declare namespace health_v4 {
|
|
|
3489
4628
|
*
|
|
3490
4629
|
* // Example response
|
|
3491
4630
|
* // {
|
|
4631
|
+
* // "activeEnergyBurned": {},
|
|
3492
4632
|
* // "activeMinutes": {},
|
|
3493
4633
|
* // "activeZoneMinutes": {},
|
|
3494
4634
|
* // "activityLevel": {},
|
|
3495
4635
|
* // "altitude": {},
|
|
3496
4636
|
* // "basalEnergyBurned": {},
|
|
4637
|
+
* // "bloodGlucose": {},
|
|
3497
4638
|
* // "bodyFat": {},
|
|
4639
|
+
* // "coreBodyTemperature": {},
|
|
3498
4640
|
* // "dailyHeartRateVariability": {},
|
|
3499
4641
|
* // "dailyHeartRateZones": {},
|
|
3500
4642
|
* // "dailyOxygenSaturation": {},
|
|
@@ -3504,13 +4646,18 @@ export declare namespace health_v4 {
|
|
|
3504
4646
|
* // "dailyVo2Max": {},
|
|
3505
4647
|
* // "dataSource": {},
|
|
3506
4648
|
* // "distance": {},
|
|
4649
|
+
* // "electrocardiogram": {},
|
|
3507
4650
|
* // "exercise": {},
|
|
3508
4651
|
* // "floors": {},
|
|
4652
|
+
* // "food": {},
|
|
4653
|
+
* // "foodMeasurementUnit": {},
|
|
3509
4654
|
* // "heartRate": {},
|
|
3510
4655
|
* // "heartRateVariability": {},
|
|
3511
4656
|
* // "height": {},
|
|
3512
4657
|
* // "hydrationLog": {},
|
|
4658
|
+
* // "irregularRhythmNotification": {},
|
|
3513
4659
|
* // "name": "my_name",
|
|
4660
|
+
* // "nutritionLog": {},
|
|
3514
4661
|
* // "oxygenSaturation": {},
|
|
3515
4662
|
* // "respiratoryRateSleepSummary": {},
|
|
3516
4663
|
* // "runVo2Max": {},
|
|
@@ -3564,7 +4711,12 @@ export declare namespace health_v4 {
|
|
|
3564
4711
|
* async function main() {
|
|
3565
4712
|
* const auth = new google.auth.GoogleAuth({
|
|
3566
4713
|
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3567
|
-
* scopes: [
|
|
4714
|
+
* scopes: [
|
|
4715
|
+
* 'https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly',
|
|
4716
|
+
* 'https://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.readonly',
|
|
4717
|
+
* 'https://www.googleapis.com/auth/googlehealth.location.readonly',
|
|
4718
|
+
* 'https://www.googleapis.com/auth/googlehealth.sleep.readonly',
|
|
4719
|
+
* ],
|
|
3568
4720
|
* });
|
|
3569
4721
|
*
|
|
3570
4722
|
* // Acquire an auth client, and bind it to all future calls
|
|
@@ -3573,7 +4725,7 @@ export declare namespace health_v4 {
|
|
|
3573
4725
|
*
|
|
3574
4726
|
* // Do the magic
|
|
3575
4727
|
* const res = await health.users.dataTypes.dataPoints.list({
|
|
3576
|
-
* // Optional. Filter expression following https://google.aip.dev/160. A time range (either physical or civil) can be specified. The supported filter fields are: - Interval start time: - Pattern: `{interval_data_type\}.interval.start_time` - Supported comparison operators: `\>=`, `<` - Timestamp literal expected in RFC-3339 format - Supported logical operators: `AND` - Example: - `steps.interval.start_time \>= "2023-11-24T00:00:00Z" AND steps.interval.start_time < "2023-11-25T00:00:00Z"` - `distance.interval.start_time \>= "2024-08-14T12:34:56Z"` - Interval civil start time: - Pattern: `{interval_data_type\}.interval.civil_start_time` - Supported comparison operators: `\>=`, `<` - Date with optional time literal expected in ISO 8601 `YYYY-MM-DD[THH:mm:ss]` format - Supported logical operators: `AND` - Example: - `steps.interval.civil_start_time \>= "2023-11-24" AND steps.interval.civil_start_time < "2023-11-25"` - `distance.interval.civil_start_time \>= "2024-08-14T12:34:56"` - Sample observation physical time: - Pattern: `{sample_data_type\}.sample_time.physical_time` - Supported comparison operators: `\>=`, `<` - Timestamp literal expected in RFC-3339 format - Supported logical operators: `AND` - Example: - `weight.sample_time.physical_time \>= "2023-11-24T00:00:00Z" AND weight.sample_time.physical_time < "2023-11-25T00:00:00Z"` - `weight.sample_time.physical_time \>= "2024-08-14T12:34:56Z"` - Sample observation civil time: - Pattern: `{sample_data_type\}.sample_time.civil_time` - Supported comparison operators: `\>=`, `<` - Date with optional time literal expected in ISO 8601 `YYYY-MM-DD[THH:mm:ss]` format - Supported logical operators: `AND` - Example: - `weight.sample_time.civil_time \>= "2023-11-24" AND weight.sample_time.civil_time < "2023-11-25"` - `weight.sample_time.civil_time \>= "2024-08-14T12:34:56"` - Daily summary date: - Pattern: `{daily_summary_data_type\}.date` - Supported comparison operators: `\>=`, `<` - Date literal expected in ISO 8601 `YYYY-MM-DD` format - Supported logical operators: `AND` - Example: - `daily_heart_rate_variability.date < "2024-08-15"` - Session civil start time (**Excluding Sleep**): - Pattern: `{session_data_type\}.interval.civil_start_time` - Supported comparison operators: `\>=`, `<` - Date with optional time literal expected in ISO 8601 `YYYY-MM-DD[THH:mm:ss]` format - Supported logical operators: `AND` - Example: - `exercise.interval.civil_start_time \>= "2023-11-24" AND exercise.interval.civil_start_time < "2023-11-25"` - `exercise.interval.civil_start_time \>= "2024-08-14T12:34:56"` - Session end time (**Sleep specific**): - Pattern: `sleep.interval.end_time` - Supported comparison operators: `\>=`, `<` - Timestamp literal expected in RFC-3339 format - Supported logical operators: `AND`, `OR` - Example: - `sleep.interval.end_time \>= "2023-11-24T00:00:00Z" AND sleep.interval.end_time < "2023-11-25T00:00:00Z"` - Session civil end time (**Sleep specific**): - Pattern: `sleep.interval.civil_end_time` - Supported comparison operators: `\>=`, `<` - Date with optional time literal expected in ISO 8601 `YYYY-MM-DD[THH:mm:ss]` format - Supported logical operators: `AND`, `OR` - Example: - `sleep.interval.civil_end_time \>= "2023-11-24" AND sleep.interval.civil_end_time < "2023-11-25"` Data points in the response will be ordered by the interval start time in descending order.
|
|
4728
|
+
* // Optional. Filter expression following https://google.aip.dev/160. A time range (either physical or civil) can be specified. The supported filter fields are: - Interval start time: - Pattern: `{interval_data_type\}.interval.start_time` - Supported comparison operators: `\>=`, `<` - Timestamp literal expected in RFC-3339 format - Supported logical operators: `AND` - Example: - `steps.interval.start_time \>= "2023-11-24T00:00:00Z" AND steps.interval.start_time < "2023-11-25T00:00:00Z"` - `distance.interval.start_time \>= "2024-08-14T12:34:56Z"` - Interval civil start time: - Pattern: `{interval_data_type\}.interval.civil_start_time` - Supported comparison operators: `\>=`, `<` - Date with optional time literal expected in ISO 8601 `YYYY-MM-DD[THH:mm:ss]` format - Supported logical operators: `AND` - Example: - `steps.interval.civil_start_time \>= "2023-11-24" AND steps.interval.civil_start_time < "2023-11-25"` - `distance.interval.civil_start_time \>= "2024-08-14T12:34:56"` - Sample observation physical time: - Pattern: `{sample_data_type\}.sample_time.physical_time` - Supported comparison operators: `\>=`, `<` - Timestamp literal expected in RFC-3339 format - Supported logical operators: `AND` - Example: - `weight.sample_time.physical_time \>= "2023-11-24T00:00:00Z" AND weight.sample_time.physical_time < "2023-11-25T00:00:00Z"` - `weight.sample_time.physical_time \>= "2024-08-14T12:34:56Z"` - Sample observation civil time: - Pattern: `{sample_data_type\}.sample_time.civil_time` - Supported comparison operators: `\>=`, `<` - Date with optional time literal expected in ISO 8601 `YYYY-MM-DD[THH:mm:ss]` format - Supported logical operators: `AND` - Example: - `weight.sample_time.civil_time \>= "2023-11-24" AND weight.sample_time.civil_time < "2023-11-25"` - `weight.sample_time.civil_time \>= "2024-08-14T12:34:56"` - Daily summary date: - Pattern: `{daily_summary_data_type\}.date` - Supported comparison operators: `\>=`, `<` - Date literal expected in ISO 8601 `YYYY-MM-DD` format - Supported logical operators: `AND` - Example: - `daily_heart_rate_variability.date < "2024-08-15"` - Session civil start time (**Excluding Sleep and ECG**): - Pattern: `{session_data_type\}.interval.civil_start_time` - Supported comparison operators: `\>=`, `<` - Date with optional time literal expected in ISO 8601 `YYYY-MM-DD[THH:mm:ss]` format - Supported logical operators: `AND` - Example: - `exercise.interval.civil_start_time \>= "2023-11-24" AND exercise.interval.civil_start_time < "2023-11-25"` - `exercise.interval.civil_start_time \>= "2024-08-14T12:34:56"` - Session start time (**ECG specific**): - Pattern: `electrocardiogram.interval.start_time` - Supported comparison operators: `\>=` - Timestamp literal expected in RFC-3339 format - Example: - `electrocardiogram.interval.start_time \>= "2024-08-14T12:34:56Z"` - Note: Only filtering by start time is supported for ECG. Filtering by end time (e.g., `electrocardiogram.interval.end_time`) is not supported. - Session end time (**Sleep specific**): - Pattern: `sleep.interval.end_time` - Supported comparison operators: `\>=`, `<` - Timestamp literal expected in RFC-3339 format - Supported logical operators: `AND`, `OR` - Example: - `sleep.interval.end_time \>= "2023-11-24T00:00:00Z" AND sleep.interval.end_time < "2023-11-25T00:00:00Z"` - Session civil end time (**Sleep specific**): - Pattern: `sleep.interval.civil_end_time` - Supported comparison operators: `\>=`, `<` - Date with optional time literal expected in ISO 8601 `YYYY-MM-DD[THH:mm:ss]` format - Supported logical operators: `AND`, `OR` - Example: - `sleep.interval.civil_end_time \>= "2023-11-24" AND sleep.interval.civil_end_time < "2023-11-25"` Data points in the response will be ordered by the interval start time in descending order.
|
|
3577
4729
|
* filter: 'placeholder-value',
|
|
3578
4730
|
* // Optional. The maximum number of data points to return. If unspecified, at most 1440 data points will be returned. The maximum page size is 10000; values above that will be truncated accordingly. For `exercise` and `sleep` the default page size is 25. The maximum page size for `exercise` and `sleep` is 25.
|
|
3579
4731
|
* pageSize: 'placeholder-value',
|
|
@@ -3647,12 +4799,15 @@ export declare namespace health_v4 {
|
|
|
3647
4799
|
* requestBody: {
|
|
3648
4800
|
* // request body parameters
|
|
3649
4801
|
* // {
|
|
4802
|
+
* // "activeEnergyBurned": {},
|
|
3650
4803
|
* // "activeMinutes": {},
|
|
3651
4804
|
* // "activeZoneMinutes": {},
|
|
3652
4805
|
* // "activityLevel": {},
|
|
3653
4806
|
* // "altitude": {},
|
|
3654
4807
|
* // "basalEnergyBurned": {},
|
|
4808
|
+
* // "bloodGlucose": {},
|
|
3655
4809
|
* // "bodyFat": {},
|
|
4810
|
+
* // "coreBodyTemperature": {},
|
|
3656
4811
|
* // "dailyHeartRateVariability": {},
|
|
3657
4812
|
* // "dailyHeartRateZones": {},
|
|
3658
4813
|
* // "dailyOxygenSaturation": {},
|
|
@@ -3662,13 +4817,18 @@ export declare namespace health_v4 {
|
|
|
3662
4817
|
* // "dailyVo2Max": {},
|
|
3663
4818
|
* // "dataSource": {},
|
|
3664
4819
|
* // "distance": {},
|
|
4820
|
+
* // "electrocardiogram": {},
|
|
3665
4821
|
* // "exercise": {},
|
|
3666
4822
|
* // "floors": {},
|
|
4823
|
+
* // "food": {},
|
|
4824
|
+
* // "foodMeasurementUnit": {},
|
|
3667
4825
|
* // "heartRate": {},
|
|
3668
4826
|
* // "heartRateVariability": {},
|
|
3669
4827
|
* // "height": {},
|
|
3670
4828
|
* // "hydrationLog": {},
|
|
4829
|
+
* // "irregularRhythmNotification": {},
|
|
3671
4830
|
* // "name": "my_name",
|
|
4831
|
+
* // "nutritionLog": {},
|
|
3672
4832
|
* // "oxygenSaturation": {},
|
|
3673
4833
|
* // "respiratoryRateSleepSummary": {},
|
|
3674
4834
|
* // "runVo2Max": {},
|
|
@@ -3734,7 +4894,12 @@ export declare namespace health_v4 {
|
|
|
3734
4894
|
* async function main() {
|
|
3735
4895
|
* const auth = new google.auth.GoogleAuth({
|
|
3736
4896
|
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3737
|
-
* scopes: [
|
|
4897
|
+
* scopes: [
|
|
4898
|
+
* 'https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly',
|
|
4899
|
+
* 'https://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.readonly',
|
|
4900
|
+
* 'https://www.googleapis.com/auth/googlehealth.location.readonly',
|
|
4901
|
+
* 'https://www.googleapis.com/auth/googlehealth.sleep.readonly',
|
|
4902
|
+
* ],
|
|
3738
4903
|
* });
|
|
3739
4904
|
*
|
|
3740
4905
|
* // Acquire an auth client, and bind it to all future calls
|
|
@@ -3803,7 +4968,12 @@ export declare namespace health_v4 {
|
|
|
3803
4968
|
* async function main() {
|
|
3804
4969
|
* const auth = new google.auth.GoogleAuth({
|
|
3805
4970
|
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3806
|
-
* scopes: [
|
|
4971
|
+
* scopes: [
|
|
4972
|
+
* 'https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly',
|
|
4973
|
+
* 'https://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.readonly',
|
|
4974
|
+
* 'https://www.googleapis.com/auth/googlehealth.location.readonly',
|
|
4975
|
+
* 'https://www.googleapis.com/auth/googlehealth.sleep.readonly',
|
|
4976
|
+
* ],
|
|
3807
4977
|
* });
|
|
3808
4978
|
*
|
|
3809
4979
|
* // Acquire an auth client, and bind it to all future calls
|
|
@@ -3903,7 +5073,7 @@ export declare namespace health_v4 {
|
|
|
3903
5073
|
}
|
|
3904
5074
|
export interface Params$Resource$Users$Datatypes$Datapoints$List extends StandardParameters {
|
|
3905
5075
|
/**
|
|
3906
|
-
* Optional. Filter expression following https://google.aip.dev/160. A time range (either physical or civil) can be specified. The supported filter fields are: - Interval start time: - Pattern: `{interval_data_type\}.interval.start_time` - Supported comparison operators: `\>=`, `<` - Timestamp literal expected in RFC-3339 format - Supported logical operators: `AND` - Example: - `steps.interval.start_time \>= "2023-11-24T00:00:00Z" AND steps.interval.start_time < "2023-11-25T00:00:00Z"` - `distance.interval.start_time \>= "2024-08-14T12:34:56Z"` - Interval civil start time: - Pattern: `{interval_data_type\}.interval.civil_start_time` - Supported comparison operators: `\>=`, `<` - Date with optional time literal expected in ISO 8601 `YYYY-MM-DD[THH:mm:ss]` format - Supported logical operators: `AND` - Example: - `steps.interval.civil_start_time \>= "2023-11-24" AND steps.interval.civil_start_time < "2023-11-25"` - `distance.interval.civil_start_time \>= "2024-08-14T12:34:56"` - Sample observation physical time: - Pattern: `{sample_data_type\}.sample_time.physical_time` - Supported comparison operators: `\>=`, `<` - Timestamp literal expected in RFC-3339 format - Supported logical operators: `AND` - Example: - `weight.sample_time.physical_time \>= "2023-11-24T00:00:00Z" AND weight.sample_time.physical_time < "2023-11-25T00:00:00Z"` - `weight.sample_time.physical_time \>= "2024-08-14T12:34:56Z"` - Sample observation civil time: - Pattern: `{sample_data_type\}.sample_time.civil_time` - Supported comparison operators: `\>=`, `<` - Date with optional time literal expected in ISO 8601 `YYYY-MM-DD[THH:mm:ss]` format - Supported logical operators: `AND` - Example: - `weight.sample_time.civil_time \>= "2023-11-24" AND weight.sample_time.civil_time < "2023-11-25"` - `weight.sample_time.civil_time \>= "2024-08-14T12:34:56"` - Daily summary date: - Pattern: `{daily_summary_data_type\}.date` - Supported comparison operators: `\>=`, `<` - Date literal expected in ISO 8601 `YYYY-MM-DD` format - Supported logical operators: `AND` - Example: - `daily_heart_rate_variability.date < "2024-08-15"` - Session civil start time (**Excluding Sleep**): - Pattern: `{session_data_type\}.interval.civil_start_time` - Supported comparison operators: `\>=`, `<` - Date with optional time literal expected in ISO 8601 `YYYY-MM-DD[THH:mm:ss]` format - Supported logical operators: `AND` - Example: - `exercise.interval.civil_start_time \>= "2023-11-24" AND exercise.interval.civil_start_time < "2023-11-25"` - `exercise.interval.civil_start_time \>= "2024-08-14T12:34:56"` - Session end time (**Sleep specific**): - Pattern: `sleep.interval.end_time` - Supported comparison operators: `\>=`, `<` - Timestamp literal expected in RFC-3339 format - Supported logical operators: `AND`, `OR` - Example: - `sleep.interval.end_time \>= "2023-11-24T00:00:00Z" AND sleep.interval.end_time < "2023-11-25T00:00:00Z"` - Session civil end time (**Sleep specific**): - Pattern: `sleep.interval.civil_end_time` - Supported comparison operators: `\>=`, `<` - Date with optional time literal expected in ISO 8601 `YYYY-MM-DD[THH:mm:ss]` format - Supported logical operators: `AND`, `OR` - Example: - `sleep.interval.civil_end_time \>= "2023-11-24" AND sleep.interval.civil_end_time < "2023-11-25"` Data points in the response will be ordered by the interval start time in descending order.
|
|
5076
|
+
* Optional. Filter expression following https://google.aip.dev/160. A time range (either physical or civil) can be specified. The supported filter fields are: - Interval start time: - Pattern: `{interval_data_type\}.interval.start_time` - Supported comparison operators: `\>=`, `<` - Timestamp literal expected in RFC-3339 format - Supported logical operators: `AND` - Example: - `steps.interval.start_time \>= "2023-11-24T00:00:00Z" AND steps.interval.start_time < "2023-11-25T00:00:00Z"` - `distance.interval.start_time \>= "2024-08-14T12:34:56Z"` - Interval civil start time: - Pattern: `{interval_data_type\}.interval.civil_start_time` - Supported comparison operators: `\>=`, `<` - Date with optional time literal expected in ISO 8601 `YYYY-MM-DD[THH:mm:ss]` format - Supported logical operators: `AND` - Example: - `steps.interval.civil_start_time \>= "2023-11-24" AND steps.interval.civil_start_time < "2023-11-25"` - `distance.interval.civil_start_time \>= "2024-08-14T12:34:56"` - Sample observation physical time: - Pattern: `{sample_data_type\}.sample_time.physical_time` - Supported comparison operators: `\>=`, `<` - Timestamp literal expected in RFC-3339 format - Supported logical operators: `AND` - Example: - `weight.sample_time.physical_time \>= "2023-11-24T00:00:00Z" AND weight.sample_time.physical_time < "2023-11-25T00:00:00Z"` - `weight.sample_time.physical_time \>= "2024-08-14T12:34:56Z"` - Sample observation civil time: - Pattern: `{sample_data_type\}.sample_time.civil_time` - Supported comparison operators: `\>=`, `<` - Date with optional time literal expected in ISO 8601 `YYYY-MM-DD[THH:mm:ss]` format - Supported logical operators: `AND` - Example: - `weight.sample_time.civil_time \>= "2023-11-24" AND weight.sample_time.civil_time < "2023-11-25"` - `weight.sample_time.civil_time \>= "2024-08-14T12:34:56"` - Daily summary date: - Pattern: `{daily_summary_data_type\}.date` - Supported comparison operators: `\>=`, `<` - Date literal expected in ISO 8601 `YYYY-MM-DD` format - Supported logical operators: `AND` - Example: - `daily_heart_rate_variability.date < "2024-08-15"` - Session civil start time (**Excluding Sleep and ECG**): - Pattern: `{session_data_type\}.interval.civil_start_time` - Supported comparison operators: `\>=`, `<` - Date with optional time literal expected in ISO 8601 `YYYY-MM-DD[THH:mm:ss]` format - Supported logical operators: `AND` - Example: - `exercise.interval.civil_start_time \>= "2023-11-24" AND exercise.interval.civil_start_time < "2023-11-25"` - `exercise.interval.civil_start_time \>= "2024-08-14T12:34:56"` - Session start time (**ECG specific**): - Pattern: `electrocardiogram.interval.start_time` - Supported comparison operators: `\>=` - Timestamp literal expected in RFC-3339 format - Example: - `electrocardiogram.interval.start_time \>= "2024-08-14T12:34:56Z"` - Note: Only filtering by start time is supported for ECG. Filtering by end time (e.g., `electrocardiogram.interval.end_time`) is not supported. - Session end time (**Sleep specific**): - Pattern: `sleep.interval.end_time` - Supported comparison operators: `\>=`, `<` - Timestamp literal expected in RFC-3339 format - Supported logical operators: `AND`, `OR` - Example: - `sleep.interval.end_time \>= "2023-11-24T00:00:00Z" AND sleep.interval.end_time < "2023-11-25T00:00:00Z"` - Session civil end time (**Sleep specific**): - Pattern: `sleep.interval.civil_end_time` - Supported comparison operators: `\>=`, `<` - Date with optional time literal expected in ISO 8601 `YYYY-MM-DD[THH:mm:ss]` format - Supported logical operators: `AND`, `OR` - Example: - `sleep.interval.civil_end_time \>= "2023-11-24" AND sleep.interval.civil_end_time < "2023-11-25"` Data points in the response will be ordered by the interval start time in descending order.
|
|
3907
5077
|
*/
|
|
3908
5078
|
filter?: string;
|
|
3909
5079
|
/**
|
|
@@ -3961,5 +5131,161 @@ export declare namespace health_v4 {
|
|
|
3961
5131
|
*/
|
|
3962
5132
|
requestBody?: Schema$RollUpDataPointsRequest;
|
|
3963
5133
|
}
|
|
5134
|
+
export class Resource$Users$Paireddevices {
|
|
5135
|
+
context: APIRequestContext;
|
|
5136
|
+
constructor(context: APIRequestContext);
|
|
5137
|
+
/**
|
|
5138
|
+
* Returns user's Device.
|
|
5139
|
+
* @example
|
|
5140
|
+
* ```js
|
|
5141
|
+
* // Before running the sample:
|
|
5142
|
+
* // - Enable the API at:
|
|
5143
|
+
* // https://console.developers.google.com/apis/api/health.googleapis.com
|
|
5144
|
+
* // - Login into gcloud by running:
|
|
5145
|
+
* // ```sh
|
|
5146
|
+
* // $ gcloud auth application-default login
|
|
5147
|
+
* // ```
|
|
5148
|
+
* // - Install the npm module by running:
|
|
5149
|
+
* // ```sh
|
|
5150
|
+
* // $ npm install googleapis
|
|
5151
|
+
* // ```
|
|
5152
|
+
*
|
|
5153
|
+
* const {google} = require('googleapis');
|
|
5154
|
+
* const health = google.health('v4');
|
|
5155
|
+
*
|
|
5156
|
+
* async function main() {
|
|
5157
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5158
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5159
|
+
* scopes: ['https://www.googleapis.com/auth/googlehealth.settings.readonly'],
|
|
5160
|
+
* });
|
|
5161
|
+
*
|
|
5162
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5163
|
+
* const authClient = await auth.getClient();
|
|
5164
|
+
* google.options({auth: authClient});
|
|
5165
|
+
*
|
|
5166
|
+
* // Do the magic
|
|
5167
|
+
* const res = await health.users.pairedDevices.get({
|
|
5168
|
+
* // Required. The name of the device to retrieve. Format: users/{user\}/devices/{device\}
|
|
5169
|
+
* name: 'users/my-user/pairedDevices/my-pairedDevice',
|
|
5170
|
+
* });
|
|
5171
|
+
* console.log(res.data);
|
|
5172
|
+
*
|
|
5173
|
+
* // Example response
|
|
5174
|
+
* // {
|
|
5175
|
+
* // "batteryLevel": 0,
|
|
5176
|
+
* // "batteryStatus": "my_batteryStatus",
|
|
5177
|
+
* // "deviceType": "my_deviceType",
|
|
5178
|
+
* // "deviceVersion": "my_deviceVersion",
|
|
5179
|
+
* // "features": [],
|
|
5180
|
+
* // "lastSyncTime": "my_lastSyncTime",
|
|
5181
|
+
* // "macAddress": "my_macAddress",
|
|
5182
|
+
* // "name": "my_name"
|
|
5183
|
+
* // }
|
|
5184
|
+
* }
|
|
5185
|
+
*
|
|
5186
|
+
* main().catch(e => {
|
|
5187
|
+
* console.error(e);
|
|
5188
|
+
* throw e;
|
|
5189
|
+
* });
|
|
5190
|
+
*
|
|
5191
|
+
* ```
|
|
5192
|
+
*
|
|
5193
|
+
* @param params - Parameters for request
|
|
5194
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
5195
|
+
* @param callback - Optional callback that handles the response.
|
|
5196
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
5197
|
+
*/
|
|
5198
|
+
get(params: Params$Resource$Users$Paireddevices$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
5199
|
+
get(params?: Params$Resource$Users$Paireddevices$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$PairedDevice>>;
|
|
5200
|
+
get(params: Params$Resource$Users$Paireddevices$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
5201
|
+
get(params: Params$Resource$Users$Paireddevices$Get, options: MethodOptions | BodyResponseCallback<Schema$PairedDevice>, callback: BodyResponseCallback<Schema$PairedDevice>): void;
|
|
5202
|
+
get(params: Params$Resource$Users$Paireddevices$Get, callback: BodyResponseCallback<Schema$PairedDevice>): void;
|
|
5203
|
+
get(callback: BodyResponseCallback<Schema$PairedDevice>): void;
|
|
5204
|
+
/**
|
|
5205
|
+
* Returns the user's list of paired 1P trackers and smartwatches.
|
|
5206
|
+
* @example
|
|
5207
|
+
* ```js
|
|
5208
|
+
* // Before running the sample:
|
|
5209
|
+
* // - Enable the API at:
|
|
5210
|
+
* // https://console.developers.google.com/apis/api/health.googleapis.com
|
|
5211
|
+
* // - Login into gcloud by running:
|
|
5212
|
+
* // ```sh
|
|
5213
|
+
* // $ gcloud auth application-default login
|
|
5214
|
+
* // ```
|
|
5215
|
+
* // - Install the npm module by running:
|
|
5216
|
+
* // ```sh
|
|
5217
|
+
* // $ npm install googleapis
|
|
5218
|
+
* // ```
|
|
5219
|
+
*
|
|
5220
|
+
* const {google} = require('googleapis');
|
|
5221
|
+
* const health = google.health('v4');
|
|
5222
|
+
*
|
|
5223
|
+
* async function main() {
|
|
5224
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5225
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5226
|
+
* scopes: ['https://www.googleapis.com/auth/googlehealth.settings.readonly'],
|
|
5227
|
+
* });
|
|
5228
|
+
*
|
|
5229
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5230
|
+
* const authClient = await auth.getClient();
|
|
5231
|
+
* google.options({auth: authClient});
|
|
5232
|
+
*
|
|
5233
|
+
* // Do the magic
|
|
5234
|
+
* const res = await health.users.pairedDevices.list({
|
|
5235
|
+
* // Optional. The maximum number of devices to return. The service may return fewer than this value. If unspecified, at most 5 devices will be returned. The maximum value is 100. values above 100 will be coerced to 100.
|
|
5236
|
+
* pageSize: 'placeholder-value',
|
|
5237
|
+
* // Optional. A page token, received from a previous `ListPairedDevices` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPairedDevices` must match the call that provided the page token.
|
|
5238
|
+
* pageToken: 'placeholder-value',
|
|
5239
|
+
* // Required. The parent, which owns this collection of devices. Format: users/{user\}
|
|
5240
|
+
* parent: 'users/my-user',
|
|
5241
|
+
* });
|
|
5242
|
+
* console.log(res.data);
|
|
5243
|
+
*
|
|
5244
|
+
* // Example response
|
|
5245
|
+
* // {
|
|
5246
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
5247
|
+
* // "pairedDevices": []
|
|
5248
|
+
* // }
|
|
5249
|
+
* }
|
|
5250
|
+
*
|
|
5251
|
+
* main().catch(e => {
|
|
5252
|
+
* console.error(e);
|
|
5253
|
+
* throw e;
|
|
5254
|
+
* });
|
|
5255
|
+
*
|
|
5256
|
+
* ```
|
|
5257
|
+
*
|
|
5258
|
+
* @param params - Parameters for request
|
|
5259
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
5260
|
+
* @param callback - Optional callback that handles the response.
|
|
5261
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
5262
|
+
*/
|
|
5263
|
+
list(params: Params$Resource$Users$Paireddevices$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
5264
|
+
list(params?: Params$Resource$Users$Paireddevices$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ListPairedDevicesResponse>>;
|
|
5265
|
+
list(params: Params$Resource$Users$Paireddevices$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
5266
|
+
list(params: Params$Resource$Users$Paireddevices$List, options: MethodOptions | BodyResponseCallback<Schema$ListPairedDevicesResponse>, callback: BodyResponseCallback<Schema$ListPairedDevicesResponse>): void;
|
|
5267
|
+
list(params: Params$Resource$Users$Paireddevices$List, callback: BodyResponseCallback<Schema$ListPairedDevicesResponse>): void;
|
|
5268
|
+
list(callback: BodyResponseCallback<Schema$ListPairedDevicesResponse>): void;
|
|
5269
|
+
}
|
|
5270
|
+
export interface Params$Resource$Users$Paireddevices$Get extends StandardParameters {
|
|
5271
|
+
/**
|
|
5272
|
+
* Required. The name of the device to retrieve. Format: users/{user\}/devices/{device\}
|
|
5273
|
+
*/
|
|
5274
|
+
name?: string;
|
|
5275
|
+
}
|
|
5276
|
+
export interface Params$Resource$Users$Paireddevices$List extends StandardParameters {
|
|
5277
|
+
/**
|
|
5278
|
+
* Optional. The maximum number of devices to return. The service may return fewer than this value. If unspecified, at most 5 devices will be returned. The maximum value is 100. values above 100 will be coerced to 100.
|
|
5279
|
+
*/
|
|
5280
|
+
pageSize?: number;
|
|
5281
|
+
/**
|
|
5282
|
+
* Optional. A page token, received from a previous `ListPairedDevices` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPairedDevices` must match the call that provided the page token.
|
|
5283
|
+
*/
|
|
5284
|
+
pageToken?: string;
|
|
5285
|
+
/**
|
|
5286
|
+
* Required. The parent, which owns this collection of devices. Format: users/{user\}
|
|
5287
|
+
*/
|
|
5288
|
+
parent?: string;
|
|
5289
|
+
}
|
|
3964
5290
|
export {};
|
|
3965
5291
|
}
|