Add edge gateway broker configurations and session management routes

- Add broker-related configuration classes (`broker_url`, `public_broker_url`, `auth_mode`, `shared_secret`) to support edge gateway functionality.
- Enhance `SelfserveRoute` with routes for managing self-serve wash sessions, including session listing, detail retrieval, and forced lane stop.
- Update unit tests to validate new configuration handling, session routes, and OpenAPI endpoint coverage.
- Include default environment variables for broker settings in `docker-compose.example.yml`.
This commit is contained in:
Jeppe Bundgaard
2026-04-28 10:04:17 +02:00
parent 2aded0812a
commit c73e459d26
37 changed files with 1960 additions and 67 deletions
+148
View File
@@ -8495,6 +8495,120 @@ paths:
'403':
$ref: '#/components/responses/Forbidden'
/modules/self-serve/sessions:
get:
tags:
- Modules
summary: List self-serve wash sessions
description: Retrieve paginated self-serve wash sessions with search, filters, ordering, and active/open-only support.
operationId: listSelfServeSessions
parameters:
- $ref: '#/components/parameters/PageParam'
- $ref: '#/components/parameters/LimitParam'
- $ref: '#/components/parameters/SearchParam'
- $ref: '#/components/parameters/FiltersParam'
- name: order
in: query
required: false
schema:
type: string
example: id:DESC
- name: open_only
in: query
required: false
schema:
type: boolean
responses:
'200':
description: Self-serve wash sessions retrieved successfully
content:
application/json:
schema:
type: array
items:
allOf:
- $ref: '#/components/schemas/SelfserveWashSession'
- type: object
properties:
elapsed_minutes:
type: integer
open:
type: boolean
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
/modules/self-serve/sessions/{id}:
get:
tags:
- Modules
summary: Get self-serve wash session detail
operationId: getSelfServeSessionDetail
parameters:
- name: id
in: path
required: true
schema:
type: integer
responses:
'200':
description: Self-serve wash session detail retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/SelfserveWashSummary'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/modules/self-serve/lane/force/stop:
post:
tags:
- Modules
summary: Force stop a self-serve wash session
description: |
Clears the current self-serve wash session and lane runtime with RESET behavior only.
This administrative action does not signal relays or gates. When billing is requested,
only elapsed-minute billing is attempted before runtime is cleared.
operationId: forceStopSelfServeLane
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- lane_id
- bill
properties:
lane_id:
type: integer
session_id:
type: integer
nullable: true
bill:
type: boolean
reason:
type: string
nullable: true
responses:
'200':
description: Self-serve wash force stopped successfully
content:
application/json:
schema:
$ref: '#/components/schemas/SelfserveForceStopResponse'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'409':
$ref: '#/components/responses/Conflict'
/modules/self-serve/lane/command:
post:
tags:
@@ -14833,6 +14947,14 @@ components:
type: string
status:
type: string
enum:
- PENDING_QUESTIONS
- READY_FOR_MACHINE_START
- MACHINE_NOT_ALLOWED
- MACHINE_RELAY_ENABLED
- MACHINE_STARTED
- COMPLETED
- FORCE_STOPPED
allowed:
type: boolean
machine_relay_enabled:
@@ -14911,6 +15033,12 @@ components:
type: integer
type:
type: string
enum:
- SESSION_SYNCED
- MACHINE_RELAY_ENABLED
- MACHINE_START_TRIGGERED
- SESSION_COMPLETED
- SESSION_FORCE_STOPPED
payload:
type: object
additionalProperties: true
@@ -14989,6 +15117,26 @@ components:
items:
$ref: '#/components/schemas/SelfserveWashEvent'
SelfserveForceStopResponse:
type: object
properties:
lane_id:
type: integer
forced:
type: boolean
bill:
type: boolean
order_id:
type: integer
nullable: true
session:
allOf:
- $ref: '#/components/schemas/SelfserveWashSummary'
nullable: true
runtime_before_reset:
type: object
additionalProperties: true
DepartmentSelfserveVehicleConditionMutationResponse:
type: object
properties: