# 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. | | `[tx]` | `object` | Optional transaction to run within. | **Returns** `Promise` — The id of the created company user link. **Example** ```js 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. | | `[tx]` | `object` | Optional transaction to run within. | **Returns** `Promise` **Example** ```js 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. | | `[tx]` | `object` | Optional transaction to run within. | **Returns** `Promise>` — The company user ids. **Example** ```js const ids = await store.companyuser.getByEmail('user@example.com'); // => [1, 2, 3] ```