@lichess-org/types 2.0.120 → 2.0.121

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.
Files changed (2) hide show
  1. package/lichess-api.d.ts +67 -0
  2. 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"] & {
@@ -11742,6 +11786,29 @@ export interface operations {
11742
11786
  };
11743
11787
  };
11744
11788
  };
11789
+ fidePlayerRatings: {
11790
+ parameters: {
11791
+ query?: never;
11792
+ header?: never;
11793
+ path: {
11794
+ /** @description The FIDE player ID. */
11795
+ playerId: number;
11796
+ };
11797
+ cookie?: never;
11798
+ };
11799
+ requestBody?: never;
11800
+ responses: {
11801
+ /** @description The rating histories */
11802
+ 200: {
11803
+ headers: {
11804
+ [name: string]: unknown;
11805
+ };
11806
+ content: {
11807
+ "application/json": components["schemas"]["FIDEPlayerRatings"];
11808
+ };
11809
+ };
11810
+ };
11811
+ };
11745
11812
  fidePlayerSearch: {
11746
11813
  parameters: {
11747
11814
  query: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lichess-org/types",
3
- "version": "2.0.120",
3
+ "version": "2.0.121",
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.10.1",
17
+ "openapi-typescript": "^7.13.0",
18
18
  "prettier": "^3.8.1",
19
19
  "typescript": "^5.9.3"
20
20
  },
21
- "packageManager": "pnpm@10.27.0+sha512.72d699da16b1179c14ba9e64dc71c9a40988cbdc65c264cb0e489db7de917f20dcf4d64d8723625f2969ba52d4b7e2a1170682d9ac2a5dcaeaab732b7e16f04a"
21
+ "packageManager": "pnpm@10.30.0+sha512.2b5753de015d480eeb88f5b5b61e0051f05b4301808a82ec8b840c9d2adf7748eb352c83f5c1593ca703ff1017295bc3fdd3119abb9686efc96b9fcb18200937"
22
22
  }