Add unit tests for department lane dynamic image overrides and introduce classes for self-serve signal and virtual hardware management

- Add `DepartmentLaneDynamicImageRouteTest` to verify dynamic image preview handling for studio lanes.
- Introduce `selfserve_machine_signal` class to standardize signal normalization, recording, and gateway signal management workflows.
- Add `selfserve_virtual_hardware` class to handle virtual hardware configurations, including gateway and binding management.
- Enhance structure with auxiliary methods for payload normalization, workspace merging, and validation warnings.
This commit is contained in:
Jeppe Bundgaard
2026-04-29 09:52:51 +02:00
parent 690e114d38
commit eeccacb2a7
33 changed files with 4880 additions and 140 deletions
+94
View File
@@ -3857,6 +3857,13 @@ paths:
schema:
type: integer
minimum: 1
- name: dynamic_image_id
in: query
required: false
description: Dynamic image ID to preview instead of the lane's saved image
schema:
type: integer
minimum: 1
- name: buttons
in: query
required: false
@@ -7803,6 +7810,93 @@ paths:
'404':
$ref: '#/components/responses/NotFound'
/relay/machine/on/post:
get:
tags:
- Plate Scans
summary: Record Shelly machine ON signal webhook
description: Accepts Shelly Cloud webhook/query parameters for input.toggle_on or switch.on and records the physical machine start signal for self-serve billing.
operationId: recordShellyMachineOnSignal
parameters:
- name: token
in: query
required: false
schema: {type: string}
- name: lane_id
in: query
required: false
schema:
type: integer
- name: relay_id
in: query
required: false
schema:
type: string
- name: event
in: query
required: false
schema:
type: string
enum: [input.toggle_on, switch.on]
- name: reg
in: query
required: false
schema:
type: string
responses:
'201':
description: Machine ON signal recorded and linked to a self-serve wash session
content:
application/json:
schema:
$ref: '#/components/schemas/MachineButtonPressWebhookResponse'
'202':
description: Shelly signal was recognized but ignored
'400':
$ref: '#/components/responses/BadRequest'
post:
tags:
- Plate Scans
summary: Record Shelly machine ON signal webhook
description: Accepts Shelly Cloud JSON webhook payloads for input.toggle_on or switch.on and records the physical machine start signal for self-serve billing.
operationId: recordShellyMachineOnSignalPost
requestBody:
required: false
content:
application/json:
schema:
type: object
properties:
token:
type: string
lane_id:
type: integer
relay_id:
type: string
event:
type: string
enum: [input.toggle_on, switch.on]
component:
type: string
example: input:0
state:
type: boolean
output:
type: boolean
reg:
type: string
responses:
'201':
description: Machine ON signal recorded and linked to a self-serve wash session
content:
application/json:
schema:
$ref: '#/components/schemas/MachineButtonPressWebhookResponse'
'202':
description: Shelly signal was recognized but ignored
'400':
$ref: '#/components/responses/BadRequest'
# Module - e-conomic Endpoints
/economic/customers/import:
post: