This commit is contained in:
seb
2026-09-29 11:31:37 +02:00
parent 7bb674d5e7
commit 6d3e328126
2 changed files with 40 additions and 0 deletions

View File

@@ -30,6 +30,23 @@ Deletes a posterminal by its id within the user's selected company.
await store.posterminal.delete(42, 5);
```
## `posterminal.findByPairingpin`
*Source: `src/store/posterminal/findByPairingpin.js`*
Finds a posterminal by its pairingpin.
**Parameters**
| Name | Type | Description |
| --- | --- | --- |
| `pairingpin` | `string` | The pairing pin to search for. |
| `[tx]` | `object` | Optional transaction to run within. |
**Returns**
`Promise<object|null>` — The posterminal row, or null if not found.
## `posterminal.list`
*Source: `src/store/posterminal/list.js`*
@@ -54,6 +71,27 @@ const terminals = await store.posterminal.list(42);
// => [{ id, name, token, pairingpin }]
```
## `posterminal.pair`
*Source: `src/store/posterminal/pair.js`*
Completes POS device pairing for a terminal.
**Parameters**
| Name | Type | Description |
| --- | --- | --- |
| `id` | `number` | The posterminal id. |
| `input` | `object` | |
| `input.token` | `string` | The auth token for the paired device. |
| `[input.clientserial]` | `string` | The client name or serial identifier. |
| `[input.pairedAt]` | `string` | Timestamp when paired. |
| `[tx]` | `object` | Optional transaction to run within. |
**Returns**
`Promise<{id: number, token: string, clientserial: string|null, pairedAt: string|null}>`
## `posterminal.setOff`
*Source: `src/store/posterminal/setOff.js`*