//native
/**
* Post body data to a provider
* Used to post body data to a provider. This endpoint only works for users connected via Google Fit. Returns error for other providers.
*/
export async function main(auth: RT.Terra, body: Body) {
const url = new URL(`https://api.tryterra.co/v2/body`)
const response = await fetch(url, {
method: 'POST',
headers: {
'dev-id': auth.devId,
'Content-Type': 'application/json',
'X-api-key': auth.apiKey
},
body: JSON.stringify(body)
})
if (!response.ok) {
const text = await response.text()
throw new Error(`${response.status} ${text}`)
}
return await response.json()
}
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
/**
* Represents data types that a certain device contributed to.
*/
export type HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasDeviceDataTypeYaml =
| Steps
| ActiveMinutes
| BasalMetabolicRate
| Calories
| Distance
| HeartRate
| OxygenSaturation
| SleepClassification
| Speed
| Cadence
/**
* Count of steps taken by the user.
*/
export type Steps = 'STEPS'
/**
* Duration of time the user spent in physical activity.
*/
export type ActiveMinutes = 'ACTIVE_MINUTES'
/**
* User's basal metabolic rate - calories burned at rest.
*/
export type BasalMetabolicRate = 'BMR'
/**
* Calories burned by the user during activity.
*/
export type Calories = 'CALORIES'
/**
* Distance traveled by the user during activity.
*/
export type Distance = 'DISTANCE'
/**
* User's heart rate measurements.
*/
export type HeartRate = 'HEART_RATE'
/**
* Blood oxygen saturation level (SpO2) of the user.
*/
export type OxygenSaturation = 'OXYGEN_SATURATION'
/**
* Classification of user's sleep stages or types.
*/
export type SleepClassification = 'SLEEP_TYPE'
/**
* User's movement speed during activity.
*/
export type Speed = 'SPEED'
/**
* Rate of movement repetition during activity (steps per minute).
*/
export type Cadence = 'CADENCE'
/**
* Represents data types that a certain device contributed to.
*/
export type HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasDeviceDataTypeYaml1 =
| Steps1
| ActiveMinutes1
| BasalMetabolicRate1
| Calories1
| Distance1
| HeartRate1
| OxygenSaturation1
| SleepClassification1
| Speed1
| Cadence1
/**
* Count of steps taken by the user.
*/
export type Steps1 = 'STEPS'
/**
* Duration of time the user spent in physical activity.
*/
export type ActiveMinutes1 = 'ACTIVE_MINUTES'
/**
* User's basal metabolic rate - calories burned at rest.
*/
export type BasalMetabolicRate1 = 'BMR'
/**
* Calories burned by the user during activity.
*/
export type Calories1 = 'CALORIES'
/**
* Distance traveled by the user during activity.
*/
export type Distance1 = 'DISTANCE'
/**
* User's heart rate measurements.
*/
export type HeartRate1 = 'HEART_RATE'
/**
* Blood oxygen saturation level (SpO2) of the user.
*/
export type OxygenSaturation1 = 'OXYGEN_SATURATION'
/**
* Classification of user's sleep stages or types.
*/
export type SleepClassification1 = 'SLEEP_TYPE'
/**
* User's movement speed during activity.
*/
export type Speed1 = 'SPEED'
/**
* Rate of movement repetition during activity (steps per minute).
*/
export type Cadence1 = 'CADENCE'
/**
* Flag indicating the atrial fibrillation classification of the individual
*/
export type HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasAFibFlagYaml =
| Negative
| Positive
| Inconclusive
/**
* AFib was not detected in the heart rhythm analysis.
*/
export type Negative = 0
/**
* AFib was detected in the heart rhythm analysis.
*/
export type Positive = 1
/**
* The heart rhythm analysis couldn't determine whether AFib was present or absent.
*/
export type Inconclusive = 2
/**
* User's afib classification throught the day.
*/
export type HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasAFibFlagYaml1 =
| Negative1
| Positive1
| Inconclusive1
/**
* AFib was not detected in the heart rhythm analysis.
*/
export type Negative1 = 0
/**
* AFib was detected in the heart rhythm analysis.
*/
export type Positive1 = 1
/**
* The heart rhythm analysis couldn't determine whether AFib was present or absent.
*/
export type Inconclusive1 = 2
/**
* Represents the context in which heart rate was measured.
*/
export type HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHeartRateContextYaml =
NotSet | Active | NotActive
/**
* Heart rate measurement context is not specified.
*/
export type NotSet = 0
/**
* Heart rate was measured during physical activity or exercise.
*/
export type Active = 1
/**
* Heart rate was measured during rest or non-active periods.
*/
export type NotActive = 2
/**
* Heart rate zone designation
*/
export type HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHeartRateZoneYaml =
| Zone0
| Zone1
| Zone2
| Zone3
| Zone4
| Zone5
| Other
/**
* Resting heart rate zone.
*/
export type Zone0 = 0
/**
* Very light activity zone.
*/
export type Zone1 = 1
/**
* Light activity zone.
*/
export type Zone2 = 2
/**
* Moderate activity zone.
*/
export type Zone3 = 3
/**
* Hard activity zone.
*/
export type Zone4 = 4
/**
* Maximum effort zone.
*/
export type Zone5 = 5
/**
* Heart rate zone that doesn't fit into the standard zones or couldn't be classified.
*/
export type Other = 6
/**
* Flag indicating the ketone sample type (e.g. blood, breath, urine)
*/
export type HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasKetoneSampleTypeYaml =
Unknown | Blood | Urine | Breath
/**
* The type of ketone sample is unknown or not specified.
*/
export type Unknown = 0
/**
* Ketone sample taken from blood.
*/
export type Blood = 1
/**
* Ketone sample taken from urine.
*/
export type Urine = 2
/**
* Ketone sample taken from breath.
*/
export type Breath = 3
/**
* Indicates whether the timestamps in this payload are localized (LOCAL) or in UTC.
*/
export type HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasTimestampLocalizationYaml =
0 | 1
/**
* Type of oxygen saturation measurement (i.e. blood vs muscle)
*/
export type HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasOxygenSaturationTypeYaml =
Blood1 | Muscle
/**
* Oxygen saturation measurement for blood.
*/
export type Blood1 = 0
/**
* Oxygen saturation measurement for muscle.
*/
export type Muscle = 1
/**
* Flag indicating state of user's blood glucose level
*/
export type HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasGlucoseFlagYaml =
| Normal
| High
| Low
/**
* Blood glucose level is within the normal/healthy range.
*/
export type Normal = 0
/**
* Blood glucose level is above the normal range (hyperglycemia).
*/
export type High = 1
/**
* Blood glucose level is below the normal range (hypoglycemia).
*/
export type Low = 2
/**
* Flag indicating the current trend in the user's blood glucose level (e.g. rising, constant, falling)
*/
export type HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasTrendArrowYaml =
| Unknown1
| FallingQuickly
| Falling
| Flat
| Rising
| RisingQuickly
/**
* Glucose trend cannot be determined.
*/
export type Unknown1 = 0
/**
* Glucose level is decreasing rapidly.
*/
export type FallingQuickly = 1
/**
* Glucose level is decreasing gradually.
*/
export type Falling = 2
/**
* Glucose level is remaining stable.
*/
export type Flat = 3
/**
* Glucose level is increasing gradually.
*/
export type Rising = 4
/**
* Glucose level is increasing rapidly.
*/
export type RisingQuickly = 5
/**
* Flag indicating state of user's blood glucose level
*/
export type HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasGlucoseFlagYaml1 =
| Normal1
| High1
| Low1
/**
* Blood glucose level is within the normal/healthy range.
*/
export type Normal1 = 0
/**
* Blood glucose level is above the normal range (hyperglycemia).
*/
export type High1 = 1
/**
* Blood glucose level is below the normal range (hypoglycemia).
*/
export type Low1 = 2
/**
* Flag indicating the current trend in the user's blood glucose level (e.g. rising, constant, falling)
*/
export type HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasTrendArrowYaml1 =
| Unknown2
| FallingQuickly1
| Falling1
| Flat1
| Rising1
| RisingQuickly1
/**
* Glucose trend cannot be determined.
*/
export type Unknown2 = 0
/**
* Glucose level is decreasing rapidly.
*/
export type FallingQuickly1 = 1
/**
* Glucose level is decreasing gradually.
*/
export type Falling1 = 2
/**
* Glucose level is remaining stable.
*/
export type Flat1 = 3
/**
* Glucose level is increasing gradually.
*/
export type Rising1 = 4
/**
* Glucose level is increasing rapidly.
*/
export type RisingQuickly1 = 5
export interface Body {
/**
* Body measurement metrics to post to data provider
*/
data: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasBodyYaml[]
[k: string]: unknown
}
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasBodyYaml {
blood_pressure_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasBloodPressureDataYaml
device_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasDeviceDataYaml
heart_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHeartDataYaml
hydration_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHydrationDataYaml
ketone_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasKetoneDataYaml
measurements_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasMeasurementsDataYaml
metadata: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasBodyMetadataYaml
oxygen_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasOxygenDataYaml
temperature_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasTemperatureDataYaml
glucose_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasGlucoseDataYaml
[k: string]: unknown
}
/**
* Object containing information on user's Blood Pressure.
*/
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasBloodPressureDataYaml {
/**
* List of Blood Pressure measurements sampled throughout the day.
*/
blood_pressure_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasBloodPressureSampleYaml[]
[k: string]: unknown
}
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasBloodPressureSampleYaml {
/**
* Time with which the record is associated, in ISO8601 format with microsecond precision. TimeZone info will be provided whenever possible. If absent, the time corresponds to the user's local time.
*/
timestamp?: string
/**
* User's diastolic blood pressure, in mmHg
*/
diastolic_bp?: number
/**
* User's systolic blood pressure, in mmHg
*/
systolic_bp?: number
[k: string]: unknown
}
/**
* Object containing information on the device which recorded data for the payload.
*/
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasDeviceDataYaml {
/**
* Activation timestamp of the device, if applicable.
*/
activation_timestamp?: string
/**
* Data provided by the device, as enumerated types.
*/
data_provided?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasDeviceDataTypeYaml[]
/**
* Hardware version of the device.
*/
hardware_version?: string
/**
* Last upload date from the device.
*/
last_upload_date?: string
/**
* Device manufacturer name.
*/
manufacturer?: string
/**
* Device name - note that this can also be the name of the application/package which the data comes from, if coming from a data aggregator such as Google Fit.
*/
name?: string
/**
* Data pertaining to other devices which may have contributed data for this workout.
*/
other_devices?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasOtherDeviceDataYaml[]
/**
* Sensor state of the device.
*/
sensor_state?: string
/**
* Device Serial Number.
*/
serial_number?: string
/**
* Device Software Version.
*/
software_version?: string
[k: string]: unknown
}
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasOtherDeviceDataYaml {
/**
* Device manufacturer name.
*/
manufacturer?: string
/**
* Hardware version of the device.
*/
hardware_version?: string
/**
* Device Serial Number.
*/
serial_number?: string
/**
* Device name - note that this can also be the name of the application/package which the data comes from, if coming from a data aggregator such as Google Fit.
*/
name?: string
/**
* Device Software Version.
*/
software_version?: string
activation_timestamp?: string
data_provided?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasDeviceDataTypeYaml1[]
last_upload_date?: string
[k: string]: unknown
}
/**
* Object containing information on user's heart metrics.
*/
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHeartDataYaml {
/**
* List of Atrial Fibrillation classification measurements sampled through the day.
*/
afib_classification_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasAFibClassificationSampleYaml[]
/**
* List of ECGReadings sampled through the day.
*/
ecg_signal?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasECGReadingYaml[]
heart_rate_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHeartRateDataYaml
/**
* List of Pulse Wave Velocity measurements sampled throughout the day. This represents a measurement of arterial stiffness that is an independent predictor of cardiovascular risk.
*/
pulse_wave_velocity_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasPulseVelocitySampleYaml[]
/**
* List of RR Interval samples throughout the day.
*/
rr_interval_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasRRIntervalSampleYaml[]
[k: string]: unknown
}
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasAFibClassificationSampleYaml {
/**
* Time with which the record is associated, in ISO8601 format with microsecond precision. TimeZone info will be provided whenever possible. If absent, the time corresponds to the user's local time.
*/
timestamp?: string
afib_classification?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasAFibFlagYaml
[k: string]: unknown
}
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasECGReadingYaml {
/**
* Time with which the record is associated, in ISO8601 format with microsecond precision. TimeZone info will be provided whenever possible. If absent, the time corresponds to the user's local time.
*/
start_timestamp?: string
/**
* User's average heart rate throughout the day, in beats per minute (bpm).
*/
avg_hr_bpm?: number
afib_classification?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasAFibFlagYaml1
/**
* List of raw ECG readings sampled through the day.
*/
raw_signal?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasRawECGSampleYaml[]
[k: string]: unknown
}
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasRawECGSampleYaml {
/**
* Potential uV in the RawECG Sample
*/
potential_uV?: number
/**
* Time with which the record is associated, in ISO8601 format with microsecond precision. TimeZone info will be provided whenever possible. If absent, the time corresponds to the user's local time.
*/
timestamp?: string
[k: string]: unknown
}
/**
* Object containing heart rate data.
*/
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHeartRateDataYaml {
detailed?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHeartRateDataDetailedYaml
summary?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHeartRateDataSummaryYaml
[k: string]: unknown
}
/**
* Object containing detailed heart rate information for the associated workout.
*/
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHeartRateDataDetailedYaml {
/**
* Array of HeartRate data samples recorded for the user during the workout.
*/
hr_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHeartRateDataSampleYaml[]
/**
* Array of HeartRate Variability data samples recorded for the user during the workout, computed using RMSSD.
*/
hrv_samples_rmssd?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHeartRateVariabilityDataSampleRMSSDYaml[]
/**
* Array of HeartRate Variability data samples recorded for the user during the workout, computed using SDNN.
*/
hrv_samples_sdnn?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHeartRateVariabilityDataSampleSDNNYaml[]
[k: string]: unknown
}
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHeartRateDataSampleYaml {
/**
* Time with which the record is associated, in ISO8601 format with microsecond precision. TimeZone info will be provided whenever possible. If absent, the time corresponds to the user's local time.
*/
timestamp?: string
/**
* User's heart rate in bpm
*/
bpm?: number
/**
* Time elapsed since the start of the workout, subtracting time during which the recording was paused
*/
timer_duration_seconds?: number
context?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHeartRateContextYaml
[k: string]: unknown
}
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHeartRateVariabilityDataSampleRMSSDYaml {
/**
* Time with which the record is associated, in ISO8601 format with microsecond precision. TimeZone info will be provided whenever possible. If absent, the time corresponds to the user's local time.
*/
timestamp?: string
/**
* User's Heart Rate Variability, computed using RMSSD
*/
hrv_rmssd?: number
[k: string]: unknown
}
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHeartRateVariabilityDataSampleSDNNYaml {
/**
* Time with which the record is associated, in ISO8601 format with microsecond precision. TimeZone info will be provided whenever possible. If absent, the time corresponds to the user's local time.
*/
timestamp?: string
/**
* User's Heart Rate Variability, computed using SDNN
*/
hrv_sdnn?: number
[k: string]: unknown
}
/**
* Object containing summary heart rate information for the associated workout.
*/
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHeartRateDataSummaryYaml {
/**
* Average HeartRate of the user during the workout.
*/
avg_hr_bpm?: number
/**
* Average HeartRate Variability of the user during the workout, computed using RMSSD.
*/
avg_hrv_rmssd?: number
/**
* Average HeartRate Variability of the user during the workout, computed using SDNN.
*/
avg_hrv_sdnn?: number
/**
* Array of time spent in various HR zones throughout the workout.
*/
hr_zone_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHeartRateZoneDataYaml[]
/**
* Maximum HeartRate of the user during the workout.
*/
max_hr_bpm?: number
/**
* Minimum HeartRate of the user during the workout.
*/
min_hr_bpm?: number
/**
* Resting HeartRate of the user, as determined by the fitness data provider.
*/
resting_hr_bpm?: number
/**
* User's maximum HeartRate based on their age, and other factors as determined by the fitness data provider.
*/
user_max_hr_bpm?: number
[k: string]: unknown
}
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHeartRateZoneDataYaml {
zone?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHeartRateZoneYaml
/**
* Start percentage (based off user's max HR) of the HR zone
*/
start_percentage?: number
/**
* End percentage (based off user's max HR) of the HR zone
*/
end_percentage?: number
/**
* Name of the associated heart rate zone
*/
name?: string
/**
* Duration spent in the heart rate zone
*/
duration_seconds?: number
[k: string]: unknown
}
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasPulseVelocitySampleYaml {
/**
* Time with which the record is associated, in ISO8601 format with microsecond precision. TimeZone info will be provided whenever possible. If absent, the time corresponds to the user's local time.
*/
timestamp?: string
/**
* User's Pulse Wave Velocity measurement - velocity at which the blood pressure pulse propagates through the circulatory system
*/
pulse_wave_velocity_meters_per_second?: number
[k: string]: unknown
}
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasRRIntervalSampleYaml {
/**
* User's RR Interval for a specific heart beat in milliseconds.
*/
rr_interval_ms?: number
/**
* Time with which the record is associated, in ISO8601 format with microsecond precision. TimeZone info will be provided whenever possible. If absent, the time corresponds to the user's local time.
*/
timestamp?: string
/**
* The heart beat value at that specific instance.
*/
hr_bpm?: number
[k: string]: unknown
}
/**
* Object containing information on user's hydration (both internal & consumption of water) for the day.
*/
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHydrationDataYaml {
/**
* User's total water consumption throughout the day.
*/
day_total_water_consumption_ml?: number
/**
* User's hydration level samples throughout the day.
*/
hydration_amount_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHydrationMeasurementSampleYaml[]
[k: string]: unknown
}
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHydrationMeasurementSampleYaml {
/**
* Time with which the record is associated, in ISO8601 format with microsecond precision. TimeZone info will be provided whenever possible. If absent, the time corresponds to the user's local time.
*/
timestamp?: string
/**
* Total body water composition of the user, in kilograms.
*/
hydration_kg?: number
[k: string]: unknown
}
/**
* Object containing information on user's ketone data for the day.
*/
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasKetoneDataYaml {
/**
* List of ketone data sampled through the day.
*/
ketone_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasKetoneSampleYaml[]
[k: string]: unknown
}
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasKetoneSampleYaml {
/**
* Time with which the record is associated, in ISO8601 format with microsecond precision. TimeZone info will be provided whenever possible. If absent, the time corresponds to the user's local time.
*/
timestamp?: string
/**
* Ketone in mg per dL
*/
ketone_mg_per_dL?: number
sample_type?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasKetoneSampleTypeYaml
[k: string]: unknown
}
/**
* Object containing information on body measurements for the day.
*/
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasMeasurementsDataYaml {
/**
* List of body metrics & measurements taken throughout the associated day.
*/
measurements?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasMeasurementDataSampleYaml[]
[k: string]: unknown
}
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasMeasurementDataSampleYaml {
/**
* Time with which the record is associated, in ISO8601 format with microsecond precision. TimeZone info will be provided whenever possible. If absent, the time corresponds to the user's local time.
*/
measurement_time?: string
/**
* User's Body Mass Index (BMI).
*/
BMI?: number
/**
* User's Basal Metabolic Rate - minimum amount of calories that a person's body needs to perform necessary functions.
*/
BMR?: number
/**
* User's Resting Metabolic Rate - amount of energy that a person's body needs to function while at rest. RMR accounts for additional low-effort daily activities on top of basic body functions.
*/
RMR?: number
/**
* Estimate of how fit the user is compared to their actual age, as measured by the device.
*/
estimated_fitness_age?: string
/**
* User's skin fold measurement.
*/
skin_fold_mm?: number
/**
* User's body fat percentage.
*/
bodyfat_percentage?: number
/**
* User's body weight.
*/
weight_kg?: number
/**
* User's height.
*/
height_cm?: number
/**
* User's total bone mass.
*/
bone_mass_g?: number
/**
* User's total muscle mass (i.e. skeletal muscle mass).
*/
muscle_mass_g?: number
/**
* Total lean mass of the user - calculated as the difference between total body weight and body fat weight.
*/
lean_mass_g?: number
/**
* Total amount of fluid in the user's body.
*/
water_percentage?: number
/**
* Quantity of insulin administered to the user.
*/
insulin_units?: number
/**
* Type of insulin administered to the user.
*/
insulin_type?: string
/**
* Color of the user's urine.
*/
urine_color?: string
/**
* User notes associated with the measurement.
*/
user_notes?: string
[k: string]: unknown
}
/**
* Object containing daily summary metadata.
*/
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasBodyMetadataYaml {
/**
* The end time of the associated day, in ISO8601 format with microsecond precision. Will always fall on midnight of any given day, and will always be equal to 24h after start_time. TimeZone info will be provided whenever possible. If absent, the time corresponds to the user's local time.
*/
end_time: string
/**
* The start time of the associated day, in ISO8601 format with microsecond precision. Will always fall on midnight of any given day, and will always be equal to 24h before end_time. TimeZone info will be provided whenever possible. If absent, the time corresponds to the user's local time.
*/
start_time: string
timestamp_localization?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasTimestampLocalizationYaml
[k: string]: unknown
}
/**
* Object containing information on user's oxygen-related data.
*/
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasOxygenDataYaml {
/**
* Average Oxygen Saturation percentage of the user during the day (SpO2 or SmO2).
*/
avg_saturation_percentage?: number
/**
* Array of Oxygen Saturation percentage datapoints sampled throughout the day.
*/
saturation_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasOxygenSaturationSampleYaml[]
/**
* Array of VO2 datapoints sampled throughout the day.
*/
vo2_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasVo2MaxSampleYaml[]
/**
* VO2Max for the given user.
*/
vo2max_ml_per_min_per_kg?: number
[k: string]: unknown
}
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasOxygenSaturationSampleYaml {
/**
* Time with which the record is associated, in ISO8601 format with microsecond precision. TimeZone info will be provided whenever possible. If absent, the time corresponds to the user's local time.
*/
timestamp?: string
/**
* User's oxygen saturation percentage - referring to either SpO2 or SmO2, based on the `type` field
*/
percentage?: number
type?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasOxygenSaturationTypeYaml
[k: string]: unknown
}
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasVo2MaxSampleYaml {
/**
* Time with which the record is associated, in ISO8601 format with microsecond precision. TimeZone info will be provided whenever possible. If absent, the time corresponds to the user's local time.
*/
timestamp?: string
/**
* User's VO2Max - maximum amount of oxygen the user's body can utilize during exercise
*/
vo2max_ml_per_min_per_kg?: number
[k: string]: unknown
}
/**
* Object containing temperature information (core, skin, ambient) during the day.
*/
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasTemperatureDataYaml {
/**
* List of ambient temperature measurements sampled throughout the day.
*/
ambient_temperature_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasTemperatureSampleYaml[]
/**
* List of body temperature measurements sampled throughout the day.
*/
body_temperature_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasTemperatureSampleYaml1[]
/**
* List of skin temperature measurements sampled throughout the day.
*/
skin_temperature_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasTemperatureSampleYaml2[]
[k: string]: unknown
}
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasTemperatureSampleYaml {
/**
* Time with which the record is associated, in ISO8601 format with microsecond precision. TimeZone info will be provided whenever possible. If absent, the time corresponds to the user's local time.
*/
timestamp?: string
/**
* Temperature value in degrees Celsius.
*/
temperature_celsius?: number
[k: string]: unknown
}
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasTemperatureSampleYaml1 {
/**
* Time with which the record is associated, in ISO8601 format with microsecond precision. TimeZone info will be provided whenever possible. If absent, the time corresponds to the user's local time.
*/
timestamp?: string
/**
* Temperature value in degrees Celsius.
*/
temperature_celsius?: number
[k: string]: unknown
}
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasTemperatureSampleYaml2 {
/**
* Time with which the record is associated, in ISO8601 format with microsecond precision. TimeZone info will be provided whenever possible. If absent, the time corresponds to the user's local time.
*/
timestamp?: string
/**
* Temperature value in degrees Celsius.
*/
temperature_celsius?: number
[k: string]: unknown
}
/**
* Object containing information on user's blood glucose for the day.
*/
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasGlucoseDataYaml {
/**
* List of blood glucose readings sampled throughout the day.
*/
blood_glucose_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasGlucoseDataSampleYaml[]
/**
* List of blood glucose readings sampled throughout the day - this represents additional data points, potentially at higher frequency from the ones in blood_glucose_samples, which may come at a cost of reduced accuracy.
*/
detailed_blood_glucose_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasGlucoseDataSampleYaml1[]
/**
* User's average glucose level throughout the day.
*/
day_avg_blood_glucose_mg_per_dL?: number
/**
* GMI (Glucose Management Indicator) is a metric derived from continuous glucose monitoring (CGM) data that estimates average glucose levels to help guide diabetes management, without implying a precise match to laboratory A1C.
*/
gmi?: number
/**
* Time that the user's glucose is within acceptable range (not hyper or hypoglycemic).
*/
time_in_range?: number
/**
* Number of data points recorded by the sensor throughout the day.
*/
sensor_usage?: number
/**
* List of glucose percentile samples throughout the day.
*/
daily_patterns?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasDailyPatternSampleYaml[]
[k: string]: unknown
}
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasGlucoseDataSampleYaml {
/**
* Time with which the record is associated, in ISO8601 format with microsecond precision. TimeZone info will be provided whenever possible. If absent, the time corresponds to the user's local time.
*/
timestamp?: string
/**
* User's blood glucose reading
*/
blood_glucose_mg_per_dL?: number
glucose_level_flag?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasGlucoseFlagYaml
trend_arrow?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasTrendArrowYaml
[k: string]: unknown
}
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasGlucoseDataSampleYaml1 {
/**
* Time with which the record is associated, in ISO8601 format with microsecond precision. TimeZone info will be provided whenever possible. If absent, the time corresponds to the user's local time.
*/
timestamp?: string
/**
* User's blood glucose reading
*/
blood_glucose_mg_per_dL?: number
glucose_level_flag?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasGlucoseFlagYaml1
trend_arrow?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasTrendArrowYaml1
[k: string]: unknown
}
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasDailyPatternSampleYaml {
/**
* Hour of the day, represented as an integer from 0 to 23, where 0 is midnight and 23 is the hour before the next midnight.
*/
time_from_midnight?: number
/**
* Percentile 5 of the glucose level at the given time of day.
*/
percentile_5?: number
/**
* Percentile 25 of the glucose level at the given time of day.
*/
percentile_25?: number
/**
* Percentile 50 of the glucose level at the given time of day.
*/
percentile_50?: number
/**
* Percentile 75 of the glucose level at the given time of day.
*/
percentile_75?: number
/**
* Percentile 95 of the glucose level at the given time of day.
*/
percentile_95?: number
[k: string]: unknown
}
Submitted by hugo697 235 days ago