@lichess-org/types 2.0.40 → 2.0.42
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 +105 -59
- package/package.json +1 -1
package/lichess-api.d.ts
CHANGED
|
@@ -6246,7 +6246,7 @@ export interface components {
|
|
|
6246
6246
|
name: string;
|
|
6247
6247
|
title?: components["schemas"]["Title"];
|
|
6248
6248
|
federation: string;
|
|
6249
|
-
year?: number;
|
|
6249
|
+
year?: number | null;
|
|
6250
6250
|
inactive?: boolean;
|
|
6251
6251
|
standard?: number;
|
|
6252
6252
|
rapid?: number;
|
|
@@ -6329,16 +6329,14 @@ export interface components {
|
|
|
6329
6329
|
* "neio": 201.5,
|
|
6330
6330
|
* "thibault": 144.5
|
|
6331
6331
|
* },
|
|
6332
|
-
* "nbGames": 346
|
|
6333
|
-
* "matchup": {
|
|
6334
|
-
* "users": {
|
|
6335
|
-
* "neio": 44,
|
|
6336
|
-
* "thibault": 43
|
|
6337
|
-
* },
|
|
6338
|
-
* "nbGames": 87
|
|
6339
|
-
* }
|
|
6332
|
+
* "nbGames": 346
|
|
6340
6333
|
* } */
|
|
6341
|
-
Crosstable:
|
|
6334
|
+
Crosstable: {
|
|
6335
|
+
users: {
|
|
6336
|
+
[key: string]: number;
|
|
6337
|
+
};
|
|
6338
|
+
nbGames: number;
|
|
6339
|
+
};
|
|
6342
6340
|
LightUserOnline: components["schemas"]["LightUser"] & {
|
|
6343
6341
|
online?: boolean;
|
|
6344
6342
|
};
|
|
@@ -6429,12 +6427,37 @@ export interface components {
|
|
|
6429
6427
|
type?: "gameFinish";
|
|
6430
6428
|
game?: components["schemas"]["GameEventInfo"];
|
|
6431
6429
|
};
|
|
6430
|
+
/** @enum {string} */
|
|
6431
|
+
ChallengeStatus:
|
|
6432
|
+
| "created"
|
|
6433
|
+
| "offline"
|
|
6434
|
+
| "canceled"
|
|
6435
|
+
| "declined"
|
|
6436
|
+
| "accepted";
|
|
6432
6437
|
ChallengeUser: {
|
|
6433
6438
|
rating?: number;
|
|
6434
6439
|
provisional?: boolean;
|
|
6435
6440
|
online?: boolean;
|
|
6436
6441
|
lag?: number;
|
|
6437
6442
|
} & components["schemas"]["LightUser"];
|
|
6443
|
+
TimeControl:
|
|
6444
|
+
| {
|
|
6445
|
+
/** @example clock */
|
|
6446
|
+
type?: string;
|
|
6447
|
+
limit?: number;
|
|
6448
|
+
increment?: number;
|
|
6449
|
+
/** @example 5+2 */
|
|
6450
|
+
show?: string;
|
|
6451
|
+
}
|
|
6452
|
+
| {
|
|
6453
|
+
/** @example correspondence */
|
|
6454
|
+
type?: string;
|
|
6455
|
+
daysPerTurn?: number;
|
|
6456
|
+
}
|
|
6457
|
+
| {
|
|
6458
|
+
/** @example unlimited */
|
|
6459
|
+
type?: string;
|
|
6460
|
+
};
|
|
6438
6461
|
/** @example {
|
|
6439
6462
|
* "id": "H9fIRZUk",
|
|
6440
6463
|
* "url": "https://lichess.org/H9fIRZUk",
|
|
@@ -6482,31 +6505,13 @@ export interface components {
|
|
|
6482
6505
|
id: string;
|
|
6483
6506
|
/** Format: uri */
|
|
6484
6507
|
url: string;
|
|
6485
|
-
|
|
6486
|
-
status: "created" | "offline" | "canceled" | "declined" | "accepted";
|
|
6508
|
+
status: components["schemas"]["ChallengeStatus"];
|
|
6487
6509
|
challenger: components["schemas"]["ChallengeUser"];
|
|
6488
6510
|
destUser: components["schemas"]["ChallengeUser"] | null;
|
|
6489
6511
|
variant: components["schemas"]["Variant"];
|
|
6490
6512
|
rated: boolean;
|
|
6491
6513
|
speed: components["schemas"]["Speed"];
|
|
6492
|
-
timeControl:
|
|
6493
|
-
| {
|
|
6494
|
-
/** @example clock */
|
|
6495
|
-
type?: string;
|
|
6496
|
-
limit?: number;
|
|
6497
|
-
increment?: number;
|
|
6498
|
-
/** @example 5+2 */
|
|
6499
|
-
show?: string;
|
|
6500
|
-
}
|
|
6501
|
-
| {
|
|
6502
|
-
/** @example correspondence */
|
|
6503
|
-
type?: string;
|
|
6504
|
-
daysPerTurn?: number;
|
|
6505
|
-
}
|
|
6506
|
-
| {
|
|
6507
|
-
/** @example unlimited */
|
|
6508
|
-
type?: string;
|
|
6509
|
-
};
|
|
6514
|
+
timeControl: components["schemas"]["TimeControl"];
|
|
6510
6515
|
/** @enum {string} */
|
|
6511
6516
|
color: "white" | "black" | "random";
|
|
6512
6517
|
/** @enum {string} */
|
|
@@ -6518,15 +6523,15 @@ export interface components {
|
|
|
6518
6523
|
/** @enum {string} */
|
|
6519
6524
|
direction?: "in" | "out";
|
|
6520
6525
|
initialFen?: string;
|
|
6521
|
-
/** @description Human readable, possibly translated reason why the challenge was declined. */
|
|
6522
|
-
declineReason?: string;
|
|
6523
|
-
/** @description Untranslated, computer-matchable reason why the challenge was declined. */
|
|
6524
|
-
declineReasonKey?: string;
|
|
6525
6526
|
};
|
|
6526
6527
|
ChallengeEvent: {
|
|
6527
6528
|
/** @constant */
|
|
6528
6529
|
type?: "challenge";
|
|
6529
6530
|
challenge?: components["schemas"]["ChallengeJson"];
|
|
6531
|
+
compat?: {
|
|
6532
|
+
bot?: boolean;
|
|
6533
|
+
board?: boolean;
|
|
6534
|
+
};
|
|
6530
6535
|
};
|
|
6531
6536
|
ChallengeCanceledEvent: {
|
|
6532
6537
|
/** @constant */
|
|
@@ -6534,15 +6539,74 @@ export interface components {
|
|
|
6534
6539
|
challenge?: components["schemas"]["ChallengeJson"];
|
|
6535
6540
|
};
|
|
6536
6541
|
/** @example {
|
|
6537
|
-
* "id": "
|
|
6542
|
+
* "id": "H9fIRZUk",
|
|
6543
|
+
* "url": "https://lichess.org/H9fIRZUk",
|
|
6544
|
+
* "status": "created",
|
|
6545
|
+
* "challenger": {
|
|
6546
|
+
* "id": "bot1",
|
|
6547
|
+
* "name": "Bot1",
|
|
6548
|
+
* "rating": 1500,
|
|
6549
|
+
* "title": "BOT",
|
|
6550
|
+
* "provisional": true,
|
|
6551
|
+
* "online": true,
|
|
6552
|
+
* "lag": 4
|
|
6553
|
+
* },
|
|
6554
|
+
* "destUser": {
|
|
6555
|
+
* "id": "bobby",
|
|
6556
|
+
* "name": "Bobby",
|
|
6557
|
+
* "rating": 1635,
|
|
6558
|
+
* "title": "GM",
|
|
6559
|
+
* "provisional": true,
|
|
6560
|
+
* "online": true,
|
|
6561
|
+
* "lag": 4
|
|
6562
|
+
* },
|
|
6563
|
+
* "variant": {
|
|
6564
|
+
* "key": "standard",
|
|
6565
|
+
* "name": "Standard",
|
|
6566
|
+
* "short": "Std"
|
|
6567
|
+
* },
|
|
6568
|
+
* "rated": true,
|
|
6569
|
+
* "speed": "rapid",
|
|
6570
|
+
* "timeControl": {
|
|
6571
|
+
* "type": "clock",
|
|
6572
|
+
* "limit": 600,
|
|
6573
|
+
* "increment": 0,
|
|
6574
|
+
* "show": "10+0"
|
|
6575
|
+
* },
|
|
6576
|
+
* "color": "random",
|
|
6577
|
+
* "finalColor": "black",
|
|
6578
|
+
* "perf": {
|
|
6579
|
+
* "icon": "",
|
|
6580
|
+
* "name": "Rapid"
|
|
6581
|
+
* },
|
|
6582
|
+
* "direction": "out",
|
|
6583
|
+
* "declineReason": "I'm not accepting challenges at the moment.",
|
|
6584
|
+
* "declineReasonKey": "generic"
|
|
6538
6585
|
* } */
|
|
6539
|
-
|
|
6540
|
-
|
|
6541
|
-
|
|
6586
|
+
ChallengeDeclinedJson: {
|
|
6587
|
+
/** @description Human readable, possibly translated reason why the challenge was declined. */
|
|
6588
|
+
declineReason: string;
|
|
6589
|
+
/**
|
|
6590
|
+
* @description Untranslated, computer-matchable reason why the challenge was declined.
|
|
6591
|
+
* @enum {string}
|
|
6592
|
+
*/
|
|
6593
|
+
declineReasonKey:
|
|
6594
|
+
| "generic"
|
|
6595
|
+
| "later"
|
|
6596
|
+
| "tooFast"
|
|
6597
|
+
| "tooSlow"
|
|
6598
|
+
| "timeControl"
|
|
6599
|
+
| "rated"
|
|
6600
|
+
| "casual"
|
|
6601
|
+
| "standard"
|
|
6602
|
+
| "variant"
|
|
6603
|
+
| "noBot"
|
|
6604
|
+
| "onlyBot";
|
|
6605
|
+
} & components["schemas"]["ChallengeJson"];
|
|
6542
6606
|
ChallengeDeclinedEvent: {
|
|
6543
6607
|
/** @constant */
|
|
6544
6608
|
type?: "challengeDeclined";
|
|
6545
|
-
challenge?: components["schemas"]["
|
|
6609
|
+
challenge?: components["schemas"]["ChallengeDeclinedJson"];
|
|
6546
6610
|
};
|
|
6547
6611
|
GameEventPlayer: {
|
|
6548
6612
|
aiLevel?: number;
|
|
@@ -6742,31 +6806,13 @@ export interface components {
|
|
|
6742
6806
|
id: string;
|
|
6743
6807
|
/** Format: uri */
|
|
6744
6808
|
url: string;
|
|
6745
|
-
|
|
6746
|
-
status: "created" | "offline" | "canceled" | "declined" | "accepted";
|
|
6809
|
+
status: components["schemas"]["ChallengeStatus"];
|
|
6747
6810
|
challenger: null;
|
|
6748
6811
|
destUser: null;
|
|
6749
6812
|
variant: components["schemas"]["Variant"];
|
|
6750
6813
|
rated: boolean;
|
|
6751
6814
|
speed: components["schemas"]["Speed"];
|
|
6752
|
-
timeControl:
|
|
6753
|
-
| {
|
|
6754
|
-
/** @example clock */
|
|
6755
|
-
type?: string;
|
|
6756
|
-
limit?: number;
|
|
6757
|
-
increment?: number;
|
|
6758
|
-
/** @example 5+2 */
|
|
6759
|
-
show?: string;
|
|
6760
|
-
}
|
|
6761
|
-
| {
|
|
6762
|
-
/** @example correspondence */
|
|
6763
|
-
type?: string;
|
|
6764
|
-
daysPerTurn?: number;
|
|
6765
|
-
}
|
|
6766
|
-
| {
|
|
6767
|
-
/** @example unlimited */
|
|
6768
|
-
type?: string;
|
|
6769
|
-
};
|
|
6815
|
+
timeControl: components["schemas"]["TimeControl"];
|
|
6770
6816
|
/** @enum {string} */
|
|
6771
6817
|
color: "white" | "black" | "random";
|
|
6772
6818
|
/** @enum {string} */
|