docs
This commit is contained in:
50
API.entityaddress.md
Normal file
50
API.entityaddress.md
Normal file
@@ -0,0 +1,50 @@
|
||||
# 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.
|
||||
|
||||
```js
|
||||
const fn = create(pool);
|
||||
const address = await fn(42, 1, 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.
|
||||
|
||||
```js
|
||||
const fn = del(pool);
|
||||
await fn(42, 1, 5, 9);
|
||||
```
|
||||
|
||||
## `entityaddress.list`
|
||||
|
||||
*Source: `src/store/entityaddress/list.js`*
|
||||
|
||||
Lists the addresses of an entity.
|
||||
|
||||
```js
|
||||
const fn = list(pool);
|
||||
const addresses = await fn(42, 1, 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.
|
||||
|
||||
```js
|
||||
const fn = update(pool);
|
||||
const address = await fn(42, 1, 5, 9, { city: 'Hamburg' });
|
||||
// => { id, entityId, firstName, name, street, streetNumber, zip, city, county, addressType, sort }
|
||||
```
|
||||
Reference in New Issue
Block a user