@lichess-org/types 2.0.41 → 2.0.43
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 +168 -109
- package/package.json +1 -1
package/lichess-api.d.ts
CHANGED
|
@@ -3838,10 +3838,27 @@ export interface components {
|
|
|
3838
3838
|
schemas: {
|
|
3839
3839
|
/** @description See [available flair list and images](https://github.com/lichess-org/lila/tree/master/public/flair) */
|
|
3840
3840
|
Flair: string;
|
|
3841
|
+
/**
|
|
3842
|
+
* @description only appears if the user is a titled player or a bot user
|
|
3843
|
+
* @enum {string}
|
|
3844
|
+
*/
|
|
3845
|
+
Title:
|
|
3846
|
+
| "GM"
|
|
3847
|
+
| "WGM"
|
|
3848
|
+
| "IM"
|
|
3849
|
+
| "WIM"
|
|
3850
|
+
| "FM"
|
|
3851
|
+
| "WFM"
|
|
3852
|
+
| "NM"
|
|
3853
|
+
| "CM"
|
|
3854
|
+
| "WCM"
|
|
3855
|
+
| "WNM"
|
|
3856
|
+
| "LM"
|
|
3857
|
+
| "BOT";
|
|
3841
3858
|
PerfTop10: {
|
|
3842
3859
|
id?: string;
|
|
3843
3860
|
username?: string;
|
|
3844
|
-
title?:
|
|
3861
|
+
title?: components["schemas"]["Title"];
|
|
3845
3862
|
patron?: boolean;
|
|
3846
3863
|
online?: boolean;
|
|
3847
3864
|
perfs?: {
|
|
@@ -3993,23 +4010,6 @@ export interface components {
|
|
|
3993
4010
|
/** @example 12134 */
|
|
3994
4011
|
tv?: number;
|
|
3995
4012
|
};
|
|
3996
|
-
/**
|
|
3997
|
-
* @description only appears if the user is a titled player or a bot user
|
|
3998
|
-
* @enum {string}
|
|
3999
|
-
*/
|
|
4000
|
-
Title:
|
|
4001
|
-
| "GM"
|
|
4002
|
-
| "WGM"
|
|
4003
|
-
| "IM"
|
|
4004
|
-
| "WIM"
|
|
4005
|
-
| "FM"
|
|
4006
|
-
| "WFM"
|
|
4007
|
-
| "NM"
|
|
4008
|
-
| "CM"
|
|
4009
|
-
| "WCM"
|
|
4010
|
-
| "WNM"
|
|
4011
|
-
| "LM"
|
|
4012
|
-
| "BOT";
|
|
4013
4013
|
User: {
|
|
4014
4014
|
/** @example georges */
|
|
4015
4015
|
id: string;
|
|
@@ -6054,7 +6054,7 @@ export interface components {
|
|
|
6054
6054
|
/** @example 2138 */
|
|
6055
6055
|
performance?: number;
|
|
6056
6056
|
/** @example FM */
|
|
6057
|
-
title?:
|
|
6057
|
+
title?: components["schemas"]["Title"];
|
|
6058
6058
|
/** @example 3408230 */
|
|
6059
6059
|
fideId?: number;
|
|
6060
6060
|
/** @example CHI */
|
|
@@ -6206,7 +6206,7 @@ export interface components {
|
|
|
6206
6206
|
fen?: string;
|
|
6207
6207
|
players?: {
|
|
6208
6208
|
name?: string;
|
|
6209
|
-
title?:
|
|
6209
|
+
title?: components["schemas"]["Title"];
|
|
6210
6210
|
rating?: number;
|
|
6211
6211
|
clock?: number;
|
|
6212
6212
|
fed?: string;
|
|
@@ -6351,6 +6351,12 @@ export interface components {
|
|
|
6351
6351
|
*/
|
|
6352
6352
|
date?: number;
|
|
6353
6353
|
};
|
|
6354
|
+
GameCompat: {
|
|
6355
|
+
/** @description Compatible with Bot API */
|
|
6356
|
+
bot?: boolean;
|
|
6357
|
+
/** @description Compatible with Board API */
|
|
6358
|
+
board?: boolean;
|
|
6359
|
+
};
|
|
6354
6360
|
/** @example {
|
|
6355
6361
|
* "fullId": "9NaCTu2vz1c4",
|
|
6356
6362
|
* "gameId": "9NaCTu2v",
|
|
@@ -6411,10 +6417,7 @@ export interface components {
|
|
|
6411
6417
|
};
|
|
6412
6418
|
isMyTurn?: boolean;
|
|
6413
6419
|
secondsLeft?: number;
|
|
6414
|
-
compat?:
|
|
6415
|
-
bot?: boolean;
|
|
6416
|
-
board?: boolean;
|
|
6417
|
-
};
|
|
6420
|
+
compat?: components["schemas"]["GameCompat"];
|
|
6418
6421
|
id?: string;
|
|
6419
6422
|
};
|
|
6420
6423
|
GameStartEvent: {
|
|
@@ -6427,12 +6430,42 @@ export interface components {
|
|
|
6427
6430
|
type?: "gameFinish";
|
|
6428
6431
|
game?: components["schemas"]["GameEventInfo"];
|
|
6429
6432
|
};
|
|
6433
|
+
/** @enum {string} */
|
|
6434
|
+
ChallengeStatus:
|
|
6435
|
+
| "created"
|
|
6436
|
+
| "offline"
|
|
6437
|
+
| "canceled"
|
|
6438
|
+
| "declined"
|
|
6439
|
+
| "accepted";
|
|
6430
6440
|
ChallengeUser: {
|
|
6441
|
+
id: string;
|
|
6442
|
+
name: string;
|
|
6431
6443
|
rating?: number;
|
|
6444
|
+
title?: components["schemas"]["Title"] | null;
|
|
6445
|
+
flair?: components["schemas"]["Flair"];
|
|
6446
|
+
patron?: boolean;
|
|
6432
6447
|
provisional?: boolean;
|
|
6433
6448
|
online?: boolean;
|
|
6434
6449
|
lag?: number;
|
|
6435
|
-
}
|
|
6450
|
+
};
|
|
6451
|
+
TimeControl:
|
|
6452
|
+
| {
|
|
6453
|
+
/** @constant */
|
|
6454
|
+
type?: "clock";
|
|
6455
|
+
limit?: number;
|
|
6456
|
+
increment?: number;
|
|
6457
|
+
/** @example 5+2 */
|
|
6458
|
+
show?: string;
|
|
6459
|
+
}
|
|
6460
|
+
| {
|
|
6461
|
+
/** @constant */
|
|
6462
|
+
type?: "correspondence";
|
|
6463
|
+
daysPerTurn?: number;
|
|
6464
|
+
}
|
|
6465
|
+
| {
|
|
6466
|
+
/** @constant */
|
|
6467
|
+
type?: "unlimited";
|
|
6468
|
+
};
|
|
6436
6469
|
/** @example {
|
|
6437
6470
|
* "id": "H9fIRZUk",
|
|
6438
6471
|
* "url": "https://lichess.org/H9fIRZUk",
|
|
@@ -6480,31 +6513,13 @@ export interface components {
|
|
|
6480
6513
|
id: string;
|
|
6481
6514
|
/** Format: uri */
|
|
6482
6515
|
url: string;
|
|
6483
|
-
|
|
6484
|
-
status: "created" | "offline" | "canceled" | "declined" | "accepted";
|
|
6516
|
+
status: components["schemas"]["ChallengeStatus"];
|
|
6485
6517
|
challenger: components["schemas"]["ChallengeUser"];
|
|
6486
6518
|
destUser: components["schemas"]["ChallengeUser"] | null;
|
|
6487
6519
|
variant: components["schemas"]["Variant"];
|
|
6488
6520
|
rated: boolean;
|
|
6489
6521
|
speed: components["schemas"]["Speed"];
|
|
6490
|
-
timeControl:
|
|
6491
|
-
| {
|
|
6492
|
-
/** @example clock */
|
|
6493
|
-
type?: string;
|
|
6494
|
-
limit?: number;
|
|
6495
|
-
increment?: number;
|
|
6496
|
-
/** @example 5+2 */
|
|
6497
|
-
show?: string;
|
|
6498
|
-
}
|
|
6499
|
-
| {
|
|
6500
|
-
/** @example correspondence */
|
|
6501
|
-
type?: string;
|
|
6502
|
-
daysPerTurn?: number;
|
|
6503
|
-
}
|
|
6504
|
-
| {
|
|
6505
|
-
/** @example unlimited */
|
|
6506
|
-
type?: string;
|
|
6507
|
-
};
|
|
6522
|
+
timeControl: components["schemas"]["TimeControl"];
|
|
6508
6523
|
/** @enum {string} */
|
|
6509
6524
|
color: "white" | "black" | "random";
|
|
6510
6525
|
/** @enum {string} */
|
|
@@ -6516,15 +6531,12 @@ export interface components {
|
|
|
6516
6531
|
/** @enum {string} */
|
|
6517
6532
|
direction?: "in" | "out";
|
|
6518
6533
|
initialFen?: string;
|
|
6519
|
-
/** @description Human readable, possibly translated reason why the challenge was declined. */
|
|
6520
|
-
declineReason?: string;
|
|
6521
|
-
/** @description Untranslated, computer-matchable reason why the challenge was declined. */
|
|
6522
|
-
declineReasonKey?: string;
|
|
6523
6534
|
};
|
|
6524
6535
|
ChallengeEvent: {
|
|
6525
6536
|
/** @constant */
|
|
6526
6537
|
type?: "challenge";
|
|
6527
6538
|
challenge?: components["schemas"]["ChallengeJson"];
|
|
6539
|
+
compat?: components["schemas"]["GameCompat"];
|
|
6528
6540
|
};
|
|
6529
6541
|
ChallengeCanceledEvent: {
|
|
6530
6542
|
/** @constant */
|
|
@@ -6532,21 +6544,80 @@ export interface components {
|
|
|
6532
6544
|
challenge?: components["schemas"]["ChallengeJson"];
|
|
6533
6545
|
};
|
|
6534
6546
|
/** @example {
|
|
6535
|
-
* "id": "
|
|
6547
|
+
* "id": "H9fIRZUk",
|
|
6548
|
+
* "url": "https://lichess.org/H9fIRZUk",
|
|
6549
|
+
* "status": "created",
|
|
6550
|
+
* "challenger": {
|
|
6551
|
+
* "id": "bot1",
|
|
6552
|
+
* "name": "Bot1",
|
|
6553
|
+
* "rating": 1500,
|
|
6554
|
+
* "title": "BOT",
|
|
6555
|
+
* "provisional": true,
|
|
6556
|
+
* "online": true,
|
|
6557
|
+
* "lag": 4
|
|
6558
|
+
* },
|
|
6559
|
+
* "destUser": {
|
|
6560
|
+
* "id": "bobby",
|
|
6561
|
+
* "name": "Bobby",
|
|
6562
|
+
* "rating": 1635,
|
|
6563
|
+
* "title": "GM",
|
|
6564
|
+
* "provisional": true,
|
|
6565
|
+
* "online": true,
|
|
6566
|
+
* "lag": 4
|
|
6567
|
+
* },
|
|
6568
|
+
* "variant": {
|
|
6569
|
+
* "key": "standard",
|
|
6570
|
+
* "name": "Standard",
|
|
6571
|
+
* "short": "Std"
|
|
6572
|
+
* },
|
|
6573
|
+
* "rated": true,
|
|
6574
|
+
* "speed": "rapid",
|
|
6575
|
+
* "timeControl": {
|
|
6576
|
+
* "type": "clock",
|
|
6577
|
+
* "limit": 600,
|
|
6578
|
+
* "increment": 0,
|
|
6579
|
+
* "show": "10+0"
|
|
6580
|
+
* },
|
|
6581
|
+
* "color": "random",
|
|
6582
|
+
* "finalColor": "black",
|
|
6583
|
+
* "perf": {
|
|
6584
|
+
* "icon": "",
|
|
6585
|
+
* "name": "Rapid"
|
|
6586
|
+
* },
|
|
6587
|
+
* "direction": "out",
|
|
6588
|
+
* "declineReason": "I'm not accepting challenges at the moment.",
|
|
6589
|
+
* "declineReasonKey": "generic"
|
|
6536
6590
|
* } */
|
|
6537
|
-
|
|
6538
|
-
|
|
6539
|
-
|
|
6591
|
+
ChallengeDeclinedJson: {
|
|
6592
|
+
/** @description Human readable, possibly translated reason why the challenge was declined. */
|
|
6593
|
+
declineReason: string;
|
|
6594
|
+
/**
|
|
6595
|
+
* @description Untranslated, computer-matchable reason why the challenge was declined.
|
|
6596
|
+
* @enum {string}
|
|
6597
|
+
*/
|
|
6598
|
+
declineReasonKey:
|
|
6599
|
+
| "generic"
|
|
6600
|
+
| "later"
|
|
6601
|
+
| "tooFast"
|
|
6602
|
+
| "tooSlow"
|
|
6603
|
+
| "timeControl"
|
|
6604
|
+
| "rated"
|
|
6605
|
+
| "casual"
|
|
6606
|
+
| "standard"
|
|
6607
|
+
| "variant"
|
|
6608
|
+
| "noBot"
|
|
6609
|
+
| "onlyBot";
|
|
6610
|
+
} & components["schemas"]["ChallengeJson"];
|
|
6540
6611
|
ChallengeDeclinedEvent: {
|
|
6541
6612
|
/** @constant */
|
|
6542
6613
|
type?: "challengeDeclined";
|
|
6543
|
-
challenge?: components["schemas"]["
|
|
6614
|
+
challenge?: components["schemas"]["ChallengeDeclinedJson"];
|
|
6544
6615
|
};
|
|
6545
6616
|
GameEventPlayer: {
|
|
6546
6617
|
aiLevel?: number;
|
|
6547
6618
|
id?: string;
|
|
6548
6619
|
name?: string;
|
|
6549
|
-
title?:
|
|
6620
|
+
title?: components["schemas"]["Title"] | null;
|
|
6550
6621
|
rating?: number;
|
|
6551
6622
|
provisional?: boolean;
|
|
6552
6623
|
};
|
|
@@ -6706,65 +6777,21 @@ export interface components {
|
|
|
6706
6777
|
* "user": "thibault"
|
|
6707
6778
|
* }
|
|
6708
6779
|
* ] */
|
|
6709
|
-
GameChat:
|
|
6710
|
-
|
|
6711
|
-
|
|
6712
|
-
|
|
6713
|
-
* "status": "created",
|
|
6714
|
-
* "challenger": null,
|
|
6715
|
-
* "destUser": null,
|
|
6716
|
-
* "variant": {
|
|
6717
|
-
* "key": "standard",
|
|
6718
|
-
* "name": "Standard",
|
|
6719
|
-
* "short": "Std"
|
|
6720
|
-
* },
|
|
6721
|
-
* "rated": false,
|
|
6722
|
-
* "speed": "rapid",
|
|
6723
|
-
* "timeControl": {
|
|
6724
|
-
* "type": "clock",
|
|
6725
|
-
* "limit": 600,
|
|
6726
|
-
* "increment": 5,
|
|
6727
|
-
* "show": "10+5"
|
|
6728
|
-
* },
|
|
6729
|
-
* "color": "random",
|
|
6730
|
-
* "finalColor": "black",
|
|
6731
|
-
* "perf": {
|
|
6732
|
-
* "icon": "",
|
|
6733
|
-
* "name": "Rapid"
|
|
6734
|
-
* },
|
|
6735
|
-
* "open": {},
|
|
6736
|
-
* "urlWhite": "https://lichess.org/3gH5lybT?color=white",
|
|
6737
|
-
* "urlBlack": "https://lichess.org/3gH5lybT?color=black"
|
|
6738
|
-
* } */
|
|
6780
|
+
GameChat: {
|
|
6781
|
+
text?: string;
|
|
6782
|
+
user?: string;
|
|
6783
|
+
}[];
|
|
6739
6784
|
ChallengeOpenJson: {
|
|
6740
6785
|
id: string;
|
|
6741
6786
|
/** Format: uri */
|
|
6742
6787
|
url: string;
|
|
6743
|
-
|
|
6744
|
-
status: "created" | "offline" | "canceled" | "declined" | "accepted";
|
|
6788
|
+
status: components["schemas"]["ChallengeStatus"];
|
|
6745
6789
|
challenger: null;
|
|
6746
6790
|
destUser: null;
|
|
6747
6791
|
variant: components["schemas"]["Variant"];
|
|
6748
6792
|
rated: boolean;
|
|
6749
6793
|
speed: components["schemas"]["Speed"];
|
|
6750
|
-
timeControl:
|
|
6751
|
-
| {
|
|
6752
|
-
/** @example clock */
|
|
6753
|
-
type?: string;
|
|
6754
|
-
limit?: number;
|
|
6755
|
-
increment?: number;
|
|
6756
|
-
/** @example 5+2 */
|
|
6757
|
-
show?: string;
|
|
6758
|
-
}
|
|
6759
|
-
| {
|
|
6760
|
-
/** @example correspondence */
|
|
6761
|
-
type?: string;
|
|
6762
|
-
daysPerTurn?: number;
|
|
6763
|
-
}
|
|
6764
|
-
| {
|
|
6765
|
-
/** @example unlimited */
|
|
6766
|
-
type?: string;
|
|
6767
|
-
};
|
|
6794
|
+
timeControl: components["schemas"]["TimeControl"];
|
|
6768
6795
|
/** @enum {string} */
|
|
6769
6796
|
color: "white" | "black" | "random";
|
|
6770
6797
|
/** @enum {string} */
|
|
@@ -7401,7 +7428,7 @@ export interface operations {
|
|
|
7401
7428
|
id: string;
|
|
7402
7429
|
name: string;
|
|
7403
7430
|
flair?: components["schemas"]["Flair"];
|
|
7404
|
-
title?:
|
|
7431
|
+
title?: components["schemas"]["Title"];
|
|
7405
7432
|
online?: boolean;
|
|
7406
7433
|
playing?: boolean;
|
|
7407
7434
|
streaming?: boolean;
|
|
@@ -12841,7 +12868,7 @@ export interface operations {
|
|
|
12841
12868
|
content: {
|
|
12842
12869
|
"application/x-www-form-urlencoded": {
|
|
12843
12870
|
/** @description AI strength */
|
|
12844
|
-
level
|
|
12871
|
+
level: number;
|
|
12845
12872
|
/**
|
|
12846
12873
|
* @description Clock initial time in seconds. If empty, a correspondence game is created.
|
|
12847
12874
|
* @example 300
|
|
@@ -12876,7 +12903,39 @@ export interface operations {
|
|
|
12876
12903
|
[name: string]: unknown;
|
|
12877
12904
|
};
|
|
12878
12905
|
content: {
|
|
12879
|
-
"application/json":
|
|
12906
|
+
"application/json": {
|
|
12907
|
+
id?: string;
|
|
12908
|
+
variant?: components["schemas"]["Variant"];
|
|
12909
|
+
speed?: components["schemas"]["Speed"];
|
|
12910
|
+
perf?: components["schemas"]["PerfType"];
|
|
12911
|
+
rated?: boolean;
|
|
12912
|
+
fen?: string;
|
|
12913
|
+
turns?: number;
|
|
12914
|
+
source?: components["schemas"]["GameSource"];
|
|
12915
|
+
status?: {
|
|
12916
|
+
/** @enum {integer} */
|
|
12917
|
+
id?:
|
|
12918
|
+
| 10
|
|
12919
|
+
| 20
|
|
12920
|
+
| 25
|
|
12921
|
+
| 30
|
|
12922
|
+
| 31
|
|
12923
|
+
| 32
|
|
12924
|
+
| 33
|
|
12925
|
+
| 34
|
|
12926
|
+
| 35
|
|
12927
|
+
| 36
|
|
12928
|
+
| 37
|
|
12929
|
+
| 38
|
|
12930
|
+
| 60;
|
|
12931
|
+
name?: components["schemas"]["GameStatus"];
|
|
12932
|
+
};
|
|
12933
|
+
/** Format: int64 */
|
|
12934
|
+
createdAt?: number;
|
|
12935
|
+
/** @enum {string} */
|
|
12936
|
+
player?: "white" | "black";
|
|
12937
|
+
fullId?: string;
|
|
12938
|
+
};
|
|
12880
12939
|
};
|
|
12881
12940
|
};
|
|
12882
12941
|
/** @description The creation of a game with Lichess AI failed. */
|
|
@@ -13283,7 +13342,7 @@ export interface operations {
|
|
|
13283
13342
|
path: {
|
|
13284
13343
|
gameId: string;
|
|
13285
13344
|
/** @description How many seconds to give */
|
|
13286
|
-
seconds:
|
|
13345
|
+
seconds: number;
|
|
13287
13346
|
};
|
|
13288
13347
|
cookie?: never;
|
|
13289
13348
|
};
|