41 lines
1.4 KiB
Markdown
41 lines
1.4 KiB
Markdown
# articleattributevalue
|
|
|
|
This document is auto-generated from the JSDoc comments in `src/store` by running `npm run api-doc`.
|
|
|
|
## `articleattributevalue.listByArticleSku`
|
|
|
|
*Source: `src/store/articleattributevalue/listByArticleSku.js`*
|
|
|
|
Lists the attribute values assigned to an article by its SKU.
|
|
|
|
**Parameters**
|
|
|
|
| Name | Type | Description |
|
|
| --- | --- | --- |
|
|
| `googleAuthId` | `number` | The id of the Google auth user. |
|
|
| `sku` | `string` | The article SKU. |
|
|
| `[tx]` | `object` | Optional transaction. |
|
|
|
|
**Returns**
|
|
|
|
`Promise<Array<{id: number, articleId: number, attributeId: number, attributeName: string, exclusive: boolean, attributeValueId: number, value: string, sort: number}>>`
|
|
|
|
## `articleattributevalue.setByArticleSku`
|
|
|
|
*Source: `src/store/articleattributevalue/setByArticleSku.js`*
|
|
|
|
Replaces all attribute values for an article by its SKU. Validates company ownership and enforces the `exclusive` flag on attributes.
|
|
|
|
**Parameters**
|
|
|
|
| Name | Type | Description |
|
|
| --- | --- | --- |
|
|
| `googleAuthId` | `number` | The id of the Google auth user. |
|
|
| `sku` | `string` | The article SKU. |
|
|
| `values` | `Array<number|{attributeValueId: number, sort?: number}>` | Attribute value IDs or items. |
|
|
| `[tx]` | `object` | Optional transaction. |
|
|
|
|
**Returns**
|
|
|
|
`Promise<Array<{id: number, articleId: number, attributeId: number, attributeName: string, exclusive: boolean, attributeValueId: number, value: string, sort: number}>>`
|