Files
dashlibstorage/API.posterminal.md
seb 70e0a9ddc4 Add entity customer numbers and scope APIs via selected company.
Entity gets an optional unique-per-company number with allocate/peek/isNumberFree helpers. Company-scoped store methods no longer take companyId and resolve google_auth.selected_company instead.
2026-08-07 04:29:35 +02:00

87 lines
1.7 KiB
Markdown

# posterminal
This document is auto-generated from the JSDoc comments in `src/store` by running `npm run api-doc`.
## `posterminal.delete`
*Source: `src/store/posterminal/delete.js`*
Deletes a posterminal by its id within a company.
```js
const fn = del(pool);
await fn(42, 5);
```
## `posterminal.list`
*Source: `src/store/posterminal/list.js`*
Lists the posterminals of a company.
```js
const fn = list(pool);
const terminals = await fn(42);
// => [{ id, name, token, pairingpin }]
```
## `posterminal.setOff`
*Source: `src/store/posterminal/setOff.js`*
Removes a category assignment from a posterminal (turns it off).
```js
const fn = setOff(pool);
const result = await fn(42, 5, 9);
// => { id, categoryIds: [...] }
```
## `posterminal.setOffAll`
*Source: `src/store/posterminal/setOffAll.js`*
Removes all category assignments from a posterminal.
```js
const fn = setOffAll(pool);
const result = await fn(42, 5);
// => { id, categoryIds: [] }
```
## `posterminal.setOn`
*Source: `src/store/posterminal/setOn.js`*
Assigns a category to a posterminal (turns it on for that category).
```js
const fn = setOn(pool);
const result = await fn(42, 5, 9);
// => { id, categoryIds: [9, ...] }
```
## `posterminal.setOnAll`
*Source: `src/store/posterminal/setOnAll.js`*
Assigns all categories of a company to a posterminal.
```js
const fn = setOnAll(pool);
const result = await fn(42, 5);
// => { id, categoryIds: [...] }
```
## `posterminal.upsert`
*Source: `src/store/posterminal/upsert.js`*
Creates or updates a posterminal for a company.
```js
const fn = upsert(pool);
const terminal = await fn(42, { name: 'Kasse 1', pairingpin: '1234', token: 'abc' });
// => { id, name, token, pairingpin }
```