- Rewrite JSDoc across all store methods to document the actual async methods (real params, returns, throws) instead of the internal wrappers - Split quote/order into individual module files backed by shared manifestDoc helpers; remove the createStore factory and thin wrappers - Deduplicate manifest line helpers into src/store/manifestLines.js - Extend generate-api-doc.js to render parameter/return/throws types and emit per-namespace API.<module>.md files with an API.md index - Regenerate all API docs
2.0 KiB
lang
This document is auto-generated from the JSDoc comments in src/store by running npm run api-doc.
lang.create
Source: src/store/lang/create.js
Creates a new language by its ISO 639 code.
Parameters
| Name | Type | Description |
|---|---|---|
iso639 |
string |
The ISO 639 language code (e.g. 'de'). |
[tx] |
object |
Optional transaction to run within. |
Returns
Promise<number> — The id of the created language.
Example
const id = await store.lang.create('de');
// => 1
lang.delete
Source: src/store/lang/delete.js
Deletes a language by its id.
Parameters
| Name | Type | Description |
|---|---|---|
id |
number |
The id of the language to delete. |
Returns
Promise<void>
Example
await store.lang.delete(1);
lang.ensure
Source: src/store/lang/ensure.js
Returns the id of a language by ISO code, creating it if it does not exist.
Parameters
| Name | Type | Description |
|---|---|---|
iso639 |
string |
The ISO 639 language code (e.g. 'de'). |
[tx] |
object |
Optional transaction to run within. |
Returns
Promise<number> — The id of the language.
Example
const id = await store.lang.ensure('de');
// => 1
lang.getByIso639
Source: src/store/lang/getByIso639.js
Returns a language row by its ISO 639 code.
Parameters
| Name | Type | Description |
|---|---|---|
iso639 |
string |
The ISO 639 language code (e.g. 'de'). |
[tx] |
object |
Optional transaction to run within. |
Returns
Promise<{id: number, iso639: string}> — The language row, or undefined if not found.
Example
const lang = await store.lang.getByIso639('de');
// => { id: 1, iso639: 'de' }
lang.list
Source: src/store/lang/list.js
Lists all languages.
Returns
Promise<Array<{id: number, iso639: string}>> — All language rows.
Example
const languages = await store.lang.list();
// => [{ id: 1, iso639: 'de' }]