docs
This commit is contained in:
86
API.posterminal.md
Normal file
86
API.posterminal.md
Normal file
@@ -0,0 +1,86 @@
|
||||
# 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, 1, 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, 1);
|
||||
// => [{ 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, 1, 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, 1, 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, 1, 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, 1, 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, 1, { name: 'Kasse 1', pairingpin: '1234', token: 'abc' });
|
||||
// => { id, name, token, pairingpin }
|
||||
```
|
||||
Reference in New Issue
Block a user