@lichess-org/types 2.0.22 → 2.0.23

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 +95 -0
  2. package/package.json +3 -3
package/lichess-api.d.ts CHANGED
@@ -726,6 +726,29 @@ export interface paths {
726
726
  patch?: never;
727
727
  trace?: never;
728
728
  };
729
+ "/api/games/export/bookmarks": {
730
+ parameters: {
731
+ query?: never;
732
+ header?: never;
733
+ path?: never;
734
+ cookie?: never;
735
+ };
736
+ /**
737
+ * Export your bookmarked games
738
+ * @description Download all games bookmarked by you, in PGN or [ndjson](#section/Introduction/Streaming-with-ND-JSON) format.
739
+ * Games are sorted by reverse chronological order (most recent first).
740
+ * We recommend streaming the response, for it can be very long.
741
+ *
742
+ */
743
+ get: operations["apiExportBookmarks"];
744
+ put?: never;
745
+ post?: never;
746
+ delete?: never;
747
+ options?: never;
748
+ head?: never;
749
+ patch?: never;
750
+ trace?: never;
751
+ };
729
752
  "/api/tv/channels": {
730
753
  parameters: {
731
754
  query?: never;
@@ -9160,6 +9183,72 @@ export interface operations {
9160
9183
  };
9161
9184
  };
9162
9185
  };
9186
+ apiExportBookmarks: {
9187
+ parameters: {
9188
+ query?: {
9189
+ /** @description Download games bookmarked since this timestamp. Defaults to account creation date. */
9190
+ since?: number;
9191
+ /** @description Download games bookmarked until this timestamp. Defaults to now. */
9192
+ until?: number;
9193
+ /** @description How many bookmarked games to download. Leave empty to download all bookmarked games. */
9194
+ max?: number;
9195
+ /** @description Include the PGN moves. */
9196
+ moves?: boolean;
9197
+ /** @description Include the full PGN within the JSON response, in a `pgn` field. The response type must be set to `application/x-ndjson` by the request `Accept` header. */
9198
+ pgnInJson?: boolean;
9199
+ /** @description Include the PGN tags. */
9200
+ tags?: boolean;
9201
+ /** @description Include clock status when available.
9202
+ * Either as PGN comments: `2. exd5 { [%clk 1:01:27] } e5 { [%clk 1:01:28] }`
9203
+ * Or in a `clocks` JSON field, as centisecond integers, depending on the response type.
9204
+ * */
9205
+ clocks?: boolean;
9206
+ /** @description Include analysis evaluations and comments, when available.
9207
+ * Either as PGN comments: `12. Bxf6 { [%eval 0.23] } a3 { [%eval -1.09] }`
9208
+ * Or in an `analysis` JSON field, depending on the response type.
9209
+ * */
9210
+ evals?: boolean;
9211
+ /** @description Include [accuracy percent](https://lichess.org/page/accuracy) of each player, when available. Only available in JSON.
9212
+ * */
9213
+ accuracy?: boolean;
9214
+ /** @description Include the opening name.
9215
+ * Example: `[Opening "King's Gambit Accepted, King's Knight Gambit"]`
9216
+ * */
9217
+ opening?: boolean;
9218
+ /** @description Plies which mark the beginning of the middlegame and endgame.
9219
+ * Only available in JSON
9220
+ * */
9221
+ division?: boolean;
9222
+ /** @description Insert textual annotations in the PGN about the opening, analysis variations, mistakes, and game termination.
9223
+ * Example: `5... g4? { (-0.98 → 0.60) Mistake. Best move was h6. } (5... h6 6. d4 Ne7 7. g3 d5 8. exd5 fxg3 9. hxg3 c6 10. dxc6)`
9224
+ * */
9225
+ literate?: boolean;
9226
+ /** @description Include the FEN notation of the last position of the game.
9227
+ * The response type must be set to `application/x-ndjson` by the request `Accept` header.
9228
+ * */
9229
+ lastFen?: boolean;
9230
+ /** @description Sort order of the bookmarks. */
9231
+ sort?: "dateAsc" | "dateDesc";
9232
+ };
9233
+ header?: never;
9234
+ path?: never;
9235
+ cookie?: never;
9236
+ };
9237
+ requestBody?: never;
9238
+ responses: {
9239
+ /** @description The bookmarked games of the user. */
9240
+ 200: {
9241
+ headers: {
9242
+ "Access-Control-Allow-Origin"?: string;
9243
+ [name: string]: unknown;
9244
+ };
9245
+ content: {
9246
+ "application/x-chess-pgn": components["schemas"]["GamePgn"];
9247
+ "application/x-ndjson": components["schemas"]["GameJson"];
9248
+ };
9249
+ };
9250
+ };
9251
+ };
9163
9252
  tvChannels: {
9164
9253
  parameters: {
9165
9254
  query?: never;
@@ -12305,6 +12394,12 @@ export interface operations {
12305
12394
  * @example 15
12306
12395
  */
12307
12396
  increment: number;
12397
+ /**
12398
+ * @description The color to play. Better left empty to automatically get 50% white.
12399
+ * @default random
12400
+ * @enum {string}
12401
+ */
12402
+ color?: "random" | "white" | "black";
12308
12403
  }
12309
12404
  | {
12310
12405
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lichess-org/types",
3
- "version": "2.0.22",
3
+ "version": "2.0.23",
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.5.2",
14
+ "openapi-typescript": "^7.6.0",
15
15
  "prettier": "^3.4.2",
16
- "typescript": "^5.7.2"
16
+ "typescript": "^5.7.3"
17
17
  },
18
18
  "packageManager": "pnpm@9.14.2+sha512.6e2baf77d06b9362294152c851c4f278ede37ab1eba3a55fda317a4a17b209f4dbb973fb250a77abc463a341fcb1f17f17cfa24091c4eb319cda0d9b84278387"
19
19
  }