aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
authorElizabeth Hunt <elizabeth.hunt@simponic.xyz>2023-05-29 14:48:50 -0700
committerElizabeth Hunt <elizabeth.hunt@simponic.xyz>2023-05-29 14:53:08 -0700
commit548498d37424f2ac579770962b627aeba61925e8 (patch)
tree1d02f147b82dd8f9a48296f01a2ae2e84d71958c /src/interfaces
downloadchessh-bot-548498d37424f2ac579770962b627aeba61925e8.tar.gz
chessh-bot-548498d37424f2ac579770962b627aeba61925e8.zip
added bot
Diffstat (limited to 'src/interfaces')
-rw-r--r--src/interfaces/Chessh.ts19
-rw-r--r--src/interfaces/ChesshRequest.ts19
-rw-r--r--src/interfaces/ErrorResponse.ts6
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;
+}