feat: založení základní stránky příjem/výdej + import a statistiky

This commit is contained in:
Ondřej Anděl
2026-09-07 14:58:49 +02:00
commit a5711f3e1e
98 changed files with 15505 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
post:
operationId: addMeal
summary: Přidá jídlo do zvoleného dne.
requestBody:
required: true
content:
application/json:
schema:
$ref: "../../schemas/_index.yml#/MealInput"
responses:
"200":
description: Aktualizovaný přehled dne
content:
application/json:
schema:
$ref: "../../schemas/_index.yml#/DayRecord"
"400":
description: Neplatná data
"401":
description: Neautentizovaný uživatel
+22
View File
@@ -0,0 +1,22 @@
get:
operationId: getDay
summary: Vrátí jídla přihlášeného uživatele za jeden den.
parameters:
- in: query
name: date
required: false
schema:
type: string
format: date
description: Datum ve formátu YYYY-MM-DD. Výchozí je dnešek.
responses:
"200":
description: Přehled jídel daného dne
content:
application/json:
schema:
$ref: "../../schemas/_index.yml#/DayRecord"
"400":
description: Neplatné datum
"401":
description: Neautentizovaný uživatel
+31
View File
@@ -0,0 +1,31 @@
post:
operationId: deleteMeal
summary: Smaže záznam o jídle.
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [id, date]
properties:
id:
description: Identifikátor mazaného záznamu
type: string
date:
description: Datum záznamu (YYYY-MM-DD)
type: string
format: date
responses:
"200":
description: Aktualizovaný přehled dne
content:
application/json:
schema:
$ref: "../../schemas/_index.yml#/DayRecord"
"400":
description: Neplatná data
"401":
description: Neautentizovaný uživatel
"404":
description: Záznam neexistuje
+31
View File
@@ -0,0 +1,31 @@
get:
operationId: getRange
summary: Vrátí jídla přihlášeného uživatele za rozsah dnů.
parameters:
- in: query
name: from
required: true
schema:
type: string
format: date
description: První den rozsahu (včetně), YYYY-MM-DD
- in: query
name: to
required: true
schema:
type: string
format: date
description: Poslední den rozsahu (včetně), YYYY-MM-DD
responses:
"200":
description: Dny s alespoň jedním záznamem, vzestupně dle data
content:
application/json:
schema:
type: array
items:
$ref: "../../schemas/_index.yml#/DayRecord"
"400":
description: Neplatný rozsah
"401":
description: Neautentizovaný uživatel
+29
View File
@@ -0,0 +1,29 @@
post:
operationId: updateMeal
summary: Upraví existující záznam o jídle.
requestBody:
required: true
content:
application/json:
schema:
allOf:
- type: object
required: [id]
properties:
id:
description: Identifikátor upravovaného záznamu
type: string
- $ref: "../../schemas/_index.yml#/MealInput"
responses:
"200":
description: Aktualizovaný přehled dne
content:
application/json:
schema:
$ref: "../../schemas/_index.yml#/DayRecord"
"400":
description: Neplatná data
"401":
description: Neautentizovaný uživatel
"404":
description: Záznam neexistuje