@time2win/t2w 1.4.12 → 1.4.13
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/CHANGELOG.md +88 -88
- package/README.md +23 -23
- package/index.d.ts +17 -17
- package/index.js +392 -386
- package/models.d.ts +270 -270
- package/models.js +21 -21
- package/package.json +29 -29
- package/test.d.ts +1 -1
- package/test.js +12 -7
package/models.d.ts
CHANGED
|
@@ -1,270 +1,270 @@
|
|
|
1
|
-
export interface T2WEventResponse {
|
|
2
|
-
events: T2WEvent[];
|
|
3
|
-
page: number;
|
|
4
|
-
page_size: number;
|
|
5
|
-
page_more: boolean;
|
|
6
|
-
}
|
|
7
|
-
export interface T2WEvent {
|
|
8
|
-
event_id: number;
|
|
9
|
-
event_name: string;
|
|
10
|
-
event_start: string;
|
|
11
|
-
event_end: string;
|
|
12
|
-
registration_start: Date;
|
|
13
|
-
registration_end: Date;
|
|
14
|
-
type: number;
|
|
15
|
-
type_name: string;
|
|
16
|
-
results_available: boolean;
|
|
17
|
-
results_ordering: number;
|
|
18
|
-
results_ordering_primary: string;
|
|
19
|
-
url_event: string;
|
|
20
|
-
url_results: string;
|
|
21
|
-
url_participants: string;
|
|
22
|
-
currency: string;
|
|
23
|
-
banner_url: string;
|
|
24
|
-
locations: T2WEventLocations[];
|
|
25
|
-
races: T2WEventRace[];
|
|
26
|
-
}
|
|
27
|
-
export interface T2WEventRace {
|
|
28
|
-
race_id: number;
|
|
29
|
-
race_name: string;
|
|
30
|
-
starttime: Date;
|
|
31
|
-
type: number;
|
|
32
|
-
distance: number;
|
|
33
|
-
type_name: string;
|
|
34
|
-
reg_type: 'individual' | 'team';
|
|
35
|
-
results_ordering_primary: string;
|
|
36
|
-
results_ordering: number;
|
|
37
|
-
prices: T2WEventRacePrice[] | null;
|
|
38
|
-
splits: T2WEventRaceSplit[] | null;
|
|
39
|
-
}
|
|
40
|
-
export interface T2WEventRacePrice {
|
|
41
|
-
category: string;
|
|
42
|
-
price_entry: number;
|
|
43
|
-
}
|
|
44
|
-
export interface T2WEventRaceSplit {
|
|
45
|
-
split_index: number;
|
|
46
|
-
distance: number;
|
|
47
|
-
name: string;
|
|
48
|
-
accumulatedtime: boolean;
|
|
49
|
-
}
|
|
50
|
-
export interface T2WEventLocations {
|
|
51
|
-
location: string;
|
|
52
|
-
address: string | null;
|
|
53
|
-
city: string;
|
|
54
|
-
zip: string;
|
|
55
|
-
country: string;
|
|
56
|
-
latitude: number;
|
|
57
|
-
longitude: number;
|
|
58
|
-
}
|
|
59
|
-
export interface T2WTeamResultsResponse {
|
|
60
|
-
page_size: number;
|
|
61
|
-
page: number;
|
|
62
|
-
page_total: number;
|
|
63
|
-
count_total: number;
|
|
64
|
-
list: T2WTeamResult[];
|
|
65
|
-
}
|
|
66
|
-
export interface T2WLap {
|
|
67
|
-
distance_total: number;
|
|
68
|
-
time: string;
|
|
69
|
-
time_ms: number;
|
|
70
|
-
lap_num: number;
|
|
71
|
-
teammember_id: number;
|
|
72
|
-
}
|
|
73
|
-
export interface T2WTeamResultSplit {
|
|
74
|
-
distance: number;
|
|
75
|
-
time: string;
|
|
76
|
-
time_ms: number | null;
|
|
77
|
-
split_name: string;
|
|
78
|
-
split_index: number;
|
|
79
|
-
split_accumulatedtime: boolean;
|
|
80
|
-
}
|
|
81
|
-
export interface T2WTeamResult {
|
|
82
|
-
team_type: 'M' | 'F' | 'U';
|
|
83
|
-
name_team: string;
|
|
84
|
-
organization: string;
|
|
85
|
-
id: number;
|
|
86
|
-
race_id: number;
|
|
87
|
-
race_name: string;
|
|
88
|
-
wave_id: number | null;
|
|
89
|
-
wave_name: string | null;
|
|
90
|
-
racenum: string | null;
|
|
91
|
-
racenumNumeric: number | null;
|
|
92
|
-
status_id: number;
|
|
93
|
-
status_text: string;
|
|
94
|
-
splits: T2WTeamResultSplit[] | null;
|
|
95
|
-
laps: T2WLap[] | null;
|
|
96
|
-
start_tod: string;
|
|
97
|
-
finishtime_fromgun: string | null;
|
|
98
|
-
finishtime_fromgun_ms: number | null;
|
|
99
|
-
finishtime_fromchip: string | null;
|
|
100
|
-
finishtime_fromchip_ms: number | null;
|
|
101
|
-
laps_count: number;
|
|
102
|
-
}
|
|
103
|
-
export interface T2WTeamResponse {
|
|
104
|
-
list: T2WTeam[];
|
|
105
|
-
page: number;
|
|
106
|
-
page_size: number;
|
|
107
|
-
page_more: boolean;
|
|
108
|
-
}
|
|
109
|
-
export interface T2WTeamMember {
|
|
110
|
-
individual_id: number;
|
|
111
|
-
name_first: string;
|
|
112
|
-
name_last: string;
|
|
113
|
-
name_full: string;
|
|
114
|
-
racenum: string | null;
|
|
115
|
-
racenumNumeric: number | null;
|
|
116
|
-
}
|
|
117
|
-
export interface T2WTeam {
|
|
118
|
-
id: number;
|
|
119
|
-
race_id: number;
|
|
120
|
-
race_name: string;
|
|
121
|
-
racenum: string | null;
|
|
122
|
-
racenumNumeric: number | null;
|
|
123
|
-
start_personal: string | null;
|
|
124
|
-
wave_id: number | null;
|
|
125
|
-
wave_name: string | null;
|
|
126
|
-
wave_start: string | null;
|
|
127
|
-
status_id: number;
|
|
128
|
-
status_text: string;
|
|
129
|
-
name_team: string;
|
|
130
|
-
organization: string | null;
|
|
131
|
-
team_type: 'M' | 'F' | 'U';
|
|
132
|
-
attr_1: string | null;
|
|
133
|
-
attr_2: string | null;
|
|
134
|
-
members: T2WTeamMember[];
|
|
135
|
-
}
|
|
136
|
-
export interface T2WIndividualResultResponse {
|
|
137
|
-
page_size: number;
|
|
138
|
-
page: number;
|
|
139
|
-
page_total: number;
|
|
140
|
-
count_total: number;
|
|
141
|
-
list: T2WIndividualResult[];
|
|
142
|
-
}
|
|
143
|
-
export interface T2WIndividualResult {
|
|
144
|
-
pos_overall: number;
|
|
145
|
-
pos_gender: number;
|
|
146
|
-
pos_category: number;
|
|
147
|
-
category_id: number | null;
|
|
148
|
-
category_name: string | null;
|
|
149
|
-
name_first: string;
|
|
150
|
-
name_last: string;
|
|
151
|
-
name_full: string;
|
|
152
|
-
organization: string;
|
|
153
|
-
birthdate: Date | null;
|
|
154
|
-
gender: 'M' | 'F' | 'U';
|
|
155
|
-
country_code: string;
|
|
156
|
-
attr_extra: string | null;
|
|
157
|
-
attr_commentary: string | null;
|
|
158
|
-
attr_affiliation: string | null;
|
|
159
|
-
team_id: number | null;
|
|
160
|
-
team_name: string | null;
|
|
161
|
-
id: number;
|
|
162
|
-
race_id: number;
|
|
163
|
-
race_name: string;
|
|
164
|
-
wave_id: number | null;
|
|
165
|
-
wave_name: string | null;
|
|
166
|
-
racenum: string | null;
|
|
167
|
-
racenumNumeric: number | null;
|
|
168
|
-
status_id: number;
|
|
169
|
-
status_text: string;
|
|
170
|
-
splits: T2WIndividualResultSplit[] | null;
|
|
171
|
-
laps: T2WLap[] | null;
|
|
172
|
-
start_tod: string;
|
|
173
|
-
finishtime_fromgun: string | null;
|
|
174
|
-
finishtime_fromgun_ms: number | null;
|
|
175
|
-
finishtime_fromchip: string | null;
|
|
176
|
-
finishtime_fromchip_ms: number | null;
|
|
177
|
-
laps_count: number;
|
|
178
|
-
}
|
|
179
|
-
export interface T2WIndividualResultSplit {
|
|
180
|
-
distance: number;
|
|
181
|
-
split_accumulatedtime: boolean;
|
|
182
|
-
split_index: number;
|
|
183
|
-
split_name: string;
|
|
184
|
-
time: string;
|
|
185
|
-
time_ms: number | null;
|
|
186
|
-
}
|
|
187
|
-
export interface T2WParticipantResponse {
|
|
188
|
-
list: T2WParticipantInfo[];
|
|
189
|
-
page: number;
|
|
190
|
-
page_size: number;
|
|
191
|
-
page_more: boolean;
|
|
192
|
-
}
|
|
193
|
-
export interface T2WParticipantExtraFields {
|
|
194
|
-
uci_id: string | null;
|
|
195
|
-
chip_code: string | null;
|
|
196
|
-
chip_code_b: string | null;
|
|
197
|
-
externalticket: string | null;
|
|
198
|
-
}
|
|
199
|
-
export interface T2WContactInfo {
|
|
200
|
-
email: string;
|
|
201
|
-
phone: string;
|
|
202
|
-
address_line_1: string;
|
|
203
|
-
address_line_2: string;
|
|
204
|
-
address_line_3: string;
|
|
205
|
-
address_city: string;
|
|
206
|
-
address_zipcode: string;
|
|
207
|
-
address_country: string;
|
|
208
|
-
}
|
|
209
|
-
export interface T2WParticipantInfo {
|
|
210
|
-
id: number;
|
|
211
|
-
race_id: number;
|
|
212
|
-
race_name: string;
|
|
213
|
-
wave_id: number | null;
|
|
214
|
-
wave_name: string | null;
|
|
215
|
-
wave_start: string | null;
|
|
216
|
-
status_id: number;
|
|
217
|
-
status_text: string;
|
|
218
|
-
checkin_status_id: number;
|
|
219
|
-
checkin_status_text: string;
|
|
220
|
-
pricecat_id: number | null;
|
|
221
|
-
pricecat_name: string | null;
|
|
222
|
-
racenum: string | null;
|
|
223
|
-
racenumNumeric: number | null;
|
|
224
|
-
attr_extra: string | null;
|
|
225
|
-
attr_commentary: string | null;
|
|
226
|
-
attr_affiliation: string | null;
|
|
227
|
-
attr_1: string | null;
|
|
228
|
-
attr_2: string | null;
|
|
229
|
-
attr_3: string | null;
|
|
230
|
-
attr_4: string | null;
|
|
231
|
-
start_personal: string | null;
|
|
232
|
-
order_id: number | null;
|
|
233
|
-
order_date: Date | null;
|
|
234
|
-
order_terms_1: boolean | null;
|
|
235
|
-
order_terms_2: boolean | null;
|
|
236
|
-
order_terms_3: boolean | null;
|
|
237
|
-
name_first: string;
|
|
238
|
-
name_last: string;
|
|
239
|
-
name: string;
|
|
240
|
-
city: string | null;
|
|
241
|
-
organization: string | null;
|
|
242
|
-
gender: 'M' | 'F' | 'U';
|
|
243
|
-
birthdate: Date | null;
|
|
244
|
-
age: number | null;
|
|
245
|
-
year: number | null;
|
|
246
|
-
country_code: string;
|
|
247
|
-
category_id: string | null;
|
|
248
|
-
category_name: string | null;
|
|
249
|
-
contactinfo: T2WContactInfo | null;
|
|
250
|
-
team_id: number | null;
|
|
251
|
-
team_name: string | null;
|
|
252
|
-
extra_fields: T2WParticipantExtraFields;
|
|
253
|
-
}
|
|
254
|
-
export declare enum RaceStatus {
|
|
255
|
-
FINISHED = 1,
|
|
256
|
-
FINISHED_PENDING_VERIFICATION = 2,
|
|
257
|
-
FINISHED_BUT_NOT_COMPLETED = 3,
|
|
258
|
-
DSQ = 5,
|
|
259
|
-
AFTER_CUT_OFF = 10,
|
|
260
|
-
DNF = 15,
|
|
261
|
-
LAPPED = 17,
|
|
262
|
-
STARTED_AND_ACTIVE = 20,
|
|
263
|
-
SHOULD_BE_INVESTIGATED = 25,
|
|
264
|
-
INSUFFICIENT_DATA = 30,
|
|
265
|
-
DNS = 35,
|
|
266
|
-
UNKNOWN_OTHER = 40,
|
|
267
|
-
NOT_STARTED = 45,
|
|
268
|
-
CHECKED_IN = 50,
|
|
269
|
-
PENALTY = 60
|
|
270
|
-
}
|
|
1
|
+
export interface T2WEventResponse {
|
|
2
|
+
events: T2WEvent[];
|
|
3
|
+
page: number;
|
|
4
|
+
page_size: number;
|
|
5
|
+
page_more: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface T2WEvent {
|
|
8
|
+
event_id: number;
|
|
9
|
+
event_name: string;
|
|
10
|
+
event_start: string;
|
|
11
|
+
event_end: string;
|
|
12
|
+
registration_start: Date;
|
|
13
|
+
registration_end: Date;
|
|
14
|
+
type: number;
|
|
15
|
+
type_name: string;
|
|
16
|
+
results_available: boolean;
|
|
17
|
+
results_ordering: number;
|
|
18
|
+
results_ordering_primary: string;
|
|
19
|
+
url_event: string;
|
|
20
|
+
url_results: string;
|
|
21
|
+
url_participants: string;
|
|
22
|
+
currency: string;
|
|
23
|
+
banner_url: string;
|
|
24
|
+
locations: T2WEventLocations[];
|
|
25
|
+
races: T2WEventRace[];
|
|
26
|
+
}
|
|
27
|
+
export interface T2WEventRace {
|
|
28
|
+
race_id: number;
|
|
29
|
+
race_name: string;
|
|
30
|
+
starttime: Date;
|
|
31
|
+
type: number;
|
|
32
|
+
distance: number;
|
|
33
|
+
type_name: string;
|
|
34
|
+
reg_type: 'individual' | 'team';
|
|
35
|
+
results_ordering_primary: string;
|
|
36
|
+
results_ordering: number;
|
|
37
|
+
prices: T2WEventRacePrice[] | null;
|
|
38
|
+
splits: T2WEventRaceSplit[] | null;
|
|
39
|
+
}
|
|
40
|
+
export interface T2WEventRacePrice {
|
|
41
|
+
category: string;
|
|
42
|
+
price_entry: number;
|
|
43
|
+
}
|
|
44
|
+
export interface T2WEventRaceSplit {
|
|
45
|
+
split_index: number;
|
|
46
|
+
distance: number;
|
|
47
|
+
name: string;
|
|
48
|
+
accumulatedtime: boolean;
|
|
49
|
+
}
|
|
50
|
+
export interface T2WEventLocations {
|
|
51
|
+
location: string;
|
|
52
|
+
address: string | null;
|
|
53
|
+
city: string;
|
|
54
|
+
zip: string;
|
|
55
|
+
country: string;
|
|
56
|
+
latitude: number;
|
|
57
|
+
longitude: number;
|
|
58
|
+
}
|
|
59
|
+
export interface T2WTeamResultsResponse {
|
|
60
|
+
page_size: number;
|
|
61
|
+
page: number;
|
|
62
|
+
page_total: number;
|
|
63
|
+
count_total: number;
|
|
64
|
+
list: T2WTeamResult[];
|
|
65
|
+
}
|
|
66
|
+
export interface T2WLap {
|
|
67
|
+
distance_total: number;
|
|
68
|
+
time: string;
|
|
69
|
+
time_ms: number;
|
|
70
|
+
lap_num: number;
|
|
71
|
+
teammember_id: number;
|
|
72
|
+
}
|
|
73
|
+
export interface T2WTeamResultSplit {
|
|
74
|
+
distance: number;
|
|
75
|
+
time: string;
|
|
76
|
+
time_ms: number | null;
|
|
77
|
+
split_name: string;
|
|
78
|
+
split_index: number;
|
|
79
|
+
split_accumulatedtime: boolean;
|
|
80
|
+
}
|
|
81
|
+
export interface T2WTeamResult {
|
|
82
|
+
team_type: 'M' | 'F' | 'U';
|
|
83
|
+
name_team: string;
|
|
84
|
+
organization: string;
|
|
85
|
+
id: number;
|
|
86
|
+
race_id: number;
|
|
87
|
+
race_name: string;
|
|
88
|
+
wave_id: number | null;
|
|
89
|
+
wave_name: string | null;
|
|
90
|
+
racenum: string | null;
|
|
91
|
+
racenumNumeric: number | null;
|
|
92
|
+
status_id: number;
|
|
93
|
+
status_text: string;
|
|
94
|
+
splits: T2WTeamResultSplit[] | null;
|
|
95
|
+
laps: T2WLap[] | null;
|
|
96
|
+
start_tod: string;
|
|
97
|
+
finishtime_fromgun: string | null;
|
|
98
|
+
finishtime_fromgun_ms: number | null;
|
|
99
|
+
finishtime_fromchip: string | null;
|
|
100
|
+
finishtime_fromchip_ms: number | null;
|
|
101
|
+
laps_count: number;
|
|
102
|
+
}
|
|
103
|
+
export interface T2WTeamResponse {
|
|
104
|
+
list: T2WTeam[];
|
|
105
|
+
page: number;
|
|
106
|
+
page_size: number;
|
|
107
|
+
page_more: boolean;
|
|
108
|
+
}
|
|
109
|
+
export interface T2WTeamMember {
|
|
110
|
+
individual_id: number;
|
|
111
|
+
name_first: string;
|
|
112
|
+
name_last: string;
|
|
113
|
+
name_full: string;
|
|
114
|
+
racenum: string | null;
|
|
115
|
+
racenumNumeric: number | null;
|
|
116
|
+
}
|
|
117
|
+
export interface T2WTeam {
|
|
118
|
+
id: number;
|
|
119
|
+
race_id: number;
|
|
120
|
+
race_name: string;
|
|
121
|
+
racenum: string | null;
|
|
122
|
+
racenumNumeric: number | null;
|
|
123
|
+
start_personal: string | null;
|
|
124
|
+
wave_id: number | null;
|
|
125
|
+
wave_name: string | null;
|
|
126
|
+
wave_start: string | null;
|
|
127
|
+
status_id: number;
|
|
128
|
+
status_text: string;
|
|
129
|
+
name_team: string;
|
|
130
|
+
organization: string | null;
|
|
131
|
+
team_type: 'M' | 'F' | 'U';
|
|
132
|
+
attr_1: string | null;
|
|
133
|
+
attr_2: string | null;
|
|
134
|
+
members: T2WTeamMember[];
|
|
135
|
+
}
|
|
136
|
+
export interface T2WIndividualResultResponse {
|
|
137
|
+
page_size: number;
|
|
138
|
+
page: number;
|
|
139
|
+
page_total: number;
|
|
140
|
+
count_total: number;
|
|
141
|
+
list: T2WIndividualResult[];
|
|
142
|
+
}
|
|
143
|
+
export interface T2WIndividualResult {
|
|
144
|
+
pos_overall: number;
|
|
145
|
+
pos_gender: number;
|
|
146
|
+
pos_category: number;
|
|
147
|
+
category_id: number | null;
|
|
148
|
+
category_name: string | null;
|
|
149
|
+
name_first: string;
|
|
150
|
+
name_last: string;
|
|
151
|
+
name_full: string;
|
|
152
|
+
organization: string;
|
|
153
|
+
birthdate: Date | null;
|
|
154
|
+
gender: 'M' | 'F' | 'U';
|
|
155
|
+
country_code: string;
|
|
156
|
+
attr_extra: string | null;
|
|
157
|
+
attr_commentary: string | null;
|
|
158
|
+
attr_affiliation: string | null;
|
|
159
|
+
team_id: number | null;
|
|
160
|
+
team_name: string | null;
|
|
161
|
+
id: number;
|
|
162
|
+
race_id: number;
|
|
163
|
+
race_name: string;
|
|
164
|
+
wave_id: number | null;
|
|
165
|
+
wave_name: string | null;
|
|
166
|
+
racenum: string | null;
|
|
167
|
+
racenumNumeric: number | null;
|
|
168
|
+
status_id: number;
|
|
169
|
+
status_text: string;
|
|
170
|
+
splits: T2WIndividualResultSplit[] | null;
|
|
171
|
+
laps: T2WLap[] | null;
|
|
172
|
+
start_tod: string;
|
|
173
|
+
finishtime_fromgun: string | null;
|
|
174
|
+
finishtime_fromgun_ms: number | null;
|
|
175
|
+
finishtime_fromchip: string | null;
|
|
176
|
+
finishtime_fromchip_ms: number | null;
|
|
177
|
+
laps_count: number;
|
|
178
|
+
}
|
|
179
|
+
export interface T2WIndividualResultSplit {
|
|
180
|
+
distance: number;
|
|
181
|
+
split_accumulatedtime: boolean;
|
|
182
|
+
split_index: number;
|
|
183
|
+
split_name: string;
|
|
184
|
+
time: string;
|
|
185
|
+
time_ms: number | null;
|
|
186
|
+
}
|
|
187
|
+
export interface T2WParticipantResponse {
|
|
188
|
+
list: T2WParticipantInfo[];
|
|
189
|
+
page: number;
|
|
190
|
+
page_size: number;
|
|
191
|
+
page_more: boolean;
|
|
192
|
+
}
|
|
193
|
+
export interface T2WParticipantExtraFields {
|
|
194
|
+
uci_id: string | null;
|
|
195
|
+
chip_code: string | null;
|
|
196
|
+
chip_code_b: string | null;
|
|
197
|
+
externalticket: string | null;
|
|
198
|
+
}
|
|
199
|
+
export interface T2WContactInfo {
|
|
200
|
+
email: string;
|
|
201
|
+
phone: string;
|
|
202
|
+
address_line_1: string;
|
|
203
|
+
address_line_2: string;
|
|
204
|
+
address_line_3: string;
|
|
205
|
+
address_city: string;
|
|
206
|
+
address_zipcode: string;
|
|
207
|
+
address_country: string;
|
|
208
|
+
}
|
|
209
|
+
export interface T2WParticipantInfo {
|
|
210
|
+
id: number;
|
|
211
|
+
race_id: number;
|
|
212
|
+
race_name: string;
|
|
213
|
+
wave_id: number | null;
|
|
214
|
+
wave_name: string | null;
|
|
215
|
+
wave_start: string | null;
|
|
216
|
+
status_id: number;
|
|
217
|
+
status_text: string;
|
|
218
|
+
checkin_status_id: number;
|
|
219
|
+
checkin_status_text: string;
|
|
220
|
+
pricecat_id: number | null;
|
|
221
|
+
pricecat_name: string | null;
|
|
222
|
+
racenum: string | null;
|
|
223
|
+
racenumNumeric: number | null;
|
|
224
|
+
attr_extra: string | null;
|
|
225
|
+
attr_commentary: string | null;
|
|
226
|
+
attr_affiliation: string | null;
|
|
227
|
+
attr_1: string | null;
|
|
228
|
+
attr_2: string | null;
|
|
229
|
+
attr_3: string | null;
|
|
230
|
+
attr_4: string | null;
|
|
231
|
+
start_personal: string | null;
|
|
232
|
+
order_id: number | null;
|
|
233
|
+
order_date: Date | null;
|
|
234
|
+
order_terms_1: boolean | null;
|
|
235
|
+
order_terms_2: boolean | null;
|
|
236
|
+
order_terms_3: boolean | null;
|
|
237
|
+
name_first: string;
|
|
238
|
+
name_last: string;
|
|
239
|
+
name: string;
|
|
240
|
+
city: string | null;
|
|
241
|
+
organization: string | null;
|
|
242
|
+
gender: 'M' | 'F' | 'U';
|
|
243
|
+
birthdate: Date | null;
|
|
244
|
+
age: number | null;
|
|
245
|
+
year: number | null;
|
|
246
|
+
country_code: string;
|
|
247
|
+
category_id: string | null;
|
|
248
|
+
category_name: string | null;
|
|
249
|
+
contactinfo: T2WContactInfo | null;
|
|
250
|
+
team_id: number | null;
|
|
251
|
+
team_name: string | null;
|
|
252
|
+
extra_fields: T2WParticipantExtraFields;
|
|
253
|
+
}
|
|
254
|
+
export declare enum RaceStatus {
|
|
255
|
+
FINISHED = 1,
|
|
256
|
+
FINISHED_PENDING_VERIFICATION = 2,
|
|
257
|
+
FINISHED_BUT_NOT_COMPLETED = 3,
|
|
258
|
+
DSQ = 5,
|
|
259
|
+
AFTER_CUT_OFF = 10,
|
|
260
|
+
DNF = 15,
|
|
261
|
+
LAPPED = 17,
|
|
262
|
+
STARTED_AND_ACTIVE = 20,
|
|
263
|
+
SHOULD_BE_INVESTIGATED = 25,
|
|
264
|
+
INSUFFICIENT_DATA = 30,
|
|
265
|
+
DNS = 35,
|
|
266
|
+
UNKNOWN_OTHER = 40,
|
|
267
|
+
NOT_STARTED = 45,
|
|
268
|
+
CHECKED_IN = 50,
|
|
269
|
+
PENALTY = 60
|
|
270
|
+
}
|
package/models.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RaceStatus = void 0;
|
|
4
|
-
var RaceStatus;
|
|
5
|
-
(function (RaceStatus) {
|
|
6
|
-
RaceStatus[RaceStatus["FINISHED"] = 1] = "FINISHED";
|
|
7
|
-
RaceStatus[RaceStatus["FINISHED_PENDING_VERIFICATION"] = 2] = "FINISHED_PENDING_VERIFICATION";
|
|
8
|
-
RaceStatus[RaceStatus["FINISHED_BUT_NOT_COMPLETED"] = 3] = "FINISHED_BUT_NOT_COMPLETED";
|
|
9
|
-
RaceStatus[RaceStatus["DSQ"] = 5] = "DSQ";
|
|
10
|
-
RaceStatus[RaceStatus["AFTER_CUT_OFF"] = 10] = "AFTER_CUT_OFF";
|
|
11
|
-
RaceStatus[RaceStatus["DNF"] = 15] = "DNF";
|
|
12
|
-
RaceStatus[RaceStatus["LAPPED"] = 17] = "LAPPED";
|
|
13
|
-
RaceStatus[RaceStatus["STARTED_AND_ACTIVE"] = 20] = "STARTED_AND_ACTIVE";
|
|
14
|
-
RaceStatus[RaceStatus["SHOULD_BE_INVESTIGATED"] = 25] = "SHOULD_BE_INVESTIGATED";
|
|
15
|
-
RaceStatus[RaceStatus["INSUFFICIENT_DATA"] = 30] = "INSUFFICIENT_DATA";
|
|
16
|
-
RaceStatus[RaceStatus["DNS"] = 35] = "DNS";
|
|
17
|
-
RaceStatus[RaceStatus["UNKNOWN_OTHER"] = 40] = "UNKNOWN_OTHER";
|
|
18
|
-
RaceStatus[RaceStatus["NOT_STARTED"] = 45] = "NOT_STARTED";
|
|
19
|
-
RaceStatus[RaceStatus["CHECKED_IN"] = 50] = "CHECKED_IN";
|
|
20
|
-
RaceStatus[RaceStatus["PENALTY"] = 60] = "PENALTY"; // custom status, does not exist in api
|
|
21
|
-
})(RaceStatus = exports.RaceStatus || (exports.RaceStatus = {}));
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RaceStatus = void 0;
|
|
4
|
+
var RaceStatus;
|
|
5
|
+
(function (RaceStatus) {
|
|
6
|
+
RaceStatus[RaceStatus["FINISHED"] = 1] = "FINISHED";
|
|
7
|
+
RaceStatus[RaceStatus["FINISHED_PENDING_VERIFICATION"] = 2] = "FINISHED_PENDING_VERIFICATION";
|
|
8
|
+
RaceStatus[RaceStatus["FINISHED_BUT_NOT_COMPLETED"] = 3] = "FINISHED_BUT_NOT_COMPLETED";
|
|
9
|
+
RaceStatus[RaceStatus["DSQ"] = 5] = "DSQ";
|
|
10
|
+
RaceStatus[RaceStatus["AFTER_CUT_OFF"] = 10] = "AFTER_CUT_OFF";
|
|
11
|
+
RaceStatus[RaceStatus["DNF"] = 15] = "DNF";
|
|
12
|
+
RaceStatus[RaceStatus["LAPPED"] = 17] = "LAPPED";
|
|
13
|
+
RaceStatus[RaceStatus["STARTED_AND_ACTIVE"] = 20] = "STARTED_AND_ACTIVE";
|
|
14
|
+
RaceStatus[RaceStatus["SHOULD_BE_INVESTIGATED"] = 25] = "SHOULD_BE_INVESTIGATED";
|
|
15
|
+
RaceStatus[RaceStatus["INSUFFICIENT_DATA"] = 30] = "INSUFFICIENT_DATA";
|
|
16
|
+
RaceStatus[RaceStatus["DNS"] = 35] = "DNS";
|
|
17
|
+
RaceStatus[RaceStatus["UNKNOWN_OTHER"] = 40] = "UNKNOWN_OTHER";
|
|
18
|
+
RaceStatus[RaceStatus["NOT_STARTED"] = 45] = "NOT_STARTED";
|
|
19
|
+
RaceStatus[RaceStatus["CHECKED_IN"] = 50] = "CHECKED_IN";
|
|
20
|
+
RaceStatus[RaceStatus["PENALTY"] = 60] = "PENALTY"; // custom status, does not exist in api
|
|
21
|
+
})(RaceStatus = exports.RaceStatus || (exports.RaceStatus = {}));
|
package/package.json
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@time2win/t2w",
|
|
3
|
-
"version": "1.4.
|
|
4
|
-
"description": "providing latest-state models and advanced methods to interact with the T2W API",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"time2win",
|
|
7
|
-
"t2w",
|
|
8
|
-
"api",
|
|
9
|
-
"sports timing"
|
|
10
|
-
],
|
|
11
|
-
"main": "index.js",
|
|
12
|
-
"types": "models.d.ts, index.d.ts",
|
|
13
|
-
"scripts": {
|
|
14
|
-
"start:dev": "nodemon --watch src src/index.ts",
|
|
15
|
-
"start": "node dist/index.js",
|
|
16
|
-
"build": "tsc",
|
|
17
|
-
"publish": "npm publish --access public"
|
|
18
|
-
},
|
|
19
|
-
"author": "Jonas Dorfinger",
|
|
20
|
-
"license": "MIT",
|
|
21
|
-
"dependencies": {
|
|
22
|
-
},
|
|
23
|
-
"devDependencies": {
|
|
24
|
-
"@types/node": "^16.10.1",
|
|
25
|
-
"nodemon": "^2.0.22",
|
|
26
|
-
"ts-node": "^10.2.1",
|
|
27
|
-
"typescript": "^4.4.3"
|
|
28
|
-
}
|
|
29
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@time2win/t2w",
|
|
3
|
+
"version": "1.4.13",
|
|
4
|
+
"description": "providing latest-state models and advanced methods to interact with the T2W API",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"time2win",
|
|
7
|
+
"t2w",
|
|
8
|
+
"api",
|
|
9
|
+
"sports timing"
|
|
10
|
+
],
|
|
11
|
+
"main": "index.js",
|
|
12
|
+
"types": "models.d.ts, index.d.ts",
|
|
13
|
+
"scripts": {
|
|
14
|
+
"start:dev": "nodemon --watch src src/index.ts",
|
|
15
|
+
"start": "node dist/index.js",
|
|
16
|
+
"build": "tsc",
|
|
17
|
+
"publish": "npm publish --access public"
|
|
18
|
+
},
|
|
19
|
+
"author": "Jonas Dorfinger",
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"dependencies": {
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@types/node": "^16.10.1",
|
|
25
|
+
"nodemon": "^2.0.22",
|
|
26
|
+
"ts-node": "^10.2.1",
|
|
27
|
+
"typescript": "^4.4.3"
|
|
28
|
+
}
|
|
29
|
+
}
|
package/test.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
package/test.js
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
var index_1 = __importDefault(require("./index"));
|
|
7
|
-
var api = new index_1.default('09f006ca-23ee-44da-bec5-4372580f4113');
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var index_1 = __importDefault(require("./index"));
|
|
7
|
+
var api = new index_1.default('09f006ca-23ee-44da-bec5-4372580f4113');
|
|
8
|
+
api.getIndividualResults(681, 4237).then(function (res) {
|
|
9
|
+
console.log('SUCCESS', res);
|
|
10
|
+
}).catch(function (err) {
|
|
11
|
+
console.log('ERROR', err);
|
|
12
|
+
});
|