Rewrite store JSDoc, split quote/order into modules, and generate typed API docs
- 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
This commit is contained in:
57
API.lang.md
57
API.lang.md
@@ -8,6 +8,19 @@ This document is auto-generated from the JSDoc comments in `src/store` by runnin
|
||||
|
||||
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**
|
||||
|
||||
```js
|
||||
const id = await store.lang.create('de');
|
||||
// => 1
|
||||
@@ -19,6 +32,18 @@ const id = await store.lang.create('de');
|
||||
|
||||
Deletes a language by its id.
|
||||
|
||||
**Parameters**
|
||||
|
||||
| Name | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| `id` | `number` | The id of the language to delete. |
|
||||
|
||||
**Returns**
|
||||
|
||||
`Promise<void>`
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
await store.lang.delete(1);
|
||||
```
|
||||
@@ -29,6 +54,19 @@ await store.lang.delete(1);
|
||||
|
||||
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**
|
||||
|
||||
```js
|
||||
const id = await store.lang.ensure('de');
|
||||
// => 1
|
||||
@@ -40,6 +78,19 @@ const id = await store.lang.ensure('de');
|
||||
|
||||
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**
|
||||
|
||||
```js
|
||||
const lang = await store.lang.getByIso639('de');
|
||||
// => { id: 1, iso639: 'de' }
|
||||
@@ -51,6 +102,12 @@ const lang = await store.lang.getByIso639('de');
|
||||
|
||||
Lists all languages.
|
||||
|
||||
**Returns**
|
||||
|
||||
`Promise<Array<{id: number, iso639: string}>>` — All language rows.
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
const languages = await store.lang.list();
|
||||
// => [{ id: 1, iso639: 'de' }]
|
||||
|
||||
Reference in New Issue
Block a user