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