@lichess-org/types 2.0.129 → 2.0.130

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 +70 -5
  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;
@@ -2663,8 +2687,10 @@ export interface paths {
2663
2687
  cookie?: never;
2664
2688
  };
2665
2689
  /**
2666
- * Fetch the game chat
2667
- * @description Get the messages posted in the game chat
2690
+ * Fetch the player chat
2691
+ * @description Get the messages posted in the private game chat, i.e. the chat between the 2 players of the game.
2692
+ *
2693
+ * Games can also have a public spectator chat.
2668
2694
  */
2669
2695
  get: operations["boardGameChatGet"];
2670
2696
  put?: never;
@@ -5237,6 +5263,22 @@ export interface components {
5237
5263
  end?: number;
5238
5264
  };
5239
5265
  };
5266
+ /**
5267
+ * @example [
5268
+ * {
5269
+ * "text": "e4 here we go",
5270
+ * "user": "Toby"
5271
+ * },
5272
+ * {
5273
+ * "text": "Woof!",
5274
+ * "user": "AnnoyingDog"
5275
+ * }
5276
+ * ]
5277
+ */
5278
+ SpectatorGameChat: {
5279
+ text: string;
5280
+ user: string;
5281
+ }[];
5240
5282
  /** @enum {integer} */
5241
5283
  GameStatusId:
5242
5284
  | 10
@@ -7091,7 +7133,7 @@ export interface components {
7091
7133
  * }
7092
7134
  * ]
7093
7135
  */
7094
- GameChat: {
7136
+ PlayerGameChat: {
7095
7137
  text: string;
7096
7138
  user: string;
7097
7139
  }[];
@@ -8511,6 +8553,29 @@ export interface operations {
8511
8553
  };
8512
8554
  };
8513
8555
  };
8556
+ gameChatGet: {
8557
+ parameters: {
8558
+ query?: never;
8559
+ header?: never;
8560
+ path: {
8561
+ gameId: string;
8562
+ };
8563
+ cookie?: never;
8564
+ };
8565
+ requestBody?: never;
8566
+ responses: {
8567
+ /** @description The messages posted in the chat. */
8568
+ 200: {
8569
+ headers: {
8570
+ "Access-Control-Allow-Origin"?: string;
8571
+ [name: string]: unknown;
8572
+ };
8573
+ content: {
8574
+ "application/x-ndjson": components["schemas"]["SpectatorGameChat"];
8575
+ };
8576
+ };
8577
+ };
8578
+ };
8514
8579
  apiUserCurrentGame: {
8515
8580
  parameters: {
8516
8581
  query?: {
@@ -12812,7 +12877,7 @@ export interface operations {
12812
12877
  [name: string]: unknown;
12813
12878
  };
12814
12879
  content: {
12815
- "application/x-ndjson": components["schemas"]["GameChat"];
12880
+ "application/x-ndjson": components["schemas"]["PlayerGameChat"];
12816
12881
  };
12817
12882
  };
12818
12883
  };
@@ -13229,7 +13294,7 @@ export interface operations {
13229
13294
  [name: string]: unknown;
13230
13295
  };
13231
13296
  content: {
13232
- "application/x-ndjson": components["schemas"]["GameChat"];
13297
+ "application/x-ndjson": components["schemas"]["PlayerGameChat"];
13233
13298
  };
13234
13299
  };
13235
13300
  };
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.130",
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
  }