@lichess-org/types 2.0.45 → 2.0.47

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 +127 -183
  2. package/package.json +1 -1
package/lichess-api.d.ts CHANGED
@@ -3855,75 +3855,38 @@ export interface components {
3855
3855
  | "WNM"
3856
3856
  | "LM"
3857
3857
  | "BOT";
3858
- PerfTop10: {
3859
- id?: string;
3860
- username?: string;
3861
- title?: components["schemas"]["Title"];
3862
- patron?: boolean;
3863
- online?: boolean;
3858
+ TopUser: {
3859
+ id: string;
3860
+ username: string;
3864
3861
  perfs?: {
3865
3862
  [key: string]: {
3866
3863
  rating: number;
3867
3864
  progress: number;
3868
3865
  };
3869
3866
  };
3870
- }[];
3867
+ title?: components["schemas"]["Title"];
3868
+ patron?: boolean;
3869
+ online?: boolean;
3870
+ };
3871
+ PerfTop10: components["schemas"]["TopUser"][];
3871
3872
  Top10s: {
3872
- bullet?: components["schemas"]["PerfTop10"];
3873
- blitz?: components["schemas"]["PerfTop10"];
3874
- rapid?: components["schemas"]["PerfTop10"];
3875
- classical?: components["schemas"]["PerfTop10"];
3876
- ultraBullet?: components["schemas"]["PerfTop10"];
3877
- crazyhouse?: components["schemas"]["PerfTop10"];
3878
- chess960?: components["schemas"]["PerfTop10"];
3879
- kingOfTheHill?: components["schemas"]["PerfTop10"];
3880
- threeCheck?: components["schemas"]["PerfTop10"];
3881
- antichess?: components["schemas"]["PerfTop10"];
3882
- atomic?: components["schemas"]["PerfTop10"];
3883
- horde?: components["schemas"]["PerfTop10"];
3884
- racingKings?: components["schemas"]["PerfTop10"];
3873
+ bullet: components["schemas"]["PerfTop10"];
3874
+ blitz: components["schemas"]["PerfTop10"];
3875
+ rapid: components["schemas"]["PerfTop10"];
3876
+ classical: components["schemas"]["PerfTop10"];
3877
+ ultraBullet: components["schemas"]["PerfTop10"];
3878
+ crazyhouse: components["schemas"]["PerfTop10"];
3879
+ chess960: components["schemas"]["PerfTop10"];
3880
+ kingOfTheHill: components["schemas"]["PerfTop10"];
3881
+ threeCheck: components["schemas"]["PerfTop10"];
3882
+ antichess: components["schemas"]["PerfTop10"];
3883
+ atomic: components["schemas"]["PerfTop10"];
3884
+ horde: components["schemas"]["PerfTop10"];
3885
+ racingKings: components["schemas"]["PerfTop10"];
3886
+ };
3887
+ Leaderboard: {
3888
+ users: components["schemas"]["TopUser"][];
3885
3889
  };
3886
- /** @example {
3887
- * "users": [
3888
- * {
3889
- * "id": "bahadirozen",
3890
- * "username": "BahadirOzen",
3891
- * "perfs": {
3892
- * "bullet": {
3893
- * "rating": 3018,
3894
- * "progress": 18
3895
- * }
3896
- * },
3897
- * "online": true,
3898
- * "title": "FM"
3899
- * },
3900
- * {
3901
- * "id": "penguingim1",
3902
- * "username": "penguingim1",
3903
- * "perfs": {
3904
- * "bullet": {
3905
- * "rating": 2983,
3906
- * "progress": -36
3907
- * }
3908
- * },
3909
- * "title": "GM",
3910
- * "online": true,
3911
- * "patron": true
3912
- * },
3913
- * {
3914
- * "id": "night-king96",
3915
- * "username": "Night-King96",
3916
- * "perfs": {
3917
- * "bullet": {
3918
- * "rating": 2958,
3919
- * "progress": 35
3920
- * }
3921
- * },
3922
- * "title": "GM"
3923
- * }
3924
- * ]
3925
- * } */
3926
- Leaderboard: unknown;
3927
3890
  Perf: {
3928
3891
  games: number;
3929
3892
  rating: number;
@@ -4000,10 +3963,8 @@ export interface components {
4000
3963
  links?: string;
4001
3964
  };
4002
3965
  PlayTime: {
4003
- /** @example 3296897 */
4004
- total?: number;
4005
- /** @example 12134 */
4006
- tv?: number;
3966
+ total: number;
3967
+ tv: number;
4007
3968
  };
4008
3969
  User: {
4009
3970
  /** @example georges */
@@ -4011,6 +3972,7 @@ export interface components {
4011
3972
  /** @example Georges */
4012
3973
  username: string;
4013
3974
  perfs?: components["schemas"]["Perfs"];
3975
+ title?: components["schemas"]["Title"];
4014
3976
  flair?: components["schemas"]["Flair"];
4015
3977
  /**
4016
3978
  * Format: int64
@@ -4033,47 +3995,49 @@ export interface components {
4033
3995
  * @example 1522636452014
4034
3996
  */
4035
3997
  seenAt?: number;
3998
+ playTime?: components["schemas"]["PlayTime"];
4036
3999
  /** @example true */
4037
4000
  patron?: boolean;
4038
4001
  /** @example true */
4039
4002
  verified?: boolean;
4040
- playTime?: components["schemas"]["PlayTime"];
4041
- title?: components["schemas"]["Title"];
4042
4003
  };
4043
4004
  Count: {
4044
- /** @example 9265 */
4045
- all?: number;
4046
- /** @example 7157 */
4047
- rated?: number;
4048
- /** @example 531 */
4049
- ai?: number;
4050
- /** @example 340 */
4051
- draw?: number;
4052
- /** @example 331 */
4053
- drawH?: number;
4054
- /** @example 4480 */
4055
- loss?: number;
4056
- /** @example 4207 */
4057
- lossH?: number;
4058
- /** @example 4440 */
4059
- win?: number;
4060
- /** @example 4378 */
4061
- winH?: number;
4062
- /** @example 71 */
4063
- bookmark?: number;
4064
- /** @example 6 */
4065
- playing?: number;
4066
- /** @example 66 */
4067
- import?: number;
4068
- /** @example 0 */
4069
- me?: number;
4005
+ all: number;
4006
+ rated: number;
4007
+ ai: number;
4008
+ draw: number;
4009
+ drawH: number;
4010
+ loss: number;
4011
+ lossH: number;
4012
+ win: number;
4013
+ winH: number;
4014
+ bookmark: number;
4015
+ playing: number;
4016
+ import: number;
4017
+ me: number;
4018
+ };
4019
+ UserStreamer: {
4020
+ twitch?: {
4021
+ /**
4022
+ * Format: uri
4023
+ * @example https://www.twitch.tv/lichessdotorg
4024
+ */
4025
+ channel?: string;
4026
+ };
4027
+ youTube?: {
4028
+ /**
4029
+ * Format: uri
4030
+ * @example https://www.youtube.com/c/LichessDotOrg
4031
+ */
4032
+ channel?: string;
4033
+ };
4070
4034
  };
4071
4035
  UserExtended: components["schemas"]["User"] & {
4072
4036
  /**
4073
4037
  * Format: uri
4074
4038
  * @example https://lichess.org/@/georges
4075
4039
  */
4076
- url?: string;
4040
+ url: string;
4077
4041
  /**
4078
4042
  * Format: uri
4079
4043
  * @example https://lichess.org/yqfLYJ5E/black
@@ -4082,22 +4046,7 @@ export interface components {
4082
4046
  count?: components["schemas"]["Count"];
4083
4047
  /** @example false */
4084
4048
  streaming?: boolean;
4085
- streamer?: {
4086
- twitch?: {
4087
- /**
4088
- * Format: uri
4089
- * @example https://www.twitch.tv/lichessdotorg
4090
- */
4091
- channel?: string;
4092
- };
4093
- youTube?: {
4094
- /**
4095
- * Format: uri
4096
- * @example https://www.youtube.com/c/LichessDotOrg
4097
- */
4098
- channel?: string;
4099
- };
4100
- };
4049
+ streamer?: components["schemas"]["UserStreamer"];
4101
4050
  /**
4102
4051
  * @description only appears if the request is [authenticated with OAuth2](#section/Introduction/Authentication)
4103
4052
  * @example true
@@ -4402,6 +4351,8 @@ export interface components {
4402
4351
  after?: number;
4403
4352
  };
4404
4353
  };
4354
+ /** @enum {string} */
4355
+ GameColor: "white" | "black";
4405
4356
  /**
4406
4357
  * @default standard
4407
4358
  * @example standard
@@ -4420,8 +4371,7 @@ export interface components {
4420
4371
  | "fromPosition";
4421
4372
  UserActivityCorrespondenceGame: {
4422
4373
  id: string;
4423
- /** @enum {string} */
4424
- color: "white" | "black";
4374
+ color: components["schemas"]["GameColor"];
4425
4375
  url: string;
4426
4376
  variant: components["schemas"]["VariantKey"];
4427
4377
  /** @constant */
@@ -5105,8 +5055,8 @@ export interface components {
5105
5055
  patron?: boolean;
5106
5056
  };
5107
5057
  GameUser: {
5108
- user?: components["schemas"]["LightUser"];
5109
- rating?: number;
5058
+ user: components["schemas"]["LightUser"];
5059
+ rating: number;
5110
5060
  ratingDiff?: number;
5111
5061
  name?: string;
5112
5062
  provisional?: boolean;
@@ -5120,6 +5070,15 @@ export interface components {
5120
5070
  };
5121
5071
  team?: string;
5122
5072
  };
5073
+ GameUsers: {
5074
+ white: components["schemas"]["GameUser"];
5075
+ black: components["schemas"]["GameUser"];
5076
+ };
5077
+ GameOpening: {
5078
+ eco: string;
5079
+ name: string;
5080
+ ply: number;
5081
+ };
5123
5082
  GameMoveAnalysis: {
5124
5083
  /** @description Evaluation in centipawns */
5125
5084
  eval?: number;
@@ -5155,18 +5114,10 @@ export interface components {
5155
5114
  lastMoveAt: number;
5156
5115
  status: components["schemas"]["GameStatusName"];
5157
5116
  source?: string;
5158
- players: {
5159
- white: components["schemas"]["GameUser"];
5160
- black: components["schemas"]["GameUser"];
5161
- };
5117
+ players: components["schemas"]["GameUsers"];
5162
5118
  initialFen?: string;
5163
- /** @enum {string} */
5164
- winner?: "white" | "black";
5165
- opening?: {
5166
- eco?: string;
5167
- name?: string;
5168
- ply?: number;
5169
- };
5119
+ winner?: components["schemas"]["GameColor"];
5120
+ opening?: components["schemas"]["GameOpening"];
5170
5121
  moves?: string;
5171
5122
  pgn?: string;
5172
5123
  daysPerTurn?: number;
@@ -5255,8 +5206,8 @@ export interface components {
5255
5206
  | "pool"
5256
5207
  | "swiss";
5257
5208
  Variant: {
5258
- key?: components["schemas"]["VariantKey"];
5259
- name?: string;
5209
+ key: components["schemas"]["VariantKey"];
5210
+ name: string;
5260
5211
  short?: string;
5261
5212
  };
5262
5213
  /** @example [
@@ -5335,8 +5286,7 @@ export interface components {
5335
5286
  user: components["schemas"]["LightUser"];
5336
5287
  rating: number;
5337
5288
  gameId: string;
5338
- /** @enum {string} */
5339
- color: "white" | "black";
5289
+ color: components["schemas"]["GameColor"];
5340
5290
  };
5341
5291
  TvFeed: {
5342
5292
  /**
@@ -5383,7 +5333,6 @@ export interface components {
5383
5333
  /**
5384
5334
  * @description 10: created, 20: started, 30: finished
5385
5335
  *
5386
- * @example 30
5387
5336
  * @enum {integer}
5388
5337
  */
5389
5338
  ArenaStatus: 10 | 20 | 30;
@@ -5471,12 +5420,13 @@ export interface components {
5471
5420
  * @default rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
5472
5421
  */
5473
5422
  FromPositionFEN: string;
5423
+ Verdict: {
5424
+ condition: string;
5425
+ verdict: string;
5426
+ };
5474
5427
  Verdicts: {
5475
5428
  accepted: boolean;
5476
- list: {
5477
- condition: string;
5478
- verdict: string;
5479
- }[];
5429
+ list: components["schemas"]["Verdict"][];
5480
5430
  };
5481
5431
  ArenaSheet: {
5482
5432
  scores: string;
@@ -5617,20 +5567,21 @@ export interface components {
5617
5567
  /** @description The cause of the error. */
5618
5568
  error?: string;
5619
5569
  };
5570
+ /** @example {
5571
+ * "games": 10,
5572
+ * "score": 14,
5573
+ * "rank": 30,
5574
+ * "performance": 1935
5575
+ * } */
5576
+ ArenaTournamentPlayer: {
5577
+ games: number;
5578
+ score: number;
5579
+ rank: number;
5580
+ performance?: number;
5581
+ };
5620
5582
  ArenaTournamentPlayed: {
5621
5583
  tournament?: components["schemas"]["ArenaTournament"];
5622
- /** @example {
5623
- * "games": 10,
5624
- * "score": 14,
5625
- * "rank": 30,
5626
- * "performance": 1935
5627
- * } */
5628
- player?: {
5629
- games: number;
5630
- score: number;
5631
- rank: number;
5632
- performance?: number;
5633
- };
5584
+ player?: components["schemas"]["ArenaTournamentPlayer"];
5634
5585
  };
5635
5586
  /**
5636
5587
  * @description Custom initial position (in FEN). Variant must be standard and the game cannot be rated.
@@ -5639,7 +5590,6 @@ export interface components {
5639
5590
  SwissFromPositionFEN: string;
5640
5591
  /**
5641
5592
  * @description The current state of the swiss tournament
5642
- * @example created
5643
5593
  * @enum {string}
5644
5594
  */
5645
5595
  SwissStatus: "created" | "started" | "finished";
@@ -5739,19 +5689,19 @@ export interface components {
5739
5689
  * } */
5740
5690
  StudyMetadata: {
5741
5691
  /** @description The study ID */
5742
- id?: string;
5692
+ id: string;
5743
5693
  /** @description The study name */
5744
- name?: string;
5694
+ name: string;
5745
5695
  /**
5746
5696
  * Format: int64
5747
5697
  * @description The study creation date
5748
5698
  */
5749
- createdAt?: number;
5699
+ createdAt: number;
5750
5700
  /**
5751
5701
  * Format: int64
5752
5702
  * @description The study last update date
5753
5703
  */
5754
- updatedAt?: number;
5704
+ updatedAt: number;
5755
5705
  };
5756
5706
  BroadcastTour: {
5757
5707
  id: string;
@@ -6197,7 +6147,7 @@ export interface components {
6197
6147
  title?: components["schemas"]["Title"];
6198
6148
  federation: string;
6199
6149
  year?: number | null;
6200
- inactive?: boolean;
6150
+ inactive?: number;
6201
6151
  standard?: number;
6202
6152
  rapid?: number;
6203
6153
  blitz?: number;
@@ -6241,18 +6191,16 @@ export interface components {
6241
6191
  };
6242
6192
  TeamPaginatorJson: {
6243
6193
  /** @example 4 */
6244
- currentPage?: number;
6194
+ currentPage: number;
6245
6195
  /** @example 15 */
6246
- maxPerPage?: number;
6247
- currentPageResults?: components["schemas"]["Team"][];
6248
- /** @example 205194 */
6249
- nbResults?: number;
6196
+ maxPerPage: number;
6197
+ currentPageResults: components["schemas"]["Team"][];
6250
6198
  /** @example 3 */
6251
- previousPage?: number | null;
6199
+ previousPage: number | null;
6252
6200
  /** @example 5 */
6253
- nextPage?: number | null;
6254
- /** @example 13680 */
6255
- nbPages?: number;
6201
+ nextPage: number | null;
6202
+ nbResults: number;
6203
+ nbPages: number;
6256
6204
  };
6257
6205
  /**
6258
6206
  * @description The current state of the arena tournament
@@ -6261,17 +6209,17 @@ export interface components {
6261
6209
  ArenaStatusName: "created" | "started" | "finished";
6262
6210
  TeamRequest: {
6263
6211
  /** @example coders */
6264
- teamId?: string;
6212
+ teamId: string;
6265
6213
  /** @example thibault */
6266
- userId?: string;
6214
+ userId: string;
6267
6215
  /** @example 1514505150384 */
6268
- date?: number;
6216
+ date: number;
6269
6217
  /** @example Hello, I would like to join the team! */
6270
6218
  message?: string;
6271
6219
  };
6272
6220
  TeamRequestWithUser: {
6273
- request?: components["schemas"]["TeamRequest"];
6274
- user?: components["schemas"]["User"];
6221
+ request: components["schemas"]["TeamRequest"];
6222
+ user: components["schemas"]["User"];
6275
6223
  };
6276
6224
  /** @example {
6277
6225
  * "users": {
@@ -6316,13 +6264,13 @@ export interface components {
6316
6264
  | 38
6317
6265
  | 60;
6318
6266
  GameStatus: {
6319
- id?: components["schemas"]["GameStatusId"];
6320
- name?: components["schemas"]["GameStatusName"];
6267
+ id: components["schemas"]["GameStatusId"];
6268
+ name: components["schemas"]["GameStatusName"];
6321
6269
  };
6322
6270
  GameEventOpponent: {
6323
- id?: string;
6324
- username?: string;
6325
- rating?: number;
6271
+ id: string;
6272
+ username: string;
6273
+ rating: number;
6326
6274
  };
6327
6275
  GameCompat: {
6328
6276
  /** @description Compatible with Bot API */
@@ -6334,8 +6282,7 @@ export interface components {
6334
6282
  fullId: string;
6335
6283
  gameId: string;
6336
6284
  fen?: string;
6337
- /** @enum {string} */
6338
- color?: "white" | "black";
6285
+ color?: components["schemas"]["GameColor"];
6339
6286
  lastMove?: string;
6340
6287
  source?: components["schemas"]["GameSource"];
6341
6288
  status?: components["schemas"]["GameStatus"];
@@ -6452,8 +6399,7 @@ export interface components {
6452
6399
  timeControl: components["schemas"]["TimeControl"];
6453
6400
  /** @enum {string} */
6454
6401
  color: "white" | "black" | "random";
6455
- /** @enum {string} */
6456
- finalColor?: "white" | "black";
6402
+ finalColor?: components["schemas"]["GameColor"];
6457
6403
  perf: {
6458
6404
  icon?: string;
6459
6405
  name?: string;
@@ -6464,8 +6410,8 @@ export interface components {
6464
6410
  };
6465
6411
  ChallengeEvent: {
6466
6412
  /** @constant */
6467
- type?: "challenge";
6468
- challenge?: components["schemas"]["ChallengeJson"];
6413
+ type: "challenge";
6414
+ challenge: components["schemas"]["ChallengeJson"];
6469
6415
  compat?: components["schemas"]["GameCompat"];
6470
6416
  };
6471
6417
  ChallengeCanceledEvent: {
@@ -6545,8 +6491,8 @@ export interface components {
6545
6491
  };
6546
6492
  GameEventPlayer: {
6547
6493
  aiLevel?: number;
6548
- id?: string;
6549
- name?: string;
6494
+ id: string;
6495
+ name: string;
6550
6496
  title?: components["schemas"]["Title"] | null;
6551
6497
  rating?: number;
6552
6498
  provisional?: boolean;
@@ -6724,8 +6670,7 @@ export interface components {
6724
6670
  timeControl: components["schemas"]["TimeControl"];
6725
6671
  /** @enum {string} */
6726
6672
  color: "white" | "black" | "random";
6727
- /** @enum {string} */
6728
- finalColor?: "white" | "black";
6673
+ finalColor?: components["schemas"]["GameColor"];
6729
6674
  perf: {
6730
6675
  icon?: string;
6731
6676
  name?: string;
@@ -12808,8 +12753,7 @@ export interface operations {
12808
12753
  status?: components["schemas"]["GameStatus"];
12809
12754
  /** Format: int64 */
12810
12755
  createdAt?: number;
12811
- /** @enum {string} */
12812
- player?: "white" | "black";
12756
+ player?: components["schemas"]["GameColor"];
12813
12757
  fullId?: string;
12814
12758
  };
12815
12759
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lichess-org/types",
3
- "version": "2.0.45",
3
+ "version": "2.0.47",
4
4
  "description": "Lichess.org API types",
5
5
  "homepage": "https://github.com/lichess-org/api",
6
6
  "license": "AGPL-3.0-or-later",