@lichess-org/types 2.0.119 → 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 +81 -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;
@@ -4701,33 +4721,47 @@ export interface components {
4701
4721
  | "music"
4702
4722
  | "speech";
4703
4723
  blindfold?: number;
4724
+ /** @description 1 = Never, 2 = When premoving, 3 = Always */
4704
4725
  autoQueen?: number;
4726
+ /** @description 0 = Never, 2 = When time remaining < 30 seconds, 3 = Always */
4705
4727
  autoThreefold?: number;
4728
+ /** @description 1 = Never, 2 = In casual games only, 3 = Always */
4706
4729
  takeback?: number;
4730
+ /** @description 1 = Never, 2 = In casual games only, 3 = Always */
4707
4731
  moretime?: number;
4732
+ /** @description 0 = Never, 1 = When remaining time less than 10 seconds, 2 = Always */
4708
4733
  clockTenths?: number;
4709
4734
  clockBar?: boolean;
4710
4735
  clockSound?: boolean;
4711
4736
  premove?: boolean;
4737
+ /** @description 0 = None, 1 = Fast, 2 = Normal, 3 = Slow */
4712
4738
  animation?: number;
4739
+ /** @description 0 = Chess piece symbol, 1 = KQRBN Letter */
4713
4740
  pieceNotation?: number;
4714
4741
  captured?: boolean;
4715
4742
  follow?: boolean;
4716
4743
  highlight?: boolean;
4717
4744
  destination?: boolean;
4745
+ /** @description 0 = No, 1 = Inside the board, 2 = Outside the board, 3 = All squares */
4718
4746
  coords?: number;
4719
4747
  replay?: number;
4720
4748
  challenge?: number;
4721
4749
  message?: number;
4722
4750
  submitMove?: number;
4751
+ /** @description 1 = Confirm resignation and draw offers, 0 = Do not confirm */
4723
4752
  confirmResign?: number;
4724
4753
  insightShare?: number;
4754
+ /** @description 1 = input moves with the keyboard */
4725
4755
  keyboardMove?: number;
4726
4756
  voiceMove?: boolean;
4757
+ /** @description 0 = No, 1 = yes, 2 = in-game only */
4727
4758
  zen?: number;
4759
+ /** @description 0 = Hide ratings, 1 = Show ratings, 2 = Show ratings except in-game */
4728
4760
  ratings?: number;
4729
4761
  moveEvent?: number;
4762
+ /** @description 0 = Move king two squares, 1 = Move king onto rook */
4730
4763
  rookCastle?: number;
4764
+ /** @description Show player flairs */
4731
4765
  flairs?: boolean;
4732
4766
  /**
4733
4767
  * @description 0 = No, 1 = When losing, 2 = When losing or drawing
@@ -6534,6 +6568,30 @@ export interface components {
6534
6568
  blitz?: number;
6535
6569
  photo?: components["schemas"]["FIDEPlayerPhoto"];
6536
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
+ };
6537
6595
  Simul: {
6538
6596
  id: string;
6539
6597
  host: components["schemas"]["LightUser"] & {
@@ -11728,6 +11786,29 @@ export interface operations {
11728
11786
  };
11729
11787
  };
11730
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
+ };
11731
11812
  fidePlayerSearch: {
11732
11813
  parameters: {
11733
11814
  query: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lichess-org/types",
3
- "version": "2.0.119",
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
  }