googleapis
Version:
Google APIs Client Library for Node.js
1,139 lines • 277 kB
TypeScript
import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosResponseWithHTTP2, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
import { Readable } from 'stream';
export declare namespace health_v4 {
export interface Options extends GlobalOptions {
version: 'v4';
}
interface StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient | BaseExternalAccountClient | GoogleAuth;
/**
* V1 error format.
*/
'$.xgafv'?: string;
/**
* OAuth access token.
*/
access_token?: string;
/**
* Data format for response.
*/
alt?: string;
/**
* JSONP
*/
callback?: string;
/**
* Selector specifying which fields to include in a partial response.
*/
fields?: string;
/**
* API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
*/
key?: string;
/**
* OAuth 2.0 token for the current user.
*/
oauth_token?: string;
/**
* Returns response with indentations and line breaks.
*/
prettyPrint?: boolean;
/**
* Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
*/
quotaUser?: string;
/**
* Legacy upload protocol for media (e.g. "media", "multipart").
*/
uploadType?: string;
/**
* Upload protocol for media (e.g. "raw", "multipart").
*/
upload_protocol?: string;
}
/**
* Google Health API
*
* The Google Health API lets you view and manage health and fitness metrics and measurement data.
*
* @example
* ```js
* const {google} = require('googleapis');
* const health = google.health('v4');
* ```
*/
export class Health {
context: APIRequestContext;
projects: Resource$Projects;
shl: Resource$Shl;
users: Resource$Users;
constructor(options: GlobalOptions, google?: GoogleConfigurable);
}
/**
* Energy burned as part of an activity, excluding the basal energy burn.
*/
export interface Schema$ActiveEnergyBurned {
/**
* Required. Observed interval
*/
interval?: Schema$ObservationTimeInterval;
/**
* Required. Energy burned during an activity, measured in kilocalories.
*/
kcal?: number | null;
}
/**
* Represents the result of the rollup of active energy burned.
*/
export interface Schema$ActiveEnergyBurnedRollupValue {
/**
* Output only. Sum of the active energy burned in kilocalories.
*/
kcalSum?: number | null;
}
/**
* Record of active minutes in a given time interval.
*/
export interface Schema$ActiveMinutes {
/**
* Required. Active minutes by activity level. At most one record per activity level is allowed.
*/
activeMinutesByActivityLevel?: Schema$ActiveMinutesByActivityLevel[];
/**
* Required. Observed interval.
*/
interval?: Schema$ObservationTimeInterval;
}
/**
* Active minutes at a given activity level.
*/
export interface Schema$ActiveMinutesByActivityLevel {
/**
* Required. Number of whole minutes spent in activity.
*/
activeMinutes?: string | null;
/**
* Required. The level of activity.
*/
activityLevel?: string | null;
}
/**
* Active minutes by activity level.
*/
export interface Schema$ActiveMinutesRollupByActivityLevel {
/**
* Number of whole minutes spent in activity.
*/
activeMinutesSum?: string | null;
/**
* The level of activity.
*/
activityLevel?: string | null;
}
/**
* Represents the result of the rollup of the active minutes data type.
*/
export interface Schema$ActiveMinutesRollupValue {
/**
* Active minutes by activity level. At most one record per activity level is allowed.
*/
activeMinutesRollupByActivityLevel?: Schema$ActiveMinutesRollupByActivityLevel[];
}
/**
* Record of active zone minutes in a given time interval.
*/
export interface Schema$ActiveZoneMinutes {
/**
* Required. Number of Active Zone Minutes earned in the given time interval. Note: active_zone_minutes equals to 1 for low intensity (fat burn) zones or 2 for high intensity zones (cardio, peak).
*/
activeZoneMinutes?: string | null;
/**
* Required. Heart rate zone in which the active zone minutes have been earned, in the given time interval.
*/
heartRateZone?: string | null;
/**
* Required. Observed interval.
*/
interval?: Schema$ObservationTimeInterval;
}
/**
* Represents the result of the rollup of the active zone minutes data type.
*/
export interface Schema$ActiveZoneMinutesRollupValue {
/**
* Active zone minutes in `HeartRateZone.CARDIO`.
*/
sumInCardioHeartZone?: string | null;
/**
* Active zone minutes in `HeartRateZone.FAT_BURN`.
*/
sumInFatBurnHeartZone?: string | null;
/**
* Active zone minutes in `HeartRateZone.PEAK`.
*/
sumInPeakHeartZone?: string | null;
}
/**
* Internal type to capture activity level during a certain time interval.
*/
export interface Schema$ActivityLevel {
/**
* Required. Activity level type in the given time interval.
*/
activityLevelType?: string | null;
/**
* Required. Observed interval.
*/
interval?: Schema$ObservationTimeInterval;
}
/**
* Represents the total duration in a specific activity level type.
*/
export interface Schema$ActivityLevelRollupByActivityLevelType {
/**
* Activity level type.
*/
activityLevelType?: string | null;
/**
* Total duration in the activity level type.
*/
totalDuration?: string | null;
}
/**
* Represents the result of the rollup of the activity level data type.
*/
export interface Schema$ActivityLevelRollupValue {
/**
* List of total durations in each activity level type.
*/
activityLevelRollupsByActivityLevelType?: Schema$ActivityLevelRollupByActivityLevelType[];
}
/**
* 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).
*/
export interface Schema$AlertWindow {
/**
* Output only. Observed interval end time in civil time in the timezone the subject is in at the end of the observed interval
*/
civilEndTime?: Schema$CivilDateTime;
/**
* Output only. Observed interval start time in civil time in the timezone the subject is in at the start of the observed interval
*/
civilStartTime?: Schema$CivilDateTime;
/**
* Required. The end time of the analysis window.
*/
endTime?: string | null;
/**
* Required. The UTC offset of the user's timezone when the analysis window ended.
*/
endUtcOffset?: string | null;
/**
* Optional. All heart beats in the interval contained in this analysis window.
*/
heartBeats?: Schema$HeartBeat[];
/**
* 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.
*/
positive?: boolean | null;
/**
* Required. Observed interval. The start time of the analysis window.
*/
startTime?: string | null;
/**
* Required. The UTC offset of the user's timezone when the analysis window started.
*/
startUtcOffset?: string | null;
}
/**
* Captures the altitude gain (i.e. deltas), and not level above sea, for a user in millimeters.
*/
export interface Schema$Altitude {
/**
* Required. Altitude gain in millimeters over the observed interval.
*/
gainMillimeters?: string | null;
/**
* Required. Observed interval.
*/
interval?: Schema$ObservationTimeInterval;
}
/**
* Represents the result of the rollup of the user's altitude.
*/
export interface Schema$AltitudeRollupValue {
/**
* Sum of the altitude gain in millimeters.
*/
gainMillimetersSum?: string | null;
}
/**
* Optional metadata for the application that provided this data.
*/
export interface Schema$Application {
/**
* Output only. The Google OAuth 2.0 client ID of the web application or service that recorded the data. This is the client ID used during the Google OAuth flow to obtain user credentials. This field is system-populated when the data is uploaded from Google Web API.
*/
googleWebClientId?: string | null;
/**
* Output only. A unique identifier for the mobile application that was the source of the data. This is typically the application's package name on Android (e.g., `com.google.fitbit`) or the bundle ID on iOS. This field is informational and helps trace data origin. This field is system-populated when the data is uploaded from the Fitbit mobile application, Health Connect or Health Kit.
*/
packageName?: string | null;
/**
* Output only. The client ID of the application that recorded the data. This ID is a legacy Fitbit API client ID, which is different from a Google OAuth client ID. Example format: `ABC123`. This field is system-populated and used for tracing data from legacy Fitbit API integrations. This field is system-populated when the data is uploaded from a legacy Fitbit API integration.
*/
webClientId?: string | null;
}
/**
* Number of calories burned due to basal metabolic rate (BMR) over a period of time.
*/
export interface Schema$BasalEnergyBurned {
/**
* Required. Observed interval.
*/
interval?: Schema$ObservationTimeInterval;
/**
* Required. Number of calories burned due to basal metabolic rate in kilocalories over the observed interval.
*/
kcal?: number | null;
}
/**
* Request to delete a batch of identifiable data points.
*/
export interface Schema$BatchDeleteDataPointsRequest {
/**
* Required. The names of the DataPoints to delete. A maximum of 10000 data points can be deleted in a single request.
*/
names?: string[] | null;
}
/**
* Represents a blood glucose level measurement. LINT: LEGACY_NAMES
*/
export interface Schema$BloodGlucose {
/**
* Required. Blood glucose level concentration in mg/dL.
*/
bloodGlucoseMilligramsPerDeciliter?: number | null;
/**
* Optional. Meal type of the measurement.
*/
mealType?: string | null;
/**
* Optional. Source of the measurement.
*/
measurementSource?: string | null;
/**
* Optional. Timing of the measurement.
*/
measurementTiming?: string | null;
/**
* Optional. Standard free-form notes captured at manual logging.
*/
notes?: string | null;
/**
* Required. The time at which blood glucose was measured.
*/
sampleTime?: Schema$ObservationSampleTime;
/**
* Optional. Type of body fluid used to measure the blood glucose.
*/
specimen?: string | null;
}
/**
* Represents the result of the rollup of the blood glucose data type. LINT: LEGACY_NAMES
*/
export interface Schema$BloodGlucoseRollupValue {
/**
* Average blood glucose level in mg/dL.
*/
bloodGlucoseMilligramsPerDeciliterAvg?: number | null;
}
/**
* Body fat measurement.
*/
export interface Schema$BodyFat {
/**
* Required. Body fat percentage, in range [0, 100].
*/
percentage?: number | null;
/**
* Required. The time at which body fat was measured.
*/
sampleTime?: Schema$ObservationSampleTime;
}
/**
* Represents the result of the rollup of the body fat data type.
*/
export interface Schema$BodyFatRollupValue {
/**
* Average body fat percentage.
*/
bodyFatPercentageAvg?: number | null;
}
/**
* Represents the result of the rollup of the calories in heart rate zone data type.
*/
export interface Schema$CaloriesInHeartRateZoneRollupValue {
/**
* List of calories burned in each heart rate zone.
*/
caloriesInHeartRateZones?: Schema$CaloriesInHeartRateZoneValue[];
}
/**
* Represents the amount of kilocalories burned in a specific heart rate zone.
*/
export interface Schema$CaloriesInHeartRateZoneValue {
/**
* The heart rate zone.
*/
heartRateZone?: string | null;
/**
* The amount of kilocalories burned in the specified heart rate zone.
*/
kcal?: number | null;
}
/**
* Civil time representation similar to google.type.DateTime, but ensures that neither the timezone nor the UTC offset can be set to avoid confusion between civil and physical time queries.
*/
export interface Schema$CivilDateTime {
/**
* Required. Calendar date.
*/
date?: Schema$Date;
/**
* Optional. Time of day. Defaults to the start of the day, at midnight if omitted.
*/
time?: Schema$TimeOfDay;
}
/**
* Counterpart of google.type.Interval, but using CivilDateTime.
*/
export interface Schema$CivilTimeInterval {
/**
* Required. The exclusive end of the range.
*/
end?: Schema$CivilDateTime;
/**
* Required. The inclusive start of the range.
*/
start?: Schema$CivilDateTime;
}
/**
* Core body temperature measurement, distinct from peripheral body temperature, reflects the temperature of the body's internal organs.
*/
export interface Schema$CoreBodyTemperature {
/**
* Optional. The unique identifier of the core body temperature measurement.
*/
id?: string | null;
/**
* Optional. The location of the core body temperature measurement.
*/
measurementLocation?: string | null;
/**
* Required. The time at which core body temperature was measured.
*/
sampleTime?: Schema$ObservationSampleTime;
/**
* Required. The core body temperature in Celsius.
*/
temperatureCelsius?: number | null;
}
/**
* Represents the result of the rollup of the core body temperature data type.
*/
export interface Schema$CoreBodyTemperatureRollupValue {
/**
* Average core body temperature in Celsius.
*/
temperatureCelsiusAvg?: number | null;
/**
* Maximum core body temperature in Celsius.
*/
temperatureCelsiusMax?: number | null;
/**
* Minimum core body temperature in Celsius.
*/
temperatureCelsiusMin?: number | null;
}
/**
* Payload for creating a subscriber.
*/
export interface Schema$CreateSubscriberPayload {
/**
* Required. Authorization mechanism for the subscriber endpoint. The `secret` within this message is crucial for endpoint verification and for securing webhook notifications.
*/
endpointAuthorization?: Schema$EndpointAuthorization;
/**
* Required. The full HTTPS URI where update notifications will be sent. The URI must be a valid URL and use HTTPS as the scheme. This endpoint will be verified during the `CreateSubscriber` call. See CreateSubscriber RPC documentation for verification details.
*/
endpointUri?: string | null;
/**
* Optional. Configuration for the subscriber.
*/
subscriberConfigs?: Schema$SubscriberConfig[];
}
/**
* Payload for creating a subscription.
*/
export interface Schema$CreateSubscriptionPayload {
/**
* Optional. Data types subscribed to.
*/
dataTypes?: string[] | null;
/**
* 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`).
*/
user?: string | null;
}
/**
* 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`
*/
export interface Schema$DailyHeartRateVariability {
/**
* Optional. A user's average heart rate variability calculated using the root mean square of successive differences (RMSSD) in times between heartbeats.
*/
averageHeartRateVariabilityMilliseconds?: number | null;
/**
* Required. Date (in the user's timezone) of heart rate variability measurement.
*/
date?: Schema$Date;
/**
* Optional. The root mean square of successive differences (RMSSD) value during deep sleep.
*/
deepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds?: number | null;
/**
* Optional. The Shanon entropy of heartbeat intervals. Entropy quantifies randomness or disorder in a system. High entropy indicates high HRV. Entropy is measured from the histogram of time interval between successive heart beats values measured during sleep.
*/
entropy?: number | null;
/**
* Optional. Non-REM heart rate
*/
nonRemHeartRateBeatsPerMinute?: string | null;
}
/**
* User's heart rate zone thresholds based on the Karvonen algorithm for a specific day.
*/
export interface Schema$DailyHeartRateZones {
/**
* Required. Date (in user's timezone) of the heart rate zones record.
*/
date?: Schema$Date;
/**
* Required. The heart rate zones.
*/
heartRateZones?: Schema$HeartRateZone[];
}
/**
* A daily oxygen saturation (SpO2) record. Represents the user's daily oxygen saturation summary, typically calculated during sleep.
*/
export interface Schema$DailyOxygenSaturation {
/**
* Required. The average value of the oxygen saturation samples during the sleep.
*/
averagePercentage?: number | null;
/**
* Required. Date (in user's timezone) of the daily oxygen saturation record.
*/
date?: Schema$Date;
/**
* Required. The lower bound of the confidence interval of oxygen saturation samples during sleep.
*/
lowerBoundPercentage?: number | null;
/**
* Optional. Standard deviation of the daily oxygen saturation averages from the past 7-30 days.
*/
standardDeviationPercentage?: number | null;
/**
* Required. The upper bound of the confidence interval of oxygen saturation samples during sleep.
*/
upperBoundPercentage?: number | null;
}
/**
* A daily average respiratory rate (breaths per minute) for a day of the year. One data point per day calculated for the main sleep.
*/
export interface Schema$DailyRespiratoryRate {
/**
* Required. The average number of breaths taken per minute.
*/
breathsPerMinute?: number | null;
/**
* Required. The date on which the respiratory rate was measured.
*/
date?: Schema$Date;
}
/**
* Measures the daily resting heart rate for a user, calculated using the all day heart rate measurements.
*/
export interface Schema$DailyRestingHeartRate {
/**
* Required. The resting heart rate value in beats per minute.
*/
beatsPerMinute?: string | null;
/**
* Optional. Metadata for the daily resting heart rate.
*/
dailyRestingHeartRateMetadata?: Schema$DailyRestingHeartRateMetadata;
/**
* Required. Date (in the user's timezone) of the resting heart rate measurement.
*/
date?: Schema$Date;
}
/**
* Metadata for the daily resting heart rate.
*/
export interface Schema$DailyRestingHeartRateMetadata {
/**
* Required. The method used to calculate the resting heart rate.
*/
calculationMethod?: string | null;
}
/**
* 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.
*/
export interface Schema$DailyRollupDataPoint {
/**
* Returned by default when rolling up data points from the `active-energy-burned` data type.
*/
activeEnergyBurned?: Schema$ActiveEnergyBurnedRollupValue;
/**
* 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.
*/
activeMinutes?: Schema$ActiveMinutesRollupValue;
/**
* Returned by default when rolling up data points from the `active-zone-minutes` data type, or when requested explicitly using the `active-zone-minutes` rollup type identifier.
*/
activeZoneMinutes?: Schema$ActiveZoneMinutesRollupValue;
/**
* Returned by default when rolling up data points from the `activity-level` data type, or when requested explicitly using the `activity-level` rollup type identifier.
*/
activityLevel?: Schema$ActivityLevelRollupValue;
/**
* Returned by default when rolling up data points from the `altitude` data type, or when requested explicitly using the `altitude` rollup type identifier.
*/
altitude?: Schema$AltitudeRollupValue;
/**
* Returned by default when rolling up data points from the `blood-glucose` data type.
*/
bloodGlucose?: Schema$BloodGlucoseRollupValue;
/**
* 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.
*/
bodyFat?: Schema$BodyFatRollupValue;
/**
* 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.
*/
caloriesInHeartRateZone?: Schema$CaloriesInHeartRateZoneRollupValue;
/**
* End time of the window this value aggregates over
*/
civilEndTime?: Schema$CivilDateTime;
/**
* Start time of the window this value aggregates over
*/
civilStartTime?: Schema$CivilDateTime;
/**
* 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.
*/
coreBodyTemperature?: Schema$CoreBodyTemperatureRollupValue;
/**
* Returned by default when rolling up data points from the `distance` data type, or when requested explicitly using the `distance` rollup type identifier.
*/
distance?: Schema$DistanceRollupValue;
/**
* Returned by default when rolling up data points from the `floors` data type, or when requested explicitly using the `floors` rollup type identifier.
*/
floors?: Schema$FloorsRollupValue;
/**
* Returned by default when rolling up data points from the `heart-rate` data type, or when requested explicitly using the `heart-rate` rollup type identifier.
*/
heartRate?: Schema$HeartRateRollupValue;
/**
* Returned by default when rolling up data points from the `daily-heart-rate-variability` data type, or when requested explicitly using the `heart-rate-variability-personal-range` rollup type identifier.
*/
heartRateVariabilityPersonalRange?: Schema$HeartRateVariabilityPersonalRangeRollupValue;
/**
* 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.
*/
hydrationLog?: Schema$HydrationLogRollupValue;
/**
* 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.
*/
nutritionLog?: Schema$NutritionLogRollupValue;
/**
* 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.
*/
restingHeartRatePersonalRange?: Schema$RestingHeartRatePersonalRangeRollupValue;
/**
* 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.
*/
runVo2Max?: Schema$RunVO2MaxRollupValue;
/**
* Returned by default when rolling up data points from the `sedentary-period` data type, or when requested explicitly using the `sedentary-period` rollup type identifier.
*/
sedentaryPeriod?: Schema$SedentaryPeriodRollupValue;
/**
* Returned by default when rolling up data points from the `steps` data type, or when requested explicitly using the `steps` rollup type identifier.
*/
steps?: Schema$StepsRollupValue;
/**
* Returned by default when rolling up data points from the `swim-lengths-data` data type, or when requested explicitly using the `swim-lengths-data` rollup type identifier.
*/
swimLengthsData?: Schema$SwimLengthsDataRollupValue;
/**
* Returned by default when rolling up data points from the `time-in-heart-rate-zone` data type, or when requested explicitly using the `time-in-heart-rate-zone` rollup type identifier.
*/
timeInHeartRateZone?: Schema$TimeInHeartRateZoneRollupValue;
/**
* Returned by default when rolling up data points from the `total-calories` data type, or when requested explicitly using the `total-calories` rollup type identifier.
*/
totalCalories?: Schema$TotalCaloriesRollupValue;
/**
* Returned by default when rolling up data points from the `weight` data type, or when requested explicitly using the `weight` rollup type identifier.
*/
weight?: Schema$WeightRollupValue;
}
/**
* Request to roll up data points by civil time intervals.
*/
export interface Schema$DailyRollUpDataPointsRequest {
/**
* Optional. The data source family name to roll up. If empty, data points from all available data sources will be rolled up. Format: `users/me/dataSourceFamilies/{data_source_family\}` The supported values are: - `users/me/dataSourceFamilies/all-sources` - default value - `users/me/dataSourceFamilies/google-wearables` - tracker devices - `users/me/dataSourceFamilies/google-sources` - Google first party sources
*/
dataSourceFamily?: string | null;
/**
* 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.
*/
pageSize?: number | null;
/**
* Optional. The `next_page_token` from a previous request, if any. All other request fields need to be the same as in the initial request when the page token is specified.
*/
pageToken?: string | null;
/**
* Required. Closed-open range of data points that will be rolled up. The start time must be aligned with the aggregation window. The maximum range for `calories-in-heart-rate-zone`, `heart-rate`, `active-minutes` and `total-calories` is 14 days. The maximum range for all other data types is 90 days.
*/
range?: Schema$CivilTimeInterval;
/**
* Optional. Aggregation window size, in number of days. Defaults to 1 if not specified.
*/
windowSizeDays?: number | null;
}
/**
* Response containing the list of rolled up data points.
*/
export interface Schema$DailyRollUpDataPointsResponse {
/**
* Values for each aggregation time window.
*/
rollupDataPoints?: Schema$DailyRollupDataPoint[];
}
/**
* Provides derived sleep temperature values, calculated from skin or internal device temperature readings during sleep.
*/
export interface Schema$DailySleepTemperatureDerivations {
/**
* Optional. The user's baseline skin temperature. It is the median of the user's nightly skin temperature over the past 30 days.
*/
baselineTemperatureCelsius?: number | null;
/**
* Required. Date for which the sleep temperature derivations are calculated.
*/
date?: Schema$Date;
/**
* Required. The user's nightly skin temperature. It is the mean of skin temperature samples taken from the user’s sleep.
*/
nightlyTemperatureCelsius?: number | null;
/**
* Optional. The standard deviation of the user’s relative nightly skin temperature (temperature - baseline) over the past 30 days.
*/
relativeNightlyStddev30dCelsius?: number | null;
}
/**
* Contains a daily summary of the user's VO2 max (cardio fitness score), which is the maximum rate of oxygen the body can use during exercise.
*/
export interface Schema$DailyVO2Max {
/**
* Optional. Represents the user's cardio fitness level based on their VO2 max.
*/
cardioFitnessLevel?: string | null;
/**
* Required. The date for which the Daily VO2 max was measured.
*/
date?: Schema$Date;
/**
* Optional. An estimated field is added to indicate when the confidence has decreased sufficiently to consider the value an estimation.
*/
estimated?: boolean | null;
/**
* Required. Daily VO2 max value measured as in ml consumed oxygen / kg of body weight / min.
*/
vo2Max?: number | null;
/**
* Optional. The covariance of the VO2 max value.
*/
vo2MaxCovariance?: number | null;
}
/**
* A computed or recorded metric.
*/
export interface Schema$DataPoint {
/**
* Optional. Data for points in the `active-energy-burned` interval data type collection.
*/
activeEnergyBurned?: Schema$ActiveEnergyBurned;
/**
* Optional. Data for points in the `active-minutes` interval data type collection.
*/
activeMinutes?: Schema$ActiveMinutes;
/**
* Optional. Data for points in the `active-zone-minutes` interval data type collection, measured in minutes.
*/
activeZoneMinutes?: Schema$ActiveZoneMinutes;
/**
* Optional. Data for points in the `activity-level` daily data type collection.
*/
activityLevel?: Schema$ActivityLevel;
/**
* Optional. Data for points in the `altitude` interval data type collection.
*/
altitude?: Schema$Altitude;
/**
* Optional. Data for points in the `basal-energy-burned` interval data type collection.
*/
basalEnergyBurned?: Schema$BasalEnergyBurned;
/**
* Optional. Data for points in the `blood-glucose` sample data type collection.
*/
bloodGlucose?: Schema$BloodGlucose;
/**
* Optional. Data for points in the `body-fat` sample data type collection.
*/
bodyFat?: Schema$BodyFat;
/**
* Optional. Data for points in the `core-body-temperature` sample data type collection.
*/
coreBodyTemperature?: Schema$CoreBodyTemperature;
/**
* Optional. Data for points in the `daily-heart-rate-variability` daily data type collection.
*/
dailyHeartRateVariability?: Schema$DailyHeartRateVariability;
/**
* Optional. Data for points in the `daily-heart-rate-zones` daily data type collection.
*/
dailyHeartRateZones?: Schema$DailyHeartRateZones;
/**
* Optional. Data for points in the `daily-oxygen-saturation` daily data type collection.
*/
dailyOxygenSaturation?: Schema$DailyOxygenSaturation;
/**
* Optional. Data for points in the `daily-respiratory-rate` daily data type collection.
*/
dailyRespiratoryRate?: Schema$DailyRespiratoryRate;
/**
* Optional. Data for points in the `daily-resting-heart-rate` daily data type collection.
*/
dailyRestingHeartRate?: Schema$DailyRestingHeartRate;
/**
* Optional. Data for points in the `daily-sleep-temperature-derivations` daily data type collection.
*/
dailySleepTemperatureDerivations?: Schema$DailySleepTemperatureDerivations;
/**
* Optional. Data for points in the `daily-vo2-max` daily data type collection.
*/
dailyVo2Max?: Schema$DailyVO2Max;
/**
* Optional. Data source information for the metric
*/
dataSource?: Schema$DataSource;
/**
* Optional. Data for points in the `distance` interval data type collection.
*/
distance?: Schema$Distance;
/**
* Optional. Data for points in the `electrocardiogram` session data type collection.
*/
electrocardiogram?: Schema$Electrocardiogram;
/**
* Optional. Data for points in the `exercise` session data type collection.
*/
exercise?: Schema$Exercise;
/**
* Optional. Data for points in the `floors` interval data type collection.
*/
floors?: Schema$Floors;
/**
* Optional. The food details.
*/
food?: Schema$Food;
/**
* Optional. The food measurement unit details.
*/
foodMeasurementUnit?: Schema$FoodMeasurementUnit;
/**
* Optional. Data for points in the `heart-rate` sample data type collection.
*/
heartRate?: Schema$HeartRate;
/**
* Optional. Data for points in the `heart-rate-variability` sample data type collection.
*/
heartRateVariability?: Schema$HeartRateVariability;
/**
* Optional. Data for points in the `height` sample data type collection.
*/
height?: Schema$Height;
/**
* Optional. Data for points in the `hydration-log` session data type collection.
*/
hydrationLog?: Schema$HydrationLog;
/**
* Optional. Data for points in the `irregular-rhythm-notification` session data type collection.
*/
irregularRhythmNotification?: Schema$IrregularRhythmNotification;
/**
* Identifier. Data point name, only supported for the subset of identifiable data types. For the majority of the data types, individual data points do not need to be identified and this field would be empty. Format: `users/{user\}/dataTypes/{data_type\}/dataPoints/{data_point\}` Example: `users/abcd1234/dataTypes/sleep/dataPoints/a1b2c3d4-e5f6-7890-1234-567890abcdef` The `{user\}` ID is a system-generated identifier, as described in Identity.health_user_id. The `{data_type\}` ID corresponds to the kebab-case version of the field names in the DataPoint data union field, e.g. `heart-rate` for the `heart_rate` field. The `{data_point\}` ID can be client-provided or system-generated. If client-provided, it must be a string of 4-63 characters, containing only lowercase letters, numbers, and hyphens.
*/
name?: string | null;
/**
* Optional. Data for points in the `nutrition-log` session data type collection.
*/
nutritionLog?: Schema$NutritionLog;
/**
* Optional. Data for points in the `oxygen-saturation` sample data type collection.
*/
oxygenSaturation?: Schema$OxygenSaturation;
/**
* Optional. Data for points in the `respiratory-rate-sleep-summary` sample data type collection.
*/
respiratoryRateSleepSummary?: Schema$RespiratoryRateSleepSummary;
/**
* Optional. Data for points in the `run-vo2-max` sample data type collection.
*/
runVo2Max?: Schema$RunVO2Max;
/**
* Optional. Data for points in the `sedentary-period` interval data type collection.
*/
sedentaryPeriod?: Schema$SedentaryPeriod;
/**
* Optional. Data for points in the `sleep` session data type collection.
*/
sleep?: Schema$Sleep;
/**
* Optional. Data for points in the `steps` interval data type collection.
*/
steps?: Schema$Steps;
/**
* Optional. Data for points in the `swim-lengths-data` interval data type collection.
*/
swimLengthsData?: Schema$SwimLengthsData;
/**
* Optional. Data for points in the `time-in-heart-rate-zone` interval data type collection.
*/
timeInHeartRateZone?: Schema$TimeInHeartRateZone;
/**
* Optional. Data for points in the `vo2-max` sample data type collection.
*/
vo2Max?: Schema$VO2Max;
/**
* Optional. Data for points in the `weight` sample data type collection.
*/
weight?: Schema$Weight;
}
/**
* Data Source definition to track the origin of data. Each health data point, regardless of the complexity or data model (whether a simple step count or a detailed sleep session) must retain information about its source of origin (e.g. the device or app that collected it).
*/
export interface Schema$DataSource {
/**
* Output only. Captures metadata for the application that provided this data.
*/
application?: Schema$Application;
/**
* Optional. Captures metadata for raw data points originating from devices. We expect this data source to be used for data points written on device sync.
*/
device?: Schema$Device;
/**
* Output only. Captures the platform that uploaded the data.
*/
platform?: string | null;
/**
* Optional. Captures how the data was recorded.
*/
recordingMethod?: string | null;
}
/**
* Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
*/
export interface Schema$Date {
/**
* Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
*/
day?: number | null;
/**
* Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
*/
month?: number | null;
/**
* Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
*/
year?: number | null;
}
/**
* Represents civil time (or occasionally physical time). This type can represent a civil time in one of a few possible ways: * When utc_offset is set and time_zone is unset: a civil time on a calendar day with a particular offset from UTC. * When time_zone is set and utc_offset is unset: a civil time on a calendar day in a particular time zone. * When neither time_zone nor utc_offset is set: a civil time on a calendar day in local time. The date is relative to the Proleptic Gregorian Calendar. If year, month, or day are 0, the DateTime is considered not to have a specific year, month, or day respectively. This type may also be used to represent a physical time if all the date and time fields are set and either case of the `time_offset` oneof is set. Consider using `Timestamp` message for physical time instead. If your use case also would like to store the user's timezone, that can be done in another field. This type is more flexible than some applications may want. Make sure to document and validate your application's limitations.
*/
export interface Schema$DateTime {
/**
* Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.
*/
day?: number | null;
/**
* Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value "24:00:00" for scenarios like business closing time.
*/
hours?: number | null;
/**
* Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.
*/
minutes?: number | null;
/**
* Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.
*/
month?: number | null;
/**
* Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.
*/
nanos?: number | null;
/**
* Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.
*/
seconds?: number | null;
/**
* Time zone.
*/
timeZone?: Schema$TimeZone;
/**
* UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 \}.
*/
utcOffset?: string | null;
/**
* Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.
*/
year?: number | null;
}
/**
* Captures metadata about the device that recorded the measurement.
*/
export interface Schema$Device {
/**
* Optional. An optional name for the device.
*/
displayName?: string | null;
/**
* Optional. Captures the form factor of the device.
*/
formFactor?: string | null;
/**
* Optional. An optional manufacturer of the device.
*/
manufacturer?: string | null;
}
/**
* Distance traveled over an interval of time.
*/
export interface Schema$Distance {
/**
* Required. Observed interval.
*/
interval?: Schema$ObservationTimeInterval;
/**
* Required. Distance in millimeters over the observed interval.
*/
millimeters?: string | null;
}
/**
* Result of the rollup of the user's distance.
*/
export interface Schema$DistanceRollupValue {
/**
* Sum of the distance in millimeters.
*/
millimetersSum?: string | null;
}
/**
* Represents an Electrocardiogram (ECG) measurement session. This data type is based on SaMD feature and any changes to it may require additional review.
*/
export interface Schema$Electrocardiogram {
/**
* Optional. Average heart rate recorded during ECG reading in beats per minute.
*/
beatsPerMinuteAvg?: string | null;
/**
* 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.
*/
interval?: Schema$SessionTimeInterval;
/**
* Optional. The number of leads used for ECG reading.
*/
leadNumber?: number | null;
/**
* 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`.
*/
medicalDeviceInfo?: Schema$MedicalDeviceInfo;
/**
* Optional. The factor by which to divide waveform samples to get voltage in millivolts: millivolts = waveform_sample / millivolts_scaling_factor.
*/
millivoltsScalingFactor?: number | null;
/**
* Optional. The result classification of the ECG reading.
*/
resultClassification?: string | null;
/**
* Optional. The sampling frequency of waveform samples in hertz.
*/
samplingFrequencyHertz?: number | null;
/**
* 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.
*/
waveformSamples?: number[] | null;
}
/**
* 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); \}
*/
export interface Schema$Empty {
}
/**
* Authorization mechanism for a subscriber endpoint. For all requests sent by the Webhooks service, the JSON payload is cryptographically signed. The signature is delivered in the `GOOGLE-HEALTH-API-SIGNATURE` HTTP header. This is an ECDSA (NIST P256) signature of the JSON payload. Clients must verify this signature using Google Health API's public key to confirm the payload was sent by the Health API.
*/
export interface Schema$EndpointAuthorization {
/**
* Required. Input only. Provides a client-provided secret that will be sent with each notification to the subscriber endpoint using the "Authorization" header. The value must include the authorization scheme, e.g., "Bearer " or "Basic ", as it will be used as the full Authorization header value. This secret is used by the API to test the endpoint during `CreateSubscriber` and `UpdateSubscriber` calls, and will be sent in the `Authorization` header for all subsequent webhook notifications to this endpoint.
*/
secret?: string | null;
/**
* Output only. Whether the secret is set.
*/
secretSet?: boolean | null;
}
/**
* Represents the energy quantity.
*/
export interface Schema$EnergyQuantity {
/**
* Required. The energy value in kilocalories.
*/
kcal?: number | null;
/**
* Optional. Value representing the user provided unit.
*/
userProvidedUnit?: string | null;
}
/**
* Rollup for the energy quantity.
*/
export interface Schema$EnergyQuantityRollup {
/**
* Required. The sum of the energy in kilocalories.
*/
kcalSum?: number | null;
/**
* Optional. The user provid