@lichess-org/types 2.0.21 → 2.0.22

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 +301 -65
  2. package/package.json +2 -2
package/lichess-api.d.ts CHANGED
@@ -4294,6 +4294,134 @@ export interface components {
4294
4294
  * }
4295
4295
  * } */
4296
4296
  PerfStat: unknown;
4297
+ UserActivityScore: {
4298
+ win: number;
4299
+ loss: number;
4300
+ draw: number;
4301
+ rp: {
4302
+ before?: number;
4303
+ after?: number;
4304
+ };
4305
+ };
4306
+ /**
4307
+ * @default standard
4308
+ * @example standard
4309
+ * @enum {string}
4310
+ */
4311
+ VariantKey:
4312
+ | "standard"
4313
+ | "chess960"
4314
+ | "crazyhouse"
4315
+ | "antichess"
4316
+ | "atomic"
4317
+ | "horde"
4318
+ | "kingOfTheHill"
4319
+ | "racingKings"
4320
+ | "threeCheck"
4321
+ | "fromPosition";
4322
+ UserActivityCorrespondenceGame: {
4323
+ id: string;
4324
+ /** @enum {string} */
4325
+ color: "white" | "black";
4326
+ url: string;
4327
+ variant: components["schemas"]["VariantKey"];
4328
+ /** @constant */
4329
+ speed: "correspondence";
4330
+ /** @constant */
4331
+ perf: "correspondence";
4332
+ rated: boolean;
4333
+ opponent: {
4334
+ user: string;
4335
+ rating: number;
4336
+ };
4337
+ };
4338
+ UserActivityFollowList: {
4339
+ ids: string[];
4340
+ nb?: number;
4341
+ };
4342
+ UserActivity: {
4343
+ interval: {
4344
+ start: number;
4345
+ end: number;
4346
+ };
4347
+ games?: {
4348
+ chess960?: components["schemas"]["UserActivityScore"];
4349
+ atomic?: components["schemas"]["UserActivityScore"];
4350
+ racingKings?: components["schemas"]["UserActivityScore"];
4351
+ ultraBullet?: components["schemas"]["UserActivityScore"];
4352
+ blitz?: components["schemas"]["UserActivityScore"];
4353
+ kingOfTheHill?: components["schemas"]["UserActivityScore"];
4354
+ bullet?: components["schemas"]["UserActivityScore"];
4355
+ correspondence?: components["schemas"]["UserActivityScore"];
4356
+ horde?: components["schemas"]["UserActivityScore"];
4357
+ puzzle?: components["schemas"]["UserActivityScore"];
4358
+ classical?: components["schemas"]["UserActivityScore"];
4359
+ rapid?: components["schemas"]["UserActivityScore"];
4360
+ };
4361
+ puzzles?: {
4362
+ score?: components["schemas"]["UserActivityScore"];
4363
+ };
4364
+ storm?: {
4365
+ runs?: number;
4366
+ score?: number;
4367
+ };
4368
+ racer?: {
4369
+ runs?: number;
4370
+ score?: number;
4371
+ };
4372
+ streak?: {
4373
+ runs?: number;
4374
+ score?: number;
4375
+ };
4376
+ tournaments?: {
4377
+ nb?: number;
4378
+ best?: {
4379
+ tournament: {
4380
+ id: string;
4381
+ name: string;
4382
+ };
4383
+ nbGames: number;
4384
+ score: number;
4385
+ rank: number;
4386
+ rankPercent: number;
4387
+ }[];
4388
+ };
4389
+ practice?: {
4390
+ url: string;
4391
+ name: string;
4392
+ nbPositions: number;
4393
+ }[];
4394
+ simuls?: string[];
4395
+ correspondenceMoves?: {
4396
+ nb: number;
4397
+ games: components["schemas"]["UserActivityCorrespondenceGame"][];
4398
+ };
4399
+ correspondenceEnds?: {
4400
+ score: components["schemas"]["UserActivityScore"];
4401
+ games: components["schemas"]["UserActivityCorrespondenceGame"][];
4402
+ };
4403
+ follows?: {
4404
+ in?: components["schemas"]["UserActivityFollowList"];
4405
+ out?: components["schemas"]["UserActivityFollowList"];
4406
+ };
4407
+ studies?: Record<string, never>;
4408
+ teams?: {
4409
+ url: string;
4410
+ name: string;
4411
+ }[];
4412
+ posts?: {
4413
+ topicUrl: string;
4414
+ topicName: string;
4415
+ posts: {
4416
+ url: string;
4417
+ text: string;
4418
+ }[];
4419
+ }[];
4420
+ patron?: {
4421
+ months: number;
4422
+ };
4423
+ stream?: boolean;
4424
+ };
4297
4425
  /** @example {
4298
4426
  * "game": {
4299
4427
  * "clock": "3+0",
@@ -5019,23 +5147,7 @@ export interface components {
5019
5147
  *
5020
5148
  * 1. e4 { [%clk 0:03:00] } e5 { [%clk 0:03:00] } 2. Nf3 { [%clk 0:02:59] } Nc6 { [%clk 0:02:58] } 3. Bb5 { [%clk 0:02:57] } d6 { [%clk 0:02:55] } 4. h3 { [%clk 0:02:54] } Nf6 { [%clk 0:02:52] } 5. Bxc6+ { [%clk 0:02:52] } bxc6 { [%clk 0:02:49] } 6. d3 { [%clk 0:02:51] } Be7 { [%clk 0:02:46] } 7. O-O { [%clk 0:02:47] } O-O { [%clk 0:02:45] } 8. b3 { [%clk 0:02:45] } d5 { [%clk 0:02:45] } 9. exd5 { [%clk 0:02:33] } cxd5 { [%clk 0:02:40] } 10. Nxe5 { [%clk 0:02:31] } Qd6 { [%clk 0:02:38] } 1-0
5021
5149
  * */
5022
- GamePgn: unknown;
5023
- /**
5024
- * @default standard
5025
- * @example standard
5026
- * @enum {string}
5027
- */
5028
- VariantKey:
5029
- | "standard"
5030
- | "chess960"
5031
- | "crazyhouse"
5032
- | "antichess"
5033
- | "atomic"
5034
- | "horde"
5035
- | "kingOfTheHill"
5036
- | "racingKings"
5037
- | "threeCheck"
5038
- | "fromPosition";
5150
+ GamePgn: string;
5039
5151
  /** @enum {string} */
5040
5152
  Speed:
5041
5153
  | "ultraBullet"
@@ -5218,9 +5330,54 @@ export interface components {
5218
5330
  * "rating": 2288
5219
5331
  * }
5220
5332
  * }
5333
+ * },
5334
+ * {
5335
+ * "id": "A5fcMO3k",
5336
+ * "rated": true,
5337
+ * "variant": "standard",
5338
+ * "speed": "bullet",
5339
+ * "perf": "bullet",
5340
+ * "createdAt": 1525789431889,
5341
+ * "status": 31,
5342
+ * "statusName": "resign",
5343
+ * "clock": {
5344
+ * "initial": 60,
5345
+ * "increment": 0,
5346
+ * "totalTime": 60
5347
+ * },
5348
+ * "players": {
5349
+ * "white": {
5350
+ * "userId": "kastorcito",
5351
+ * "rating": 2617
5352
+ * },
5353
+ * "black": {
5354
+ * "userId": "er_or",
5355
+ * "rating": 2288
5356
+ * }
5357
+ * },
5358
+ * "winner": "white"
5221
5359
  * }
5222
5360
  * ] */
5223
5361
  GameStream: unknown;
5362
+ /** @enum {string} */
5363
+ GameSource:
5364
+ | "lobby"
5365
+ | "friend"
5366
+ | "ai"
5367
+ | "api"
5368
+ | "tournament"
5369
+ | "position"
5370
+ | "import"
5371
+ | "importlive"
5372
+ | "simul"
5373
+ | "relay"
5374
+ | "pool"
5375
+ | "swiss";
5376
+ Variant: {
5377
+ key?: components["schemas"]["VariantKey"];
5378
+ name?: string;
5379
+ short?: string;
5380
+ };
5224
5381
  /** @example [
5225
5382
  * {
5226
5383
  * "id": "LuGQwhBb",
@@ -5293,6 +5450,15 @@ export interface components {
5293
5450
  * }
5294
5451
  * ] */
5295
5452
  MoveStream: unknown;
5453
+ TvGame: {
5454
+ user: components["schemas"]["LightUser"] & {
5455
+ flair?: components["schemas"]["Flair"];
5456
+ };
5457
+ rating: number;
5458
+ gameId: string;
5459
+ /** @enum {string} */
5460
+ color: "white" | "black";
5461
+ };
5296
5462
  TvFeed: {
5297
5463
  /**
5298
5464
  * @description The type of message.
@@ -5339,11 +5505,6 @@ export interface components {
5339
5505
  limit?: number;
5340
5506
  increment?: number;
5341
5507
  };
5342
- Variant: {
5343
- key?: components["schemas"]["VariantKey"];
5344
- name?: string;
5345
- short?: string;
5346
- };
5347
5508
  /**
5348
5509
  * @description 10: created, 20: started, 30: finished
5349
5510
  *
@@ -5478,6 +5639,10 @@ export interface components {
5478
5639
  verdict: string;
5479
5640
  }[];
5480
5641
  };
5642
+ ArenaSheet: {
5643
+ scores: string;
5644
+ fire?: boolean;
5645
+ };
5481
5646
  ArenaPlayerPerformance: {
5482
5647
  name?: string;
5483
5648
  rank?: number;
@@ -5485,10 +5650,8 @@ export interface components {
5485
5650
  patron?: boolean;
5486
5651
  rating?: number;
5487
5652
  score?: number;
5488
- sheet?: {
5489
- scores?: string;
5490
- fire?: boolean;
5491
- };
5653
+ flair?: components["schemas"]["Flair"];
5654
+ sheet?: components["schemas"]["ArenaSheet"];
5492
5655
  nb?: {
5493
5656
  game?: number;
5494
5657
  beserk?: number;
@@ -6606,7 +6769,6 @@ export interface components {
6606
6769
  id: string;
6607
6770
  name: string;
6608
6771
  description?: string;
6609
- leader?: components["schemas"]["LightUser"];
6610
6772
  flair?: components["schemas"]["Flair"];
6611
6773
  leaders?: components["schemas"]["LightUser"][];
6612
6774
  nbMembers?: number;
@@ -6674,20 +6836,7 @@ export interface components {
6674
6836
  };
6675
6837
  GameEventInfo: {
6676
6838
  id?: string;
6677
- /** @enum {string} */
6678
- source?:
6679
- | "lobby"
6680
- | "friend"
6681
- | "ai"
6682
- | "api"
6683
- | "tournament"
6684
- | "position"
6685
- | "import"
6686
- | "importlive"
6687
- | "simul"
6688
- | "relay"
6689
- | "pool"
6690
- | "swiss";
6839
+ source?: components["schemas"]["GameSource"];
6691
6840
  status?: {
6692
6841
  /** @enum {integer} */
6693
6842
  id?: 10 | 20 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 60;
@@ -8151,7 +8300,7 @@ export interface operations {
8151
8300
  [name: string]: unknown;
8152
8301
  };
8153
8302
  content: {
8154
- "application/json": unknown;
8303
+ "application/json": components["schemas"]["UserActivity"];
8155
8304
  };
8156
8305
  };
8157
8306
  };
@@ -8893,7 +9042,37 @@ export interface operations {
8893
9042
  [name: string]: unknown;
8894
9043
  };
8895
9044
  content: {
8896
- "application/json": unknown;
9045
+ "application/json": {
9046
+ nowPlaying: {
9047
+ fullId: string;
9048
+ gameId: string;
9049
+ fen: string;
9050
+ /** @enum {string} */
9051
+ color: "white" | "black";
9052
+ lastMove: string;
9053
+ source: components["schemas"]["GameSource"];
9054
+ status?: components["schemas"]["GameStatus"];
9055
+ variant: components["schemas"]["Variant"];
9056
+ speed: components["schemas"]["Speed"];
9057
+ perf: components["schemas"]["PerfType"];
9058
+ rated: boolean;
9059
+ hasMoved: boolean;
9060
+ opponent: {
9061
+ id: string;
9062
+ username: string;
9063
+ rating?: number;
9064
+ ratingDiff?: number;
9065
+ ai?: number;
9066
+ };
9067
+ isMyTurn: boolean;
9068
+ secondsLeft: number;
9069
+ tournamentId?: string;
9070
+ swissId?: string;
9071
+ /** @enum {string} */
9072
+ winner?: "white" | "black";
9073
+ ratingDiff?: number;
9074
+ }[];
9075
+ };
8897
9076
  };
8898
9077
  };
8899
9078
  };
@@ -8997,7 +9176,24 @@ export interface operations {
8997
9176
  [name: string]: unknown;
8998
9177
  };
8999
9178
  content: {
9000
- "application/json": unknown;
9179
+ "application/json": {
9180
+ bot: components["schemas"]["TvGame"];
9181
+ blitz: components["schemas"]["TvGame"];
9182
+ racingKings: components["schemas"]["TvGame"];
9183
+ ultraBullet: components["schemas"]["TvGame"];
9184
+ bullet: components["schemas"]["TvGame"];
9185
+ classical: components["schemas"]["TvGame"];
9186
+ threeCheck: components["schemas"]["TvGame"];
9187
+ antichess: components["schemas"]["TvGame"];
9188
+ computer: components["schemas"]["TvGame"];
9189
+ horde: components["schemas"]["TvGame"];
9190
+ rapid: components["schemas"]["TvGame"];
9191
+ atomic: components["schemas"]["TvGame"];
9192
+ crazyhouse: components["schemas"]["TvGame"];
9193
+ chess960: components["schemas"]["TvGame"];
9194
+ kingOfTheHill: components["schemas"]["TvGame"];
9195
+ best: components["schemas"]["TvGame"];
9196
+ };
9001
9197
  };
9002
9198
  };
9003
9199
  };
@@ -9839,7 +10035,17 @@ export interface operations {
9839
10035
  [name: string]: unknown;
9840
10036
  };
9841
10037
  content: {
9842
- "application/x-ndjson": unknown;
10038
+ "application/x-ndjson": {
10039
+ rank: number;
10040
+ score: number;
10041
+ rating: number;
10042
+ username: string;
10043
+ performance: number;
10044
+ title?: components["schemas"]["Title"];
10045
+ team: string;
10046
+ flair?: components["schemas"]["Flair"];
10047
+ sheet?: components["schemas"]["ArenaSheet"];
10048
+ };
9843
10049
  };
9844
10050
  };
9845
10051
  };
@@ -9863,7 +10069,18 @@ export interface operations {
9863
10069
  [name: string]: unknown;
9864
10070
  };
9865
10071
  content: {
9866
- "application/json": unknown;
10072
+ "application/json": {
10073
+ id: string;
10074
+ teams: {
10075
+ rank: number;
10076
+ id: string;
10077
+ score: number;
10078
+ players: {
10079
+ user: components["schemas"]["LightUser"];
10080
+ score?: number;
10081
+ }[];
10082
+ }[];
10083
+ };
9867
10084
  };
9868
10085
  };
9869
10086
  };
@@ -10629,7 +10846,16 @@ export interface operations {
10629
10846
  [name: string]: unknown;
10630
10847
  };
10631
10848
  content: {
10632
- "application/x-ndjson": unknown;
10849
+ "application/x-ndjson": {
10850
+ absent?: boolean;
10851
+ rank: number;
10852
+ points: number;
10853
+ tieBreak: number;
10854
+ rating: number;
10855
+ username: string;
10856
+ title?: components["schemas"]["Title"];
10857
+ performance: number;
10858
+ };
10633
10859
  };
10634
10860
  };
10635
10861
  };
@@ -12062,27 +12288,32 @@ export interface operations {
12062
12288
  * @example true
12063
12289
  */
12064
12290
  rated?: boolean;
12065
- /**
12066
- * @description Clock initial time in minutes. Required for real-time seeks.
12067
- * @example 15
12068
- */
12069
- time?: number;
12070
- /**
12071
- * @description Clock increment in seconds. Required for real-time seeks.
12072
- * @example 15
12073
- */
12074
- increment?: number;
12075
- /**
12076
- * @description Days per turn. Required for correspondence seeks.
12077
- * @enum {integer}
12078
- */
12079
- days?: 1 | 2 | 3 | 5 | 7 | 10 | 14;
12080
12291
  variant?: components["schemas"]["VariantKey"];
12081
12292
  /** @description The rating range of potential opponents. Better left empty.
12082
12293
  * Example: 1500-1800
12083
12294
  * */
12084
12295
  ratingRange?: string;
12085
- };
12296
+ } & (
12297
+ | {
12298
+ /**
12299
+ * @description Clock initial time in minutes. Required for real-time seeks.
12300
+ * @example 15
12301
+ */
12302
+ time: number;
12303
+ /**
12304
+ * @description Clock increment in seconds. Required for real-time seeks.
12305
+ * @example 15
12306
+ */
12307
+ increment: number;
12308
+ }
12309
+ | {
12310
+ /**
12311
+ * @description Days per turn. Required for correspondence seeks.
12312
+ * @enum {integer}
12313
+ */
12314
+ days: 1 | 2 | 3 | 5 | 7 | 10 | 14;
12315
+ }
12316
+ );
12086
12317
  };
12087
12318
  };
12088
12319
  responses: {
@@ -12093,7 +12324,10 @@ export interface operations {
12093
12324
  [name: string]: unknown;
12094
12325
  };
12095
12326
  content: {
12096
- "text/plain": unknown;
12327
+ "application/json": {
12328
+ id: string;
12329
+ };
12330
+ "application/x-ndjson": unknown;
12097
12331
  };
12098
12332
  };
12099
12333
  /** @description The creation of the seek failed. */
@@ -13509,7 +13743,9 @@ export interface operations {
13509
13743
  [name: string]: unknown;
13510
13744
  };
13511
13745
  content: {
13512
- "application/json": unknown;
13746
+ "application/json": {
13747
+ [key: string]: string;
13748
+ };
13513
13749
  };
13514
13750
  };
13515
13751
  /** @description The creation of the tokens failed. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lichess-org/types",
3
- "version": "2.0.21",
3
+ "version": "2.0.22",
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,7 +11,7 @@
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.4",
14
+ "openapi-typescript": "^7.5.2",
15
15
  "prettier": "^3.4.2",
16
16
  "typescript": "^5.7.2"
17
17
  },