@lichess-org/types 2.0.129 → 2.0.131

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 +135 -6
  2. package/package.json +2 -2
package/lichess-api.d.ts CHANGED
@@ -534,6 +534,30 @@ export interface paths {
534
534
  patch?: never;
535
535
  trace?: never;
536
536
  };
537
+ "/game/{gameId}/chat": {
538
+ parameters: {
539
+ query?: never;
540
+ header?: never;
541
+ path: {
542
+ gameId: string;
543
+ };
544
+ cookie?: never;
545
+ };
546
+ /**
547
+ * Fetch the spectator game chat
548
+ * @description Get the messages posted in the public spectator chat of a game.
549
+ *
550
+ * Games also have a private players chat, which only the 2 players can see.
551
+ */
552
+ get: operations["gameChatGet"];
553
+ put?: never;
554
+ post?: never;
555
+ delete?: never;
556
+ options?: never;
557
+ head?: never;
558
+ patch?: never;
559
+ trace?: never;
560
+ };
537
561
  "/api/user/{username}/current-game": {
538
562
  parameters: {
539
563
  query?: never;
@@ -1509,6 +1533,27 @@ export interface paths {
1509
1533
  patch?: never;
1510
1534
  trace?: never;
1511
1535
  };
1536
+ "/api/study/{studyId}/{chapterId}/moves": {
1537
+ parameters: {
1538
+ query?: never;
1539
+ header?: never;
1540
+ path?: never;
1541
+ cookie?: never;
1542
+ };
1543
+ get?: never;
1544
+ put?: never;
1545
+ /**
1546
+ * Update the moves of a study chapter
1547
+ * @description Replaces the moves tree of a study chapter.
1548
+ * No tags will be modified.
1549
+ */
1550
+ post: operations["apiStudyChapterMoves"];
1551
+ delete?: never;
1552
+ options?: never;
1553
+ head?: never;
1554
+ patch?: never;
1555
+ trace?: never;
1556
+ };
1512
1557
  "/api/study/by/{username}/export.pgn": {
1513
1558
  parameters: {
1514
1559
  query?: never;
@@ -2663,8 +2708,10 @@ export interface paths {
2663
2708
  cookie?: never;
2664
2709
  };
2665
2710
  /**
2666
- * Fetch the game chat
2667
- * @description Get the messages posted in the game chat
2711
+ * Fetch the player chat
2712
+ * @description Get the messages posted in the private game chat, i.e. the chat between the 2 players of the game.
2713
+ *
2714
+ * Games can also have a public spectator chat.
2668
2715
  */
2669
2716
  get: operations["boardGameChatGet"];
2670
2717
  put?: never;
@@ -5237,6 +5284,22 @@ export interface components {
5237
5284
  end?: number;
5238
5285
  };
5239
5286
  };
5287
+ /**
5288
+ * @example [
5289
+ * {
5290
+ * "text": "e4 here we go",
5291
+ * "user": "Toby"
5292
+ * },
5293
+ * {
5294
+ * "text": "Woof!",
5295
+ * "user": "AnnoyingDog"
5296
+ * }
5297
+ * ]
5298
+ */
5299
+ SpectatorGameChat: {
5300
+ text: string;
5301
+ user: string;
5302
+ }[];
5240
5303
  /** @enum {integer} */
5241
5304
  GameStatusId:
5242
5305
  | 10
@@ -7091,7 +7154,7 @@ export interface components {
7091
7154
  * }
7092
7155
  * ]
7093
7156
  */
7094
- GameChat: {
7157
+ PlayerGameChat: {
7095
7158
  text: string;
7096
7159
  user: string;
7097
7160
  }[];
@@ -8511,6 +8574,29 @@ export interface operations {
8511
8574
  };
8512
8575
  };
8513
8576
  };
8577
+ gameChatGet: {
8578
+ parameters: {
8579
+ query?: never;
8580
+ header?: never;
8581
+ path: {
8582
+ gameId: string;
8583
+ };
8584
+ cookie?: never;
8585
+ };
8586
+ requestBody?: never;
8587
+ responses: {
8588
+ /** @description The messages posted in the chat. */
8589
+ 200: {
8590
+ headers: {
8591
+ "Access-Control-Allow-Origin"?: string;
8592
+ [name: string]: unknown;
8593
+ };
8594
+ content: {
8595
+ "application/x-ndjson": components["schemas"]["SpectatorGameChat"];
8596
+ };
8597
+ };
8598
+ };
8599
+ };
8514
8600
  apiUserCurrentGame: {
8515
8601
  parameters: {
8516
8602
  query?: {
@@ -11165,7 +11251,50 @@ export interface operations {
11165
11251
  };
11166
11252
  content?: never;
11167
11253
  };
11168
- /** @description The creation of the chapter(s) failed. */
11254
+ /** @description The request body was invalid, such as missing or malformed PGN tag data. */
11255
+ 400: {
11256
+ headers: {
11257
+ [name: string]: unknown;
11258
+ };
11259
+ content: {
11260
+ "application/json": components["schemas"]["Error"];
11261
+ };
11262
+ };
11263
+ };
11264
+ };
11265
+ apiStudyChapterMoves: {
11266
+ parameters: {
11267
+ query?: never;
11268
+ header?: never;
11269
+ path: {
11270
+ /** @description The study ID */
11271
+ studyId: string;
11272
+ /** @description The chapter ID */
11273
+ chapterId: string;
11274
+ };
11275
+ cookie?: never;
11276
+ };
11277
+ requestBody: {
11278
+ content: {
11279
+ "application/x-www-form-urlencoded": {
11280
+ /**
11281
+ * @description PGN text containing the moves that will replace the chapter's existing moves.
11282
+ * Any provided tags are ignored.
11283
+ */
11284
+ pgn: string;
11285
+ };
11286
+ };
11287
+ };
11288
+ responses: {
11289
+ /** @description Moves updated, as the chapter exists and you are allowed to edit it. */
11290
+ 204: {
11291
+ headers: {
11292
+ "Access-Control-Allow-Origin"?: string;
11293
+ [name: string]: unknown;
11294
+ };
11295
+ content?: never;
11296
+ };
11297
+ /** @description Bad request - might be the provided study/chapter doesn't exist, or you aren't allowed to edit it, or the PGN is invalid. */
11169
11298
  400: {
11170
11299
  headers: {
11171
11300
  [name: string]: unknown;
@@ -12812,7 +12941,7 @@ export interface operations {
12812
12941
  [name: string]: unknown;
12813
12942
  };
12814
12943
  content: {
12815
- "application/x-ndjson": components["schemas"]["GameChat"];
12944
+ "application/x-ndjson": components["schemas"]["PlayerGameChat"];
12816
12945
  };
12817
12946
  };
12818
12947
  };
@@ -13229,7 +13358,7 @@ export interface operations {
13229
13358
  [name: string]: unknown;
13230
13359
  };
13231
13360
  content: {
13232
- "application/x-ndjson": components["schemas"]["GameChat"];
13361
+ "application/x-ndjson": components["schemas"]["PlayerGameChat"];
13233
13362
  };
13234
13363
  };
13235
13364
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lichess-org/types",
3
- "version": "2.0.129",
3
+ "version": "2.0.131",
4
4
  "description": "Lichess.org API types",
5
5
  "homepage": "https://github.com/lichess-org/api",
6
6
  "license": "AGPL-3.0-or-later",
@@ -18,5 +18,5 @@
18
18
  "prettier": "^3.8.1",
19
19
  "typescript": "^5.9.3"
20
20
  },
21
- "packageManager": "pnpm@10.30.0+sha512.2b5753de015d480eeb88f5b5b61e0051f05b4301808a82ec8b840c9d2adf7748eb352c83f5c1593ca703ff1017295bc3fdd3119abb9686efc96b9fcb18200937"
21
+ "packageManager": "pnpm@10.32.1+sha512.a706938f0e89ac1456b6563eab4edf1d1faf3368d1191fc5c59790e96dc918e4456ab2e67d613de1043d2e8c81f87303e6b40d4ffeca9df15ef1ad567348f2be"
22
22
  }