u
This commit is contained in:
@@ -15,6 +15,7 @@ Adds an image to an article by its SKU, processing it into AVIF variants.
|
||||
| `googleAuthId` | `number` | The id of the Google auth user. |
|
||||
| `sku` | `string` | The article SKU. |
|
||||
| `image` | `Buffer` | The source image buffer. |
|
||||
| `[tx]` | `object` | Optional transaction to run within. |
|
||||
|
||||
**Returns**
|
||||
|
||||
@@ -41,6 +42,7 @@ Creates a new article under a given parent category, allocating a SKU and a defa
|
||||
| `input.googleAuthId` | `number` | The id of the Google auth user. |
|
||||
| `input.parentId` | `number` | The id of the parent category. |
|
||||
| `input.name` | `string` | The article name. |
|
||||
| `[tx]` | `object` | Optional transaction to run within. |
|
||||
|
||||
**Returns**
|
||||
|
||||
@@ -65,6 +67,7 @@ Deletes an article by its SKU, refusing when it still has children.
|
||||
| --- | --- | --- |
|
||||
| `googleAuthId` | `number` | The id of the Google auth user. |
|
||||
| `sku` | `string` | The article SKU. |
|
||||
| `[tx]` | `object` | Optional transaction to run within. |
|
||||
|
||||
**Returns**
|
||||
|
||||
@@ -93,6 +96,7 @@ Deletes an image from an article by its SKU and full image hash.
|
||||
| `googleAuthId` | `number` | The id of the Google auth user. |
|
||||
| `sku` | `string` | The article SKU. |
|
||||
| `fullHash` | `string` | The full image hash to delete. |
|
||||
| `[tx]` | `object` | Optional transaction. |
|
||||
|
||||
**Returns**
|
||||
|
||||
@@ -120,6 +124,7 @@ Returns the full detail of an article by its SKU, including unit, brand, categor
|
||||
| --- | --- | --- |
|
||||
| `googleAuthId` | `number` | The id of the Google auth user. |
|
||||
| `sku` | `string` | The article SKU. |
|
||||
| `[tx]` | `object` | Optional transaction. |
|
||||
|
||||
**Returns**
|
||||
|
||||
@@ -148,6 +153,7 @@ Returns the change history of an article by its SKU.
|
||||
| --- | --- | --- |
|
||||
| `googleAuthId` | `number` | The id of the Google auth user. |
|
||||
| `sku` | `string` | The article SKU. |
|
||||
| `[tx]` | `object` | Optional transaction. |
|
||||
|
||||
**Returns**
|
||||
|
||||
@@ -184,6 +190,7 @@ Imports article rows, creating articles by their SKU and returning per-row impor
|
||||
| `[input.rows[].eans]` | `Array<string>|string` | The EANs to set. |
|
||||
| `[input.rows[].fatherSku]` | `string` | The father article SKU for a V/K compound link. |
|
||||
| `[input.rows[].deposit]` | `number|string` | The deposit (Pfand) value; currently ignored. |
|
||||
| `[tx]` | `object` | Optional transaction. |
|
||||
|
||||
**Returns**
|
||||
|
||||
@@ -214,6 +221,7 @@ Returns articles for export, optionally scoped to a category, including category
|
||||
| --- | --- | --- |
|
||||
| `googleAuthId` | `number` | The id of the Google auth user. |
|
||||
| `[categoryId]` | `number|null` | Optional category id to scope the export to; defaults to the company root. |
|
||||
| `[tx]` | `object` | Optional transaction. |
|
||||
|
||||
**Returns**
|
||||
|
||||
@@ -241,6 +249,7 @@ Returns a lightweight search index of all articles for the user's selected compa
|
||||
| Name | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| `googleAuthId` | `number` | The id of the Google auth user. |
|
||||
| `[tx]` | `object` | Optional transaction. |
|
||||
|
||||
**Returns**
|
||||
|
||||
@@ -267,6 +276,7 @@ Reorders the images of an article by its SKU.
|
||||
| `sku` | `string` | The article SKU. |
|
||||
| `input` | `object` | The reorder input. |
|
||||
| `input.fullHashes` | `Array<string>` | The full image hashes in their new order. |
|
||||
| `[tx]` | `object` | Optional transaction to run within. |
|
||||
|
||||
**Returns**
|
||||
|
||||
@@ -296,6 +306,7 @@ Sets (or clears) the brand of an article by its SKU.
|
||||
| `googleAuthId` | `number` | The id of the Google auth user. |
|
||||
| `sku` | `string` | The article SKU. |
|
||||
| `brandId` | `number|null` | The brand id, or `null` to clear the brand. |
|
||||
| `[tx]` | `object` | Optional transaction. |
|
||||
|
||||
**Returns**
|
||||
|
||||
@@ -325,6 +336,7 @@ Replaces the category membership of an article by its SKU.
|
||||
| `googleAuthId` | `number` | The id of the Google auth user. |
|
||||
| `sku` | `string` | The article SKU. |
|
||||
| `categoryIds` | `Array<number>` | The category ids the article should belong to (at least one). |
|
||||
| `[tx]` | `object` | Optional transaction to run within. |
|
||||
|
||||
**Returns**
|
||||
|
||||
@@ -354,6 +366,7 @@ Replaces the EAN list of an article by its SKU.
|
||||
| `googleAuthId` | `number` | The id of the Google auth user. |
|
||||
| `sku` | `string` | The article SKU. |
|
||||
| `eans` | `Array<string>` | The EANs to set (must be unique, non-empty strings). |
|
||||
| `[tx]` | `object` | Optional transaction to run within. |
|
||||
|
||||
**Returns**
|
||||
|
||||
@@ -383,6 +396,7 @@ Links an article to a father article (V/K compound) by their SKUs.
|
||||
| `googleAuthId` | `number` | The id of the Google auth user. |
|
||||
| `sku` | `string` | The child article SKU. |
|
||||
| `fatherSku` | `string|null` | The father article SKU, or `null` to unlink. |
|
||||
| `[tx]` | `object` | Optional transaction to run within. |
|
||||
|
||||
**Returns**
|
||||
|
||||
@@ -412,6 +426,7 @@ Replaces the price list of an article by its SKU.
|
||||
| `googleAuthId` | `number` | The id of the Google auth user. |
|
||||
| `sku` | `string` | The article SKU. |
|
||||
| `prices` | `Array<{price: number, tax: number, minmultiplier?: number}>` | The price entries (minmultiplier defaults to 1). |
|
||||
| `[tx]` | `object` | Optional transaction to run within. |
|
||||
|
||||
**Returns**
|
||||
|
||||
@@ -441,6 +456,7 @@ Sets the weight of an article by its SKU.
|
||||
| `googleAuthId` | `number` | The id of the Google auth user. |
|
||||
| `sku` | `string` | The article SKU. |
|
||||
| `weight` | `number` | The weight (must be >= 0). |
|
||||
| `[tx]` | `object` | Optional transaction. |
|
||||
|
||||
**Returns**
|
||||
|
||||
@@ -473,6 +489,7 @@ Updates an article's name and/or unit (SI and amount), recording history.
|
||||
| `[patch.name]` | `string` | The new article name. |
|
||||
| `[patch.unitSi]` | `string` | The new unit SI code. |
|
||||
| `[patch.unitamount]` | `number` | The new unit amount (must be > 0). |
|
||||
| `[tx]` | `object` | Optional transaction to run within. |
|
||||
|
||||
**Returns**
|
||||
|
||||
|
||||
Reference in New Issue
Block a user