From 548498d37424f2ac579770962b627aeba61925e8 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Mon, 29 May 2023 14:48:50 -0700 Subject: added bot --- src/interfaces/Chessh.ts | 19 +++++++++++++++++++ src/interfaces/ChesshRequest.ts | 19 +++++++++++++++++++ src/interfaces/ErrorResponse.ts | 6 ++++++ 3 files changed, 44 insertions(+) create mode 100644 src/interfaces/Chessh.ts create mode 100644 src/interfaces/ChesshRequest.ts create mode 100644 src/interfaces/ErrorResponse.ts (limited to 'src/interfaces') 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; +} -- cgit v1.3