u
This commit is contained in:
43
docs/api/routes/printerjob/_id.delete.md
Normal file
43
docs/api/routes/printerjob/_id.delete.md
Normal file
@@ -0,0 +1,43 @@
|
||||
# `DELETE /printerjob/{id}`
|
||||
|
||||
Protected. Requires a valid session cookie (`credentials: 'include'`).
|
||||
|
||||
Cancel and delete printer job
|
||||
|
||||
Cancels and deletes a print job. If the job was pending or processing, sends a cancellation
|
||||
event to the connected printer agent before deletion.
|
||||
|
||||
|
||||
## Path parameters
|
||||
|
||||
| Param | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `id` | yes | integer | |
|
||||
|
||||
## Signals
|
||||
|
||||
On success, emits SSE signal: `printerjob` (see [`GET /events`](../events.md)).
|
||||
|
||||
## Response `200`
|
||||
|
||||
Job cancelled and deleted
|
||||
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"deletedJob": {
|
||||
"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`._
|
||||
44
docs/api/routes/printerjob/_id.get.md
Normal file
44
docs/api/routes/printerjob/_id.get.md
Normal file
@@ -0,0 +1,44 @@
|
||||
# `GET /printerjob/{id}`
|
||||
|
||||
Protected. Requires a valid session cookie (`credentials: 'include'`).
|
||||
|
||||
Get printer job
|
||||
|
||||
Retrieves details of a specific printer job by ID.
|
||||
|
||||
## Path parameters
|
||||
|
||||
| Param | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `id` | yes | integer | |
|
||||
|
||||
## Response `200`
|
||||
|
||||
Printer job details
|
||||
|
||||
```json
|
||||
{
|
||||
"printerjob": {
|
||||
"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"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Errors
|
||||
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| 400 | Invalid ID or no company selected — `{"error":"…"}` |
|
||||
| 401 | Unauthorized — `{"error":"…"}` |
|
||||
| 404 | Printer job not found — `{"error":"…"}` |
|
||||
|
||||
---
|
||||
|
||||
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._
|
||||
41
docs/api/routes/printerjob/_id/cancel.md
Normal file
41
docs/api/routes/printerjob/_id/cancel.md
Normal file
@@ -0,0 +1,41 @@
|
||||
# `POST /printerjob/{id}/cancel`
|
||||
|
||||
Protected. Requires a valid session cookie (`credentials: 'include'`).
|
||||
|
||||
Cancel printer job
|
||||
|
||||
Marks a print job as cancelled and notifies the connected agent in real time.
|
||||
|
||||
## Path parameters
|
||||
|
||||
| Param | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `id` | yes | integer | |
|
||||
|
||||
## Signals
|
||||
|
||||
On success, emits SSE signal: `printerjob` (see [`GET /events`](../events.md)).
|
||||
|
||||
## Response `200`
|
||||
|
||||
Printer job cancelled
|
||||
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"printerjob": {
|
||||
"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