iracing-data-client 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/README.md +200 -0
- package/lib/index.d.mts +3299 -0
- package/lib/index.d.ts +3299 -0
- package/lib/index.js +4010 -0
- package/lib/index.js.map +1 -0
- package/lib/index.mjs +3858 -0
- package/lib/index.mjs.map +1 -0
- package/package.json +58 -0
package/lib/index.mjs
ADDED
|
@@ -0,0 +1,3858 @@
|
|
|
1
|
+
import * as z6 from 'zod/mini';
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
6
|
+
var __async = (__this, __arguments, generator) => {
|
|
7
|
+
return new Promise((resolve, reject) => {
|
|
8
|
+
var fulfilled = (value) => {
|
|
9
|
+
try {
|
|
10
|
+
step(generator.next(value));
|
|
11
|
+
} catch (e) {
|
|
12
|
+
reject(e);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
var rejected = (value) => {
|
|
16
|
+
try {
|
|
17
|
+
step(generator.throw(value));
|
|
18
|
+
} catch (e) {
|
|
19
|
+
reject(e);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
23
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var IRacingClientOptionsSchema = z6.object({
|
|
27
|
+
email: z6.optional(z6.string()),
|
|
28
|
+
password: z6.optional(z6.string()),
|
|
29
|
+
headers: z6.optional(z6.record(z6.string(), z6.string())),
|
|
30
|
+
fetchFn: z6.optional(z6.any()),
|
|
31
|
+
validateParams: z6.optional(z6.boolean())
|
|
32
|
+
});
|
|
33
|
+
var IRacingError = class extends Error {
|
|
34
|
+
constructor(message, status, statusText, responseData) {
|
|
35
|
+
super(message);
|
|
36
|
+
this.status = status;
|
|
37
|
+
this.statusText = statusText;
|
|
38
|
+
this.responseData = responseData;
|
|
39
|
+
this.name = "IRacingError";
|
|
40
|
+
}
|
|
41
|
+
get isMaintenanceMode() {
|
|
42
|
+
var _a;
|
|
43
|
+
return this.status === 503 && ((_a = this.responseData) == null ? void 0 : _a.error) === "Site Maintenance";
|
|
44
|
+
}
|
|
45
|
+
get isRateLimited() {
|
|
46
|
+
return this.status === 429;
|
|
47
|
+
}
|
|
48
|
+
get isUnauthorized() {
|
|
49
|
+
return this.status === 401;
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
var IRacingClient = class {
|
|
53
|
+
constructor(opts = {}) {
|
|
54
|
+
__publicField(this, "baseUrl", "https://members-ng.iracing.com");
|
|
55
|
+
__publicField(this, "fetchFn");
|
|
56
|
+
__publicField(this, "authData", null);
|
|
57
|
+
__publicField(this, "cookies", null);
|
|
58
|
+
__publicField(this, "email");
|
|
59
|
+
__publicField(this, "password");
|
|
60
|
+
__publicField(this, "presetHeaders");
|
|
61
|
+
__publicField(this, "validateParams");
|
|
62
|
+
__publicField(this, "expiringCache", /* @__PURE__ */ new Map());
|
|
63
|
+
var _a, _b;
|
|
64
|
+
const validatedOpts = IRacingClientOptionsSchema.parse(opts);
|
|
65
|
+
this.fetchFn = (_a = validatedOpts.fetchFn) != null ? _a : globalThis.fetch;
|
|
66
|
+
if (!this.fetchFn) throw new Error("No fetch available. Pass fetchFn in IRacingClientOptions.");
|
|
67
|
+
this.email = validatedOpts.email;
|
|
68
|
+
this.password = validatedOpts.password;
|
|
69
|
+
this.presetHeaders = validatedOpts.headers;
|
|
70
|
+
this.validateParams = (_b = validatedOpts.validateParams) != null ? _b : true;
|
|
71
|
+
if (!this.email && !this.password && !this.presetHeaders) {
|
|
72
|
+
throw new Error("Must provide either email/password or headers for authentication");
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
buildUrl(endpoint, params) {
|
|
76
|
+
const url = new URL(endpoint.startsWith("http") ? endpoint : `${this.baseUrl}${endpoint}`);
|
|
77
|
+
if (params) {
|
|
78
|
+
Object.entries(params).forEach(([key, value]) => {
|
|
79
|
+
if (value !== void 0 && value !== null) {
|
|
80
|
+
if (Array.isArray(value)) {
|
|
81
|
+
url.searchParams.append(key, value.join(","));
|
|
82
|
+
} else if (typeof value === "boolean") {
|
|
83
|
+
url.searchParams.append(key, value ? "true" : "false");
|
|
84
|
+
} else {
|
|
85
|
+
url.searchParams.append(key, String(value));
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
return url.toString();
|
|
91
|
+
}
|
|
92
|
+
ensureAuthenticated() {
|
|
93
|
+
return __async(this, null, function* () {
|
|
94
|
+
if (this.presetHeaders) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
if (!this.authData && this.email && this.password) {
|
|
98
|
+
yield this.authenticate();
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
authenticate() {
|
|
103
|
+
return __async(this, null, function* () {
|
|
104
|
+
if (!this.email || !this.password) {
|
|
105
|
+
throw new Error("Email and password required for authentication");
|
|
106
|
+
}
|
|
107
|
+
const response = yield this.fetchFn(`${this.baseUrl}/auth`, {
|
|
108
|
+
method: "POST",
|
|
109
|
+
headers: {
|
|
110
|
+
"Content-Type": "application/json"
|
|
111
|
+
},
|
|
112
|
+
body: JSON.stringify({
|
|
113
|
+
email: this.email,
|
|
114
|
+
password: this.password
|
|
115
|
+
})
|
|
116
|
+
});
|
|
117
|
+
if (!response.ok) {
|
|
118
|
+
const text = yield response.text().catch(() => "");
|
|
119
|
+
throw new Error(`Authentication failed: ${response.statusText} - ${text}`);
|
|
120
|
+
}
|
|
121
|
+
this.authData = yield response.json();
|
|
122
|
+
if (!this.authData) {
|
|
123
|
+
throw new Error("Authentication failed - no auth data received");
|
|
124
|
+
}
|
|
125
|
+
this.cookies = {
|
|
126
|
+
"irsso_membersv2": this.authData.ssoCookieValue,
|
|
127
|
+
"authtoken_members": `%7B%22authtoken%22%3A%7B%22authcode%22%3A%22${this.authData.authcode}%22%2C%22email%22%3A%22${encodeURIComponent(this.authData.email)}%22%7D%7D`
|
|
128
|
+
};
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
mapParamsToApi(params) {
|
|
132
|
+
if (!params) return void 0;
|
|
133
|
+
const mapped = {};
|
|
134
|
+
for (const [key, value] of Object.entries(params)) {
|
|
135
|
+
const snakeKey = key.replace(/[A-Z]/g, (m) => "_" + m.toLowerCase());
|
|
136
|
+
mapped[snakeKey] = value;
|
|
137
|
+
}
|
|
138
|
+
return mapped;
|
|
139
|
+
}
|
|
140
|
+
mapResponseFromApi(data) {
|
|
141
|
+
if (data === null || data === void 0) return data;
|
|
142
|
+
if (Array.isArray(data)) {
|
|
143
|
+
return data.map((item) => this.mapResponseFromApi(item));
|
|
144
|
+
}
|
|
145
|
+
if (typeof data === "object") {
|
|
146
|
+
const mapped = {};
|
|
147
|
+
for (const [key, value] of Object.entries(data)) {
|
|
148
|
+
const camelKey = key.replace(/_([a-z0-9])/g, (_, char) => char.toUpperCase()).replace(/-([a-z0-9])/g, (_, char) => char.toUpperCase());
|
|
149
|
+
mapped[camelKey] = this.mapResponseFromApi(value);
|
|
150
|
+
}
|
|
151
|
+
return mapped;
|
|
152
|
+
}
|
|
153
|
+
return data;
|
|
154
|
+
}
|
|
155
|
+
get(url, options) {
|
|
156
|
+
return __async(this, null, function* () {
|
|
157
|
+
yield this.ensureAuthenticated();
|
|
158
|
+
const apiParams = this.mapParamsToApi(options == null ? void 0 : options.params);
|
|
159
|
+
const headers = {};
|
|
160
|
+
if (this.presetHeaders) {
|
|
161
|
+
Object.assign(headers, this.presetHeaders);
|
|
162
|
+
} else if (this.cookies) {
|
|
163
|
+
const cookieString = Object.entries(this.cookies).map(([name, value]) => `${name}=${value}`).join("; ");
|
|
164
|
+
headers["Cookie"] = cookieString;
|
|
165
|
+
} else {
|
|
166
|
+
throw new Error("No authentication available");
|
|
167
|
+
}
|
|
168
|
+
const response = yield this.fetchFn(this.buildUrl(url, apiParams), {
|
|
169
|
+
headers
|
|
170
|
+
});
|
|
171
|
+
if (!response.ok) {
|
|
172
|
+
const text = yield response.text().catch(() => "");
|
|
173
|
+
let responseData = null;
|
|
174
|
+
try {
|
|
175
|
+
responseData = JSON.parse(text);
|
|
176
|
+
} catch (e) {
|
|
177
|
+
}
|
|
178
|
+
if (response.status === 503 && (responseData == null ? void 0 : responseData.error) === "Site Maintenance") {
|
|
179
|
+
throw new IRacingError(
|
|
180
|
+
`iRacing is currently in maintenance mode: ${responseData.message || "Service temporarily unavailable"}`,
|
|
181
|
+
response.status,
|
|
182
|
+
response.statusText,
|
|
183
|
+
responseData
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
if (response.status === 429) {
|
|
187
|
+
throw new IRacingError(
|
|
188
|
+
"Rate limit exceeded. Please wait before making more requests.",
|
|
189
|
+
response.status,
|
|
190
|
+
response.statusText,
|
|
191
|
+
responseData
|
|
192
|
+
);
|
|
193
|
+
}
|
|
194
|
+
if (response.status === 401) {
|
|
195
|
+
throw new IRacingError(
|
|
196
|
+
"Authentication failed. Please check your credentials.",
|
|
197
|
+
response.status,
|
|
198
|
+
response.statusText,
|
|
199
|
+
responseData
|
|
200
|
+
);
|
|
201
|
+
}
|
|
202
|
+
const errorMessage = (responseData == null ? void 0 : responseData.message) || (responseData == null ? void 0 : responseData.error) || text || response.statusText;
|
|
203
|
+
throw new IRacingError(
|
|
204
|
+
`Request failed: ${errorMessage}`,
|
|
205
|
+
response.status,
|
|
206
|
+
response.statusText,
|
|
207
|
+
responseData
|
|
208
|
+
);
|
|
209
|
+
}
|
|
210
|
+
const contentType = response.headers.get("content-type") || "";
|
|
211
|
+
if (contentType.includes("application/json")) {
|
|
212
|
+
const data = yield response.json();
|
|
213
|
+
if (data.link && data.expires) {
|
|
214
|
+
const s3Response = yield this.fetchFn(data.link);
|
|
215
|
+
if (!s3Response.ok) {
|
|
216
|
+
throw new Error(`Failed to fetch from S3: ${s3Response.statusText}`);
|
|
217
|
+
}
|
|
218
|
+
const s3ContentType = s3Response.headers.get("content-type") || "";
|
|
219
|
+
if (s3ContentType.includes("text/csv") || s3ContentType.includes("text/plain")) {
|
|
220
|
+
const csvText = yield s3Response.text();
|
|
221
|
+
return {
|
|
222
|
+
ContentType: "csv",
|
|
223
|
+
RawData: csvText,
|
|
224
|
+
Note: "This endpoint returns CSV data, not JSON"
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
const s3Data = yield s3Response.json();
|
|
228
|
+
const mappedData2 = this.mapResponseFromApi(s3Data);
|
|
229
|
+
if (options == null ? void 0 : options.schema) {
|
|
230
|
+
return options.schema.parse(mappedData2);
|
|
231
|
+
}
|
|
232
|
+
return mappedData2;
|
|
233
|
+
}
|
|
234
|
+
const mappedData = this.mapResponseFromApi(data);
|
|
235
|
+
if (options == null ? void 0 : options.schema) {
|
|
236
|
+
return options.schema.parse(mappedData);
|
|
237
|
+
}
|
|
238
|
+
return mappedData;
|
|
239
|
+
}
|
|
240
|
+
throw new Error(`Unexpected content type: ${contentType}`);
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
isAuthenticated() {
|
|
244
|
+
return this.authData !== null || !!this.presetHeaders;
|
|
245
|
+
}
|
|
246
|
+
getCustomerId() {
|
|
247
|
+
var _a, _b;
|
|
248
|
+
return (_b = (_a = this.authData) == null ? void 0 : _a.custId) != null ? _b : null;
|
|
249
|
+
}
|
|
250
|
+
};
|
|
251
|
+
var CarAssets = z6.record(z6.string(), z6.object({
|
|
252
|
+
carId: z6.optional(z6.nullable(z6.number())),
|
|
253
|
+
carRules: z6.optional(z6.nullable(z6.array(z6.unknown()))),
|
|
254
|
+
detailCopy: z6.optional(z6.nullable(z6.string())),
|
|
255
|
+
detailScreenShotImages: z6.optional(z6.nullable(z6.string())),
|
|
256
|
+
detailTechspecsCopy: z6.optional(z6.nullable(z6.string())),
|
|
257
|
+
folder: z6.optional(z6.nullable(z6.string())),
|
|
258
|
+
galleryImages: z6.optional(z6.nullable(z6.string())),
|
|
259
|
+
galleryPrefix: z6.optional(z6.nullable(z6.string())),
|
|
260
|
+
groupImage: z6.optional(z6.nullable(z6.string())),
|
|
261
|
+
groupName: z6.optional(z6.nullable(z6.string())),
|
|
262
|
+
largeImage: z6.optional(z6.nullable(z6.string())),
|
|
263
|
+
logo: z6.optional(z6.nullable(z6.string())),
|
|
264
|
+
smallImage: z6.optional(z6.nullable(z6.string())),
|
|
265
|
+
sponsorLogo: z6.optional(z6.nullable(z6.string())),
|
|
266
|
+
templatePath: z6.optional(z6.nullable(z6.string()))
|
|
267
|
+
}));
|
|
268
|
+
var CarGet = z6.array(z6.object({
|
|
269
|
+
aiEnabled: z6.boolean(),
|
|
270
|
+
allowNumberColors: z6.boolean(),
|
|
271
|
+
allowNumberFont: z6.boolean(),
|
|
272
|
+
allowSponsor1: z6.boolean(),
|
|
273
|
+
allowSponsor2: z6.boolean(),
|
|
274
|
+
allowWheelColor: z6.boolean(),
|
|
275
|
+
awardExempt: z6.boolean(),
|
|
276
|
+
carConfigDefs: z6.array(z6.object({
|
|
277
|
+
carcfg: z6.number(),
|
|
278
|
+
cfgSubdir: z6.nullable(z6.string()),
|
|
279
|
+
customPaintExt: z6.nullable(z6.string()),
|
|
280
|
+
name: z6.string()
|
|
281
|
+
})),
|
|
282
|
+
carConfigs: z6.array(z6.object({
|
|
283
|
+
carcfg: z6.number(),
|
|
284
|
+
trackId: z6.optional(z6.number()),
|
|
285
|
+
trackType: z6.optional(z6.number())
|
|
286
|
+
})),
|
|
287
|
+
carDirpath: z6.string(),
|
|
288
|
+
carId: z6.number(),
|
|
289
|
+
carName: z6.string(),
|
|
290
|
+
carNameAbbreviated: z6.string(),
|
|
291
|
+
carTypes: z6.array(z6.object({
|
|
292
|
+
carType: z6.string()
|
|
293
|
+
})),
|
|
294
|
+
carWeight: z6.number(),
|
|
295
|
+
categories: z6.array(z6.string()),
|
|
296
|
+
created: z6.string(),
|
|
297
|
+
firstSale: z6.string(),
|
|
298
|
+
folder: z6.string(),
|
|
299
|
+
forumUrl: z6.optional(z6.string()),
|
|
300
|
+
freeWithSubscription: z6.boolean(),
|
|
301
|
+
hasHeadlights: z6.boolean(),
|
|
302
|
+
hasMultipleDryTireTypes: z6.boolean(),
|
|
303
|
+
hasRainCapableTireTypes: z6.boolean(),
|
|
304
|
+
hp: z6.number(),
|
|
305
|
+
isPsPurchasable: z6.boolean(),
|
|
306
|
+
logo: z6.nullable(z6.string()),
|
|
307
|
+
maxPowerAdjustPct: z6.number(),
|
|
308
|
+
maxWeightPenaltyKg: z6.number(),
|
|
309
|
+
minPowerAdjustPct: z6.number(),
|
|
310
|
+
packageId: z6.number(),
|
|
311
|
+
patterns: z6.number(),
|
|
312
|
+
price: z6.number(),
|
|
313
|
+
priceDisplay: z6.optional(z6.string()),
|
|
314
|
+
rainEnabled: z6.boolean(),
|
|
315
|
+
retired: z6.boolean(),
|
|
316
|
+
searchFilters: z6.string(),
|
|
317
|
+
sku: z6.number(),
|
|
318
|
+
smallImage: z6.string(),
|
|
319
|
+
sponsorLogo: z6.nullable(z6.string()),
|
|
320
|
+
carMake: z6.optional(z6.string()),
|
|
321
|
+
carModel: z6.optional(z6.string()),
|
|
322
|
+
paintRules: z6.optional(z6.record(z6.string(), z6.unknown())),
|
|
323
|
+
siteUrl: z6.optional(z6.string())
|
|
324
|
+
}));
|
|
325
|
+
var CarAssetsParamsSchema = z6.object({});
|
|
326
|
+
var CarGetParamsSchema = z6.object({});
|
|
327
|
+
|
|
328
|
+
// src/car/service.ts
|
|
329
|
+
var CarService = class {
|
|
330
|
+
constructor(client) {
|
|
331
|
+
this.client = client;
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* assets
|
|
335
|
+
* @see https://members-ng.iracing.com/data/car/assets
|
|
336
|
+
* @sample car.assets.json
|
|
337
|
+
*/
|
|
338
|
+
assets() {
|
|
339
|
+
return __async(this, null, function* () {
|
|
340
|
+
return this.client.get("https://members-ng.iracing.com/data/car/assets", { schema: CarAssets });
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* get
|
|
345
|
+
* @see https://members-ng.iracing.com/data/car/get
|
|
346
|
+
* @sample car.get.json
|
|
347
|
+
*/
|
|
348
|
+
get() {
|
|
349
|
+
return __async(this, null, function* () {
|
|
350
|
+
return this.client.get("https://members-ng.iracing.com/data/car/get", { schema: CarGet });
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
};
|
|
354
|
+
z6.object({
|
|
355
|
+
carDirpath: z6.string(),
|
|
356
|
+
// maps from: car_dirpath
|
|
357
|
+
carId: z6.number(),
|
|
358
|
+
// maps from: car_id
|
|
359
|
+
rainEnabled: z6.boolean(),
|
|
360
|
+
// maps from: rain_enabled
|
|
361
|
+
retired: z6.boolean()
|
|
362
|
+
});
|
|
363
|
+
var CarclassGet = z6.array(z6.object({
|
|
364
|
+
carClassId: z6.number(),
|
|
365
|
+
carsInClass: z6.array(z6.object({
|
|
366
|
+
carDirpath: z6.string(),
|
|
367
|
+
carId: z6.number(),
|
|
368
|
+
rainEnabled: z6.boolean(),
|
|
369
|
+
retired: z6.boolean()
|
|
370
|
+
})),
|
|
371
|
+
custId: z6.number(),
|
|
372
|
+
name: z6.string(),
|
|
373
|
+
rainEnabled: z6.boolean(),
|
|
374
|
+
relativeSpeed: z6.number(),
|
|
375
|
+
shortName: z6.string()
|
|
376
|
+
}));
|
|
377
|
+
var CarclassGetParamsSchema = z6.object({});
|
|
378
|
+
|
|
379
|
+
// src/carclass/service.ts
|
|
380
|
+
var CarclassService = class {
|
|
381
|
+
constructor(client) {
|
|
382
|
+
this.client = client;
|
|
383
|
+
}
|
|
384
|
+
/**
|
|
385
|
+
* get
|
|
386
|
+
* @see https://members-ng.iracing.com/data/carclass/get
|
|
387
|
+
* @sample carclass.get.json
|
|
388
|
+
*/
|
|
389
|
+
get() {
|
|
390
|
+
return __async(this, null, function* () {
|
|
391
|
+
return this.client.get("https://members-ng.iracing.com/data/carclass/get", { schema: CarclassGet });
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
};
|
|
395
|
+
var ConstantsCategories = z6.array(z6.object({
|
|
396
|
+
label: z6.string(),
|
|
397
|
+
value: z6.number()
|
|
398
|
+
}));
|
|
399
|
+
var ConstantsDivisions = z6.array(z6.object({
|
|
400
|
+
label: z6.string(),
|
|
401
|
+
value: z6.number()
|
|
402
|
+
}));
|
|
403
|
+
var ConstantsEventTypes = z6.array(z6.object({
|
|
404
|
+
label: z6.string(),
|
|
405
|
+
value: z6.number()
|
|
406
|
+
}));
|
|
407
|
+
var ConstantsCategoriesParamsSchema = z6.object({});
|
|
408
|
+
var ConstantsDivisionsParamsSchema = z6.object({});
|
|
409
|
+
var ConstantsEventTypesParamsSchema = z6.object({});
|
|
410
|
+
|
|
411
|
+
// src/constants/service.ts
|
|
412
|
+
var ConstantsService = class {
|
|
413
|
+
constructor(client) {
|
|
414
|
+
this.client = client;
|
|
415
|
+
}
|
|
416
|
+
/**
|
|
417
|
+
* categories
|
|
418
|
+
* @see https://members-ng.iracing.com/data/constants/categories
|
|
419
|
+
* @sample constants.categories.json
|
|
420
|
+
*/
|
|
421
|
+
categories() {
|
|
422
|
+
return __async(this, null, function* () {
|
|
423
|
+
return this.client.get("https://members-ng.iracing.com/data/constants/categories", { schema: ConstantsCategories });
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
* divisions
|
|
428
|
+
* @see https://members-ng.iracing.com/data/constants/divisions
|
|
429
|
+
* @sample constants.divisions.json
|
|
430
|
+
*/
|
|
431
|
+
divisions() {
|
|
432
|
+
return __async(this, null, function* () {
|
|
433
|
+
return this.client.get("https://members-ng.iracing.com/data/constants/divisions", { schema: ConstantsDivisions });
|
|
434
|
+
});
|
|
435
|
+
}
|
|
436
|
+
/**
|
|
437
|
+
* event_types
|
|
438
|
+
* @see https://members-ng.iracing.com/data/constants/event_types
|
|
439
|
+
* @sample constants.event_types.json
|
|
440
|
+
*/
|
|
441
|
+
eventTypes() {
|
|
442
|
+
return __async(this, null, function* () {
|
|
443
|
+
return this.client.get("https://members-ng.iracing.com/data/constants/event_types", { schema: ConstantsEventTypes });
|
|
444
|
+
});
|
|
445
|
+
}
|
|
446
|
+
};
|
|
447
|
+
var DriverStatsByCategoryOval = z6.object({
|
|
448
|
+
ContentType: z6.literal("csv"),
|
|
449
|
+
RawData: z6.string(),
|
|
450
|
+
Note: z6.string()
|
|
451
|
+
});
|
|
452
|
+
var DriverStatsByCategorySportsCar = z6.object({
|
|
453
|
+
ContentType: z6.literal("csv"),
|
|
454
|
+
RawData: z6.string(),
|
|
455
|
+
Note: z6.string()
|
|
456
|
+
});
|
|
457
|
+
var DriverStatsByCategoryFormulaCar = z6.object({
|
|
458
|
+
ContentType: z6.literal("csv"),
|
|
459
|
+
RawData: z6.string(),
|
|
460
|
+
Note: z6.string()
|
|
461
|
+
});
|
|
462
|
+
var DriverStatsByCategoryRoad = z6.object({
|
|
463
|
+
ContentType: z6.literal("csv"),
|
|
464
|
+
RawData: z6.string(),
|
|
465
|
+
Note: z6.string()
|
|
466
|
+
});
|
|
467
|
+
var DriverStatsByCategoryDirtOval = z6.object({
|
|
468
|
+
ContentType: z6.literal("csv"),
|
|
469
|
+
RawData: z6.string(),
|
|
470
|
+
Note: z6.string()
|
|
471
|
+
});
|
|
472
|
+
var DriverStatsByCategoryDirtRoad = z6.object({
|
|
473
|
+
ContentType: z6.literal("csv"),
|
|
474
|
+
RawData: z6.string(),
|
|
475
|
+
Note: z6.string()
|
|
476
|
+
});
|
|
477
|
+
var DriverStatsByCategoryOvalParamsSchema = z6.object({});
|
|
478
|
+
var DriverStatsByCategorySportsCarParamsSchema = z6.object({});
|
|
479
|
+
var DriverStatsByCategoryFormulaCarParamsSchema = z6.object({});
|
|
480
|
+
var DriverStatsByCategoryRoadParamsSchema = z6.object({});
|
|
481
|
+
var DriverStatsByCategoryDirtOvalParamsSchema = z6.object({});
|
|
482
|
+
var DriverStatsByCategoryDirtRoadParamsSchema = z6.object({});
|
|
483
|
+
|
|
484
|
+
// src/driver-stats-by-category/service.ts
|
|
485
|
+
var DriverStatsByCategoryService = class {
|
|
486
|
+
constructor(client) {
|
|
487
|
+
this.client = client;
|
|
488
|
+
}
|
|
489
|
+
/**
|
|
490
|
+
* oval
|
|
491
|
+
* @see https://members-ng.iracing.com/data/driver_stats_by_category/oval
|
|
492
|
+
* @sample driver_stats_by_category.oval.json
|
|
493
|
+
*/
|
|
494
|
+
oval() {
|
|
495
|
+
return __async(this, null, function* () {
|
|
496
|
+
return this.client.get("https://members-ng.iracing.com/data/driver_stats_by_category/oval", { schema: DriverStatsByCategoryOval });
|
|
497
|
+
});
|
|
498
|
+
}
|
|
499
|
+
/**
|
|
500
|
+
* sports_car
|
|
501
|
+
* @see https://members-ng.iracing.com/data/driver_stats_by_category/sports_car
|
|
502
|
+
* @sample driver_stats_by_category.sports_car.json
|
|
503
|
+
*/
|
|
504
|
+
sportsCar() {
|
|
505
|
+
return __async(this, null, function* () {
|
|
506
|
+
return this.client.get("https://members-ng.iracing.com/data/driver_stats_by_category/sports_car", { schema: DriverStatsByCategorySportsCar });
|
|
507
|
+
});
|
|
508
|
+
}
|
|
509
|
+
/**
|
|
510
|
+
* formula_car
|
|
511
|
+
* @see https://members-ng.iracing.com/data/driver_stats_by_category/formula_car
|
|
512
|
+
* @sample driver_stats_by_category.formula_car.json
|
|
513
|
+
*/
|
|
514
|
+
formulaCar() {
|
|
515
|
+
return __async(this, null, function* () {
|
|
516
|
+
return this.client.get("https://members-ng.iracing.com/data/driver_stats_by_category/formula_car", { schema: DriverStatsByCategoryFormulaCar });
|
|
517
|
+
});
|
|
518
|
+
}
|
|
519
|
+
/**
|
|
520
|
+
* road
|
|
521
|
+
* @see https://members-ng.iracing.com/data/driver_stats_by_category/road
|
|
522
|
+
* @sample driver_stats_by_category.road.json
|
|
523
|
+
*/
|
|
524
|
+
road() {
|
|
525
|
+
return __async(this, null, function* () {
|
|
526
|
+
return this.client.get("https://members-ng.iracing.com/data/driver_stats_by_category/road", { schema: DriverStatsByCategoryRoad });
|
|
527
|
+
});
|
|
528
|
+
}
|
|
529
|
+
/**
|
|
530
|
+
* dirt_oval
|
|
531
|
+
* @see https://members-ng.iracing.com/data/driver_stats_by_category/dirt_oval
|
|
532
|
+
* @sample driver_stats_by_category.dirt_oval.json
|
|
533
|
+
*/
|
|
534
|
+
dirtOval() {
|
|
535
|
+
return __async(this, null, function* () {
|
|
536
|
+
return this.client.get("https://members-ng.iracing.com/data/driver_stats_by_category/dirt_oval", { schema: DriverStatsByCategoryDirtOval });
|
|
537
|
+
});
|
|
538
|
+
}
|
|
539
|
+
/**
|
|
540
|
+
* dirt_road
|
|
541
|
+
* @see https://members-ng.iracing.com/data/driver_stats_by_category/dirt_road
|
|
542
|
+
* @sample driver_stats_by_category.dirt_road.json
|
|
543
|
+
*/
|
|
544
|
+
dirtRoad() {
|
|
545
|
+
return __async(this, null, function* () {
|
|
546
|
+
return this.client.get("https://members-ng.iracing.com/data/driver_stats_by_category/dirt_road", { schema: DriverStatsByCategoryDirtRoad });
|
|
547
|
+
});
|
|
548
|
+
}
|
|
549
|
+
};
|
|
550
|
+
var HostedCombinedSessions = z6.object({
|
|
551
|
+
subscribed: z6.boolean(),
|
|
552
|
+
sequence: z6.number(),
|
|
553
|
+
sessions: z6.array(z6.object({
|
|
554
|
+
numDrivers: z6.number(),
|
|
555
|
+
numSpotters: z6.number(),
|
|
556
|
+
numSpectators: z6.number(),
|
|
557
|
+
numBroadcasters: z6.number(),
|
|
558
|
+
availableReservedBroadcasterSlots: z6.number(),
|
|
559
|
+
numSpectatorSlots: z6.number(),
|
|
560
|
+
availableSpectatorSlots: z6.number(),
|
|
561
|
+
canBroadcast: z6.boolean(),
|
|
562
|
+
canWatch: z6.boolean(),
|
|
563
|
+
canSpot: z6.boolean(),
|
|
564
|
+
elig: z6.object({
|
|
565
|
+
sessionFull: z6.boolean(),
|
|
566
|
+
canSpot: z6.boolean(),
|
|
567
|
+
canWatch: z6.boolean(),
|
|
568
|
+
canDrive: z6.boolean(),
|
|
569
|
+
hasSessPassword: z6.boolean(),
|
|
570
|
+
needsPurchase: z6.boolean(),
|
|
571
|
+
ownCar: z6.boolean(),
|
|
572
|
+
ownTrack: z6.boolean(),
|
|
573
|
+
purchaseSkus: z6.array(z6.number()),
|
|
574
|
+
registered: z6.boolean()
|
|
575
|
+
}),
|
|
576
|
+
driverChanges: z6.boolean(),
|
|
577
|
+
restrictViewing: z6.boolean(),
|
|
578
|
+
maxUsers: z6.number(),
|
|
579
|
+
privateSessionId: z6.number(),
|
|
580
|
+
sessionId: z6.number(),
|
|
581
|
+
subsessionId: z6.number(),
|
|
582
|
+
passwordProtected: z6.boolean(),
|
|
583
|
+
sessionName: z6.string(),
|
|
584
|
+
sessionDesc: z6.optional(z6.string()),
|
|
585
|
+
openRegExpires: z6.string(),
|
|
586
|
+
launchAt: z6.string(),
|
|
587
|
+
fullCourseCautions: z6.boolean(),
|
|
588
|
+
numFastTows: z6.number(),
|
|
589
|
+
rollingStarts: z6.boolean(),
|
|
590
|
+
restarts: z6.number(),
|
|
591
|
+
multiclassType: z6.number(),
|
|
592
|
+
pitsInUse: z6.number(),
|
|
593
|
+
carsLeft: z6.number(),
|
|
594
|
+
maxDrivers: z6.number(),
|
|
595
|
+
hardcoreLevel: z6.number(),
|
|
596
|
+
practiceLength: z6.number(),
|
|
597
|
+
loneQualify: z6.boolean(),
|
|
598
|
+
qualifyLaps: z6.number(),
|
|
599
|
+
qualifyLength: z6.number(),
|
|
600
|
+
warmupLength: z6.number(),
|
|
601
|
+
raceLaps: z6.number(),
|
|
602
|
+
raceLength: z6.number(),
|
|
603
|
+
timeLimit: z6.number(),
|
|
604
|
+
restrictResults: z6.boolean(),
|
|
605
|
+
incidentLimit: z6.number(),
|
|
606
|
+
incidentWarnMode: z6.number(),
|
|
607
|
+
incidentWarnParam1: z6.number(),
|
|
608
|
+
incidentWarnParam2: z6.number(),
|
|
609
|
+
unsportConductRuleMode: z6.number(),
|
|
610
|
+
connectionBlackFlag: z6.boolean(),
|
|
611
|
+
luckyDog: z6.boolean(),
|
|
612
|
+
minTeamDrivers: z6.number(),
|
|
613
|
+
maxTeamDrivers: z6.number(),
|
|
614
|
+
qualifierMustStartRace: z6.boolean(),
|
|
615
|
+
driverChangeRule: z6.number(),
|
|
616
|
+
fixedSetup: z6.boolean(),
|
|
617
|
+
entryCount: z6.number(),
|
|
618
|
+
leagueId: z6.number(),
|
|
619
|
+
leagueSeasonId: z6.number(),
|
|
620
|
+
sessionType: z6.number(),
|
|
621
|
+
orderId: z6.number(),
|
|
622
|
+
minLicenseLevel: z6.number(),
|
|
623
|
+
maxLicenseLevel: z6.number(),
|
|
624
|
+
status: z6.number(),
|
|
625
|
+
paceCarId: z6.nullable(z6.number()),
|
|
626
|
+
paceCarClassId: z6.nullable(z6.number()),
|
|
627
|
+
numOptLaps: z6.number(),
|
|
628
|
+
damageModel: z6.number(),
|
|
629
|
+
doNotPaintCars: z6.boolean(),
|
|
630
|
+
greenWhiteCheckeredLimit: z6.number(),
|
|
631
|
+
doNotCountCautionLaps: z6.boolean(),
|
|
632
|
+
consecCautionsSingleFile: z6.boolean(),
|
|
633
|
+
consecCautionWithinNlaps: z6.number(),
|
|
634
|
+
noLapperWaveArounds: z6.boolean(),
|
|
635
|
+
shortParadeLap: z6.boolean(),
|
|
636
|
+
startOnQualTire: z6.boolean(),
|
|
637
|
+
telemetryRestriction: z6.number(),
|
|
638
|
+
telemetryForceToDisk: z6.number(),
|
|
639
|
+
maxAiDrivers: z6.number(),
|
|
640
|
+
aiAvoidPlayers: z6.boolean(),
|
|
641
|
+
adaptiveAiEnabled: z6.boolean(),
|
|
642
|
+
adaptiveAiDifficulty: z6.optional(z6.number()),
|
|
643
|
+
mustUseDiffTireTypesInRace: z6.boolean(),
|
|
644
|
+
startZone: z6.boolean(),
|
|
645
|
+
enablePitlaneCollisions: z6.boolean(),
|
|
646
|
+
disallowVirtualMirror: z6.boolean(),
|
|
647
|
+
maxVisorTearoffs: z6.number(),
|
|
648
|
+
categoryId: z6.number(),
|
|
649
|
+
category: z6.string(),
|
|
650
|
+
sessionFull: z6.boolean(),
|
|
651
|
+
host: z6.object({
|
|
652
|
+
custId: z6.number(),
|
|
653
|
+
displayName: z6.string(),
|
|
654
|
+
helmet: z6.object({
|
|
655
|
+
pattern: z6.number(),
|
|
656
|
+
color1: z6.string(),
|
|
657
|
+
color2: z6.string(),
|
|
658
|
+
color3: z6.string(),
|
|
659
|
+
faceType: z6.number(),
|
|
660
|
+
helmetType: z6.number()
|
|
661
|
+
})
|
|
662
|
+
}),
|
|
663
|
+
track: z6.object({
|
|
664
|
+
categoryId: z6.number(),
|
|
665
|
+
configName: z6.optional(z6.string()),
|
|
666
|
+
trackId: z6.number(),
|
|
667
|
+
trackName: z6.string()
|
|
668
|
+
}),
|
|
669
|
+
weather: z6.object({
|
|
670
|
+
allowFog: z6.boolean(),
|
|
671
|
+
forecastOptions: z6.optional(z6.object({
|
|
672
|
+
forecastType: z6.number(),
|
|
673
|
+
precipitation: z6.number(),
|
|
674
|
+
skies: z6.number(),
|
|
675
|
+
stopPrecip: z6.number(),
|
|
676
|
+
temperature: z6.number(),
|
|
677
|
+
weatherSeed: z6.number(),
|
|
678
|
+
windDir: z6.number(),
|
|
679
|
+
windSpeed: z6.number()
|
|
680
|
+
})),
|
|
681
|
+
precipOption: z6.number(),
|
|
682
|
+
relHumidity: z6.number(),
|
|
683
|
+
simulatedStartTime: z6.string(),
|
|
684
|
+
simulatedTimeMultiplier: z6.number(),
|
|
685
|
+
simulatedTimeOffsets: z6.array(z6.number()),
|
|
686
|
+
skies: z6.number(),
|
|
687
|
+
tempUnits: z6.number(),
|
|
688
|
+
tempValue: z6.number(),
|
|
689
|
+
timeOfDay: z6.number(),
|
|
690
|
+
trackWater: z6.number(),
|
|
691
|
+
version: z6.number(),
|
|
692
|
+
weatherSummary: z6.optional(z6.object({
|
|
693
|
+
maxPrecipRate: z6.number(),
|
|
694
|
+
maxPrecipRateDesc: z6.string(),
|
|
695
|
+
precipChance: z6.number(),
|
|
696
|
+
skiesHigh: z6.number(),
|
|
697
|
+
skiesLow: z6.number(),
|
|
698
|
+
tempHigh: z6.number(),
|
|
699
|
+
tempLow: z6.number(),
|
|
700
|
+
tempUnits: z6.number(),
|
|
701
|
+
windDir: z6.number(),
|
|
702
|
+
windHigh: z6.number(),
|
|
703
|
+
windLow: z6.number(),
|
|
704
|
+
windUnits: z6.number()
|
|
705
|
+
})),
|
|
706
|
+
weatherUrl: z6.optional(z6.string()),
|
|
707
|
+
windDir: z6.number(),
|
|
708
|
+
windUnits: z6.number(),
|
|
709
|
+
windValue: z6.number(),
|
|
710
|
+
fog: z6.optional(z6.number()),
|
|
711
|
+
type: z6.optional(z6.number())
|
|
712
|
+
}),
|
|
713
|
+
trackState: z6.object({
|
|
714
|
+
leaveMarbles: z6.boolean(),
|
|
715
|
+
practiceRubber: z6.number(),
|
|
716
|
+
qualifyRubber: z6.number(),
|
|
717
|
+
raceRubber: z6.number(),
|
|
718
|
+
warmupRubber: z6.number()
|
|
719
|
+
}),
|
|
720
|
+
farm: z6.object({
|
|
721
|
+
farmId: z6.number(),
|
|
722
|
+
displayName: z6.string(),
|
|
723
|
+
imagePath: z6.string(),
|
|
724
|
+
displayed: z6.boolean()
|
|
725
|
+
}),
|
|
726
|
+
admins: z6.array(z6.object({
|
|
727
|
+
custId: z6.number(),
|
|
728
|
+
displayName: z6.string(),
|
|
729
|
+
helmet: z6.object({
|
|
730
|
+
pattern: z6.number(),
|
|
731
|
+
color1: z6.string(),
|
|
732
|
+
color2: z6.string(),
|
|
733
|
+
color3: z6.string(),
|
|
734
|
+
faceType: z6.number(),
|
|
735
|
+
helmetType: z6.number()
|
|
736
|
+
})
|
|
737
|
+
})),
|
|
738
|
+
allowedTeams: z6.array(z6.unknown()),
|
|
739
|
+
allowedLeagues: z6.array(z6.unknown()),
|
|
740
|
+
cars: z6.array(z6.object({
|
|
741
|
+
carId: z6.number(),
|
|
742
|
+
carName: z6.string(),
|
|
743
|
+
carClassId: z6.number(),
|
|
744
|
+
carClassName: z6.string(),
|
|
745
|
+
maxPctFuelFill: z6.number(),
|
|
746
|
+
weightPenaltyKg: z6.number(),
|
|
747
|
+
powerAdjustPct: z6.number(),
|
|
748
|
+
maxDryTireSets: z6.number(),
|
|
749
|
+
packageId: z6.number()
|
|
750
|
+
})),
|
|
751
|
+
countByCarId: z6.object({
|
|
752
|
+
112: z6.optional(z6.number()),
|
|
753
|
+
117: z6.optional(z6.number()),
|
|
754
|
+
118: z6.optional(z6.number()),
|
|
755
|
+
119: z6.optional(z6.number()),
|
|
756
|
+
128: z6.optional(z6.number()),
|
|
757
|
+
132: z6.optional(z6.number()),
|
|
758
|
+
133: z6.optional(z6.number()),
|
|
759
|
+
143: z6.optional(z6.number()),
|
|
760
|
+
146: z6.optional(z6.number()),
|
|
761
|
+
147: z6.optional(z6.number()),
|
|
762
|
+
150: z6.optional(z6.number()),
|
|
763
|
+
156: z6.optional(z6.number()),
|
|
764
|
+
157: z6.optional(z6.number()),
|
|
765
|
+
169: z6.optional(z6.number()),
|
|
766
|
+
173: z6.optional(z6.number()),
|
|
767
|
+
176: z6.optional(z6.number()),
|
|
768
|
+
184: z6.optional(z6.number()),
|
|
769
|
+
185: z6.optional(z6.number()),
|
|
770
|
+
188: z6.optional(z6.number()),
|
|
771
|
+
189: z6.optional(z6.number()),
|
|
772
|
+
190: z6.optional(z6.number()),
|
|
773
|
+
192: z6.optional(z6.number()),
|
|
774
|
+
194: z6.optional(z6.number()),
|
|
775
|
+
195: z6.optional(z6.number())
|
|
776
|
+
}),
|
|
777
|
+
countByCarClassId: z6.object({
|
|
778
|
+
0: z6.optional(z6.number()),
|
|
779
|
+
2708: z6.optional(z6.number()),
|
|
780
|
+
3104: z6.optional(z6.number()),
|
|
781
|
+
4073: z6.optional(z6.number()),
|
|
782
|
+
4076: z6.optional(z6.number()),
|
|
783
|
+
4083: z6.optional(z6.number()),
|
|
784
|
+
4084: z6.optional(z6.number()),
|
|
785
|
+
4085: z6.optional(z6.number())
|
|
786
|
+
}),
|
|
787
|
+
carTypes: z6.array(z6.object({
|
|
788
|
+
carType: z6.string()
|
|
789
|
+
})),
|
|
790
|
+
trackTypes: z6.array(z6.object({
|
|
791
|
+
trackType: z6.string()
|
|
792
|
+
})),
|
|
793
|
+
licenseGroupTypes: z6.array(z6.object({
|
|
794
|
+
licenseGroupType: z6.number()
|
|
795
|
+
})),
|
|
796
|
+
eventTypes: z6.array(z6.object({
|
|
797
|
+
eventType: z6.number()
|
|
798
|
+
})),
|
|
799
|
+
sessionTypes: z6.array(z6.object({
|
|
800
|
+
sessionType: z6.number()
|
|
801
|
+
})),
|
|
802
|
+
canJoin: z6.boolean(),
|
|
803
|
+
sessAdmin: z6.boolean(),
|
|
804
|
+
friends: z6.array(z6.unknown()),
|
|
805
|
+
watched: z6.array(z6.unknown()),
|
|
806
|
+
endTime: z6.string(),
|
|
807
|
+
teamEntryCount: z6.number(),
|
|
808
|
+
isHeatRacing: z6.boolean(),
|
|
809
|
+
populated: z6.boolean(),
|
|
810
|
+
broadcaster: z6.boolean(),
|
|
811
|
+
minIr: z6.number(),
|
|
812
|
+
maxIr: z6.number(),
|
|
813
|
+
aiMinSkill: z6.optional(z6.number()),
|
|
814
|
+
aiMaxSkill: z6.optional(z6.number()),
|
|
815
|
+
aiRosterName: z6.optional(z6.string())
|
|
816
|
+
})),
|
|
817
|
+
success: z6.boolean(),
|
|
818
|
+
packageId: z6.optional(z6.number())
|
|
819
|
+
});
|
|
820
|
+
var HostedSessions = z6.object({
|
|
821
|
+
subscribed: z6.boolean(),
|
|
822
|
+
sessions: z6.array(z6.object({
|
|
823
|
+
adaptiveAiEnabled: z6.boolean(),
|
|
824
|
+
admins: z6.array(z6.object({
|
|
825
|
+
custId: z6.number(),
|
|
826
|
+
displayName: z6.string(),
|
|
827
|
+
helmet: z6.object({
|
|
828
|
+
pattern: z6.number(),
|
|
829
|
+
color1: z6.string(),
|
|
830
|
+
color2: z6.string(),
|
|
831
|
+
color3: z6.string(),
|
|
832
|
+
faceType: z6.number(),
|
|
833
|
+
helmetType: z6.number()
|
|
834
|
+
})
|
|
835
|
+
})),
|
|
836
|
+
aiAvoidPlayers: z6.boolean(),
|
|
837
|
+
aiMaxSkill: z6.optional(z6.number()),
|
|
838
|
+
aiMinSkill: z6.optional(z6.number()),
|
|
839
|
+
aiRosterName: z6.optional(z6.string()),
|
|
840
|
+
allowedLeagues: z6.array(z6.unknown()),
|
|
841
|
+
allowedTeams: z6.array(z6.unknown()),
|
|
842
|
+
carTypes: z6.array(z6.object({
|
|
843
|
+
carType: z6.string()
|
|
844
|
+
})),
|
|
845
|
+
cars: z6.array(z6.object({
|
|
846
|
+
carId: z6.number(),
|
|
847
|
+
carName: z6.string(),
|
|
848
|
+
carClassId: z6.number(),
|
|
849
|
+
carClassName: z6.string(),
|
|
850
|
+
maxPctFuelFill: z6.number(),
|
|
851
|
+
weightPenaltyKg: z6.number(),
|
|
852
|
+
powerAdjustPct: z6.number(),
|
|
853
|
+
maxDryTireSets: z6.number(),
|
|
854
|
+
packageId: z6.number()
|
|
855
|
+
})),
|
|
856
|
+
carsLeft: z6.number(),
|
|
857
|
+
category: z6.string(),
|
|
858
|
+
categoryId: z6.number(),
|
|
859
|
+
connectionBlackFlag: z6.boolean(),
|
|
860
|
+
consecCautionWithinNlaps: z6.number(),
|
|
861
|
+
consecCautionsSingleFile: z6.boolean(),
|
|
862
|
+
countByCarClassId: z6.object({
|
|
863
|
+
0: z6.optional(z6.number()),
|
|
864
|
+
2708: z6.optional(z6.number()),
|
|
865
|
+
3104: z6.optional(z6.number()),
|
|
866
|
+
4073: z6.optional(z6.number()),
|
|
867
|
+
4076: z6.optional(z6.number()),
|
|
868
|
+
4083: z6.optional(z6.number()),
|
|
869
|
+
4084: z6.optional(z6.number()),
|
|
870
|
+
4085: z6.optional(z6.number())
|
|
871
|
+
}),
|
|
872
|
+
countByCarId: z6.object({
|
|
873
|
+
112: z6.optional(z6.number()),
|
|
874
|
+
117: z6.optional(z6.number()),
|
|
875
|
+
118: z6.optional(z6.number()),
|
|
876
|
+
119: z6.optional(z6.number()),
|
|
877
|
+
128: z6.optional(z6.number()),
|
|
878
|
+
132: z6.optional(z6.number()),
|
|
879
|
+
133: z6.optional(z6.number()),
|
|
880
|
+
143: z6.optional(z6.number()),
|
|
881
|
+
146: z6.optional(z6.number()),
|
|
882
|
+
147: z6.optional(z6.number()),
|
|
883
|
+
150: z6.optional(z6.number()),
|
|
884
|
+
156: z6.optional(z6.number()),
|
|
885
|
+
157: z6.optional(z6.number()),
|
|
886
|
+
169: z6.optional(z6.number()),
|
|
887
|
+
173: z6.optional(z6.number()),
|
|
888
|
+
176: z6.optional(z6.number()),
|
|
889
|
+
184: z6.optional(z6.number()),
|
|
890
|
+
185: z6.optional(z6.number()),
|
|
891
|
+
188: z6.optional(z6.number()),
|
|
892
|
+
189: z6.optional(z6.number()),
|
|
893
|
+
190: z6.optional(z6.number()),
|
|
894
|
+
192: z6.optional(z6.number()),
|
|
895
|
+
194: z6.optional(z6.number()),
|
|
896
|
+
195: z6.optional(z6.number())
|
|
897
|
+
}),
|
|
898
|
+
damageModel: z6.number(),
|
|
899
|
+
disallowVirtualMirror: z6.boolean(),
|
|
900
|
+
doNotCountCautionLaps: z6.boolean(),
|
|
901
|
+
doNotPaintCars: z6.boolean(),
|
|
902
|
+
driverChangeRule: z6.number(),
|
|
903
|
+
driverChanges: z6.boolean(),
|
|
904
|
+
elig: z6.object({
|
|
905
|
+
sessionFull: z6.boolean(),
|
|
906
|
+
canSpot: z6.boolean(),
|
|
907
|
+
canWatch: z6.boolean(),
|
|
908
|
+
canDrive: z6.boolean(),
|
|
909
|
+
hasSessPassword: z6.boolean(),
|
|
910
|
+
needsPurchase: z6.boolean(),
|
|
911
|
+
ownCar: z6.boolean(),
|
|
912
|
+
ownTrack: z6.boolean(),
|
|
913
|
+
purchaseSkus: z6.array(z6.number()),
|
|
914
|
+
registered: z6.boolean()
|
|
915
|
+
}),
|
|
916
|
+
enablePitlaneCollisions: z6.boolean(),
|
|
917
|
+
entryCount: z6.number(),
|
|
918
|
+
eventTypes: z6.array(z6.object({
|
|
919
|
+
eventType: z6.number()
|
|
920
|
+
})),
|
|
921
|
+
farm: z6.object({
|
|
922
|
+
farmId: z6.number(),
|
|
923
|
+
displayName: z6.string(),
|
|
924
|
+
imagePath: z6.string(),
|
|
925
|
+
displayed: z6.boolean()
|
|
926
|
+
}),
|
|
927
|
+
fixedSetup: z6.boolean(),
|
|
928
|
+
fullCourseCautions: z6.boolean(),
|
|
929
|
+
greenWhiteCheckeredLimit: z6.number(),
|
|
930
|
+
hardcoreLevel: z6.number(),
|
|
931
|
+
host: z6.object({
|
|
932
|
+
custId: z6.number(),
|
|
933
|
+
displayName: z6.string(),
|
|
934
|
+
helmet: z6.object({
|
|
935
|
+
pattern: z6.number(),
|
|
936
|
+
color1: z6.string(),
|
|
937
|
+
color2: z6.string(),
|
|
938
|
+
color3: z6.string(),
|
|
939
|
+
faceType: z6.number(),
|
|
940
|
+
helmetType: z6.number()
|
|
941
|
+
})
|
|
942
|
+
}),
|
|
943
|
+
incidentLimit: z6.number(),
|
|
944
|
+
incidentWarnMode: z6.number(),
|
|
945
|
+
incidentWarnParam1: z6.number(),
|
|
946
|
+
incidentWarnParam2: z6.number(),
|
|
947
|
+
launchAt: z6.string(),
|
|
948
|
+
leagueId: z6.number(),
|
|
949
|
+
leagueSeasonId: z6.number(),
|
|
950
|
+
licenseGroupTypes: z6.array(z6.object({
|
|
951
|
+
licenseGroupType: z6.number()
|
|
952
|
+
})),
|
|
953
|
+
loneQualify: z6.boolean(),
|
|
954
|
+
luckyDog: z6.boolean(),
|
|
955
|
+
maxAiDrivers: z6.number(),
|
|
956
|
+
maxDrivers: z6.number(),
|
|
957
|
+
maxIr: z6.number(),
|
|
958
|
+
maxLicenseLevel: z6.number(),
|
|
959
|
+
maxTeamDrivers: z6.number(),
|
|
960
|
+
maxVisorTearoffs: z6.number(),
|
|
961
|
+
minIr: z6.number(),
|
|
962
|
+
minLicenseLevel: z6.number(),
|
|
963
|
+
minTeamDrivers: z6.number(),
|
|
964
|
+
multiclassType: z6.number(),
|
|
965
|
+
mustUseDiffTireTypesInRace: z6.boolean(),
|
|
966
|
+
noLapperWaveArounds: z6.boolean(),
|
|
967
|
+
numFastTows: z6.number(),
|
|
968
|
+
numOptLaps: z6.number(),
|
|
969
|
+
openRegExpires: z6.string(),
|
|
970
|
+
orderId: z6.number(),
|
|
971
|
+
paceCarClassId: z6.nullable(z6.number()),
|
|
972
|
+
paceCarId: z6.nullable(z6.number()),
|
|
973
|
+
passwordProtected: z6.boolean(),
|
|
974
|
+
pitsInUse: z6.number(),
|
|
975
|
+
practiceLength: z6.number(),
|
|
976
|
+
privateSessionId: z6.number(),
|
|
977
|
+
qualifierMustStartRace: z6.boolean(),
|
|
978
|
+
qualifyLaps: z6.number(),
|
|
979
|
+
qualifyLength: z6.number(),
|
|
980
|
+
raceLaps: z6.number(),
|
|
981
|
+
raceLength: z6.number(),
|
|
982
|
+
restarts: z6.number(),
|
|
983
|
+
restrictResults: z6.boolean(),
|
|
984
|
+
restrictViewing: z6.boolean(),
|
|
985
|
+
rollingStarts: z6.boolean(),
|
|
986
|
+
sessionFull: z6.boolean(),
|
|
987
|
+
sessionId: z6.number(),
|
|
988
|
+
sessionName: z6.string(),
|
|
989
|
+
sessionType: z6.number(),
|
|
990
|
+
sessionTypes: z6.array(z6.object({
|
|
991
|
+
sessionType: z6.number()
|
|
992
|
+
})),
|
|
993
|
+
shortParadeLap: z6.boolean(),
|
|
994
|
+
startOnQualTire: z6.boolean(),
|
|
995
|
+
startZone: z6.boolean(),
|
|
996
|
+
status: z6.number(),
|
|
997
|
+
subsessionId: z6.number(),
|
|
998
|
+
teamEntryCount: z6.number(),
|
|
999
|
+
telemetryForceToDisk: z6.number(),
|
|
1000
|
+
telemetryRestriction: z6.number(),
|
|
1001
|
+
timeLimit: z6.number(),
|
|
1002
|
+
track: z6.object({
|
|
1003
|
+
categoryId: z6.number(),
|
|
1004
|
+
configName: z6.optional(z6.string()),
|
|
1005
|
+
trackId: z6.number(),
|
|
1006
|
+
trackName: z6.string()
|
|
1007
|
+
}),
|
|
1008
|
+
trackState: z6.object({
|
|
1009
|
+
leaveMarbles: z6.boolean(),
|
|
1010
|
+
practiceRubber: z6.number(),
|
|
1011
|
+
qualifyRubber: z6.number(),
|
|
1012
|
+
raceRubber: z6.number(),
|
|
1013
|
+
warmupRubber: z6.number()
|
|
1014
|
+
}),
|
|
1015
|
+
trackTypes: z6.array(z6.object({
|
|
1016
|
+
trackType: z6.string()
|
|
1017
|
+
})),
|
|
1018
|
+
unsportConductRuleMode: z6.number(),
|
|
1019
|
+
warmupLength: z6.number(),
|
|
1020
|
+
weather: z6.object({
|
|
1021
|
+
allowFog: z6.boolean(),
|
|
1022
|
+
forecastOptions: z6.optional(z6.object({
|
|
1023
|
+
forecastType: z6.number(),
|
|
1024
|
+
precipitation: z6.number(),
|
|
1025
|
+
skies: z6.number(),
|
|
1026
|
+
stopPrecip: z6.number(),
|
|
1027
|
+
temperature: z6.number(),
|
|
1028
|
+
weatherSeed: z6.number(),
|
|
1029
|
+
windDir: z6.number(),
|
|
1030
|
+
windSpeed: z6.number()
|
|
1031
|
+
})),
|
|
1032
|
+
precipOption: z6.number(),
|
|
1033
|
+
relHumidity: z6.number(),
|
|
1034
|
+
simulatedStartTime: z6.string(),
|
|
1035
|
+
simulatedTimeMultiplier: z6.number(),
|
|
1036
|
+
simulatedTimeOffsets: z6.array(z6.number()),
|
|
1037
|
+
skies: z6.number(),
|
|
1038
|
+
tempUnits: z6.number(),
|
|
1039
|
+
tempValue: z6.number(),
|
|
1040
|
+
timeOfDay: z6.number(),
|
|
1041
|
+
trackWater: z6.number(),
|
|
1042
|
+
version: z6.number(),
|
|
1043
|
+
weatherSummary: z6.optional(z6.object({
|
|
1044
|
+
maxPrecipRate: z6.number(),
|
|
1045
|
+
maxPrecipRateDesc: z6.string(),
|
|
1046
|
+
precipChance: z6.number(),
|
|
1047
|
+
skiesHigh: z6.number(),
|
|
1048
|
+
skiesLow: z6.number(),
|
|
1049
|
+
tempHigh: z6.number(),
|
|
1050
|
+
tempLow: z6.number(),
|
|
1051
|
+
tempUnits: z6.number(),
|
|
1052
|
+
windDir: z6.number(),
|
|
1053
|
+
windHigh: z6.number(),
|
|
1054
|
+
windLow: z6.number(),
|
|
1055
|
+
windUnits: z6.number()
|
|
1056
|
+
})),
|
|
1057
|
+
weatherUrl: z6.optional(z6.string()),
|
|
1058
|
+
windDir: z6.number(),
|
|
1059
|
+
windUnits: z6.number(),
|
|
1060
|
+
windValue: z6.number(),
|
|
1061
|
+
fog: z6.optional(z6.number()),
|
|
1062
|
+
type: z6.optional(z6.number())
|
|
1063
|
+
}),
|
|
1064
|
+
adaptiveAiDifficulty: z6.optional(z6.number()),
|
|
1065
|
+
sessionDesc: z6.optional(z6.string())
|
|
1066
|
+
})),
|
|
1067
|
+
success: z6.boolean()
|
|
1068
|
+
});
|
|
1069
|
+
var HostedCombinedSessionsParamsSchema = z6.object({
|
|
1070
|
+
packageId: z6.optional(z6.number())
|
|
1071
|
+
// If set, return only sessions using this car or track package ID. // maps to: package_id
|
|
1072
|
+
});
|
|
1073
|
+
var HostedSessionsParamsSchema = z6.object({});
|
|
1074
|
+
|
|
1075
|
+
// src/hosted/service.ts
|
|
1076
|
+
var HostedService = class {
|
|
1077
|
+
constructor(client) {
|
|
1078
|
+
this.client = client;
|
|
1079
|
+
}
|
|
1080
|
+
/**
|
|
1081
|
+
* combined_sessions
|
|
1082
|
+
* @see https://members-ng.iracing.com/data/hosted/combined_sessions
|
|
1083
|
+
* @sample hosted.combined_sessions.json
|
|
1084
|
+
*/
|
|
1085
|
+
combinedSessions(params) {
|
|
1086
|
+
return __async(this, null, function* () {
|
|
1087
|
+
return this.client.get("https://members-ng.iracing.com/data/hosted/combined_sessions", { params, schema: HostedCombinedSessions });
|
|
1088
|
+
});
|
|
1089
|
+
}
|
|
1090
|
+
/**
|
|
1091
|
+
* sessions
|
|
1092
|
+
* @see https://members-ng.iracing.com/data/hosted/sessions
|
|
1093
|
+
* @sample hosted.sessions.json
|
|
1094
|
+
*/
|
|
1095
|
+
sessions() {
|
|
1096
|
+
return __async(this, null, function* () {
|
|
1097
|
+
return this.client.get("https://members-ng.iracing.com/data/hosted/sessions", { schema: HostedSessions });
|
|
1098
|
+
});
|
|
1099
|
+
}
|
|
1100
|
+
};
|
|
1101
|
+
var LeagueCustLeagueSessions = z6.object({
|
|
1102
|
+
mine: z6.boolean(),
|
|
1103
|
+
subscribed: z6.boolean(),
|
|
1104
|
+
sequence: z6.number(),
|
|
1105
|
+
sessions: z6.array(z6.object({
|
|
1106
|
+
numDrivers: z6.number(),
|
|
1107
|
+
numSpotters: z6.number(),
|
|
1108
|
+
numSpectators: z6.number(),
|
|
1109
|
+
numBroadcasters: z6.number(),
|
|
1110
|
+
availableReservedBroadcasterSlots: z6.number(),
|
|
1111
|
+
numSpectatorSlots: z6.number(),
|
|
1112
|
+
availableSpectatorSlots: z6.number(),
|
|
1113
|
+
canBroadcast: z6.boolean(),
|
|
1114
|
+
canWatch: z6.boolean(),
|
|
1115
|
+
canSpot: z6.boolean(),
|
|
1116
|
+
elig: z6.object({
|
|
1117
|
+
sessionFull: z6.boolean(),
|
|
1118
|
+
canSpot: z6.boolean(),
|
|
1119
|
+
canWatch: z6.boolean(),
|
|
1120
|
+
canDrive: z6.boolean(),
|
|
1121
|
+
hasSessPassword: z6.boolean(),
|
|
1122
|
+
needsPurchase: z6.boolean(),
|
|
1123
|
+
ownCar: z6.boolean(),
|
|
1124
|
+
ownTrack: z6.boolean(),
|
|
1125
|
+
purchaseSkus: z6.array(z6.number()),
|
|
1126
|
+
registered: z6.boolean()
|
|
1127
|
+
}),
|
|
1128
|
+
driverChanges: z6.boolean(),
|
|
1129
|
+
restrictViewing: z6.boolean(),
|
|
1130
|
+
maxUsers: z6.number(),
|
|
1131
|
+
privateSessionId: z6.number(),
|
|
1132
|
+
sessionId: z6.optional(z6.number()),
|
|
1133
|
+
subsessionId: z6.optional(z6.number()),
|
|
1134
|
+
passwordProtected: z6.boolean(),
|
|
1135
|
+
sessionName: z6.string(),
|
|
1136
|
+
openRegExpires: z6.optional(z6.string()),
|
|
1137
|
+
launchAt: z6.string(),
|
|
1138
|
+
fullCourseCautions: z6.boolean(),
|
|
1139
|
+
numFastTows: z6.number(),
|
|
1140
|
+
rollingStarts: z6.boolean(),
|
|
1141
|
+
restarts: z6.number(),
|
|
1142
|
+
multiclassType: z6.number(),
|
|
1143
|
+
pitsInUse: z6.optional(z6.number()),
|
|
1144
|
+
carsLeft: z6.optional(z6.number()),
|
|
1145
|
+
maxDrivers: z6.number(),
|
|
1146
|
+
hardcoreLevel: z6.number(),
|
|
1147
|
+
practiceLength: z6.number(),
|
|
1148
|
+
loneQualify: z6.boolean(),
|
|
1149
|
+
qualifyLaps: z6.number(),
|
|
1150
|
+
qualifyLength: z6.number(),
|
|
1151
|
+
warmupLength: z6.number(),
|
|
1152
|
+
raceLaps: z6.number(),
|
|
1153
|
+
raceLength: z6.number(),
|
|
1154
|
+
timeLimit: z6.number(),
|
|
1155
|
+
restrictResults: z6.boolean(),
|
|
1156
|
+
incidentLimit: z6.number(),
|
|
1157
|
+
incidentWarnMode: z6.number(),
|
|
1158
|
+
incidentWarnParam1: z6.number(),
|
|
1159
|
+
incidentWarnParam2: z6.number(),
|
|
1160
|
+
unsportConductRuleMode: z6.number(),
|
|
1161
|
+
connectionBlackFlag: z6.boolean(),
|
|
1162
|
+
luckyDog: z6.boolean(),
|
|
1163
|
+
minTeamDrivers: z6.number(),
|
|
1164
|
+
maxTeamDrivers: z6.number(),
|
|
1165
|
+
qualifierMustStartRace: z6.boolean(),
|
|
1166
|
+
driverChangeRule: z6.number(),
|
|
1167
|
+
fixedSetup: z6.boolean(),
|
|
1168
|
+
entryCount: z6.number(),
|
|
1169
|
+
leagueId: z6.number(),
|
|
1170
|
+
leagueName: z6.string(),
|
|
1171
|
+
leagueSeasonId: z6.number(),
|
|
1172
|
+
leagueSeasonName: z6.string(),
|
|
1173
|
+
sessionType: z6.number(),
|
|
1174
|
+
orderId: z6.number(),
|
|
1175
|
+
minLicenseLevel: z6.number(),
|
|
1176
|
+
maxLicenseLevel: z6.number(),
|
|
1177
|
+
status: z6.number(),
|
|
1178
|
+
paceCarId: z6.nullable(z6.number()),
|
|
1179
|
+
paceCarClassId: z6.nullable(z6.number()),
|
|
1180
|
+
numOptLaps: z6.number(),
|
|
1181
|
+
damageModel: z6.number(),
|
|
1182
|
+
doNotPaintCars: z6.boolean(),
|
|
1183
|
+
greenWhiteCheckeredLimit: z6.number(),
|
|
1184
|
+
doNotCountCautionLaps: z6.boolean(),
|
|
1185
|
+
consecCautionsSingleFile: z6.boolean(),
|
|
1186
|
+
consecCautionWithinNlaps: z6.number(),
|
|
1187
|
+
noLapperWaveArounds: z6.boolean(),
|
|
1188
|
+
shortParadeLap: z6.boolean(),
|
|
1189
|
+
startOnQualTire: z6.boolean(),
|
|
1190
|
+
telemetryRestriction: z6.number(),
|
|
1191
|
+
telemetryForceToDisk: z6.number(),
|
|
1192
|
+
maxAiDrivers: z6.number(),
|
|
1193
|
+
aiAvoidPlayers: z6.boolean(),
|
|
1194
|
+
adaptiveAiEnabled: z6.boolean(),
|
|
1195
|
+
adaptiveAiDifficulty: z6.number(),
|
|
1196
|
+
mustUseDiffTireTypesInRace: z6.boolean(),
|
|
1197
|
+
startZone: z6.boolean(),
|
|
1198
|
+
enablePitlaneCollisions: z6.boolean(),
|
|
1199
|
+
disallowVirtualMirror: z6.boolean(),
|
|
1200
|
+
maxVisorTearoffs: z6.number(),
|
|
1201
|
+
categoryId: z6.number(),
|
|
1202
|
+
category: z6.string(),
|
|
1203
|
+
sessionFull: z6.optional(z6.boolean()),
|
|
1204
|
+
host: z6.object({
|
|
1205
|
+
custId: z6.number(),
|
|
1206
|
+
displayName: z6.string(),
|
|
1207
|
+
helmet: z6.object({
|
|
1208
|
+
pattern: z6.number(),
|
|
1209
|
+
color1: z6.string(),
|
|
1210
|
+
color2: z6.string(),
|
|
1211
|
+
color3: z6.string(),
|
|
1212
|
+
faceType: z6.number(),
|
|
1213
|
+
helmetType: z6.number()
|
|
1214
|
+
})
|
|
1215
|
+
}),
|
|
1216
|
+
track: z6.object({
|
|
1217
|
+
categoryId: z6.number(),
|
|
1218
|
+
configName: z6.optional(z6.string()),
|
|
1219
|
+
trackId: z6.number(),
|
|
1220
|
+
trackName: z6.string()
|
|
1221
|
+
}),
|
|
1222
|
+
weather: z6.object({
|
|
1223
|
+
allowFog: z6.boolean(),
|
|
1224
|
+
forecastOptions: z6.optional(z6.object({
|
|
1225
|
+
forecastType: z6.number(),
|
|
1226
|
+
precipitation: z6.number(),
|
|
1227
|
+
skies: z6.number(),
|
|
1228
|
+
stopPrecip: z6.number(),
|
|
1229
|
+
temperature: z6.number(),
|
|
1230
|
+
weatherSeed: z6.number(),
|
|
1231
|
+
windDir: z6.number(),
|
|
1232
|
+
windSpeed: z6.number()
|
|
1233
|
+
})),
|
|
1234
|
+
precipOption: z6.number(),
|
|
1235
|
+
relHumidity: z6.number(),
|
|
1236
|
+
simulatedStartTime: z6.string(),
|
|
1237
|
+
simulatedTimeMultiplier: z6.number(),
|
|
1238
|
+
simulatedTimeOffsets: z6.array(z6.number()),
|
|
1239
|
+
skies: z6.number(),
|
|
1240
|
+
tempUnits: z6.number(),
|
|
1241
|
+
tempValue: z6.number(),
|
|
1242
|
+
timeOfDay: z6.number(),
|
|
1243
|
+
trackWater: z6.number(),
|
|
1244
|
+
version: z6.number(),
|
|
1245
|
+
weatherSummary: z6.optional(z6.object({
|
|
1246
|
+
maxPrecipRate: z6.number(),
|
|
1247
|
+
maxPrecipRateDesc: z6.string(),
|
|
1248
|
+
precipChance: z6.number(),
|
|
1249
|
+
skiesHigh: z6.number(),
|
|
1250
|
+
skiesLow: z6.number(),
|
|
1251
|
+
tempHigh: z6.number(),
|
|
1252
|
+
tempLow: z6.number(),
|
|
1253
|
+
tempUnits: z6.number(),
|
|
1254
|
+
windDir: z6.number(),
|
|
1255
|
+
windHigh: z6.number(),
|
|
1256
|
+
windLow: z6.number(),
|
|
1257
|
+
windUnits: z6.number()
|
|
1258
|
+
})),
|
|
1259
|
+
weatherUrl: z6.optional(z6.string()),
|
|
1260
|
+
windDir: z6.number(),
|
|
1261
|
+
windUnits: z6.number(),
|
|
1262
|
+
windValue: z6.number(),
|
|
1263
|
+
fog: z6.optional(z6.number()),
|
|
1264
|
+
type: z6.optional(z6.number())
|
|
1265
|
+
}),
|
|
1266
|
+
trackState: z6.object({
|
|
1267
|
+
leaveMarbles: z6.boolean(),
|
|
1268
|
+
practiceRubber: z6.number(),
|
|
1269
|
+
qualifyRubber: z6.number(),
|
|
1270
|
+
raceRubber: z6.number(),
|
|
1271
|
+
warmupRubber: z6.number()
|
|
1272
|
+
}),
|
|
1273
|
+
farm: z6.object({
|
|
1274
|
+
farmId: z6.number(),
|
|
1275
|
+
displayName: z6.string(),
|
|
1276
|
+
imagePath: z6.string(),
|
|
1277
|
+
displayed: z6.boolean()
|
|
1278
|
+
}),
|
|
1279
|
+
admins: z6.array(z6.object({
|
|
1280
|
+
custId: z6.number(),
|
|
1281
|
+
displayName: z6.string(),
|
|
1282
|
+
helmet: z6.object({
|
|
1283
|
+
pattern: z6.number(),
|
|
1284
|
+
color1: z6.string(),
|
|
1285
|
+
color2: z6.string(),
|
|
1286
|
+
color3: z6.string(),
|
|
1287
|
+
faceType: z6.number(),
|
|
1288
|
+
helmetType: z6.number()
|
|
1289
|
+
})
|
|
1290
|
+
})),
|
|
1291
|
+
allowedTeams: z6.array(z6.unknown()),
|
|
1292
|
+
allowedLeagues: z6.array(z6.number()),
|
|
1293
|
+
cars: z6.array(z6.object({
|
|
1294
|
+
carId: z6.number(),
|
|
1295
|
+
carName: z6.string(),
|
|
1296
|
+
carClassId: z6.number(),
|
|
1297
|
+
carClassName: z6.string(),
|
|
1298
|
+
maxPctFuelFill: z6.number(),
|
|
1299
|
+
weightPenaltyKg: z6.number(),
|
|
1300
|
+
powerAdjustPct: z6.number(),
|
|
1301
|
+
maxDryTireSets: z6.number(),
|
|
1302
|
+
qualSetupId: z6.optional(z6.number()),
|
|
1303
|
+
qualSetupFilename: z6.optional(z6.string()),
|
|
1304
|
+
raceSetupId: z6.optional(z6.number()),
|
|
1305
|
+
raceSetupFilename: z6.optional(z6.string()),
|
|
1306
|
+
packageId: z6.number()
|
|
1307
|
+
})),
|
|
1308
|
+
heatSesInfo: z6.optional(z6.object({
|
|
1309
|
+
consolationDeltaMaxFieldSize: z6.number(),
|
|
1310
|
+
consolationDeltaSessionLaps: z6.number(),
|
|
1311
|
+
consolationDeltaSessionLengthMinutes: z6.number(),
|
|
1312
|
+
consolationFirstMaxFieldSize: z6.number(),
|
|
1313
|
+
consolationFirstSessionLaps: z6.number(),
|
|
1314
|
+
consolationFirstSessionLengthMinutes: z6.number(),
|
|
1315
|
+
consolationNumPositionToInvert: z6.number(),
|
|
1316
|
+
consolationNumToConsolation: z6.number(),
|
|
1317
|
+
consolationNumToMain: z6.number(),
|
|
1318
|
+
consolationRunAlways: z6.boolean(),
|
|
1319
|
+
consolationScoresChampPoints: z6.boolean(),
|
|
1320
|
+
created: z6.string(),
|
|
1321
|
+
custId: z6.number(),
|
|
1322
|
+
description: z6.optional(z6.string()),
|
|
1323
|
+
heatCautionType: z6.number(),
|
|
1324
|
+
heatInfoId: z6.number(),
|
|
1325
|
+
heatInfoName: z6.string(),
|
|
1326
|
+
heatLaps: z6.number(),
|
|
1327
|
+
heatLengthMinutes: z6.number(),
|
|
1328
|
+
heatMaxFieldSize: z6.number(),
|
|
1329
|
+
heatNumFromEachToMain: z6.number(),
|
|
1330
|
+
heatNumPositionToInvert: z6.number(),
|
|
1331
|
+
heatScoresChampPoints: z6.boolean(),
|
|
1332
|
+
heatSessionMinutesEstimate: z6.number(),
|
|
1333
|
+
hidden: z6.boolean(),
|
|
1334
|
+
mainLaps: z6.number(),
|
|
1335
|
+
mainLengthMinutes: z6.number(),
|
|
1336
|
+
mainMaxFieldSize: z6.number(),
|
|
1337
|
+
mainNumPositionToInvert: z6.number(),
|
|
1338
|
+
maxEntrants: z6.number(),
|
|
1339
|
+
openPractice: z6.boolean(),
|
|
1340
|
+
preMainPracticeLengthMinutes: z6.number(),
|
|
1341
|
+
preQualNumToMain: z6.number(),
|
|
1342
|
+
preQualPracticeLengthMinutes: z6.number(),
|
|
1343
|
+
qualCautionType: z6.number(),
|
|
1344
|
+
qualLaps: z6.number(),
|
|
1345
|
+
qualLengthMinutes: z6.number(),
|
|
1346
|
+
qualNumToMain: z6.number(),
|
|
1347
|
+
qualOpenDelaySeconds: z6.number(),
|
|
1348
|
+
qualScoresChampPoints: z6.boolean(),
|
|
1349
|
+
qualScoring: z6.number(),
|
|
1350
|
+
qualStyle: z6.number(),
|
|
1351
|
+
raceStyle: z6.number()
|
|
1352
|
+
})),
|
|
1353
|
+
countByCarId: z6.optional(z6.object({
|
|
1354
|
+
67: z6.optional(z6.number()),
|
|
1355
|
+
106: z6.optional(z6.number()),
|
|
1356
|
+
190: z6.optional(z6.number()),
|
|
1357
|
+
192: z6.optional(z6.number()),
|
|
1358
|
+
203: z6.optional(z6.number())
|
|
1359
|
+
})),
|
|
1360
|
+
countByCarClassId: z6.optional(z6.object({
|
|
1361
|
+
0: z6.number()
|
|
1362
|
+
})),
|
|
1363
|
+
carTypes: z6.array(z6.object({
|
|
1364
|
+
carType: z6.string()
|
|
1365
|
+
})),
|
|
1366
|
+
trackTypes: z6.array(z6.object({
|
|
1367
|
+
trackType: z6.string()
|
|
1368
|
+
})),
|
|
1369
|
+
licenseGroupTypes: z6.array(z6.object({
|
|
1370
|
+
licenseGroupType: z6.number()
|
|
1371
|
+
})),
|
|
1372
|
+
eventTypes: z6.array(z6.object({
|
|
1373
|
+
eventType: z6.number()
|
|
1374
|
+
})),
|
|
1375
|
+
sessionTypes: z6.array(z6.object({
|
|
1376
|
+
sessionType: z6.number()
|
|
1377
|
+
})),
|
|
1378
|
+
canJoin: z6.boolean(),
|
|
1379
|
+
image: z6.optional(z6.object({
|
|
1380
|
+
smallLogo: z6.string(),
|
|
1381
|
+
largeLogo: z6.nullable(z6.string())
|
|
1382
|
+
})),
|
|
1383
|
+
owner: z6.boolean(),
|
|
1384
|
+
admin: z6.boolean(),
|
|
1385
|
+
friends: z6.optional(z6.array(z6.unknown())),
|
|
1386
|
+
watched: z6.optional(z6.array(z6.unknown())),
|
|
1387
|
+
endTime: z6.string(),
|
|
1388
|
+
populated: z6.boolean(),
|
|
1389
|
+
teamEntryCount: z6.number(),
|
|
1390
|
+
isHeatRacing: z6.boolean(),
|
|
1391
|
+
broadcaster: z6.boolean(),
|
|
1392
|
+
minIr: z6.number(),
|
|
1393
|
+
maxIr: z6.number(),
|
|
1394
|
+
sessionDesc: z6.optional(z6.string()),
|
|
1395
|
+
raceLengthType: z6.optional(z6.number())
|
|
1396
|
+
})),
|
|
1397
|
+
success: z6.boolean(),
|
|
1398
|
+
packageId: z6.optional(z6.number())
|
|
1399
|
+
});
|
|
1400
|
+
var LeagueDirectory = z6.object({
|
|
1401
|
+
resultsPage: z6.array(z6.object({
|
|
1402
|
+
leagueId: z6.number(),
|
|
1403
|
+
ownerId: z6.number(),
|
|
1404
|
+
leagueName: z6.string(),
|
|
1405
|
+
created: z6.string(),
|
|
1406
|
+
about: z6.optional(z6.string()),
|
|
1407
|
+
url: z6.optional(z6.string()),
|
|
1408
|
+
rosterCount: z6.number(),
|
|
1409
|
+
recruiting: z6.boolean(),
|
|
1410
|
+
isAdmin: z6.boolean(),
|
|
1411
|
+
isMember: z6.boolean(),
|
|
1412
|
+
pendingApplication: z6.boolean(),
|
|
1413
|
+
pendingInvitation: z6.boolean(),
|
|
1414
|
+
owner: z6.object({
|
|
1415
|
+
custId: z6.number(),
|
|
1416
|
+
displayName: z6.string(),
|
|
1417
|
+
helmet: z6.object({
|
|
1418
|
+
pattern: z6.number(),
|
|
1419
|
+
color1: z6.string(),
|
|
1420
|
+
color2: z6.string(),
|
|
1421
|
+
color3: z6.string(),
|
|
1422
|
+
faceType: z6.number(),
|
|
1423
|
+
helmetType: z6.number()
|
|
1424
|
+
}),
|
|
1425
|
+
carNumber: z6.nullable(z6.string()),
|
|
1426
|
+
nickName: z6.nullable(z6.string())
|
|
1427
|
+
})
|
|
1428
|
+
})),
|
|
1429
|
+
success: z6.boolean(),
|
|
1430
|
+
lowerbound: z6.number(),
|
|
1431
|
+
upperbound: z6.number(),
|
|
1432
|
+
rowCount: z6.number()
|
|
1433
|
+
});
|
|
1434
|
+
var LeagueGet = z6.object({
|
|
1435
|
+
leagueId: z6.number(),
|
|
1436
|
+
ownerId: z6.number(),
|
|
1437
|
+
leagueName: z6.string(),
|
|
1438
|
+
created: z6.string(),
|
|
1439
|
+
hidden: z6.boolean(),
|
|
1440
|
+
message: z6.string(),
|
|
1441
|
+
about: z6.string(),
|
|
1442
|
+
recruiting: z6.boolean(),
|
|
1443
|
+
privateWall: z6.boolean(),
|
|
1444
|
+
privateRoster: z6.boolean(),
|
|
1445
|
+
privateSchedule: z6.boolean(),
|
|
1446
|
+
privateResults: z6.boolean(),
|
|
1447
|
+
isOwner: z6.boolean(),
|
|
1448
|
+
isAdmin: z6.boolean(),
|
|
1449
|
+
rosterCount: z6.number(),
|
|
1450
|
+
owner: z6.object({
|
|
1451
|
+
custId: z6.number(),
|
|
1452
|
+
displayName: z6.string(),
|
|
1453
|
+
helmet: z6.object({
|
|
1454
|
+
pattern: z6.number(),
|
|
1455
|
+
color1: z6.string(),
|
|
1456
|
+
color2: z6.string(),
|
|
1457
|
+
color3: z6.string(),
|
|
1458
|
+
faceType: z6.number(),
|
|
1459
|
+
helmetType: z6.number()
|
|
1460
|
+
}),
|
|
1461
|
+
carNumber: z6.nullable(z6.unknown()),
|
|
1462
|
+
nickName: z6.nullable(z6.unknown())
|
|
1463
|
+
}),
|
|
1464
|
+
image: z6.object({
|
|
1465
|
+
smallLogo: z6.nullable(z6.unknown()),
|
|
1466
|
+
largeLogo: z6.nullable(z6.unknown())
|
|
1467
|
+
}),
|
|
1468
|
+
tags: z6.object({
|
|
1469
|
+
categorized: z6.array(z6.object({
|
|
1470
|
+
categoryId: z6.number(),
|
|
1471
|
+
name: z6.string(),
|
|
1472
|
+
limit: z6.nullable(z6.number()),
|
|
1473
|
+
tags: z6.array(z6.object({
|
|
1474
|
+
tagId: z6.number(),
|
|
1475
|
+
tagName: z6.string()
|
|
1476
|
+
}))
|
|
1477
|
+
})),
|
|
1478
|
+
notCategorized: z6.array(z6.unknown())
|
|
1479
|
+
}),
|
|
1480
|
+
leagueApplications: z6.array(z6.unknown()),
|
|
1481
|
+
pendingRequests: z6.array(z6.unknown()),
|
|
1482
|
+
isMember: z6.boolean(),
|
|
1483
|
+
isApplicant: z6.boolean(),
|
|
1484
|
+
isInvite: z6.boolean(),
|
|
1485
|
+
isIgnored: z6.boolean(),
|
|
1486
|
+
roster: z6.array(z6.object({
|
|
1487
|
+
custId: z6.number(),
|
|
1488
|
+
displayName: z6.string(),
|
|
1489
|
+
helmet: z6.object({
|
|
1490
|
+
pattern: z6.number(),
|
|
1491
|
+
color1: z6.string(),
|
|
1492
|
+
color2: z6.string(),
|
|
1493
|
+
color3: z6.string(),
|
|
1494
|
+
faceType: z6.number(),
|
|
1495
|
+
helmetType: z6.number()
|
|
1496
|
+
}),
|
|
1497
|
+
owner: z6.boolean(),
|
|
1498
|
+
admin: z6.boolean(),
|
|
1499
|
+
leagueMailOptOut: z6.boolean(),
|
|
1500
|
+
leaguePmOptOut: z6.boolean(),
|
|
1501
|
+
leagueMemberSince: z6.string(),
|
|
1502
|
+
carNumber: z6.nullable(z6.string()),
|
|
1503
|
+
nickName: z6.string()
|
|
1504
|
+
}))
|
|
1505
|
+
});
|
|
1506
|
+
var LeagueGetPointsSystems = z6.object({
|
|
1507
|
+
subscribed: z6.boolean(),
|
|
1508
|
+
success: z6.boolean(),
|
|
1509
|
+
pointsSystems: z6.array(z6.object({
|
|
1510
|
+
pointsSystemId: z6.number(),
|
|
1511
|
+
name: z6.string(),
|
|
1512
|
+
description: z6.string(),
|
|
1513
|
+
leagueId: z6.number(),
|
|
1514
|
+
retired: z6.boolean(),
|
|
1515
|
+
iracingSystem: z6.boolean()
|
|
1516
|
+
})),
|
|
1517
|
+
leagueId: z6.number(),
|
|
1518
|
+
seasonId: z6.optional(z6.number())
|
|
1519
|
+
});
|
|
1520
|
+
var LeagueMembership = z6.array(z6.object({
|
|
1521
|
+
leagueId: z6.number(),
|
|
1522
|
+
leagueName: z6.string(),
|
|
1523
|
+
owner: z6.boolean(),
|
|
1524
|
+
admin: z6.boolean(),
|
|
1525
|
+
leagueMailOptOut: z6.boolean(),
|
|
1526
|
+
leaguePmOptOut: z6.boolean(),
|
|
1527
|
+
carNumber: z6.nullable(z6.string()),
|
|
1528
|
+
nickName: z6.nullable(z6.string())
|
|
1529
|
+
}));
|
|
1530
|
+
var LeagueRoster = z6.object({
|
|
1531
|
+
type: z6.string(),
|
|
1532
|
+
data: z6.object({
|
|
1533
|
+
subscribed: z6.boolean(),
|
|
1534
|
+
success: z6.boolean(),
|
|
1535
|
+
rosterCount: z6.number(),
|
|
1536
|
+
leagueId: z6.number()
|
|
1537
|
+
}),
|
|
1538
|
+
dataUrl: z6.string()
|
|
1539
|
+
});
|
|
1540
|
+
var LeagueSeasons = z6.object({
|
|
1541
|
+
subscribed: z6.boolean(),
|
|
1542
|
+
seasons: z6.array(z6.object({
|
|
1543
|
+
leagueId: z6.number(),
|
|
1544
|
+
seasonId: z6.number(),
|
|
1545
|
+
pointsSystemId: z6.number(),
|
|
1546
|
+
seasonName: z6.string(),
|
|
1547
|
+
active: z6.boolean(),
|
|
1548
|
+
hidden: z6.boolean(),
|
|
1549
|
+
numDrops: z6.number(),
|
|
1550
|
+
noDropsOnOrAfterRaceNum: z6.number(),
|
|
1551
|
+
pointsCars: z6.array(z6.object({
|
|
1552
|
+
carId: z6.number(),
|
|
1553
|
+
carName: z6.string()
|
|
1554
|
+
})),
|
|
1555
|
+
driverPointsCarClasses: z6.array(z6.object({
|
|
1556
|
+
carClassId: z6.number(),
|
|
1557
|
+
name: z6.string(),
|
|
1558
|
+
carsInClass: z6.array(z6.object({
|
|
1559
|
+
carId: z6.number(),
|
|
1560
|
+
carName: z6.string()
|
|
1561
|
+
}))
|
|
1562
|
+
})),
|
|
1563
|
+
teamPointsCarClasses: z6.array(z6.object({
|
|
1564
|
+
carClassId: z6.number(),
|
|
1565
|
+
name: z6.string(),
|
|
1566
|
+
carsInClass: z6.array(z6.object({
|
|
1567
|
+
carId: z6.number(),
|
|
1568
|
+
carName: z6.string()
|
|
1569
|
+
}))
|
|
1570
|
+
})),
|
|
1571
|
+
pointsSystemName: z6.string(),
|
|
1572
|
+
pointsSystemDesc: z6.string()
|
|
1573
|
+
})),
|
|
1574
|
+
success: z6.boolean(),
|
|
1575
|
+
retired: z6.boolean(),
|
|
1576
|
+
leagueId: z6.number()
|
|
1577
|
+
});
|
|
1578
|
+
var LeagueSeasonStandings = z6.object({
|
|
1579
|
+
carClassId: z6.number(),
|
|
1580
|
+
success: z6.boolean(),
|
|
1581
|
+
seasonId: z6.number(),
|
|
1582
|
+
carId: z6.number(),
|
|
1583
|
+
standings: z6.object({
|
|
1584
|
+
driverStandings: z6.array(z6.unknown()),
|
|
1585
|
+
teamStandings: z6.array(z6.unknown()),
|
|
1586
|
+
driverStandingsCsvUrl: z6.string(),
|
|
1587
|
+
teamStandingsCsvUrl: z6.string()
|
|
1588
|
+
}),
|
|
1589
|
+
leagueId: z6.number()
|
|
1590
|
+
});
|
|
1591
|
+
var LeagueSeasonSessions = z6.object({
|
|
1592
|
+
success: z6.boolean(),
|
|
1593
|
+
subscribed: z6.boolean(),
|
|
1594
|
+
leagueId: z6.number(),
|
|
1595
|
+
seasonId: z6.number(),
|
|
1596
|
+
sessions: z6.array(z6.unknown())
|
|
1597
|
+
});
|
|
1598
|
+
var LeagueCustLeagueSessionsParamsSchema = z6.object({
|
|
1599
|
+
mine: z6.optional(z6.boolean()),
|
|
1600
|
+
// If true, return only sessions created by this user.
|
|
1601
|
+
packageId: z6.optional(z6.number())
|
|
1602
|
+
// If set, return only sessions using this car or track package ID. // maps to: package_id
|
|
1603
|
+
});
|
|
1604
|
+
var LeagueDirectoryParamsSchema = z6.object({
|
|
1605
|
+
search: z6.optional(z6.string()),
|
|
1606
|
+
// Will search against league name, description, owner, and league ID.
|
|
1607
|
+
tag: z6.optional(z6.string()),
|
|
1608
|
+
// One or more tags, comma-separated.
|
|
1609
|
+
restrictToMember: z6.optional(z6.boolean()),
|
|
1610
|
+
// If true include only leagues for which customer is a member. // maps to: restrict_to_member
|
|
1611
|
+
restrictToRecruiting: z6.optional(z6.boolean()),
|
|
1612
|
+
// If true include only leagues which are recruiting. // maps to: restrict_to_recruiting
|
|
1613
|
+
restrictToFriends: z6.optional(z6.boolean()),
|
|
1614
|
+
// If true include only leagues owned by a friend. // maps to: restrict_to_friends
|
|
1615
|
+
restrictToWatched: z6.optional(z6.boolean()),
|
|
1616
|
+
// If true include only leagues owned by a watched member. // maps to: restrict_to_watched
|
|
1617
|
+
minimumRosterCount: z6.optional(z6.number()),
|
|
1618
|
+
// If set include leagues with at least this number of members. // maps to: minimum_roster_count
|
|
1619
|
+
maximumRosterCount: z6.optional(z6.number()),
|
|
1620
|
+
// If set include leagues with no more than this number of members. // maps to: maximum_roster_count
|
|
1621
|
+
lowerbound: z6.optional(z6.number()),
|
|
1622
|
+
// First row of results to return. Defaults to 1.
|
|
1623
|
+
upperbound: z6.optional(z6.number()),
|
|
1624
|
+
// Last row of results to return. Defaults to lowerbound + 39.
|
|
1625
|
+
sort: z6.optional(z6.string()),
|
|
1626
|
+
// One of relevance, leaguename, displayname, rostercount. displayname is owners's name. Defaults to relevance.
|
|
1627
|
+
order: z6.optional(z6.string())
|
|
1628
|
+
// One of asc or desc. Defaults to asc.
|
|
1629
|
+
});
|
|
1630
|
+
var LeagueGetParamsSchema = z6.object({
|
|
1631
|
+
leagueId: z6.number(),
|
|
1632
|
+
// maps to: league_id
|
|
1633
|
+
includeLicenses: z6.optional(z6.boolean())
|
|
1634
|
+
// For faster responses, only request when necessary. // maps to: include_licenses
|
|
1635
|
+
});
|
|
1636
|
+
var LeagueGetPointsSystemsParamsSchema = z6.object({
|
|
1637
|
+
leagueId: z6.number(),
|
|
1638
|
+
// maps to: league_id
|
|
1639
|
+
seasonId: z6.optional(z6.number())
|
|
1640
|
+
// If included and the season is using custom points (points_system_id:2) then the custom points option is included in the returned list. Otherwise the custom points option is not returned. // maps to: season_id
|
|
1641
|
+
});
|
|
1642
|
+
var LeagueMembershipParamsSchema = z6.object({
|
|
1643
|
+
custId: z6.optional(z6.number()),
|
|
1644
|
+
// If different from the authenticated member, the following restrictions apply: - Caller cannot be on requested customer's block list or an empty list will result; - Requested customer cannot have their online activity preference set to hidden or an empty list will result; - Only leagues for which the requested customer is an admin and the league roster is not private are returned. // maps to: cust_id
|
|
1645
|
+
includeLeague: z6.optional(z6.boolean())
|
|
1646
|
+
// maps to: include_league
|
|
1647
|
+
});
|
|
1648
|
+
var LeagueRosterParamsSchema = z6.object({
|
|
1649
|
+
leagueId: z6.number(),
|
|
1650
|
+
// maps to: league_id
|
|
1651
|
+
includeLicenses: z6.optional(z6.boolean())
|
|
1652
|
+
// For faster responses, only request when necessary. // maps to: include_licenses
|
|
1653
|
+
});
|
|
1654
|
+
var LeagueSeasonsParamsSchema = z6.object({
|
|
1655
|
+
leagueId: z6.number(),
|
|
1656
|
+
// maps to: league_id
|
|
1657
|
+
retired: z6.optional(z6.boolean())
|
|
1658
|
+
// If true include seasons which are no longer active.
|
|
1659
|
+
});
|
|
1660
|
+
var LeagueSeasonStandingsParamsSchema = z6.object({
|
|
1661
|
+
leagueId: z6.number(),
|
|
1662
|
+
// maps to: league_id
|
|
1663
|
+
seasonId: z6.number(),
|
|
1664
|
+
// maps to: season_id
|
|
1665
|
+
carClassId: z6.optional(z6.number()),
|
|
1666
|
+
// maps to: car_class_id
|
|
1667
|
+
carId: z6.optional(z6.number())
|
|
1668
|
+
// If car_class_id is included then the standings are for the car in that car class, otherwise they are for the car across car classes. // maps to: car_id
|
|
1669
|
+
});
|
|
1670
|
+
var LeagueSeasonSessionsParamsSchema = z6.object({
|
|
1671
|
+
leagueId: z6.number(),
|
|
1672
|
+
// maps to: league_id
|
|
1673
|
+
seasonId: z6.number(),
|
|
1674
|
+
// maps to: season_id
|
|
1675
|
+
resultsOnly: z6.optional(z6.boolean())
|
|
1676
|
+
// If true include only sessions for which results are available. // maps to: results_only
|
|
1677
|
+
});
|
|
1678
|
+
|
|
1679
|
+
// src/league/service.ts
|
|
1680
|
+
var LeagueService = class {
|
|
1681
|
+
constructor(client) {
|
|
1682
|
+
this.client = client;
|
|
1683
|
+
}
|
|
1684
|
+
/**
|
|
1685
|
+
* cust_league_sessions
|
|
1686
|
+
* @see https://members-ng.iracing.com/data/league/cust_league_sessions
|
|
1687
|
+
* @sample league.cust_league_sessions.json
|
|
1688
|
+
*/
|
|
1689
|
+
custLeagueSessions(params) {
|
|
1690
|
+
return __async(this, null, function* () {
|
|
1691
|
+
return this.client.get("https://members-ng.iracing.com/data/league/cust_league_sessions", { params, schema: LeagueCustLeagueSessions });
|
|
1692
|
+
});
|
|
1693
|
+
}
|
|
1694
|
+
/**
|
|
1695
|
+
* directory
|
|
1696
|
+
* @see https://members-ng.iracing.com/data/league/directory
|
|
1697
|
+
* @sample league.directory.json
|
|
1698
|
+
*/
|
|
1699
|
+
directory(params) {
|
|
1700
|
+
return __async(this, null, function* () {
|
|
1701
|
+
return this.client.get("https://members-ng.iracing.com/data/league/directory", { params, schema: LeagueDirectory });
|
|
1702
|
+
});
|
|
1703
|
+
}
|
|
1704
|
+
/**
|
|
1705
|
+
* get
|
|
1706
|
+
* @see https://members-ng.iracing.com/data/league/get
|
|
1707
|
+
* @sample league.get.json
|
|
1708
|
+
*/
|
|
1709
|
+
get(params) {
|
|
1710
|
+
return __async(this, null, function* () {
|
|
1711
|
+
return this.client.get("https://members-ng.iracing.com/data/league/get", { params, schema: LeagueGet });
|
|
1712
|
+
});
|
|
1713
|
+
}
|
|
1714
|
+
/**
|
|
1715
|
+
* get_points_systems
|
|
1716
|
+
* @see https://members-ng.iracing.com/data/league/get_points_systems
|
|
1717
|
+
* @sample league.get_points_systems.json
|
|
1718
|
+
*/
|
|
1719
|
+
getPointsSystems(params) {
|
|
1720
|
+
return __async(this, null, function* () {
|
|
1721
|
+
return this.client.get("https://members-ng.iracing.com/data/league/get_points_systems", { params, schema: LeagueGetPointsSystems });
|
|
1722
|
+
});
|
|
1723
|
+
}
|
|
1724
|
+
/**
|
|
1725
|
+
* membership
|
|
1726
|
+
* @see https://members-ng.iracing.com/data/league/membership
|
|
1727
|
+
* @sample league.membership.json
|
|
1728
|
+
*/
|
|
1729
|
+
membership(params) {
|
|
1730
|
+
return __async(this, null, function* () {
|
|
1731
|
+
return this.client.get("https://members-ng.iracing.com/data/league/membership", { params, schema: LeagueMembership });
|
|
1732
|
+
});
|
|
1733
|
+
}
|
|
1734
|
+
/**
|
|
1735
|
+
* roster
|
|
1736
|
+
* @see https://members-ng.iracing.com/data/league/roster
|
|
1737
|
+
* @sample league.roster.json
|
|
1738
|
+
*/
|
|
1739
|
+
roster(params) {
|
|
1740
|
+
return __async(this, null, function* () {
|
|
1741
|
+
return this.client.get("https://members-ng.iracing.com/data/league/roster", { params, schema: LeagueRoster });
|
|
1742
|
+
});
|
|
1743
|
+
}
|
|
1744
|
+
/**
|
|
1745
|
+
* seasons
|
|
1746
|
+
* @see https://members-ng.iracing.com/data/league/seasons
|
|
1747
|
+
* @sample league.seasons.json
|
|
1748
|
+
*/
|
|
1749
|
+
seasons(params) {
|
|
1750
|
+
return __async(this, null, function* () {
|
|
1751
|
+
return this.client.get("https://members-ng.iracing.com/data/league/seasons", { params, schema: LeagueSeasons });
|
|
1752
|
+
});
|
|
1753
|
+
}
|
|
1754
|
+
/**
|
|
1755
|
+
* season_standings
|
|
1756
|
+
* @see https://members-ng.iracing.com/data/league/season_standings
|
|
1757
|
+
* @sample league.season_standings.json
|
|
1758
|
+
*/
|
|
1759
|
+
seasonStandings(params) {
|
|
1760
|
+
return __async(this, null, function* () {
|
|
1761
|
+
return this.client.get("https://members-ng.iracing.com/data/league/season_standings", { params, schema: LeagueSeasonStandings });
|
|
1762
|
+
});
|
|
1763
|
+
}
|
|
1764
|
+
/**
|
|
1765
|
+
* season_sessions
|
|
1766
|
+
* @see https://members-ng.iracing.com/data/league/season_sessions
|
|
1767
|
+
* @sample league.season_sessions.json
|
|
1768
|
+
*/
|
|
1769
|
+
seasonSessions(params) {
|
|
1770
|
+
return __async(this, null, function* () {
|
|
1771
|
+
return this.client.get("https://members-ng.iracing.com/data/league/season_sessions", { params, schema: LeagueSeasonSessions });
|
|
1772
|
+
});
|
|
1773
|
+
}
|
|
1774
|
+
};
|
|
1775
|
+
var LookupCountries = z6.array(z6.object({
|
|
1776
|
+
countryName: z6.string(),
|
|
1777
|
+
countryCode: z6.string()
|
|
1778
|
+
}));
|
|
1779
|
+
var LookupDrivers = z6.array(z6.object({
|
|
1780
|
+
custId: z6.number(),
|
|
1781
|
+
displayName: z6.string(),
|
|
1782
|
+
helmet: z6.object({
|
|
1783
|
+
pattern: z6.number(),
|
|
1784
|
+
color1: z6.string(),
|
|
1785
|
+
color2: z6.string(),
|
|
1786
|
+
color3: z6.string(),
|
|
1787
|
+
faceType: z6.number(),
|
|
1788
|
+
helmetType: z6.number()
|
|
1789
|
+
}),
|
|
1790
|
+
profileDisabled: z6.boolean()
|
|
1791
|
+
}));
|
|
1792
|
+
var LookupFlairs = z6.object({
|
|
1793
|
+
flairs: z6.array(z6.object({
|
|
1794
|
+
flairId: z6.number(),
|
|
1795
|
+
flairName: z6.string(),
|
|
1796
|
+
seq: z6.number(),
|
|
1797
|
+
flairShortname: z6.optional(z6.string()),
|
|
1798
|
+
countryCode: z6.optional(z6.string())
|
|
1799
|
+
})),
|
|
1800
|
+
success: z6.boolean()
|
|
1801
|
+
});
|
|
1802
|
+
var LookupGet = z6.array(z6.unknown());
|
|
1803
|
+
var LookupLicenses = z6.array(z6.object({
|
|
1804
|
+
licenseGroup: z6.number(),
|
|
1805
|
+
groupName: z6.string(),
|
|
1806
|
+
minNumRaces: z6.nullable(z6.number()),
|
|
1807
|
+
participationCredits: z6.number(),
|
|
1808
|
+
minSrToFastTrack: z6.nullable(z6.number()),
|
|
1809
|
+
levels: z6.array(z6.object({
|
|
1810
|
+
licenseId: z6.number(),
|
|
1811
|
+
licenseGroup: z6.number(),
|
|
1812
|
+
license: z6.string(),
|
|
1813
|
+
shortName: z6.string(),
|
|
1814
|
+
licenseLetter: z6.string(),
|
|
1815
|
+
color: z6.string()
|
|
1816
|
+
})),
|
|
1817
|
+
minNumTt: z6.nullable(z6.number())
|
|
1818
|
+
}));
|
|
1819
|
+
var LookupCountriesParamsSchema = z6.object({});
|
|
1820
|
+
var LookupDriversParamsSchema = z6.object({
|
|
1821
|
+
searchTerm: z6.string(),
|
|
1822
|
+
// A cust_id or partial name for which to search. // maps to: search_term
|
|
1823
|
+
leagueId: z6.optional(z6.number())
|
|
1824
|
+
// Narrow the search to the roster of the given league. // maps to: league_id
|
|
1825
|
+
});
|
|
1826
|
+
var LookupFlairsParamsSchema = z6.object({});
|
|
1827
|
+
var LookupGetParamsSchema = z6.object({});
|
|
1828
|
+
var LookupLicensesParamsSchema = z6.object({});
|
|
1829
|
+
|
|
1830
|
+
// src/lookup/service.ts
|
|
1831
|
+
var LookupService = class {
|
|
1832
|
+
constructor(client) {
|
|
1833
|
+
this.client = client;
|
|
1834
|
+
}
|
|
1835
|
+
/**
|
|
1836
|
+
* countries
|
|
1837
|
+
* @see https://members-ng.iracing.com/data/lookup/countries
|
|
1838
|
+
* @sample lookup.countries.json
|
|
1839
|
+
*/
|
|
1840
|
+
countries() {
|
|
1841
|
+
return __async(this, null, function* () {
|
|
1842
|
+
return this.client.get("https://members-ng.iracing.com/data/lookup/countries", { schema: LookupCountries });
|
|
1843
|
+
});
|
|
1844
|
+
}
|
|
1845
|
+
/**
|
|
1846
|
+
* drivers
|
|
1847
|
+
* @see https://members-ng.iracing.com/data/lookup/drivers
|
|
1848
|
+
* @sample lookup.drivers.json
|
|
1849
|
+
*/
|
|
1850
|
+
drivers(params) {
|
|
1851
|
+
return __async(this, null, function* () {
|
|
1852
|
+
return this.client.get("https://members-ng.iracing.com/data/lookup/drivers", { params, schema: LookupDrivers });
|
|
1853
|
+
});
|
|
1854
|
+
}
|
|
1855
|
+
/**
|
|
1856
|
+
* flairs
|
|
1857
|
+
* @see https://members-ng.iracing.com/data/lookup/flairs
|
|
1858
|
+
* @sample lookup.flairs.json
|
|
1859
|
+
*/
|
|
1860
|
+
flairs() {
|
|
1861
|
+
return __async(this, null, function* () {
|
|
1862
|
+
return this.client.get("https://members-ng.iracing.com/data/lookup/flairs", { schema: LookupFlairs });
|
|
1863
|
+
});
|
|
1864
|
+
}
|
|
1865
|
+
/**
|
|
1866
|
+
* get
|
|
1867
|
+
* @see https://members-ng.iracing.com/data/lookup/get
|
|
1868
|
+
* @sample lookup.get.json
|
|
1869
|
+
*/
|
|
1870
|
+
get() {
|
|
1871
|
+
return __async(this, null, function* () {
|
|
1872
|
+
return this.client.get("https://members-ng.iracing.com/data/lookup/get", { schema: LookupGet });
|
|
1873
|
+
});
|
|
1874
|
+
}
|
|
1875
|
+
/**
|
|
1876
|
+
* licenses
|
|
1877
|
+
* @see https://members-ng.iracing.com/data/lookup/licenses
|
|
1878
|
+
* @sample lookup.licenses.json
|
|
1879
|
+
*/
|
|
1880
|
+
licenses() {
|
|
1881
|
+
return __async(this, null, function* () {
|
|
1882
|
+
return this.client.get("https://members-ng.iracing.com/data/lookup/licenses", { schema: LookupLicenses });
|
|
1883
|
+
});
|
|
1884
|
+
}
|
|
1885
|
+
};
|
|
1886
|
+
var MemberAwards = z6.object({
|
|
1887
|
+
type: z6.string(),
|
|
1888
|
+
data: z6.object({
|
|
1889
|
+
success: z6.boolean(),
|
|
1890
|
+
custId: z6.number(),
|
|
1891
|
+
awardCount: z6.number()
|
|
1892
|
+
}),
|
|
1893
|
+
dataUrl: z6.string()
|
|
1894
|
+
});
|
|
1895
|
+
var MemberAwardInstances = z6.object({
|
|
1896
|
+
type: z6.string(),
|
|
1897
|
+
data: z6.object({
|
|
1898
|
+
success: z6.boolean(),
|
|
1899
|
+
custId: z6.number(),
|
|
1900
|
+
awardId: z6.number(),
|
|
1901
|
+
awardCount: z6.number()
|
|
1902
|
+
}),
|
|
1903
|
+
dataUrl: z6.string()
|
|
1904
|
+
});
|
|
1905
|
+
var MemberChartData = z6.object({
|
|
1906
|
+
blackout: z6.boolean(),
|
|
1907
|
+
categoryId: z6.number(),
|
|
1908
|
+
chartType: z6.number(),
|
|
1909
|
+
data: z6.array(z6.object({
|
|
1910
|
+
when: z6.string(),
|
|
1911
|
+
value: z6.number()
|
|
1912
|
+
})),
|
|
1913
|
+
success: z6.boolean(),
|
|
1914
|
+
custId: z6.number()
|
|
1915
|
+
});
|
|
1916
|
+
var MemberGet = z6.object({
|
|
1917
|
+
success: z6.boolean(),
|
|
1918
|
+
custIds: z6.array(z6.number()),
|
|
1919
|
+
members: z6.array(z6.object({
|
|
1920
|
+
custId: z6.number(),
|
|
1921
|
+
displayName: z6.string(),
|
|
1922
|
+
helmet: z6.object({
|
|
1923
|
+
pattern: z6.number(),
|
|
1924
|
+
color1: z6.string(),
|
|
1925
|
+
color2: z6.string(),
|
|
1926
|
+
color3: z6.string(),
|
|
1927
|
+
faceType: z6.number(),
|
|
1928
|
+
helmetType: z6.number()
|
|
1929
|
+
}),
|
|
1930
|
+
lastLogin: z6.string(),
|
|
1931
|
+
memberSince: z6.string(),
|
|
1932
|
+
flairId: z6.number(),
|
|
1933
|
+
flairName: z6.string(),
|
|
1934
|
+
flairShortname: z6.string(),
|
|
1935
|
+
ai: z6.boolean()
|
|
1936
|
+
}))
|
|
1937
|
+
});
|
|
1938
|
+
var MemberInfo = z6.object({
|
|
1939
|
+
custId: z6.number(),
|
|
1940
|
+
displayName: z6.string(),
|
|
1941
|
+
firstName: z6.string(),
|
|
1942
|
+
lastName: z6.string(),
|
|
1943
|
+
onCarName: z6.string(),
|
|
1944
|
+
memberSince: z6.string(),
|
|
1945
|
+
flairId: z6.number(),
|
|
1946
|
+
flairName: z6.string(),
|
|
1947
|
+
flairShortname: z6.string(),
|
|
1948
|
+
flairCountryCode: z6.string(),
|
|
1949
|
+
lastLogin: z6.string(),
|
|
1950
|
+
readTc: z6.string(),
|
|
1951
|
+
readPp: z6.string(),
|
|
1952
|
+
readCompRules: z6.string(),
|
|
1953
|
+
flags: z6.number(),
|
|
1954
|
+
connectionType: z6.string(),
|
|
1955
|
+
downloadServer: z6.string(),
|
|
1956
|
+
account: z6.object({
|
|
1957
|
+
irDollars: z6.number(),
|
|
1958
|
+
irCredits: z6.number(),
|
|
1959
|
+
status: z6.string(),
|
|
1960
|
+
countryRules: z6.nullable(z6.unknown())
|
|
1961
|
+
}),
|
|
1962
|
+
helmet: z6.object({
|
|
1963
|
+
pattern: z6.number(),
|
|
1964
|
+
color1: z6.string(),
|
|
1965
|
+
color2: z6.string(),
|
|
1966
|
+
color3: z6.string(),
|
|
1967
|
+
faceType: z6.number(),
|
|
1968
|
+
helmetType: z6.number()
|
|
1969
|
+
}),
|
|
1970
|
+
suit: z6.object({
|
|
1971
|
+
pattern: z6.number(),
|
|
1972
|
+
color1: z6.string(),
|
|
1973
|
+
color2: z6.string(),
|
|
1974
|
+
color3: z6.string(),
|
|
1975
|
+
bodyType: z6.number()
|
|
1976
|
+
}),
|
|
1977
|
+
licenses: z6.object({
|
|
1978
|
+
oval: z6.object({
|
|
1979
|
+
categoryId: z6.number(),
|
|
1980
|
+
category: z6.string(),
|
|
1981
|
+
categoryName: z6.string(),
|
|
1982
|
+
licenseLevel: z6.number(),
|
|
1983
|
+
safetyRating: z6.number(),
|
|
1984
|
+
cpi: z6.number(),
|
|
1985
|
+
irating: z6.number(),
|
|
1986
|
+
ttRating: z6.number(),
|
|
1987
|
+
mprNumRaces: z6.number(),
|
|
1988
|
+
color: z6.string(),
|
|
1989
|
+
groupName: z6.string(),
|
|
1990
|
+
groupId: z6.number(),
|
|
1991
|
+
proPromotable: z6.boolean(),
|
|
1992
|
+
seq: z6.number(),
|
|
1993
|
+
mprNumTts: z6.number()
|
|
1994
|
+
}),
|
|
1995
|
+
sportsCar: z6.object({
|
|
1996
|
+
categoryId: z6.number(),
|
|
1997
|
+
category: z6.string(),
|
|
1998
|
+
categoryName: z6.string(),
|
|
1999
|
+
licenseLevel: z6.number(),
|
|
2000
|
+
safetyRating: z6.number(),
|
|
2001
|
+
cpi: z6.number(),
|
|
2002
|
+
irating: z6.number(),
|
|
2003
|
+
ttRating: z6.number(),
|
|
2004
|
+
mprNumRaces: z6.number(),
|
|
2005
|
+
color: z6.string(),
|
|
2006
|
+
groupName: z6.string(),
|
|
2007
|
+
groupId: z6.number(),
|
|
2008
|
+
proPromotable: z6.boolean(),
|
|
2009
|
+
seq: z6.number(),
|
|
2010
|
+
mprNumTts: z6.number()
|
|
2011
|
+
}),
|
|
2012
|
+
formulaCar: z6.object({
|
|
2013
|
+
categoryId: z6.number(),
|
|
2014
|
+
category: z6.string(),
|
|
2015
|
+
categoryName: z6.string(),
|
|
2016
|
+
licenseLevel: z6.number(),
|
|
2017
|
+
safetyRating: z6.number(),
|
|
2018
|
+
cpi: z6.number(),
|
|
2019
|
+
irating: z6.number(),
|
|
2020
|
+
ttRating: z6.number(),
|
|
2021
|
+
mprNumRaces: z6.number(),
|
|
2022
|
+
color: z6.string(),
|
|
2023
|
+
groupName: z6.string(),
|
|
2024
|
+
groupId: z6.number(),
|
|
2025
|
+
proPromotable: z6.boolean(),
|
|
2026
|
+
seq: z6.number(),
|
|
2027
|
+
mprNumTts: z6.number()
|
|
2028
|
+
}),
|
|
2029
|
+
dirtOval: z6.object({
|
|
2030
|
+
categoryId: z6.number(),
|
|
2031
|
+
category: z6.string(),
|
|
2032
|
+
categoryName: z6.string(),
|
|
2033
|
+
licenseLevel: z6.number(),
|
|
2034
|
+
safetyRating: z6.number(),
|
|
2035
|
+
cpi: z6.number(),
|
|
2036
|
+
irating: z6.number(),
|
|
2037
|
+
ttRating: z6.number(),
|
|
2038
|
+
mprNumRaces: z6.number(),
|
|
2039
|
+
color: z6.string(),
|
|
2040
|
+
groupName: z6.string(),
|
|
2041
|
+
groupId: z6.number(),
|
|
2042
|
+
proPromotable: z6.boolean(),
|
|
2043
|
+
seq: z6.number(),
|
|
2044
|
+
mprNumTts: z6.number()
|
|
2045
|
+
}),
|
|
2046
|
+
dirtRoad: z6.object({
|
|
2047
|
+
categoryId: z6.number(),
|
|
2048
|
+
category: z6.string(),
|
|
2049
|
+
categoryName: z6.string(),
|
|
2050
|
+
licenseLevel: z6.number(),
|
|
2051
|
+
safetyRating: z6.number(),
|
|
2052
|
+
cpi: z6.number(),
|
|
2053
|
+
irating: z6.number(),
|
|
2054
|
+
ttRating: z6.number(),
|
|
2055
|
+
mprNumRaces: z6.number(),
|
|
2056
|
+
color: z6.string(),
|
|
2057
|
+
groupName: z6.string(),
|
|
2058
|
+
groupId: z6.number(),
|
|
2059
|
+
proPromotable: z6.boolean(),
|
|
2060
|
+
seq: z6.number(),
|
|
2061
|
+
mprNumTts: z6.number()
|
|
2062
|
+
})
|
|
2063
|
+
}),
|
|
2064
|
+
carPackages: z6.array(z6.object({
|
|
2065
|
+
packageId: z6.number(),
|
|
2066
|
+
contentIds: z6.array(z6.number())
|
|
2067
|
+
})),
|
|
2068
|
+
trackPackages: z6.array(z6.object({
|
|
2069
|
+
packageId: z6.number(),
|
|
2070
|
+
contentIds: z6.array(z6.number())
|
|
2071
|
+
})),
|
|
2072
|
+
otherOwnedPackages: z6.array(z6.number()),
|
|
2073
|
+
dev: z6.boolean(),
|
|
2074
|
+
alphaTester: z6.boolean(),
|
|
2075
|
+
rainTester: z6.boolean(),
|
|
2076
|
+
broadcaster: z6.boolean(),
|
|
2077
|
+
restrictions: z6.object({}),
|
|
2078
|
+
hasReadCompRules: z6.boolean(),
|
|
2079
|
+
hasReadNda: z6.boolean(),
|
|
2080
|
+
flagsHex: z6.string(),
|
|
2081
|
+
hundredPctClub: z6.boolean(),
|
|
2082
|
+
twentyPctDiscount: z6.boolean(),
|
|
2083
|
+
lastSeason: z6.number(),
|
|
2084
|
+
hasAdditionalContent: z6.boolean(),
|
|
2085
|
+
hasReadTc: z6.boolean(),
|
|
2086
|
+
hasReadPp: z6.boolean()
|
|
2087
|
+
});
|
|
2088
|
+
var MemberParticipationCredits = z6.array(z6.object({
|
|
2089
|
+
custId: z6.number(),
|
|
2090
|
+
seasonId: z6.number(),
|
|
2091
|
+
seriesId: z6.number(),
|
|
2092
|
+
seriesName: z6.string(),
|
|
2093
|
+
licenseGroup: z6.number(),
|
|
2094
|
+
licenseGroupName: z6.string(),
|
|
2095
|
+
participationCredits: z6.number(),
|
|
2096
|
+
minWeeks: z6.number(),
|
|
2097
|
+
weeks: z6.number(),
|
|
2098
|
+
earnedCredits: z6.number(),
|
|
2099
|
+
totalCredits: z6.number()
|
|
2100
|
+
}));
|
|
2101
|
+
var MemberProfile = z6.object({
|
|
2102
|
+
recentAwards: z6.array(z6.object({
|
|
2103
|
+
memberAwardId: z6.number(),
|
|
2104
|
+
awardId: z6.number(),
|
|
2105
|
+
achievement: z6.boolean(),
|
|
2106
|
+
awardCount: z6.number(),
|
|
2107
|
+
awardDate: z6.string(),
|
|
2108
|
+
awardOrder: z6.number(),
|
|
2109
|
+
awardedDescription: z6.string(),
|
|
2110
|
+
description: z6.string(),
|
|
2111
|
+
groupName: z6.string(),
|
|
2112
|
+
hasPdf: z6.boolean(),
|
|
2113
|
+
iconUrlLarge: z6.string(),
|
|
2114
|
+
iconUrlSmall: z6.string(),
|
|
2115
|
+
iconUrlUnawarded: z6.string(),
|
|
2116
|
+
name: z6.string(),
|
|
2117
|
+
progress: z6.optional(z6.number()),
|
|
2118
|
+
progressLabel: z6.optional(z6.string()),
|
|
2119
|
+
threshold: z6.optional(z6.number()),
|
|
2120
|
+
viewed: z6.boolean(),
|
|
2121
|
+
weight: z6.number(),
|
|
2122
|
+
subsessionId: z6.optional(z6.number()),
|
|
2123
|
+
custId: z6.optional(z6.number())
|
|
2124
|
+
})),
|
|
2125
|
+
activity: z6.object({
|
|
2126
|
+
recent30daysCount: z6.number(),
|
|
2127
|
+
prev30daysCount: z6.number(),
|
|
2128
|
+
consecutiveWeeks: z6.number(),
|
|
2129
|
+
mostConsecutiveWeeks: z6.number()
|
|
2130
|
+
}),
|
|
2131
|
+
success: z6.boolean(),
|
|
2132
|
+
imageUrl: z6.string(),
|
|
2133
|
+
memberInfo: z6.object({
|
|
2134
|
+
ai: z6.boolean(),
|
|
2135
|
+
country: z6.nullable(z6.string()),
|
|
2136
|
+
countryCode: z6.string(),
|
|
2137
|
+
custId: z6.number(),
|
|
2138
|
+
displayName: z6.string(),
|
|
2139
|
+
flairId: z6.number(),
|
|
2140
|
+
flairName: z6.string(),
|
|
2141
|
+
flairShortname: z6.string(),
|
|
2142
|
+
helmet: z6.object({
|
|
2143
|
+
pattern: z6.number(),
|
|
2144
|
+
color1: z6.string(),
|
|
2145
|
+
color2: z6.string(),
|
|
2146
|
+
color3: z6.string(),
|
|
2147
|
+
faceType: z6.number(),
|
|
2148
|
+
helmetType: z6.number()
|
|
2149
|
+
}),
|
|
2150
|
+
lastLogin: z6.string(),
|
|
2151
|
+
licenses: z6.array(z6.object({
|
|
2152
|
+
categoryId: z6.number(),
|
|
2153
|
+
category: z6.string(),
|
|
2154
|
+
categoryName: z6.string(),
|
|
2155
|
+
licenseLevel: z6.number(),
|
|
2156
|
+
safetyRating: z6.number(),
|
|
2157
|
+
cpi: z6.number(),
|
|
2158
|
+
irating: z6.number(),
|
|
2159
|
+
ttRating: z6.number(),
|
|
2160
|
+
mprNumRaces: z6.number(),
|
|
2161
|
+
color: z6.string(),
|
|
2162
|
+
groupName: z6.string(),
|
|
2163
|
+
groupId: z6.number(),
|
|
2164
|
+
proPromotable: z6.boolean(),
|
|
2165
|
+
seq: z6.number(),
|
|
2166
|
+
mprNumTts: z6.number()
|
|
2167
|
+
})),
|
|
2168
|
+
memberSince: z6.string()
|
|
2169
|
+
}),
|
|
2170
|
+
disabled: z6.boolean(),
|
|
2171
|
+
licenseHistory: z6.array(z6.object({
|
|
2172
|
+
categoryId: z6.number(),
|
|
2173
|
+
category: z6.string(),
|
|
2174
|
+
categoryName: z6.string(),
|
|
2175
|
+
licenseLevel: z6.number(),
|
|
2176
|
+
safetyRating: z6.number(),
|
|
2177
|
+
cpi: z6.number(),
|
|
2178
|
+
irating: z6.number(),
|
|
2179
|
+
ttRating: z6.number(),
|
|
2180
|
+
color: z6.string(),
|
|
2181
|
+
groupName: z6.string(),
|
|
2182
|
+
groupId: z6.number(),
|
|
2183
|
+
seq: z6.number()
|
|
2184
|
+
})),
|
|
2185
|
+
recentEvents: z6.array(z6.object({
|
|
2186
|
+
eventType: z6.string(),
|
|
2187
|
+
subsessionId: z6.number(),
|
|
2188
|
+
startTime: z6.string(),
|
|
2189
|
+
eventId: z6.number(),
|
|
2190
|
+
eventName: z6.string(),
|
|
2191
|
+
simsessionType: z6.number(),
|
|
2192
|
+
startingPosition: z6.number(),
|
|
2193
|
+
finishPosition: z6.number(),
|
|
2194
|
+
bestLapTime: z6.number(),
|
|
2195
|
+
percentRank: z6.number(),
|
|
2196
|
+
carId: z6.number(),
|
|
2197
|
+
carName: z6.string(),
|
|
2198
|
+
logoUrl: z6.nullable(z6.string()),
|
|
2199
|
+
track: z6.object({
|
|
2200
|
+
configName: z6.string(),
|
|
2201
|
+
trackId: z6.number(),
|
|
2202
|
+
trackName: z6.string()
|
|
2203
|
+
})
|
|
2204
|
+
})),
|
|
2205
|
+
custId: z6.number(),
|
|
2206
|
+
isGenericImage: z6.boolean(),
|
|
2207
|
+
followCounts: z6.object({
|
|
2208
|
+
followers: z6.number(),
|
|
2209
|
+
follows: z6.number()
|
|
2210
|
+
})
|
|
2211
|
+
});
|
|
2212
|
+
var MemberAwardsParamsSchema = z6.object({
|
|
2213
|
+
custId: z6.optional(z6.number())
|
|
2214
|
+
// Defaults to the authenticated member. // maps to: cust_id
|
|
2215
|
+
});
|
|
2216
|
+
var MemberAwardInstancesParamsSchema = z6.object({
|
|
2217
|
+
custId: z6.optional(z6.number()),
|
|
2218
|
+
// Defaults to the authenticated member. // maps to: cust_id
|
|
2219
|
+
awardId: z6.number()
|
|
2220
|
+
// maps to: award_id
|
|
2221
|
+
});
|
|
2222
|
+
var MemberChartDataParamsSchema = z6.object({
|
|
2223
|
+
custId: z6.optional(z6.number()),
|
|
2224
|
+
// Defaults to the authenticated member. // maps to: cust_id
|
|
2225
|
+
categoryId: z6.number(),
|
|
2226
|
+
// 1 - Oval; 2 - Road; 3 - Dirt oval; 4 - Dirt road // maps to: category_id
|
|
2227
|
+
chartType: z6.number()
|
|
2228
|
+
// 1 - iRating; 2 - TT Rating; 3 - License/SR // maps to: chart_type
|
|
2229
|
+
});
|
|
2230
|
+
var MemberGetParamsSchema = z6.object({
|
|
2231
|
+
custIds: z6.array(z6.number()),
|
|
2232
|
+
// ?cust_ids=2,3,4 // maps to: cust_ids
|
|
2233
|
+
includeLicenses: z6.optional(z6.boolean())
|
|
2234
|
+
// maps to: include_licenses
|
|
2235
|
+
});
|
|
2236
|
+
var MemberInfoParamsSchema = z6.object({});
|
|
2237
|
+
var MemberParticipationCreditsParamsSchema = z6.object({});
|
|
2238
|
+
var MemberProfileParamsSchema = z6.object({
|
|
2239
|
+
custId: z6.optional(z6.number())
|
|
2240
|
+
// Defaults to the authenticated member. // maps to: cust_id
|
|
2241
|
+
});
|
|
2242
|
+
|
|
2243
|
+
// src/member/service.ts
|
|
2244
|
+
var MemberService = class {
|
|
2245
|
+
constructor(client) {
|
|
2246
|
+
this.client = client;
|
|
2247
|
+
}
|
|
2248
|
+
/**
|
|
2249
|
+
* awards
|
|
2250
|
+
* @see https://members-ng.iracing.com/data/member/awards
|
|
2251
|
+
* @sample member.awards.json
|
|
2252
|
+
*/
|
|
2253
|
+
awards(params) {
|
|
2254
|
+
return __async(this, null, function* () {
|
|
2255
|
+
return this.client.get("https://members-ng.iracing.com/data/member/awards", { params, schema: MemberAwards });
|
|
2256
|
+
});
|
|
2257
|
+
}
|
|
2258
|
+
/**
|
|
2259
|
+
* award_instances
|
|
2260
|
+
* @see https://members-ng.iracing.com/data/member/award_instances
|
|
2261
|
+
* @sample member.award_instances.json
|
|
2262
|
+
*/
|
|
2263
|
+
awardInstances(params) {
|
|
2264
|
+
return __async(this, null, function* () {
|
|
2265
|
+
return this.client.get("https://members-ng.iracing.com/data/member/award_instances", { params, schema: MemberAwardInstances });
|
|
2266
|
+
});
|
|
2267
|
+
}
|
|
2268
|
+
/**
|
|
2269
|
+
* chart_data
|
|
2270
|
+
* @see https://members-ng.iracing.com/data/member/chart_data
|
|
2271
|
+
* @sample member.chart_data.json
|
|
2272
|
+
*/
|
|
2273
|
+
chartData(params) {
|
|
2274
|
+
return __async(this, null, function* () {
|
|
2275
|
+
return this.client.get("https://members-ng.iracing.com/data/member/chart_data", { params, schema: MemberChartData });
|
|
2276
|
+
});
|
|
2277
|
+
}
|
|
2278
|
+
/**
|
|
2279
|
+
* get
|
|
2280
|
+
* @see https://members-ng.iracing.com/data/member/get
|
|
2281
|
+
* @sample member.get.json
|
|
2282
|
+
*/
|
|
2283
|
+
get(params) {
|
|
2284
|
+
return __async(this, null, function* () {
|
|
2285
|
+
return this.client.get("https://members-ng.iracing.com/data/member/get", { params, schema: MemberGet });
|
|
2286
|
+
});
|
|
2287
|
+
}
|
|
2288
|
+
/**
|
|
2289
|
+
* info
|
|
2290
|
+
* @see https://members-ng.iracing.com/data/member/info
|
|
2291
|
+
* @sample member.info.json
|
|
2292
|
+
*/
|
|
2293
|
+
info() {
|
|
2294
|
+
return __async(this, null, function* () {
|
|
2295
|
+
return this.client.get("https://members-ng.iracing.com/data/member/info", { schema: MemberInfo });
|
|
2296
|
+
});
|
|
2297
|
+
}
|
|
2298
|
+
/**
|
|
2299
|
+
* participation_credits
|
|
2300
|
+
* @see https://members-ng.iracing.com/data/member/participation_credits
|
|
2301
|
+
* @sample member.participation_credits.json
|
|
2302
|
+
*/
|
|
2303
|
+
participationCredits() {
|
|
2304
|
+
return __async(this, null, function* () {
|
|
2305
|
+
return this.client.get("https://members-ng.iracing.com/data/member/participation_credits", { schema: MemberParticipationCredits });
|
|
2306
|
+
});
|
|
2307
|
+
}
|
|
2308
|
+
/**
|
|
2309
|
+
* profile
|
|
2310
|
+
* @see https://members-ng.iracing.com/data/member/profile
|
|
2311
|
+
* @sample member.profile.json
|
|
2312
|
+
*/
|
|
2313
|
+
profile(params) {
|
|
2314
|
+
return __async(this, null, function* () {
|
|
2315
|
+
return this.client.get("https://members-ng.iracing.com/data/member/profile", { params, schema: MemberProfile });
|
|
2316
|
+
});
|
|
2317
|
+
}
|
|
2318
|
+
};
|
|
2319
|
+
|
|
2320
|
+
// src/results/service.ts
|
|
2321
|
+
var ResultsService = class {
|
|
2322
|
+
constructor(client) {
|
|
2323
|
+
this.client = client;
|
|
2324
|
+
}
|
|
2325
|
+
/**
|
|
2326
|
+
* get
|
|
2327
|
+
* @see https://members-ng.iracing.com/data/results/get
|
|
2328
|
+
*/
|
|
2329
|
+
get(params) {
|
|
2330
|
+
return __async(this, null, function* () {
|
|
2331
|
+
return this.client.get("https://members-ng.iracing.com/data/results/get", { params });
|
|
2332
|
+
});
|
|
2333
|
+
}
|
|
2334
|
+
/**
|
|
2335
|
+
* event_log
|
|
2336
|
+
* @see https://members-ng.iracing.com/data/results/event_log
|
|
2337
|
+
*/
|
|
2338
|
+
eventLog(params) {
|
|
2339
|
+
return __async(this, null, function* () {
|
|
2340
|
+
return this.client.get("https://members-ng.iracing.com/data/results/event_log", { params });
|
|
2341
|
+
});
|
|
2342
|
+
}
|
|
2343
|
+
/**
|
|
2344
|
+
* lap_chart_data
|
|
2345
|
+
* @see https://members-ng.iracing.com/data/results/lap_chart_data
|
|
2346
|
+
*/
|
|
2347
|
+
lapChartData(params) {
|
|
2348
|
+
return __async(this, null, function* () {
|
|
2349
|
+
return this.client.get("https://members-ng.iracing.com/data/results/lap_chart_data", { params });
|
|
2350
|
+
});
|
|
2351
|
+
}
|
|
2352
|
+
/**
|
|
2353
|
+
* lap_data
|
|
2354
|
+
* @see https://members-ng.iracing.com/data/results/lap_data
|
|
2355
|
+
*/
|
|
2356
|
+
lapData(params) {
|
|
2357
|
+
return __async(this, null, function* () {
|
|
2358
|
+
return this.client.get("https://members-ng.iracing.com/data/results/lap_data", { params });
|
|
2359
|
+
});
|
|
2360
|
+
}
|
|
2361
|
+
/**
|
|
2362
|
+
* search_hosted
|
|
2363
|
+
* @see https://members-ng.iracing.com/data/results/search_hosted
|
|
2364
|
+
*/
|
|
2365
|
+
searchHosted(params) {
|
|
2366
|
+
return __async(this, null, function* () {
|
|
2367
|
+
return this.client.get("https://members-ng.iracing.com/data/results/search_hosted", { params });
|
|
2368
|
+
});
|
|
2369
|
+
}
|
|
2370
|
+
/**
|
|
2371
|
+
* search_series
|
|
2372
|
+
* @see https://members-ng.iracing.com/data/results/search_series
|
|
2373
|
+
*/
|
|
2374
|
+
searchSeries(params) {
|
|
2375
|
+
return __async(this, null, function* () {
|
|
2376
|
+
return this.client.get("https://members-ng.iracing.com/data/results/search_series", { params });
|
|
2377
|
+
});
|
|
2378
|
+
}
|
|
2379
|
+
/**
|
|
2380
|
+
* season_results
|
|
2381
|
+
* @see https://members-ng.iracing.com/data/results/season_results
|
|
2382
|
+
*/
|
|
2383
|
+
seasonResults(params) {
|
|
2384
|
+
return __async(this, null, function* () {
|
|
2385
|
+
return this.client.get("https://members-ng.iracing.com/data/results/season_results", { params });
|
|
2386
|
+
});
|
|
2387
|
+
}
|
|
2388
|
+
};
|
|
2389
|
+
var SeasonList = z6.object({
|
|
2390
|
+
seasonQuarter: z6.number(),
|
|
2391
|
+
seasons: z6.array(z6.object({
|
|
2392
|
+
seasonId: z6.number(),
|
|
2393
|
+
seriesId: z6.number(),
|
|
2394
|
+
seasonName: z6.string(),
|
|
2395
|
+
seriesName: z6.string(),
|
|
2396
|
+
official: z6.boolean(),
|
|
2397
|
+
seasonYear: z6.number(),
|
|
2398
|
+
seasonQuarter: z6.number(),
|
|
2399
|
+
licenseGroup: z6.number(),
|
|
2400
|
+
fixedSetup: z6.boolean(),
|
|
2401
|
+
driverChanges: z6.boolean(),
|
|
2402
|
+
rookieSeason: z6.optional(z6.string())
|
|
2403
|
+
})),
|
|
2404
|
+
seasonYear: z6.number()
|
|
2405
|
+
});
|
|
2406
|
+
var SeasonRaceGuide = z6.object({
|
|
2407
|
+
subscribed: z6.boolean(),
|
|
2408
|
+
sessions: z6.array(z6.object({
|
|
2409
|
+
seasonId: z6.number(),
|
|
2410
|
+
startTime: z6.string(),
|
|
2411
|
+
superSession: z6.boolean(),
|
|
2412
|
+
seriesId: z6.number(),
|
|
2413
|
+
raceWeekNum: z6.number(),
|
|
2414
|
+
endTime: z6.string(),
|
|
2415
|
+
sessionId: z6.optional(z6.number()),
|
|
2416
|
+
entryCount: z6.number()
|
|
2417
|
+
})),
|
|
2418
|
+
blockBeginTime: z6.string(),
|
|
2419
|
+
blockEndTime: z6.string(),
|
|
2420
|
+
success: z6.boolean()
|
|
2421
|
+
});
|
|
2422
|
+
var SeasonSpectatorSubsessionids = z6.object({
|
|
2423
|
+
eventTypes: z6.array(z6.number()),
|
|
2424
|
+
success: z6.boolean(),
|
|
2425
|
+
subsessionIds: z6.array(z6.number())
|
|
2426
|
+
});
|
|
2427
|
+
var SeasonSpectatorSubsessionidsDetail = z6.object({
|
|
2428
|
+
success: z6.boolean(),
|
|
2429
|
+
seasonIds: z6.array(z6.number()),
|
|
2430
|
+
eventTypes: z6.array(z6.number()),
|
|
2431
|
+
subsessions: z6.array(z6.object({
|
|
2432
|
+
subsessionId: z6.number(),
|
|
2433
|
+
sessionId: z6.number(),
|
|
2434
|
+
seasonId: z6.number(),
|
|
2435
|
+
startTime: z6.string(),
|
|
2436
|
+
raceWeekNum: z6.number(),
|
|
2437
|
+
eventType: z6.number()
|
|
2438
|
+
}))
|
|
2439
|
+
});
|
|
2440
|
+
var SeasonListParamsSchema = z6.object({
|
|
2441
|
+
seasonYear: z6.number(),
|
|
2442
|
+
// maps to: season_year
|
|
2443
|
+
seasonQuarter: z6.number()
|
|
2444
|
+
// maps to: season_quarter
|
|
2445
|
+
});
|
|
2446
|
+
var SeasonRaceGuideParamsSchema = z6.object({
|
|
2447
|
+
from: z6.optional(z6.string()),
|
|
2448
|
+
// ISO-8601 offset format. Defaults to the current time. Include sessions with start times up to 3 hours after this time. Times in the past will be rewritten to the current time.
|
|
2449
|
+
includeEndAfterFrom: z6.optional(z6.boolean())
|
|
2450
|
+
// Include sessions which start before 'from' but end after. // maps to: include_end_after_from
|
|
2451
|
+
});
|
|
2452
|
+
var SeasonSpectatorSubsessionidsParamsSchema = z6.object({
|
|
2453
|
+
eventTypes: z6.optional(z6.array(z6.number()))
|
|
2454
|
+
// Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 // maps to: event_types
|
|
2455
|
+
});
|
|
2456
|
+
var SeasonSpectatorSubsessionidsDetailParamsSchema = z6.object({
|
|
2457
|
+
eventTypes: z6.optional(z6.array(z6.number())),
|
|
2458
|
+
// Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 // maps to: event_types
|
|
2459
|
+
seasonIds: z6.optional(z6.array(z6.number()))
|
|
2460
|
+
// Seasons to include in the search. Defaults to all. ?season_ids=513,937 // maps to: season_ids
|
|
2461
|
+
});
|
|
2462
|
+
|
|
2463
|
+
// src/season/service.ts
|
|
2464
|
+
var SeasonService = class {
|
|
2465
|
+
constructor(client) {
|
|
2466
|
+
this.client = client;
|
|
2467
|
+
}
|
|
2468
|
+
/**
|
|
2469
|
+
* list
|
|
2470
|
+
* @see https://members-ng.iracing.com/data/season/list
|
|
2471
|
+
* @sample season.list.json
|
|
2472
|
+
*/
|
|
2473
|
+
list(params) {
|
|
2474
|
+
return __async(this, null, function* () {
|
|
2475
|
+
return this.client.get("https://members-ng.iracing.com/data/season/list", { params, schema: SeasonList });
|
|
2476
|
+
});
|
|
2477
|
+
}
|
|
2478
|
+
/**
|
|
2479
|
+
* race_guide
|
|
2480
|
+
* @see https://members-ng.iracing.com/data/season/race_guide
|
|
2481
|
+
* @sample season.race_guide.json
|
|
2482
|
+
*/
|
|
2483
|
+
raceGuide(params) {
|
|
2484
|
+
return __async(this, null, function* () {
|
|
2485
|
+
return this.client.get("https://members-ng.iracing.com/data/season/race_guide", { params, schema: SeasonRaceGuide });
|
|
2486
|
+
});
|
|
2487
|
+
}
|
|
2488
|
+
/**
|
|
2489
|
+
* spectator_subsessionids
|
|
2490
|
+
* @see https://members-ng.iracing.com/data/season/spectator_subsessionids
|
|
2491
|
+
* @sample season.spectator_subsessionids.json
|
|
2492
|
+
*/
|
|
2493
|
+
spectatorSubsessionids(params) {
|
|
2494
|
+
return __async(this, null, function* () {
|
|
2495
|
+
return this.client.get("https://members-ng.iracing.com/data/season/spectator_subsessionids", { params, schema: SeasonSpectatorSubsessionids });
|
|
2496
|
+
});
|
|
2497
|
+
}
|
|
2498
|
+
/**
|
|
2499
|
+
* spectator_subsessionids_detail
|
|
2500
|
+
* @see https://members-ng.iracing.com/data/season/spectator_subsessionids_detail
|
|
2501
|
+
* @sample season.spectator_subsessionids_detail.json
|
|
2502
|
+
*/
|
|
2503
|
+
spectatorSubsessionidsDetail(params) {
|
|
2504
|
+
return __async(this, null, function* () {
|
|
2505
|
+
return this.client.get("https://members-ng.iracing.com/data/season/spectator_subsessionids_detail", { params, schema: SeasonSpectatorSubsessionidsDetail });
|
|
2506
|
+
});
|
|
2507
|
+
}
|
|
2508
|
+
};
|
|
2509
|
+
var SeriesAssets = z6.record(z6.string(), z6.object({
|
|
2510
|
+
largeImage: z6.optional(z6.nullable(z6.string())),
|
|
2511
|
+
logo: z6.optional(z6.nullable(z6.string())),
|
|
2512
|
+
seriesCopy: z6.optional(z6.nullable(z6.string())),
|
|
2513
|
+
seriesId: z6.optional(z6.nullable(z6.number())),
|
|
2514
|
+
smallImage: z6.optional(z6.nullable(z6.string()))
|
|
2515
|
+
}));
|
|
2516
|
+
var SeriesGet = z6.array(z6.object({
|
|
2517
|
+
allowedLicenses: z6.array(z6.object({
|
|
2518
|
+
groupName: z6.string(),
|
|
2519
|
+
licenseGroup: z6.number(),
|
|
2520
|
+
maxLicenseLevel: z6.number(),
|
|
2521
|
+
minLicenseLevel: z6.number()
|
|
2522
|
+
})),
|
|
2523
|
+
category: z6.string(),
|
|
2524
|
+
categoryId: z6.number(),
|
|
2525
|
+
eligible: z6.boolean(),
|
|
2526
|
+
firstSeason: z6.object({
|
|
2527
|
+
seasonYear: z6.number(),
|
|
2528
|
+
seasonQuarter: z6.number()
|
|
2529
|
+
}),
|
|
2530
|
+
forumUrl: z6.optional(z6.string()),
|
|
2531
|
+
maxStarters: z6.number(),
|
|
2532
|
+
minStarters: z6.number(),
|
|
2533
|
+
ovalCautionType: z6.number(),
|
|
2534
|
+
roadCautionType: z6.number(),
|
|
2535
|
+
seriesId: z6.number(),
|
|
2536
|
+
seriesName: z6.string(),
|
|
2537
|
+
seriesShortName: z6.string(),
|
|
2538
|
+
searchFilters: z6.optional(z6.string())
|
|
2539
|
+
}));
|
|
2540
|
+
var SeriesPastSeasons = z6.object({
|
|
2541
|
+
success: z6.boolean(),
|
|
2542
|
+
series: z6.object({
|
|
2543
|
+
seriesId: z6.number(),
|
|
2544
|
+
seriesName: z6.string(),
|
|
2545
|
+
seriesShortName: z6.string(),
|
|
2546
|
+
categoryId: z6.number(),
|
|
2547
|
+
category: z6.string(),
|
|
2548
|
+
active: z6.boolean(),
|
|
2549
|
+
official: z6.boolean(),
|
|
2550
|
+
fixedSetup: z6.boolean(),
|
|
2551
|
+
searchFilters: z6.string(),
|
|
2552
|
+
logo: z6.string(),
|
|
2553
|
+
licenseGroup: z6.number(),
|
|
2554
|
+
licenseGroupTypes: z6.array(z6.object({
|
|
2555
|
+
licenseGroupType: z6.number()
|
|
2556
|
+
})),
|
|
2557
|
+
allowedLicenses: z6.array(z6.object({
|
|
2558
|
+
groupName: z6.string(),
|
|
2559
|
+
licenseGroup: z6.number(),
|
|
2560
|
+
maxLicenseLevel: z6.number(),
|
|
2561
|
+
minLicenseLevel: z6.number(),
|
|
2562
|
+
parentId: z6.number()
|
|
2563
|
+
})),
|
|
2564
|
+
seasons: z6.array(z6.object({
|
|
2565
|
+
seasonId: z6.number(),
|
|
2566
|
+
seriesId: z6.number(),
|
|
2567
|
+
seasonName: z6.string(),
|
|
2568
|
+
seasonShortName: z6.string(),
|
|
2569
|
+
seasonYear: z6.number(),
|
|
2570
|
+
seasonQuarter: z6.number(),
|
|
2571
|
+
active: z6.boolean(),
|
|
2572
|
+
official: z6.boolean(),
|
|
2573
|
+
driverChanges: z6.boolean(),
|
|
2574
|
+
fixedSetup: z6.boolean(),
|
|
2575
|
+
licenseGroup: z6.number(),
|
|
2576
|
+
hasSupersessions: z6.boolean(),
|
|
2577
|
+
carSwitching: z6.boolean(),
|
|
2578
|
+
licenseGroupTypes: z6.array(z6.object({
|
|
2579
|
+
licenseGroupType: z6.number()
|
|
2580
|
+
})),
|
|
2581
|
+
carClasses: z6.array(z6.object({
|
|
2582
|
+
carClassId: z6.number(),
|
|
2583
|
+
shortName: z6.string(),
|
|
2584
|
+
name: z6.string(),
|
|
2585
|
+
relativeSpeed: z6.number()
|
|
2586
|
+
})),
|
|
2587
|
+
raceWeeks: z6.array(z6.object({
|
|
2588
|
+
seasonId: z6.number(),
|
|
2589
|
+
raceWeekNum: z6.number(),
|
|
2590
|
+
track: z6.object({
|
|
2591
|
+
trackId: z6.number(),
|
|
2592
|
+
trackName: z6.string(),
|
|
2593
|
+
configName: z6.optional(z6.string())
|
|
2594
|
+
})
|
|
2595
|
+
}))
|
|
2596
|
+
}))
|
|
2597
|
+
}),
|
|
2598
|
+
seriesId: z6.number()
|
|
2599
|
+
});
|
|
2600
|
+
var SeriesSeasons = z6.array(z6.object({
|
|
2601
|
+
seasonId: z6.number(),
|
|
2602
|
+
seasonName: z6.string(),
|
|
2603
|
+
active: z6.boolean(),
|
|
2604
|
+
allowedSeasonMembers: z6.nullable(z6.string()),
|
|
2605
|
+
carClassIds: z6.array(z6.number()),
|
|
2606
|
+
carSwitching: z6.boolean(),
|
|
2607
|
+
carTypes: z6.array(z6.object({
|
|
2608
|
+
carType: z6.string()
|
|
2609
|
+
})),
|
|
2610
|
+
cautionLapsDoNotCount: z6.boolean(),
|
|
2611
|
+
complete: z6.boolean(),
|
|
2612
|
+
connectionBlackFlag: z6.boolean(),
|
|
2613
|
+
consecCautionWithinNlaps: z6.number(),
|
|
2614
|
+
consecCautionsSingleFile: z6.boolean(),
|
|
2615
|
+
crossLicense: z6.boolean(),
|
|
2616
|
+
distributedMatchmaking: z6.boolean(),
|
|
2617
|
+
driverChangeRule: z6.number(),
|
|
2618
|
+
driverChanges: z6.boolean(),
|
|
2619
|
+
drops: z6.number(),
|
|
2620
|
+
enablePitlaneCollisions: z6.boolean(),
|
|
2621
|
+
fixedSetup: z6.boolean(),
|
|
2622
|
+
greenWhiteCheckeredLimit: z6.number(),
|
|
2623
|
+
gridByClass: z6.boolean(),
|
|
2624
|
+
hardcoreLevel: z6.number(),
|
|
2625
|
+
hasSupersessions: z6.boolean(),
|
|
2626
|
+
ignoreLicenseForPractice: z6.boolean(),
|
|
2627
|
+
incidentLimit: z6.number(),
|
|
2628
|
+
incidentWarnMode: z6.number(),
|
|
2629
|
+
incidentWarnParam1: z6.number(),
|
|
2630
|
+
incidentWarnParam2: z6.number(),
|
|
2631
|
+
isHeatRacing: z6.boolean(),
|
|
2632
|
+
licenseGroup: z6.number(),
|
|
2633
|
+
licenseGroupTypes: z6.array(z6.object({
|
|
2634
|
+
licenseGroupType: z6.number()
|
|
2635
|
+
})),
|
|
2636
|
+
luckyDog: z6.boolean(),
|
|
2637
|
+
maxTeamDrivers: z6.number(),
|
|
2638
|
+
maxWeeks: z6.number(),
|
|
2639
|
+
minTeamDrivers: z6.number(),
|
|
2640
|
+
multiclass: z6.boolean(),
|
|
2641
|
+
mustUseDiffTireTypesInRace: z6.boolean(),
|
|
2642
|
+
nextRaceSession: z6.nullable(z6.string()),
|
|
2643
|
+
numFastTows: z6.number(),
|
|
2644
|
+
numOptLaps: z6.number(),
|
|
2645
|
+
official: z6.boolean(),
|
|
2646
|
+
opDuration: z6.number(),
|
|
2647
|
+
openPracticeSessionTypeId: z6.number(),
|
|
2648
|
+
qualifierMustStartRace: z6.boolean(),
|
|
2649
|
+
raceWeek: z6.number(),
|
|
2650
|
+
raceWeekToMakeDivisions: z6.number(),
|
|
2651
|
+
regUserCount: z6.number(),
|
|
2652
|
+
regionCompetition: z6.boolean(),
|
|
2653
|
+
restrictByMember: z6.boolean(),
|
|
2654
|
+
restrictToCar: z6.boolean(),
|
|
2655
|
+
restrictViewing: z6.boolean(),
|
|
2656
|
+
scheduleDescription: z6.string(),
|
|
2657
|
+
schedules: z6.array(z6.object({
|
|
2658
|
+
seasonId: z6.number(),
|
|
2659
|
+
raceWeekNum: z6.number(),
|
|
2660
|
+
carRestrictions: z6.array(z6.object({
|
|
2661
|
+
carId: z6.number(),
|
|
2662
|
+
maxDryTireSets: z6.number(),
|
|
2663
|
+
maxPctFuelFill: z6.number(),
|
|
2664
|
+
powerAdjustPct: z6.number(),
|
|
2665
|
+
weightPenaltyKg: z6.number(),
|
|
2666
|
+
raceSetupId: z6.optional(z6.number()),
|
|
2667
|
+
qualSetupId: z6.optional(z6.number())
|
|
2668
|
+
})),
|
|
2669
|
+
category: z6.string(),
|
|
2670
|
+
categoryId: z6.number(),
|
|
2671
|
+
enablePitlaneCollisions: z6.boolean(),
|
|
2672
|
+
fullCourseCautions: z6.boolean(),
|
|
2673
|
+
practiceLength: z6.optional(z6.number()),
|
|
2674
|
+
qualAttached: z6.boolean(),
|
|
2675
|
+
qualifyLaps: z6.optional(z6.number()),
|
|
2676
|
+
qualifyLength: z6.optional(z6.number()),
|
|
2677
|
+
raceLapLimit: z6.nullable(z6.number()),
|
|
2678
|
+
raceTimeDescriptors: z6.array(z6.object({
|
|
2679
|
+
dayOffset: z6.optional(z6.array(z6.number())),
|
|
2680
|
+
firstSessionTime: z6.optional(z6.string()),
|
|
2681
|
+
repeatMinutes: z6.optional(z6.number()),
|
|
2682
|
+
repeating: z6.boolean(),
|
|
2683
|
+
sessionMinutes: z6.number(),
|
|
2684
|
+
startDate: z6.optional(z6.string()),
|
|
2685
|
+
superSession: z6.boolean(),
|
|
2686
|
+
sessionTimes: z6.optional(z6.array(z6.string()))
|
|
2687
|
+
})),
|
|
2688
|
+
raceTimeLimit: z6.nullable(z6.number()),
|
|
2689
|
+
raceWeekCarClassIds: z6.array(z6.unknown()),
|
|
2690
|
+
raceWeekCars: z6.array(z6.unknown()),
|
|
2691
|
+
restartType: z6.string(),
|
|
2692
|
+
scheduleName: z6.string(),
|
|
2693
|
+
seasonName: z6.string(),
|
|
2694
|
+
seriesId: z6.number(),
|
|
2695
|
+
seriesName: z6.string(),
|
|
2696
|
+
shortParadeLap: z6.boolean(),
|
|
2697
|
+
specialEventType: z6.nullable(z6.string()),
|
|
2698
|
+
startDate: z6.string(),
|
|
2699
|
+
startType: z6.string(),
|
|
2700
|
+
startZone: z6.boolean(),
|
|
2701
|
+
track: z6.object({
|
|
2702
|
+
category: z6.string(),
|
|
2703
|
+
categoryId: z6.number(),
|
|
2704
|
+
configName: z6.optional(z6.string()),
|
|
2705
|
+
trackId: z6.number(),
|
|
2706
|
+
trackName: z6.string()
|
|
2707
|
+
}),
|
|
2708
|
+
trackState: z6.object({
|
|
2709
|
+
leaveMarbles: z6.boolean(),
|
|
2710
|
+
practiceRubber: z6.optional(z6.number()),
|
|
2711
|
+
raceRubber: z6.optional(z6.number())
|
|
2712
|
+
}),
|
|
2713
|
+
warmupLength: z6.optional(z6.number()),
|
|
2714
|
+
weather: z6.object({
|
|
2715
|
+
allowFog: z6.boolean(),
|
|
2716
|
+
forecastOptions: z6.object({
|
|
2717
|
+
allowFog: z6.boolean(),
|
|
2718
|
+
forecastType: z6.number(),
|
|
2719
|
+
precipitation: z6.number(),
|
|
2720
|
+
skies: z6.number(),
|
|
2721
|
+
stopPrecip: z6.number(),
|
|
2722
|
+
temperature: z6.number(),
|
|
2723
|
+
weatherSeed: z6.optional(z6.number()),
|
|
2724
|
+
windDir: z6.number(),
|
|
2725
|
+
windSpeed: z6.number()
|
|
2726
|
+
}),
|
|
2727
|
+
precipOption: z6.number(),
|
|
2728
|
+
relHumidity: z6.number(),
|
|
2729
|
+
simulatedStartTime: z6.string(),
|
|
2730
|
+
simulatedTimeMultiplier: z6.number(),
|
|
2731
|
+
simulatedTimeOffsets: z6.array(z6.number()),
|
|
2732
|
+
skies: z6.number(),
|
|
2733
|
+
tempUnits: z6.number(),
|
|
2734
|
+
tempValue: z6.number(),
|
|
2735
|
+
timeOfDay: z6.number(),
|
|
2736
|
+
trackWater: z6.number(),
|
|
2737
|
+
version: z6.number(),
|
|
2738
|
+
weatherSummary: z6.object({
|
|
2739
|
+
maxPrecipRate: z6.number(),
|
|
2740
|
+
maxPrecipRateDesc: z6.string(),
|
|
2741
|
+
precipChance: z6.number(),
|
|
2742
|
+
skiesHigh: z6.number(),
|
|
2743
|
+
skiesLow: z6.number(),
|
|
2744
|
+
tempHigh: z6.number(),
|
|
2745
|
+
tempLow: z6.number(),
|
|
2746
|
+
tempUnits: z6.number(),
|
|
2747
|
+
windDir: z6.number(),
|
|
2748
|
+
windHigh: z6.number(),
|
|
2749
|
+
windLow: z6.number(),
|
|
2750
|
+
windUnits: z6.number()
|
|
2751
|
+
}),
|
|
2752
|
+
weatherUrl: z6.string(),
|
|
2753
|
+
windDir: z6.number(),
|
|
2754
|
+
windUnits: z6.number(),
|
|
2755
|
+
windValue: z6.number()
|
|
2756
|
+
}),
|
|
2757
|
+
weekEndTime: z6.string()
|
|
2758
|
+
})),
|
|
2759
|
+
seasonQuarter: z6.number(),
|
|
2760
|
+
seasonShortName: z6.string(),
|
|
2761
|
+
seasonYear: z6.number(),
|
|
2762
|
+
sendToOpenPractice: z6.boolean(),
|
|
2763
|
+
seriesId: z6.number(),
|
|
2764
|
+
shortParadeLap: z6.boolean(),
|
|
2765
|
+
startDate: z6.string(),
|
|
2766
|
+
startOnQualTire: z6.boolean(),
|
|
2767
|
+
startZone: z6.boolean(),
|
|
2768
|
+
trackTypes: z6.array(z6.object({
|
|
2769
|
+
trackType: z6.string()
|
|
2770
|
+
})),
|
|
2771
|
+
unsportConductRuleMode: z6.number(),
|
|
2772
|
+
heatSesInfo: z6.optional(z6.object({
|
|
2773
|
+
consolationDeltaMaxFieldSize: z6.number(),
|
|
2774
|
+
consolationDeltaSessionLaps: z6.number(),
|
|
2775
|
+
consolationDeltaSessionLengthMinutes: z6.number(),
|
|
2776
|
+
consolationFirstMaxFieldSize: z6.number(),
|
|
2777
|
+
consolationFirstSessionLaps: z6.number(),
|
|
2778
|
+
consolationFirstSessionLengthMinutes: z6.number(),
|
|
2779
|
+
consolationNumPositionToInvert: z6.number(),
|
|
2780
|
+
consolationNumToConsolation: z6.number(),
|
|
2781
|
+
consolationNumToMain: z6.number(),
|
|
2782
|
+
consolationRunAlways: z6.boolean(),
|
|
2783
|
+
consolationScoresChampPoints: z6.boolean(),
|
|
2784
|
+
created: z6.string(),
|
|
2785
|
+
custId: z6.number(),
|
|
2786
|
+
description: z6.string(),
|
|
2787
|
+
heatCautionType: z6.number(),
|
|
2788
|
+
heatInfoId: z6.number(),
|
|
2789
|
+
heatInfoName: z6.string(),
|
|
2790
|
+
heatLaps: z6.number(),
|
|
2791
|
+
heatLengthMinutes: z6.number(),
|
|
2792
|
+
heatMaxFieldSize: z6.number(),
|
|
2793
|
+
heatNumFromEachToMain: z6.number(),
|
|
2794
|
+
heatNumPositionToInvert: z6.number(),
|
|
2795
|
+
heatScoresChampPoints: z6.boolean(),
|
|
2796
|
+
heatSessionMinutesEstimate: z6.number(),
|
|
2797
|
+
hidden: z6.boolean(),
|
|
2798
|
+
mainLaps: z6.number(),
|
|
2799
|
+
mainLengthMinutes: z6.number(),
|
|
2800
|
+
mainMaxFieldSize: z6.number(),
|
|
2801
|
+
mainNumPositionToInvert: z6.number(),
|
|
2802
|
+
maxEntrants: z6.number(),
|
|
2803
|
+
openPractice: z6.boolean(),
|
|
2804
|
+
preMainPracticeLengthMinutes: z6.number(),
|
|
2805
|
+
preQualNumToMain: z6.number(),
|
|
2806
|
+
preQualPracticeLengthMinutes: z6.number(),
|
|
2807
|
+
qualCautionType: z6.number(),
|
|
2808
|
+
qualLaps: z6.number(),
|
|
2809
|
+
qualLengthMinutes: z6.number(),
|
|
2810
|
+
qualNumToMain: z6.number(),
|
|
2811
|
+
qualOpenDelaySeconds: z6.number(),
|
|
2812
|
+
qualScoresChampPoints: z6.boolean(),
|
|
2813
|
+
qualScoring: z6.number(),
|
|
2814
|
+
qualStyle: z6.number(),
|
|
2815
|
+
raceStyle: z6.number()
|
|
2816
|
+
})),
|
|
2817
|
+
regOpenMinutes: z6.optional(z6.number())
|
|
2818
|
+
}));
|
|
2819
|
+
var SeriesSeasonList = z6.object({
|
|
2820
|
+
seasons: z6.array(z6.object({
|
|
2821
|
+
seasonId: z6.number(),
|
|
2822
|
+
seasonName: z6.string(),
|
|
2823
|
+
active: z6.boolean(),
|
|
2824
|
+
allowedSeasonMembers: z6.nullable(z6.string()),
|
|
2825
|
+
carClassIds: z6.array(z6.number()),
|
|
2826
|
+
carSwitching: z6.boolean(),
|
|
2827
|
+
carTypes: z6.array(z6.object({
|
|
2828
|
+
carType: z6.string()
|
|
2829
|
+
})),
|
|
2830
|
+
cautionLapsDoNotCount: z6.boolean(),
|
|
2831
|
+
complete: z6.boolean(),
|
|
2832
|
+
connectionBlackFlag: z6.boolean(),
|
|
2833
|
+
consecCautionWithinNlaps: z6.number(),
|
|
2834
|
+
consecCautionsSingleFile: z6.boolean(),
|
|
2835
|
+
crossLicense: z6.boolean(),
|
|
2836
|
+
currentWeekSched: z6.object({
|
|
2837
|
+
raceWeekNum: z6.number(),
|
|
2838
|
+
track: z6.object({
|
|
2839
|
+
category: z6.string(),
|
|
2840
|
+
categoryId: z6.number(),
|
|
2841
|
+
configName: z6.optional(z6.string()),
|
|
2842
|
+
trackId: z6.number(),
|
|
2843
|
+
trackName: z6.string()
|
|
2844
|
+
}),
|
|
2845
|
+
carRestrictions: z6.array(z6.object({
|
|
2846
|
+
carId: z6.number(),
|
|
2847
|
+
maxDryTireSets: z6.number(),
|
|
2848
|
+
maxPctFuelFill: z6.number(),
|
|
2849
|
+
powerAdjustPct: z6.number(),
|
|
2850
|
+
weightPenaltyKg: z6.number(),
|
|
2851
|
+
raceSetupId: z6.optional(z6.number()),
|
|
2852
|
+
qualSetupId: z6.optional(z6.number())
|
|
2853
|
+
})),
|
|
2854
|
+
raceLapLimit: z6.nullable(z6.number()),
|
|
2855
|
+
raceTimeLimit: z6.nullable(z6.number()),
|
|
2856
|
+
precipChance: z6.number(),
|
|
2857
|
+
startType: z6.string(),
|
|
2858
|
+
categoryId: z6.number()
|
|
2859
|
+
}),
|
|
2860
|
+
distributedMatchmaking: z6.boolean(),
|
|
2861
|
+
driverChangeRule: z6.number(),
|
|
2862
|
+
driverChanges: z6.boolean(),
|
|
2863
|
+
drops: z6.number(),
|
|
2864
|
+
elig: z6.object({
|
|
2865
|
+
ownCar: z6.boolean(),
|
|
2866
|
+
ownTrack: z6.boolean()
|
|
2867
|
+
}),
|
|
2868
|
+
enablePitlaneCollisions: z6.boolean(),
|
|
2869
|
+
fixedSetup: z6.boolean(),
|
|
2870
|
+
greenWhiteCheckeredLimit: z6.number(),
|
|
2871
|
+
gridByClass: z6.boolean(),
|
|
2872
|
+
hardcoreLevel: z6.number(),
|
|
2873
|
+
hasMpr: z6.boolean(),
|
|
2874
|
+
hasSupersessions: z6.boolean(),
|
|
2875
|
+
ignoreLicenseForPractice: z6.boolean(),
|
|
2876
|
+
incidentLimit: z6.number(),
|
|
2877
|
+
incidentWarnMode: z6.number(),
|
|
2878
|
+
incidentWarnParam1: z6.number(),
|
|
2879
|
+
incidentWarnParam2: z6.number(),
|
|
2880
|
+
isHeatRacing: z6.boolean(),
|
|
2881
|
+
licenseGroup: z6.number(),
|
|
2882
|
+
licenseGroupTypes: z6.array(z6.object({
|
|
2883
|
+
licenseGroupType: z6.number()
|
|
2884
|
+
})),
|
|
2885
|
+
luckyDog: z6.boolean(),
|
|
2886
|
+
maxTeamDrivers: z6.number(),
|
|
2887
|
+
maxWeeks: z6.number(),
|
|
2888
|
+
minTeamDrivers: z6.number(),
|
|
2889
|
+
multiclass: z6.boolean(),
|
|
2890
|
+
mustUseDiffTireTypesInRace: z6.boolean(),
|
|
2891
|
+
numFastTows: z6.number(),
|
|
2892
|
+
numOptLaps: z6.number(),
|
|
2893
|
+
official: z6.boolean(),
|
|
2894
|
+
opDuration: z6.number(),
|
|
2895
|
+
openPracticeSessionTypeId: z6.number(),
|
|
2896
|
+
qualifierMustStartRace: z6.boolean(),
|
|
2897
|
+
raceWeek: z6.number(),
|
|
2898
|
+
raceWeekToMakeDivisions: z6.number(),
|
|
2899
|
+
regUserCount: z6.number(),
|
|
2900
|
+
regionCompetition: z6.boolean(),
|
|
2901
|
+
restrictByMember: z6.boolean(),
|
|
2902
|
+
restrictToCar: z6.boolean(),
|
|
2903
|
+
restrictViewing: z6.boolean(),
|
|
2904
|
+
scheduleDescription: z6.string(),
|
|
2905
|
+
seasonQuarter: z6.number(),
|
|
2906
|
+
seasonShortName: z6.string(),
|
|
2907
|
+
seasonYear: z6.number(),
|
|
2908
|
+
sendToOpenPractice: z6.boolean(),
|
|
2909
|
+
seriesId: z6.number(),
|
|
2910
|
+
shortParadeLap: z6.boolean(),
|
|
2911
|
+
startDate: z6.string(),
|
|
2912
|
+
startOnQualTire: z6.boolean(),
|
|
2913
|
+
startZone: z6.boolean(),
|
|
2914
|
+
trackTypes: z6.array(z6.object({
|
|
2915
|
+
trackType: z6.string()
|
|
2916
|
+
})),
|
|
2917
|
+
unsportConductRuleMode: z6.number(),
|
|
2918
|
+
heatSesInfo: z6.optional(z6.object({
|
|
2919
|
+
consolationDeltaMaxFieldSize: z6.number(),
|
|
2920
|
+
consolationDeltaSessionLaps: z6.number(),
|
|
2921
|
+
consolationDeltaSessionLengthMinutes: z6.number(),
|
|
2922
|
+
consolationFirstMaxFieldSize: z6.number(),
|
|
2923
|
+
consolationFirstSessionLaps: z6.number(),
|
|
2924
|
+
consolationFirstSessionLengthMinutes: z6.number(),
|
|
2925
|
+
consolationNumPositionToInvert: z6.number(),
|
|
2926
|
+
consolationNumToConsolation: z6.number(),
|
|
2927
|
+
consolationNumToMain: z6.number(),
|
|
2928
|
+
consolationRunAlways: z6.boolean(),
|
|
2929
|
+
consolationScoresChampPoints: z6.boolean(),
|
|
2930
|
+
created: z6.string(),
|
|
2931
|
+
custId: z6.number(),
|
|
2932
|
+
description: z6.string(),
|
|
2933
|
+
heatCautionType: z6.number(),
|
|
2934
|
+
heatInfoId: z6.number(),
|
|
2935
|
+
heatInfoName: z6.string(),
|
|
2936
|
+
heatLaps: z6.number(),
|
|
2937
|
+
heatLengthMinutes: z6.number(),
|
|
2938
|
+
heatMaxFieldSize: z6.number(),
|
|
2939
|
+
heatNumFromEachToMain: z6.number(),
|
|
2940
|
+
heatNumPositionToInvert: z6.number(),
|
|
2941
|
+
heatScoresChampPoints: z6.boolean(),
|
|
2942
|
+
heatSessionMinutesEstimate: z6.number(),
|
|
2943
|
+
hidden: z6.boolean(),
|
|
2944
|
+
mainLaps: z6.number(),
|
|
2945
|
+
mainLengthMinutes: z6.number(),
|
|
2946
|
+
mainMaxFieldSize: z6.number(),
|
|
2947
|
+
mainNumPositionToInvert: z6.number(),
|
|
2948
|
+
maxEntrants: z6.number(),
|
|
2949
|
+
openPractice: z6.boolean(),
|
|
2950
|
+
preMainPracticeLengthMinutes: z6.number(),
|
|
2951
|
+
preQualNumToMain: z6.number(),
|
|
2952
|
+
preQualPracticeLengthMinutes: z6.number(),
|
|
2953
|
+
qualCautionType: z6.number(),
|
|
2954
|
+
qualLaps: z6.number(),
|
|
2955
|
+
qualLengthMinutes: z6.number(),
|
|
2956
|
+
qualNumToMain: z6.number(),
|
|
2957
|
+
qualOpenDelaySeconds: z6.number(),
|
|
2958
|
+
qualScoresChampPoints: z6.boolean(),
|
|
2959
|
+
qualScoring: z6.number(),
|
|
2960
|
+
qualStyle: z6.number(),
|
|
2961
|
+
raceStyle: z6.number()
|
|
2962
|
+
})),
|
|
2963
|
+
regOpenMinutes: z6.optional(z6.number())
|
|
2964
|
+
}))
|
|
2965
|
+
});
|
|
2966
|
+
var SeriesStatsSeries = z6.array(z6.object({
|
|
2967
|
+
seriesId: z6.number(),
|
|
2968
|
+
seriesName: z6.string(),
|
|
2969
|
+
seriesShortName: z6.string(),
|
|
2970
|
+
categoryId: z6.number(),
|
|
2971
|
+
category: z6.string(),
|
|
2972
|
+
active: z6.boolean(),
|
|
2973
|
+
official: z6.boolean(),
|
|
2974
|
+
fixedSetup: z6.boolean(),
|
|
2975
|
+
logo: z6.nullable(z6.string()),
|
|
2976
|
+
licenseGroup: z6.number(),
|
|
2977
|
+
licenseGroupTypes: z6.array(z6.object({
|
|
2978
|
+
licenseGroupType: z6.number()
|
|
2979
|
+
})),
|
|
2980
|
+
allowedLicenses: z6.array(z6.object({
|
|
2981
|
+
groupName: z6.string(),
|
|
2982
|
+
licenseGroup: z6.number(),
|
|
2983
|
+
maxLicenseLevel: z6.number(),
|
|
2984
|
+
minLicenseLevel: z6.number(),
|
|
2985
|
+
parentId: z6.number()
|
|
2986
|
+
})),
|
|
2987
|
+
seasons: z6.array(z6.object({
|
|
2988
|
+
seasonId: z6.number(),
|
|
2989
|
+
seriesId: z6.number(),
|
|
2990
|
+
seasonName: z6.string(),
|
|
2991
|
+
seasonShortName: z6.string(),
|
|
2992
|
+
seasonYear: z6.number(),
|
|
2993
|
+
seasonQuarter: z6.number(),
|
|
2994
|
+
active: z6.boolean(),
|
|
2995
|
+
official: z6.boolean(),
|
|
2996
|
+
driverChanges: z6.boolean(),
|
|
2997
|
+
fixedSetup: z6.boolean(),
|
|
2998
|
+
licenseGroup: z6.number(),
|
|
2999
|
+
hasSupersessions: z6.boolean(),
|
|
3000
|
+
carSwitching: z6.boolean(),
|
|
3001
|
+
licenseGroupTypes: z6.array(z6.object({
|
|
3002
|
+
licenseGroupType: z6.number()
|
|
3003
|
+
})),
|
|
3004
|
+
carClasses: z6.array(z6.object({
|
|
3005
|
+
carClassId: z6.number(),
|
|
3006
|
+
shortName: z6.string(),
|
|
3007
|
+
name: z6.string(),
|
|
3008
|
+
relativeSpeed: z6.number()
|
|
3009
|
+
})),
|
|
3010
|
+
raceWeeks: z6.array(z6.object({
|
|
3011
|
+
seasonId: z6.number(),
|
|
3012
|
+
raceWeekNum: z6.number(),
|
|
3013
|
+
track: z6.object({
|
|
3014
|
+
configName: z6.optional(z6.string()),
|
|
3015
|
+
trackId: z6.number(),
|
|
3016
|
+
trackName: z6.string()
|
|
3017
|
+
})
|
|
3018
|
+
}))
|
|
3019
|
+
})),
|
|
3020
|
+
searchFilters: z6.optional(z6.string())
|
|
3021
|
+
}));
|
|
3022
|
+
var SeriesAssetsParamsSchema = z6.object({});
|
|
3023
|
+
var SeriesGetParamsSchema = z6.object({});
|
|
3024
|
+
var SeriesPastSeasonsParamsSchema = z6.object({
|
|
3025
|
+
seriesId: z6.number()
|
|
3026
|
+
// maps to: series_id
|
|
3027
|
+
});
|
|
3028
|
+
var SeriesSeasonsParamsSchema = z6.object({
|
|
3029
|
+
includeSeries: z6.optional(z6.boolean()),
|
|
3030
|
+
// maps to: include_series
|
|
3031
|
+
seasonYear: z6.optional(z6.number()),
|
|
3032
|
+
// To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned. // maps to: season_year
|
|
3033
|
+
seasonQuarter: z6.optional(z6.number())
|
|
3034
|
+
// To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned. // maps to: season_quarter
|
|
3035
|
+
});
|
|
3036
|
+
var SeriesSeasonListParamsSchema = z6.object({
|
|
3037
|
+
includeSeries: z6.optional(z6.boolean()),
|
|
3038
|
+
// maps to: include_series
|
|
3039
|
+
seasonYear: z6.optional(z6.number()),
|
|
3040
|
+
// maps to: season_year
|
|
3041
|
+
seasonQuarter: z6.optional(z6.number())
|
|
3042
|
+
// maps to: season_quarter
|
|
3043
|
+
});
|
|
3044
|
+
var SeriesSeasonScheduleParamsSchema = z6.object({
|
|
3045
|
+
seasonId: z6.number()
|
|
3046
|
+
// maps to: season_id
|
|
3047
|
+
});
|
|
3048
|
+
var SeriesStatsSeriesParamsSchema = z6.object({});
|
|
3049
|
+
|
|
3050
|
+
// src/series/service.ts
|
|
3051
|
+
var SeriesService = class {
|
|
3052
|
+
constructor(client) {
|
|
3053
|
+
this.client = client;
|
|
3054
|
+
}
|
|
3055
|
+
/**
|
|
3056
|
+
* assets
|
|
3057
|
+
* @see https://members-ng.iracing.com/data/series/assets
|
|
3058
|
+
* @sample series.assets.json
|
|
3059
|
+
*/
|
|
3060
|
+
assets() {
|
|
3061
|
+
return __async(this, null, function* () {
|
|
3062
|
+
return this.client.get("https://members-ng.iracing.com/data/series/assets", { schema: SeriesAssets });
|
|
3063
|
+
});
|
|
3064
|
+
}
|
|
3065
|
+
/**
|
|
3066
|
+
* get
|
|
3067
|
+
* @see https://members-ng.iracing.com/data/series/get
|
|
3068
|
+
* @sample series.get.json
|
|
3069
|
+
*/
|
|
3070
|
+
get() {
|
|
3071
|
+
return __async(this, null, function* () {
|
|
3072
|
+
return this.client.get("https://members-ng.iracing.com/data/series/get", { schema: SeriesGet });
|
|
3073
|
+
});
|
|
3074
|
+
}
|
|
3075
|
+
/**
|
|
3076
|
+
* past_seasons
|
|
3077
|
+
* @see https://members-ng.iracing.com/data/series/past_seasons
|
|
3078
|
+
* @sample series.past_seasons.json
|
|
3079
|
+
*/
|
|
3080
|
+
pastSeasons(params) {
|
|
3081
|
+
return __async(this, null, function* () {
|
|
3082
|
+
return this.client.get("https://members-ng.iracing.com/data/series/past_seasons", { params, schema: SeriesPastSeasons });
|
|
3083
|
+
});
|
|
3084
|
+
}
|
|
3085
|
+
/**
|
|
3086
|
+
* seasons
|
|
3087
|
+
* @see https://members-ng.iracing.com/data/series/seasons
|
|
3088
|
+
* @sample series.seasons.json
|
|
3089
|
+
*/
|
|
3090
|
+
seasons(params) {
|
|
3091
|
+
return __async(this, null, function* () {
|
|
3092
|
+
return this.client.get("https://members-ng.iracing.com/data/series/seasons", { params, schema: SeriesSeasons });
|
|
3093
|
+
});
|
|
3094
|
+
}
|
|
3095
|
+
/**
|
|
3096
|
+
* season_list
|
|
3097
|
+
* @see https://members-ng.iracing.com/data/series/season_list
|
|
3098
|
+
* @sample series.season_list.json
|
|
3099
|
+
*/
|
|
3100
|
+
seasonList(params) {
|
|
3101
|
+
return __async(this, null, function* () {
|
|
3102
|
+
return this.client.get("https://members-ng.iracing.com/data/series/season_list", { params, schema: SeriesSeasonList });
|
|
3103
|
+
});
|
|
3104
|
+
}
|
|
3105
|
+
/**
|
|
3106
|
+
* season_schedule
|
|
3107
|
+
* @see https://members-ng.iracing.com/data/series/season_schedule
|
|
3108
|
+
*/
|
|
3109
|
+
seasonSchedule(params) {
|
|
3110
|
+
return __async(this, null, function* () {
|
|
3111
|
+
return this.client.get("https://members-ng.iracing.com/data/series/season_schedule", { params });
|
|
3112
|
+
});
|
|
3113
|
+
}
|
|
3114
|
+
/**
|
|
3115
|
+
* stats_series
|
|
3116
|
+
* @see https://members-ng.iracing.com/data/series/stats_series
|
|
3117
|
+
* @sample series.stats_series.json
|
|
3118
|
+
*/
|
|
3119
|
+
statsSeries() {
|
|
3120
|
+
return __async(this, null, function* () {
|
|
3121
|
+
return this.client.get("https://members-ng.iracing.com/data/series/stats_series", { schema: SeriesStatsSeries });
|
|
3122
|
+
});
|
|
3123
|
+
}
|
|
3124
|
+
};
|
|
3125
|
+
var StatsMemberBests = z6.object({
|
|
3126
|
+
carsDriven: z6.array(z6.object({
|
|
3127
|
+
carId: z6.number(),
|
|
3128
|
+
carName: z6.string()
|
|
3129
|
+
})),
|
|
3130
|
+
bests: z6.array(z6.object({
|
|
3131
|
+
track: z6.object({
|
|
3132
|
+
configName: z6.string(),
|
|
3133
|
+
trackId: z6.number(),
|
|
3134
|
+
trackName: z6.string()
|
|
3135
|
+
}),
|
|
3136
|
+
eventType: z6.string(),
|
|
3137
|
+
bestLapTime: z6.number(),
|
|
3138
|
+
subsessionId: z6.number(),
|
|
3139
|
+
endTime: z6.string(),
|
|
3140
|
+
seasonYear: z6.number(),
|
|
3141
|
+
seasonQuarter: z6.number()
|
|
3142
|
+
})),
|
|
3143
|
+
custId: z6.number(),
|
|
3144
|
+
carId: z6.number()
|
|
3145
|
+
});
|
|
3146
|
+
var StatsMemberCareer = z6.object({
|
|
3147
|
+
stats: z6.array(z6.object({
|
|
3148
|
+
categoryId: z6.number(),
|
|
3149
|
+
category: z6.string(),
|
|
3150
|
+
starts: z6.number(),
|
|
3151
|
+
wins: z6.number(),
|
|
3152
|
+
top5: z6.number(),
|
|
3153
|
+
poles: z6.number(),
|
|
3154
|
+
avgStartPosition: z6.number(),
|
|
3155
|
+
avgFinishPosition: z6.number(),
|
|
3156
|
+
laps: z6.number(),
|
|
3157
|
+
lapsLed: z6.number(),
|
|
3158
|
+
avgIncidents: z6.number(),
|
|
3159
|
+
avgPoints: z6.number(),
|
|
3160
|
+
winPercentage: z6.number(),
|
|
3161
|
+
top5Percentage: z6.number(),
|
|
3162
|
+
lapsLedPercentage: z6.number(),
|
|
3163
|
+
polesPercentage: z6.number()
|
|
3164
|
+
})),
|
|
3165
|
+
custId: z6.number()
|
|
3166
|
+
});
|
|
3167
|
+
var StatsMemberRecap = z6.object({
|
|
3168
|
+
year: z6.number(),
|
|
3169
|
+
stats: z6.object({
|
|
3170
|
+
starts: z6.number(),
|
|
3171
|
+
wins: z6.number(),
|
|
3172
|
+
top5: z6.number(),
|
|
3173
|
+
avgStartPosition: z6.number(),
|
|
3174
|
+
avgFinishPosition: z6.number(),
|
|
3175
|
+
laps: z6.number(),
|
|
3176
|
+
lapsLed: z6.number(),
|
|
3177
|
+
favoriteCar: z6.nullable(z6.object({
|
|
3178
|
+
carId: z6.number(),
|
|
3179
|
+
carName: z6.string(),
|
|
3180
|
+
carImage: z6.string()
|
|
3181
|
+
})),
|
|
3182
|
+
favoriteTrack: z6.nullable(z6.object({
|
|
3183
|
+
configName: z6.string(),
|
|
3184
|
+
trackId: z6.number(),
|
|
3185
|
+
trackLogo: z6.string(),
|
|
3186
|
+
trackName: z6.string()
|
|
3187
|
+
}))
|
|
3188
|
+
}),
|
|
3189
|
+
success: z6.boolean(),
|
|
3190
|
+
season: z6.nullable(z6.number()),
|
|
3191
|
+
custId: z6.number()
|
|
3192
|
+
});
|
|
3193
|
+
var StatsMemberRecentRaces = z6.object({
|
|
3194
|
+
races: z6.array(z6.object({
|
|
3195
|
+
seasonId: z6.number(),
|
|
3196
|
+
seriesId: z6.number(),
|
|
3197
|
+
seriesName: z6.string(),
|
|
3198
|
+
carId: z6.number(),
|
|
3199
|
+
carClassId: z6.number(),
|
|
3200
|
+
livery: z6.object({
|
|
3201
|
+
carId: z6.number(),
|
|
3202
|
+
pattern: z6.number(),
|
|
3203
|
+
color1: z6.string(),
|
|
3204
|
+
color2: z6.string(),
|
|
3205
|
+
color3: z6.string()
|
|
3206
|
+
}),
|
|
3207
|
+
licenseLevel: z6.number(),
|
|
3208
|
+
sessionStartTime: z6.string(),
|
|
3209
|
+
winnerGroupId: z6.number(),
|
|
3210
|
+
winnerName: z6.string(),
|
|
3211
|
+
winnerHelmet: z6.object({
|
|
3212
|
+
pattern: z6.number(),
|
|
3213
|
+
color1: z6.string(),
|
|
3214
|
+
color2: z6.string(),
|
|
3215
|
+
color3: z6.string(),
|
|
3216
|
+
faceType: z6.number(),
|
|
3217
|
+
helmetType: z6.number()
|
|
3218
|
+
}),
|
|
3219
|
+
winnerLicenseLevel: z6.number(),
|
|
3220
|
+
startPosition: z6.number(),
|
|
3221
|
+
finishPosition: z6.number(),
|
|
3222
|
+
qualifyingTime: z6.number(),
|
|
3223
|
+
laps: z6.number(),
|
|
3224
|
+
lapsLed: z6.number(),
|
|
3225
|
+
incidents: z6.number(),
|
|
3226
|
+
points: z6.number(),
|
|
3227
|
+
strengthOfField: z6.number(),
|
|
3228
|
+
subsessionId: z6.number(),
|
|
3229
|
+
oldSubLevel: z6.number(),
|
|
3230
|
+
newSubLevel: z6.number(),
|
|
3231
|
+
oldiRating: z6.number(),
|
|
3232
|
+
newiRating: z6.number(),
|
|
3233
|
+
track: z6.object({
|
|
3234
|
+
trackId: z6.number(),
|
|
3235
|
+
trackName: z6.string()
|
|
3236
|
+
}),
|
|
3237
|
+
dropRace: z6.boolean(),
|
|
3238
|
+
seasonYear: z6.number(),
|
|
3239
|
+
seasonQuarter: z6.number(),
|
|
3240
|
+
raceWeekNum: z6.number()
|
|
3241
|
+
})),
|
|
3242
|
+
custId: z6.number()
|
|
3243
|
+
});
|
|
3244
|
+
var StatsMemberSummary = z6.object({
|
|
3245
|
+
thisYear: z6.object({
|
|
3246
|
+
numOfficialSessions: z6.number(),
|
|
3247
|
+
numLeagueSessions: z6.number(),
|
|
3248
|
+
numOfficialWins: z6.number(),
|
|
3249
|
+
numLeagueWins: z6.number()
|
|
3250
|
+
}),
|
|
3251
|
+
custId: z6.number()
|
|
3252
|
+
});
|
|
3253
|
+
var StatsMemberYearly = z6.object({
|
|
3254
|
+
stats: z6.array(z6.object({
|
|
3255
|
+
categoryId: z6.number(),
|
|
3256
|
+
category: z6.string(),
|
|
3257
|
+
starts: z6.number(),
|
|
3258
|
+
wins: z6.number(),
|
|
3259
|
+
top5: z6.number(),
|
|
3260
|
+
poles: z6.number(),
|
|
3261
|
+
avgStartPosition: z6.number(),
|
|
3262
|
+
avgFinishPosition: z6.number(),
|
|
3263
|
+
laps: z6.number(),
|
|
3264
|
+
lapsLed: z6.number(),
|
|
3265
|
+
avgIncidents: z6.number(),
|
|
3266
|
+
avgPoints: z6.number(),
|
|
3267
|
+
winPercentage: z6.number(),
|
|
3268
|
+
top5Percentage: z6.number(),
|
|
3269
|
+
lapsLedPercentage: z6.number(),
|
|
3270
|
+
year: z6.number(),
|
|
3271
|
+
polesPercentage: z6.number()
|
|
3272
|
+
})),
|
|
3273
|
+
custId: z6.number()
|
|
3274
|
+
});
|
|
3275
|
+
var StatsWorldRecords = z6.object({
|
|
3276
|
+
type: z6.string(),
|
|
3277
|
+
data: z6.object({
|
|
3278
|
+
success: z6.boolean(),
|
|
3279
|
+
carId: z6.number(),
|
|
3280
|
+
trackId: z6.number(),
|
|
3281
|
+
chunkInfo: z6.nullable(z6.object({
|
|
3282
|
+
chunkSize: z6.number(),
|
|
3283
|
+
numChunks: z6.number(),
|
|
3284
|
+
rows: z6.number(),
|
|
3285
|
+
baseDownloadUrl: z6.string(),
|
|
3286
|
+
chunkFileNames: z6.array(z6.string())
|
|
3287
|
+
})),
|
|
3288
|
+
lastUpdated: z6.string(),
|
|
3289
|
+
seasonYear: z6.optional(z6.number()),
|
|
3290
|
+
seasonQuarter: z6.optional(z6.number())
|
|
3291
|
+
})
|
|
3292
|
+
});
|
|
3293
|
+
var StatsMemberBestsParamsSchema = z6.object({
|
|
3294
|
+
custId: z6.optional(z6.number()),
|
|
3295
|
+
// Defaults to the authenticated member. // maps to: cust_id
|
|
3296
|
+
carId: z6.optional(z6.number())
|
|
3297
|
+
// First call should exclude car_id; use cars_driven list in return for subsequent calls. // maps to: car_id
|
|
3298
|
+
});
|
|
3299
|
+
var StatsMemberCareerParamsSchema = z6.object({
|
|
3300
|
+
custId: z6.optional(z6.number())
|
|
3301
|
+
// Defaults to the authenticated member. // maps to: cust_id
|
|
3302
|
+
});
|
|
3303
|
+
var StatsMemberDivisionParamsSchema = z6.object({
|
|
3304
|
+
seasonId: z6.number(),
|
|
3305
|
+
// maps to: season_id
|
|
3306
|
+
eventType: z6.number()
|
|
3307
|
+
// The event type code for the division type: 4 - Time Trial; 5 - Race // maps to: event_type
|
|
3308
|
+
});
|
|
3309
|
+
var StatsMemberRecapParamsSchema = z6.object({
|
|
3310
|
+
custId: z6.optional(z6.number()),
|
|
3311
|
+
// Defaults to the authenticated member. // maps to: cust_id
|
|
3312
|
+
year: z6.optional(z6.number()),
|
|
3313
|
+
// Season year; if not supplied the current calendar year (UTC) is used.
|
|
3314
|
+
season: z6.optional(z6.number())
|
|
3315
|
+
// Season (quarter) within the year; if not supplied the recap will be fore the entire year.
|
|
3316
|
+
});
|
|
3317
|
+
var StatsMemberRecentRacesParamsSchema = z6.object({
|
|
3318
|
+
custId: z6.optional(z6.number())
|
|
3319
|
+
// Defaults to the authenticated member. // maps to: cust_id
|
|
3320
|
+
});
|
|
3321
|
+
var StatsMemberSummaryParamsSchema = z6.object({
|
|
3322
|
+
custId: z6.optional(z6.number())
|
|
3323
|
+
// Defaults to the authenticated member. // maps to: cust_id
|
|
3324
|
+
});
|
|
3325
|
+
var StatsMemberYearlyParamsSchema = z6.object({
|
|
3326
|
+
custId: z6.optional(z6.number())
|
|
3327
|
+
// Defaults to the authenticated member. // maps to: cust_id
|
|
3328
|
+
});
|
|
3329
|
+
var StatsSeasonDriverStandingsParamsSchema = z6.object({
|
|
3330
|
+
seasonId: z6.number(),
|
|
3331
|
+
// maps to: season_id
|
|
3332
|
+
carClassId: z6.number(),
|
|
3333
|
+
// maps to: car_class_id
|
|
3334
|
+
division: z6.optional(z6.number()),
|
|
3335
|
+
// Divisions are 0-based: 0 is Division 1, 10 is Rookie. See /data/constants/divisons for more information. Defaults to all.
|
|
3336
|
+
raceWeekNum: z6.optional(z6.number())
|
|
3337
|
+
// The first race week of a season is 0. // maps to: race_week_num
|
|
3338
|
+
});
|
|
3339
|
+
var StatsSeasonSupersessionStandingsParamsSchema = z6.object({
|
|
3340
|
+
seasonId: z6.number(),
|
|
3341
|
+
// maps to: season_id
|
|
3342
|
+
carClassId: z6.number(),
|
|
3343
|
+
// maps to: car_class_id
|
|
3344
|
+
division: z6.optional(z6.number()),
|
|
3345
|
+
// Divisions are 0-based: 0 is Division 1, 10 is Rookie. See /data/constants/divisons for more information. Defaults to all.
|
|
3346
|
+
raceWeekNum: z6.optional(z6.number())
|
|
3347
|
+
// The first race week of a season is 0. // maps to: race_week_num
|
|
3348
|
+
});
|
|
3349
|
+
var StatsSeasonTeamStandingsParamsSchema = z6.object({
|
|
3350
|
+
seasonId: z6.number(),
|
|
3351
|
+
// maps to: season_id
|
|
3352
|
+
carClassId: z6.number(),
|
|
3353
|
+
// maps to: car_class_id
|
|
3354
|
+
raceWeekNum: z6.optional(z6.number())
|
|
3355
|
+
// The first race week of a season is 0. // maps to: race_week_num
|
|
3356
|
+
});
|
|
3357
|
+
var StatsSeasonTtStandingsParamsSchema = z6.object({
|
|
3358
|
+
seasonId: z6.number(),
|
|
3359
|
+
// maps to: season_id
|
|
3360
|
+
carClassId: z6.number(),
|
|
3361
|
+
// maps to: car_class_id
|
|
3362
|
+
division: z6.optional(z6.number()),
|
|
3363
|
+
// Divisions are 0-based: 0 is Division 1, 10 is Rookie. See /data/constants/divisons for more information. Defaults to all.
|
|
3364
|
+
raceWeekNum: z6.optional(z6.number())
|
|
3365
|
+
// The first race week of a season is 0. // maps to: race_week_num
|
|
3366
|
+
});
|
|
3367
|
+
var StatsSeasonTtResultsParamsSchema = z6.object({
|
|
3368
|
+
seasonId: z6.number(),
|
|
3369
|
+
// maps to: season_id
|
|
3370
|
+
carClassId: z6.number(),
|
|
3371
|
+
// maps to: car_class_id
|
|
3372
|
+
raceWeekNum: z6.number(),
|
|
3373
|
+
// The first race week of a season is 0. // maps to: race_week_num
|
|
3374
|
+
division: z6.optional(z6.number())
|
|
3375
|
+
// Divisions are 0-based: 0 is Division 1, 10 is Rookie. See /data/constants/divisons for more information. Defaults to all.
|
|
3376
|
+
});
|
|
3377
|
+
var StatsSeasonQualifyResultsParamsSchema = z6.object({
|
|
3378
|
+
seasonId: z6.number(),
|
|
3379
|
+
// maps to: season_id
|
|
3380
|
+
carClassId: z6.number(),
|
|
3381
|
+
// maps to: car_class_id
|
|
3382
|
+
raceWeekNum: z6.number(),
|
|
3383
|
+
// The first race week of a season is 0. // maps to: race_week_num
|
|
3384
|
+
division: z6.optional(z6.number())
|
|
3385
|
+
// Divisions are 0-based: 0 is Division 1, 10 is Rookie. See /data/constants/divisons for more information. Defaults to all.
|
|
3386
|
+
});
|
|
3387
|
+
var StatsWorldRecordsParamsSchema = z6.object({
|
|
3388
|
+
carId: z6.number(),
|
|
3389
|
+
// maps to: car_id
|
|
3390
|
+
trackId: z6.number(),
|
|
3391
|
+
// maps to: track_id
|
|
3392
|
+
seasonYear: z6.optional(z6.number()),
|
|
3393
|
+
// Limit best times to a given year. // maps to: season_year
|
|
3394
|
+
seasonQuarter: z6.optional(z6.number())
|
|
3395
|
+
// Limit best times to a given quarter; only applicable when year is used. // maps to: season_quarter
|
|
3396
|
+
});
|
|
3397
|
+
|
|
3398
|
+
// src/stats/service.ts
|
|
3399
|
+
var StatsService = class {
|
|
3400
|
+
constructor(client) {
|
|
3401
|
+
this.client = client;
|
|
3402
|
+
}
|
|
3403
|
+
/**
|
|
3404
|
+
* member_bests
|
|
3405
|
+
* @see https://members-ng.iracing.com/data/stats/member_bests
|
|
3406
|
+
* @sample stats.member_bests.json
|
|
3407
|
+
*/
|
|
3408
|
+
memberBests(params) {
|
|
3409
|
+
return __async(this, null, function* () {
|
|
3410
|
+
return this.client.get("https://members-ng.iracing.com/data/stats/member_bests", { params, schema: StatsMemberBests });
|
|
3411
|
+
});
|
|
3412
|
+
}
|
|
3413
|
+
/**
|
|
3414
|
+
* member_career
|
|
3415
|
+
* @see https://members-ng.iracing.com/data/stats/member_career
|
|
3416
|
+
* @sample stats.member_career.json
|
|
3417
|
+
*/
|
|
3418
|
+
memberCareer(params) {
|
|
3419
|
+
return __async(this, null, function* () {
|
|
3420
|
+
return this.client.get("https://members-ng.iracing.com/data/stats/member_career", { params, schema: StatsMemberCareer });
|
|
3421
|
+
});
|
|
3422
|
+
}
|
|
3423
|
+
/**
|
|
3424
|
+
* member_division
|
|
3425
|
+
* @see https://members-ng.iracing.com/data/stats/member_division
|
|
3426
|
+
*/
|
|
3427
|
+
memberDivision(params) {
|
|
3428
|
+
return __async(this, null, function* () {
|
|
3429
|
+
return this.client.get("https://members-ng.iracing.com/data/stats/member_division", { params });
|
|
3430
|
+
});
|
|
3431
|
+
}
|
|
3432
|
+
/**
|
|
3433
|
+
* member_recap
|
|
3434
|
+
* @see https://members-ng.iracing.com/data/stats/member_recap
|
|
3435
|
+
* @sample stats.member_recap.json
|
|
3436
|
+
*/
|
|
3437
|
+
memberRecap(params) {
|
|
3438
|
+
return __async(this, null, function* () {
|
|
3439
|
+
return this.client.get("https://members-ng.iracing.com/data/stats/member_recap", { params, schema: StatsMemberRecap });
|
|
3440
|
+
});
|
|
3441
|
+
}
|
|
3442
|
+
/**
|
|
3443
|
+
* member_recent_races
|
|
3444
|
+
* @see https://members-ng.iracing.com/data/stats/member_recent_races
|
|
3445
|
+
* @sample stats.member_recent_races.json
|
|
3446
|
+
*/
|
|
3447
|
+
memberRecentRaces(params) {
|
|
3448
|
+
return __async(this, null, function* () {
|
|
3449
|
+
return this.client.get("https://members-ng.iracing.com/data/stats/member_recent_races", { params, schema: StatsMemberRecentRaces });
|
|
3450
|
+
});
|
|
3451
|
+
}
|
|
3452
|
+
/**
|
|
3453
|
+
* member_summary
|
|
3454
|
+
* @see https://members-ng.iracing.com/data/stats/member_summary
|
|
3455
|
+
* @sample stats.member_summary.json
|
|
3456
|
+
*/
|
|
3457
|
+
memberSummary(params) {
|
|
3458
|
+
return __async(this, null, function* () {
|
|
3459
|
+
return this.client.get("https://members-ng.iracing.com/data/stats/member_summary", { params, schema: StatsMemberSummary });
|
|
3460
|
+
});
|
|
3461
|
+
}
|
|
3462
|
+
/**
|
|
3463
|
+
* member_yearly
|
|
3464
|
+
* @see https://members-ng.iracing.com/data/stats/member_yearly
|
|
3465
|
+
* @sample stats.member_yearly.json
|
|
3466
|
+
*/
|
|
3467
|
+
memberYearly(params) {
|
|
3468
|
+
return __async(this, null, function* () {
|
|
3469
|
+
return this.client.get("https://members-ng.iracing.com/data/stats/member_yearly", { params, schema: StatsMemberYearly });
|
|
3470
|
+
});
|
|
3471
|
+
}
|
|
3472
|
+
/**
|
|
3473
|
+
* season_driver_standings
|
|
3474
|
+
* @see https://members-ng.iracing.com/data/stats/season_driver_standings
|
|
3475
|
+
*/
|
|
3476
|
+
seasonDriverStandings(params) {
|
|
3477
|
+
return __async(this, null, function* () {
|
|
3478
|
+
return this.client.get("https://members-ng.iracing.com/data/stats/season_driver_standings", { params });
|
|
3479
|
+
});
|
|
3480
|
+
}
|
|
3481
|
+
/**
|
|
3482
|
+
* season_supersession_standings
|
|
3483
|
+
* @see https://members-ng.iracing.com/data/stats/season_supersession_standings
|
|
3484
|
+
*/
|
|
3485
|
+
seasonSupersessionStandings(params) {
|
|
3486
|
+
return __async(this, null, function* () {
|
|
3487
|
+
return this.client.get("https://members-ng.iracing.com/data/stats/season_supersession_standings", { params });
|
|
3488
|
+
});
|
|
3489
|
+
}
|
|
3490
|
+
/**
|
|
3491
|
+
* season_team_standings
|
|
3492
|
+
* @see https://members-ng.iracing.com/data/stats/season_team_standings
|
|
3493
|
+
*/
|
|
3494
|
+
seasonTeamStandings(params) {
|
|
3495
|
+
return __async(this, null, function* () {
|
|
3496
|
+
return this.client.get("https://members-ng.iracing.com/data/stats/season_team_standings", { params });
|
|
3497
|
+
});
|
|
3498
|
+
}
|
|
3499
|
+
/**
|
|
3500
|
+
* season_tt_standings
|
|
3501
|
+
* @see https://members-ng.iracing.com/data/stats/season_tt_standings
|
|
3502
|
+
*/
|
|
3503
|
+
seasonTtStandings(params) {
|
|
3504
|
+
return __async(this, null, function* () {
|
|
3505
|
+
return this.client.get("https://members-ng.iracing.com/data/stats/season_tt_standings", { params });
|
|
3506
|
+
});
|
|
3507
|
+
}
|
|
3508
|
+
/**
|
|
3509
|
+
* season_tt_results
|
|
3510
|
+
* @see https://members-ng.iracing.com/data/stats/season_tt_results
|
|
3511
|
+
*/
|
|
3512
|
+
seasonTtResults(params) {
|
|
3513
|
+
return __async(this, null, function* () {
|
|
3514
|
+
return this.client.get("https://members-ng.iracing.com/data/stats/season_tt_results", { params });
|
|
3515
|
+
});
|
|
3516
|
+
}
|
|
3517
|
+
/**
|
|
3518
|
+
* season_qualify_results
|
|
3519
|
+
* @see https://members-ng.iracing.com/data/stats/season_qualify_results
|
|
3520
|
+
*/
|
|
3521
|
+
seasonQualifyResults(params) {
|
|
3522
|
+
return __async(this, null, function* () {
|
|
3523
|
+
return this.client.get("https://members-ng.iracing.com/data/stats/season_qualify_results", { params });
|
|
3524
|
+
});
|
|
3525
|
+
}
|
|
3526
|
+
/**
|
|
3527
|
+
* world_records
|
|
3528
|
+
* @see https://members-ng.iracing.com/data/stats/world_records
|
|
3529
|
+
* @sample stats.world_records.json
|
|
3530
|
+
*/
|
|
3531
|
+
worldRecords(params) {
|
|
3532
|
+
return __async(this, null, function* () {
|
|
3533
|
+
return this.client.get("https://members-ng.iracing.com/data/stats/world_records", { params, schema: StatsWorldRecords });
|
|
3534
|
+
});
|
|
3535
|
+
}
|
|
3536
|
+
};
|
|
3537
|
+
var TeamMembership = z6.array(z6.object({
|
|
3538
|
+
teamId: z6.number(),
|
|
3539
|
+
teamName: z6.string(),
|
|
3540
|
+
owner: z6.boolean(),
|
|
3541
|
+
admin: z6.boolean(),
|
|
3542
|
+
defaultTeam: z6.boolean()
|
|
3543
|
+
}));
|
|
3544
|
+
var TeamGetParamsSchema = z6.object({
|
|
3545
|
+
teamId: z6.number(),
|
|
3546
|
+
// maps to: team_id
|
|
3547
|
+
includeLicenses: z6.optional(z6.boolean())
|
|
3548
|
+
// For faster responses, only request when necessary. // maps to: include_licenses
|
|
3549
|
+
});
|
|
3550
|
+
var TeamMembershipParamsSchema = z6.object({});
|
|
3551
|
+
|
|
3552
|
+
// src/team/service.ts
|
|
3553
|
+
var TeamService = class {
|
|
3554
|
+
constructor(client) {
|
|
3555
|
+
this.client = client;
|
|
3556
|
+
}
|
|
3557
|
+
/**
|
|
3558
|
+
* get
|
|
3559
|
+
* @see https://members-ng.iracing.com/data/team/get
|
|
3560
|
+
*/
|
|
3561
|
+
get(params) {
|
|
3562
|
+
return __async(this, null, function* () {
|
|
3563
|
+
return this.client.get("https://members-ng.iracing.com/data/team/get", { params });
|
|
3564
|
+
});
|
|
3565
|
+
}
|
|
3566
|
+
/**
|
|
3567
|
+
* membership
|
|
3568
|
+
* @see https://members-ng.iracing.com/data/team/membership
|
|
3569
|
+
* @sample team.membership.json
|
|
3570
|
+
*/
|
|
3571
|
+
membership() {
|
|
3572
|
+
return __async(this, null, function* () {
|
|
3573
|
+
return this.client.get("https://members-ng.iracing.com/data/team/membership", { schema: TeamMembership });
|
|
3574
|
+
});
|
|
3575
|
+
}
|
|
3576
|
+
};
|
|
3577
|
+
var TimeAttackMemberSeasonResults = z6.array(z6.unknown());
|
|
3578
|
+
var TimeAttackMemberSeasonResultsParamsSchema = z6.object({
|
|
3579
|
+
taCompSeasonId: z6.number()
|
|
3580
|
+
// maps to: ta_comp_season_id
|
|
3581
|
+
});
|
|
3582
|
+
|
|
3583
|
+
// src/time-attack/service.ts
|
|
3584
|
+
var TimeAttackService = class {
|
|
3585
|
+
constructor(client) {
|
|
3586
|
+
this.client = client;
|
|
3587
|
+
}
|
|
3588
|
+
/**
|
|
3589
|
+
* member_season_results
|
|
3590
|
+
* @see https://members-ng.iracing.com/data/time_attack/member_season_results
|
|
3591
|
+
* @sample time_attack.member_season_results.json
|
|
3592
|
+
*/
|
|
3593
|
+
memberSeasonResults(params) {
|
|
3594
|
+
return __async(this, null, function* () {
|
|
3595
|
+
return this.client.get("https://members-ng.iracing.com/data/time_attack/member_season_results", { params, schema: TimeAttackMemberSeasonResults });
|
|
3596
|
+
});
|
|
3597
|
+
}
|
|
3598
|
+
};
|
|
3599
|
+
z6.object({
|
|
3600
|
+
background: z6.string(),
|
|
3601
|
+
inactive: z6.string(),
|
|
3602
|
+
active: z6.string(),
|
|
3603
|
+
pitroad: z6.string(),
|
|
3604
|
+
startFinish: z6.string(),
|
|
3605
|
+
// maps from: start-finish
|
|
3606
|
+
turns: z6.string()
|
|
3607
|
+
});
|
|
3608
|
+
var TrackAssets = z6.record(z6.string(), z6.object({
|
|
3609
|
+
coordinates: z6.optional(z6.nullable(z6.string())),
|
|
3610
|
+
detailCopy: z6.optional(z6.nullable(z6.string())),
|
|
3611
|
+
detailTechspecsCopy: z6.optional(z6.nullable(z6.string())),
|
|
3612
|
+
detailVideo: z6.optional(z6.nullable(z6.string())),
|
|
3613
|
+
folder: z6.optional(z6.nullable(z6.string())),
|
|
3614
|
+
galleryImages: z6.optional(z6.nullable(z6.string())),
|
|
3615
|
+
galleryPrefix: z6.optional(z6.nullable(z6.string())),
|
|
3616
|
+
largeImage: z6.optional(z6.nullable(z6.string())),
|
|
3617
|
+
logo: z6.optional(z6.nullable(z6.string())),
|
|
3618
|
+
north: z6.optional(z6.nullable(z6.string())),
|
|
3619
|
+
numSvgImages: z6.optional(z6.nullable(z6.number())),
|
|
3620
|
+
smallImage: z6.optional(z6.nullable(z6.string())),
|
|
3621
|
+
trackId: z6.optional(z6.nullable(z6.number())),
|
|
3622
|
+
trackMap: z6.optional(z6.nullable(z6.string())),
|
|
3623
|
+
trackMapLayers: z6.optional(z6.nullable(z6.object({
|
|
3624
|
+
background: z6.string(),
|
|
3625
|
+
inactive: z6.string(),
|
|
3626
|
+
active: z6.string(),
|
|
3627
|
+
pitroad: z6.string(),
|
|
3628
|
+
startFinish: z6.string(),
|
|
3629
|
+
turns: z6.string()
|
|
3630
|
+
})))
|
|
3631
|
+
}));
|
|
3632
|
+
var TrackGet = z6.array(z6.object({
|
|
3633
|
+
aiEnabled: z6.boolean(),
|
|
3634
|
+
allowPitlaneCollisions: z6.boolean(),
|
|
3635
|
+
allowRollingStart: z6.boolean(),
|
|
3636
|
+
allowStandingStart: z6.boolean(),
|
|
3637
|
+
awardExempt: z6.boolean(),
|
|
3638
|
+
category: z6.string(),
|
|
3639
|
+
categoryId: z6.number(),
|
|
3640
|
+
closes: z6.string(),
|
|
3641
|
+
configName: z6.optional(z6.string()),
|
|
3642
|
+
cornersPerLap: z6.number(),
|
|
3643
|
+
created: z6.string(),
|
|
3644
|
+
firstSale: z6.string(),
|
|
3645
|
+
folder: z6.string(),
|
|
3646
|
+
freeWithSubscription: z6.boolean(),
|
|
3647
|
+
fullyLit: z6.boolean(),
|
|
3648
|
+
gridStalls: z6.number(),
|
|
3649
|
+
hasOptPath: z6.boolean(),
|
|
3650
|
+
hasShortParadeLap: z6.boolean(),
|
|
3651
|
+
hasStartZone: z6.boolean(),
|
|
3652
|
+
hasSvgMap: z6.boolean(),
|
|
3653
|
+
isDirt: z6.boolean(),
|
|
3654
|
+
isOval: z6.boolean(),
|
|
3655
|
+
isPsPurchasable: z6.boolean(),
|
|
3656
|
+
lapScoring: z6.number(),
|
|
3657
|
+
latitude: z6.number(),
|
|
3658
|
+
location: z6.string(),
|
|
3659
|
+
logo: z6.string(),
|
|
3660
|
+
longitude: z6.number(),
|
|
3661
|
+
maxCars: z6.number(),
|
|
3662
|
+
nightLighting: z6.boolean(),
|
|
3663
|
+
numberPitstalls: z6.number(),
|
|
3664
|
+
opens: z6.string(),
|
|
3665
|
+
packageId: z6.number(),
|
|
3666
|
+
pitRoadSpeedLimit: z6.optional(z6.number()),
|
|
3667
|
+
price: z6.number(),
|
|
3668
|
+
priority: z6.number(),
|
|
3669
|
+
purchasable: z6.boolean(),
|
|
3670
|
+
qualifyLaps: z6.number(),
|
|
3671
|
+
rainEnabled: z6.boolean(),
|
|
3672
|
+
restartOnLeft: z6.boolean(),
|
|
3673
|
+
retired: z6.boolean(),
|
|
3674
|
+
searchFilters: z6.string(),
|
|
3675
|
+
siteUrl: z6.optional(z6.string()),
|
|
3676
|
+
sku: z6.number(),
|
|
3677
|
+
smallImage: z6.string(),
|
|
3678
|
+
soloLaps: z6.number(),
|
|
3679
|
+
startOnLeft: z6.boolean(),
|
|
3680
|
+
supportsGripCompound: z6.boolean(),
|
|
3681
|
+
techTrack: z6.boolean(),
|
|
3682
|
+
timeZone: z6.string(),
|
|
3683
|
+
trackConfigLength: z6.number(),
|
|
3684
|
+
trackDirpath: z6.string(),
|
|
3685
|
+
trackId: z6.number(),
|
|
3686
|
+
trackName: z6.string(),
|
|
3687
|
+
trackType: z6.number(),
|
|
3688
|
+
trackTypeText: z6.string(),
|
|
3689
|
+
trackTypes: z6.array(z6.object({
|
|
3690
|
+
trackType: z6.string()
|
|
3691
|
+
})),
|
|
3692
|
+
priceDisplay: z6.optional(z6.string()),
|
|
3693
|
+
nominalLapTime: z6.optional(z6.number()),
|
|
3694
|
+
banking: z6.optional(z6.string())
|
|
3695
|
+
}));
|
|
3696
|
+
var TrackAssetsParamsSchema = z6.object({});
|
|
3697
|
+
var TrackGetParamsSchema = z6.object({});
|
|
3698
|
+
|
|
3699
|
+
// src/track/service.ts
|
|
3700
|
+
var TrackService = class {
|
|
3701
|
+
constructor(client) {
|
|
3702
|
+
this.client = client;
|
|
3703
|
+
}
|
|
3704
|
+
/**
|
|
3705
|
+
* assets
|
|
3706
|
+
* @see https://members-ng.iracing.com/data/track/assets
|
|
3707
|
+
* @sample track.assets.json
|
|
3708
|
+
*/
|
|
3709
|
+
assets() {
|
|
3710
|
+
return __async(this, null, function* () {
|
|
3711
|
+
return this.client.get("https://members-ng.iracing.com/data/track/assets", { schema: TrackAssets });
|
|
3712
|
+
});
|
|
3713
|
+
}
|
|
3714
|
+
/**
|
|
3715
|
+
* get
|
|
3716
|
+
* @see https://members-ng.iracing.com/data/track/get
|
|
3717
|
+
* @sample track.get.json
|
|
3718
|
+
*/
|
|
3719
|
+
get() {
|
|
3720
|
+
return __async(this, null, function* () {
|
|
3721
|
+
return this.client.get("https://members-ng.iracing.com/data/track/get", { schema: TrackGet });
|
|
3722
|
+
});
|
|
3723
|
+
}
|
|
3724
|
+
};
|
|
3725
|
+
var ResultsGetParamsSchema = z6.object({
|
|
3726
|
+
subsessionId: z6.number(),
|
|
3727
|
+
// maps to: subsession_id
|
|
3728
|
+
includeLicenses: z6.optional(z6.boolean())
|
|
3729
|
+
// maps to: include_licenses
|
|
3730
|
+
});
|
|
3731
|
+
var ResultsEventLogParamsSchema = z6.object({
|
|
3732
|
+
subsessionId: z6.number(),
|
|
3733
|
+
// maps to: subsession_id
|
|
3734
|
+
simsessionNumber: z6.number()
|
|
3735
|
+
// The main event is 0; the preceding event is -1, and so on. // maps to: simsession_number
|
|
3736
|
+
});
|
|
3737
|
+
var ResultsLapChartDataParamsSchema = z6.object({
|
|
3738
|
+
subsessionId: z6.number(),
|
|
3739
|
+
// maps to: subsession_id
|
|
3740
|
+
simsessionNumber: z6.number()
|
|
3741
|
+
// The main event is 0; the preceding event is -1, and so on. // maps to: simsession_number
|
|
3742
|
+
});
|
|
3743
|
+
var ResultsLapDataParamsSchema = z6.object({
|
|
3744
|
+
subsessionId: z6.number(),
|
|
3745
|
+
// maps to: subsession_id
|
|
3746
|
+
simsessionNumber: z6.number(),
|
|
3747
|
+
// The main event is 0; the preceding event is -1, and so on. // maps to: simsession_number
|
|
3748
|
+
custId: z6.optional(z6.number()),
|
|
3749
|
+
// Required if the subsession was a single-driver event. Optional for team events. If omitted for a team event then the laps driven by all the team's drivers will be included. // maps to: cust_id
|
|
3750
|
+
teamId: z6.optional(z6.number())
|
|
3751
|
+
// Required if the subsession was a team event. // maps to: team_id
|
|
3752
|
+
});
|
|
3753
|
+
var ResultsSearchHostedParamsSchema = z6.object({
|
|
3754
|
+
startRangeBegin: z6.optional(z6.string()),
|
|
3755
|
+
// Session start times. ISO-8601 UTC time zero offset: "2022-04-01T15:45Z". // maps to: start_range_begin
|
|
3756
|
+
startRangeEnd: z6.optional(z6.string()),
|
|
3757
|
+
// ISO-8601 UTC time zero offset: "2022-04-01T15:45Z". Exclusive. May be omitted if start_range_begin is less than 90 days in the past. // maps to: start_range_end
|
|
3758
|
+
finishRangeBegin: z6.optional(z6.string()),
|
|
3759
|
+
// Session finish times. ISO-8601 UTC time zero offset: "2022-04-01T15:45Z". // maps to: finish_range_begin
|
|
3760
|
+
finishRangeEnd: z6.optional(z6.string()),
|
|
3761
|
+
// ISO-8601 UTC time zero offset: "2022-04-01T15:45Z". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past. // maps to: finish_range_end
|
|
3762
|
+
custId: z6.optional(z6.number()),
|
|
3763
|
+
// The participant's customer ID. Ignored if team_id is supplied. // maps to: cust_id
|
|
3764
|
+
teamId: z6.optional(z6.number()),
|
|
3765
|
+
// The team ID to search for. Takes priority over cust_id if both are supplied. // maps to: team_id
|
|
3766
|
+
hostCustId: z6.optional(z6.number()),
|
|
3767
|
+
// The host's customer ID. // maps to: host_cust_id
|
|
3768
|
+
sessionName: z6.optional(z6.string()),
|
|
3769
|
+
// Part or all of the session's name. // maps to: session_name
|
|
3770
|
+
leagueId: z6.optional(z6.number()),
|
|
3771
|
+
// Include only results for the league with this ID. // maps to: league_id
|
|
3772
|
+
leagueSeasonId: z6.optional(z6.number()),
|
|
3773
|
+
// Include only results for the league season with this ID. // maps to: league_season_id
|
|
3774
|
+
carId: z6.optional(z6.number()),
|
|
3775
|
+
// One of the cars used by the session. // maps to: car_id
|
|
3776
|
+
trackId: z6.optional(z6.number()),
|
|
3777
|
+
// The ID of the track used by the session. // maps to: track_id
|
|
3778
|
+
categoryIds: z6.optional(z6.array(z6.number()))
|
|
3779
|
+
// Track categories to include in the search. Defaults to all. ?category_ids=1,2,3,4 // maps to: category_ids
|
|
3780
|
+
});
|
|
3781
|
+
var ResultsSearchSeriesParamsSchema = z6.object({
|
|
3782
|
+
seasonYear: z6.optional(z6.number()),
|
|
3783
|
+
// Required when using season_quarter. // maps to: season_year
|
|
3784
|
+
seasonQuarter: z6.optional(z6.number()),
|
|
3785
|
+
// Required when using season_year. // maps to: season_quarter
|
|
3786
|
+
startRangeBegin: z6.optional(z6.string()),
|
|
3787
|
+
// Session start times. ISO-8601 UTC time zero offset: "2022-04-01T15:45Z". // maps to: start_range_begin
|
|
3788
|
+
startRangeEnd: z6.optional(z6.string()),
|
|
3789
|
+
// ISO-8601 UTC time zero offset: "2022-04-01T15:45Z". Exclusive. May be omitted if start_range_begin is less than 90 days in the past. // maps to: start_range_end
|
|
3790
|
+
finishRangeBegin: z6.optional(z6.string()),
|
|
3791
|
+
// Session finish times. ISO-8601 UTC time zero offset: "2022-04-01T15:45Z". // maps to: finish_range_begin
|
|
3792
|
+
finishRangeEnd: z6.optional(z6.string()),
|
|
3793
|
+
// ISO-8601 UTC time zero offset: "2022-04-01T15:45Z". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past. // maps to: finish_range_end
|
|
3794
|
+
custId: z6.optional(z6.number()),
|
|
3795
|
+
// Include only sessions in which this customer participated. Ignored if team_id is supplied. // maps to: cust_id
|
|
3796
|
+
teamId: z6.optional(z6.number()),
|
|
3797
|
+
// Include only sessions in which this team participated. Takes priority over cust_id if both are supplied. // maps to: team_id
|
|
3798
|
+
seriesId: z6.optional(z6.number()),
|
|
3799
|
+
// Include only sessions for series with this ID. // maps to: series_id
|
|
3800
|
+
raceWeekNum: z6.optional(z6.number()),
|
|
3801
|
+
// Include only sessions with this race week number. // maps to: race_week_num
|
|
3802
|
+
officialOnly: z6.optional(z6.boolean()),
|
|
3803
|
+
// If true, include only sessions earning championship points. Defaults to all. // maps to: official_only
|
|
3804
|
+
eventTypes: z6.optional(z6.array(z6.number())),
|
|
3805
|
+
// Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 // maps to: event_types
|
|
3806
|
+
categoryIds: z6.optional(z6.array(z6.number()))
|
|
3807
|
+
// License categories to include in the search. Defaults to all. ?category_ids=1,2,3,4 // maps to: category_ids
|
|
3808
|
+
});
|
|
3809
|
+
var ResultsSeasonResultsParamsSchema = z6.object({
|
|
3810
|
+
seasonId: z6.number(),
|
|
3811
|
+
// maps to: season_id
|
|
3812
|
+
eventType: z6.optional(z6.number()),
|
|
3813
|
+
// Retrict to one event type: 2 - Practice; 3 - Qualify; 4 - Time Trial; 5 - Race // maps to: event_type
|
|
3814
|
+
raceWeekNum: z6.optional(z6.number())
|
|
3815
|
+
// The first race week of a season is 0. // maps to: race_week_num
|
|
3816
|
+
});
|
|
3817
|
+
|
|
3818
|
+
// src/index.ts
|
|
3819
|
+
var IRacingDataClient = class {
|
|
3820
|
+
constructor(opts = {}) {
|
|
3821
|
+
__publicField(this, "client");
|
|
3822
|
+
__publicField(this, "car");
|
|
3823
|
+
__publicField(this, "carclass");
|
|
3824
|
+
__publicField(this, "constants");
|
|
3825
|
+
__publicField(this, "driverStatsByCategory");
|
|
3826
|
+
__publicField(this, "hosted");
|
|
3827
|
+
__publicField(this, "league");
|
|
3828
|
+
__publicField(this, "lookup");
|
|
3829
|
+
__publicField(this, "member");
|
|
3830
|
+
__publicField(this, "results");
|
|
3831
|
+
__publicField(this, "season");
|
|
3832
|
+
__publicField(this, "series");
|
|
3833
|
+
__publicField(this, "stats");
|
|
3834
|
+
__publicField(this, "team");
|
|
3835
|
+
__publicField(this, "timeAttack");
|
|
3836
|
+
__publicField(this, "track");
|
|
3837
|
+
this.client = new IRacingClient(opts);
|
|
3838
|
+
this.car = new CarService(this.client);
|
|
3839
|
+
this.carclass = new CarclassService(this.client);
|
|
3840
|
+
this.constants = new ConstantsService(this.client);
|
|
3841
|
+
this.driverStatsByCategory = new DriverStatsByCategoryService(this.client);
|
|
3842
|
+
this.hosted = new HostedService(this.client);
|
|
3843
|
+
this.league = new LeagueService(this.client);
|
|
3844
|
+
this.lookup = new LookupService(this.client);
|
|
3845
|
+
this.member = new MemberService(this.client);
|
|
3846
|
+
this.results = new ResultsService(this.client);
|
|
3847
|
+
this.season = new SeasonService(this.client);
|
|
3848
|
+
this.series = new SeriesService(this.client);
|
|
3849
|
+
this.stats = new StatsService(this.client);
|
|
3850
|
+
this.team = new TeamService(this.client);
|
|
3851
|
+
this.timeAttack = new TimeAttackService(this.client);
|
|
3852
|
+
this.track = new TrackService(this.client);
|
|
3853
|
+
}
|
|
3854
|
+
};
|
|
3855
|
+
|
|
3856
|
+
export { CarAssets, CarAssetsParamsSchema, CarGet, CarGetParamsSchema, CarclassGet, CarclassGetParamsSchema, ConstantsCategories, ConstantsCategoriesParamsSchema, ConstantsDivisions, ConstantsDivisionsParamsSchema, ConstantsEventTypes, ConstantsEventTypesParamsSchema, DriverStatsByCategoryDirtOval, DriverStatsByCategoryDirtOvalParamsSchema, DriverStatsByCategoryDirtRoad, DriverStatsByCategoryDirtRoadParamsSchema, DriverStatsByCategoryFormulaCar, DriverStatsByCategoryFormulaCarParamsSchema, DriverStatsByCategoryOval, DriverStatsByCategoryOvalParamsSchema, DriverStatsByCategoryRoad, DriverStatsByCategoryRoadParamsSchema, DriverStatsByCategorySportsCar, DriverStatsByCategorySportsCarParamsSchema, HostedCombinedSessions, HostedCombinedSessionsParamsSchema, HostedSessions, HostedSessionsParamsSchema, IRacingClient, IRacingDataClient, IRacingError, LeagueCustLeagueSessions, LeagueCustLeagueSessionsParamsSchema, LeagueDirectory, LeagueDirectoryParamsSchema, LeagueGet, LeagueGetParamsSchema, LeagueGetPointsSystems, LeagueGetPointsSystemsParamsSchema, LeagueMembership, LeagueMembershipParamsSchema, LeagueRoster, LeagueRosterParamsSchema, LeagueSeasonSessions, LeagueSeasonSessionsParamsSchema, LeagueSeasonStandings, LeagueSeasonStandingsParamsSchema, LeagueSeasons, LeagueSeasonsParamsSchema, LookupCountries, LookupCountriesParamsSchema, LookupDrivers, LookupDriversParamsSchema, LookupFlairs, LookupFlairsParamsSchema, LookupGet, LookupGetParamsSchema, LookupLicenses, LookupLicensesParamsSchema, MemberAwardInstances, MemberAwardInstancesParamsSchema, MemberAwards, MemberAwardsParamsSchema, MemberChartData, MemberChartDataParamsSchema, MemberGet, MemberGetParamsSchema, MemberInfo, MemberInfoParamsSchema, MemberParticipationCredits, MemberParticipationCreditsParamsSchema, MemberProfile, MemberProfileParamsSchema, ResultsEventLogParamsSchema, ResultsGetParamsSchema, ResultsLapChartDataParamsSchema, ResultsLapDataParamsSchema, ResultsSearchHostedParamsSchema, ResultsSearchSeriesParamsSchema, ResultsSeasonResultsParamsSchema, SeasonList, SeasonListParamsSchema, SeasonRaceGuide, SeasonRaceGuideParamsSchema, SeasonSpectatorSubsessionids, SeasonSpectatorSubsessionidsDetail, SeasonSpectatorSubsessionidsDetailParamsSchema, SeasonSpectatorSubsessionidsParamsSchema, SeriesAssets, SeriesAssetsParamsSchema, SeriesGet, SeriesGetParamsSchema, SeriesPastSeasons, SeriesPastSeasonsParamsSchema, SeriesSeasonList, SeriesSeasonListParamsSchema, SeriesSeasonScheduleParamsSchema, SeriesSeasons, SeriesSeasonsParamsSchema, SeriesStatsSeries, SeriesStatsSeriesParamsSchema, StatsMemberBests, StatsMemberBestsParamsSchema, StatsMemberCareer, StatsMemberCareerParamsSchema, StatsMemberDivisionParamsSchema, StatsMemberRecap, StatsMemberRecapParamsSchema, StatsMemberRecentRaces, StatsMemberRecentRacesParamsSchema, StatsMemberSummary, StatsMemberSummaryParamsSchema, StatsMemberYearly, StatsMemberYearlyParamsSchema, StatsSeasonDriverStandingsParamsSchema, StatsSeasonQualifyResultsParamsSchema, StatsSeasonSupersessionStandingsParamsSchema, StatsSeasonTeamStandingsParamsSchema, StatsSeasonTtResultsParamsSchema, StatsSeasonTtStandingsParamsSchema, StatsWorldRecords, StatsWorldRecordsParamsSchema, TeamGetParamsSchema, TeamMembership, TeamMembershipParamsSchema, TimeAttackMemberSeasonResults, TimeAttackMemberSeasonResultsParamsSchema, TrackAssets, TrackAssetsParamsSchema, TrackGet, TrackGetParamsSchema };
|
|
3857
|
+
//# sourceMappingURL=index.mjs.map
|
|
3858
|
+
//# sourceMappingURL=index.mjs.map
|