feat(api): add staff order booking contract and shift timeline alias
This commit is contained in:
@@ -4,7 +4,7 @@ This is the shortest path for frontend to implement the v2 mobile clients agains
|
||||
|
||||
Base URL:
|
||||
|
||||
- `https://krow-api-v2-933560802882.us-central1.run.app`
|
||||
- `https://krow-api-v2-e3g6witsvq-uc.a.run.app`
|
||||
|
||||
Use this doc together with:
|
||||
|
||||
@@ -30,7 +30,10 @@ Important consequences:
|
||||
|
||||
- `GET /staff/shifts/open` returns open shift-role opportunities.
|
||||
- `POST /staff/shifts/:shiftId/apply` must send the `roleId` from that response.
|
||||
- `GET /client/orders/view` is the timeline/read model for the client app.
|
||||
- `GET /staff/orders/available` returns grouped order opportunities for atomic booking.
|
||||
- `POST /staff/orders/:orderId/book` must send the `roleId` from that response.
|
||||
- `GET /client/shifts/scheduled` is the canonical timeline/read model for the client app.
|
||||
- `GET /client/orders/view` is a deprecated compatibility alias.
|
||||
- `POST /client/orders/:orderId/edit` and `POST /client/orders/:orderId/cancel` only affect future shifts.
|
||||
|
||||
## 3) Auth implementation
|
||||
@@ -122,7 +125,8 @@ Dispatch-priority rule:
|
||||
|
||||
### Orders
|
||||
|
||||
- `GET /client/orders/view`
|
||||
- `GET /client/shifts/scheduled`
|
||||
- `GET /client/orders/view` deprecated alias
|
||||
- `GET /client/orders/:orderId/reorder-preview`
|
||||
- `POST /client/orders/one-time`
|
||||
- `POST /client/orders/recurring`
|
||||
@@ -175,13 +179,17 @@ Rapid-order flow:
|
||||
|
||||
### Find shifts
|
||||
|
||||
- `GET /staff/orders/available`
|
||||
- `POST /staff/orders/:orderId/book`
|
||||
- `GET /staff/shifts/open`
|
||||
- `POST /staff/shifts/:shiftId/apply`
|
||||
|
||||
Rule:
|
||||
|
||||
- send the `roleId` from the open-shifts response
|
||||
- this is the concrete `shift_roles.id`
|
||||
- send the `roleId` from the order-available response when booking an order
|
||||
- this `roleId` is the role catalog id for grouped order booking
|
||||
- send the `roleId` from the open-shifts response only when applying to one shift
|
||||
- that route still uses the concrete `shift_roles.id`
|
||||
|
||||
### My shifts
|
||||
|
||||
|
||||
Reference in New Issue
Block a user