@lichess-org/types 2.0.19 → 2.0.20

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 +513 -103
  2. package/package.json +5 -5
package/lichess-api.d.ts CHANGED
@@ -203,6 +203,31 @@ export interface paths {
203
203
  patch?: never;
204
204
  trace?: never;
205
205
  };
206
+ "/api/puzzle/next": {
207
+ parameters: {
208
+ query?: never;
209
+ header?: never;
210
+ path?: never;
211
+ cookie?: never;
212
+ };
213
+ /**
214
+ * Get a new puzzle
215
+ * @description Get a random Lichess puzzle in JSON format.
216
+ *
217
+ * If authenticated, only returns puzzles that the user has never seen before.
218
+ *
219
+ * **DO NOT** use this endpoint to enumerate puzzles for mass download. Instead, download the [full public puzzle database](https://database.lichess.org/#puzzles).
220
+ *
221
+ */
222
+ get: operations["apiPuzzleNext"];
223
+ put?: never;
224
+ post?: never;
225
+ delete?: never;
226
+ options?: never;
227
+ head?: never;
228
+ patch?: never;
229
+ trace?: never;
230
+ };
206
231
  "/api/puzzle/activity": {
207
232
  parameters: {
208
233
  query?: never;
@@ -1579,7 +1604,7 @@ export interface paths {
1579
1604
  patch?: never;
1580
1605
  trace?: never;
1581
1606
  };
1582
- "/broadcast/{broadcastTournamentId}/leaderboard": {
1607
+ "/broadcast/{broadcastTournamentId}/players": {
1583
1608
  parameters: {
1584
1609
  query?: never;
1585
1610
  header?: never;
@@ -1587,11 +1612,11 @@ export interface paths {
1587
1612
  cookie?: never;
1588
1613
  };
1589
1614
  /**
1590
- * Get a broadcast leaderboard
1591
- * @description Get the leaderboard of a broadcast tournament, if available.
1615
+ * Get players of a broadcast
1616
+ * @description Get the list of players of a broadcast tournament, if available.
1592
1617
  *
1593
1618
  */
1594
- get: operations["broadcastLeaderboardGet"];
1619
+ get: operations["broadcastPlayersGet"];
1595
1620
  put?: never;
1596
1621
  post?: never;
1597
1622
  delete?: never;
@@ -3422,8 +3447,10 @@ export interface paths {
3422
3447
  * Start the OAuth2 Authorization Code Flow with PKCE by securely
3423
3448
  * generating two random strings unique to each authorization
3424
3449
  * request:
3450
+ *
3425
3451
  * * `code_verifier`
3426
3452
  * * `state`
3453
+ *
3427
3454
  * Store these in session storage. Make sure not to reveal `code_verifier`
3428
3455
  * to eavesdroppers. Do not show it in URLs, do not abuse `state` to store
3429
3456
  * it, do not send it over insecure connections. However it is fine if
@@ -3433,16 +3460,21 @@ export interface paths {
3433
3460
  * authorization and then be redirected back to the given `redirect_uri`.
3434
3461
  * If the authorization failed, the following query string parameters will
3435
3462
  * be appended to the redirection:
3463
+ *
3436
3464
  * * `error`, in particular with value `access_denied` if the user
3437
3465
  * cancelled authorization
3438
3466
  * * `error_description` to aid debugging
3439
3467
  * * `state`, exactly as passed in the `state` parameter
3468
+ *
3440
3469
  * If the authorization succeeded, the following query string parameters
3441
3470
  * will be appended to the redirection:
3471
+ *
3442
3472
  * * `code`, containing a fresh short-lived authorization code
3443
3473
  * * `state`, exactly as passed in the `state` parameter
3474
+ *
3444
3475
  * Next, to defend against cross site request forgery, check that the
3445
3476
  * returned `state` matches the `state` you originally generated.
3477
+ *
3446
3478
  * Finally, continue by using the authorization code to
3447
3479
  * [obtain an access token](#operation/apiToken).
3448
3480
  *
@@ -3515,6 +3547,7 @@ export interface paths {
3515
3547
  /**
3516
3548
  * Masters database
3517
3549
  * @description **Endpoint: <https://explorer.lichess.ovh/masters>**
3550
+ *
3518
3551
  * Example: `curl https://explorer.lichess.ovh/masters?play=d2d4,d7d5,c2c4,c7c6,c4d5`
3519
3552
  *
3520
3553
  */
@@ -3537,7 +3570,9 @@ export interface paths {
3537
3570
  /**
3538
3571
  * Lichess games
3539
3572
  * @description **Endpoint: <https://explorer.lichess.ovh/lichess>**
3573
+ *
3540
3574
  * Games sampled from all Lichess players.
3575
+ *
3541
3576
  * Example: `curl https://explorer.lichess.ovh/lichess?variant=standard&speeds=blitz,rapid,classical&ratings=2200,2500&fen=rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR%20w%20KQkq%20-%200%201`
3542
3577
  *
3543
3578
  */
@@ -3560,13 +3595,17 @@ export interface paths {
3560
3595
  /**
3561
3596
  * Player games
3562
3597
  * @description **Endpoint: <https://explorer.lichess.ovh/player>**
3598
+ *
3563
3599
  * Games of a Lichess player.
3600
+ *
3564
3601
  * Responds with a stream of [newline delimited JSON](#section/Introduction/Streaming-with-ND-JSON). Will start indexing
3565
3602
  * on demand, immediately respond with the current results, and stream
3566
3603
  * more updates until indexing is complete. The stream is throttled
3567
3604
  * and deduplicated. Empty lines may be sent to avoid timeouts.
3605
+ *
3568
3606
  * Will index new games at most once per minute, and revisit previously
3569
3607
  * ongoing games at most once every day.
3608
+ *
3570
3609
  * Example: `curl https://explorer.lichess.ovh/player?player=revoof&color=white&play=d2d4,d7d5&recentGames=1`
3571
3610
  *
3572
3611
  */
@@ -3589,6 +3628,7 @@ export interface paths {
3589
3628
  /**
3590
3629
  * OTB master game
3591
3630
  * @description **Endpoint: `https://explorer.lichess.ovh/masters/pgn/{gameId}`**
3631
+ *
3592
3632
  * Example: `curl https://explorer.lichess.ovh/masters/pgn/aAbqI4ey`
3593
3633
  *
3594
3634
  */
@@ -4648,6 +4688,142 @@ export interface components {
4648
4688
  Ok: {
4649
4689
  ok?: boolean;
4650
4690
  };
4691
+ TimelineEntryFollow: {
4692
+ /** @enum {string} */
4693
+ type: "follow";
4694
+ date: number;
4695
+ data: {
4696
+ u1: string;
4697
+ u2: string;
4698
+ };
4699
+ };
4700
+ TimelineEntryTeamJoin: {
4701
+ /** @enum {string} */
4702
+ type: "team-join";
4703
+ date: number;
4704
+ data: {
4705
+ userId: string;
4706
+ teamId: string;
4707
+ };
4708
+ };
4709
+ TimelineEntryTeamCreate: {
4710
+ /** @enum {string} */
4711
+ type: "team-create";
4712
+ date: number;
4713
+ data: {
4714
+ userId: string;
4715
+ teamId: string;
4716
+ };
4717
+ };
4718
+ TimelineEntryForumPost: {
4719
+ /** @enum {string} */
4720
+ type: "forum-post";
4721
+ date: number;
4722
+ data: {
4723
+ userId: string;
4724
+ topicId: string;
4725
+ topicName: string;
4726
+ postId: string;
4727
+ };
4728
+ };
4729
+ TimelineEntryBlogPost: {
4730
+ /** @enum {string} */
4731
+ type: "blog-post";
4732
+ date: number;
4733
+ data: {
4734
+ id: string;
4735
+ slug: string;
4736
+ title: string;
4737
+ };
4738
+ };
4739
+ TimelineEntryUblogPost: {
4740
+ /** @enum {string} */
4741
+ type: "ublog-post";
4742
+ date: number;
4743
+ data: {
4744
+ userId: string;
4745
+ id: string;
4746
+ slug: string;
4747
+ title: string;
4748
+ };
4749
+ };
4750
+ TimelineEntryTourJoin: {
4751
+ /** @enum {string} */
4752
+ type: "tour-join";
4753
+ date: number;
4754
+ data: {
4755
+ userId: string;
4756
+ tourId: string;
4757
+ tourName: string;
4758
+ };
4759
+ };
4760
+ TimelineEntryGameEnd: {
4761
+ /** @enum {string} */
4762
+ type: "game-end";
4763
+ date: number;
4764
+ data: {
4765
+ fullId: string;
4766
+ opponent: string;
4767
+ win: boolean;
4768
+ perf: components["schemas"]["PerfType"];
4769
+ };
4770
+ };
4771
+ TimelineEntrySimul: {
4772
+ /** @enum {string} */
4773
+ type: "simul-create" | "simul-join";
4774
+ date: number;
4775
+ data: {
4776
+ userId: string;
4777
+ simulId: string;
4778
+ simulName: string;
4779
+ };
4780
+ };
4781
+ TimelineEntryStudyLike: {
4782
+ /** @enum {string} */
4783
+ type: "study-like";
4784
+ date: number;
4785
+ data: {
4786
+ userId: string;
4787
+ studyId: string;
4788
+ studyName: string;
4789
+ };
4790
+ };
4791
+ TimelineEntryPlanStart: {
4792
+ /** @enum {string} */
4793
+ type: "plan-start";
4794
+ date: number;
4795
+ data: {
4796
+ userId: string;
4797
+ };
4798
+ };
4799
+ TimelineEntryPlanRenew: {
4800
+ /** @enum {string} */
4801
+ type: "plan-renew";
4802
+ date: number;
4803
+ data: {
4804
+ userId: string;
4805
+ months: number;
4806
+ };
4807
+ };
4808
+ TimelineEntryUblogPostLike: {
4809
+ /** @enum {string} */
4810
+ type: "ublog-post-like";
4811
+ date: number;
4812
+ data: {
4813
+ userId: string;
4814
+ id: string;
4815
+ title: string;
4816
+ };
4817
+ };
4818
+ TimelineEntryStreamStart: {
4819
+ /** @enum {string} */
4820
+ type: "stream-start";
4821
+ date: number;
4822
+ data: {
4823
+ id: string;
4824
+ name?: string;
4825
+ };
4826
+ };
4651
4827
  /** @example {
4652
4828
  * "entries": [
4653
4829
  * {
@@ -4776,7 +4952,7 @@ export interface components {
4776
4952
  * {
4777
4953
  * "type": "stream-start",
4778
4954
  * "data": {
4779
- * "userId": "chess-network",
4955
+ * "id": "chess-network",
4780
4956
  * "title": "Streamers Battle December !team | lichess.org"
4781
4957
  * },
4782
4958
  * "date": 1644232201429
@@ -4797,8 +4973,30 @@ export interface components {
4797
4973
  * }
4798
4974
  * } */
4799
4975
  Timeline: {
4800
- entries?: unknown[];
4801
- users?: Record<string, never>;
4976
+ entries: (
4977
+ | components["schemas"]["TimelineEntryFollow"]
4978
+ | components["schemas"]["TimelineEntryTeamJoin"]
4979
+ | components["schemas"]["TimelineEntryTeamCreate"]
4980
+ | components["schemas"]["TimelineEntryForumPost"]
4981
+ | components["schemas"]["TimelineEntryBlogPost"]
4982
+ | components["schemas"]["TimelineEntryUblogPost"]
4983
+ | components["schemas"]["TimelineEntryTourJoin"]
4984
+ | components["schemas"]["TimelineEntryGameEnd"]
4985
+ | components["schemas"]["TimelineEntrySimul"]
4986
+ | components["schemas"]["TimelineEntryStudyLike"]
4987
+ | components["schemas"]["TimelineEntryPlanStart"]
4988
+ | components["schemas"]["TimelineEntryPlanRenew"]
4989
+ | components["schemas"]["TimelineEntryUblogPostLike"]
4990
+ | components["schemas"]["TimelineEntryStreamStart"]
4991
+ )[];
4992
+ users: {
4993
+ [key: string]: {
4994
+ id: string;
4995
+ name: string;
4996
+ title?: components["schemas"]["Title"];
4997
+ patron?: boolean;
4998
+ };
4999
+ };
4802
5000
  };
4803
5001
  /** @example [Event "Rated Blitz game"]
4804
5002
  * [Site "https://lichess.org/fY44h4OY"]
@@ -4885,6 +5083,7 @@ export interface components {
4885
5083
  mistake: number;
4886
5084
  blunder: number;
4887
5085
  acpl: number;
5086
+ accuracy?: number;
4888
5087
  };
4889
5088
  team?: string;
4890
5089
  };
@@ -6000,7 +6199,7 @@ export interface components {
6000
6199
  */
6001
6200
  tier?: 3 | 4 | 5 | -1;
6002
6201
  };
6003
- BroadcastLeaderboardEntry: {
6202
+ BroadcastPlayerEntry: {
6004
6203
  /** @example Hernandez Riera, Jose */
6005
6204
  name?: string;
6006
6205
  /** @example 2.5 */
@@ -6009,6 +6208,10 @@ export interface components {
6009
6208
  played?: number;
6010
6209
  /** @example 2149 */
6011
6210
  rating?: number;
6211
+ /** @example -5 */
6212
+ ratingDiff?: number;
6213
+ /** @example 2138 */
6214
+ performance?: number;
6012
6215
  /** @example FM */
6013
6216
  title?: string;
6014
6217
  /** @example 3408230 */
@@ -7232,23 +7435,41 @@ export interface components {
7232
7435
  /** @description The reason why the request was rejected. */
7233
7436
  error_description?: string;
7234
7437
  };
7438
+ OpeningExplorerOpening: {
7439
+ eco: string;
7440
+ name: string;
7441
+ };
7442
+ OpeningExplorerGamePlayer: {
7443
+ name: string;
7444
+ rating: number;
7445
+ };
7446
+ OpeningExplorerMastersGame: {
7447
+ id: string;
7448
+ /** @enum {string|null} */
7449
+ winner: "white" | "black" | null;
7450
+ white: components["schemas"]["OpeningExplorerGamePlayer"];
7451
+ black: components["schemas"]["OpeningExplorerGamePlayer"];
7452
+ year: number;
7453
+ month?: string;
7454
+ };
7235
7455
  /** @example {
7236
7456
  * "opening": {
7237
7457
  * "eco": "D10",
7238
7458
  * "name": "Slav Defense: Exchange Variation"
7239
7459
  * },
7240
- * "white": 1443,
7241
- * "draws": 3787,
7242
- * "black": 1156,
7460
+ * "white": 1828,
7461
+ * "draws": 4904,
7462
+ * "black": 1403,
7243
7463
  * "moves": [
7244
7464
  * {
7245
7465
  * "uci": "c6d5",
7246
7466
  * "san": "cxd5",
7247
- * "averageRating": 2423,
7248
- * "white": 1443,
7249
- * "draws": 3787,
7250
- * "black": 1155,
7251
- * "game": null
7467
+ * "averageRating": 2414,
7468
+ * "white": 1828,
7469
+ * "draws": 4904,
7470
+ * "black": 1402,
7471
+ * "game": null,
7472
+ * "opening": null
7252
7473
  * },
7253
7474
  * {
7254
7475
  * "uci": "g8f6",
@@ -7260,16 +7481,20 @@ export interface components {
7260
7481
  * "game": {
7261
7482
  * "id": "1EErB5jc",
7262
7483
  * "winner": "black",
7263
- * "white": {
7264
- * "name": "Drozdovskij, Yuri",
7265
- * "rating": 2509
7266
- * },
7267
7484
  * "black": {
7268
7485
  * "name": "Dobrov, Vladimir",
7269
7486
  * "rating": 2515
7270
7487
  * },
7488
+ * "white": {
7489
+ * "name": "Drozdovskij, Yuri",
7490
+ * "rating": 2509
7491
+ * },
7271
7492
  * "year": 2006,
7272
7493
  * "month": "2006-01"
7494
+ * },
7495
+ * "opening": {
7496
+ * "eco": "D06",
7497
+ * "name": "Queen's Gambit Declined: Marshall Defense, Tan Gambit"
7273
7498
  * }
7274
7499
  * }
7275
7500
  * ],
@@ -7278,14 +7503,14 @@ export interface components {
7278
7503
  * "uci": "c6d5",
7279
7504
  * "id": "kN6d9l2i",
7280
7505
  * "winner": "black",
7281
- * "white": {
7282
- * "name": "Carlsen, M.",
7283
- * "rating": 2881
7284
- * },
7285
7506
  * "black": {
7286
7507
  * "name": "Anand, V.",
7287
7508
  * "rating": 2785
7288
7509
  * },
7510
+ * "white": {
7511
+ * "name": "Carlsen, M.",
7512
+ * "rating": 2881
7513
+ * },
7289
7514
  * "year": 2014,
7290
7515
  * "month": "2014-06"
7291
7516
  * },
@@ -7293,59 +7518,211 @@ export interface components {
7293
7518
  * "uci": "c6d5",
7294
7519
  * "id": "qeYPJL2y",
7295
7520
  * "winner": "white",
7521
+ * "black": {
7522
+ * "name": "Carlsen, M.",
7523
+ * "rating": 2843
7524
+ * },
7296
7525
  * "white": {
7297
7526
  * "name": "So, W.",
7298
7527
  * "rating": 2778
7299
7528
  * },
7529
+ * "year": 2018,
7530
+ * "month": "2018-06"
7531
+ * }
7532
+ * ]
7533
+ * } */
7534
+ OpeningExplorerMasters: {
7535
+ opening: components["schemas"]["OpeningExplorerOpening"] | null;
7536
+ white: number;
7537
+ draws: number;
7538
+ black: number;
7539
+ moves: {
7540
+ uci: string;
7541
+ san: string;
7542
+ averageRating: number;
7543
+ white: number;
7544
+ draws: number;
7545
+ black: number;
7546
+ game: components["schemas"]["OpeningExplorerMastersGame"] | null;
7547
+ opening: components["schemas"]["OpeningExplorerOpening"] | null;
7548
+ }[];
7549
+ topGames: ({
7550
+ uci: string;
7551
+ } & components["schemas"]["OpeningExplorerMastersGame"])[];
7552
+ };
7553
+ OpeningExplorerLichessGame: {
7554
+ id: string;
7555
+ /** @enum {string|null} */
7556
+ winner: "white" | "black" | null;
7557
+ speed: components["schemas"]["Speed"];
7558
+ white: components["schemas"]["OpeningExplorerGamePlayer"];
7559
+ black: components["schemas"]["OpeningExplorerGamePlayer"];
7560
+ year: number;
7561
+ month: string;
7562
+ };
7563
+ /** @example {
7564
+ * "opening": {
7565
+ * "eco": "D10",
7566
+ * "name": "Slav Defense: Exchange Variation"
7567
+ * },
7568
+ * "white": 4164079,
7569
+ * "draws": 405547,
7570
+ * "black": 3668091,
7571
+ * "moves": [
7572
+ * {
7573
+ * "uci": "c6d5",
7574
+ * "san": "cxd5",
7575
+ * "averageRating": 1801,
7576
+ * "white": 3716043,
7577
+ * "draws": 370963,
7578
+ * "black": 3304807,
7579
+ * "game": null,
7580
+ * "opening": null
7581
+ * },
7582
+ * {
7583
+ * "uci": "d8d5",
7584
+ * "san": "Qxd5",
7585
+ * "averageRating": 1658,
7586
+ * "white": 195544,
7587
+ * "draws": 14378,
7588
+ * "black": 140001,
7589
+ * "game": null,
7590
+ * "opening": null
7591
+ * }
7592
+ * ],
7593
+ * "recentGames": [
7594
+ * {
7595
+ * "uci": "c6d5",
7596
+ * "id": "ilsfX0gq",
7597
+ * "winner": "black",
7598
+ * "speed": "blitz",
7599
+ * "mode": "rated",
7600
+ * "black": {
7601
+ * "name": "captan64",
7602
+ * "rating": 2201
7603
+ * },
7604
+ * "white": {
7605
+ * "name": "ElsaPato33",
7606
+ * "rating": 2324
7607
+ * },
7608
+ * "year": 2024,
7609
+ * "month": "2024-10"
7610
+ * }
7611
+ * ],
7612
+ * "topGames": [
7613
+ * {
7614
+ * "uci": "g8f6",
7615
+ * "id": "EqJcFS1j",
7616
+ * "winner": "white",
7617
+ * "speed": "ultraBullet",
7618
+ * "mode": "rated",
7300
7619
  * "black": {
7301
- * "name": "Carlsen, M.",
7302
- * "rating": 2843
7620
+ * "name": "toivok",
7621
+ * "rating": 2708
7622
+ * },
7623
+ * "white": {
7624
+ * "name": "penguingim1",
7625
+ * "rating": 2969
7303
7626
  * },
7304
7627
  * "year": 2018,
7305
- * "month": "2018-06"
7628
+ * "month": "2018-04"
7306
7629
  * }
7307
7630
  * ],
7308
- * "recentGames": [],
7309
7631
  * "history": [
7310
7632
  * {
7311
- * "month": "2017-04",
7312
- * "black": 413538,
7313
- * "draws": 38549,
7314
- * "white": 429805
7633
+ * "month": "2013-01",
7634
+ * "white": 60,
7635
+ * "draws": 2,
7636
+ * "black": 54
7637
+ * },
7638
+ * {
7639
+ * "month": "2013-02",
7640
+ * "white": 71,
7641
+ * "draws": 8,
7642
+ * "black": 75
7315
7643
  * },
7316
7644
  * {
7317
- * "month": "2017-05",
7318
- * "black": 418542,
7319
- * "draws": 39171,
7320
- * "white": 434066
7645
+ * "month": "2013-03",
7646
+ * "white": 83,
7647
+ * "draws": 4,
7648
+ * "black": 72
7321
7649
  * }
7322
7650
  * ]
7323
7651
  * } */
7324
- OpeningExplorerJson: unknown;
7652
+ OpeningExplorerLichess: {
7653
+ opening: components["schemas"]["OpeningExplorerOpening"] | null;
7654
+ white: number;
7655
+ draws: number;
7656
+ black: number;
7657
+ moves: {
7658
+ uci: string;
7659
+ san: string;
7660
+ averageRating: number;
7661
+ white: number;
7662
+ draws: number;
7663
+ black: number;
7664
+ game: components["schemas"]["OpeningExplorerLichessGame"] | null;
7665
+ opening: components["schemas"]["OpeningExplorerOpening"] | null;
7666
+ }[];
7667
+ topGames: ({
7668
+ uci: string;
7669
+ } & components["schemas"]["OpeningExplorerLichessGame"])[];
7670
+ recentGames: ({
7671
+ uci: string;
7672
+ } & components["schemas"]["OpeningExplorerLichessGame"])[];
7673
+ history?: {
7674
+ month: string;
7675
+ white: number;
7676
+ draws: number;
7677
+ black: number;
7678
+ }[];
7679
+ };
7680
+ OpeningExplorerPlayerGame: {
7681
+ id: string;
7682
+ /** @enum {string|null} */
7683
+ winner: "white" | "black" | null;
7684
+ speed: components["schemas"]["Speed"];
7685
+ /** @enum {string} */
7686
+ mode: "rated" | "casual";
7687
+ white: components["schemas"]["OpeningExplorerGamePlayer"];
7688
+ black: components["schemas"]["OpeningExplorerGamePlayer"];
7689
+ year: number;
7690
+ month: string;
7691
+ };
7325
7692
  /** @example {
7326
- * "white": 359,
7693
+ * "opening": {
7694
+ * "eco": "D00",
7695
+ * "name": "Queen's Pawn Game"
7696
+ * },
7697
+ * "queuePosition": 25,
7698
+ * "white": 366,
7327
7699
  * "draws": 23,
7328
- * "black": 273,
7700
+ * "black": 279,
7329
7701
  * "moves": [
7330
7702
  * {
7331
7703
  * "uci": "c2c4",
7332
7704
  * "san": "c4",
7333
7705
  * "averageOpponentRating": 1695,
7334
7706
  * "performance": 1744,
7335
- * "white": 354,
7707
+ * "white": 361,
7336
7708
  * "draws": 23,
7337
- * "black": 266,
7338
- * "game": null
7709
+ * "black": 272,
7710
+ * "game": null,
7711
+ * "opening": {
7712
+ * "eco": "D06",
7713
+ * "name": "Queen's Gambit"
7714
+ * }
7339
7715
  * },
7340
7716
  * {
7341
7717
  * "uci": "c2c3",
7342
7718
  * "san": "c3",
7343
- * "averageOpponentRating": 1796,
7344
- * "performance": 1796,
7719
+ * "averageOpponentRating": 1797,
7720
+ * "performance": 1797,
7345
7721
  * "white": 2,
7346
7722
  * "draws": 0,
7347
7723
  * "black": 2,
7348
- * "game": null
7724
+ * "game": null,
7725
+ * "opening": null
7349
7726
  * },
7350
7727
  * {
7351
7728
  * "uci": "e2e4",
@@ -7355,41 +7732,24 @@ export interface components {
7355
7732
  * "white": 1,
7356
7733
  * "draws": 0,
7357
7734
  * "black": 2,
7358
- * "game": null
7735
+ * "game": null,
7736
+ * "opening": {
7737
+ * "eco": "D00",
7738
+ * "name": "Blackmar-Diemer Gambit"
7739
+ * }
7359
7740
  * },
7360
7741
  * {
7361
7742
  * "uci": "g1f3",
7362
7743
  * "san": "Nf3",
7363
- * "averageOpponentRating": 1496,
7744
+ * "averageOpponentRating": 1497,
7364
7745
  * "performance": 1374,
7365
7746
  * "white": 1,
7366
7747
  * "draws": 0,
7367
7748
  * "black": 2,
7368
- * "game": null
7369
- * },
7370
- * {
7371
- * "uci": "h2h3",
7372
- * "san": "h3",
7373
- * "averageOpponentRating": 1696,
7374
- * "performance": 2496,
7375
- * "white": 1,
7376
- * "draws": 0,
7377
- * "black": 0,
7378
- * "game": {
7379
- * "id": "zyI4GGKv",
7380
- * "winner": "white",
7381
- * "speed": "bullet",
7382
- * "mode": "rated",
7383
- * "black": {
7384
- * "name": "gocool99",
7385
- * "rating": 1696
7386
- * },
7387
- * "white": {
7388
- * "name": "revoof",
7389
- * "rating": 1702
7390
- * },
7391
- * "year": 2020,
7392
- * "month": "2020-07"
7749
+ * "game": null,
7750
+ * "opening": {
7751
+ * "eco": "D02",
7752
+ * "name": "Queen's Pawn Game: Zukertort Variation"
7393
7753
  * }
7394
7754
  * },
7395
7755
  * {
@@ -7415,35 +7775,51 @@ export interface components {
7415
7775
  * },
7416
7776
  * "year": 2020,
7417
7777
  * "month": "2020-06"
7418
- * }
7778
+ * },
7779
+ * "opening": null
7419
7780
  * }
7420
7781
  * ],
7421
7782
  * "recentGames": [
7422
7783
  * {
7423
7784
  * "uci": "c2c4",
7424
- * "id": "BGLmUtv7",
7785
+ * "id": "ycZbWQZO",
7425
7786
  * "winner": "white",
7426
7787
  * "speed": "bullet",
7427
7788
  * "mode": "rated",
7428
7789
  * "black": {
7429
- * "name": "yigithanyiigit",
7430
- * "rating": 1227
7790
+ * "name": "Winavesh",
7791
+ * "rating": 1700
7431
7792
  * },
7432
7793
  * "white": {
7433
7794
  * "name": "revoof",
7434
- * "rating": 1717
7795
+ * "rating": 1700
7435
7796
  * },
7436
- * "year": 2022,
7437
- * "month": "2022-03"
7797
+ * "year": 2024,
7798
+ * "month": "2024-11"
7438
7799
  * }
7439
- * ],
7440
- * "opening": {
7441
- * "eco": "D00",
7442
- * "name": "Queen's Pawn Game"
7443
- * },
7444
- * "queuePosition": 0
7800
+ * ]
7445
7801
  * } */
7446
- OpeningExplorerPlayerJson: unknown;
7802
+ OpeningExplorerPlayer: {
7803
+ opening: components["schemas"]["OpeningExplorerOpening"] | null;
7804
+ queuePosition: number;
7805
+ white: number;
7806
+ draws: number;
7807
+ black: number;
7808
+ moves: {
7809
+ uci: string;
7810
+ san: string;
7811
+ averageOpponentRating: number;
7812
+ performance: number;
7813
+ white: number;
7814
+ draws: number;
7815
+ black: number;
7816
+ game: components["schemas"]["OpeningExplorerPlayerGame"] | null;
7817
+ opening: components["schemas"]["OpeningExplorerOpening"] | null;
7818
+ }[];
7819
+ recentGames: ({
7820
+ uci: string;
7821
+ } & components["schemas"]["OpeningExplorerPlayerGame"])[];
7822
+ };
7447
7823
  /** @example [Event "Wch Blitz"]
7448
7824
  * [Site "Astana"]
7449
7825
  * [Date "2012.07.10"]
@@ -7826,6 +8202,35 @@ export interface operations {
7826
8202
  };
7827
8203
  };
7828
8204
  };
8205
+ apiPuzzleNext: {
8206
+ parameters: {
8207
+ query?: {
8208
+ /** @description The theme or opening to filter puzzles with.
8209
+ *
8210
+ * Available themes are listed in [the lichess source code](https://github.com/ornicar/lila/blob/master/translation/source/puzzleTheme.xml).
8211
+ * */
8212
+ angle?: string;
8213
+ /** @description The desired puzzle difficulty, relative to the authenticated user puzzle rating, or 1500 if anonymous. */
8214
+ difficulty?: "easiest" | "easier" | "normal" | "harder" | "hardest";
8215
+ };
8216
+ header?: never;
8217
+ path?: never;
8218
+ cookie?: never;
8219
+ };
8220
+ requestBody?: never;
8221
+ responses: {
8222
+ /** @description The requested puzzle. */
8223
+ 200: {
8224
+ headers: {
8225
+ "Access-Control-Allow-Origin"?: string;
8226
+ [name: string]: unknown;
8227
+ };
8228
+ content: {
8229
+ "application/json": components["schemas"]["PuzzleAndGame"];
8230
+ };
8231
+ };
8232
+ };
8233
+ };
7829
8234
  apiPuzzleActivity: {
7830
8235
  parameters: {
7831
8236
  query?: {
@@ -8115,7 +8520,7 @@ export interface operations {
8115
8520
  * Or in an `analysis` JSON field, depending on the response type.
8116
8521
  * */
8117
8522
  evals?: boolean;
8118
- /** @description Include [accuracy percent](https://lichess.org/page/accuracy) of each player, when available.
8523
+ /** @description Include [accuracy percent](https://lichess.org/page/accuracy) of each player, when available. Only available in JSON.
8119
8524
  * */
8120
8525
  accuracy?: boolean;
8121
8526
  /** @description Include the opening name.
@@ -8180,7 +8585,7 @@ export interface operations {
8180
8585
  * Or in an `analysis` JSON field, depending on the response type.
8181
8586
  * */
8182
8587
  evals?: boolean;
8183
- /** @description Include [accuracy percent](https://lichess.org/page/accuracy) of each player, when available.
8588
+ /** @description Include [accuracy percent](https://lichess.org/page/accuracy) of each player, when available. Only available in JSON.
8184
8589
  * */
8185
8590
  accuracy?: boolean;
8186
8591
  /** @description Include the opening name.
@@ -8259,7 +8664,7 @@ export interface operations {
8259
8664
  * Or in an `analysis` JSON field, depending on the response type.
8260
8665
  * */
8261
8666
  evals?: boolean;
8262
- /** @description Include [accuracy percent](https://lichess.org/page/accuracy) of each player, when available.
8667
+ /** @description Include [accuracy percent](https://lichess.org/page/accuracy) of each player, when available. Only available in JSON.
8263
8668
  * */
8264
8669
  accuracy?: boolean;
8265
8670
  /** @description Include the opening name.
@@ -8334,7 +8739,7 @@ export interface operations {
8334
8739
  * Or in an `analysis` JSON field, depending on the response type.
8335
8740
  * */
8336
8741
  evals?: boolean;
8337
- /** @description Include [accuracy percent](https://lichess.org/page/accuracy) of each player, when available.
8742
+ /** @description Include [accuracy percent](https://lichess.org/page/accuracy) of each player, when available. Only available in JSON.
8338
8743
  * */
8339
8744
  accuracy?: boolean;
8340
8745
  /** @description Include the opening name.
@@ -9375,7 +9780,7 @@ export interface operations {
9375
9780
  * Or in an `analysis` JSON field, depending on the response type.
9376
9781
  * */
9377
9782
  evals?: boolean;
9378
- /** @description Include [accuracy percent](https://lichess.org/page/accuracy) of each player, when available.
9783
+ /** @description Include [accuracy percent](https://lichess.org/page/accuracy) of each player, when available. Only available in JSON.
9379
9784
  * */
9380
9785
  accuracy?: boolean;
9381
9786
  /** @description Include the opening name.
@@ -10169,7 +10574,7 @@ export interface operations {
10169
10574
  * Or in an `analysis` JSON field, depending on the response type.
10170
10575
  * */
10171
10576
  evals?: boolean;
10172
- /** @description Include [accuracy percent](https://lichess.org/page/accuracy) of each player, when available.
10577
+ /** @description Include [accuracy percent](https://lichess.org/page/accuracy) of each player, when available. Only available in JSON.
10173
10578
  * */
10174
10579
  accuracy?: boolean;
10175
10580
  /** @description Include the opening name.
@@ -10676,7 +11081,7 @@ export interface operations {
10676
11081
  };
10677
11082
  };
10678
11083
  };
10679
- broadcastLeaderboardGet: {
11084
+ broadcastPlayersGet: {
10680
11085
  parameters: {
10681
11086
  query?: never;
10682
11087
  header?: never;
@@ -10688,13 +11093,13 @@ export interface operations {
10688
11093
  };
10689
11094
  requestBody?: never;
10690
11095
  responses: {
10691
- /** @description The broadcast leaderboard players */
11096
+ /** @description The broadcast players */
10692
11097
  200: {
10693
11098
  headers: {
10694
11099
  [name: string]: unknown;
10695
11100
  };
10696
11101
  content: {
10697
- "application/json": components["schemas"]["BroadcastLeaderboardEntry"][];
11102
+ "application/json": components["schemas"]["BroadcastPlayerEntry"][];
10698
11103
  };
10699
11104
  };
10700
11105
  };
@@ -13012,7 +13417,7 @@ export interface operations {
13012
13417
  * Or in an `analysis` JSON field, depending on the response type.
13013
13418
  * */
13014
13419
  evals?: boolean;
13015
- /** @description Include [accuracy percent](https://lichess.org/page/accuracy) of each player, when available.
13420
+ /** @description Include [accuracy percent](https://lichess.org/page/accuracy) of each player, when available. Only available in JSON.
13016
13421
  * */
13017
13422
  accuracy?: boolean;
13018
13423
  /** @description Include the opening name.
@@ -13653,7 +14058,7 @@ export interface operations {
13653
14058
  * Required to find an opening name, if `fen` is not an exact match
13654
14059
  * for a named position.
13655
14060
  *
13656
- * @example e2e4,e7e5,c2c4,c7c6,c4e5
14061
+ * @example d2d4,d7d5,c2c4,c7c6,c4d5
13657
14062
  */
13658
14063
  play?: string;
13659
14064
  /** @description Include only games from this year or later */
@@ -13678,7 +14083,7 @@ export interface operations {
13678
14083
  [name: string]: unknown;
13679
14084
  };
13680
14085
  content: {
13681
- "application/json": components["schemas"]["OpeningExplorerJson"];
14086
+ "application/json": components["schemas"]["OpeningExplorerMasters"];
13682
14087
  };
13683
14088
  };
13684
14089
  };
@@ -13699,7 +14104,7 @@ export interface operations {
13699
14104
  * Required to find an opening name, if `fen` is not an exact match
13700
14105
  * for a named position.
13701
14106
  *
13702
- * @example e2e4,e7e5,c2c4,c7c6,c4e5
14107
+ * @example d2d4,d7d5,c2c4,c7c6,c4d5
13703
14108
  */
13704
14109
  play?: string;
13705
14110
  /** @description Comma separated list of game speeds to filter by */
@@ -13736,19 +14141,24 @@ export interface operations {
13736
14141
  [name: string]: unknown;
13737
14142
  };
13738
14143
  content: {
13739
- "application/json": components["schemas"]["OpeningExplorerJson"];
14144
+ "application/json": components["schemas"]["OpeningExplorerLichess"];
13740
14145
  };
13741
14146
  };
13742
14147
  };
13743
14148
  };
13744
14149
  openingExplorerPlayer: {
13745
14150
  parameters: {
13746
- query?: {
14151
+ query: {
13747
14152
  /**
13748
14153
  * @description Username or ID of the player
13749
14154
  * @example revoof
13750
14155
  */
13751
- player?: string;
14156
+ player: string;
14157
+ /**
14158
+ * @description Look for games with *player* on the given side
14159
+ * @example white
14160
+ */
14161
+ color: "white" | "black";
13752
14162
  /** @description Variant */
13753
14163
  variant?: components["schemas"]["VariantKey"];
13754
14164
  /**
@@ -13791,7 +14201,7 @@ export interface operations {
13791
14201
  [name: string]: unknown;
13792
14202
  };
13793
14203
  content: {
13794
- "application/nd-json": components["schemas"]["OpeningExplorerPlayerJson"];
14204
+ "application/nd-json": components["schemas"]["OpeningExplorerPlayer"];
13795
14205
  };
13796
14206
  };
13797
14207
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lichess-org/types",
3
- "version": "2.0.19",
3
+ "version": "2.0.20",
4
4
  "description": "Lichess.org API types",
5
5
  "homepage": "https://github.com/lichess-org/api",
6
6
  "license": "AGPL-3.0-or-later",
@@ -11,9 +11,9 @@
11
11
  "gen": "openapi-typescript ../doc/specs/lichess-api.yaml -o lichess-api.d.ts --default-non-nullable=false"
12
12
  },
13
13
  "devDependencies": {
14
- "openapi-typescript": "^7.4.1",
15
- "prettier": "^3.3.3",
16
- "typescript": "^5.6.2"
14
+ "openapi-typescript": "^7.4.4",
15
+ "prettier": "^3.4.2",
16
+ "typescript": "^5.7.2"
17
17
  },
18
- "packageManager": "pnpm@9.12.0+sha512.4abf725084d7bcbafbd728bfc7bee61f2f791f977fd87542b3579dcb23504d170d46337945e4c66485cd12d588a0c0e570ed9c477e7ccdd8507cf05f3f92eaca"
18
+ "packageManager": "pnpm@9.14.2+sha512.6e2baf77d06b9362294152c851c4f278ede37ab1eba3a55fda317a4a17b209f4dbb973fb250a77abc463a341fcb1f17f17cfa24091c4eb319cda0d9b84278387"
19
19
  }