From 442230deb65371f8f853c41a96da6fcbed956ee6 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Tue, 4 Jan 2022 20:30:46 -0700 Subject: [PATCH] Add types for the server.info websocket events --- common/src/index.ts | 1 + common/src/types/events/server_info.ts | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 common/src/types/events/server_info.ts diff --git a/common/src/index.ts b/common/src/index.ts index 4908db4..1a0f80d 100644 --- a/common/src/index.ts +++ b/common/src/index.ts @@ -7,4 +7,5 @@ export * from "./types/Spaceship"; // Server-Client Communications export * from "./types/events/SaveShip"; +export * from "./types/events/server_info"; export * from "./types/ServerResponse"; \ No newline at end of file diff --git a/common/src/types/events/server_info.ts b/common/src/types/events/server_info.ts new file mode 100644 index 0000000..42feb15 --- /dev/null +++ b/common/src/types/events/server_info.ts @@ -0,0 +1,10 @@ +/** + * The data that the server needs in order to perform the `server.info` request. + */ +export interface IServerInfoRequest {} + +/** The data sent as a response to `server.info`. */ +export interface IServerInfoResponse { + /** The version that the server is currently running. */ + version: string; +} \ No newline at end of file