@lichess-org/types 2.0.68 → 2.0.70
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 +160 -9
- 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;
|
|
@@ -687,7 +713,7 @@ export interface paths {
|
|
|
687
713
|
* @description Stream positions and moves of any ongoing game, in [ndjson](#section/Introduction/Streaming-with-ND-JSON).
|
|
688
714
|
* A description of the game is sent as a first message.
|
|
689
715
|
* Then a message is sent each time a move is played.
|
|
690
|
-
* Finally a description of the game is sent when it finishes, and the stream is closed.
|
|
716
|
+
* Finally, a description of the game is sent when it finishes, and the stream is closed.
|
|
691
717
|
* Ongoing games are delayed by a few seconds ranging from 3 to 60 depending on the time control, as to prevent cheat bots from using this API.
|
|
692
718
|
* No more than 8 game streams can be opened at the same time from the same IP address.
|
|
693
719
|
*
|
|
@@ -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;
|
|
@@ -5799,8 +5865,9 @@ export interface components {
|
|
|
5799
5865
|
url: string;
|
|
5800
5866
|
};
|
|
5801
5867
|
BroadcastGroupTour: {
|
|
5802
|
-
name
|
|
5803
|
-
id
|
|
5868
|
+
name: string;
|
|
5869
|
+
id: string;
|
|
5870
|
+
live?: boolean;
|
|
5804
5871
|
};
|
|
5805
5872
|
BroadcastGroup: {
|
|
5806
5873
|
name?: string;
|
|
@@ -6727,12 +6794,6 @@ export interface components {
|
|
|
6727
6794
|
gone: boolean;
|
|
6728
6795
|
claimWinInSeconds?: number;
|
|
6729
6796
|
};
|
|
6730
|
-
/** @example {
|
|
6731
|
-
* "error": "Not found."
|
|
6732
|
-
* } */
|
|
6733
|
-
NotFound: {
|
|
6734
|
-
error?: string;
|
|
6735
|
-
};
|
|
6736
6797
|
/** @example [
|
|
6737
6798
|
* {
|
|
6738
6799
|
* "text": "Takeback sent",
|
|
@@ -10187,6 +10248,84 @@ export interface operations {
|
|
|
10187
10248
|
};
|
|
10188
10249
|
};
|
|
10189
10250
|
};
|
|
10251
|
+
racerGet: {
|
|
10252
|
+
parameters: {
|
|
10253
|
+
query?: never;
|
|
10254
|
+
header?: never;
|
|
10255
|
+
path: {
|
|
10256
|
+
/** @description The puzzle race ID */
|
|
10257
|
+
id: string;
|
|
10258
|
+
};
|
|
10259
|
+
cookie?: never;
|
|
10260
|
+
};
|
|
10261
|
+
requestBody?: never;
|
|
10262
|
+
responses: {
|
|
10263
|
+
/** @description The puzzle race results. */
|
|
10264
|
+
200: {
|
|
10265
|
+
headers: {
|
|
10266
|
+
"Access-Control-Allow-Origin"?: string;
|
|
10267
|
+
[name: string]: unknown;
|
|
10268
|
+
};
|
|
10269
|
+
content: {
|
|
10270
|
+
/** @example {
|
|
10271
|
+
* "finishesAt": 1755416156218,
|
|
10272
|
+
* "id": "5Nrt6",
|
|
10273
|
+
* "owner": "lichess",
|
|
10274
|
+
* "players": [
|
|
10275
|
+
* {
|
|
10276
|
+
* "id": "requiem_123",
|
|
10277
|
+
* "name": "requiem_123",
|
|
10278
|
+
* "score": 60
|
|
10279
|
+
* },
|
|
10280
|
+
* {
|
|
10281
|
+
* "flair": "nature.seedling",
|
|
10282
|
+
* "id": "thibault",
|
|
10283
|
+
* "name": "thibault",
|
|
10284
|
+
* "patron": true,
|
|
10285
|
+
* "score": 28
|
|
10286
|
+
* },
|
|
10287
|
+
* {
|
|
10288
|
+
* "id": "steponlego",
|
|
10289
|
+
* "name": "StepOnLego",
|
|
10290
|
+
* "score": 0
|
|
10291
|
+
* }
|
|
10292
|
+
* ],
|
|
10293
|
+
* "puzzles": [
|
|
10294
|
+
* {
|
|
10295
|
+
* "fen": "r5k1/2p2pp1/1p1pP2p/3P4/1nP2q2/7P/4Q1B1/4R1K1 b - - 0 33",
|
|
10296
|
+
* "id": "sFlb3",
|
|
10297
|
+
* "line": "a8a2 e2a2 b4a2 e6e7",
|
|
10298
|
+
* "rating": 2450
|
|
10299
|
+
* },
|
|
10300
|
+
* {
|
|
10301
|
+
* "fen": "r2q3k/4r1p1/p2bB1PR/1p1Pp3/2p1P3/5Q2/PPP5/1K3R2 b - - 0 24",
|
|
10302
|
+
* "id": "h005v",
|
|
10303
|
+
* "line": "g7h6 f3f6 e7g7 f1h1 d8f6 h1h6 g7h7 h6h7",
|
|
10304
|
+
* "rating": 2471
|
|
10305
|
+
* },
|
|
10306
|
+
* {
|
|
10307
|
+
* "fen": "5r1k/r7/2p1B1QP/2P2p1R/1p2nq2/8/2P2pK1/5R2 b - - 3 38",
|
|
10308
|
+
* "id": "6xTuz",
|
|
10309
|
+
* "line": "a7h7 h5f5 h7h6 f5f8 f4f8 g6e4",
|
|
10310
|
+
* "rating": 2487
|
|
10311
|
+
* }
|
|
10312
|
+
* ],
|
|
10313
|
+
* "startsAt": 1755416066218
|
|
10314
|
+
* } */
|
|
10315
|
+
"application/json": components["schemas"]["PuzzleRaceResults"];
|
|
10316
|
+
};
|
|
10317
|
+
};
|
|
10318
|
+
/** @description The puzzle race was not found, or is no longer available. */
|
|
10319
|
+
404: {
|
|
10320
|
+
headers: {
|
|
10321
|
+
[name: string]: unknown;
|
|
10322
|
+
};
|
|
10323
|
+
content: {
|
|
10324
|
+
"application/json": components["schemas"]["NotFound"];
|
|
10325
|
+
};
|
|
10326
|
+
};
|
|
10327
|
+
};
|
|
10328
|
+
};
|
|
10190
10329
|
apiUsers: {
|
|
10191
10330
|
parameters: {
|
|
10192
10331
|
query?: never;
|
|
@@ -12728,6 +12867,18 @@ export interface operations {
|
|
|
12728
12867
|
"application/x-ndjson": components["schemas"]["MoveStream"];
|
|
12729
12868
|
};
|
|
12730
12869
|
};
|
|
12870
|
+
/** @description Too many streams opened at the same time from this IP. */
|
|
12871
|
+
429: {
|
|
12872
|
+
headers: {
|
|
12873
|
+
[name: string]: unknown;
|
|
12874
|
+
};
|
|
12875
|
+
content: {
|
|
12876
|
+
"application/json": {
|
|
12877
|
+
/** @example Please only run 8 request(s) at a time */
|
|
12878
|
+
error?: string;
|
|
12879
|
+
};
|
|
12880
|
+
};
|
|
12881
|
+
};
|
|
12731
12882
|
};
|
|
12732
12883
|
};
|
|
12733
12884
|
gameImport: {
|