fix: přidání nových typů do OpenAPI spec pro přežití regenerace
All checks were successful
ci/woodpecker/push/workflow Pipeline was successful
All checks were successful
ci/woodpecker/push/workflow Pipeline was successful
Typy PendingQr, NotificationSettings a nové endpointy (dismissQr, notifications/settings) byly přidány přímo do YAML specifikace místo ručních úprav generovaných souborů.
This commit was merged in pull request #46.
This commit is contained in:
@@ -50,6 +50,12 @@ paths:
|
|||||||
$ref: "./paths/pizzaDay/updatePizzaDayNote.yml"
|
$ref: "./paths/pizzaDay/updatePizzaDayNote.yml"
|
||||||
/pizzaDay/updatePizzaFee:
|
/pizzaDay/updatePizzaFee:
|
||||||
$ref: "./paths/pizzaDay/updatePizzaFee.yml"
|
$ref: "./paths/pizzaDay/updatePizzaFee.yml"
|
||||||
|
/pizzaDay/dismissQr:
|
||||||
|
$ref: "./paths/pizzaDay/dismissQr.yml"
|
||||||
|
|
||||||
|
# Notifikace (/api/notifications)
|
||||||
|
/notifications/settings:
|
||||||
|
$ref: "./paths/notifications/settings.yml"
|
||||||
|
|
||||||
# Easter eggy (/api/easterEggs)
|
# Easter eggy (/api/easterEggs)
|
||||||
/easterEggs:
|
/easterEggs:
|
||||||
|
|||||||
26
types/paths/notifications/settings.yml
Normal file
26
types/paths/notifications/settings.yml
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
get:
|
||||||
|
operationId: getNotificationSettings
|
||||||
|
summary: Vrátí nastavení notifikací pro přihlášeného uživatele.
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Nastavení notifikací
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "../../schemas/_index.yml#/NotificationSettings"
|
||||||
|
post:
|
||||||
|
operationId: updateNotificationSettings
|
||||||
|
summary: Uloží nastavení notifikací pro přihlášeného uživatele.
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "../../schemas/_index.yml#/NotificationSettings"
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Nastavení notifikací bylo uloženo.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "../../schemas/_index.yml#/NotificationSettings"
|
||||||
17
types/paths/pizzaDay/dismissQr.yml
Normal file
17
types/paths/pizzaDay/dismissQr.yml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
post:
|
||||||
|
operationId: dismissQr
|
||||||
|
summary: Označí QR kód pro daný den jako uhrazený (odstraní ho ze seznamu nevyřízených).
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
date:
|
||||||
|
description: Datum Pizza day, ke kterému se QR kód vztahuje
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- date
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: QR kód byl označen jako uhrazený.
|
||||||
@@ -53,6 +53,11 @@ ClientData:
|
|||||||
description: Datum a čas poslední aktualizace pizz
|
description: Datum a čas poslední aktualizace pizz
|
||||||
type: string
|
type: string
|
||||||
format: date-time
|
format: date-time
|
||||||
|
pendingQrs:
|
||||||
|
description: Nevyřízené QR kódy pro platbu z předchozích pizza day
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: "#/PendingQr"
|
||||||
|
|
||||||
# --- OBĚDY ---
|
# --- OBĚDY ---
|
||||||
UserLunchChoice:
|
UserLunchChoice:
|
||||||
@@ -527,6 +532,24 @@ NotifikaceData:
|
|||||||
type: boolean
|
type: boolean
|
||||||
ntfy:
|
ntfy:
|
||||||
type: boolean
|
type: boolean
|
||||||
|
NotificationSettings:
|
||||||
|
description: Nastavení notifikací pro konkrétního uživatele
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
ntfyTopic:
|
||||||
|
description: Téma pro ntfy push notifikace
|
||||||
|
type: string
|
||||||
|
discordWebhookUrl:
|
||||||
|
description: URL webhooku Discord kanálu
|
||||||
|
type: string
|
||||||
|
teamsWebhookUrl:
|
||||||
|
description: URL webhooku MS Teams kanálu
|
||||||
|
type: string
|
||||||
|
enabledEvents:
|
||||||
|
description: Seznam událostí, o kterých chce být uživatel notifikován
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: "#/UdalostEnum"
|
||||||
GotifyServer:
|
GotifyServer:
|
||||||
type: object
|
type: object
|
||||||
required:
|
required:
|
||||||
@@ -539,3 +562,23 @@ GotifyServer:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
|
# --- NEVYŘÍZENÉ QR KÓDY ---
|
||||||
|
PendingQr:
|
||||||
|
description: Nevyřízený QR kód pro platbu z předchozího Pizza day
|
||||||
|
type: object
|
||||||
|
additionalProperties: false
|
||||||
|
required:
|
||||||
|
- date
|
||||||
|
- creator
|
||||||
|
- totalPrice
|
||||||
|
properties:
|
||||||
|
date:
|
||||||
|
description: Datum Pizza day, ke kterému se QR kód vztahuje
|
||||||
|
type: string
|
||||||
|
creator:
|
||||||
|
description: Jméno zakladatele Pizza day (objednávajícího)
|
||||||
|
type: string
|
||||||
|
totalPrice:
|
||||||
|
description: Celková cena objednávky v Kč
|
||||||
|
type: number
|
||||||
|
|||||||
Reference in New Issue
Block a user