Introduce self-serve module with lane management functionality
- Added `selfserve_lane` class to handle self-serve lane operations. - Implemented commands (START, STOP, RESET) and states (IDLE, IN_WASH, FAULT, etc.) for lane lifecycle. - Introduced traits for managing lane status, mode, state, caching, and port control. - Added enums for cohesive type definitions (`selfserve_lane_command`, `selfserve_lane_status`, `selfserve_lane_state`, etc.). - Configured `/modules/self-serve/lane/status` route to expose lane state and status via API. - Linked self-serve configuration via `selfserve_c` and `selfserve_enabled_c` for module toggling. - Integrated lane caching logic with Redis for performance improvements. - Updated `index.php` to include the self-serve module.
This commit is contained in:
@@ -0,0 +1,213 @@
|
||||
### POST request to /account/auth/phone
|
||||
POST https://api.truckwash.dk:4433/account/auth/phone
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"phone": 42331128,
|
||||
"country_code": 45
|
||||
}
|
||||
|
||||
### GET request to order bookings (list all)
|
||||
GET https://api.truckwash.dk:4433/order-bookings
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer e9d4359673de64f6a9bc4231bf50ac9f5726ad5b3ee6fcad5f8ebbb20647c3b8
|
||||
|
||||
### GET request to order bookings (specific ID)
|
||||
GET https://api.truckwash.dk:4433/order-bookings?id=1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer e9d4359673de64f6a9bc4231bf50ac9f5726ad5b3ee6fcad5f8ebbb20647c3b8
|
||||
|
||||
### PUT request to order bookings (update specific ID)
|
||||
PUT https://api.truckwash.dk:4433/order-bookings
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer e9d4359673de64f6a9bc4231bf50ac9f5726ad5b3ee6fcad5f8ebbb20647c3b8
|
||||
|
||||
{
|
||||
"id": 4,
|
||||
"note": "Updated note 3",
|
||||
"reference": "Updated ref 3",
|
||||
"reg_2": null
|
||||
}
|
||||
|
||||
### POST request to complete an order booking
|
||||
POST https://api.truckwash.dk:4433/order-bookings/complete
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer e9d4359673de64f6a9bc4231bf50ac9f5726ad5b3ee6fcad5f8ebbb20647c3b8
|
||||
|
||||
{
|
||||
"id": 3,
|
||||
"safety_seal": 123456
|
||||
}
|
||||
|
||||
###
|
||||
### POST request to order bookings
|
||||
POST https://api.truckwash.dk:4433/order-bookings
|
||||
Accept: application/json, text/plain, */*
|
||||
Accept-Language: en-GB,en;q=0.6
|
||||
Authorization: Bearer e9d4359673de64f6a9bc4231bf50ac9f5726ad5b3ee6fcad5f8ebbb20647c3b8
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"customer_number": 12345679,
|
||||
"department": 2,
|
||||
"reg_1": "EC21233",
|
||||
"reg_2": null,
|
||||
"reg_3": "Abc",
|
||||
"datetime": "2025-11-11",
|
||||
"note": "Note 123",
|
||||
"reference": "Reference 123",
|
||||
"po": "PO 123",
|
||||
"pickup": true,
|
||||
"items": [
|
||||
{
|
||||
"id": 5,
|
||||
"name": "Forvogn",
|
||||
"description": " ",
|
||||
"price": 649,
|
||||
"subscription_allowed": true,
|
||||
"category": 6,
|
||||
"piktogram": "05",
|
||||
"economic_product_id": 5,
|
||||
"apply_category_discount": true,
|
||||
"requires_note": false,
|
||||
"created_at": "2024-12-09 14:31:48",
|
||||
"updated_at": "2025-10-28 13:25:21",
|
||||
"addons": [],
|
||||
"is_wash": true,
|
||||
"display_in_booking_form": true,
|
||||
"order_priority": 10,
|
||||
"quantity": 1
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"name": "Indvendig vask Forvogn",
|
||||
"description": " ",
|
||||
"price": 399,
|
||||
"subscription_allowed": 0,
|
||||
"category": "2",
|
||||
"piktogram": "",
|
||||
"economic_product_id": "11",
|
||||
"apply_category_discount": true,
|
||||
"requires_note": false,
|
||||
"is_wash": true,
|
||||
"display_in_booking_form": true,
|
||||
"order_priority": 1022,
|
||||
"created_at": "2024-12-09 14:31:49",
|
||||
"updated_at": "2025-10-28 13:56:30",
|
||||
"quantity": 1
|
||||
},
|
||||
{
|
||||
"id": 21,
|
||||
"name": "Undervognskyld pr. Enhed",
|
||||
"description": " ",
|
||||
"price": 79,
|
||||
"subscription_allowed": 1,
|
||||
"category": "4",
|
||||
"piktogram": "",
|
||||
"economic_product_id": "23",
|
||||
"apply_category_discount": false,
|
||||
"requires_note": false,
|
||||
"is_wash": false,
|
||||
"display_in_booking_form": true,
|
||||
"order_priority": 1018,
|
||||
"created_at": "2024-12-09 14:31:49",
|
||||
"updated_at": "2025-10-28 13:54:41",
|
||||
"quantity": 1
|
||||
},
|
||||
{
|
||||
"id": 25,
|
||||
"name": "Fælg Flex pr. Enhed",
|
||||
"description": " ",
|
||||
"price": 39,
|
||||
"subscription_allowed": 0,
|
||||
"category": "4",
|
||||
"piktogram": "",
|
||||
"economic_product_id": "40",
|
||||
"apply_category_discount": false,
|
||||
"requires_note": false,
|
||||
"is_wash": false,
|
||||
"display_in_booking_form": true,
|
||||
"order_priority": 1019,
|
||||
"created_at": "2024-12-09 14:31:50",
|
||||
"updated_at": "2025-10-28 13:55:00",
|
||||
"quantity": 2
|
||||
},
|
||||
{
|
||||
"id": 24,
|
||||
"name": "Spot Free- Lastbil",
|
||||
"description": " ",
|
||||
"price": 39,
|
||||
"subscription_allowed": 1,
|
||||
"category": "4",
|
||||
"piktogram": "",
|
||||
"economic_product_id": "33",
|
||||
"apply_category_discount": false,
|
||||
"requires_note": false,
|
||||
"is_wash": false,
|
||||
"display_in_booking_form": true,
|
||||
"order_priority": 1017,
|
||||
"created_at": "2024-12-09 14:31:49",
|
||||
"updated_at": "2025-10-28 13:54:25",
|
||||
"quantity": 3
|
||||
},
|
||||
{
|
||||
"id": 22,
|
||||
"name": "Double Duty - Kemi",
|
||||
"description": " ",
|
||||
"price": 239,
|
||||
"subscription_allowed": 0,
|
||||
"category": "4",
|
||||
"piktogram": "",
|
||||
"economic_product_id": "24",
|
||||
"apply_category_discount": false,
|
||||
"requires_note": true,
|
||||
"is_wash": false,
|
||||
"display_in_booking_form": true,
|
||||
"order_priority": 1021,
|
||||
"created_at": "2024-12-09 14:31:49",
|
||||
"updated_at": "2025-10-28 13:55:58",
|
||||
"quantity": 4
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "Trailer",
|
||||
"description": "",
|
||||
"price": 599,
|
||||
"subscription_allowed": 1,
|
||||
"category": "6",
|
||||
"piktogram": "02",
|
||||
"economic_product_id": "2",
|
||||
"apply_category_discount": true,
|
||||
"requires_note": false,
|
||||
"is_wash": true,
|
||||
"display_in_booking_form": true,
|
||||
"order_priority": 50,
|
||||
"created_at": "2024-12-03 09:07:48",
|
||||
"updated_at": "2025-10-28 13:25:52",
|
||||
"quantity": 5
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"name": "Dolly",
|
||||
"description": "",
|
||||
"price": 275,
|
||||
"subscription_allowed": 0,
|
||||
"category": "6",
|
||||
"piktogram": "04",
|
||||
"economic_product_id": "4",
|
||||
"apply_category_discount": true,
|
||||
"requires_note": false,
|
||||
"is_wash": true,
|
||||
"display_in_booking_form": true,
|
||||
"order_priority": 90,
|
||||
"created_at": "2024-12-06 14:36:23",
|
||||
"updated_at": "2025-10-28 13:26:24",
|
||||
"quantity": 6
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user