@lichess-org/types 2.0.87 → 2.0.89

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.
Files changed (2) hide show
  1. package/lichess-api.d.ts +141 -67
  2. package/package.json +1 -1
package/lichess-api.d.ts CHANGED
@@ -1463,6 +1463,8 @@ export interface paths {
1463
1463
  /**
1464
1464
  * Export one study chapter
1465
1465
  * @description Download one study chapter in PGN format.
1466
+ * If authenticated, then all public, unlisted, and private study chapters are read.
1467
+ * If not, only public (non-unlisted) study chapters are read.
1466
1468
  *
1467
1469
  */
1468
1470
  get: operations["studyChapterPgn"];
@@ -1484,6 +1486,8 @@ export interface paths {
1484
1486
  /**
1485
1487
  * Export all chapters
1486
1488
  * @description Download all chapters of a study in PGN format.
1489
+ * If authenticated, then all public, unlisted, and private study chapters are read.
1490
+ * If not, only public (non-unlisted) study chapters are read.
1487
1491
  *
1488
1492
  */
1489
1493
  get: operations["studyAllChaptersPgn"];
@@ -4768,7 +4772,7 @@ export interface components {
4768
4772
  * "error": "Not found."
4769
4773
  * } */
4770
4774
  NotFound: {
4771
- error?: string;
4775
+ error: string;
4772
4776
  };
4773
4777
  UserPreferences: {
4774
4778
  dark?: boolean;
@@ -4907,7 +4911,7 @@ export interface components {
4907
4911
  sayGG?: 0 | 1 | 2;
4908
4912
  };
4909
4913
  Ok: {
4910
- ok?: boolean;
4914
+ ok: boolean;
4911
4915
  };
4912
4916
  TimelineEntryFollow: {
4913
4917
  /** @enum {string} */
@@ -5360,6 +5364,73 @@ export interface components {
5360
5364
  end?: number;
5361
5365
  };
5362
5366
  };
5367
+ /** @enum {integer} */
5368
+ GameStatusId:
5369
+ | 10
5370
+ | 20
5371
+ | 25
5372
+ | 30
5373
+ | 31
5374
+ | 32
5375
+ | 33
5376
+ | 34
5377
+ | 35
5378
+ | 36
5379
+ | 37
5380
+ | 38
5381
+ | 39
5382
+ | 60;
5383
+ /** @example {
5384
+ * "id": "A5fcMO3k",
5385
+ * "rated": true,
5386
+ * "variant": "standard",
5387
+ * "speed": "bullet",
5388
+ * "perf": "bullet",
5389
+ * "createdAt": 1525789431889,
5390
+ * "status": 20,
5391
+ * "statusName": "started",
5392
+ * "clock": {
5393
+ * "initial": 60,
5394
+ * "increment": 0,
5395
+ * "totalTime": 60
5396
+ * },
5397
+ * "players": {
5398
+ * "white": {
5399
+ * "userId": "kastorcito",
5400
+ * "rating": 2617
5401
+ * },
5402
+ * "black": {
5403
+ * "userId": "er_or",
5404
+ * "rating": 2288
5405
+ * }
5406
+ * }
5407
+ * } */
5408
+ GameStreamGame: {
5409
+ id: string;
5410
+ rated?: boolean;
5411
+ variant?: components["schemas"]["VariantKey"];
5412
+ speed?: components["schemas"]["Speed"];
5413
+ perf?: components["schemas"]["PerfType"];
5414
+ createdAt?: number;
5415
+ status?: components["schemas"]["GameStatusId"];
5416
+ statusName?: components["schemas"]["GameStatusName"];
5417
+ clock?: {
5418
+ initial?: number;
5419
+ increment?: number;
5420
+ totalTime?: number;
5421
+ };
5422
+ players?: {
5423
+ white?: {
5424
+ userId?: string;
5425
+ rating?: number;
5426
+ };
5427
+ black?: {
5428
+ userId?: string;
5429
+ rating?: number;
5430
+ };
5431
+ };
5432
+ winner?: components["schemas"]["GameColor"];
5433
+ };
5363
5434
  /** @example [
5364
5435
  * {
5365
5436
  * "id": "A5fcMO3k",
@@ -5413,7 +5484,7 @@ export interface components {
5413
5484
  * "winner": "white"
5414
5485
  * }
5415
5486
  * ] */
5416
- GameStream: unknown;
5487
+ GameStream: components["schemas"]["GameStreamGame"][];
5417
5488
  /** @enum {string} */
5418
5489
  GameSource:
5419
5490
  | "lobby"
@@ -5511,46 +5582,65 @@ export interface components {
5511
5582
  gameId: string;
5512
5583
  color: components["schemas"]["GameColor"];
5513
5584
  };
5514
- TvFeed: {
5585
+ /** featured */
5586
+ TvFeedFeatured: {
5515
5587
  /**
5516
5588
  * @description The type of message.
5517
5589
  * A summary of the game is sent as the first message and when the featured game changes.
5518
5590
  * Subsequent messages are just the FEN, last move, and clocks.
5519
5591
  *
5520
- * @enum {string}
5592
+ * @constant
5521
5593
  */
5522
- t: "featured" | "fen";
5523
- /** @description The data of the message */
5524
- d:
5525
- | {
5526
- /** @description The game ID */
5527
- id: string;
5528
- /** @enum {string} */
5529
- orientation: "white" | "black";
5530
- players: {
5531
- /** @enum {string} */
5532
- color: "white" | "black";
5533
- user: components["schemas"]["LightUser"];
5534
- rating: number;
5535
- /** @description The player's remaining time in seconds */
5536
- seconds: number;
5537
- }[];
5538
- /** @description The FEN of the current position */
5539
- fen: string;
5540
- }
5541
- | {
5542
- /** @description The FEN of the current position */
5543
- fen: string;
5544
- /** @description The last move in UCI format (King to rook for Chess960-compatible
5545
- * castling notation)
5546
- * */
5547
- lm: string;
5548
- /** @description White's clock in seconds */
5549
- wc: number;
5550
- /** @description Black's clock in seconds */
5551
- bc: number;
5552
- };
5594
+ t: "featured";
5595
+ /**
5596
+ * featured
5597
+ * @description The data of the message
5598
+ */
5599
+ d: {
5600
+ /** @description The game ID */
5601
+ id: string;
5602
+ orientation: components["schemas"]["GameColor"];
5603
+ players: {
5604
+ color: components["schemas"]["GameColor"];
5605
+ user: components["schemas"]["LightUser"];
5606
+ rating: number;
5607
+ /** @description The player's remaining time in seconds */
5608
+ seconds: number;
5609
+ }[];
5610
+ /** @description The FEN of the current position */
5611
+ fen: string;
5612
+ };
5553
5613
  };
5614
+ /** fen */
5615
+ TvFeedFen: {
5616
+ /**
5617
+ * @description The type of message.
5618
+ * A summary of the game is sent as the first message and when the featured game changes.
5619
+ * Subsequent messages are just the FEN, last move, and clocks.
5620
+ *
5621
+ * @constant
5622
+ */
5623
+ t: "fen";
5624
+ /**
5625
+ * fen
5626
+ * @description The data of the message
5627
+ */
5628
+ d: {
5629
+ /** @description The FEN of the current position */
5630
+ fen: string;
5631
+ /** @description The last move in UCI format (King to rook for Chess960-compatible
5632
+ * castling notation)
5633
+ * */
5634
+ lm: string;
5635
+ /** @description White's clock in seconds */
5636
+ wc: number;
5637
+ /** @description Black's clock in seconds */
5638
+ bc: number;
5639
+ };
5640
+ };
5641
+ TvFeed:
5642
+ | components["schemas"]["TvFeedFeatured"]
5643
+ | components["schemas"]["TvFeedFen"];
5554
5644
  Clock: {
5555
5645
  limit: number;
5556
5646
  increment: number;
@@ -5636,9 +5726,9 @@ export interface components {
5636
5726
  winner?: components["schemas"]["LightUser"];
5637
5727
  };
5638
5728
  ArenaTournaments: {
5639
- created?: components["schemas"]["ArenaTournament"][];
5640
- started?: components["schemas"]["ArenaTournament"][];
5641
- finished?: components["schemas"]["ArenaTournament"][];
5729
+ created: components["schemas"]["ArenaTournament"][];
5730
+ started: components["schemas"]["ArenaTournament"][];
5731
+ finished: components["schemas"]["ArenaTournament"][];
5642
5732
  };
5643
5733
  /**
5644
5734
  * @description Custom initial position (in FEN). Variant must be standard, fromPosition, or chess960 (if a valid 960 starting position), and the game cannot be rated.
@@ -5791,7 +5881,7 @@ export interface components {
5791
5881
  * } */
5792
5882
  Error: {
5793
5883
  /** @description The cause of the error. */
5794
- error?: string;
5884
+ error: string;
5795
5885
  };
5796
5886
  /** @example {
5797
5887
  * "games": 10,
@@ -5806,8 +5896,8 @@ export interface components {
5806
5896
  performance?: number;
5807
5897
  };
5808
5898
  ArenaTournamentPlayed: {
5809
- tournament?: components["schemas"]["ArenaTournament"];
5810
- player?: components["schemas"]["ArenaTournamentPlayer"];
5899
+ tournament: components["schemas"]["ArenaTournament"];
5900
+ player: components["schemas"]["ArenaTournamentPlayer"];
5811
5901
  };
5812
5902
  /**
5813
5903
  * @description Custom initial position (in FEN). Variant must be standard and the game cannot be rated.
@@ -6603,22 +6693,6 @@ export interface components {
6603
6693
  */
6604
6694
  date?: number;
6605
6695
  };
6606
- /** @enum {integer} */
6607
- GameStatusId:
6608
- | 10
6609
- | 20
6610
- | 25
6611
- | 30
6612
- | 31
6613
- | 32
6614
- | 33
6615
- | 34
6616
- | 35
6617
- | 36
6618
- | 37
6619
- | 38
6620
- | 39
6621
- | 60;
6622
6696
  GameStatus: {
6623
6697
  id: components["schemas"]["GameStatusId"];
6624
6698
  name: components["schemas"]["GameStatusName"];
@@ -6665,13 +6739,13 @@ export interface components {
6665
6739
  };
6666
6740
  GameStartEvent: {
6667
6741
  /** @constant */
6668
- type?: "gameStart";
6669
- game?: components["schemas"]["GameEventInfo"];
6742
+ type: "gameStart";
6743
+ game: components["schemas"]["GameEventInfo"];
6670
6744
  };
6671
6745
  GameFinishEvent: {
6672
6746
  /** @constant */
6673
- type?: "gameFinish";
6674
- game?: components["schemas"]["GameEventInfo"];
6747
+ type: "gameFinish";
6748
+ game: components["schemas"]["GameEventInfo"];
6675
6749
  };
6676
6750
  /** @enum {string} */
6677
6751
  ChallengeStatus:
@@ -6784,8 +6858,8 @@ export interface components {
6784
6858
  };
6785
6859
  ChallengeCanceledEvent: {
6786
6860
  /** @constant */
6787
- type?: "challengeCanceled";
6788
- challenge?: components["schemas"]["ChallengeJson"];
6861
+ type: "challengeCanceled";
6862
+ challenge: components["schemas"]["ChallengeJson"];
6789
6863
  };
6790
6864
  ChallengeDeclinedJson: {
6791
6865
  /** @description Human readable, possibly translated reason why the challenge was declined. */
@@ -6809,8 +6883,8 @@ export interface components {
6809
6883
  } & components["schemas"]["ChallengeJson"];
6810
6884
  ChallengeDeclinedEvent: {
6811
6885
  /** @constant */
6812
- type?: "challengeDeclined";
6813
- challenge?: components["schemas"]["ChallengeDeclinedJson"];
6886
+ type: "challengeDeclined";
6887
+ challenge: components["schemas"]["ChallengeDeclinedJson"];
6814
6888
  };
6815
6889
  GameEventPlayer: {
6816
6890
  aiLevel?: number;
@@ -7210,7 +7284,7 @@ export interface components {
7210
7284
  * } */
7211
7285
  OAuthError: {
7212
7286
  /** @description The cause of the error. */
7213
- error?: string;
7287
+ error: string;
7214
7288
  /** @description The reason why the request was rejected. */
7215
7289
  error_description?: string;
7216
7290
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lichess-org/types",
3
- "version": "2.0.87",
3
+ "version": "2.0.89",
4
4
  "description": "Lichess.org API types",
5
5
  "homepage": "https://github.com/lichess-org/api",
6
6
  "license": "AGPL-3.0-or-later",