@lichess-org/types 2.0.120 → 2.0.122
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 +106 -3
- package/package.json +3 -3
package/lichess-api.d.ts
CHANGED
|
@@ -1984,6 +1984,26 @@ export interface paths {
|
|
|
1984
1984
|
patch?: never;
|
|
1985
1985
|
trace?: never;
|
|
1986
1986
|
};
|
|
1987
|
+
"/api/fide/player/{playerId}/ratings": {
|
|
1988
|
+
parameters: {
|
|
1989
|
+
query?: never;
|
|
1990
|
+
header?: never;
|
|
1991
|
+
path?: never;
|
|
1992
|
+
cookie?: never;
|
|
1993
|
+
};
|
|
1994
|
+
/**
|
|
1995
|
+
* Get ratings history of a FIDE player
|
|
1996
|
+
* @description Historical standard, rapid and blitz ratings of a FIDE player
|
|
1997
|
+
*/
|
|
1998
|
+
get: operations["fidePlayerRatings"];
|
|
1999
|
+
put?: never;
|
|
2000
|
+
post?: never;
|
|
2001
|
+
delete?: never;
|
|
2002
|
+
options?: never;
|
|
2003
|
+
head?: never;
|
|
2004
|
+
patch?: never;
|
|
2005
|
+
trace?: never;
|
|
2006
|
+
};
|
|
1987
2007
|
"/api/fide/player": {
|
|
1988
2008
|
parameters: {
|
|
1989
2009
|
query?: never;
|
|
@@ -6548,6 +6568,30 @@ export interface components {
|
|
|
6548
6568
|
blitz?: number;
|
|
6549
6569
|
photo?: components["schemas"]["FIDEPlayerPhoto"];
|
|
6550
6570
|
};
|
|
6571
|
+
/**
|
|
6572
|
+
* @description Data points are encoded. Each number contains a year, a month, and an ELO rating.
|
|
6573
|
+
*
|
|
6574
|
+
* `2015081568` -> `August 2015: 1568`
|
|
6575
|
+
*
|
|
6576
|
+
* Here's an example decoding implementation in JS:
|
|
6577
|
+
*
|
|
6578
|
+
* ```js
|
|
6579
|
+
* const decodePoint = point => {
|
|
6580
|
+
* const elo = point % 10000;
|
|
6581
|
+
* const dateNum = Math.floor(point / 10000);
|
|
6582
|
+
* const year = Math.floor(dateNum / 100);
|
|
6583
|
+
* const month = dateNum % 100;
|
|
6584
|
+
* return [year, month, elo];
|
|
6585
|
+
* };
|
|
6586
|
+
* ```
|
|
6587
|
+
*
|
|
6588
|
+
* Consecutive months with same ELO are omitted. For a given ELO, only the first and last month are provided.
|
|
6589
|
+
*/
|
|
6590
|
+
FIDEPlayerRatings: {
|
|
6591
|
+
standard: number[];
|
|
6592
|
+
rapid: number[];
|
|
6593
|
+
blitz: number[];
|
|
6594
|
+
};
|
|
6551
6595
|
Simul: {
|
|
6552
6596
|
id: string;
|
|
6553
6597
|
host: components["schemas"]["LightUser"] & {
|
|
@@ -11626,7 +11670,19 @@ export interface operations {
|
|
|
11626
11670
|
};
|
|
11627
11671
|
broadcastStreamRoundPgn: {
|
|
11628
11672
|
parameters: {
|
|
11629
|
-
query?:
|
|
11673
|
+
query?: {
|
|
11674
|
+
/**
|
|
11675
|
+
* @description Include clock comments in the PGN moves, when available.
|
|
11676
|
+
* Example: `2. exd5 { [%clk 1:01:27] } e5 { [%clk 1:01:28] }`
|
|
11677
|
+
*/
|
|
11678
|
+
clocks?: boolean;
|
|
11679
|
+
/**
|
|
11680
|
+
* @description Include analysis comments in the PGN moves, when available.
|
|
11681
|
+
* Example: `12. Bxf6 { [%eval 0.23] }`
|
|
11682
|
+
* @default true
|
|
11683
|
+
*/
|
|
11684
|
+
comments?: string;
|
|
11685
|
+
};
|
|
11630
11686
|
header?: never;
|
|
11631
11687
|
path: {
|
|
11632
11688
|
/** @description The broadcast round ID */
|
|
@@ -11650,7 +11706,19 @@ export interface operations {
|
|
|
11650
11706
|
};
|
|
11651
11707
|
broadcastRoundPgn: {
|
|
11652
11708
|
parameters: {
|
|
11653
|
-
query?:
|
|
11709
|
+
query?: {
|
|
11710
|
+
/**
|
|
11711
|
+
* @description Include clock comments in the PGN moves, when available.
|
|
11712
|
+
* Example: `2. exd5 { [%clk 1:01:27] } e5 { [%clk 1:01:28] }`
|
|
11713
|
+
*/
|
|
11714
|
+
clocks?: boolean;
|
|
11715
|
+
/**
|
|
11716
|
+
* @description Include analysis comments in the PGN moves, when available.
|
|
11717
|
+
* Example: `12. Bxf6 { [%eval 0.23] }`
|
|
11718
|
+
* @default true
|
|
11719
|
+
*/
|
|
11720
|
+
comments?: string;
|
|
11721
|
+
};
|
|
11654
11722
|
header?: never;
|
|
11655
11723
|
path: {
|
|
11656
11724
|
/** @description The round ID */
|
|
@@ -11674,7 +11742,19 @@ export interface operations {
|
|
|
11674
11742
|
};
|
|
11675
11743
|
broadcastAllRoundsPgn: {
|
|
11676
11744
|
parameters: {
|
|
11677
|
-
query?:
|
|
11745
|
+
query?: {
|
|
11746
|
+
/**
|
|
11747
|
+
* @description Include clock comments in the PGN moves, when available.
|
|
11748
|
+
* Example: `2. exd5 { [%clk 1:01:27] } e5 { [%clk 1:01:28] }`
|
|
11749
|
+
*/
|
|
11750
|
+
clocks?: boolean;
|
|
11751
|
+
/**
|
|
11752
|
+
* @description Include analysis comments in the PGN moves, when available.
|
|
11753
|
+
* Example: `12. Bxf6 { [%eval 0.23] }`
|
|
11754
|
+
* @default true
|
|
11755
|
+
*/
|
|
11756
|
+
comments?: string;
|
|
11757
|
+
};
|
|
11678
11758
|
header?: never;
|
|
11679
11759
|
path: {
|
|
11680
11760
|
/** @description The broadcast tournament ID */
|
|
@@ -11742,6 +11822,29 @@ export interface operations {
|
|
|
11742
11822
|
};
|
|
11743
11823
|
};
|
|
11744
11824
|
};
|
|
11825
|
+
fidePlayerRatings: {
|
|
11826
|
+
parameters: {
|
|
11827
|
+
query?: never;
|
|
11828
|
+
header?: never;
|
|
11829
|
+
path: {
|
|
11830
|
+
/** @description The FIDE player ID. */
|
|
11831
|
+
playerId: number;
|
|
11832
|
+
};
|
|
11833
|
+
cookie?: never;
|
|
11834
|
+
};
|
|
11835
|
+
requestBody?: never;
|
|
11836
|
+
responses: {
|
|
11837
|
+
/** @description The rating histories */
|
|
11838
|
+
200: {
|
|
11839
|
+
headers: {
|
|
11840
|
+
[name: string]: unknown;
|
|
11841
|
+
};
|
|
11842
|
+
content: {
|
|
11843
|
+
"application/json": components["schemas"]["FIDEPlayerRatings"];
|
|
11844
|
+
};
|
|
11845
|
+
};
|
|
11846
|
+
};
|
|
11847
|
+
};
|
|
11745
11848
|
fidePlayerSearch: {
|
|
11746
11849
|
parameters: {
|
|
11747
11850
|
query: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lichess-org/types",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.122",
|
|
4
4
|
"description": "Lichess.org API types",
|
|
5
5
|
"homepage": "https://github.com/lichess-org/api",
|
|
6
6
|
"license": "AGPL-3.0-or-later",
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
"gen": "openapi-typescript ../doc/specs/lichess-api.yaml -o lichess-api.d.ts --default-non-nullable=false"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"openapi-typescript": "^7.
|
|
17
|
+
"openapi-typescript": "^7.13.0",
|
|
18
18
|
"prettier": "^3.8.1",
|
|
19
19
|
"typescript": "^5.9.3"
|
|
20
20
|
},
|
|
21
|
-
"packageManager": "pnpm@10.
|
|
21
|
+
"packageManager": "pnpm@10.30.0+sha512.2b5753de015d480eeb88f5b5b61e0051f05b4301808a82ec8b840c9d2adf7748eb352c83f5c1593ca703ff1017295bc3fdd3119abb9686efc96b9fcb18200937"
|
|
22
22
|
}
|