@lichess-org/types 2.0.112 → 2.0.114

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 +45 -38
  2. package/package.json +2 -2
package/lichess-api.d.ts CHANGED
@@ -571,7 +571,7 @@ export interface paths {
571
571
  * <https://lichess.org/@/german11> for instance has more than 500,000 games.
572
572
  * The game stream is throttled, depending on who is making the request:
573
573
  * - Anonymous request: 20 games per second
574
- * - [OAuth2 authenticated](/#description/authentication) request: 30 games per second
574
+ * - [OAuth2 authenticated](#description/authentication) request: 30 games per second
575
575
  * - Authenticated, downloading your own games: 60 games per second
576
576
  */
577
577
  get: operations["apiGamesUser"];
@@ -647,8 +647,8 @@ export interface paths {
647
647
  * @description Creates a stream of games from an arbitrary streamId, and a list of game IDs.
648
648
  * The stream first outputs the games that already exists, then emits an event each time a game is started or finished.
649
649
  * Games are streamed as [ndjson](#description/streaming-with-nd-json).
650
- * Maximum number of games: 500 for anonymous requests, or 1000 for [OAuth2 authenticated](/#description/authentication) requests.
651
- * While the stream is open, it is possible to [add new game IDs to watch](#tag/games/post/apistreamgamesstreamidAdd).
650
+ * Maximum number of games: 500 for anonymous requests, or 1000 for [OAuth2 authenticated](#description/authentication) requests.
651
+ * While the stream is open, it is possible to [add new game IDs to watch](#tag/games/POST/api/stream/games/{streamId}/add).
652
652
  */
653
653
  post: operations["gamesByIds"];
654
654
  delete?: never;
@@ -668,7 +668,7 @@ export interface paths {
668
668
  put?: never;
669
669
  /**
670
670
  * Add game IDs to stream
671
- * @description Add new game IDs for [an existing stream](#tag/games/post/apistreamgamesstreamid) to watch.
671
+ * @description Add new game IDs for [an existing stream](#tag/games/POST/api/stream/games/{streamId}) to watch.
672
672
  * The stream will immediately outputs the games that already exists, then emit an event each time a game is started or finished.
673
673
  */
674
674
  post: operations["gamesByIdsAdd"];
@@ -738,7 +738,7 @@ export interface paths {
738
738
  * Import one game
739
739
  * @description Import a game from PGN. See <https://lichess.org/paste>.
740
740
  * Rate limiting: 200 games per hour for OAuth requests, 100 games per hour for anonymous requests.
741
- * To broadcast ongoing games, consider [pushing to a broadcast instead](#tag/broadcasts/post/apibroadcastroundbroadcastroundidpush).
741
+ * To broadcast ongoing games, consider [pushing to a broadcast instead](#tag/broadcasts/POST/api/broadcast/round/{broadcastRoundId}/push).
742
742
  * To analyse a position or a line, just construct an analysis board URL (most standard tags supported if URL-encoded):
743
743
  * [https://lichess.org/analysis/pgn/e4_e5_Nf3_Nc6_Bc4_Bc5_Bxf7+](https://lichess.org/analysis/pgn/e4_e5_Nf3_Nc6_Bc4_Bc5_Bxf7+)
744
744
  */
@@ -953,7 +953,7 @@ export interface paths {
953
953
  /**
954
954
  * Join an Arena tournament
955
955
  * @description Join an Arena tournament, possibly with a password and/or a team.
956
- * Also unpauses if you had previously [paused](#tag/arena-tournaments/post/apitournamentidwithdraw) the tournament.
956
+ * Also unpauses if you had previously [paused](#tag/arena-tournaments/POST/api/tournament/{id}/withdraw) the tournament.
957
957
  */
958
958
  post: operations["apiTournamentJoin"];
959
959
  delete?: never;
@@ -1015,7 +1015,7 @@ export interface paths {
1015
1015
  /**
1016
1016
  * Update a team battle
1017
1017
  * @description Set the teams and number of leaders of a team battle.
1018
- * To update the other attributes of a team battle, use the [tournament update endpoint](#tag/arena-tournaments/post/apitournamentid).
1018
+ * To update the other attributes of a team battle, use the [tournament update endpoint](#tag/arena-tournaments/POST/api/tournament/{id}).
1019
1019
  */
1020
1020
  post: operations["apiTournamentTeamBattlePost"];
1021
1021
  delete?: never;
@@ -1037,7 +1037,7 @@ export interface paths {
1037
1037
  * Games are sorted by reverse chronological order (most recent first).
1038
1038
  * The game stream is throttled, depending on who is making the request:
1039
1039
  * - Anonymous request: 20 games per second
1040
- * - [OAuth2 authenticated](/#description/authentication) request: 30 games per second
1040
+ * - [OAuth2 authenticated](#description/authentication) request: 30 games per second
1041
1041
  */
1042
1042
  get: operations["gamesByTournament"];
1043
1043
  put?: never;
@@ -1106,7 +1106,7 @@ export interface paths {
1106
1106
  * Tournaments are streamed as [ndjson](#description/streaming-with-nd-json).
1107
1107
  * The stream is throttled, depending on who is making the request:
1108
1108
  * - Anonymous request: 20 tournaments per second
1109
- * - [OAuth2 authenticated](/#description/authentication) request: 30 tournaments per second
1109
+ * - [OAuth2 authenticated](#description/authentication) request: 30 tournaments per second
1110
1110
  * - Authenticated, downloading your own tournaments: 50 tournaments per second
1111
1111
  */
1112
1112
  get: operations["apiUserNameTournamentCreated"];
@@ -1132,7 +1132,7 @@ export interface paths {
1132
1132
  * Tournaments are streamed as [ndjson](#description/streaming-with-nd-json).
1133
1133
  * The stream is throttled, depending on who is making the request:
1134
1134
  * - Anonymous request: 20 tournaments per second
1135
- * - [OAuth2 authenticated](/#description/authentication) request: 30 tournaments per second
1135
+ * - [OAuth2 authenticated](#description/authentication) request: 30 tournaments per second
1136
1136
  * - Authenticated, downloading your own tournaments: 50 tournaments per second
1137
1137
  */
1138
1138
  get: operations["apiUserNameTournamentPlayed"];
@@ -1334,7 +1334,7 @@ export interface paths {
1334
1334
  * Games are sorted by chronological order.
1335
1335
  * The game stream is throttled, depending on who is making the request:
1336
1336
  * - Anonymous request: 20 games per second
1337
- * - [OAuth2 authenticated](/#description/authentication) request: 30 games per second
1337
+ * - [OAuth2 authenticated](#description/authentication) request: 30 games per second
1338
1338
  */
1339
1339
  get: operations["gamesBySwiss"];
1340
1340
  put?: never;
@@ -1757,7 +1757,7 @@ export interface paths {
1757
1757
  * @description Create a new broadcast round to relay external games.
1758
1758
  * This endpoint accepts the same form data as the web form.
1759
1759
  *
1760
- * Choose one between `syncUrl`, `syncUrls`, `syncIds` and `syncUsers`, if it is missing, the broadcast needs to be fed by [pushing PGN to it](#tag/broadcasts/post/apibroadcastroundbroadcastroundidpush)
1760
+ * Choose one between `syncUrl`, `syncUrls`, `syncIds` and `syncUsers`, if it is missing, the broadcast needs to be fed by [pushing PGN to it](#tag/broadcasts/POST/api/broadcast/round/{broadcastRoundId}/push)
1761
1761
  */
1762
1762
  post: operations["broadcastRoundCreate"];
1763
1763
  delete?: never;
@@ -1886,7 +1886,7 @@ export interface paths {
1886
1886
  * @description Download all games of a single round of a broadcast tournament in PGN format.
1887
1887
  * You *could* poll this endpoint to get updates about a tournament, but it would be slow,
1888
1888
  * and very inefficient.
1889
- * Instead, consider [streaming the tournament](#tag/broadcasts/get/apistreambroadcastroundbroadcastroundidpgn) to get
1889
+ * Instead, consider [streaming the tournament](#tag/broadcasts/GET/api/stream/broadcast/round/{broadcastRoundId}.pgn) to get
1890
1890
  * a new PGN every time a game is updated, in real-time.
1891
1891
  */
1892
1892
  get: operations["broadcastRoundPgn"];
@@ -1910,7 +1910,7 @@ export interface paths {
1910
1910
  * @description Download all games of all rounds of a broadcast in PGN format.
1911
1911
  * If a `study:read` [OAuth token](#tag/OAuth) is provided,
1912
1912
  * the private rounds where the user is a contributor will be available.
1913
- * You may want to [download only the games of a single round](#tag/broadcasts/get/apibroadcastroundbroadcastroundidpgn) instead.
1913
+ * You may want to [download only the games of a single round](#tag/broadcasts/GET/api/broadcast/round/{broadcastRoundId}.pgn) instead.
1914
1914
  */
1915
1915
  get: operations["broadcastAllRoundsPgn"];
1916
1916
  put?: never;
@@ -1996,7 +1996,7 @@ export interface paths {
1996
1996
  * @description Get recently created, started, finished, simuls.
1997
1997
  * Created and finished simul lists are not exhaustives, only those with
1998
1998
  * strong enough host will be listed, the same filter is used to display simuls on https://lichess.org/simul.
1999
- * When [authenticated with OAuth2](/#description/authentication), the pending list will be populated with your created, but unstarted simuls.
1999
+ * When [authenticated with OAuth2](#description/authentication), the pending list will be populated with your created, but unstarted simuls.
2000
2000
  */
2001
2001
  get: operations["apiSimul"];
2002
2002
  put?: never;
@@ -2522,8 +2522,8 @@ export interface paths {
2522
2522
  * If the client closes the connection, the seek is canceled. This way, if the client terminates, the user won't be paired in a game they wouldn't play.
2523
2523
  * When the seek is accepted, or expires, the server closes the connection.
2524
2524
  *
2525
- * **Make sure to also have an [Event stream](#tag/board/get/apiboardgamestreamgameid) open**, to be notified when a game starts.
2526
- * We recommend opening the [Event stream](#tag/board/get/apiboardgamestreamgameid) first, then the seek stream. This way,
2525
+ * **Make sure to also have an [Event stream](#tag/board/GET/api/board/game/stream/{gameId}) open**, to be notified when a game starts.
2526
+ * We recommend opening the [Event stream](#tag/board/GET/api/board/game/stream/{gameId}) first, then the seek stream. This way,
2527
2527
  * you won't miss the game event if the seek is accepted immediately.
2528
2528
  *
2529
2529
  * ### Correspondence seek
@@ -2798,7 +2798,7 @@ export interface paths {
2798
2798
  * To upgrade an account to Bot, use the [official lichess-bot client](https://github.com/lichess-bot-devs/lichess-bot), or follow these steps:
2799
2799
  * - Create an [API access token](https://lichess.org/account/oauth/token/create?scopes[]=bot:play) with "Play bot moves" permission.
2800
2800
  * - `curl -d '' https://lichess.org/api/bot/account/upgrade -H "Authorization: Bearer <yourTokenHere>"`
2801
- * To know if an account has already been upgraded, use the [Get my profile API](#tag/account/get/apiaccount):
2801
+ * To know if an account has already been upgraded, use the [Get my profile API](#tag/account/GET/api/account):
2802
2802
  * the `title` field should be set to `BOT`.
2803
2803
  */
2804
2804
  post: operations["botAccountUpgrade"];
@@ -3036,7 +3036,7 @@ export interface paths {
3036
3036
  /**
3037
3037
  * Create a challenge
3038
3038
  * @description Challenge someone to play. The targeted player can choose to accept or decline.
3039
- * If the challenge is accepted, you will be notified on the [event stream](#tag/board/get/apiboardgamestreamgameid)
3039
+ * If the challenge is accepted, you will be notified on the [event stream](#tag/board/GET/api/board/game/stream/{gameId})
3040
3040
  * that a new game has started. The game ID will be the same as the challenge ID.
3041
3041
  * Challenges for realtime games (not correspondence) expire after 20s if not accepted.
3042
3042
  * To prevent that, use the `keepAliveStream` flag described below.
@@ -3080,7 +3080,7 @@ export interface paths {
3080
3080
  /**
3081
3081
  * Accept a challenge
3082
3082
  * @description Accept an incoming challenge.
3083
- * You should receive a `gameStart` event on the [incoming events stream](#tag/board/get/apiboardgamestreamgameid).
3083
+ * You should receive a `gameStart` event on the [incoming events stream](#tag/board/GET/api/board/game/stream/{gameId}).
3084
3084
  */
3085
3085
  post: operations["challengeAccept"];
3086
3086
  delete?: never;
@@ -3143,7 +3143,7 @@ export interface paths {
3143
3143
  /**
3144
3144
  * Challenge the AI
3145
3145
  * @description Start a game with Lichess AI.
3146
- * You will be notified on the [event stream](#tag/board/get/apiboardgamestreamgameid) that a new game has started.
3146
+ * You will be notified on the [event stream](#tag/board/GET/api/board/game/stream/{gameId}) that a new game has started.
3147
3147
  */
3148
3148
  post: operations["challengeAi"];
3149
3149
  delete?: never;
@@ -3169,9 +3169,9 @@ export interface paths {
3169
3169
  * You can control which color each player gets by giving them these URLs,
3170
3170
  * instead of the main challenge URL.
3171
3171
  * Open challenges expire after 24h.
3172
- * If the challenge creation is [authenticated with OAuth2](/#description/authentication),
3173
- * then you can use the [challenge cancel endpoint](#tag/challenges/post/apichallengechallengeidcancel) to cancel it.
3174
- * To directly pair 2 known players, use [this endpoint](#tag/bulk-pairings/get/apibulk-pairing) instead.
3172
+ * If the challenge creation is [authenticated with OAuth2](#description/authentication),
3173
+ * then you can use the [challenge cancel endpoint](#tag/challenges/POST/api/challenge/{challengeId}/cancel) to cancel it.
3174
+ * To directly pair 2 known players, use [this endpoint](#tag/bulk-pairings/GET/api/bulk-pairing) instead.
3175
3175
  */
3176
3176
  post: operations["challengeOpen"];
3177
3177
  delete?: never;
@@ -3511,7 +3511,7 @@ export interface paths {
3511
3511
  * have been registered with the given `secret`.
3512
3512
  * Uses long polling.
3513
3513
  * After acquiring a request, the provider should immediately
3514
- * [start streaming the results](#tag/External-engine/operation/apiExternalEngineSubmit).
3514
+ * [start streaming the results](#tag/external-engine/POST/api/external-engine/workid).
3515
3515
  */
3516
3516
  post: operations["apiExternalEngineAcquire"];
3517
3517
  delete?: never;
@@ -3596,7 +3596,7 @@ export interface paths {
3596
3596
  * returned `state` matches the `state` you originally generated.
3597
3597
  *
3598
3598
  * Finally, continue by using the authorization code to
3599
- * [obtain an access token](#tag/oauth/post/apitoken).
3599
+ * [obtain an access token](#tag/oauth/POST/api/token).
3600
3600
  */
3601
3601
  get: operations["oauth"];
3602
3602
  put?: never;
@@ -4027,12 +4027,13 @@ export interface components {
4027
4027
  count?: components["schemas"]["Count"];
4028
4028
  streaming?: boolean;
4029
4029
  streamer?: components["schemas"]["UserStreamer"];
4030
- /** @description only appears if the request is [authenticated with OAuth2](/#description/authentication) */
4030
+ /** @description only appears if the request is [authenticated with OAuth2](#description/authentication) */
4031
4031
  followable?: boolean;
4032
- /** @description only appears if the request is [authenticated with OAuth2](/#description/authentication) */
4032
+ /** @description only appears if the request is [authenticated with OAuth2](#description/authentication) */
4033
4033
  following?: boolean;
4034
- /** @description only appears if the request is [authenticated with OAuth2](/#description/authentication) */
4034
+ /** @description only appears if the request is [authenticated with OAuth2](#description/authentication) */
4035
4035
  blocking?: boolean;
4036
+ fideId?: number;
4036
4037
  };
4037
4038
  /**
4038
4039
  * @example {
@@ -7075,7 +7076,7 @@ export interface components {
7075
7076
  name: string;
7076
7077
  /**
7077
7078
  * @description A secret token that can be used to
7078
- * [*request* analysis](#tag/External-engine/operation/apiExternalEngineAnalyse)
7079
+ * [*request* analysis](#tag/external-engine/POST/api/external-engine/{id}/analyse)
7079
7080
  * from this external engine.
7080
7081
  */
7081
7082
  clientSecret: string;
@@ -7116,7 +7117,7 @@ export interface components {
7116
7117
  variants?: components["schemas"]["UciVariant"][];
7117
7118
  /**
7118
7119
  * @description A random token that can be used to
7119
- * [wait for analysis requests](#tag/External-engine/operation/apiExternalEngineAcquire)
7120
+ * [wait for analysis requests](#tag/external-engine/POST/api/external-engine/work)
7120
7121
  * and provide analysis.
7121
7122
  *
7122
7123
  * The engine provider should securely generate a random string.
@@ -7679,6 +7680,8 @@ export interface operations {
7679
7680
  profile?: boolean;
7680
7681
  /** @description Include global lichess ranking for each perf */
7681
7682
  rank?: boolean;
7683
+ /** @description Include public FIDE ID if any */
7684
+ fideId?: boolean;
7682
7685
  };
7683
7686
  header?: never;
7684
7687
  path: {
@@ -7891,7 +7894,7 @@ export interface operations {
7891
7894
  /**
7892
7895
  * @description When > 0, the response includes a new puzzle batch with that many puzzles.
7893
7896
  *
7894
- * This is equivalent to calling [/api/puzzle/batch/{angle}](#tag/Puzzles/operation/apiPuzzleBatchSelect),
7897
+ * This is equivalent to calling [/api/puzzle/batch/{angle}](#tag/puzzles/GET/api/puzzle/batch/{angle}),
7895
7898
  * and can sometimes save a request.
7896
7899
  */
7897
7900
  nb?: number;
@@ -8399,15 +8402,19 @@ export interface operations {
8399
8402
  };
8400
8403
  requestBody?: never;
8401
8404
  responses: {
8402
- /** @description The ongoing (or last) game of a user. */
8405
+ /**
8406
+ * @description The ongoing (or last) game of a user.
8407
+ * This may be in either PGN or JSON format, depending on the `Accept` header of your request.
8408
+ */
8403
8409
  200: {
8404
8410
  headers: {
8405
8411
  "Access-Control-Allow-Origin"?: string;
8406
8412
  [name: string]: unknown;
8407
8413
  };
8408
8414
  content: {
8409
- "application/x-chess-pgn": components["schemas"]["GamePgn"];
8410
- "application/json": components["schemas"]["GameJson"];
8415
+ "application/json":
8416
+ | components["schemas"]["GamePgn"]
8417
+ | components["schemas"]["GameJson"];
8411
8418
  };
8412
8419
  };
8413
8420
  };
@@ -9198,7 +9205,7 @@ export interface operations {
9198
9205
  password?: string;
9199
9206
  /**
9200
9207
  * @description Set the ID of a team you lead to create a team battle.
9201
- * The other teams can be added using the [team battle edit endpoint](#tag/arena-tournaments/post/apitournamentteam-battleid).
9208
+ * The other teams can be added using the [team battle edit endpoint](#tag/arena-tournaments/POST/api/tournament/team-battle/{id}).
9202
9209
  */
9203
9210
  teamBattleByTeam?: string;
9204
9211
  /**
@@ -10278,7 +10285,7 @@ export interface operations {
10278
10285
  startsAt?: number;
10279
10286
  /**
10280
10287
  * @description How long to wait between each round, in seconds.
10281
- * Set to 99999999 to manually schedule each round from the tournament UI, or [with the API](#tag/Swiss-tournaments/operation/apiSwissScheduleNextRound).
10288
+ * Set to 99999999 to manually schedule each round from the tournament UI, or [with the API](#tag/tournaments-swiss/POST/api/swiss/{id}/schedule-next-round).
10282
10289
  * If empty or -1, a sensible value is picked automatically.
10283
10290
  * @enum {integer}
10284
10291
  */
@@ -11258,7 +11265,7 @@ export interface operations {
11258
11265
  broadcastTournamentId: string;
11259
11266
  /**
11260
11267
  * @description The unique player ID within the broadcast. This is usually their fideId.
11261
- * If the player does not have a fideId, it is their name. Consult the [list of players for the broadcast](#tag/Broadcasts/operation/broadcastPlayersGet) for which ID to use.
11268
+ * If the player does not have a fideId, it is their name. Consult the [list of players for the broadcast](#tag/broadcasts/GET/broadcast/{broadcastTournamentId}/players) for which ID to use.
11262
11269
  */
11263
11270
  playerId: string;
11264
11271
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lichess-org/types",
3
- "version": "2.0.112",
3
+ "version": "2.0.114",
4
4
  "description": "Lichess.org API types",
5
5
  "homepage": "https://github.com/lichess-org/api",
6
6
  "license": "AGPL-3.0-or-later",
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "devDependencies": {
17
17
  "openapi-typescript": "^7.10.1",
18
- "prettier": "^3.7.4",
18
+ "prettier": "^3.8.1",
19
19
  "typescript": "^5.9.3"
20
20
  },
21
21
  "packageManager": "pnpm@10.27.0+sha512.72d699da16b1179c14ba9e64dc71c9a40988cbdc65c264cb0e489db7de917f20dcf4d64d8723625f2969ba52d4b7e2a1170682d9ac2a5dcaeaab732b7e16f04a"