u
This commit is contained in:
@@ -11,7 +11,7 @@ Reorders agent printers for a specific printer agent within the selected company
|
||||
|
||||
| Field | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `printeragentId` | yes | integer | |
|
||||
| `printeragentId` | no | integer | Optional agent id. If omitted, reorders all printers in the company. |
|
||||
| `agentprinterIds` | yes | integer[] | |
|
||||
|
||||
```json
|
||||
|
||||
52
docs/api/routes/printerjob/cancel-all.md
Normal file
52
docs/api/routes/printerjob/cancel-all.md
Normal file
@@ -0,0 +1,52 @@
|
||||
# `POST /printerjob/cancel-all`
|
||||
|
||||
Protected. Requires a valid session cookie (`credentials: 'include'`).
|
||||
|
||||
Cancel all pending and processing printer jobs
|
||||
|
||||
Cancels all queued or in-flight print jobs for the selected company, optionally filtered by agentprinterId.
|
||||
Notifies connected agents in real time.
|
||||
|
||||
|
||||
## Body (JSON)
|
||||
|
||||
| Field | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `agentprinterId` | no | integer | |
|
||||
|
||||
```json
|
||||
{
|
||||
"agentprinterId": 1
|
||||
}
|
||||
```
|
||||
|
||||
## Signals
|
||||
|
||||
On success, emits SSE signal: `printerjob` (see [`GET /events`](../events.md)).
|
||||
|
||||
## Response `200`
|
||||
|
||||
All matching jobs cancelled
|
||||
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"cancelledCount": 1,
|
||||
"jobs": [
|
||||
{
|
||||
"id": 1,
|
||||
"agentprinterId": 1,
|
||||
"printeragentId": 1,
|
||||
"type": "zpl",
|
||||
"state": "pending",
|
||||
"data": "…",
|
||||
"createdAt": "2026-08-10T00:00:00.000Z",
|
||||
"completedAt": "2026-08-10T00:00:00.000Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._
|
||||
Reference in New Issue
Block a user