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.
1023 B
1023 B
companysetting
This document is auto-generated from the JSDoc comments in src/store by running npm run api-doc.
companysetting.delete
Source: src/store/companysetting/delete.js
Deletes a company setting by key.
const fn = del(pool);
await fn(42, 'theme');
companysetting.get
Source: src/store/companysetting/get.js
Returns a single company setting by key.
const fn = get(pool);
const setting = await fn(42, 'theme');
// => { key, value, frontend }
companysetting.list
Source: src/store/companysetting/list.js
Lists the settings of a company, optionally only frontend-visible ones.
const fn = list(pool);
const settings = await fn(42, { frontendOnly: true });
// => [{ key, value, frontend }]
companysetting.set
Source: src/store/companysetting/set.js
Sets (upserts) a company setting by key.
const fn = set(pool);
const setting = await fn(42, { key: 'theme', value: 'dark', frontend: true });
// => { key, value, frontend }