Change wrapper types to primitive types.
This commit is contained in:
parent
e7d65aa99b
commit
4927d9ac5a
1 changed files with 19 additions and 19 deletions
38
server/src/types/data.d.ts
vendored
38
server/src/types/data.d.ts
vendored
|
|
@ -1,7 +1,7 @@
|
||||||
interface response {
|
interface response {
|
||||||
status: number;
|
status: number;
|
||||||
source?: String;
|
source?: string;
|
||||||
message?: String;
|
message?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
type team = 1 | 2;
|
type team = 1 | 2;
|
||||||
|
|
@ -10,11 +10,11 @@ type answer = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
|
||||||
|
|
||||||
|
|
||||||
interface CreateGame {
|
interface CreateGame {
|
||||||
name: String;
|
name: string;
|
||||||
}
|
}
|
||||||
interface GameCreated extends response {
|
interface GameCreated extends response {
|
||||||
game_code?: String;
|
game_code?: string;
|
||||||
id?: String;
|
id?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -22,17 +22,17 @@ interface GetPastQuestions {
|
||||||
team: team;
|
team: team;
|
||||||
}
|
}
|
||||||
interface PastQuestions extends response {
|
interface PastQuestions extends response {
|
||||||
questions?: String[];
|
questions?: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
interface JoinGame {
|
interface JoinGame {
|
||||||
game_code: String;
|
game_code: string;
|
||||||
name: String;
|
name: string;
|
||||||
id?: String;
|
id?: string;
|
||||||
}
|
}
|
||||||
interface GameJoined extends response {
|
interface GameJoined extends response {
|
||||||
id?: String;
|
id?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -40,49 +40,49 @@ interface NewHand {
|
||||||
team: team;
|
team: team;
|
||||||
}
|
}
|
||||||
interface SendCard {
|
interface SendCard {
|
||||||
text: String;
|
text: string;
|
||||||
from: role;
|
from: role;
|
||||||
team: team;
|
team: team;
|
||||||
}
|
}
|
||||||
interface UpdateHand extends response{
|
interface UpdateHand extends response{
|
||||||
mode?: "append" | "replace";
|
mode?: "append" | "replace";
|
||||||
questions?: String[];
|
questions?: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
interface ObjectList {}
|
interface ObjectList {}
|
||||||
interface ObjectListResponse extends response {
|
interface ObjectListResponse extends response {
|
||||||
objects?: String[];
|
objects?: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
interface SelectObject {
|
interface SelectObject {
|
||||||
object: String;
|
object: string;
|
||||||
}
|
}
|
||||||
interface ChosenObject extends response {
|
interface ChosenObject extends response {
|
||||||
object?: String;
|
object?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
interface UpdateAnswer {
|
interface UpdateAnswer {
|
||||||
answer: answer;
|
answer: answer;
|
||||||
value: String;
|
value: string;
|
||||||
team: team;
|
team: team;
|
||||||
}
|
}
|
||||||
interface UpdateAnswerResponse extends response {
|
interface UpdateAnswerResponse extends response {
|
||||||
answer: answer;
|
answer: answer;
|
||||||
value: String;
|
value: string;
|
||||||
team: team;
|
team: team;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
interface UpdatePlayer {
|
interface UpdatePlayer {
|
||||||
name: String;
|
name: string;
|
||||||
team: team;
|
team: team;
|
||||||
role: role;
|
role: role;
|
||||||
}
|
}
|
||||||
interface UpdatePlayerResponse {
|
interface UpdatePlayerResponse {
|
||||||
name: String;
|
name: string;
|
||||||
team: team;
|
team: team;
|
||||||
role: role;
|
role: role;
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue