@lichess-org/types 2.0.87 → 2.0.88

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 +124 -50
  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"];
@@ -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;
@@ -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"];
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.88",
4
4
  "description": "Lichess.org API types",
5
5
  "homepage": "https://github.com/lichess-org/api",
6
6
  "license": "AGPL-3.0-or-later",