@pinta365/strava 0.0.1
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.
- package/LICENSE +21 -0
- package/README.md +390 -0
- package/esm/_dnt.shims.d.ts +2 -0
- package/esm/_dnt.shims.js +57 -0
- package/esm/deps/jsr.io/@cross/runtime/1.2.1/mod.d.ts +126 -0
- package/esm/deps/jsr.io/@cross/runtime/1.2.1/mod.js +480 -0
- package/esm/mod.d.ts +27 -0
- package/esm/mod.js +27 -0
- package/esm/package.json +3 -0
- package/esm/src/auth/oauth.d.ts +68 -0
- package/esm/src/auth/oauth.js +203 -0
- package/esm/src/auth/scopes.d.ts +52 -0
- package/esm/src/auth/scopes.js +71 -0
- package/esm/src/auth/token-store.d.ts +57 -0
- package/esm/src/auth/token-store.js +142 -0
- package/esm/src/client.d.ts +98 -0
- package/esm/src/client.js +235 -0
- package/esm/src/errors.d.ts +52 -0
- package/esm/src/errors.js +102 -0
- package/esm/src/http/deduplication.d.ts +33 -0
- package/esm/src/http/deduplication.js +96 -0
- package/esm/src/http/rate-limiter.d.ts +47 -0
- package/esm/src/http/rate-limiter.js +168 -0
- package/esm/src/http/request.d.ts +24 -0
- package/esm/src/http/request.js +158 -0
- package/esm/src/http/retry.d.ts +9 -0
- package/esm/src/http/retry.js +61 -0
- package/esm/src/resources/activities.d.ts +149 -0
- package/esm/src/resources/activities.js +189 -0
- package/esm/src/resources/athletes.d.ts +37 -0
- package/esm/src/resources/athletes.js +85 -0
- package/esm/src/resources/clubs.d.ts +45 -0
- package/esm/src/resources/clubs.js +71 -0
- package/esm/src/resources/gears.d.ts +17 -0
- package/esm/src/resources/gears.js +27 -0
- package/esm/src/resources/routes.d.ts +33 -0
- package/esm/src/resources/routes.js +71 -0
- package/esm/src/resources/segment-efforts.d.ts +38 -0
- package/esm/src/resources/segment-efforts.js +53 -0
- package/esm/src/resources/segments.d.ts +42 -0
- package/esm/src/resources/segments.js +67 -0
- package/esm/src/resources/streams.d.ts +44 -0
- package/esm/src/resources/streams.js +75 -0
- package/esm/src/resources/uploads.d.ts +41 -0
- package/esm/src/resources/uploads.js +79 -0
- package/esm/src/types/api.d.ts +9 -0
- package/esm/src/types/api.js +7 -0
- package/esm/src/types/common.d.ts +65 -0
- package/esm/src/types/common.js +4 -0
- package/esm/src/types/generated.d.ts +731 -0
- package/esm/src/types/generated.js +7 -0
- package/esm/src/utils/pagination.d.ts +45 -0
- package/esm/src/utils/pagination.js +112 -0
- package/esm/src/utils/transformers.d.ts +30 -0
- package/esm/src/utils/transformers.js +189 -0
- package/esm/src/utils/validators.d.ts +53 -0
- package/esm/src/utils/validators.js +84 -0
- package/package.json +40 -0
- package/script/_dnt.shims.d.ts +2 -0
- package/script/_dnt.shims.js +60 -0
- package/script/deps/jsr.io/@cross/runtime/1.2.1/mod.d.ts +126 -0
- package/script/deps/jsr.io/@cross/runtime/1.2.1/mod.js +526 -0
- package/script/mod.d.ts +27 -0
- package/script/mod.js +73 -0
- package/script/package.json +3 -0
- package/script/src/auth/oauth.d.ts +68 -0
- package/script/src/auth/oauth.js +211 -0
- package/script/src/auth/scopes.d.ts +52 -0
- package/script/src/auth/scopes.js +79 -0
- package/script/src/auth/token-store.d.ts +57 -0
- package/script/src/auth/token-store.js +182 -0
- package/script/src/client.d.ts +98 -0
- package/script/src/client.js +239 -0
- package/script/src/errors.d.ts +52 -0
- package/script/src/errors.js +111 -0
- package/script/src/http/deduplication.d.ts +33 -0
- package/script/src/http/deduplication.js +100 -0
- package/script/src/http/rate-limiter.d.ts +47 -0
- package/script/src/http/rate-limiter.js +172 -0
- package/script/src/http/request.d.ts +24 -0
- package/script/src/http/request.js +161 -0
- package/script/src/http/retry.d.ts +9 -0
- package/script/src/http/retry.js +64 -0
- package/script/src/resources/activities.d.ts +149 -0
- package/script/src/resources/activities.js +193 -0
- package/script/src/resources/athletes.d.ts +37 -0
- package/script/src/resources/athletes.js +89 -0
- package/script/src/resources/clubs.d.ts +45 -0
- package/script/src/resources/clubs.js +75 -0
- package/script/src/resources/gears.d.ts +17 -0
- package/script/src/resources/gears.js +31 -0
- package/script/src/resources/routes.d.ts +33 -0
- package/script/src/resources/routes.js +75 -0
- package/script/src/resources/segment-efforts.d.ts +38 -0
- package/script/src/resources/segment-efforts.js +57 -0
- package/script/src/resources/segments.d.ts +42 -0
- package/script/src/resources/segments.js +71 -0
- package/script/src/resources/streams.d.ts +44 -0
- package/script/src/resources/streams.js +79 -0
- package/script/src/resources/uploads.d.ts +41 -0
- package/script/src/resources/uploads.js +83 -0
- package/script/src/types/api.d.ts +9 -0
- package/script/src/types/api.js +23 -0
- package/script/src/types/common.d.ts +65 -0
- package/script/src/types/common.js +5 -0
- package/script/src/types/generated.d.ts +731 -0
- package/script/src/types/generated.js +8 -0
- package/script/src/utils/pagination.d.ts +45 -0
- package/script/src/utils/pagination.js +118 -0
- package/script/src/utils/transformers.d.ts +30 -0
- package/script/src/utils/transformers.js +196 -0
- package/script/src/utils/validators.d.ts +53 -0
- package/script/src/utils/validators.js +92 -0
|
@@ -0,0 +1,731 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auto-generated TypeScript types from Strava API Swagger specification
|
|
3
|
+
* Generated at: 2026-01-03T21:49:32.765Z
|
|
4
|
+
* Source: https://developers.strava.com/swagger/swagger.json
|
|
5
|
+
* DO NOT EDIT THIS FILE MANUALLY
|
|
6
|
+
*/
|
|
7
|
+
/** A set of rolled-up statistics and totals for an athlete */
|
|
8
|
+
export interface ActivityStats {
|
|
9
|
+
/** The longest distance ridden by the athlete. */
|
|
10
|
+
biggestRideDistance?: number;
|
|
11
|
+
/** The highest climb ridden by the athlete. */
|
|
12
|
+
biggestClimbElevationGain?: number;
|
|
13
|
+
/** The recent (last 4 weeks) ride stats for the athlete. */
|
|
14
|
+
recentRideTotals?: ActivityTotal;
|
|
15
|
+
/** The recent (last 4 weeks) run stats for the athlete. */
|
|
16
|
+
recentRunTotals?: ActivityTotal;
|
|
17
|
+
/** The recent (last 4 weeks) swim stats for the athlete. */
|
|
18
|
+
recentSwimTotals?: ActivityTotal;
|
|
19
|
+
/** The year to date ride stats for the athlete. */
|
|
20
|
+
ytdRideTotals?: ActivityTotal;
|
|
21
|
+
/** The year to date run stats for the athlete. */
|
|
22
|
+
ytdRunTotals?: ActivityTotal;
|
|
23
|
+
/** The year to date swim stats for the athlete. */
|
|
24
|
+
ytdSwimTotals?: ActivityTotal;
|
|
25
|
+
/** The all time ride stats for the athlete. */
|
|
26
|
+
allRideTotals?: ActivityTotal;
|
|
27
|
+
/** The all time run stats for the athlete. */
|
|
28
|
+
allRunTotals?: ActivityTotal;
|
|
29
|
+
/** The all time swim stats for the athlete. */
|
|
30
|
+
allSwimTotals?: ActivityTotal;
|
|
31
|
+
}
|
|
32
|
+
/** Encapsulates the errors that may be returned from the API. */
|
|
33
|
+
export interface Fault {
|
|
34
|
+
/** The set of specific errors associated with this fault, if any. */
|
|
35
|
+
errors?: Error[];
|
|
36
|
+
/** The message of the fault. */
|
|
37
|
+
message?: string;
|
|
38
|
+
}
|
|
39
|
+
export interface Error {
|
|
40
|
+
/** The code associated with this error. */
|
|
41
|
+
code?: string;
|
|
42
|
+
/** The specific field or aspect of the resource associated with this error. */
|
|
43
|
+
field?: string;
|
|
44
|
+
/** The type of resource associated with this error. */
|
|
45
|
+
resource?: string;
|
|
46
|
+
}
|
|
47
|
+
export interface DetailedAthlete extends SummaryAthlete {
|
|
48
|
+
/** The athlete's follower count. */
|
|
49
|
+
followerCount?: number;
|
|
50
|
+
/** The athlete's friend count. */
|
|
51
|
+
friendCount?: number;
|
|
52
|
+
/** The athlete's preferred unit system. */
|
|
53
|
+
measurementPreference?: "feet" | "meters";
|
|
54
|
+
/** The athlete's FTP (Functional Threshold Power). */
|
|
55
|
+
ftp?: number;
|
|
56
|
+
/** The athlete's weight. */
|
|
57
|
+
weight?: number;
|
|
58
|
+
/** The athlete's clubs. */
|
|
59
|
+
clubs?: SummaryClub[];
|
|
60
|
+
/** The athlete's bikes. */
|
|
61
|
+
bikes?: SummaryGear[];
|
|
62
|
+
/** The athlete's shoes. */
|
|
63
|
+
shoes?: SummaryGear[];
|
|
64
|
+
}
|
|
65
|
+
export interface SummaryAthlete extends MetaAthlete {
|
|
66
|
+
/** Resource state, indicates level of detail. Possible values: 1 -> "meta", 2 -> "summary", 3 -> "detail" */
|
|
67
|
+
resourceState?: number;
|
|
68
|
+
/** The athlete's first name. */
|
|
69
|
+
firstname?: string;
|
|
70
|
+
/** The athlete's last name. */
|
|
71
|
+
lastname?: string;
|
|
72
|
+
/** URL to a 62x62 pixel profile picture. */
|
|
73
|
+
profileMedium?: string;
|
|
74
|
+
/** URL to a 124x124 pixel profile picture. */
|
|
75
|
+
profile?: string;
|
|
76
|
+
/** The athlete's city. */
|
|
77
|
+
city?: string;
|
|
78
|
+
/** The athlete's state or geographical region. */
|
|
79
|
+
state?: string;
|
|
80
|
+
/** The athlete's country. */
|
|
81
|
+
country?: string;
|
|
82
|
+
/** The athlete's sex. */
|
|
83
|
+
sex?: "M" | "F";
|
|
84
|
+
/** Deprecated. Use summit field instead. Whether the athlete has any Summit subscription. */
|
|
85
|
+
premium?: boolean;
|
|
86
|
+
/** Whether the athlete has any Summit subscription. */
|
|
87
|
+
summit?: boolean;
|
|
88
|
+
/** The time at which the athlete was created. */
|
|
89
|
+
createdAt?: string;
|
|
90
|
+
/** The time at which the athlete was last updated. */
|
|
91
|
+
updatedAt?: string;
|
|
92
|
+
}
|
|
93
|
+
export interface ClubAthlete {
|
|
94
|
+
/** Resource state, indicates level of detail. Possible values: 1 -> "meta", 2 -> "summary", 3 -> "detail" */
|
|
95
|
+
resourceState?: number;
|
|
96
|
+
/** The athlete's first name. */
|
|
97
|
+
firstname?: string;
|
|
98
|
+
/** The athlete's last initial. */
|
|
99
|
+
lastname?: string;
|
|
100
|
+
/** The athlete's member status. */
|
|
101
|
+
member?: string;
|
|
102
|
+
/** Whether the athlete is a club admin. */
|
|
103
|
+
admin?: boolean;
|
|
104
|
+
/** Whether the athlete is club owner. */
|
|
105
|
+
owner?: boolean;
|
|
106
|
+
}
|
|
107
|
+
export interface MetaAthlete {
|
|
108
|
+
/** The unique identifier of the athlete */
|
|
109
|
+
id?: number;
|
|
110
|
+
}
|
|
111
|
+
export interface Zones {
|
|
112
|
+
heartRate?: HeartRateZoneRanges;
|
|
113
|
+
power?: PowerZoneRanges;
|
|
114
|
+
}
|
|
115
|
+
export interface HeartRateZoneRanges {
|
|
116
|
+
/** Whether the athlete has set their own custom heart rate zones */
|
|
117
|
+
customZones?: boolean;
|
|
118
|
+
zones?: ZoneRanges;
|
|
119
|
+
}
|
|
120
|
+
export interface PowerZoneRanges {
|
|
121
|
+
zones?: ZoneRanges;
|
|
122
|
+
}
|
|
123
|
+
export type ZoneRanges = ZoneRange[];
|
|
124
|
+
export interface ZoneRange {
|
|
125
|
+
/** The minimum value in the range. */
|
|
126
|
+
min?: number;
|
|
127
|
+
/** The maximum value in the range. */
|
|
128
|
+
max?: number;
|
|
129
|
+
}
|
|
130
|
+
/** A union type representing the time spent in a given zone. */
|
|
131
|
+
export interface TimedZoneRange extends ZoneRange {
|
|
132
|
+
/** The number of seconds spent in this zone */
|
|
133
|
+
time?: number;
|
|
134
|
+
}
|
|
135
|
+
/** Stores the exclusive ranges representing zones and the time spent in each. */
|
|
136
|
+
export type TimedZoneDistribution = TimedZoneRange[];
|
|
137
|
+
export interface ActivityZone {
|
|
138
|
+
score?: number;
|
|
139
|
+
distributionBuckets?: TimedZoneDistribution;
|
|
140
|
+
type?: "heartrate" | "power";
|
|
141
|
+
sensorBased?: boolean;
|
|
142
|
+
points?: number;
|
|
143
|
+
customZones?: boolean;
|
|
144
|
+
max?: number;
|
|
145
|
+
}
|
|
146
|
+
export interface DetailedSegment extends SummarySegment {
|
|
147
|
+
/** The time at which the segment was created. */
|
|
148
|
+
createdAt?: string;
|
|
149
|
+
/** The time at which the segment was last updated. */
|
|
150
|
+
updatedAt?: string;
|
|
151
|
+
/** The segment's total elevation gain. */
|
|
152
|
+
totalElevationGain?: number;
|
|
153
|
+
map?: PolylineMap;
|
|
154
|
+
/** The total number of efforts for this segment */
|
|
155
|
+
effortCount?: number;
|
|
156
|
+
/** The number of unique athletes who have an effort for this segment */
|
|
157
|
+
athleteCount?: number;
|
|
158
|
+
/** Whether this segment is considered hazardous */
|
|
159
|
+
hazardous?: boolean;
|
|
160
|
+
/** The number of stars for this segment */
|
|
161
|
+
starCount?: number;
|
|
162
|
+
}
|
|
163
|
+
export interface SummarySegment {
|
|
164
|
+
/** The unique identifier of this segment */
|
|
165
|
+
id?: number;
|
|
166
|
+
/** The name of this segment */
|
|
167
|
+
name?: string;
|
|
168
|
+
activityType?: "Ride" | "Run";
|
|
169
|
+
/** The segment's distance, in meters */
|
|
170
|
+
distance?: number;
|
|
171
|
+
/** The segment's average grade, in percents */
|
|
172
|
+
averageGrade?: number;
|
|
173
|
+
/** The segments's maximum grade, in percents */
|
|
174
|
+
maximumGrade?: number;
|
|
175
|
+
/** The segments's highest elevation, in meters */
|
|
176
|
+
elevationHigh?: number;
|
|
177
|
+
/** The segments's lowest elevation, in meters */
|
|
178
|
+
elevationLow?: number;
|
|
179
|
+
startLatlng?: LatLng;
|
|
180
|
+
endLatlng?: LatLng;
|
|
181
|
+
/** The category of the climb [0, 5]. Higher is harder ie. 5 is Hors catégorie, 0 is uncategorized in climb_category. */
|
|
182
|
+
climbCategory?: number;
|
|
183
|
+
/** The segments's city. */
|
|
184
|
+
city?: string;
|
|
185
|
+
/** The segments's state or geographical region. */
|
|
186
|
+
state?: string;
|
|
187
|
+
/** The segment's country. */
|
|
188
|
+
country?: string;
|
|
189
|
+
/** Whether this segment is private. */
|
|
190
|
+
private?: boolean;
|
|
191
|
+
athletePrEffort?: SummaryPRSegmentEffort;
|
|
192
|
+
athleteSegmentStats?: SummarySegmentEffort;
|
|
193
|
+
}
|
|
194
|
+
export interface ExplorerResponse {
|
|
195
|
+
/** The set of segments matching an explorer request */
|
|
196
|
+
segments?: ExplorerSegment[];
|
|
197
|
+
}
|
|
198
|
+
export interface ExplorerSegment {
|
|
199
|
+
/** The unique identifier of this segment */
|
|
200
|
+
id?: number;
|
|
201
|
+
/** The name of this segment */
|
|
202
|
+
name?: string;
|
|
203
|
+
/** 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. */
|
|
204
|
+
climbCategory?: number;
|
|
205
|
+
/** The description for the category of the climb */
|
|
206
|
+
climbCategoryDesc?: "NC" | "4" | "3" | "2" | "1" | "HC";
|
|
207
|
+
/** The segment's average grade, in percents */
|
|
208
|
+
avgGrade?: number;
|
|
209
|
+
startLatlng?: LatLng;
|
|
210
|
+
endLatlng?: LatLng;
|
|
211
|
+
/** The segments's evelation difference, in meters */
|
|
212
|
+
elevDifference?: number;
|
|
213
|
+
/** The segment's distance, in meters */
|
|
214
|
+
distance?: number;
|
|
215
|
+
/** The polyline of the segment */
|
|
216
|
+
points?: string;
|
|
217
|
+
}
|
|
218
|
+
export interface DetailedSegmentEffort extends SummarySegmentEffort {
|
|
219
|
+
/** The name of the segment on which this effort was performed */
|
|
220
|
+
name?: string;
|
|
221
|
+
activity?: MetaActivity;
|
|
222
|
+
athlete?: MetaAthlete;
|
|
223
|
+
/** The effort's moving time */
|
|
224
|
+
movingTime?: number;
|
|
225
|
+
/** The start index of this effort in its activity's stream */
|
|
226
|
+
startIndex?: number;
|
|
227
|
+
/** The end index of this effort in its activity's stream */
|
|
228
|
+
endIndex?: number;
|
|
229
|
+
/** The effort's average cadence */
|
|
230
|
+
averageCadence?: number;
|
|
231
|
+
/** The average wattage of this effort */
|
|
232
|
+
averageWatts?: number;
|
|
233
|
+
/** For riding efforts, whether the wattage was reported by a dedicated recording device */
|
|
234
|
+
deviceWatts?: boolean;
|
|
235
|
+
/** The heart heart rate of the athlete during this effort */
|
|
236
|
+
averageHeartrate?: number;
|
|
237
|
+
/** The maximum heart rate of the athlete during this effort */
|
|
238
|
+
maxHeartrate?: number;
|
|
239
|
+
segment?: SummarySegment;
|
|
240
|
+
/** The rank of the effort on the global leaderboard if it belongs in the top 10 at the time of upload */
|
|
241
|
+
komRank?: number;
|
|
242
|
+
/** The rank of the effort on the athlete's leaderboard if it belongs in the top 3 at the time of upload */
|
|
243
|
+
prRank?: number;
|
|
244
|
+
/** Whether this effort should be hidden when viewed within an activity */
|
|
245
|
+
hidden?: boolean;
|
|
246
|
+
}
|
|
247
|
+
export interface SummarySegmentEffort {
|
|
248
|
+
/** The unique identifier of this effort */
|
|
249
|
+
id?: number;
|
|
250
|
+
/** The unique identifier of the activity related to this effort */
|
|
251
|
+
activityId?: number;
|
|
252
|
+
/** The effort's elapsed time */
|
|
253
|
+
elapsedTime?: number;
|
|
254
|
+
/** The time at which the effort was started. */
|
|
255
|
+
startDate?: string;
|
|
256
|
+
/** The time at which the effort was started in the local timezone. */
|
|
257
|
+
startDateLocal?: string;
|
|
258
|
+
/** The effort's distance in meters */
|
|
259
|
+
distance?: number;
|
|
260
|
+
/** Whether this effort is the current best on the leaderboard */
|
|
261
|
+
isKom?: boolean;
|
|
262
|
+
}
|
|
263
|
+
export interface SummaryPRSegmentEffort {
|
|
264
|
+
/** The unique identifier of the activity related to the PR effort. */
|
|
265
|
+
prActivityId?: number;
|
|
266
|
+
/** The elapsed time ot the PR effort. */
|
|
267
|
+
prElapsedTime?: number;
|
|
268
|
+
/** The time at which the PR effort was started. */
|
|
269
|
+
prDate?: string;
|
|
270
|
+
/** Number of efforts by the authenticated athlete on this segment. */
|
|
271
|
+
effortCount?: number;
|
|
272
|
+
}
|
|
273
|
+
export interface DetailedActivity extends SummaryActivity {
|
|
274
|
+
/** The description of the activity */
|
|
275
|
+
description?: string;
|
|
276
|
+
photos?: PhotosSummary;
|
|
277
|
+
gear?: SummaryGear;
|
|
278
|
+
/** The number of kilocalories consumed during this activity */
|
|
279
|
+
calories?: number;
|
|
280
|
+
segmentEfforts?: DetailedSegmentEffort[];
|
|
281
|
+
/** The name of the device used to record the activity */
|
|
282
|
+
deviceName?: string;
|
|
283
|
+
/** The token used to embed a Strava activity */
|
|
284
|
+
embedToken?: string;
|
|
285
|
+
/** The splits of this activity in metric units (for runs) */
|
|
286
|
+
splitsMetric?: Split[];
|
|
287
|
+
/** The splits of this activity in imperial units (for runs) */
|
|
288
|
+
splitsStandard?: Split[];
|
|
289
|
+
laps?: Lap[];
|
|
290
|
+
bestEfforts?: DetailedSegmentEffort[];
|
|
291
|
+
}
|
|
292
|
+
export interface SummaryActivity extends MetaActivity {
|
|
293
|
+
/** The identifier provided at upload time */
|
|
294
|
+
externalId?: string;
|
|
295
|
+
/** The identifier of the upload that resulted in this activity */
|
|
296
|
+
uploadId?: number;
|
|
297
|
+
athlete?: MetaAthlete;
|
|
298
|
+
/** The name of the activity */
|
|
299
|
+
name?: string;
|
|
300
|
+
/** The activity's distance, in meters */
|
|
301
|
+
distance?: number;
|
|
302
|
+
/** The activity's moving time, in seconds */
|
|
303
|
+
movingTime?: number;
|
|
304
|
+
/** The activity's elapsed time, in seconds */
|
|
305
|
+
elapsedTime?: number;
|
|
306
|
+
/** The activity's total elevation gain. */
|
|
307
|
+
totalElevationGain?: number;
|
|
308
|
+
/** The activity's highest elevation, in meters */
|
|
309
|
+
elevHigh?: number;
|
|
310
|
+
/** The activity's lowest elevation, in meters */
|
|
311
|
+
elevLow?: number;
|
|
312
|
+
/** Deprecated. Prefer to use sport_type */
|
|
313
|
+
type?: ActivityType;
|
|
314
|
+
sportType?: SportType;
|
|
315
|
+
/** The time at which the activity was started. */
|
|
316
|
+
startDate?: string;
|
|
317
|
+
/** The time at which the activity was started in the local timezone. */
|
|
318
|
+
startDateLocal?: string;
|
|
319
|
+
/** The timezone of the activity */
|
|
320
|
+
timezone?: string;
|
|
321
|
+
startLatlng?: LatLng;
|
|
322
|
+
endLatlng?: LatLng;
|
|
323
|
+
/** The number of achievements gained during this activity */
|
|
324
|
+
achievementCount?: number;
|
|
325
|
+
/** The number of kudos given for this activity */
|
|
326
|
+
kudosCount?: number;
|
|
327
|
+
/** The number of comments for this activity */
|
|
328
|
+
commentCount?: number;
|
|
329
|
+
/** The number of athletes for taking part in a group activity */
|
|
330
|
+
athleteCount?: number;
|
|
331
|
+
/** The number of Instagram photos for this activity */
|
|
332
|
+
photoCount?: number;
|
|
333
|
+
/** The number of Instagram and Strava photos for this activity */
|
|
334
|
+
totalPhotoCount?: number;
|
|
335
|
+
map?: PolylineMap;
|
|
336
|
+
/** The name of the device used to record the activity */
|
|
337
|
+
deviceName?: string;
|
|
338
|
+
/** Whether this activity was recorded on a training machine */
|
|
339
|
+
trainer?: boolean;
|
|
340
|
+
/** Whether this activity is a commute */
|
|
341
|
+
commute?: boolean;
|
|
342
|
+
/** Whether this activity was created manually */
|
|
343
|
+
manual?: boolean;
|
|
344
|
+
/** Whether this activity is private */
|
|
345
|
+
private?: boolean;
|
|
346
|
+
/** Whether this activity is flagged */
|
|
347
|
+
flagged?: boolean;
|
|
348
|
+
/** The activity's workout type */
|
|
349
|
+
workoutType?: number;
|
|
350
|
+
/** The unique identifier of the upload in string format */
|
|
351
|
+
uploadIdStr?: string;
|
|
352
|
+
/** The activity's average speed, in meters per second */
|
|
353
|
+
averageSpeed?: number;
|
|
354
|
+
/** The activity's max speed, in meters per second */
|
|
355
|
+
maxSpeed?: number;
|
|
356
|
+
/** Whether the logged-in athlete has kudoed this activity */
|
|
357
|
+
hasKudoed?: boolean;
|
|
358
|
+
/** Whether the activity is muted */
|
|
359
|
+
hideFromHome?: boolean;
|
|
360
|
+
/** The id of the gear for the activity */
|
|
361
|
+
gearId?: string;
|
|
362
|
+
/** The total work done in kilojoules during this activity. Rides only */
|
|
363
|
+
kilojoules?: number;
|
|
364
|
+
/** Average power output in watts during this activity. Rides only */
|
|
365
|
+
averageWatts?: number;
|
|
366
|
+
/** Whether the watts are from a power meter, false if estimated */
|
|
367
|
+
deviceWatts?: boolean;
|
|
368
|
+
/** Rides with power meter data only */
|
|
369
|
+
maxWatts?: number;
|
|
370
|
+
/** Similar to Normalized Power. Rides with power meter data only */
|
|
371
|
+
weightedAverageWatts?: number;
|
|
372
|
+
}
|
|
373
|
+
export interface MetaActivity {
|
|
374
|
+
/** The unique identifier of the activity */
|
|
375
|
+
id?: number;
|
|
376
|
+
}
|
|
377
|
+
export interface UpdatableActivity {
|
|
378
|
+
/** Whether this activity is a commute */
|
|
379
|
+
commute?: boolean;
|
|
380
|
+
/** Whether this activity was recorded on a training machine */
|
|
381
|
+
trainer?: boolean;
|
|
382
|
+
/** Whether this activity is muted */
|
|
383
|
+
hideFromHome?: boolean;
|
|
384
|
+
/** The description of the activity */
|
|
385
|
+
description?: string;
|
|
386
|
+
/** The name of the activity */
|
|
387
|
+
name?: string;
|
|
388
|
+
/** Deprecated. Prefer to use sport_type. In a request where both type and sport_type are present, this field will be ignored */
|
|
389
|
+
type?: ActivityType;
|
|
390
|
+
sportType?: SportType;
|
|
391
|
+
/** Identifier for the gear associated with the activity. ‘none’ clears gear from activity */
|
|
392
|
+
gearId?: string;
|
|
393
|
+
}
|
|
394
|
+
export interface ClubActivity {
|
|
395
|
+
athlete?: MetaAthlete;
|
|
396
|
+
/** The name of the activity */
|
|
397
|
+
name?: string;
|
|
398
|
+
/** The activity's distance, in meters */
|
|
399
|
+
distance?: number;
|
|
400
|
+
/** The activity's moving time, in seconds */
|
|
401
|
+
movingTime?: number;
|
|
402
|
+
/** The activity's elapsed time, in seconds */
|
|
403
|
+
elapsedTime?: number;
|
|
404
|
+
/** The activity's total elevation gain. */
|
|
405
|
+
totalElevationGain?: number;
|
|
406
|
+
/** Deprecated. Prefer to use sport_type */
|
|
407
|
+
type?: ActivityType;
|
|
408
|
+
sportType?: SportType;
|
|
409
|
+
/** The activity's workout type */
|
|
410
|
+
workoutType?: number;
|
|
411
|
+
}
|
|
412
|
+
export interface Lap {
|
|
413
|
+
/** The unique identifier of this lap */
|
|
414
|
+
id?: number;
|
|
415
|
+
activity?: MetaActivity;
|
|
416
|
+
athlete?: MetaAthlete;
|
|
417
|
+
/** The lap's average cadence */
|
|
418
|
+
averageCadence?: number;
|
|
419
|
+
/** The lap's average speed */
|
|
420
|
+
averageSpeed?: number;
|
|
421
|
+
/** The lap's distance, in meters */
|
|
422
|
+
distance?: number;
|
|
423
|
+
/** The lap's elapsed time, in seconds */
|
|
424
|
+
elapsedTime?: number;
|
|
425
|
+
/** The start index of this effort in its activity's stream */
|
|
426
|
+
startIndex?: number;
|
|
427
|
+
/** The end index of this effort in its activity's stream */
|
|
428
|
+
endIndex?: number;
|
|
429
|
+
/** The index of this lap in the activity it belongs to */
|
|
430
|
+
lapIndex?: number;
|
|
431
|
+
/** The maximum speed of this lat, in meters per second */
|
|
432
|
+
maxSpeed?: number;
|
|
433
|
+
/** The lap's moving time, in seconds */
|
|
434
|
+
movingTime?: number;
|
|
435
|
+
/** The name of the lap */
|
|
436
|
+
name?: string;
|
|
437
|
+
/** The athlete's pace zone during this lap */
|
|
438
|
+
paceZone?: number;
|
|
439
|
+
split?: number;
|
|
440
|
+
/** The time at which the lap was started. */
|
|
441
|
+
startDate?: string;
|
|
442
|
+
/** The time at which the lap was started in the local timezone. */
|
|
443
|
+
startDateLocal?: string;
|
|
444
|
+
/** The elevation gain of this lap, in meters */
|
|
445
|
+
totalElevationGain?: number;
|
|
446
|
+
}
|
|
447
|
+
export interface Comment {
|
|
448
|
+
/** The unique identifier of this comment */
|
|
449
|
+
id?: number;
|
|
450
|
+
/** The identifier of the activity this comment is related to */
|
|
451
|
+
activityId?: number;
|
|
452
|
+
/** The content of the comment */
|
|
453
|
+
text?: string;
|
|
454
|
+
athlete?: SummaryAthlete;
|
|
455
|
+
/** The time at which this comment was created. */
|
|
456
|
+
createdAt?: string;
|
|
457
|
+
}
|
|
458
|
+
export interface DetailedClub extends SummaryClub {
|
|
459
|
+
/** The membership status of the logged-in athlete. */
|
|
460
|
+
membership?: "member" | "pending";
|
|
461
|
+
/** Whether the currently logged-in athlete is an administrator of this club. */
|
|
462
|
+
admin?: boolean;
|
|
463
|
+
/** Whether the currently logged-in athlete is the owner of this club. */
|
|
464
|
+
owner?: boolean;
|
|
465
|
+
/** The number of athletes in the club that the logged-in athlete follows. */
|
|
466
|
+
followingCount?: number;
|
|
467
|
+
}
|
|
468
|
+
export interface SummaryClub extends MetaClub {
|
|
469
|
+
/** URL to a 60x60 pixel profile picture. */
|
|
470
|
+
profileMedium?: string;
|
|
471
|
+
/** URL to a ~1185x580 pixel cover photo. */
|
|
472
|
+
coverPhoto?: string;
|
|
473
|
+
/** URL to a ~360x176 pixel cover photo. */
|
|
474
|
+
coverPhotoSmall?: string;
|
|
475
|
+
/** Deprecated. Prefer to use activity_types. */
|
|
476
|
+
sportType?: "cycling" | "running" | "triathlon" | "other";
|
|
477
|
+
/** The activity types that count for a club. This takes precedence over sport_type. */
|
|
478
|
+
activityTypes?: ActivityType[];
|
|
479
|
+
/** The club's city. */
|
|
480
|
+
city?: string;
|
|
481
|
+
/** The club's state or geographical region. */
|
|
482
|
+
state?: string;
|
|
483
|
+
/** The club's country. */
|
|
484
|
+
country?: string;
|
|
485
|
+
/** Whether the club is private. */
|
|
486
|
+
private?: boolean;
|
|
487
|
+
/** The club's member count. */
|
|
488
|
+
memberCount?: number;
|
|
489
|
+
/** Whether the club is featured or not. */
|
|
490
|
+
featured?: boolean;
|
|
491
|
+
/** Whether the club is verified or not. */
|
|
492
|
+
verified?: boolean;
|
|
493
|
+
/** The club's vanity URL. */
|
|
494
|
+
url?: string;
|
|
495
|
+
}
|
|
496
|
+
export interface MetaClub {
|
|
497
|
+
/** The club's unique identifier. */
|
|
498
|
+
id?: number;
|
|
499
|
+
/** Resource state, indicates level of detail. Possible values: 1 -> "meta", 2 -> "summary", 3 -> "detail" */
|
|
500
|
+
resourceState?: number;
|
|
501
|
+
/** The club's name. */
|
|
502
|
+
name?: string;
|
|
503
|
+
}
|
|
504
|
+
export interface ClubAnnouncement {
|
|
505
|
+
/** The unique identifier of this announcement. */
|
|
506
|
+
id?: number;
|
|
507
|
+
/** The unique identifier of the club this announcements was made in. */
|
|
508
|
+
clubId?: number;
|
|
509
|
+
athlete?: SummaryAthlete;
|
|
510
|
+
/** The time at which this announcement was created. */
|
|
511
|
+
createdAt?: string;
|
|
512
|
+
/** The content of this announcement */
|
|
513
|
+
message?: string;
|
|
514
|
+
}
|
|
515
|
+
export interface MembershipApplication {
|
|
516
|
+
/** Whether the application for membership was successfully submitted */
|
|
517
|
+
success?: boolean;
|
|
518
|
+
/** Whether the membership is currently active */
|
|
519
|
+
active?: boolean;
|
|
520
|
+
/** The membership status of this application */
|
|
521
|
+
membership?: "member" | "pending";
|
|
522
|
+
}
|
|
523
|
+
export interface DetailedGear extends SummaryGear {
|
|
524
|
+
/** The gear's brand name. */
|
|
525
|
+
brandName?: string;
|
|
526
|
+
/** The gear's model name. */
|
|
527
|
+
modelName?: string;
|
|
528
|
+
/** The gear's frame type (bike only). */
|
|
529
|
+
frameType?: number;
|
|
530
|
+
/** The gear's description. */
|
|
531
|
+
description?: string;
|
|
532
|
+
}
|
|
533
|
+
export interface SummaryGear {
|
|
534
|
+
/** The gear's unique identifier. */
|
|
535
|
+
id?: string;
|
|
536
|
+
/** Resource state, indicates level of detail. Possible values: 2 -> "summary", 3 -> "detail" */
|
|
537
|
+
resourceState?: number;
|
|
538
|
+
/** Whether this gear's is the owner's default one. */
|
|
539
|
+
primary?: boolean;
|
|
540
|
+
/** The gear's name. */
|
|
541
|
+
name?: string;
|
|
542
|
+
/** The distance logged with this gear. */
|
|
543
|
+
distance?: number;
|
|
544
|
+
}
|
|
545
|
+
export interface Route {
|
|
546
|
+
athlete?: SummaryAthlete;
|
|
547
|
+
/** The description of the route */
|
|
548
|
+
description?: string;
|
|
549
|
+
/** The route's distance, in meters */
|
|
550
|
+
distance?: number;
|
|
551
|
+
/** The route's elevation gain. */
|
|
552
|
+
elevationGain?: number;
|
|
553
|
+
/** The unique identifier of this route */
|
|
554
|
+
id?: number;
|
|
555
|
+
/** The unique identifier of the route in string format */
|
|
556
|
+
idStr?: string;
|
|
557
|
+
map?: PolylineMap;
|
|
558
|
+
/** The name of this route */
|
|
559
|
+
name?: string;
|
|
560
|
+
/** Whether this route is private */
|
|
561
|
+
private?: boolean;
|
|
562
|
+
/** Whether this route is starred by the logged-in athlete */
|
|
563
|
+
starred?: boolean;
|
|
564
|
+
/** An epoch timestamp of when the route was created */
|
|
565
|
+
timestamp?: number;
|
|
566
|
+
/** This route's type (1 for ride, 2 for runs) */
|
|
567
|
+
type?: number;
|
|
568
|
+
/** This route's sub-type (1 for road, 2 for mountain bike, 3 for cross, 4 for trail, 5 for mixed) */
|
|
569
|
+
subType?: number;
|
|
570
|
+
/** The time at which the route was created */
|
|
571
|
+
createdAt?: string;
|
|
572
|
+
/** The time at which the route was last updated */
|
|
573
|
+
updatedAt?: string;
|
|
574
|
+
/** Estimated time in seconds for the authenticated athlete to complete route */
|
|
575
|
+
estimatedMovingTime?: number;
|
|
576
|
+
/** The segments traversed by this route */
|
|
577
|
+
segments?: SummarySegment[];
|
|
578
|
+
/** The custom waypoints along this route */
|
|
579
|
+
waypoints?: Waypoint[];
|
|
580
|
+
}
|
|
581
|
+
export interface Upload {
|
|
582
|
+
/** The unique identifier of the upload */
|
|
583
|
+
id?: number;
|
|
584
|
+
/** The unique identifier of the upload in string format */
|
|
585
|
+
idStr?: string;
|
|
586
|
+
/** The external identifier of the upload */
|
|
587
|
+
externalId?: string;
|
|
588
|
+
/** The error associated with this upload */
|
|
589
|
+
error?: string;
|
|
590
|
+
/** The status of this upload */
|
|
591
|
+
status?: string;
|
|
592
|
+
/** The identifier of the activity this upload resulted into */
|
|
593
|
+
activityId?: number;
|
|
594
|
+
}
|
|
595
|
+
/** An enumeration of the supported types of streams. */
|
|
596
|
+
export type StreamType = Record<string, unknown>;
|
|
597
|
+
export interface BaseStream {
|
|
598
|
+
/** The number of data points in this stream */
|
|
599
|
+
originalSize?: number;
|
|
600
|
+
/** The level of detail (sampling) in which this stream was returned */
|
|
601
|
+
resolution?: "low" | "medium" | "high";
|
|
602
|
+
/** The base series used in the case the stream was downsampled */
|
|
603
|
+
seriesType?: "distance" | "time";
|
|
604
|
+
}
|
|
605
|
+
export interface DistanceStream extends BaseStream {
|
|
606
|
+
/** The sequence of distance values for this stream, in meters */
|
|
607
|
+
data?: number[];
|
|
608
|
+
}
|
|
609
|
+
export interface TimeStream extends BaseStream {
|
|
610
|
+
/** The sequence of time values for this stream, in seconds */
|
|
611
|
+
data?: number[];
|
|
612
|
+
}
|
|
613
|
+
export interface LatLngStream extends BaseStream {
|
|
614
|
+
/** The sequence of lat/long values for this stream */
|
|
615
|
+
data?: LatLng[];
|
|
616
|
+
}
|
|
617
|
+
export interface AltitudeStream extends BaseStream {
|
|
618
|
+
/** The sequence of altitude values for this stream, in meters */
|
|
619
|
+
data?: number[];
|
|
620
|
+
}
|
|
621
|
+
export interface SmoothVelocityStream extends BaseStream {
|
|
622
|
+
/** The sequence of velocity values for this stream, in meters per second */
|
|
623
|
+
data?: number[];
|
|
624
|
+
}
|
|
625
|
+
export interface HeartrateStream extends BaseStream {
|
|
626
|
+
/** The sequence of heart rate values for this stream, in beats per minute */
|
|
627
|
+
data?: number[];
|
|
628
|
+
}
|
|
629
|
+
export interface CadenceStream extends BaseStream {
|
|
630
|
+
/** The sequence of cadence values for this stream, in rotations per minute */
|
|
631
|
+
data?: number[];
|
|
632
|
+
}
|
|
633
|
+
export interface PowerStream extends BaseStream {
|
|
634
|
+
/** The sequence of power values for this stream, in watts */
|
|
635
|
+
data?: number[];
|
|
636
|
+
}
|
|
637
|
+
export interface TemperatureStream extends BaseStream {
|
|
638
|
+
/** The sequence of temperature values for this stream, in celsius degrees */
|
|
639
|
+
data?: number[];
|
|
640
|
+
}
|
|
641
|
+
export interface MovingStream extends BaseStream {
|
|
642
|
+
/** The sequence of moving values for this stream, as boolean values */
|
|
643
|
+
data?: boolean[];
|
|
644
|
+
}
|
|
645
|
+
export interface SmoothGradeStream extends BaseStream {
|
|
646
|
+
/** The sequence of grade values for this stream, as percents of a grade */
|
|
647
|
+
data?: number[];
|
|
648
|
+
}
|
|
649
|
+
export interface StreamSet {
|
|
650
|
+
time?: TimeStream;
|
|
651
|
+
distance?: DistanceStream;
|
|
652
|
+
latlng?: LatLngStream;
|
|
653
|
+
altitude?: AltitudeStream;
|
|
654
|
+
velocitySmooth?: SmoothVelocityStream;
|
|
655
|
+
heartrate?: HeartrateStream;
|
|
656
|
+
cadence?: CadenceStream;
|
|
657
|
+
watts?: PowerStream;
|
|
658
|
+
temp?: TemperatureStream;
|
|
659
|
+
moving?: MovingStream;
|
|
660
|
+
gradeSmooth?: SmoothGradeStream;
|
|
661
|
+
}
|
|
662
|
+
/** A roll-up of metrics pertaining to a set of activities. Values are in seconds and meters. */
|
|
663
|
+
export interface ActivityTotal {
|
|
664
|
+
/** The number of activities considered in this total. */
|
|
665
|
+
count?: number;
|
|
666
|
+
/** The total distance covered by the considered activities. */
|
|
667
|
+
distance?: number;
|
|
668
|
+
/** The total moving time of the considered activities. */
|
|
669
|
+
movingTime?: number;
|
|
670
|
+
/** The total elapsed time of the considered activities. */
|
|
671
|
+
elapsedTime?: number;
|
|
672
|
+
/** The total elevation gain of the considered activities. */
|
|
673
|
+
elevationGain?: number;
|
|
674
|
+
/** The total number of achievements of the considered activities. */
|
|
675
|
+
achievementCount?: number;
|
|
676
|
+
}
|
|
677
|
+
export interface PolylineMap {
|
|
678
|
+
/** The identifier of the map */
|
|
679
|
+
id?: string;
|
|
680
|
+
/** The polyline of the map, only returned on detailed representation of an object */
|
|
681
|
+
polyline?: string;
|
|
682
|
+
/** The summary polyline of the map */
|
|
683
|
+
summaryPolyline?: string;
|
|
684
|
+
}
|
|
685
|
+
/** A pair of latitude/longitude coordinates, represented as an array of 2 floating point numbers. */
|
|
686
|
+
export type LatLng = number[];
|
|
687
|
+
export interface PhotosSummary {
|
|
688
|
+
/** The number of photos */
|
|
689
|
+
count?: number;
|
|
690
|
+
primary?: {
|
|
691
|
+
id?: number;
|
|
692
|
+
source?: number;
|
|
693
|
+
uniqueId?: string;
|
|
694
|
+
urls?: object;
|
|
695
|
+
};
|
|
696
|
+
}
|
|
697
|
+
export interface Split {
|
|
698
|
+
/** The average speed of this split, in meters per second */
|
|
699
|
+
averageSpeed?: number;
|
|
700
|
+
/** The distance of this split, in meters */
|
|
701
|
+
distance?: number;
|
|
702
|
+
/** The elapsed time of this split, in seconds */
|
|
703
|
+
elapsedTime?: number;
|
|
704
|
+
/** The elevation difference of this split, in meters */
|
|
705
|
+
elevationDifference?: number;
|
|
706
|
+
/** The pacing zone of this split */
|
|
707
|
+
paceZone?: number;
|
|
708
|
+
/** The moving time of this split, in seconds */
|
|
709
|
+
movingTime?: number;
|
|
710
|
+
/** N/A */
|
|
711
|
+
split?: number;
|
|
712
|
+
}
|
|
713
|
+
/** 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) */
|
|
714
|
+
export type ActivityType = Record<string, unknown>;
|
|
715
|
+
/** An enumeration of the sport types an activity may have. Distinct from ActivityType in that it has new types (e.g. MountainBikeRide) */
|
|
716
|
+
export type SportType = Record<string, unknown>;
|
|
717
|
+
export interface Waypoint {
|
|
718
|
+
/** The location along the route that the waypoint is closest to */
|
|
719
|
+
latlng?: LatLng;
|
|
720
|
+
/** A location off of the route that the waypoint is (optional) */
|
|
721
|
+
targetLatlng?: LatLng;
|
|
722
|
+
/** Categories that the waypoint belongs to */
|
|
723
|
+
categories?: string[];
|
|
724
|
+
/** A title for the waypoint */
|
|
725
|
+
title?: string;
|
|
726
|
+
/** A description of the waypoint (optional) */
|
|
727
|
+
description?: string;
|
|
728
|
+
/** The number meters along the route that the waypoint is located */
|
|
729
|
+
distanceIntoRoute?: number;
|
|
730
|
+
}
|
|
731
|
+
//# sourceMappingURL=generated.d.ts.map
|