diff --git a/openapi.yaml b/openapi.yaml index 5107c46d..8adcc9da 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -3940,6 +3940,10 @@ paths: responses: '200': description: Lane status retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/SelfServeLaneStatus' /modules/self-serve/lane/command: post: @@ -3962,10 +3966,17 @@ paths: type: integer command: type: string - enum: [start, stop, reset] + enum: [START, STOP, RESET, RESERVE, RELEASE] + license_plate: + type: string + description: Required for START command responses: '200': description: Command sent successfully + content: + application/json: + schema: + $ref: '#/components/schemas/SelfServeLaneStatus' # Module - Other Integration Endpoints /modules/motorapi/lookup: @@ -4515,13 +4526,29 @@ paths: summary: Get Self-Serve config operationId: getSelfServeConfig responses: - '200': {description: Success} + '200': + description: Self-serve configuration retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/SelfServeConfig' post: tags: [Config] summary: Update Self-Serve config operationId: updateSelfServeConfig + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SelfServeConfig' responses: - '200': {description: Success} + '200': + description: Self-serve configuration updated successfully + content: + application/json: + schema: + $ref: '#/components/schemas/SelfServeConfig' /branding: get: @@ -5153,6 +5180,48 @@ components: type: string format: date-time + SelfServeLaneStatus: + type: object + properties: + id: + type: integer + description: Lane ID + status: + type: string + description: Current lane status (e.g., IDLE, OCCUPIED) + mode: + type: string + description: Current lane mode (e.g., AUTOMATIC, MANUAL) + state: + type: string + description: Current lane state (e.g., READY, WASHING) + wash_start_time: + type: integer + description: Timestamp when the wash started (0 if not washing) + nullable: true + elapsed_wash_time: + type: integer + description: Elapsed wash time in seconds + nullable: true + license_plate: + type: string + description: License plate of the vehicle in the lane + nullable: true + customer_number: + type: integer + description: Customer number associated with the current lane use + nullable: true + + SelfServeConfig: + type: object + properties: + enabled: + type: boolean + description: Whether the self-serve module is enabled + minute_product: + type: integer + description: The product ID used for minute-based billing + DepartmentSelfserveQuestion: type: object properties: diff --git a/services/nginx/app/routes/moduleSelfServeRoute.php b/services/nginx/app/routes/moduleSelfServeRoute.php index ad31569a..6174b79a 100644 --- a/services/nginx/app/routes/moduleSelfServeRoute.php +++ b/services/nginx/app/routes/moduleSelfServeRoute.php @@ -31,7 +31,8 @@ class moduleSelfServeRoute global $response; self::requirePermission('modules_selfserve_lane_status_view'); $selfserve = new selfserve(); - $lane = $selfserve->lane(1); + $lane_id = self::isParametersSet(['lane_id']) ? (int)self::getParameter('lane_id') : 1; + $lane = $selfserve->lane($lane_id); $response->success([ 'id' => $lane->id, 'status' => $lane->getLaneStatus()->name,