feat: NCS-37 Quarkus integration (#35)
Reviewed-on: #35 Reviewed-by: Leon Hermann <lq@blackhole.local>
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
package de.nowchess.api.dto
|
||||
|
||||
final case class ApiErrorDto(code: String, message: String, field: Option[String])
|
||||
@@ -0,0 +1,6 @@
|
||||
package de.nowchess.api.dto
|
||||
|
||||
final case class CreateGameRequestDto(
|
||||
white: Option[PlayerInfoDto],
|
||||
black: Option[PlayerInfoDto],
|
||||
)
|
||||
@@ -0,0 +1,6 @@
|
||||
package de.nowchess.api.dto
|
||||
|
||||
final case class ErrorEventDto(`type`: String, error: ApiErrorDto)
|
||||
|
||||
object ErrorEventDto:
|
||||
def apply(error: ApiErrorDto): ErrorEventDto = ErrorEventDto("error", error)
|
||||
@@ -0,0 +1,8 @@
|
||||
package de.nowchess.api.dto
|
||||
|
||||
final case class GameFullDto(
|
||||
gameId: String,
|
||||
white: PlayerInfoDto,
|
||||
black: PlayerInfoDto,
|
||||
state: GameStateDto,
|
||||
)
|
||||
@@ -0,0 +1,6 @@
|
||||
package de.nowchess.api.dto
|
||||
|
||||
final case class GameFullEventDto(`type`: String, game: GameFullDto)
|
||||
|
||||
object GameFullEventDto:
|
||||
def apply(game: GameFullDto): GameFullEventDto = GameFullEventDto("gameFull", game)
|
||||
@@ -0,0 +1,12 @@
|
||||
package de.nowchess.api.dto
|
||||
|
||||
final case class GameStateDto(
|
||||
fen: String,
|
||||
pgn: String,
|
||||
turn: String,
|
||||
status: String,
|
||||
winner: Option[String],
|
||||
moves: List[String],
|
||||
undoAvailable: Boolean,
|
||||
redoAvailable: Boolean,
|
||||
)
|
||||
@@ -0,0 +1,6 @@
|
||||
package de.nowchess.api.dto
|
||||
|
||||
final case class GameStateEventDto(`type`: String, state: GameStateDto)
|
||||
|
||||
object GameStateEventDto:
|
||||
def apply(state: GameStateDto): GameStateEventDto = GameStateEventDto("gameState", state)
|
||||
@@ -0,0 +1,7 @@
|
||||
package de.nowchess.api.dto
|
||||
|
||||
final case class ImportFenRequestDto(
|
||||
fen: String,
|
||||
white: Option[PlayerInfoDto],
|
||||
black: Option[PlayerInfoDto],
|
||||
)
|
||||
@@ -0,0 +1,3 @@
|
||||
package de.nowchess.api.dto
|
||||
|
||||
final case class ImportPgnRequestDto(pgn: String)
|
||||
@@ -0,0 +1,9 @@
|
||||
package de.nowchess.api.dto
|
||||
|
||||
final case class LegalMoveDto(
|
||||
from: String,
|
||||
to: String,
|
||||
uci: String,
|
||||
moveType: String,
|
||||
promotion: Option[String],
|
||||
)
|
||||
@@ -0,0 +1,3 @@
|
||||
package de.nowchess.api.dto
|
||||
|
||||
final case class LegalMovesResponseDto(moves: List[LegalMoveDto])
|
||||
@@ -0,0 +1,3 @@
|
||||
package de.nowchess.api.dto
|
||||
|
||||
final case class OkResponseDto(ok: Boolean = true)
|
||||
@@ -0,0 +1,3 @@
|
||||
package de.nowchess.api.dto
|
||||
|
||||
final case class PlayerInfoDto(id: String, displayName: String)
|
||||
Reference in New Issue
Block a user