diff options
Diffstat (limited to 'src/interfaces')
| -rw-r--r-- | src/interfaces/Chessh.ts | 19 | ||||
| -rw-r--r-- | src/interfaces/ChesshRequest.ts | 19 | ||||
| -rw-r--r-- | src/interfaces/ErrorResponse.ts | 6 |
3 files changed, 44 insertions, 0 deletions
diff --git a/src/interfaces/Chessh.ts b/src/interfaces/Chessh.ts new file mode 100644 index 0000000..898fccb --- /dev/null +++ b/src/interfaces/Chessh.ts @@ -0,0 +1,19 @@ +export interface BotMoveRequest { + bot_id: number; + bot_name: string; + game_id: number; + fen: string; + turn: string; + bot_turn: boolean; + last_move: string; + status: string; +} + +export interface BotMoveAttempt { + token: string; + attempted_move: string; +} + +export interface BotMoveResponse { + message: string; +} diff --git a/src/interfaces/ChesshRequest.ts b/src/interfaces/ChesshRequest.ts new file mode 100644 index 0000000..72340ba --- /dev/null +++ b/src/interfaces/ChesshRequest.ts @@ -0,0 +1,19 @@ +export interface BotMoveRequest { + bot_id: number; + bot_name: string; + game_id: number; + fen: string; + turn: string; + bot_turn: boolean; + status: string; +} + +export interface BotMoveAttempt { + token: string; + attempted_move: string; +} + +export interface BotMoveResponse { + success: boolean; + message: string; +} diff --git a/src/interfaces/ErrorResponse.ts b/src/interfaces/ErrorResponse.ts new file mode 100644 index 0000000..1513e10 --- /dev/null +++ b/src/interfaces/ErrorResponse.ts @@ -0,0 +1,6 @@ +import MessageResponse from './MessageResponse'; + +export default interface ErrorResponse extends MessageResponse { + stack?: string; + message: string; +} |
