u
This commit is contained in:
@@ -6,7 +6,7 @@ This document is auto-generated from the JSDoc comments in `src/store` by runnin
|
||||
|
||||
*Source: `src/store/entity/create.js`*
|
||||
|
||||
Creates a new entity (customer) in a customer group, recording history. Optional `number`; if omitted, allocates via `getnextnumberwithprefixandpadding` (`type` `entity`).
|
||||
Creates a new entity (customer) in a customer group, recording history. Optional `number`; if omitted, allocates via `numbers.nextNumber` (`type` `entity`).
|
||||
|
||||
**Parameters**
|
||||
|
||||
@@ -18,6 +18,7 @@ Creates a new entity (customer) in a customer group, recording history. Optional
|
||||
| `input.name` | `string` | The entity name. |
|
||||
| `[input.firstName]` | `string` | The entity first name. |
|
||||
| `[input.number]` | `string` | Optional explicit customer number. |
|
||||
| `[tx]` | `object` | Optional transaction to run within. |
|
||||
|
||||
**Returns**
|
||||
|
||||
@@ -46,6 +47,7 @@ Deletes an entity by its id within the user's selected company.
|
||||
| --- | --- | --- |
|
||||
| `googleAuthId` | `number` | The id of the Google auth user. |
|
||||
| `id` | `number` | The id of the entity to delete. |
|
||||
| `[tx]` | `object` | Optional transaction to run within. |
|
||||
|
||||
**Returns**
|
||||
|
||||
@@ -73,6 +75,7 @@ Returns a single entity by its id within the user's selected company.
|
||||
| --- | --- | --- |
|
||||
| `googleAuthId` | `number` | The id of the Google auth user. |
|
||||
| `id` | `number` | The id of the entity. |
|
||||
| `[tx]` | `object` | Optional transaction to run within. |
|
||||
|
||||
**Returns**
|
||||
|
||||
@@ -103,6 +106,7 @@ Returns whether a customer number is free within the user's selected company. Pa
|
||||
| `number` | `string` | The customer number to check. |
|
||||
| `[options]` | `object` | Optional options. |
|
||||
| `[options.excludeEntityId]` | `number` | An entity id to exclude from the check. |
|
||||
| `[tx]` | `object` | Optional transaction to run within. |
|
||||
|
||||
**Returns**
|
||||
|
||||
@@ -135,6 +139,7 @@ Lists the entities (customers) of the user's selected company, optionally filter
|
||||
| `[options]` | `object` | Optional options. |
|
||||
| `[options.customergroupId]` | `number` | Filter by customer group id. |
|
||||
| `[options.role]` | `string` | Restrict to `'customer'` role if set. |
|
||||
| `[tx]` | `object` | Optional transaction to run within. |
|
||||
|
||||
**Returns**
|
||||
|
||||
@@ -162,6 +167,7 @@ Returns the next customer number that would be allocated for the user's selected
|
||||
| Name | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| `googleAuthId` | `number` | The id of the Google auth user. |
|
||||
| `[tx]` | `object` | Optional transaction to run within. |
|
||||
|
||||
**Returns**
|
||||
|
||||
@@ -190,6 +196,7 @@ Updates name, first name, and/or customer number of an entity, recording history
|
||||
| `[patch.name]` | `string` | The new entity name. |
|
||||
| `[patch.firstName]` | `string` | The new first name. |
|
||||
| `[patch.number]` | `string` | The new customer number. |
|
||||
| `[tx]` | `object` | Optional transaction to run within. |
|
||||
|
||||
**Returns**
|
||||
|
||||
|
||||
Reference in New Issue
Block a user