@nativesquare/soma 0.9.3 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (202) hide show
  1. package/dist/client/index.d.ts +96 -33
  2. package/dist/client/index.d.ts.map +1 -1
  3. package/dist/client/index.js +80 -35
  4. package/dist/client/index.js.map +1 -1
  5. package/dist/component/_generated/api.d.ts +18 -0
  6. package/dist/component/_generated/api.d.ts.map +1 -1
  7. package/dist/component/_generated/api.js.map +1 -1
  8. package/dist/component/_generated/component.d.ts +43 -9
  9. package/dist/component/_generated/component.d.ts.map +1 -1
  10. package/dist/component/garmin/auth.d.ts +0 -4
  11. package/dist/component/garmin/auth.d.ts.map +1 -1
  12. package/dist/component/garmin/auth.js +0 -8
  13. package/dist/component/garmin/auth.js.map +1 -1
  14. package/dist/component/garmin/private.d.ts +20 -3
  15. package/dist/component/garmin/private.d.ts.map +1 -1
  16. package/dist/component/garmin/private.js +17 -26
  17. package/dist/component/garmin/private.js.map +1 -1
  18. package/dist/component/garmin/public.d.ts +4 -4
  19. package/dist/component/garmin/public.d.ts.map +1 -1
  20. package/dist/component/garmin/public.js +6 -1
  21. package/dist/component/garmin/public.js.map +1 -1
  22. package/dist/component/garmin/webhooks.d.ts +4 -0
  23. package/dist/component/garmin/webhooks.d.ts.map +1 -1
  24. package/dist/component/garmin/webhooks.js +23 -18
  25. package/dist/component/garmin/webhooks.js.map +1 -1
  26. package/dist/component/schema.d.ts +2 -2
  27. package/dist/component/schema.d.ts.map +1 -1
  28. package/dist/component/schema.js +5 -3
  29. package/dist/component/schema.js.map +1 -1
  30. package/dist/{strava → component/strava}/auth.d.ts +15 -48
  31. package/dist/component/strava/auth.d.ts.map +1 -0
  32. package/dist/{strava → component/strava}/auth.js +4 -39
  33. package/dist/component/strava/auth.js.map +1 -0
  34. package/dist/component/strava/client.d.ts +8 -0
  35. package/dist/component/strava/client.d.ts.map +1 -0
  36. package/dist/component/strava/client.js +18 -0
  37. package/dist/component/strava/client.js.map +1 -0
  38. package/dist/component/strava/private.d.ts +19 -0
  39. package/dist/component/strava/private.d.ts.map +1 -1
  40. package/dist/component/strava/private.js +52 -2
  41. package/dist/component/strava/private.js.map +1 -1
  42. package/dist/component/strava/public.d.ts +87 -12
  43. package/dist/component/strava/public.d.ts.map +1 -1
  44. package/dist/component/strava/public.js +218 -92
  45. package/dist/component/strava/public.js.map +1 -1
  46. package/dist/component/strava/transform/activity.d.ts +19 -0
  47. package/dist/component/strava/transform/activity.d.ts.map +1 -0
  48. package/dist/{strava → component/strava/transform}/activity.js +21 -41
  49. package/dist/component/strava/transform/activity.js.map +1 -0
  50. package/dist/{strava → component/strava/transform}/athlete.d.ts +4 -10
  51. package/dist/component/strava/transform/athlete.d.ts.map +1 -0
  52. package/dist/{strava → component/strava/transform}/athlete.js +2 -8
  53. package/dist/component/strava/transform/athlete.js.map +1 -0
  54. package/dist/component/strava/transform/maps/sportType.d.ts +7 -0
  55. package/dist/component/strava/transform/maps/sportType.d.ts.map +1 -0
  56. package/dist/{strava/maps/sport-type.js → component/strava/transform/maps/sportType.js} +4 -2
  57. package/dist/component/strava/transform/maps/sportType.js.map +1 -0
  58. package/dist/component/strava/types/stravaApi/client/client.gen.d.ts +3 -0
  59. package/dist/component/strava/types/stravaApi/client/client.gen.d.ts.map +1 -0
  60. package/dist/component/strava/types/stravaApi/client/client.gen.js +236 -0
  61. package/dist/component/strava/types/stravaApi/client/client.gen.js.map +1 -0
  62. package/dist/component/strava/types/stravaApi/client/index.d.ts +9 -0
  63. package/dist/component/strava/types/stravaApi/client/index.d.ts.map +1 -0
  64. package/dist/component/strava/types/stravaApi/client/index.js +7 -0
  65. package/dist/component/strava/types/stravaApi/client/index.js.map +1 -0
  66. package/dist/component/strava/types/stravaApi/client/types.gen.d.ts +118 -0
  67. package/dist/component/strava/types/stravaApi/client/types.gen.d.ts.map +1 -0
  68. package/dist/component/strava/types/stravaApi/client/types.gen.js +3 -0
  69. package/dist/component/strava/types/stravaApi/client/types.gen.js.map +1 -0
  70. package/dist/component/strava/types/stravaApi/client/utils.gen.d.ts +34 -0
  71. package/dist/component/strava/types/stravaApi/client/utils.gen.d.ts.map +1 -0
  72. package/dist/component/strava/types/stravaApi/client/utils.gen.js +229 -0
  73. package/dist/component/strava/types/stravaApi/client/utils.gen.js.map +1 -0
  74. package/dist/component/strava/types/stravaApi/client.gen.d.ts +13 -0
  75. package/dist/component/strava/types/stravaApi/client.gen.d.ts.map +1 -0
  76. package/dist/component/strava/types/stravaApi/client.gen.js +4 -0
  77. package/dist/component/strava/types/stravaApi/client.gen.js.map +1 -0
  78. package/dist/component/strava/types/stravaApi/core/auth.gen.d.ts +19 -0
  79. package/dist/component/strava/types/stravaApi/core/auth.gen.d.ts.map +1 -0
  80. package/dist/component/strava/types/stravaApi/core/auth.gen.js +15 -0
  81. package/dist/component/strava/types/stravaApi/core/auth.gen.js.map +1 -0
  82. package/dist/component/strava/types/stravaApi/core/bodySerializer.gen.d.ts +26 -0
  83. package/dist/component/strava/types/stravaApi/core/bodySerializer.gen.d.ts.map +1 -0
  84. package/dist/component/strava/types/stravaApi/core/bodySerializer.gen.js +58 -0
  85. package/dist/component/strava/types/stravaApi/core/bodySerializer.gen.js.map +1 -0
  86. package/dist/component/strava/types/stravaApi/core/params.gen.d.ts +44 -0
  87. package/dist/component/strava/types/stravaApi/core/params.gen.d.ts.map +1 -0
  88. package/dist/component/strava/types/stravaApi/core/params.gen.js +101 -0
  89. package/dist/component/strava/types/stravaApi/core/params.gen.js.map +1 -0
  90. package/dist/component/strava/types/stravaApi/core/pathSerializer.gen.d.ts +34 -0
  91. package/dist/component/strava/types/stravaApi/core/pathSerializer.gen.d.ts.map +1 -0
  92. package/dist/component/strava/types/stravaApi/core/pathSerializer.gen.js +107 -0
  93. package/dist/component/strava/types/stravaApi/core/pathSerializer.gen.js.map +1 -0
  94. package/dist/component/strava/types/stravaApi/core/queryKeySerializer.gen.d.ts +19 -0
  95. package/dist/component/strava/types/stravaApi/core/queryKeySerializer.gen.d.ts.map +1 -0
  96. package/dist/component/strava/types/stravaApi/core/queryKeySerializer.gen.js +93 -0
  97. package/dist/component/strava/types/stravaApi/core/queryKeySerializer.gen.js.map +1 -0
  98. package/dist/component/strava/types/stravaApi/core/serverSentEvents.gen.d.ts +72 -0
  99. package/dist/component/strava/types/stravaApi/core/serverSentEvents.gen.d.ts.map +1 -0
  100. package/dist/component/strava/types/stravaApi/core/serverSentEvents.gen.js +134 -0
  101. package/dist/component/strava/types/stravaApi/core/serverSentEvents.gen.js.map +1 -0
  102. package/dist/component/strava/types/stravaApi/core/types.gen.d.ts +79 -0
  103. package/dist/component/strava/types/stravaApi/core/types.gen.d.ts.map +1 -0
  104. package/dist/component/strava/types/stravaApi/core/types.gen.js +3 -0
  105. package/dist/component/strava/types/stravaApi/core/types.gen.js.map +1 -0
  106. package/dist/component/strava/types/stravaApi/core/utils.gen.d.ts +20 -0
  107. package/dist/component/strava/types/stravaApi/core/utils.gen.d.ts.map +1 -0
  108. package/dist/component/strava/types/stravaApi/core/utils.gen.js +88 -0
  109. package/dist/component/strava/types/stravaApi/core/utils.gen.js.map +1 -0
  110. package/dist/component/strava/types/stravaApi/index.d.ts +3 -0
  111. package/dist/component/strava/types/stravaApi/index.d.ts.map +1 -0
  112. package/dist/component/strava/types/stravaApi/index.js +3 -0
  113. package/dist/component/strava/types/stravaApi/index.js.map +1 -0
  114. package/dist/component/strava/types/stravaApi/sdk.gen.d.ts +224 -0
  115. package/dist/component/strava/types/stravaApi/sdk.gen.d.ts.map +1 -0
  116. package/dist/component/strava/types/stravaApi/sdk.gen.js +361 -0
  117. package/dist/component/strava/types/stravaApi/sdk.gen.js.map +1 -0
  118. package/dist/component/strava/types/stravaApi/types.gen.d.ts +2209 -0
  119. package/dist/component/strava/types/stravaApi/types.gen.d.ts.map +1 -0
  120. package/dist/component/strava/types/stravaApi/types.gen.js +3 -0
  121. package/dist/component/strava/types/stravaApi/types.gen.js.map +1 -0
  122. package/dist/component/strava/types/stravaApi/zod.gen.d.ts +5332 -0
  123. package/dist/component/strava/types/stravaApi/zod.gen.d.ts.map +1 -0
  124. package/dist/component/strava/types/stravaApi/zod.gen.js +1009 -0
  125. package/dist/component/strava/types/stravaApi/zod.gen.js.map +1 -0
  126. package/dist/component/strava/utils.d.ts +15 -0
  127. package/dist/component/strava/utils.d.ts.map +1 -0
  128. package/dist/component/strava/utils.js +36 -0
  129. package/dist/component/strava/utils.js.map +1 -0
  130. package/dist/component/utils.d.ts +5 -0
  131. package/dist/component/utils.d.ts.map +1 -0
  132. package/dist/component/utils.js +11 -0
  133. package/dist/component/utils.js.map +1 -0
  134. package/package.json +131 -130
  135. package/src/client/index.ts +121 -52
  136. package/src/component/_generated/api.ts +18 -0
  137. package/src/component/_generated/component.ts +44 -11
  138. package/src/component/garmin/auth.ts +0 -9
  139. package/src/component/garmin/private.ts +0 -12
  140. package/src/component/garmin/public.ts +8 -1
  141. package/src/component/schema.ts +5 -3
  142. package/src/{strava → component/strava}/auth.ts +143 -185
  143. package/src/component/strava/client.ts +20 -0
  144. package/src/component/strava/private.ts +147 -89
  145. package/src/component/strava/public.ts +268 -110
  146. package/src/{strava → component/strava/transform}/activity.ts +256 -276
  147. package/src/{strava → component/strava/transform}/athlete.ts +41 -47
  148. package/src/{strava/maps/sport-type.ts → component/strava/transform/maps/sportType.ts} +100 -99
  149. package/src/component/strava/types/specs/strava-api.json +4796 -0
  150. package/src/component/strava/types/stravaApi/client/client.gen.ts +290 -0
  151. package/src/component/strava/types/stravaApi/client/index.ts +25 -0
  152. package/src/component/strava/types/stravaApi/client/types.gen.ts +214 -0
  153. package/src/component/strava/types/stravaApi/client/utils.gen.ts +316 -0
  154. package/src/component/strava/types/stravaApi/client.gen.ts +16 -0
  155. package/src/component/strava/types/stravaApi/core/auth.gen.ts +41 -0
  156. package/src/component/strava/types/stravaApi/core/bodySerializer.gen.ts +82 -0
  157. package/src/component/strava/types/stravaApi/core/params.gen.ts +169 -0
  158. package/src/component/strava/types/stravaApi/core/pathSerializer.gen.ts +171 -0
  159. package/src/component/strava/types/stravaApi/core/queryKeySerializer.gen.ts +117 -0
  160. package/src/component/strava/types/stravaApi/core/serverSentEvents.gen.ts +243 -0
  161. package/src/component/strava/types/stravaApi/core/types.gen.ts +104 -0
  162. package/src/component/strava/types/stravaApi/core/utils.gen.ts +140 -0
  163. package/src/component/strava/types/stravaApi/index.ts +4 -0
  164. package/src/component/strava/types/stravaApi/sdk.gen.ts +410 -0
  165. package/src/component/strava/types/stravaApi/types.gen.ts +2435 -0
  166. package/src/component/strava/types/stravaApi/zod.gen.ts +1132 -0
  167. package/src/component/strava/utils.ts +52 -0
  168. package/src/component/utils.ts +11 -0
  169. package/dist/strava/activity.d.ts +0 -121
  170. package/dist/strava/activity.d.ts.map +0 -1
  171. package/dist/strava/activity.js.map +0 -1
  172. package/dist/strava/athlete.d.ts.map +0 -1
  173. package/dist/strava/athlete.js.map +0 -1
  174. package/dist/strava/auth.d.ts.map +0 -1
  175. package/dist/strava/auth.js.map +0 -1
  176. package/dist/strava/client.d.ts +0 -93
  177. package/dist/strava/client.d.ts.map +0 -1
  178. package/dist/strava/client.js +0 -158
  179. package/dist/strava/client.js.map +0 -1
  180. package/dist/strava/index.d.ts +0 -13
  181. package/dist/strava/index.d.ts.map +0 -1
  182. package/dist/strava/index.js +0 -17
  183. package/dist/strava/index.js.map +0 -1
  184. package/dist/strava/maps/sport-type.d.ts +0 -7
  185. package/dist/strava/maps/sport-type.d.ts.map +0 -1
  186. package/dist/strava/maps/sport-type.js.map +0 -1
  187. package/dist/strava/sync.d.ts +0 -104
  188. package/dist/strava/sync.d.ts.map +0 -1
  189. package/dist/strava/sync.js +0 -87
  190. package/dist/strava/sync.js.map +0 -1
  191. package/dist/strava/types.d.ts +0 -266
  192. package/dist/strava/types.d.ts.map +0 -1
  193. package/dist/strava/types.js +0 -8
  194. package/dist/strava/types.js.map +0 -1
  195. package/src/strava/activity.test.ts +0 -415
  196. package/src/strava/athlete.test.ts +0 -139
  197. package/src/strava/auth.test.ts +0 -78
  198. package/src/strava/client.ts +0 -212
  199. package/src/strava/index.ts +0 -54
  200. package/src/strava/maps/sport-type.test.ts +0 -69
  201. package/src/strava/sync.ts +0 -168
  202. package/src/strava/types.ts +0 -361
@@ -0,0 +1,2435 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+
3
+ export type ClientOptions = {
4
+ baseUrl: 'https://www.strava.com/api/v3' | (string & {});
5
+ };
6
+
7
+ export type Error = {
8
+ /**
9
+ * The code associated with this error.
10
+ */
11
+ code?: string;
12
+ /**
13
+ * The specific field or aspect of the resource associated with this error.
14
+ */
15
+ field?: string;
16
+ /**
17
+ * The type of resource associated with this error.
18
+ */
19
+ resource?: string;
20
+ };
21
+
22
+ /**
23
+ * Encapsulates the errors that may be returned from the API.
24
+ */
25
+ export type Fault = {
26
+ /**
27
+ * The set of specific errors associated with this fault, if any.
28
+ */
29
+ errors?: Array<Error>;
30
+ /**
31
+ * The message of the fault.
32
+ */
33
+ message?: string;
34
+ };
35
+
36
+ /**
37
+ * A roll-up of metrics pertaining to a set of activities. Values are in seconds and meters.
38
+ */
39
+ export type ActivityTotal = {
40
+ /**
41
+ * The number of activities considered in this total.
42
+ */
43
+ count?: number;
44
+ /**
45
+ * The total distance covered by the considered activities.
46
+ */
47
+ distance?: number;
48
+ /**
49
+ * The total moving time of the considered activities.
50
+ */
51
+ moving_time?: number;
52
+ /**
53
+ * The total elapsed time of the considered activities.
54
+ */
55
+ elapsed_time?: number;
56
+ /**
57
+ * The total elevation gain of the considered activities.
58
+ */
59
+ elevation_gain?: number;
60
+ /**
61
+ * The total number of achievements of the considered activities.
62
+ */
63
+ achievement_count?: number;
64
+ };
65
+
66
+ /**
67
+ * A set of rolled-up statistics and totals for an athlete
68
+ */
69
+ export type ActivityStats = {
70
+ /**
71
+ * The longest distance ridden by the athlete.
72
+ */
73
+ biggest_ride_distance?: number;
74
+ /**
75
+ * The highest climb ridden by the athlete.
76
+ */
77
+ biggest_climb_elevation_gain?: number;
78
+ recent_ride_totals?: ActivityTotal;
79
+ recent_run_totals?: ActivityTotal;
80
+ recent_swim_totals?: ActivityTotal;
81
+ ytd_ride_totals?: ActivityTotal;
82
+ ytd_run_totals?: ActivityTotal;
83
+ ytd_swim_totals?: ActivityTotal;
84
+ all_ride_totals?: ActivityTotal;
85
+ all_run_totals?: ActivityTotal;
86
+ all_swim_totals?: ActivityTotal;
87
+ };
88
+
89
+ export type MetaAthlete = {
90
+ /**
91
+ * The unique identifier of the athlete
92
+ */
93
+ id?: number;
94
+ };
95
+
96
+ export type SummaryAthlete = MetaAthlete & {
97
+ /**
98
+ * Resource state, indicates level of detail. Possible values: 1 -> "meta", 2 -> "summary", 3 -> "detail"
99
+ */
100
+ resource_state?: number;
101
+ /**
102
+ * The athlete's first name.
103
+ */
104
+ firstname?: string;
105
+ /**
106
+ * The athlete's last name.
107
+ */
108
+ lastname?: string;
109
+ /**
110
+ * URL to a 62x62 pixel profile picture.
111
+ */
112
+ profile_medium?: string;
113
+ /**
114
+ * URL to a 124x124 pixel profile picture.
115
+ */
116
+ profile?: string;
117
+ /**
118
+ * The athlete's city.
119
+ */
120
+ city?: string;
121
+ /**
122
+ * The athlete's state or geographical region.
123
+ */
124
+ state?: string;
125
+ /**
126
+ * The athlete's country.
127
+ */
128
+ country?: string;
129
+ /**
130
+ * The athlete's sex.
131
+ */
132
+ sex?: 'M' | 'F';
133
+ /**
134
+ * Deprecated. Use summit field instead. Whether the athlete has any Summit subscription.
135
+ */
136
+ premium?: boolean;
137
+ /**
138
+ * Whether the athlete has any Summit subscription.
139
+ */
140
+ summit?: boolean;
141
+ /**
142
+ * The time at which the athlete was created.
143
+ */
144
+ created_at?: string;
145
+ /**
146
+ * The time at which the athlete was last updated.
147
+ */
148
+ updated_at?: string;
149
+ };
150
+
151
+ export type MetaClub = {
152
+ /**
153
+ * The club's unique identifier.
154
+ */
155
+ id?: number;
156
+ /**
157
+ * Resource state, indicates level of detail. Possible values: 1 -> "meta", 2 -> "summary", 3 -> "detail"
158
+ */
159
+ resource_state?: number;
160
+ /**
161
+ * The club's name.
162
+ */
163
+ name?: string;
164
+ };
165
+
166
+ /**
167
+ * An enumeration of the types an activity may have. Note that this enumeration does not include new sport types (e.g. MountainBikeRide, EMountainBikeRide), activities with these sport types will have the corresponding activity type (e.g. Ride for MountainBikeRide, EBikeRide for EMountainBikeRide)
168
+ */
169
+ export type ActivityType = 'AlpineSki' | 'BackcountrySki' | 'Canoeing' | 'Crossfit' | 'EBikeRide' | 'Elliptical' | 'Golf' | 'Handcycle' | 'Hike' | 'IceSkate' | 'InlineSkate' | 'Kayaking' | 'Kitesurf' | 'NordicSki' | 'Ride' | 'RockClimbing' | 'RollerSki' | 'Rowing' | 'Run' | 'Sail' | 'Skateboard' | 'Snowboard' | 'Snowshoe' | 'Soccer' | 'StairStepper' | 'StandUpPaddling' | 'Surfing' | 'Swim' | 'Velomobile' | 'VirtualRide' | 'VirtualRun' | 'Walk' | 'WeightTraining' | 'Wheelchair' | 'Windsurf' | 'Workout' | 'Yoga';
170
+
171
+ export type SummaryClub = MetaClub & {
172
+ /**
173
+ * URL to a 60x60 pixel profile picture.
174
+ */
175
+ profile_medium?: string;
176
+ /**
177
+ * URL to a ~1185x580 pixel cover photo.
178
+ */
179
+ cover_photo?: string;
180
+ /**
181
+ * URL to a ~360x176 pixel cover photo.
182
+ */
183
+ cover_photo_small?: string;
184
+ /**
185
+ * Deprecated. Prefer to use activity_types.
186
+ */
187
+ sport_type?: 'cycling' | 'running' | 'triathlon' | 'other';
188
+ /**
189
+ * The activity types that count for a club. This takes precedence over sport_type.
190
+ */
191
+ activity_types?: Array<ActivityType>;
192
+ /**
193
+ * The club's city.
194
+ */
195
+ city?: string;
196
+ /**
197
+ * The club's state or geographical region.
198
+ */
199
+ state?: string;
200
+ /**
201
+ * The club's country.
202
+ */
203
+ country?: string;
204
+ /**
205
+ * Whether the club is private.
206
+ */
207
+ private?: boolean;
208
+ /**
209
+ * The club's member count.
210
+ */
211
+ member_count?: number;
212
+ /**
213
+ * Whether the club is featured or not.
214
+ */
215
+ featured?: boolean;
216
+ /**
217
+ * Whether the club is verified or not.
218
+ */
219
+ verified?: boolean;
220
+ /**
221
+ * The club's vanity URL.
222
+ */
223
+ url?: string;
224
+ };
225
+
226
+ export type SummaryGear = {
227
+ /**
228
+ * The gear's unique identifier.
229
+ */
230
+ id?: string;
231
+ /**
232
+ * Resource state, indicates level of detail. Possible values: 2 -> "summary", 3 -> "detail"
233
+ */
234
+ resource_state?: number;
235
+ /**
236
+ * Whether this gear's is the owner's default one.
237
+ */
238
+ primary?: boolean;
239
+ /**
240
+ * The gear's name.
241
+ */
242
+ name?: string;
243
+ /**
244
+ * The distance logged with this gear.
245
+ */
246
+ distance?: number;
247
+ };
248
+
249
+ export type DetailedAthlete = SummaryAthlete & {
250
+ /**
251
+ * The athlete's follower count.
252
+ */
253
+ follower_count?: number;
254
+ /**
255
+ * The athlete's friend count.
256
+ */
257
+ friend_count?: number;
258
+ /**
259
+ * The athlete's preferred unit system.
260
+ */
261
+ measurement_preference?: 'feet' | 'meters';
262
+ /**
263
+ * The athlete's FTP (Functional Threshold Power).
264
+ */
265
+ ftp?: number;
266
+ /**
267
+ * The athlete's weight.
268
+ */
269
+ weight?: number;
270
+ /**
271
+ * The athlete's clubs.
272
+ */
273
+ clubs?: Array<SummaryClub>;
274
+ /**
275
+ * The athlete's bikes.
276
+ */
277
+ bikes?: Array<SummaryGear>;
278
+ /**
279
+ * The athlete's shoes.
280
+ */
281
+ shoes?: Array<SummaryGear>;
282
+ };
283
+
284
+ export type ZoneRange = {
285
+ /**
286
+ * The minimum value in the range.
287
+ */
288
+ min?: number;
289
+ /**
290
+ * The maximum value in the range.
291
+ */
292
+ max?: number;
293
+ };
294
+
295
+ export type ZoneRanges = Array<ZoneRange>;
296
+
297
+ export type HeartRateZoneRanges = {
298
+ /**
299
+ * Whether the athlete has set their own custom heart rate zones
300
+ */
301
+ custom_zones?: boolean;
302
+ zones?: ZoneRanges;
303
+ };
304
+
305
+ export type PowerZoneRanges = {
306
+ zones?: ZoneRanges;
307
+ };
308
+
309
+ export type Zones = {
310
+ heart_rate?: HeartRateZoneRanges;
311
+ power?: PowerZoneRanges;
312
+ };
313
+
314
+ /**
315
+ * A pair of latitude/longitude coordinates, represented as an array of 2 floating point numbers.
316
+ */
317
+ export type LatLng = [
318
+ number,
319
+ number
320
+ ];
321
+
322
+ export type SummaryPrSegmentEffort = {
323
+ /**
324
+ * The unique identifier of the activity related to the PR effort.
325
+ */
326
+ pr_activity_id?: number;
327
+ /**
328
+ * The elapsed time ot the PR effort.
329
+ */
330
+ pr_elapsed_time?: number;
331
+ /**
332
+ * The time at which the PR effort was started.
333
+ */
334
+ pr_date?: string;
335
+ /**
336
+ * Number of efforts by the authenticated athlete on this segment.
337
+ */
338
+ effort_count?: number;
339
+ };
340
+
341
+ export type SummarySegmentEffort = {
342
+ /**
343
+ * The unique identifier of this effort
344
+ */
345
+ id?: number;
346
+ /**
347
+ * The unique identifier of the activity related to this effort
348
+ */
349
+ activity_id?: number;
350
+ /**
351
+ * The effort's elapsed time
352
+ */
353
+ elapsed_time?: number;
354
+ /**
355
+ * The time at which the effort was started.
356
+ */
357
+ start_date?: string;
358
+ /**
359
+ * The time at which the effort was started in the local timezone.
360
+ */
361
+ start_date_local?: string;
362
+ /**
363
+ * The effort's distance in meters
364
+ */
365
+ distance?: number;
366
+ /**
367
+ * Whether this effort is the current best on the leaderboard
368
+ */
369
+ is_kom?: boolean;
370
+ };
371
+
372
+ export type SummarySegment = {
373
+ /**
374
+ * The unique identifier of this segment
375
+ */
376
+ id?: number;
377
+ /**
378
+ * The name of this segment
379
+ */
380
+ name?: string;
381
+ activity_type?: 'Ride' | 'Run';
382
+ /**
383
+ * The segment's distance, in meters
384
+ */
385
+ distance?: number;
386
+ /**
387
+ * The segment's average grade, in percents
388
+ */
389
+ average_grade?: number;
390
+ /**
391
+ * The segments's maximum grade, in percents
392
+ */
393
+ maximum_grade?: number;
394
+ /**
395
+ * The segments's highest elevation, in meters
396
+ */
397
+ elevation_high?: number;
398
+ /**
399
+ * The segments's lowest elevation, in meters
400
+ */
401
+ elevation_low?: number;
402
+ start_latlng?: LatLng;
403
+ end_latlng?: LatLng;
404
+ /**
405
+ * The category of the climb [0, 5]. Higher is harder ie. 5 is Hors catégorie, 0 is uncategorized in climb_category.
406
+ */
407
+ climb_category?: number;
408
+ /**
409
+ * The segments's city.
410
+ */
411
+ city?: string;
412
+ /**
413
+ * The segments's state or geographical region.
414
+ */
415
+ state?: string;
416
+ /**
417
+ * The segment's country.
418
+ */
419
+ country?: string;
420
+ /**
421
+ * Whether this segment is private.
422
+ */
423
+ private?: boolean;
424
+ athlete_pr_effort?: SummaryPrSegmentEffort;
425
+ athlete_segment_stats?: SummarySegmentEffort;
426
+ };
427
+
428
+ export type PolylineMap = {
429
+ /**
430
+ * The identifier of the map
431
+ */
432
+ id?: string;
433
+ /**
434
+ * The polyline of the map, only returned on detailed representation of an object
435
+ */
436
+ polyline?: string;
437
+ /**
438
+ * The summary polyline of the map
439
+ */
440
+ summary_polyline?: string;
441
+ };
442
+
443
+ export type DetailedSegment = SummarySegment & {
444
+ /**
445
+ * The time at which the segment was created.
446
+ */
447
+ created_at?: string;
448
+ /**
449
+ * The time at which the segment was last updated.
450
+ */
451
+ updated_at?: string;
452
+ /**
453
+ * The segment's total elevation gain.
454
+ */
455
+ total_elevation_gain?: number;
456
+ map?: PolylineMap;
457
+ /**
458
+ * The total number of efforts for this segment
459
+ */
460
+ effort_count?: number;
461
+ /**
462
+ * The number of unique athletes who have an effort for this segment
463
+ */
464
+ athlete_count?: number;
465
+ /**
466
+ * Whether this segment is considered hazardous
467
+ */
468
+ hazardous?: boolean;
469
+ /**
470
+ * The number of stars for this segment
471
+ */
472
+ star_count?: number;
473
+ };
474
+
475
+ export type MetaActivity = {
476
+ /**
477
+ * The unique identifier of the activity
478
+ */
479
+ id?: number;
480
+ };
481
+
482
+ export type DetailedSegmentEffort = SummarySegmentEffort & {
483
+ /**
484
+ * The name of the segment on which this effort was performed
485
+ */
486
+ name?: string;
487
+ activity?: MetaActivity;
488
+ athlete?: MetaAthlete;
489
+ /**
490
+ * The effort's moving time
491
+ */
492
+ moving_time?: number;
493
+ /**
494
+ * The start index of this effort in its activity's stream
495
+ */
496
+ start_index?: number;
497
+ /**
498
+ * The end index of this effort in its activity's stream
499
+ */
500
+ end_index?: number;
501
+ /**
502
+ * The effort's average cadence
503
+ */
504
+ average_cadence?: number;
505
+ /**
506
+ * The average wattage of this effort
507
+ */
508
+ average_watts?: number;
509
+ /**
510
+ * For riding efforts, whether the wattage was reported by a dedicated recording device
511
+ */
512
+ device_watts?: boolean;
513
+ /**
514
+ * The heart heart rate of the athlete during this effort
515
+ */
516
+ average_heartrate?: number;
517
+ /**
518
+ * The maximum heart rate of the athlete during this effort
519
+ */
520
+ max_heartrate?: number;
521
+ segment?: SummarySegment;
522
+ /**
523
+ * The rank of the effort on the global leaderboard if it belongs in the top 10 at the time of upload
524
+ */
525
+ kom_rank?: number;
526
+ /**
527
+ * The rank of the effort on the athlete's leaderboard if it belongs in the top 3 at the time of upload
528
+ */
529
+ pr_rank?: number;
530
+ /**
531
+ * Whether this effort should be hidden when viewed within an activity
532
+ */
533
+ hidden?: boolean;
534
+ };
535
+
536
+ export type ExplorerSegment = {
537
+ /**
538
+ * The unique identifier of this segment
539
+ */
540
+ id?: number;
541
+ /**
542
+ * The name of this segment
543
+ */
544
+ name?: string;
545
+ /**
546
+ * The category of the climb [0, 5]. Higher is harder ie. 5 is Hors catégorie, 0 is uncategorized in climb_category. If climb_category = 5, climb_category_desc = HC. If climb_category = 2, climb_category_desc = 3.
547
+ */
548
+ climb_category?: number;
549
+ /**
550
+ * The description for the category of the climb
551
+ */
552
+ climb_category_desc?: 'NC' | '4' | '3' | '2' | '1' | 'HC';
553
+ /**
554
+ * The segment's average grade, in percents
555
+ */
556
+ avg_grade?: number;
557
+ start_latlng?: LatLng;
558
+ end_latlng?: LatLng;
559
+ /**
560
+ * The segments's evelation difference, in meters
561
+ */
562
+ elev_difference?: number;
563
+ /**
564
+ * The segment's distance, in meters
565
+ */
566
+ distance?: number;
567
+ /**
568
+ * The polyline of the segment
569
+ */
570
+ points?: string;
571
+ };
572
+
573
+ export type ExplorerResponse = {
574
+ /**
575
+ * The set of segments matching an explorer request
576
+ */
577
+ segments?: Array<ExplorerSegment>;
578
+ };
579
+
580
+ /**
581
+ * An enumeration of the sport types an activity may have. Distinct from ActivityType in that it has new types (e.g. MountainBikeRide)
582
+ */
583
+ export type SportType = 'AlpineSki' | 'BackcountrySki' | 'Badminton' | 'Canoeing' | 'Crossfit' | 'EBikeRide' | 'Elliptical' | 'EMountainBikeRide' | 'Golf' | 'GravelRide' | 'Handcycle' | 'HighIntensityIntervalTraining' | 'Hike' | 'IceSkate' | 'InlineSkate' | 'Kayaking' | 'Kitesurf' | 'MountainBikeRide' | 'NordicSki' | 'Pickleball' | 'Pilates' | 'Racquetball' | 'Ride' | 'RockClimbing' | 'RollerSki' | 'Rowing' | 'Run' | 'Sail' | 'Skateboard' | 'Snowboard' | 'Snowshoe' | 'Soccer' | 'Squash' | 'StairStepper' | 'StandUpPaddling' | 'Surfing' | 'Swim' | 'TableTennis' | 'Tennis' | 'TrailRun' | 'Velomobile' | 'VirtualRide' | 'VirtualRow' | 'VirtualRun' | 'Walk' | 'WeightTraining' | 'Wheelchair' | 'Windsurf' | 'Workout' | 'Yoga';
584
+
585
+ export type SummaryActivity = MetaActivity & {
586
+ /**
587
+ * The identifier provided at upload time
588
+ */
589
+ external_id?: string;
590
+ /**
591
+ * The identifier of the upload that resulted in this activity
592
+ */
593
+ upload_id?: number;
594
+ athlete?: MetaAthlete;
595
+ /**
596
+ * The name of the activity
597
+ */
598
+ name?: string;
599
+ /**
600
+ * The activity's distance, in meters
601
+ */
602
+ distance?: number;
603
+ /**
604
+ * The activity's moving time, in seconds
605
+ */
606
+ moving_time?: number;
607
+ /**
608
+ * The activity's elapsed time, in seconds
609
+ */
610
+ elapsed_time?: number;
611
+ /**
612
+ * The activity's total elevation gain.
613
+ */
614
+ total_elevation_gain?: number;
615
+ /**
616
+ * The activity's highest elevation, in meters
617
+ */
618
+ elev_high?: number;
619
+ /**
620
+ * The activity's lowest elevation, in meters
621
+ */
622
+ elev_low?: number;
623
+ type?: ActivityType;
624
+ sport_type?: SportType;
625
+ /**
626
+ * The time at which the activity was started.
627
+ */
628
+ start_date?: string;
629
+ /**
630
+ * The time at which the activity was started in the local timezone.
631
+ */
632
+ start_date_local?: string;
633
+ /**
634
+ * The timezone of the activity
635
+ */
636
+ timezone?: string;
637
+ start_latlng?: LatLng;
638
+ end_latlng?: LatLng;
639
+ /**
640
+ * The number of achievements gained during this activity
641
+ */
642
+ achievement_count?: number;
643
+ /**
644
+ * The number of kudos given for this activity
645
+ */
646
+ kudos_count?: number;
647
+ /**
648
+ * The number of comments for this activity
649
+ */
650
+ comment_count?: number;
651
+ /**
652
+ * The number of athletes for taking part in a group activity
653
+ */
654
+ athlete_count?: number;
655
+ /**
656
+ * The number of Instagram photos for this activity
657
+ */
658
+ photo_count?: number;
659
+ /**
660
+ * The number of Instagram and Strava photos for this activity
661
+ */
662
+ total_photo_count?: number;
663
+ map?: PolylineMap;
664
+ /**
665
+ * The name of the device used to record the activity
666
+ */
667
+ device_name?: string;
668
+ /**
669
+ * Whether this activity was recorded on a training machine
670
+ */
671
+ trainer?: boolean;
672
+ /**
673
+ * Whether this activity is a commute
674
+ */
675
+ commute?: boolean;
676
+ /**
677
+ * Whether this activity was created manually
678
+ */
679
+ manual?: boolean;
680
+ /**
681
+ * Whether this activity is private
682
+ */
683
+ private?: boolean;
684
+ /**
685
+ * Whether this activity is flagged
686
+ */
687
+ flagged?: boolean;
688
+ /**
689
+ * The activity's workout type
690
+ */
691
+ workout_type?: number;
692
+ /**
693
+ * The unique identifier of the upload in string format
694
+ */
695
+ upload_id_str?: string;
696
+ /**
697
+ * The activity's average speed, in meters per second
698
+ */
699
+ average_speed?: number;
700
+ /**
701
+ * The activity's max speed, in meters per second
702
+ */
703
+ max_speed?: number;
704
+ /**
705
+ * Whether the logged-in athlete has kudoed this activity
706
+ */
707
+ has_kudoed?: boolean;
708
+ /**
709
+ * Whether the activity is muted
710
+ */
711
+ hide_from_home?: boolean;
712
+ /**
713
+ * The id of the gear for the activity
714
+ */
715
+ gear_id?: string;
716
+ /**
717
+ * The total work done in kilojoules during this activity. Rides only
718
+ */
719
+ kilojoules?: number;
720
+ /**
721
+ * Average power output in watts during this activity. Rides only
722
+ */
723
+ average_watts?: number;
724
+ /**
725
+ * Whether the watts are from a power meter, false if estimated
726
+ */
727
+ device_watts?: boolean;
728
+ /**
729
+ * Rides with power meter data only
730
+ */
731
+ max_watts?: number;
732
+ /**
733
+ * Similar to Normalized Power. Rides with power meter data only
734
+ */
735
+ weighted_average_watts?: number;
736
+ };
737
+
738
+ export type PhotosSummary = {
739
+ /**
740
+ * The number of photos
741
+ */
742
+ count?: number;
743
+ primary?: {
744
+ id?: number;
745
+ source?: number;
746
+ unique_id?: string;
747
+ urls?: {
748
+ [key: string]: string;
749
+ };
750
+ };
751
+ };
752
+
753
+ export type Split = {
754
+ /**
755
+ * The average speed of this split, in meters per second
756
+ */
757
+ average_speed?: number;
758
+ /**
759
+ * The distance of this split, in meters
760
+ */
761
+ distance?: number;
762
+ /**
763
+ * The elapsed time of this split, in seconds
764
+ */
765
+ elapsed_time?: number;
766
+ /**
767
+ * The elevation difference of this split, in meters
768
+ */
769
+ elevation_difference?: number;
770
+ /**
771
+ * The pacing zone of this split
772
+ */
773
+ pace_zone?: number;
774
+ /**
775
+ * The moving time of this split, in seconds
776
+ */
777
+ moving_time?: number;
778
+ /**
779
+ * N/A
780
+ */
781
+ split?: number;
782
+ };
783
+
784
+ export type Lap = {
785
+ /**
786
+ * The unique identifier of this lap
787
+ */
788
+ id?: number;
789
+ activity?: MetaActivity;
790
+ athlete?: MetaAthlete;
791
+ /**
792
+ * The lap's average cadence
793
+ */
794
+ average_cadence?: number;
795
+ /**
796
+ * The lap's average speed
797
+ */
798
+ average_speed?: number;
799
+ /**
800
+ * The lap's distance, in meters
801
+ */
802
+ distance?: number;
803
+ /**
804
+ * The lap's elapsed time, in seconds
805
+ */
806
+ elapsed_time?: number;
807
+ /**
808
+ * The start index of this effort in its activity's stream
809
+ */
810
+ start_index?: number;
811
+ /**
812
+ * The end index of this effort in its activity's stream
813
+ */
814
+ end_index?: number;
815
+ /**
816
+ * The index of this lap in the activity it belongs to
817
+ */
818
+ lap_index?: number;
819
+ /**
820
+ * The maximum speed of this lat, in meters per second
821
+ */
822
+ max_speed?: number;
823
+ /**
824
+ * The lap's moving time, in seconds
825
+ */
826
+ moving_time?: number;
827
+ /**
828
+ * The name of the lap
829
+ */
830
+ name?: string;
831
+ /**
832
+ * The athlete's pace zone during this lap
833
+ */
834
+ pace_zone?: number;
835
+ split?: number;
836
+ /**
837
+ * The time at which the lap was started.
838
+ */
839
+ start_date?: string;
840
+ /**
841
+ * The time at which the lap was started in the local timezone.
842
+ */
843
+ start_date_local?: string;
844
+ /**
845
+ * The elevation gain of this lap, in meters
846
+ */
847
+ total_elevation_gain?: number;
848
+ };
849
+
850
+ export type DetailedActivity = SummaryActivity & {
851
+ /**
852
+ * The description of the activity
853
+ */
854
+ description?: string;
855
+ photos?: PhotosSummary;
856
+ gear?: SummaryGear;
857
+ /**
858
+ * The number of kilocalories consumed during this activity
859
+ */
860
+ calories?: number;
861
+ segment_efforts?: Array<DetailedSegmentEffort>;
862
+ /**
863
+ * The name of the device used to record the activity
864
+ */
865
+ device_name?: string;
866
+ /**
867
+ * The token used to embed a Strava activity
868
+ */
869
+ embed_token?: string;
870
+ /**
871
+ * The splits of this activity in metric units (for runs)
872
+ */
873
+ splits_metric?: Array<Split>;
874
+ /**
875
+ * The splits of this activity in imperial units (for runs)
876
+ */
877
+ splits_standard?: Array<Split>;
878
+ laps?: Array<Lap>;
879
+ best_efforts?: Array<DetailedSegmentEffort>;
880
+ };
881
+
882
+ export type UpdatableActivity = {
883
+ /**
884
+ * Whether this activity is a commute
885
+ */
886
+ commute?: boolean;
887
+ /**
888
+ * Whether this activity was recorded on a training machine
889
+ */
890
+ trainer?: boolean;
891
+ /**
892
+ * Whether this activity is muted
893
+ */
894
+ hide_from_home?: boolean;
895
+ /**
896
+ * The description of the activity
897
+ */
898
+ description?: string;
899
+ /**
900
+ * The name of the activity
901
+ */
902
+ name?: string;
903
+ type?: ActivityType;
904
+ sport_type?: SportType;
905
+ /**
906
+ * Identifier for the gear associated with the activity. ‘none’ clears gear from activity
907
+ */
908
+ gear_id?: string;
909
+ };
910
+
911
+ /**
912
+ * A union type representing the time spent in a given zone.
913
+ */
914
+ export type TimedZoneRange = ZoneRange & {
915
+ /**
916
+ * The number of seconds spent in this zone
917
+ */
918
+ time?: number;
919
+ };
920
+
921
+ /**
922
+ * Stores the exclusive ranges representing zones and the time spent in each.
923
+ */
924
+ export type TimedZoneDistribution = Array<TimedZoneRange>;
925
+
926
+ export type ActivityZone = {
927
+ score?: number;
928
+ distribution_buckets?: TimedZoneDistribution;
929
+ type?: 'heartrate' | 'power';
930
+ sensor_based?: boolean;
931
+ points?: number;
932
+ custom_zones?: boolean;
933
+ max?: number;
934
+ };
935
+
936
+ export type Comment = {
937
+ /**
938
+ * The unique identifier of this comment
939
+ */
940
+ id?: number;
941
+ /**
942
+ * The identifier of the activity this comment is related to
943
+ */
944
+ activity_id?: number;
945
+ /**
946
+ * The content of the comment
947
+ */
948
+ text?: string;
949
+ athlete?: SummaryAthlete;
950
+ /**
951
+ * The time at which this comment was created.
952
+ */
953
+ created_at?: string;
954
+ };
955
+
956
+ export type DetailedClub = SummaryClub & {
957
+ /**
958
+ * The membership status of the logged-in athlete.
959
+ */
960
+ membership?: 'member' | 'pending';
961
+ /**
962
+ * Whether the currently logged-in athlete is an administrator of this club.
963
+ */
964
+ admin?: boolean;
965
+ /**
966
+ * Whether the currently logged-in athlete is the owner of this club.
967
+ */
968
+ owner?: boolean;
969
+ /**
970
+ * The number of athletes in the club that the logged-in athlete follows.
971
+ */
972
+ following_count?: number;
973
+ };
974
+
975
+ export type ClubAthlete = {
976
+ /**
977
+ * Resource state, indicates level of detail. Possible values: 1 -> "meta", 2 -> "summary", 3 -> "detail"
978
+ */
979
+ resource_state?: number;
980
+ /**
981
+ * The athlete's first name.
982
+ */
983
+ firstname?: string;
984
+ /**
985
+ * The athlete's last initial.
986
+ */
987
+ lastname?: string;
988
+ /**
989
+ * The athlete's member status.
990
+ */
991
+ member?: string;
992
+ /**
993
+ * Whether the athlete is a club admin.
994
+ */
995
+ admin?: boolean;
996
+ /**
997
+ * Whether the athlete is club owner.
998
+ */
999
+ owner?: boolean;
1000
+ };
1001
+
1002
+ export type ClubActivity = {
1003
+ athlete?: MetaAthlete;
1004
+ /**
1005
+ * The name of the activity
1006
+ */
1007
+ name?: string;
1008
+ /**
1009
+ * The activity's distance, in meters
1010
+ */
1011
+ distance?: number;
1012
+ /**
1013
+ * The activity's moving time, in seconds
1014
+ */
1015
+ moving_time?: number;
1016
+ /**
1017
+ * The activity's elapsed time, in seconds
1018
+ */
1019
+ elapsed_time?: number;
1020
+ /**
1021
+ * The activity's total elevation gain.
1022
+ */
1023
+ total_elevation_gain?: number;
1024
+ type?: ActivityType;
1025
+ sport_type?: SportType;
1026
+ /**
1027
+ * The activity's workout type
1028
+ */
1029
+ workout_type?: number;
1030
+ };
1031
+
1032
+ export type DetailedGear = SummaryGear & {
1033
+ /**
1034
+ * The gear's brand name.
1035
+ */
1036
+ brand_name?: string;
1037
+ /**
1038
+ * The gear's model name.
1039
+ */
1040
+ model_name?: string;
1041
+ /**
1042
+ * The gear's frame type (bike only).
1043
+ */
1044
+ frame_type?: number;
1045
+ /**
1046
+ * The gear's description.
1047
+ */
1048
+ description?: string;
1049
+ };
1050
+
1051
+ export type Waypoint = {
1052
+ latlng?: LatLng;
1053
+ target_latlng?: LatLng;
1054
+ /**
1055
+ * Categories that the waypoint belongs to
1056
+ */
1057
+ categories?: Array<string>;
1058
+ /**
1059
+ * A title for the waypoint
1060
+ */
1061
+ title?: string;
1062
+ /**
1063
+ * A description of the waypoint (optional)
1064
+ */
1065
+ description?: string;
1066
+ /**
1067
+ * The number meters along the route that the waypoint is located
1068
+ */
1069
+ distance_into_route?: number;
1070
+ };
1071
+
1072
+ export type Route = {
1073
+ athlete?: SummaryAthlete;
1074
+ /**
1075
+ * The description of the route
1076
+ */
1077
+ description?: string;
1078
+ /**
1079
+ * The route's distance, in meters
1080
+ */
1081
+ distance?: number;
1082
+ /**
1083
+ * The route's elevation gain.
1084
+ */
1085
+ elevation_gain?: number;
1086
+ /**
1087
+ * The unique identifier of this route
1088
+ */
1089
+ id?: number;
1090
+ /**
1091
+ * The unique identifier of the route in string format
1092
+ */
1093
+ id_str?: string;
1094
+ map?: PolylineMap;
1095
+ /**
1096
+ * The name of this route
1097
+ */
1098
+ name?: string;
1099
+ /**
1100
+ * Whether this route is private
1101
+ */
1102
+ private?: boolean;
1103
+ /**
1104
+ * Whether this route is starred by the logged-in athlete
1105
+ */
1106
+ starred?: boolean;
1107
+ /**
1108
+ * An epoch timestamp of when the route was created
1109
+ */
1110
+ timestamp?: number;
1111
+ /**
1112
+ * This route's type (1 for ride, 2 for runs)
1113
+ */
1114
+ type?: number;
1115
+ /**
1116
+ * This route's sub-type (1 for road, 2 for mountain bike, 3 for cross, 4 for trail, 5 for mixed)
1117
+ */
1118
+ sub_type?: number;
1119
+ /**
1120
+ * The time at which the route was created
1121
+ */
1122
+ created_at?: string;
1123
+ /**
1124
+ * The time at which the route was last updated
1125
+ */
1126
+ updated_at?: string;
1127
+ /**
1128
+ * Estimated time in seconds for the authenticated athlete to complete route
1129
+ */
1130
+ estimated_moving_time?: number;
1131
+ /**
1132
+ * The segments traversed by this route
1133
+ */
1134
+ segments?: Array<SummarySegment>;
1135
+ /**
1136
+ * The custom waypoints along this route
1137
+ */
1138
+ waypoints?: Array<Waypoint>;
1139
+ };
1140
+
1141
+ export type Upload = {
1142
+ /**
1143
+ * The unique identifier of the upload
1144
+ */
1145
+ id?: number;
1146
+ /**
1147
+ * The unique identifier of the upload in string format
1148
+ */
1149
+ id_str?: string;
1150
+ /**
1151
+ * The external identifier of the upload
1152
+ */
1153
+ external_id?: string;
1154
+ /**
1155
+ * The error associated with this upload
1156
+ */
1157
+ error?: string;
1158
+ /**
1159
+ * The status of this upload
1160
+ */
1161
+ status?: string;
1162
+ /**
1163
+ * The identifier of the activity this upload resulted into
1164
+ */
1165
+ activity_id?: number;
1166
+ };
1167
+
1168
+ export type BaseStream = {
1169
+ /**
1170
+ * The number of data points in this stream
1171
+ */
1172
+ original_size?: number;
1173
+ /**
1174
+ * The level of detail (sampling) in which this stream was returned
1175
+ */
1176
+ resolution?: 'low' | 'medium' | 'high';
1177
+ /**
1178
+ * The base series used in the case the stream was downsampled
1179
+ */
1180
+ series_type?: 'distance' | 'time';
1181
+ };
1182
+
1183
+ export type TimeStream = BaseStream & {
1184
+ /**
1185
+ * The sequence of time values for this stream, in seconds
1186
+ */
1187
+ data?: Array<number>;
1188
+ };
1189
+
1190
+ export type DistanceStream = BaseStream & {
1191
+ /**
1192
+ * The sequence of distance values for this stream, in meters
1193
+ */
1194
+ data?: Array<number>;
1195
+ };
1196
+
1197
+ export type LatLngStream = BaseStream & {
1198
+ /**
1199
+ * The sequence of lat/long values for this stream
1200
+ */
1201
+ data?: Array<LatLng>;
1202
+ };
1203
+
1204
+ export type AltitudeStream = BaseStream & {
1205
+ /**
1206
+ * The sequence of altitude values for this stream, in meters
1207
+ */
1208
+ data?: Array<number>;
1209
+ };
1210
+
1211
+ export type SmoothVelocityStream = BaseStream & {
1212
+ /**
1213
+ * The sequence of velocity values for this stream, in meters per second
1214
+ */
1215
+ data?: Array<number>;
1216
+ };
1217
+
1218
+ export type HeartrateStream = BaseStream & {
1219
+ /**
1220
+ * The sequence of heart rate values for this stream, in beats per minute
1221
+ */
1222
+ data?: Array<number>;
1223
+ };
1224
+
1225
+ export type CadenceStream = BaseStream & {
1226
+ /**
1227
+ * The sequence of cadence values for this stream, in rotations per minute
1228
+ */
1229
+ data?: Array<number>;
1230
+ };
1231
+
1232
+ export type PowerStream = BaseStream & {
1233
+ /**
1234
+ * The sequence of power values for this stream, in watts
1235
+ */
1236
+ data?: Array<number>;
1237
+ };
1238
+
1239
+ export type TemperatureStream = BaseStream & {
1240
+ /**
1241
+ * The sequence of temperature values for this stream, in celsius degrees
1242
+ */
1243
+ data?: Array<number>;
1244
+ };
1245
+
1246
+ export type MovingStream = BaseStream & {
1247
+ /**
1248
+ * The sequence of moving values for this stream, as boolean values
1249
+ */
1250
+ data?: Array<boolean>;
1251
+ };
1252
+
1253
+ export type SmoothGradeStream = BaseStream & {
1254
+ /**
1255
+ * The sequence of grade values for this stream, as percents of a grade
1256
+ */
1257
+ data?: Array<number>;
1258
+ };
1259
+
1260
+ export type StreamSet = {
1261
+ time?: TimeStream;
1262
+ distance?: DistanceStream;
1263
+ latlng?: LatLngStream;
1264
+ altitude?: AltitudeStream;
1265
+ velocity_smooth?: SmoothVelocityStream;
1266
+ heartrate?: HeartrateStream;
1267
+ cadence?: CadenceStream;
1268
+ watts?: PowerStream;
1269
+ temp?: TemperatureStream;
1270
+ moving?: MovingStream;
1271
+ grade_smooth?: SmoothGradeStream;
1272
+ };
1273
+
1274
+ export type GetStatsData = {
1275
+ body?: never;
1276
+ path: {
1277
+ /**
1278
+ * The identifier of the athlete. Must match the authenticated athlete.
1279
+ */
1280
+ id: number;
1281
+ };
1282
+ query?: never;
1283
+ url: '/athletes/{id}/stats';
1284
+ };
1285
+
1286
+ export type GetStatsErrors = {
1287
+ /**
1288
+ * Unexpected error.
1289
+ */
1290
+ default: Fault;
1291
+ };
1292
+
1293
+ export type GetStatsError = GetStatsErrors[keyof GetStatsErrors];
1294
+
1295
+ export type GetStatsResponses = {
1296
+ /**
1297
+ * Activity stats of the athlete.
1298
+ */
1299
+ 200: ActivityStats;
1300
+ };
1301
+
1302
+ export type GetStatsResponse = GetStatsResponses[keyof GetStatsResponses];
1303
+
1304
+ export type GetLoggedInAthleteData = {
1305
+ body?: never;
1306
+ path?: never;
1307
+ query?: never;
1308
+ url: '/athlete';
1309
+ };
1310
+
1311
+ export type GetLoggedInAthleteErrors = {
1312
+ /**
1313
+ * Unexpected error.
1314
+ */
1315
+ default: Fault;
1316
+ };
1317
+
1318
+ export type GetLoggedInAthleteError = GetLoggedInAthleteErrors[keyof GetLoggedInAthleteErrors];
1319
+
1320
+ export type GetLoggedInAthleteResponses = {
1321
+ /**
1322
+ * Profile information for the authenticated athlete.
1323
+ */
1324
+ 200: DetailedAthlete;
1325
+ };
1326
+
1327
+ export type GetLoggedInAthleteResponse = GetLoggedInAthleteResponses[keyof GetLoggedInAthleteResponses];
1328
+
1329
+ export type UpdateLoggedInAthleteData = {
1330
+ body?: never;
1331
+ path: {
1332
+ /**
1333
+ * The weight of the athlete in kilograms.
1334
+ */
1335
+ weight: number;
1336
+ };
1337
+ query?: never;
1338
+ url: '/athlete';
1339
+ };
1340
+
1341
+ export type UpdateLoggedInAthleteErrors = {
1342
+ /**
1343
+ * Unexpected error.
1344
+ */
1345
+ default: Fault;
1346
+ };
1347
+
1348
+ export type UpdateLoggedInAthleteError = UpdateLoggedInAthleteErrors[keyof UpdateLoggedInAthleteErrors];
1349
+
1350
+ export type UpdateLoggedInAthleteResponses = {
1351
+ /**
1352
+ * Profile information for the authenticated athlete.
1353
+ */
1354
+ 200: DetailedAthlete;
1355
+ };
1356
+
1357
+ export type UpdateLoggedInAthleteResponse = UpdateLoggedInAthleteResponses[keyof UpdateLoggedInAthleteResponses];
1358
+
1359
+ export type GetLoggedInAthleteZonesData = {
1360
+ body?: never;
1361
+ path?: never;
1362
+ query?: never;
1363
+ url: '/athlete/zones';
1364
+ };
1365
+
1366
+ export type GetLoggedInAthleteZonesErrors = {
1367
+ /**
1368
+ * Unexpected error.
1369
+ */
1370
+ default: Fault;
1371
+ };
1372
+
1373
+ export type GetLoggedInAthleteZonesError = GetLoggedInAthleteZonesErrors[keyof GetLoggedInAthleteZonesErrors];
1374
+
1375
+ export type GetLoggedInAthleteZonesResponses = {
1376
+ /**
1377
+ * Heart rate and power zones.
1378
+ */
1379
+ 200: Zones;
1380
+ };
1381
+
1382
+ export type GetLoggedInAthleteZonesResponse = GetLoggedInAthleteZonesResponses[keyof GetLoggedInAthleteZonesResponses];
1383
+
1384
+ export type GetSegmentByIdData = {
1385
+ body?: never;
1386
+ path: {
1387
+ /**
1388
+ * The identifier of the segment.
1389
+ */
1390
+ id: number;
1391
+ };
1392
+ query?: never;
1393
+ url: '/segments/{id}';
1394
+ };
1395
+
1396
+ export type GetSegmentByIdErrors = {
1397
+ /**
1398
+ * Unexpected error.
1399
+ */
1400
+ default: Fault;
1401
+ };
1402
+
1403
+ export type GetSegmentByIdError = GetSegmentByIdErrors[keyof GetSegmentByIdErrors];
1404
+
1405
+ export type GetSegmentByIdResponses = {
1406
+ /**
1407
+ * Representation of a segment.
1408
+ */
1409
+ 200: DetailedSegment;
1410
+ };
1411
+
1412
+ export type GetSegmentByIdResponse = GetSegmentByIdResponses[keyof GetSegmentByIdResponses];
1413
+
1414
+ export type GetLoggedInAthleteStarredSegmentsData = {
1415
+ body?: never;
1416
+ path?: never;
1417
+ query?: {
1418
+ /**
1419
+ * Page number. Defaults to 1.
1420
+ */
1421
+ page?: number;
1422
+ /**
1423
+ * Number of items per page. Defaults to 30.
1424
+ */
1425
+ per_page?: number;
1426
+ };
1427
+ url: '/segments/starred';
1428
+ };
1429
+
1430
+ export type GetLoggedInAthleteStarredSegmentsErrors = {
1431
+ /**
1432
+ * Unexpected error.
1433
+ */
1434
+ default: Fault;
1435
+ };
1436
+
1437
+ export type GetLoggedInAthleteStarredSegmentsError = GetLoggedInAthleteStarredSegmentsErrors[keyof GetLoggedInAthleteStarredSegmentsErrors];
1438
+
1439
+ export type GetLoggedInAthleteStarredSegmentsResponses = {
1440
+ /**
1441
+ * List of the authenticated athlete's starred segments.
1442
+ */
1443
+ 200: Array<SummarySegment>;
1444
+ };
1445
+
1446
+ export type GetLoggedInAthleteStarredSegmentsResponse = GetLoggedInAthleteStarredSegmentsResponses[keyof GetLoggedInAthleteStarredSegmentsResponses];
1447
+
1448
+ export type StarSegmentData = {
1449
+ body?: never;
1450
+ path: {
1451
+ /**
1452
+ * The identifier of the segment to star.
1453
+ */
1454
+ id: number;
1455
+ };
1456
+ query?: never;
1457
+ url: '/segments/{id}/starred';
1458
+ };
1459
+
1460
+ export type StarSegmentErrors = {
1461
+ /**
1462
+ * Unexpected error.
1463
+ */
1464
+ default: Fault;
1465
+ };
1466
+
1467
+ export type StarSegmentError = StarSegmentErrors[keyof StarSegmentErrors];
1468
+
1469
+ export type StarSegmentResponses = {
1470
+ /**
1471
+ * Representation of a segment.
1472
+ */
1473
+ 200: DetailedSegment;
1474
+ };
1475
+
1476
+ export type StarSegmentResponse = StarSegmentResponses[keyof StarSegmentResponses];
1477
+
1478
+ export type GetEffortsBySegmentIdData = {
1479
+ body?: never;
1480
+ path?: never;
1481
+ query: {
1482
+ /**
1483
+ * The identifier of the segment.
1484
+ */
1485
+ segment_id: number;
1486
+ /**
1487
+ * ISO 8601 formatted date time.
1488
+ */
1489
+ start_date_local?: string;
1490
+ /**
1491
+ * ISO 8601 formatted date time.
1492
+ */
1493
+ end_date_local?: string;
1494
+ /**
1495
+ * Number of items per page. Defaults to 30.
1496
+ */
1497
+ per_page?: number;
1498
+ };
1499
+ url: '/segment_efforts';
1500
+ };
1501
+
1502
+ export type GetEffortsBySegmentIdErrors = {
1503
+ /**
1504
+ * Unexpected error.
1505
+ */
1506
+ default: Fault;
1507
+ };
1508
+
1509
+ export type GetEffortsBySegmentIdError = GetEffortsBySegmentIdErrors[keyof GetEffortsBySegmentIdErrors];
1510
+
1511
+ export type GetEffortsBySegmentIdResponses = {
1512
+ /**
1513
+ * List of segment efforts.
1514
+ */
1515
+ 200: Array<DetailedSegmentEffort>;
1516
+ };
1517
+
1518
+ export type GetEffortsBySegmentIdResponse = GetEffortsBySegmentIdResponses[keyof GetEffortsBySegmentIdResponses];
1519
+
1520
+ export type ExploreSegmentsData = {
1521
+ body?: never;
1522
+ path?: never;
1523
+ query: {
1524
+ /**
1525
+ * The latitude and longitude for two points describing a rectangular boundary for the search: [southwest corner latitutde, southwest corner longitude, northeast corner latitude, northeast corner longitude]
1526
+ */
1527
+ bounds: [
1528
+ number,
1529
+ number,
1530
+ number,
1531
+ number
1532
+ ];
1533
+ /**
1534
+ * Desired activity type.
1535
+ */
1536
+ activity_type?: 'running' | 'riding';
1537
+ /**
1538
+ * The minimum climbing category.
1539
+ */
1540
+ min_cat?: number;
1541
+ /**
1542
+ * The maximum climbing category.
1543
+ */
1544
+ max_cat?: number;
1545
+ };
1546
+ url: '/segments/explore';
1547
+ };
1548
+
1549
+ export type ExploreSegmentsErrors = {
1550
+ /**
1551
+ * Unexpected error.
1552
+ */
1553
+ default: Fault;
1554
+ };
1555
+
1556
+ export type ExploreSegmentsError = ExploreSegmentsErrors[keyof ExploreSegmentsErrors];
1557
+
1558
+ export type ExploreSegmentsResponses = {
1559
+ /**
1560
+ * List of matching segments.
1561
+ */
1562
+ 200: ExplorerResponse;
1563
+ };
1564
+
1565
+ export type ExploreSegmentsResponse = ExploreSegmentsResponses[keyof ExploreSegmentsResponses];
1566
+
1567
+ export type GetSegmentEffortByIdData = {
1568
+ body?: never;
1569
+ path: {
1570
+ /**
1571
+ * The identifier of the segment effort.
1572
+ */
1573
+ id: number;
1574
+ };
1575
+ query?: never;
1576
+ url: '/segment_efforts/{id}';
1577
+ };
1578
+
1579
+ export type GetSegmentEffortByIdErrors = {
1580
+ /**
1581
+ * Unexpected error.
1582
+ */
1583
+ default: Fault;
1584
+ };
1585
+
1586
+ export type GetSegmentEffortByIdError = GetSegmentEffortByIdErrors[keyof GetSegmentEffortByIdErrors];
1587
+
1588
+ export type GetSegmentEffortByIdResponses = {
1589
+ /**
1590
+ * Representation of a segment effort.
1591
+ */
1592
+ 200: DetailedSegmentEffort;
1593
+ };
1594
+
1595
+ export type GetSegmentEffortByIdResponse = GetSegmentEffortByIdResponses[keyof GetSegmentEffortByIdResponses];
1596
+
1597
+ export type CreateActivityData = {
1598
+ body?: never;
1599
+ path?: never;
1600
+ query?: never;
1601
+ url: '/activities';
1602
+ };
1603
+
1604
+ export type CreateActivityErrors = {
1605
+ /**
1606
+ * Unexpected error.
1607
+ */
1608
+ default: Fault;
1609
+ };
1610
+
1611
+ export type CreateActivityError = CreateActivityErrors[keyof CreateActivityErrors];
1612
+
1613
+ export type CreateActivityResponses = {
1614
+ /**
1615
+ * The activity's detailed representation.
1616
+ */
1617
+ 201: DetailedActivity;
1618
+ };
1619
+
1620
+ export type CreateActivityResponse = CreateActivityResponses[keyof CreateActivityResponses];
1621
+
1622
+ export type GetActivityByIdData = {
1623
+ body?: never;
1624
+ path: {
1625
+ /**
1626
+ * The identifier of the activity.
1627
+ */
1628
+ id: number;
1629
+ };
1630
+ query?: {
1631
+ /**
1632
+ * To include all segments efforts.
1633
+ */
1634
+ include_all_efforts?: boolean;
1635
+ };
1636
+ url: '/activities/{id}';
1637
+ };
1638
+
1639
+ export type GetActivityByIdErrors = {
1640
+ /**
1641
+ * Unexpected error.
1642
+ */
1643
+ default: Fault;
1644
+ };
1645
+
1646
+ export type GetActivityByIdError = GetActivityByIdErrors[keyof GetActivityByIdErrors];
1647
+
1648
+ export type GetActivityByIdResponses = {
1649
+ /**
1650
+ * The activity's detailed representation.
1651
+ */
1652
+ 200: DetailedActivity;
1653
+ };
1654
+
1655
+ export type GetActivityByIdResponse = GetActivityByIdResponses[keyof GetActivityByIdResponses];
1656
+
1657
+ export type UpdateActivityByIdData = {
1658
+ body?: UpdatableActivity;
1659
+ path: {
1660
+ /**
1661
+ * The identifier of the activity.
1662
+ */
1663
+ id: number;
1664
+ };
1665
+ query?: never;
1666
+ url: '/activities/{id}';
1667
+ };
1668
+
1669
+ export type UpdateActivityByIdErrors = {
1670
+ /**
1671
+ * Unexpected error.
1672
+ */
1673
+ default: Fault;
1674
+ };
1675
+
1676
+ export type UpdateActivityByIdError = UpdateActivityByIdErrors[keyof UpdateActivityByIdErrors];
1677
+
1678
+ export type UpdateActivityByIdResponses = {
1679
+ /**
1680
+ * The activity's detailed representation.
1681
+ */
1682
+ 200: DetailedActivity;
1683
+ };
1684
+
1685
+ export type UpdateActivityByIdResponse = UpdateActivityByIdResponses[keyof UpdateActivityByIdResponses];
1686
+
1687
+ export type GetLoggedInAthleteActivitiesData = {
1688
+ body?: never;
1689
+ path?: never;
1690
+ query?: {
1691
+ /**
1692
+ * An epoch timestamp to use for filtering activities that have taken place before a certain time.
1693
+ */
1694
+ before?: number;
1695
+ /**
1696
+ * An epoch timestamp to use for filtering activities that have taken place after a certain time.
1697
+ */
1698
+ after?: number;
1699
+ /**
1700
+ * Page number. Defaults to 1.
1701
+ */
1702
+ page?: number;
1703
+ /**
1704
+ * Number of items per page. Defaults to 30.
1705
+ */
1706
+ per_page?: number;
1707
+ };
1708
+ url: '/athlete/activities';
1709
+ };
1710
+
1711
+ export type GetLoggedInAthleteActivitiesErrors = {
1712
+ /**
1713
+ * Unexpected error.
1714
+ */
1715
+ default: Fault;
1716
+ };
1717
+
1718
+ export type GetLoggedInAthleteActivitiesError = GetLoggedInAthleteActivitiesErrors[keyof GetLoggedInAthleteActivitiesErrors];
1719
+
1720
+ export type GetLoggedInAthleteActivitiesResponses = {
1721
+ /**
1722
+ * The authenticated athlete's activities
1723
+ */
1724
+ 200: Array<SummaryActivity>;
1725
+ };
1726
+
1727
+ export type GetLoggedInAthleteActivitiesResponse = GetLoggedInAthleteActivitiesResponses[keyof GetLoggedInAthleteActivitiesResponses];
1728
+
1729
+ export type GetLapsByActivityIdData = {
1730
+ body?: never;
1731
+ path: {
1732
+ /**
1733
+ * The identifier of the activity.
1734
+ */
1735
+ id: number;
1736
+ };
1737
+ query?: never;
1738
+ url: '/activities/{id}/laps';
1739
+ };
1740
+
1741
+ export type GetLapsByActivityIdErrors = {
1742
+ /**
1743
+ * Unexpected error.
1744
+ */
1745
+ default: Fault;
1746
+ };
1747
+
1748
+ export type GetLapsByActivityIdError = GetLapsByActivityIdErrors[keyof GetLapsByActivityIdErrors];
1749
+
1750
+ export type GetLapsByActivityIdResponses = {
1751
+ /**
1752
+ * Activity Laps.
1753
+ */
1754
+ 200: Array<Lap>;
1755
+ };
1756
+
1757
+ export type GetLapsByActivityIdResponse = GetLapsByActivityIdResponses[keyof GetLapsByActivityIdResponses];
1758
+
1759
+ export type GetZonesByActivityIdData = {
1760
+ body?: never;
1761
+ path: {
1762
+ /**
1763
+ * The identifier of the activity.
1764
+ */
1765
+ id: number;
1766
+ };
1767
+ query?: never;
1768
+ url: '/activities/{id}/zones';
1769
+ };
1770
+
1771
+ export type GetZonesByActivityIdErrors = {
1772
+ /**
1773
+ * Unexpected error.
1774
+ */
1775
+ default: Fault;
1776
+ };
1777
+
1778
+ export type GetZonesByActivityIdError = GetZonesByActivityIdErrors[keyof GetZonesByActivityIdErrors];
1779
+
1780
+ export type GetZonesByActivityIdResponses = {
1781
+ /**
1782
+ * Activity Zones.
1783
+ */
1784
+ 200: Array<ActivityZone>;
1785
+ };
1786
+
1787
+ export type GetZonesByActivityIdResponse = GetZonesByActivityIdResponses[keyof GetZonesByActivityIdResponses];
1788
+
1789
+ export type GetCommentsByActivityIdData = {
1790
+ body?: never;
1791
+ path: {
1792
+ /**
1793
+ * The identifier of the activity.
1794
+ */
1795
+ id: number;
1796
+ };
1797
+ query?: {
1798
+ /**
1799
+ * Deprecated. Prefer to use after_cursor.
1800
+ */
1801
+ page?: number;
1802
+ /**
1803
+ * Deprecated. Prefer to use page_size.
1804
+ */
1805
+ per_page?: number;
1806
+ /**
1807
+ * Number of items per page. Defaults to 30.
1808
+ */
1809
+ page_size?: number;
1810
+ /**
1811
+ * Cursor of the last item in the previous page of results, used to request the subsequent page of results. When omitted, the first page of results is fetched.
1812
+ */
1813
+ after_cursor?: string;
1814
+ };
1815
+ url: '/activities/{id}/comments';
1816
+ };
1817
+
1818
+ export type GetCommentsByActivityIdErrors = {
1819
+ /**
1820
+ * Unexpected error.
1821
+ */
1822
+ default: Fault;
1823
+ };
1824
+
1825
+ export type GetCommentsByActivityIdError = GetCommentsByActivityIdErrors[keyof GetCommentsByActivityIdErrors];
1826
+
1827
+ export type GetCommentsByActivityIdResponses = {
1828
+ /**
1829
+ * Comments.
1830
+ */
1831
+ 200: Array<Comment>;
1832
+ };
1833
+
1834
+ export type GetCommentsByActivityIdResponse = GetCommentsByActivityIdResponses[keyof GetCommentsByActivityIdResponses];
1835
+
1836
+ export type GetKudoersByActivityIdData = {
1837
+ body?: never;
1838
+ path: {
1839
+ /**
1840
+ * The identifier of the activity.
1841
+ */
1842
+ id: number;
1843
+ };
1844
+ query?: {
1845
+ /**
1846
+ * Page number. Defaults to 1.
1847
+ */
1848
+ page?: number;
1849
+ /**
1850
+ * Number of items per page. Defaults to 30.
1851
+ */
1852
+ per_page?: number;
1853
+ };
1854
+ url: '/activities/{id}/kudos';
1855
+ };
1856
+
1857
+ export type GetKudoersByActivityIdErrors = {
1858
+ /**
1859
+ * Unexpected error.
1860
+ */
1861
+ default: Fault;
1862
+ };
1863
+
1864
+ export type GetKudoersByActivityIdError = GetKudoersByActivityIdErrors[keyof GetKudoersByActivityIdErrors];
1865
+
1866
+ export type GetKudoersByActivityIdResponses = {
1867
+ /**
1868
+ * Comments.
1869
+ */
1870
+ 200: Array<SummaryAthlete>;
1871
+ };
1872
+
1873
+ export type GetKudoersByActivityIdResponse = GetKudoersByActivityIdResponses[keyof GetKudoersByActivityIdResponses];
1874
+
1875
+ export type GetClubByIdData = {
1876
+ body?: never;
1877
+ path: {
1878
+ /**
1879
+ * The identifier of the club.
1880
+ */
1881
+ id: number;
1882
+ };
1883
+ query?: never;
1884
+ url: '/clubs/{id}';
1885
+ };
1886
+
1887
+ export type GetClubByIdErrors = {
1888
+ /**
1889
+ * Unexpected error.
1890
+ */
1891
+ default: Fault;
1892
+ };
1893
+
1894
+ export type GetClubByIdError = GetClubByIdErrors[keyof GetClubByIdErrors];
1895
+
1896
+ export type GetClubByIdResponses = {
1897
+ /**
1898
+ * The detailed representation of a club.
1899
+ */
1900
+ 200: DetailedClub;
1901
+ };
1902
+
1903
+ export type GetClubByIdResponse = GetClubByIdResponses[keyof GetClubByIdResponses];
1904
+
1905
+ export type GetClubMembersByIdData = {
1906
+ body?: never;
1907
+ path: {
1908
+ /**
1909
+ * The identifier of the club.
1910
+ */
1911
+ id: number;
1912
+ };
1913
+ query?: {
1914
+ /**
1915
+ * Page number. Defaults to 1.
1916
+ */
1917
+ page?: number;
1918
+ /**
1919
+ * Number of items per page. Defaults to 30.
1920
+ */
1921
+ per_page?: number;
1922
+ };
1923
+ url: '/clubs/{id}/members';
1924
+ };
1925
+
1926
+ export type GetClubMembersByIdErrors = {
1927
+ /**
1928
+ * Unexpected error.
1929
+ */
1930
+ default: Fault;
1931
+ };
1932
+
1933
+ export type GetClubMembersByIdError = GetClubMembersByIdErrors[keyof GetClubMembersByIdErrors];
1934
+
1935
+ export type GetClubMembersByIdResponses = {
1936
+ /**
1937
+ * A list of club athlete representations.
1938
+ */
1939
+ 200: Array<ClubAthlete>;
1940
+ };
1941
+
1942
+ export type GetClubMembersByIdResponse = GetClubMembersByIdResponses[keyof GetClubMembersByIdResponses];
1943
+
1944
+ export type GetClubAdminsByIdData = {
1945
+ body?: never;
1946
+ path: {
1947
+ /**
1948
+ * The identifier of the club.
1949
+ */
1950
+ id: number;
1951
+ };
1952
+ query?: {
1953
+ /**
1954
+ * Page number. Defaults to 1.
1955
+ */
1956
+ page?: number;
1957
+ /**
1958
+ * Number of items per page. Defaults to 30.
1959
+ */
1960
+ per_page?: number;
1961
+ };
1962
+ url: '/clubs/{id}/admins';
1963
+ };
1964
+
1965
+ export type GetClubAdminsByIdErrors = {
1966
+ /**
1967
+ * Unexpected error.
1968
+ */
1969
+ default: Fault;
1970
+ };
1971
+
1972
+ export type GetClubAdminsByIdError = GetClubAdminsByIdErrors[keyof GetClubAdminsByIdErrors];
1973
+
1974
+ export type GetClubAdminsByIdResponses = {
1975
+ /**
1976
+ * A list of summary athlete representations.
1977
+ */
1978
+ 200: Array<SummaryAthlete>;
1979
+ };
1980
+
1981
+ export type GetClubAdminsByIdResponse = GetClubAdminsByIdResponses[keyof GetClubAdminsByIdResponses];
1982
+
1983
+ export type GetClubActivitiesByIdData = {
1984
+ body?: never;
1985
+ path: {
1986
+ /**
1987
+ * The identifier of the club.
1988
+ */
1989
+ id: number;
1990
+ };
1991
+ query?: {
1992
+ /**
1993
+ * Page number. Defaults to 1.
1994
+ */
1995
+ page?: number;
1996
+ /**
1997
+ * Number of items per page. Defaults to 30.
1998
+ */
1999
+ per_page?: number;
2000
+ };
2001
+ url: '/clubs/{id}/activities';
2002
+ };
2003
+
2004
+ export type GetClubActivitiesByIdErrors = {
2005
+ /**
2006
+ * Unexpected error.
2007
+ */
2008
+ default: Fault;
2009
+ };
2010
+
2011
+ export type GetClubActivitiesByIdError = GetClubActivitiesByIdErrors[keyof GetClubActivitiesByIdErrors];
2012
+
2013
+ export type GetClubActivitiesByIdResponses = {
2014
+ /**
2015
+ * A list of activities.
2016
+ */
2017
+ 200: Array<ClubActivity>;
2018
+ };
2019
+
2020
+ export type GetClubActivitiesByIdResponse = GetClubActivitiesByIdResponses[keyof GetClubActivitiesByIdResponses];
2021
+
2022
+ export type GetLoggedInAthleteClubsData = {
2023
+ body?: never;
2024
+ path?: never;
2025
+ query?: {
2026
+ /**
2027
+ * Page number. Defaults to 1.
2028
+ */
2029
+ page?: number;
2030
+ /**
2031
+ * Number of items per page. Defaults to 30.
2032
+ */
2033
+ per_page?: number;
2034
+ };
2035
+ url: '/athlete/clubs';
2036
+ };
2037
+
2038
+ export type GetLoggedInAthleteClubsErrors = {
2039
+ /**
2040
+ * Unexpected error.
2041
+ */
2042
+ default: Fault;
2043
+ };
2044
+
2045
+ export type GetLoggedInAthleteClubsError = GetLoggedInAthleteClubsErrors[keyof GetLoggedInAthleteClubsErrors];
2046
+
2047
+ export type GetLoggedInAthleteClubsResponses = {
2048
+ /**
2049
+ * A list of summary club representations.
2050
+ */
2051
+ 200: Array<SummaryClub>;
2052
+ };
2053
+
2054
+ export type GetLoggedInAthleteClubsResponse = GetLoggedInAthleteClubsResponses[keyof GetLoggedInAthleteClubsResponses];
2055
+
2056
+ export type GetGearByIdData = {
2057
+ body?: never;
2058
+ path: {
2059
+ /**
2060
+ * The identifier of the gear.
2061
+ */
2062
+ id: string;
2063
+ };
2064
+ query?: never;
2065
+ url: '/gear/{id}';
2066
+ };
2067
+
2068
+ export type GetGearByIdErrors = {
2069
+ /**
2070
+ * Unexpected error.
2071
+ */
2072
+ default: Fault;
2073
+ };
2074
+
2075
+ export type GetGearByIdError = GetGearByIdErrors[keyof GetGearByIdErrors];
2076
+
2077
+ export type GetGearByIdResponses = {
2078
+ /**
2079
+ * A representation of the gear.
2080
+ */
2081
+ 200: DetailedGear;
2082
+ };
2083
+
2084
+ export type GetGearByIdResponse = GetGearByIdResponses[keyof GetGearByIdResponses];
2085
+
2086
+ export type GetRouteByIdData = {
2087
+ body?: never;
2088
+ path: {
2089
+ /**
2090
+ * The identifier of the route.
2091
+ */
2092
+ id: number;
2093
+ };
2094
+ query?: never;
2095
+ url: '/routes/{id}';
2096
+ };
2097
+
2098
+ export type GetRouteByIdErrors = {
2099
+ /**
2100
+ * Unexpected error.
2101
+ */
2102
+ default: Fault;
2103
+ };
2104
+
2105
+ export type GetRouteByIdError = GetRouteByIdErrors[keyof GetRouteByIdErrors];
2106
+
2107
+ export type GetRouteByIdResponses = {
2108
+ /**
2109
+ * A representation of the route.
2110
+ */
2111
+ 200: Route;
2112
+ };
2113
+
2114
+ export type GetRouteByIdResponse = GetRouteByIdResponses[keyof GetRouteByIdResponses];
2115
+
2116
+ export type GetRoutesByAthleteIdData = {
2117
+ body?: never;
2118
+ path?: never;
2119
+ query?: {
2120
+ /**
2121
+ * Page number. Defaults to 1.
2122
+ */
2123
+ page?: number;
2124
+ /**
2125
+ * Number of items per page. Defaults to 30.
2126
+ */
2127
+ per_page?: number;
2128
+ };
2129
+ url: '/athletes/{id}/routes';
2130
+ };
2131
+
2132
+ export type GetRoutesByAthleteIdErrors = {
2133
+ /**
2134
+ * Unexpected error.
2135
+ */
2136
+ default: Fault;
2137
+ };
2138
+
2139
+ export type GetRoutesByAthleteIdError = GetRoutesByAthleteIdErrors[keyof GetRoutesByAthleteIdErrors];
2140
+
2141
+ export type GetRoutesByAthleteIdResponses = {
2142
+ /**
2143
+ * A representation of the route.
2144
+ */
2145
+ 200: Array<Route>;
2146
+ };
2147
+
2148
+ export type GetRoutesByAthleteIdResponse = GetRoutesByAthleteIdResponses[keyof GetRoutesByAthleteIdResponses];
2149
+
2150
+ export type GetRouteAsGpxData = {
2151
+ body?: never;
2152
+ path: {
2153
+ /**
2154
+ * The identifier of the route.
2155
+ */
2156
+ id: number;
2157
+ };
2158
+ query?: never;
2159
+ url: '/routes/{id}/export_gpx';
2160
+ };
2161
+
2162
+ export type GetRouteAsGpxErrors = {
2163
+ /**
2164
+ * Unexpected error.
2165
+ */
2166
+ default: Fault;
2167
+ };
2168
+
2169
+ export type GetRouteAsGpxError = GetRouteAsGpxErrors[keyof GetRouteAsGpxErrors];
2170
+
2171
+ export type GetRouteAsGpxResponses = {
2172
+ /**
2173
+ * A GPX file with the route.
2174
+ */
2175
+ 200: unknown;
2176
+ };
2177
+
2178
+ export type GetRouteAsTcxData = {
2179
+ body?: never;
2180
+ path: {
2181
+ /**
2182
+ * The identifier of the route.
2183
+ */
2184
+ id: number;
2185
+ };
2186
+ query?: never;
2187
+ url: '/routes/{id}/export_tcx';
2188
+ };
2189
+
2190
+ export type GetRouteAsTcxErrors = {
2191
+ /**
2192
+ * Unexpected error.
2193
+ */
2194
+ default: Fault;
2195
+ };
2196
+
2197
+ export type GetRouteAsTcxError = GetRouteAsTcxErrors[keyof GetRouteAsTcxErrors];
2198
+
2199
+ export type GetRouteAsTcxResponses = {
2200
+ /**
2201
+ * A TCX file with the route.
2202
+ */
2203
+ 200: unknown;
2204
+ };
2205
+
2206
+ export type CreateUploadData = {
2207
+ body?: {
2208
+ /**
2209
+ * The uploaded file.
2210
+ */
2211
+ file?: Blob | File;
2212
+ /**
2213
+ * The desired name of the resulting activity.
2214
+ */
2215
+ name?: string;
2216
+ /**
2217
+ * The desired description of the resulting activity.
2218
+ */
2219
+ description?: string;
2220
+ /**
2221
+ * Whether the resulting activity should be marked as having been performed on a trainer.
2222
+ */
2223
+ trainer?: string;
2224
+ /**
2225
+ * Whether the resulting activity should be tagged as a commute.
2226
+ */
2227
+ commute?: string;
2228
+ /**
2229
+ * The format of the uploaded file.
2230
+ */
2231
+ data_type?: 'fit' | 'fit.gz' | 'tcx' | 'tcx.gz' | 'gpx' | 'gpx.gz';
2232
+ /**
2233
+ * The desired external identifier of the resulting activity.
2234
+ */
2235
+ external_id?: string;
2236
+ };
2237
+ path?: never;
2238
+ query?: never;
2239
+ url: '/uploads';
2240
+ };
2241
+
2242
+ export type CreateUploadErrors = {
2243
+ /**
2244
+ * Unexpected error.
2245
+ */
2246
+ default: Fault;
2247
+ };
2248
+
2249
+ export type CreateUploadError = CreateUploadErrors[keyof CreateUploadErrors];
2250
+
2251
+ export type CreateUploadResponses = {
2252
+ /**
2253
+ * A representation of the created upload.
2254
+ */
2255
+ 201: Upload;
2256
+ };
2257
+
2258
+ export type CreateUploadResponse = CreateUploadResponses[keyof CreateUploadResponses];
2259
+
2260
+ export type GetUploadByIdData = {
2261
+ body?: never;
2262
+ path: {
2263
+ /**
2264
+ * The identifier of the upload.
2265
+ */
2266
+ uploadId: number;
2267
+ };
2268
+ query?: never;
2269
+ url: '/uploads/{uploadId}';
2270
+ };
2271
+
2272
+ export type GetUploadByIdErrors = {
2273
+ /**
2274
+ * Unexpected error.
2275
+ */
2276
+ default: Fault;
2277
+ };
2278
+
2279
+ export type GetUploadByIdError = GetUploadByIdErrors[keyof GetUploadByIdErrors];
2280
+
2281
+ export type GetUploadByIdResponses = {
2282
+ /**
2283
+ * Representation of the upload.
2284
+ */
2285
+ 200: Upload;
2286
+ };
2287
+
2288
+ export type GetUploadByIdResponse = GetUploadByIdResponses[keyof GetUploadByIdResponses];
2289
+
2290
+ export type GetActivityStreamsData = {
2291
+ body?: never;
2292
+ path: {
2293
+ /**
2294
+ * The identifier of the activity.
2295
+ */
2296
+ id: number;
2297
+ };
2298
+ query: {
2299
+ /**
2300
+ * Desired stream types.
2301
+ */
2302
+ keys: Array<'time' | 'distance' | 'latlng' | 'altitude' | 'velocity_smooth' | 'heartrate' | 'cadence' | 'watts' | 'temp' | 'moving' | 'grade_smooth'>;
2303
+ /**
2304
+ * Must be true.
2305
+ */
2306
+ key_by_type: boolean;
2307
+ };
2308
+ url: '/activities/{id}/streams';
2309
+ };
2310
+
2311
+ export type GetActivityStreamsErrors = {
2312
+ /**
2313
+ * Unexpected error.
2314
+ */
2315
+ default: Fault;
2316
+ };
2317
+
2318
+ export type GetActivityStreamsError = GetActivityStreamsErrors[keyof GetActivityStreamsErrors];
2319
+
2320
+ export type GetActivityStreamsResponses = {
2321
+ /**
2322
+ * The set of requested streams.
2323
+ */
2324
+ 200: StreamSet;
2325
+ };
2326
+
2327
+ export type GetActivityStreamsResponse = GetActivityStreamsResponses[keyof GetActivityStreamsResponses];
2328
+
2329
+ export type GetSegmentEffortStreamsData = {
2330
+ body?: never;
2331
+ path: {
2332
+ /**
2333
+ * The identifier of the segment effort.
2334
+ */
2335
+ id: number;
2336
+ };
2337
+ query: {
2338
+ /**
2339
+ * The types of streams to return.
2340
+ */
2341
+ keys: Array<'time' | 'distance' | 'latlng' | 'altitude' | 'velocity_smooth' | 'heartrate' | 'cadence' | 'watts' | 'temp' | 'moving' | 'grade_smooth'>;
2342
+ /**
2343
+ * Must be true.
2344
+ */
2345
+ key_by_type: boolean;
2346
+ };
2347
+ url: '/segment_efforts/{id}/streams';
2348
+ };
2349
+
2350
+ export type GetSegmentEffortStreamsErrors = {
2351
+ /**
2352
+ * Unexpected error.
2353
+ */
2354
+ default: Fault;
2355
+ };
2356
+
2357
+ export type GetSegmentEffortStreamsError = GetSegmentEffortStreamsErrors[keyof GetSegmentEffortStreamsErrors];
2358
+
2359
+ export type GetSegmentEffortStreamsResponses = {
2360
+ /**
2361
+ * The set of requested streams.
2362
+ */
2363
+ 200: StreamSet;
2364
+ };
2365
+
2366
+ export type GetSegmentEffortStreamsResponse = GetSegmentEffortStreamsResponses[keyof GetSegmentEffortStreamsResponses];
2367
+
2368
+ export type GetSegmentStreamsData = {
2369
+ body?: never;
2370
+ path: {
2371
+ /**
2372
+ * The identifier of the segment.
2373
+ */
2374
+ id: number;
2375
+ };
2376
+ query: {
2377
+ /**
2378
+ * The types of streams to return.
2379
+ */
2380
+ keys: Array<'distance' | 'latlng' | 'altitude'>;
2381
+ /**
2382
+ * Must be true.
2383
+ */
2384
+ key_by_type: boolean;
2385
+ };
2386
+ url: '/segments/{id}/streams';
2387
+ };
2388
+
2389
+ export type GetSegmentStreamsErrors = {
2390
+ /**
2391
+ * Unexpected error.
2392
+ */
2393
+ default: Fault;
2394
+ };
2395
+
2396
+ export type GetSegmentStreamsError = GetSegmentStreamsErrors[keyof GetSegmentStreamsErrors];
2397
+
2398
+ export type GetSegmentStreamsResponses = {
2399
+ /**
2400
+ * The set of requested streams.
2401
+ */
2402
+ 200: StreamSet;
2403
+ };
2404
+
2405
+ export type GetSegmentStreamsResponse = GetSegmentStreamsResponses[keyof GetSegmentStreamsResponses];
2406
+
2407
+ export type GetRouteStreamsData = {
2408
+ body?: never;
2409
+ path: {
2410
+ /**
2411
+ * The identifier of the route.
2412
+ */
2413
+ id: number;
2414
+ };
2415
+ query?: never;
2416
+ url: '/routes/{id}/streams';
2417
+ };
2418
+
2419
+ export type GetRouteStreamsErrors = {
2420
+ /**
2421
+ * Unexpected error.
2422
+ */
2423
+ default: Fault;
2424
+ };
2425
+
2426
+ export type GetRouteStreamsError = GetRouteStreamsErrors[keyof GetRouteStreamsErrors];
2427
+
2428
+ export type GetRouteStreamsResponses = {
2429
+ /**
2430
+ * The set of requested streams.
2431
+ */
2432
+ 200: StreamSet;
2433
+ };
2434
+
2435
+ export type GetRouteStreamsResponse = GetRouteStreamsResponses[keyof GetRouteStreamsResponses];