u
This commit is contained in:
@@ -95,6 +95,11 @@ 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. |
|
||||
| `[input.description]` | `string` | The article description. |
|
||||
| `[input.desc]` | `string` | Alias for description. |
|
||||
| `[input.seo]` | `object|string` | The SEO configuration or JSON string. |
|
||||
| `[input.seoTitle]` | `string` | The SEO title. |
|
||||
| `[input.seoDescription]` | `string` | The SEO meta description. |
|
||||
| `[input.track_stock=true]` | `boolean|number` | Whether inventory stock is tracked. |
|
||||
| `[tx]` | `object` | Optional transaction to run within. |
|
||||
|
||||
@@ -184,7 +189,7 @@ Returns the full detail of an article by its SKU, including unit, brand, categor
|
||||
|
||||
**Returns**
|
||||
|
||||
`Promise<{article: {id: number, sku: string, name: string, slug: string, unitamount: number|null, weight: number|null, track_stock: boolean, unit: {si: string|null, basesi: string|null, basesifactor: number|null, symbol: string|null, name: string|null}, brand: {id: number|null, name: string, fullHash: string|null, thumbW: number|null, thumbH: number|null, thumbHash: string|null}|null, categoryIds: number[], photos: Array<{sort: number, fullHash: string, fullW: number, fullH: number, fullSize: number, thumbW: number, thumbH: number, thumbHash: string}>, eans: string[], prices: Array<{minmultiplier: number, net: number, taxRate: number, customergroupId: number}>, suppliers: Array<{id: number, articleId: number, entityId: number, supplierName: string|null, sku: string|null, pu: number, stock: number|null, sort: number, price: {net: number, taxId: number, taxRate?: number}|null}>, optionsCount: number, articleListCount: number, childCount: number, parentArticleId: number|null, parentSku: string|null}}>` — The full article detail.
|
||||
`Promise<{article: {id: number, sku: string, name: string, slug: string, description: string|null, seo: string|null, seoTitle: string|null, seoDescription: string|null, unitamount: number|null, weight: number|null, track_stock: boolean, unit: {si: string|null, basesi: string|null, basesifactor: number|null, symbol: string|null, name: string|null}, brand: {id: number|null, name: string, fullHash: string|null, thumbW: number|null, thumbH: number|null, thumbHash: string|null}|null, categoryIds: number[], photos: Array<{sort: number, fullHash: string, fullW: number, fullH: number, fullSize: number, thumbW: number, thumbH: number, thumbHash: string}>, eans: string[], prices: Array<{minmultiplier: number, net: number, taxRate: number, customergroupId: number}>, suppliers: Array<{id: number, articleId: number, entityId: number, supplierName: string|null, sku: string|null, pu: number, stock: number|null, sort: number, price: {net: number, taxId: number, taxRate?: number}|null}>, optionsCount: number, articleListCount: number, childCount: number, parentArticleId: number|null, parentSku: string|null}}>` — The full article detail.
|
||||
|
||||
**Throws**
|
||||
|
||||
@@ -664,6 +669,11 @@ Updates an article's name and/or unit (SI and amount), recording history.
|
||||
| `sku` | `string` | The article SKU. |
|
||||
| `patch` | `object` | The update patch. |
|
||||
| `[patch.name]` | `string` | The new article name. |
|
||||
| `[patch.description]` | `string` | The article description. |
|
||||
| `[patch.desc]` | `string` | Alias for description. |
|
||||
| `[patch.seo]` | `object|string` | The SEO configuration or JSON string. |
|
||||
| `[patch.seoTitle]` | `string` | The SEO title. |
|
||||
| `[patch.seoDescription]` | `string` | The SEO meta description. |
|
||||
| `[patch.unitSi]` | `string` | The new unit SI code. |
|
||||
| `[patch.unitamount]` | `number` | The new unit amount (must be > 0). |
|
||||
| `[patch.track_stock]` | `boolean|number` | Whether inventory stock is tracked. |
|
||||
|
||||
Reference in New Issue
Block a user