@lichess-org/types 2.0.105 → 2.0.106
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 +18 -18
- package/package.json +1 -1
package/lichess-api.d.ts
CHANGED
|
@@ -648,7 +648,7 @@ export interface paths {
|
|
|
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
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](#
|
|
651
|
+
* While the stream is open, it is possible to [add new game IDs to watch](#tag/games/post/apistreamgamesstreamidAdd).
|
|
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](#
|
|
671
|
+
* @description Add new game IDs for [an existing stream](#tag/games/post/apistreamgamesstreamid) 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](#
|
|
741
|
+
* To broadcast ongoing games, consider [pushing to a broadcast instead](#tag/broadcasts/post/apibroadcastroundbroadcastroundidpush).
|
|
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](#
|
|
956
|
+
* Also unpauses if you had previously [paused](#tag/arena-tournaments/post/apitournamentidwithdraw) 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](#
|
|
1018
|
+
* To update the other attributes of a team battle, use the [tournament update endpoint](#tag/arena-tournaments/post/apitournamentid).
|
|
1019
1019
|
*/
|
|
1020
1020
|
post: operations["apiTournamentTeamBattlePost"];
|
|
1021
1021
|
delete?: 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](#
|
|
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)
|
|
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](#
|
|
1889
|
+
* Instead, consider [streaming the tournament](#tag/broadcasts/get/apistreambroadcastroundbroadcastroundidpgn) 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](#
|
|
1913
|
+
* You may want to [download only the games of a single round](#tag/broadcasts/get/apibroadcastroundbroadcastroundidpgn) instead.
|
|
1914
1914
|
*/
|
|
1915
1915
|
get: operations["broadcastAllRoundsPgn"];
|
|
1916
1916
|
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](#
|
|
2526
|
-
* We recommend opening the [Event stream](#
|
|
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,
|
|
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](#
|
|
2801
|
+
* To know if an account has already been upgraded, use the [Get my profile API](#tag/account/get/apiaccount):
|
|
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](#
|
|
3039
|
+
* If the challenge is accepted, you will be notified on the [event stream](#tag/board/get/apiboardgamestreamgameid)
|
|
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](#
|
|
3083
|
+
* You should receive a `gameStart` event on the [incoming events stream](#tag/board/get/apiboardgamestreamgameid).
|
|
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](#
|
|
3146
|
+
* You will be notified on the [event stream](#tag/board/get/apiboardgamestreamgameid) that a new game has started.
|
|
3147
3147
|
*/
|
|
3148
3148
|
post: operations["challengeAi"];
|
|
3149
3149
|
delete?: never;
|
|
@@ -3170,8 +3170,8 @@ export interface paths {
|
|
|
3170
3170
|
* instead of the main challenge URL.
|
|
3171
3171
|
* Open challenges expire after 24h.
|
|
3172
3172
|
* If the challenge creation is [authenticated with OAuth2](/#description/authentication),
|
|
3173
|
-
* then you can use the [challenge cancel endpoint](#
|
|
3174
|
-
* To directly pair 2 known players, use [this endpoint](#
|
|
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.
|
|
3175
3175
|
*/
|
|
3176
3176
|
post: operations["challengeOpen"];
|
|
3177
3177
|
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](#
|
|
3599
|
+
* [obtain an access token](#tag/oauth/post/apitoken).
|
|
3600
3600
|
*/
|
|
3601
3601
|
get: operations["oauth"];
|
|
3602
3602
|
put?: never;
|
|
@@ -9169,7 +9169,7 @@ export interface operations {
|
|
|
9169
9169
|
password?: string;
|
|
9170
9170
|
/**
|
|
9171
9171
|
* @description Set the ID of a team you lead to create a team battle.
|
|
9172
|
-
* The other teams can be added using the [team battle edit endpoint](#
|
|
9172
|
+
* The other teams can be added using the [team battle edit endpoint](#tag/arena-tournaments/post/apitournamentteam-battleid).
|
|
9173
9173
|
*/
|
|
9174
9174
|
teamBattleByTeam?: string;
|
|
9175
9175
|
/**
|