@lichess-org/types 2.0.68 → 2.0.69
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/lichess-api.d.ts +144 -6
- package/package.json +1 -1
package/lichess-api.d.ts
CHANGED
|
@@ -341,6 +341,32 @@ export interface paths {
|
|
|
341
341
|
patch?: never;
|
|
342
342
|
trace?: never;
|
|
343
343
|
};
|
|
344
|
+
"/api/racer/{id}": {
|
|
345
|
+
parameters: {
|
|
346
|
+
query?: never;
|
|
347
|
+
header?: never;
|
|
348
|
+
path?: never;
|
|
349
|
+
cookie?: never;
|
|
350
|
+
};
|
|
351
|
+
/**
|
|
352
|
+
* Get puzzle race results
|
|
353
|
+
* @description Get the results of a [puzzle race](https://lichess.org/racer).
|
|
354
|
+
* Returns information about players, puzzles, and the current status of the race.
|
|
355
|
+
* - <https://lichess.org/racer>
|
|
356
|
+
*
|
|
357
|
+
* Note that Lichess puzzle races are not persisted, and are only available
|
|
358
|
+
* for 30 minutes. After that delay, they are permanently deleted.
|
|
359
|
+
*
|
|
360
|
+
*/
|
|
361
|
+
get: operations["racerGet"];
|
|
362
|
+
put?: never;
|
|
363
|
+
post?: never;
|
|
364
|
+
delete?: never;
|
|
365
|
+
options?: never;
|
|
366
|
+
head?: never;
|
|
367
|
+
patch?: never;
|
|
368
|
+
trace?: never;
|
|
369
|
+
};
|
|
344
370
|
"/api/users": {
|
|
345
371
|
parameters: {
|
|
346
372
|
query?: never;
|
|
@@ -4600,6 +4626,46 @@ export interface components {
|
|
|
4600
4626
|
/** Format: uri */
|
|
4601
4627
|
url: string;
|
|
4602
4628
|
};
|
|
4629
|
+
PuzzleRaceResults: {
|
|
4630
|
+
/** @description Unique identifier of the puzzle race */
|
|
4631
|
+
id: string;
|
|
4632
|
+
/** @description Owner of the puzzle race */
|
|
4633
|
+
owner: string;
|
|
4634
|
+
/** @description List of players participating in the race */
|
|
4635
|
+
players: {
|
|
4636
|
+
/** @description Player username */
|
|
4637
|
+
name: string;
|
|
4638
|
+
/** @description Player's current score in the race */
|
|
4639
|
+
score: number;
|
|
4640
|
+
/** @description User ID. Missing if player is anonymous. */
|
|
4641
|
+
id?: string;
|
|
4642
|
+
/** @description User's flair icon */
|
|
4643
|
+
flair?: string;
|
|
4644
|
+
/** @description Whether the player is a Lichess patron */
|
|
4645
|
+
patron?: boolean;
|
|
4646
|
+
}[];
|
|
4647
|
+
/** @description List of puzzles in the race */
|
|
4648
|
+
puzzles: {
|
|
4649
|
+
/** @description Puzzle ID */
|
|
4650
|
+
id: string;
|
|
4651
|
+
/** @description FEN position of the puzzle */
|
|
4652
|
+
fen: string;
|
|
4653
|
+
/** @description Solution moves sequence */
|
|
4654
|
+
line: string;
|
|
4655
|
+
/** @description Puzzle Glicko2 rating */
|
|
4656
|
+
rating: number;
|
|
4657
|
+
}[];
|
|
4658
|
+
/** @description Timestamp in milliseconds when the race finishes */
|
|
4659
|
+
finishesAt: number;
|
|
4660
|
+
/** @description Timestamp in milliseconds when the race started */
|
|
4661
|
+
startsAt: number;
|
|
4662
|
+
};
|
|
4663
|
+
/** @example {
|
|
4664
|
+
* "error": "Not found."
|
|
4665
|
+
* } */
|
|
4666
|
+
NotFound: {
|
|
4667
|
+
error?: string;
|
|
4668
|
+
};
|
|
4603
4669
|
UserPreferences: {
|
|
4604
4670
|
dark?: boolean;
|
|
4605
4671
|
transp?: boolean;
|
|
@@ -6727,12 +6793,6 @@ export interface components {
|
|
|
6727
6793
|
gone: boolean;
|
|
6728
6794
|
claimWinInSeconds?: number;
|
|
6729
6795
|
};
|
|
6730
|
-
/** @example {
|
|
6731
|
-
* "error": "Not found."
|
|
6732
|
-
* } */
|
|
6733
|
-
NotFound: {
|
|
6734
|
-
error?: string;
|
|
6735
|
-
};
|
|
6736
6796
|
/** @example [
|
|
6737
6797
|
* {
|
|
6738
6798
|
* "text": "Takeback sent",
|
|
@@ -10187,6 +10247,84 @@ export interface operations {
|
|
|
10187
10247
|
};
|
|
10188
10248
|
};
|
|
10189
10249
|
};
|
|
10250
|
+
racerGet: {
|
|
10251
|
+
parameters: {
|
|
10252
|
+
query?: never;
|
|
10253
|
+
header?: never;
|
|
10254
|
+
path: {
|
|
10255
|
+
/** @description The puzzle race ID */
|
|
10256
|
+
id: string;
|
|
10257
|
+
};
|
|
10258
|
+
cookie?: never;
|
|
10259
|
+
};
|
|
10260
|
+
requestBody?: never;
|
|
10261
|
+
responses: {
|
|
10262
|
+
/** @description The puzzle race results. */
|
|
10263
|
+
200: {
|
|
10264
|
+
headers: {
|
|
10265
|
+
"Access-Control-Allow-Origin"?: string;
|
|
10266
|
+
[name: string]: unknown;
|
|
10267
|
+
};
|
|
10268
|
+
content: {
|
|
10269
|
+
/** @example {
|
|
10270
|
+
* "finishesAt": 1755416156218,
|
|
10271
|
+
* "id": "5Nrt6",
|
|
10272
|
+
* "owner": "lichess",
|
|
10273
|
+
* "players": [
|
|
10274
|
+
* {
|
|
10275
|
+
* "id": "requiem_123",
|
|
10276
|
+
* "name": "requiem_123",
|
|
10277
|
+
* "score": 60
|
|
10278
|
+
* },
|
|
10279
|
+
* {
|
|
10280
|
+
* "flair": "nature.seedling",
|
|
10281
|
+
* "id": "thibault",
|
|
10282
|
+
* "name": "thibault",
|
|
10283
|
+
* "patron": true,
|
|
10284
|
+
* "score": 28
|
|
10285
|
+
* },
|
|
10286
|
+
* {
|
|
10287
|
+
* "id": "steponlego",
|
|
10288
|
+
* "name": "StepOnLego",
|
|
10289
|
+
* "score": 0
|
|
10290
|
+
* }
|
|
10291
|
+
* ],
|
|
10292
|
+
* "puzzles": [
|
|
10293
|
+
* {
|
|
10294
|
+
* "fen": "r5k1/2p2pp1/1p1pP2p/3P4/1nP2q2/7P/4Q1B1/4R1K1 b - - 0 33",
|
|
10295
|
+
* "id": "sFlb3",
|
|
10296
|
+
* "line": "a8a2 e2a2 b4a2 e6e7",
|
|
10297
|
+
* "rating": 2450
|
|
10298
|
+
* },
|
|
10299
|
+
* {
|
|
10300
|
+
* "fen": "r2q3k/4r1p1/p2bB1PR/1p1Pp3/2p1P3/5Q2/PPP5/1K3R2 b - - 0 24",
|
|
10301
|
+
* "id": "h005v",
|
|
10302
|
+
* "line": "g7h6 f3f6 e7g7 f1h1 d8f6 h1h6 g7h7 h6h7",
|
|
10303
|
+
* "rating": 2471
|
|
10304
|
+
* },
|
|
10305
|
+
* {
|
|
10306
|
+
* "fen": "5r1k/r7/2p1B1QP/2P2p1R/1p2nq2/8/2P2pK1/5R2 b - - 3 38",
|
|
10307
|
+
* "id": "6xTuz",
|
|
10308
|
+
* "line": "a7h7 h5f5 h7h6 f5f8 f4f8 g6e4",
|
|
10309
|
+
* "rating": 2487
|
|
10310
|
+
* }
|
|
10311
|
+
* ],
|
|
10312
|
+
* "startsAt": 1755416066218
|
|
10313
|
+
* } */
|
|
10314
|
+
"application/json": components["schemas"]["PuzzleRaceResults"];
|
|
10315
|
+
};
|
|
10316
|
+
};
|
|
10317
|
+
/** @description The puzzle race was not found, or is no longer available. */
|
|
10318
|
+
404: {
|
|
10319
|
+
headers: {
|
|
10320
|
+
[name: string]: unknown;
|
|
10321
|
+
};
|
|
10322
|
+
content: {
|
|
10323
|
+
"application/json": components["schemas"]["NotFound"];
|
|
10324
|
+
};
|
|
10325
|
+
};
|
|
10326
|
+
};
|
|
10327
|
+
};
|
|
10190
10328
|
apiUsers: {
|
|
10191
10329
|
parameters: {
|
|
10192
10330
|
query?: never;
|