u
This commit is contained in:
@@ -2,6 +2,25 @@
|
||||
|
||||
This document is auto-generated from the JSDoc comments in `src/store` by running `npm run api-doc`.
|
||||
|
||||
## `attributevalue.addImage`
|
||||
|
||||
*Source: `src/store/attributevalue/addImage.js`*
|
||||
|
||||
Adds an image to an attribute value, processing full, thumb, and 32px-edge small-thumb AVIF variants.
|
||||
|
||||
**Parameters**
|
||||
|
||||
| Name | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| `googleAuthId` | `number` | The id of the Google auth user. |
|
||||
| `attributeValueId` | `number` | The id of the attribute value. |
|
||||
| `image` | `Buffer` | The source image buffer. |
|
||||
| `[tx]` | `object` | Optional transaction to run within. |
|
||||
|
||||
**Returns**
|
||||
|
||||
`Promise<{id: number, fullHash: string, thumbW: number, thumbH: number, thumbHash: string, smallThumbW: number, smallThumbH: number, pics: Array<object>}>`
|
||||
|
||||
## `attributevalue.create`
|
||||
|
||||
*Source: `src/store/attributevalue/create.js`*
|
||||
@@ -49,6 +68,28 @@ Deletes an attribute value.
|
||||
|
||||
`Error` — If attribute value not found or in use.
|
||||
|
||||
## `attributevalue.deleteImage`
|
||||
|
||||
*Source: `src/store/attributevalue/deleteImage.js`*
|
||||
|
||||
Deletes the image of an attribute value.
|
||||
|
||||
**Parameters**
|
||||
|
||||
| Name | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| `googleAuthId` | `number` | The id of the Google auth user. |
|
||||
| `attributeValueId` | `number` | The id of the attribute value. |
|
||||
| `[tx]` | `object` | Optional transaction. |
|
||||
|
||||
**Returns**
|
||||
|
||||
`Promise<{id: number, thumbW: null, thumbH: null, thumbHash: null, pics: Array}>`
|
||||
|
||||
**Throws**
|
||||
|
||||
`Error` — If attribute value not found or image not found.
|
||||
|
||||
## `attributevalue.listByAttributeId`
|
||||
|
||||
*Source: `src/store/attributevalue/listByAttributeId.js`*
|
||||
|
||||
Reference in New Issue
Block a user