Edits history of script submission #20938 for ' Post activity data to a provider (terra)'

  • bun
    One script reply has been approved by the moderators
    Ap­pro­ved
    //native
    /**
     * Post activity data to a provider
     * Used to post activity data to a provider. This endpoint only works for users connected via Wahoo. Returns error for other providers.
     */
    export async function main(auth: RT.Terra, body: Body) {
    	const url = new URL(`https://api.tryterra.co/v2/activity`)
    
    	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.
     */
    
    /**
     * Intensity of the user's activity at an instant in time
     */
    export type HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasActivityLevelYaml =
    	| Unknown
    	| Rest
    	| Inactive
    	| LowIntensity
    	| MediumIntensity
    	| HighIntensity
    /**
     * Activity level is unknown or could not be determined.
     */
    export type Unknown = 0
    /**
     * User is at rest, with minimal to no physical activity.
     */
    export type Rest = 1
    /**
     * User is awake but inactive or sedentary.
     */
    export type Inactive = 2
    /**
     * User is engaged in light physical activity such as casual walking.
     */
    export type LowIntensity = 3
    /**
     * User is engaged in moderate physical activity such as brisk walking or light exercise.
     */
    export type MediumIntensity = 4
    /**
     * User is engaged in vigorous physical activity such as running or intense exercise.
     */
    export type HighIntensity = 5
    /**
     * 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'
    /**
     * 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
    /**
     * Stroke type - only relevant for swimming activities
     */
    export type HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasStrokeTypeYaml =
    	| Other1
    	| Freestyle
    	| Backstroke
    	| Breaststroke
    	| Butterfly
    /**
     * Any swimming stroke style that doesn't fit the standard categories.
     */
    export type Other1 = 'other'
    /**
     * Front crawl stroke where swimmers alternate arm movements with face in water.
     */
    export type Freestyle = 'freestyle'
    /**
     * Swimming stroke performed on the back with alternating arm movements.
     */
    export type Backstroke = 'backstroke'
    /**
     * Swimming stroke where arms move simultaneously in a heart-shaped pattern with a frog kick.
     */
    export type Breaststroke = 'breaststroke'
    /**
     * Swimming stroke with simultaneous overhead arm movements and dolphin kick.
     */
    export type Butterfly = 'butterfly'
    /**
     * Indicates whether the timestamps in this payload are localized (LOCAL) or in UTC.
     */
    export type HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasTimestampLocalizationYaml =
    	0 | 1
    /**
     * The type of activity performed for the associated workout.
     */
    export type HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasActivityTypeYaml =
    	| InVehicle
    	| Biking
    	| Still
    	| Unknown1
    	| Tilting
    	| Walking
    	| Running
    	| Aerobics
    	| Badminton
    	| Baseball
    	| Basketball
    	| Biathlon
    	| HandBiking
    	| MountainBiking
    	| RoadBiking
    	| Spinning
    	| StationaryBiking
    	| UtilityBiking
    	| Boxing
    	| Calisthenics
    	| CircuitTraining
    	| Cricket
    	| Dancing
    	| Elliptical
    	| Fencing
    	| AmericanFootball
    	| AustralianFootball
    	| EnglishFootball
    	| Frisbee
    	| Gardening
    	| Golf
    	| Gymnastics
    	| Handball
    	| Hiking
    	| Hockey
    	| HorsebackRiding
    	| Housework
    	| JumpingRope
    	| Kayaking
    	| KettlebellTraining
    	| Kickboxing
    	| Kitesurfing
    	| MartialArts
    	| Meditation
    	| MixedMartialArts
    	| P90XExercises
    	| Paragliding
    	| Pilates
    	| Polo
    	| Racquetball
    	| RockClimbing
    	| Rowing
    	| RowingMachine
    	| Rugby
    	| Jogging
    	| RunningOnSand
    	| TreadmillRunning
    	| Sailing
    	| ScubaDiving
    	| Skateboarding
    	| Skating
    	| CrossSkating
    	| IndoorRollerblading
    	| Skiing
    	| BackCountrySkiing
    	| CrossCountrySkiing
    	| DownhillSkiing
    	| KiteSkiing
    	| RollerSkiing
    	| Sledding
    	| Snowboarding
    	| Snowmobile
    	| Snowshoeing
    	| Squash
    	| StairClimbing
    	| StairClimbingMachine
    	| StandUpPaddleboarding
    	| StrengthTraining
    	| Surfing
    	| Swimming
    	| SwimmingInPool
    	| OpenWaterSwimming
    	| TableTennis
    	| TeamSports
    	| Tennis
    	| Treadmill
    	| Volleyball
    	| BeachVolleyball
    	| IndoorVolleyball
    	| Wakeboarding
    	| WalkingForFitness
    	| NordicWalking
    	| TreadmillWalking
    	| WaterPolo
    	| Weightlifting
    	| Wheelchair
    	| Windsurfing
    	| Yoga
    	| Zumba
    	| Diving
    	| Ergometer
    	| IceSkating
    	| IndoorSkating
    	| Curling
    	| Other2
    	| CrossFit
    	| HIIT
    	| IntervalTraining
    	| WalkingWithStroller
    	| Elevator
    	| Escalator
    	| Archery
    	| Softball
    	| GuidedBreathing
    	| CardioTraining
    	| Lacrosse
    	| Stretching
    	| Triathlon
    	| InlineSkating
    	| SkyDiving
    	| Paddling
    	| Mountaineering
    	| Fishing
    	| WaterSkiing
    	| IndoorRunning
    	| PadelTennis
    	| Driving
    	| OffRoadDriving
    	| Motorbiking
    	| MotorRacing
    	| Enduro
    	| Canoeing
    	| Orienteering
    	| HangGliding
    	| Flying
    	| HotAirBallooning
    	| JetSkiing
    	| PowerBoating
    	| GaelicFootball
    	| Hurling
    /**
     * Activity type for when the user is in a vehicle, such as a car or bus.
     */
    export type InVehicle = 0
    /**
     * Activity type for general biking or cycling.
     */
    export type Biking = 1
    /**
     * Activity type for when the user is still or not moving.
     */
    export type Still = 3
    /**
     * Activity type is unknown or could not be determined.
     */
    export type Unknown1 = 4
    /**
     * Activity type for when the device detects a tilting motion.
     */
    export type Tilting = 5
    /**
     * Activity type for general walking.
     */
    export type Walking = 7
    /**
     * Activity type for general running.
     */
    export type Running = 8
    /**
     * Activity type for aerobic exercises and workouts.
     */
    export type Aerobics = 9
    /**
     * Activity type for playing badminton.
     */
    export type Badminton = 10
    /**
     * Activity type for playing baseball.
     */
    export type Baseball = 11
    /**
     * Activity type for playing basketball.
     */
    export type Basketball = 12
    /**
     * Activity type for biathlon, combining cross-country skiing and rifle shooting.
     */
    export type Biathlon = 13
    /**
     * Activity type for hand biking, using a hand-powered bicycle.
     */
    export type HandBiking = 14
    /**
     * Activity type for off-road cycling on rough terrain.
     */
    export type MountainBiking = 15
    /**
     * Activity type for cycling on paved roads.
     */
    export type RoadBiking = 16
    /**
     * Activity type for indoor cycling classes or spinning.
     */
    export type Spinning = 17
    /**
     * Activity type for exercising on a stationary bicycle.
     */
    export type StationaryBiking = 18
    /**
     * Activity type for cycling for transportation or utility purposes.
     */
    export type UtilityBiking = 19
    /**
     * Activity type for boxing training or matches.
     */
    export type Boxing = 20
    /**
     * Activity type for bodyweight exercises focusing on rhythm and flow.
     */
    export type Calisthenics = 21
    /**
     * Activity type for workout consisting of a series of exercises performed in rotation.
     */
    export type CircuitTraining = 22
    /**
     * Activity type for playing cricket.
     */
    export type Cricket = 23
    /**
     * Activity type for various forms of dance.
     */
    export type Dancing = 24
    /**
     * Activity type for exercising on an elliptical trainer.
     */
    export type Elliptical = 25
    /**
     * Activity type for fencing sport.
     */
    export type Fencing = 26
    /**
     * Activity type for playing American football.
     */
    export type AmericanFootball = 27
    /**
     * Activity type for playing Australian rules football.
     */
    export type AustralianFootball = 28
    /**
     * Activity type for playing soccer/football.
     */
    export type EnglishFootball = 29
    /**
     * Activity type for playing frisbee or disc sports.
     */
    export type Frisbee = 30
    /**
     * Activity type for gardening and yard work.
     */
    export type Gardening = 31
    /**
     * Activity type for playing golf.
     */
    export type Golf = 32
    /**
     * Activity type for performing gymnastics.
     */
    export type Gymnastics = 33
    /**
     * Activity type for playing handball.
     */
    export type Handball = 34
    /**
     * Activity type for hiking or walking on trails.
     */
    export type Hiking = 35
    /**
     * Activity type for playing hockey.
     */
    export type Hockey = 36
    /**
     * Activity type for horseback riding.
     */
    export type HorsebackRiding = 37
    /**
     * Activity type for household chores and cleaning.
     */
    export type Housework = 38
    /**
     * Activity type for skipping or jumping rope.
     */
    export type JumpingRope = 39
    /**
     * Activity type for kayaking on water.
     */
    export type Kayaking = 40
    /**
     * Activity type for exercises using kettlebells.
     */
    export type KettlebellTraining = 41
    /**
     * Activity type for kickboxing training or matches.
     */
    export type Kickboxing = 42
    /**
     * Activity type for kitesurfing or kiteboarding.
     */
    export type Kitesurfing = 43
    /**
     * Activity type for general martial arts training.
     */
    export type MartialArts = 44
    /**
     * Activity type for meditation practice.
     */
    export type Meditation = 45
    /**
     * Activity type for MMA training or fighting.
     */
    export type MixedMartialArts = 46
    /**
     * Activity type for P90X home fitness program.
     */
    export type P90XExercises = 47
    /**
     * Activity type for paragliding sport.
     */
    export type Paragliding = 48
    /**
     * Activity type for pilates exercises.
     */
    export type Pilates = 49
    /**
     * Activity type for playing polo.
     */
    export type Polo = 50
    /**
     * Activity type for playing racquetball.
     */
    export type Racquetball = 51
    /**
     * Activity type for rock climbing.
     */
    export type RockClimbing = 52
    /**
     * Activity type for rowing on water.
     */
    export type Rowing = 53
    /**
     * Activity type for exercising on a rowing machine.
     */
    export type RowingMachine = 54
    /**
     * Activity type for playing rugby.
     */
    export type Rugby = 55
    /**
     * Activity type for jogging at a leisurely pace.
     */
    export type Jogging = 56
    /**
     * Activity type for running on beach or sandy surface.
     */
    export type RunningOnSand = 57
    /**
     * Activity type for running on a treadmill.
     */
    export type TreadmillRunning = 58
    /**
     * Activity type for sailing on water.
     */
    export type Sailing = 59
    /**
     * Activity type for scuba diving underwater.
     */
    export type ScubaDiving = 60
    /**
     * Activity type for skateboarding.
     */
    export type Skateboarding = 61
    /**
     * Activity type for general skating.
     */
    export type Skating = 62
    /**
     * Activity type for cross skating or nordic skating.
     */
    export type CrossSkating = 63
    /**
     * Activity type for rollerblading indoors.
     */
    export type IndoorRollerblading = 64
    /**
     * Activity type for general skiing.
     */
    export type Skiing = 65
    /**
     * Activity type for backcountry or off-piste skiing.
     */
    export type BackCountrySkiing = 66
    /**
     * Activity type for cross-country skiing.
     */
    export type CrossCountrySkiing = 67
    /**
     * Activity type for alpine or downhill skiing.
     */
    export type DownhillSkiing = 68
    /**
     * Activity type for skiing with a kite for propulsion.
     */
    export type KiteSkiing = 69
    /**
     * Activity type for roller skiing on wheels.
     */
    export type RollerSkiing = 70
    /**
     * Activity type for sledding or tobogganing.
     */
    export type Sledding = 71
    /**
     * Activity type for snowboarding.
     */
    export type Snowboarding = 73
    /**
     * Activity type for riding a snowmobile.
     */
    export type Snowmobile = 74
    /**
     * Activity type for walking with snowshoes.
     */
    export type Snowshoeing = 75
    /**
     * Activity type for playing squash.
     */
    export type Squash = 76
    /**
     * Activity type for climbing stairs.
     */
    export type StairClimbing = 77
    /**
     * Activity type for exercising on a stair climbing machine.
     */
    export type StairClimbingMachine = 78
    /**
     * Activity type for stand-up paddleboarding.
     */
    export type StandUpPaddleboarding = 79
    /**
     * Activity type for resistance training or weight lifting.
     */
    export type StrengthTraining = 80
    /**
     * Activity type for surfing on waves.
     */
    export type Surfing = 81
    /**
     * Activity type for general swimming.
     */
    export type Swimming = 82
    /**
     * Activity type for swimming in a swimming pool.
     */
    export type SwimmingInPool = 83
    /**
     * Activity type for swimming in open water like oceans, lakes or rivers.
     */
    export type OpenWaterSwimming = 84
    /**
     * Activity type for playing table tennis or ping pong.
     */
    export type TableTennis = 85
    /**
     * Activity type for general team sports not otherwise classified.
     */
    export type TeamSports = 86
    /**
     * Activity type for playing tennis.
     */
    export type Tennis = 87
    /**
     * Activity type for exercising on a treadmill.
     */
    export type Treadmill = 88
    /**
     * Activity type for general volleyball.
     */
    export type Volleyball = 89
    /**
     * Activity type for playing volleyball on a beach.
     */
    export type BeachVolleyball = 90
    /**
     * Activity type for playing volleyball indoors.
     */
    export type IndoorVolleyball = 91
    /**
     * Activity type for wakeboarding on water.
     */
    export type Wakeboarding = 92
    /**
     * Activity type for walking specifically for exercise.
     */
    export type WalkingForFitness = 93
    /**
     * Activity type for walking with poles.
     */
    export type NordicWalking = 94
    /**
     * Activity type for walking on a treadmill.
     */
    export type TreadmillWalking = 95
    /**
     * Activity type for playing water polo.
     */
    export type WaterPolo = 96
    /**
     * Activity type for weightlifting exercises.
     */
    export type Weightlifting = 97
    /**
     * Activity type for wheelchair-based movement.
     */
    export type Wheelchair = 98
    /**
     * Activity type for windsurfing on water.
     */
    export type Windsurfing = 99
    /**
     * Activity type for practicing yoga.
     */
    export type Yoga = 100
    /**
     * Activity type for Zumba dance fitness.
     */
    export type Zumba = 101
    /**
     * Activity type for diving or jumping into water.
     */
    export type Diving = 102
    /**
     * Activity type for exercising on an ergometer.
     */
    export type Ergometer = 103
    /**
     * Activity type for skating on ice.
     */
    export type IceSkating = 104
    /**
     * Activity type for skating indoors.
     */
    export type IndoorSkating = 105
    /**
     * Activity type for playing curling on ice.
     */
    export type Curling = 106
    /**
     * Activity type for activities that don't fit into other categories.
     */
    export type Other2 = 108
    /**
     * Activity type for CrossFit training.
     */
    export type CrossFit = 113
    /**
     * Activity type for high-intensity interval training.
     */
    export type HIIT = 114
    /**
     * Activity type for general interval training workouts.
     */
    export type IntervalTraining = 115
    /**
     * Activity type for walking while pushing a stroller.
     */
    export type WalkingWithStroller = 116
    /**
     * Activity type for riding in an elevator.
     */
    export type Elevator = 117
    /**
     * Activity type for riding on an escalator.
     */
    export type Escalator = 118
    /**
     * Activity type for practicing archery.
     */
    export type Archery = 119
    /**
     * Activity type for playing softball.
     */
    export type Softball = 120
    /**
     * Activity type for practicing guided breathing exercises.
     */
    export type GuidedBreathing = 122
    /**
     * Activity type for general cardiovascular exercise.
     */
    export type CardioTraining = 123
    /**
     * Activity type for playing lacrosse.
     */
    export type Lacrosse = 124
    /**
     * Activity type for stretching exercises.
     */
    export type Stretching = 125
    /**
     * Activity type for triathlon events combining swimming, cycling and running.
     */
    export type Triathlon = 126
    /**
     * Activity type for inline skating or rollerblading.
     */
    export type InlineSkating = 127
    /**
     * Activity type for sky diving or parachuting.
     */
    export type SkyDiving = 128
    /**
     * Activity type for general paddling activities.
     */
    export type Paddling = 129
    /**
     * Activity type for mountaineering or alpine climbing.
     */
    export type Mountaineering = 130
    /**
     * Activity type for fishing activities.
     */
    export type Fishing = 131
    /**
     * Activity type for water skiing.
     */
    export type WaterSkiing = 132
    /**
     * Activity type for running indoors.
     */
    export type IndoorRunning = 133
    /**
     * Activity type for playing padel tennis.
     */
    export type PadelTennis = 134
    /**
     * Activity type for driving a vehicle.
     */
    export type Driving = 135
    /**
     * Activity type for driving off-road or on unpaved surfaces.
     */
    export type OffRoadDriving = 136
    /**
     * Activity type for riding a motorcycle.
     */
    export type Motorbiking = 137
    /**
     * Activity type for motorsport racing.
     */
    export type MotorRacing = 138
    /**
     * Activity type for enduro motorcycle racing.
     */
    export type Enduro = 139
    /**
     * Activity type for canoeing on water.
     */
    export type Canoeing = 140
    /**
     * Activity type for orienteering navigation sport.
     */
    export type Orienteering = 141
    /**
     * Activity type for hang gliding.
     */
    export type HangGliding = 142
    /**
     * Activity type for piloting an aircraft.
     */
    export type Flying = 143
    /**
     * Activity type for hot air balloon flying.
     */
    export type HotAirBallooning = 144
    /**
     * Activity type for riding a jet ski on water.
     */
    export type JetSkiing = 145
    /**
     * Activity type for operating a motorized boat.
     */
    export type PowerBoating = 146
    /**
     * Activity type for playing Gaelic football.
     */
    export type GaelicFootball = 147
    /**
     * Activity type for playing hurling.
     */
    export type Hurling = 148
    /**
     * The upload type for the associated workout, providing information on whether this was an automatic workout or user-entered.
     */
    export type HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasUploadTypeYaml =
    	| Unknown2
    	| Automatic
    	| Manual
    	| Update
    	| Delete
    	| Pending
    	| ThirdPartyUpload
    /**
     * The upload type is unknown or could not be determined.
     */
    export type Unknown2 = 0
    /**
     * The workout was automatically detected and recorded by a device or service.
     */
    export type Automatic = 1
    /**
     * The workout was manually entered by the user.
     */
    export type Manual = 2
    /**
     * The workout data represents an update to a previously recorded workout.
     */
    export type Update = 3
    /**
     * The workout was marked for deletion.
     */
    export type Delete = 4
    /**
     * The workout upload is pending processing or confirmation.
     */
    export type Pending = 5
    /**
     * The workout was uploaded or synced from a third-party service or application.
     */
    export type ThirdPartyUpload = 6
    /**
     * Type of oxygen saturation measurement (i.e. blood vs muscle)
     */
    export type HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasOxygenSaturationTypeYaml =
    	Blood | Muscle
    /**
     * Oxygen saturation measurement for blood.
     */
    export type Blood = 0
    /**
     * Oxygen saturation measurement for muscle.
     */
    export type Muscle = 1
    
    export interface Body {
    	/**
    	 * List of user-tracked workouts to post to data provider
    	 */
    	data: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasActivityYaml[]
    	[k: string]: unknown
    }
    export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasActivityYaml {
    	active_durations_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasActiveDurationsDataYaml
    	calories_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasCaloriesDataYaml
    	/**
    	 * Cheat detection flag.
    	 */
    	cheat_detection?: number
    	data_enrichment?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasDataEnrichmentYaml
    	device_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasDeviceDataYaml
    	distance_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasDistanceDataYaml
    	energy_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasEnergyDataYaml
    	heart_rate_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHeartRateDataYaml
    	lap_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasLapDataYaml
    	MET_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasMETDataYaml
    	metadata: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasActivityMetadataYaml
    	movement_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasMovementDataYaml
    	oxygen_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasOxygenDataYaml
    	polyline_map_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasPolylineMapDataYaml
    	position_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasPositionDataYaml
    	power_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasPowerDataYaml
    	strain_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasStrainDataYaml
    	TSS_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasTSSDataYaml
    	work_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasWorkDataYaml
    	[k: string]: unknown
    }
    /**
     * Number of minutes spent at various intensities during the workout, as reported by the Fitness Data provider.
     */
    export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasActiveDurationsDataYaml {
    	/**
    	 * Array of detailed samples of the intensity the user was in at various points during the workout.
    	 */
    	activity_levels_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasActivityLevelSampleYaml[]
    	/**
    	 * Total number of seconds spent in an active state during the workout.
    	 */
    	activity_seconds?: number
    	/**
    	 * Total number of seconds spent in an inactive state during the workout.
    	 */
    	inactivity_seconds?: number
    	/**
    	 * Total number of seconds spent in a low intensity state during the workout.
    	 */
    	low_intensity_seconds?: number
    	/**
    	 * Total number of seconds spent in a moderate intensity state during the workout.
    	 */
    	moderate_intensity_seconds?: number
    	/**
    	 * Maximum number of continuous periods spent in an inactive state during the workout.
    	 */
    	num_continuous_inactive_periods?: number
    	/**
    	 * Total number of seconds spent resting during the workout.
    	 */
    	rest_seconds?: number
    	/**
    	 * Total number of seconds spent in a state of vigorous intensity during the workout.
    	 */
    	vigorous_intensity_seconds?: number
    	standing_hours_count?: number
    	standing_seconds?: number
    	[k: string]: unknown
    }
    export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasActivityLevelSampleYaml {
    	/**
    	 * 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
    	level?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasActivityLevelYaml
    	[k: string]: unknown
    }
    /**
     * Object containing calorie-related information for the user during the specific workout.
     */
    export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasCaloriesDataYaml {
    	BMR_calories?: number
    	calorie_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasCalorieSampleYaml[]
    	net_activity_calories?: number
    	net_intake_calories?: number
    	total_burned_calories?: number
    	[k: string]: unknown
    }
    export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasCalorieSampleYaml {
    	/**
    	 * 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
    	calories?: number
    	timer_duration_seconds?: number
    	[k: string]: unknown
    }
    /**
     * Object containing Terra Scores.
     */
    export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasDataEnrichmentYaml {
    	/**
    	 * User's stress score.
    	 */
    	stress_score?: number
    	[k: string]: unknown
    }
    /**
     * Object containing information on the device which recorded the specific workout.
     */
    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 related to distance covered during the associated workout.
     */
    export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasDistanceDataYaml {
    	detailed?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasDistanceDataDetailedYaml
    	summary?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasDistanceDataSummaryYaml
    	[k: string]: unknown
    }
    /**
     * Object containing detailed distance information - this may included second-by-second samples.
     */
    export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasDistanceDataDetailedYaml {
    	/**
    	 * Array of detailed samples of distance covered throughout the workout.
    	 */
    	distance_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasDistanceSampleYaml[]
    	/**
    	 * Array of detailed samples of elevation throughout the workout.
    	 */
    	elevation_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasElevationSampleYaml[]
    	/**
    	 * Array of detailed samples of floors climbed throughout the workout, as determined by the fitness data provider.
    	 */
    	floors_climbed_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasFloorsClimbedSampleYaml[]
    	/**
    	 * Array of detailed samples of steps performed throughout the workout.
    	 */
    	step_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasStepSampleYaml[]
    	[k: string]: unknown
    }
    export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasDistanceSampleYaml {
    	/**
    	 * 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
    	/**
    	 * Cumulative distance covered up to associated timestamp, since the start of the payload
    	 */
    	distance_meters?: number
    	/**
    	 * Time elapsed since the start of the workout, subtracting time during which the recording was paused
    	 */
    	timer_duration_seconds?: number
    	[k: string]: unknown
    }
    export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasElevationSampleYaml {
    	/**
    	 * 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 altitude at a given point in time, in meters above sea level.
    	 */
    	elev_meters?: number
    	/**
    	 * Time elapsed since the start of the workout, subtracting time during which the recording was paused
    	 */
    	timer_duration_seconds?: number
    	[k: string]: unknown
    }
    export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasFloorsClimbedSampleYaml {
    	/**
    	 * 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
    	/**
    	 * Cumulative number of elevation gain measured in floors climbed up to associated timestamp, since the start of the payload
    	 */
    	floors_climbed?: number
    	/**
    	 * Time elapsed since the start of the workout, subtracting time during which the recording was paused
    	 */
    	timer_duration_seconds?: number
    	[k: string]: unknown
    }
    export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasStepSampleYaml {
    	/**
    	 * 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
    	steps?: number
    	timer_duration_seconds?: number
    	[k: string]: unknown
    }
    /**
     * Object containing summary information related to distance covered throughout the workout.
     */
    export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasDistanceDataSummaryYaml {
    	/**
    	 * Total distance covered by the user throughout the workout.
    	 */
    	distance_meters?: number
    	elevation?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasElevationDataYaml
    	/**
    	 * Total number of elevation gain in floors climbed equivalent throughout the workout, as determined by the fitness data provider.
    	 */
    	floors_climbed?: number
    	/**
    	 * Total number of steps performed during the workout.
    	 */
    	steps?: number
    	swimming?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasSwimmingDataYaml
    	[k: string]: unknown
    }
    /**
     * Average elevation of the user throughout the workout.
     */
    export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasElevationDataYaml {
    	/**
    	 * Average elevation of the user throughout the workout.
    	 */
    	avg_meters?: number
    	/**
    	 * Planned elevation gain for the workout.
    	 */
    	gain_actual_meters?: number
    	/**
    	 * Elevation gain of the user throughout the workout - this includes all elevation gain, and does _not_ represent net gain.
    	 */
    	gain_planned_meters?: number
    	/**
    	 * Elevation loss of the user throughout the workout.
    	 */
    	loss_actual_meters?: number
    	/**
    	 * Maximum elevation of the user during the workout.
    	 */
    	max_meters?: number
    	/**
    	 * Minimum elevation of the user during the workout.
    	 */
    	min_meters?: number
    	[k: string]: unknown
    }
    /**
     * Summary information of the user's swimming statistics for the workout, if applicable.
     */
    export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasSwimmingDataYaml {
    	/**
    	 * Total number of swimming laps performed during the day.
    	 */
    	num_laps?: number
    	/**
    	 * Total number of swimming strokes performed during the day.
    	 */
    	num_strokes?: number
    	/**
    	 * Pool length for associated with the day.
    	 */
    	pool_length_meters?: number
    	[k: string]: unknown
    }
    /**
     * Object containing information on the energy expended by the user during the workout.
     */
    export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasEnergyDataYaml {
    	/**
    	 * Total number of kiloJoules planned to be expended during the workout - represents the user's predefined goal for the workout
    	 */
    	energy_kilojoules?: number
    	/**
    	 * Total number of kiloJoules expended during the workout
    	 */
    	energy_planned_kilojoules?: number
    	[k: string]: unknown
    }
    /**
     * Object containing heartrate-related information for the workout.
     */
    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
    }
    /**
     * Object containing information on data for each lap performed by the user - mostly relates to track & field running activities, and swimming activities.
     */
    export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasLapDataYaml {
    	/**
    	 * Array of datapoints for each lap performed by the user during the workout.
    	 */
    	laps?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasLapSampleYaml[]
    	[k: string]: unknown
    }
    export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasLapSampleYaml {
    	/**
    	 * Calories burned during the lap
    	 */
    	calories?: number
    	/**
    	 * Average heart rate in bpm, for the Lap sample
    	 */
    	avg_hr_bpm?: number
    	/**
    	 * The start time of the associated lap, 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_time?: string
    	/**
    	 * Average speed of the user during the lap
    	 */
    	avg_speed_meters_per_second?: number
    	/**
    	 * Distance covered during the lap
    	 */
    	distance_meters?: number
    	/**
    	 * Total strokes performed during the lap - only relevant for swimming activities
    	 */
    	total_strokes?: number
    	/**
    	 * The end time of the associated lap, in ISO8601 format with microsecond precision. TimeZone info will be provided whenever possible. If absent, the time corresponds to the user's local time
    	 */
    	end_time?: string
    	stroke_type?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasStrokeTypeYaml
    	[k: string]: unknown
    }
    /**
     * Object containing information on the Metabolic Equivalent of Task for the workout.
     */
    export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasMETDataYaml {
    	/**
    	 * An array of Metabolic Equivalent Time samples, as calculated by the user's wearable.
    	 */
    	MET_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasMETSampleYaml[]
    	/**
    	 * The average MET level of the activity.
    	 */
    	avg_level?: number
    	/**
    	 * Number of minutes spent in High Intensity during the workout - based off MET scale.
    	 */
    	num_high_intensity_minutes?: number
    	/**
    	 * Number of minutes spent in state of Inactivity during the workout - based off MET scale.
    	 */
    	num_inactive_minutes?: number
    	/**
    	 * Number of minutes spent in Low Intensity during the workout - based off MET scale.
    	 */
    	num_low_intensity_minutes?: number
    	/**
    	 * Number of minutes spent in Moderate Intensity during the workout - based off MET scale.
    	 */
    	num_moderate_intensity_minutes?: number
    	[k: string]: unknown
    }
    export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasMETSampleYaml {
    	/**
    	 * 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
    	level?: number
    	[k: string]: unknown
    }
    /**
     * Object containing workout metadata.
     */
    export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasActivityMetadataYaml {
    	/**
    	 * The City in which the workout was performed.
    	 */
    	city?: string
    	/**
    	 * The Country in which the workout was performed.
    	 */
    	country?: string
    	/**
    	 * The end time of the associated workout, in ISO8601 format with microsecond precision. TimeZone info will be provided whenever possible. If absent, the time corresponds to the user's local time.
    	 */
    	end_time: string
    	/**
    	 * The name - either user-entered or given by the fitness data provider - of the associated workout.
    	 */
    	name?: string
    	/**
    	 * The start time of the associated workout, 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_time: string
    	/**
    	 * The State in which the workout was performed.
    	 */
    	state?: string
    	/**
    	 * A unique identifier for the workout - note that this is unique for the given user, and may not be globally unique.
    	 */
    	summary_id: string
    	timestamp_localization?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasTimestampLocalizationYaml
    	type: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasActivityTypeYaml
    	upload_type: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasUploadTypeYaml
    	[k: string]: unknown
    }
    /**
     * Object containing information on the user's movement throughout the workout.
     */
    export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasMovementDataYaml {
    	/**
    	 * Adjusted max speed of the user during the workout - generated using Terra's algorithms to remove potential affecting the user's actual max speed measurement.
    	 */
    	adjusted_max_speed_meters_per_second?: number
    	/**
    	 * Average cadence of the user during the workout, in RPM.
    	 */
    	avg_cadence_rpm?: number
    	/**
    	 * Average pace of the user during the workout.
    	 */
    	avg_pace_minutes_per_kilometer?: number
    	/**
    	 * Average speed of the user during the workout.
    	 */
    	avg_speed_meters_per_second?: number
    	/**
    	 * Average torque generated by the user during the workout - mainly relevant for cycling activities.
    	 */
    	avg_torque_newton_meters?: number
    	/**
    	 * Average velocity of the user during the workout - only calculated by certain providers, representing a separate quantity from speed.
    	 */
    	avg_velocity_meters_per_second?: number
    	/**
    	 * Array of cadence values recorded throughout the workout, sampled at intervals determined by the fitness data provider.
    	 */
    	cadence_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasCadenceSampleYaml[]
    	/**
    	 * Maximum cadence of the user during the workout - mainly relevant for cycling activities.
    	 */
    	max_cadence_rpm?: number
    	/**
    	 * Maximum pace of the user during the workout.
    	 */
    	max_pace_minutes_per_kilometer?: number
    	/**
    	 * Maximum speed of the user during the workout.
    	 */
    	max_speed_meters_per_second?: number
    	/**
    	 * Maximum torque generated by the user during the workout - mainly relevant for cycling activities.
    	 */
    	max_torque_newton_meters?: number
    	/**
    	 * Maximum velocity of the user during the workout - only calculated by certain providers, representing a separate quantity from speed.
    	 */
    	max_velocity_meters_per_second?: number
    	/**
    	 * Average normalized speed of the user during the workout - only calculated by certain providers, representing a separate quantity from speed.
    	 */
    	normalized_speed_meters_per_second?: number
    	/**
    	 * Array of the datapoints for the user's speed sampled throughout the workout.
    	 */
    	speed_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasSpeedSampleYaml[]
    	/**
    	 * Array of the datapoints for the user's torque sampled throughout the workout.
    	 */
    	torque_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasTorqueSampleYaml[]
    	[k: string]: unknown
    }
    export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasCadenceSampleYaml {
    	/**
    	 * 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
    	cadence_rpm?: number
    	timer_duration_seconds?: number
    	[k: string]: unknown
    }
    export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasSpeedSampleYaml {
    	/**
    	 * 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
    	speed_meters_per_second?: number
    	timer_duration_seconds?: number
    	[k: string]: unknown
    }
    export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasTorqueSampleYaml {
    	/**
    	 * 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
    	/**
    	 * Time elapsed since the start of the workout, subtracting time during which the recording was paused
    	 */
    	timer_duration_seconds?: number
    	/**
    	 * Torque generated at a given instant in time, in Newton-meters
    	 */
    	torque_newton_meters?: number
    	[k: string]: unknown
    }
    /**
     * Object containing information on oxygen-related metrics for the workout.
     */
    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 polyline-representation map data, plotting the user's trajectory throughout the workout.
     */
    export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasPolylineMapDataYaml {
    	/**
    	 * The polyline representation of the user's trajectory throughout the workout
    	 */
    	summary_polyline?: string
    	[k: string]: unknown
    }
    /**
     * Object containing information on the user's position throughout the workout.
     */
    export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasPositionDataYaml {
    	/**
    	 * Position of the user at the midway point of the workout, represented by a 2-value array of latitude, longitude, wherein each of the two numbers can be nullable.
    	 */
    	center_pos_lat_lng_deg?: number[]
    	/**
    	 * Position of the user at the end of the workout, represented by a 2-value array of latitude, longitude, wherein each of the two numbers can be nullable.
    	 */
    	end_pos_lat_lng_deg?: number[]
    	/**
    	 * Array of datapoints of the position of the user, sampled throughout the workout.
    	 */
    	position_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasPositionSampleYaml[]
    	/**
    	 * Position of the user at the start of the workout, represented by a 2-value array of latitude, longitude, wherein each of the two numbers can be nullable.
    	 */
    	start_pos_lat_lng_deg?: number[]
    	[k: string]: unknown
    }
    export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasPositionSampleYaml {
    	/**
    	 * 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
    	/**
    	 * Position of the user a given point in time, represented by a 2-value array of latitude, longitude, wherein each of the two numbers can be nullable
    	 */
    	coords_lat_lng_deg?: unknown[]
    	/**
    	 * Time elapsed since the start of the workout, subtracting time during which the recording was paused
    	 */
    	timer_duration_seconds?: number
    	[k: string]: unknown
    }
    /**
     * Object containing information on the power generated by the user during the workout.
     */
    export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasPowerDataYaml {
    	/**
    	 * Average power output of the user during the workout.
    	 */
    	avg_watts?: number
    	/**
    	 * Maximum power output of the user during the workout.
    	 */
    	max_watts?: number
    	/**
    	 * Array containing datapoints of the power output of the user sampled throughout the workout.
    	 */
    	power_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasPowerSampleYaml[]
    	[k: string]: unknown
    }
    export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasPowerSampleYaml {
    	/**
    	 * 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
    	/**
    	 * Power generated at a given instant in time, in Watts
    	 */
    	watts?: number
    	/**
    	 * Time elapsed since the start of the workout, subtracting time during which the recording was paused
    	 */
    	timer_duration_seconds?: number
    	[k: string]: unknown
    }
    /**
     * Object containing information on the cardiovascular strain imposed on the user during the workout.
     */
    export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasStrainDataYaml {
    	/**
    	 * Level of cardiovascular strain imposed on the user during the day.
    	 */
    	strain_level?: number
    	[k: string]: unknown
    }
    /**
     * Object containing information on the stress put on the user's body from a workout.
     */
    export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasTSSDataYaml {
    	/**
    	 * Array of TSS information sampled throughout the workout
    	 */
    	TSS_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasTSSSampleYaml[]
    	[k: string]: unknown
    }
    export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasTSSSampleYaml {
    	planned?: number
    	actual?: number
    	method?: string
    	intensity_factor_planned?: number
    	intensity_factor_actual?: number
    	normalized_power_watts?: number
    	[k: string]: unknown
    }
    /**
     * Object containing information on the work output of the user during the workout.
     */
    export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasWorkDataYaml {
    	/**
    	 * Total work output of the user for the workout, in kilojoules.
    	 */
    	work_kilojoules?: number
    	[k: string]: unknown
    }
    

    Submitted by hugo697 235 days ago