This commit is contained in:
seb
2026-08-07 04:05:01 +02:00
parent 4833acd680
commit 1e89e19863
22 changed files with 1433 additions and 2 deletions

50
API.entitycontact.md Normal file
View File

@@ -0,0 +1,50 @@
# entitycontact
This document is auto-generated from the JSDoc comments in `src/store` by running `npm run api-doc`.
## `entitycontact.create`
*Source: `src/store/entitycontact/create.js`*
Creates a new contact for an entity.
```js
const fn = create(pool);
const contact = await fn(42, 1, 5, { contactType: 'email', contact: 'a@b.c' });
// => { id, entityId, contactType, contact, sort }
```
## `entitycontact.delete`
*Source: `src/store/entitycontact/delete.js`*
Deletes a contact of an entity.
```js
const fn = del(pool);
await fn(42, 1, 5, 9);
```
## `entitycontact.list`
*Source: `src/store/entitycontact/list.js`*
Lists the contacts of an entity.
```js
const fn = list(pool);
const contacts = await fn(42, 1, 5);
// => [{ id, entityId, contactType, contact, sort }]
```
## `entitycontact.update`
*Source: `src/store/entitycontact/update.js`*
Updates a contact of an entity.
```js
const fn = update(pool);
const contact = await fn(42, 1, 5, 9, { contact: 'b@c.d' });
// => { id, entityId, contactType, contact, sort }
```