@lichess-org/types 2.0.28 → 2.0.29

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 +125 -13
  2. package/package.json +2 -2
package/lichess-api.d.ts CHANGED
@@ -2942,6 +2942,27 @@ export interface paths {
2942
2942
  patch?: never;
2943
2943
  trace?: never;
2944
2944
  };
2945
+ "/api/bot/game/{gameId}/claim-victory": {
2946
+ parameters: {
2947
+ query?: never;
2948
+ header?: never;
2949
+ path?: never;
2950
+ cookie?: never;
2951
+ };
2952
+ get?: never;
2953
+ put?: never;
2954
+ /**
2955
+ * Claim victory of a game
2956
+ * @description Claim victory when the opponent has left the game for a while.
2957
+ *
2958
+ */
2959
+ post: operations["botGameClaimVictory"];
2960
+ delete?: never;
2961
+ options?: never;
2962
+ head?: never;
2963
+ patch?: never;
2964
+ trace?: never;
2965
+ };
2945
2966
  "/api/challenge": {
2946
2967
  parameters: {
2947
2968
  query?: never;
@@ -5702,7 +5723,9 @@ export interface components {
5702
5723
  fullName?: string;
5703
5724
  nbPlayers?: number;
5704
5725
  variant?: components["schemas"]["Variant"];
5726
+ /** Format: int64 */
5705
5727
  startsAt?: number;
5728
+ /** Format: int64 */
5706
5729
  finishesAt?: number;
5707
5730
  status?: components["schemas"]["ArenaStatus"];
5708
5731
  perf?: components["schemas"]["ArenaPerf"];
@@ -5999,6 +6022,7 @@ export interface components {
5999
6022
  isFinished: boolean;
6000
6023
  isRecentlyFinished?: boolean;
6001
6024
  pairingsClosed?: boolean;
6025
+ /** Format: int64 */
6002
6026
  startsAt?: string;
6003
6027
  nbPlayers: number;
6004
6028
  verdicts?: components["schemas"]["Verdicts"];
@@ -6609,9 +6633,12 @@ export interface components {
6609
6633
  syncUsers: string;
6610
6634
  }
6611
6635
  ) & {
6612
- /** @description Timestamp in milliseconds of broadcast round start. Leave empty to manually start the broadcast round.
6636
+ /**
6637
+ * Format: int64
6638
+ * @description Timestamp in milliseconds of broadcast round start. Leave empty to manually start the broadcast round.
6613
6639
  * Example: `1356998400070`
6614
- * */
6640
+ *
6641
+ */
6615
6642
  startsAt?: number;
6616
6643
  /**
6617
6644
  * @description The start date is unknown, and the round will start automatically when the previous round completes.
@@ -6963,6 +6990,12 @@ export interface components {
6963
6990
  /** @example 13680 */
6964
6991
  nbPages?: number;
6965
6992
  };
6993
+ /**
6994
+ * @description The current state of the arena tournament
6995
+ * @example created
6996
+ * @enum {string}
6997
+ */
6998
+ ArenaStatusName: "created" | "started" | "finished";
6966
6999
  TeamRequest: {
6967
7000
  /** @example coders */
6968
7001
  teamId?: string;
@@ -8173,17 +8206,21 @@ export interface components {
8173
8206
  category?:
8174
8207
  | "loss"
8175
8208
  | "unknown"
8209
+ | "syzygy-loss"
8176
8210
  | "maybe-loss"
8177
8211
  | "blessed-loss"
8178
8212
  | "draw"
8179
8213
  | "cursed-win"
8180
8214
  | "maybe-win"
8215
+ | "syzygy-win"
8181
8216
  | "win";
8182
8217
  /** @description DTZ50'' with rounding or null if unknown */
8183
8218
  dtz?: null | number;
8184
8219
  /** @description DTZ50'' (only if guaranteed to be not rounded) or null if unknown
8185
8220
  * */
8186
8221
  precise_dtz?: null | number;
8222
+ /** @description Depth to Conversion (experimental) */
8223
+ dtc?: null | number;
8187
8224
  /** @description Depth To Mate (only for Standard positions with not more than 5 pieces) */
8188
8225
  dtm?: null | number;
8189
8226
  /** @description Depth To Win (only for Antichess positions with not more than 4 pieces) */
@@ -8198,6 +8235,7 @@ export interface components {
8198
8235
  /** @example {
8199
8236
  * "dtz": 1,
8200
8237
  * "precise_dtz": 1,
8238
+ * "dtc": null,
8201
8239
  * "dtm": 17,
8202
8240
  * "dtw": null,
8203
8241
  * "checkmate": false,
@@ -8212,6 +8250,7 @@ export interface components {
8212
8250
  * "san": "h8=Q+",
8213
8251
  * "dtz": -2,
8214
8252
  * "precise_dtz": -2,
8253
+ * "dtc": null,
8215
8254
  * "dtm": -16,
8216
8255
  * "dtw": null,
8217
8256
  * "zeroing": true,
@@ -8229,22 +8268,28 @@ export interface components {
8229
8268
  * @description `cursed-win` and `blessed-loss` means the 50-move rule prevents
8230
8269
  * the decisive result.
8231
8270
  *
8232
- * `maybe-win` and `maybe-loss` means exact result is unknown due to
8271
+ * `syzygy-win` and `syzygy-loss` means exact result is unknown due to
8233
8272
  * [DTZ rounding](https://syzygy-tables.info/metrics#dtz), i.e., the
8234
8273
  * win or loss could also be prevented by the 50-move rule if
8235
8274
  * the user has deviated from the tablebase recommendation since the
8236
8275
  * last pawn move or capture.
8237
8276
  *
8277
+ * `maybe-win` and `maybe-loss` means the result with regard to the
8278
+ * 50-move rule is unknown because the DTC tablebase does not
8279
+ * guarantee to reach a zeroing move as soon as possible.
8280
+ *
8238
8281
  * @enum {string}
8239
8282
  */
8240
8283
  category?:
8241
8284
  | "win"
8242
8285
  | "unknown"
8286
+ | "syzygy-win"
8243
8287
  | "maybe-win"
8244
8288
  | "cursed-win"
8245
8289
  | "draw"
8246
8290
  | "blessed-loss"
8247
8291
  | "maybe-loss"
8292
+ | "syzygy-loss"
8248
8293
  | "loss";
8249
8294
  /** @description [DTZ50'' with rounding](https://syzygy-tables.info/metrics#dtz) or null if unknown
8250
8295
  * */
@@ -8252,6 +8297,8 @@ export interface components {
8252
8297
  /** @description DTZ50'' (only if guaranteed to be not rounded) or null if unknown
8253
8298
  * */
8254
8299
  precise_dtz?: null | number;
8300
+ /** @description Depth to Conversion (experimental) */
8301
+ dtc?: null | number;
8255
8302
  /** @description Depth To Mate (only for Standard positions with not more than 5 pieces) */
8256
8303
  dtm?: null | number;
8257
8304
  /** @description Depth To Win (only for Antichess positions with not more than 4 pieces) */
@@ -9693,7 +9740,10 @@ export interface operations {
9693
9740
  * @enum {integer}
9694
9741
  */
9695
9742
  waitMinutes?: 1 | 2 | 3 | 5 | 10 | 15 | 20 | 30 | 45 | 60;
9696
- /** @description Timestamp (in milliseconds) to start the tournament at a given date and time. Overrides the `waitMinutes` setting */
9743
+ /**
9744
+ * Format: int64
9745
+ * @description Timestamp (in milliseconds) to start the tournament at a given date and time. Overrides the `waitMinutes` setting
9746
+ */
9697
9747
  startDate?: number;
9698
9748
  variant?: components["schemas"]["VariantKey"];
9699
9749
  /**
@@ -9977,7 +10027,10 @@ export interface operations {
9977
10027
  * @enum {integer}
9978
10028
  */
9979
10029
  waitMinutes?: 1 | 2 | 3 | 5 | 10 | 15 | 20 | 30 | 45 | 60;
9980
- /** @description Timestamp (in milliseconds) to start the tournament at a given date and time. Overrides the `waitMinutes` setting */
10030
+ /**
10031
+ * Format: int64
10032
+ * @description Timestamp (in milliseconds) to start the tournament at a given date and time. Overrides the `waitMinutes` setting
10033
+ */
9981
10034
  startDate?: number;
9982
10035
  variant?: components["schemas"]["VariantKey"];
9983
10036
  /**
@@ -10538,7 +10591,10 @@ export interface operations {
10538
10591
  "clock.increment": number;
10539
10592
  /** @description Maximum number of rounds to play */
10540
10593
  nbRounds: number;
10541
- /** @description Timestamp in milliseconds to start the tournament at a given date and time. By default, it starts 10 minutes after creation. */
10594
+ /**
10595
+ * Format: int64
10596
+ * @description Timestamp in milliseconds to start the tournament at a given date and time. By default, it starts 10 minutes after creation.
10597
+ */
10542
10598
  startsAt?: number;
10543
10599
  /**
10544
10600
  * @description How long to wait between each round, in seconds.
@@ -10775,7 +10831,10 @@ export interface operations {
10775
10831
  "clock.increment": number;
10776
10832
  /** @description Maximum number of rounds to play */
10777
10833
  nbRounds: number;
10778
- /** @description Timestamp in milliseconds to start the tournament at a given date and time. By default, it starts 10 minutes after creation. */
10834
+ /**
10835
+ * Format: int64
10836
+ * @description Timestamp in milliseconds to start the tournament at a given date and time. By default, it starts 10 minutes after creation.
10837
+ */
10779
10838
  startsAt?: number;
10780
10839
  /**
10781
10840
  * @description How long to wait between each round, in seconds.
@@ -10942,7 +11001,10 @@ export interface operations {
10942
11001
  requestBody: {
10943
11002
  content: {
10944
11003
  "application/x-www-form-urlencoded": {
10945
- /** @description Timestamp in milliseconds to start the next round at a given date and time. */
11004
+ /**
11005
+ * Format: int64
11006
+ * @description Timestamp in milliseconds to start the next round at a given date and time.
11007
+ */
10946
11008
  date?: number;
10947
11009
  };
10948
11010
  };
@@ -12177,6 +12239,15 @@ export interface operations {
12177
12239
  query?: {
12178
12240
  /** @description How many tournaments to download. */
12179
12241
  max?: number;
12242
+ /** @description [Filter] Only arena tournaments in this current state.
12243
+ * */
12244
+ status?: components["schemas"]["ArenaStatusName"] & unknown;
12245
+ /** @description [Filter] Only arena tournaments created by a given user.
12246
+ * */
12247
+ createdBy?: string;
12248
+ /** @description [Filter] Only arena tournaments with a given name.
12249
+ * */
12250
+ name?: string;
12180
12251
  };
12181
12252
  header?: never;
12182
12253
  path: {
@@ -13384,6 +13455,38 @@ export interface operations {
13384
13455
  };
13385
13456
  };
13386
13457
  };
13458
+ botGameClaimVictory: {
13459
+ parameters: {
13460
+ query?: never;
13461
+ header?: never;
13462
+ path: {
13463
+ gameId: string;
13464
+ };
13465
+ cookie?: never;
13466
+ };
13467
+ requestBody?: never;
13468
+ responses: {
13469
+ /** @description The victory was successfully claimed. */
13470
+ 200: {
13471
+ headers: {
13472
+ "Access-Control-Allow-Origin"?: string;
13473
+ [name: string]: unknown;
13474
+ };
13475
+ content: {
13476
+ "application/json": components["schemas"]["Ok"];
13477
+ };
13478
+ };
13479
+ /** @description The victory claim has failed. */
13480
+ 400: {
13481
+ headers: {
13482
+ [name: string]: unknown;
13483
+ };
13484
+ content: {
13485
+ "application/json": components["schemas"]["Error"];
13486
+ };
13487
+ };
13488
+ };
13489
+ };
13387
13490
  challengeList: {
13388
13491
  parameters: {
13389
13492
  query?: never;
@@ -13755,7 +13858,10 @@ export interface operations {
13755
13858
  * Example: `Username1,Username2`
13756
13859
  * */
13757
13860
  users?: string;
13758
- /** @description Timestamp in milliseconds to expire the challenge. Defaults to 24h after creation. Can't be more than 2 weeks after creation. */
13861
+ /**
13862
+ * Format: int64
13863
+ * @description Timestamp in milliseconds to expire the challenge. Defaults to 24h after creation. Can't be more than 2 weeks after creation.
13864
+ */
13759
13865
  expiresAt?: number;
13760
13866
  };
13761
13867
  };
@@ -13860,18 +13966,24 @@ export interface operations {
13860
13966
  * @enum {integer}
13861
13967
  */
13862
13968
  days?: 1 | 2 | 3 | 5 | 7 | 10 | 14;
13863
- /** @description Date at which the games will be created as a Unix timestamp in milliseconds.
13969
+ /**
13970
+ * Format: int64
13971
+ * @description Date at which the games will be created as a Unix timestamp in milliseconds.
13864
13972
  * Up to 7 days in the future.
13865
13973
  * Omit, or set to current date and time, to start the games immediately.
13866
13974
  * Example: `1612289869919`
13867
- * */
13975
+ *
13976
+ */
13868
13977
  pairAt?: number;
13869
- /** @description Date at which the clocks will be automatically started as a Unix timestamp in milliseconds.
13978
+ /**
13979
+ * Format: int64
13980
+ * @description Date at which the clocks will be automatically started as a Unix timestamp in milliseconds.
13870
13981
  * Up to 7 days in the future.
13871
13982
  * Note that the clocks can start earlier than specified, if players start making moves in the game.
13872
13983
  * If omitted, the clocks will not start automatically.
13873
13984
  * Example: `1612289869919`
13874
- * */
13985
+ *
13986
+ */
13875
13987
  startClocksAt?: number;
13876
13988
  /**
13877
13989
  * @description Game is rated and impacts players ratings
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lichess-org/types",
3
- "version": "2.0.28",
3
+ "version": "2.0.29",
4
4
  "description": "Lichess.org API types",
5
5
  "homepage": "https://github.com/lichess-org/api",
6
6
  "license": "AGPL-3.0-or-later",
@@ -13,7 +13,7 @@
13
13
  "devDependencies": {
14
14
  "openapi-typescript": "^7.6.1",
15
15
  "prettier": "^3.5.3",
16
- "typescript": "^5.8.2"
16
+ "typescript": "^5.8.3"
17
17
  },
18
18
  "packageManager": "pnpm@9.15.6+sha512.139cab068fdf0b751268179ac5f909b5be72afb4a75c513d1905d151befc8977b593d3cf8671ed83d4d6637c5c94b98ffbce108125de4a5a27a31233601a99de"
19
19
  }