2023-11-01 23:21:12 +03:00
|
|
|
// Package api provides primitives to interact with the openapi HTTP API.
|
|
|
|
//
|
|
|
|
// Code generated by github.com/deepmap/oapi-codegen/v2 version v2.0.0 DO NOT EDIT.
|
|
|
|
package api
|
|
|
|
|
2024-01-06 08:44:26 +03:00
|
|
|
import (
|
|
|
|
openapi_types "github.com/oapi-codegen/runtime/types"
|
|
|
|
)
|
|
|
|
|
2023-11-01 23:21:12 +03:00
|
|
|
const (
|
|
|
|
CookieAuthScopes = "cookieAuth.Scopes"
|
|
|
|
)
|
|
|
|
|
2024-01-05 03:50:33 +03:00
|
|
|
// Defines values for GameType.
|
2023-11-12 23:22:58 +03:00
|
|
|
const (
|
2024-01-05 03:50:33 +03:00
|
|
|
City GameType = "city"
|
|
|
|
Virtual GameType = "virtual"
|
2023-11-12 23:22:58 +03:00
|
|
|
)
|
|
|
|
|
2024-01-06 08:44:26 +03:00
|
|
|
// Defines values for TaskViewMessage.
|
|
|
|
const (
|
|
|
|
GameComplete TaskViewMessage = "game_complete"
|
|
|
|
InvalidCode TaskViewMessage = "invalid_code"
|
|
|
|
NextLevel TaskViewMessage = "next_level"
|
|
|
|
OkCode TaskViewMessage = "ok_code"
|
|
|
|
OldCode TaskViewMessage = "old_code"
|
|
|
|
)
|
|
|
|
|
2024-01-21 02:20:59 +03:00
|
|
|
// Defines values for UserViewRole.
|
|
|
|
const (
|
|
|
|
Admin UserViewRole = "admin"
|
|
|
|
Creator UserViewRole = "creator"
|
|
|
|
User UserViewRole = "user"
|
|
|
|
)
|
|
|
|
|
2024-01-05 03:50:33 +03:00
|
|
|
// CodeEdit defines model for codeEdit.
|
|
|
|
type CodeEdit struct {
|
2024-01-25 01:45:09 +03:00
|
|
|
Code string `json:"code"`
|
|
|
|
Description string `json:"description"`
|
|
|
|
Id *openapi_types.UUID `json:"id,omitempty"`
|
2024-01-05 03:50:33 +03:00
|
|
|
}
|
2023-11-01 23:21:12 +03:00
|
|
|
|
2024-01-05 03:50:33 +03:00
|
|
|
// CodeView defines model for codeView.
|
|
|
|
type CodeView struct {
|
|
|
|
Code *string `json:"code,omitempty"`
|
|
|
|
Description string `json:"description"`
|
2023-11-19 22:54:54 +03:00
|
|
|
}
|
|
|
|
|
2024-01-05 03:50:33 +03:00
|
|
|
// GameEdit defines model for gameEdit.
|
|
|
|
type GameEdit struct {
|
2024-01-25 01:45:09 +03:00
|
|
|
Description string `json:"description"`
|
|
|
|
Icon openapi_types.UUID `json:"icon"`
|
|
|
|
Id *openapi_types.UUID `json:"id,omitempty"`
|
|
|
|
Points int `json:"points"`
|
|
|
|
Tasks []TaskEdit `json:"tasks"`
|
|
|
|
Title string `json:"title"`
|
|
|
|
Type GameType `json:"type"`
|
|
|
|
Visible bool `json:"visible"`
|
2023-11-01 23:21:12 +03:00
|
|
|
}
|
|
|
|
|
2024-01-05 03:50:33 +03:00
|
|
|
// GameType defines model for gameType.
|
|
|
|
type GameType string
|
2023-11-01 23:21:12 +03:00
|
|
|
|
2024-01-05 03:50:33 +03:00
|
|
|
// GameView defines model for gameView.
|
|
|
|
type GameView struct {
|
2024-01-06 08:44:26 +03:00
|
|
|
Authors []UserView `json:"authors"`
|
|
|
|
CreatedAt string `json:"createdAt"`
|
|
|
|
Description string `json:"description"`
|
2024-01-20 21:37:49 +03:00
|
|
|
Icon openapi_types.UUID `json:"icon"`
|
2024-01-06 08:44:26 +03:00
|
|
|
Id openapi_types.UUID `json:"id"`
|
|
|
|
Points int `json:"points"`
|
|
|
|
TaskCount int `json:"taskCount"`
|
|
|
|
Title string `json:"title"`
|
|
|
|
Type GameType `json:"type"`
|
2023-11-01 23:21:12 +03:00
|
|
|
}
|
|
|
|
|
2024-01-05 03:50:33 +03:00
|
|
|
// TaskEdit defines model for taskEdit.
|
|
|
|
type TaskEdit struct {
|
2024-01-25 01:45:09 +03:00
|
|
|
Codes []CodeEdit `json:"codes"`
|
|
|
|
Id *openapi_types.UUID `json:"id,omitempty"`
|
|
|
|
Text string `json:"text"`
|
|
|
|
Title string `json:"title"`
|
2024-01-05 03:50:33 +03:00
|
|
|
}
|
2023-11-01 23:21:12 +03:00
|
|
|
|
2024-01-05 03:50:33 +03:00
|
|
|
// TaskView defines model for taskView.
|
|
|
|
type TaskView struct {
|
2024-01-24 23:15:19 +03:00
|
|
|
Codes []CodeView `json:"codes"`
|
|
|
|
Message *TaskViewMessage `json:"message,omitempty"`
|
|
|
|
Text string `json:"text"`
|
|
|
|
Title string `json:"title"`
|
2024-01-06 08:44:26 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
// TaskViewMessage defines model for TaskView.Message.
|
|
|
|
type TaskViewMessage string
|
|
|
|
|
|
|
|
// UserView defines model for userView.
|
|
|
|
type UserView struct {
|
2024-01-21 02:20:59 +03:00
|
|
|
Email string `json:"email"`
|
|
|
|
ExpToCurrentLevel int `json:"expToCurrentLevel"`
|
|
|
|
ExpToNextLevel int `json:"expToNextLevel"`
|
|
|
|
Experience int `json:"experience"`
|
|
|
|
Games []GameView `json:"games"`
|
|
|
|
Id openapi_types.UUID `json:"id"`
|
|
|
|
Level int `json:"level"`
|
|
|
|
Role UserViewRole `json:"role"`
|
|
|
|
Username string `json:"username"`
|
2023-11-01 23:21:12 +03:00
|
|
|
}
|
|
|
|
|
2024-01-21 02:20:59 +03:00
|
|
|
// UserViewRole defines model for UserView.Role.
|
|
|
|
type UserViewRole string
|
|
|
|
|
2023-11-01 23:21:12 +03:00
|
|
|
// ErrorResponse defines model for errorResponse.
|
|
|
|
type ErrorResponse struct {
|
|
|
|
Code int `json:"code"`
|
|
|
|
Message string `json:"message"`
|
|
|
|
}
|
|
|
|
|
2024-01-25 01:45:09 +03:00
|
|
|
// GameAdminResponse defines model for gameAdminResponse.
|
|
|
|
type GameAdminResponse = GameEdit
|
|
|
|
|
2023-11-02 01:21:13 +03:00
|
|
|
// GameListResponse defines model for gameListResponse.
|
|
|
|
type GameListResponse = []GameView
|
|
|
|
|
2024-01-05 03:50:33 +03:00
|
|
|
// TaskResponse defines model for taskResponse.
|
|
|
|
type TaskResponse = TaskView
|
2023-11-01 23:21:12 +03:00
|
|
|
|
2024-01-20 21:37:49 +03:00
|
|
|
// UploadResponse defines model for uploadResponse.
|
|
|
|
type UploadResponse struct {
|
|
|
|
Uuid openapi_types.UUID `json:"uuid"`
|
|
|
|
}
|
|
|
|
|
2023-11-01 23:21:12 +03:00
|
|
|
// UserResponse defines model for userResponse.
|
2024-01-21 02:20:59 +03:00
|
|
|
type UserResponse = UserView
|
2023-11-01 23:21:12 +03:00
|
|
|
|
2024-01-28 22:19:41 +03:00
|
|
|
// AdminUploadFileMultipartBody defines parameters for AdminUploadFile.
|
|
|
|
type AdminUploadFileMultipartBody interface{}
|
2023-11-01 23:21:12 +03:00
|
|
|
|
2024-01-05 03:50:33 +03:00
|
|
|
// EnterCodeJSONBody defines parameters for EnterCode.
|
|
|
|
type EnterCodeJSONBody struct {
|
|
|
|
Code string `json:"code"`
|
2023-11-12 23:22:58 +03:00
|
|
|
}
|
2023-11-01 23:21:12 +03:00
|
|
|
|
|
|
|
// PostUserLoginJSONBody defines parameters for PostUserLogin.
|
|
|
|
type PostUserLoginJSONBody struct {
|
|
|
|
Email string `json:"email"`
|
|
|
|
Password string `json:"password"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// PostUserRegisterJSONBody defines parameters for PostUserRegister.
|
|
|
|
type PostUserRegisterJSONBody struct {
|
|
|
|
Email string `json:"email"`
|
|
|
|
Password string `json:"password"`
|
|
|
|
Password2 string `json:"password2"`
|
|
|
|
Username string `json:"username"`
|
|
|
|
}
|
|
|
|
|
2024-01-28 22:19:41 +03:00
|
|
|
// AdminUploadFileMultipartRequestBody defines body for AdminUploadFile for multipart/form-data ContentType.
|
|
|
|
type AdminUploadFileMultipartRequestBody AdminUploadFileMultipartBody
|
2023-11-01 23:21:12 +03:00
|
|
|
|
2024-01-28 22:19:41 +03:00
|
|
|
// AdminEditGameJSONRequestBody defines body for AdminEditGame for application/json ContentType.
|
|
|
|
type AdminEditGameJSONRequestBody = GameEdit
|
2024-01-24 23:15:19 +03:00
|
|
|
|
2024-01-25 01:45:09 +03:00
|
|
|
// EnterCodeJSONRequestBody defines body for EnterCode for application/json ContentType.
|
|
|
|
type EnterCodeJSONRequestBody EnterCodeJSONBody
|
|
|
|
|
2023-11-01 23:21:12 +03:00
|
|
|
// PostUserLoginJSONRequestBody defines body for PostUserLogin for application/json ContentType.
|
|
|
|
type PostUserLoginJSONRequestBody PostUserLoginJSONBody
|
|
|
|
|
|
|
|
// PostUserRegisterJSONRequestBody defines body for PostUserRegister for application/json ContentType.
|
|
|
|
type PostUserRegisterJSONRequestBody PostUserRegisterJSONBody
|