@lichess-org/types 2.0.23 → 2.0.24

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 +149 -14
  2. package/package.json +2 -2
package/lichess-api.d.ts CHANGED
@@ -1879,6 +1879,48 @@ export interface paths {
1879
1879
  patch?: never;
1880
1880
  trace?: never;
1881
1881
  };
1882
+ "/api/fide/player/{playerId}": {
1883
+ parameters: {
1884
+ query?: never;
1885
+ header?: never;
1886
+ path?: never;
1887
+ cookie?: never;
1888
+ };
1889
+ /**
1890
+ * Get a FIDE player
1891
+ * @description Get information about a FIDE player.
1892
+ *
1893
+ */
1894
+ get: operations["fidePlayerGet"];
1895
+ put?: never;
1896
+ post?: never;
1897
+ delete?: never;
1898
+ options?: never;
1899
+ head?: never;
1900
+ patch?: never;
1901
+ trace?: never;
1902
+ };
1903
+ "/api/fide/player": {
1904
+ parameters: {
1905
+ query?: never;
1906
+ header?: never;
1907
+ path?: never;
1908
+ cookie?: never;
1909
+ };
1910
+ /**
1911
+ * Search FIDE players
1912
+ * @description List of FIDE players search results for a query.
1913
+ *
1914
+ */
1915
+ get: operations["fidePlayerSearch"];
1916
+ put?: never;
1917
+ post?: never;
1918
+ delete?: never;
1919
+ options?: never;
1920
+ head?: never;
1921
+ patch?: never;
1922
+ trace?: never;
1923
+ };
1882
1924
  "/api/simul": {
1883
1925
  parameters: {
1884
1926
  query?: never;
@@ -3081,6 +3123,8 @@ export interface paths {
3081
3123
  * Requires the OAuth tokens of both players with `challenge:write` scope.
3082
3124
  * If the clocks have already started, the call will have no effect.
3083
3125
  *
3126
+ * For AI games with only one player, omit the `token2` parameter.
3127
+ *
3084
3128
  */
3085
3129
  post: operations["challengeStartClocks"];
3086
3130
  delete?: never;
@@ -6736,6 +6780,25 @@ export interface components {
6736
6780
  tour: components["schemas"]["BroadcastTour"];
6737
6781
  study: components["schemas"]["BroadcastRoundStudyInfo"];
6738
6782
  };
6783
+ FIDEPlayer: {
6784
+ /** @example 35009192 */
6785
+ id: number;
6786
+ /** @example Erigaisi Arjun */
6787
+ name: string;
6788
+ title?: components["schemas"]["Title"];
6789
+ /** @example IND */
6790
+ federation: string;
6791
+ /** @example 2003 */
6792
+ year?: number;
6793
+ /** @example true */
6794
+ inactive?: boolean;
6795
+ /** @example 2797 */
6796
+ standard?: number;
6797
+ /** @example 2698 */
6798
+ rapid?: number;
6799
+ /** @example 2738 */
6800
+ blitz?: number;
6801
+ };
6739
6802
  /** @example {
6740
6803
  * "id": "pDGbxhUe",
6741
6804
  * "name": "GM ChessWeeb",
@@ -6763,7 +6826,27 @@ export interface components {
6763
6826
  * }
6764
6827
  * ]
6765
6828
  * } */
6766
- Simul: unknown;
6829
+ Simul: {
6830
+ id: string;
6831
+ host: components["schemas"]["LightUser"] & {
6832
+ rating?: number;
6833
+ provisional?: boolean;
6834
+ gameId?: string;
6835
+ online?: boolean;
6836
+ };
6837
+ name: string;
6838
+ fullName: string;
6839
+ variants: components["schemas"]["Variant"][];
6840
+ isCreated: boolean;
6841
+ isFinished: boolean;
6842
+ isRunning: boolean;
6843
+ text?: string;
6844
+ estimatedStartAt?: number;
6845
+ startedAt?: number;
6846
+ finishedAt?: number;
6847
+ nbApplicants: number;
6848
+ nbPairings: number;
6849
+ };
6767
6850
  /** @example {
6768
6851
  * "id": "lichess-swiss",
6769
6852
  * "name": "Lichess Swiss",
@@ -7434,17 +7517,22 @@ export interface components {
7434
7517
  * ]
7435
7518
  * } */
7436
7519
  CloudEval: {
7437
- depth?: number;
7438
- fen?: string;
7439
- knodes?: number;
7440
- pvs?: {
7441
- /** @description Evaluation in centi-pawns, from White's point of view */
7442
- cp?: number;
7443
- /** @description Evaluation in moves to mate, from White's point of view */
7444
- mate?: number;
7520
+ depth: number;
7521
+ fen: string;
7522
+ knodes: number;
7523
+ pvs: ({
7445
7524
  /** @description Variation in UCI notation */
7446
- moves?: string;
7447
- }[];
7525
+ moves: string;
7526
+ } & (
7527
+ | {
7528
+ /** @description Evaluation in centi-pawns, from White's point of view */
7529
+ cp: number;
7530
+ }
7531
+ | {
7532
+ /** @description Evaluation in moves to mate, from White's point of view */
7533
+ mate: number;
7534
+ }
7535
+ ))[];
7448
7536
  };
7449
7537
  /**
7450
7538
  * @default chess
@@ -11716,6 +11804,53 @@ export interface operations {
11716
11804
  };
11717
11805
  };
11718
11806
  };
11807
+ fidePlayerGet: {
11808
+ parameters: {
11809
+ query?: never;
11810
+ header?: never;
11811
+ path: {
11812
+ /** @description The FIDE player ID. */
11813
+ playerId: number;
11814
+ };
11815
+ cookie?: never;
11816
+ };
11817
+ requestBody?: never;
11818
+ responses: {
11819
+ /** @description The information about the FIDE player. */
11820
+ 200: {
11821
+ headers: {
11822
+ [name: string]: unknown;
11823
+ };
11824
+ content: {
11825
+ "application/json": components["schemas"]["FIDEPlayer"];
11826
+ };
11827
+ };
11828
+ };
11829
+ };
11830
+ fidePlayerSearch: {
11831
+ parameters: {
11832
+ query: {
11833
+ /** @description The search query. */
11834
+ q: string;
11835
+ };
11836
+ header?: never;
11837
+ path?: never;
11838
+ cookie?: never;
11839
+ };
11840
+ requestBody?: never;
11841
+ responses: {
11842
+ /** @description The list of FIDE players. */
11843
+ 200: {
11844
+ headers: {
11845
+ "Access-Control-Allow-Origin"?: string;
11846
+ [name: string]: unknown;
11847
+ };
11848
+ content: {
11849
+ "application/json": components["schemas"]["FIDEPlayer"][];
11850
+ };
11851
+ };
11852
+ };
11853
+ };
11719
11854
  apiSimul: {
11720
11855
  parameters: {
11721
11856
  query?: never;
@@ -13488,10 +13623,10 @@ export interface operations {
13488
13623
  };
13489
13624
  challengeStartClocks: {
13490
13625
  parameters: {
13491
- query?: {
13626
+ query: {
13492
13627
  /** @description OAuth token of a player */
13493
- token1?: string;
13494
- /** @description OAuth token of the other player */
13628
+ token1: string;
13629
+ /** @description OAuth token of the other player. Omit for AI games that have only one player. */
13495
13630
  token2?: string;
13496
13631
  };
13497
13632
  header?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lichess-org/types",
3
- "version": "2.0.23",
3
+ "version": "2.0.24",
4
4
  "description": "Lichess.org API types",
5
5
  "homepage": "https://github.com/lichess-org/api",
6
6
  "license": "AGPL-3.0-or-later",
@@ -11,7 +11,7 @@
11
11
  "gen": "openapi-typescript ../doc/specs/lichess-api.yaml -o lichess-api.d.ts --default-non-nullable=false"
12
12
  },
13
13
  "devDependencies": {
14
- "openapi-typescript": "^7.6.0",
14
+ "openapi-typescript": "^7.6.1",
15
15
  "prettier": "^3.4.2",
16
16
  "typescript": "^5.7.3"
17
17
  },