@time2win/t2w 2.1.0 → 2.1.2

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,14 @@ 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.2 - 2025-09-18
9
+ ### Merged
10
+ Split interface to one single interface
11
+
12
+ ## 2.1.1 - 2025-09-18
13
+ ### Added
14
+ T2WResultBasic interface to abstract common properties of T2WIndividualResult and T2WTeamResult
15
+
8
16
  ## 2.1.0 - 2025-08-28
9
17
  ### Added
10
18
  getIndividualResult() to get a single individual result by signupId
package/models.d.ts CHANGED
@@ -87,36 +87,16 @@ export interface T2WLap {
87
87
  lap_num: number;
88
88
  teammember_id: number;
89
89
  }
90
- export interface T2WTeamResultSplit {
90
+ export interface T2WResultSplit {
91
91
  distance: number;
92
+ split_accumulatedtime: boolean;
93
+ split_index: number;
94
+ split_name: string;
92
95
  time: string;
93
96
  time_ms: number | null;
94
- split_name: string;
95
- split_index: number;
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,32 +142,16 @@ 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;
181
153
  speedBrutto: string;
182
154
  }
183
- export interface T2WIndividualResultSplit {
184
- distance: number;
185
- split_accumulatedtime: boolean;
186
- split_index: number;
187
- split_name: string;
188
- time: string;
189
- time_ms: number | null;
190
- }
191
155
  export interface T2WParticipantResponse {
192
156
  list: T2WParticipantInfo[];
193
157
  page: number;
@@ -238,7 +202,6 @@ interface T2WParticipantBasic {
238
202
  category_id: number | null;
239
203
  category_name: string | null;
240
204
  team_id: number | null;
241
- team_name: string | null;
242
205
  status_id: number;
243
206
  status_text: string;
244
207
  checkin_status_id: number;
@@ -257,6 +220,28 @@ interface T2WParticipantBasic {
257
220
  attr_3: string | null;
258
221
  attr_4: string | null;
259
222
  }
223
+ export interface T2WResultBasic {
224
+ id: number;
225
+ gender: gender;
226
+ organization: string | null;
227
+ race_id: number;
228
+ race_name: string;
229
+ wave_id: number | null;
230
+ team_name: string;
231
+ wave_name: string | null;
232
+ racenum: string | null;
233
+ racenumNumeric: number | null;
234
+ status_id: number;
235
+ status_text: string;
236
+ splits: T2WResultSplit[] | null;
237
+ laps: T2WLap[] | null;
238
+ start_tod: string;
239
+ finishtime_fromgun: string | null;
240
+ finishtime_fromgun_ms: number | null;
241
+ finishtime_fromchip: string | null;
242
+ finishtime_fromchip_ms: number | null;
243
+ laps_count: number;
244
+ }
260
245
  export declare enum RaceStatus {
261
246
  FINISHED = 1,
262
247
  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.2",
4
4
  "description": "providing latest-state models and advanced methods to interact with the T2W API",
5
5
  "keywords": [
6
6
  "time2win",
@@ -14,7 +14,7 @@
14
14
  "start:dev": "nodemon --watch src src/test.ts",
15
15
  "start": "node dist/index.js",
16
16
  "build": "tsc",
17
- "publish": "npm publish --access public"
17
+ "publish:pub": "npm publish --access public"
18
18
  },
19
19
  "author": "Jonas Dorfinger",
20
20
  "license": "MIT",
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);