Files
dashlibstorage/API.posterminal.md
2026-08-07 04:05:01 +02:00

1.7 KiB

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.

const fn = del(pool);
await fn(42, 1, 5);

posterminal.list

Source: src/store/posterminal/list.js

Lists the posterminals of a company.

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).

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.

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).

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.

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.

const fn = upsert(pool);
const terminal = await fn(42, 1, { name: 'Kasse 1', pairingpin: '1234', token: 'abc' });
// => { id, name, token, pairingpin }