Compare commits
6 Commits
65c908f44e
...
18fa62514a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
18fa62514a | ||
|
|
07206674c1 | ||
|
|
70c7d5eff2 | ||
|
|
4f367ee943 | ||
|
|
c77297af72 | ||
|
|
9bc6d55e85 |
@@ -140,48 +140,43 @@ Params: path values first, then `query:` and `body:` (`body?` = optional body).
|
|||||||
|
|
||||||
### Reusable types
|
### Reusable types
|
||||||
|
|
||||||
- `T1` = `{ id: int, number: str, type: str, entityId: int, date: str, lines: T20[], externalNumber?: str|null, createdAt?: str, shipping?: T19|null, shippings?: T19[], payment?: T31|null, payments?: T31[], paid?: bool, shipped?: bool, delivered?: bool, orderTotal?: num, paidTotal?: num, orderedQuantity?: num, shippedQuantity?: num, shipments?: T3[], files?: T10[] }`
|
- `T1` = `{ id: int, number: str, type: str, entityId: int, date: str, lines: T19[], externalNumber?: str|null, createdAt?: str, shipping?: T18|null, shippings?: T18[], payment?: T28|null, payments?: T28[], paid?: bool, shipped?: bool, delivered?: bool, orderTotal?: num, paidTotal?: num, orderedQuantity?: num, shippedQuantity?: num, shipments?: T2[], files?: T9[] }`
|
||||||
- `T2` = `{ id: int, sku: str, name: str, slug: str, desc: str|null, seo: str|null, track_stock: bool, unitamount: num|null, weight: num|null, unit: T28, brand: T26|null, categoryIds: int[], photos: T24[], eans: str[], prices: T36[], suppliers: T8[], undeliveredOrders: T27[] }`
|
- `T2` = `{ id: int, number: str, type: str, date: str, lines: T19[], shippings: T18[], entityId?: int|null, externalNumber?: str|null, createdAt?: str|null, lineCount?: int, packageCount?: int, files?: T9[], state?: str }`
|
||||||
- `T3` = `{ id: int, number: str, type: str, date: str, lines: T20[], shippings: T19[], entityId?: int|null, externalNumber?: str|null, createdAt?: str|null, lineCount?: int, packageCount?: int, files?: T10[], state?: str }`
|
- `T3` = `{ id: int, number: str, type: str, date: str, lines: T19[], entityId?: int|null, externalNumber?: str|null, createdAt?: str, positions?: int, grossTotal?: num, totalQuantity?: num, customerName?: str|null, files?: T9[] }`
|
||||||
- `T4` = `{ id: int, number: str, type: str, date: str, lines: T20[], entityId?: int|null, externalNumber?: str|null, createdAt?: str, positions?: int, grossTotal?: num, totalQuantity?: num, customerName?: str|null, files?: T10[] }`
|
- `T4` = `{ id: int, number: str, type: str, supplierId: int, date: str, lines: T19[], files: T9[], externalNumber?: str|null, createdAt?: str, ledger?: T35 }`
|
||||||
- `T5` = `{ id: int, number: str, type: str, supplierId: int, date: str, lines: T20[], files: T10[], externalNumber?: str|null, createdAt?: str, ledger?: T40 }`
|
- `T5` = `{ name: str, path: str, totalSizeBytes: int, timestamp: str|null, manifest?: T6|null }`
|
||||||
- `T6` = `{ name: str, path: str, totalSizeBytes: int, timestamp: str|null, manifest?: T7|null }`
|
- `T6` = `{ id: str, timestamp: str, dateKey: str, monthKey: str, dbProvider: str, files: T11, totalSizeBytes: int, durationMs: int }`
|
||||||
- `T7` = `{ id: str, timestamp: str, dateKey: str, monthKey: str, dbProvider: str, files: T12, totalSizeBytes: int, durationMs: int }`
|
- `T7` = `{ id: int, articleId: int, entityId: int, pu: num, sort: int, supplierName?: str|null, sku?: str|null, stock?: num|null, priceId?: int|null, price?: T37|null, incoming?: { date: str, amount: num }[] }`
|
||||||
- `T8` = `{ id: int, articleId: int, entityId: int, pu: num, sort: int, supplierName?: str|null, sku?: str|null, stock?: num|null, priceId?: int|null, price?: T42|null, incoming?: { date: str, amount: num }[] }`
|
- `T8` = `{ id: int, name: str, width: num, height: num, dpi: int, type: str, content: { objects: T20[] }, thumb?: str|null }`
|
||||||
- `T9` = `{ id: int, name: str, width: num, height: num, dpi: int, type: str, content: { objects: T21[] }, thumb?: str|null }`
|
- `T9` = `{ id: int, manifestId: int, fileId: int, sort: int, hash: str, mimetype: str, name: str, size: int, created?: str, modified?: str, skeledash?: str|null, thumbx?: int|null, thumby?: int|null, meta?: { [k]: str }|null }`
|
||||||
- `T10` = `{ id: int, manifestId: int, fileId: int, sort: int, hash: str, mimetype: str, name: str, size: int, created?: str, modified?: str, skeledash?: str|null, thumbx?: int|null, thumby?: int|null, meta?: { [k]: str }|null }`
|
- `T10` = `{ id: int, name: str, pairingpin?: str|null, token?: str|null, pairedAt?: str|null, clientserial?: str|null, rootCategoryId?: int|null, syncRootArticles?: bool, lastseenAt?: str|null, updatedAt?: str|null, categoryIds?: int[] }`
|
||||||
- `T11` = `{ id: int, name: str, pairingpin?: str|null, token?: str|null, pairedAt?: str|null, clientserial?: str|null, rootCategoryId?: int|null, syncRootArticles?: bool, lastseenAt?: str|null, updatedAt?: str|null, categoryIds?: int[] }`
|
- `T11` = `{ vfs: T36, storage: T36, database: T30 }`
|
||||||
- `T12` = `{ vfs: T41, storage: T41, database: T34 }`
|
- `T12` = `{ id: int, entityId: int, addressType: str, firstName?: str|null, name?: str|null, street?: str|null, streetNumber?: str|null, zip?: str|null, city?: str|null, county?: str|null }`
|
||||||
- `T13` = `{ id: int, entityId: int, addressType: str, firstName?: str|null, name?: str|null, street?: str|null, streetNumber?: str|null, zip?: str|null, city?: str|null, county?: str|null }`
|
- `T13` = `{ id: int, company_id: int, prompt: str, max_itr: int, cron: str, created_at: str, desc?: str|null, skills?: str|null, lastagentnote?: str|null, lastrun_at?: str|null }`
|
||||||
- `T14` = `{ id: int, company_id: int, prompt: str, max_itr: int, cron: str, created_at: str, desc?: str|null, skills?: str|null, lastagentnote?: str|null, lastrun_at?: str|null }`
|
- `T14` = `{ id: int, manifestarticle_id: int, transaction_type: str, amount: num, transaction_text: str, hash_version: int, prev_hash?: str, sku?: str|null, created_at?: str }`
|
||||||
- `T15` = `{ id: int, manifestarticle_id: int, transaction_type: str, amount: num, transaction_text: str, hash_version: int, prev_hash?: str, sku?: str|null, created_at?: str }`
|
- `T15` = `{ id: int, name: str, sort: int, exclusive: bool, values: T26[], articleCount?: int }`
|
||||||
- `T16` = `{ id: int, name: str, sort: int, exclusive: bool, values: T29[], articleCount?: int }`
|
- `T16` = `{ id: int, companyuser_id: int, provider: str, model: str, created_at: str, updated_at: str, state: str, started_by?: int|null, first_message?: str|null }`
|
||||||
- `T17` = `{ id: int, companyuser_id: int, provider: str, model: str, created_at: str, updated_at: str, state: str, started_by?: int|null, first_message?: str|null }`
|
- `T17` = `{ id: int, name: str, rootCategoryId: int|null, languageId: int|null, iso639: str|null, taxrate: num, reducedtaxrate: num, taxfreerate: num }`
|
||||||
- `T18` = `{ id: int, name: str, rootCategoryId: int|null, languageId: int|null, iso639: str|null, taxrate: num, reducedtaxrate: num, taxfreerate: num }`
|
- `T18` = `{ id: int, manifestId: int, number: str, carrierId: int, type: str, state: str, trackingCode?: str|null, carrier?: str|null }`
|
||||||
- `T19` = `{ id: int, manifestId: int, number: str, carrierId: int, type: str, state: str, trackingCode?: str|null, carrier?: str|null }`
|
- `T19` = `{ id: int, sku: str|null, name: str|null, pu: num, amount: num, net: num, rebate: num, taxrate: num, comment: str|null }`
|
||||||
- `T20` = `{ id: int, sku: str|null, name: str|null, pu: num, amount: num, net: num, rebate: num, taxrate: num, comment: str|null }`
|
- `T20` = `{ id: str, type: str, x: num, y: num, w?: num, h?: num, text?: str, font?: str, fontSize?: num, barcodeFormat?: str }`
|
||||||
- `T21` = `{ id: str, type: str, x: num, y: num, w?: num, h?: num, text?: str, font?: str, fontSize?: num, barcodeFormat?: str }`
|
- `T21` = `{ id: int, company_id: int, address: str, type: str, sort: int, model?: str|null, serial?: str|null, desc?: str|null }`
|
||||||
- `T22` = `{ id: int, company_id: int, address: str, type: str, sort: int, model?: str|null, serial?: str|null, desc?: str|null }`
|
- `T22` = `{ amount: num, net: num, taxrate: num, sku?: str|null, name?: str|null, pu?: num, rebate?: num, comment?: str|null }`
|
||||||
- `T23` = `{ amount: num, net: num, taxrate: num, sku?: str|null, name?: str|null, pu?: num, rebate?: num, comment?: str|null }`
|
- `T23` = `{ id: int, customergroupId: int, firstName: str|null, name: str, number: str|null, createdAt: str, updatedAt: str }`
|
||||||
- `T24` = `{ sort: int, fullHash: str, fullW: int, fullH: int, fullSize: int, thumbW: int, thumbH: int, thumbHash: str }`
|
- `T24` = `{ name: str, id?: int|null, fullHash?: str|null, thumbW?: int|null, thumbH?: int|null, thumbHash?: str|null }`
|
||||||
- `T25` = `{ id: int, customergroupId: int, firstName: str|null, name: str, number: str|null, createdAt: str, updatedAt: str }`
|
- `T25` = `{ si: str, basesi: str, basesifactor: num, symbol?: str|null, name?: str|null }`
|
||||||
- `T26` = `{ name: str, id?: int|null, fullHash?: str|null, thumbW?: int|null, thumbH?: int|null, thumbHash?: str|null }`
|
- `T26` = `{ id: int, attributeId: int, value: str, sort: int, articleCount?: int }`
|
||||||
- `T27` = `{ orderId: int, orderNumber: str, date: str, amount: num, customerName?: str|null }`
|
- `T27` = `{ id: int, name: str, sort: int, exclusive: bool, articleCount?: int }`
|
||||||
- `T28` = `{ si: str, basesi: str, basesifactor: num, symbol?: str|null, name?: str|null }`
|
- `T28` = `{ id: int, accountId: int, manifestId: int, type: str, amount: num }`
|
||||||
- `T29` = `{ id: int, attributeId: int, value: str, sort: int, articleCount?: int }`
|
- `T29` = `{ id: int, name: str, sort: int, hasPackages: bool, isReverse: bool }`
|
||||||
- `T30` = `{ id: int, name: str, sort: int, exclusive: bool, articleCount?: int }`
|
- `T30` = `{ name: str|null, sizeBytes: int, backedUp: bool, reason?: str|null }`
|
||||||
- `T31` = `{ id: int, accountId: int, manifestId: int, type: str, amount: num }`
|
- `T31` = `{ id: int, email: str, selectedCompanyId: int|null, picture?: str }`
|
||||||
- `T32` = `{ id: int, name: str, sort: int, hasPackages: bool, isReverse: bool }`
|
- `T32` = `{ fullHash: str, thumbW: int, thumbH: int, thumbHash: str }`
|
||||||
- `T33` = `{ id: int, categoryId: int, name: str, sku: str, track_stock: bool }`
|
- `T33` = `{ id: int, entityId: int, contactType: str, contact: str }`
|
||||||
- `T34` = `{ name: str|null, sizeBytes: int, backedUp: bool, reason?: str|null }`
|
- `T34` = `{ id: int, name: str, createdAt: str, updatedAt: str }`
|
||||||
- `T35` = `{ id: int, email: str, selectedCompanyId: int|null, picture?: str }`
|
- `T35` = `{ totalPositions: int, completelyOnLedgerPositions: int }`
|
||||||
- `T36` = `{ minmultiplier: num, net: num, taxRate: num, customergroupId: int }`
|
- `T36` = `{ name: str, sizeBytes: int, sourceExists: bool }`
|
||||||
- `T37` = `{ fullHash: str, thumbW: int, thumbH: int, thumbHash: str }`
|
- `T37` = `{ net: num, taxId: int, taxRate?: num|null }`
|
||||||
- `T38` = `{ id: int, entityId: int, contactType: str, contact: str }`
|
|
||||||
- `T39` = `{ id: int, name: str, createdAt: str, updatedAt: str }`
|
|
||||||
- `T40` = `{ totalPositions: int, completelyOnLedgerPositions: int }`
|
|
||||||
- `T41` = `{ name: str, sizeBytes: int, sourceExists: bool }`
|
|
||||||
- `T42` = `{ net: num, taxId: int, taxRate?: num|null }`
|
|
||||||
|
|
||||||
### Routes
|
### Routes
|
||||||
|
|
||||||
@@ -211,7 +206,7 @@ _none_
|
|||||||
|
|
||||||
#### Create article in category — `POST /article`
|
#### Create article in category — `POST /article`
|
||||||
- Params: `body: { categoryId: int, name: str, desc?: str, seo?: str, track_stock?: bool }`
|
- Params: `body: { categoryId: int, name: str, desc?: str, seo?: str, track_stock?: bool }`
|
||||||
- Returns: `201 { article: T33 }`
|
- Returns: `201 { sku: str }`
|
||||||
#### Export articles as ZIP — `GET /article/export.zip`
|
#### Export articles as ZIP — `GET /article/export.zip`
|
||||||
- Params: `query: categoryId?: int`
|
- Params: `query: categoryId?: int`
|
||||||
- Returns: `200 zip`
|
- Returns: `200 zip`
|
||||||
@@ -223,10 +218,10 @@ _none_
|
|||||||
- Returns: `204 void`
|
- Returns: `204 void`
|
||||||
#### Get article by SKU — `GET /article/{sku}`
|
#### Get article by SKU — `GET /article/{sku}`
|
||||||
- Params: `sku: str`
|
- Params: `sku: str`
|
||||||
- Returns: `200 { article: T2 }`
|
- Returns: `200 { article: { id: int, sku: str, name: str, slug: str, desc: str|null, seo: str|null, track_stock: bool, unitamount: num|null, weight: num|null, unit: T25, brand: T24|null, categoryIds: int[], photos: { sort: int, fullHash: str, fullW: int, fullH: int, fullSize: int, thumbW: int, thumbH: int, thumbHash: str }[], eans: str[], prices: { minmultiplier: num, net: num, taxRate: num, customergroupId: int }[], suppliers: T7[], undeliveredOrders: { orderId: int, orderNumber: str, date: str, amount: num, customerName?: str|null }[] } }`
|
||||||
#### Update article by SKU — `PATCH /article/{sku}`
|
#### Update article by SKU — `PATCH /article/{sku}`
|
||||||
- Params: `sku: str, body: { name?: str, desc?: str, seo?: str, unitamount?: num, unitSi?: str, track_stock?: bool }`
|
- Params: `sku: str, body: { name?: str, desc?: str, seo?: str, unitamount?: num, unitSi?: str, track_stock?: bool }`
|
||||||
- Returns: `200 { article: T2 }`
|
- Returns: `204 void`
|
||||||
#### Get Stückliste (bundle items) for an article — `GET /article/{sku}/articlelist`
|
#### Get Stückliste (bundle items) for an article — `GET /article/{sku}/articlelist`
|
||||||
- Params: `sku: str`
|
- Params: `sku: str`
|
||||||
- Returns: `200 { items: { id: int, articleId: int, sku: str, name: str, count: int, sort: int }[] }`
|
- Returns: `200 { items: { id: int, articleId: int, sku: str, name: str, count: int, sort: int }[] }`
|
||||||
@@ -241,25 +236,25 @@ _none_
|
|||||||
- Returns: `200 { attributevalues: { id: int, attributeId: int, attributeName: str, attributeValueId: int, value: str, sort: int, articleId?: int, exclusive?: bool }[] }`
|
- Returns: `200 { attributevalues: { id: int, attributeId: int, attributeName: str, attributeValueId: int, value: str, sort: int, articleId?: int, exclusive?: bool }[] }`
|
||||||
#### Set or clear article brand by SKU (null to clear) — `PUT /article/{sku}/brand`
|
#### Set or clear article brand by SKU (null to clear) — `PUT /article/{sku}/brand`
|
||||||
- Params: `sku: str, body: { brandId: int|null }`
|
- Params: `sku: str, body: { brandId: int|null }`
|
||||||
- Returns: `200 { article: T2 }`
|
- Returns: `204 void`
|
||||||
#### Replace article categories by SKU — `PUT /article/{sku}/categories`
|
#### Replace article categories by SKU — `PUT /article/{sku}/categories`
|
||||||
- Params: `sku: str, body: { categoryIds: int[] }`
|
- Params: `sku: str, body: { categoryIds: int[] }`
|
||||||
- Returns: `200 { article: T2 }`
|
- Returns: `204 void`
|
||||||
#### List child articles of a parent article — `GET /article/{sku}/children`
|
#### List child articles of a parent article — `GET /article/{sku}/children`
|
||||||
- Params: `sku: str`
|
- Params: `sku: str`
|
||||||
- Returns: `200 { children: { id: int, sku: str, name: str, parentsort: int, attributeValueId: int, attributeValue: str }[] }`
|
- Returns: `200 { children: { id: int, sku: str, name: str, parentsort: int, attributeValueId: int, attributeValue: str }[] }`
|
||||||
#### Create and attach a new child article to a parent article — `POST /article/{sku}/children`
|
#### Create and attach a new child article to a parent article — `POST /article/{sku}/children`
|
||||||
- Params: `sku: str, body: { attributeValueId?: int, value?: str, name?: str }`
|
- Params: `sku: str, body: { attributeValueId?: int, value?: str, name?: str }`
|
||||||
- Returns: `201 { article: T33 }`
|
- Returns: `201 { sku: str }`
|
||||||
#### Attach an existing article as a child to a parent article — `PUT /article/{sku}/children`
|
#### Attach an existing article as a child to a parent article — `PUT /article/{sku}/children`
|
||||||
- Params: `sku: str, body: { sku: str, attributeValueId?: int, value?: str, reparent?: bool }`
|
- Params: `sku: str, body: { sku: str, attributeValueId?: int, value?: str, reparent?: bool }`
|
||||||
- Returns: `200 { article: T33, children: { id: int, sku: str, name: str, parentsort: int, attributeValueId: int, attributeValue: str }[] }`
|
- Returns: `200 { children: { id: int, sku: str, name: str, parentsort: int, attributeValueId: int, attributeValue: str }[] }`
|
||||||
#### Remove a child article from a parent article — `DELETE /article/{sku}/children/{childSku}`
|
#### Remove a child article from a parent article — `DELETE /article/{sku}/children/{childSku}`
|
||||||
- Params: `sku: str, childSku: str, query: deleteArticle?: bool`
|
- Params: `sku: str, childSku: str, query: deleteArticle?: bool`
|
||||||
- Returns: `200 { success: bool, deleted: bool }`
|
- Returns: `200 { success: bool, deleted: bool }`
|
||||||
#### Replace article EANs by SKU — `PUT /article/{sku}/eans`
|
#### Replace article EANs by SKU — `PUT /article/{sku}/eans`
|
||||||
- Params: `sku: str, body: { eans: str[] }`
|
- Params: `sku: str, body: { eans: str[] }`
|
||||||
- Returns: `200 { article: T2 }`
|
- Returns: `204 void`
|
||||||
#### Get article history by SKU — `GET /article/{sku}/history`
|
#### Get article history by SKU — `GET /article/{sku}/history`
|
||||||
- Params: `sku: str, query: limit?: int`
|
- Params: `sku: str, query: limit?: int`
|
||||||
- Returns: `200 { history: { id: int, date: str, text: str }[], truncated: bool }`
|
- Returns: `200 { history: { id: int, date: str, text: str }[], truncated: bool }`
|
||||||
@@ -280,10 +275,10 @@ _none_
|
|||||||
- Returns: `200 { options: { id: int, articleId: int, sku: str, name: str, count: int, sort: int, mandated: bool }[] }`
|
- Returns: `200 { options: { id: int, articleId: int, sku: str, name: str, count: int, sort: int, mandated: bool }[] }`
|
||||||
#### Toggle parent mode for an article — `POST /article/{sku}/parent`
|
#### Toggle parent mode for an article — `POST /article/{sku}/parent`
|
||||||
- Params: `sku: str, body: { isParent: bool, attributeNameId?: int }`
|
- Params: `sku: str, body: { isParent: bool, attributeNameId?: int }`
|
||||||
- Returns: `200 { article: T33 }`
|
- Returns: `204 void`
|
||||||
#### Replace POS prices by SKU (net > gross; price=net, tax=taxRate %) — `PUT /article/{sku}/prices`
|
#### Replace POS prices by SKU (net > gross; price=net, tax=taxRate %) — `PUT /article/{sku}/prices`
|
||||||
- Params: `sku: str, body: { prices: { net?: num, gross?: num, price?: num, taxRate?: num, tax?: num, minmultiplier?: num }[] }`
|
- Params: `sku: str, body: { prices: { net?: num, gross?: num, price?: num, taxRate?: num, tax?: num, minmultiplier?: num }[] }`
|
||||||
- Returns: `200 { article: T2 }`
|
- Returns: `204 void`
|
||||||
#### Print article label — `POST /article/{sku}/print`
|
#### Print article label — `POST /article/{sku}/print`
|
||||||
- Params: `sku: str, body: { templateId: int, printerId: int, quantity: int }`
|
- Params: `sku: str, body: { templateId: int, printerId: int, quantity: int }`
|
||||||
- Returns: `200 { success: bool }`
|
- Returns: `200 { success: bool }`
|
||||||
@@ -298,10 +293,10 @@ _none_
|
|||||||
- Returns: `200 { ok: bool }`
|
- Returns: `200 { ok: bool }`
|
||||||
#### List article suppliers — `GET /article/{sku}/supplier`
|
#### List article suppliers — `GET /article/{sku}/supplier`
|
||||||
- Params: `sku: str`
|
- Params: `sku: str`
|
||||||
- Returns: `200 { suppliers: T8[] }`
|
- Returns: `200 { suppliers: T7[] }`
|
||||||
#### Assign supplier to article — `POST /article/{sku}/supplier`
|
#### Assign supplier to article — `POST /article/{sku}/supplier`
|
||||||
- Params: `sku: str, body: { entityId: int, sku?: str|null, pu?: num, stock?: num|null, sort?: int|null, netPrice?: num|null, taxId?: int|null, taxRate?: num|null }`
|
- Params: `sku: str, body: { entityId: int, sku?: str|null, pu?: num, stock?: num|null, sort?: int|null, netPrice?: num|null, taxId?: int|null, taxRate?: num|null }`
|
||||||
- Returns: `201 { supplier: T8 }`
|
- Returns: `201 { supplier: T7 }`
|
||||||
#### Reorder article suppliers — `PUT /article/{sku}/supplier/order`
|
#### Reorder article suppliers — `PUT /article/{sku}/supplier/order`
|
||||||
- Params: `sku: str, body: { ids: int[] }`
|
- Params: `sku: str, body: { ids: int[] }`
|
||||||
- Returns: `200 { ids: int[] }`
|
- Returns: `200 { ids: int[] }`
|
||||||
@@ -310,31 +305,31 @@ _none_
|
|||||||
- Returns: `204 void`
|
- Returns: `204 void`
|
||||||
#### Update article supplier assignment — `PATCH /article/{sku}/supplier/{id}`
|
#### Update article supplier assignment — `PATCH /article/{sku}/supplier/{id}`
|
||||||
- Params: `sku: str, id: int, body: { sku?: str|null, pu?: num, stock?: num|null, sort?: int, netPrice?: num|null, taxId?: int|null, taxRate?: num|null }`
|
- Params: `sku: str, id: int, body: { sku?: str|null, pu?: num, stock?: num|null, sort?: int, netPrice?: num|null, taxId?: int|null, taxRate?: num|null }`
|
||||||
- Returns: `200 { supplier: T8 }`
|
- Returns: `200 { supplier: T7 }`
|
||||||
#### Set article track_stock flag by SKU — `PUT /article/{sku}/track_stock`
|
#### Set article track_stock flag by SKU — `PUT /article/{sku}/track_stock`
|
||||||
- Params: `sku: str, body: { track_stock: bool }`
|
- Params: `sku: str, body: { track_stock: bool }`
|
||||||
- Returns: `200 { article: T2 }`
|
- Returns: `204 void`
|
||||||
#### Set article weight by SKU — `PUT /article/{sku}/weight`
|
#### Set article weight by SKU — `PUT /article/{sku}/weight`
|
||||||
- Params: `sku: str, body: { weight: num }`
|
- Params: `sku: str, body: { weight: num }`
|
||||||
- Returns: `200 { article: T2 }`
|
- Returns: `204 void`
|
||||||
|
|
||||||
### Section: /attributename
|
### Section: /attributename
|
||||||
|
|
||||||
#### List attribute names — `GET /attributename`
|
#### List attribute names — `GET /attributename`
|
||||||
_none_
|
_none_
|
||||||
- Returns: `200 { attributenames: T16[] }`
|
- Returns: `200 { attributenames: T15[] }`
|
||||||
#### Create attribute name — `POST /attributename`
|
#### Create attribute name — `POST /attributename`
|
||||||
- Params: `body: { name: str, sort?: int, exclusive?: bool }`
|
- Params: `body: { name: str, sort?: int, exclusive?: bool }`
|
||||||
- Returns: `201 { attributename: T16 }`
|
- Returns: `201 { attributename: T15 }`
|
||||||
#### Reorder attribute names — `PUT /attributename/order`
|
#### Reorder attribute names — `PUT /attributename/order`
|
||||||
- Params: `body: { attributenameIds: int[] }`
|
- Params: `body: { attributenameIds: int[] }`
|
||||||
- Returns: `200 { ok: bool }`
|
- Returns: `200 { ok: bool }`
|
||||||
#### List values for an attribute — `GET /attributename/{attributeId}/value`
|
#### List values for an attribute — `GET /attributename/{attributeId}/value`
|
||||||
- Params: `attributeId: int`
|
- Params: `attributeId: int`
|
||||||
- Returns: `200 { values: T29[] }`
|
- Returns: `200 { values: T26[] }`
|
||||||
#### Create value for an attribute — `POST /attributename/{attributeId}/value`
|
#### Create value for an attribute — `POST /attributename/{attributeId}/value`
|
||||||
- Params: `attributeId: int, body: { value: str, sort?: int }`
|
- Params: `attributeId: int, body: { value: str, sort?: int }`
|
||||||
- Returns: `201 { attributevalue: T29 }`
|
- Returns: `201 { attributevalue: T26 }`
|
||||||
#### Reorder values of an attribute — `PUT /attributename/{attributeId}/value/order`
|
#### Reorder values of an attribute — `PUT /attributename/{attributeId}/value/order`
|
||||||
- Params: `attributeId: int, body: { attributevalueIds: int[] }`
|
- Params: `attributeId: int, body: { attributevalueIds: int[] }`
|
||||||
- Returns: `200 { ok: bool }`
|
- Returns: `200 { ok: bool }`
|
||||||
@@ -343,7 +338,7 @@ _none_
|
|||||||
- Returns: `200 { ok: bool }`
|
- Returns: `200 { ok: bool }`
|
||||||
#### Update attribute name — `PATCH /attributename/{id}`
|
#### Update attribute name — `PATCH /attributename/{id}`
|
||||||
- Params: `id: int, body: { name?: str, sort?: int, exclusive?: bool }`
|
- Params: `id: int, body: { name?: str, sort?: int, exclusive?: bool }`
|
||||||
- Returns: `200 { attributename: T16 }`
|
- Returns: `200 { attributename: T15 }`
|
||||||
|
|
||||||
### Section: /attributevalue
|
### Section: /attributevalue
|
||||||
|
|
||||||
@@ -352,34 +347,34 @@ _none_
|
|||||||
- Returns: `200 { ok: bool }`
|
- Returns: `200 { ok: bool }`
|
||||||
#### Update attribute value — `PATCH /attributevalue/{id}`
|
#### Update attribute value — `PATCH /attributevalue/{id}`
|
||||||
- Params: `id: int, body: { value?: str, sort?: int }`
|
- Params: `id: int, body: { value?: str, sort?: int }`
|
||||||
- Returns: `200 { attributevalue: T29 }`
|
- Returns: `200 { attributevalue: T26 }`
|
||||||
#### Delete attribute value image — `DELETE /attributevalue/{id}/image`
|
#### Delete attribute value image — `DELETE /attributevalue/{id}/image`
|
||||||
- Params: `id: int`
|
- Params: `id: int`
|
||||||
- Returns: `200 { attributevalue: { id: int, thumbW: int|null, thumbH: int|null, thumbHash: str|null, pics: T37[] } }`
|
- Returns: `200 { attributevalue: { id: int, thumbW: int|null, thumbH: int|null, thumbHash: str|null, pics: T32[] } }`
|
||||||
#### Add or replace attribute value image — `POST /attributevalue/{id}/image`
|
#### Add or replace attribute value image — `POST /attributevalue/{id}/image`
|
||||||
- Params: `id: int, image/avif`
|
- Params: `id: int, image/avif`
|
||||||
- Returns: `201 { attributevalue: { id: int, fullHash: str, thumbW: int, thumbH: int, thumbHash: str, pics: T37[] } }`
|
- Returns: `201 { attributevalue: { id: int, fullHash: str, thumbW: int, thumbH: int, thumbHash: str, pics: T32[] } }`
|
||||||
|
|
||||||
### Section: /auth
|
### Section: /auth
|
||||||
|
|
||||||
#### Login with Google ID token — `POST /auth/login`
|
#### Login with Google ID token — `POST /auth/login`
|
||||||
- Params: `body: { idToken: str }`
|
- Params: `body: { idToken: str }`
|
||||||
- Returns: `200 { message: str, user: T35 }`
|
- Returns: `200 { message: str, user: T31 }`
|
||||||
#### Logout — `POST /auth/logout`
|
#### Logout — `POST /auth/logout`
|
||||||
_none_
|
_none_
|
||||||
- Returns: `200 { message: str }`
|
- Returns: `200 { message: str }`
|
||||||
#### Current user — `GET /auth/me`
|
#### Current user — `GET /auth/me`
|
||||||
_none_
|
_none_
|
||||||
- Returns: `200 { user: T35, googleClientId: str }`
|
- Returns: `200 { user: T31, googleClientId: str }`
|
||||||
#### Set selected company — `PUT /auth/selected-company`
|
#### Set selected company — `PUT /auth/selected-company`
|
||||||
- Params: `body: { companyId: int }`
|
- Params: `body: { companyId: int }`
|
||||||
- Returns: `200 { user: T35 }`
|
- Returns: `200 { user: T31 }`
|
||||||
|
|
||||||
### Section: /backup
|
### Section: /backup
|
||||||
|
|
||||||
#### List backups and service status — `GET /backup`
|
#### List backups and service status — `GET /backup`
|
||||||
_none_
|
_none_
|
||||||
- Returns: `200 { status: { enabled: bool, isRunning: bool, dbProvider: str, mssqlWarning: bool, backupDir: str, retention: { hourlyMax: int, dailyMax: int, monthly: str }, counts: { hourly: int, daily: int, monthly: int }, latestHourly?: T6|null, latestDaily?: T6|null, latestMonthly?: T6|null }, backups: { counts: { hourly: int, daily: int, monthly: int }, hourly: T6[], daily: T6[], monthly: T6[] } }`
|
- Returns: `200 { status: { enabled: bool, isRunning: bool, dbProvider: str, mssqlWarning: bool, backupDir: str, retention: { hourlyMax: int, dailyMax: int, monthly: str }, counts: { hourly: int, daily: int, monthly: int }, latestHourly?: T5|null, latestDaily?: T5|null, latestMonthly?: T5|null }, backups: { counts: { hourly: int, daily: int, monthly: int }, hourly: T5[], daily: T5[], monthly: T5[] } }`
|
||||||
#### List VFS files in a backup — `GET /backup/{id}/vfs`
|
#### List VFS files in a backup — `GET /backup/{id}/vfs`
|
||||||
- Params: `id: str, query: companyId?: int`
|
- Params: `id: str, query: companyId?: int`
|
||||||
- Returns: `200 { backupId: str, companyId: int, files: { name: str, size: int, mime: str, mtime: str }[] }`
|
- Returns: `200 { backupId: str, companyId: int, files: { name: str, size: int, mime: str, mtime: str }[] }`
|
||||||
@@ -394,7 +389,7 @@ _none_
|
|||||||
- Returns: `200 { brands: { id: int, name: str, articleCount: int, pics: { fullHash: str, thumbW: int, thumbH: int, thumbHash: str, smallThumbW?: int|null, smallThumbH?: int|null, smallThumbBinary?: str|null }[], gsprpinfo?: str|null }[], total: int, offset: int, limit: int }`
|
- Returns: `200 { brands: { id: int, name: str, articleCount: int, pics: { fullHash: str, thumbW: int, thumbH: int, thumbHash: str, smallThumbW?: int|null, smallThumbH?: int|null, smallThumbBinary?: str|null }[], gsprpinfo?: str|null }[], total: int, offset: int, limit: int }`
|
||||||
#### Create brand — `POST /brand`
|
#### Create brand — `POST /brand`
|
||||||
- Params: `body: { name: str, gsprpinfo?: str }`
|
- Params: `body: { name: str, gsprpinfo?: str }`
|
||||||
- Returns: `201 { brand: { id: int, name: str, pics: T37[], gsprpinfo?: str|null } }`
|
- Returns: `201 { brand: { id: int, name: str, pics: T32[], gsprpinfo?: str|null } }`
|
||||||
#### Delete brand — `DELETE /brand/{id}`
|
#### Delete brand — `DELETE /brand/{id}`
|
||||||
- Params: `id: int`
|
- Params: `id: int`
|
||||||
- Returns: `204 void`
|
- Returns: `204 void`
|
||||||
@@ -403,19 +398,19 @@ _none_
|
|||||||
- Returns: `200 { brand: { id: int, name: str, touchedArticleCount: int, gsprpinfo?: str|null } }`
|
- Returns: `200 { brand: { id: int, name: str, touchedArticleCount: int, gsprpinfo?: str|null } }`
|
||||||
#### Delete brand image — `DELETE /brand/{id}/image`
|
#### Delete brand image — `DELETE /brand/{id}/image`
|
||||||
- Params: `id: int`
|
- Params: `id: int`
|
||||||
- Returns: `200 { brand: { id: int, thumbW: int|null, thumbH: int|null, thumbHash: str|null, pics: T37[] } }`
|
- Returns: `200 { brand: { id: int, thumbW: int|null, thumbH: int|null, thumbHash: str|null, pics: T32[] } }`
|
||||||
#### Add or replace brand image — `POST /brand/{id}/image`
|
#### Add or replace brand image — `POST /brand/{id}/image`
|
||||||
- Params: `id: int, image/avif`
|
- Params: `id: int, image/avif`
|
||||||
- Returns: `201 { brand: { id: int, fullHash: str, thumbW: int, thumbH: int, thumbHash: str, pics: T37[] } }`
|
- Returns: `201 { brand: { id: int, fullHash: str, thumbW: int, thumbH: int, thumbHash: str, pics: T32[] } }`
|
||||||
|
|
||||||
### Section: /carrier
|
### Section: /carrier
|
||||||
|
|
||||||
#### List carriers — `GET /carrier`
|
#### List carriers — `GET /carrier`
|
||||||
_none_
|
_none_
|
||||||
- Returns: `200 { carriers: T32[] }`
|
- Returns: `200 { carriers: T29[] }`
|
||||||
#### Create carrier — `POST /carrier`
|
#### Create carrier — `POST /carrier`
|
||||||
- Params: `body: { name: str, sort?: int, hasPackages?: bool, isReverse?: bool }`
|
- Params: `body: { name: str, sort?: int, hasPackages?: bool, isReverse?: bool }`
|
||||||
- Returns: `201 { carrier: T32 }`
|
- Returns: `201 { carrier: T29 }`
|
||||||
#### Reorder carriers — `PUT /carrier/order`
|
#### Reorder carriers — `PUT /carrier/order`
|
||||||
- Params: `body: { carrierIds: int[] }`
|
- Params: `body: { carrierIds: int[] }`
|
||||||
- Returns: `200 { carrierIds: int[] }`
|
- Returns: `200 { carrierIds: int[] }`
|
||||||
@@ -424,10 +419,10 @@ _none_
|
|||||||
- Returns: `204 void`
|
- Returns: `204 void`
|
||||||
#### Get carrier by ID — `GET /carrier/{id}`
|
#### Get carrier by ID — `GET /carrier/{id}`
|
||||||
- Params: `id: int`
|
- Params: `id: int`
|
||||||
- Returns: `200 { carrier: T32 }`
|
- Returns: `200 { carrier: T29 }`
|
||||||
#### Update carrier — `PATCH /carrier/{id}`
|
#### Update carrier — `PATCH /carrier/{id}`
|
||||||
- Params: `id: int, body: { name?: str, sort?: int, hasPackages?: bool, isReverse?: bool }`
|
- Params: `id: int, body: { name?: str, sort?: int, hasPackages?: bool, isReverse?: bool }`
|
||||||
- Returns: `200 { carrier: T32 }`
|
- Returns: `200 { carrier: T29 }`
|
||||||
|
|
||||||
### Section: /category
|
### Section: /category
|
||||||
|
|
||||||
@@ -451,7 +446,7 @@ _none_
|
|||||||
- Returns: `200 { category: { id: int, name: str, slug: str, parentId: int, sort: int } }`
|
- Returns: `200 { category: { id: int, name: str, slug: str, parentId: int, sort: int } }`
|
||||||
#### Articles in category — `GET /category/{id}/articles`
|
#### Articles in category — `GET /category/{id}/articles`
|
||||||
- Params: `id: int`
|
- Params: `id: int`
|
||||||
- Returns: `200 { articles: { id: int, sku: str, name: str, slug: str, track_stock: bool, optionsCount: int, articleListCount: int, childCount: int, net?: num|null, taxRate?: num|null, parentArticleId?: int|null, parentSku?: str|null, fullHash?: str|null, thumbW?: int|null, thumbH?: int|null, thumbHash?: str|null, brand?: T26|null, articlewarehousesummary?: { id: int, articleId: int, warehouseId: int, stock: num, article_id?: int, warehouse_id?: int, warehouseName?: str|null }[], warehouses?: { id: int, name: str, stock: num }[] }[] }`
|
- Returns: `200 { articles: { id: int, sku: str, name: str, slug: str, track_stock: bool, optionsCount: int, articleListCount: int, childCount: int, net?: num|null, taxRate?: num|null, parentArticleId?: int|null, parentSku?: str|null, fullHash?: str|null, thumbW?: int|null, thumbH?: int|null, thumbHash?: str|null, smallThumbW?: int|null, smallThumbH?: int|null, smallThumbBinary?: str|null, brand?: T24|null, articlewarehousesummary?: { id: int, articleId: int, warehouseId: int, stock: num, article_id?: int, warehouse_id?: int, warehouseName?: str|null }[], warehouses?: { id: int, name: str, stock: num }[] }[] }`
|
||||||
#### List category attribute values — `GET /category/{id}/attributevalue`
|
#### List category attribute values — `GET /category/{id}/attributevalue`
|
||||||
- Params: `id: int`
|
- Params: `id: int`
|
||||||
- Returns: `200 { attributevalues: { id: int, attributeId: int, attributeName: str, attributeValueId: int, value: str, sort: int, categoryId?: int, exclusive?: bool }[] }`
|
- Returns: `200 { attributevalues: { id: int, attributeId: int, attributeName: str, attributeValueId: int, value: str, sort: int, categoryId?: int, exclusive?: bool }[] }`
|
||||||
@@ -478,10 +473,10 @@ _none_
|
|||||||
|
|
||||||
#### List companies — `GET /company`
|
#### List companies — `GET /company`
|
||||||
_none_
|
_none_
|
||||||
- Returns: `200 { companies: T18[] }`
|
- Returns: `200 { companies: T17[] }`
|
||||||
#### Create company — `POST /company`
|
#### Create company — `POST /company`
|
||||||
- Params: `body: { iso639: str, name: str, taxrate: num, reducedtaxrate: num }`
|
- Params: `body: { iso639: str, name: str, taxrate: num, reducedtaxrate: num }`
|
||||||
- Returns: `201 { company: T18, user: T35 }`
|
- Returns: `201 { company: T17, user: T31 }`
|
||||||
#### Export company catalog as zip archive (SSE) — `GET /company/export`
|
#### Export company catalog as zip archive (SSE) — `GET /company/export`
|
||||||
- Params: `query: stream?: str`
|
- Params: `query: stream?: str`
|
||||||
- Returns: `200 SSE`
|
- Returns: `200 SSE`
|
||||||
@@ -511,7 +506,7 @@ _none_
|
|||||||
- Returns: `204 void`
|
- Returns: `204 void`
|
||||||
#### Update company — `PUT /company/{id}`
|
#### Update company — `PUT /company/{id}`
|
||||||
- Params: `id: int, body: { iso639: str, name: str, taxrate: num, reducedtaxrate: num }`
|
- Params: `id: int, body: { iso639: str, name: str, taxrate: num, reducedtaxrate: num }`
|
||||||
- Returns: `200 { company: T18 }`
|
- Returns: `200 { company: T17 }`
|
||||||
|
|
||||||
### Section: /customergroup
|
### Section: /customergroup
|
||||||
|
|
||||||
@@ -535,19 +530,19 @@ _none_
|
|||||||
|
|
||||||
#### List deliveries — `GET /delivery`
|
#### List deliveries — `GET /delivery`
|
||||||
- Params: `query: offset?: int, limit?: int, search?: str, onlyUnbooked?: bool, supplierId?: int, seekMonths?: int`
|
- Params: `query: offset?: int, limit?: int, search?: str, onlyUnbooked?: bool, supplierId?: int, seekMonths?: int`
|
||||||
- Returns: `200 { deliveries: { id: int, number: str, type: str, supplierId: int, date: str, externalNumber?: str|null, createdAt?: str, ledger?: T40 }[], total: int, unfilteredTotal: int, offset: int, limit: int }`
|
- Returns: `200 { deliveries: { id: int, number: str, type: str, supplierId: int, date: str, externalNumber?: str|null, createdAt?: str, ledger?: T35 }[], total: int, unfilteredTotal: int, offset: int, limit: int }`
|
||||||
#### Create delivery — `POST /delivery`
|
#### Create delivery — `POST /delivery`
|
||||||
- Params: `body: { externalNumber: str, date: str, supplierId: int, lines: T23[], files?: { mimetype: str, name: str, content: str, sort?: int, size?: int, hash?: str, created?: str, modified?: str, meta?: { [k]: str } }[] }`
|
- Params: `body: { externalNumber: str, date: str, supplierId: int, lines: T22[], files?: { mimetype: str, name: str, content: str, sort?: int, size?: int, hash?: str, created?: str, modified?: str, meta?: { [k]: str } }[] }`
|
||||||
- Returns: `201 { delivery: T5 }`
|
- Returns: `201 { delivery: T4 }`
|
||||||
#### Delete delivery — `DELETE /delivery/{id}`
|
#### Delete delivery — `DELETE /delivery/{id}`
|
||||||
- Params: `id: int`
|
- Params: `id: int`
|
||||||
- Returns: `204 void`
|
- Returns: `204 void`
|
||||||
#### Get delivery — `GET /delivery/{id}`
|
#### Get delivery — `GET /delivery/{id}`
|
||||||
- Params: `id: int`
|
- Params: `id: int`
|
||||||
- Returns: `200 { delivery: T5 }`
|
- Returns: `200 { delivery: T4 }`
|
||||||
#### Update delivery — `PATCH /delivery/{id}`
|
#### Update delivery — `PATCH /delivery/{id}`
|
||||||
- Params: `id: int, body: { externalNumber?: str|null, date?: str, supplierId?: int|null, lines?: T23[], files?: { mimetype: str, name: str, content: str, sort?: int, size?: int, hash?: str, created?: str, modified?: str, meta?: { [k]: str } }[] }`
|
- Params: `id: int, body: { externalNumber?: str|null, date?: str, supplierId?: int|null, lines?: T22[], files?: { mimetype: str, name: str, content: str, sort?: int, size?: int, hash?: str, created?: str, modified?: str, meta?: { [k]: str } }[] }`
|
||||||
- Returns: `200 { delivery: T5 }`
|
- Returns: `200 { delivery: T4 }`
|
||||||
#### Delete delivery file attachment — `DELETE /delivery/{id}/file/{fileId}`
|
#### Delete delivery file attachment — `DELETE /delivery/{id}/file/{fileId}`
|
||||||
- Params: `id: int, fileId: int`
|
- Params: `id: int, fileId: int`
|
||||||
- Returns: `204 void`
|
- Returns: `204 void`
|
||||||
@@ -556,52 +551,52 @@ _none_
|
|||||||
- Returns: `200 str`
|
- Returns: `200 str`
|
||||||
#### Generate and attach delivery note PDF (goods receipt) — `POST /delivery/{id}/pdf`
|
#### Generate and attach delivery note PDF (goods receipt) — `POST /delivery/{id}/pdf`
|
||||||
- Params: `id: int`
|
- Params: `id: int`
|
||||||
- Returns: `201 { attachment: T10, fileUrl: str }`
|
- Returns: `201 { attachment: T9, fileUrl: str }`
|
||||||
|
|
||||||
### Section: /entity
|
### Section: /entity
|
||||||
|
|
||||||
#### List entities — `GET /entity`
|
#### List entities — `GET /entity`
|
||||||
- Params: `query: customergroupId?: int, role?: str`
|
- Params: `query: customergroupId?: int, role?: str`
|
||||||
- Returns: `200 { entities: T25[] }`
|
- Returns: `200 { entities: T23[] }`
|
||||||
#### Create entity — `POST /entity`
|
#### Create entity — `POST /entity`
|
||||||
- Params: `body: { customergroupId: int, name: str, firstName?: str|null, number?: str }`
|
- Params: `body: { customergroupId: int, name: str, firstName?: str|null, number?: str }`
|
||||||
- Returns: `201 { entity: T25 }`
|
- Returns: `201 { entity: T23 }`
|
||||||
#### Peek next customer number — `GET /entity/next-number`
|
#### Peek next customer number — `GET /entity/next-number`
|
||||||
_none_
|
_none_
|
||||||
- Returns: `200 { number: str }`
|
- Returns: `200 { number: str }`
|
||||||
#### List entity addresses — `GET /entity/{entityId}/address`
|
#### List entity addresses — `GET /entity/{entityId}/address`
|
||||||
- Params: `entityId: int`
|
- Params: `entityId: int`
|
||||||
- Returns: `200 { addresses: T13[] }`
|
- Returns: `200 { addresses: T12[] }`
|
||||||
#### Create entity address — `POST /entity/{entityId}/address`
|
#### Create entity address — `POST /entity/{entityId}/address`
|
||||||
- Params: `entityId: int, body: { addressType: str, firstName?: str|null, name?: str|null, street?: str|null, streetNumber?: str|null, zip?: str|null, city?: str|null, county?: str|null }`
|
- Params: `entityId: int, body: { addressType: str, firstName?: str|null, name?: str|null, street?: str|null, streetNumber?: str|null, zip?: str|null, city?: str|null, county?: str|null }`
|
||||||
- Returns: `201 { address: T13 }`
|
- Returns: `201 { address: T12 }`
|
||||||
#### Delete entity address — `DELETE /entity/{entityId}/address/{id}`
|
#### Delete entity address — `DELETE /entity/{entityId}/address/{id}`
|
||||||
- Params: `entityId: int, id: int`
|
- Params: `entityId: int, id: int`
|
||||||
- Returns: `204 void`
|
- Returns: `204 void`
|
||||||
#### Update entity address — `PATCH /entity/{entityId}/address/{id}`
|
#### Update entity address — `PATCH /entity/{entityId}/address/{id}`
|
||||||
- Params: `entityId: int, id: int, body: { addressType?: str, firstName?: str|null, name?: str|null, street?: str|null, streetNumber?: str|null, zip?: str|null, city?: str|null, county?: str|null }`
|
- Params: `entityId: int, id: int, body: { addressType?: str, firstName?: str|null, name?: str|null, street?: str|null, streetNumber?: str|null, zip?: str|null, city?: str|null, county?: str|null }`
|
||||||
- Returns: `200 { address: T13 }`
|
- Returns: `200 { address: T12 }`
|
||||||
#### List entity contacts — `GET /entity/{entityId}/contact`
|
#### List entity contacts — `GET /entity/{entityId}/contact`
|
||||||
- Params: `entityId: int`
|
- Params: `entityId: int`
|
||||||
- Returns: `200 { contacts: T38[] }`
|
- Returns: `200 { contacts: T33[] }`
|
||||||
#### Create entity contact — `POST /entity/{entityId}/contact`
|
#### Create entity contact — `POST /entity/{entityId}/contact`
|
||||||
- Params: `entityId: int, body: { contactType: str, contact: str }`
|
- Params: `entityId: int, body: { contactType: str, contact: str }`
|
||||||
- Returns: `201 { contact: T38 }`
|
- Returns: `201 { contact: T33 }`
|
||||||
#### Delete entity contact — `DELETE /entity/{entityId}/contact/{id}`
|
#### Delete entity contact — `DELETE /entity/{entityId}/contact/{id}`
|
||||||
- Params: `entityId: int, id: int`
|
- Params: `entityId: int, id: int`
|
||||||
- Returns: `204 void`
|
- Returns: `204 void`
|
||||||
#### Update entity contact — `PATCH /entity/{entityId}/contact/{id}`
|
#### Update entity contact — `PATCH /entity/{entityId}/contact/{id}`
|
||||||
- Params: `entityId: int, id: int, body: { contactType?: str, contact?: str }`
|
- Params: `entityId: int, id: int, body: { contactType?: str, contact?: str }`
|
||||||
- Returns: `200 { contact: T38 }`
|
- Returns: `200 { contact: T33 }`
|
||||||
#### Delete entity — `DELETE /entity/{id}`
|
#### Delete entity — `DELETE /entity/{id}`
|
||||||
- Params: `id: int`
|
- Params: `id: int`
|
||||||
- Returns: `204 void`
|
- Returns: `204 void`
|
||||||
#### Get entity — `GET /entity/{id}`
|
#### Get entity — `GET /entity/{id}`
|
||||||
- Params: `id: int`
|
- Params: `id: int`
|
||||||
- Returns: `200 { entity: T25 }`
|
- Returns: `200 { entity: T23 }`
|
||||||
#### Update entity — `PATCH /entity/{id}`
|
#### Update entity — `PATCH /entity/{id}`
|
||||||
- Params: `id: int, body: { name?: str, firstName?: str|null, number?: str|null }`
|
- Params: `id: int, body: { name?: str, firstName?: str|null, number?: str|null }`
|
||||||
- Returns: `200 { entity: T25 }`
|
- Returns: `200 { entity: T23 }`
|
||||||
|
|
||||||
### Section: /events
|
### Section: /events
|
||||||
|
|
||||||
@@ -646,35 +641,35 @@ _none_
|
|||||||
_none_
|
_none_
|
||||||
- Returns: `200 { labeltemplates: { id: int, name: str, width: num, height: num, dpi: int, type: str, thumb?: str|null }[] }`
|
- Returns: `200 { labeltemplates: { id: int, name: str, width: num, height: num, dpi: int, type: str, thumb?: str|null }[] }`
|
||||||
#### Create label template — `POST /labeltemplate`
|
#### Create label template — `POST /labeltemplate`
|
||||||
- Params: `body: { name: str, width: num, height: num, dpi: int, type: str, content: { objects: T21[] } }`
|
- Params: `body: { name: str, width: num, height: num, dpi: int, type: str, content: { objects: T20[] } }`
|
||||||
- Returns: `201 { labeltemplate: T9 }`
|
- Returns: `201 { labeltemplate: T8 }`
|
||||||
#### Delete label template — `DELETE /labeltemplate/{id}`
|
#### Delete label template — `DELETE /labeltemplate/{id}`
|
||||||
- Params: `id: int`
|
- Params: `id: int`
|
||||||
- Returns: `204 void`
|
- Returns: `204 void`
|
||||||
#### Get label template by ID — `GET /labeltemplate/{id}`
|
#### Get label template by ID — `GET /labeltemplate/{id}`
|
||||||
- Params: `id: int`
|
- Params: `id: int`
|
||||||
- Returns: `200 { labeltemplate: T9 }`
|
- Returns: `200 { labeltemplate: T8 }`
|
||||||
#### Update label template (partial) — `PATCH /labeltemplate/{id}`
|
#### Update label template (partial) — `PATCH /labeltemplate/{id}`
|
||||||
- Params: `id: int, body: { name?: str, width?: num, height?: num, dpi?: int, type?: str, content?: { objects: T21[] } }`
|
- Params: `id: int, body: { name?: str, width?: num, height?: num, dpi?: int, type?: str, content?: { objects: T20[] } }`
|
||||||
- Returns: `200 { labeltemplate: T9 }`
|
- Returns: `200 { labeltemplate: T8 }`
|
||||||
#### Update label template — `PUT /labeltemplate/{id}`
|
#### Update label template — `PUT /labeltemplate/{id}`
|
||||||
- Params: `id: int, body: { name?: str, width?: num, height?: num, dpi?: int, type?: str, content?: { objects: T21[] } }`
|
- Params: `id: int, body: { name?: str, width?: num, height?: num, dpi?: int, type?: str, content?: { objects: T20[] } }`
|
||||||
- Returns: `200 { labeltemplate: T9 }`
|
- Returns: `200 { labeltemplate: T8 }`
|
||||||
|
|
||||||
### Section: /ledger
|
### Section: /ledger
|
||||||
|
|
||||||
#### Query ledger by manifest article ID or SKU — `GET /ledger`
|
#### Query ledger by manifest article ID or SKU — `GET /ledger`
|
||||||
- Params: `query: manifestarticle_id?: int, sku?: str, transaction_type?: str`
|
- Params: `query: manifestarticle_id?: int, sku?: str, transaction_type?: str`
|
||||||
- Returns: `200 { ledger: T15[] }`
|
- Returns: `200 { ledger: T14[] }`
|
||||||
#### Query company-wide ledger history — `GET /ledger/history`
|
#### Query company-wide ledger history — `GET /ledger/history`
|
||||||
- Params: `query: offset?: int, limit?: int, search?: str, seekMonths?: int`
|
- Params: `query: offset?: int, limit?: int, search?: str, seekMonths?: int`
|
||||||
- Returns: `200 { ledger: { id: int, date: str, transaction_type: str, transaction_text: str, sku?: str|null, name?: str|null, amount?: num }[], total: int, unfilteredTotal: int, offset: int, limit: int }`
|
- Returns: `200 { ledger: { id: int, date: str, transaction_type: str, transaction_text: str, sku?: str|null, name?: str|null, amount?: num }[], total: int, unfilteredTotal: int, offset: int, limit: int }`
|
||||||
#### Query ledger by manifest article ID — `GET /ledger/manifestarticle/{manifestarticleId}`
|
#### Query ledger by manifest article ID — `GET /ledger/manifestarticle/{manifestarticleId}`
|
||||||
- Params: `manifestarticleId: int, query: transaction_type?: str`
|
- Params: `manifestarticleId: int, query: transaction_type?: str`
|
||||||
- Returns: `200 { ledger: T15[] }`
|
- Returns: `200 { ledger: T14[] }`
|
||||||
#### Query ledger by article SKU — `GET /ledger/sku/{sku}`
|
#### Query ledger by article SKU — `GET /ledger/sku/{sku}`
|
||||||
- Params: `sku: str, query: transaction_type?: str`
|
- Params: `sku: str, query: transaction_type?: str`
|
||||||
- Returns: `200 { ledger: T15[] }`
|
- Returns: `200 { ledger: T14[] }`
|
||||||
|
|
||||||
### Section: /mcp
|
### Section: /mcp
|
||||||
|
|
||||||
@@ -704,16 +699,16 @@ _none_
|
|||||||
|
|
||||||
#### List conversations — `GET /modelconversation`
|
#### List conversations — `GET /modelconversation`
|
||||||
_none_
|
_none_
|
||||||
- Returns: `200 { conversations: T17[] }`
|
- Returns: `200 { conversations: T16[] }`
|
||||||
#### Create conversation — `POST /modelconversation`
|
#### Create conversation — `POST /modelconversation`
|
||||||
- Params: `body: { provider: str, model: str }`
|
- Params: `body: { provider: str, model: str }`
|
||||||
- Returns: `201 { conversation: T17 }`
|
- Returns: `201 { conversation: T16 }`
|
||||||
#### Delete conversation — `DELETE /modelconversation/{id}`
|
#### Delete conversation — `DELETE /modelconversation/{id}`
|
||||||
- Params: `id: int`
|
- Params: `id: int`
|
||||||
- Returns: `204 void`
|
- Returns: `204 void`
|
||||||
#### Get conversation — `GET /modelconversation/{id}`
|
#### Get conversation — `GET /modelconversation/{id}`
|
||||||
- Params: `id: int`
|
- Params: `id: int`
|
||||||
- Returns: `200 { conversation: T17 }`
|
- Returns: `200 { conversation: T16 }`
|
||||||
#### List conversation messages — `GET /modelconversation/{id}/message`
|
#### List conversation messages — `GET /modelconversation/{id}/message`
|
||||||
- Params: `id: int`
|
- Params: `id: int`
|
||||||
- Returns: `200 { messages: { id: int, conversation_id: int, created_at: str, role: str, message: str }[] }`
|
- Returns: `200 { messages: { id: int, conversation_id: int, created_at: str, role: str, message: str }[] }`
|
||||||
@@ -754,7 +749,7 @@ _none_
|
|||||||
- Params: `query: offset?: int, limit?: int, search?: str, onlyUnpaid?: bool, onlyUndelivered?: bool, seekMonths?: int`
|
- Params: `query: offset?: int, limit?: int, search?: str, onlyUnpaid?: bool, onlyUndelivered?: bool, seekMonths?: int`
|
||||||
- Returns: `200 { orders: T1[], total: int, unfilteredTotal: int, offset: int, limit: int }`
|
- Returns: `200 { orders: T1[], total: int, unfilteredTotal: int, offset: int, limit: int }`
|
||||||
#### Create order — `POST /order`
|
#### Create order — `POST /order`
|
||||||
- Params: `body: { number: str, date: str, entityId: int, lines: T23[], externalNumber?: str|null }`
|
- Params: `body: { number: str, date: str, entityId: int, lines: T22[], externalNumber?: str|null }`
|
||||||
- Returns: `201 { order: T1 }`
|
- Returns: `201 { order: T1 }`
|
||||||
#### Delete order — `DELETE /order/{id}`
|
#### Delete order — `DELETE /order/{id}`
|
||||||
- Params: `id: int`
|
- Params: `id: int`
|
||||||
@@ -763,7 +758,7 @@ _none_
|
|||||||
- Params: `id: int`
|
- Params: `id: int`
|
||||||
- Returns: `200 { order: T1 }`
|
- Returns: `200 { order: T1 }`
|
||||||
#### Update order — `PATCH /order/{id}`
|
#### Update order — `PATCH /order/{id}`
|
||||||
- Params: `id: int, body: { number?: str, date?: str, entityId?: int|null, externalNumber?: str|null, lines?: T23[] }`
|
- Params: `id: int, body: { number?: str, date?: str, entityId?: int|null, externalNumber?: str|null, lines?: T22[] }`
|
||||||
- Returns: `200 { order: T1 }`
|
- Returns: `200 { order: T1 }`
|
||||||
#### Delete order file attachment — `DELETE /order/{id}/file/{fileId}`
|
#### Delete order file attachment — `DELETE /order/{id}/file/{fileId}`
|
||||||
- Params: `id: int, fileId: int`
|
- Params: `id: int, fileId: int`
|
||||||
@@ -773,25 +768,25 @@ _none_
|
|||||||
- Returns: `200 str`
|
- Returns: `200 str`
|
||||||
#### List payments of an order — `GET /order/{id}/payment`
|
#### List payments of an order — `GET /order/{id}/payment`
|
||||||
- Params: `id: int`
|
- Params: `id: int`
|
||||||
- Returns: `200 { payments: T31[] }`
|
- Returns: `200 { payments: T28[] }`
|
||||||
#### Add payment to an order — `POST /order/{id}/payment`
|
#### Add payment to an order — `POST /order/{id}/payment`
|
||||||
- Params: `id: int, body: { accountId: int, type: str, amount: num }`
|
- Params: `id: int, body: { accountId: int, type: str, amount: num }`
|
||||||
- Returns: `201 { payment: T31 }`
|
- Returns: `201 { payment: T28 }`
|
||||||
#### Generate and attach order PDF — `POST /order/{id}/pdf`
|
#### Generate and attach order PDF — `POST /order/{id}/pdf`
|
||||||
- Params: `id: int`
|
- Params: `id: int`
|
||||||
- Returns: `201 { attachment: T10, fileUrl: str }`
|
- Returns: `201 { attachment: T9, fileUrl: str }`
|
||||||
#### List shipments of an order — `GET /order/{id}/shipment`
|
#### List shipments of an order — `GET /order/{id}/shipment`
|
||||||
- Params: `id: int`
|
- Params: `id: int`
|
||||||
- Returns: `200 { shipments: T3[] }`
|
- Returns: `200 { shipments: T2[] }`
|
||||||
#### Create shipment for an order — `POST /order/{id}/shipment`
|
#### Create shipment for an order — `POST /order/{id}/shipment`
|
||||||
- Params: `id: int, body: { lines: { sku: str, amount?: num, name?: str, pu?: num, net?: num, rebate?: num, taxrate?: num, comment?: str }[], date?: str, warehouseId?: int, externalNumber?: str }`
|
- Params: `id: int, body: { lines: { sku: str, amount?: num, name?: str, pu?: num, net?: num, rebate?: num, taxrate?: num, comment?: str }[], date?: str, warehouseId?: int, externalNumber?: str }`
|
||||||
- Returns: `201 { shipment: T3 }`
|
- Returns: `201 { shipment: T2 }`
|
||||||
#### List shippings of an order — `GET /order/{id}/shipping`
|
#### List shippings of an order — `GET /order/{id}/shipping`
|
||||||
- Params: `id: int`
|
- Params: `id: int`
|
||||||
- Returns: `200 { shippings: T19[] }`
|
- Returns: `200 { shippings: T18[] }`
|
||||||
#### Create shipping for an order — `POST /order/{id}/shipping`
|
#### Create shipping for an order — `POST /order/{id}/shipping`
|
||||||
- Params: `id: int, body: { carrierId: int, type: str, state: str, trackingCode?: str, warehouseId?: int }`
|
- Params: `id: int, body: { carrierId: int, type: str, state: str, trackingCode?: str, warehouseId?: int }`
|
||||||
- Returns: `201 { shipping: T19 }`
|
- Returns: `201 { shipping: T18 }`
|
||||||
|
|
||||||
### Section: /package
|
### Section: /package
|
||||||
|
|
||||||
@@ -809,16 +804,16 @@ _none_
|
|||||||
|
|
||||||
#### List POS terminals — `GET /posterminal`
|
#### List POS terminals — `GET /posterminal`
|
||||||
_none_
|
_none_
|
||||||
- Returns: `200 { posterminals: T11[] }`
|
- Returns: `200 { posterminals: T10[] }`
|
||||||
#### Create POS terminal — `PUT /posterminal`
|
#### Create POS terminal — `PUT /posterminal`
|
||||||
- Params: `body: { name: str, rootCategoryId?: int|null, syncRootArticles?: bool }`
|
- Params: `body: { name: str, rootCategoryId?: int|null, syncRootArticles?: bool }`
|
||||||
- Returns: `200 { posterminal: T11 }`
|
- Returns: `200 { posterminal: T10 }`
|
||||||
#### Delete POS terminal — `DELETE /posterminal/{id}`
|
#### Delete POS terminal — `DELETE /posterminal/{id}`
|
||||||
- Params: `id: int`
|
- Params: `id: int`
|
||||||
- Returns: `204 void`
|
- Returns: `204 void`
|
||||||
#### Update POS terminal — `PATCH /posterminal/{id}`
|
#### Update POS terminal — `PATCH /posterminal/{id}`
|
||||||
- Params: `id: int, body: { name?: str, rootCategoryId?: int|null, syncRootArticles?: bool, pairingpin?: str|null }`
|
- Params: `id: int, body: { name?: str, rootCategoryId?: int|null, syncRootArticles?: bool, pairingpin?: str|null }`
|
||||||
- Returns: `200 { posterminal: T11 }`
|
- Returns: `200 { posterminal: T10 }`
|
||||||
#### Disable all categories on terminal — `DELETE /posterminal/{id}/all`
|
#### Disable all categories on terminal — `DELETE /posterminal/{id}/all`
|
||||||
- Params: `id: int`
|
- Params: `id: int`
|
||||||
- Returns: `200 { id: int, categoryIds: int[] }`
|
- Returns: `200 { id: int, categoryIds: int[] }`
|
||||||
@@ -836,10 +831,10 @@ _none_
|
|||||||
|
|
||||||
#### List printers — `GET /printer`
|
#### List printers — `GET /printer`
|
||||||
_none_
|
_none_
|
||||||
- Returns: `200 { printers: T22[] }`
|
- Returns: `200 { printers: T21[] }`
|
||||||
#### Create printer — `POST /printer`
|
#### Create printer — `POST /printer`
|
||||||
- Params: `body: { address: str, type: str, model?: str|null, serial?: str|null, sort?: int, desc?: str|null }`
|
- Params: `body: { address: str, type: str, model?: str|null, serial?: str|null, sort?: int, desc?: str|null }`
|
||||||
- Returns: `201 { printer: T22 }`
|
- Returns: `201 { printer: T21 }`
|
||||||
#### Reorder printers — `PUT /printer/order`
|
#### Reorder printers — `PUT /printer/order`
|
||||||
- Params: `body: { printerIds: int[] }`
|
- Params: `body: { printerIds: int[] }`
|
||||||
- Returns: `200 { printerIds: int[] }`
|
- Returns: `200 { printerIds: int[] }`
|
||||||
@@ -848,22 +843,22 @@ _none_
|
|||||||
- Returns: `204 void`
|
- Returns: `204 void`
|
||||||
#### Get printer by ID — `GET /printer/{id}`
|
#### Get printer by ID — `GET /printer/{id}`
|
||||||
- Params: `id: int`
|
- Params: `id: int`
|
||||||
- Returns: `200 { printer: T22 }`
|
- Returns: `200 { printer: T21 }`
|
||||||
#### Update printer (partial) — `PATCH /printer/{id}`
|
#### Update printer (partial) — `PATCH /printer/{id}`
|
||||||
- Params: `id: int, body: { address?: str, type?: str, model?: str|null, serial?: str|null, sort?: int, desc?: str|null }`
|
- Params: `id: int, body: { address?: str, type?: str, model?: str|null, serial?: str|null, sort?: int, desc?: str|null }`
|
||||||
- Returns: `200 { printer: T22 }`
|
- Returns: `200 { printer: T21 }`
|
||||||
#### Update printer — `PUT /printer/{id}`
|
#### Update printer — `PUT /printer/{id}`
|
||||||
- Params: `id: int, body: { address?: str, type?: str, model?: str|null, serial?: str|null, sort?: int, desc?: str|null }`
|
- Params: `id: int, body: { address?: str, type?: str, model?: str|null, serial?: str|null, sort?: int, desc?: str|null }`
|
||||||
- Returns: `200 { printer: T22 }`
|
- Returns: `200 { printer: T21 }`
|
||||||
|
|
||||||
### Section: /propertyname
|
### Section: /propertyname
|
||||||
|
|
||||||
#### List property names — `GET /propertyname`
|
#### List property names — `GET /propertyname`
|
||||||
_none_
|
_none_
|
||||||
- Returns: `200 { propertynames: T30[] }`
|
- Returns: `200 { propertynames: T27[] }`
|
||||||
#### Create property name — `POST /propertyname`
|
#### Create property name — `POST /propertyname`
|
||||||
- Params: `body: { name: str, sort?: int, exclusive?: bool }`
|
- Params: `body: { name: str, sort?: int, exclusive?: bool }`
|
||||||
- Returns: `201 { propertyname: T30 }`
|
- Returns: `201 { propertyname: T27 }`
|
||||||
#### Reorder property names — `PUT /propertyname/order`
|
#### Reorder property names — `PUT /propertyname/order`
|
||||||
- Params: `body: { propertynameIds: int[] }`
|
- Params: `body: { propertynameIds: int[] }`
|
||||||
- Returns: `200 { ok: bool }`
|
- Returns: `200 { ok: bool }`
|
||||||
@@ -872,7 +867,7 @@ _none_
|
|||||||
- Returns: `200 { ok: bool }`
|
- Returns: `200 { ok: bool }`
|
||||||
#### Update property name — `PATCH /propertyname/{id}`
|
#### Update property name — `PATCH /propertyname/{id}`
|
||||||
- Params: `id: int, body: { name?: str, sort?: int, exclusive?: bool }`
|
- Params: `id: int, body: { name?: str, sort?: int, exclusive?: bool }`
|
||||||
- Returns: `200 { propertyname: T30 }`
|
- Returns: `200 { propertyname: T27 }`
|
||||||
|
|
||||||
### Section: /public
|
### Section: /public
|
||||||
|
|
||||||
@@ -884,7 +879,7 @@ _none_
|
|||||||
- Returns: `200 { articles: { id: int, sku: str, name: str, slug: str, net: num|null, taxRate: num|null, gross: num|null, trackStock: bool, brand: { id: int|null, name: str }, fullHash: str|null, thumbW: int|null, thumbH: int|null, thumbHash: str|null }[] }`
|
- Returns: `200 { articles: { id: int, sku: str, name: str, slug: str, net: num|null, taxRate: num|null, gross: num|null, trackStock: bool, brand: { id: int|null, name: str }, fullHash: str|null, thumbW: int|null, thumbH: int|null, thumbHash: str|null }[] }`
|
||||||
#### Get public article detail — `GET /public/{companyId}/articles/{sku}`
|
#### Get public article detail — `GET /public/{companyId}/articles/{sku}`
|
||||||
- Params: `companyId: int, sku: str`
|
- Params: `companyId: int, sku: str`
|
||||||
- Returns: `200 { article: { id: int, sku: str, name: str, slug: str, description: str, unitamount: num|null, weight: num|null, trackStock: bool, unit: T28|null, brand: T26|null, price: { minmultiplier: num, net: num|null, taxRate: num|null, gross: num|null }, prices: { minmultiplier: num, net: num|null, taxRate: num|null, gross: num|null }[], categories: { id: int, name: str, slug: str }[], photos: T24[], eans: str[], isParent: bool, parentSku: str|null, variants: { id: int, sku: str, sort: int, name: str, slug: str, attributeValueId: int|null, attributeValue: str|null, unitamount: num|null, weight: num|null, trackStock: bool }[] } }`
|
- Returns: `200 { article: { id: int, sku: str, name: str, slug: str, description: str, unitamount: num|null, weight: num|null, trackStock: bool, unit: T25|null, brand: T24|null, price: { minmultiplier: num, net: num|null, taxRate: num|null, gross: num|null }, prices: { minmultiplier: num, net: num|null, taxRate: num|null, gross: num|null }[], categories: { id: int, name: str, slug: str }[], photos: { sort: int, fullHash: str, fullW: int, fullH: int, fullSize: int, thumbW: int, thumbH: int, thumbHash: str }[], eans: str[], isParent: bool, parentSku: str|null, variants: { id: int, sku: str, sort: int, name: str, slug: str, attributeValueId: int|null, attributeValue: str|null, unitamount: num|null, weight: num|null, trackStock: bool }[] } }`
|
||||||
#### List public categories — `GET /public/{companyId}/categories`
|
#### List public categories — `GET /public/{companyId}/categories`
|
||||||
- Params: `companyId: int`
|
- Params: `companyId: int`
|
||||||
- Returns: `200 { categories: { id: int, parentId: int|null, sort: int, name: str, slug: str, fullHash: str|null, thumbW: int|null, thumbH: int|null, thumbHash: str|null }[] }`
|
- Returns: `200 { categories: { id: int, parentId: int|null, sort: int, name: str, slug: str, fullHash: str|null, thumbW: int|null, thumbH: int|null, thumbHash: str|null }[] }`
|
||||||
@@ -893,19 +888,19 @@ _none_
|
|||||||
|
|
||||||
#### List quotes — `GET /quote`
|
#### List quotes — `GET /quote`
|
||||||
- Params: `query: offset?: int, limit?: int, search?: str, seekMonths?: int`
|
- Params: `query: offset?: int, limit?: int, search?: str, seekMonths?: int`
|
||||||
- Returns: `200 { quotes: T4[], total: int, unfilteredTotal: int, offset: int, limit: int }`
|
- Returns: `200 { quotes: T3[], total: int, unfilteredTotal: int, offset: int, limit: int }`
|
||||||
#### Create quote — `POST /quote`
|
#### Create quote — `POST /quote`
|
||||||
- Params: `body: { number: str, date: str, lines: T23[], entityId?: int|null, externalNumber?: str|null }`
|
- Params: `body: { number: str, date: str, lines: T22[], entityId?: int|null, externalNumber?: str|null }`
|
||||||
- Returns: `201 { quote: T4 }`
|
- Returns: `201 { quote: T3 }`
|
||||||
#### Delete quote — `DELETE /quote/{id}`
|
#### Delete quote — `DELETE /quote/{id}`
|
||||||
- Params: `id: int`
|
- Params: `id: int`
|
||||||
- Returns: `204 void`
|
- Returns: `204 void`
|
||||||
#### Get quote — `GET /quote/{id}`
|
#### Get quote — `GET /quote/{id}`
|
||||||
- Params: `id: int`
|
- Params: `id: int`
|
||||||
- Returns: `200 { quote: T4 }`
|
- Returns: `200 { quote: T3 }`
|
||||||
#### Update quote — `PATCH /quote/{id}`
|
#### Update quote — `PATCH /quote/{id}`
|
||||||
- Params: `id: int, body: { number?: str, date?: str, entityId?: int|null, externalNumber?: str|null, lines?: T23[] }`
|
- Params: `id: int, body: { number?: str, date?: str, entityId?: int|null, externalNumber?: str|null, lines?: T22[] }`
|
||||||
- Returns: `200 { quote: T4 }`
|
- Returns: `200 { quote: T3 }`
|
||||||
#### Delete quote file attachment — `DELETE /quote/{id}/file/{fileId}`
|
#### Delete quote file attachment — `DELETE /quote/{id}/file/{fileId}`
|
||||||
- Params: `id: int, fileId: int`
|
- Params: `id: int, fileId: int`
|
||||||
- Returns: `204 void`
|
- Returns: `204 void`
|
||||||
@@ -913,11 +908,11 @@ _none_
|
|||||||
- Params: `id: int, fileId: int, query: download?: bool`
|
- Params: `id: int, fileId: int, query: download?: bool`
|
||||||
- Returns: `200 str`
|
- Returns: `200 str`
|
||||||
#### Create order from quote — `POST /quote/{id}/order`
|
#### Create order from quote — `POST /quote/{id}/order`
|
||||||
- Params: `id: int, body?: { number?: str, date?: str, createdAt?: str, entityId?: int|null, externalNumber?: str|null, lines?: T23[] }`
|
- Params: `id: int, body?: { number?: str, date?: str, createdAt?: str, entityId?: int|null, externalNumber?: str|null, lines?: T22[] }`
|
||||||
- Returns: `201 { order: T1 }`
|
- Returns: `201 { order: T1 }`
|
||||||
#### Generate and attach quote PDF — `POST /quote/{id}/pdf`
|
#### Generate and attach quote PDF — `POST /quote/{id}/pdf`
|
||||||
- Params: `id: int`
|
- Params: `id: int`
|
||||||
- Returns: `201 { attachment: T10, fileUrl: str }`
|
- Returns: `201 { attachment: T9, fileUrl: str }`
|
||||||
|
|
||||||
### Section: /serper
|
### Section: /serper
|
||||||
|
|
||||||
@@ -944,10 +939,10 @@ _none_
|
|||||||
- Returns: `204 void`
|
- Returns: `204 void`
|
||||||
#### Get shipment by ID — `GET /shipment/{id}`
|
#### Get shipment by ID — `GET /shipment/{id}`
|
||||||
- Params: `id: int`
|
- Params: `id: int`
|
||||||
- Returns: `200 { shipment: T3 }`
|
- Returns: `200 { shipment: T2 }`
|
||||||
#### Update shipment state or metadata — `PATCH /shipment/{id}`
|
#### Update shipment state or metadata — `PATCH /shipment/{id}`
|
||||||
- Params: `id: int, body: { state?: str }`
|
- Params: `id: int, body: { state?: str }`
|
||||||
- Returns: `200 { shipment: T3 }`
|
- Returns: `200 { shipment: T2 }`
|
||||||
#### Delete shipment file attachment — `DELETE /shipment/{id}/file/{fileId}`
|
#### Delete shipment file attachment — `DELETE /shipment/{id}/file/{fileId}`
|
||||||
- Params: `id: int, fileId: int`
|
- Params: `id: int, fileId: int`
|
||||||
- Returns: `204 void`
|
- Returns: `204 void`
|
||||||
@@ -956,13 +951,13 @@ _none_
|
|||||||
- Returns: `200 str`
|
- Returns: `200 str`
|
||||||
#### Generate and attach shipment PDF (delivery note) — `POST /shipment/{id}/pdf`
|
#### Generate and attach shipment PDF (delivery note) — `POST /shipment/{id}/pdf`
|
||||||
- Params: `id: int`
|
- Params: `id: int`
|
||||||
- Returns: `201 { attachment: T10, fileUrl: str }`
|
- Returns: `201 { attachment: T9, fileUrl: str }`
|
||||||
#### List packages of a shipment — `GET /shipment/{id}/shipping`
|
#### List packages of a shipment — `GET /shipment/{id}/shipping`
|
||||||
- Params: `id: int`
|
- Params: `id: int`
|
||||||
- Returns: `200 { shippings: T19[] }`
|
- Returns: `200 { shippings: T18[] }`
|
||||||
#### Create package for a shipment — `POST /shipment/{id}/shipping`
|
#### Create package for a shipment — `POST /shipment/{id}/shipping`
|
||||||
- Params: `id: int, body: { carrierId: int, type: str, state: str, trackingCode?: str, warehouseId?: int }`
|
- Params: `id: int, body: { carrierId: int, type: str, state: str, trackingCode?: str, warehouseId?: int }`
|
||||||
- Returns: `201 { shipping: T19 }`
|
- Returns: `201 { shipping: T18 }`
|
||||||
|
|
||||||
### Section: /shipping
|
### Section: /shipping
|
||||||
|
|
||||||
@@ -971,7 +966,7 @@ _none_
|
|||||||
- Returns: `204 void`
|
- Returns: `204 void`
|
||||||
#### Update shipping — `PATCH /shipping/{id}`
|
#### Update shipping — `PATCH /shipping/{id}`
|
||||||
- Params: `id: int, body: { type?: str, state?: str, trackingCode?: str, carrierId?: int, warehouseId?: int }`
|
- Params: `id: int, body: { type?: str, state?: str, trackingCode?: str, carrierId?: int, warehouseId?: int }`
|
||||||
- Returns: `200 { shipping: T19 }`
|
- Returns: `200 { shipping: T18 }`
|
||||||
#### List packages of a shipping — `GET /shipping/{id}/package`
|
#### List packages of a shipping — `GET /shipping/{id}/package`
|
||||||
- Params: `id: int`
|
- Params: `id: int`
|
||||||
- Returns: `200 { packages: { id: int, shippingId: int, entityaddressId: int, number: str, type: str, state: str, details?: str|null }[] }`
|
- Returns: `200 { packages: { id: int, shippingId: int, entityaddressId: int, number: str, type: str, state: str, details?: str|null }[] }`
|
||||||
@@ -992,7 +987,7 @@ _none_
|
|||||||
- Returns: `200`
|
- Returns: `200`
|
||||||
#### Adjust stock manually — `POST /stock/adjust`
|
#### Adjust stock manually — `POST /stock/adjust`
|
||||||
- Params: `body: { sku?: str, warehouseId?: int, amount?: num, text?: str|null, lines?: { sku: str, amount: num, warehouseId?: int, text?: str }[] }`
|
- Params: `body: { sku?: str, warehouseId?: int, amount?: num, text?: str|null, lines?: { sku: str, amount: num, warehouseId?: int, text?: str }[] }`
|
||||||
- Returns: `201 { manifest: { id: int, number: str, type: str, date: str, createdAt: str }, lines: { manifestarticle_id: int, sku: str, name: str, warehouse_id: int, amount: num, text: str }[], ledger: T15[] }`
|
- Returns: `201 { manifest: { id: int, number: str, type: str, date: str, createdAt: str }, lines: { manifestarticle_id: int, sku: str, name: str, warehouse_id: int, amount: num, text: str }[], ledger: T14[] }`
|
||||||
#### Ship shipment manifest item(s) — `POST /stock/ship`
|
#### Ship shipment manifest item(s) — `POST /stock/ship`
|
||||||
- Params: `body: { manifestarticleId?: int, warehouseId?: int, items?: { manifestarticleId: int, warehouseId?: int }[] }`
|
- Params: `body: { manifestarticleId?: int, warehouseId?: int, items?: { manifestarticleId: int, warehouseId?: int }[] }`
|
||||||
- Returns: `200`
|
- Returns: `200`
|
||||||
@@ -1001,40 +996,40 @@ _none_
|
|||||||
|
|
||||||
#### List subagent schedules — `GET /subagentschedule`
|
#### List subagent schedules — `GET /subagentschedule`
|
||||||
_none_
|
_none_
|
||||||
- Returns: `200 { schedules: T14[] }`
|
- Returns: `200 { schedules: T13[] }`
|
||||||
#### Create subagent schedule — `POST /subagentschedule`
|
#### Create subagent schedule — `POST /subagentschedule`
|
||||||
- Params: `body: { prompt: str, cron: str, desc?: str|null, skills?: str|null, lastagentnote?: str|null, max_itr?: int }`
|
- Params: `body: { prompt: str, cron: str, desc?: str|null, skills?: str|null, lastagentnote?: str|null, max_itr?: int }`
|
||||||
- Returns: `201 { schedule: T14 }`
|
- Returns: `201 { schedule: T13 }`
|
||||||
#### Delete subagent schedule — `DELETE /subagentschedule/{id}`
|
#### Delete subagent schedule — `DELETE /subagentschedule/{id}`
|
||||||
- Params: `id: int`
|
- Params: `id: int`
|
||||||
- Returns: `204 void`
|
- Returns: `204 void`
|
||||||
#### Get subagent schedule by ID — `GET /subagentschedule/{id}`
|
#### Get subagent schedule by ID — `GET /subagentschedule/{id}`
|
||||||
- Params: `id: int`
|
- Params: `id: int`
|
||||||
- Returns: `200 { schedule: T14 }`
|
- Returns: `200 { schedule: T13 }`
|
||||||
#### Update subagent schedule — `PUT /subagentschedule/{id}`
|
#### Update subagent schedule — `PUT /subagentschedule/{id}`
|
||||||
- Params: `id: int, body: { prompt?: str, cron?: str, desc?: str|null, skills?: str|null, lastagentnote?: str|null, max_itr?: int, lastrun_at?: str|null }`
|
- Params: `id: int, body: { prompt?: str, cron?: str, desc?: str|null, skills?: str|null, lastagentnote?: str|null, max_itr?: int, lastrun_at?: str|null }`
|
||||||
- Returns: `200 { schedule: T14 }`
|
- Returns: `200 { schedule: T13 }`
|
||||||
|
|
||||||
### Section: /supplier
|
### Section: /supplier
|
||||||
|
|
||||||
#### List suppliers — `GET /supplier`
|
#### List suppliers — `GET /supplier`
|
||||||
_none_
|
_none_
|
||||||
- Returns: `200 { suppliers: T39[] }`
|
- Returns: `200 { suppliers: T34[] }`
|
||||||
#### Create supplier — `POST /supplier`
|
#### Create supplier — `POST /supplier`
|
||||||
- Params: `body: { name: str }`
|
- Params: `body: { name: str }`
|
||||||
- Returns: `201 { supplier: T39 }`
|
- Returns: `201 { supplier: T34 }`
|
||||||
#### Delete supplier — `DELETE /supplier/{id}`
|
#### Delete supplier — `DELETE /supplier/{id}`
|
||||||
- Params: `id: int`
|
- Params: `id: int`
|
||||||
- Returns: `204 void`
|
- Returns: `204 void`
|
||||||
#### Update supplier — `PATCH /supplier/{id}`
|
#### Update supplier — `PATCH /supplier/{id}`
|
||||||
- Params: `id: int, body: { name: str }`
|
- Params: `id: int, body: { name: str }`
|
||||||
- Returns: `200 { supplier: T39 }`
|
- Returns: `200 { supplier: T34 }`
|
||||||
#### List supplier articles by SKUs — `GET /supplier/{id}/articles`
|
#### List supplier articles by SKUs — `GET /supplier/{id}/articles`
|
||||||
- Params: `id: int, query: skus?: str`
|
- Params: `id: int, query: skus?: str`
|
||||||
- Returns: `200 { articles: { id: int, articleId: int, entityId: int, pu: num, sort: int, article: { id: int, sku: str, name?: str|null, slug?: str|null, photos?: { sort: int, fullHash: str, thumbW: int, thumbH: int, thumbHash: str }[], eans?: str[] }, supplierName?: str|null, sku?: str|null, stock?: num|null, priceId?: int|null, price?: T42|null, incoming?: { date: str, amount: num }[] }[] }`
|
- Returns: `200 { articles: { id: int, articleId: int, entityId: int, pu: num, sort: int, article: { id: int, sku: str, name?: str|null, slug?: str|null, photos?: { sort: int, fullHash: str, thumbW: int, thumbH: int, thumbHash: str }[], eans?: str[] }, supplierName?: str|null, sku?: str|null, stock?: num|null, priceId?: int|null, price?: T37|null, incoming?: { date: str, amount: num }[] }[] }`
|
||||||
#### Query supplier articles by SKUs (bulk) — `POST /supplier/{id}/articles`
|
#### Query supplier articles by SKUs (bulk) — `POST /supplier/{id}/articles`
|
||||||
- Params: `id: int, body?: { skus?: str[] }`
|
- Params: `id: int, body?: { skus?: str[] }`
|
||||||
- Returns: `200 { articles: { id: int, articleId: int, entityId: int, pu: num, sort: int, article: { id: int, sku: str, name?: str|null, slug?: str|null, photos?: { sort: int, fullHash: str, thumbW: int, thumbH: int, thumbHash: str }[], eans?: str[] }, supplierName?: str|null, sku?: str|null, stock?: num|null, priceId?: int|null, price?: T42|null, incoming?: { date: str, amount: num }[] }[] }`
|
- Returns: `200 { articles: { id: int, articleId: int, entityId: int, pu: num, sort: int, article: { id: int, sku: str, name?: str|null, slug?: str|null, photos?: { sort: int, fullHash: str, thumbW: int, thumbH: int, thumbHash: str }[], eans?: str[] }, supplierName?: str|null, sku?: str|null, stock?: num|null, priceId?: int|null, price?: T37|null, incoming?: { date: str, amount: num }[] }[] }`
|
||||||
|
|
||||||
### Section: /thumb
|
### Section: /thumb
|
||||||
|
|
||||||
@@ -1049,10 +1044,10 @@ _none_
|
|||||||
- Returns: `204 void`
|
- Returns: `204 void`
|
||||||
#### List units — `GET /unit`
|
#### List units — `GET /unit`
|
||||||
_none_
|
_none_
|
||||||
- Returns: `200 { units: T28[] }`
|
- Returns: `200 { units: T25[] }`
|
||||||
#### Upsert unit — `PUT /unit`
|
#### Upsert unit — `PUT /unit`
|
||||||
- Params: `body: { si: str, basesi: str, basesifactor: num, symbol: str, name: str }`
|
- Params: `body: { si: str, basesi: str, basesifactor: num, symbol: str, name: str }`
|
||||||
- Returns: `200 { unit: T28 }`
|
- Returns: `200 { unit: T25 }`
|
||||||
|
|
||||||
### Section: /v1
|
### Section: /v1
|
||||||
|
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ export const article = {
|
|||||||
return http(`/api/article/${encodeURIComponent(sku)}/history${qs ? `?${qs}` : ''}`);
|
return http(`/api/article/${encodeURIComponent(sku)}/history${qs ? `?${qs}` : ''}`);
|
||||||
},
|
},
|
||||||
|
|
||||||
/** POST /api/article → 201 { article } */
|
/** POST /api/article → 201 { sku } */
|
||||||
create({ categoryId, name, track_stock }) {
|
create({ categoryId, name, track_stock }) {
|
||||||
return http('/api/article', {
|
return http('/api/article', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
@@ -75,7 +75,7 @@ export const article = {
|
|||||||
* PATCH /api/article/:sku
|
* PATCH /api/article/:sku
|
||||||
* Body: at least one of { name, unitamount, unitSi, track_stock, desc, seo }
|
* Body: at least one of { name, unitamount, unitSi, track_stock, desc, seo }
|
||||||
* unitSi must exist for selected company → 404 Unit not found
|
* unitSi must exist for selected company → 404 Unit not found
|
||||||
* → 200 { article } (same detail shape as GET: includes desc, seo)
|
* → 204 (no body; refetch via getBySku)
|
||||||
*/
|
*/
|
||||||
update(sku, body) {
|
update(sku, body) {
|
||||||
return http(`/api/article/${encodeURIComponent(sku)}`, {
|
return http(`/api/article/${encodeURIComponent(sku)}`, {
|
||||||
@@ -87,7 +87,7 @@ export const article = {
|
|||||||
/**
|
/**
|
||||||
* PUT /api/article/:sku/track_stock
|
* PUT /api/article/:sku/track_stock
|
||||||
* Body: { track_stock: boolean }
|
* Body: { track_stock: boolean }
|
||||||
* → 200 { article }
|
* → 204 (no body)
|
||||||
*/
|
*/
|
||||||
setTrackStock(sku, body) {
|
setTrackStock(sku, body) {
|
||||||
const payload = typeof body === 'boolean' ? { track_stock: body } : body;
|
const payload = typeof body === 'boolean' ? { track_stock: body } : body;
|
||||||
@@ -147,7 +147,7 @@ export const article = {
|
|||||||
* PUT /api/article/:sku/prices
|
* PUT /api/article/:sku/prices
|
||||||
* Body: { prices: [{ price (net), tax (rate), minmultiplier? }] }
|
* Body: { prices: [{ price (net), tax (rate), minmultiplier? }] }
|
||||||
* Replace-all POS customer group prices. Empty prices clears all POS prices.
|
* Replace-all POS customer group prices. Empty prices clears all POS prices.
|
||||||
* → 200 { article } (same shape as GET by SKU)
|
* → 204 (no body)
|
||||||
*/
|
*/
|
||||||
setPrices(sku, prices) {
|
setPrices(sku, prices) {
|
||||||
return http(`/api/article/${encodeURIComponent(sku)}/prices`, {
|
return http(`/api/article/${encodeURIComponent(sku)}/prices`, {
|
||||||
@@ -158,7 +158,7 @@ export const article = {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* PUT /api/article/:sku/weight
|
* PUT /api/article/:sku/weight
|
||||||
* Body: { weight } → 200 { article }
|
* Body: { weight } → 204 (no body)
|
||||||
*/
|
*/
|
||||||
setWeight(sku, body) {
|
setWeight(sku, body) {
|
||||||
return http(`/api/article/${encodeURIComponent(sku)}/weight`, {
|
return http(`/api/article/${encodeURIComponent(sku)}/weight`, {
|
||||||
@@ -171,7 +171,7 @@ export const article = {
|
|||||||
* PUT /api/article/:sku/brand
|
* PUT /api/article/:sku/brand
|
||||||
* Body: { brandId: number | null } — null clears the brand.
|
* Body: { brandId: number | null } — null clears the brand.
|
||||||
* brandId must belong to the article's company → 404 Article or brand not found.
|
* brandId must belong to the article's company → 404 Article or brand not found.
|
||||||
* → 200 { article } (same shape as GET by SKU)
|
* → 204 (no body)
|
||||||
*/
|
*/
|
||||||
setBrandIdBySku(sku, brandId) {
|
setBrandIdBySku(sku, brandId) {
|
||||||
return http(`/api/article/${encodeURIComponent(sku)}/brand`, {
|
return http(`/api/article/${encodeURIComponent(sku)}/brand`, {
|
||||||
@@ -184,7 +184,7 @@ export const article = {
|
|||||||
* PUT /api/article/:sku/eans
|
* PUT /api/article/:sku/eans
|
||||||
* Body: { eans: string[] } — replace-all. Empty array clears all.
|
* Body: { eans: string[] } — replace-all. Empty array clears all.
|
||||||
* EANs must be non-empty unique strings → 400 Invalid eans.
|
* EANs must be non-empty unique strings → 400 Invalid eans.
|
||||||
* → 200 { article } (same shape as GET by SKU)
|
* → 204 (no body)
|
||||||
*/
|
*/
|
||||||
setEansBySku(sku, eans) {
|
setEansBySku(sku, eans) {
|
||||||
return http(`/api/article/${encodeURIComponent(sku)}/eans`, {
|
return http(`/api/article/${encodeURIComponent(sku)}/eans`, {
|
||||||
@@ -197,7 +197,7 @@ export const article = {
|
|||||||
* PUT /api/article/:sku/categories
|
* PUT /api/article/:sku/categories
|
||||||
* Body: { categoryIds: number[] } — replace-all. Empty array clears all.
|
* Body: { categoryIds: number[] } — replace-all. Empty array clears all.
|
||||||
* Categories must belong to the article's company; ids must be unique.
|
* Categories must belong to the article's company; ids must be unique.
|
||||||
* → 200 { article } (same shape as GET by SKU)
|
* → 204 (no body)
|
||||||
*/
|
*/
|
||||||
setCategories(sku, categoryIds) {
|
setCategories(sku, categoryIds) {
|
||||||
return http(`/api/article/${encodeURIComponent(sku)}/categories`, {
|
return http(`/api/article/${encodeURIComponent(sku)}/categories`, {
|
||||||
@@ -342,7 +342,7 @@ export const article = {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* POST /api/article/:sku/parent
|
* POST /api/article/:sku/parent
|
||||||
* Body: { isParent: boolean, attributeNameId?: number }
|
* Body: { isParent: boolean, attributeNameId?: number } → 204 (no body)
|
||||||
*/
|
*/
|
||||||
toggleParent(sku, body) {
|
toggleParent(sku, body) {
|
||||||
return http(`/api/article/${encodeURIComponent(sku)}/parent`, {
|
return http(`/api/article/${encodeURIComponent(sku)}/parent`, {
|
||||||
@@ -355,6 +355,7 @@ export const article = {
|
|||||||
/**
|
/**
|
||||||
* POST /api/article/:sku/children
|
* POST /api/article/:sku/children
|
||||||
* Body: { attributeValueId?: number, value?: string, name?: string }
|
* Body: { attributeValueId?: number, value?: string, name?: string }
|
||||||
|
* → 201 { sku }
|
||||||
*/
|
*/
|
||||||
addChild(sku, body) {
|
addChild(sku, body) {
|
||||||
return http(`/api/article/${encodeURIComponent(sku)}/children`, {
|
return http(`/api/article/${encodeURIComponent(sku)}/children`, {
|
||||||
|
|||||||
@@ -169,9 +169,8 @@ const actions = {
|
|||||||
actions.setArticleName(key, body.name);
|
actions.setArticleName(key, body.name);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const res = await articleApi.update(key, body);
|
await articleApi.update(key, body);
|
||||||
actions.setArticle(res.article);
|
return { article: await actions.reloadArticle(key) };
|
||||||
return res;
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (nameChange) {
|
if (nameChange) {
|
||||||
// The optimistic patch was wrong: drop the index entry and refetch.
|
// The optimistic patch was wrong: drop the index entry and refetch.
|
||||||
@@ -192,9 +191,8 @@ const actions = {
|
|||||||
* @returns {Promise<object>} Response body containing the fresh `article`.
|
* @returns {Promise<object>} Response body containing the fresh `article`.
|
||||||
*/
|
*/
|
||||||
async setEans(sku, eans) {
|
async setEans(sku, eans) {
|
||||||
const res = await articleApi.setEansBySku(String(sku), eans);
|
await articleApi.setEansBySku(String(sku), eans);
|
||||||
actions.setArticle(res.article);
|
return { article: await actions.reloadArticle(sku) };
|
||||||
return res;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -205,9 +203,8 @@ const actions = {
|
|||||||
* @returns {Promise<object>} Response body containing the fresh `article`.
|
* @returns {Promise<object>} Response body containing the fresh `article`.
|
||||||
*/
|
*/
|
||||||
async setBrand(sku, body) {
|
async setBrand(sku, body) {
|
||||||
const res = await articleApi.setBrandIdBySku(String(sku), body?.brandId);
|
await articleApi.setBrandIdBySku(String(sku), body?.brandId);
|
||||||
actions.setArticle(res.article);
|
return { article: await actions.reloadArticle(sku) };
|
||||||
return res;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -218,9 +215,8 @@ const actions = {
|
|||||||
* @returns {Promise<object>} Response body containing the fresh `article`.
|
* @returns {Promise<object>} Response body containing the fresh `article`.
|
||||||
*/
|
*/
|
||||||
async setCategories(sku, categoryIds) {
|
async setCategories(sku, categoryIds) {
|
||||||
const res = await articleApi.setCategories(String(sku), categoryIds);
|
await articleApi.setCategories(String(sku), categoryIds);
|
||||||
actions.setArticle(res.article);
|
return { article: await actions.reloadArticle(sku) };
|
||||||
return res;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -231,9 +227,8 @@ const actions = {
|
|||||||
* @returns {Promise<object>} Response body containing the fresh `article`.
|
* @returns {Promise<object>} Response body containing the fresh `article`.
|
||||||
*/
|
*/
|
||||||
async setPrices(sku, prices) {
|
async setPrices(sku, prices) {
|
||||||
const res = await articleApi.setPrices(String(sku), prices);
|
await articleApi.setPrices(String(sku), prices);
|
||||||
actions.setArticle(res.article);
|
return { article: await actions.reloadArticle(sku) };
|
||||||
return res;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -244,9 +239,8 @@ const actions = {
|
|||||||
* @returns {Promise<object>} Response body containing the fresh `article`.
|
* @returns {Promise<object>} Response body containing the fresh `article`.
|
||||||
*/
|
*/
|
||||||
async setWeight(sku, body) {
|
async setWeight(sku, body) {
|
||||||
const res = await articleApi.setWeight(String(sku), body);
|
await articleApi.setWeight(String(sku), body);
|
||||||
actions.setArticle(res.article);
|
return { article: await actions.reloadArticle(sku) };
|
||||||
return res;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -257,9 +251,8 @@ const actions = {
|
|||||||
* @returns {Promise<object>} Response body containing the fresh `article`.
|
* @returns {Promise<object>} Response body containing the fresh `article`.
|
||||||
*/
|
*/
|
||||||
async setTrackStock(sku, body) {
|
async setTrackStock(sku, body) {
|
||||||
const res = await articleApi.setTrackStock(String(sku), body);
|
await articleApi.setTrackStock(String(sku), body);
|
||||||
if (res?.article) actions.setArticle(res.article);
|
return { article: await actions.reloadArticle(sku) };
|
||||||
return res;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -213,8 +213,8 @@ const actions = {
|
|||||||
* @param {{ parentId: number|string, name: string }} param0
|
* @param {{ parentId: number|string, name: string }} param0
|
||||||
*/
|
*/
|
||||||
async createArticle({ parentId, name }) {
|
async createArticle({ parentId, name }) {
|
||||||
const res = await articleApi.create({ categoryId: parentId, name });
|
const { sku } = await articleApi.create({ categoryId: parentId, name });
|
||||||
const created = res.article;
|
const { article: created } = await articleApi.getBySku(sku);
|
||||||
if (created) appendArticlesToCategoryViews({ categoryId: parentId, articles: [created] });
|
if (created) appendArticlesToCategoryViews({ categoryId: parentId, articles: [created] });
|
||||||
return created;
|
return created;
|
||||||
},
|
},
|
||||||
@@ -228,8 +228,9 @@ const actions = {
|
|||||||
if (list.length === 0) throw new Error('Keine Namen übergeben.');
|
if (list.length === 0) throw new Error('Keine Namen übergeben.');
|
||||||
const created = [];
|
const created = [];
|
||||||
for (const name of list) {
|
for (const name of list) {
|
||||||
const res = await articleApi.create({ categoryId: parentId, name });
|
const { sku } = await articleApi.create({ categoryId: parentId, name });
|
||||||
if (res.article) created.push(res.article);
|
const { article: created1 } = await articleApi.getBySku(sku);
|
||||||
|
if (created1) created.push(created1);
|
||||||
}
|
}
|
||||||
appendArticlesToCategoryViews({ categoryId: parentId, articles: created });
|
appendArticlesToCategoryViews({ categoryId: parentId, articles: created });
|
||||||
return created;
|
return created;
|
||||||
|
|||||||
@@ -236,7 +236,7 @@ class CompanySetupDialog extends Component {
|
|||||||
|
|
||||||
await bootstrapAuthMe();
|
await bootstrapAuthMe();
|
||||||
await companyAutomat.actions.load();
|
await companyAutomat.actions.load();
|
||||||
await numberAutomat.actions.reload().catch(() => {});
|
await numberAutomat.actions.reload().catch(() => { });
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.setState({ error: backendErrorFrom(err) });
|
this.setState({ error: backendErrorFrom(err) });
|
||||||
} finally {
|
} finally {
|
||||||
@@ -286,22 +286,7 @@ class CompanySetupDialog extends Component {
|
|||||||
maxWidth={hasCompanies ? 'sm' : 'md'}
|
maxWidth={hasCompanies ? 'sm' : 'md'}
|
||||||
fullWidth
|
fullWidth
|
||||||
>
|
>
|
||||||
<DialogTitle sx={{ pb: 1 }}>
|
|
||||||
{loading
|
|
||||||
? 'Unternehmen'
|
|
||||||
: hasCompanies
|
|
||||||
? 'Unternehmen auswählen'
|
|
||||||
: 'Willkommen bei Dash'}
|
|
||||||
</DialogTitle>
|
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
{!loading ? (
|
|
||||||
<Typography variant="body2" color="text.secondary" sx={{ mb: 2.5 }}>
|
|
||||||
{hasCompanies
|
|
||||||
? 'Wählen Sie ein bestehendes Unternehmen oder legen Sie ein neues an.'
|
|
||||||
: 'Legen Sie Ihr erstes Unternehmen an und wählen Sie das Format für Ihre Nummernkreise.'}
|
|
||||||
</Typography>
|
|
||||||
) : null}
|
|
||||||
|
|
||||||
{error ? (
|
{error ? (
|
||||||
isBackendFailure(error) ? (
|
isBackendFailure(error) ? (
|
||||||
<BackendError error={error} sx={{ mb: 2 }} />
|
<BackendError error={error} sx={{ mb: 2 }} />
|
||||||
@@ -410,13 +395,6 @@ class CompanySetupDialog extends Component {
|
|||||||
|
|
||||||
{/* Nummernkreise Section (when no company was created yet or creating new) */}
|
{/* Nummernkreise Section (when no company was created yet or creating new) */}
|
||||||
<Box sx={{ pt: 1 }}>
|
<Box sx={{ pt: 1 }}>
|
||||||
<Typography variant="subtitle2" sx={{ fontWeight: 600, mb: 0.5 }}>
|
|
||||||
Nummernkreise & Belegnummern
|
|
||||||
</Typography>
|
|
||||||
<Typography variant="body2" color="text.secondary" sx={{ mb: 1.5 }}>
|
|
||||||
Wählen Sie eine Voreinstellung oder passen Sie Präfix, Stellen und Startnummer an:
|
|
||||||
</Typography>
|
|
||||||
|
|
||||||
<Stack direction="row" spacing={1} useFlexGap sx={{ flexWrap: 'wrap', mb: 1.5 }}>
|
<Stack direction="row" spacing={1} useFlexGap sx={{ flexWrap: 'wrap', mb: 1.5 }}>
|
||||||
{PRESETS.map((p) => {
|
{PRESETS.map((p) => {
|
||||||
const isSelected = selectedPreset === p.id;
|
const isSelected = selectedPreset === p.id;
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ import CalculateIcon from '@mui/icons-material/Calculate';
|
|||||||
import QrCodeScannerIcon from '@mui/icons-material/QrCodeScanner';
|
import QrCodeScannerIcon from '@mui/icons-material/QrCodeScanner';
|
||||||
import DirectionsIcon from '@mui/icons-material/Directions';
|
import DirectionsIcon from '@mui/icons-material/Directions';
|
||||||
import EditNoteIcon from '@mui/icons-material/EditNote';
|
import EditNoteIcon from '@mui/icons-material/EditNote';
|
||||||
|
import PaidRoundedIcon from '@mui/icons-material/PaidRounded';
|
||||||
import Button from '@mui/material/Button';
|
import Button from '@mui/material/Button';
|
||||||
import { enqueueSnackbar } from 'notistack';
|
import { enqueueSnackbar } from 'notistack';
|
||||||
import { deliveryEditorAutomat, setLastDeliveryPath } from '../../automats';
|
import { deliveryEditorAutomat, setLastDeliveryPath } from '../../automats';
|
||||||
@@ -84,6 +85,59 @@ function formatUsageText(usage) {
|
|||||||
return `${fmt(input)} Prompt${cachedPart} · ${fmt(output)} Antwort${cost}`;
|
return `${fmt(input)} Prompt${cachedPart} · ${fmt(output)} Antwort${cost}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function formatUsageTooltip(usage) {
|
||||||
|
if (!usage) return '';
|
||||||
|
const input = Number(usage.input ?? usage.prompt_tokens ?? 0);
|
||||||
|
const output = Number(usage.output ?? usage.completion_tokens ?? 0);
|
||||||
|
const cached = Number(usage.cached ?? 0);
|
||||||
|
const cost = typeof usage.cost === 'number' ? `$${usage.cost.toFixed(6)}` : null;
|
||||||
|
const fmt = (n) => n.toLocaleString('de-DE');
|
||||||
|
|
||||||
|
const lines = [
|
||||||
|
`Prompt: ${fmt(input)} Tokens`,
|
||||||
|
];
|
||||||
|
if (cached > 0) {
|
||||||
|
lines.push(`Cache: ${fmt(cached)} Tokens`);
|
||||||
|
}
|
||||||
|
lines.push(`Antwort: ${fmt(output)} Tokens`);
|
||||||
|
if (cost) {
|
||||||
|
lines.push(`Kosten: ${cost}`);
|
||||||
|
}
|
||||||
|
return lines.join('\n');
|
||||||
|
}
|
||||||
|
|
||||||
|
export function aggregateUsage(turns = []) {
|
||||||
|
if (!Array.isArray(turns) || turns.length === 0) return null;
|
||||||
|
let hasUsage = false;
|
||||||
|
let totalInput = 0;
|
||||||
|
let totalOutput = 0;
|
||||||
|
let totalCached = 0;
|
||||||
|
let totalCost = 0;
|
||||||
|
let hasCost = false;
|
||||||
|
|
||||||
|
for (const turn of turns) {
|
||||||
|
const u = turn?.usage;
|
||||||
|
if (!u) continue;
|
||||||
|
hasUsage = true;
|
||||||
|
totalInput += Number(u.input ?? u.prompt_tokens ?? 0);
|
||||||
|
totalOutput += Number(u.output ?? u.completion_tokens ?? 0);
|
||||||
|
totalCached += Number(u.cached ?? 0);
|
||||||
|
if (typeof u.cost === 'number' && !Number.isNaN(u.cost)) {
|
||||||
|
totalCost += u.cost;
|
||||||
|
hasCost = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!hasUsage) return null;
|
||||||
|
|
||||||
|
return {
|
||||||
|
input: totalInput,
|
||||||
|
output: totalOutput,
|
||||||
|
cached: totalCached,
|
||||||
|
cost: hasCost ? totalCost : undefined,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
function formatToolTooltip(content, result, parameters, prefix, error) {
|
function formatToolTooltip(content, result, parameters, prefix, error) {
|
||||||
const parts = [];
|
const parts = [];
|
||||||
|
|
||||||
@@ -455,12 +509,12 @@ function tryExtractObject(val) {
|
|||||||
const trimmed = val.trim();
|
const trimmed = val.trim();
|
||||||
try {
|
try {
|
||||||
return JSON.parse(trimmed);
|
return JSON.parse(trimmed);
|
||||||
} catch {}
|
} catch { }
|
||||||
const match = trimmed.match(/\{[\s\S]*\}/);
|
const match = trimmed.match(/\{[\s\S]*\}/);
|
||||||
if (match) {
|
if (match) {
|
||||||
try {
|
try {
|
||||||
return JSON.parse(match[0]);
|
return JSON.parse(match[0]);
|
||||||
} catch {}
|
} catch { }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
@@ -652,7 +706,7 @@ function WorkIconView({ tool }) {
|
|||||||
return iconElement;
|
return iconElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
function UsageChipView({ usage }) {
|
function UsageChipView({ usage, isSummary = false }) {
|
||||||
const text = formatUsageText(usage);
|
const text = formatUsageText(usage);
|
||||||
if (!text) return null;
|
if (!text) return null;
|
||||||
|
|
||||||
@@ -664,8 +718,11 @@ function UsageChipView({ usage }) {
|
|||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
fontSize: '0.68rem',
|
fontSize: '0.68rem',
|
||||||
fontFamily: 'monospace',
|
fontFamily: 'monospace',
|
||||||
color: 'text.secondary',
|
color: isSummary ? 'text.primary' : 'text.secondary',
|
||||||
bgcolor: 'action.hover',
|
fontWeight: isSummary ? 400 : 400,
|
||||||
|
bgcolor: isSummary ? 'action.selected' : 'action.hover',
|
||||||
|
border: isSummary ? '1px solid' : 'none',
|
||||||
|
borderColor: isSummary ? 'divider' : 'transparent',
|
||||||
px: 0.8,
|
px: 0.8,
|
||||||
py: 0.25,
|
py: 0.25,
|
||||||
borderRadius: 1.5,
|
borderRadius: 1.5,
|
||||||
@@ -677,88 +734,202 @@ function UsageChipView({ usage }) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function TurnRow({ turn, isLive = false }) {
|
function UsageIconView({ usage }) {
|
||||||
if (!turn) return null;
|
if (!usage) return null;
|
||||||
|
const tooltipText = formatUsageTooltip(usage);
|
||||||
|
if (!tooltipText) return null;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<ClickTooltip
|
||||||
|
title={
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
p: 0.5,
|
||||||
|
maxWidth: 320,
|
||||||
|
whiteSpace: 'pre-wrap',
|
||||||
|
fontFamily: 'monospace',
|
||||||
|
fontSize: '0.72rem',
|
||||||
|
lineHeight: 1.4,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{tooltipText}
|
||||||
|
</Box>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
display: 'inline-flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
width: 24,
|
||||||
|
height: 24,
|
||||||
|
color: 'text.secondary',
|
||||||
|
borderRadius: 1,
|
||||||
|
'&:hover': {
|
||||||
|
bgcolor: 'action.hover',
|
||||||
|
color: 'text.primary',
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<PaidRoundedIcon sx={{ fontSize: 18, color: 'inherit' }} />
|
||||||
|
</Box>
|
||||||
|
</ClickTooltip>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function turnHasIcons(turn) {
|
||||||
|
if (!turn) return false;
|
||||||
const hasReasonings = Boolean(
|
const hasReasonings = Boolean(
|
||||||
turn.reasonings &&
|
turn.reasonings &&
|
||||||
turn.reasonings.some((r) => Boolean(r.text && r.text.trim()))
|
turn.reasonings.some((r) => Boolean(r.text && r.text.trim()))
|
||||||
);
|
);
|
||||||
const hasTools = Boolean(turn.tools && turn.tools.length > 0);
|
const hasTools = Boolean(turn.tools && turn.tools.length > 0);
|
||||||
|
const hasUsage = Boolean(turn.usage);
|
||||||
const hasContent = Boolean(turn.content);
|
const hasContent = Boolean(turn.content);
|
||||||
const showHandshake = !hasReasonings && !hasTools && !hasContent;
|
const showHandshake = !hasReasonings && !hasTools && !hasContent && !hasUsage;
|
||||||
const showStatusLine = showHandshake || hasReasonings || hasTools;
|
return showHandshake || hasReasonings || hasTools || hasUsage;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function TurnIcons({ turn }) {
|
||||||
|
if (!turn) return null;
|
||||||
|
const hasReasonings = Boolean(
|
||||||
|
turn.reasonings &&
|
||||||
|
turn.reasonings.some((r) => Boolean(r.text && r.text.trim()))
|
||||||
|
);
|
||||||
|
const hasTools = Boolean(turn.tools && turn.tools.length > 0);
|
||||||
|
const hasUsage = Boolean(turn.usage);
|
||||||
|
const hasContent = Boolean(turn.content);
|
||||||
|
const showHandshake = !hasReasonings && !hasTools && !hasContent && !hasUsage;
|
||||||
|
|
||||||
|
const showStatus = showHandshake || hasReasonings || hasTools || hasUsage;
|
||||||
|
if (!showStatus) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
display: 'flex',
|
display: 'inline-flex',
|
||||||
flexDirection: 'column',
|
alignItems: 'center',
|
||||||
alignItems: 'flex-start',
|
gap: 0.5,
|
||||||
px: 2,
|
|
||||||
py: 0.4,
|
|
||||||
gap: 0.75,
|
|
||||||
maxWidth: '100%',
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{/* Turn status line: left of the chat */}
|
{showHandshake ? <HandshakeIconView state={turn.handshake} /> : null}
|
||||||
{showStatusLine ? (
|
|
||||||
<Box
|
|
||||||
sx={{
|
|
||||||
display: 'flex',
|
|
||||||
alignItems: 'center',
|
|
||||||
gap: 1,
|
|
||||||
flexWrap: 'wrap',
|
|
||||||
minHeight: 24,
|
|
||||||
lineHeight: 1,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{showHandshake ? <HandshakeIconView state={turn.handshake} /> : null}
|
|
||||||
|
|
||||||
{turn.reasonings?.map((r, i) => (
|
{turn.reasonings?.map((r, i) => (
|
||||||
<BrainIconView key={r.id || i} reasoning={r} />
|
<BrainIconView key={r.id || i} reasoning={r} />
|
||||||
))}
|
))}
|
||||||
|
|
||||||
{turn.tools?.map((t, i) => (
|
{turn.tools?.map((t, i) => (
|
||||||
<WorkIconView key={t.id || i} tool={t} />
|
<WorkIconView key={t.id || i} tool={t} />
|
||||||
))}
|
))}
|
||||||
</Box>
|
|
||||||
) : null}
|
|
||||||
|
|
||||||
{/* Assistant message content for this turn (if any) */}
|
{hasUsage ? (
|
||||||
{hasContent ? (
|
<UsageIconView usage={turn.usage} />
|
||||||
<Box
|
|
||||||
sx={(theme) => ({
|
|
||||||
maxWidth: '85%',
|
|
||||||
px: 2,
|
|
||||||
py: 1.25,
|
|
||||||
borderRadius: '16px 16px 16px 4px',
|
|
||||||
bgcolor:
|
|
||||||
theme.palette.mode === 'dark'
|
|
||||||
? 'background.paper'
|
|
||||||
: SURFACE_RAISED,
|
|
||||||
color: theme.palette.text.primary,
|
|
||||||
boxShadow: SHADOW_BUBBLE_ASSISTANT,
|
|
||||||
border: `1px solid ${theme.palette.divider}`,
|
|
||||||
wordBreak: 'break-word',
|
|
||||||
fontSize: '0.875rem',
|
|
||||||
lineHeight: 1.5,
|
|
||||||
})}
|
|
||||||
>
|
|
||||||
<HealingMarkdown text={turn.content} streaming={isLive && !turn.sealed} />
|
|
||||||
</Box>
|
|
||||||
) : null}
|
|
||||||
|
|
||||||
{/* Pricing / usage is always on a new line */}
|
|
||||||
{turn.usage ? (
|
|
||||||
<Box sx={{ display: 'flex', alignItems: 'center' }}>
|
|
||||||
<UsageChipView usage={turn.usage} />
|
|
||||||
</Box>
|
|
||||||
) : null}
|
) : null}
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function TurnsView({ turns = [], isLive = false }) {
|
||||||
|
if (!Array.isArray(turns) || turns.length === 0) return null;
|
||||||
|
|
||||||
|
// Segment turns into chunks where icons precede content
|
||||||
|
const segments = [];
|
||||||
|
let pendingTurns = [];
|
||||||
|
|
||||||
|
for (let i = 0; i < turns.length; i++) {
|
||||||
|
const turn = turns[i];
|
||||||
|
pendingTurns.push(turn);
|
||||||
|
|
||||||
|
if (turn.content) {
|
||||||
|
segments.push({
|
||||||
|
statusTurns: [...pendingTurns],
|
||||||
|
contentTurn: turn,
|
||||||
|
});
|
||||||
|
pendingTurns = [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pendingTurns.length > 0) {
|
||||||
|
segments.push({
|
||||||
|
statusTurns: pendingTurns,
|
||||||
|
contentTurn: null,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 0.75, width: '100%' }}>
|
||||||
|
{segments.map((seg, sIdx) => {
|
||||||
|
const hasAnyIcons = seg.statusTurns.some(turnHasIcons);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Box
|
||||||
|
key={sIdx}
|
||||||
|
sx={{
|
||||||
|
display: 'flex',
|
||||||
|
flexDirection: 'column',
|
||||||
|
alignItems: 'flex-start',
|
||||||
|
px: 2,
|
||||||
|
py: 0.4,
|
||||||
|
gap: 0.75,
|
||||||
|
maxWidth: '100%',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{/* All turn icons in ONE line */}
|
||||||
|
{hasAnyIcons ? (
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
gap: 1,
|
||||||
|
flexWrap: 'wrap',
|
||||||
|
minHeight: 24,
|
||||||
|
lineHeight: 1,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{seg.statusTurns.map((t, tIdx) => (
|
||||||
|
<TurnIcons key={t.id || tIdx} turn={t} />
|
||||||
|
))}
|
||||||
|
</Box>
|
||||||
|
) : null}
|
||||||
|
|
||||||
|
{/* Assistant message content for this segment (if any) */}
|
||||||
|
{seg.contentTurn?.content ? (
|
||||||
|
<Box
|
||||||
|
sx={(theme) => ({
|
||||||
|
maxWidth: '85%',
|
||||||
|
px: 2,
|
||||||
|
py: 1.25,
|
||||||
|
borderRadius: '16px 16px 16px 4px',
|
||||||
|
bgcolor:
|
||||||
|
theme.palette.mode === 'dark'
|
||||||
|
? 'background.paper'
|
||||||
|
: SURFACE_RAISED,
|
||||||
|
color: theme.palette.text.primary,
|
||||||
|
boxShadow: SHADOW_BUBBLE_ASSISTANT,
|
||||||
|
border: `1px solid ${theme.palette.divider}`,
|
||||||
|
wordBreak: 'break-word',
|
||||||
|
fontSize: '0.875rem',
|
||||||
|
lineHeight: 1.5,
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
<HealingMarkdown
|
||||||
|
text={seg.contentTurn.content}
|
||||||
|
streaming={isLive && !seg.contentTurn.sealed}
|
||||||
|
/>
|
||||||
|
</Box>
|
||||||
|
) : null}
|
||||||
|
</Box>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</Box>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function TurnRow({ turn, isLive = false }) {
|
||||||
|
if (!turn) return null;
|
||||||
|
return <TurnsView turns={[turn]} isLive={isLive} />;
|
||||||
|
}
|
||||||
|
|
||||||
export function normalizeChatMessages(rawMessages = []) {
|
export function normalizeChatMessages(rawMessages = []) {
|
||||||
if (!Array.isArray(rawMessages) || rawMessages.length === 0) return [];
|
if (!Array.isArray(rawMessages) || rawMessages.length === 0) return [];
|
||||||
|
|
||||||
@@ -960,11 +1131,20 @@ export function normalizeChatMessages(rawMessages = []) {
|
|||||||
function MessageRow({ msg, showTime = true }) {
|
function MessageRow({ msg, showTime = true }) {
|
||||||
// If the message has structured turns, render each turn
|
// If the message has structured turns, render each turn
|
||||||
if (msg.turns && Array.isArray(msg.turns) && msg.turns.length > 0) {
|
if (msg.turns && Array.isArray(msg.turns) && msg.turns.length > 0) {
|
||||||
|
const summaryUsage = aggregateUsage(msg.turns);
|
||||||
|
const turnCount = msg.turns.length;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 0.25 }}>
|
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 0.25 }}>
|
||||||
{msg.turns.map((t, idx) => (
|
<TurnsView turns={msg.turns} isLive={false} />
|
||||||
<TurnRow key={t.id || idx} turn={t} isLive={false} />
|
{summaryUsage ? (
|
||||||
))}
|
<Box sx={{ display: 'flex', alignItems: 'center', px: 2, py: 0.4 }}>
|
||||||
|
<UsageChipView
|
||||||
|
usage={summaryUsage}
|
||||||
|
isSummary={true}
|
||||||
|
/>
|
||||||
|
</Box>
|
||||||
|
) : null}
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -1198,11 +1378,23 @@ export default class ChatFlowList extends PureComponent {
|
|||||||
})}
|
})}
|
||||||
|
|
||||||
{/* Live streaming turns */}
|
{/* Live streaming turns */}
|
||||||
{activeTurns && activeTurns.length > 0
|
{activeTurns && activeTurns.length > 0 ? (
|
||||||
? activeTurns.map((turn, idx) => (
|
<>
|
||||||
<TurnRow key={turn.id || idx} turn={turn} isLive={true} />
|
<TurnsView turns={activeTurns} isLive={true} />
|
||||||
))
|
{(() => {
|
||||||
: null}
|
const activeSummary = aggregateUsage(activeTurns);
|
||||||
|
if (!activeSummary) return null;
|
||||||
|
return (
|
||||||
|
<Box sx={{ display: 'flex', alignItems: 'center', px: 2, py: 0.4 }}>
|
||||||
|
<UsageChipView
|
||||||
|
usage={activeSummary}
|
||||||
|
isSummary={true}
|
||||||
|
/>
|
||||||
|
</Box>
|
||||||
|
);
|
||||||
|
})()}
|
||||||
|
</>
|
||||||
|
) : null}
|
||||||
|
|
||||||
<div ref={this.bottomRef} style={{ height: 1, flexShrink: 0 }} />
|
<div ref={this.bottomRef} style={{ height: 1, flexShrink: 0 }} />
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
@@ -57,31 +57,21 @@ import { SCRIM_LABEL } from '../colors';
|
|||||||
// #region Styles & Measure Sample
|
// #region Styles & Measure Sample
|
||||||
const resultRowSx = {
|
const resultRowSx = {
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
minHeight: 64,
|
minHeight: 40,
|
||||||
maxHeight: 64,
|
maxHeight: 40,
|
||||||
height: 64,
|
height: 40,
|
||||||
boxSizing: 'border-box',
|
boxSizing: 'border-box',
|
||||||
py: 0,
|
py: 0,
|
||||||
|
gap: 1.25,
|
||||||
// Keep every row one line so sample height matches real rows.
|
// Keep every row one line so sample height matches real rows.
|
||||||
'& .MuiListItemText-root': { minWidth: 0, my: 0 },
|
'& .MuiListItemText-root': { minWidth: 0, my: 0 },
|
||||||
'& .MuiListItemText-primary': {
|
};
|
||||||
overflow: 'hidden',
|
|
||||||
textOverflow: 'ellipsis',
|
const resultCellSx = {
|
||||||
whiteSpace: 'nowrap',
|
flexShrink: 0,
|
||||||
lineHeight: '22px',
|
whiteSpace: 'nowrap',
|
||||||
height: '22px',
|
overflow: 'hidden',
|
||||||
display: 'flex',
|
textOverflow: 'ellipsis',
|
||||||
alignItems: 'center',
|
|
||||||
},
|
|
||||||
'& .MuiListItemText-secondary': {
|
|
||||||
overflow: 'hidden',
|
|
||||||
textOverflow: 'ellipsis',
|
|
||||||
whiteSpace: 'nowrap',
|
|
||||||
lineHeight: '20px',
|
|
||||||
height: '20px',
|
|
||||||
display: 'flex',
|
|
||||||
alignItems: 'center',
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -112,16 +102,8 @@ class ResultRow extends Component {
|
|||||||
disabled
|
disabled
|
||||||
sx={{ ...resultRowSx, pointerEvents: 'none', userSelect: 'none', opacity: 0 }}
|
sx={{ ...resultRowSx, pointerEvents: 'none', userSelect: 'none', opacity: 0 }}
|
||||||
>
|
>
|
||||||
<ListItemText
|
<Box sx={{ width: 28, height: 28, flexShrink: 0 }} />
|
||||||
primary={'\u00A0'}
|
<Typography variant="body2"> </Typography>
|
||||||
slotProps={{ primary: { fontWeight: 500, noWrap: true } }}
|
|
||||||
/>
|
|
||||||
<Typography
|
|
||||||
variant="body2"
|
|
||||||
sx={{ fontWeight: 600, flexShrink: 0, ml: 2, visibility: 'hidden' }}
|
|
||||||
>
|
|
||||||
|
|
||||||
</Typography>
|
|
||||||
</ListItemButton>
|
</ListItemButton>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -139,120 +121,112 @@ class ResultRow extends Component {
|
|||||||
onMouseDown={(e) => e.preventDefault()}
|
onMouseDown={(e) => e.preventDefault()}
|
||||||
onClick={() => onOpenArticle?.(row)}
|
onClick={() => onOpenArticle?.(row)}
|
||||||
sx={resultRowSx}
|
sx={resultRowSx}
|
||||||
|
title={row.sku}
|
||||||
>
|
>
|
||||||
<ListItemText
|
<Box
|
||||||
primary={
|
sx={{
|
||||||
|
width: 28,
|
||||||
|
height: 28,
|
||||||
|
flexShrink: 0,
|
||||||
|
borderRadius: 0.5,
|
||||||
|
overflow: 'hidden',
|
||||||
|
bgcolor: 'action.hover',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{row.smallThumbBinary && (
|
||||||
<Box
|
<Box
|
||||||
component="span"
|
component="img"
|
||||||
sx={{
|
alt=""
|
||||||
display: 'inline-flex',
|
src={`data:image/avif;base64,${row.smallThumbBinary}`}
|
||||||
alignItems: 'center',
|
sx={{ width: '100%', height: '100%', objectFit: 'cover', display: 'block' }}
|
||||||
gap: 0.75,
|
/>
|
||||||
maxWidth: '100%',
|
)}
|
||||||
}}
|
</Box>
|
||||||
>
|
|
||||||
<Box
|
|
||||||
component="span"
|
|
||||||
sx={{
|
|
||||||
overflow: 'hidden',
|
|
||||||
textOverflow: 'ellipsis',
|
|
||||||
whiteSpace: 'nowrap',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{row.name}
|
|
||||||
</Box>
|
|
||||||
{showChildBadge && (
|
|
||||||
<Box
|
|
||||||
component="span"
|
|
||||||
title={`${childCount} Varianten`}
|
|
||||||
sx={{
|
|
||||||
display: 'inline-flex',
|
|
||||||
alignItems: 'center',
|
|
||||||
justifyContent: 'center',
|
|
||||||
px: 0.75,
|
|
||||||
py: 0.25,
|
|
||||||
borderRadius: 999,
|
|
||||||
bgcolor: SCRIM_LABEL,
|
|
||||||
color: 'common.white',
|
|
||||||
fontSize: 11,
|
|
||||||
fontWeight: 600,
|
|
||||||
lineHeight: 1.2,
|
|
||||||
whiteSpace: 'nowrap',
|
|
||||||
flexShrink: 0,
|
|
||||||
pointerEvents: 'none',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{childCount}
|
|
||||||
</Box>
|
|
||||||
)}
|
|
||||||
</Box>
|
|
||||||
}
|
|
||||||
secondary={
|
|
||||||
<Typography
|
|
||||||
component="span"
|
|
||||||
variant="body2"
|
|
||||||
color="text.secondary"
|
|
||||||
noWrap
|
|
||||||
sx={{
|
|
||||||
display: 'inline-flex',
|
|
||||||
alignItems: 'center',
|
|
||||||
gap: 0.5,
|
|
||||||
maxWidth: '100%',
|
|
||||||
lineHeight: '20px',
|
|
||||||
height: '20px',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{(row.brand?.name || row.brandName) ? (
|
|
||||||
<Box
|
|
||||||
component="span"
|
|
||||||
sx={{ display: 'inline-flex', alignItems: 'center', gap: 0.5, flexShrink: 0 }}
|
|
||||||
>
|
|
||||||
<BrandLabel
|
|
||||||
brand={row.brand || { name: row.brandName, thumbHash: row.brandThumbHash }}
|
|
||||||
name={row.brand?.name || row.brandName}
|
|
||||||
size={14}
|
|
||||||
spacing={0.5}
|
|
||||||
typographyProps={{
|
|
||||||
variant: 'body2',
|
|
||||||
color: 'text.secondary',
|
|
||||||
noWrap: true,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<span>·</span>
|
|
||||||
</Box>
|
|
||||||
) : null}
|
|
||||||
<Box component="span" sx={{ flexShrink: 0 }}>
|
|
||||||
{row.sku}
|
|
||||||
</Box>
|
|
||||||
<Box component="span" sx={{ flexShrink: 0 }}>
|
|
||||||
·
|
|
||||||
</Box>
|
|
||||||
<Box
|
|
||||||
component="span"
|
|
||||||
sx={{ flexShrink: 0 }}
|
|
||||||
title={
|
|
||||||
row.warehouses?.length > 0
|
|
||||||
? row.warehouses.map((w) => `${w.name || 'Lager'}: ${formatStock(w.stock)}`).join(' · ')
|
|
||||||
: undefined
|
|
||||||
}
|
|
||||||
>
|
|
||||||
Bestand {formatStock(row.stock)}
|
|
||||||
</Box>
|
|
||||||
{row.categories ? (
|
|
||||||
<Box
|
|
||||||
component="span"
|
|
||||||
sx={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}
|
|
||||||
>
|
|
||||||
{` · ${formatCategoryList(row.categories, categoryFacets ?? {})}`}
|
|
||||||
</Box>
|
|
||||||
) : null}
|
|
||||||
</Typography>
|
|
||||||
}
|
|
||||||
slotProps={{ primary: { fontWeight: 500, noWrap: true } }}
|
|
||||||
/>
|
|
||||||
<Typography
|
<Typography
|
||||||
variant="body2"
|
variant="body2"
|
||||||
sx={{ fontWeight: 600, flexShrink: 0, ml: 2 }}
|
color="text.secondary"
|
||||||
|
sx={{ ...resultCellSx, minWidth: 28, textAlign: 'right' }}
|
||||||
|
title={
|
||||||
|
row.warehouses?.length > 0
|
||||||
|
? row.warehouses.map((w) => `${w.name || 'Lager'}: ${formatStock(w.stock)}`).join(' · ')
|
||||||
|
: undefined
|
||||||
|
}
|
||||||
|
>
|
||||||
|
{formatStock(row.stock)}
|
||||||
|
</Typography>
|
||||||
|
{row.categories ? (
|
||||||
|
<Typography
|
||||||
|
variant="body2"
|
||||||
|
sx={{ ...resultCellSx, maxWidth: '20%', color: '#9aa0a6' }}
|
||||||
|
>
|
||||||
|
{formatCategoryList(row.categories, categoryFacets ?? {})}
|
||||||
|
</Typography>
|
||||||
|
) : null}
|
||||||
|
{(row.brand?.name || row.brandName) ? (
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
...resultCellSx,
|
||||||
|
maxWidth: '16%',
|
||||||
|
display: 'inline-flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
color: '#1976d2',
|
||||||
|
fontWeight: 500,
|
||||||
|
'& *': { color: '#1976d2 !important' },
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<BrandLabel
|
||||||
|
brand={row.brand || { name: row.brandName, thumbHash: row.brandThumbHash }}
|
||||||
|
name={row.brand?.name || row.brandName}
|
||||||
|
size={14}
|
||||||
|
spacing={0.5}
|
||||||
|
typographyProps={{ variant: 'body2', color: 'primary.main', noWrap: true }}
|
||||||
|
/>
|
||||||
|
</Box>
|
||||||
|
) : null}
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
gap: 0.75,
|
||||||
|
minWidth: 0,
|
||||||
|
flex: 1,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Typography
|
||||||
|
variant="body2"
|
||||||
|
noWrap
|
||||||
|
sx={{ fontWeight: 500, minWidth: 0 }}
|
||||||
|
>
|
||||||
|
{row.name}
|
||||||
|
</Typography>
|
||||||
|
{showChildBadge && (
|
||||||
|
<Box
|
||||||
|
component="span"
|
||||||
|
title={`${childCount} Varianten`}
|
||||||
|
sx={{
|
||||||
|
display: 'inline-flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
px: 0.75,
|
||||||
|
py: 0.25,
|
||||||
|
borderRadius: 999,
|
||||||
|
bgcolor: SCRIM_LABEL,
|
||||||
|
color: 'common.white',
|
||||||
|
fontSize: 11,
|
||||||
|
fontWeight: 600,
|
||||||
|
lineHeight: 1.2,
|
||||||
|
whiteSpace: 'nowrap',
|
||||||
|
flexShrink: 0,
|
||||||
|
pointerEvents: 'none',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{childCount}
|
||||||
|
</Box>
|
||||||
|
)}
|
||||||
|
</Box>
|
||||||
|
<Typography
|
||||||
|
variant="body2"
|
||||||
|
sx={{ fontWeight: 600, flexShrink: 0 }}
|
||||||
>
|
>
|
||||||
{price != null ? formatPrice(price) : '—'}
|
{price != null ? formatPrice(price) : '—'}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import ListItemButton from '@mui/material/ListItemButton';
|
|||||||
import Typography from '@mui/material/Typography';
|
import Typography from '@mui/material/Typography';
|
||||||
import Skeleton from '@mui/material/Skeleton';
|
import Skeleton from '@mui/material/Skeleton';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
import Tooltip from '@mui/material/Tooltip';
|
||||||
import RefreshIcon from '@mui/icons-material/Refresh';
|
|
||||||
import ViewModuleIcon from '@mui/icons-material/ViewModule';
|
import ViewModuleIcon from '@mui/icons-material/ViewModule';
|
||||||
import Chip from '@mui/material/Chip';
|
import Chip from '@mui/material/Chip';
|
||||||
import SingleLineTextEdit from 'dashgui/SingleLineTextEdit';
|
import SingleLineTextEdit from 'dashgui/SingleLineTextEdit';
|
||||||
@@ -273,16 +272,6 @@ class ArticleHistorySearchField extends PureComponent {
|
|||||||
placeholder="Artikel-Nr., Name, Änderung oder Benutzer suchen…"
|
placeholder="Artikel-Nr., Name, Änderung oder Benutzer suchen…"
|
||||||
onChange={(next) => articleHistoryAutomat.actions.filter(next)}
|
onChange={(next) => articleHistoryAutomat.actions.filter(next)}
|
||||||
/>
|
/>
|
||||||
<Button
|
|
||||||
size="small"
|
|
||||||
variant="outlined"
|
|
||||||
startIcon={<RefreshIcon />}
|
|
||||||
onClick={onReload}
|
|
||||||
disabled={loading}
|
|
||||||
sx={{ height: 40, px: 2, whiteSpace: 'nowrap' }}
|
|
||||||
>
|
|
||||||
Aktualisieren
|
|
||||||
</Button>
|
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
{/* Filter Bar: Negativeseek (-1 Month, -1 Year, Reset) */}
|
{/* Filter Bar: Negativeseek (-1 Month, -1 Year, Reset) */}
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import ListItemButton from '@mui/material/ListItemButton';
|
|||||||
import Typography from '@mui/material/Typography';
|
import Typography from '@mui/material/Typography';
|
||||||
import Skeleton from '@mui/material/Skeleton';
|
import Skeleton from '@mui/material/Skeleton';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
import Tooltip from '@mui/material/Tooltip';
|
||||||
import RefreshIcon from '@mui/icons-material/Refresh';
|
|
||||||
import ViewModuleIcon from '@mui/icons-material/ViewModule';
|
import ViewModuleIcon from '@mui/icons-material/ViewModule';
|
||||||
import Chip from '@mui/material/Chip';
|
import Chip from '@mui/material/Chip';
|
||||||
import SingleLineTextEdit from 'dashgui/SingleLineTextEdit';
|
import SingleLineTextEdit from 'dashgui/SingleLineTextEdit';
|
||||||
@@ -285,16 +284,6 @@ class GlobalHistorySearchField extends PureComponent {
|
|||||||
placeholder="Referenz, Typ, Meldung oder Benutzer suchen…"
|
placeholder="Referenz, Typ, Meldung oder Benutzer suchen…"
|
||||||
onChange={(next) => globalHistoryAutomat.actions.filter(next)}
|
onChange={(next) => globalHistoryAutomat.actions.filter(next)}
|
||||||
/>
|
/>
|
||||||
<Button
|
|
||||||
size="small"
|
|
||||||
variant="outlined"
|
|
||||||
startIcon={<RefreshIcon />}
|
|
||||||
onClick={onReload}
|
|
||||||
disabled={loading}
|
|
||||||
sx={{ height: 40, px: 2, whiteSpace: 'nowrap' }}
|
|
||||||
>
|
|
||||||
Aktualisieren
|
|
||||||
</Button>
|
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
{/* Filter Bar: Negativeseek (-1 Month, -1 Year, Reset) */}
|
{/* Filter Bar: Negativeseek (-1 Month, -1 Year, Reset) */}
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import CircularProgress from '@mui/material/CircularProgress';
|
|||||||
import ListItemButton from '@mui/material/ListItemButton';
|
import ListItemButton from '@mui/material/ListItemButton';
|
||||||
import Typography from '@mui/material/Typography';
|
import Typography from '@mui/material/Typography';
|
||||||
import Skeleton from '@mui/material/Skeleton';
|
import Skeleton from '@mui/material/Skeleton';
|
||||||
import RefreshIcon from '@mui/icons-material/Refresh';
|
|
||||||
import ViewModuleIcon from '@mui/icons-material/ViewModule';
|
import ViewModuleIcon from '@mui/icons-material/ViewModule';
|
||||||
import Chip from '@mui/material/Chip';
|
import Chip from '@mui/material/Chip';
|
||||||
import SingleLineTextEdit from 'dashgui/SingleLineTextEdit';
|
import SingleLineTextEdit from 'dashgui/SingleLineTextEdit';
|
||||||
@@ -327,16 +326,6 @@ class LedgerHistorySearchField extends PureComponent {
|
|||||||
placeholder="Artikel-Nr., Buchungstext, Typ oder Benutzer suchen…"
|
placeholder="Artikel-Nr., Buchungstext, Typ oder Benutzer suchen…"
|
||||||
onChange={(next) => ledgerHistoryAutomat.actions.filter(next)}
|
onChange={(next) => ledgerHistoryAutomat.actions.filter(next)}
|
||||||
/>
|
/>
|
||||||
<Button
|
|
||||||
size="small"
|
|
||||||
variant="outlined"
|
|
||||||
startIcon={<RefreshIcon />}
|
|
||||||
onClick={onReload}
|
|
||||||
disabled={loading}
|
|
||||||
sx={{ height: 40, px: 2, whiteSpace: 'nowrap' }}
|
|
||||||
>
|
|
||||||
Aktualisieren
|
|
||||||
</Button>
|
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
{/* Filter Bar: Negativeseek (-1 Month, -1 Year, Reset) */}
|
{/* Filter Bar: Negativeseek (-1 Month, -1 Year, Reset) */}
|
||||||
|
|||||||
@@ -477,10 +477,9 @@ class LieferungNeuPage extends PureComponent {
|
|||||||
});
|
});
|
||||||
|
|
||||||
requireObject(articleRes, 'POST /api/article');
|
requireObject(articleRes, 'POST /api/article');
|
||||||
requireObject(articleRes.article, 'article');
|
requireDefined(articleRes.sku, 'sku');
|
||||||
requireDefined(articleRes.article.sku, 'article.sku');
|
|
||||||
|
|
||||||
const internalSku = articleRes.article.sku;
|
const internalSku = articleRes.sku;
|
||||||
const supplierSku = line.sku;
|
const supplierSku = line.sku;
|
||||||
|
|
||||||
// Add supplier relationship with the supplier's SKU
|
// Add supplier relationship with the supplier's SKU
|
||||||
|
|||||||
@@ -144,10 +144,8 @@ async function importRow(row, { ensureCategory, ensureBrand }) {
|
|||||||
// Create the article under the leaf category.
|
// Create the article under the leaf category.
|
||||||
const createRes = await article.create({ categoryId: leafCategoryId, name });
|
const createRes = await article.create({ categoryId: leafCategoryId, name });
|
||||||
requireObject(createRes, 'POST /api/article');
|
requireObject(createRes, 'POST /api/article');
|
||||||
const created = createRes.article;
|
requireDefined(createRes.sku, 'sku');
|
||||||
requireDefined(created, 'article');
|
const sku = createRes.sku;
|
||||||
requireDefined(created.sku, 'article.sku');
|
|
||||||
const sku = created.sku;
|
|
||||||
|
|
||||||
const applied = { sku, artNr: row.artNr || null, name };
|
const applied = { sku, artNr: row.artNr || null, name };
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user