0

Post activity data to a provider

by
Published Oct 17, 2025

Used to post activity data to a provider. This endpoint only works for users connected via Wahoo. Returns error for other providers.

Script terra Verified

The script

Submitted by hugo697 Bun
Verified 235 days ago
1
//native
2
/**
3
 * Post activity data to a provider
4
 * Used to post activity data to a provider. This endpoint only works for users connected via Wahoo. Returns error for other providers.
5
 */
6
export async function main(auth: RT.Terra, body: Body) {
7
	const url = new URL(`https://api.tryterra.co/v2/activity`)
8

9
	const response = await fetch(url, {
10
		method: 'POST',
11
		headers: {
12
			'dev-id': auth.devId,
13
			'Content-Type': 'application/json',
14
			'X-api-key': auth.apiKey
15
		},
16
		body: JSON.stringify(body)
17
	})
18
	if (!response.ok) {
19
		const text = await response.text()
20
		throw new Error(`${response.status} ${text}`)
21
	}
22
	return await response.json()
23
}
24

25
/* eslint-disable */
26
/**
27
 * This file was automatically generated by json-schema-to-typescript.
28
 * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
29
 * and run json-schema-to-typescript to regenerate this file.
30
 */
31

32
/**
33
 * Intensity of the user's activity at an instant in time
34
 */
35
export type HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasActivityLevelYaml =
36
	| Unknown
37
	| Rest
38
	| Inactive
39
	| LowIntensity
40
	| MediumIntensity
41
	| HighIntensity
42
/**
43
 * Activity level is unknown or could not be determined.
44
 */
45
export type Unknown = 0
46
/**
47
 * User is at rest, with minimal to no physical activity.
48
 */
49
export type Rest = 1
50
/**
51
 * User is awake but inactive or sedentary.
52
 */
53
export type Inactive = 2
54
/**
55
 * User is engaged in light physical activity such as casual walking.
56
 */
57
export type LowIntensity = 3
58
/**
59
 * User is engaged in moderate physical activity such as brisk walking or light exercise.
60
 */
61
export type MediumIntensity = 4
62
/**
63
 * User is engaged in vigorous physical activity such as running or intense exercise.
64
 */
65
export type HighIntensity = 5
66
/**
67
 * Represents data types that a certain device contributed to.
68
 */
69
export type HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasDeviceDataTypeYaml =
70
	| Steps
71
	| ActiveMinutes
72
	| BasalMetabolicRate
73
	| Calories
74
	| Distance
75
	| HeartRate
76
	| OxygenSaturation
77
	| SleepClassification
78
	| Speed
79
	| Cadence
80
/**
81
 * Count of steps taken by the user.
82
 */
83
export type Steps = 'STEPS'
84
/**
85
 * Duration of time the user spent in physical activity.
86
 */
87
export type ActiveMinutes = 'ACTIVE_MINUTES'
88
/**
89
 * User's basal metabolic rate - calories burned at rest.
90
 */
91
export type BasalMetabolicRate = 'BMR'
92
/**
93
 * Calories burned by the user during activity.
94
 */
95
export type Calories = 'CALORIES'
96
/**
97
 * Distance traveled by the user during activity.
98
 */
99
export type Distance = 'DISTANCE'
100
/**
101
 * User's heart rate measurements.
102
 */
103
export type HeartRate = 'HEART_RATE'
104
/**
105
 * Blood oxygen saturation level (SpO2) of the user.
106
 */
107
export type OxygenSaturation = 'OXYGEN_SATURATION'
108
/**
109
 * Classification of user's sleep stages or types.
110
 */
111
export type SleepClassification = 'SLEEP_TYPE'
112
/**
113
 * User's movement speed during activity.
114
 */
115
export type Speed = 'SPEED'
116
/**
117
 * Rate of movement repetition during activity (steps per minute).
118
 */
119
export type Cadence = 'CADENCE'
120
/**
121
 * Represents data types that a certain device contributed to.
122
 */
123
export type HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasDeviceDataTypeYaml1 =
124

125
		| Steps1
126
		| ActiveMinutes1
127
		| BasalMetabolicRate1
128
		| Calories1
129
		| Distance1
130
		| HeartRate1
131
		| OxygenSaturation1
132
		| SleepClassification1
133
		| Speed1
134
		| Cadence1
135
/**
136
 * Count of steps taken by the user.
137
 */
138
export type Steps1 = 'STEPS'
139
/**
140
 * Duration of time the user spent in physical activity.
141
 */
142
export type ActiveMinutes1 = 'ACTIVE_MINUTES'
143
/**
144
 * User's basal metabolic rate - calories burned at rest.
145
 */
146
export type BasalMetabolicRate1 = 'BMR'
147
/**
148
 * Calories burned by the user during activity.
149
 */
150
export type Calories1 = 'CALORIES'
151
/**
152
 * Distance traveled by the user during activity.
153
 */
154
export type Distance1 = 'DISTANCE'
155
/**
156
 * User's heart rate measurements.
157
 */
158
export type HeartRate1 = 'HEART_RATE'
159
/**
160
 * Blood oxygen saturation level (SpO2) of the user.
161
 */
162
export type OxygenSaturation1 = 'OXYGEN_SATURATION'
163
/**
164
 * Classification of user's sleep stages or types.
165
 */
166
export type SleepClassification1 = 'SLEEP_TYPE'
167
/**
168
 * User's movement speed during activity.
169
 */
170
export type Speed1 = 'SPEED'
171
/**
172
 * Rate of movement repetition during activity (steps per minute).
173
 */
174
export type Cadence1 = 'CADENCE'
175
/**
176
 * Represents the context in which heart rate was measured.
177
 */
178
export type HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHeartRateContextYaml =
179
	NotSet | Active | NotActive
180
/**
181
 * Heart rate measurement context is not specified.
182
 */
183
export type NotSet = 0
184
/**
185
 * Heart rate was measured during physical activity or exercise.
186
 */
187
export type Active = 1
188
/**
189
 * Heart rate was measured during rest or non-active periods.
190
 */
191
export type NotActive = 2
192
/**
193
 * Heart rate zone designation
194
 */
195
export type HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHeartRateZoneYaml =
196
	| Zone0
197
	| Zone1
198
	| Zone2
199
	| Zone3
200
	| Zone4
201
	| Zone5
202
	| Other
203
/**
204
 * Resting heart rate zone.
205
 */
206
export type Zone0 = 0
207
/**
208
 * Very light activity zone.
209
 */
210
export type Zone1 = 1
211
/**
212
 * Light activity zone.
213
 */
214
export type Zone2 = 2
215
/**
216
 * Moderate activity zone.
217
 */
218
export type Zone3 = 3
219
/**
220
 * Hard activity zone.
221
 */
222
export type Zone4 = 4
223
/**
224
 * Maximum effort zone.
225
 */
226
export type Zone5 = 5
227
/**
228
 * Heart rate zone that doesn't fit into the standard zones or couldn't be classified.
229
 */
230
export type Other = 6
231
/**
232
 * Stroke type - only relevant for swimming activities
233
 */
234
export type HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasStrokeTypeYaml =
235
	| Other1
236
	| Freestyle
237
	| Backstroke
238
	| Breaststroke
239
	| Butterfly
240
/**
241
 * Any swimming stroke style that doesn't fit the standard categories.
242
 */
243
export type Other1 = 'other'
244
/**
245
 * Front crawl stroke where swimmers alternate arm movements with face in water.
246
 */
247
export type Freestyle = 'freestyle'
248
/**
249
 * Swimming stroke performed on the back with alternating arm movements.
250
 */
251
export type Backstroke = 'backstroke'
252
/**
253
 * Swimming stroke where arms move simultaneously in a heart-shaped pattern with a frog kick.
254
 */
255
export type Breaststroke = 'breaststroke'
256
/**
257
 * Swimming stroke with simultaneous overhead arm movements and dolphin kick.
258
 */
259
export type Butterfly = 'butterfly'
260
/**
261
 * Indicates whether the timestamps in this payload are localized (LOCAL) or in UTC.
262
 */
263
export type HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasTimestampLocalizationYaml =
264
	0 | 1
265
/**
266
 * The type of activity performed for the associated workout.
267
 */
268
export type HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasActivityTypeYaml =
269
	| InVehicle
270
	| Biking
271
	| Still
272
	| Unknown1
273
	| Tilting
274
	| Walking
275
	| Running
276
	| Aerobics
277
	| Badminton
278
	| Baseball
279
	| Basketball
280
	| Biathlon
281
	| HandBiking
282
	| MountainBiking
283
	| RoadBiking
284
	| Spinning
285
	| StationaryBiking
286
	| UtilityBiking
287
	| Boxing
288
	| Calisthenics
289
	| CircuitTraining
290
	| Cricket
291
	| Dancing
292
	| Elliptical
293
	| Fencing
294
	| AmericanFootball
295
	| AustralianFootball
296
	| EnglishFootball
297
	| Frisbee
298
	| Gardening
299
	| Golf
300
	| Gymnastics
301
	| Handball
302
	| Hiking
303
	| Hockey
304
	| HorsebackRiding
305
	| Housework
306
	| JumpingRope
307
	| Kayaking
308
	| KettlebellTraining
309
	| Kickboxing
310
	| Kitesurfing
311
	| MartialArts
312
	| Meditation
313
	| MixedMartialArts
314
	| P90XExercises
315
	| Paragliding
316
	| Pilates
317
	| Polo
318
	| Racquetball
319
	| RockClimbing
320
	| Rowing
321
	| RowingMachine
322
	| Rugby
323
	| Jogging
324
	| RunningOnSand
325
	| TreadmillRunning
326
	| Sailing
327
	| ScubaDiving
328
	| Skateboarding
329
	| Skating
330
	| CrossSkating
331
	| IndoorRollerblading
332
	| Skiing
333
	| BackCountrySkiing
334
	| CrossCountrySkiing
335
	| DownhillSkiing
336
	| KiteSkiing
337
	| RollerSkiing
338
	| Sledding
339
	| Snowboarding
340
	| Snowmobile
341
	| Snowshoeing
342
	| Squash
343
	| StairClimbing
344
	| StairClimbingMachine
345
	| StandUpPaddleboarding
346
	| StrengthTraining
347
	| Surfing
348
	| Swimming
349
	| SwimmingInPool
350
	| OpenWaterSwimming
351
	| TableTennis
352
	| TeamSports
353
	| Tennis
354
	| Treadmill
355
	| Volleyball
356
	| BeachVolleyball
357
	| IndoorVolleyball
358
	| Wakeboarding
359
	| WalkingForFitness
360
	| NordicWalking
361
	| TreadmillWalking
362
	| WaterPolo
363
	| Weightlifting
364
	| Wheelchair
365
	| Windsurfing
366
	| Yoga
367
	| Zumba
368
	| Diving
369
	| Ergometer
370
	| IceSkating
371
	| IndoorSkating
372
	| Curling
373
	| Other2
374
	| CrossFit
375
	| HIIT
376
	| IntervalTraining
377
	| WalkingWithStroller
378
	| Elevator
379
	| Escalator
380
	| Archery
381
	| Softball
382
	| GuidedBreathing
383
	| CardioTraining
384
	| Lacrosse
385
	| Stretching
386
	| Triathlon
387
	| InlineSkating
388
	| SkyDiving
389
	| Paddling
390
	| Mountaineering
391
	| Fishing
392
	| WaterSkiing
393
	| IndoorRunning
394
	| PadelTennis
395
	| Driving
396
	| OffRoadDriving
397
	| Motorbiking
398
	| MotorRacing
399
	| Enduro
400
	| Canoeing
401
	| Orienteering
402
	| HangGliding
403
	| Flying
404
	| HotAirBallooning
405
	| JetSkiing
406
	| PowerBoating
407
	| GaelicFootball
408
	| Hurling
409
/**
410
 * Activity type for when the user is in a vehicle, such as a car or bus.
411
 */
412
export type InVehicle = 0
413
/**
414
 * Activity type for general biking or cycling.
415
 */
416
export type Biking = 1
417
/**
418
 * Activity type for when the user is still or not moving.
419
 */
420
export type Still = 3
421
/**
422
 * Activity type is unknown or could not be determined.
423
 */
424
export type Unknown1 = 4
425
/**
426
 * Activity type for when the device detects a tilting motion.
427
 */
428
export type Tilting = 5
429
/**
430
 * Activity type for general walking.
431
 */
432
export type Walking = 7
433
/**
434
 * Activity type for general running.
435
 */
436
export type Running = 8
437
/**
438
 * Activity type for aerobic exercises and workouts.
439
 */
440
export type Aerobics = 9
441
/**
442
 * Activity type for playing badminton.
443
 */
444
export type Badminton = 10
445
/**
446
 * Activity type for playing baseball.
447
 */
448
export type Baseball = 11
449
/**
450
 * Activity type for playing basketball.
451
 */
452
export type Basketball = 12
453
/**
454
 * Activity type for biathlon, combining cross-country skiing and rifle shooting.
455
 */
456
export type Biathlon = 13
457
/**
458
 * Activity type for hand biking, using a hand-powered bicycle.
459
 */
460
export type HandBiking = 14
461
/**
462
 * Activity type for off-road cycling on rough terrain.
463
 */
464
export type MountainBiking = 15
465
/**
466
 * Activity type for cycling on paved roads.
467
 */
468
export type RoadBiking = 16
469
/**
470
 * Activity type for indoor cycling classes or spinning.
471
 */
472
export type Spinning = 17
473
/**
474
 * Activity type for exercising on a stationary bicycle.
475
 */
476
export type StationaryBiking = 18
477
/**
478
 * Activity type for cycling for transportation or utility purposes.
479
 */
480
export type UtilityBiking = 19
481
/**
482
 * Activity type for boxing training or matches.
483
 */
484
export type Boxing = 20
485
/**
486
 * Activity type for bodyweight exercises focusing on rhythm and flow.
487
 */
488
export type Calisthenics = 21
489
/**
490
 * Activity type for workout consisting of a series of exercises performed in rotation.
491
 */
492
export type CircuitTraining = 22
493
/**
494
 * Activity type for playing cricket.
495
 */
496
export type Cricket = 23
497
/**
498
 * Activity type for various forms of dance.
499
 */
500
export type Dancing = 24
501
/**
502
 * Activity type for exercising on an elliptical trainer.
503
 */
504
export type Elliptical = 25
505
/**
506
 * Activity type for fencing sport.
507
 */
508
export type Fencing = 26
509
/**
510
 * Activity type for playing American football.
511
 */
512
export type AmericanFootball = 27
513
/**
514
 * Activity type for playing Australian rules football.
515
 */
516
export type AustralianFootball = 28
517
/**
518
 * Activity type for playing soccer/football.
519
 */
520
export type EnglishFootball = 29
521
/**
522
 * Activity type for playing frisbee or disc sports.
523
 */
524
export type Frisbee = 30
525
/**
526
 * Activity type for gardening and yard work.
527
 */
528
export type Gardening = 31
529
/**
530
 * Activity type for playing golf.
531
 */
532
export type Golf = 32
533
/**
534
 * Activity type for performing gymnastics.
535
 */
536
export type Gymnastics = 33
537
/**
538
 * Activity type for playing handball.
539
 */
540
export type Handball = 34
541
/**
542
 * Activity type for hiking or walking on trails.
543
 */
544
export type Hiking = 35
545
/**
546
 * Activity type for playing hockey.
547
 */
548
export type Hockey = 36
549
/**
550
 * Activity type for horseback riding.
551
 */
552
export type HorsebackRiding = 37
553
/**
554
 * Activity type for household chores and cleaning.
555
 */
556
export type Housework = 38
557
/**
558
 * Activity type for skipping or jumping rope.
559
 */
560
export type JumpingRope = 39
561
/**
562
 * Activity type for kayaking on water.
563
 */
564
export type Kayaking = 40
565
/**
566
 * Activity type for exercises using kettlebells.
567
 */
568
export type KettlebellTraining = 41
569
/**
570
 * Activity type for kickboxing training or matches.
571
 */
572
export type Kickboxing = 42
573
/**
574
 * Activity type for kitesurfing or kiteboarding.
575
 */
576
export type Kitesurfing = 43
577
/**
578
 * Activity type for general martial arts training.
579
 */
580
export type MartialArts = 44
581
/**
582
 * Activity type for meditation practice.
583
 */
584
export type Meditation = 45
585
/**
586
 * Activity type for MMA training or fighting.
587
 */
588
export type MixedMartialArts = 46
589
/**
590
 * Activity type for P90X home fitness program.
591
 */
592
export type P90XExercises = 47
593
/**
594
 * Activity type for paragliding sport.
595
 */
596
export type Paragliding = 48
597
/**
598
 * Activity type for pilates exercises.
599
 */
600
export type Pilates = 49
601
/**
602
 * Activity type for playing polo.
603
 */
604
export type Polo = 50
605
/**
606
 * Activity type for playing racquetball.
607
 */
608
export type Racquetball = 51
609
/**
610
 * Activity type for rock climbing.
611
 */
612
export type RockClimbing = 52
613
/**
614
 * Activity type for rowing on water.
615
 */
616
export type Rowing = 53
617
/**
618
 * Activity type for exercising on a rowing machine.
619
 */
620
export type RowingMachine = 54
621
/**
622
 * Activity type for playing rugby.
623
 */
624
export type Rugby = 55
625
/**
626
 * Activity type for jogging at a leisurely pace.
627
 */
628
export type Jogging = 56
629
/**
630
 * Activity type for running on beach or sandy surface.
631
 */
632
export type RunningOnSand = 57
633
/**
634
 * Activity type for running on a treadmill.
635
 */
636
export type TreadmillRunning = 58
637
/**
638
 * Activity type for sailing on water.
639
 */
640
export type Sailing = 59
641
/**
642
 * Activity type for scuba diving underwater.
643
 */
644
export type ScubaDiving = 60
645
/**
646
 * Activity type for skateboarding.
647
 */
648
export type Skateboarding = 61
649
/**
650
 * Activity type for general skating.
651
 */
652
export type Skating = 62
653
/**
654
 * Activity type for cross skating or nordic skating.
655
 */
656
export type CrossSkating = 63
657
/**
658
 * Activity type for rollerblading indoors.
659
 */
660
export type IndoorRollerblading = 64
661
/**
662
 * Activity type for general skiing.
663
 */
664
export type Skiing = 65
665
/**
666
 * Activity type for backcountry or off-piste skiing.
667
 */
668
export type BackCountrySkiing = 66
669
/**
670
 * Activity type for cross-country skiing.
671
 */
672
export type CrossCountrySkiing = 67
673
/**
674
 * Activity type for alpine or downhill skiing.
675
 */
676
export type DownhillSkiing = 68
677
/**
678
 * Activity type for skiing with a kite for propulsion.
679
 */
680
export type KiteSkiing = 69
681
/**
682
 * Activity type for roller skiing on wheels.
683
 */
684
export type RollerSkiing = 70
685
/**
686
 * Activity type for sledding or tobogganing.
687
 */
688
export type Sledding = 71
689
/**
690
 * Activity type for snowboarding.
691
 */
692
export type Snowboarding = 73
693
/**
694
 * Activity type for riding a snowmobile.
695
 */
696
export type Snowmobile = 74
697
/**
698
 * Activity type for walking with snowshoes.
699
 */
700
export type Snowshoeing = 75
701
/**
702
 * Activity type for playing squash.
703
 */
704
export type Squash = 76
705
/**
706
 * Activity type for climbing stairs.
707
 */
708
export type StairClimbing = 77
709
/**
710
 * Activity type for exercising on a stair climbing machine.
711
 */
712
export type StairClimbingMachine = 78
713
/**
714
 * Activity type for stand-up paddleboarding.
715
 */
716
export type StandUpPaddleboarding = 79
717
/**
718
 * Activity type for resistance training or weight lifting.
719
 */
720
export type StrengthTraining = 80
721
/**
722
 * Activity type for surfing on waves.
723
 */
724
export type Surfing = 81
725
/**
726
 * Activity type for general swimming.
727
 */
728
export type Swimming = 82
729
/**
730
 * Activity type for swimming in a swimming pool.
731
 */
732
export type SwimmingInPool = 83
733
/**
734
 * Activity type for swimming in open water like oceans, lakes or rivers.
735
 */
736
export type OpenWaterSwimming = 84
737
/**
738
 * Activity type for playing table tennis or ping pong.
739
 */
740
export type TableTennis = 85
741
/**
742
 * Activity type for general team sports not otherwise classified.
743
 */
744
export type TeamSports = 86
745
/**
746
 * Activity type for playing tennis.
747
 */
748
export type Tennis = 87
749
/**
750
 * Activity type for exercising on a treadmill.
751
 */
752
export type Treadmill = 88
753
/**
754
 * Activity type for general volleyball.
755
 */
756
export type Volleyball = 89
757
/**
758
 * Activity type for playing volleyball on a beach.
759
 */
760
export type BeachVolleyball = 90
761
/**
762
 * Activity type for playing volleyball indoors.
763
 */
764
export type IndoorVolleyball = 91
765
/**
766
 * Activity type for wakeboarding on water.
767
 */
768
export type Wakeboarding = 92
769
/**
770
 * Activity type for walking specifically for exercise.
771
 */
772
export type WalkingForFitness = 93
773
/**
774
 * Activity type for walking with poles.
775
 */
776
export type NordicWalking = 94
777
/**
778
 * Activity type for walking on a treadmill.
779
 */
780
export type TreadmillWalking = 95
781
/**
782
 * Activity type for playing water polo.
783
 */
784
export type WaterPolo = 96
785
/**
786
 * Activity type for weightlifting exercises.
787
 */
788
export type Weightlifting = 97
789
/**
790
 * Activity type for wheelchair-based movement.
791
 */
792
export type Wheelchair = 98
793
/**
794
 * Activity type for windsurfing on water.
795
 */
796
export type Windsurfing = 99
797
/**
798
 * Activity type for practicing yoga.
799
 */
800
export type Yoga = 100
801
/**
802
 * Activity type for Zumba dance fitness.
803
 */
804
export type Zumba = 101
805
/**
806
 * Activity type for diving or jumping into water.
807
 */
808
export type Diving = 102
809
/**
810
 * Activity type for exercising on an ergometer.
811
 */
812
export type Ergometer = 103
813
/**
814
 * Activity type for skating on ice.
815
 */
816
export type IceSkating = 104
817
/**
818
 * Activity type for skating indoors.
819
 */
820
export type IndoorSkating = 105
821
/**
822
 * Activity type for playing curling on ice.
823
 */
824
export type Curling = 106
825
/**
826
 * Activity type for activities that don't fit into other categories.
827
 */
828
export type Other2 = 108
829
/**
830
 * Activity type for CrossFit training.
831
 */
832
export type CrossFit = 113
833
/**
834
 * Activity type for high-intensity interval training.
835
 */
836
export type HIIT = 114
837
/**
838
 * Activity type for general interval training workouts.
839
 */
840
export type IntervalTraining = 115
841
/**
842
 * Activity type for walking while pushing a stroller.
843
 */
844
export type WalkingWithStroller = 116
845
/**
846
 * Activity type for riding in an elevator.
847
 */
848
export type Elevator = 117
849
/**
850
 * Activity type for riding on an escalator.
851
 */
852
export type Escalator = 118
853
/**
854
 * Activity type for practicing archery.
855
 */
856
export type Archery = 119
857
/**
858
 * Activity type for playing softball.
859
 */
860
export type Softball = 120
861
/**
862
 * Activity type for practicing guided breathing exercises.
863
 */
864
export type GuidedBreathing = 122
865
/**
866
 * Activity type for general cardiovascular exercise.
867
 */
868
export type CardioTraining = 123
869
/**
870
 * Activity type for playing lacrosse.
871
 */
872
export type Lacrosse = 124
873
/**
874
 * Activity type for stretching exercises.
875
 */
876
export type Stretching = 125
877
/**
878
 * Activity type for triathlon events combining swimming, cycling and running.
879
 */
880
export type Triathlon = 126
881
/**
882
 * Activity type for inline skating or rollerblading.
883
 */
884
export type InlineSkating = 127
885
/**
886
 * Activity type for sky diving or parachuting.
887
 */
888
export type SkyDiving = 128
889
/**
890
 * Activity type for general paddling activities.
891
 */
892
export type Paddling = 129
893
/**
894
 * Activity type for mountaineering or alpine climbing.
895
 */
896
export type Mountaineering = 130
897
/**
898
 * Activity type for fishing activities.
899
 */
900
export type Fishing = 131
901
/**
902
 * Activity type for water skiing.
903
 */
904
export type WaterSkiing = 132
905
/**
906
 * Activity type for running indoors.
907
 */
908
export type IndoorRunning = 133
909
/**
910
 * Activity type for playing padel tennis.
911
 */
912
export type PadelTennis = 134
913
/**
914
 * Activity type for driving a vehicle.
915
 */
916
export type Driving = 135
917
/**
918
 * Activity type for driving off-road or on unpaved surfaces.
919
 */
920
export type OffRoadDriving = 136
921
/**
922
 * Activity type for riding a motorcycle.
923
 */
924
export type Motorbiking = 137
925
/**
926
 * Activity type for motorsport racing.
927
 */
928
export type MotorRacing = 138
929
/**
930
 * Activity type for enduro motorcycle racing.
931
 */
932
export type Enduro = 139
933
/**
934
 * Activity type for canoeing on water.
935
 */
936
export type Canoeing = 140
937
/**
938
 * Activity type for orienteering navigation sport.
939
 */
940
export type Orienteering = 141
941
/**
942
 * Activity type for hang gliding.
943
 */
944
export type HangGliding = 142
945
/**
946
 * Activity type for piloting an aircraft.
947
 */
948
export type Flying = 143
949
/**
950
 * Activity type for hot air balloon flying.
951
 */
952
export type HotAirBallooning = 144
953
/**
954
 * Activity type for riding a jet ski on water.
955
 */
956
export type JetSkiing = 145
957
/**
958
 * Activity type for operating a motorized boat.
959
 */
960
export type PowerBoating = 146
961
/**
962
 * Activity type for playing Gaelic football.
963
 */
964
export type GaelicFootball = 147
965
/**
966
 * Activity type for playing hurling.
967
 */
968
export type Hurling = 148
969
/**
970
 * The upload type for the associated workout, providing information on whether this was an automatic workout or user-entered.
971
 */
972
export type HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasUploadTypeYaml =
973
	| Unknown2
974
	| Automatic
975
	| Manual
976
	| Update
977
	| Delete
978
	| Pending
979
	| ThirdPartyUpload
980
/**
981
 * The upload type is unknown or could not be determined.
982
 */
983
export type Unknown2 = 0
984
/**
985
 * The workout was automatically detected and recorded by a device or service.
986
 */
987
export type Automatic = 1
988
/**
989
 * The workout was manually entered by the user.
990
 */
991
export type Manual = 2
992
/**
993
 * The workout data represents an update to a previously recorded workout.
994
 */
995
export type Update = 3
996
/**
997
 * The workout was marked for deletion.
998
 */
999
export type Delete = 4
1000
/**
1001
 * The workout upload is pending processing or confirmation.
1002
 */
1003
export type Pending = 5
1004
/**
1005
 * The workout was uploaded or synced from a third-party service or application.
1006
 */
1007
export type ThirdPartyUpload = 6
1008
/**
1009
 * Type of oxygen saturation measurement (i.e. blood vs muscle)
1010
 */
1011
export type HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasOxygenSaturationTypeYaml =
1012
	Blood | Muscle
1013
/**
1014
 * Oxygen saturation measurement for blood.
1015
 */
1016
export type Blood = 0
1017
/**
1018
 * Oxygen saturation measurement for muscle.
1019
 */
1020
export type Muscle = 1
1021

1022
export interface Body {
1023
	/**
1024
	 * List of user-tracked workouts to post to data provider
1025
	 */
1026
	data: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasActivityYaml[]
1027
	[k: string]: unknown
1028
}
1029
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasActivityYaml {
1030
	active_durations_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasActiveDurationsDataYaml
1031
	calories_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasCaloriesDataYaml
1032
	/**
1033
	 * Cheat detection flag.
1034
	 */
1035
	cheat_detection?: number
1036
	data_enrichment?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasDataEnrichmentYaml
1037
	device_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasDeviceDataYaml
1038
	distance_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasDistanceDataYaml
1039
	energy_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasEnergyDataYaml
1040
	heart_rate_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHeartRateDataYaml
1041
	lap_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasLapDataYaml
1042
	MET_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasMETDataYaml
1043
	metadata: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasActivityMetadataYaml
1044
	movement_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasMovementDataYaml
1045
	oxygen_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasOxygenDataYaml
1046
	polyline_map_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasPolylineMapDataYaml
1047
	position_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasPositionDataYaml
1048
	power_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasPowerDataYaml
1049
	strain_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasStrainDataYaml
1050
	TSS_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasTSSDataYaml
1051
	work_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasWorkDataYaml
1052
	[k: string]: unknown
1053
}
1054
/**
1055
 * Number of minutes spent at various intensities during the workout, as reported by the Fitness Data provider.
1056
 */
1057
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasActiveDurationsDataYaml {
1058
	/**
1059
	 * Array of detailed samples of the intensity the user was in at various points during the workout.
1060
	 */
1061
	activity_levels_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasActivityLevelSampleYaml[]
1062
	/**
1063
	 * Total number of seconds spent in an active state during the workout.
1064
	 */
1065
	activity_seconds?: number
1066
	/**
1067
	 * Total number of seconds spent in an inactive state during the workout.
1068
	 */
1069
	inactivity_seconds?: number
1070
	/**
1071
	 * Total number of seconds spent in a low intensity state during the workout.
1072
	 */
1073
	low_intensity_seconds?: number
1074
	/**
1075
	 * Total number of seconds spent in a moderate intensity state during the workout.
1076
	 */
1077
	moderate_intensity_seconds?: number
1078
	/**
1079
	 * Maximum number of continuous periods spent in an inactive state during the workout.
1080
	 */
1081
	num_continuous_inactive_periods?: number
1082
	/**
1083
	 * Total number of seconds spent resting during the workout.
1084
	 */
1085
	rest_seconds?: number
1086
	/**
1087
	 * Total number of seconds spent in a state of vigorous intensity during the workout.
1088
	 */
1089
	vigorous_intensity_seconds?: number
1090
	standing_hours_count?: number
1091
	standing_seconds?: number
1092
	[k: string]: unknown
1093
}
1094
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasActivityLevelSampleYaml {
1095
	/**
1096
	 * 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.
1097
	 */
1098
	timestamp?: string
1099
	level?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasActivityLevelYaml
1100
	[k: string]: unknown
1101
}
1102
/**
1103
 * Object containing calorie-related information for the user during the specific workout.
1104
 */
1105
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasCaloriesDataYaml {
1106
	BMR_calories?: number
1107
	calorie_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasCalorieSampleYaml[]
1108
	net_activity_calories?: number
1109
	net_intake_calories?: number
1110
	total_burned_calories?: number
1111
	[k: string]: unknown
1112
}
1113
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasCalorieSampleYaml {
1114
	/**
1115
	 * 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.
1116
	 */
1117
	timestamp?: string
1118
	calories?: number
1119
	timer_duration_seconds?: number
1120
	[k: string]: unknown
1121
}
1122
/**
1123
 * Object containing Terra Scores.
1124
 */
1125
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasDataEnrichmentYaml {
1126
	/**
1127
	 * User's stress score.
1128
	 */
1129
	stress_score?: number
1130
	[k: string]: unknown
1131
}
1132
/**
1133
 * Object containing information on the device which recorded the specific workout.
1134
 */
1135
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasDeviceDataYaml {
1136
	/**
1137
	 * Activation timestamp of the device, if applicable.
1138
	 */
1139
	activation_timestamp?: string
1140
	/**
1141
	 * Data provided by the device, as enumerated types.
1142
	 */
1143
	data_provided?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasDeviceDataTypeYaml[]
1144
	/**
1145
	 * Hardware version of the device.
1146
	 */
1147
	hardware_version?: string
1148
	/**
1149
	 * Last upload date from the device.
1150
	 */
1151
	last_upload_date?: string
1152
	/**
1153
	 * Device manufacturer name.
1154
	 */
1155
	manufacturer?: string
1156
	/**
1157
	 * 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.
1158
	 */
1159
	name?: string
1160
	/**
1161
	 * Data pertaining to other devices which may have contributed data for this workout.
1162
	 */
1163
	other_devices?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasOtherDeviceDataYaml[]
1164
	/**
1165
	 * Sensor state of the device.
1166
	 */
1167
	sensor_state?: string
1168
	/**
1169
	 * Device Serial Number.
1170
	 */
1171
	serial_number?: string
1172
	/**
1173
	 * Device Software Version.
1174
	 */
1175
	software_version?: string
1176
	[k: string]: unknown
1177
}
1178
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasOtherDeviceDataYaml {
1179
	/**
1180
	 * Device manufacturer name.
1181
	 */
1182
	manufacturer?: string
1183
	/**
1184
	 * Hardware version of the device.
1185
	 */
1186
	hardware_version?: string
1187
	/**
1188
	 * Device Serial Number.
1189
	 */
1190
	serial_number?: string
1191
	/**
1192
	 * 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.
1193
	 */
1194
	name?: string
1195
	/**
1196
	 * Device Software Version.
1197
	 */
1198
	software_version?: string
1199
	activation_timestamp?: string
1200
	data_provided?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasDeviceDataTypeYaml1[]
1201
	last_upload_date?: string
1202
	[k: string]: unknown
1203
}
1204
/**
1205
 * Object containing information related to distance covered during the associated workout.
1206
 */
1207
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasDistanceDataYaml {
1208
	detailed?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasDistanceDataDetailedYaml
1209
	summary?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasDistanceDataSummaryYaml
1210
	[k: string]: unknown
1211
}
1212
/**
1213
 * Object containing detailed distance information - this may included second-by-second samples.
1214
 */
1215
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasDistanceDataDetailedYaml {
1216
	/**
1217
	 * Array of detailed samples of distance covered throughout the workout.
1218
	 */
1219
	distance_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasDistanceSampleYaml[]
1220
	/**
1221
	 * Array of detailed samples of elevation throughout the workout.
1222
	 */
1223
	elevation_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasElevationSampleYaml[]
1224
	/**
1225
	 * Array of detailed samples of floors climbed throughout the workout, as determined by the fitness data provider.
1226
	 */
1227
	floors_climbed_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasFloorsClimbedSampleYaml[]
1228
	/**
1229
	 * Array of detailed samples of steps performed throughout the workout.
1230
	 */
1231
	step_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasStepSampleYaml[]
1232
	[k: string]: unknown
1233
}
1234
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasDistanceSampleYaml {
1235
	/**
1236
	 * 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.
1237
	 */
1238
	timestamp?: string
1239
	/**
1240
	 * Cumulative distance covered up to associated timestamp, since the start of the payload
1241
	 */
1242
	distance_meters?: number
1243
	/**
1244
	 * Time elapsed since the start of the workout, subtracting time during which the recording was paused
1245
	 */
1246
	timer_duration_seconds?: number
1247
	[k: string]: unknown
1248
}
1249
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasElevationSampleYaml {
1250
	/**
1251
	 * 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.
1252
	 */
1253
	timestamp?: string
1254
	/**
1255
	 * User's altitude at a given point in time, in meters above sea level.
1256
	 */
1257
	elev_meters?: number
1258
	/**
1259
	 * Time elapsed since the start of the workout, subtracting time during which the recording was paused
1260
	 */
1261
	timer_duration_seconds?: number
1262
	[k: string]: unknown
1263
}
1264
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasFloorsClimbedSampleYaml {
1265
	/**
1266
	 * 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.
1267
	 */
1268
	timestamp?: string
1269
	/**
1270
	 * Cumulative number of elevation gain measured in floors climbed up to associated timestamp, since the start of the payload
1271
	 */
1272
	floors_climbed?: number
1273
	/**
1274
	 * Time elapsed since the start of the workout, subtracting time during which the recording was paused
1275
	 */
1276
	timer_duration_seconds?: number
1277
	[k: string]: unknown
1278
}
1279
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasStepSampleYaml {
1280
	/**
1281
	 * 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.
1282
	 */
1283
	timestamp?: string
1284
	steps?: number
1285
	timer_duration_seconds?: number
1286
	[k: string]: unknown
1287
}
1288
/**
1289
 * Object containing summary information related to distance covered throughout the workout.
1290
 */
1291
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasDistanceDataSummaryYaml {
1292
	/**
1293
	 * Total distance covered by the user throughout the workout.
1294
	 */
1295
	distance_meters?: number
1296
	elevation?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasElevationDataYaml
1297
	/**
1298
	 * Total number of elevation gain in floors climbed equivalent throughout the workout, as determined by the fitness data provider.
1299
	 */
1300
	floors_climbed?: number
1301
	/**
1302
	 * Total number of steps performed during the workout.
1303
	 */
1304
	steps?: number
1305
	swimming?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasSwimmingDataYaml
1306
	[k: string]: unknown
1307
}
1308
/**
1309
 * Average elevation of the user throughout the workout.
1310
 */
1311
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasElevationDataYaml {
1312
	/**
1313
	 * Average elevation of the user throughout the workout.
1314
	 */
1315
	avg_meters?: number
1316
	/**
1317
	 * Planned elevation gain for the workout.
1318
	 */
1319
	gain_actual_meters?: number
1320
	/**
1321
	 * Elevation gain of the user throughout the workout - this includes all elevation gain, and does _not_ represent net gain.
1322
	 */
1323
	gain_planned_meters?: number
1324
	/**
1325
	 * Elevation loss of the user throughout the workout.
1326
	 */
1327
	loss_actual_meters?: number
1328
	/**
1329
	 * Maximum elevation of the user during the workout.
1330
	 */
1331
	max_meters?: number
1332
	/**
1333
	 * Minimum elevation of the user during the workout.
1334
	 */
1335
	min_meters?: number
1336
	[k: string]: unknown
1337
}
1338
/**
1339
 * Summary information of the user's swimming statistics for the workout, if applicable.
1340
 */
1341
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasSwimmingDataYaml {
1342
	/**
1343
	 * Total number of swimming laps performed during the day.
1344
	 */
1345
	num_laps?: number
1346
	/**
1347
	 * Total number of swimming strokes performed during the day.
1348
	 */
1349
	num_strokes?: number
1350
	/**
1351
	 * Pool length for associated with the day.
1352
	 */
1353
	pool_length_meters?: number
1354
	[k: string]: unknown
1355
}
1356
/**
1357
 * Object containing information on the energy expended by the user during the workout.
1358
 */
1359
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasEnergyDataYaml {
1360
	/**
1361
	 * Total number of kiloJoules planned to be expended during the workout - represents the user's predefined goal for the workout
1362
	 */
1363
	energy_kilojoules?: number
1364
	/**
1365
	 * Total number of kiloJoules expended during the workout
1366
	 */
1367
	energy_planned_kilojoules?: number
1368
	[k: string]: unknown
1369
}
1370
/**
1371
 * Object containing heartrate-related information for the workout.
1372
 */
1373
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHeartRateDataYaml {
1374
	detailed?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHeartRateDataDetailedYaml
1375
	summary?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHeartRateDataSummaryYaml
1376
	[k: string]: unknown
1377
}
1378
/**
1379
 * Object containing detailed heart rate information for the associated workout.
1380
 */
1381
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHeartRateDataDetailedYaml {
1382
	/**
1383
	 * Array of HeartRate data samples recorded for the user during the workout.
1384
	 */
1385
	hr_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHeartRateDataSampleYaml[]
1386
	/**
1387
	 * Array of HeartRate Variability data samples recorded for the user during the workout, computed using RMSSD.
1388
	 */
1389
	hrv_samples_rmssd?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHeartRateVariabilityDataSampleRMSSDYaml[]
1390
	/**
1391
	 * Array of HeartRate Variability data samples recorded for the user during the workout, computed using SDNN.
1392
	 */
1393
	hrv_samples_sdnn?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHeartRateVariabilityDataSampleSDNNYaml[]
1394
	[k: string]: unknown
1395
}
1396
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHeartRateDataSampleYaml {
1397
	/**
1398
	 * 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.
1399
	 */
1400
	timestamp?: string
1401
	/**
1402
	 * User's heart rate in bpm
1403
	 */
1404
	bpm?: number
1405
	/**
1406
	 * Time elapsed since the start of the workout, subtracting time during which the recording was paused
1407
	 */
1408
	timer_duration_seconds?: number
1409
	context?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHeartRateContextYaml
1410
	[k: string]: unknown
1411
}
1412
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHeartRateVariabilityDataSampleRMSSDYaml {
1413
	/**
1414
	 * 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.
1415
	 */
1416
	timestamp?: string
1417
	/**
1418
	 * User's Heart Rate Variability, computed using RMSSD
1419
	 */
1420
	hrv_rmssd?: number
1421
	[k: string]: unknown
1422
}
1423
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHeartRateVariabilityDataSampleSDNNYaml {
1424
	/**
1425
	 * 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.
1426
	 */
1427
	timestamp?: string
1428
	/**
1429
	 * User's Heart Rate Variability, computed using SDNN
1430
	 */
1431
	hrv_sdnn?: number
1432
	[k: string]: unknown
1433
}
1434
/**
1435
 * Object containing summary heart rate information for the associated workout.
1436
 */
1437
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHeartRateDataSummaryYaml {
1438
	/**
1439
	 * Average HeartRate of the user during the workout.
1440
	 */
1441
	avg_hr_bpm?: number
1442
	/**
1443
	 * Average HeartRate Variability of the user during the workout, computed using RMSSD.
1444
	 */
1445
	avg_hrv_rmssd?: number
1446
	/**
1447
	 * Average HeartRate Variability of the user during the workout, computed using SDNN.
1448
	 */
1449
	avg_hrv_sdnn?: number
1450
	/**
1451
	 * Array of time spent in various HR zones throughout the workout.
1452
	 */
1453
	hr_zone_data?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHeartRateZoneDataYaml[]
1454
	/**
1455
	 * Maximum HeartRate of the user during the workout.
1456
	 */
1457
	max_hr_bpm?: number
1458
	/**
1459
	 * Minimum HeartRate of the user during the workout.
1460
	 */
1461
	min_hr_bpm?: number
1462
	/**
1463
	 * Resting HeartRate of the user, as determined by the fitness data provider.
1464
	 */
1465
	resting_hr_bpm?: number
1466
	/**
1467
	 * User's maximum HeartRate based on their age, and other factors as determined by the fitness data provider.
1468
	 */
1469
	user_max_hr_bpm?: number
1470
	[k: string]: unknown
1471
}
1472
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHeartRateZoneDataYaml {
1473
	zone?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasHeartRateZoneYaml
1474
	/**
1475
	 * Start percentage (based off user's max HR) of the HR zone
1476
	 */
1477
	start_percentage?: number
1478
	/**
1479
	 * End percentage (based off user's max HR) of the HR zone
1480
	 */
1481
	end_percentage?: number
1482
	/**
1483
	 * Name of the associated heart rate zone
1484
	 */
1485
	name?: string
1486
	/**
1487
	 * Duration spent in the heart rate zone
1488
	 */
1489
	duration_seconds?: number
1490
	[k: string]: unknown
1491
}
1492
/**
1493
 * Object containing information on data for each lap performed by the user - mostly relates to track & field running activities, and swimming activities.
1494
 */
1495
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasLapDataYaml {
1496
	/**
1497
	 * Array of datapoints for each lap performed by the user during the workout.
1498
	 */
1499
	laps?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasLapSampleYaml[]
1500
	[k: string]: unknown
1501
}
1502
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasLapSampleYaml {
1503
	/**
1504
	 * Calories burned during the lap
1505
	 */
1506
	calories?: number
1507
	/**
1508
	 * Average heart rate in bpm, for the Lap sample
1509
	 */
1510
	avg_hr_bpm?: number
1511
	/**
1512
	 * 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
1513
	 */
1514
	start_time?: string
1515
	/**
1516
	 * Average speed of the user during the lap
1517
	 */
1518
	avg_speed_meters_per_second?: number
1519
	/**
1520
	 * Distance covered during the lap
1521
	 */
1522
	distance_meters?: number
1523
	/**
1524
	 * Total strokes performed during the lap - only relevant for swimming activities
1525
	 */
1526
	total_strokes?: number
1527
	/**
1528
	 * 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
1529
	 */
1530
	end_time?: string
1531
	stroke_type?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasStrokeTypeYaml
1532
	[k: string]: unknown
1533
}
1534
/**
1535
 * Object containing information on the Metabolic Equivalent of Task for the workout.
1536
 */
1537
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasMETDataYaml {
1538
	/**
1539
	 * An array of Metabolic Equivalent Time samples, as calculated by the user's wearable.
1540
	 */
1541
	MET_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasMETSampleYaml[]
1542
	/**
1543
	 * The average MET level of the activity.
1544
	 */
1545
	avg_level?: number
1546
	/**
1547
	 * Number of minutes spent in High Intensity during the workout - based off MET scale.
1548
	 */
1549
	num_high_intensity_minutes?: number
1550
	/**
1551
	 * Number of minutes spent in state of Inactivity during the workout - based off MET scale.
1552
	 */
1553
	num_inactive_minutes?: number
1554
	/**
1555
	 * Number of minutes spent in Low Intensity during the workout - based off MET scale.
1556
	 */
1557
	num_low_intensity_minutes?: number
1558
	/**
1559
	 * Number of minutes spent in Moderate Intensity during the workout - based off MET scale.
1560
	 */
1561
	num_moderate_intensity_minutes?: number
1562
	[k: string]: unknown
1563
}
1564
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasMETSampleYaml {
1565
	/**
1566
	 * 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.
1567
	 */
1568
	timestamp?: string
1569
	level?: number
1570
	[k: string]: unknown
1571
}
1572
/**
1573
 * Object containing workout metadata.
1574
 */
1575
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasActivityMetadataYaml {
1576
	/**
1577
	 * The City in which the workout was performed.
1578
	 */
1579
	city?: string
1580
	/**
1581
	 * The Country in which the workout was performed.
1582
	 */
1583
	country?: string
1584
	/**
1585
	 * 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.
1586
	 */
1587
	end_time: string
1588
	/**
1589
	 * The name - either user-entered or given by the fitness data provider - of the associated workout.
1590
	 */
1591
	name?: string
1592
	/**
1593
	 * 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.
1594
	 */
1595
	start_time: string
1596
	/**
1597
	 * The State in which the workout was performed.
1598
	 */
1599
	state?: string
1600
	/**
1601
	 * A unique identifier for the workout - note that this is unique for the given user, and may not be globally unique.
1602
	 */
1603
	summary_id: string
1604
	timestamp_localization?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasTimestampLocalizationYaml
1605
	type: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasActivityTypeYaml
1606
	upload_type: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasUploadTypeYaml
1607
	[k: string]: unknown
1608
}
1609
/**
1610
 * Object containing information on the user's movement throughout the workout.
1611
 */
1612
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasMovementDataYaml {
1613
	/**
1614
	 * 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.
1615
	 */
1616
	adjusted_max_speed_meters_per_second?: number
1617
	/**
1618
	 * Average cadence of the user during the workout, in RPM.
1619
	 */
1620
	avg_cadence_rpm?: number
1621
	/**
1622
	 * Average pace of the user during the workout.
1623
	 */
1624
	avg_pace_minutes_per_kilometer?: number
1625
	/**
1626
	 * Average speed of the user during the workout.
1627
	 */
1628
	avg_speed_meters_per_second?: number
1629
	/**
1630
	 * Average torque generated by the user during the workout - mainly relevant for cycling activities.
1631
	 */
1632
	avg_torque_newton_meters?: number
1633
	/**
1634
	 * Average velocity of the user during the workout - only calculated by certain providers, representing a separate quantity from speed.
1635
	 */
1636
	avg_velocity_meters_per_second?: number
1637
	/**
1638
	 * Array of cadence values recorded throughout the workout, sampled at intervals determined by the fitness data provider.
1639
	 */
1640
	cadence_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasCadenceSampleYaml[]
1641
	/**
1642
	 * Maximum cadence of the user during the workout - mainly relevant for cycling activities.
1643
	 */
1644
	max_cadence_rpm?: number
1645
	/**
1646
	 * Maximum pace of the user during the workout.
1647
	 */
1648
	max_pace_minutes_per_kilometer?: number
1649
	/**
1650
	 * Maximum speed of the user during the workout.
1651
	 */
1652
	max_speed_meters_per_second?: number
1653
	/**
1654
	 * Maximum torque generated by the user during the workout - mainly relevant for cycling activities.
1655
	 */
1656
	max_torque_newton_meters?: number
1657
	/**
1658
	 * Maximum velocity of the user during the workout - only calculated by certain providers, representing a separate quantity from speed.
1659
	 */
1660
	max_velocity_meters_per_second?: number
1661
	/**
1662
	 * Average normalized speed of the user during the workout - only calculated by certain providers, representing a separate quantity from speed.
1663
	 */
1664
	normalized_speed_meters_per_second?: number
1665
	/**
1666
	 * Array of the datapoints for the user's speed sampled throughout the workout.
1667
	 */
1668
	speed_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasSpeedSampleYaml[]
1669
	/**
1670
	 * Array of the datapoints for the user's torque sampled throughout the workout.
1671
	 */
1672
	torque_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasTorqueSampleYaml[]
1673
	[k: string]: unknown
1674
}
1675
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasCadenceSampleYaml {
1676
	/**
1677
	 * 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.
1678
	 */
1679
	timestamp?: string
1680
	cadence_rpm?: number
1681
	timer_duration_seconds?: number
1682
	[k: string]: unknown
1683
}
1684
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasSpeedSampleYaml {
1685
	/**
1686
	 * 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.
1687
	 */
1688
	timestamp?: string
1689
	speed_meters_per_second?: number
1690
	timer_duration_seconds?: number
1691
	[k: string]: unknown
1692
}
1693
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasTorqueSampleYaml {
1694
	/**
1695
	 * 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
1696
	 */
1697
	timestamp?: string
1698
	/**
1699
	 * Time elapsed since the start of the workout, subtracting time during which the recording was paused
1700
	 */
1701
	timer_duration_seconds?: number
1702
	/**
1703
	 * Torque generated at a given instant in time, in Newton-meters
1704
	 */
1705
	torque_newton_meters?: number
1706
	[k: string]: unknown
1707
}
1708
/**
1709
 * Object containing information on oxygen-related metrics for the workout.
1710
 */
1711
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasOxygenDataYaml {
1712
	/**
1713
	 * Average Oxygen Saturation percentage of the user during the day (SpO2 or SmO2).
1714
	 */
1715
	avg_saturation_percentage?: number
1716
	/**
1717
	 * Array of Oxygen Saturation percentage datapoints sampled throughout the day.
1718
	 */
1719
	saturation_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasOxygenSaturationSampleYaml[]
1720
	/**
1721
	 * Array of VO2 datapoints sampled throughout the day.
1722
	 */
1723
	vo2_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasVo2MaxSampleYaml[]
1724
	/**
1725
	 * VO2Max for the given user.
1726
	 */
1727
	vo2max_ml_per_min_per_kg?: number
1728
	[k: string]: unknown
1729
}
1730
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasOxygenSaturationSampleYaml {
1731
	/**
1732
	 * 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.
1733
	 */
1734
	timestamp?: string
1735
	/**
1736
	 * User's oxygen saturation percentage - referring to either SpO2 or SmO2, based on the `type` field
1737
	 */
1738
	percentage?: number
1739
	type?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasOxygenSaturationTypeYaml
1740
	[k: string]: unknown
1741
}
1742
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasVo2MaxSampleYaml {
1743
	/**
1744
	 * 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.
1745
	 */
1746
	timestamp?: string
1747
	/**
1748
	 * User's VO2Max - maximum amount of oxygen the user's body can utilize during exercise
1749
	 */
1750
	vo2max_ml_per_min_per_kg?: number
1751
	[k: string]: unknown
1752
}
1753
/**
1754
 * Object containing polyline-representation map data, plotting the user's trajectory throughout the workout.
1755
 */
1756
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasPolylineMapDataYaml {
1757
	/**
1758
	 * The polyline representation of the user's trajectory throughout the workout
1759
	 */
1760
	summary_polyline?: string
1761
	[k: string]: unknown
1762
}
1763
/**
1764
 * Object containing information on the user's position throughout the workout.
1765
 */
1766
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasPositionDataYaml {
1767
	/**
1768
	 * 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.
1769
	 */
1770
	center_pos_lat_lng_deg?: number[]
1771
	/**
1772
	 * 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.
1773
	 */
1774
	end_pos_lat_lng_deg?: number[]
1775
	/**
1776
	 * Array of datapoints of the position of the user, sampled throughout the workout.
1777
	 */
1778
	position_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasPositionSampleYaml[]
1779
	/**
1780
	 * 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.
1781
	 */
1782
	start_pos_lat_lng_deg?: number[]
1783
	[k: string]: unknown
1784
}
1785
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasPositionSampleYaml {
1786
	/**
1787
	 * 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.
1788
	 */
1789
	timestamp?: string
1790
	/**
1791
	 * 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
1792
	 */
1793
	coords_lat_lng_deg?: unknown[]
1794
	/**
1795
	 * Time elapsed since the start of the workout, subtracting time during which the recording was paused
1796
	 */
1797
	timer_duration_seconds?: number
1798
	[k: string]: unknown
1799
}
1800
/**
1801
 * Object containing information on the power generated by the user during the workout.
1802
 */
1803
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasPowerDataYaml {
1804
	/**
1805
	 * Average power output of the user during the workout.
1806
	 */
1807
	avg_watts?: number
1808
	/**
1809
	 * Maximum power output of the user during the workout.
1810
	 */
1811
	max_watts?: number
1812
	/**
1813
	 * Array containing datapoints of the power output of the user sampled throughout the workout.
1814
	 */
1815
	power_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasPowerSampleYaml[]
1816
	[k: string]: unknown
1817
}
1818
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasPowerSampleYaml {
1819
	/**
1820
	 * 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.
1821
	 */
1822
	timestamp?: string
1823
	/**
1824
	 * Power generated at a given instant in time, in Watts
1825
	 */
1826
	watts?: number
1827
	/**
1828
	 * Time elapsed since the start of the workout, subtracting time during which the recording was paused
1829
	 */
1830
	timer_duration_seconds?: number
1831
	[k: string]: unknown
1832
}
1833
/**
1834
 * Object containing information on the cardiovascular strain imposed on the user during the workout.
1835
 */
1836
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasStrainDataYaml {
1837
	/**
1838
	 * Level of cardiovascular strain imposed on the user during the day.
1839
	 */
1840
	strain_level?: number
1841
	[k: string]: unknown
1842
}
1843
/**
1844
 * Object containing information on the stress put on the user's body from a workout.
1845
 */
1846
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasTSSDataYaml {
1847
	/**
1848
	 * Array of TSS information sampled throughout the workout
1849
	 */
1850
	TSS_samples?: HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasTSSSampleYaml[]
1851
	[k: string]: unknown
1852
}
1853
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasTSSSampleYaml {
1854
	planned?: number
1855
	actual?: number
1856
	method?: string
1857
	intensity_factor_planned?: number
1858
	intensity_factor_actual?: number
1859
	normalized_power_watts?: number
1860
	[k: string]: unknown
1861
}
1862
/**
1863
 * Object containing information on the work output of the user during the workout.
1864
 */
1865
export interface HttpsRawGithubusercontentComTryterraOpenapiRefsHeadsV5UpdateSchemasWorkDataYaml {
1866
	/**
1867
	 * Total work output of the user for the workout, in kilojoules.
1868
	 */
1869
	work_kilojoules?: number
1870
	[k: string]: unknown
1871
}
1872