@lichess-org/types 2.0.79 → 2.0.81
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 +112 -6
- package/package.json +1 -1
package/lichess-api.d.ts
CHANGED
|
@@ -244,9 +244,14 @@ export interface paths {
|
|
|
244
244
|
* **DO NOT** use this endpoint to enumerate puzzles for mass download. Instead, download the [full public puzzle database](https://database.lichess.org/#puzzles).
|
|
245
245
|
*
|
|
246
246
|
*/
|
|
247
|
-
get: operations["
|
|
247
|
+
get: operations["apiPuzzleBatchSelect"];
|
|
248
248
|
put?: never;
|
|
249
|
-
|
|
249
|
+
/**
|
|
250
|
+
* Solve multiple puzzles at once
|
|
251
|
+
* @description Set puzzles as solved and update ratings.
|
|
252
|
+
*
|
|
253
|
+
*/
|
|
254
|
+
post: operations["apiPuzzleBatchSolve"];
|
|
250
255
|
delete?: never;
|
|
251
256
|
options?: never;
|
|
252
257
|
head?: never;
|
|
@@ -4623,8 +4628,19 @@ export interface components {
|
|
|
4623
4628
|
themes: string[];
|
|
4624
4629
|
};
|
|
4625
4630
|
};
|
|
4626
|
-
|
|
4631
|
+
PuzzleBatchSelect: {
|
|
4632
|
+
puzzles?: components["schemas"]["PuzzleAndGame"][];
|
|
4633
|
+
};
|
|
4634
|
+
PuzzleBatchSolveRequest: {
|
|
4635
|
+
solutions?: {
|
|
4636
|
+
id?: string;
|
|
4637
|
+
win?: boolean;
|
|
4638
|
+
rated?: boolean;
|
|
4639
|
+
}[];
|
|
4640
|
+
};
|
|
4641
|
+
PuzzleBatchSolveResponse: {
|
|
4627
4642
|
puzzles?: components["schemas"]["PuzzleAndGame"][];
|
|
4643
|
+
rounds?: unknown[];
|
|
4628
4644
|
};
|
|
4629
4645
|
PuzzleActivity: {
|
|
4630
4646
|
date: number;
|
|
@@ -10273,7 +10289,7 @@ export interface operations {
|
|
|
10273
10289
|
};
|
|
10274
10290
|
};
|
|
10275
10291
|
};
|
|
10276
|
-
|
|
10292
|
+
apiPuzzleBatchSelect: {
|
|
10277
10293
|
parameters: {
|
|
10278
10294
|
query?: {
|
|
10279
10295
|
/** @description The desired puzzle difficulty, relative to the authenticated user puzzle rating, or 1500 if anonymous. */
|
|
@@ -10284,7 +10300,7 @@ export interface operations {
|
|
|
10284
10300
|
};
|
|
10285
10301
|
header?: never;
|
|
10286
10302
|
path: {
|
|
10287
|
-
/** @description The theme or opening to filter puzzles with. Recommended:
|
|
10303
|
+
/** @description The theme or opening to filter puzzles with. Recommended: `mix`.
|
|
10288
10304
|
*
|
|
10289
10305
|
* Available themes are listed in [the lichess source code](https://github.com/ornicar/lila/blob/master/translation/source/puzzleTheme.xml).
|
|
10290
10306
|
* */
|
|
@@ -10352,7 +10368,97 @@ export interface operations {
|
|
|
10352
10368
|
* }
|
|
10353
10369
|
* ]
|
|
10354
10370
|
* } */
|
|
10355
|
-
"application/json": components["schemas"]["
|
|
10371
|
+
"application/json": components["schemas"]["PuzzleBatchSelect"];
|
|
10372
|
+
};
|
|
10373
|
+
};
|
|
10374
|
+
};
|
|
10375
|
+
};
|
|
10376
|
+
apiPuzzleBatchSolve: {
|
|
10377
|
+
parameters: {
|
|
10378
|
+
query?: {
|
|
10379
|
+
/** @description When > 0, the response includes a new puzzle batch with that many puzzles.
|
|
10380
|
+
*
|
|
10381
|
+
* This is equivalent to calling [/api/puzzle/batch/{angle}](#tag/Puzzles/operation/apiPuzzleBatchSelect),
|
|
10382
|
+
* and can sometimes save a request.
|
|
10383
|
+
* */
|
|
10384
|
+
nb?: number;
|
|
10385
|
+
};
|
|
10386
|
+
header?: never;
|
|
10387
|
+
path: {
|
|
10388
|
+
/** @description The theme or opening of the solved puzzles.
|
|
10389
|
+
*
|
|
10390
|
+
* Available themes are listed in [the lichess source code](https://github.com/ornicar/lila/blob/master/translation/source/puzzleTheme.xml).
|
|
10391
|
+
* */
|
|
10392
|
+
angle: string;
|
|
10393
|
+
};
|
|
10394
|
+
cookie?: never;
|
|
10395
|
+
};
|
|
10396
|
+
/** @description List of solved puzzles */
|
|
10397
|
+
requestBody: {
|
|
10398
|
+
content: {
|
|
10399
|
+
"application/json": components["schemas"]["PuzzleBatchSolveRequest"];
|
|
10400
|
+
};
|
|
10401
|
+
};
|
|
10402
|
+
responses: {
|
|
10403
|
+
/** @description The solved puzzles, named `rounds`, and a new puzzle batch named `puzzles`. */
|
|
10404
|
+
200: {
|
|
10405
|
+
headers: {
|
|
10406
|
+
"Access-Control-Allow-Origin"?: string;
|
|
10407
|
+
[name: string]: unknown;
|
|
10408
|
+
};
|
|
10409
|
+
content: {
|
|
10410
|
+
/** @example {
|
|
10411
|
+
* "puzzles": [
|
|
10412
|
+
* {
|
|
10413
|
+
* "game": {
|
|
10414
|
+
* "id": "oXmU07Il",
|
|
10415
|
+
* "perf": {
|
|
10416
|
+
* "key": "blitz",
|
|
10417
|
+
* "name": "Blitz"
|
|
10418
|
+
* },
|
|
10419
|
+
* "rated": true,
|
|
10420
|
+
* "players": [
|
|
10421
|
+
* {
|
|
10422
|
+
* "name": "paximi",
|
|
10423
|
+
* "id": "paximi",
|
|
10424
|
+
* "color": "white",
|
|
10425
|
+
* "rating": 2009
|
|
10426
|
+
* },
|
|
10427
|
+
* {
|
|
10428
|
+
* "name": "Patteblomquist",
|
|
10429
|
+
* "id": "patteblomquist",
|
|
10430
|
+
* "color": "black",
|
|
10431
|
+
* "rating": 2000
|
|
10432
|
+
* }
|
|
10433
|
+
* ],
|
|
10434
|
+
* "pgn": "e4 c5 Nf3 d6 d4 cxd4 Nxd4 Nf6 Nc3 a6 f3 e5 Nb3 Be6 Be3 Be7 Nd5 Nxd5 exd5 Bf5 Bd3 Bxd3 Qxd3 Nd7 Qd2 h5 O-O Rc8 Na5 Qc7 c4 Nc5 b4 Nd7 Rac1 f5 Rfd1 f4 Bf2 h4 c5 h3 Nc4 dxc5 bxc5 Bxc5 Bxc5 Qxc5+ Kh1 hxg2+ Kxg2 Qe7 d6 Qh4 Kh1 Qh3 Qg2 Qxg2+ Kxg2 Kf7 Re1 Kf6 Nd2 Nc5",
|
|
10435
|
+
* "clock": "3+2"
|
|
10436
|
+
* },
|
|
10437
|
+
* "puzzle": {
|
|
10438
|
+
* "id": "hFFk9",
|
|
10439
|
+
* "rating": 1733,
|
|
10440
|
+
* "plays": 469,
|
|
10441
|
+
* "solution": [
|
|
10442
|
+
* "c1c5",
|
|
10443
|
+
* "c8c5",
|
|
10444
|
+
* "d2e4",
|
|
10445
|
+
* "f6e6",
|
|
10446
|
+
* "e4c5"
|
|
10447
|
+
* ],
|
|
10448
|
+
* "themes": [
|
|
10449
|
+
* "endgame",
|
|
10450
|
+
* "advantage",
|
|
10451
|
+
* "attraction",
|
|
10452
|
+
* "fork",
|
|
10453
|
+
* "long",
|
|
10454
|
+
* "sacrifice"
|
|
10455
|
+
* ],
|
|
10456
|
+
* "initialPly": 63
|
|
10457
|
+
* }
|
|
10458
|
+
* }
|
|
10459
|
+
* ]
|
|
10460
|
+
* } */
|
|
10461
|
+
"application/json": components["schemas"]["PuzzleBatchSolveResponse"];
|
|
10356
10462
|
};
|
|
10357
10463
|
};
|
|
10358
10464
|
};
|