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:
45
API.tax.md
45
API.tax.md
@@ -8,6 +8,19 @@ This document is auto-generated from the JSDoc comments in `src/store` by runnin
|
||||
|
||||
Creates a new tax rate.
|
||||
|
||||
**Parameters**
|
||||
|
||||
| Name | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| `rate` | `number` | The tax rate in percent (e.g. `19`). |
|
||||
| `[tx]` | `object` | Optional transaction to run within. |
|
||||
|
||||
**Returns**
|
||||
|
||||
`Promise<number>` — The id of the created tax rate.
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
const id = await store.tax.create(19);
|
||||
// => 1
|
||||
@@ -19,6 +32,19 @@ const id = await store.tax.create(19);
|
||||
|
||||
Returns the id of a tax rate, creating it if it does not exist.
|
||||
|
||||
**Parameters**
|
||||
|
||||
| Name | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| `rate` | `number` | The tax rate in percent (e.g. `19`). |
|
||||
| `[tx]` | `object` | Optional transaction to run within. |
|
||||
|
||||
**Returns**
|
||||
|
||||
`Promise<number>` — The id of the tax rate.
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
const id = await store.tax.ensure(19);
|
||||
// => 1
|
||||
@@ -30,6 +56,19 @@ const id = await store.tax.ensure(19);
|
||||
|
||||
Returns a tax row by its rate.
|
||||
|
||||
**Parameters**
|
||||
|
||||
| Name | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| `rate` | `number` | The tax rate in percent (e.g. `19`). |
|
||||
| `[tx]` | `object` | Optional transaction to run within. |
|
||||
|
||||
**Returns**
|
||||
|
||||
`Promise<{id: number, rate: number}>` — The tax row, or `undefined` if not found.
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
const tax = await store.tax.getByRate(19);
|
||||
// => { id: 1, rate: 19 }
|
||||
@@ -41,6 +80,12 @@ const tax = await store.tax.getByRate(19);
|
||||
|
||||
Lists all tax rates.
|
||||
|
||||
**Returns**
|
||||
|
||||
`Promise<Array<{id: number, rate: number}>>` — All tax rate rows.
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
const taxes = await store.tax.list();
|
||||
// => [{ id: 1, rate: 19 }]
|
||||
|
||||
Reference in New Issue
Block a user