@googleapis/health 1.0.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/v4.ts CHANGED
@@ -126,6 +126,28 @@ export namespace health_v4 {
126
126
  }
127
127
  }
128
128
 
129
+ /**
130
+ * Energy burned as part of an activity, excluding the basal energy burn.
131
+ */
132
+ export interface Schema$ActiveEnergyBurned {
133
+ /**
134
+ * Required. Observed interval
135
+ */
136
+ interval?: Schema$ObservationTimeInterval;
137
+ /**
138
+ * Required. Energy burned during an activity, measured in kilocalories.
139
+ */
140
+ kcal?: number | null;
141
+ }
142
+ /**
143
+ * Represents the result of the rollup of active energy burned.
144
+ */
145
+ export interface Schema$ActiveEnergyBurnedRollupValue {
146
+ /**
147
+ * Output only. Sum of the active energy burned in kilocalories.
148
+ */
149
+ kcalSum?: number | null;
150
+ }
129
151
  /**
130
152
  * Record of active minutes in a given time interval.
131
153
  */
@@ -243,6 +265,43 @@ export namespace health_v4 {
243
265
  */
244
266
  activityLevelRollupsByActivityLevelType?: Schema$ActivityLevelRollupByActivityLevelType[];
245
267
  }
268
+ /**
269
+ * 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).
270
+ */
271
+ export interface Schema$AlertWindow {
272
+ /**
273
+ * Output only. Observed interval end time in civil time in the timezone the subject is in at the end of the observed interval
274
+ */
275
+ civilEndTime?: Schema$CivilDateTime;
276
+ /**
277
+ * Output only. Observed interval start time in civil time in the timezone the subject is in at the start of the observed interval
278
+ */
279
+ civilStartTime?: Schema$CivilDateTime;
280
+ /**
281
+ * Required. The end time of the analysis window.
282
+ */
283
+ endTime?: string | null;
284
+ /**
285
+ * Required. The UTC offset of the user's timezone when the analysis window ended.
286
+ */
287
+ endUtcOffset?: string | null;
288
+ /**
289
+ * Optional. All heart beats in the interval contained in this analysis window.
290
+ */
291
+ heartBeats?: Schema$HeartBeat[];
292
+ /**
293
+ * 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.
294
+ */
295
+ positive?: boolean | null;
296
+ /**
297
+ * Required. Observed interval. The start time of the analysis window.
298
+ */
299
+ startTime?: string | null;
300
+ /**
301
+ * Required. The UTC offset of the user's timezone when the analysis window started.
302
+ */
303
+ startUtcOffset?: string | null;
304
+ }
246
305
  /**
247
306
  * Captures the altitude gain (i.e. deltas), and not level above sea, for a user in millimeters.
248
307
  */
@@ -304,6 +363,48 @@ export namespace health_v4 {
304
363
  */
305
364
  names?: string[] | null;
306
365
  }
366
+ /**
367
+ * Represents a blood glucose level measurement. LINT: LEGACY_NAMES
368
+ */
369
+ export interface Schema$BloodGlucose {
370
+ /**
371
+ * Required. Blood glucose level concentration in mg/dL.
372
+ */
373
+ bloodGlucoseMilligramsPerDeciliter?: number | null;
374
+ /**
375
+ * Optional. Meal type of the measurement.
376
+ */
377
+ mealType?: string | null;
378
+ /**
379
+ * Optional. Source of the measurement.
380
+ */
381
+ measurementSource?: string | null;
382
+ /**
383
+ * Optional. Timing of the measurement.
384
+ */
385
+ measurementTiming?: string | null;
386
+ /**
387
+ * Optional. Standard free-form notes captured at manual logging.
388
+ */
389
+ notes?: string | null;
390
+ /**
391
+ * Required. The time at which blood glucose was measured.
392
+ */
393
+ sampleTime?: Schema$ObservationSampleTime;
394
+ /**
395
+ * Optional. Type of body fluid used to measure the blood glucose.
396
+ */
397
+ specimen?: string | null;
398
+ }
399
+ /**
400
+ * Represents the result of the rollup of the blood glucose data type. LINT: LEGACY_NAMES
401
+ */
402
+ export interface Schema$BloodGlucoseRollupValue {
403
+ /**
404
+ * Average blood glucose level in mg/dL.
405
+ */
406
+ bloodGlucoseMilligramsPerDeciliterAvg?: number | null;
407
+ }
307
408
  /**
308
409
  * Body fat measurement.
309
410
  */
@@ -374,6 +475,44 @@ export namespace health_v4 {
374
475
  */
375
476
  start?: Schema$CivilDateTime;
376
477
  }
478
+ /**
479
+ * Core body temperature measurement, distinct from peripheral body temperature, reflects the temperature of the body's internal organs.
480
+ */
481
+ export interface Schema$CoreBodyTemperature {
482
+ /**
483
+ * Optional. The unique identifier of the core body temperature measurement.
484
+ */
485
+ id?: string | null;
486
+ /**
487
+ * Optional. The location of the core body temperature measurement.
488
+ */
489
+ measurementLocation?: string | null;
490
+ /**
491
+ * Required. The time at which core body temperature was measured.
492
+ */
493
+ sampleTime?: Schema$ObservationSampleTime;
494
+ /**
495
+ * Required. The core body temperature in Celsius.
496
+ */
497
+ temperatureCelsius?: number | null;
498
+ }
499
+ /**
500
+ * Represents the result of the rollup of the core body temperature data type.
501
+ */
502
+ export interface Schema$CoreBodyTemperatureRollupValue {
503
+ /**
504
+ * Average core body temperature in Celsius.
505
+ */
506
+ temperatureCelsiusAvg?: number | null;
507
+ /**
508
+ * Maximum core body temperature in Celsius.
509
+ */
510
+ temperatureCelsiusMax?: number | null;
511
+ /**
512
+ * Minimum core body temperature in Celsius.
513
+ */
514
+ temperatureCelsiusMin?: number | null;
515
+ }
377
516
  /**
378
517
  * Payload for creating a subscriber.
379
518
  */
@@ -391,6 +530,19 @@ export namespace health_v4 {
391
530
  */
392
531
  subscriberConfigs?: Schema$SubscriberConfig[];
393
532
  }
533
+ /**
534
+ * Payload for creating a subscription.
535
+ */
536
+ export interface Schema$CreateSubscriptionPayload {
537
+ /**
538
+ * Optional. Data types subscribed to.
539
+ */
540
+ dataTypes?: string[] | null;
541
+ /**
542
+ * 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`).
543
+ */
544
+ user?: string | null;
545
+ }
394
546
  /**
395
547
  * 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
548
  */
@@ -494,9 +646,13 @@ export namespace health_v4 {
494
646
  calculationMethod?: string | null;
495
647
  }
496
648
  /**
497
- * Value of a daily rollup for a single civil time interval (aggregation window)
649
+ * 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
650
  */
499
651
  export interface Schema$DailyRollupDataPoint {
652
+ /**
653
+ * Returned by default when rolling up data points from the `active-energy-burned` data type.
654
+ */
655
+ activeEnergyBurned?: Schema$ActiveEnergyBurnedRollupValue;
500
656
  /**
501
657
  * 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
658
  */
@@ -513,6 +669,10 @@ export namespace health_v4 {
513
669
  * Returned by default when rolling up data points from the `altitude` data type, or when requested explicitly using the `altitude` rollup type identifier.
514
670
  */
515
671
  altitude?: Schema$AltitudeRollupValue;
672
+ /**
673
+ * Returned by default when rolling up data points from the `blood-glucose` data type.
674
+ */
675
+ bloodGlucose?: Schema$BloodGlucoseRollupValue;
516
676
  /**
517
677
  * 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
678
  */
@@ -529,6 +689,10 @@ export namespace health_v4 {
529
689
  * Start time of the window this value aggregates over
530
690
  */
531
691
  civilStartTime?: Schema$CivilDateTime;
692
+ /**
693
+ * 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.
694
+ */
695
+ coreBodyTemperature?: Schema$CoreBodyTemperatureRollupValue;
532
696
  /**
533
697
  * Returned by default when rolling up data points from the `distance` data type, or when requested explicitly using the `distance` rollup type identifier.
534
698
  */
@@ -549,6 +713,10 @@ export namespace health_v4 {
549
713
  * 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
714
  */
551
715
  hydrationLog?: Schema$HydrationLogRollupValue;
716
+ /**
717
+ * 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.
718
+ */
719
+ nutritionLog?: Schema$NutritionLogRollupValue;
552
720
  /**
553
721
  * 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
722
  */
@@ -666,6 +834,10 @@ export namespace health_v4 {
666
834
  * A computed or recorded metric.
667
835
  */
668
836
  export interface Schema$DataPoint {
837
+ /**
838
+ * Optional. Data for points in the `active-energy-burned` interval data type collection.
839
+ */
840
+ activeEnergyBurned?: Schema$ActiveEnergyBurned;
669
841
  /**
670
842
  * Optional. Data for points in the `active-minutes` interval data type collection.
671
843
  */
@@ -686,10 +858,18 @@ export namespace health_v4 {
686
858
  * Optional. Data for points in the `basal-energy-burned` interval data type collection.
687
859
  */
688
860
  basalEnergyBurned?: Schema$BasalEnergyBurned;
861
+ /**
862
+ * Optional. Data for points in the `blood-glucose` sample data type collection.
863
+ */
864
+ bloodGlucose?: Schema$BloodGlucose;
689
865
  /**
690
866
  * Optional. Data for points in the `body-fat` sample data type collection.
691
867
  */
692
868
  bodyFat?: Schema$BodyFat;
869
+ /**
870
+ * Optional. Data for points in the `core-body-temperature` sample data type collection.
871
+ */
872
+ coreBodyTemperature?: Schema$CoreBodyTemperature;
693
873
  /**
694
874
  * Optional. Data for points in the `daily-heart-rate-variability` daily data type collection.
695
875
  */
@@ -726,6 +906,10 @@ export namespace health_v4 {
726
906
  * Optional. Data for points in the `distance` interval data type collection.
727
907
  */
728
908
  distance?: Schema$Distance;
909
+ /**
910
+ * Optional. Data for points in the `electrocardiogram` session data type collection.
911
+ */
912
+ electrocardiogram?: Schema$Electrocardiogram;
729
913
  /**
730
914
  * Optional. Data for points in the `exercise` session data type collection.
731
915
  */
@@ -734,6 +918,14 @@ export namespace health_v4 {
734
918
  * Optional. Data for points in the `floors` interval data type collection.
735
919
  */
736
920
  floors?: Schema$Floors;
921
+ /**
922
+ * Optional. The food details.
923
+ */
924
+ food?: Schema$Food;
925
+ /**
926
+ * Optional. The food measurement unit details.
927
+ */
928
+ foodMeasurementUnit?: Schema$FoodMeasurementUnit;
737
929
  /**
738
930
  * Optional. Data for points in the `heart-rate` sample data type collection.
739
931
  */
@@ -750,10 +942,18 @@ export namespace health_v4 {
750
942
  * Optional. Data for points in the `hydration-log` session data type collection.
751
943
  */
752
944
  hydrationLog?: Schema$HydrationLog;
945
+ /**
946
+ * Optional. Data for points in the `irregular-rhythm-notification` session data type collection.
947
+ */
948
+ irregularRhythmNotification?: Schema$IrregularRhythmNotification;
753
949
  /**
754
950
  * Identifier. Data point name, only supported for the subset of identifiable data types. For the majority of the data types, individual data points do not need to be identified and this field would be empty. Format: `users/{user\}/dataTypes/{data_type\}/dataPoints/{data_point\}` Example: `users/abcd1234/dataTypes/sleep/dataPoints/a1b2c3d4-e5f6-7890-1234-567890abcdef` The `{user\}` ID is a system-generated identifier, as described in Identity.health_user_id. The `{data_type\}` ID corresponds to the kebab-case version of the field names in the DataPoint data union field, e.g. `total-calories` for the `total_calories` field. The `{data_point\}` ID can be client-provided or system-generated. If client-provided, it must be a string of 4-63 characters, containing only lowercase letters, numbers, and hyphens.
755
951
  */
756
952
  name?: string | null;
953
+ /**
954
+ * Optional. Data for points in the `nutrition-log` session data type collection.
955
+ */
956
+ nutritionLog?: Schema$NutritionLog;
757
957
  /**
758
958
  * Optional. Data for points in the `oxygen-saturation` sample data type collection.
759
959
  */
@@ -913,6 +1113,47 @@ export namespace health_v4 {
913
1113
  */
914
1114
  millimetersSum?: string | null;
915
1115
  }
1116
+ /**
1117
+ * Represents an Electrocardiogram (ECG) measurement session. This data type is based on SaMD feature and any changes to it may require additional review.
1118
+ */
1119
+ export interface Schema$Electrocardiogram {
1120
+ /**
1121
+ * Optional. Average heart rate recorded during ECG reading in beats per minute.
1122
+ */
1123
+ beatsPerMinuteAvg?: string | null;
1124
+ /**
1125
+ * 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.
1126
+ */
1127
+ interval?: Schema$SessionTimeInterval;
1128
+ /**
1129
+ * Optional. The number of leads used for ECG reading.
1130
+ */
1131
+ leadNumber?: number | null;
1132
+ /**
1133
+ * 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`.
1134
+ */
1135
+ medicalDeviceInfo?: Schema$MedicalDeviceInfo;
1136
+ /**
1137
+ * Optional. The factor by which to divide waveform samples to get voltage in millivolts: millivolts = waveform_sample / millivolts_scaling_factor.
1138
+ */
1139
+ millivoltsScalingFactor?: number | null;
1140
+ /**
1141
+ * Optional. The result classification of the ECG reading.
1142
+ */
1143
+ resultClassification?: string | null;
1144
+ /**
1145
+ * Optional. The sampling frequency of waveform samples in hertz.
1146
+ */
1147
+ samplingFrequencyHertz?: number | null;
1148
+ /**
1149
+ * 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.
1150
+ */
1151
+ waveformSamples?: number[] | null;
1152
+ }
1153
+ /**
1154
+ * 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); \}
1155
+ */
1156
+ export interface Schema$Empty {}
916
1157
  /**
917
1158
  * Authorization mechanism for a subscriber endpoint. For all requests sent by the Webhooks service, the JSON payload is cryptographically signed. The signature is delivered in the `X-HEALTHAPI-SIGNATURE` HTTP header. This is an ECDSA (NIST P256) signature of the JSON payload. Clients must verify this signature using Google Health API's public key to confirm the payload was sent by the Health API.
918
1159
  */
@@ -926,6 +1167,32 @@ export namespace health_v4 {
926
1167
  */
927
1168
  secretSet?: boolean | null;
928
1169
  }
1170
+ /**
1171
+ * Represents the energy quantity.
1172
+ */
1173
+ export interface Schema$EnergyQuantity {
1174
+ /**
1175
+ * Required. Value representing the energy in kilocalories.
1176
+ */
1177
+ kcal?: number | null;
1178
+ /**
1179
+ * Optional. Value representing the user provided unit.
1180
+ */
1181
+ userProvidedUnit?: string | null;
1182
+ }
1183
+ /**
1184
+ * Rollup for the energy quantity.
1185
+ */
1186
+ export interface Schema$EnergyQuantityRollup {
1187
+ /**
1188
+ * Required. The sum of the energy in kilocalories.
1189
+ */
1190
+ kcalSum?: number | null;
1191
+ /**
1192
+ * Optional. The user provided unit on the last element.
1193
+ */
1194
+ userProvidedUnitLast?: string | null;
1195
+ }
929
1196
  /**
930
1197
  * An exercise that stores information about a physical activity.
931
1198
  */
@@ -1014,7 +1281,7 @@ export namespace health_v4 {
1014
1281
  */
1015
1282
  export interface Schema$ExportExerciseTcxResponse {
1016
1283
  /**
1017
- * Contains the exported TCX data.
1284
+ * 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
1285
  */
1019
1286
  tcxData?: string | null;
1020
1287
  }
@@ -1040,6 +1307,109 @@ export namespace health_v4 {
1040
1307
  */
1041
1308
  countSum?: string | null;
1042
1309
  }
1310
+ /**
1311
+ * Represents a food item.
1312
+ */
1313
+ export interface Schema$Food {
1314
+ /**
1315
+ * Required. The access level of the food.
1316
+ */
1317
+ accessLevel?: string | null;
1318
+ /**
1319
+ * Optional. The brand of the food.
1320
+ */
1321
+ brand?: string | null;
1322
+ /**
1323
+ * Required. Value representing the default serving of the food.
1324
+ */
1325
+ defaultServing?: Schema$FoodServing;
1326
+ /**
1327
+ * Optional. The description of the food.
1328
+ */
1329
+ description?: string | null;
1330
+ /**
1331
+ * Required. The display name of the food.
1332
+ */
1333
+ displayName?: string | null;
1334
+ /**
1335
+ * Optional. Value representing the average energy of the food for the default serving.
1336
+ */
1337
+ energyAvg?: Schema$EnergyQuantity;
1338
+ /**
1339
+ * Optional. Value representing the energy from fat of the food for the default serving.
1340
+ */
1341
+ energyFromFat?: Schema$EnergyQuantity;
1342
+ /**
1343
+ * Optional. Value representing the maximum energy of the food for the default serving.
1344
+ */
1345
+ energyMax?: Schema$EnergyQuantity;
1346
+ /**
1347
+ * Optional. Value representing the minimum energy of the food for the default serving.
1348
+ */
1349
+ energyMin?: Schema$EnergyQuantity;
1350
+ /**
1351
+ * Optional. The language code where the food is available in format xx-XX. Supported values are defined in Settings.food_language_code.
1352
+ */
1353
+ languageCode?: string | null;
1354
+ /**
1355
+ * Optional. The meal type associated with this food.
1356
+ */
1357
+ mealType?: string | null;
1358
+ /**
1359
+ * Optional. Value representing the nutrients of the food for the default serving.
1360
+ */
1361
+ nutrients?: Schema$NutrientQuantity[];
1362
+ /**
1363
+ * Optional. The serving of the food.
1364
+ */
1365
+ servings?: Schema$FoodServing[];
1366
+ /**
1367
+ * Optional. Value representing the total carbohydrate of the food for the default serving.
1368
+ */
1369
+ totalCarbohydrate?: Schema$WeightQuantity;
1370
+ /**
1371
+ * Optional. Value representing the total fat of the food for the default serving.
1372
+ */
1373
+ totalFat?: Schema$WeightQuantity;
1374
+ }
1375
+ /**
1376
+ * Represents a food measurement unit.
1377
+ */
1378
+ export interface Schema$FoodMeasurementUnit {
1379
+ /**
1380
+ * Required. The display name of the food measurement unit (e.g., "gram", "piece").
1381
+ */
1382
+ displayName?: string | null;
1383
+ /**
1384
+ * Optional. The plural display name of the food measurement unit (e.g., "grams", "pieces").
1385
+ */
1386
+ pluralDisplayName?: string | null;
1387
+ }
1388
+ /**
1389
+ * Represents different properties and information about the serving of a specific food.
1390
+ */
1391
+ export interface Schema$FoodServing {
1392
+ /**
1393
+ * Optional. Amount of food consumed, fractional values are supported.
1394
+ */
1395
+ amount?: number | null;
1396
+ /**
1397
+ * Required. Food measurement unit
1398
+ */
1399
+ foodMeasurementUnit?: string | null;
1400
+ /**
1401
+ * Output only. Legacy measurement unit for serving size in singular form (e.g. "piece", "gram").
1402
+ */
1403
+ foodMeasurementUnitDisplayName?: string | null;
1404
+ /**
1405
+ * Output only. Legacy measurement unit for serving size in plural form (e.g. "pieces", "grams").
1406
+ */
1407
+ foodMeasurementUnitDisplayNamePlural?: string | null;
1408
+ /**
1409
+ * Optional. Value representing the multiplier used to compute the energy when using this serving instead of the default serving.
1410
+ */
1411
+ multiplier?: number | null;
1412
+ }
1043
1413
  /**
1044
1414
  * 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
1415
  */
@@ -1058,6 +1428,27 @@ export namespace health_v4 {
1058
1428
  */
1059
1429
  httpResponse?: Schema$HttpResponse;
1060
1430
  }
1431
+ /**
1432
+ * A single heart beat measurement.
1433
+ */
1434
+ export interface Schema$HeartBeat {
1435
+ /**
1436
+ * 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).
1437
+ */
1438
+ beatsPerMinute?: number | null;
1439
+ /**
1440
+ * Output only. The civil time in the timezone the subject is in at the time of the observation.
1441
+ */
1442
+ civilTime?: Schema$CivilDateTime;
1443
+ /**
1444
+ * Required. The time of the heart beat measurement.
1445
+ */
1446
+ physicalTime?: string | null;
1447
+ /**
1448
+ * Required. The UTC offset of the user's timezone when the heart beat measurement occurred.
1449
+ */
1450
+ utcOffset?: string | null;
1451
+ }
1061
1452
  /**
1062
1453
  * A heart rate measurement.
1063
1454
  */
@@ -1110,7 +1501,7 @@ export namespace health_v4 {
1110
1501
  */
1111
1502
  export interface Schema$HeartRateVariability {
1112
1503
  /**
1113
- * Optional. The root mean square of successive differences between normal heartbeats. This is a measure of heart rate variability used by Fitbit.
1504
+ * Optional. The root mean square of successive differences between normal heartbeats. This is a measure of heart rate variability used by Google Health.
1114
1505
  */
1115
1506
  rootMeanSquareOfSuccessiveDifferencesMilliseconds?: number | null;
1116
1507
  /**
@@ -1252,34 +1643,123 @@ export namespace health_v4 {
1252
1643
  startTime?: string | null;
1253
1644
  }
1254
1645
  /**
1255
- * Response containing raw data points matching the query
1646
+ * 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
1647
  */
1257
- export interface Schema$ListDataPointsResponse {
1648
+ export interface Schema$IrnProfile {
1258
1649
  /**
1259
- * Data points matching the query
1650
+ * Required. Whether or not the user is currently enrolled in having their data processed for IRN alerts.
1260
1651
  */
1261
- dataPoints?: Schema$DataPoint[];
1652
+ enrollmentStatus?: boolean | null;
1262
1653
  /**
1263
- * Next page token, empty if the response is complete
1654
+ * 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
1655
  */
1265
- nextPageToken?: string | null;
1656
+ name?: string | null;
1657
+ /**
1658
+ * Required. Whether or not the user has onboarded onto the IRN feature.
1659
+ */
1660
+ onboardingStatus?: boolean | null;
1661
+ /**
1662
+ * Output only. The timestamp of the last piece of analyzable data synced by the user.
1663
+ */
1664
+ updateTime?: string | null;
1266
1665
  }
1267
1666
  /**
1268
- * Response message for ListSubscribers.
1667
+ * 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.
1269
1668
  */
1270
- export interface Schema$ListSubscribersResponse {
1669
+ export interface Schema$IrregularRhythmNotification {
1271
1670
  /**
1272
- * A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
1671
+ * Optional. The overlapping analysis windows that were used to evaluate rhythm for potential AFib, containing specific information about the user's heart rhythm.
1273
1672
  */
1274
- nextPageToken?: string | null;
1673
+ alertWindows?: Schema$AlertWindow[];
1275
1674
  /**
1276
- * Subscribers from the specified project.
1675
+ * Required. Observed interval.
1277
1676
  */
1278
- subscribers?: Schema$Subscriber[];
1677
+ interval?: Schema$SessionTimeInterval;
1279
1678
  /**
1280
- * The total number of subscribers matching the request.
1679
+ * 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`.
1281
1680
  */
1282
- totalSize?: number | null;
1681
+ medicalDeviceInfo?: Schema$MedicalDeviceInfo;
1682
+ }
1683
+ /**
1684
+ * Response containing raw data points matching the query
1685
+ */
1686
+ export interface Schema$ListDataPointsResponse {
1687
+ /**
1688
+ * Data points matching the query
1689
+ */
1690
+ dataPoints?: Schema$DataPoint[];
1691
+ /**
1692
+ * Next page token, empty if the response is complete
1693
+ */
1694
+ nextPageToken?: string | null;
1695
+ }
1696
+ /**
1697
+ * Response message for ListPairedDevices.
1698
+ */
1699
+ export interface Schema$ListPairedDevicesResponse {
1700
+ /**
1701
+ * A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
1702
+ */
1703
+ nextPageToken?: string | null;
1704
+ /**
1705
+ * The paired devices of the user.
1706
+ */
1707
+ pairedDevices?: Schema$PairedDevice[];
1708
+ }
1709
+ /**
1710
+ * Response message for ListSubscribers.
1711
+ */
1712
+ export interface Schema$ListSubscribersResponse {
1713
+ /**
1714
+ * A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
1715
+ */
1716
+ nextPageToken?: string | null;
1717
+ /**
1718
+ * Subscribers from the specified project.
1719
+ */
1720
+ subscribers?: Schema$Subscriber[];
1721
+ /**
1722
+ * The total number of subscribers matching the request.
1723
+ */
1724
+ totalSize?: number | null;
1725
+ }
1726
+ /**
1727
+ * Response message for ListSubscriptions.
1728
+ */
1729
+ export interface Schema$ListSubscriptionsResponse {
1730
+ /**
1731
+ * A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
1732
+ */
1733
+ nextPageToken?: string | null;
1734
+ /**
1735
+ * The subscriptions from the specified subscriber.
1736
+ */
1737
+ subscriptions?: Schema$Subscription[];
1738
+ }
1739
+ /**
1740
+ * Software as Medical Device (SaMD) metadata. Used to construct the Unique Device Identifier (UDI).
1741
+ */
1742
+ export interface Schema$MedicalDeviceInfo {
1743
+ /**
1744
+ * Output only. The algorithm version used by the feature.
1745
+ */
1746
+ algorithmVersion?: string | null;
1747
+ /**
1748
+ * Output only. The model name or device type of the compatible device used to collect the data.
1749
+ */
1750
+ deviceModel?: string | null;
1751
+ /**
1752
+ * Output only. The version of the feature/app running on the device.
1753
+ */
1754
+ featureVersion?: string | null;
1755
+ /**
1756
+ * Output only. The firmware version running on the compatible device used to collect the data.
1757
+ */
1758
+ firmwareVersion?: string | null;
1759
+ /**
1760
+ * Output only. The service version used by the feature.
1761
+ */
1762
+ serviceVersion?: string | null;
1283
1763
  }
1284
1764
  /**
1285
1765
  * Summary metrics for an exercise.
@@ -1359,6 +1839,102 @@ export namespace health_v4 {
1359
1839
  */
1360
1840
  avgVerticalRatio?: number | null;
1361
1841
  }
1842
+ /**
1843
+ * Represents the quantity of a nutrient.
1844
+ */
1845
+ export interface Schema$NutrientQuantity {
1846
+ /**
1847
+ * Required. Value representing the nutrient.
1848
+ */
1849
+ nutrient?: string | null;
1850
+ /**
1851
+ * Required. Value representing the quantity of the nutrient.
1852
+ */
1853
+ quantity?: Schema$WeightQuantity;
1854
+ }
1855
+ /**
1856
+ * Nutrient quantity rollup.
1857
+ */
1858
+ export interface Schema$NutrientQuantityRollup {
1859
+ /**
1860
+ * Required. Aggregated nutrient.
1861
+ */
1862
+ nutrient?: string | null;
1863
+ /**
1864
+ * Required. Aggregated nutrient weight.
1865
+ */
1866
+ quantity?: Schema$WeightQuantityRollup;
1867
+ }
1868
+ /**
1869
+ * Holds information about a user logged food. There are two ways of creating a nutrition log based on the food type: 1. Identified food: Using the food field, which is a reference to a Food resource. In this case fields `nutrients`, `energy`, `energy_from_fat`, `total_carbohydrate`, `total_fat`, `food_display_name` will be populated based on the referenced food. 2. Anonymous food: Using the `food_display_name` field and setting the `nutrients`, `energy`, `energy_from_fat`, `total_carbohydrate`, `total_fat` fields manually. The identified food is preferred over the anonymous food. Nutrition logs created from anonymous food are not be editable.
1870
+ */
1871
+ export interface Schema$NutritionLog {
1872
+ /**
1873
+ * Optional. Value representing the energy of the nutrition log. For nutrition logs created from an identified food, this field will be populated based on the referenced food. For anonymous food, this field will be populated manually.
1874
+ */
1875
+ energy?: Schema$EnergyQuantity;
1876
+ /**
1877
+ * Optional. Value representing the energy from fat of the nutrition log. For nutrition logs created from an identified food, this field will be populated based on the referenced food. For anonymous food, this field will be populated manually.
1878
+ */
1879
+ energyFromFat?: Schema$EnergyQuantity;
1880
+ /**
1881
+ * Required. Represents the food ID.
1882
+ */
1883
+ food?: string | null;
1884
+ /**
1885
+ * Value representing the display name of the food. For nutrition logs created from an identified food, this field will be populated based on the referenced food. For anonymous food, this field will be populated manually.
1886
+ */
1887
+ foodDisplayName?: string | null;
1888
+ /**
1889
+ * Required. Observed interval.
1890
+ */
1891
+ interval?: Schema$SessionTimeInterval;
1892
+ /**
1893
+ * Optional. Value representing the meal type of the nutrition log.
1894
+ */
1895
+ mealType?: string | null;
1896
+ /**
1897
+ * Optional. Value representing the nutrients of the nutrition log.
1898
+ */
1899
+ nutrients?: Schema$NutrientQuantity[];
1900
+ /**
1901
+ * Optional. Value representing the nutrition log serving.
1902
+ */
1903
+ serving?: Schema$Serving;
1904
+ /**
1905
+ * Optional. Value representing the total carbohydrate of the nutrition log. For nutrition logs created from an identified food, this field will be populated based on the referenced food. For anonymous food, this field will be populated manually.
1906
+ */
1907
+ totalCarbohydrate?: Schema$WeightQuantity;
1908
+ /**
1909
+ * Optional. Value representing the total fat of the nutrition log. For nutrition logs created from an identified food, this field will be populated based on the referenced food. For anonymous food, this field will be populated manually.
1910
+ */
1911
+ totalFat?: Schema$WeightQuantity;
1912
+ }
1913
+ /**
1914
+ * Represents the result of the rollup of the nutrition log data type.
1915
+ */
1916
+ export interface Schema$NutritionLogRollupValue {
1917
+ /**
1918
+ * Energy rollup.
1919
+ */
1920
+ energy?: Schema$EnergyQuantityRollup;
1921
+ /**
1922
+ * Value Energy from fat rollup.
1923
+ */
1924
+ energyFromFat?: Schema$EnergyQuantityRollup;
1925
+ /**
1926
+ * List of the nutrient roll-ups by the nutrient type.
1927
+ */
1928
+ nutrients?: Schema$NutrientQuantityRollup[];
1929
+ /**
1930
+ * Total carbohydrate rollup.
1931
+ */
1932
+ totalCarbohydrate?: Schema$WeightQuantityRollup;
1933
+ /**
1934
+ * Total fat rollup.
1935
+ */
1936
+ totalFat?: Schema$WeightQuantityRollup;
1937
+ }
1362
1938
  /**
1363
1939
  * Represents a sample time of an observed data point.
1364
1940
  */
@@ -1464,6 +2040,43 @@ export namespace health_v4 {
1464
2040
  */
1465
2041
  sampleTime?: Schema$ObservationSampleTime;
1466
2042
  }
2043
+ /**
2044
+ * 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.
2045
+ */
2046
+ export interface Schema$PairedDevice {
2047
+ /**
2048
+ * Output only. The battery level of the device.
2049
+ */
2050
+ batteryLevel?: number | null;
2051
+ /**
2052
+ * Output only. The battery status of the device. Supported: High | Medium | Low | Empty
2053
+ */
2054
+ batteryStatus?: string | null;
2055
+ /**
2056
+ * Output only. The device type. Supported: TRACKER | SCALE
2057
+ */
2058
+ deviceType?: string | null;
2059
+ /**
2060
+ * Output only. The product name of the device
2061
+ */
2062
+ deviceVersion?: string | null;
2063
+ /**
2064
+ * 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.
2065
+ */
2066
+ features?: string[] | null;
2067
+ /**
2068
+ * Output only. The time of last sync with the Fitbit mobile application.
2069
+ */
2070
+ lastSyncTime?: string | null;
2071
+ /**
2072
+ * Output only. Mac ID number of the device.
2073
+ */
2074
+ macAddress?: string | null;
2075
+ /**
2076
+ * Identifier. The resource name of this Device resource. Format: `users/{user\}/pairedDevices/{paired_device\}` Example: `users/1234567890/pairedDevices/123` or `users/me/pairedDevices/123`
2077
+ */
2078
+ name?: string | null;
2079
+ }
1467
2080
  /**
1468
2081
  * Profile details.
1469
2082
  */
@@ -1514,6 +2127,10 @@ export namespace health_v4 {
1514
2127
  * A reconciled computed or recorded metric.
1515
2128
  */
1516
2129
  export interface Schema$ReconciledDataPoint {
2130
+ /**
2131
+ * Data for points in the `active-energy-burned` interval data type collection.
2132
+ */
2133
+ activeEnergyBurned?: Schema$ActiveEnergyBurned;
1517
2134
  /**
1518
2135
  * Data for points in the `active-minutes` interval data type collection.
1519
2136
  */
@@ -1534,10 +2151,18 @@ export namespace health_v4 {
1534
2151
  * Data for points in the `basal-energy-burned` interval data type collection.
1535
2152
  */
1536
2153
  basalEnergyBurned?: Schema$BasalEnergyBurned;
2154
+ /**
2155
+ * Data for points in the `blood-glucose` sample data type collection.
2156
+ */
2157
+ bloodGlucose?: Schema$BloodGlucose;
1537
2158
  /**
1538
2159
  * Data for points in the `body-fat` sample data type collection.
1539
2160
  */
1540
2161
  bodyFat?: Schema$BodyFat;
2162
+ /**
2163
+ * Data for points in the `core-body-temperature` sample data type collection.
2164
+ */
2165
+ coreBodyTemperature?: Schema$CoreBodyTemperature;
1541
2166
  /**
1542
2167
  * Data for points in the `daily-heart-rate-variability` daily data type collection.
1543
2168
  */
@@ -1598,6 +2223,10 @@ export namespace health_v4 {
1598
2223
  * Data for points in the `hydration-log` session data type collection.
1599
2224
  */
1600
2225
  hydrationLog?: Schema$HydrationLog;
2226
+ /**
2227
+ * Data for points in the `nutrition-log` session data type collection.
2228
+ */
2229
+ nutritionLog?: Schema$NutritionLog;
1601
2230
  /**
1602
2231
  * Data for points in the `oxygen-saturation` sample data type collection.
1603
2232
  */
@@ -1695,9 +2324,13 @@ export namespace health_v4 {
1695
2324
  beatsPerMinuteMin?: number | null;
1696
2325
  }
1697
2326
  /**
1698
- * Value of a rollup for a single physical time interval (aggregation window)
2327
+ * 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
2328
  */
1700
2329
  export interface Schema$RollupDataPoint {
2330
+ /**
2331
+ * Returned by default when rolling up data points from the `active-energy-burned` data type.
2332
+ */
2333
+ activeEnergyBurned?: Schema$ActiveEnergyBurnedRollupValue;
1701
2334
  /**
1702
2335
  * 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
2336
  */
@@ -1714,6 +2347,10 @@ export namespace health_v4 {
1714
2347
  * Returned by default when rolling up data points from the `altitude` data type, or when requested explicitly using the `altitude` rollup type identifier.
1715
2348
  */
1716
2349
  altitude?: Schema$AltitudeRollupValue;
2350
+ /**
2351
+ * Returned by default when rolling up data points from the `blood-glucose` data type.
2352
+ */
2353
+ bloodGlucose?: Schema$BloodGlucoseRollupValue;
1717
2354
  /**
1718
2355
  * 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
2356
  */
@@ -1722,6 +2359,10 @@ export namespace health_v4 {
1722
2359
  * 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
2360
  */
1724
2361
  caloriesInHeartRateZone?: Schema$CaloriesInHeartRateZoneRollupValue;
2362
+ /**
2363
+ * 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.
2364
+ */
2365
+ coreBodyTemperature?: Schema$CoreBodyTemperatureRollupValue;
1725
2366
  /**
1726
2367
  * Returned by default when rolling up data points from the `distance` data type, or when requested explicitly using the `distance` rollup type identifier.
1727
2368
  */
@@ -1742,6 +2383,10 @@ export namespace health_v4 {
1742
2383
  * 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
2384
  */
1744
2385
  hydrationLog?: Schema$HydrationLogRollupValue;
2386
+ /**
2387
+ * 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.
2388
+ */
2389
+ nutritionLog?: Schema$NutritionLogRollupValue;
1745
2390
  /**
1746
2391
  * 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
2392
  */
@@ -1861,6 +2506,23 @@ export namespace health_v4 {
1861
2506
  */
1862
2507
  durationSum?: string | null;
1863
2508
  }
2509
+ /**
2510
+ * Represents different properties and information about the serving of a specific food.
2511
+ */
2512
+ export interface Schema$Serving {
2513
+ /**
2514
+ * Optional. Amount of food consumed, fractional values are supported.
2515
+ */
2516
+ amount?: number | null;
2517
+ /**
2518
+ * Required. Food measurement unit
2519
+ */
2520
+ foodMeasurementUnit?: string | null;
2521
+ /**
2522
+ * Output only. Legacy measurement unit for serving size in singular form (e.g. "piece", "gram").
2523
+ */
2524
+ foodMeasurementUnitDisplayName?: string | null;
2525
+ }
1864
2526
  /**
1865
2527
  * Represents a time interval of session data point, which bundles multiple observed metrics together.
1866
2528
  */
@@ -1902,6 +2564,10 @@ export namespace health_v4 {
1902
2564
  * Optional. The measurement unit defined in the user's account settings. Updates to this field are currently not supported.
1903
2565
  */
1904
2566
  distanceUnit?: string | null;
2567
+ /**
2568
+ * 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.
2569
+ */
2570
+ foodLanguageCode?: string | null;
1905
2571
  /**
1906
2572
  * Optional. The measurement unit defined in the user's account settings.
1907
2573
  */
@@ -2202,7 +2868,7 @@ export namespace health_v4 {
2202
2868
  */
2203
2869
  export interface Schema$SubscriberConfig {
2204
2870
  /**
2205
- * Required. Supported data types are: "altitude", "distance", "floors", "sleep", "steps", "weight". Values should be in kebab-case.
2871
+ * 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
2872
  */
2207
2873
  dataTypes?: string[] | null;
2208
2874
  /**
@@ -2210,6 +2876,23 @@ export namespace health_v4 {
2210
2876
  */
2211
2877
  subscriptionCreatePolicy?: string | null;
2212
2878
  }
2879
+ /**
2880
+ * A subscription to a data collection for a specific user, to be delivered to a subscriber.
2881
+ */
2882
+ export interface Schema$Subscription {
2883
+ /**
2884
+ * Optional. Data types subscribed to. A subscriber will only receive notifications for data types that are declared here. A subscription can only subscribe to the data types of the subscriber. Supported data types are: "altitude", "distance", "floors", "sleep", "steps", "weight".
2885
+ */
2886
+ dataTypes?: string[] | null;
2887
+ /**
2888
+ * 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.
2889
+ */
2890
+ name?: string | null;
2891
+ /**
2892
+ * 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`).
2893
+ */
2894
+ user?: string | null;
2895
+ }
2213
2896
  /**
2214
2897
  * Swim lengths data over the time interval.
2215
2898
  */
@@ -2361,7 +3044,7 @@ export namespace health_v4 {
2361
3044
  */
2362
3045
  milliliters?: number | null;
2363
3046
  /**
2364
- * Optional. Value representing the user provided unit.
3047
+ * 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
3048
  */
2366
3049
  userProvidedUnit?: string | null;
2367
3050
  }
@@ -2395,6 +3078,32 @@ export namespace health_v4 {
2395
3078
  */
2396
3079
  weightGrams?: number | null;
2397
3080
  }
3081
+ /**
3082
+ * Represents the weight quantity.
3083
+ */
3084
+ export interface Schema$WeightQuantity {
3085
+ /**
3086
+ * Required. Value representing the weight in grams.
3087
+ */
3088
+ grams?: number | null;
3089
+ /**
3090
+ * Optional. Value representing the user provided unit.
3091
+ */
3092
+ userProvidedUnit?: string | null;
3093
+ }
3094
+ /**
3095
+ * Rollup for the weight.
3096
+ */
3097
+ export interface Schema$WeightQuantityRollup {
3098
+ /**
3099
+ * Required. The sum of the weight in grams.
3100
+ */
3101
+ gramsSum?: number | null;
3102
+ /**
3103
+ * Optional. The user provided unit on the last element.
3104
+ */
3105
+ userProvidedUnitLast?: string | null;
3106
+ }
2398
3107
  /**
2399
3108
  * Represents the result of the rollup of the weight data type.
2400
3109
  */
@@ -2416,8 +3125,12 @@ export namespace health_v4 {
2416
3125
 
2417
3126
  export class Resource$Projects$Subscribers {
2418
3127
  context: APIRequestContext;
3128
+ subscriptions: Resource$Projects$Subscribers$Subscriptions;
2419
3129
  constructor(context: APIRequestContext) {
2420
3130
  this.context = context;
3131
+ this.subscriptions = new Resource$Projects$Subscribers$Subscriptions(
3132
+ this.context
3133
+ );
2421
3134
  }
2422
3135
 
2423
3136
  /**
@@ -2474,7 +3187,658 @@ export namespace health_v4 {
2474
3187
  * // "error": {},
2475
3188
  * // "metadata": {},
2476
3189
  * // "name": "my_name",
2477
- * // "response": {}
3190
+ * // "response": {}
3191
+ * // }
3192
+ * }
3193
+ *
3194
+ * main().catch(e => {
3195
+ * console.error(e);
3196
+ * throw e;
3197
+ * });
3198
+ *
3199
+ * ```
3200
+ *
3201
+ * @param params - Parameters for request
3202
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
3203
+ * @param callback - Optional callback that handles the response.
3204
+ * @returns A promise if used with async/await, or void if used with a callback.
3205
+ */
3206
+ create(
3207
+ params: Params$Resource$Projects$Subscribers$Create,
3208
+ options: StreamMethodOptions
3209
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
3210
+ create(
3211
+ params?: Params$Resource$Projects$Subscribers$Create,
3212
+ options?: MethodOptions
3213
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
3214
+ create(
3215
+ params: Params$Resource$Projects$Subscribers$Create,
3216
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
3217
+ callback: BodyResponseCallback<Readable>
3218
+ ): void;
3219
+ create(
3220
+ params: Params$Resource$Projects$Subscribers$Create,
3221
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
3222
+ callback: BodyResponseCallback<Schema$Operation>
3223
+ ): void;
3224
+ create(
3225
+ params: Params$Resource$Projects$Subscribers$Create,
3226
+ callback: BodyResponseCallback<Schema$Operation>
3227
+ ): void;
3228
+ create(callback: BodyResponseCallback<Schema$Operation>): void;
3229
+ create(
3230
+ paramsOrCallback?:
3231
+ | Params$Resource$Projects$Subscribers$Create
3232
+ | BodyResponseCallback<Schema$Operation>
3233
+ | BodyResponseCallback<Readable>,
3234
+ optionsOrCallback?:
3235
+ | MethodOptions
3236
+ | StreamMethodOptions
3237
+ | BodyResponseCallback<Schema$Operation>
3238
+ | BodyResponseCallback<Readable>,
3239
+ callback?:
3240
+ | BodyResponseCallback<Schema$Operation>
3241
+ | BodyResponseCallback<Readable>
3242
+ ):
3243
+ | void
3244
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
3245
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
3246
+ let params = (paramsOrCallback ||
3247
+ {}) as Params$Resource$Projects$Subscribers$Create;
3248
+ let options = (optionsOrCallback || {}) as MethodOptions;
3249
+
3250
+ if (typeof paramsOrCallback === 'function') {
3251
+ callback = paramsOrCallback;
3252
+ params = {} as Params$Resource$Projects$Subscribers$Create;
3253
+ options = {};
3254
+ }
3255
+
3256
+ if (typeof optionsOrCallback === 'function') {
3257
+ callback = optionsOrCallback;
3258
+ options = {};
3259
+ }
3260
+
3261
+ const rootUrl = options.rootUrl || 'https://health.googleapis.com/';
3262
+ const parameters = {
3263
+ options: Object.assign(
3264
+ {
3265
+ url: (rootUrl + '/v4/{+parent}/subscribers').replace(
3266
+ /([^:]\/)\/+/g,
3267
+ '$1'
3268
+ ),
3269
+ method: 'POST',
3270
+ apiVersion: '',
3271
+ },
3272
+ options
3273
+ ),
3274
+ params,
3275
+ requiredParams: ['parent'],
3276
+ pathParams: ['parent'],
3277
+ context: this.context,
3278
+ };
3279
+ if (callback) {
3280
+ createAPIRequest<Schema$Operation>(
3281
+ parameters,
3282
+ callback as BodyResponseCallback<unknown>
3283
+ );
3284
+ } else {
3285
+ return createAPIRequest<Schema$Operation>(parameters);
3286
+ }
3287
+ }
3288
+
3289
+ /**
3290
+ * Deletes a subscriber registration. This will stop all notifications to the subscriber's endpoint.
3291
+ * @example
3292
+ * ```js
3293
+ * // Before running the sample:
3294
+ * // - Enable the API at:
3295
+ * // https://console.developers.google.com/apis/api/health.googleapis.com
3296
+ * // - Login into gcloud by running:
3297
+ * // ```sh
3298
+ * // $ gcloud auth application-default login
3299
+ * // ```
3300
+ * // - Install the npm module by running:
3301
+ * // ```sh
3302
+ * // $ npm install googleapis
3303
+ * // ```
3304
+ *
3305
+ * const {google} = require('googleapis');
3306
+ * const health = google.health('v4');
3307
+ *
3308
+ * async function main() {
3309
+ * const auth = new google.auth.GoogleAuth({
3310
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3311
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
3312
+ * });
3313
+ *
3314
+ * // Acquire an auth client, and bind it to all future calls
3315
+ * const authClient = await auth.getClient();
3316
+ * google.options({auth: authClient});
3317
+ *
3318
+ * // Do the magic
3319
+ * const res = await health.projects.subscribers.delete({
3320
+ * // Optional. If set to true, any child resources (e.g., subscriptions) will also be deleted. If false (default) and child resources exist, the request will fail.
3321
+ * force: 'placeholder-value',
3322
+ * // Required. The name of the subscriber to delete. Format: projects/{project\}/subscribers/{subscriber\} Example: projects/my-project/subscribers/my-subscriber-123 The {subscriber\} ID is user-settable (4-36 characters, matching /[a-z]([a-z0-9-]{2,34\}[a-z0-9])/) or system-generated if not provided during creation.
3323
+ * name: 'projects/my-project/subscribers/my-subscriber',
3324
+ * });
3325
+ * console.log(res.data);
3326
+ *
3327
+ * // Example response
3328
+ * // {
3329
+ * // "done": false,
3330
+ * // "error": {},
3331
+ * // "metadata": {},
3332
+ * // "name": "my_name",
3333
+ * // "response": {}
3334
+ * // }
3335
+ * }
3336
+ *
3337
+ * main().catch(e => {
3338
+ * console.error(e);
3339
+ * throw e;
3340
+ * });
3341
+ *
3342
+ * ```
3343
+ *
3344
+ * @param params - Parameters for request
3345
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
3346
+ * @param callback - Optional callback that handles the response.
3347
+ * @returns A promise if used with async/await, or void if used with a callback.
3348
+ */
3349
+ delete(
3350
+ params: Params$Resource$Projects$Subscribers$Delete,
3351
+ options: StreamMethodOptions
3352
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
3353
+ delete(
3354
+ params?: Params$Resource$Projects$Subscribers$Delete,
3355
+ options?: MethodOptions
3356
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
3357
+ delete(
3358
+ params: Params$Resource$Projects$Subscribers$Delete,
3359
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
3360
+ callback: BodyResponseCallback<Readable>
3361
+ ): void;
3362
+ delete(
3363
+ params: Params$Resource$Projects$Subscribers$Delete,
3364
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
3365
+ callback: BodyResponseCallback<Schema$Operation>
3366
+ ): void;
3367
+ delete(
3368
+ params: Params$Resource$Projects$Subscribers$Delete,
3369
+ callback: BodyResponseCallback<Schema$Operation>
3370
+ ): void;
3371
+ delete(callback: BodyResponseCallback<Schema$Operation>): void;
3372
+ delete(
3373
+ paramsOrCallback?:
3374
+ | Params$Resource$Projects$Subscribers$Delete
3375
+ | BodyResponseCallback<Schema$Operation>
3376
+ | BodyResponseCallback<Readable>,
3377
+ optionsOrCallback?:
3378
+ | MethodOptions
3379
+ | StreamMethodOptions
3380
+ | BodyResponseCallback<Schema$Operation>
3381
+ | BodyResponseCallback<Readable>,
3382
+ callback?:
3383
+ | BodyResponseCallback<Schema$Operation>
3384
+ | BodyResponseCallback<Readable>
3385
+ ):
3386
+ | void
3387
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
3388
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
3389
+ let params = (paramsOrCallback ||
3390
+ {}) as Params$Resource$Projects$Subscribers$Delete;
3391
+ let options = (optionsOrCallback || {}) as MethodOptions;
3392
+
3393
+ if (typeof paramsOrCallback === 'function') {
3394
+ callback = paramsOrCallback;
3395
+ params = {} as Params$Resource$Projects$Subscribers$Delete;
3396
+ options = {};
3397
+ }
3398
+
3399
+ if (typeof optionsOrCallback === 'function') {
3400
+ callback = optionsOrCallback;
3401
+ options = {};
3402
+ }
3403
+
3404
+ const rootUrl = options.rootUrl || 'https://health.googleapis.com/';
3405
+ const parameters = {
3406
+ options: Object.assign(
3407
+ {
3408
+ url: (rootUrl + '/v4/{+name}').replace(/([^:]\/)\/+/g, '$1'),
3409
+ method: 'DELETE',
3410
+ apiVersion: '',
3411
+ },
3412
+ options
3413
+ ),
3414
+ params,
3415
+ requiredParams: ['name'],
3416
+ pathParams: ['name'],
3417
+ context: this.context,
3418
+ };
3419
+ if (callback) {
3420
+ createAPIRequest<Schema$Operation>(
3421
+ parameters,
3422
+ callback as BodyResponseCallback<unknown>
3423
+ );
3424
+ } else {
3425
+ return createAPIRequest<Schema$Operation>(parameters);
3426
+ }
3427
+ }
3428
+
3429
+ /**
3430
+ * Lists all subscribers registered within the owned Google Cloud Project.
3431
+ * @example
3432
+ * ```js
3433
+ * // Before running the sample:
3434
+ * // - Enable the API at:
3435
+ * // https://console.developers.google.com/apis/api/health.googleapis.com
3436
+ * // - Login into gcloud by running:
3437
+ * // ```sh
3438
+ * // $ gcloud auth application-default login
3439
+ * // ```
3440
+ * // - Install the npm module by running:
3441
+ * // ```sh
3442
+ * // $ npm install googleapis
3443
+ * // ```
3444
+ *
3445
+ * const {google} = require('googleapis');
3446
+ * const health = google.health('v4');
3447
+ *
3448
+ * async function main() {
3449
+ * const auth = new google.auth.GoogleAuth({
3450
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3451
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
3452
+ * });
3453
+ *
3454
+ * // Acquire an auth client, and bind it to all future calls
3455
+ * const authClient = await auth.getClient();
3456
+ * google.options({auth: authClient});
3457
+ *
3458
+ * // Do the magic
3459
+ * const res = await health.projects.subscribers.list({
3460
+ * // Optional. The maximum number of subscribers to return. The service may return fewer than this value. If unspecified, at most 50 subscribers will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
3461
+ * pageSize: 'placeholder-value',
3462
+ * // Optional. A page token, received from a previous `ListSubscribers` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListSubscribers` must match the call that provided the page token.
3463
+ * pageToken: 'placeholder-value',
3464
+ * // Required. The parent, which owns this collection of subscribers. Format: projects/{project\}
3465
+ * parent: 'projects/my-project',
3466
+ * });
3467
+ * console.log(res.data);
3468
+ *
3469
+ * // Example response
3470
+ * // {
3471
+ * // "nextPageToken": "my_nextPageToken",
3472
+ * // "subscribers": [],
3473
+ * // "totalSize": 0
3474
+ * // }
3475
+ * }
3476
+ *
3477
+ * main().catch(e => {
3478
+ * console.error(e);
3479
+ * throw e;
3480
+ * });
3481
+ *
3482
+ * ```
3483
+ *
3484
+ * @param params - Parameters for request
3485
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
3486
+ * @param callback - Optional callback that handles the response.
3487
+ * @returns A promise if used with async/await, or void if used with a callback.
3488
+ */
3489
+ list(
3490
+ params: Params$Resource$Projects$Subscribers$List,
3491
+ options: StreamMethodOptions
3492
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
3493
+ list(
3494
+ params?: Params$Resource$Projects$Subscribers$List,
3495
+ options?: MethodOptions
3496
+ ): Promise<GaxiosResponseWithHTTP2<Schema$ListSubscribersResponse>>;
3497
+ list(
3498
+ params: Params$Resource$Projects$Subscribers$List,
3499
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
3500
+ callback: BodyResponseCallback<Readable>
3501
+ ): void;
3502
+ list(
3503
+ params: Params$Resource$Projects$Subscribers$List,
3504
+ options:
3505
+ | MethodOptions
3506
+ | BodyResponseCallback<Schema$ListSubscribersResponse>,
3507
+ callback: BodyResponseCallback<Schema$ListSubscribersResponse>
3508
+ ): void;
3509
+ list(
3510
+ params: Params$Resource$Projects$Subscribers$List,
3511
+ callback: BodyResponseCallback<Schema$ListSubscribersResponse>
3512
+ ): void;
3513
+ list(callback: BodyResponseCallback<Schema$ListSubscribersResponse>): void;
3514
+ list(
3515
+ paramsOrCallback?:
3516
+ | Params$Resource$Projects$Subscribers$List
3517
+ | BodyResponseCallback<Schema$ListSubscribersResponse>
3518
+ | BodyResponseCallback<Readable>,
3519
+ optionsOrCallback?:
3520
+ | MethodOptions
3521
+ | StreamMethodOptions
3522
+ | BodyResponseCallback<Schema$ListSubscribersResponse>
3523
+ | BodyResponseCallback<Readable>,
3524
+ callback?:
3525
+ | BodyResponseCallback<Schema$ListSubscribersResponse>
3526
+ | BodyResponseCallback<Readable>
3527
+ ):
3528
+ | void
3529
+ | Promise<GaxiosResponseWithHTTP2<Schema$ListSubscribersResponse>>
3530
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
3531
+ let params = (paramsOrCallback ||
3532
+ {}) as Params$Resource$Projects$Subscribers$List;
3533
+ let options = (optionsOrCallback || {}) as MethodOptions;
3534
+
3535
+ if (typeof paramsOrCallback === 'function') {
3536
+ callback = paramsOrCallback;
3537
+ params = {} as Params$Resource$Projects$Subscribers$List;
3538
+ options = {};
3539
+ }
3540
+
3541
+ if (typeof optionsOrCallback === 'function') {
3542
+ callback = optionsOrCallback;
3543
+ options = {};
3544
+ }
3545
+
3546
+ const rootUrl = options.rootUrl || 'https://health.googleapis.com/';
3547
+ const parameters = {
3548
+ options: Object.assign(
3549
+ {
3550
+ url: (rootUrl + '/v4/{+parent}/subscribers').replace(
3551
+ /([^:]\/)\/+/g,
3552
+ '$1'
3553
+ ),
3554
+ method: 'GET',
3555
+ apiVersion: '',
3556
+ },
3557
+ options
3558
+ ),
3559
+ params,
3560
+ requiredParams: ['parent'],
3561
+ pathParams: ['parent'],
3562
+ context: this.context,
3563
+ };
3564
+ if (callback) {
3565
+ createAPIRequest<Schema$ListSubscribersResponse>(
3566
+ parameters,
3567
+ callback as BodyResponseCallback<unknown>
3568
+ );
3569
+ } else {
3570
+ return createAPIRequest<Schema$ListSubscribersResponse>(parameters);
3571
+ }
3572
+ }
3573
+
3574
+ /**
3575
+ * Updates the configuration of an existing subscriber, such as the endpoint URI or the data types it's interested in. **Endpoint Verification:** If the `endpoint_uri` or `endpoint_authorization` field is included in the `update_mask`, the backend will re-verify the endpoint. The verification process is the same as described in `CreateSubscriber`: 1. **Verification with Authorization:** POST to the new or existing `endpoint_uri` with the new or existing `Authorization` secret. Expects HTTP `201 Created`. 2. **Verification without Authorization:** POST to the `endpoint_uri` without the `Authorization` header. Expects HTTP `401 Unauthorized` or `403 Forbidden`. Both tests must pass using the potentially updated values for the subscriber update to succeed. If verification fails, the update will not be applied, and an error will be returned.
3576
+ * @example
3577
+ * ```js
3578
+ * // Before running the sample:
3579
+ * // - Enable the API at:
3580
+ * // https://console.developers.google.com/apis/api/health.googleapis.com
3581
+ * // - Login into gcloud by running:
3582
+ * // ```sh
3583
+ * // $ gcloud auth application-default login
3584
+ * // ```
3585
+ * // - Install the npm module by running:
3586
+ * // ```sh
3587
+ * // $ npm install googleapis
3588
+ * // ```
3589
+ *
3590
+ * const {google} = require('googleapis');
3591
+ * const health = google.health('v4');
3592
+ *
3593
+ * async function main() {
3594
+ * const auth = new google.auth.GoogleAuth({
3595
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3596
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
3597
+ * });
3598
+ *
3599
+ * // Acquire an auth client, and bind it to all future calls
3600
+ * const authClient = await auth.getClient();
3601
+ * google.options({auth: authClient});
3602
+ *
3603
+ * // Do the magic
3604
+ * const res = await health.projects.subscribers.patch({
3605
+ * // Identifier. The resource name of the Subscriber. Format: projects/{project\}/subscribers/{subscriber\} The {project\} ID is a Google Cloud Project ID or Project Number. The {subscriber\} ID is user-settable (4-36 characters, matching /[a-z]([a-z0-9-]{2,34\}[a-z0-9])/) if provided during creation, or system-generated otherwise (e.g., a UUID). Example (User-settable subscriber ID): projects/my-project/subscribers/my-sub-123 Example (System-generated subscriber ID): projects/my-project/subscribers/a1b2c3d4-e5f6-7890-1234-567890abcdef
3606
+ * name: 'projects/my-project/subscribers/my-subscriber',
3607
+ * // Optional. A field mask that specifies which fields of the Subscriber message are to be updated. This allows for partial updates. Supported fields: - endpoint_uri - subscriber_configs - endpoint_authorization
3608
+ * updateMask: 'placeholder-value',
3609
+ *
3610
+ * // Request body metadata
3611
+ * requestBody: {
3612
+ * // request body parameters
3613
+ * // {
3614
+ * // "createTime": "my_createTime",
3615
+ * // "endpointAuthorization": {},
3616
+ * // "endpointUri": "my_endpointUri",
3617
+ * // "name": "my_name",
3618
+ * // "state": "my_state",
3619
+ * // "subscriberConfigs": [],
3620
+ * // "updateTime": "my_updateTime"
3621
+ * // }
3622
+ * },
3623
+ * });
3624
+ * console.log(res.data);
3625
+ *
3626
+ * // Example response
3627
+ * // {
3628
+ * // "done": false,
3629
+ * // "error": {},
3630
+ * // "metadata": {},
3631
+ * // "name": "my_name",
3632
+ * // "response": {}
3633
+ * // }
3634
+ * }
3635
+ *
3636
+ * main().catch(e => {
3637
+ * console.error(e);
3638
+ * throw e;
3639
+ * });
3640
+ *
3641
+ * ```
3642
+ *
3643
+ * @param params - Parameters for request
3644
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
3645
+ * @param callback - Optional callback that handles the response.
3646
+ * @returns A promise if used with async/await, or void if used with a callback.
3647
+ */
3648
+ patch(
3649
+ params: Params$Resource$Projects$Subscribers$Patch,
3650
+ options: StreamMethodOptions
3651
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
3652
+ patch(
3653
+ params?: Params$Resource$Projects$Subscribers$Patch,
3654
+ options?: MethodOptions
3655
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
3656
+ patch(
3657
+ params: Params$Resource$Projects$Subscribers$Patch,
3658
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
3659
+ callback: BodyResponseCallback<Readable>
3660
+ ): void;
3661
+ patch(
3662
+ params: Params$Resource$Projects$Subscribers$Patch,
3663
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
3664
+ callback: BodyResponseCallback<Schema$Operation>
3665
+ ): void;
3666
+ patch(
3667
+ params: Params$Resource$Projects$Subscribers$Patch,
3668
+ callback: BodyResponseCallback<Schema$Operation>
3669
+ ): void;
3670
+ patch(callback: BodyResponseCallback<Schema$Operation>): void;
3671
+ patch(
3672
+ paramsOrCallback?:
3673
+ | Params$Resource$Projects$Subscribers$Patch
3674
+ | BodyResponseCallback<Schema$Operation>
3675
+ | BodyResponseCallback<Readable>,
3676
+ optionsOrCallback?:
3677
+ | MethodOptions
3678
+ | StreamMethodOptions
3679
+ | BodyResponseCallback<Schema$Operation>
3680
+ | BodyResponseCallback<Readable>,
3681
+ callback?:
3682
+ | BodyResponseCallback<Schema$Operation>
3683
+ | BodyResponseCallback<Readable>
3684
+ ):
3685
+ | void
3686
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
3687
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
3688
+ let params = (paramsOrCallback ||
3689
+ {}) as Params$Resource$Projects$Subscribers$Patch;
3690
+ let options = (optionsOrCallback || {}) as MethodOptions;
3691
+
3692
+ if (typeof paramsOrCallback === 'function') {
3693
+ callback = paramsOrCallback;
3694
+ params = {} as Params$Resource$Projects$Subscribers$Patch;
3695
+ options = {};
3696
+ }
3697
+
3698
+ if (typeof optionsOrCallback === 'function') {
3699
+ callback = optionsOrCallback;
3700
+ options = {};
3701
+ }
3702
+
3703
+ const rootUrl = options.rootUrl || 'https://health.googleapis.com/';
3704
+ const parameters = {
3705
+ options: Object.assign(
3706
+ {
3707
+ url: (rootUrl + '/v4/{+name}').replace(/([^:]\/)\/+/g, '$1'),
3708
+ method: 'PATCH',
3709
+ apiVersion: '',
3710
+ },
3711
+ options
3712
+ ),
3713
+ params,
3714
+ requiredParams: ['name'],
3715
+ pathParams: ['name'],
3716
+ context: this.context,
3717
+ };
3718
+ if (callback) {
3719
+ createAPIRequest<Schema$Operation>(
3720
+ parameters,
3721
+ callback as BodyResponseCallback<unknown>
3722
+ );
3723
+ } else {
3724
+ return createAPIRequest<Schema$Operation>(parameters);
3725
+ }
3726
+ }
3727
+ }
3728
+
3729
+ export interface Params$Resource$Projects$Subscribers$Create extends StandardParameters {
3730
+ /**
3731
+ * Required. The parent resource where this subscriber will be created. Format: projects/{project\} Example: projects/my-project-123
3732
+ */
3733
+ parent?: string;
3734
+ /**
3735
+ * 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])/.
3736
+ */
3737
+ subscriberId?: string;
3738
+
3739
+ /**
3740
+ * Request body metadata
3741
+ */
3742
+ requestBody?: Schema$CreateSubscriberPayload;
3743
+ }
3744
+ export interface Params$Resource$Projects$Subscribers$Delete extends StandardParameters {
3745
+ /**
3746
+ * Optional. If set to true, any child resources (e.g., subscriptions) will also be deleted. If false (default) and child resources exist, the request will fail.
3747
+ */
3748
+ force?: boolean;
3749
+ /**
3750
+ * Required. The name of the subscriber to delete. Format: projects/{project\}/subscribers/{subscriber\} Example: projects/my-project/subscribers/my-subscriber-123 The {subscriber\} ID is user-settable (4-36 characters, matching /[a-z]([a-z0-9-]{2,34\}[a-z0-9])/) or system-generated if not provided during creation.
3751
+ */
3752
+ name?: string;
3753
+ }
3754
+ export interface Params$Resource$Projects$Subscribers$List extends StandardParameters {
3755
+ /**
3756
+ * Optional. The maximum number of subscribers to return. The service may return fewer than this value. If unspecified, at most 50 subscribers will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
3757
+ */
3758
+ pageSize?: number;
3759
+ /**
3760
+ * Optional. A page token, received from a previous `ListSubscribers` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListSubscribers` must match the call that provided the page token.
3761
+ */
3762
+ pageToken?: string;
3763
+ /**
3764
+ * Required. The parent, which owns this collection of subscribers. Format: projects/{project\}
3765
+ */
3766
+ parent?: string;
3767
+ }
3768
+ export interface Params$Resource$Projects$Subscribers$Patch extends StandardParameters {
3769
+ /**
3770
+ * Identifier. The resource name of the Subscriber. Format: projects/{project\}/subscribers/{subscriber\} The {project\} ID is a Google Cloud Project ID or Project Number. The {subscriber\} ID is user-settable (4-36 characters, matching /[a-z]([a-z0-9-]{2,34\}[a-z0-9])/) if provided during creation, or system-generated otherwise (e.g., a UUID). Example (User-settable subscriber ID): projects/my-project/subscribers/my-sub-123 Example (System-generated subscriber ID): projects/my-project/subscribers/a1b2c3d4-e5f6-7890-1234-567890abcdef
3771
+ */
3772
+ name?: string;
3773
+ /**
3774
+ * Optional. A field mask that specifies which fields of the Subscriber message are to be updated. This allows for partial updates. Supported fields: - endpoint_uri - subscriber_configs - endpoint_authorization
3775
+ */
3776
+ updateMask?: string;
3777
+
3778
+ /**
3779
+ * Request body metadata
3780
+ */
3781
+ requestBody?: Schema$Subscriber;
3782
+ }
3783
+
3784
+ export class Resource$Projects$Subscribers$Subscriptions {
3785
+ context: APIRequestContext;
3786
+ constructor(context: APIRequestContext) {
3787
+ this.context = context;
3788
+ }
3789
+
3790
+ /**
3791
+ * 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.
3792
+ * @example
3793
+ * ```js
3794
+ * // Before running the sample:
3795
+ * // - Enable the API at:
3796
+ * // https://console.developers.google.com/apis/api/health.googleapis.com
3797
+ * // - Login into gcloud by running:
3798
+ * // ```sh
3799
+ * // $ gcloud auth application-default login
3800
+ * // ```
3801
+ * // - Install the npm module by running:
3802
+ * // ```sh
3803
+ * // $ npm install googleapis
3804
+ * // ```
3805
+ *
3806
+ * const {google} = require('googleapis');
3807
+ * const health = google.health('v4');
3808
+ *
3809
+ * async function main() {
3810
+ * const auth = new google.auth.GoogleAuth({
3811
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3812
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
3813
+ * });
3814
+ *
3815
+ * // Acquire an auth client, and bind it to all future calls
3816
+ * const authClient = await auth.getClient();
3817
+ * google.options({auth: authClient});
3818
+ *
3819
+ * // Do the magic
3820
+ * const res = await health.projects.subscribers.subscriptions.create({
3821
+ * // 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.
3822
+ * parent: 'projects/my-project/subscribers/my-subscriber',
3823
+ * // 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.
3824
+ * subscriptionId: 'placeholder-value',
3825
+ *
3826
+ * // Request body metadata
3827
+ * requestBody: {
3828
+ * // request body parameters
3829
+ * // {
3830
+ * // "dataTypes": [],
3831
+ * // "user": "my_user"
3832
+ * // }
3833
+ * },
3834
+ * });
3835
+ * console.log(res.data);
3836
+ *
3837
+ * // Example response
3838
+ * // {
3839
+ * // "dataTypes": [],
3840
+ * // "name": "my_name",
3841
+ * // "user": "my_user"
2478
3842
  * // }
2479
3843
  * }
2480
3844
  *
@@ -2491,52 +3855,53 @@ export namespace health_v4 {
2491
3855
  * @returns A promise if used with async/await, or void if used with a callback.
2492
3856
  */
2493
3857
  create(
2494
- params: Params$Resource$Projects$Subscribers$Create,
3858
+ params: Params$Resource$Projects$Subscribers$Subscriptions$Create,
2495
3859
  options: StreamMethodOptions
2496
3860
  ): Promise<GaxiosResponseWithHTTP2<Readable>>;
2497
3861
  create(
2498
- params?: Params$Resource$Projects$Subscribers$Create,
3862
+ params?: Params$Resource$Projects$Subscribers$Subscriptions$Create,
2499
3863
  options?: MethodOptions
2500
- ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
3864
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Subscription>>;
2501
3865
  create(
2502
- params: Params$Resource$Projects$Subscribers$Create,
3866
+ params: Params$Resource$Projects$Subscribers$Subscriptions$Create,
2503
3867
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
2504
3868
  callback: BodyResponseCallback<Readable>
2505
3869
  ): void;
2506
3870
  create(
2507
- params: Params$Resource$Projects$Subscribers$Create,
2508
- options: MethodOptions | BodyResponseCallback<Schema$Operation>,
2509
- callback: BodyResponseCallback<Schema$Operation>
3871
+ params: Params$Resource$Projects$Subscribers$Subscriptions$Create,
3872
+ options: MethodOptions | BodyResponseCallback<Schema$Subscription>,
3873
+ callback: BodyResponseCallback<Schema$Subscription>
2510
3874
  ): void;
2511
3875
  create(
2512
- params: Params$Resource$Projects$Subscribers$Create,
2513
- callback: BodyResponseCallback<Schema$Operation>
3876
+ params: Params$Resource$Projects$Subscribers$Subscriptions$Create,
3877
+ callback: BodyResponseCallback<Schema$Subscription>
2514
3878
  ): void;
2515
- create(callback: BodyResponseCallback<Schema$Operation>): void;
3879
+ create(callback: BodyResponseCallback<Schema$Subscription>): void;
2516
3880
  create(
2517
3881
  paramsOrCallback?:
2518
- | Params$Resource$Projects$Subscribers$Create
2519
- | BodyResponseCallback<Schema$Operation>
3882
+ | Params$Resource$Projects$Subscribers$Subscriptions$Create
3883
+ | BodyResponseCallback<Schema$Subscription>
2520
3884
  | BodyResponseCallback<Readable>,
2521
3885
  optionsOrCallback?:
2522
3886
  | MethodOptions
2523
3887
  | StreamMethodOptions
2524
- | BodyResponseCallback<Schema$Operation>
3888
+ | BodyResponseCallback<Schema$Subscription>
2525
3889
  | BodyResponseCallback<Readable>,
2526
3890
  callback?:
2527
- | BodyResponseCallback<Schema$Operation>
3891
+ | BodyResponseCallback<Schema$Subscription>
2528
3892
  | BodyResponseCallback<Readable>
2529
3893
  ):
2530
3894
  | void
2531
- | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
3895
+ | Promise<GaxiosResponseWithHTTP2<Schema$Subscription>>
2532
3896
  | Promise<GaxiosResponseWithHTTP2<Readable>> {
2533
3897
  let params = (paramsOrCallback ||
2534
- {}) as Params$Resource$Projects$Subscribers$Create;
3898
+ {}) as Params$Resource$Projects$Subscribers$Subscriptions$Create;
2535
3899
  let options = (optionsOrCallback || {}) as MethodOptions;
2536
3900
 
2537
3901
  if (typeof paramsOrCallback === 'function') {
2538
3902
  callback = paramsOrCallback;
2539
- params = {} as Params$Resource$Projects$Subscribers$Create;
3903
+ params =
3904
+ {} as Params$Resource$Projects$Subscribers$Subscriptions$Create;
2540
3905
  options = {};
2541
3906
  }
2542
3907
 
@@ -2549,7 +3914,7 @@ export namespace health_v4 {
2549
3914
  const parameters = {
2550
3915
  options: Object.assign(
2551
3916
  {
2552
- url: (rootUrl + '/v4/{+parent}/subscribers').replace(
3917
+ url: (rootUrl + '/v4/{+parent}/subscriptions').replace(
2553
3918
  /([^:]\/)\/+/g,
2554
3919
  '$1'
2555
3920
  ),
@@ -2564,17 +3929,17 @@ export namespace health_v4 {
2564
3929
  context: this.context,
2565
3930
  };
2566
3931
  if (callback) {
2567
- createAPIRequest<Schema$Operation>(
3932
+ createAPIRequest<Schema$Subscription>(
2568
3933
  parameters,
2569
3934
  callback as BodyResponseCallback<unknown>
2570
3935
  );
2571
3936
  } else {
2572
- return createAPIRequest<Schema$Operation>(parameters);
3937
+ return createAPIRequest<Schema$Subscription>(parameters);
2573
3938
  }
2574
3939
  }
2575
3940
 
2576
3941
  /**
2577
- * Deletes a subscriber registration. This will stop all notifications to the subscriber's endpoint.
3942
+ * Deletes a specific user subscription, stopping notifications for this user to this subscriber.
2578
3943
  * @example
2579
3944
  * ```js
2580
3945
  * // Before running the sample:
@@ -2603,22 +3968,14 @@ export namespace health_v4 {
2603
3968
  * google.options({auth: authClient});
2604
3969
  *
2605
3970
  * // Do the magic
2606
- * const res = await health.projects.subscribers.delete({
2607
- * // Optional. If set to true, any child resources (e.g., subscriptions) will also be deleted. If false (default) and child resources exist, the request will fail.
2608
- * force: 'placeholder-value',
2609
- * // Required. The name of the subscriber to delete. Format: projects/{project\}/subscribers/{subscriber\} Example: projects/my-project/subscribers/my-subscriber-123 The {subscriber\} ID is user-settable (4-36 characters, matching /[a-z]([a-z0-9-]{2,34\}[a-z0-9])/) or system-generated if not provided during creation.
2610
- * name: 'projects/my-project/subscribers/my-subscriber',
3971
+ * const res = await health.projects.subscribers.subscriptions.delete({
3972
+ * // 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.
3973
+ * name: 'projects/my-project/subscribers/my-subscriber/subscriptions/my-subscription',
2611
3974
  * });
2612
3975
  * console.log(res.data);
2613
3976
  *
2614
3977
  * // Example response
2615
- * // {
2616
- * // "done": false,
2617
- * // "error": {},
2618
- * // "metadata": {},
2619
- * // "name": "my_name",
2620
- * // "response": {}
2621
- * // }
3978
+ * // {}
2622
3979
  * }
2623
3980
  *
2624
3981
  * main().catch(e => {
@@ -2634,52 +3991,53 @@ export namespace health_v4 {
2634
3991
  * @returns A promise if used with async/await, or void if used with a callback.
2635
3992
  */
2636
3993
  delete(
2637
- params: Params$Resource$Projects$Subscribers$Delete,
3994
+ params: Params$Resource$Projects$Subscribers$Subscriptions$Delete,
2638
3995
  options: StreamMethodOptions
2639
3996
  ): Promise<GaxiosResponseWithHTTP2<Readable>>;
2640
3997
  delete(
2641
- params?: Params$Resource$Projects$Subscribers$Delete,
3998
+ params?: Params$Resource$Projects$Subscribers$Subscriptions$Delete,
2642
3999
  options?: MethodOptions
2643
- ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
4000
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
2644
4001
  delete(
2645
- params: Params$Resource$Projects$Subscribers$Delete,
4002
+ params: Params$Resource$Projects$Subscribers$Subscriptions$Delete,
2646
4003
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
2647
4004
  callback: BodyResponseCallback<Readable>
2648
4005
  ): void;
2649
4006
  delete(
2650
- params: Params$Resource$Projects$Subscribers$Delete,
2651
- options: MethodOptions | BodyResponseCallback<Schema$Operation>,
2652
- callback: BodyResponseCallback<Schema$Operation>
4007
+ params: Params$Resource$Projects$Subscribers$Subscriptions$Delete,
4008
+ options: MethodOptions | BodyResponseCallback<Schema$Empty>,
4009
+ callback: BodyResponseCallback<Schema$Empty>
2653
4010
  ): void;
2654
4011
  delete(
2655
- params: Params$Resource$Projects$Subscribers$Delete,
2656
- callback: BodyResponseCallback<Schema$Operation>
4012
+ params: Params$Resource$Projects$Subscribers$Subscriptions$Delete,
4013
+ callback: BodyResponseCallback<Schema$Empty>
2657
4014
  ): void;
2658
- delete(callback: BodyResponseCallback<Schema$Operation>): void;
4015
+ delete(callback: BodyResponseCallback<Schema$Empty>): void;
2659
4016
  delete(
2660
4017
  paramsOrCallback?:
2661
- | Params$Resource$Projects$Subscribers$Delete
2662
- | BodyResponseCallback<Schema$Operation>
4018
+ | Params$Resource$Projects$Subscribers$Subscriptions$Delete
4019
+ | BodyResponseCallback<Schema$Empty>
2663
4020
  | BodyResponseCallback<Readable>,
2664
4021
  optionsOrCallback?:
2665
4022
  | MethodOptions
2666
4023
  | StreamMethodOptions
2667
- | BodyResponseCallback<Schema$Operation>
4024
+ | BodyResponseCallback<Schema$Empty>
2668
4025
  | BodyResponseCallback<Readable>,
2669
4026
  callback?:
2670
- | BodyResponseCallback<Schema$Operation>
4027
+ | BodyResponseCallback<Schema$Empty>
2671
4028
  | BodyResponseCallback<Readable>
2672
4029
  ):
2673
4030
  | void
2674
- | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
4031
+ | Promise<GaxiosResponseWithHTTP2<Schema$Empty>>
2675
4032
  | Promise<GaxiosResponseWithHTTP2<Readable>> {
2676
4033
  let params = (paramsOrCallback ||
2677
- {}) as Params$Resource$Projects$Subscribers$Delete;
4034
+ {}) as Params$Resource$Projects$Subscribers$Subscriptions$Delete;
2678
4035
  let options = (optionsOrCallback || {}) as MethodOptions;
2679
4036
 
2680
4037
  if (typeof paramsOrCallback === 'function') {
2681
4038
  callback = paramsOrCallback;
2682
- params = {} as Params$Resource$Projects$Subscribers$Delete;
4039
+ params =
4040
+ {} as Params$Resource$Projects$Subscribers$Subscriptions$Delete;
2683
4041
  options = {};
2684
4042
  }
2685
4043
 
@@ -2704,17 +4062,17 @@ export namespace health_v4 {
2704
4062
  context: this.context,
2705
4063
  };
2706
4064
  if (callback) {
2707
- createAPIRequest<Schema$Operation>(
4065
+ createAPIRequest<Schema$Empty>(
2708
4066
  parameters,
2709
4067
  callback as BodyResponseCallback<unknown>
2710
4068
  );
2711
4069
  } else {
2712
- return createAPIRequest<Schema$Operation>(parameters);
4070
+ return createAPIRequest<Schema$Empty>(parameters);
2713
4071
  }
2714
4072
  }
2715
4073
 
2716
4074
  /**
2717
- * Lists all subscribers registered within the owned Google Cloud Project.
4075
+ * Lists all active subscriptions for a given subscriber. This can be filtered, for example, by user or data type.
2718
4076
  * @example
2719
4077
  * ```js
2720
4078
  * // Before running the sample:
@@ -2743,21 +4101,22 @@ export namespace health_v4 {
2743
4101
  * google.options({auth: authClient});
2744
4102
  *
2745
4103
  * // Do the magic
2746
- * const res = await health.projects.subscribers.list({
2747
- * // Optional. The maximum number of subscribers to return. The service may return fewer than this value. If unspecified, at most 50 subscribers will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
4104
+ * const res = await health.projects.subscribers.subscriptions.list({
4105
+ * // Optional. A filter to apply to the list of subscriptions. The filter syntax is described in https://google.aip.dev/160. The filter can be applied to the following fields: - `user` - `data_type` The `user` identifier (e.g., `user1` in `users/user1`) refers to the public `healthUserId` Example: user = "users/user1" Example: user = "users/user1" OR user = "users/user2" Example: user = "users/user1" AND (data_type = "sleep" OR data_type = "weight")
4106
+ * filter: 'placeholder-value',
4107
+ * // 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.
2748
4108
  * pageSize: 'placeholder-value',
2749
- * // Optional. A page token, received from a previous `ListSubscribers` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListSubscribers` must match the call that provided the page token.
4109
+ * // 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.
2750
4110
  * pageToken: 'placeholder-value',
2751
- * // Required. The parent, which owns this collection of subscribers. Format: projects/{project\}
2752
- * parent: 'projects/my-project',
4111
+ * // 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.
4112
+ * parent: 'projects/my-project/subscribers/my-subscriber',
2753
4113
  * });
2754
4114
  * console.log(res.data);
2755
4115
  *
2756
4116
  * // Example response
2757
4117
  * // {
2758
4118
  * // "nextPageToken": "my_nextPageToken",
2759
- * // "subscribers": [],
2760
- * // "totalSize": 0
4119
+ * // "subscriptions": []
2761
4120
  * // }
2762
4121
  * }
2763
4122
  *
@@ -2774,54 +4133,56 @@ export namespace health_v4 {
2774
4133
  * @returns A promise if used with async/await, or void if used with a callback.
2775
4134
  */
2776
4135
  list(
2777
- params: Params$Resource$Projects$Subscribers$List,
4136
+ params: Params$Resource$Projects$Subscribers$Subscriptions$List,
2778
4137
  options: StreamMethodOptions
2779
4138
  ): Promise<GaxiosResponseWithHTTP2<Readable>>;
2780
4139
  list(
2781
- params?: Params$Resource$Projects$Subscribers$List,
4140
+ params?: Params$Resource$Projects$Subscribers$Subscriptions$List,
2782
4141
  options?: MethodOptions
2783
- ): Promise<GaxiosResponseWithHTTP2<Schema$ListSubscribersResponse>>;
4142
+ ): Promise<GaxiosResponseWithHTTP2<Schema$ListSubscriptionsResponse>>;
2784
4143
  list(
2785
- params: Params$Resource$Projects$Subscribers$List,
4144
+ params: Params$Resource$Projects$Subscribers$Subscriptions$List,
2786
4145
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
2787
4146
  callback: BodyResponseCallback<Readable>
2788
4147
  ): void;
2789
4148
  list(
2790
- params: Params$Resource$Projects$Subscribers$List,
4149
+ params: Params$Resource$Projects$Subscribers$Subscriptions$List,
2791
4150
  options:
2792
4151
  | MethodOptions
2793
- | BodyResponseCallback<Schema$ListSubscribersResponse>,
2794
- callback: BodyResponseCallback<Schema$ListSubscribersResponse>
4152
+ | BodyResponseCallback<Schema$ListSubscriptionsResponse>,
4153
+ callback: BodyResponseCallback<Schema$ListSubscriptionsResponse>
2795
4154
  ): void;
2796
4155
  list(
2797
- params: Params$Resource$Projects$Subscribers$List,
2798
- callback: BodyResponseCallback<Schema$ListSubscribersResponse>
4156
+ params: Params$Resource$Projects$Subscribers$Subscriptions$List,
4157
+ callback: BodyResponseCallback<Schema$ListSubscriptionsResponse>
4158
+ ): void;
4159
+ list(
4160
+ callback: BodyResponseCallback<Schema$ListSubscriptionsResponse>
2799
4161
  ): void;
2800
- list(callback: BodyResponseCallback<Schema$ListSubscribersResponse>): void;
2801
4162
  list(
2802
4163
  paramsOrCallback?:
2803
- | Params$Resource$Projects$Subscribers$List
2804
- | BodyResponseCallback<Schema$ListSubscribersResponse>
4164
+ | Params$Resource$Projects$Subscribers$Subscriptions$List
4165
+ | BodyResponseCallback<Schema$ListSubscriptionsResponse>
2805
4166
  | BodyResponseCallback<Readable>,
2806
4167
  optionsOrCallback?:
2807
4168
  | MethodOptions
2808
4169
  | StreamMethodOptions
2809
- | BodyResponseCallback<Schema$ListSubscribersResponse>
4170
+ | BodyResponseCallback<Schema$ListSubscriptionsResponse>
2810
4171
  | BodyResponseCallback<Readable>,
2811
4172
  callback?:
2812
- | BodyResponseCallback<Schema$ListSubscribersResponse>
4173
+ | BodyResponseCallback<Schema$ListSubscriptionsResponse>
2813
4174
  | BodyResponseCallback<Readable>
2814
4175
  ):
2815
4176
  | void
2816
- | Promise<GaxiosResponseWithHTTP2<Schema$ListSubscribersResponse>>
4177
+ | Promise<GaxiosResponseWithHTTP2<Schema$ListSubscriptionsResponse>>
2817
4178
  | Promise<GaxiosResponseWithHTTP2<Readable>> {
2818
4179
  let params = (paramsOrCallback ||
2819
- {}) as Params$Resource$Projects$Subscribers$List;
4180
+ {}) as Params$Resource$Projects$Subscribers$Subscriptions$List;
2820
4181
  let options = (optionsOrCallback || {}) as MethodOptions;
2821
4182
 
2822
4183
  if (typeof paramsOrCallback === 'function') {
2823
4184
  callback = paramsOrCallback;
2824
- params = {} as Params$Resource$Projects$Subscribers$List;
4185
+ params = {} as Params$Resource$Projects$Subscribers$Subscriptions$List;
2825
4186
  options = {};
2826
4187
  }
2827
4188
 
@@ -2834,7 +4195,7 @@ export namespace health_v4 {
2834
4195
  const parameters = {
2835
4196
  options: Object.assign(
2836
4197
  {
2837
- url: (rootUrl + '/v4/{+parent}/subscribers').replace(
4198
+ url: (rootUrl + '/v4/{+parent}/subscriptions').replace(
2838
4199
  /([^:]\/)\/+/g,
2839
4200
  '$1'
2840
4201
  ),
@@ -2849,17 +4210,17 @@ export namespace health_v4 {
2849
4210
  context: this.context,
2850
4211
  };
2851
4212
  if (callback) {
2852
- createAPIRequest<Schema$ListSubscribersResponse>(
4213
+ createAPIRequest<Schema$ListSubscriptionsResponse>(
2853
4214
  parameters,
2854
4215
  callback as BodyResponseCallback<unknown>
2855
4216
  );
2856
4217
  } else {
2857
- return createAPIRequest<Schema$ListSubscribersResponse>(parameters);
4218
+ return createAPIRequest<Schema$ListSubscriptionsResponse>(parameters);
2858
4219
  }
2859
4220
  }
2860
4221
 
2861
4222
  /**
2862
- * Updates the configuration of an existing subscriber, such as the endpoint URI or the data types it's interested in. **Endpoint Verification:** If the `endpoint_uri` or `endpoint_authorization` field is included in the `update_mask`, the backend will re-verify the endpoint. The verification process is the same as described in `CreateSubscriber`: 1. **Verification with Authorization:** POST to the new or existing `endpoint_uri` with the new or existing `Authorization` secret. Expects HTTP `201 Created`. 2. **Verification without Authorization:** POST to the `endpoint_uri` without the `Authorization` header. Expects HTTP `401 Unauthorized` or `403 Forbidden`. Both tests must pass using the potentially updated values for the subscriber update to succeed. If verification fails, the update will not be applied, and an error will be returned.
4223
+ * Updates the data types for an existing user subscription.
2863
4224
  * @example
2864
4225
  * ```js
2865
4226
  * // Before running the sample:
@@ -2888,23 +4249,19 @@ export namespace health_v4 {
2888
4249
  * google.options({auth: authClient});
2889
4250
  *
2890
4251
  * // Do the magic
2891
- * const res = await health.projects.subscribers.patch({
2892
- * // Identifier. The resource name of the Subscriber. Format: projects/{project\}/subscribers/{subscriber\} The {project\} ID is a Google Cloud Project ID or Project Number. The {subscriber\} ID is user-settable (4-36 characters, matching /[a-z]([a-z0-9-]{2,34\}[a-z0-9])/) if provided during creation, or system-generated otherwise (e.g., a UUID). Example (User-settable subscriber ID): projects/my-project/subscribers/my-sub-123 Example (System-generated subscriber ID): projects/my-project/subscribers/a1b2c3d4-e5f6-7890-1234-567890abcdef
2893
- * name: 'projects/my-project/subscribers/my-subscriber',
2894
- * // Optional. A field mask that specifies which fields of the Subscriber message are to be updated. This allows for partial updates. Supported fields: - endpoint_uri - subscriber_configs - endpoint_authorization
4252
+ * const res = await health.projects.subscribers.subscriptions.patch({
4253
+ * // 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.
4254
+ * name: 'projects/my-project/subscribers/my-subscriber/subscriptions/my-subscription',
4255
+ * // Optional. The list of fields to update.
2895
4256
  * updateMask: 'placeholder-value',
2896
4257
  *
2897
4258
  * // Request body metadata
2898
4259
  * requestBody: {
2899
4260
  * // request body parameters
2900
4261
  * // {
2901
- * // "createTime": "my_createTime",
2902
- * // "endpointAuthorization": {},
2903
- * // "endpointUri": "my_endpointUri",
4262
+ * // "dataTypes": [],
2904
4263
  * // "name": "my_name",
2905
- * // "state": "my_state",
2906
- * // "subscriberConfigs": [],
2907
- * // "updateTime": "my_updateTime"
4264
+ * // "user": "my_user"
2908
4265
  * // }
2909
4266
  * },
2910
4267
  * });
@@ -2912,11 +4269,9 @@ export namespace health_v4 {
2912
4269
  *
2913
4270
  * // Example response
2914
4271
  * // {
2915
- * // "done": false,
2916
- * // "error": {},
2917
- * // "metadata": {},
4272
+ * // "dataTypes": [],
2918
4273
  * // "name": "my_name",
2919
- * // "response": {}
4274
+ * // "user": "my_user"
2920
4275
  * // }
2921
4276
  * }
2922
4277
  *
@@ -2933,52 +4288,52 @@ export namespace health_v4 {
2933
4288
  * @returns A promise if used with async/await, or void if used with a callback.
2934
4289
  */
2935
4290
  patch(
2936
- params: Params$Resource$Projects$Subscribers$Patch,
4291
+ params: Params$Resource$Projects$Subscribers$Subscriptions$Patch,
2937
4292
  options: StreamMethodOptions
2938
4293
  ): Promise<GaxiosResponseWithHTTP2<Readable>>;
2939
4294
  patch(
2940
- params?: Params$Resource$Projects$Subscribers$Patch,
4295
+ params?: Params$Resource$Projects$Subscribers$Subscriptions$Patch,
2941
4296
  options?: MethodOptions
2942
- ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
4297
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Subscription>>;
2943
4298
  patch(
2944
- params: Params$Resource$Projects$Subscribers$Patch,
4299
+ params: Params$Resource$Projects$Subscribers$Subscriptions$Patch,
2945
4300
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
2946
4301
  callback: BodyResponseCallback<Readable>
2947
4302
  ): void;
2948
4303
  patch(
2949
- params: Params$Resource$Projects$Subscribers$Patch,
2950
- options: MethodOptions | BodyResponseCallback<Schema$Operation>,
2951
- callback: BodyResponseCallback<Schema$Operation>
4304
+ params: Params$Resource$Projects$Subscribers$Subscriptions$Patch,
4305
+ options: MethodOptions | BodyResponseCallback<Schema$Subscription>,
4306
+ callback: BodyResponseCallback<Schema$Subscription>
2952
4307
  ): void;
2953
4308
  patch(
2954
- params: Params$Resource$Projects$Subscribers$Patch,
2955
- callback: BodyResponseCallback<Schema$Operation>
4309
+ params: Params$Resource$Projects$Subscribers$Subscriptions$Patch,
4310
+ callback: BodyResponseCallback<Schema$Subscription>
2956
4311
  ): void;
2957
- patch(callback: BodyResponseCallback<Schema$Operation>): void;
4312
+ patch(callback: BodyResponseCallback<Schema$Subscription>): void;
2958
4313
  patch(
2959
4314
  paramsOrCallback?:
2960
- | Params$Resource$Projects$Subscribers$Patch
2961
- | BodyResponseCallback<Schema$Operation>
4315
+ | Params$Resource$Projects$Subscribers$Subscriptions$Patch
4316
+ | BodyResponseCallback<Schema$Subscription>
2962
4317
  | BodyResponseCallback<Readable>,
2963
4318
  optionsOrCallback?:
2964
4319
  | MethodOptions
2965
4320
  | StreamMethodOptions
2966
- | BodyResponseCallback<Schema$Operation>
4321
+ | BodyResponseCallback<Schema$Subscription>
2967
4322
  | BodyResponseCallback<Readable>,
2968
4323
  callback?:
2969
- | BodyResponseCallback<Schema$Operation>
4324
+ | BodyResponseCallback<Schema$Subscription>
2970
4325
  | BodyResponseCallback<Readable>
2971
4326
  ):
2972
4327
  | void
2973
- | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
4328
+ | Promise<GaxiosResponseWithHTTP2<Schema$Subscription>>
2974
4329
  | Promise<GaxiosResponseWithHTTP2<Readable>> {
2975
4330
  let params = (paramsOrCallback ||
2976
- {}) as Params$Resource$Projects$Subscribers$Patch;
4331
+ {}) as Params$Resource$Projects$Subscribers$Subscriptions$Patch;
2977
4332
  let options = (optionsOrCallback || {}) as MethodOptions;
2978
4333
 
2979
4334
  if (typeof paramsOrCallback === 'function') {
2980
4335
  callback = paramsOrCallback;
2981
- params = {} as Params$Resource$Projects$Subscribers$Patch;
4336
+ params = {} as Params$Resource$Projects$Subscribers$Subscriptions$Patch;
2982
4337
  options = {};
2983
4338
  }
2984
4339
 
@@ -3003,77 +4358,79 @@ export namespace health_v4 {
3003
4358
  context: this.context,
3004
4359
  };
3005
4360
  if (callback) {
3006
- createAPIRequest<Schema$Operation>(
4361
+ createAPIRequest<Schema$Subscription>(
3007
4362
  parameters,
3008
4363
  callback as BodyResponseCallback<unknown>
3009
4364
  );
3010
4365
  } else {
3011
- return createAPIRequest<Schema$Operation>(parameters);
4366
+ return createAPIRequest<Schema$Subscription>(parameters);
3012
4367
  }
3013
4368
  }
3014
4369
  }
3015
4370
 
3016
- export interface Params$Resource$Projects$Subscribers$Create extends StandardParameters {
4371
+ export interface Params$Resource$Projects$Subscribers$Subscriptions$Create extends StandardParameters {
3017
4372
  /**
3018
- * Required. The parent resource where this subscriber will be created. Format: projects/{project\} Example: projects/my-project-123
4373
+ * 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.
3019
4374
  */
3020
4375
  parent?: string;
3021
4376
  /**
3022
- * 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])/.
4377
+ * 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.
3023
4378
  */
3024
- subscriberId?: string;
4379
+ subscriptionId?: string;
3025
4380
 
3026
4381
  /**
3027
4382
  * Request body metadata
3028
4383
  */
3029
- requestBody?: Schema$CreateSubscriberPayload;
4384
+ requestBody?: Schema$CreateSubscriptionPayload;
3030
4385
  }
3031
- export interface Params$Resource$Projects$Subscribers$Delete extends StandardParameters {
4386
+ export interface Params$Resource$Projects$Subscribers$Subscriptions$Delete extends StandardParameters {
3032
4387
  /**
3033
- * Optional. If set to true, any child resources (e.g., subscriptions) will also be deleted. If false (default) and child resources exist, the request will fail.
3034
- */
3035
- force?: boolean;
3036
- /**
3037
- * Required. The name of the subscriber to delete. Format: projects/{project\}/subscribers/{subscriber\} Example: projects/my-project/subscribers/my-subscriber-123 The {subscriber\} ID is user-settable (4-36 characters, matching /[a-z]([a-z0-9-]{2,34\}[a-z0-9])/) or system-generated if not provided during creation.
4388
+ * 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.
3038
4389
  */
3039
4390
  name?: string;
3040
4391
  }
3041
- export interface Params$Resource$Projects$Subscribers$List extends StandardParameters {
4392
+ export interface Params$Resource$Projects$Subscribers$Subscriptions$List extends StandardParameters {
3042
4393
  /**
3043
- * Optional. The maximum number of subscribers to return. The service may return fewer than this value. If unspecified, at most 50 subscribers will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
4394
+ * Optional. A filter to apply to the list of subscriptions. The filter syntax is described in https://google.aip.dev/160. The filter can be applied to the following fields: - `user` - `data_type` The `user` identifier (e.g., `user1` in `users/user1`) refers to the public `healthUserId` Example: user = "users/user1" Example: user = "users/user1" OR user = "users/user2" Example: user = "users/user1" AND (data_type = "sleep" OR data_type = "weight")
4395
+ */
4396
+ filter?: string;
4397
+ /**
4398
+ * 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.
3044
4399
  */
3045
4400
  pageSize?: number;
3046
4401
  /**
3047
- * Optional. A page token, received from a previous `ListSubscribers` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListSubscribers` must match the call that provided the page token.
4402
+ * 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.
3048
4403
  */
3049
4404
  pageToken?: string;
3050
4405
  /**
3051
- * Required. The parent, which owns this collection of subscribers. Format: projects/{project\}
4406
+ * 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.
3052
4407
  */
3053
4408
  parent?: string;
3054
4409
  }
3055
- export interface Params$Resource$Projects$Subscribers$Patch extends StandardParameters {
4410
+ export interface Params$Resource$Projects$Subscribers$Subscriptions$Patch extends StandardParameters {
3056
4411
  /**
3057
- * Identifier. The resource name of the Subscriber. Format: projects/{project\}/subscribers/{subscriber\} The {project\} ID is a Google Cloud Project ID or Project Number. The {subscriber\} ID is user-settable (4-36 characters, matching /[a-z]([a-z0-9-]{2,34\}[a-z0-9])/) if provided during creation, or system-generated otherwise (e.g., a UUID). Example (User-settable subscriber ID): projects/my-project/subscribers/my-sub-123 Example (System-generated subscriber ID): projects/my-project/subscribers/a1b2c3d4-e5f6-7890-1234-567890abcdef
4412
+ * 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.
3058
4413
  */
3059
4414
  name?: string;
3060
4415
  /**
3061
- * Optional. A field mask that specifies which fields of the Subscriber message are to be updated. This allows for partial updates. Supported fields: - endpoint_uri - subscriber_configs - endpoint_authorization
4416
+ * Optional. The list of fields to update.
3062
4417
  */
3063
4418
  updateMask?: string;
3064
4419
 
3065
4420
  /**
3066
4421
  * Request body metadata
3067
4422
  */
3068
- requestBody?: Schema$Subscriber;
4423
+ requestBody?: Schema$Subscription;
3069
4424
  }
3070
4425
 
3071
4426
  export class Resource$Users {
3072
4427
  context: APIRequestContext;
3073
4428
  dataTypes: Resource$Users$Datatypes;
4429
+ pairedDevices: Resource$Users$Paireddevices;
3074
4430
  constructor(context: APIRequestContext) {
3075
4431
  this.context = context;
3076
4432
  this.dataTypes = new Resource$Users$Datatypes(this.context);
4433
+ this.pairedDevices = new Resource$Users$Paireddevices(this.context);
3077
4434
  }
3078
4435
 
3079
4436
  /**
@@ -3098,7 +4455,13 @@ export namespace health_v4 {
3098
4455
  * async function main() {
3099
4456
  * const auth = new google.auth.GoogleAuth({
3100
4457
  * // Scopes can be specified either as an array or as a single, space-delimited string.
3101
- * scopes: [],
4458
+ * scopes: [
4459
+ * 'https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly',
4460
+ * 'https://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.readonly',
4461
+ * 'https://www.googleapis.com/auth/googlehealth.profile.readonly',
4462
+ * 'https://www.googleapis.com/auth/googlehealth.settings.readonly',
4463
+ * 'https://www.googleapis.com/auth/googlehealth.sleep.readonly',
4464
+ * ],
3102
4465
  * });
3103
4466
  *
3104
4467
  * // Acquire an auth client, and bind it to all future calls
@@ -3212,6 +4575,143 @@ export namespace health_v4 {
3212
4575
  }
3213
4576
  }
3214
4577
 
4578
+ /**
4579
+ * Returns user's IRN Profile details.
4580
+ * @example
4581
+ * ```js
4582
+ * // Before running the sample:
4583
+ * // - Enable the API at:
4584
+ * // https://console.developers.google.com/apis/api/health.googleapis.com
4585
+ * // - Login into gcloud by running:
4586
+ * // ```sh
4587
+ * // $ gcloud auth application-default login
4588
+ * // ```
4589
+ * // - Install the npm module by running:
4590
+ * // ```sh
4591
+ * // $ npm install googleapis
4592
+ * // ```
4593
+ *
4594
+ * const {google} = require('googleapis');
4595
+ * const health = google.health('v4');
4596
+ *
4597
+ * async function main() {
4598
+ * const auth = new google.auth.GoogleAuth({
4599
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4600
+ * scopes: ['https://www.googleapis.com/auth/googlehealth.irn.readonly'],
4601
+ * });
4602
+ *
4603
+ * // Acquire an auth client, and bind it to all future calls
4604
+ * const authClient = await auth.getClient();
4605
+ * google.options({auth: authClient});
4606
+ *
4607
+ * // Do the magic
4608
+ * const res = await health.users.getIrnProfile({
4609
+ * // 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.
4610
+ * name: 'users/my-user/irnProfile',
4611
+ * });
4612
+ * console.log(res.data);
4613
+ *
4614
+ * // Example response
4615
+ * // {
4616
+ * // "enrollmentStatus": false,
4617
+ * // "name": "my_name",
4618
+ * // "onboardingStatus": false,
4619
+ * // "updateTime": "my_updateTime"
4620
+ * // }
4621
+ * }
4622
+ *
4623
+ * main().catch(e => {
4624
+ * console.error(e);
4625
+ * throw e;
4626
+ * });
4627
+ *
4628
+ * ```
4629
+ *
4630
+ * @param params - Parameters for request
4631
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
4632
+ * @param callback - Optional callback that handles the response.
4633
+ * @returns A promise if used with async/await, or void if used with a callback.
4634
+ */
4635
+ getIrnProfile(
4636
+ params: Params$Resource$Users$Getirnprofile,
4637
+ options: StreamMethodOptions
4638
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
4639
+ getIrnProfile(
4640
+ params?: Params$Resource$Users$Getirnprofile,
4641
+ options?: MethodOptions
4642
+ ): Promise<GaxiosResponseWithHTTP2<Schema$IrnProfile>>;
4643
+ getIrnProfile(
4644
+ params: Params$Resource$Users$Getirnprofile,
4645
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
4646
+ callback: BodyResponseCallback<Readable>
4647
+ ): void;
4648
+ getIrnProfile(
4649
+ params: Params$Resource$Users$Getirnprofile,
4650
+ options: MethodOptions | BodyResponseCallback<Schema$IrnProfile>,
4651
+ callback: BodyResponseCallback<Schema$IrnProfile>
4652
+ ): void;
4653
+ getIrnProfile(
4654
+ params: Params$Resource$Users$Getirnprofile,
4655
+ callback: BodyResponseCallback<Schema$IrnProfile>
4656
+ ): void;
4657
+ getIrnProfile(callback: BodyResponseCallback<Schema$IrnProfile>): void;
4658
+ getIrnProfile(
4659
+ paramsOrCallback?:
4660
+ | Params$Resource$Users$Getirnprofile
4661
+ | BodyResponseCallback<Schema$IrnProfile>
4662
+ | BodyResponseCallback<Readable>,
4663
+ optionsOrCallback?:
4664
+ | MethodOptions
4665
+ | StreamMethodOptions
4666
+ | BodyResponseCallback<Schema$IrnProfile>
4667
+ | BodyResponseCallback<Readable>,
4668
+ callback?:
4669
+ | BodyResponseCallback<Schema$IrnProfile>
4670
+ | BodyResponseCallback<Readable>
4671
+ ):
4672
+ | void
4673
+ | Promise<GaxiosResponseWithHTTP2<Schema$IrnProfile>>
4674
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
4675
+ let params = (paramsOrCallback ||
4676
+ {}) as Params$Resource$Users$Getirnprofile;
4677
+ let options = (optionsOrCallback || {}) as MethodOptions;
4678
+
4679
+ if (typeof paramsOrCallback === 'function') {
4680
+ callback = paramsOrCallback;
4681
+ params = {} as Params$Resource$Users$Getirnprofile;
4682
+ options = {};
4683
+ }
4684
+
4685
+ if (typeof optionsOrCallback === 'function') {
4686
+ callback = optionsOrCallback;
4687
+ options = {};
4688
+ }
4689
+
4690
+ const rootUrl = options.rootUrl || 'https://health.googleapis.com/';
4691
+ const parameters = {
4692
+ options: Object.assign(
4693
+ {
4694
+ url: (rootUrl + '/v4/{+name}').replace(/([^:]\/)\/+/g, '$1'),
4695
+ method: 'GET',
4696
+ apiVersion: '',
4697
+ },
4698
+ options
4699
+ ),
4700
+ params,
4701
+ requiredParams: ['name'],
4702
+ pathParams: ['name'],
4703
+ context: this.context,
4704
+ };
4705
+ if (callback) {
4706
+ createAPIRequest<Schema$IrnProfile>(
4707
+ parameters,
4708
+ callback as BodyResponseCallback<unknown>
4709
+ );
4710
+ } else {
4711
+ return createAPIRequest<Schema$IrnProfile>(parameters);
4712
+ }
4713
+ }
4714
+
3215
4715
  /**
3216
4716
  * Returns user Profile details.
3217
4717
  * @example
@@ -3234,7 +4734,7 @@ export namespace health_v4 {
3234
4734
  * async function main() {
3235
4735
  * const auth = new google.auth.GoogleAuth({
3236
4736
  * // Scopes can be specified either as an array or as a single, space-delimited string.
3237
- * scopes: [],
4737
+ * scopes: ['https://www.googleapis.com/auth/googlehealth.profile.readonly'],
3238
4738
  * });
3239
4739
  *
3240
4740
  * // Acquire an auth client, and bind it to all future calls
@@ -3373,7 +4873,7 @@ export namespace health_v4 {
3373
4873
  * async function main() {
3374
4874
  * const auth = new google.auth.GoogleAuth({
3375
4875
  * // Scopes can be specified either as an array or as a single, space-delimited string.
3376
- * scopes: [],
4876
+ * scopes: ['https://www.googleapis.com/auth/googlehealth.settings.readonly'],
3377
4877
  * });
3378
4878
  *
3379
4879
  * // Acquire an auth client, and bind it to all future calls
@@ -3391,6 +4891,7 @@ export namespace health_v4 {
3391
4891
  * // {
3392
4892
  * // "autoStrideEnabled": false,
3393
4893
  * // "distanceUnit": "my_distanceUnit",
4894
+ * // "foodLanguageCode": "my_foodLanguageCode",
3394
4895
  * // "glucoseUnit": "my_glucoseUnit",
3395
4896
  * // "heightUnit": "my_heightUnit",
3396
4897
  * // "languageLocale": "my_languageLocale",
@@ -3696,6 +5197,7 @@ export namespace health_v4 {
3696
5197
  * // {
3697
5198
  * // "autoStrideEnabled": false,
3698
5199
  * // "distanceUnit": "my_distanceUnit",
5200
+ * // "foodLanguageCode": "my_foodLanguageCode",
3699
5201
  * // "glucoseUnit": "my_glucoseUnit",
3700
5202
  * // "heightUnit": "my_heightUnit",
3701
5203
  * // "languageLocale": "my_languageLocale",
@@ -3717,6 +5219,7 @@ export namespace health_v4 {
3717
5219
  * // {
3718
5220
  * // "autoStrideEnabled": false,
3719
5221
  * // "distanceUnit": "my_distanceUnit",
5222
+ * // "foodLanguageCode": "my_foodLanguageCode",
3720
5223
  * // "glucoseUnit": "my_glucoseUnit",
3721
5224
  * // "heightUnit": "my_heightUnit",
3722
5225
  * // "languageLocale": "my_languageLocale",
@@ -3827,7 +5330,13 @@ export namespace health_v4 {
3827
5330
 
3828
5331
  export interface Params$Resource$Users$Getidentity extends StandardParameters {
3829
5332
  /**
3830
- * Required. The resource name of the Identity. Format: `users/me/identity`
5333
+ * Required. The resource name of the Identity. Format: `users/me/identity`
5334
+ */
5335
+ name?: string;
5336
+ }
5337
+ export interface Params$Resource$Users$Getirnprofile extends StandardParameters {
5338
+ /**
5339
+ * 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.
3831
5340
  */
3832
5341
  name?: string;
3833
5342
  }
@@ -4076,12 +5585,15 @@ export namespace health_v4 {
4076
5585
  * requestBody: {
4077
5586
  * // request body parameters
4078
5587
  * // {
5588
+ * // "activeEnergyBurned": {},
4079
5589
  * // "activeMinutes": {},
4080
5590
  * // "activeZoneMinutes": {},
4081
5591
  * // "activityLevel": {},
4082
5592
  * // "altitude": {},
4083
5593
  * // "basalEnergyBurned": {},
5594
+ * // "bloodGlucose": {},
4084
5595
  * // "bodyFat": {},
5596
+ * // "coreBodyTemperature": {},
4085
5597
  * // "dailyHeartRateVariability": {},
4086
5598
  * // "dailyHeartRateZones": {},
4087
5599
  * // "dailyOxygenSaturation": {},
@@ -4091,13 +5603,18 @@ export namespace health_v4 {
4091
5603
  * // "dailyVo2Max": {},
4092
5604
  * // "dataSource": {},
4093
5605
  * // "distance": {},
5606
+ * // "electrocardiogram": {},
4094
5607
  * // "exercise": {},
4095
5608
  * // "floors": {},
5609
+ * // "food": {},
5610
+ * // "foodMeasurementUnit": {},
4096
5611
  * // "heartRate": {},
4097
5612
  * // "heartRateVariability": {},
4098
5613
  * // "height": {},
4099
5614
  * // "hydrationLog": {},
5615
+ * // "irregularRhythmNotification": {},
4100
5616
  * // "name": "my_name",
5617
+ * // "nutritionLog": {},
4101
5618
  * // "oxygenSaturation": {},
4102
5619
  * // "respiratoryRateSleepSummary": {},
4103
5620
  * // "runVo2Max": {},
@@ -4240,7 +5757,12 @@ export namespace health_v4 {
4240
5757
  * async function main() {
4241
5758
  * const auth = new google.auth.GoogleAuth({
4242
5759
  * // Scopes can be specified either as an array or as a single, space-delimited string.
4243
- * scopes: [],
5760
+ * scopes: [
5761
+ * 'https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly',
5762
+ * 'https://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.readonly',
5763
+ * 'https://www.googleapis.com/auth/googlehealth.location.readonly',
5764
+ * 'https://www.googleapis.com/auth/googlehealth.sleep.readonly',
5765
+ * ],
4244
5766
  * });
4245
5767
  *
4246
5768
  * // Acquire an auth client, and bind it to all future calls
@@ -4374,7 +5896,7 @@ export namespace health_v4 {
4374
5896
  }
4375
5897
 
4376
5898
  /**
4377
- * Exports exercise data in TCX format. 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.
5899
+ * 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
5900
  * @example
4379
5901
  * ```js
4380
5902
  * // Before running the sample:
@@ -4395,7 +5917,10 @@ export namespace health_v4 {
4395
5917
  * async function main() {
4396
5918
  * const auth = new google.auth.GoogleAuth({
4397
5919
  * // Scopes can be specified either as an array or as a single, space-delimited string.
4398
- * scopes: [],
5920
+ * scopes: [
5921
+ * 'https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly',
5922
+ * 'https://www.googleapis.com/auth/googlehealth.location.readonly',
5923
+ * ],
4399
5924
  * });
4400
5925
  *
4401
5926
  * // Acquire an auth client, and bind it to all future calls
@@ -4539,7 +6064,12 @@ export namespace health_v4 {
4539
6064
  * async function main() {
4540
6065
  * const auth = new google.auth.GoogleAuth({
4541
6066
  * // Scopes can be specified either as an array or as a single, space-delimited string.
4542
- * scopes: [],
6067
+ * scopes: [
6068
+ * 'https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly',
6069
+ * 'https://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.readonly',
6070
+ * 'https://www.googleapis.com/auth/googlehealth.location.readonly',
6071
+ * 'https://www.googleapis.com/auth/googlehealth.sleep.readonly',
6072
+ * ],
4543
6073
  * });
4544
6074
  *
4545
6075
  * // Acquire an auth client, and bind it to all future calls
@@ -4555,12 +6085,15 @@ export namespace health_v4 {
4555
6085
  *
4556
6086
  * // Example response
4557
6087
  * // {
6088
+ * // "activeEnergyBurned": {},
4558
6089
  * // "activeMinutes": {},
4559
6090
  * // "activeZoneMinutes": {},
4560
6091
  * // "activityLevel": {},
4561
6092
  * // "altitude": {},
4562
6093
  * // "basalEnergyBurned": {},
6094
+ * // "bloodGlucose": {},
4563
6095
  * // "bodyFat": {},
6096
+ * // "coreBodyTemperature": {},
4564
6097
  * // "dailyHeartRateVariability": {},
4565
6098
  * // "dailyHeartRateZones": {},
4566
6099
  * // "dailyOxygenSaturation": {},
@@ -4570,13 +6103,18 @@ export namespace health_v4 {
4570
6103
  * // "dailyVo2Max": {},
4571
6104
  * // "dataSource": {},
4572
6105
  * // "distance": {},
6106
+ * // "electrocardiogram": {},
4573
6107
  * // "exercise": {},
4574
6108
  * // "floors": {},
6109
+ * // "food": {},
6110
+ * // "foodMeasurementUnit": {},
4575
6111
  * // "heartRate": {},
4576
6112
  * // "heartRateVariability": {},
4577
6113
  * // "height": {},
4578
6114
  * // "hydrationLog": {},
6115
+ * // "irregularRhythmNotification": {},
4579
6116
  * // "name": "my_name",
6117
+ * // "nutritionLog": {},
4580
6118
  * // "oxygenSaturation": {},
4581
6119
  * // "respiratoryRateSleepSummary": {},
4582
6120
  * // "runVo2Max": {},
@@ -4704,7 +6242,12 @@ export namespace health_v4 {
4704
6242
  * async function main() {
4705
6243
  * const auth = new google.auth.GoogleAuth({
4706
6244
  * // Scopes can be specified either as an array or as a single, space-delimited string.
4707
- * scopes: [],
6245
+ * scopes: [
6246
+ * 'https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly',
6247
+ * 'https://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.readonly',
6248
+ * 'https://www.googleapis.com/auth/googlehealth.location.readonly',
6249
+ * 'https://www.googleapis.com/auth/googlehealth.sleep.readonly',
6250
+ * ],
4708
6251
  * });
4709
6252
  *
4710
6253
  * // Acquire an auth client, and bind it to all future calls
@@ -4713,7 +6256,7 @@ export namespace health_v4 {
4713
6256
  *
4714
6257
  * // Do the magic
4715
6258
  * 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.
6259
+ * // 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
6260
  * filter: 'placeholder-value',
4718
6261
  * // 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
6262
  * pageSize: 'placeholder-value',
@@ -4866,12 +6409,15 @@ export namespace health_v4 {
4866
6409
  * requestBody: {
4867
6410
  * // request body parameters
4868
6411
  * // {
6412
+ * // "activeEnergyBurned": {},
4869
6413
  * // "activeMinutes": {},
4870
6414
  * // "activeZoneMinutes": {},
4871
6415
  * // "activityLevel": {},
4872
6416
  * // "altitude": {},
4873
6417
  * // "basalEnergyBurned": {},
6418
+ * // "bloodGlucose": {},
4874
6419
  * // "bodyFat": {},
6420
+ * // "coreBodyTemperature": {},
4875
6421
  * // "dailyHeartRateVariability": {},
4876
6422
  * // "dailyHeartRateZones": {},
4877
6423
  * // "dailyOxygenSaturation": {},
@@ -4881,13 +6427,18 @@ export namespace health_v4 {
4881
6427
  * // "dailyVo2Max": {},
4882
6428
  * // "dataSource": {},
4883
6429
  * // "distance": {},
6430
+ * // "electrocardiogram": {},
4884
6431
  * // "exercise": {},
4885
6432
  * // "floors": {},
6433
+ * // "food": {},
6434
+ * // "foodMeasurementUnit": {},
4886
6435
  * // "heartRate": {},
4887
6436
  * // "heartRateVariability": {},
4888
6437
  * // "height": {},
4889
6438
  * // "hydrationLog": {},
6439
+ * // "irregularRhythmNotification": {},
4890
6440
  * // "name": "my_name",
6441
+ * // "nutritionLog": {},
4891
6442
  * // "oxygenSaturation": {},
4892
6443
  * // "respiratoryRateSleepSummary": {},
4893
6444
  * // "runVo2Max": {},
@@ -5027,7 +6578,12 @@ export namespace health_v4 {
5027
6578
  * async function main() {
5028
6579
  * const auth = new google.auth.GoogleAuth({
5029
6580
  * // Scopes can be specified either as an array or as a single, space-delimited string.
5030
- * scopes: [],
6581
+ * scopes: [
6582
+ * 'https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly',
6583
+ * 'https://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.readonly',
6584
+ * 'https://www.googleapis.com/auth/googlehealth.location.readonly',
6585
+ * 'https://www.googleapis.com/auth/googlehealth.sleep.readonly',
6586
+ * ],
5031
6587
  * });
5032
6588
  *
5033
6589
  * // Acquire an auth client, and bind it to all future calls
@@ -5177,7 +6733,12 @@ export namespace health_v4 {
5177
6733
  * async function main() {
5178
6734
  * const auth = new google.auth.GoogleAuth({
5179
6735
  * // Scopes can be specified either as an array or as a single, space-delimited string.
5180
- * scopes: [],
6736
+ * scopes: [
6737
+ * 'https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly',
6738
+ * 'https://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.readonly',
6739
+ * 'https://www.googleapis.com/auth/googlehealth.location.readonly',
6740
+ * 'https://www.googleapis.com/auth/googlehealth.sleep.readonly',
6741
+ * ],
5181
6742
  * });
5182
6743
  *
5183
6744
  * // Acquire an auth client, and bind it to all future calls
@@ -5361,7 +6922,7 @@ export namespace health_v4 {
5361
6922
  }
5362
6923
  export interface Params$Resource$Users$Datatypes$Datapoints$List extends StandardParameters {
5363
6924
  /**
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.
6925
+ * 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
6926
  */
5366
6927
  filter?: string;
5367
6928
  /**
@@ -5421,4 +6982,319 @@ export namespace health_v4 {
5421
6982
  */
5422
6983
  requestBody?: Schema$RollUpDataPointsRequest;
5423
6984
  }
6985
+
6986
+ export class Resource$Users$Paireddevices {
6987
+ context: APIRequestContext;
6988
+ constructor(context: APIRequestContext) {
6989
+ this.context = context;
6990
+ }
6991
+
6992
+ /**
6993
+ * Returns user's Device.
6994
+ * @example
6995
+ * ```js
6996
+ * // Before running the sample:
6997
+ * // - Enable the API at:
6998
+ * // https://console.developers.google.com/apis/api/health.googleapis.com
6999
+ * // - Login into gcloud by running:
7000
+ * // ```sh
7001
+ * // $ gcloud auth application-default login
7002
+ * // ```
7003
+ * // - Install the npm module by running:
7004
+ * // ```sh
7005
+ * // $ npm install googleapis
7006
+ * // ```
7007
+ *
7008
+ * const {google} = require('googleapis');
7009
+ * const health = google.health('v4');
7010
+ *
7011
+ * async function main() {
7012
+ * const auth = new google.auth.GoogleAuth({
7013
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
7014
+ * scopes: ['https://www.googleapis.com/auth/googlehealth.settings.readonly'],
7015
+ * });
7016
+ *
7017
+ * // Acquire an auth client, and bind it to all future calls
7018
+ * const authClient = await auth.getClient();
7019
+ * google.options({auth: authClient});
7020
+ *
7021
+ * // Do the magic
7022
+ * const res = await health.users.pairedDevices.get({
7023
+ * // Required. The name of the device to retrieve. Format: users/{user\}/devices/{device\}
7024
+ * name: 'users/my-user/pairedDevices/my-pairedDevice',
7025
+ * });
7026
+ * console.log(res.data);
7027
+ *
7028
+ * // Example response
7029
+ * // {
7030
+ * // "batteryLevel": 0,
7031
+ * // "batteryStatus": "my_batteryStatus",
7032
+ * // "deviceType": "my_deviceType",
7033
+ * // "deviceVersion": "my_deviceVersion",
7034
+ * // "features": [],
7035
+ * // "lastSyncTime": "my_lastSyncTime",
7036
+ * // "macAddress": "my_macAddress",
7037
+ * // "name": "my_name"
7038
+ * // }
7039
+ * }
7040
+ *
7041
+ * main().catch(e => {
7042
+ * console.error(e);
7043
+ * throw e;
7044
+ * });
7045
+ *
7046
+ * ```
7047
+ *
7048
+ * @param params - Parameters for request
7049
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
7050
+ * @param callback - Optional callback that handles the response.
7051
+ * @returns A promise if used with async/await, or void if used with a callback.
7052
+ */
7053
+ get(
7054
+ params: Params$Resource$Users$Paireddevices$Get,
7055
+ options: StreamMethodOptions
7056
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
7057
+ get(
7058
+ params?: Params$Resource$Users$Paireddevices$Get,
7059
+ options?: MethodOptions
7060
+ ): Promise<GaxiosResponseWithHTTP2<Schema$PairedDevice>>;
7061
+ get(
7062
+ params: Params$Resource$Users$Paireddevices$Get,
7063
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
7064
+ callback: BodyResponseCallback<Readable>
7065
+ ): void;
7066
+ get(
7067
+ params: Params$Resource$Users$Paireddevices$Get,
7068
+ options: MethodOptions | BodyResponseCallback<Schema$PairedDevice>,
7069
+ callback: BodyResponseCallback<Schema$PairedDevice>
7070
+ ): void;
7071
+ get(
7072
+ params: Params$Resource$Users$Paireddevices$Get,
7073
+ callback: BodyResponseCallback<Schema$PairedDevice>
7074
+ ): void;
7075
+ get(callback: BodyResponseCallback<Schema$PairedDevice>): void;
7076
+ get(
7077
+ paramsOrCallback?:
7078
+ | Params$Resource$Users$Paireddevices$Get
7079
+ | BodyResponseCallback<Schema$PairedDevice>
7080
+ | BodyResponseCallback<Readable>,
7081
+ optionsOrCallback?:
7082
+ | MethodOptions
7083
+ | StreamMethodOptions
7084
+ | BodyResponseCallback<Schema$PairedDevice>
7085
+ | BodyResponseCallback<Readable>,
7086
+ callback?:
7087
+ | BodyResponseCallback<Schema$PairedDevice>
7088
+ | BodyResponseCallback<Readable>
7089
+ ):
7090
+ | void
7091
+ | Promise<GaxiosResponseWithHTTP2<Schema$PairedDevice>>
7092
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
7093
+ let params = (paramsOrCallback ||
7094
+ {}) as Params$Resource$Users$Paireddevices$Get;
7095
+ let options = (optionsOrCallback || {}) as MethodOptions;
7096
+
7097
+ if (typeof paramsOrCallback === 'function') {
7098
+ callback = paramsOrCallback;
7099
+ params = {} as Params$Resource$Users$Paireddevices$Get;
7100
+ options = {};
7101
+ }
7102
+
7103
+ if (typeof optionsOrCallback === 'function') {
7104
+ callback = optionsOrCallback;
7105
+ options = {};
7106
+ }
7107
+
7108
+ const rootUrl = options.rootUrl || 'https://health.googleapis.com/';
7109
+ const parameters = {
7110
+ options: Object.assign(
7111
+ {
7112
+ url: (rootUrl + '/v4/{+name}').replace(/([^:]\/)\/+/g, '$1'),
7113
+ method: 'GET',
7114
+ apiVersion: '',
7115
+ },
7116
+ options
7117
+ ),
7118
+ params,
7119
+ requiredParams: ['name'],
7120
+ pathParams: ['name'],
7121
+ context: this.context,
7122
+ };
7123
+ if (callback) {
7124
+ createAPIRequest<Schema$PairedDevice>(
7125
+ parameters,
7126
+ callback as BodyResponseCallback<unknown>
7127
+ );
7128
+ } else {
7129
+ return createAPIRequest<Schema$PairedDevice>(parameters);
7130
+ }
7131
+ }
7132
+
7133
+ /**
7134
+ * Returns the user's list of paired 1P trackers and smartwatches.
7135
+ * @example
7136
+ * ```js
7137
+ * // Before running the sample:
7138
+ * // - Enable the API at:
7139
+ * // https://console.developers.google.com/apis/api/health.googleapis.com
7140
+ * // - Login into gcloud by running:
7141
+ * // ```sh
7142
+ * // $ gcloud auth application-default login
7143
+ * // ```
7144
+ * // - Install the npm module by running:
7145
+ * // ```sh
7146
+ * // $ npm install googleapis
7147
+ * // ```
7148
+ *
7149
+ * const {google} = require('googleapis');
7150
+ * const health = google.health('v4');
7151
+ *
7152
+ * async function main() {
7153
+ * const auth = new google.auth.GoogleAuth({
7154
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
7155
+ * scopes: ['https://www.googleapis.com/auth/googlehealth.settings.readonly'],
7156
+ * });
7157
+ *
7158
+ * // Acquire an auth client, and bind it to all future calls
7159
+ * const authClient = await auth.getClient();
7160
+ * google.options({auth: authClient});
7161
+ *
7162
+ * // Do the magic
7163
+ * const res = await health.users.pairedDevices.list({
7164
+ * // 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.
7165
+ * pageSize: 'placeholder-value',
7166
+ * // 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.
7167
+ * pageToken: 'placeholder-value',
7168
+ * // Required. The parent, which owns this collection of devices. Format: users/{user\}
7169
+ * parent: 'users/my-user',
7170
+ * });
7171
+ * console.log(res.data);
7172
+ *
7173
+ * // Example response
7174
+ * // {
7175
+ * // "nextPageToken": "my_nextPageToken",
7176
+ * // "pairedDevices": []
7177
+ * // }
7178
+ * }
7179
+ *
7180
+ * main().catch(e => {
7181
+ * console.error(e);
7182
+ * throw e;
7183
+ * });
7184
+ *
7185
+ * ```
7186
+ *
7187
+ * @param params - Parameters for request
7188
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
7189
+ * @param callback - Optional callback that handles the response.
7190
+ * @returns A promise if used with async/await, or void if used with a callback.
7191
+ */
7192
+ list(
7193
+ params: Params$Resource$Users$Paireddevices$List,
7194
+ options: StreamMethodOptions
7195
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
7196
+ list(
7197
+ params?: Params$Resource$Users$Paireddevices$List,
7198
+ options?: MethodOptions
7199
+ ): Promise<GaxiosResponseWithHTTP2<Schema$ListPairedDevicesResponse>>;
7200
+ list(
7201
+ params: Params$Resource$Users$Paireddevices$List,
7202
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
7203
+ callback: BodyResponseCallback<Readable>
7204
+ ): void;
7205
+ list(
7206
+ params: Params$Resource$Users$Paireddevices$List,
7207
+ options:
7208
+ | MethodOptions
7209
+ | BodyResponseCallback<Schema$ListPairedDevicesResponse>,
7210
+ callback: BodyResponseCallback<Schema$ListPairedDevicesResponse>
7211
+ ): void;
7212
+ list(
7213
+ params: Params$Resource$Users$Paireddevices$List,
7214
+ callback: BodyResponseCallback<Schema$ListPairedDevicesResponse>
7215
+ ): void;
7216
+ list(
7217
+ callback: BodyResponseCallback<Schema$ListPairedDevicesResponse>
7218
+ ): void;
7219
+ list(
7220
+ paramsOrCallback?:
7221
+ | Params$Resource$Users$Paireddevices$List
7222
+ | BodyResponseCallback<Schema$ListPairedDevicesResponse>
7223
+ | BodyResponseCallback<Readable>,
7224
+ optionsOrCallback?:
7225
+ | MethodOptions
7226
+ | StreamMethodOptions
7227
+ | BodyResponseCallback<Schema$ListPairedDevicesResponse>
7228
+ | BodyResponseCallback<Readable>,
7229
+ callback?:
7230
+ | BodyResponseCallback<Schema$ListPairedDevicesResponse>
7231
+ | BodyResponseCallback<Readable>
7232
+ ):
7233
+ | void
7234
+ | Promise<GaxiosResponseWithHTTP2<Schema$ListPairedDevicesResponse>>
7235
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
7236
+ let params = (paramsOrCallback ||
7237
+ {}) as Params$Resource$Users$Paireddevices$List;
7238
+ let options = (optionsOrCallback || {}) as MethodOptions;
7239
+
7240
+ if (typeof paramsOrCallback === 'function') {
7241
+ callback = paramsOrCallback;
7242
+ params = {} as Params$Resource$Users$Paireddevices$List;
7243
+ options = {};
7244
+ }
7245
+
7246
+ if (typeof optionsOrCallback === 'function') {
7247
+ callback = optionsOrCallback;
7248
+ options = {};
7249
+ }
7250
+
7251
+ const rootUrl = options.rootUrl || 'https://health.googleapis.com/';
7252
+ const parameters = {
7253
+ options: Object.assign(
7254
+ {
7255
+ url: (rootUrl + '/v4/{+parent}/pairedDevices').replace(
7256
+ /([^:]\/)\/+/g,
7257
+ '$1'
7258
+ ),
7259
+ method: 'GET',
7260
+ apiVersion: '',
7261
+ },
7262
+ options
7263
+ ),
7264
+ params,
7265
+ requiredParams: ['parent'],
7266
+ pathParams: ['parent'],
7267
+ context: this.context,
7268
+ };
7269
+ if (callback) {
7270
+ createAPIRequest<Schema$ListPairedDevicesResponse>(
7271
+ parameters,
7272
+ callback as BodyResponseCallback<unknown>
7273
+ );
7274
+ } else {
7275
+ return createAPIRequest<Schema$ListPairedDevicesResponse>(parameters);
7276
+ }
7277
+ }
7278
+ }
7279
+
7280
+ export interface Params$Resource$Users$Paireddevices$Get extends StandardParameters {
7281
+ /**
7282
+ * Required. The name of the device to retrieve. Format: users/{user\}/devices/{device\}
7283
+ */
7284
+ name?: string;
7285
+ }
7286
+ export interface Params$Resource$Users$Paireddevices$List extends StandardParameters {
7287
+ /**
7288
+ * 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.
7289
+ */
7290
+ pageSize?: number;
7291
+ /**
7292
+ * 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.
7293
+ */
7294
+ pageToken?: string;
7295
+ /**
7296
+ * Required. The parent, which owns this collection of devices. Format: users/{user\}
7297
+ */
7298
+ parent?: string;
7299
+ }
5424
7300
  }