Files
dashlibstorage/API.companyuser.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

1.3 KiB

companyuser

This document is auto-generated from the JSDoc comments in src/store by running npm run api-doc.

companyuser.add

Source: src/store/companyuser/add.js

Adds a company user linking a company to a Google auth account.

Parameters

Name Type Description
companyId number The id of the company.
googleAuthId number The id of the Google auth account.

Returns

Promise<number> — The id of the created company user link.

Example

const id = await store.companyuser.add(1, 42);
// => 7

companyuser.delete

Source: src/store/companyuser/delete.js

Deletes a company user link by its id.

Parameters

Name Type Description
id number The id of the company user link to delete.

Returns

Promise<void>

Example

await store.companyuser.delete(7);

companyuser.getByEmail

Source: src/store/companyuser/getByEmail.js

Returns the company user ids associated with the given email address.

Parameters

Name Type Description
email string The email address.

Returns

Promise<Array<number>> — The company user ids.

Example

const ids = await store.companyuser.getByEmail('user@example.com');
// => [1, 2, 3]