This commit is contained in:
seb
2026-10-11 17:26:11 +02:00
parent 7ffb21aabb
commit 7f4092971d
17 changed files with 3076 additions and 2616 deletions

View File

@@ -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`*