u
This commit is contained in:
@@ -181,6 +181,8 @@ Returns the change history of an article by its SKU.
|
||||
| --- | --- | --- |
|
||||
| `googleAuthId` | `number` | The id of the Google auth user. |
|
||||
| `sku` | `string` | The article SKU. |
|
||||
| `[opts]` | `object` | Optional options. |
|
||||
| `[opts.limit]` | `number` | Maximum number of entries to return (newest first). |
|
||||
| `[tx]` | `object` | Optional transaction. |
|
||||
|
||||
**Returns**
|
||||
@@ -192,6 +194,9 @@ Returns the change history of an article by its SKU.
|
||||
```js
|
||||
const history = await store.article.getHistoryBySku(42, 'SKU-1');
|
||||
// => [{ id, companyuserId, date, text }]
|
||||
|
||||
const recent = await store.article.getHistoryBySku(42, 'SKU-1', { limit: 5 });
|
||||
// => up to 5 most recent entries
|
||||
```
|
||||
|
||||
## `article.importRows`
|
||||
@@ -362,6 +367,27 @@ Removes a child article from a father article, either by unlinking or deleting i
|
||||
|
||||
`Promise<{success: boolean, fatherSku: string, childSku: string, deleted: boolean}>`
|
||||
|
||||
## `article.resolveUniqueSlug`
|
||||
|
||||
*Source: `src/store/article/resolveUniqueSlug.js`*
|
||||
|
||||
Resolves a company- and language-unique slug for an article. Disambiguates duplicate slugs with a numeric suffix (-2, -3, ...).
|
||||
|
||||
**Parameters**
|
||||
|
||||
| Name | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| `runner` | `object` | DB runner or tx. |
|
||||
| `params` | `object` | |
|
||||
| `params.companyId` | `number` | The company ID. |
|
||||
| `params.languageId` | `number` | The language ID. |
|
||||
| `params.name` | `string` | The article name. |
|
||||
| `[params.excludeArticleId]` | `number` | Optional article ID to exclude (e.g. for updates). |
|
||||
|
||||
**Returns**
|
||||
|
||||
`Promise<string>` — The unique slug.
|
||||
|
||||
## `article.setBrandIdBySku`
|
||||
|
||||
*Source: `src/store/article/setBrandIdBySku.js`*
|
||||
|
||||
Reference in New Issue
Block a user