@lichess-org/types 2.0.41 → 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 +97 -49
- package/package.json +1 -1
package/lichess-api.d.ts
CHANGED
|
@@ -6427,12 +6427,37 @@ export interface components {
|
|
|
6427
6427
|
type?: "gameFinish";
|
|
6428
6428
|
game?: components["schemas"]["GameEventInfo"];
|
|
6429
6429
|
};
|
|
6430
|
+
/** @enum {string} */
|
|
6431
|
+
ChallengeStatus:
|
|
6432
|
+
| "created"
|
|
6433
|
+
| "offline"
|
|
6434
|
+
| "canceled"
|
|
6435
|
+
| "declined"
|
|
6436
|
+
| "accepted";
|
|
6430
6437
|
ChallengeUser: {
|
|
6431
6438
|
rating?: number;
|
|
6432
6439
|
provisional?: boolean;
|
|
6433
6440
|
online?: boolean;
|
|
6434
6441
|
lag?: number;
|
|
6435
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
|
+
};
|
|
6436
6461
|
/** @example {
|
|
6437
6462
|
* "id": "H9fIRZUk",
|
|
6438
6463
|
* "url": "https://lichess.org/H9fIRZUk",
|
|
@@ -6480,31 +6505,13 @@ export interface components {
|
|
|
6480
6505
|
id: string;
|
|
6481
6506
|
/** Format: uri */
|
|
6482
6507
|
url: string;
|
|
6483
|
-
|
|
6484
|
-
status: "created" | "offline" | "canceled" | "declined" | "accepted";
|
|
6508
|
+
status: components["schemas"]["ChallengeStatus"];
|
|
6485
6509
|
challenger: components["schemas"]["ChallengeUser"];
|
|
6486
6510
|
destUser: components["schemas"]["ChallengeUser"] | null;
|
|
6487
6511
|
variant: components["schemas"]["Variant"];
|
|
6488
6512
|
rated: boolean;
|
|
6489
6513
|
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
|
-
};
|
|
6514
|
+
timeControl: components["schemas"]["TimeControl"];
|
|
6508
6515
|
/** @enum {string} */
|
|
6509
6516
|
color: "white" | "black" | "random";
|
|
6510
6517
|
/** @enum {string} */
|
|
@@ -6516,15 +6523,15 @@ export interface components {
|
|
|
6516
6523
|
/** @enum {string} */
|
|
6517
6524
|
direction?: "in" | "out";
|
|
6518
6525
|
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
6526
|
};
|
|
6524
6527
|
ChallengeEvent: {
|
|
6525
6528
|
/** @constant */
|
|
6526
6529
|
type?: "challenge";
|
|
6527
6530
|
challenge?: components["schemas"]["ChallengeJson"];
|
|
6531
|
+
compat?: {
|
|
6532
|
+
bot?: boolean;
|
|
6533
|
+
board?: boolean;
|
|
6534
|
+
};
|
|
6528
6535
|
};
|
|
6529
6536
|
ChallengeCanceledEvent: {
|
|
6530
6537
|
/** @constant */
|
|
@@ -6532,15 +6539,74 @@ export interface components {
|
|
|
6532
6539
|
challenge?: components["schemas"]["ChallengeJson"];
|
|
6533
6540
|
};
|
|
6534
6541
|
/** @example {
|
|
6535
|
-
* "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"
|
|
6536
6585
|
* } */
|
|
6537
|
-
|
|
6538
|
-
|
|
6539
|
-
|
|
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"];
|
|
6540
6606
|
ChallengeDeclinedEvent: {
|
|
6541
6607
|
/** @constant */
|
|
6542
6608
|
type?: "challengeDeclined";
|
|
6543
|
-
challenge?: components["schemas"]["
|
|
6609
|
+
challenge?: components["schemas"]["ChallengeDeclinedJson"];
|
|
6544
6610
|
};
|
|
6545
6611
|
GameEventPlayer: {
|
|
6546
6612
|
aiLevel?: number;
|
|
@@ -6740,31 +6806,13 @@ export interface components {
|
|
|
6740
6806
|
id: string;
|
|
6741
6807
|
/** Format: uri */
|
|
6742
6808
|
url: string;
|
|
6743
|
-
|
|
6744
|
-
status: "created" | "offline" | "canceled" | "declined" | "accepted";
|
|
6809
|
+
status: components["schemas"]["ChallengeStatus"];
|
|
6745
6810
|
challenger: null;
|
|
6746
6811
|
destUser: null;
|
|
6747
6812
|
variant: components["schemas"]["Variant"];
|
|
6748
6813
|
rated: boolean;
|
|
6749
6814
|
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
|
-
};
|
|
6815
|
+
timeControl: components["schemas"]["TimeControl"];
|
|
6768
6816
|
/** @enum {string} */
|
|
6769
6817
|
color: "white" | "black" | "random";
|
|
6770
6818
|
/** @enum {string} */
|