@time2win/t2w 2.1.0 → 2.1.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/CHANGELOG.md CHANGED
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## 2.1.1 - 2025-09-18
9
+ ### Added
10
+ T2WResultBasic interface to abstract common properties of T2WIndividualResult and T2WTeamResult
11
+
8
12
  ## 2.1.0 - 2025-08-28
9
13
  ### Added
10
14
  getIndividualResult() to get a single individual result by signupId
package/models.d.ts CHANGED
@@ -95,28 +95,8 @@ export interface T2WTeamResultSplit {
95
95
  split_index: number;
96
96
  split_accumulatedtime: boolean;
97
97
  }
98
- export interface T2WTeamResult {
99
- id: number;
98
+ export interface T2WTeamResult extends T2WResultBasic {
100
99
  team_type: gender;
101
- gender: gender;
102
- name_team: string;
103
- organization: string | null;
104
- race_id: number;
105
- race_name: string;
106
- wave_id: number | null;
107
- wave_name: string | null;
108
- racenum: string | null;
109
- racenumNumeric: number | null;
110
- status_id: number;
111
- status_text: string;
112
- splits: T2WTeamResultSplit[] | null;
113
- laps: T2WLap[] | null;
114
- start_tod: string;
115
- finishtime_fromgun: string | null;
116
- finishtime_fromgun_ms: number | null;
117
- finishtime_fromchip: string | null;
118
- finishtime_fromchip_ms: number | null;
119
- laps_count: number;
120
100
  }
121
101
  export interface T2WTeamResponse {
122
102
  list: T2WTeam[];
@@ -162,19 +142,11 @@ export interface T2WIndividualResultsResponse {
162
142
  export interface T2WIndividualResultResponse {
163
143
  results: T2WIndividualResult[];
164
144
  }
165
- export interface T2WIndividualResult extends T2WParticipantBasic {
145
+ export interface T2WIndividualResult extends T2WParticipantBasic, T2WResultBasic {
166
146
  pos_overall: number;
167
147
  pos_gender: number;
168
148
  pos_category: number;
169
149
  name_full: 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
150
  paceNetto: string;
179
151
  paceBrutto: string;
180
152
  speedNetto: string;
@@ -238,7 +210,6 @@ interface T2WParticipantBasic {
238
210
  category_id: number | null;
239
211
  category_name: string | null;
240
212
  team_id: number | null;
241
- team_name: string | null;
242
213
  status_id: number;
243
214
  status_text: string;
244
215
  checkin_status_id: number;
@@ -257,6 +228,28 @@ interface T2WParticipantBasic {
257
228
  attr_3: string | null;
258
229
  attr_4: string | null;
259
230
  }
231
+ export interface T2WResultBasic {
232
+ id: number;
233
+ gender: gender;
234
+ organization: string | null;
235
+ race_id: number;
236
+ race_name: string;
237
+ wave_id: number | null;
238
+ team_name: string;
239
+ wave_name: string | null;
240
+ racenum: string | null;
241
+ racenumNumeric: number | null;
242
+ status_id: number;
243
+ status_text: string;
244
+ splits: T2WTeamResultSplit[] | null;
245
+ laps: T2WLap[] | null;
246
+ start_tod: string;
247
+ finishtime_fromgun: string | null;
248
+ finishtime_fromgun_ms: number | null;
249
+ finishtime_fromchip: string | null;
250
+ finishtime_fromchip_ms: number | null;
251
+ laps_count: number;
252
+ }
260
253
  export declare enum RaceStatus {
261
254
  FINISHED = 1,
262
255
  FINISHED_PENDING_VERIFICATION = 2,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@time2win/t2w",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "providing latest-state models and advanced methods to interact with the T2W API",
5
5
  "keywords": [
6
6
  "time2win",
package/test.js CHANGED
@@ -5,9 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  var index_1 = __importDefault(require("./index"));
7
7
  var api = new index_1.default('09f006ca-23ee-44da-bec5-4372580f4113');
8
- // api.getIndividualResults(38, 161).then(res => {
9
- // console.log(res.list[0]);
10
- // });
8
+ api.getTeamResult(440, 2495).then(function (res) {
9
+ console.log(res.list);
10
+ });
11
11
  // api.getEventDataWithCache(664, { dataExtra: [ 'splits'] }, 5).then(res => {
12
12
  // console.log(res);
13
13
  // }).catch(console.log);