feat: podpora simulace objednávek z Bolt Food ve vývoji

This commit is contained in:
2026-06-12 19:44:20 +02:00
parent bcec015c37
commit 34f6ba520e
13 changed files with 662 additions and 4 deletions
+8
View File
@@ -118,6 +118,14 @@ paths:
$ref: "./paths/dev/generate.yml"
/dev/clear:
$ref: "./paths/dev/clear.yml"
/dev/bolt/simulate:
$ref: "./paths/dev/boltSimulate.yml"
/dev/bolt/advance:
$ref: "./paths/dev/boltAdvance.yml"
/dev/bolt/state:
$ref: "./paths/dev/boltState.yml"
/dev/bolt/poll:
$ref: "./paths/dev/boltPoll.yml"
components:
schemas:
+20
View File
@@ -0,0 +1,20 @@
post:
operationId: advanceBoltTracking
summary: Posun simulace sledování Bolt na další krok (pouze DEV režim)
requestBody:
required: true
content:
application/json:
schema:
$ref: "../../schemas/_index.yml#/BoltSimGroupRequest"
responses:
"200":
description: Simulace byla posunuta
content:
application/json:
schema:
$ref: "../../schemas/_index.yml#/BoltSimResponse"
"400":
description: Chybný požadavek
"403":
description: Endpoint není dostupný v tomto režimu
+15
View File
@@ -0,0 +1,15 @@
post:
operationId: pollBoltTracking
summary: Okamžité spuštění jednoho tiku scheduleru sledování Bolt (pouze DEV režim)
responses:
"200":
description: Poll proběhl
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
"403":
description: Endpoint není dostupný v tomto režimu
+40
View File
@@ -0,0 +1,40 @@
post:
operationId: simulateBoltTracking
summary: Spuštění simulace sledování Bolt pro skupinu (pouze DEV režim)
requestBody:
required: true
content:
application/json:
schema:
$ref: "../../schemas/_index.yml#/BoltSimGroupRequest"
responses:
"200":
description: Simulace byla spuštěna
content:
application/json:
schema:
$ref: "../../schemas/_index.yml#/BoltSimResponse"
"400":
description: Chybný požadavek
"403":
description: Endpoint není dostupný v tomto režimu
delete:
operationId: stopBoltTrackingSimulation
summary: Ukončení simulace sledování Bolt pro skupinu (pouze DEV režim)
requestBody:
required: true
content:
application/json:
schema:
$ref: "../../schemas/_index.yml#/BoltSimGroupRequest"
responses:
"200":
description: Simulace byla ukončena
content:
application/json:
schema:
$ref: "../../schemas/_index.yml#/BoltSimResponse"
"400":
description: Chybný požadavek
"403":
description: Endpoint není dostupný v tomto režimu
+20
View File
@@ -0,0 +1,20 @@
post:
operationId: setBoltTrackingState
summary: Ruční nastavení konkrétního stavu simulace Bolt (pouze DEV režim)
requestBody:
required: true
content:
application/json:
schema:
$ref: "../../schemas/_index.yml#/BoltSimStateRequest"
responses:
"200":
description: Stav byl nastaven
content:
application/json:
schema:
$ref: "../../schemas/_index.yml#/BoltSimResponse"
"400":
description: Chybný požadavek
"403":
description: Endpoint není dostupný v tomto režimu
+80
View File
@@ -707,6 +707,86 @@ ClearMockDataRequest:
description: Index dne v týdnu (0 = pondělí, 4 = pátek). Pokud není zadán, použije se aktuální den.
$ref: "#/DayIndex"
# --- DEV SIMULACE BOLT ---
BoltSimGroupRequest:
description: Request s identifikátorem skupiny pro DEV simulaci Bolt (pouze DEV režim)
type: object
additionalProperties: false
required:
- groupId
properties:
groupId:
description: ID skupiny, jejíž sledování Bolt se má simulovat
type: string
BoltSimStateRequest:
description: Request pro ruční nastavení konkrétního stavu simulace Bolt (pouze DEV režim)
type: object
additionalProperties: false
required:
- groupId
- order_state
properties:
groupId:
description: ID skupiny
type: string
order_state:
description: Stav objednávky (např. accepted, preparing, waiting_delivery, in_delivery, delivered, cancelled)
type: string
courier_state:
description: Stav kurýra (např. arrived_to_provider, heading_to_client)
type: string
etaSeconds:
description: Očekávaný čas do doručení v sekundách
type: integer
minimum: 0
BoltSimStep:
description: Aktuální krok simulace Bolt
type: object
additionalProperties: false
required:
- order_state
properties:
order_state:
type: string
courier_state:
type: string
etaSeconds:
type: integer
BoltSimStatus:
description: Stav simulace sledování Bolt pro skupinu
type: object
additionalProperties: false
required:
- token
- index
- total
- current
properties:
token:
description: Vygenerovaný sledovací token
type: string
index:
description: Index aktuálního kroku v sekvenci
type: integer
total:
description: Celkový počet kroků v sekvenci
type: integer
current:
$ref: "#/BoltSimStep"
BoltSimResponse:
description: Odpověď DEV endpointů simulace Bolt
type: object
additionalProperties: false
required:
- success
properties:
success:
type: boolean
token:
type: string
simulation:
$ref: "#/BoltSimStatus"
# --- SKUPINOVÉ OBJEDNÁVKY ---
Store:
description: Povolený obchod/restaurace pro extra objednávky.