u
This commit is contained in:
@@ -240,6 +240,7 @@ Generated from `@openapi` annotations in [`src/api/routes/`](../../src/api/route
|
||||
| [`routes/printeragent/_id.patch.md`](routes/printeragent/_id.patch.md) | `PATCH /printeragent/{id}` |
|
||||
| [`routes/printerjob.get.md`](routes/printerjob.get.md) | `GET /printerjob` |
|
||||
| [`routes/printerjob.post.md`](routes/printerjob.post.md) | `POST /printerjob` |
|
||||
| [`routes/printerjob/cancel-all.md`](routes/printerjob/cancel-all.md) | `POST /printerjob/cancel-all` |
|
||||
| [`routes/printerjob/_id.delete.md`](routes/printerjob/_id.delete.md) | `DELETE /printerjob/{id}` |
|
||||
| [`routes/printerjob/_id.get.md`](routes/printerjob/_id.get.md) | `GET /printerjob/{id}` |
|
||||
| [`routes/printerjob/_id/cancel.md`](routes/printerjob/_id/cancel.md) | `POST /printerjob/{id}/cancel` |
|
||||
@@ -361,7 +362,7 @@ Clients subscribe via [`GET /events`](routes/events.md) (`text/event-stream`). A
|
||||
| `modelconversation-<id>` | `POST /modelconversation/{id}/message` |
|
||||
| `order` | `DELETE /order/{id}/file/{fileId}`, `POST /order/{id}/pdf`, `DELETE /shipment/{id}`, `PATCH /shipment/{id}`, `DELETE /shipment/{id}/file/{fileId}` |
|
||||
| `printer` | `POST /printer`, `PUT /printer/order`, `DELETE /printer/{id}`, `PATCH /printer/{id}`, `PUT /printer/{id}` |
|
||||
| `printerjob` | `POST /printerjob`, `DELETE /printerjob/{id}`, `POST /printerjob/{id}/cancel`, `POST /zpljob` |
|
||||
| `printerjob` | `POST /printerjob`, `POST /printerjob/cancel-all`, `DELETE /printerjob/{id}`, `POST /printerjob/{id}/cancel`, `POST /zpljob` |
|
||||
| `propertyname` | `POST /propertyname`, `PUT /propertyname/order`, `DELETE /propertyname/{id}`, `PATCH /propertyname/{id}` |
|
||||
| `quote` | `DELETE /quote/{id}/file/{fileId}`, `POST /quote/{id}/pdf` |
|
||||
| `shipment` | `DELETE /shipment/{id}`, `PATCH /shipment/{id}`, `DELETE /shipment/{id}/file/{fileId}`, `POST /shipment/{id}/pdf` |
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Dash API Routes Overview (All)
|
||||
|
||||
Overview of all 305 API endpoints across all modules.
|
||||
Overview of all 306 API endpoints across all modules.
|
||||
|
||||
### Notation
|
||||
|
||||
@@ -96,7 +96,7 @@ _none_
|
||||
- Params: `query: printeragentId?: int`
|
||||
- Returns: `200 { agentprinters: T13[] }`
|
||||
#### Reorder agent printers — `PUT /agentprinter/order`
|
||||
- Params: `body: { printeragentId: int, agentprinterIds: int[] }`
|
||||
- Params: `body: { agentprinterIds: int[], printeragentId?: int }`
|
||||
- Returns: `200 { agentprinterIds: int[] }`
|
||||
#### Delete agent printer — `DELETE /agentprinter/{id}`
|
||||
- Params: `id: int`
|
||||
@@ -795,6 +795,9 @@ _none_
|
||||
#### Create print job — `POST /printerjob`
|
||||
- Params: `body: { agentprinterId: int, data: str, type?: str }`
|
||||
- Returns: `201 { printerjob: T22 }`
|
||||
#### Cancel all pending and processing printer jobs — `POST /printerjob/cancel-all`
|
||||
- Params: `body?: { agentprinterId?: int }`
|
||||
- Returns: `200 { success: bool, cancelledCount: int, jobs: T22[] }`
|
||||
#### Cancel and delete printer job — `DELETE /printerjob/{id}`
|
||||
- Params: `id: int`
|
||||
- Returns: `200 { success: bool, deletedJob: T22 }`
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Dash API Routes Overview
|
||||
|
||||
Overview of all 225 API endpoints across all modules.
|
||||
Overview of all 226 API endpoints across all modules.
|
||||
|
||||
### Notation
|
||||
|
||||
@@ -65,7 +65,7 @@ Params: path values first, then `query:` and `body:` (`body?` = optional body).
|
||||
- Params: `query: printeragentId?: int`
|
||||
- Returns: `200 { agentprinters: T9[] }`
|
||||
#### Reorder agent printers — `PUT /agentprinter/order`
|
||||
- Params: `body: { printeragentId: int, agentprinterIds: int[] }`
|
||||
- Params: `body: { agentprinterIds: int[], printeragentId?: int }`
|
||||
- Returns: `200 { agentprinterIds: int[] }`
|
||||
#### Delete agent printer — `DELETE /agentprinter/{id}`
|
||||
- Params: `id: int`
|
||||
@@ -574,6 +574,9 @@ _none_
|
||||
#### Create print job — `POST /printerjob`
|
||||
- Params: `body: { agentprinterId: int, data: str, type?: str }`
|
||||
- Returns: `201 { printerjob: T16 }`
|
||||
#### Cancel all pending and processing printer jobs — `POST /printerjob/cancel-all`
|
||||
- Params: `body?: { agentprinterId?: int }`
|
||||
- Returns: `200 { success: bool, cancelledCount: int, jobs: T16[] }`
|
||||
#### Cancel and delete printer job — `DELETE /printerjob/{id}`
|
||||
- Params: `id: int`
|
||||
- Returns: `200 { success: bool, deletedJob: T16 }`
|
||||
|
||||
@@ -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