2023-09-15 17:10:57 -04:00
|
|
|
// Package apiresponse provides response types for API routes
|
|
|
|
package apiresponse
|
2023-09-15 18:13:48 -04:00
|
|
|
|
2023-10-02 14:08:03 -04:00
|
|
|
import (
|
|
|
|
"codeberg.org/vlbeaudoin/voki/response"
|
|
|
|
"git.agecem.com/agecem/bottin-ag/dbstruct"
|
|
|
|
)
|
2023-09-16 23:21:27 -04:00
|
|
|
|
2023-09-15 18:13:48 -04:00
|
|
|
// HealthGET is the response type for `GET /v:version/health/ http/1.1`
|
|
|
|
type HealthGET struct {
|
2023-09-18 18:44:20 -04:00
|
|
|
response.ResponseWithError
|
2023-09-15 18:13:48 -04:00
|
|
|
Data struct {
|
|
|
|
BottinStatus string
|
|
|
|
}
|
|
|
|
}
|
2023-09-16 15:05:13 -04:00
|
|
|
|
|
|
|
// ScanGET is the response type for `GET /v:version/scan/ http/1.1`
|
|
|
|
type ScanGET struct {
|
2023-09-18 18:44:20 -04:00
|
|
|
response.ResponseWithError
|
2023-09-16 15:05:13 -04:00
|
|
|
Data struct {
|
|
|
|
IsScanned bool
|
|
|
|
}
|
|
|
|
}
|
2023-09-16 15:07:36 -04:00
|
|
|
|
|
|
|
// ScanPOST is the response type for `POST /v:version/scan/ http/1.1`
|
|
|
|
type ScanPOST struct {
|
2023-09-18 18:44:20 -04:00
|
|
|
response.ResponseWithError
|
2023-09-16 15:07:36 -04:00
|
|
|
}
|
2023-09-19 18:25:12 -04:00
|
|
|
|
|
|
|
// DecompteGET is the response type for `GET /v:version/decompte/ http/1.1`
|
|
|
|
type DecompteGET struct {
|
|
|
|
response.ResponseWithError
|
|
|
|
Data struct {
|
|
|
|
Decompte int
|
|
|
|
}
|
|
|
|
}
|
2023-10-02 14:08:03 -04:00
|
|
|
|
|
|
|
// PresencesGET is the response type for `GET /v:version/presences/ http/1.1`
|
|
|
|
type PresencesGET struct {
|
|
|
|
response.ResponseWithError
|
|
|
|
Data struct {
|
|
|
|
Presences []dbstruct.Presence
|
|
|
|
}
|
|
|
|
}
|