@lichess-org/types 2.0.88 → 2.0.90

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 +73 -43
  2. package/package.json +1 -1
package/lichess-api.d.ts CHANGED
@@ -4220,6 +4220,33 @@ export interface components {
4220
4220
  */
4221
4221
  blocking?: boolean;
4222
4222
  };
4223
+ /** @example {
4224
+ * "name": "Bullet",
4225
+ * "points": [
4226
+ * [
4227
+ * 2011,
4228
+ * 0,
4229
+ * 8,
4230
+ * 1472
4231
+ * ],
4232
+ * [
4233
+ * 2011,
4234
+ * 0,
4235
+ * 9,
4236
+ * 1332
4237
+ * ],
4238
+ * [
4239
+ * 2011,
4240
+ * 8,
4241
+ * 12,
4242
+ * 1314
4243
+ * ]
4244
+ * ]
4245
+ * } */
4246
+ RatingHistoryEntry: {
4247
+ name?: string;
4248
+ points?: number[][];
4249
+ };
4223
4250
  /** @example [
4224
4251
  * {
4225
4252
  * "name": "Bullet",
@@ -4256,7 +4283,7 @@ export interface components {
4256
4283
  * ]
4257
4284
  * }
4258
4285
  * ] */
4259
- RatingHistory: unknown;
4286
+ RatingHistory: components["schemas"]["RatingHistoryEntry"][];
4260
4287
  /** @enum {string} */
4261
4288
  PerfType:
4262
4289
  | "ultraBullet"
@@ -4504,8 +4531,8 @@ export interface components {
4504
4531
  loss: number;
4505
4532
  draw: number;
4506
4533
  rp: {
4507
- before?: number;
4508
- after?: number;
4534
+ before: number;
4535
+ after: number;
4509
4536
  };
4510
4537
  };
4511
4538
  /** @enum {string} */
@@ -4529,6 +4556,7 @@ export interface components {
4529
4556
  UserActivityCorrespondenceGame: {
4530
4557
  id: string;
4531
4558
  color: components["schemas"]["GameColor"];
4559
+ /** Format: uri */
4532
4560
  url: string;
4533
4561
  variant?: components["schemas"]["VariantKey"];
4534
4562
  /** @constant */
@@ -4603,8 +4631,12 @@ export interface components {
4603
4631
  in?: components["schemas"]["UserActivityFollowList"];
4604
4632
  out?: components["schemas"]["UserActivityFollowList"];
4605
4633
  };
4606
- studies?: Record<string, never>;
4634
+ studies?: {
4635
+ id: string;
4636
+ name: string;
4637
+ }[];
4607
4638
  teams?: {
4639
+ /** Format: uri */
4608
4640
  url: string;
4609
4641
  name: string;
4610
4642
  flair?: components["schemas"]["Flair"];
@@ -4632,7 +4664,7 @@ export interface components {
4632
4664
  };
4633
4665
  pgn: string;
4634
4666
  players: {
4635
- color: string;
4667
+ color: components["schemas"]["GameColor"];
4636
4668
  flair?: components["schemas"]["Flair"];
4637
4669
  id: string;
4638
4670
  name: string;
@@ -4772,7 +4804,7 @@ export interface components {
4772
4804
  * "error": "Not found."
4773
4805
  * } */
4774
4806
  NotFound: {
4775
- error?: string;
4807
+ error: string;
4776
4808
  };
4777
4809
  UserPreferences: {
4778
4810
  dark?: boolean;
@@ -4911,7 +4943,7 @@ export interface components {
4911
4943
  sayGG?: 0 | 1 | 2;
4912
4944
  };
4913
4945
  Ok: {
4914
- ok?: boolean;
4946
+ ok: boolean;
4915
4947
  };
4916
4948
  TimelineEntryFollow: {
4917
4949
  /** @enum {string} */
@@ -5281,7 +5313,7 @@ export interface components {
5281
5313
  patron?: boolean;
5282
5314
  patronColor?: components["schemas"]["PatronColor"];
5283
5315
  };
5284
- GameUser: {
5316
+ GamePlayerUser: {
5285
5317
  user: components["schemas"]["LightUser"];
5286
5318
  rating: number;
5287
5319
  ratingDiff?: number;
@@ -5297,9 +5329,9 @@ export interface components {
5297
5329
  };
5298
5330
  team?: string;
5299
5331
  };
5300
- GameUsers: {
5301
- white: components["schemas"]["GameUser"];
5302
- black: components["schemas"]["GameUser"];
5332
+ GamePlayers: {
5333
+ white: components["schemas"]["GamePlayerUser"];
5334
+ black: components["schemas"]["GamePlayerUser"];
5303
5335
  };
5304
5336
  GameOpening: {
5305
5337
  eco: string;
@@ -5341,7 +5373,7 @@ export interface components {
5341
5373
  lastMoveAt: number;
5342
5374
  status: components["schemas"]["GameStatusName"];
5343
5375
  source?: string;
5344
- players: components["schemas"]["GameUsers"];
5376
+ players: components["schemas"]["GamePlayers"];
5345
5377
  initialFen?: string;
5346
5378
  winner?: components["schemas"]["GameColor"];
5347
5379
  opening?: components["schemas"]["GameOpening"];
@@ -5726,9 +5758,9 @@ export interface components {
5726
5758
  winner?: components["schemas"]["LightUser"];
5727
5759
  };
5728
5760
  ArenaTournaments: {
5729
- created?: components["schemas"]["ArenaTournament"][];
5730
- started?: components["schemas"]["ArenaTournament"][];
5731
- finished?: components["schemas"]["ArenaTournament"][];
5761
+ created: components["schemas"]["ArenaTournament"][];
5762
+ started: components["schemas"]["ArenaTournament"][];
5763
+ finished: components["schemas"]["ArenaTournament"][];
5732
5764
  };
5733
5765
  /**
5734
5766
  * @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.
@@ -5881,7 +5913,7 @@ export interface components {
5881
5913
  * } */
5882
5914
  Error: {
5883
5915
  /** @description The cause of the error. */
5884
- error?: string;
5916
+ error: string;
5885
5917
  };
5886
5918
  /** @example {
5887
5919
  * "games": 10,
@@ -5896,8 +5928,8 @@ export interface components {
5896
5928
  performance?: number;
5897
5929
  };
5898
5930
  ArenaTournamentPlayed: {
5899
- tournament?: components["schemas"]["ArenaTournament"];
5900
- player?: components["schemas"]["ArenaTournamentPlayer"];
5931
+ tournament: components["schemas"]["ArenaTournament"];
5932
+ player: components["schemas"]["ArenaTournamentPlayer"];
5901
5933
  };
5902
5934
  /**
5903
5935
  * @description Custom initial position (in FEN). Variant must be standard and the game cannot be rated.
@@ -6326,7 +6358,7 @@ export interface components {
6326
6358
  };
6327
6359
  BroadcastPlayerWithFed: {
6328
6360
  /** @example Hernandez Riera, Jose */
6329
- name?: string;
6361
+ name: string;
6330
6362
  /** @example FM */
6331
6363
  title?: components["schemas"]["Title"];
6332
6364
  /** @example 2149 */
@@ -6739,13 +6771,13 @@ export interface components {
6739
6771
  };
6740
6772
  GameStartEvent: {
6741
6773
  /** @constant */
6742
- type?: "gameStart";
6743
- game?: components["schemas"]["GameEventInfo"];
6774
+ type: "gameStart";
6775
+ game: components["schemas"]["GameEventInfo"];
6744
6776
  };
6745
6777
  GameFinishEvent: {
6746
6778
  /** @constant */
6747
- type?: "gameFinish";
6748
- game?: components["schemas"]["GameEventInfo"];
6779
+ type: "gameFinish";
6780
+ game: components["schemas"]["GameEventInfo"];
6749
6781
  };
6750
6782
  /** @enum {string} */
6751
6783
  ChallengeStatus:
@@ -6758,7 +6790,7 @@ export interface components {
6758
6790
  id: string;
6759
6791
  name: string;
6760
6792
  rating?: number;
6761
- title?: components["schemas"]["Title"] | null;
6793
+ title?: components["schemas"]["Title"];
6762
6794
  flair?: components["schemas"]["Flair"];
6763
6795
  /** @deprecated */
6764
6796
  patron?: boolean;
@@ -6785,6 +6817,8 @@ export interface components {
6785
6817
  /** @constant */
6786
6818
  type?: "unlimited";
6787
6819
  };
6820
+ /** @enum {string} */
6821
+ ChallengeColor: "white" | "black" | "random";
6788
6822
  /** @example {
6789
6823
  * "id": "H9fIRZUk",
6790
6824
  * "url": "https://lichess.org/H9fIRZUk",
@@ -6839,8 +6873,7 @@ export interface components {
6839
6873
  rated: boolean;
6840
6874
  speed: components["schemas"]["Speed"];
6841
6875
  timeControl: components["schemas"]["TimeControl"];
6842
- /** @enum {string} */
6843
- color: "white" | "black" | "random";
6876
+ color: components["schemas"]["ChallengeColor"];
6844
6877
  finalColor?: components["schemas"]["GameColor"];
6845
6878
  perf: {
6846
6879
  icon?: string;
@@ -6858,8 +6891,8 @@ export interface components {
6858
6891
  };
6859
6892
  ChallengeCanceledEvent: {
6860
6893
  /** @constant */
6861
- type?: "challengeCanceled";
6862
- challenge?: components["schemas"]["ChallengeJson"];
6894
+ type: "challengeCanceled";
6895
+ challenge: components["schemas"]["ChallengeJson"];
6863
6896
  };
6864
6897
  ChallengeDeclinedJson: {
6865
6898
  /** @description Human readable, possibly translated reason why the challenge was declined. */
@@ -6883,8 +6916,8 @@ export interface components {
6883
6916
  } & components["schemas"]["ChallengeJson"];
6884
6917
  ChallengeDeclinedEvent: {
6885
6918
  /** @constant */
6886
- type?: "challengeDeclined";
6887
- challenge?: components["schemas"]["ChallengeDeclinedJson"];
6919
+ type: "challengeDeclined";
6920
+ challenge: components["schemas"]["ChallengeDeclinedJson"];
6888
6921
  };
6889
6922
  GameEventPlayer: {
6890
6923
  aiLevel?: number;
@@ -7049,8 +7082,8 @@ export interface components {
7049
7082
  * }
7050
7083
  * ] */
7051
7084
  GameChat: {
7052
- text?: string;
7053
- user?: string;
7085
+ text: string;
7086
+ user: string;
7054
7087
  }[];
7055
7088
  ChallengeOpenJson: {
7056
7089
  id: string;
@@ -7063,15 +7096,16 @@ export interface components {
7063
7096
  rated: boolean;
7064
7097
  speed: components["schemas"]["Speed"];
7065
7098
  timeControl: components["schemas"]["TimeControl"];
7066
- /** @enum {string} */
7067
- color: "white" | "black" | "random";
7099
+ color: components["schemas"]["ChallengeColor"];
7068
7100
  finalColor?: components["schemas"]["GameColor"];
7069
7101
  perf: {
7070
7102
  icon?: string;
7071
7103
  name?: string;
7072
7104
  };
7073
7105
  initialFen?: string;
7106
+ /** Format: uri */
7074
7107
  urlWhite: string;
7108
+ /** Format: uri */
7075
7109
  urlBlack: string;
7076
7110
  open: {
7077
7111
  /** @description An optional array of two user ids. If set, only these users will be allowed to join the game. The first username gets the white pieces. */
@@ -7284,7 +7318,7 @@ export interface components {
7284
7318
  * } */
7285
7319
  OAuthError: {
7286
7320
  /** @description The cause of the error. */
7287
- error?: string;
7321
+ error: string;
7288
7322
  /** @description The reason why the request was rejected. */
7289
7323
  error_description?: string;
7290
7324
  };
@@ -13842,8 +13876,7 @@ export interface operations {
13842
13876
  fullId: string;
13843
13877
  gameId: string;
13844
13878
  fen: string;
13845
- /** @enum {string} */
13846
- color: "white" | "black";
13879
+ color: components["schemas"]["GameColor"];
13847
13880
  lastMove: string;
13848
13881
  source: components["schemas"]["GameSource"];
13849
13882
  status?: components["schemas"]["GameStatusName"];
@@ -13863,8 +13896,7 @@ export interface operations {
13863
13896
  secondsLeft: number;
13864
13897
  tournamentId?: string;
13865
13898
  swissId?: string;
13866
- /** @enum {string} */
13867
- winner?: "white" | "black";
13899
+ winner?: components["schemas"]["GameColor"];
13868
13900
  ratingDiff?: number;
13869
13901
  }[];
13870
13902
  };
@@ -36686,9 +36718,8 @@ export interface operations {
36686
36718
  /**
36687
36719
  * @description Which color you get to play
36688
36720
  * @default random
36689
- * @enum {string}
36690
36721
  */
36691
- color?: "random" | "white" | "black";
36722
+ color?: components["schemas"]["ChallengeColor"];
36692
36723
  variant?: components["schemas"]["VariantKey"];
36693
36724
  fen?: components["schemas"]["FromPositionFEN"];
36694
36725
  /** @description If set, the response is streamed as [ndjson](#section/Introduction/Streaming-with-ND-JSON).
@@ -36991,9 +37022,8 @@ export interface operations {
36991
37022
  /**
36992
37023
  * @description Which color you get to play
36993
37024
  * @default random
36994
- * @enum {string}
36995
37025
  */
36996
- color?: "random" | "white" | "black";
37026
+ color?: components["schemas"]["ChallengeColor"];
36997
37027
  variant?: components["schemas"]["VariantKey"];
36998
37028
  fen?: components["schemas"]["FromPositionFEN"];
36999
37029
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lichess-org/types",
3
- "version": "2.0.88",
3
+ "version": "2.0.90",
4
4
  "description": "Lichess.org API types",
5
5
  "homepage": "https://github.com/lichess-org/api",
6
6
  "license": "AGPL-3.0-or-later",