This commit is contained in:
seb
2026-09-24 23:26:25 +02:00
parent 075b1f0ddc
commit f8f61a1212
40 changed files with 1245 additions and 337 deletions

View File

@@ -17,6 +17,7 @@ Returns a single company setting by key for the user's selected company.
| `[options]` | `object` | Optional options. |
| `[options.frontendOnly]` | `boolean` | Only return the setting if it is frontend-visible. |
| `[options.maskWriteonly]` | `boolean` | Mask writeonly settings as '***'. Defaults to `frontendOnly` (usergui gets '***', backend gets full value). |
| `[tx]` | `object` | Optional transaction to run within. |
**Returns**
@@ -43,6 +44,7 @@ Lists the settings of the user's selected company, optionally only frontend-visi
| `[options]` | `object` | Optional options. |
| `[options.frontendOnly]` | `boolean` | Only return frontend-visible settings. |
| `[options.maskWriteonly]` | `boolean` | Whether to mask writeonly settings with '***'. Defaults to `true`. |
| `[tx]` | `object` | Optional transaction to run within. |
**Returns**
@@ -59,7 +61,7 @@ const settings = await store.companysetting.list(42, { frontendOnly: true });
*Source: `src/store/companysetting/set.js`*
Sets (upserts) a company setting by key for the user's selected company. Only a fixed allow-list of keys can be set: `ui.theme`, `keys.tavily`, `keys.openrouter`, `labelprinter.addr`, `labelprinter.type`. Keys in the write-only set (`keys.tavily`, `keys.openrouter`) are stored with `writeonly = 1`; when retrieved by the GUI the value is returned as `"***"`. The backend always receives the real value.
Sets (upserts) a company setting by key for the user's selected company.
**Parameters**
@@ -71,6 +73,7 @@ Sets (upserts) a company setting by key for the user's selected company. Only a
| `input.value` | `string` | The setting value. |
| `[input.frontend]` | `boolean` | Whether the setting is frontend-visible. |
| `[input.writeonly]` | `boolean` | Whether the setting is write-only. Defaults to true for `keys.tavily` and `keys.openrouter`, false otherwise. |
| `[tx]` | `object` | Optional transaction to run within. |
**Returns**