- 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
3.0 KiB
3.0 KiB
entityaddress
This document is auto-generated from the JSDoc comments in src/store by running npm run api-doc.
entityaddress.create
Source: src/store/entityaddress/create.js
Creates a new address for an entity.
Parameters
| Name | Type | Description |
|---|---|---|
googleAuthId |
number |
The id of the Google auth user. |
entityId |
number |
The id of the entity. |
input |
object |
The address input. |
input.addressType |
string |
The address type (e.g. 'billing'). |
[input.firstName] |
string |
The first name. |
[input.name] |
string |
The name. |
[input.street] |
string |
The street. |
[input.streetNumber] |
string |
The street number. |
[input.zip] |
string |
The zip code. |
[input.city] |
string |
The city. |
[input.county] |
string |
The county. |
[input.sort] |
number |
Optional sort order. |
Returns
Promise<object> — The created address.
Throws
Error — If the address type is missing.
Example
const address = await store.entityaddress.create(42, 5, { addressType: 'billing', street: 'Main St', city: 'Berlin' });
// => { id, entityId, firstName, name, street, streetNumber, zip, city, county, addressType, sort }
entityaddress.delete
Source: src/store/entityaddress/delete.js
Deletes an address of an entity.
Parameters
| Name | Type | Description |
|---|---|---|
googleAuthId |
number |
The id of the Google auth user. |
entityId |
number |
The id of the entity. |
id |
number |
The id of the address to delete. |
Returns
Promise<void>
Throws
Error — If the address is not found.
Example
await store.entityaddress.delete(42, 5, 9);
entityaddress.list
Source: src/store/entityaddress/list.js
Lists the addresses of an entity.
Parameters
| Name | Type | Description |
|---|---|---|
googleAuthId |
number |
The id of the Google auth user. |
entityId |
number |
The id of the entity. |
Returns
Promise<Array<object>> — The addresses.
Example
const addresses = await store.entityaddress.list(42, 5);
// => [{ id, entityId, firstName, name, street, streetNumber, zip, city, county, addressType, sort }]
entityaddress.update
Source: src/store/entityaddress/update.js
Updates an address of an entity.
Parameters
| Name | Type | Description |
|---|---|---|
googleAuthId |
number |
The id of the Google auth user. |
entityId |
number |
The id of the entity. |
id |
number |
The id of the address to update. |
patch |
object |
The update patch (any subset of address fields). |
Returns
Promise<object> — The updated address.
Throws
Error — If the address is not found.
Example
const address = await store.entityaddress.update(42, 5, 9, { city: 'Hamburg' });
// => { id, entityId, firstName, name, street, streetNumber, zip, city, county, addressType, sort }