113 lines
2.8 KiB
Markdown
113 lines
2.8 KiB
Markdown
# propertyname
|
|
|
|
This document is auto-generated from the JSDoc comments in `src/store` by running `npm run api-doc`.
|
|
|
|
## `propertyname.create`
|
|
|
|
*Source: `src/store/propertyname/create.js`*
|
|
|
|
Creates a property name for the user's selected company.
|
|
|
|
**Parameters**
|
|
|
|
| Name | Type | Description |
|
|
| --- | --- | --- |
|
|
| `googleAuthId` | `number` | The id of the Google auth user. |
|
|
| `input` | `object` | The property name input. |
|
|
| `input.name` | `string` | The property name. |
|
|
| `[input.sort]` | `number` | Optional sort order. |
|
|
| `[input.exclusive=false]` | `boolean` | Whether values are mutually exclusive on an article. |
|
|
| `[tx]` | `object` | Optional transaction. |
|
|
|
|
**Returns**
|
|
|
|
`Promise<{id: number, name: string, sort: number, exclusive: boolean}>`
|
|
|
|
**Throws**
|
|
|
|
`Error` — If the name is missing or already exists for the company.
|
|
|
|
## `propertyname.delete`
|
|
|
|
*Source: `src/store/propertyname/delete.js`*
|
|
|
|
Deletes a property name for the user's selected company.
|
|
|
|
**Parameters**
|
|
|
|
| Name | Type | Description |
|
|
| --- | --- | --- |
|
|
| `googleAuthId` | `number` | The id of the Google auth user. |
|
|
| `id` | `number` | The property name id. |
|
|
| `[tx]` | `object` | Optional transaction. |
|
|
|
|
**Returns**
|
|
|
|
`Promise<void>`
|
|
|
|
**Throws**
|
|
|
|
`Error` — If property name not found or in use.
|
|
|
|
## `propertyname.list`
|
|
|
|
*Source: `src/store/propertyname/list.js`*
|
|
|
|
Lists the property names for the user's selected company.
|
|
|
|
**Parameters**
|
|
|
|
| Name | Type | Description |
|
|
| --- | --- | --- |
|
|
| `googleAuthId` | `number` | The id of the Google auth user. |
|
|
| `[tx]` | `object` | Optional transaction. |
|
|
|
|
**Returns**
|
|
|
|
`Promise<Array<{id: number, name: string, sort: number, exclusive: boolean}>>`
|
|
|
|
## `propertyname.order`
|
|
|
|
*Source: `src/store/propertyname/order.js`*
|
|
|
|
Reorders the property names for the user's selected company.
|
|
|
|
**Parameters**
|
|
|
|
| Name | Type | Description |
|
|
| --- | --- | --- |
|
|
| `googleAuthId` | `number` | The id of the Google auth user. |
|
|
| `input` | `object` | Reorder input. |
|
|
| `input.propertynameIds` | `Array<number>` | IDs in their new order. |
|
|
| `[tx]` | `object` | Optional transaction. |
|
|
|
|
**Returns**
|
|
|
|
`Promise<{propertynameIds: Array<number>}>`
|
|
|
|
## `propertyname.update`
|
|
|
|
*Source: `src/store/propertyname/update.js`*
|
|
|
|
Updates a property name for the user's selected company.
|
|
|
|
**Parameters**
|
|
|
|
| Name | Type | Description |
|
|
| --- | --- | --- |
|
|
| `googleAuthId` | `number` | The id of the Google auth user. |
|
|
| `id` | `number` | The property name id. |
|
|
| `input` | `object` | Update patch. |
|
|
| `[input.name]` | `string` | New name. |
|
|
| `[input.sort]` | `number` | New sort. |
|
|
| `[input.exclusive]` | `boolean` | New exclusive flag. |
|
|
| `[tx]` | `object` | Optional transaction. |
|
|
|
|
**Returns**
|
|
|
|
`Promise<{id: number, name: string, sort: number, exclusive: boolean}>`
|
|
|
|
**Throws**
|
|
|
|
`Error` — If the property name is unknown, the name is missing, or the name is already taken.
|