@googleapis/health 1.0.0 → 3.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 +22 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/v4.d.ts +1714 -139
- package/build/v4.js +334 -0
- package/build/v4.js.map +1 -1
- package/package.json +1 -1
- package/v4.ts +2371 -103
package/v4.ts
CHANGED
|
@@ -113,6 +113,7 @@ export namespace health_v4 {
|
|
|
113
113
|
export class Health {
|
|
114
114
|
context: APIRequestContext;
|
|
115
115
|
projects: Resource$Projects;
|
|
116
|
+
shl: Resource$Shl;
|
|
116
117
|
users: Resource$Users;
|
|
117
118
|
|
|
118
119
|
constructor(options: GlobalOptions, google?: GoogleConfigurable) {
|
|
@@ -122,10 +123,33 @@ export namespace health_v4 {
|
|
|
122
123
|
};
|
|
123
124
|
|
|
124
125
|
this.projects = new Resource$Projects(this.context);
|
|
126
|
+
this.shl = new Resource$Shl(this.context);
|
|
125
127
|
this.users = new Resource$Users(this.context);
|
|
126
128
|
}
|
|
127
129
|
}
|
|
128
130
|
|
|
131
|
+
/**
|
|
132
|
+
* Energy burned as part of an activity, excluding the basal energy burn.
|
|
133
|
+
*/
|
|
134
|
+
export interface Schema$ActiveEnergyBurned {
|
|
135
|
+
/**
|
|
136
|
+
* Required. Observed interval
|
|
137
|
+
*/
|
|
138
|
+
interval?: Schema$ObservationTimeInterval;
|
|
139
|
+
/**
|
|
140
|
+
* Required. Energy burned during an activity, measured in kilocalories.
|
|
141
|
+
*/
|
|
142
|
+
kcal?: number | null;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Represents the result of the rollup of active energy burned.
|
|
146
|
+
*/
|
|
147
|
+
export interface Schema$ActiveEnergyBurnedRollupValue {
|
|
148
|
+
/**
|
|
149
|
+
* Output only. Sum of the active energy burned in kilocalories.
|
|
150
|
+
*/
|
|
151
|
+
kcalSum?: number | null;
|
|
152
|
+
}
|
|
129
153
|
/**
|
|
130
154
|
* Record of active minutes in a given time interval.
|
|
131
155
|
*/
|
|
@@ -243,6 +267,43 @@ export namespace health_v4 {
|
|
|
243
267
|
*/
|
|
244
268
|
activityLevelRollupsByActivityLevelType?: Schema$ActivityLevelRollupByActivityLevelType[];
|
|
245
269
|
}
|
|
270
|
+
/**
|
|
271
|
+
* 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).
|
|
272
|
+
*/
|
|
273
|
+
export interface Schema$AlertWindow {
|
|
274
|
+
/**
|
|
275
|
+
* Output only. Observed interval end time in civil time in the timezone the subject is in at the end of the observed interval
|
|
276
|
+
*/
|
|
277
|
+
civilEndTime?: Schema$CivilDateTime;
|
|
278
|
+
/**
|
|
279
|
+
* Output only. Observed interval start time in civil time in the timezone the subject is in at the start of the observed interval
|
|
280
|
+
*/
|
|
281
|
+
civilStartTime?: Schema$CivilDateTime;
|
|
282
|
+
/**
|
|
283
|
+
* Required. The end time of the analysis window.
|
|
284
|
+
*/
|
|
285
|
+
endTime?: string | null;
|
|
286
|
+
/**
|
|
287
|
+
* Required. The UTC offset of the user's timezone when the analysis window ended.
|
|
288
|
+
*/
|
|
289
|
+
endUtcOffset?: string | null;
|
|
290
|
+
/**
|
|
291
|
+
* Optional. All heart beats in the interval contained in this analysis window.
|
|
292
|
+
*/
|
|
293
|
+
heartBeats?: Schema$HeartBeat[];
|
|
294
|
+
/**
|
|
295
|
+
* 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.
|
|
296
|
+
*/
|
|
297
|
+
positive?: boolean | null;
|
|
298
|
+
/**
|
|
299
|
+
* Required. Observed interval. The start time of the analysis window.
|
|
300
|
+
*/
|
|
301
|
+
startTime?: string | null;
|
|
302
|
+
/**
|
|
303
|
+
* Required. The UTC offset of the user's timezone when the analysis window started.
|
|
304
|
+
*/
|
|
305
|
+
startUtcOffset?: string | null;
|
|
306
|
+
}
|
|
246
307
|
/**
|
|
247
308
|
* Captures the altitude gain (i.e. deltas), and not level above sea, for a user in millimeters.
|
|
248
309
|
*/
|
|
@@ -304,6 +365,48 @@ export namespace health_v4 {
|
|
|
304
365
|
*/
|
|
305
366
|
names?: string[] | null;
|
|
306
367
|
}
|
|
368
|
+
/**
|
|
369
|
+
* Represents a blood glucose level measurement. LINT: LEGACY_NAMES
|
|
370
|
+
*/
|
|
371
|
+
export interface Schema$BloodGlucose {
|
|
372
|
+
/**
|
|
373
|
+
* Required. Blood glucose level concentration in mg/dL.
|
|
374
|
+
*/
|
|
375
|
+
bloodGlucoseMilligramsPerDeciliter?: number | null;
|
|
376
|
+
/**
|
|
377
|
+
* Optional. Meal type of the measurement.
|
|
378
|
+
*/
|
|
379
|
+
mealType?: string | null;
|
|
380
|
+
/**
|
|
381
|
+
* Optional. Source of the measurement.
|
|
382
|
+
*/
|
|
383
|
+
measurementSource?: string | null;
|
|
384
|
+
/**
|
|
385
|
+
* Optional. Timing of the measurement.
|
|
386
|
+
*/
|
|
387
|
+
measurementTiming?: string | null;
|
|
388
|
+
/**
|
|
389
|
+
* Optional. Standard free-form notes captured at manual logging.
|
|
390
|
+
*/
|
|
391
|
+
notes?: string | null;
|
|
392
|
+
/**
|
|
393
|
+
* Required. The time at which blood glucose was measured.
|
|
394
|
+
*/
|
|
395
|
+
sampleTime?: Schema$ObservationSampleTime;
|
|
396
|
+
/**
|
|
397
|
+
* Optional. Type of body fluid used to measure the blood glucose.
|
|
398
|
+
*/
|
|
399
|
+
specimen?: string | null;
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* Represents the result of the rollup of the blood glucose data type. LINT: LEGACY_NAMES
|
|
403
|
+
*/
|
|
404
|
+
export interface Schema$BloodGlucoseRollupValue {
|
|
405
|
+
/**
|
|
406
|
+
* Average blood glucose level in mg/dL.
|
|
407
|
+
*/
|
|
408
|
+
bloodGlucoseMilligramsPerDeciliterAvg?: number | null;
|
|
409
|
+
}
|
|
307
410
|
/**
|
|
308
411
|
* Body fat measurement.
|
|
309
412
|
*/
|
|
@@ -374,6 +477,44 @@ export namespace health_v4 {
|
|
|
374
477
|
*/
|
|
375
478
|
start?: Schema$CivilDateTime;
|
|
376
479
|
}
|
|
480
|
+
/**
|
|
481
|
+
* Core body temperature measurement, distinct from peripheral body temperature, reflects the temperature of the body's internal organs.
|
|
482
|
+
*/
|
|
483
|
+
export interface Schema$CoreBodyTemperature {
|
|
484
|
+
/**
|
|
485
|
+
* Optional. The unique identifier of the core body temperature measurement.
|
|
486
|
+
*/
|
|
487
|
+
id?: string | null;
|
|
488
|
+
/**
|
|
489
|
+
* Optional. The location of the core body temperature measurement.
|
|
490
|
+
*/
|
|
491
|
+
measurementLocation?: string | null;
|
|
492
|
+
/**
|
|
493
|
+
* Required. The time at which core body temperature was measured.
|
|
494
|
+
*/
|
|
495
|
+
sampleTime?: Schema$ObservationSampleTime;
|
|
496
|
+
/**
|
|
497
|
+
* Required. The core body temperature in Celsius.
|
|
498
|
+
*/
|
|
499
|
+
temperatureCelsius?: number | null;
|
|
500
|
+
}
|
|
501
|
+
/**
|
|
502
|
+
* Represents the result of the rollup of the core body temperature data type.
|
|
503
|
+
*/
|
|
504
|
+
export interface Schema$CoreBodyTemperatureRollupValue {
|
|
505
|
+
/**
|
|
506
|
+
* Average core body temperature in Celsius.
|
|
507
|
+
*/
|
|
508
|
+
temperatureCelsiusAvg?: number | null;
|
|
509
|
+
/**
|
|
510
|
+
* Maximum core body temperature in Celsius.
|
|
511
|
+
*/
|
|
512
|
+
temperatureCelsiusMax?: number | null;
|
|
513
|
+
/**
|
|
514
|
+
* Minimum core body temperature in Celsius.
|
|
515
|
+
*/
|
|
516
|
+
temperatureCelsiusMin?: number | null;
|
|
517
|
+
}
|
|
377
518
|
/**
|
|
378
519
|
* Payload for creating a subscriber.
|
|
379
520
|
*/
|
|
@@ -391,6 +532,19 @@ export namespace health_v4 {
|
|
|
391
532
|
*/
|
|
392
533
|
subscriberConfigs?: Schema$SubscriberConfig[];
|
|
393
534
|
}
|
|
535
|
+
/**
|
|
536
|
+
* Payload for creating a subscription.
|
|
537
|
+
*/
|
|
538
|
+
export interface Schema$CreateSubscriptionPayload {
|
|
539
|
+
/**
|
|
540
|
+
* Optional. Data types subscribed to.
|
|
541
|
+
*/
|
|
542
|
+
dataTypes?: string[] | null;
|
|
543
|
+
/**
|
|
544
|
+
* 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`).
|
|
545
|
+
*/
|
|
546
|
+
user?: string | null;
|
|
547
|
+
}
|
|
394
548
|
/**
|
|
395
549
|
* 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`
|
|
396
550
|
*/
|
|
@@ -494,9 +648,13 @@ export namespace health_v4 {
|
|
|
494
648
|
calculationMethod?: string | null;
|
|
495
649
|
}
|
|
496
650
|
/**
|
|
497
|
-
* Value of a daily rollup for a single civil time interval (aggregation window)
|
|
651
|
+
* 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.
|
|
498
652
|
*/
|
|
499
653
|
export interface Schema$DailyRollupDataPoint {
|
|
654
|
+
/**
|
|
655
|
+
* Returned by default when rolling up data points from the `active-energy-burned` data type.
|
|
656
|
+
*/
|
|
657
|
+
activeEnergyBurned?: Schema$ActiveEnergyBurnedRollupValue;
|
|
500
658
|
/**
|
|
501
659
|
* 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.
|
|
502
660
|
*/
|
|
@@ -513,6 +671,10 @@ export namespace health_v4 {
|
|
|
513
671
|
* Returned by default when rolling up data points from the `altitude` data type, or when requested explicitly using the `altitude` rollup type identifier.
|
|
514
672
|
*/
|
|
515
673
|
altitude?: Schema$AltitudeRollupValue;
|
|
674
|
+
/**
|
|
675
|
+
* Returned by default when rolling up data points from the `blood-glucose` data type.
|
|
676
|
+
*/
|
|
677
|
+
bloodGlucose?: Schema$BloodGlucoseRollupValue;
|
|
516
678
|
/**
|
|
517
679
|
* 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.
|
|
518
680
|
*/
|
|
@@ -529,6 +691,10 @@ export namespace health_v4 {
|
|
|
529
691
|
* Start time of the window this value aggregates over
|
|
530
692
|
*/
|
|
531
693
|
civilStartTime?: Schema$CivilDateTime;
|
|
694
|
+
/**
|
|
695
|
+
* 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.
|
|
696
|
+
*/
|
|
697
|
+
coreBodyTemperature?: Schema$CoreBodyTemperatureRollupValue;
|
|
532
698
|
/**
|
|
533
699
|
* Returned by default when rolling up data points from the `distance` data type, or when requested explicitly using the `distance` rollup type identifier.
|
|
534
700
|
*/
|
|
@@ -549,6 +715,10 @@ export namespace health_v4 {
|
|
|
549
715
|
* 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.
|
|
550
716
|
*/
|
|
551
717
|
hydrationLog?: Schema$HydrationLogRollupValue;
|
|
718
|
+
/**
|
|
719
|
+
* 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.
|
|
720
|
+
*/
|
|
721
|
+
nutritionLog?: Schema$NutritionLogRollupValue;
|
|
552
722
|
/**
|
|
553
723
|
* 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.
|
|
554
724
|
*/
|
|
@@ -666,6 +836,10 @@ export namespace health_v4 {
|
|
|
666
836
|
* A computed or recorded metric.
|
|
667
837
|
*/
|
|
668
838
|
export interface Schema$DataPoint {
|
|
839
|
+
/**
|
|
840
|
+
* Optional. Data for points in the `active-energy-burned` interval data type collection.
|
|
841
|
+
*/
|
|
842
|
+
activeEnergyBurned?: Schema$ActiveEnergyBurned;
|
|
669
843
|
/**
|
|
670
844
|
* Optional. Data for points in the `active-minutes` interval data type collection.
|
|
671
845
|
*/
|
|
@@ -686,10 +860,18 @@ export namespace health_v4 {
|
|
|
686
860
|
* Optional. Data for points in the `basal-energy-burned` interval data type collection.
|
|
687
861
|
*/
|
|
688
862
|
basalEnergyBurned?: Schema$BasalEnergyBurned;
|
|
863
|
+
/**
|
|
864
|
+
* Optional. Data for points in the `blood-glucose` sample data type collection.
|
|
865
|
+
*/
|
|
866
|
+
bloodGlucose?: Schema$BloodGlucose;
|
|
689
867
|
/**
|
|
690
868
|
* Optional. Data for points in the `body-fat` sample data type collection.
|
|
691
869
|
*/
|
|
692
870
|
bodyFat?: Schema$BodyFat;
|
|
871
|
+
/**
|
|
872
|
+
* Optional. Data for points in the `core-body-temperature` sample data type collection.
|
|
873
|
+
*/
|
|
874
|
+
coreBodyTemperature?: Schema$CoreBodyTemperature;
|
|
693
875
|
/**
|
|
694
876
|
* Optional. Data for points in the `daily-heart-rate-variability` daily data type collection.
|
|
695
877
|
*/
|
|
@@ -726,6 +908,10 @@ export namespace health_v4 {
|
|
|
726
908
|
* Optional. Data for points in the `distance` interval data type collection.
|
|
727
909
|
*/
|
|
728
910
|
distance?: Schema$Distance;
|
|
911
|
+
/**
|
|
912
|
+
* Optional. Data for points in the `electrocardiogram` session data type collection.
|
|
913
|
+
*/
|
|
914
|
+
electrocardiogram?: Schema$Electrocardiogram;
|
|
729
915
|
/**
|
|
730
916
|
* Optional. Data for points in the `exercise` session data type collection.
|
|
731
917
|
*/
|
|
@@ -734,6 +920,14 @@ export namespace health_v4 {
|
|
|
734
920
|
* Optional. Data for points in the `floors` interval data type collection.
|
|
735
921
|
*/
|
|
736
922
|
floors?: Schema$Floors;
|
|
923
|
+
/**
|
|
924
|
+
* Optional. The food details.
|
|
925
|
+
*/
|
|
926
|
+
food?: Schema$Food;
|
|
927
|
+
/**
|
|
928
|
+
* Optional. The food measurement unit details.
|
|
929
|
+
*/
|
|
930
|
+
foodMeasurementUnit?: Schema$FoodMeasurementUnit;
|
|
737
931
|
/**
|
|
738
932
|
* Optional. Data for points in the `heart-rate` sample data type collection.
|
|
739
933
|
*/
|
|
@@ -751,9 +945,17 @@ export namespace health_v4 {
|
|
|
751
945
|
*/
|
|
752
946
|
hydrationLog?: Schema$HydrationLog;
|
|
753
947
|
/**
|
|
754
|
-
*
|
|
948
|
+
* Optional. Data for points in the `irregular-rhythm-notification` session data type collection.
|
|
949
|
+
*/
|
|
950
|
+
irregularRhythmNotification?: Schema$IrregularRhythmNotification;
|
|
951
|
+
/**
|
|
952
|
+
* 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. `heart-rate` for the `heart_rate` 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.
|
|
755
953
|
*/
|
|
756
954
|
name?: string | null;
|
|
955
|
+
/**
|
|
956
|
+
* Optional. Data for points in the `nutrition-log` session data type collection.
|
|
957
|
+
*/
|
|
958
|
+
nutritionLog?: Schema$NutritionLog;
|
|
757
959
|
/**
|
|
758
960
|
* Optional. Data for points in the `oxygen-saturation` sample data type collection.
|
|
759
961
|
*/
|
|
@@ -914,7 +1116,48 @@ export namespace health_v4 {
|
|
|
914
1116
|
millimetersSum?: string | null;
|
|
915
1117
|
}
|
|
916
1118
|
/**
|
|
917
|
-
*
|
|
1119
|
+
* Represents an Electrocardiogram (ECG) measurement session. This data type is based on SaMD feature and any changes to it may require additional review.
|
|
1120
|
+
*/
|
|
1121
|
+
export interface Schema$Electrocardiogram {
|
|
1122
|
+
/**
|
|
1123
|
+
* Optional. Average heart rate recorded during ECG reading in beats per minute.
|
|
1124
|
+
*/
|
|
1125
|
+
beatsPerMinuteAvg?: string | null;
|
|
1126
|
+
/**
|
|
1127
|
+
* 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.
|
|
1128
|
+
*/
|
|
1129
|
+
interval?: Schema$SessionTimeInterval;
|
|
1130
|
+
/**
|
|
1131
|
+
* Optional. The number of leads used for ECG reading.
|
|
1132
|
+
*/
|
|
1133
|
+
leadNumber?: number | null;
|
|
1134
|
+
/**
|
|
1135
|
+
* 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`.
|
|
1136
|
+
*/
|
|
1137
|
+
medicalDeviceInfo?: Schema$MedicalDeviceInfo;
|
|
1138
|
+
/**
|
|
1139
|
+
* Optional. The factor by which to divide waveform samples to get voltage in millivolts: millivolts = waveform_sample / millivolts_scaling_factor.
|
|
1140
|
+
*/
|
|
1141
|
+
millivoltsScalingFactor?: number | null;
|
|
1142
|
+
/**
|
|
1143
|
+
* Optional. The result classification of the ECG reading.
|
|
1144
|
+
*/
|
|
1145
|
+
resultClassification?: string | null;
|
|
1146
|
+
/**
|
|
1147
|
+
* Optional. The sampling frequency of waveform samples in hertz.
|
|
1148
|
+
*/
|
|
1149
|
+
samplingFrequencyHertz?: number | null;
|
|
1150
|
+
/**
|
|
1151
|
+
* 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.
|
|
1152
|
+
*/
|
|
1153
|
+
waveformSamples?: number[] | null;
|
|
1154
|
+
}
|
|
1155
|
+
/**
|
|
1156
|
+
* 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); \}
|
|
1157
|
+
*/
|
|
1158
|
+
export interface Schema$Empty {}
|
|
1159
|
+
/**
|
|
1160
|
+
* 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 `GOOGLE-HEALTH-API-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.
|
|
918
1161
|
*/
|
|
919
1162
|
export interface Schema$EndpointAuthorization {
|
|
920
1163
|
/**
|
|
@@ -926,6 +1169,32 @@ export namespace health_v4 {
|
|
|
926
1169
|
*/
|
|
927
1170
|
secretSet?: boolean | null;
|
|
928
1171
|
}
|
|
1172
|
+
/**
|
|
1173
|
+
* Represents the energy quantity.
|
|
1174
|
+
*/
|
|
1175
|
+
export interface Schema$EnergyQuantity {
|
|
1176
|
+
/**
|
|
1177
|
+
* Required. The energy value in kilocalories.
|
|
1178
|
+
*/
|
|
1179
|
+
kcal?: number | null;
|
|
1180
|
+
/**
|
|
1181
|
+
* Optional. Value representing the user provided unit.
|
|
1182
|
+
*/
|
|
1183
|
+
userProvidedUnit?: string | null;
|
|
1184
|
+
}
|
|
1185
|
+
/**
|
|
1186
|
+
* Rollup for the energy quantity.
|
|
1187
|
+
*/
|
|
1188
|
+
export interface Schema$EnergyQuantityRollup {
|
|
1189
|
+
/**
|
|
1190
|
+
* Required. The sum of the energy in kilocalories.
|
|
1191
|
+
*/
|
|
1192
|
+
kcalSum?: number | null;
|
|
1193
|
+
/**
|
|
1194
|
+
* Optional. The user provided unit on the last element.
|
|
1195
|
+
*/
|
|
1196
|
+
userProvidedUnitLast?: string | null;
|
|
1197
|
+
}
|
|
929
1198
|
/**
|
|
930
1199
|
* An exercise that stores information about a physical activity.
|
|
931
1200
|
*/
|
|
@@ -1014,7 +1283,7 @@ export namespace health_v4 {
|
|
|
1014
1283
|
*/
|
|
1015
1284
|
export interface Schema$ExportExerciseTcxResponse {
|
|
1016
1285
|
/**
|
|
1017
|
-
* Contains the exported TCX data.
|
|
1286
|
+
* 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.
|
|
1018
1287
|
*/
|
|
1019
1288
|
tcxData?: string | null;
|
|
1020
1289
|
}
|
|
@@ -1040,6 +1309,109 @@ export namespace health_v4 {
|
|
|
1040
1309
|
*/
|
|
1041
1310
|
countSum?: string | null;
|
|
1042
1311
|
}
|
|
1312
|
+
/**
|
|
1313
|
+
* Represents a food item.
|
|
1314
|
+
*/
|
|
1315
|
+
export interface Schema$Food {
|
|
1316
|
+
/**
|
|
1317
|
+
* Required. The access level of the food.
|
|
1318
|
+
*/
|
|
1319
|
+
accessLevel?: string | null;
|
|
1320
|
+
/**
|
|
1321
|
+
* Optional. The brand of the food.
|
|
1322
|
+
*/
|
|
1323
|
+
brand?: string | null;
|
|
1324
|
+
/**
|
|
1325
|
+
* Required. Value representing the default serving of the food.
|
|
1326
|
+
*/
|
|
1327
|
+
defaultServing?: Schema$FoodServing;
|
|
1328
|
+
/**
|
|
1329
|
+
* Optional. The description of the food.
|
|
1330
|
+
*/
|
|
1331
|
+
description?: string | null;
|
|
1332
|
+
/**
|
|
1333
|
+
* Required. The display name of the food.
|
|
1334
|
+
*/
|
|
1335
|
+
displayName?: string | null;
|
|
1336
|
+
/**
|
|
1337
|
+
* Optional. Value representing the average energy of the food for the default serving.
|
|
1338
|
+
*/
|
|
1339
|
+
energyAvg?: Schema$EnergyQuantity;
|
|
1340
|
+
/**
|
|
1341
|
+
* Optional. Value representing the energy from fat of the food for the default serving.
|
|
1342
|
+
*/
|
|
1343
|
+
energyFromFat?: Schema$EnergyQuantity;
|
|
1344
|
+
/**
|
|
1345
|
+
* Optional. Value representing the maximum energy of the food for the default serving.
|
|
1346
|
+
*/
|
|
1347
|
+
energyMax?: Schema$EnergyQuantity;
|
|
1348
|
+
/**
|
|
1349
|
+
* Optional. Value representing the minimum energy of the food for the default serving.
|
|
1350
|
+
*/
|
|
1351
|
+
energyMin?: Schema$EnergyQuantity;
|
|
1352
|
+
/**
|
|
1353
|
+
* Optional. The language code where the food is available in format xx-XX. Supported values are defined in Settings.food_language_code.
|
|
1354
|
+
*/
|
|
1355
|
+
languageCode?: string | null;
|
|
1356
|
+
/**
|
|
1357
|
+
* Optional. The meal type associated with this food.
|
|
1358
|
+
*/
|
|
1359
|
+
mealType?: string | null;
|
|
1360
|
+
/**
|
|
1361
|
+
* Optional. Value representing the nutrients of the food for the default serving.
|
|
1362
|
+
*/
|
|
1363
|
+
nutrients?: Schema$NutrientQuantity[];
|
|
1364
|
+
/**
|
|
1365
|
+
* Optional. The serving of the food.
|
|
1366
|
+
*/
|
|
1367
|
+
servings?: Schema$FoodServing[];
|
|
1368
|
+
/**
|
|
1369
|
+
* Optional. Value representing the total carbohydrate of the food for the default serving.
|
|
1370
|
+
*/
|
|
1371
|
+
totalCarbohydrate?: Schema$WeightQuantity;
|
|
1372
|
+
/**
|
|
1373
|
+
* Optional. Value representing the total fat of the food for the default serving.
|
|
1374
|
+
*/
|
|
1375
|
+
totalFat?: Schema$WeightQuantity;
|
|
1376
|
+
}
|
|
1377
|
+
/**
|
|
1378
|
+
* Represents a food measurement unit.
|
|
1379
|
+
*/
|
|
1380
|
+
export interface Schema$FoodMeasurementUnit {
|
|
1381
|
+
/**
|
|
1382
|
+
* Required. The display name of the food measurement unit (e.g., "gram", "piece").
|
|
1383
|
+
*/
|
|
1384
|
+
displayName?: string | null;
|
|
1385
|
+
/**
|
|
1386
|
+
* Optional. The plural display name of the food measurement unit (e.g., "grams", "pieces").
|
|
1387
|
+
*/
|
|
1388
|
+
pluralDisplayName?: string | null;
|
|
1389
|
+
}
|
|
1390
|
+
/**
|
|
1391
|
+
* Represents different properties and information about the serving of a specific food.
|
|
1392
|
+
*/
|
|
1393
|
+
export interface Schema$FoodServing {
|
|
1394
|
+
/**
|
|
1395
|
+
* Optional. Amount of food consumed, fractional values are supported.
|
|
1396
|
+
*/
|
|
1397
|
+
amount?: number | null;
|
|
1398
|
+
/**
|
|
1399
|
+
* Required. Food measurement unit
|
|
1400
|
+
*/
|
|
1401
|
+
foodMeasurementUnit?: string | null;
|
|
1402
|
+
/**
|
|
1403
|
+
* Output only. Legacy measurement unit for serving size in singular form (e.g. "piece", "gram").
|
|
1404
|
+
*/
|
|
1405
|
+
foodMeasurementUnitDisplayName?: string | null;
|
|
1406
|
+
/**
|
|
1407
|
+
* Output only. Legacy measurement unit for serving size in plural form (e.g. "pieces", "grams").
|
|
1408
|
+
*/
|
|
1409
|
+
foodMeasurementUnitDisplayNamePlural?: string | null;
|
|
1410
|
+
/**
|
|
1411
|
+
* Optional. Value representing the multiplier used to compute the energy when using this serving instead of the default serving.
|
|
1412
|
+
*/
|
|
1413
|
+
multiplier?: number | null;
|
|
1414
|
+
}
|
|
1043
1415
|
/**
|
|
1044
1416
|
* 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.
|
|
1045
1417
|
*/
|
|
@@ -1049,6 +1421,15 @@ export namespace health_v4 {
|
|
|
1049
1421
|
*/
|
|
1050
1422
|
name?: string | null;
|
|
1051
1423
|
}
|
|
1424
|
+
/**
|
|
1425
|
+
* Represents a user in the Google Health API. It matches the parent resource of collections owned by the user. Clients currently do not need to interact with this resource directly.
|
|
1426
|
+
*/
|
|
1427
|
+
export interface Schema$GoogleDevicesandservicesHealthV4User {
|
|
1428
|
+
/**
|
|
1429
|
+
* Identifier. The resource name of the user. The `{user\}` ID is a system-generated identifier, as described in Identity.health_user_id. Format: `users/{user\}`
|
|
1430
|
+
*/
|
|
1431
|
+
name?: string | null;
|
|
1432
|
+
}
|
|
1052
1433
|
/**
|
|
1053
1434
|
* Log message for a webhook notification sent by the Google Health API to a subscriber's endpoint. Includes the HTTP response received from the endpoint.
|
|
1054
1435
|
*/
|
|
@@ -1058,6 +1439,27 @@ export namespace health_v4 {
|
|
|
1058
1439
|
*/
|
|
1059
1440
|
httpResponse?: Schema$HttpResponse;
|
|
1060
1441
|
}
|
|
1442
|
+
/**
|
|
1443
|
+
* A single heart beat measurement.
|
|
1444
|
+
*/
|
|
1445
|
+
export interface Schema$HeartBeat {
|
|
1446
|
+
/**
|
|
1447
|
+
* 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).
|
|
1448
|
+
*/
|
|
1449
|
+
beatsPerMinute?: number | null;
|
|
1450
|
+
/**
|
|
1451
|
+
* Output only. The civil time in the timezone the subject is in at the time of the observation.
|
|
1452
|
+
*/
|
|
1453
|
+
civilTime?: Schema$CivilDateTime;
|
|
1454
|
+
/**
|
|
1455
|
+
* Required. The time of the heart beat measurement.
|
|
1456
|
+
*/
|
|
1457
|
+
physicalTime?: string | null;
|
|
1458
|
+
/**
|
|
1459
|
+
* Required. The UTC offset of the user's timezone when the heart beat measurement occurred.
|
|
1460
|
+
*/
|
|
1461
|
+
utcOffset?: string | null;
|
|
1462
|
+
}
|
|
1061
1463
|
/**
|
|
1062
1464
|
* A heart rate measurement.
|
|
1063
1465
|
*/
|
|
@@ -1110,7 +1512,7 @@ export namespace health_v4 {
|
|
|
1110
1512
|
*/
|
|
1111
1513
|
export interface Schema$HeartRateVariability {
|
|
1112
1514
|
/**
|
|
1113
|
-
* Optional. The root mean square of successive differences between normal heartbeats. This is a measure of heart rate variability used by
|
|
1515
|
+
* Optional. The root mean square of successive differences between normal heartbeats. This is a measure of heart rate variability used by Google Health.
|
|
1114
1516
|
*/
|
|
1115
1517
|
rootMeanSquareOfSuccessiveDifferencesMilliseconds?: number | null;
|
|
1116
1518
|
/**
|
|
@@ -1165,6 +1567,23 @@ export namespace health_v4 {
|
|
|
1165
1567
|
*/
|
|
1166
1568
|
sampleTime?: Schema$ObservationSampleTime;
|
|
1167
1569
|
}
|
|
1570
|
+
/**
|
|
1571
|
+
* Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; \} service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); \} Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); \} Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.
|
|
1572
|
+
*/
|
|
1573
|
+
export interface Schema$HttpBody {
|
|
1574
|
+
/**
|
|
1575
|
+
* The HTTP Content-Type header value specifying the content type of the body.
|
|
1576
|
+
*/
|
|
1577
|
+
contentType?: string | null;
|
|
1578
|
+
/**
|
|
1579
|
+
* The HTTP request/response body as raw binary.
|
|
1580
|
+
*/
|
|
1581
|
+
data?: string | null;
|
|
1582
|
+
/**
|
|
1583
|
+
* Application specific response metadata. Must be set in the first response for streaming APIs.
|
|
1584
|
+
*/
|
|
1585
|
+
extensions?: Array<{[key: string]: any}> | null;
|
|
1586
|
+
}
|
|
1168
1587
|
/**
|
|
1169
1588
|
* Represents an HTTP header.
|
|
1170
1589
|
*/
|
|
@@ -1252,18 +1671,69 @@ export namespace health_v4 {
|
|
|
1252
1671
|
startTime?: string | null;
|
|
1253
1672
|
}
|
|
1254
1673
|
/**
|
|
1255
|
-
*
|
|
1674
|
+
* 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.
|
|
1256
1675
|
*/
|
|
1257
|
-
export interface Schema$
|
|
1676
|
+
export interface Schema$IrnProfile {
|
|
1258
1677
|
/**
|
|
1259
|
-
*
|
|
1678
|
+
* Required. Whether or not the user is currently enrolled in having their data processed for IRN alerts.
|
|
1260
1679
|
*/
|
|
1261
|
-
|
|
1680
|
+
enrollmentStatus?: boolean | null;
|
|
1262
1681
|
/**
|
|
1263
|
-
*
|
|
1682
|
+
* 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.
|
|
1264
1683
|
*/
|
|
1265
|
-
|
|
1266
|
-
|
|
1684
|
+
name?: string | null;
|
|
1685
|
+
/**
|
|
1686
|
+
* Required. Whether or not the user has onboarded onto the IRN feature.
|
|
1687
|
+
*/
|
|
1688
|
+
onboardingStatus?: boolean | null;
|
|
1689
|
+
/**
|
|
1690
|
+
* Output only. The timestamp of the last piece of analyzable data synced by the user.
|
|
1691
|
+
*/
|
|
1692
|
+
updateTime?: string | null;
|
|
1693
|
+
}
|
|
1694
|
+
/**
|
|
1695
|
+
* 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.
|
|
1696
|
+
*/
|
|
1697
|
+
export interface Schema$IrregularRhythmNotification {
|
|
1698
|
+
/**
|
|
1699
|
+
* Optional. The overlapping analysis windows that were used to evaluate rhythm for potential AFib, containing specific information about the user's heart rhythm.
|
|
1700
|
+
*/
|
|
1701
|
+
alertWindows?: Schema$AlertWindow[];
|
|
1702
|
+
/**
|
|
1703
|
+
* Required. Observed interval.
|
|
1704
|
+
*/
|
|
1705
|
+
interval?: Schema$SessionTimeInterval;
|
|
1706
|
+
/**
|
|
1707
|
+
* 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`.
|
|
1708
|
+
*/
|
|
1709
|
+
medicalDeviceInfo?: Schema$MedicalDeviceInfo;
|
|
1710
|
+
}
|
|
1711
|
+
/**
|
|
1712
|
+
* Response containing raw data points matching the query
|
|
1713
|
+
*/
|
|
1714
|
+
export interface Schema$ListDataPointsResponse {
|
|
1715
|
+
/**
|
|
1716
|
+
* Data points matching the query
|
|
1717
|
+
*/
|
|
1718
|
+
dataPoints?: Schema$DataPoint[];
|
|
1719
|
+
/**
|
|
1720
|
+
* Next page token, empty if the response is complete
|
|
1721
|
+
*/
|
|
1722
|
+
nextPageToken?: string | null;
|
|
1723
|
+
}
|
|
1724
|
+
/**
|
|
1725
|
+
* Response message for ListPairedDevices.
|
|
1726
|
+
*/
|
|
1727
|
+
export interface Schema$ListPairedDevicesResponse {
|
|
1728
|
+
/**
|
|
1729
|
+
* A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
|
|
1730
|
+
*/
|
|
1731
|
+
nextPageToken?: string | null;
|
|
1732
|
+
/**
|
|
1733
|
+
* The paired devices of the user.
|
|
1734
|
+
*/
|
|
1735
|
+
pairedDevices?: Schema$PairedDevice[];
|
|
1736
|
+
}
|
|
1267
1737
|
/**
|
|
1268
1738
|
* Response message for ListSubscribers.
|
|
1269
1739
|
*/
|
|
@@ -1281,6 +1751,61 @@ export namespace health_v4 {
|
|
|
1281
1751
|
*/
|
|
1282
1752
|
totalSize?: number | null;
|
|
1283
1753
|
}
|
|
1754
|
+
/**
|
|
1755
|
+
* Response message for ListSubscriptions.
|
|
1756
|
+
*/
|
|
1757
|
+
export interface Schema$ListSubscriptionsResponse {
|
|
1758
|
+
/**
|
|
1759
|
+
* A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
|
|
1760
|
+
*/
|
|
1761
|
+
nextPageToken?: string | null;
|
|
1762
|
+
/**
|
|
1763
|
+
* The subscriptions from the specified subscriber.
|
|
1764
|
+
*/
|
|
1765
|
+
subscriptions?: Schema$Subscription[];
|
|
1766
|
+
}
|
|
1767
|
+
/**
|
|
1768
|
+
* Represents the POST body contained in a GetShlManifestRequest This message is nested to represent that See https://build.fhir.org/ig/HL7/smart-health-cards-and-links/links-specification.html#smart-health-link-manifest-request
|
|
1769
|
+
*/
|
|
1770
|
+
export interface Schema$ManifestParams {
|
|
1771
|
+
/**
|
|
1772
|
+
* Optional. Integer upper bound on the length of embedded payloads
|
|
1773
|
+
*/
|
|
1774
|
+
embeddedLengthMax?: number | null;
|
|
1775
|
+
/**
|
|
1776
|
+
* Optional.
|
|
1777
|
+
*/
|
|
1778
|
+
passcode?: string | null;
|
|
1779
|
+
/**
|
|
1780
|
+
* Required. A string describing the recipient (e.g.,the name of an organization or person) suitable for display to the Receiving User
|
|
1781
|
+
*/
|
|
1782
|
+
recipient?: string | null;
|
|
1783
|
+
}
|
|
1784
|
+
/**
|
|
1785
|
+
* Software as Medical Device (SaMD) metadata. Used to construct the Unique Device Identifier (UDI).
|
|
1786
|
+
*/
|
|
1787
|
+
export interface Schema$MedicalDeviceInfo {
|
|
1788
|
+
/**
|
|
1789
|
+
* Output only. The algorithm version used by the feature.
|
|
1790
|
+
*/
|
|
1791
|
+
algorithmVersion?: string | null;
|
|
1792
|
+
/**
|
|
1793
|
+
* Output only. The model name or device type of the compatible device used to collect the data.
|
|
1794
|
+
*/
|
|
1795
|
+
deviceModel?: string | null;
|
|
1796
|
+
/**
|
|
1797
|
+
* Output only. The version of the feature/app running on the device.
|
|
1798
|
+
*/
|
|
1799
|
+
featureVersion?: string | null;
|
|
1800
|
+
/**
|
|
1801
|
+
* Output only. The firmware version running on the compatible device used to collect the data.
|
|
1802
|
+
*/
|
|
1803
|
+
firmwareVersion?: string | null;
|
|
1804
|
+
/**
|
|
1805
|
+
* Output only. The service version used by the feature.
|
|
1806
|
+
*/
|
|
1807
|
+
serviceVersion?: string | null;
|
|
1808
|
+
}
|
|
1284
1809
|
/**
|
|
1285
1810
|
* Summary metrics for an exercise.
|
|
1286
1811
|
*/
|
|
@@ -1359,6 +1884,102 @@ export namespace health_v4 {
|
|
|
1359
1884
|
*/
|
|
1360
1885
|
avgVerticalRatio?: number | null;
|
|
1361
1886
|
}
|
|
1887
|
+
/**
|
|
1888
|
+
* Represents the quantity of a nutrient.
|
|
1889
|
+
*/
|
|
1890
|
+
export interface Schema$NutrientQuantity {
|
|
1891
|
+
/**
|
|
1892
|
+
* Required. The nutrient type.
|
|
1893
|
+
*/
|
|
1894
|
+
nutrient?: string | null;
|
|
1895
|
+
/**
|
|
1896
|
+
* Required. The quantity of the nutrient, measured in grams.
|
|
1897
|
+
*/
|
|
1898
|
+
quantity?: Schema$WeightQuantity;
|
|
1899
|
+
}
|
|
1900
|
+
/**
|
|
1901
|
+
* Nutrient quantity rollup.
|
|
1902
|
+
*/
|
|
1903
|
+
export interface Schema$NutrientQuantityRollup {
|
|
1904
|
+
/**
|
|
1905
|
+
* Required. Aggregated nutrient.
|
|
1906
|
+
*/
|
|
1907
|
+
nutrient?: string | null;
|
|
1908
|
+
/**
|
|
1909
|
+
* Required. Aggregated nutrient weight.
|
|
1910
|
+
*/
|
|
1911
|
+
quantity?: Schema$WeightQuantityRollup;
|
|
1912
|
+
}
|
|
1913
|
+
/**
|
|
1914
|
+
* Holds information about food logged by a user. 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 editable.
|
|
1915
|
+
*/
|
|
1916
|
+
export interface Schema$NutritionLog {
|
|
1917
|
+
/**
|
|
1918
|
+
* Optional. The total energy of the food, measured in kilocalories (`kcal`).
|
|
1919
|
+
*/
|
|
1920
|
+
energy?: Schema$EnergyQuantity;
|
|
1921
|
+
/**
|
|
1922
|
+
* Optional. The energy from fat, measured in kilocalories (`kcal`).
|
|
1923
|
+
*/
|
|
1924
|
+
energyFromFat?: Schema$EnergyQuantity;
|
|
1925
|
+
/**
|
|
1926
|
+
* Optional. The resource name of the Food item. Required when creating a nutrition log from an identified food. For anonymous food logs, use the `food_display_name` field instead.
|
|
1927
|
+
*/
|
|
1928
|
+
food?: string | null;
|
|
1929
|
+
/**
|
|
1930
|
+
* The display name of the food. For identified food logs, this is populated automatically from the referenced food.
|
|
1931
|
+
*/
|
|
1932
|
+
foodDisplayName?: string | null;
|
|
1933
|
+
/**
|
|
1934
|
+
* Required. The time window when the food was logged.
|
|
1935
|
+
*/
|
|
1936
|
+
interval?: Schema$SessionTimeInterval;
|
|
1937
|
+
/**
|
|
1938
|
+
* Optional. The meal category. One of `BREAKFAST`, `LUNCH`, `DINNER`, or `SNACK`.
|
|
1939
|
+
*/
|
|
1940
|
+
mealType?: string | null;
|
|
1941
|
+
/**
|
|
1942
|
+
* Optional. An array of individual nutrient values for the nutrition log.
|
|
1943
|
+
*/
|
|
1944
|
+
nutrients?: Schema$NutrientQuantity[];
|
|
1945
|
+
/**
|
|
1946
|
+
* Optional. The serving information for the logged food.
|
|
1947
|
+
*/
|
|
1948
|
+
serving?: Schema$Serving;
|
|
1949
|
+
/**
|
|
1950
|
+
* Optional. The total carbohydrate content, measured in grams.
|
|
1951
|
+
*/
|
|
1952
|
+
totalCarbohydrate?: Schema$WeightQuantity;
|
|
1953
|
+
/**
|
|
1954
|
+
* Optional. The total fat content, measured in grams.
|
|
1955
|
+
*/
|
|
1956
|
+
totalFat?: Schema$WeightQuantity;
|
|
1957
|
+
}
|
|
1958
|
+
/**
|
|
1959
|
+
* Represents the result of the rollup of the nutrition log data type.
|
|
1960
|
+
*/
|
|
1961
|
+
export interface Schema$NutritionLogRollupValue {
|
|
1962
|
+
/**
|
|
1963
|
+
* Energy rollup.
|
|
1964
|
+
*/
|
|
1965
|
+
energy?: Schema$EnergyQuantityRollup;
|
|
1966
|
+
/**
|
|
1967
|
+
* Value Energy from fat rollup.
|
|
1968
|
+
*/
|
|
1969
|
+
energyFromFat?: Schema$EnergyQuantityRollup;
|
|
1970
|
+
/**
|
|
1971
|
+
* List of the nutrient roll-ups by the nutrient type.
|
|
1972
|
+
*/
|
|
1973
|
+
nutrients?: Schema$NutrientQuantityRollup[];
|
|
1974
|
+
/**
|
|
1975
|
+
* Total carbohydrate rollup.
|
|
1976
|
+
*/
|
|
1977
|
+
totalCarbohydrate?: Schema$WeightQuantityRollup;
|
|
1978
|
+
/**
|
|
1979
|
+
* Total fat rollup.
|
|
1980
|
+
*/
|
|
1981
|
+
totalFat?: Schema$WeightQuantityRollup;
|
|
1982
|
+
}
|
|
1362
1983
|
/**
|
|
1363
1984
|
* Represents a sample time of an observed data point.
|
|
1364
1985
|
*/
|
|
@@ -1464,6 +2085,43 @@ export namespace health_v4 {
|
|
|
1464
2085
|
*/
|
|
1465
2086
|
sampleTime?: Schema$ObservationSampleTime;
|
|
1466
2087
|
}
|
|
2088
|
+
/**
|
|
2089
|
+
* 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.
|
|
2090
|
+
*/
|
|
2091
|
+
export interface Schema$PairedDevice {
|
|
2092
|
+
/**
|
|
2093
|
+
* Output only. The battery level of the device.
|
|
2094
|
+
*/
|
|
2095
|
+
batteryLevel?: number | null;
|
|
2096
|
+
/**
|
|
2097
|
+
* Output only. The battery status of the device. Supported: High | Medium | Low | Empty
|
|
2098
|
+
*/
|
|
2099
|
+
batteryStatus?: string | null;
|
|
2100
|
+
/**
|
|
2101
|
+
* Output only. The device type. Supported: TRACKER | SCALE
|
|
2102
|
+
*/
|
|
2103
|
+
deviceType?: string | null;
|
|
2104
|
+
/**
|
|
2105
|
+
* Output only. The product name of the device
|
|
2106
|
+
*/
|
|
2107
|
+
deviceVersion?: string | null;
|
|
2108
|
+
/**
|
|
2109
|
+
* 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.
|
|
2110
|
+
*/
|
|
2111
|
+
features?: string[] | null;
|
|
2112
|
+
/**
|
|
2113
|
+
* Output only. The time of last sync with the Fitbit mobile application.
|
|
2114
|
+
*/
|
|
2115
|
+
lastSyncTime?: string | null;
|
|
2116
|
+
/**
|
|
2117
|
+
* Output only. Mac ID number of the device.
|
|
2118
|
+
*/
|
|
2119
|
+
macAddress?: string | null;
|
|
2120
|
+
/**
|
|
2121
|
+
* Identifier. The resource name of this Device resource. Format: `users/{user\}/pairedDevices/{paired_device\}` Example: `users/1234567890/pairedDevices/123` or `users/me/pairedDevices/123`
|
|
2122
|
+
*/
|
|
2123
|
+
name?: string | null;
|
|
2124
|
+
}
|
|
1467
2125
|
/**
|
|
1468
2126
|
* Profile details.
|
|
1469
2127
|
*/
|
|
@@ -1514,6 +2172,10 @@ export namespace health_v4 {
|
|
|
1514
2172
|
* A reconciled computed or recorded metric.
|
|
1515
2173
|
*/
|
|
1516
2174
|
export interface Schema$ReconciledDataPoint {
|
|
2175
|
+
/**
|
|
2176
|
+
* Data for points in the `active-energy-burned` interval data type collection.
|
|
2177
|
+
*/
|
|
2178
|
+
activeEnergyBurned?: Schema$ActiveEnergyBurned;
|
|
1517
2179
|
/**
|
|
1518
2180
|
* Data for points in the `active-minutes` interval data type collection.
|
|
1519
2181
|
*/
|
|
@@ -1534,10 +2196,18 @@ export namespace health_v4 {
|
|
|
1534
2196
|
* Data for points in the `basal-energy-burned` interval data type collection.
|
|
1535
2197
|
*/
|
|
1536
2198
|
basalEnergyBurned?: Schema$BasalEnergyBurned;
|
|
2199
|
+
/**
|
|
2200
|
+
* Data for points in the `blood-glucose` sample data type collection.
|
|
2201
|
+
*/
|
|
2202
|
+
bloodGlucose?: Schema$BloodGlucose;
|
|
1537
2203
|
/**
|
|
1538
2204
|
* Data for points in the `body-fat` sample data type collection.
|
|
1539
2205
|
*/
|
|
1540
2206
|
bodyFat?: Schema$BodyFat;
|
|
2207
|
+
/**
|
|
2208
|
+
* Data for points in the `core-body-temperature` sample data type collection.
|
|
2209
|
+
*/
|
|
2210
|
+
coreBodyTemperature?: Schema$CoreBodyTemperature;
|
|
1541
2211
|
/**
|
|
1542
2212
|
* Data for points in the `daily-heart-rate-variability` daily data type collection.
|
|
1543
2213
|
*/
|
|
@@ -1567,7 +2237,7 @@ export namespace health_v4 {
|
|
|
1567
2237
|
*/
|
|
1568
2238
|
dailyVo2Max?: Schema$DailyVO2Max;
|
|
1569
2239
|
/**
|
|
1570
|
-
* 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. `
|
|
2240
|
+
* 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. `heart-rate` for the `heart_rate` 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.
|
|
1571
2241
|
*/
|
|
1572
2242
|
dataPointName?: string | null;
|
|
1573
2243
|
/**
|
|
@@ -1598,6 +2268,10 @@ export namespace health_v4 {
|
|
|
1598
2268
|
* Data for points in the `hydration-log` session data type collection.
|
|
1599
2269
|
*/
|
|
1600
2270
|
hydrationLog?: Schema$HydrationLog;
|
|
2271
|
+
/**
|
|
2272
|
+
* Data for points in the `nutrition-log` session data type collection.
|
|
2273
|
+
*/
|
|
2274
|
+
nutritionLog?: Schema$NutritionLog;
|
|
1601
2275
|
/**
|
|
1602
2276
|
* Data for points in the `oxygen-saturation` sample data type collection.
|
|
1603
2277
|
*/
|
|
@@ -1695,9 +2369,13 @@ export namespace health_v4 {
|
|
|
1695
2369
|
beatsPerMinuteMin?: number | null;
|
|
1696
2370
|
}
|
|
1697
2371
|
/**
|
|
1698
|
-
* Value of a rollup for a single physical time interval (aggregation window)
|
|
2372
|
+
* 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.
|
|
1699
2373
|
*/
|
|
1700
2374
|
export interface Schema$RollupDataPoint {
|
|
2375
|
+
/**
|
|
2376
|
+
* Returned by default when rolling up data points from the `active-energy-burned` data type.
|
|
2377
|
+
*/
|
|
2378
|
+
activeEnergyBurned?: Schema$ActiveEnergyBurnedRollupValue;
|
|
1701
2379
|
/**
|
|
1702
2380
|
* 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.
|
|
1703
2381
|
*/
|
|
@@ -1714,6 +2392,10 @@ export namespace health_v4 {
|
|
|
1714
2392
|
* Returned by default when rolling up data points from the `altitude` data type, or when requested explicitly using the `altitude` rollup type identifier.
|
|
1715
2393
|
*/
|
|
1716
2394
|
altitude?: Schema$AltitudeRollupValue;
|
|
2395
|
+
/**
|
|
2396
|
+
* Returned by default when rolling up data points from the `blood-glucose` data type.
|
|
2397
|
+
*/
|
|
2398
|
+
bloodGlucose?: Schema$BloodGlucoseRollupValue;
|
|
1717
2399
|
/**
|
|
1718
2400
|
* 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.
|
|
1719
2401
|
*/
|
|
@@ -1722,6 +2404,10 @@ export namespace health_v4 {
|
|
|
1722
2404
|
* 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.
|
|
1723
2405
|
*/
|
|
1724
2406
|
caloriesInHeartRateZone?: Schema$CaloriesInHeartRateZoneRollupValue;
|
|
2407
|
+
/**
|
|
2408
|
+
* 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.
|
|
2409
|
+
*/
|
|
2410
|
+
coreBodyTemperature?: Schema$CoreBodyTemperatureRollupValue;
|
|
1725
2411
|
/**
|
|
1726
2412
|
* Returned by default when rolling up data points from the `distance` data type, or when requested explicitly using the `distance` rollup type identifier.
|
|
1727
2413
|
*/
|
|
@@ -1742,6 +2428,10 @@ export namespace health_v4 {
|
|
|
1742
2428
|
* 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.
|
|
1743
2429
|
*/
|
|
1744
2430
|
hydrationLog?: Schema$HydrationLogRollupValue;
|
|
2431
|
+
/**
|
|
2432
|
+
* 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.
|
|
2433
|
+
*/
|
|
2434
|
+
nutritionLog?: Schema$NutritionLogRollupValue;
|
|
1745
2435
|
/**
|
|
1746
2436
|
* 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.
|
|
1747
2437
|
*/
|
|
@@ -1796,7 +2486,7 @@ export namespace health_v4 {
|
|
|
1796
2486
|
*/
|
|
1797
2487
|
range?: Schema$Interval;
|
|
1798
2488
|
/**
|
|
1799
|
-
* Required. The size of the time window to group data points into before applying the aggregation functions.
|
|
2489
|
+
* Required. The size of the time window to group data points into before applying the aggregation functions. Must be at least 1 second.
|
|
1800
2490
|
*/
|
|
1801
2491
|
windowSize?: string | null;
|
|
1802
2492
|
}
|
|
@@ -1861,6 +2551,23 @@ export namespace health_v4 {
|
|
|
1861
2551
|
*/
|
|
1862
2552
|
durationSum?: string | null;
|
|
1863
2553
|
}
|
|
2554
|
+
/**
|
|
2555
|
+
* Represents different properties and information about the serving of a specific food.
|
|
2556
|
+
*/
|
|
2557
|
+
export interface Schema$Serving {
|
|
2558
|
+
/**
|
|
2559
|
+
* Optional. The number of servings.
|
|
2560
|
+
*/
|
|
2561
|
+
amount?: number | null;
|
|
2562
|
+
/**
|
|
2563
|
+
* Required. Food measurement unit
|
|
2564
|
+
*/
|
|
2565
|
+
foodMeasurementUnit?: string | null;
|
|
2566
|
+
/**
|
|
2567
|
+
* Output only. Legacy measurement unit for serving size in singular form (e.g. "piece", "gram").
|
|
2568
|
+
*/
|
|
2569
|
+
foodMeasurementUnitDisplayName?: string | null;
|
|
2570
|
+
}
|
|
1864
2571
|
/**
|
|
1865
2572
|
* Represents a time interval of session data point, which bundles multiple observed metrics together.
|
|
1866
2573
|
*/
|
|
@@ -1902,6 +2609,10 @@ export namespace health_v4 {
|
|
|
1902
2609
|
* Optional. The measurement unit defined in the user's account settings. Updates to this field are currently not supported.
|
|
1903
2610
|
*/
|
|
1904
2611
|
distanceUnit?: string | null;
|
|
2612
|
+
/**
|
|
2613
|
+
* 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.
|
|
2614
|
+
*/
|
|
2615
|
+
foodLanguageCode?: string | null;
|
|
1905
2616
|
/**
|
|
1906
2617
|
* Optional. The measurement unit defined in the user's account settings.
|
|
1907
2618
|
*/
|
|
@@ -1964,7 +2675,7 @@ export namespace health_v4 {
|
|
|
1964
2675
|
*/
|
|
1965
2676
|
interval?: Schema$SessionTimeInterval;
|
|
1966
2677
|
/**
|
|
1967
|
-
* Optional. Sleep metadata:
|
|
2678
|
+
* Optional. Sleep metadata: `processed`, `main_sleep`, `manually_edited`, and `stages_status`.
|
|
1968
2679
|
*/
|
|
1969
2680
|
metadata?: Schema$SleepMetadata;
|
|
1970
2681
|
/**
|
|
@@ -1996,6 +2707,10 @@ export namespace health_v4 {
|
|
|
1996
2707
|
* Optional. Sleep identifier relevant in the context of the data source.
|
|
1997
2708
|
*/
|
|
1998
2709
|
externalId?: string | null;
|
|
2710
|
+
/**
|
|
2711
|
+
* Output only. `main_sleep`: the longest sleep session with stages within one day. If no sleep session has stages, then the longest sleep is the `main_sleep`. If there are multiple days of sleep in the response, there is one `main_sleep` per day.
|
|
2712
|
+
*/
|
|
2713
|
+
mainSleep?: boolean | null;
|
|
1999
2714
|
/**
|
|
2000
2715
|
* Output only. Some sleeps autodetected by algorithms can be manually edited by users.
|
|
2001
2716
|
*/
|
|
@@ -2005,7 +2720,7 @@ export namespace health_v4 {
|
|
|
2005
2720
|
*/
|
|
2006
2721
|
nap?: boolean | null;
|
|
2007
2722
|
/**
|
|
2008
|
-
* Output only. Sleep and sleep stages algorithms finished processing.
|
|
2723
|
+
* Output only. Sleep and sleep stages algorithms finished processing. A `true` value indicates whether all data processing for the session is complete. A `false` value means sleep period is detected but sleep stages is still processing.
|
|
2009
2724
|
*/
|
|
2010
2725
|
processed?: boolean | null;
|
|
2011
2726
|
/**
|
|
@@ -2202,7 +2917,7 @@ export namespace health_v4 {
|
|
|
2202
2917
|
*/
|
|
2203
2918
|
export interface Schema$SubscriberConfig {
|
|
2204
2919
|
/**
|
|
2205
|
-
* Required.
|
|
2920
|
+
* 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.
|
|
2206
2921
|
*/
|
|
2207
2922
|
dataTypes?: string[] | null;
|
|
2208
2923
|
/**
|
|
@@ -2210,6 +2925,23 @@ export namespace health_v4 {
|
|
|
2210
2925
|
*/
|
|
2211
2926
|
subscriptionCreatePolicy?: string | null;
|
|
2212
2927
|
}
|
|
2928
|
+
/**
|
|
2929
|
+
* A subscription to a data collection for a specific user, to be delivered to a subscriber.
|
|
2930
|
+
*/
|
|
2931
|
+
export interface Schema$Subscription {
|
|
2932
|
+
/**
|
|
2933
|
+
* 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. The values should be in the format "users/{health_user_id\}/dataTypes/{data_type\}" where `{data_type\}` is one of "altitude", "distance", "floors", "sleep", "steps", "weight".
|
|
2934
|
+
*/
|
|
2935
|
+
dataTypes?: string[] | null;
|
|
2936
|
+
/**
|
|
2937
|
+
* 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.
|
|
2938
|
+
*/
|
|
2939
|
+
name?: string | null;
|
|
2940
|
+
/**
|
|
2941
|
+
* 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`).
|
|
2942
|
+
*/
|
|
2943
|
+
user?: string | null;
|
|
2944
|
+
}
|
|
2213
2945
|
/**
|
|
2214
2946
|
* Swim lengths data over the time interval.
|
|
2215
2947
|
*/
|
|
@@ -2327,7 +3059,7 @@ export namespace health_v4 {
|
|
|
2327
3059
|
version?: string | null;
|
|
2328
3060
|
}
|
|
2329
3061
|
/**
|
|
2330
|
-
* Represents the result of the rollup of the user's total calories.
|
|
3062
|
+
* Represents the result of the rollup of the user's total calories. Note: Queries for the `total-calories` data type must include a time interval filter (such as `total_calories.interval.start_time` or `total_calories.interval.civil_start_time`). The maximum range is 14 days. Example filter query: `total_calories.interval.start_time \>= "2026-04-20T00:00:00Z" AND total_calories.interval.start_time < "2026-04-21T00:00:00Z"`
|
|
2331
3063
|
*/
|
|
2332
3064
|
export interface Schema$TotalCaloriesRollupValue {
|
|
2333
3065
|
/**
|
|
@@ -2361,7 +3093,7 @@ export namespace health_v4 {
|
|
|
2361
3093
|
*/
|
|
2362
3094
|
milliliters?: number | null;
|
|
2363
3095
|
/**
|
|
2364
|
-
* Optional. Value representing the user provided unit.
|
|
3096
|
+
* 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.
|
|
2365
3097
|
*/
|
|
2366
3098
|
userProvidedUnit?: string | null;
|
|
2367
3099
|
}
|
|
@@ -2395,6 +3127,32 @@ export namespace health_v4 {
|
|
|
2395
3127
|
*/
|
|
2396
3128
|
weightGrams?: number | null;
|
|
2397
3129
|
}
|
|
3130
|
+
/**
|
|
3131
|
+
* Represents the weight quantity.
|
|
3132
|
+
*/
|
|
3133
|
+
export interface Schema$WeightQuantity {
|
|
3134
|
+
/**
|
|
3135
|
+
* Required. The weight value in grams.
|
|
3136
|
+
*/
|
|
3137
|
+
grams?: number | null;
|
|
3138
|
+
/**
|
|
3139
|
+
* Optional. Value representing the user provided unit.
|
|
3140
|
+
*/
|
|
3141
|
+
userProvidedUnit?: string | null;
|
|
3142
|
+
}
|
|
3143
|
+
/**
|
|
3144
|
+
* Rollup for the weight.
|
|
3145
|
+
*/
|
|
3146
|
+
export interface Schema$WeightQuantityRollup {
|
|
3147
|
+
/**
|
|
3148
|
+
* Required. The sum of the weight in grams.
|
|
3149
|
+
*/
|
|
3150
|
+
gramsSum?: number | null;
|
|
3151
|
+
/**
|
|
3152
|
+
* Optional. The user provided unit on the last element.
|
|
3153
|
+
*/
|
|
3154
|
+
userProvidedUnitLast?: string | null;
|
|
3155
|
+
}
|
|
2398
3156
|
/**
|
|
2399
3157
|
* Represents the result of the rollup of the weight data type.
|
|
2400
3158
|
*/
|
|
@@ -2416,8 +3174,12 @@ export namespace health_v4 {
|
|
|
2416
3174
|
|
|
2417
3175
|
export class Resource$Projects$Subscribers {
|
|
2418
3176
|
context: APIRequestContext;
|
|
3177
|
+
subscriptions: Resource$Projects$Subscribers$Subscriptions;
|
|
2419
3178
|
constructor(context: APIRequestContext) {
|
|
2420
3179
|
this.context = context;
|
|
3180
|
+
this.subscriptions = new Resource$Projects$Subscribers$Subscriptions(
|
|
3181
|
+
this.context
|
|
3182
|
+
);
|
|
2421
3183
|
}
|
|
2422
3184
|
|
|
2423
3185
|
/**
|
|
@@ -2451,7 +3213,7 @@ export namespace health_v4 {
|
|
|
2451
3213
|
*
|
|
2452
3214
|
* // Do the magic
|
|
2453
3215
|
* const res = await health.projects.subscribers.create({
|
|
2454
|
-
* // Required. The parent resource where this subscriber will be created. Format: projects/{
|
|
3216
|
+
* // Required. The parent resource where this subscriber will be created. Format: projects/{project_number\} Example: projects/1234567890
|
|
2455
3217
|
* parent: 'projects/my-project',
|
|
2456
3218
|
* // 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])/.
|
|
2457
3219
|
* subscriberId: 'placeholder-value',
|
|
@@ -2524,8 +3286,7 @@ export namespace health_v4 {
|
|
|
2524
3286
|
| BodyResponseCallback<Schema$Operation>
|
|
2525
3287
|
| BodyResponseCallback<Readable>,
|
|
2526
3288
|
callback?:
|
|
2527
|
-
|
|
2528
|
-
| BodyResponseCallback<Readable>
|
|
3289
|
+
BodyResponseCallback<Schema$Operation> | BodyResponseCallback<Readable>
|
|
2529
3290
|
):
|
|
2530
3291
|
| void
|
|
2531
3292
|
| Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
|
|
@@ -2667,8 +3428,7 @@ export namespace health_v4 {
|
|
|
2667
3428
|
| BodyResponseCallback<Schema$Operation>
|
|
2668
3429
|
| BodyResponseCallback<Readable>,
|
|
2669
3430
|
callback?:
|
|
2670
|
-
|
|
2671
|
-
| BodyResponseCallback<Readable>
|
|
3431
|
+
BodyResponseCallback<Schema$Operation> | BodyResponseCallback<Readable>
|
|
2672
3432
|
):
|
|
2673
3433
|
| void
|
|
2674
3434
|
| Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
|
|
@@ -2789,8 +3549,7 @@ export namespace health_v4 {
|
|
|
2789
3549
|
list(
|
|
2790
3550
|
params: Params$Resource$Projects$Subscribers$List,
|
|
2791
3551
|
options:
|
|
2792
|
-
|
|
|
2793
|
-
| BodyResponseCallback<Schema$ListSubscribersResponse>,
|
|
3552
|
+
MethodOptions | BodyResponseCallback<Schema$ListSubscribersResponse>,
|
|
2794
3553
|
callback: BodyResponseCallback<Schema$ListSubscribersResponse>
|
|
2795
3554
|
): void;
|
|
2796
3555
|
list(
|
|
@@ -2966,8 +3725,7 @@ export namespace health_v4 {
|
|
|
2966
3725
|
| BodyResponseCallback<Schema$Operation>
|
|
2967
3726
|
| BodyResponseCallback<Readable>,
|
|
2968
3727
|
callback?:
|
|
2969
|
-
|
|
2970
|
-
| BodyResponseCallback<Readable>
|
|
3728
|
+
BodyResponseCallback<Schema$Operation> | BodyResponseCallback<Readable>
|
|
2971
3729
|
):
|
|
2972
3730
|
| void
|
|
2973
3731
|
| Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
|
|
@@ -3015,7 +3773,7 @@ export namespace health_v4 {
|
|
|
3015
3773
|
|
|
3016
3774
|
export interface Params$Resource$Projects$Subscribers$Create extends StandardParameters {
|
|
3017
3775
|
/**
|
|
3018
|
-
* Required. The parent resource where this subscriber will be created. Format: projects/{
|
|
3776
|
+
* Required. The parent resource where this subscriber will be created. Format: projects/{project_number\} Example: projects/1234567890
|
|
3019
3777
|
*/
|
|
3020
3778
|
parent?: string;
|
|
3021
3779
|
/**
|
|
@@ -3068,16 +3826,14 @@ export namespace health_v4 {
|
|
|
3068
3826
|
requestBody?: Schema$Subscriber;
|
|
3069
3827
|
}
|
|
3070
3828
|
|
|
3071
|
-
export class Resource$
|
|
3829
|
+
export class Resource$Projects$Subscribers$Subscriptions {
|
|
3072
3830
|
context: APIRequestContext;
|
|
3073
|
-
dataTypes: Resource$Users$Datatypes;
|
|
3074
3831
|
constructor(context: APIRequestContext) {
|
|
3075
3832
|
this.context = context;
|
|
3076
|
-
this.dataTypes = new Resource$Users$Datatypes(this.context);
|
|
3077
3833
|
}
|
|
3078
3834
|
|
|
3079
3835
|
/**
|
|
3080
|
-
*
|
|
3836
|
+
* 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.
|
|
3081
3837
|
* @example
|
|
3082
3838
|
* ```js
|
|
3083
3839
|
* // Before running the sample:
|
|
@@ -3098,7 +3854,7 @@ export namespace health_v4 {
|
|
|
3098
3854
|
* async function main() {
|
|
3099
3855
|
* const auth = new google.auth.GoogleAuth({
|
|
3100
3856
|
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3101
|
-
* scopes: [],
|
|
3857
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3102
3858
|
* });
|
|
3103
3859
|
*
|
|
3104
3860
|
* // Acquire an auth client, and bind it to all future calls
|
|
@@ -3106,17 +3862,28 @@ export namespace health_v4 {
|
|
|
3106
3862
|
* google.options({auth: authClient});
|
|
3107
3863
|
*
|
|
3108
3864
|
* // Do the magic
|
|
3109
|
-
* const res = await health.
|
|
3110
|
-
* // Required. The
|
|
3111
|
-
*
|
|
3865
|
+
* const res = await health.projects.subscribers.subscriptions.create({
|
|
3866
|
+
* // 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.
|
|
3867
|
+
* parent: 'projects/my-project/subscribers/my-subscriber',
|
|
3868
|
+
* // 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.
|
|
3869
|
+
* subscriptionId: 'placeholder-value',
|
|
3870
|
+
*
|
|
3871
|
+
* // Request body metadata
|
|
3872
|
+
* requestBody: {
|
|
3873
|
+
* // request body parameters
|
|
3874
|
+
* // {
|
|
3875
|
+
* // "dataTypes": [],
|
|
3876
|
+
* // "user": "my_user"
|
|
3877
|
+
* // }
|
|
3878
|
+
* },
|
|
3112
3879
|
* });
|
|
3113
3880
|
* console.log(res.data);
|
|
3114
3881
|
*
|
|
3115
3882
|
* // Example response
|
|
3116
3883
|
* // {
|
|
3117
|
-
* // "
|
|
3118
|
-
* // "
|
|
3119
|
-
* // "
|
|
3884
|
+
* // "dataTypes": [],
|
|
3885
|
+
* // "name": "my_name",
|
|
3886
|
+
* // "user": "my_user"
|
|
3120
3887
|
* // }
|
|
3121
3888
|
* }
|
|
3122
3889
|
*
|
|
@@ -3132,48 +3899,1022 @@ export namespace health_v4 {
|
|
|
3132
3899
|
* @param callback - Optional callback that handles the response.
|
|
3133
3900
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
3134
3901
|
*/
|
|
3135
|
-
|
|
3136
|
-
params: Params$Resource$
|
|
3902
|
+
create(
|
|
3903
|
+
params: Params$Resource$Projects$Subscribers$Subscriptions$Create,
|
|
3137
3904
|
options: StreamMethodOptions
|
|
3138
3905
|
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
3139
|
-
|
|
3140
|
-
params?: Params$Resource$
|
|
3906
|
+
create(
|
|
3907
|
+
params?: Params$Resource$Projects$Subscribers$Subscriptions$Create,
|
|
3141
3908
|
options?: MethodOptions
|
|
3142
|
-
): Promise<GaxiosResponseWithHTTP2<Schema$
|
|
3143
|
-
|
|
3144
|
-
params: Params$Resource$
|
|
3909
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Subscription>>;
|
|
3910
|
+
create(
|
|
3911
|
+
params: Params$Resource$Projects$Subscribers$Subscriptions$Create,
|
|
3145
3912
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
3146
3913
|
callback: BodyResponseCallback<Readable>
|
|
3147
3914
|
): void;
|
|
3148
|
-
|
|
3149
|
-
params: Params$Resource$
|
|
3150
|
-
options: MethodOptions | BodyResponseCallback<Schema$
|
|
3151
|
-
callback: BodyResponseCallback<Schema$
|
|
3915
|
+
create(
|
|
3916
|
+
params: Params$Resource$Projects$Subscribers$Subscriptions$Create,
|
|
3917
|
+
options: MethodOptions | BodyResponseCallback<Schema$Subscription>,
|
|
3918
|
+
callback: BodyResponseCallback<Schema$Subscription>
|
|
3152
3919
|
): void;
|
|
3153
|
-
|
|
3154
|
-
params: Params$Resource$
|
|
3155
|
-
callback: BodyResponseCallback<Schema$
|
|
3920
|
+
create(
|
|
3921
|
+
params: Params$Resource$Projects$Subscribers$Subscriptions$Create,
|
|
3922
|
+
callback: BodyResponseCallback<Schema$Subscription>
|
|
3156
3923
|
): void;
|
|
3157
|
-
|
|
3158
|
-
|
|
3924
|
+
create(callback: BodyResponseCallback<Schema$Subscription>): void;
|
|
3925
|
+
create(
|
|
3159
3926
|
paramsOrCallback?:
|
|
3160
|
-
| Params$Resource$
|
|
3161
|
-
| BodyResponseCallback<Schema$
|
|
3927
|
+
| Params$Resource$Projects$Subscribers$Subscriptions$Create
|
|
3928
|
+
| BodyResponseCallback<Schema$Subscription>
|
|
3162
3929
|
| BodyResponseCallback<Readable>,
|
|
3163
3930
|
optionsOrCallback?:
|
|
3164
3931
|
| MethodOptions
|
|
3165
3932
|
| StreamMethodOptions
|
|
3166
|
-
| BodyResponseCallback<Schema$
|
|
3933
|
+
| BodyResponseCallback<Schema$Subscription>
|
|
3167
3934
|
| BodyResponseCallback<Readable>,
|
|
3168
3935
|
callback?:
|
|
3169
|
-
| BodyResponseCallback<Schema$
|
|
3936
|
+
| BodyResponseCallback<Schema$Subscription>
|
|
3170
3937
|
| BodyResponseCallback<Readable>
|
|
3171
3938
|
):
|
|
3172
3939
|
| void
|
|
3173
|
-
| Promise<GaxiosResponseWithHTTP2<Schema$
|
|
3940
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Subscription>>
|
|
3174
3941
|
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
3175
3942
|
let params = (paramsOrCallback ||
|
|
3176
|
-
{}) as Params$Resource$
|
|
3943
|
+
{}) as Params$Resource$Projects$Subscribers$Subscriptions$Create;
|
|
3944
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
3945
|
+
|
|
3946
|
+
if (typeof paramsOrCallback === 'function') {
|
|
3947
|
+
callback = paramsOrCallback;
|
|
3948
|
+
params =
|
|
3949
|
+
{} as Params$Resource$Projects$Subscribers$Subscriptions$Create;
|
|
3950
|
+
options = {};
|
|
3951
|
+
}
|
|
3952
|
+
|
|
3953
|
+
if (typeof optionsOrCallback === 'function') {
|
|
3954
|
+
callback = optionsOrCallback;
|
|
3955
|
+
options = {};
|
|
3956
|
+
}
|
|
3957
|
+
|
|
3958
|
+
const rootUrl = options.rootUrl || 'https://health.googleapis.com/';
|
|
3959
|
+
const parameters = {
|
|
3960
|
+
options: Object.assign(
|
|
3961
|
+
{
|
|
3962
|
+
url: (rootUrl + '/v4/{+parent}/subscriptions').replace(
|
|
3963
|
+
/([^:]\/)\/+/g,
|
|
3964
|
+
'$1'
|
|
3965
|
+
),
|
|
3966
|
+
method: 'POST',
|
|
3967
|
+
apiVersion: '',
|
|
3968
|
+
},
|
|
3969
|
+
options
|
|
3970
|
+
),
|
|
3971
|
+
params,
|
|
3972
|
+
requiredParams: ['parent'],
|
|
3973
|
+
pathParams: ['parent'],
|
|
3974
|
+
context: this.context,
|
|
3975
|
+
};
|
|
3976
|
+
if (callback) {
|
|
3977
|
+
createAPIRequest<Schema$Subscription>(
|
|
3978
|
+
parameters,
|
|
3979
|
+
callback as BodyResponseCallback<unknown>
|
|
3980
|
+
);
|
|
3981
|
+
} else {
|
|
3982
|
+
return createAPIRequest<Schema$Subscription>(parameters);
|
|
3983
|
+
}
|
|
3984
|
+
}
|
|
3985
|
+
|
|
3986
|
+
/**
|
|
3987
|
+
* Deletes a specific user subscription, stopping notifications for this user to this subscriber.
|
|
3988
|
+
* @example
|
|
3989
|
+
* ```js
|
|
3990
|
+
* // Before running the sample:
|
|
3991
|
+
* // - Enable the API at:
|
|
3992
|
+
* // https://console.developers.google.com/apis/api/health.googleapis.com
|
|
3993
|
+
* // - Login into gcloud by running:
|
|
3994
|
+
* // ```sh
|
|
3995
|
+
* // $ gcloud auth application-default login
|
|
3996
|
+
* // ```
|
|
3997
|
+
* // - Install the npm module by running:
|
|
3998
|
+
* // ```sh
|
|
3999
|
+
* // $ npm install googleapis
|
|
4000
|
+
* // ```
|
|
4001
|
+
*
|
|
4002
|
+
* const {google} = require('googleapis');
|
|
4003
|
+
* const health = google.health('v4');
|
|
4004
|
+
*
|
|
4005
|
+
* async function main() {
|
|
4006
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4007
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4008
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4009
|
+
* });
|
|
4010
|
+
*
|
|
4011
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4012
|
+
* const authClient = await auth.getClient();
|
|
4013
|
+
* google.options({auth: authClient});
|
|
4014
|
+
*
|
|
4015
|
+
* // Do the magic
|
|
4016
|
+
* const res = await health.projects.subscribers.subscriptions.delete({
|
|
4017
|
+
* // 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.
|
|
4018
|
+
* name: 'projects/my-project/subscribers/my-subscriber/subscriptions/my-subscription',
|
|
4019
|
+
* });
|
|
4020
|
+
* console.log(res.data);
|
|
4021
|
+
*
|
|
4022
|
+
* // Example response
|
|
4023
|
+
* // {}
|
|
4024
|
+
* }
|
|
4025
|
+
*
|
|
4026
|
+
* main().catch(e => {
|
|
4027
|
+
* console.error(e);
|
|
4028
|
+
* throw e;
|
|
4029
|
+
* });
|
|
4030
|
+
*
|
|
4031
|
+
* ```
|
|
4032
|
+
*
|
|
4033
|
+
* @param params - Parameters for request
|
|
4034
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
4035
|
+
* @param callback - Optional callback that handles the response.
|
|
4036
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
4037
|
+
*/
|
|
4038
|
+
delete(
|
|
4039
|
+
params: Params$Resource$Projects$Subscribers$Subscriptions$Delete,
|
|
4040
|
+
options: StreamMethodOptions
|
|
4041
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
4042
|
+
delete(
|
|
4043
|
+
params?: Params$Resource$Projects$Subscribers$Subscriptions$Delete,
|
|
4044
|
+
options?: MethodOptions
|
|
4045
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
|
|
4046
|
+
delete(
|
|
4047
|
+
params: Params$Resource$Projects$Subscribers$Subscriptions$Delete,
|
|
4048
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
4049
|
+
callback: BodyResponseCallback<Readable>
|
|
4050
|
+
): void;
|
|
4051
|
+
delete(
|
|
4052
|
+
params: Params$Resource$Projects$Subscribers$Subscriptions$Delete,
|
|
4053
|
+
options: MethodOptions | BodyResponseCallback<Schema$Empty>,
|
|
4054
|
+
callback: BodyResponseCallback<Schema$Empty>
|
|
4055
|
+
): void;
|
|
4056
|
+
delete(
|
|
4057
|
+
params: Params$Resource$Projects$Subscribers$Subscriptions$Delete,
|
|
4058
|
+
callback: BodyResponseCallback<Schema$Empty>
|
|
4059
|
+
): void;
|
|
4060
|
+
delete(callback: BodyResponseCallback<Schema$Empty>): void;
|
|
4061
|
+
delete(
|
|
4062
|
+
paramsOrCallback?:
|
|
4063
|
+
| Params$Resource$Projects$Subscribers$Subscriptions$Delete
|
|
4064
|
+
| BodyResponseCallback<Schema$Empty>
|
|
4065
|
+
| BodyResponseCallback<Readable>,
|
|
4066
|
+
optionsOrCallback?:
|
|
4067
|
+
| MethodOptions
|
|
4068
|
+
| StreamMethodOptions
|
|
4069
|
+
| BodyResponseCallback<Schema$Empty>
|
|
4070
|
+
| BodyResponseCallback<Readable>,
|
|
4071
|
+
callback?:
|
|
4072
|
+
BodyResponseCallback<Schema$Empty> | BodyResponseCallback<Readable>
|
|
4073
|
+
):
|
|
4074
|
+
| void
|
|
4075
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Empty>>
|
|
4076
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
4077
|
+
let params = (paramsOrCallback ||
|
|
4078
|
+
{}) as Params$Resource$Projects$Subscribers$Subscriptions$Delete;
|
|
4079
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
4080
|
+
|
|
4081
|
+
if (typeof paramsOrCallback === 'function') {
|
|
4082
|
+
callback = paramsOrCallback;
|
|
4083
|
+
params =
|
|
4084
|
+
{} as Params$Resource$Projects$Subscribers$Subscriptions$Delete;
|
|
4085
|
+
options = {};
|
|
4086
|
+
}
|
|
4087
|
+
|
|
4088
|
+
if (typeof optionsOrCallback === 'function') {
|
|
4089
|
+
callback = optionsOrCallback;
|
|
4090
|
+
options = {};
|
|
4091
|
+
}
|
|
4092
|
+
|
|
4093
|
+
const rootUrl = options.rootUrl || 'https://health.googleapis.com/';
|
|
4094
|
+
const parameters = {
|
|
4095
|
+
options: Object.assign(
|
|
4096
|
+
{
|
|
4097
|
+
url: (rootUrl + '/v4/{+name}').replace(/([^:]\/)\/+/g, '$1'),
|
|
4098
|
+
method: 'DELETE',
|
|
4099
|
+
apiVersion: '',
|
|
4100
|
+
},
|
|
4101
|
+
options
|
|
4102
|
+
),
|
|
4103
|
+
params,
|
|
4104
|
+
requiredParams: ['name'],
|
|
4105
|
+
pathParams: ['name'],
|
|
4106
|
+
context: this.context,
|
|
4107
|
+
};
|
|
4108
|
+
if (callback) {
|
|
4109
|
+
createAPIRequest<Schema$Empty>(
|
|
4110
|
+
parameters,
|
|
4111
|
+
callback as BodyResponseCallback<unknown>
|
|
4112
|
+
);
|
|
4113
|
+
} else {
|
|
4114
|
+
return createAPIRequest<Schema$Empty>(parameters);
|
|
4115
|
+
}
|
|
4116
|
+
}
|
|
4117
|
+
|
|
4118
|
+
/**
|
|
4119
|
+
* Lists all active subscriptions for a given subscriber. This can be filtered, for example, by user or data type.
|
|
4120
|
+
* @example
|
|
4121
|
+
* ```js
|
|
4122
|
+
* // Before running the sample:
|
|
4123
|
+
* // - Enable the API at:
|
|
4124
|
+
* // https://console.developers.google.com/apis/api/health.googleapis.com
|
|
4125
|
+
* // - Login into gcloud by running:
|
|
4126
|
+
* // ```sh
|
|
4127
|
+
* // $ gcloud auth application-default login
|
|
4128
|
+
* // ```
|
|
4129
|
+
* // - Install the npm module by running:
|
|
4130
|
+
* // ```sh
|
|
4131
|
+
* // $ npm install googleapis
|
|
4132
|
+
* // ```
|
|
4133
|
+
*
|
|
4134
|
+
* const {google} = require('googleapis');
|
|
4135
|
+
* const health = google.health('v4');
|
|
4136
|
+
*
|
|
4137
|
+
* async function main() {
|
|
4138
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4139
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4140
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4141
|
+
* });
|
|
4142
|
+
*
|
|
4143
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4144
|
+
* const authClient = await auth.getClient();
|
|
4145
|
+
* google.options({auth: authClient});
|
|
4146
|
+
*
|
|
4147
|
+
* // Do the magic
|
|
4148
|
+
* const res = await health.projects.subscribers.subscriptions.list({
|
|
4149
|
+
* // 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 `health_user_id` Example: user = "users/user1" Example: user = "users/user1" OR user = "users/user2" Example: user = "users/user1" AND (data_type = "sleep" OR data_type = "weight")
|
|
4150
|
+
* filter: 'placeholder-value',
|
|
4151
|
+
* // 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.
|
|
4152
|
+
* pageSize: 'placeholder-value',
|
|
4153
|
+
* // 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.
|
|
4154
|
+
* pageToken: 'placeholder-value',
|
|
4155
|
+
* // 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.
|
|
4156
|
+
* parent: 'projects/my-project/subscribers/my-subscriber',
|
|
4157
|
+
* });
|
|
4158
|
+
* console.log(res.data);
|
|
4159
|
+
*
|
|
4160
|
+
* // Example response
|
|
4161
|
+
* // {
|
|
4162
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
4163
|
+
* // "subscriptions": []
|
|
4164
|
+
* // }
|
|
4165
|
+
* }
|
|
4166
|
+
*
|
|
4167
|
+
* main().catch(e => {
|
|
4168
|
+
* console.error(e);
|
|
4169
|
+
* throw e;
|
|
4170
|
+
* });
|
|
4171
|
+
*
|
|
4172
|
+
* ```
|
|
4173
|
+
*
|
|
4174
|
+
* @param params - Parameters for request
|
|
4175
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
4176
|
+
* @param callback - Optional callback that handles the response.
|
|
4177
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
4178
|
+
*/
|
|
4179
|
+
list(
|
|
4180
|
+
params: Params$Resource$Projects$Subscribers$Subscriptions$List,
|
|
4181
|
+
options: StreamMethodOptions
|
|
4182
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
4183
|
+
list(
|
|
4184
|
+
params?: Params$Resource$Projects$Subscribers$Subscriptions$List,
|
|
4185
|
+
options?: MethodOptions
|
|
4186
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$ListSubscriptionsResponse>>;
|
|
4187
|
+
list(
|
|
4188
|
+
params: Params$Resource$Projects$Subscribers$Subscriptions$List,
|
|
4189
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
4190
|
+
callback: BodyResponseCallback<Readable>
|
|
4191
|
+
): void;
|
|
4192
|
+
list(
|
|
4193
|
+
params: Params$Resource$Projects$Subscribers$Subscriptions$List,
|
|
4194
|
+
options:
|
|
4195
|
+
MethodOptions | BodyResponseCallback<Schema$ListSubscriptionsResponse>,
|
|
4196
|
+
callback: BodyResponseCallback<Schema$ListSubscriptionsResponse>
|
|
4197
|
+
): void;
|
|
4198
|
+
list(
|
|
4199
|
+
params: Params$Resource$Projects$Subscribers$Subscriptions$List,
|
|
4200
|
+
callback: BodyResponseCallback<Schema$ListSubscriptionsResponse>
|
|
4201
|
+
): void;
|
|
4202
|
+
list(
|
|
4203
|
+
callback: BodyResponseCallback<Schema$ListSubscriptionsResponse>
|
|
4204
|
+
): void;
|
|
4205
|
+
list(
|
|
4206
|
+
paramsOrCallback?:
|
|
4207
|
+
| Params$Resource$Projects$Subscribers$Subscriptions$List
|
|
4208
|
+
| BodyResponseCallback<Schema$ListSubscriptionsResponse>
|
|
4209
|
+
| BodyResponseCallback<Readable>,
|
|
4210
|
+
optionsOrCallback?:
|
|
4211
|
+
| MethodOptions
|
|
4212
|
+
| StreamMethodOptions
|
|
4213
|
+
| BodyResponseCallback<Schema$ListSubscriptionsResponse>
|
|
4214
|
+
| BodyResponseCallback<Readable>,
|
|
4215
|
+
callback?:
|
|
4216
|
+
| BodyResponseCallback<Schema$ListSubscriptionsResponse>
|
|
4217
|
+
| BodyResponseCallback<Readable>
|
|
4218
|
+
):
|
|
4219
|
+
| void
|
|
4220
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$ListSubscriptionsResponse>>
|
|
4221
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
4222
|
+
let params = (paramsOrCallback ||
|
|
4223
|
+
{}) as Params$Resource$Projects$Subscribers$Subscriptions$List;
|
|
4224
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
4225
|
+
|
|
4226
|
+
if (typeof paramsOrCallback === 'function') {
|
|
4227
|
+
callback = paramsOrCallback;
|
|
4228
|
+
params = {} as Params$Resource$Projects$Subscribers$Subscriptions$List;
|
|
4229
|
+
options = {};
|
|
4230
|
+
}
|
|
4231
|
+
|
|
4232
|
+
if (typeof optionsOrCallback === 'function') {
|
|
4233
|
+
callback = optionsOrCallback;
|
|
4234
|
+
options = {};
|
|
4235
|
+
}
|
|
4236
|
+
|
|
4237
|
+
const rootUrl = options.rootUrl || 'https://health.googleapis.com/';
|
|
4238
|
+
const parameters = {
|
|
4239
|
+
options: Object.assign(
|
|
4240
|
+
{
|
|
4241
|
+
url: (rootUrl + '/v4/{+parent}/subscriptions').replace(
|
|
4242
|
+
/([^:]\/)\/+/g,
|
|
4243
|
+
'$1'
|
|
4244
|
+
),
|
|
4245
|
+
method: 'GET',
|
|
4246
|
+
apiVersion: '',
|
|
4247
|
+
},
|
|
4248
|
+
options
|
|
4249
|
+
),
|
|
4250
|
+
params,
|
|
4251
|
+
requiredParams: ['parent'],
|
|
4252
|
+
pathParams: ['parent'],
|
|
4253
|
+
context: this.context,
|
|
4254
|
+
};
|
|
4255
|
+
if (callback) {
|
|
4256
|
+
createAPIRequest<Schema$ListSubscriptionsResponse>(
|
|
4257
|
+
parameters,
|
|
4258
|
+
callback as BodyResponseCallback<unknown>
|
|
4259
|
+
);
|
|
4260
|
+
} else {
|
|
4261
|
+
return createAPIRequest<Schema$ListSubscriptionsResponse>(parameters);
|
|
4262
|
+
}
|
|
4263
|
+
}
|
|
4264
|
+
|
|
4265
|
+
/**
|
|
4266
|
+
* Updates the data types for an existing user subscription.
|
|
4267
|
+
* @example
|
|
4268
|
+
* ```js
|
|
4269
|
+
* // Before running the sample:
|
|
4270
|
+
* // - Enable the API at:
|
|
4271
|
+
* // https://console.developers.google.com/apis/api/health.googleapis.com
|
|
4272
|
+
* // - Login into gcloud by running:
|
|
4273
|
+
* // ```sh
|
|
4274
|
+
* // $ gcloud auth application-default login
|
|
4275
|
+
* // ```
|
|
4276
|
+
* // - Install the npm module by running:
|
|
4277
|
+
* // ```sh
|
|
4278
|
+
* // $ npm install googleapis
|
|
4279
|
+
* // ```
|
|
4280
|
+
*
|
|
4281
|
+
* const {google} = require('googleapis');
|
|
4282
|
+
* const health = google.health('v4');
|
|
4283
|
+
*
|
|
4284
|
+
* async function main() {
|
|
4285
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4286
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4287
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4288
|
+
* });
|
|
4289
|
+
*
|
|
4290
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4291
|
+
* const authClient = await auth.getClient();
|
|
4292
|
+
* google.options({auth: authClient});
|
|
4293
|
+
*
|
|
4294
|
+
* // Do the magic
|
|
4295
|
+
* const res = await health.projects.subscribers.subscriptions.patch({
|
|
4296
|
+
* // 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.
|
|
4297
|
+
* name: 'projects/my-project/subscribers/my-subscriber/subscriptions/my-subscription',
|
|
4298
|
+
* // Optional. The list of fields to update.
|
|
4299
|
+
* updateMask: 'placeholder-value',
|
|
4300
|
+
*
|
|
4301
|
+
* // Request body metadata
|
|
4302
|
+
* requestBody: {
|
|
4303
|
+
* // request body parameters
|
|
4304
|
+
* // {
|
|
4305
|
+
* // "dataTypes": [],
|
|
4306
|
+
* // "name": "my_name",
|
|
4307
|
+
* // "user": "my_user"
|
|
4308
|
+
* // }
|
|
4309
|
+
* },
|
|
4310
|
+
* });
|
|
4311
|
+
* console.log(res.data);
|
|
4312
|
+
*
|
|
4313
|
+
* // Example response
|
|
4314
|
+
* // {
|
|
4315
|
+
* // "dataTypes": [],
|
|
4316
|
+
* // "name": "my_name",
|
|
4317
|
+
* // "user": "my_user"
|
|
4318
|
+
* // }
|
|
4319
|
+
* }
|
|
4320
|
+
*
|
|
4321
|
+
* main().catch(e => {
|
|
4322
|
+
* console.error(e);
|
|
4323
|
+
* throw e;
|
|
4324
|
+
* });
|
|
4325
|
+
*
|
|
4326
|
+
* ```
|
|
4327
|
+
*
|
|
4328
|
+
* @param params - Parameters for request
|
|
4329
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
4330
|
+
* @param callback - Optional callback that handles the response.
|
|
4331
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
4332
|
+
*/
|
|
4333
|
+
patch(
|
|
4334
|
+
params: Params$Resource$Projects$Subscribers$Subscriptions$Patch,
|
|
4335
|
+
options: StreamMethodOptions
|
|
4336
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
4337
|
+
patch(
|
|
4338
|
+
params?: Params$Resource$Projects$Subscribers$Subscriptions$Patch,
|
|
4339
|
+
options?: MethodOptions
|
|
4340
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Subscription>>;
|
|
4341
|
+
patch(
|
|
4342
|
+
params: Params$Resource$Projects$Subscribers$Subscriptions$Patch,
|
|
4343
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
4344
|
+
callback: BodyResponseCallback<Readable>
|
|
4345
|
+
): void;
|
|
4346
|
+
patch(
|
|
4347
|
+
params: Params$Resource$Projects$Subscribers$Subscriptions$Patch,
|
|
4348
|
+
options: MethodOptions | BodyResponseCallback<Schema$Subscription>,
|
|
4349
|
+
callback: BodyResponseCallback<Schema$Subscription>
|
|
4350
|
+
): void;
|
|
4351
|
+
patch(
|
|
4352
|
+
params: Params$Resource$Projects$Subscribers$Subscriptions$Patch,
|
|
4353
|
+
callback: BodyResponseCallback<Schema$Subscription>
|
|
4354
|
+
): void;
|
|
4355
|
+
patch(callback: BodyResponseCallback<Schema$Subscription>): void;
|
|
4356
|
+
patch(
|
|
4357
|
+
paramsOrCallback?:
|
|
4358
|
+
| Params$Resource$Projects$Subscribers$Subscriptions$Patch
|
|
4359
|
+
| BodyResponseCallback<Schema$Subscription>
|
|
4360
|
+
| BodyResponseCallback<Readable>,
|
|
4361
|
+
optionsOrCallback?:
|
|
4362
|
+
| MethodOptions
|
|
4363
|
+
| StreamMethodOptions
|
|
4364
|
+
| BodyResponseCallback<Schema$Subscription>
|
|
4365
|
+
| BodyResponseCallback<Readable>,
|
|
4366
|
+
callback?:
|
|
4367
|
+
| BodyResponseCallback<Schema$Subscription>
|
|
4368
|
+
| BodyResponseCallback<Readable>
|
|
4369
|
+
):
|
|
4370
|
+
| void
|
|
4371
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Subscription>>
|
|
4372
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
4373
|
+
let params = (paramsOrCallback ||
|
|
4374
|
+
{}) as Params$Resource$Projects$Subscribers$Subscriptions$Patch;
|
|
4375
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
4376
|
+
|
|
4377
|
+
if (typeof paramsOrCallback === 'function') {
|
|
4378
|
+
callback = paramsOrCallback;
|
|
4379
|
+
params = {} as Params$Resource$Projects$Subscribers$Subscriptions$Patch;
|
|
4380
|
+
options = {};
|
|
4381
|
+
}
|
|
4382
|
+
|
|
4383
|
+
if (typeof optionsOrCallback === 'function') {
|
|
4384
|
+
callback = optionsOrCallback;
|
|
4385
|
+
options = {};
|
|
4386
|
+
}
|
|
4387
|
+
|
|
4388
|
+
const rootUrl = options.rootUrl || 'https://health.googleapis.com/';
|
|
4389
|
+
const parameters = {
|
|
4390
|
+
options: Object.assign(
|
|
4391
|
+
{
|
|
4392
|
+
url: (rootUrl + '/v4/{+name}').replace(/([^:]\/)\/+/g, '$1'),
|
|
4393
|
+
method: 'PATCH',
|
|
4394
|
+
apiVersion: '',
|
|
4395
|
+
},
|
|
4396
|
+
options
|
|
4397
|
+
),
|
|
4398
|
+
params,
|
|
4399
|
+
requiredParams: ['name'],
|
|
4400
|
+
pathParams: ['name'],
|
|
4401
|
+
context: this.context,
|
|
4402
|
+
};
|
|
4403
|
+
if (callback) {
|
|
4404
|
+
createAPIRequest<Schema$Subscription>(
|
|
4405
|
+
parameters,
|
|
4406
|
+
callback as BodyResponseCallback<unknown>
|
|
4407
|
+
);
|
|
4408
|
+
} else {
|
|
4409
|
+
return createAPIRequest<Schema$Subscription>(parameters);
|
|
4410
|
+
}
|
|
4411
|
+
}
|
|
4412
|
+
}
|
|
4413
|
+
|
|
4414
|
+
export interface Params$Resource$Projects$Subscribers$Subscriptions$Create extends StandardParameters {
|
|
4415
|
+
/**
|
|
4416
|
+
* 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.
|
|
4417
|
+
*/
|
|
4418
|
+
parent?: string;
|
|
4419
|
+
/**
|
|
4420
|
+
* 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.
|
|
4421
|
+
*/
|
|
4422
|
+
subscriptionId?: string;
|
|
4423
|
+
|
|
4424
|
+
/**
|
|
4425
|
+
* Request body metadata
|
|
4426
|
+
*/
|
|
4427
|
+
requestBody?: Schema$CreateSubscriptionPayload;
|
|
4428
|
+
}
|
|
4429
|
+
export interface Params$Resource$Projects$Subscribers$Subscriptions$Delete extends StandardParameters {
|
|
4430
|
+
/**
|
|
4431
|
+
* 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.
|
|
4432
|
+
*/
|
|
4433
|
+
name?: string;
|
|
4434
|
+
}
|
|
4435
|
+
export interface Params$Resource$Projects$Subscribers$Subscriptions$List extends StandardParameters {
|
|
4436
|
+
/**
|
|
4437
|
+
* 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 `health_user_id` Example: user = "users/user1" Example: user = "users/user1" OR user = "users/user2" Example: user = "users/user1" AND (data_type = "sleep" OR data_type = "weight")
|
|
4438
|
+
*/
|
|
4439
|
+
filter?: string;
|
|
4440
|
+
/**
|
|
4441
|
+
* 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.
|
|
4442
|
+
*/
|
|
4443
|
+
pageSize?: number;
|
|
4444
|
+
/**
|
|
4445
|
+
* 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.
|
|
4446
|
+
*/
|
|
4447
|
+
pageToken?: string;
|
|
4448
|
+
/**
|
|
4449
|
+
* 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.
|
|
4450
|
+
*/
|
|
4451
|
+
parent?: string;
|
|
4452
|
+
}
|
|
4453
|
+
export interface Params$Resource$Projects$Subscribers$Subscriptions$Patch extends StandardParameters {
|
|
4454
|
+
/**
|
|
4455
|
+
* 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.
|
|
4456
|
+
*/
|
|
4457
|
+
name?: string;
|
|
4458
|
+
/**
|
|
4459
|
+
* Optional. The list of fields to update.
|
|
4460
|
+
*/
|
|
4461
|
+
updateMask?: string;
|
|
4462
|
+
|
|
4463
|
+
/**
|
|
4464
|
+
* Request body metadata
|
|
4465
|
+
*/
|
|
4466
|
+
requestBody?: Schema$Subscription;
|
|
4467
|
+
}
|
|
4468
|
+
|
|
4469
|
+
export class Resource$Shl {
|
|
4470
|
+
context: APIRequestContext;
|
|
4471
|
+
m: Resource$Shl$M;
|
|
4472
|
+
r: Resource$Shl$R;
|
|
4473
|
+
constructor(context: APIRequestContext) {
|
|
4474
|
+
this.context = context;
|
|
4475
|
+
this.m = new Resource$Shl$M(this.context);
|
|
4476
|
+
this.r = new Resource$Shl$R(this.context);
|
|
4477
|
+
}
|
|
4478
|
+
}
|
|
4479
|
+
|
|
4480
|
+
export class Resource$Shl$M {
|
|
4481
|
+
context: APIRequestContext;
|
|
4482
|
+
constructor(context: APIRequestContext) {
|
|
4483
|
+
this.context = context;
|
|
4484
|
+
}
|
|
4485
|
+
|
|
4486
|
+
/**
|
|
4487
|
+
* Forward a manifest request for a given SHL
|
|
4488
|
+
* @example
|
|
4489
|
+
* ```js
|
|
4490
|
+
* // Before running the sample:
|
|
4491
|
+
* // - Enable the API at:
|
|
4492
|
+
* // https://console.developers.google.com/apis/api/health.googleapis.com
|
|
4493
|
+
* // - Login into gcloud by running:
|
|
4494
|
+
* // ```sh
|
|
4495
|
+
* // $ gcloud auth application-default login
|
|
4496
|
+
* // ```
|
|
4497
|
+
* // - Install the npm module by running:
|
|
4498
|
+
* // ```sh
|
|
4499
|
+
* // $ npm install googleapis
|
|
4500
|
+
* // ```
|
|
4501
|
+
*
|
|
4502
|
+
* const {google} = require('googleapis');
|
|
4503
|
+
* const health = google.health('v4');
|
|
4504
|
+
*
|
|
4505
|
+
* async function main() {
|
|
4506
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4507
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4508
|
+
* scopes: [],
|
|
4509
|
+
* });
|
|
4510
|
+
*
|
|
4511
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4512
|
+
* const authClient = await auth.getClient();
|
|
4513
|
+
* google.options({auth: authClient});
|
|
4514
|
+
*
|
|
4515
|
+
* // Do the magic
|
|
4516
|
+
* const res = await health.shl.m.getShlManifest({
|
|
4517
|
+
* // Required. External ID mapping to a ShlSharedLinkCapabilityToken object See https://docs.google.com/document/d/1Pch20pxJHRbsaMxp0EYgs3ZU0Gu7QTUznk8LhvbQvfY/edit?tab=t.0#heading=h.17wg41voij6q
|
|
4518
|
+
* externalShlId: 'placeholder-value',
|
|
4519
|
+
*
|
|
4520
|
+
* // Request body metadata
|
|
4521
|
+
* requestBody: {
|
|
4522
|
+
* // request body parameters
|
|
4523
|
+
* // {
|
|
4524
|
+
* // "embeddedLengthMax": 0,
|
|
4525
|
+
* // "passcode": "my_passcode",
|
|
4526
|
+
* // "recipient": "my_recipient"
|
|
4527
|
+
* // }
|
|
4528
|
+
* },
|
|
4529
|
+
* });
|
|
4530
|
+
* console.log(res.data);
|
|
4531
|
+
*
|
|
4532
|
+
* // Example response
|
|
4533
|
+
* // {
|
|
4534
|
+
* // "contentType": "my_contentType",
|
|
4535
|
+
* // "data": "my_data",
|
|
4536
|
+
* // "extensions": []
|
|
4537
|
+
* // }
|
|
4538
|
+
* }
|
|
4539
|
+
*
|
|
4540
|
+
* main().catch(e => {
|
|
4541
|
+
* console.error(e);
|
|
4542
|
+
* throw e;
|
|
4543
|
+
* });
|
|
4544
|
+
*
|
|
4545
|
+
* ```
|
|
4546
|
+
*
|
|
4547
|
+
* @param params - Parameters for request
|
|
4548
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
4549
|
+
* @param callback - Optional callback that handles the response.
|
|
4550
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
4551
|
+
*/
|
|
4552
|
+
getShlManifest(
|
|
4553
|
+
params: Params$Resource$Shl$M$Getshlmanifest,
|
|
4554
|
+
options: StreamMethodOptions
|
|
4555
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
4556
|
+
getShlManifest(
|
|
4557
|
+
params?: Params$Resource$Shl$M$Getshlmanifest,
|
|
4558
|
+
options?: MethodOptions
|
|
4559
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$HttpBody>>;
|
|
4560
|
+
getShlManifest(
|
|
4561
|
+
params: Params$Resource$Shl$M$Getshlmanifest,
|
|
4562
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
4563
|
+
callback: BodyResponseCallback<Readable>
|
|
4564
|
+
): void;
|
|
4565
|
+
getShlManifest(
|
|
4566
|
+
params: Params$Resource$Shl$M$Getshlmanifest,
|
|
4567
|
+
options: MethodOptions | BodyResponseCallback<Schema$HttpBody>,
|
|
4568
|
+
callback: BodyResponseCallback<Schema$HttpBody>
|
|
4569
|
+
): void;
|
|
4570
|
+
getShlManifest(
|
|
4571
|
+
params: Params$Resource$Shl$M$Getshlmanifest,
|
|
4572
|
+
callback: BodyResponseCallback<Schema$HttpBody>
|
|
4573
|
+
): void;
|
|
4574
|
+
getShlManifest(callback: BodyResponseCallback<Schema$HttpBody>): void;
|
|
4575
|
+
getShlManifest(
|
|
4576
|
+
paramsOrCallback?:
|
|
4577
|
+
| Params$Resource$Shl$M$Getshlmanifest
|
|
4578
|
+
| BodyResponseCallback<Schema$HttpBody>
|
|
4579
|
+
| BodyResponseCallback<Readable>,
|
|
4580
|
+
optionsOrCallback?:
|
|
4581
|
+
| MethodOptions
|
|
4582
|
+
| StreamMethodOptions
|
|
4583
|
+
| BodyResponseCallback<Schema$HttpBody>
|
|
4584
|
+
| BodyResponseCallback<Readable>,
|
|
4585
|
+
callback?:
|
|
4586
|
+
BodyResponseCallback<Schema$HttpBody> | BodyResponseCallback<Readable>
|
|
4587
|
+
):
|
|
4588
|
+
| void
|
|
4589
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$HttpBody>>
|
|
4590
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
4591
|
+
let params = (paramsOrCallback ||
|
|
4592
|
+
{}) as Params$Resource$Shl$M$Getshlmanifest;
|
|
4593
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
4594
|
+
|
|
4595
|
+
if (typeof paramsOrCallback === 'function') {
|
|
4596
|
+
callback = paramsOrCallback;
|
|
4597
|
+
params = {} as Params$Resource$Shl$M$Getshlmanifest;
|
|
4598
|
+
options = {};
|
|
4599
|
+
}
|
|
4600
|
+
|
|
4601
|
+
if (typeof optionsOrCallback === 'function') {
|
|
4602
|
+
callback = optionsOrCallback;
|
|
4603
|
+
options = {};
|
|
4604
|
+
}
|
|
4605
|
+
|
|
4606
|
+
const rootUrl = options.rootUrl || 'https://health.googleapis.com/';
|
|
4607
|
+
const parameters = {
|
|
4608
|
+
options: Object.assign(
|
|
4609
|
+
{
|
|
4610
|
+
url: (rootUrl + '/v4/shl/m/{externalShlId}').replace(
|
|
4611
|
+
/([^:]\/)\/+/g,
|
|
4612
|
+
'$1'
|
|
4613
|
+
),
|
|
4614
|
+
method: 'POST',
|
|
4615
|
+
apiVersion: '',
|
|
4616
|
+
},
|
|
4617
|
+
options
|
|
4618
|
+
),
|
|
4619
|
+
params,
|
|
4620
|
+
requiredParams: ['externalShlId'],
|
|
4621
|
+
pathParams: ['externalShlId'],
|
|
4622
|
+
context: this.context,
|
|
4623
|
+
};
|
|
4624
|
+
if (callback) {
|
|
4625
|
+
createAPIRequest<Schema$HttpBody>(
|
|
4626
|
+
parameters,
|
|
4627
|
+
callback as BodyResponseCallback<unknown>
|
|
4628
|
+
);
|
|
4629
|
+
} else {
|
|
4630
|
+
return createAPIRequest<Schema$HttpBody>(parameters);
|
|
4631
|
+
}
|
|
4632
|
+
}
|
|
4633
|
+
}
|
|
4634
|
+
|
|
4635
|
+
export interface Params$Resource$Shl$M$Getshlmanifest extends StandardParameters {
|
|
4636
|
+
/**
|
|
4637
|
+
* Required. External ID mapping to a ShlSharedLinkCapabilityToken object See https://docs.google.com/document/d/1Pch20pxJHRbsaMxp0EYgs3ZU0Gu7QTUznk8LhvbQvfY/edit?tab=t.0#heading=h.17wg41voij6q
|
|
4638
|
+
*/
|
|
4639
|
+
externalShlId?: string;
|
|
4640
|
+
|
|
4641
|
+
/**
|
|
4642
|
+
* Request body metadata
|
|
4643
|
+
*/
|
|
4644
|
+
requestBody?: Schema$ManifestParams;
|
|
4645
|
+
}
|
|
4646
|
+
|
|
4647
|
+
export class Resource$Shl$R {
|
|
4648
|
+
context: APIRequestContext;
|
|
4649
|
+
constructor(context: APIRequestContext) {
|
|
4650
|
+
this.context = context;
|
|
4651
|
+
}
|
|
4652
|
+
|
|
4653
|
+
/**
|
|
4654
|
+
* Forward a resource request for a given SHL
|
|
4655
|
+
* @example
|
|
4656
|
+
* ```js
|
|
4657
|
+
* // Before running the sample:
|
|
4658
|
+
* // - Enable the API at:
|
|
4659
|
+
* // https://console.developers.google.com/apis/api/health.googleapis.com
|
|
4660
|
+
* // - Login into gcloud by running:
|
|
4661
|
+
* // ```sh
|
|
4662
|
+
* // $ gcloud auth application-default login
|
|
4663
|
+
* // ```
|
|
4664
|
+
* // - Install the npm module by running:
|
|
4665
|
+
* // ```sh
|
|
4666
|
+
* // $ npm install googleapis
|
|
4667
|
+
* // ```
|
|
4668
|
+
*
|
|
4669
|
+
* const {google} = require('googleapis');
|
|
4670
|
+
* const health = google.health('v4');
|
|
4671
|
+
*
|
|
4672
|
+
* async function main() {
|
|
4673
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4674
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4675
|
+
* scopes: [],
|
|
4676
|
+
* });
|
|
4677
|
+
*
|
|
4678
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4679
|
+
* const authClient = await auth.getClient();
|
|
4680
|
+
* google.options({auth: authClient});
|
|
4681
|
+
*
|
|
4682
|
+
* // Do the magic
|
|
4683
|
+
* const res = await health.shl.r.get({
|
|
4684
|
+
* // Required. External ID mapping to a ShlSharedLinkCapabilityToken object See https://docs.google.com/document/d/1Pch20pxJHRbsaMxp0EYgs3ZU0Gu7QTUznk8LhvbQvfY/edit?tab=t.0#heading=h.17wg41voij6q
|
|
4685
|
+
* externalShlId: 'placeholder-value',
|
|
4686
|
+
* // Required. Encoded, encrypted message containing resource access details
|
|
4687
|
+
* resourceToken: 'placeholder-value',
|
|
4688
|
+
* });
|
|
4689
|
+
* console.log(res.data);
|
|
4690
|
+
*
|
|
4691
|
+
* // Example response
|
|
4692
|
+
* // {
|
|
4693
|
+
* // "contentType": "my_contentType",
|
|
4694
|
+
* // "data": "my_data",
|
|
4695
|
+
* // "extensions": []
|
|
4696
|
+
* // }
|
|
4697
|
+
* }
|
|
4698
|
+
*
|
|
4699
|
+
* main().catch(e => {
|
|
4700
|
+
* console.error(e);
|
|
4701
|
+
* throw e;
|
|
4702
|
+
* });
|
|
4703
|
+
*
|
|
4704
|
+
* ```
|
|
4705
|
+
*
|
|
4706
|
+
* @param params - Parameters for request
|
|
4707
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
4708
|
+
* @param callback - Optional callback that handles the response.
|
|
4709
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
4710
|
+
*/
|
|
4711
|
+
get(
|
|
4712
|
+
params: Params$Resource$Shl$R$Get,
|
|
4713
|
+
options: StreamMethodOptions
|
|
4714
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
4715
|
+
get(
|
|
4716
|
+
params?: Params$Resource$Shl$R$Get,
|
|
4717
|
+
options?: MethodOptions
|
|
4718
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$HttpBody>>;
|
|
4719
|
+
get(
|
|
4720
|
+
params: Params$Resource$Shl$R$Get,
|
|
4721
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
4722
|
+
callback: BodyResponseCallback<Readable>
|
|
4723
|
+
): void;
|
|
4724
|
+
get(
|
|
4725
|
+
params: Params$Resource$Shl$R$Get,
|
|
4726
|
+
options: MethodOptions | BodyResponseCallback<Schema$HttpBody>,
|
|
4727
|
+
callback: BodyResponseCallback<Schema$HttpBody>
|
|
4728
|
+
): void;
|
|
4729
|
+
get(
|
|
4730
|
+
params: Params$Resource$Shl$R$Get,
|
|
4731
|
+
callback: BodyResponseCallback<Schema$HttpBody>
|
|
4732
|
+
): void;
|
|
4733
|
+
get(callback: BodyResponseCallback<Schema$HttpBody>): void;
|
|
4734
|
+
get(
|
|
4735
|
+
paramsOrCallback?:
|
|
4736
|
+
| Params$Resource$Shl$R$Get
|
|
4737
|
+
| BodyResponseCallback<Schema$HttpBody>
|
|
4738
|
+
| BodyResponseCallback<Readable>,
|
|
4739
|
+
optionsOrCallback?:
|
|
4740
|
+
| MethodOptions
|
|
4741
|
+
| StreamMethodOptions
|
|
4742
|
+
| BodyResponseCallback<Schema$HttpBody>
|
|
4743
|
+
| BodyResponseCallback<Readable>,
|
|
4744
|
+
callback?:
|
|
4745
|
+
BodyResponseCallback<Schema$HttpBody> | BodyResponseCallback<Readable>
|
|
4746
|
+
):
|
|
4747
|
+
| void
|
|
4748
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$HttpBody>>
|
|
4749
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
4750
|
+
let params = (paramsOrCallback || {}) as Params$Resource$Shl$R$Get;
|
|
4751
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
4752
|
+
|
|
4753
|
+
if (typeof paramsOrCallback === 'function') {
|
|
4754
|
+
callback = paramsOrCallback;
|
|
4755
|
+
params = {} as Params$Resource$Shl$R$Get;
|
|
4756
|
+
options = {};
|
|
4757
|
+
}
|
|
4758
|
+
|
|
4759
|
+
if (typeof optionsOrCallback === 'function') {
|
|
4760
|
+
callback = optionsOrCallback;
|
|
4761
|
+
options = {};
|
|
4762
|
+
}
|
|
4763
|
+
|
|
4764
|
+
const rootUrl = options.rootUrl || 'https://health.googleapis.com/';
|
|
4765
|
+
const parameters = {
|
|
4766
|
+
options: Object.assign(
|
|
4767
|
+
{
|
|
4768
|
+
url: (
|
|
4769
|
+
rootUrl + '/v4/shl/r/{externalShlId}/{resourceToken}'
|
|
4770
|
+
).replace(/([^:]\/)\/+/g, '$1'),
|
|
4771
|
+
method: 'GET',
|
|
4772
|
+
apiVersion: '',
|
|
4773
|
+
},
|
|
4774
|
+
options
|
|
4775
|
+
),
|
|
4776
|
+
params,
|
|
4777
|
+
requiredParams: ['externalShlId', 'resourceToken'],
|
|
4778
|
+
pathParams: ['externalShlId', 'resourceToken'],
|
|
4779
|
+
context: this.context,
|
|
4780
|
+
};
|
|
4781
|
+
if (callback) {
|
|
4782
|
+
createAPIRequest<Schema$HttpBody>(
|
|
4783
|
+
parameters,
|
|
4784
|
+
callback as BodyResponseCallback<unknown>
|
|
4785
|
+
);
|
|
4786
|
+
} else {
|
|
4787
|
+
return createAPIRequest<Schema$HttpBody>(parameters);
|
|
4788
|
+
}
|
|
4789
|
+
}
|
|
4790
|
+
}
|
|
4791
|
+
|
|
4792
|
+
export interface Params$Resource$Shl$R$Get extends StandardParameters {
|
|
4793
|
+
/**
|
|
4794
|
+
* Required. External ID mapping to a ShlSharedLinkCapabilityToken object See https://docs.google.com/document/d/1Pch20pxJHRbsaMxp0EYgs3ZU0Gu7QTUznk8LhvbQvfY/edit?tab=t.0#heading=h.17wg41voij6q
|
|
4795
|
+
*/
|
|
4796
|
+
externalShlId?: string;
|
|
4797
|
+
/**
|
|
4798
|
+
* Required. Encoded, encrypted message containing resource access details
|
|
4799
|
+
*/
|
|
4800
|
+
resourceToken?: string;
|
|
4801
|
+
}
|
|
4802
|
+
|
|
4803
|
+
export class Resource$Users {
|
|
4804
|
+
context: APIRequestContext;
|
|
4805
|
+
dataTypes: Resource$Users$Datatypes;
|
|
4806
|
+
pairedDevices: Resource$Users$Paireddevices;
|
|
4807
|
+
constructor(context: APIRequestContext) {
|
|
4808
|
+
this.context = context;
|
|
4809
|
+
this.dataTypes = new Resource$Users$Datatypes(this.context);
|
|
4810
|
+
this.pairedDevices = new Resource$Users$Paireddevices(this.context);
|
|
4811
|
+
}
|
|
4812
|
+
|
|
4813
|
+
/**
|
|
4814
|
+
* 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.
|
|
4815
|
+
* @example
|
|
4816
|
+
* ```js
|
|
4817
|
+
* // Before running the sample:
|
|
4818
|
+
* // - Enable the API at:
|
|
4819
|
+
* // https://console.developers.google.com/apis/api/health.googleapis.com
|
|
4820
|
+
* // - Login into gcloud by running:
|
|
4821
|
+
* // ```sh
|
|
4822
|
+
* // $ gcloud auth application-default login
|
|
4823
|
+
* // ```
|
|
4824
|
+
* // - Install the npm module by running:
|
|
4825
|
+
* // ```sh
|
|
4826
|
+
* // $ npm install googleapis
|
|
4827
|
+
* // ```
|
|
4828
|
+
*
|
|
4829
|
+
* const {google} = require('googleapis');
|
|
4830
|
+
* const health = google.health('v4');
|
|
4831
|
+
*
|
|
4832
|
+
* async function main() {
|
|
4833
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4834
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4835
|
+
* scopes: [
|
|
4836
|
+
* 'https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly',
|
|
4837
|
+
* 'https://www.googleapis.com/auth/googlehealth.ecg.readonly',
|
|
4838
|
+
* 'https://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.readonly',
|
|
4839
|
+
* 'https://www.googleapis.com/auth/googlehealth.irn.readonly',
|
|
4840
|
+
* 'https://www.googleapis.com/auth/googlehealth.profile.readonly',
|
|
4841
|
+
* 'https://www.googleapis.com/auth/googlehealth.settings.readonly',
|
|
4842
|
+
* 'https://www.googleapis.com/auth/googlehealth.sleep.readonly',
|
|
4843
|
+
* ],
|
|
4844
|
+
* });
|
|
4845
|
+
*
|
|
4846
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4847
|
+
* const authClient = await auth.getClient();
|
|
4848
|
+
* google.options({auth: authClient});
|
|
4849
|
+
*
|
|
4850
|
+
* // Do the magic
|
|
4851
|
+
* const res = await health.users.getIdentity({
|
|
4852
|
+
* // Required. The resource name of the Identity. Format: `users/me/identity`
|
|
4853
|
+
* name: 'users/my-user/identity',
|
|
4854
|
+
* });
|
|
4855
|
+
* console.log(res.data);
|
|
4856
|
+
*
|
|
4857
|
+
* // Example response
|
|
4858
|
+
* // {
|
|
4859
|
+
* // "healthUserId": "my_healthUserId",
|
|
4860
|
+
* // "legacyUserId": "my_legacyUserId",
|
|
4861
|
+
* // "name": "my_name"
|
|
4862
|
+
* // }
|
|
4863
|
+
* }
|
|
4864
|
+
*
|
|
4865
|
+
* main().catch(e => {
|
|
4866
|
+
* console.error(e);
|
|
4867
|
+
* throw e;
|
|
4868
|
+
* });
|
|
4869
|
+
*
|
|
4870
|
+
* ```
|
|
4871
|
+
*
|
|
4872
|
+
* @param params - Parameters for request
|
|
4873
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
4874
|
+
* @param callback - Optional callback that handles the response.
|
|
4875
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
4876
|
+
*/
|
|
4877
|
+
getIdentity(
|
|
4878
|
+
params: Params$Resource$Users$Getidentity,
|
|
4879
|
+
options: StreamMethodOptions
|
|
4880
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
4881
|
+
getIdentity(
|
|
4882
|
+
params?: Params$Resource$Users$Getidentity,
|
|
4883
|
+
options?: MethodOptions
|
|
4884
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Identity>>;
|
|
4885
|
+
getIdentity(
|
|
4886
|
+
params: Params$Resource$Users$Getidentity,
|
|
4887
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
4888
|
+
callback: BodyResponseCallback<Readable>
|
|
4889
|
+
): void;
|
|
4890
|
+
getIdentity(
|
|
4891
|
+
params: Params$Resource$Users$Getidentity,
|
|
4892
|
+
options: MethodOptions | BodyResponseCallback<Schema$Identity>,
|
|
4893
|
+
callback: BodyResponseCallback<Schema$Identity>
|
|
4894
|
+
): void;
|
|
4895
|
+
getIdentity(
|
|
4896
|
+
params: Params$Resource$Users$Getidentity,
|
|
4897
|
+
callback: BodyResponseCallback<Schema$Identity>
|
|
4898
|
+
): void;
|
|
4899
|
+
getIdentity(callback: BodyResponseCallback<Schema$Identity>): void;
|
|
4900
|
+
getIdentity(
|
|
4901
|
+
paramsOrCallback?:
|
|
4902
|
+
| Params$Resource$Users$Getidentity
|
|
4903
|
+
| BodyResponseCallback<Schema$Identity>
|
|
4904
|
+
| BodyResponseCallback<Readable>,
|
|
4905
|
+
optionsOrCallback?:
|
|
4906
|
+
| MethodOptions
|
|
4907
|
+
| StreamMethodOptions
|
|
4908
|
+
| BodyResponseCallback<Schema$Identity>
|
|
4909
|
+
| BodyResponseCallback<Readable>,
|
|
4910
|
+
callback?:
|
|
4911
|
+
BodyResponseCallback<Schema$Identity> | BodyResponseCallback<Readable>
|
|
4912
|
+
):
|
|
4913
|
+
| void
|
|
4914
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Identity>>
|
|
4915
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
4916
|
+
let params = (paramsOrCallback ||
|
|
4917
|
+
{}) as Params$Resource$Users$Getidentity;
|
|
3177
4918
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
3178
4919
|
|
|
3179
4920
|
if (typeof paramsOrCallback === 'function') {
|
|
@@ -3212,6 +4953,142 @@ export namespace health_v4 {
|
|
|
3212
4953
|
}
|
|
3213
4954
|
}
|
|
3214
4955
|
|
|
4956
|
+
/**
|
|
4957
|
+
* Returns user's IRN Profile details.
|
|
4958
|
+
* @example
|
|
4959
|
+
* ```js
|
|
4960
|
+
* // Before running the sample:
|
|
4961
|
+
* // - Enable the API at:
|
|
4962
|
+
* // https://console.developers.google.com/apis/api/health.googleapis.com
|
|
4963
|
+
* // - Login into gcloud by running:
|
|
4964
|
+
* // ```sh
|
|
4965
|
+
* // $ gcloud auth application-default login
|
|
4966
|
+
* // ```
|
|
4967
|
+
* // - Install the npm module by running:
|
|
4968
|
+
* // ```sh
|
|
4969
|
+
* // $ npm install googleapis
|
|
4970
|
+
* // ```
|
|
4971
|
+
*
|
|
4972
|
+
* const {google} = require('googleapis');
|
|
4973
|
+
* const health = google.health('v4');
|
|
4974
|
+
*
|
|
4975
|
+
* async function main() {
|
|
4976
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4977
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4978
|
+
* scopes: ['https://www.googleapis.com/auth/googlehealth.irn.readonly'],
|
|
4979
|
+
* });
|
|
4980
|
+
*
|
|
4981
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4982
|
+
* const authClient = await auth.getClient();
|
|
4983
|
+
* google.options({auth: authClient});
|
|
4984
|
+
*
|
|
4985
|
+
* // Do the magic
|
|
4986
|
+
* const res = await health.users.getIrnProfile({
|
|
4987
|
+
* // 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.
|
|
4988
|
+
* name: 'users/my-user/irnProfile',
|
|
4989
|
+
* });
|
|
4990
|
+
* console.log(res.data);
|
|
4991
|
+
*
|
|
4992
|
+
* // Example response
|
|
4993
|
+
* // {
|
|
4994
|
+
* // "enrollmentStatus": false,
|
|
4995
|
+
* // "name": "my_name",
|
|
4996
|
+
* // "onboardingStatus": false,
|
|
4997
|
+
* // "updateTime": "my_updateTime"
|
|
4998
|
+
* // }
|
|
4999
|
+
* }
|
|
5000
|
+
*
|
|
5001
|
+
* main().catch(e => {
|
|
5002
|
+
* console.error(e);
|
|
5003
|
+
* throw e;
|
|
5004
|
+
* });
|
|
5005
|
+
*
|
|
5006
|
+
* ```
|
|
5007
|
+
*
|
|
5008
|
+
* @param params - Parameters for request
|
|
5009
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
5010
|
+
* @param callback - Optional callback that handles the response.
|
|
5011
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
5012
|
+
*/
|
|
5013
|
+
getIrnProfile(
|
|
5014
|
+
params: Params$Resource$Users$Getirnprofile,
|
|
5015
|
+
options: StreamMethodOptions
|
|
5016
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
5017
|
+
getIrnProfile(
|
|
5018
|
+
params?: Params$Resource$Users$Getirnprofile,
|
|
5019
|
+
options?: MethodOptions
|
|
5020
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$IrnProfile>>;
|
|
5021
|
+
getIrnProfile(
|
|
5022
|
+
params: Params$Resource$Users$Getirnprofile,
|
|
5023
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
5024
|
+
callback: BodyResponseCallback<Readable>
|
|
5025
|
+
): void;
|
|
5026
|
+
getIrnProfile(
|
|
5027
|
+
params: Params$Resource$Users$Getirnprofile,
|
|
5028
|
+
options: MethodOptions | BodyResponseCallback<Schema$IrnProfile>,
|
|
5029
|
+
callback: BodyResponseCallback<Schema$IrnProfile>
|
|
5030
|
+
): void;
|
|
5031
|
+
getIrnProfile(
|
|
5032
|
+
params: Params$Resource$Users$Getirnprofile,
|
|
5033
|
+
callback: BodyResponseCallback<Schema$IrnProfile>
|
|
5034
|
+
): void;
|
|
5035
|
+
getIrnProfile(callback: BodyResponseCallback<Schema$IrnProfile>): void;
|
|
5036
|
+
getIrnProfile(
|
|
5037
|
+
paramsOrCallback?:
|
|
5038
|
+
| Params$Resource$Users$Getirnprofile
|
|
5039
|
+
| BodyResponseCallback<Schema$IrnProfile>
|
|
5040
|
+
| BodyResponseCallback<Readable>,
|
|
5041
|
+
optionsOrCallback?:
|
|
5042
|
+
| MethodOptions
|
|
5043
|
+
| StreamMethodOptions
|
|
5044
|
+
| BodyResponseCallback<Schema$IrnProfile>
|
|
5045
|
+
| BodyResponseCallback<Readable>,
|
|
5046
|
+
callback?:
|
|
5047
|
+
BodyResponseCallback<Schema$IrnProfile> | BodyResponseCallback<Readable>
|
|
5048
|
+
):
|
|
5049
|
+
| void
|
|
5050
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$IrnProfile>>
|
|
5051
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
5052
|
+
let params = (paramsOrCallback ||
|
|
5053
|
+
{}) as Params$Resource$Users$Getirnprofile;
|
|
5054
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
5055
|
+
|
|
5056
|
+
if (typeof paramsOrCallback === 'function') {
|
|
5057
|
+
callback = paramsOrCallback;
|
|
5058
|
+
params = {} as Params$Resource$Users$Getirnprofile;
|
|
5059
|
+
options = {};
|
|
5060
|
+
}
|
|
5061
|
+
|
|
5062
|
+
if (typeof optionsOrCallback === 'function') {
|
|
5063
|
+
callback = optionsOrCallback;
|
|
5064
|
+
options = {};
|
|
5065
|
+
}
|
|
5066
|
+
|
|
5067
|
+
const rootUrl = options.rootUrl || 'https://health.googleapis.com/';
|
|
5068
|
+
const parameters = {
|
|
5069
|
+
options: Object.assign(
|
|
5070
|
+
{
|
|
5071
|
+
url: (rootUrl + '/v4/{+name}').replace(/([^:]\/)\/+/g, '$1'),
|
|
5072
|
+
method: 'GET',
|
|
5073
|
+
apiVersion: '',
|
|
5074
|
+
},
|
|
5075
|
+
options
|
|
5076
|
+
),
|
|
5077
|
+
params,
|
|
5078
|
+
requiredParams: ['name'],
|
|
5079
|
+
pathParams: ['name'],
|
|
5080
|
+
context: this.context,
|
|
5081
|
+
};
|
|
5082
|
+
if (callback) {
|
|
5083
|
+
createAPIRequest<Schema$IrnProfile>(
|
|
5084
|
+
parameters,
|
|
5085
|
+
callback as BodyResponseCallback<unknown>
|
|
5086
|
+
);
|
|
5087
|
+
} else {
|
|
5088
|
+
return createAPIRequest<Schema$IrnProfile>(parameters);
|
|
5089
|
+
}
|
|
5090
|
+
}
|
|
5091
|
+
|
|
3215
5092
|
/**
|
|
3216
5093
|
* Returns user Profile details.
|
|
3217
5094
|
* @example
|
|
@@ -3234,7 +5111,7 @@ export namespace health_v4 {
|
|
|
3234
5111
|
* async function main() {
|
|
3235
5112
|
* const auth = new google.auth.GoogleAuth({
|
|
3236
5113
|
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3237
|
-
* scopes: [],
|
|
5114
|
+
* scopes: ['https://www.googleapis.com/auth/googlehealth.profile.readonly'],
|
|
3238
5115
|
* });
|
|
3239
5116
|
*
|
|
3240
5117
|
* // Acquire an auth client, and bind it to all future calls
|
|
@@ -3306,8 +5183,7 @@ export namespace health_v4 {
|
|
|
3306
5183
|
| BodyResponseCallback<Schema$Profile>
|
|
3307
5184
|
| BodyResponseCallback<Readable>,
|
|
3308
5185
|
callback?:
|
|
3309
|
-
|
|
3310
|
-
| BodyResponseCallback<Readable>
|
|
5186
|
+
BodyResponseCallback<Schema$Profile> | BodyResponseCallback<Readable>
|
|
3311
5187
|
):
|
|
3312
5188
|
| void
|
|
3313
5189
|
| Promise<GaxiosResponseWithHTTP2<Schema$Profile>>
|
|
@@ -3373,7 +5249,7 @@ export namespace health_v4 {
|
|
|
3373
5249
|
* async function main() {
|
|
3374
5250
|
* const auth = new google.auth.GoogleAuth({
|
|
3375
5251
|
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3376
|
-
* scopes: [],
|
|
5252
|
+
* scopes: ['https://www.googleapis.com/auth/googlehealth.settings.readonly'],
|
|
3377
5253
|
* });
|
|
3378
5254
|
*
|
|
3379
5255
|
* // Acquire an auth client, and bind it to all future calls
|
|
@@ -3391,6 +5267,7 @@ export namespace health_v4 {
|
|
|
3391
5267
|
* // {
|
|
3392
5268
|
* // "autoStrideEnabled": false,
|
|
3393
5269
|
* // "distanceUnit": "my_distanceUnit",
|
|
5270
|
+
* // "foodLanguageCode": "my_foodLanguageCode",
|
|
3394
5271
|
* // "glucoseUnit": "my_glucoseUnit",
|
|
3395
5272
|
* // "heightUnit": "my_heightUnit",
|
|
3396
5273
|
* // "languageLocale": "my_languageLocale",
|
|
@@ -3452,8 +5329,7 @@ export namespace health_v4 {
|
|
|
3452
5329
|
| BodyResponseCallback<Schema$Settings>
|
|
3453
5330
|
| BodyResponseCallback<Readable>,
|
|
3454
5331
|
callback?:
|
|
3455
|
-
|
|
3456
|
-
| BodyResponseCallback<Readable>
|
|
5332
|
+
BodyResponseCallback<Schema$Settings> | BodyResponseCallback<Readable>
|
|
3457
5333
|
):
|
|
3458
5334
|
| void
|
|
3459
5335
|
| Promise<GaxiosResponseWithHTTP2<Schema$Settings>>
|
|
@@ -3520,7 +5396,7 @@ export namespace health_v4 {
|
|
|
3520
5396
|
* async function main() {
|
|
3521
5397
|
* const auth = new google.auth.GoogleAuth({
|
|
3522
5398
|
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3523
|
-
* scopes: [],
|
|
5399
|
+
* scopes: ['https://www.googleapis.com/auth/googlehealth.profile.writeonly'],
|
|
3524
5400
|
* });
|
|
3525
5401
|
*
|
|
3526
5402
|
* // Acquire an auth client, and bind it to all future calls
|
|
@@ -3608,8 +5484,7 @@ export namespace health_v4 {
|
|
|
3608
5484
|
| BodyResponseCallback<Schema$Profile>
|
|
3609
5485
|
| BodyResponseCallback<Readable>,
|
|
3610
5486
|
callback?:
|
|
3611
|
-
|
|
3612
|
-
| BodyResponseCallback<Readable>
|
|
5487
|
+
BodyResponseCallback<Schema$Profile> | BodyResponseCallback<Readable>
|
|
3613
5488
|
):
|
|
3614
5489
|
| void
|
|
3615
5490
|
| Promise<GaxiosResponseWithHTTP2<Schema$Profile>>
|
|
@@ -3676,7 +5551,7 @@ export namespace health_v4 {
|
|
|
3676
5551
|
* async function main() {
|
|
3677
5552
|
* const auth = new google.auth.GoogleAuth({
|
|
3678
5553
|
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3679
|
-
* scopes: [],
|
|
5554
|
+
* scopes: ['https://www.googleapis.com/auth/googlehealth.settings.writeonly'],
|
|
3680
5555
|
* });
|
|
3681
5556
|
*
|
|
3682
5557
|
* // Acquire an auth client, and bind it to all future calls
|
|
@@ -3696,6 +5571,7 @@ export namespace health_v4 {
|
|
|
3696
5571
|
* // {
|
|
3697
5572
|
* // "autoStrideEnabled": false,
|
|
3698
5573
|
* // "distanceUnit": "my_distanceUnit",
|
|
5574
|
+
* // "foodLanguageCode": "my_foodLanguageCode",
|
|
3699
5575
|
* // "glucoseUnit": "my_glucoseUnit",
|
|
3700
5576
|
* // "heightUnit": "my_heightUnit",
|
|
3701
5577
|
* // "languageLocale": "my_languageLocale",
|
|
@@ -3717,6 +5593,7 @@ export namespace health_v4 {
|
|
|
3717
5593
|
* // {
|
|
3718
5594
|
* // "autoStrideEnabled": false,
|
|
3719
5595
|
* // "distanceUnit": "my_distanceUnit",
|
|
5596
|
+
* // "foodLanguageCode": "my_foodLanguageCode",
|
|
3720
5597
|
* // "glucoseUnit": "my_glucoseUnit",
|
|
3721
5598
|
* // "heightUnit": "my_heightUnit",
|
|
3722
5599
|
* // "languageLocale": "my_languageLocale",
|
|
@@ -3778,8 +5655,7 @@ export namespace health_v4 {
|
|
|
3778
5655
|
| BodyResponseCallback<Schema$Settings>
|
|
3779
5656
|
| BodyResponseCallback<Readable>,
|
|
3780
5657
|
callback?:
|
|
3781
|
-
|
|
3782
|
-
| BodyResponseCallback<Readable>
|
|
5658
|
+
BodyResponseCallback<Schema$Settings> | BodyResponseCallback<Readable>
|
|
3783
5659
|
):
|
|
3784
5660
|
| void
|
|
3785
5661
|
| Promise<GaxiosResponseWithHTTP2<Schema$Settings>>
|
|
@@ -3831,6 +5707,12 @@ export namespace health_v4 {
|
|
|
3831
5707
|
*/
|
|
3832
5708
|
name?: string;
|
|
3833
5709
|
}
|
|
5710
|
+
export interface Params$Resource$Users$Getirnprofile extends StandardParameters {
|
|
5711
|
+
/**
|
|
5712
|
+
* 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.
|
|
5713
|
+
*/
|
|
5714
|
+
name?: string;
|
|
5715
|
+
}
|
|
3834
5716
|
export interface Params$Resource$Users$Getprofile extends StandardParameters {
|
|
3835
5717
|
/**
|
|
3836
5718
|
* Required. The name of the Profile. Format: `users/me/profile`.
|
|
@@ -3911,7 +5793,16 @@ export namespace health_v4 {
|
|
|
3911
5793
|
* async function main() {
|
|
3912
5794
|
* const auth = new google.auth.GoogleAuth({
|
|
3913
5795
|
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3914
|
-
* scopes: [
|
|
5796
|
+
* scopes: [
|
|
5797
|
+
* 'https://www.googleapis.com/auth/googlehealth.activity_and_fitness.writeonly',
|
|
5798
|
+
* 'https://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.writeonly',
|
|
5799
|
+
* 'https://www.googleapis.com/auth/googlehealth.location.writeonly',
|
|
5800
|
+
* 'https://www.googleapis.com/auth/googlehealth.logged_symptoms.writeonly',
|
|
5801
|
+
* 'https://www.googleapis.com/auth/googlehealth.mindfulness.writeonly',
|
|
5802
|
+
* 'https://www.googleapis.com/auth/googlehealth.nutrition.writeonly',
|
|
5803
|
+
* 'https://www.googleapis.com/auth/googlehealth.reproductive_health.writeonly',
|
|
5804
|
+
* 'https://www.googleapis.com/auth/googlehealth.sleep.writeonly',
|
|
5805
|
+
* ],
|
|
3915
5806
|
* });
|
|
3916
5807
|
*
|
|
3917
5808
|
* // Acquire an auth client, and bind it to all future calls
|
|
@@ -3989,8 +5880,7 @@ export namespace health_v4 {
|
|
|
3989
5880
|
| BodyResponseCallback<Schema$Operation>
|
|
3990
5881
|
| BodyResponseCallback<Readable>,
|
|
3991
5882
|
callback?:
|
|
3992
|
-
|
|
3993
|
-
| BodyResponseCallback<Readable>
|
|
5883
|
+
BodyResponseCallback<Schema$Operation> | BodyResponseCallback<Readable>
|
|
3994
5884
|
):
|
|
3995
5885
|
| void
|
|
3996
5886
|
| Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
|
|
@@ -4060,7 +5950,16 @@ export namespace health_v4 {
|
|
|
4060
5950
|
* async function main() {
|
|
4061
5951
|
* const auth = new google.auth.GoogleAuth({
|
|
4062
5952
|
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4063
|
-
* scopes: [
|
|
5953
|
+
* scopes: [
|
|
5954
|
+
* 'https://www.googleapis.com/auth/googlehealth.activity_and_fitness.writeonly',
|
|
5955
|
+
* 'https://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.writeonly',
|
|
5956
|
+
* 'https://www.googleapis.com/auth/googlehealth.location.writeonly',
|
|
5957
|
+
* 'https://www.googleapis.com/auth/googlehealth.logged_symptoms.writeonly',
|
|
5958
|
+
* 'https://www.googleapis.com/auth/googlehealth.mindfulness.writeonly',
|
|
5959
|
+
* 'https://www.googleapis.com/auth/googlehealth.nutrition.writeonly',
|
|
5960
|
+
* 'https://www.googleapis.com/auth/googlehealth.reproductive_health.writeonly',
|
|
5961
|
+
* 'https://www.googleapis.com/auth/googlehealth.sleep.writeonly',
|
|
5962
|
+
* ],
|
|
4064
5963
|
* });
|
|
4065
5964
|
*
|
|
4066
5965
|
* // Acquire an auth client, and bind it to all future calls
|
|
@@ -4076,12 +5975,15 @@ export namespace health_v4 {
|
|
|
4076
5975
|
* requestBody: {
|
|
4077
5976
|
* // request body parameters
|
|
4078
5977
|
* // {
|
|
5978
|
+
* // "activeEnergyBurned": {},
|
|
4079
5979
|
* // "activeMinutes": {},
|
|
4080
5980
|
* // "activeZoneMinutes": {},
|
|
4081
5981
|
* // "activityLevel": {},
|
|
4082
5982
|
* // "altitude": {},
|
|
4083
5983
|
* // "basalEnergyBurned": {},
|
|
5984
|
+
* // "bloodGlucose": {},
|
|
4084
5985
|
* // "bodyFat": {},
|
|
5986
|
+
* // "coreBodyTemperature": {},
|
|
4085
5987
|
* // "dailyHeartRateVariability": {},
|
|
4086
5988
|
* // "dailyHeartRateZones": {},
|
|
4087
5989
|
* // "dailyOxygenSaturation": {},
|
|
@@ -4091,13 +5993,18 @@ export namespace health_v4 {
|
|
|
4091
5993
|
* // "dailyVo2Max": {},
|
|
4092
5994
|
* // "dataSource": {},
|
|
4093
5995
|
* // "distance": {},
|
|
5996
|
+
* // "electrocardiogram": {},
|
|
4094
5997
|
* // "exercise": {},
|
|
4095
5998
|
* // "floors": {},
|
|
5999
|
+
* // "food": {},
|
|
6000
|
+
* // "foodMeasurementUnit": {},
|
|
4096
6001
|
* // "heartRate": {},
|
|
4097
6002
|
* // "heartRateVariability": {},
|
|
4098
6003
|
* // "height": {},
|
|
4099
6004
|
* // "hydrationLog": {},
|
|
6005
|
+
* // "irregularRhythmNotification": {},
|
|
4100
6006
|
* // "name": "my_name",
|
|
6007
|
+
* // "nutritionLog": {},
|
|
4101
6008
|
* // "oxygenSaturation": {},
|
|
4102
6009
|
* // "respiratoryRateSleepSummary": {},
|
|
4103
6010
|
* // "runVo2Max": {},
|
|
@@ -4169,8 +6076,7 @@ export namespace health_v4 {
|
|
|
4169
6076
|
| BodyResponseCallback<Schema$Operation>
|
|
4170
6077
|
| BodyResponseCallback<Readable>,
|
|
4171
6078
|
callback?:
|
|
4172
|
-
|
|
4173
|
-
| BodyResponseCallback<Readable>
|
|
6079
|
+
BodyResponseCallback<Schema$Operation> | BodyResponseCallback<Readable>
|
|
4174
6080
|
):
|
|
4175
6081
|
| void
|
|
4176
6082
|
| Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
|
|
@@ -4240,7 +6146,12 @@ export namespace health_v4 {
|
|
|
4240
6146
|
* async function main() {
|
|
4241
6147
|
* const auth = new google.auth.GoogleAuth({
|
|
4242
6148
|
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4243
|
-
* scopes: [
|
|
6149
|
+
* scopes: [
|
|
6150
|
+
* 'https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly',
|
|
6151
|
+
* 'https://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.readonly',
|
|
6152
|
+
* 'https://www.googleapis.com/auth/googlehealth.location.readonly',
|
|
6153
|
+
* 'https://www.googleapis.com/auth/googlehealth.sleep.readonly',
|
|
6154
|
+
* ],
|
|
4244
6155
|
* });
|
|
4245
6156
|
*
|
|
4246
6157
|
* // Acquire an auth client, and bind it to all future calls
|
|
@@ -4374,7 +6285,7 @@ export namespace health_v4 {
|
|
|
4374
6285
|
}
|
|
4375
6286
|
|
|
4376
6287
|
/**
|
|
4377
|
-
* Exports exercise data in TCX format.
|
|
6288
|
+
* 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.
|
|
4378
6289
|
* @example
|
|
4379
6290
|
* ```js
|
|
4380
6291
|
* // Before running the sample:
|
|
@@ -4395,7 +6306,10 @@ export namespace health_v4 {
|
|
|
4395
6306
|
* async function main() {
|
|
4396
6307
|
* const auth = new google.auth.GoogleAuth({
|
|
4397
6308
|
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4398
|
-
* scopes: [
|
|
6309
|
+
* scopes: [
|
|
6310
|
+
* 'https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly',
|
|
6311
|
+
* 'https://www.googleapis.com/auth/googlehealth.location.readonly',
|
|
6312
|
+
* ],
|
|
4399
6313
|
* });
|
|
4400
6314
|
*
|
|
4401
6315
|
* // Acquire an auth client, and bind it to all future calls
|
|
@@ -4445,8 +6359,7 @@ export namespace health_v4 {
|
|
|
4445
6359
|
exportExerciseTcx(
|
|
4446
6360
|
params: Params$Resource$Users$Datatypes$Datapoints$Exportexercisetcx,
|
|
4447
6361
|
options:
|
|
4448
|
-
|
|
|
4449
|
-
| BodyResponseCallback<Schema$ExportExerciseTcxResponse>,
|
|
6362
|
+
MethodOptions | BodyResponseCallback<Schema$ExportExerciseTcxResponse>,
|
|
4450
6363
|
callback: BodyResponseCallback<Schema$ExportExerciseTcxResponse>
|
|
4451
6364
|
): void;
|
|
4452
6365
|
exportExerciseTcx(
|
|
@@ -4539,7 +6452,12 @@ export namespace health_v4 {
|
|
|
4539
6452
|
* async function main() {
|
|
4540
6453
|
* const auth = new google.auth.GoogleAuth({
|
|
4541
6454
|
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4542
|
-
* scopes: [
|
|
6455
|
+
* scopes: [
|
|
6456
|
+
* 'https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly',
|
|
6457
|
+
* 'https://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.readonly',
|
|
6458
|
+
* 'https://www.googleapis.com/auth/googlehealth.location.readonly',
|
|
6459
|
+
* 'https://www.googleapis.com/auth/googlehealth.sleep.readonly',
|
|
6460
|
+
* ],
|
|
4543
6461
|
* });
|
|
4544
6462
|
*
|
|
4545
6463
|
* // Acquire an auth client, and bind it to all future calls
|
|
@@ -4555,12 +6473,15 @@ export namespace health_v4 {
|
|
|
4555
6473
|
*
|
|
4556
6474
|
* // Example response
|
|
4557
6475
|
* // {
|
|
6476
|
+
* // "activeEnergyBurned": {},
|
|
4558
6477
|
* // "activeMinutes": {},
|
|
4559
6478
|
* // "activeZoneMinutes": {},
|
|
4560
6479
|
* // "activityLevel": {},
|
|
4561
6480
|
* // "altitude": {},
|
|
4562
6481
|
* // "basalEnergyBurned": {},
|
|
6482
|
+
* // "bloodGlucose": {},
|
|
4563
6483
|
* // "bodyFat": {},
|
|
6484
|
+
* // "coreBodyTemperature": {},
|
|
4564
6485
|
* // "dailyHeartRateVariability": {},
|
|
4565
6486
|
* // "dailyHeartRateZones": {},
|
|
4566
6487
|
* // "dailyOxygenSaturation": {},
|
|
@@ -4570,13 +6491,18 @@ export namespace health_v4 {
|
|
|
4570
6491
|
* // "dailyVo2Max": {},
|
|
4571
6492
|
* // "dataSource": {},
|
|
4572
6493
|
* // "distance": {},
|
|
6494
|
+
* // "electrocardiogram": {},
|
|
4573
6495
|
* // "exercise": {},
|
|
4574
6496
|
* // "floors": {},
|
|
6497
|
+
* // "food": {},
|
|
6498
|
+
* // "foodMeasurementUnit": {},
|
|
4575
6499
|
* // "heartRate": {},
|
|
4576
6500
|
* // "heartRateVariability": {},
|
|
4577
6501
|
* // "height": {},
|
|
4578
6502
|
* // "hydrationLog": {},
|
|
6503
|
+
* // "irregularRhythmNotification": {},
|
|
4579
6504
|
* // "name": "my_name",
|
|
6505
|
+
* // "nutritionLog": {},
|
|
4580
6506
|
* // "oxygenSaturation": {},
|
|
4581
6507
|
* // "respiratoryRateSleepSummary": {},
|
|
4582
6508
|
* // "runVo2Max": {},
|
|
@@ -4636,8 +6562,7 @@ export namespace health_v4 {
|
|
|
4636
6562
|
| BodyResponseCallback<Schema$DataPoint>
|
|
4637
6563
|
| BodyResponseCallback<Readable>,
|
|
4638
6564
|
callback?:
|
|
4639
|
-
|
|
4640
|
-
| BodyResponseCallback<Readable>
|
|
6565
|
+
BodyResponseCallback<Schema$DataPoint> | BodyResponseCallback<Readable>
|
|
4641
6566
|
):
|
|
4642
6567
|
| void
|
|
4643
6568
|
| Promise<GaxiosResponseWithHTTP2<Schema$DataPoint>>
|
|
@@ -4704,7 +6629,12 @@ export namespace health_v4 {
|
|
|
4704
6629
|
* async function main() {
|
|
4705
6630
|
* const auth = new google.auth.GoogleAuth({
|
|
4706
6631
|
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4707
|
-
* scopes: [
|
|
6632
|
+
* scopes: [
|
|
6633
|
+
* 'https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly',
|
|
6634
|
+
* 'https://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.readonly',
|
|
6635
|
+
* 'https://www.googleapis.com/auth/googlehealth.location.readonly',
|
|
6636
|
+
* 'https://www.googleapis.com/auth/googlehealth.sleep.readonly',
|
|
6637
|
+
* ],
|
|
4708
6638
|
* });
|
|
4709
6639
|
*
|
|
4710
6640
|
* // Acquire an auth client, and bind it to all future calls
|
|
@@ -4713,7 +6643,7 @@ export namespace health_v4 {
|
|
|
4713
6643
|
*
|
|
4714
6644
|
* // Do the magic
|
|
4715
6645
|
* const res = await health.users.dataTypes.dataPoints.list({
|
|
4716
|
-
* // 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.
|
|
6646
|
+
* // 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.
|
|
4717
6647
|
* filter: 'placeholder-value',
|
|
4718
6648
|
* // 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.
|
|
4719
6649
|
* pageSize: 'placeholder-value',
|
|
@@ -4759,8 +6689,7 @@ export namespace health_v4 {
|
|
|
4759
6689
|
list(
|
|
4760
6690
|
params: Params$Resource$Users$Datatypes$Datapoints$List,
|
|
4761
6691
|
options:
|
|
4762
|
-
|
|
|
4763
|
-
| BodyResponseCallback<Schema$ListDataPointsResponse>,
|
|
6692
|
+
MethodOptions | BodyResponseCallback<Schema$ListDataPointsResponse>,
|
|
4764
6693
|
callback: BodyResponseCallback<Schema$ListDataPointsResponse>
|
|
4765
6694
|
): void;
|
|
4766
6695
|
list(
|
|
@@ -4850,7 +6779,16 @@ export namespace health_v4 {
|
|
|
4850
6779
|
* async function main() {
|
|
4851
6780
|
* const auth = new google.auth.GoogleAuth({
|
|
4852
6781
|
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4853
|
-
* scopes: [
|
|
6782
|
+
* scopes: [
|
|
6783
|
+
* 'https://www.googleapis.com/auth/googlehealth.activity_and_fitness.writeonly',
|
|
6784
|
+
* 'https://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.writeonly',
|
|
6785
|
+
* 'https://www.googleapis.com/auth/googlehealth.location.writeonly',
|
|
6786
|
+
* 'https://www.googleapis.com/auth/googlehealth.logged_symptoms.writeonly',
|
|
6787
|
+
* 'https://www.googleapis.com/auth/googlehealth.mindfulness.writeonly',
|
|
6788
|
+
* 'https://www.googleapis.com/auth/googlehealth.nutrition.writeonly',
|
|
6789
|
+
* 'https://www.googleapis.com/auth/googlehealth.reproductive_health.writeonly',
|
|
6790
|
+
* 'https://www.googleapis.com/auth/googlehealth.sleep.writeonly',
|
|
6791
|
+
* ],
|
|
4854
6792
|
* });
|
|
4855
6793
|
*
|
|
4856
6794
|
* // Acquire an auth client, and bind it to all future calls
|
|
@@ -4859,19 +6797,22 @@ export namespace health_v4 {
|
|
|
4859
6797
|
*
|
|
4860
6798
|
* // Do the magic
|
|
4861
6799
|
* const res = await health.users.dataTypes.dataPoints.patch({
|
|
4862
|
-
* // 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. `
|
|
6800
|
+
* // 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. `heart-rate` for the `heart_rate` 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.
|
|
4863
6801
|
* name: 'users/my-user/dataTypes/my-dataType/dataPoints/my-dataPoint',
|
|
4864
6802
|
*
|
|
4865
6803
|
* // Request body metadata
|
|
4866
6804
|
* requestBody: {
|
|
4867
6805
|
* // request body parameters
|
|
4868
6806
|
* // {
|
|
6807
|
+
* // "activeEnergyBurned": {},
|
|
4869
6808
|
* // "activeMinutes": {},
|
|
4870
6809
|
* // "activeZoneMinutes": {},
|
|
4871
6810
|
* // "activityLevel": {},
|
|
4872
6811
|
* // "altitude": {},
|
|
4873
6812
|
* // "basalEnergyBurned": {},
|
|
6813
|
+
* // "bloodGlucose": {},
|
|
4874
6814
|
* // "bodyFat": {},
|
|
6815
|
+
* // "coreBodyTemperature": {},
|
|
4875
6816
|
* // "dailyHeartRateVariability": {},
|
|
4876
6817
|
* // "dailyHeartRateZones": {},
|
|
4877
6818
|
* // "dailyOxygenSaturation": {},
|
|
@@ -4881,13 +6822,18 @@ export namespace health_v4 {
|
|
|
4881
6822
|
* // "dailyVo2Max": {},
|
|
4882
6823
|
* // "dataSource": {},
|
|
4883
6824
|
* // "distance": {},
|
|
6825
|
+
* // "electrocardiogram": {},
|
|
4884
6826
|
* // "exercise": {},
|
|
4885
6827
|
* // "floors": {},
|
|
6828
|
+
* // "food": {},
|
|
6829
|
+
* // "foodMeasurementUnit": {},
|
|
4886
6830
|
* // "heartRate": {},
|
|
4887
6831
|
* // "heartRateVariability": {},
|
|
4888
6832
|
* // "height": {},
|
|
4889
6833
|
* // "hydrationLog": {},
|
|
6834
|
+
* // "irregularRhythmNotification": {},
|
|
4890
6835
|
* // "name": "my_name",
|
|
6836
|
+
* // "nutritionLog": {},
|
|
4891
6837
|
* // "oxygenSaturation": {},
|
|
4892
6838
|
* // "respiratoryRateSleepSummary": {},
|
|
4893
6839
|
* // "runVo2Max": {},
|
|
@@ -4959,8 +6905,7 @@ export namespace health_v4 {
|
|
|
4959
6905
|
| BodyResponseCallback<Schema$Operation>
|
|
4960
6906
|
| BodyResponseCallback<Readable>,
|
|
4961
6907
|
callback?:
|
|
4962
|
-
|
|
4963
|
-
| BodyResponseCallback<Readable>
|
|
6908
|
+
BodyResponseCallback<Schema$Operation> | BodyResponseCallback<Readable>
|
|
4964
6909
|
):
|
|
4965
6910
|
| void
|
|
4966
6911
|
| Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
|
|
@@ -5027,7 +6972,12 @@ export namespace health_v4 {
|
|
|
5027
6972
|
* async function main() {
|
|
5028
6973
|
* const auth = new google.auth.GoogleAuth({
|
|
5029
6974
|
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5030
|
-
* scopes: [
|
|
6975
|
+
* scopes: [
|
|
6976
|
+
* 'https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly',
|
|
6977
|
+
* 'https://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.readonly',
|
|
6978
|
+
* 'https://www.googleapis.com/auth/googlehealth.location.readonly',
|
|
6979
|
+
* 'https://www.googleapis.com/auth/googlehealth.sleep.readonly',
|
|
6980
|
+
* ],
|
|
5031
6981
|
* });
|
|
5032
6982
|
*
|
|
5033
6983
|
* // Acquire an auth client, and bind it to all future calls
|
|
@@ -5177,7 +7127,12 @@ export namespace health_v4 {
|
|
|
5177
7127
|
* async function main() {
|
|
5178
7128
|
* const auth = new google.auth.GoogleAuth({
|
|
5179
7129
|
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5180
|
-
* scopes: [
|
|
7130
|
+
* scopes: [
|
|
7131
|
+
* 'https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly',
|
|
7132
|
+
* 'https://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.readonly',
|
|
7133
|
+
* 'https://www.googleapis.com/auth/googlehealth.location.readonly',
|
|
7134
|
+
* 'https://www.googleapis.com/auth/googlehealth.sleep.readonly',
|
|
7135
|
+
* ],
|
|
5181
7136
|
* });
|
|
5182
7137
|
*
|
|
5183
7138
|
* // Acquire an auth client, and bind it to all future calls
|
|
@@ -5238,8 +7193,7 @@ export namespace health_v4 {
|
|
|
5238
7193
|
rollUp(
|
|
5239
7194
|
params: Params$Resource$Users$Datatypes$Datapoints$Rollup,
|
|
5240
7195
|
options:
|
|
5241
|
-
|
|
|
5242
|
-
| BodyResponseCallback<Schema$RollUpDataPointsResponse>,
|
|
7196
|
+
MethodOptions | BodyResponseCallback<Schema$RollUpDataPointsResponse>,
|
|
5243
7197
|
callback: BodyResponseCallback<Schema$RollUpDataPointsResponse>
|
|
5244
7198
|
): void;
|
|
5245
7199
|
rollUp(
|
|
@@ -5361,7 +7315,7 @@ export namespace health_v4 {
|
|
|
5361
7315
|
}
|
|
5362
7316
|
export interface Params$Resource$Users$Datatypes$Datapoints$List extends StandardParameters {
|
|
5363
7317
|
/**
|
|
5364
|
-
* 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.
|
|
7318
|
+
* 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.
|
|
5365
7319
|
*/
|
|
5366
7320
|
filter?: string;
|
|
5367
7321
|
/**
|
|
@@ -5379,7 +7333,7 @@ export namespace health_v4 {
|
|
|
5379
7333
|
}
|
|
5380
7334
|
export interface Params$Resource$Users$Datatypes$Datapoints$Patch extends StandardParameters {
|
|
5381
7335
|
/**
|
|
5382
|
-
* 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. `
|
|
7336
|
+
* 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. `heart-rate` for the `heart_rate` 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.
|
|
5383
7337
|
*/
|
|
5384
7338
|
name?: string;
|
|
5385
7339
|
|
|
@@ -5421,4 +7375,318 @@ export namespace health_v4 {
|
|
|
5421
7375
|
*/
|
|
5422
7376
|
requestBody?: Schema$RollUpDataPointsRequest;
|
|
5423
7377
|
}
|
|
7378
|
+
|
|
7379
|
+
export class Resource$Users$Paireddevices {
|
|
7380
|
+
context: APIRequestContext;
|
|
7381
|
+
constructor(context: APIRequestContext) {
|
|
7382
|
+
this.context = context;
|
|
7383
|
+
}
|
|
7384
|
+
|
|
7385
|
+
/**
|
|
7386
|
+
* Returns user's Device.
|
|
7387
|
+
* @example
|
|
7388
|
+
* ```js
|
|
7389
|
+
* // Before running the sample:
|
|
7390
|
+
* // - Enable the API at:
|
|
7391
|
+
* // https://console.developers.google.com/apis/api/health.googleapis.com
|
|
7392
|
+
* // - Login into gcloud by running:
|
|
7393
|
+
* // ```sh
|
|
7394
|
+
* // $ gcloud auth application-default login
|
|
7395
|
+
* // ```
|
|
7396
|
+
* // - Install the npm module by running:
|
|
7397
|
+
* // ```sh
|
|
7398
|
+
* // $ npm install googleapis
|
|
7399
|
+
* // ```
|
|
7400
|
+
*
|
|
7401
|
+
* const {google} = require('googleapis');
|
|
7402
|
+
* const health = google.health('v4');
|
|
7403
|
+
*
|
|
7404
|
+
* async function main() {
|
|
7405
|
+
* const auth = new google.auth.GoogleAuth({
|
|
7406
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7407
|
+
* scopes: ['https://www.googleapis.com/auth/googlehealth.settings.readonly'],
|
|
7408
|
+
* });
|
|
7409
|
+
*
|
|
7410
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
7411
|
+
* const authClient = await auth.getClient();
|
|
7412
|
+
* google.options({auth: authClient});
|
|
7413
|
+
*
|
|
7414
|
+
* // Do the magic
|
|
7415
|
+
* const res = await health.users.pairedDevices.get({
|
|
7416
|
+
* // Required. The name of the device to retrieve. Format: users/{user\}/devices/{device\}
|
|
7417
|
+
* name: 'users/my-user/pairedDevices/my-pairedDevice',
|
|
7418
|
+
* });
|
|
7419
|
+
* console.log(res.data);
|
|
7420
|
+
*
|
|
7421
|
+
* // Example response
|
|
7422
|
+
* // {
|
|
7423
|
+
* // "batteryLevel": 0,
|
|
7424
|
+
* // "batteryStatus": "my_batteryStatus",
|
|
7425
|
+
* // "deviceType": "my_deviceType",
|
|
7426
|
+
* // "deviceVersion": "my_deviceVersion",
|
|
7427
|
+
* // "features": [],
|
|
7428
|
+
* // "lastSyncTime": "my_lastSyncTime",
|
|
7429
|
+
* // "macAddress": "my_macAddress",
|
|
7430
|
+
* // "name": "my_name"
|
|
7431
|
+
* // }
|
|
7432
|
+
* }
|
|
7433
|
+
*
|
|
7434
|
+
* main().catch(e => {
|
|
7435
|
+
* console.error(e);
|
|
7436
|
+
* throw e;
|
|
7437
|
+
* });
|
|
7438
|
+
*
|
|
7439
|
+
* ```
|
|
7440
|
+
*
|
|
7441
|
+
* @param params - Parameters for request
|
|
7442
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
7443
|
+
* @param callback - Optional callback that handles the response.
|
|
7444
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
7445
|
+
*/
|
|
7446
|
+
get(
|
|
7447
|
+
params: Params$Resource$Users$Paireddevices$Get,
|
|
7448
|
+
options: StreamMethodOptions
|
|
7449
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
7450
|
+
get(
|
|
7451
|
+
params?: Params$Resource$Users$Paireddevices$Get,
|
|
7452
|
+
options?: MethodOptions
|
|
7453
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$PairedDevice>>;
|
|
7454
|
+
get(
|
|
7455
|
+
params: Params$Resource$Users$Paireddevices$Get,
|
|
7456
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
7457
|
+
callback: BodyResponseCallback<Readable>
|
|
7458
|
+
): void;
|
|
7459
|
+
get(
|
|
7460
|
+
params: Params$Resource$Users$Paireddevices$Get,
|
|
7461
|
+
options: MethodOptions | BodyResponseCallback<Schema$PairedDevice>,
|
|
7462
|
+
callback: BodyResponseCallback<Schema$PairedDevice>
|
|
7463
|
+
): void;
|
|
7464
|
+
get(
|
|
7465
|
+
params: Params$Resource$Users$Paireddevices$Get,
|
|
7466
|
+
callback: BodyResponseCallback<Schema$PairedDevice>
|
|
7467
|
+
): void;
|
|
7468
|
+
get(callback: BodyResponseCallback<Schema$PairedDevice>): void;
|
|
7469
|
+
get(
|
|
7470
|
+
paramsOrCallback?:
|
|
7471
|
+
| Params$Resource$Users$Paireddevices$Get
|
|
7472
|
+
| BodyResponseCallback<Schema$PairedDevice>
|
|
7473
|
+
| BodyResponseCallback<Readable>,
|
|
7474
|
+
optionsOrCallback?:
|
|
7475
|
+
| MethodOptions
|
|
7476
|
+
| StreamMethodOptions
|
|
7477
|
+
| BodyResponseCallback<Schema$PairedDevice>
|
|
7478
|
+
| BodyResponseCallback<Readable>,
|
|
7479
|
+
callback?:
|
|
7480
|
+
| BodyResponseCallback<Schema$PairedDevice>
|
|
7481
|
+
| BodyResponseCallback<Readable>
|
|
7482
|
+
):
|
|
7483
|
+
| void
|
|
7484
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$PairedDevice>>
|
|
7485
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
7486
|
+
let params = (paramsOrCallback ||
|
|
7487
|
+
{}) as Params$Resource$Users$Paireddevices$Get;
|
|
7488
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
7489
|
+
|
|
7490
|
+
if (typeof paramsOrCallback === 'function') {
|
|
7491
|
+
callback = paramsOrCallback;
|
|
7492
|
+
params = {} as Params$Resource$Users$Paireddevices$Get;
|
|
7493
|
+
options = {};
|
|
7494
|
+
}
|
|
7495
|
+
|
|
7496
|
+
if (typeof optionsOrCallback === 'function') {
|
|
7497
|
+
callback = optionsOrCallback;
|
|
7498
|
+
options = {};
|
|
7499
|
+
}
|
|
7500
|
+
|
|
7501
|
+
const rootUrl = options.rootUrl || 'https://health.googleapis.com/';
|
|
7502
|
+
const parameters = {
|
|
7503
|
+
options: Object.assign(
|
|
7504
|
+
{
|
|
7505
|
+
url: (rootUrl + '/v4/{+name}').replace(/([^:]\/)\/+/g, '$1'),
|
|
7506
|
+
method: 'GET',
|
|
7507
|
+
apiVersion: '',
|
|
7508
|
+
},
|
|
7509
|
+
options
|
|
7510
|
+
),
|
|
7511
|
+
params,
|
|
7512
|
+
requiredParams: ['name'],
|
|
7513
|
+
pathParams: ['name'],
|
|
7514
|
+
context: this.context,
|
|
7515
|
+
};
|
|
7516
|
+
if (callback) {
|
|
7517
|
+
createAPIRequest<Schema$PairedDevice>(
|
|
7518
|
+
parameters,
|
|
7519
|
+
callback as BodyResponseCallback<unknown>
|
|
7520
|
+
);
|
|
7521
|
+
} else {
|
|
7522
|
+
return createAPIRequest<Schema$PairedDevice>(parameters);
|
|
7523
|
+
}
|
|
7524
|
+
}
|
|
7525
|
+
|
|
7526
|
+
/**
|
|
7527
|
+
* Returns the user's list of paired 1P trackers and smartwatches.
|
|
7528
|
+
* @example
|
|
7529
|
+
* ```js
|
|
7530
|
+
* // Before running the sample:
|
|
7531
|
+
* // - Enable the API at:
|
|
7532
|
+
* // https://console.developers.google.com/apis/api/health.googleapis.com
|
|
7533
|
+
* // - Login into gcloud by running:
|
|
7534
|
+
* // ```sh
|
|
7535
|
+
* // $ gcloud auth application-default login
|
|
7536
|
+
* // ```
|
|
7537
|
+
* // - Install the npm module by running:
|
|
7538
|
+
* // ```sh
|
|
7539
|
+
* // $ npm install googleapis
|
|
7540
|
+
* // ```
|
|
7541
|
+
*
|
|
7542
|
+
* const {google} = require('googleapis');
|
|
7543
|
+
* const health = google.health('v4');
|
|
7544
|
+
*
|
|
7545
|
+
* async function main() {
|
|
7546
|
+
* const auth = new google.auth.GoogleAuth({
|
|
7547
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7548
|
+
* scopes: ['https://www.googleapis.com/auth/googlehealth.settings.readonly'],
|
|
7549
|
+
* });
|
|
7550
|
+
*
|
|
7551
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
7552
|
+
* const authClient = await auth.getClient();
|
|
7553
|
+
* google.options({auth: authClient});
|
|
7554
|
+
*
|
|
7555
|
+
* // Do the magic
|
|
7556
|
+
* const res = await health.users.pairedDevices.list({
|
|
7557
|
+
* // 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.
|
|
7558
|
+
* pageSize: 'placeholder-value',
|
|
7559
|
+
* // 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.
|
|
7560
|
+
* pageToken: 'placeholder-value',
|
|
7561
|
+
* // Required. The parent, which owns this collection of devices. Format: users/{user\}
|
|
7562
|
+
* parent: 'users/my-user',
|
|
7563
|
+
* });
|
|
7564
|
+
* console.log(res.data);
|
|
7565
|
+
*
|
|
7566
|
+
* // Example response
|
|
7567
|
+
* // {
|
|
7568
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
7569
|
+
* // "pairedDevices": []
|
|
7570
|
+
* // }
|
|
7571
|
+
* }
|
|
7572
|
+
*
|
|
7573
|
+
* main().catch(e => {
|
|
7574
|
+
* console.error(e);
|
|
7575
|
+
* throw e;
|
|
7576
|
+
* });
|
|
7577
|
+
*
|
|
7578
|
+
* ```
|
|
7579
|
+
*
|
|
7580
|
+
* @param params - Parameters for request
|
|
7581
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
7582
|
+
* @param callback - Optional callback that handles the response.
|
|
7583
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
7584
|
+
*/
|
|
7585
|
+
list(
|
|
7586
|
+
params: Params$Resource$Users$Paireddevices$List,
|
|
7587
|
+
options: StreamMethodOptions
|
|
7588
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
7589
|
+
list(
|
|
7590
|
+
params?: Params$Resource$Users$Paireddevices$List,
|
|
7591
|
+
options?: MethodOptions
|
|
7592
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$ListPairedDevicesResponse>>;
|
|
7593
|
+
list(
|
|
7594
|
+
params: Params$Resource$Users$Paireddevices$List,
|
|
7595
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
7596
|
+
callback: BodyResponseCallback<Readable>
|
|
7597
|
+
): void;
|
|
7598
|
+
list(
|
|
7599
|
+
params: Params$Resource$Users$Paireddevices$List,
|
|
7600
|
+
options:
|
|
7601
|
+
MethodOptions | BodyResponseCallback<Schema$ListPairedDevicesResponse>,
|
|
7602
|
+
callback: BodyResponseCallback<Schema$ListPairedDevicesResponse>
|
|
7603
|
+
): void;
|
|
7604
|
+
list(
|
|
7605
|
+
params: Params$Resource$Users$Paireddevices$List,
|
|
7606
|
+
callback: BodyResponseCallback<Schema$ListPairedDevicesResponse>
|
|
7607
|
+
): void;
|
|
7608
|
+
list(
|
|
7609
|
+
callback: BodyResponseCallback<Schema$ListPairedDevicesResponse>
|
|
7610
|
+
): void;
|
|
7611
|
+
list(
|
|
7612
|
+
paramsOrCallback?:
|
|
7613
|
+
| Params$Resource$Users$Paireddevices$List
|
|
7614
|
+
| BodyResponseCallback<Schema$ListPairedDevicesResponse>
|
|
7615
|
+
| BodyResponseCallback<Readable>,
|
|
7616
|
+
optionsOrCallback?:
|
|
7617
|
+
| MethodOptions
|
|
7618
|
+
| StreamMethodOptions
|
|
7619
|
+
| BodyResponseCallback<Schema$ListPairedDevicesResponse>
|
|
7620
|
+
| BodyResponseCallback<Readable>,
|
|
7621
|
+
callback?:
|
|
7622
|
+
| BodyResponseCallback<Schema$ListPairedDevicesResponse>
|
|
7623
|
+
| BodyResponseCallback<Readable>
|
|
7624
|
+
):
|
|
7625
|
+
| void
|
|
7626
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$ListPairedDevicesResponse>>
|
|
7627
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
7628
|
+
let params = (paramsOrCallback ||
|
|
7629
|
+
{}) as Params$Resource$Users$Paireddevices$List;
|
|
7630
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
7631
|
+
|
|
7632
|
+
if (typeof paramsOrCallback === 'function') {
|
|
7633
|
+
callback = paramsOrCallback;
|
|
7634
|
+
params = {} as Params$Resource$Users$Paireddevices$List;
|
|
7635
|
+
options = {};
|
|
7636
|
+
}
|
|
7637
|
+
|
|
7638
|
+
if (typeof optionsOrCallback === 'function') {
|
|
7639
|
+
callback = optionsOrCallback;
|
|
7640
|
+
options = {};
|
|
7641
|
+
}
|
|
7642
|
+
|
|
7643
|
+
const rootUrl = options.rootUrl || 'https://health.googleapis.com/';
|
|
7644
|
+
const parameters = {
|
|
7645
|
+
options: Object.assign(
|
|
7646
|
+
{
|
|
7647
|
+
url: (rootUrl + '/v4/{+parent}/pairedDevices').replace(
|
|
7648
|
+
/([^:]\/)\/+/g,
|
|
7649
|
+
'$1'
|
|
7650
|
+
),
|
|
7651
|
+
method: 'GET',
|
|
7652
|
+
apiVersion: '',
|
|
7653
|
+
},
|
|
7654
|
+
options
|
|
7655
|
+
),
|
|
7656
|
+
params,
|
|
7657
|
+
requiredParams: ['parent'],
|
|
7658
|
+
pathParams: ['parent'],
|
|
7659
|
+
context: this.context,
|
|
7660
|
+
};
|
|
7661
|
+
if (callback) {
|
|
7662
|
+
createAPIRequest<Schema$ListPairedDevicesResponse>(
|
|
7663
|
+
parameters,
|
|
7664
|
+
callback as BodyResponseCallback<unknown>
|
|
7665
|
+
);
|
|
7666
|
+
} else {
|
|
7667
|
+
return createAPIRequest<Schema$ListPairedDevicesResponse>(parameters);
|
|
7668
|
+
}
|
|
7669
|
+
}
|
|
7670
|
+
}
|
|
7671
|
+
|
|
7672
|
+
export interface Params$Resource$Users$Paireddevices$Get extends StandardParameters {
|
|
7673
|
+
/**
|
|
7674
|
+
* Required. The name of the device to retrieve. Format: users/{user\}/devices/{device\}
|
|
7675
|
+
*/
|
|
7676
|
+
name?: string;
|
|
7677
|
+
}
|
|
7678
|
+
export interface Params$Resource$Users$Paireddevices$List extends StandardParameters {
|
|
7679
|
+
/**
|
|
7680
|
+
* 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.
|
|
7681
|
+
*/
|
|
7682
|
+
pageSize?: number;
|
|
7683
|
+
/**
|
|
7684
|
+
* 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.
|
|
7685
|
+
*/
|
|
7686
|
+
pageToken?: string;
|
|
7687
|
+
/**
|
|
7688
|
+
* Required. The parent, which owns this collection of devices. Format: users/{user\}
|
|
7689
|
+
*/
|
|
7690
|
+
parent?: string;
|
|
7691
|
+
}
|
|
5424
7692
|
}
|