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

51 lines
1.0 KiB
Markdown

# 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.
```js
const fn = del(pool);
await fn(42, 1, 'theme');
```
## `companysetting.get`
*Source: `src/store/companysetting/get.js`*
Returns a single company setting by key.
```js
const fn = get(pool);
const setting = await fn(42, 1, 'theme');
// => { key, value, frontend }
```
## `companysetting.list`
*Source: `src/store/companysetting/list.js`*
Lists the settings of a company, optionally only frontend-visible ones.
```js
const fn = list(pool);
const settings = await fn(42, 1, { frontendOnly: true });
// => [{ key, value, frontend }]
```
## `companysetting.set`
*Source: `src/store/companysetting/set.js`*
Sets (upserts) a company setting by key.
```js
const fn = set(pool);
const setting = await fn(42, 1, { key: 'theme', value: 'dark', frontend: true });
// => { key, value, frontend }
```