Files
dashlibstorage/API.entitycontact.md
seb aefd97a171 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
2026-08-07 06:23:17 +02:00

2.7 KiB

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.

Parameters

Name Type Description
googleAuthId number The id of the Google auth user.
entityId number The id of the entity.
input object The contact input.
input.contactType string The contact type (e.g. 'email').
input.contact string The contact value.
[input.sort] number Optional sort order.

Returns

Promise<{id: number, entityId: number, contactType: string, contact: string, sort: number}> — The created contact.

Throws

Error — If the contact type or value is missing.

Example

const contact = await store.entitycontact.create(42, 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.

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 contact to delete.

Returns

Promise<void>

Throws

Error — If the contact is not found.

Example

await store.entitycontact.delete(42, 5, 9);

entitycontact.list

Source: src/store/entitycontact/list.js

Lists the contacts 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<{id: number, entityId: number, contactType: string, contact: string, sort: number}>> — The contacts.

Example

const contacts = await store.entitycontact.list(42, 5);
// => [{ id, entityId, contactType, contact, sort }]

entitycontact.update

Source: src/store/entitycontact/update.js

Updates a contact 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 contact to update.
patch object The update patch (any subset of contact fields).

Returns

Promise<{id: number, entityId: number, contactType: string, contact: string, sort: number}> — The updated contact.

Throws

Error — If the contact is not found.

Example

const contact = await store.entitycontact.update(42, 5, 9, { contact: 'b@c.d' });
// => { id, entityId, contactType, contact, sort }