This commit is contained in:
seb
2026-10-31 21:02:53 +01:00
parent 5a0b603306
commit dd5c9646b3
23 changed files with 1462 additions and 223 deletions

View File

@@ -0,0 +1,50 @@
# `POST /printerjob`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Create print job
Creates a new print job for an agent printer. Notifies the agent in real time.
## Body (JSON)
| Field | Required | Type | Description |
|-------|----------|------|-------------|
| `agentprinterId` | yes | integer | |
| `type` | no | string | |
| `data` | yes | string | |
```json
{
"agentprinterId": 1,
"type": "zpl",
"data": "…"
}
```
## Signals
On success, emits SSE signal: `printerjob` (see [`GET /events`](../events.md)).
## Response `201`
Printer job created
```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"
}
}
```
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._