@@ -534,6 +534,30 @@ export interface paths {
534534 patch ?: never ;
535535 trace ?: never ;
536536 } ;
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+ } ;
537561 "/api/user/{username}/current-game" : {
538562 parameters : {
539563 query ?: never ;
@@ -2663,8 +2687,10 @@ export interface paths {
26632687 cookie ?: never ;
26642688 } ;
26652689 /**
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.
26682694 */
26692695 get : operations [ "boardGameChatGet" ] ;
26702696 put ?: never ;
@@ -5237,6 +5263,22 @@ export interface components {
52375263 end ?: number ;
52385264 } ;
52395265 } ;
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+ } [ ] ;
52405282 /** @enum {integer} */
52415283 GameStatusId :
52425284 | 10
@@ -7091,7 +7133,7 @@ export interface components {
70917133 * }
70927134 * ]
70937135 */
7094- GameChat : {
7136+ PlayerGameChat : {
70957137 text : string ;
70967138 user : string ;
70977139 } [ ] ;
@@ -8511,6 +8553,29 @@ export interface operations {
85118553 } ;
85128554 } ;
85138555 } ;
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+ } ;
85148579 apiUserCurrentGame : {
85158580 parameters : {
85168581 query ?: {
@@ -12812,7 +12877,7 @@ export interface operations {
1281212877 [ name : string ] : unknown ;
1281312878 } ;
1281412879 content : {
12815- "application/x-ndjson" : components [ "schemas" ] [ "GameChat " ] ;
12880+ "application/x-ndjson" : components [ "schemas" ] [ "PlayerGameChat " ] ;
1281612881 } ;
1281712882 } ;
1281812883 } ;
@@ -13229,7 +13294,7 @@ export interface operations {
1322913294 [ name : string ] : unknown ;
1323013295 } ;
1323113296 content : {
13232- "application/x-ndjson" : components [ "schemas" ] [ "GameChat " ] ;
13297+ "application/x-ndjson" : components [ "schemas" ] [ "PlayerGameChat " ] ;
1323313298 } ;
1323413299 } ;
1323513300 } ;
0 commit comments