diff --git a/docs/schema/autohost.md b/docs/schema/autohost.md index 95db324..07dcfd1 100644 --- a/docs/schema/autohost.md +++ b/docs/schema/autohost.md @@ -63,7 +63,7 @@ Autohosts used for custom games should use the dedicated mode as lots of pregame Request to add a new player to the battle. -- Endpoint Type: **Event** +- Endpoint Type: **Request** -> **Response** - Source: **Server** - Target: **Autohost** - Required Scopes: `tachyon.lobby` @@ -220,7 +220,7 @@ Possible Failed Reasons: `internal_error`, `unauthorized`, `invalid_request`, `c Kick a player from a battle. -- Endpoint Type: **Event** +- Endpoint Type: **Request** -> **Response** - Source: **Server** - Target: **Autohost** - Required Scopes: `tachyon.lobby` @@ -371,7 +371,7 @@ Possible Failed Reasons: `internal_error`, `unauthorized`, `invalid_request`, `c Request to kill a battle. -- Endpoint Type: **Event** +- Endpoint Type: **Request** -> **Response** - Source: **Server** - Target: **Autohost** - Required Scopes: `tachyon.lobby` @@ -517,7 +517,7 @@ Possible Failed Reasons: `internal_error`, `unauthorized`, `invalid_request`, `c Mute a player in a battle. -- Endpoint Type: **Event** +- Endpoint Type: **Request** -> **Response** - Source: **Server** - Target: **Autohost** - Required Scopes: `tachyon.lobby` @@ -674,7 +674,7 @@ Possible Failed Reasons: `internal_error`, `unauthorized`, `invalid_request`, `c Send a custom command for the autohost to execute. -- Endpoint Type: **Event** +- Endpoint Type: **Request** -> **Response** - Source: **Server** - Target: **Autohost** - Required Scopes: `tachyon.lobby` @@ -825,7 +825,7 @@ Possible Failed Reasons: `internal_error`, `unauthorized`, `invalid_request`, `c Send a message for the autohost to display to players. -- Endpoint Type: **Event** +- Endpoint Type: **Request** -> **Response** - Source: **Server** - Target: **Autohost** - Required Scopes: `tachyon.lobby` @@ -974,7 +974,7 @@ Possible Failed Reasons: `internal_error`, `unauthorized`, `invalid_request`, `c Force players to become spectators in a battle. -- Endpoint Type: **Event** +- Endpoint Type: **Request** -> **Response** - Source: **Server** - Target: **Autohost** - Required Scopes: `tachyon.lobby` @@ -1130,7 +1130,7 @@ Possible Failed Reasons: `internal_error`, `unauthorized`, `invalid_request`, `c Tell the autohost client to launch the game server (spring-dedicated.exe or spring-headless.exe) with the given script data. -- Endpoint Type: **Event** +- Endpoint Type: **Request** -> **Response** - Source: **Server** - Target: **Autohost** - Required Scopes: `tachyon.lobby` @@ -1531,7 +1531,7 @@ export interface AutohostStatusEventData { Ask the autohost to send us updates about its battles. -- Endpoint Type: **Event** +- Endpoint Type: **Request** -> **Response** - Source: **Server** - Target: **Autohost** - Required Scopes: `tachyon.lobby` diff --git a/docs/schema/battle.md b/docs/schema/battle.md index f261ec0..bc99e72 100644 --- a/docs/schema/battle.md +++ b/docs/schema/battle.md @@ -9,7 +9,7 @@ When a user client receives this response it should launch the game (spring.exe) with the start script. -- Endpoint Type: **Event** +- Endpoint Type: **Request** -> **Response** - Source: **Server** - Target: **User** - Required Scopes: `tachyon.lobby` diff --git a/docs/schema/matchmaking.md b/docs/schema/matchmaking.md index 1345347..fe0dac4 100644 --- a/docs/schema/matchmaking.md +++ b/docs/schema/matchmaking.md @@ -41,7 +41,7 @@ The server may send [matchmaking/cancelled](#cancelled) event at any point after Cancel queueing for matchmaking. -- Endpoint Type: **Event** +- Endpoint Type: **Request** -> **Response** - Source: **User** - Target: **Server** - Required Scopes: `tachyon.lobby` @@ -394,7 +394,7 @@ export interface MatchmakingFoundUpdateEventData { Returns all available matchmaking playlists. -- Endpoint Type: **Event** +- Endpoint Type: **Request** -> **Response** - Source: **User** - Target: **Server** - Required Scopes: `tachyon.lobby` @@ -656,7 +656,7 @@ export interface MatchmakingLostEvent { Queue up for matchmaking. Should cancel the previous queue if already in one. -- Endpoint Type: **Event** +- Endpoint Type: **Request** -> **Response** - Source: **User** - Target: **Server** - Required Scopes: `tachyon.lobby` @@ -881,7 +881,7 @@ export interface MatchmakingQueueUpdateEventData { Clients should send this when they are ready to proceed with the found match. If not sent within 10s of the [found](#found) response then queue should be cancelled. -- Endpoint Type: **Event** +- Endpoint Type: **Request** -> **Response** - Source: **User** - Target: **Server** - Required Scopes: `tachyon.lobby` diff --git a/docs/schema/system.md b/docs/schema/system.md index 7f83a7f..1cb0e1a 100644 --- a/docs/schema/system.md +++ b/docs/schema/system.md @@ -10,7 +10,7 @@ Ask the server to terminate the connection. -- Endpoint Type: **Event** +- Endpoint Type: **Request** -> **Response** - Source: **User** - Target: **Server** - Required Scopes: `tachyon.lobby` @@ -154,7 +154,7 @@ Possible Failed Reasons: `internal_error`, `unauthorized`, `invalid_request`, `c Get server stats such as user count. -- Endpoint Type: **Event** +- Endpoint Type: **Request** -> **Response** - Source: **User** - Target: **Server** - Required Scopes: `tachyon.lobby` diff --git a/src/generate-docs.ts b/src/generate-docs.ts index 47da00f..2d80674 100644 --- a/src/generate-docs.ts +++ b/src/generate-docs.ts @@ -113,7 +113,7 @@ export async function generateEndpointMarkdown( markdown += `- Endpoint Type: `; - if ("request" in commandConfig) { + if (commandConfig.type === "requestResponse") { markdown += `**Request** -> **Response**\n`; } else { markdown += `**Event**\n`;