@lichess-org/types 2.0.15 → 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 +150 -53
- 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;
|
|
@@ -5570,6 +5601,14 @@ export interface components {
|
|
|
5570
5601
|
/** @description The cause of the error. */
|
|
5571
5602
|
error?: string;
|
|
5572
5603
|
};
|
|
5604
|
+
ArenaTournamentPlayed: {
|
|
5605
|
+
tournament?: components["schemas"]["ArenaTournament"];
|
|
5606
|
+
player?: {
|
|
5607
|
+
games?: number;
|
|
5608
|
+
score?: number;
|
|
5609
|
+
rank?: number;
|
|
5610
|
+
};
|
|
5611
|
+
};
|
|
5573
5612
|
/**
|
|
5574
5613
|
* @description Custom initial position (in FEN). Variant must be standard and the game cannot be rated.
|
|
5575
5614
|
* @default rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
|
|
@@ -5932,58 +5971,7 @@ export interface components {
|
|
|
5932
5971
|
/** @description Name of the broadcast round.
|
|
5933
5972
|
* Example: `Round 1`
|
|
5934
5973
|
* */
|
|
5935
|
-
name
|
|
5936
|
-
/** @description Filter games by round number
|
|
5937
|
-
*
|
|
5938
|
-
* Optional, only keep games from the source that match a round number.
|
|
5939
|
-
* It uses the PGN **Round** tag. These would match round 3:
|
|
5940
|
-
* ```txt
|
|
5941
|
-
* [Round "3"]
|
|
5942
|
-
* [Round "3.1"]
|
|
5943
|
-
* ```
|
|
5944
|
-
* If you set a round number, then games without a **Round** tag are dropped.
|
|
5945
|
-
*
|
|
5946
|
-
* It only works if you chose `syncUrl` or `syncUrls` as the source.
|
|
5947
|
-
* */
|
|
5948
|
-
onlyRound?: number;
|
|
5949
|
-
/** @description Select slices of the games
|
|
5950
|
-
*
|
|
5951
|
-
* Optional. Select games based on their position in the source.
|
|
5952
|
-
* ```txt
|
|
5953
|
-
* 1 only select the first board
|
|
5954
|
-
* 1-4 only select the first 4 boards
|
|
5955
|
-
* 1,2,3,4 same as above, first 4 boards
|
|
5956
|
-
* 11-15,21-25 boards 11 to 15, and boards 21 to 25
|
|
5957
|
-
* 2,3,7-9 boards 2, 3, 7, 8, and 9
|
|
5958
|
-
* ```
|
|
5959
|
-
* Slicing is done after filtering by round number.
|
|
5960
|
-
*
|
|
5961
|
-
* It only works if you chose `syncUrl` or `syncUrls` as the source.
|
|
5962
|
-
* */
|
|
5963
|
-
slices?: string;
|
|
5964
|
-
/** @description Timestamp in milliseconds of broadcast round start. Leave empty to manually start the broadcast round.
|
|
5965
|
-
* Example: `1356998400070`
|
|
5966
|
-
* */
|
|
5967
|
-
startsAt?: number;
|
|
5968
|
-
/**
|
|
5969
|
-
* @description The start date is unknown, and the round will start automatically when the previous round completes.
|
|
5970
|
-
*
|
|
5971
|
-
* @default false
|
|
5972
|
-
*/
|
|
5973
|
-
startsAfterPrevious?: boolean;
|
|
5974
|
-
/** @description Delay in seconds for movements to appear on the broadcast. Leave it empty if you don't need it.
|
|
5975
|
-
* Example: `900` (15 min)
|
|
5976
|
-
* */
|
|
5977
|
-
delay?: number;
|
|
5978
|
-
/**
|
|
5979
|
-
* @description Mark whether the round has been completed.
|
|
5980
|
-
*
|
|
5981
|
-
* @default false
|
|
5982
|
-
*/
|
|
5983
|
-
finished?: boolean;
|
|
5984
|
-
/** @description (Only for Admins) Waiting time for each poll.
|
|
5985
|
-
* */
|
|
5986
|
-
period?: number;
|
|
5974
|
+
name?: string;
|
|
5987
5975
|
} & (
|
|
5988
5976
|
| Record<string, never>
|
|
5989
5977
|
| {
|
|
@@ -5999,6 +5987,34 @@ export interface components {
|
|
|
5999
5987
|
*
|
|
6000
5988
|
*/
|
|
6001
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;
|
|
6002
6018
|
}
|
|
6003
6019
|
| {
|
|
6004
6020
|
/** @description URLs that Lichess will poll to get updates about the games, separated by newlines. They must be publicly accessible from the Internet.
|
|
@@ -6011,6 +6027,34 @@ export interface components {
|
|
|
6011
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)
|
|
6012
6028
|
* */
|
|
6013
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;
|
|
6014
6058
|
}
|
|
6015
6059
|
| {
|
|
6016
6060
|
/** @description Lichess game IDs - Up to 64 Lichess game IDs, separated by spaces.
|
|
@@ -6018,7 +6062,31 @@ export interface components {
|
|
|
6018
6062
|
* */
|
|
6019
6063
|
syncIds?: string;
|
|
6020
6064
|
}
|
|
6021
|
-
)
|
|
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
|
+
};
|
|
6022
6090
|
BroadcastRoundStudyInfo: {
|
|
6023
6091
|
/** @description Whether the currently authenticated user has permission to update the study */
|
|
6024
6092
|
writeable?: boolean;
|
|
@@ -9306,6 +9374,8 @@ export interface operations {
|
|
|
9306
9374
|
apiUserNameTournamentCreated: {
|
|
9307
9375
|
parameters: {
|
|
9308
9376
|
query?: {
|
|
9377
|
+
/** @description Max number of tournaments to fetch */
|
|
9378
|
+
nb?: number;
|
|
9309
9379
|
/** @description Include tournaments in the given status: "Created" (10), "Started" (20), "Finished" (30)
|
|
9310
9380
|
* You can add this parameter more than once to include tournaments in different statuses.
|
|
9311
9381
|
* Example: `?status=10&status=20`
|
|
@@ -9333,6 +9403,33 @@ export interface operations {
|
|
|
9333
9403
|
};
|
|
9334
9404
|
};
|
|
9335
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
|
+
};
|
|
9336
9433
|
apiSwissNew: {
|
|
9337
9434
|
parameters: {
|
|
9338
9435
|
query?: never;
|