@lichess-org/types 2.0.14 → 2.0.16
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 +193 -80
- package/package.json +1 -1
package/lichess-api.d.ts
CHANGED
|
@@ -1029,6 +1029,10 @@ export interface paths {
|
|
|
1029
1029
|
* @description Get all tournaments created by a given user.
|
|
1030
1030
|
* Tournaments are sorted by reverse chronological order of start date (last starting first).
|
|
1031
1031
|
* Tournaments are streamed as [ndjson](#section/Introduction/Streaming-with-ND-JSON).
|
|
1032
|
+
* The stream is throttled, depending on who is making the request:
|
|
1033
|
+
* - Anonymous request: 20 tournaments per second
|
|
1034
|
+
* - [OAuth2 authenticated](#section/Introduction/Authentication) request: 30 tournaments per second
|
|
1035
|
+
* - Authenticated, downloading your own tournaments: 50 games per second
|
|
1032
1036
|
*
|
|
1033
1037
|
*/
|
|
1034
1038
|
get: operations["apiUserNameTournamentCreated"];
|
|
@@ -1040,6 +1044,33 @@ export interface paths {
|
|
|
1040
1044
|
patch?: never;
|
|
1041
1045
|
trace?: never;
|
|
1042
1046
|
};
|
|
1047
|
+
"/api/user/{username}/tournament/played": {
|
|
1048
|
+
parameters: {
|
|
1049
|
+
query?: never;
|
|
1050
|
+
header?: never;
|
|
1051
|
+
path?: never;
|
|
1052
|
+
cookie?: never;
|
|
1053
|
+
};
|
|
1054
|
+
/**
|
|
1055
|
+
* Get tournaments played by a user
|
|
1056
|
+
* @description Get all tournaments played by a given user.
|
|
1057
|
+
* Tournaments are sorted by reverse chronological order of start date (last played first).
|
|
1058
|
+
* Tournaments are streamed as [ndjson](#section/Introduction/Streaming-with-ND-JSON).
|
|
1059
|
+
* The stream is throttled, depending on who is making the request:
|
|
1060
|
+
* - Anonymous request: 20 tournaments per second
|
|
1061
|
+
* - [OAuth2 authenticated](#section/Introduction/Authentication) request: 30 tournaments per second
|
|
1062
|
+
* - Authenticated, downloading your own tournaments: 50 games per second
|
|
1063
|
+
*
|
|
1064
|
+
*/
|
|
1065
|
+
get: operations["apiUserNameTournamentPlayed"];
|
|
1066
|
+
put?: never;
|
|
1067
|
+
post?: never;
|
|
1068
|
+
delete?: never;
|
|
1069
|
+
options?: never;
|
|
1070
|
+
head?: never;
|
|
1071
|
+
patch?: never;
|
|
1072
|
+
trace?: never;
|
|
1073
|
+
};
|
|
1043
1074
|
"/api/swiss/new/{teamId}": {
|
|
1044
1075
|
parameters: {
|
|
1045
1076
|
query?: never;
|
|
@@ -5144,7 +5175,10 @@ export interface components {
|
|
|
5144
5175
|
name?: string;
|
|
5145
5176
|
/** @example rnbqkbnr/ppp2ppp/3p4/4p3/4P3/5N2/PPPP1PPP/RNBQKB1R w KQkq - */
|
|
5146
5177
|
fen?: string;
|
|
5147
|
-
/**
|
|
5178
|
+
/**
|
|
5179
|
+
* Format: uri
|
|
5180
|
+
* @example https://lichess.org/opening/Philidor_Defense
|
|
5181
|
+
*/
|
|
5148
5182
|
url?: string;
|
|
5149
5183
|
}
|
|
5150
5184
|
| {
|
|
@@ -5567,6 +5601,14 @@ export interface components {
|
|
|
5567
5601
|
/** @description The cause of the error. */
|
|
5568
5602
|
error?: string;
|
|
5569
5603
|
};
|
|
5604
|
+
ArenaTournamentPlayed: {
|
|
5605
|
+
tournament?: components["schemas"]["ArenaTournament"];
|
|
5606
|
+
player?: {
|
|
5607
|
+
games?: number;
|
|
5608
|
+
score?: number;
|
|
5609
|
+
rank?: number;
|
|
5610
|
+
};
|
|
5611
|
+
};
|
|
5570
5612
|
/**
|
|
5571
5613
|
* @description Custom initial position (in FEN). Variant must be standard and the game cannot be rated.
|
|
5572
5614
|
* @default rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
|
|
@@ -5720,11 +5762,13 @@ export interface components {
|
|
|
5720
5762
|
};
|
|
5721
5763
|
/** @description Used to designate featured tournaments on Lichess */
|
|
5722
5764
|
tier?: number;
|
|
5765
|
+
/** Format: uri */
|
|
5723
5766
|
image?: string;
|
|
5724
5767
|
/** @description Full tournament description in markdown format, or in HTML if the html=1 query parameter is set. */
|
|
5725
5768
|
description?: string;
|
|
5726
5769
|
leaderboard?: boolean;
|
|
5727
5770
|
teamTable?: boolean;
|
|
5771
|
+
/** Format: uri */
|
|
5728
5772
|
url: string;
|
|
5729
5773
|
};
|
|
5730
5774
|
BroadcastGroupTour: {
|
|
@@ -5747,6 +5791,7 @@ export interface components {
|
|
|
5747
5791
|
/** @description The start date/time is unknown and the round will start automatically when the previous round completes */
|
|
5748
5792
|
startsAfterPrevious?: boolean;
|
|
5749
5793
|
finished?: boolean;
|
|
5794
|
+
/** Format: uri */
|
|
5750
5795
|
url: string;
|
|
5751
5796
|
/** Format: int64 */
|
|
5752
5797
|
delay?: number;
|
|
@@ -5926,85 +5971,122 @@ export interface components {
|
|
|
5926
5971
|
/** @description Name of the broadcast round.
|
|
5927
5972
|
* Example: `Round 1`
|
|
5928
5973
|
* */
|
|
5929
|
-
name
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
|
|
5942
|
-
|
|
5943
|
-
|
|
5944
|
-
|
|
5945
|
-
|
|
5946
|
-
|
|
5947
|
-
|
|
5948
|
-
|
|
5949
|
-
|
|
5950
|
-
|
|
5951
|
-
|
|
5952
|
-
|
|
5953
|
-
|
|
5954
|
-
|
|
5955
|
-
|
|
5956
|
-
|
|
5957
|
-
|
|
5958
|
-
|
|
5959
|
-
|
|
5960
|
-
|
|
5961
|
-
|
|
5962
|
-
|
|
5963
|
-
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
|
|
5971
|
-
|
|
5972
|
-
|
|
5973
|
-
|
|
5974
|
-
|
|
5975
|
-
|
|
5976
|
-
|
|
5977
|
-
|
|
5978
|
-
|
|
5979
|
-
|
|
5980
|
-
|
|
5981
|
-
|
|
5982
|
-
|
|
5983
|
-
|
|
5984
|
-
|
|
5985
|
-
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
|
|
5989
|
-
|
|
5990
|
-
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
|
|
5998
|
-
|
|
5999
|
-
|
|
6000
|
-
|
|
6001
|
-
|
|
6002
|
-
|
|
6003
|
-
|
|
6004
|
-
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
|
|
5974
|
+
name?: string;
|
|
5975
|
+
} & (
|
|
5976
|
+
| Record<string, never>
|
|
5977
|
+
| {
|
|
5978
|
+
/**
|
|
5979
|
+
* Format: uri
|
|
5980
|
+
* @description URL that Lichess will poll to get updates about the games. It must be publicly accessible from the Internet.
|
|
5981
|
+
*
|
|
5982
|
+
* Example:
|
|
5983
|
+
* ```txt
|
|
5984
|
+
* https://myserver.org/myevent/round-10/games.pgn
|
|
5985
|
+
* ```
|
|
5986
|
+
* Choose one between `syncUrl`, `syncUrls` and `syncIds`, if it is missing, the broadcast needs to be fed by [pushing PGN to it](#operation/broadcastPush)
|
|
5987
|
+
*
|
|
5988
|
+
*/
|
|
5989
|
+
syncUrl?: string;
|
|
5990
|
+
/** @description Filter games by round number
|
|
5991
|
+
*
|
|
5992
|
+
* Optional, only keep games from the source that match a round number.
|
|
5993
|
+
* It uses the PGN **Round** tag. These would match round 3:
|
|
5994
|
+
* ```txt
|
|
5995
|
+
* [Round "3"]
|
|
5996
|
+
* [Round "3.1"]
|
|
5997
|
+
* ```
|
|
5998
|
+
* If you set a round number, then games without a **Round** tag are dropped.
|
|
5999
|
+
*
|
|
6000
|
+
* It only works if you chose `syncUrl` or `syncUrls` as the source.
|
|
6001
|
+
* */
|
|
6002
|
+
onlyRound?: number;
|
|
6003
|
+
/** @description Select slices of the games
|
|
6004
|
+
*
|
|
6005
|
+
* Optional. Select games based on their position in the source.
|
|
6006
|
+
* ```txt
|
|
6007
|
+
* 1 only select the first board
|
|
6008
|
+
* 1-4 only select the first 4 boards
|
|
6009
|
+
* 1,2,3,4 same as above, first 4 boards
|
|
6010
|
+
* 11-15,21-25 boards 11 to 15, and boards 21 to 25
|
|
6011
|
+
* 2,3,7-9 boards 2, 3, 7, 8, and 9
|
|
6012
|
+
* ```
|
|
6013
|
+
* Slicing is done after filtering by round number.
|
|
6014
|
+
*
|
|
6015
|
+
* It only works if you chose `syncUrl` or `syncUrls` as the source.
|
|
6016
|
+
* */
|
|
6017
|
+
slices?: string;
|
|
6018
|
+
}
|
|
6019
|
+
| {
|
|
6020
|
+
/** @description URLs that Lichess will poll to get updates about the games, separated by newlines. They must be publicly accessible from the Internet.
|
|
6021
|
+
*
|
|
6022
|
+
* Example:
|
|
6023
|
+
* ```txt
|
|
6024
|
+
* https://myserver.org/myevent/round-10/game-1.pgn
|
|
6025
|
+
* https://myserver.org/myevent/round-10/game-2.pgn
|
|
6026
|
+
* ```
|
|
6027
|
+
* Choose one between `syncUrl`, `syncUrls` and `syncIds`, if it is missing, the broadcast needs to be fed by [pushing PGN to it](#operation/broadcastPush)
|
|
6028
|
+
* */
|
|
6029
|
+
syncUrls?: string;
|
|
6030
|
+
/** @description Filter games by round number
|
|
6031
|
+
*
|
|
6032
|
+
* Optional, only keep games from the source that match a round number.
|
|
6033
|
+
* It uses the PGN **Round** tag. These would match round 3:
|
|
6034
|
+
* ```txt
|
|
6035
|
+
* [Round "3"]
|
|
6036
|
+
* [Round "3.1"]
|
|
6037
|
+
* ```
|
|
6038
|
+
* If you set a round number, then games without a **Round** tag are dropped.
|
|
6039
|
+
*
|
|
6040
|
+
* It only works if you chose `syncUrl` or `syncUrls` as the source.
|
|
6041
|
+
* */
|
|
6042
|
+
onlyRound?: number;
|
|
6043
|
+
/** @description Select slices of the games
|
|
6044
|
+
*
|
|
6045
|
+
* Optional. Select games based on their position in the source.
|
|
6046
|
+
* ```txt
|
|
6047
|
+
* 1 only select the first board
|
|
6048
|
+
* 1-4 only select the first 4 boards
|
|
6049
|
+
* 1,2,3,4 same as above, first 4 boards
|
|
6050
|
+
* 11-15,21-25 boards 11 to 15, and boards 21 to 25
|
|
6051
|
+
* 2,3,7-9 boards 2, 3, 7, 8, and 9
|
|
6052
|
+
* ```
|
|
6053
|
+
* Slicing is done after filtering by round number.
|
|
6054
|
+
*
|
|
6055
|
+
* It only works if you chose `syncUrl` or `syncUrls` as the source.
|
|
6056
|
+
* */
|
|
6057
|
+
slices?: string;
|
|
6058
|
+
}
|
|
6059
|
+
| {
|
|
6060
|
+
/** @description Lichess game IDs - Up to 64 Lichess game IDs, separated by spaces.
|
|
6061
|
+
* Choose one between `syncUrl`, `syncUrls` and `syncIds`, if it is missing, the broadcast needs to be fed by [pushing PGN to it](#operation/broadcastPush)
|
|
6062
|
+
* */
|
|
6063
|
+
syncIds?: string;
|
|
6064
|
+
}
|
|
6065
|
+
) & {
|
|
6066
|
+
/** @description Timestamp in milliseconds of broadcast round start. Leave empty to manually start the broadcast round.
|
|
6067
|
+
* Example: `1356998400070`
|
|
6068
|
+
* */
|
|
6069
|
+
startsAt?: number;
|
|
6070
|
+
/**
|
|
6071
|
+
* @description The start date is unknown, and the round will start automatically when the previous round completes.
|
|
6072
|
+
*
|
|
6073
|
+
* @default false
|
|
6074
|
+
*/
|
|
6075
|
+
startsAfterPrevious?: boolean;
|
|
6076
|
+
/** @description Delay in seconds for movements to appear on the broadcast. Leave it empty if you don't need it.
|
|
6077
|
+
* Example: `900` (15 min)
|
|
6078
|
+
* */
|
|
6079
|
+
delay?: number;
|
|
6080
|
+
/**
|
|
6081
|
+
* @description Mark whether the round has been completed.
|
|
6082
|
+
*
|
|
6083
|
+
* @default false
|
|
6084
|
+
*/
|
|
6085
|
+
finished?: boolean;
|
|
6086
|
+
/** @description (Only for Admins) Waiting time for each poll.
|
|
6087
|
+
* */
|
|
6088
|
+
period?: number;
|
|
6089
|
+
};
|
|
6008
6090
|
BroadcastRoundStudyInfo: {
|
|
6009
6091
|
/** @description Whether the currently authenticated user has permission to update the study */
|
|
6010
6092
|
writeable?: boolean;
|
|
@@ -6500,6 +6582,7 @@ export interface components {
|
|
|
6500
6582
|
* } */
|
|
6501
6583
|
ChallengeJson: {
|
|
6502
6584
|
id: string;
|
|
6585
|
+
/** Format: uri */
|
|
6503
6586
|
url: string;
|
|
6504
6587
|
/** @enum {string} */
|
|
6505
6588
|
status: "created" | "offline" | "canceled" | "declined" | "accepted";
|
|
@@ -6833,6 +6916,7 @@ export interface components {
|
|
|
6833
6916
|
* } */
|
|
6834
6917
|
ChallengeOpenJson: {
|
|
6835
6918
|
id: string;
|
|
6919
|
+
/** Format: uri */
|
|
6836
6920
|
url: string;
|
|
6837
6921
|
/** @enum {string} */
|
|
6838
6922
|
status: "created" | "offline" | "canceled" | "declined" | "accepted";
|
|
@@ -9290,6 +9374,8 @@ export interface operations {
|
|
|
9290
9374
|
apiUserNameTournamentCreated: {
|
|
9291
9375
|
parameters: {
|
|
9292
9376
|
query?: {
|
|
9377
|
+
/** @description Max number of tournaments to fetch */
|
|
9378
|
+
nb?: number;
|
|
9293
9379
|
/** @description Include tournaments in the given status: "Created" (10), "Started" (20), "Finished" (30)
|
|
9294
9380
|
* You can add this parameter more than once to include tournaments in different statuses.
|
|
9295
9381
|
* Example: `?status=10&status=20`
|
|
@@ -9317,6 +9403,33 @@ export interface operations {
|
|
|
9317
9403
|
};
|
|
9318
9404
|
};
|
|
9319
9405
|
};
|
|
9406
|
+
apiUserNameTournamentPlayed: {
|
|
9407
|
+
parameters: {
|
|
9408
|
+
query?: {
|
|
9409
|
+
/** @description Max number of tournaments to fetch */
|
|
9410
|
+
nb?: number;
|
|
9411
|
+
};
|
|
9412
|
+
header?: never;
|
|
9413
|
+
path: {
|
|
9414
|
+
/** @description The user whose played tournaments to fetch */
|
|
9415
|
+
username: string;
|
|
9416
|
+
};
|
|
9417
|
+
cookie?: never;
|
|
9418
|
+
};
|
|
9419
|
+
requestBody?: never;
|
|
9420
|
+
responses: {
|
|
9421
|
+
/** @description The list of tournaments played by the user. */
|
|
9422
|
+
200: {
|
|
9423
|
+
headers: {
|
|
9424
|
+
"Access-Control-Allow-Origin"?: string;
|
|
9425
|
+
[name: string]: unknown;
|
|
9426
|
+
};
|
|
9427
|
+
content: {
|
|
9428
|
+
"application/x-ndjson": components["schemas"]["ArenaTournamentPlayed"];
|
|
9429
|
+
};
|
|
9430
|
+
};
|
|
9431
|
+
};
|
|
9432
|
+
};
|
|
9320
9433
|
apiSwissNew: {
|
|
9321
9434
|
parameters: {
|
|
9322
9435
|
query?: never;
|