This commit is contained in:
seb
2026-11-01 00:24:43 +01:00
parent ce7f5aad2a
commit 16f70603bc
8 changed files with 221 additions and 34 deletions

View File

@@ -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

View 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`._