u
This commit is contained in:
@@ -38,6 +38,12 @@ export function register(app, basePath = '') {
|
||||
* | `category` | `POST /category`, `PATCH /category/{id}`, `PUT /category/order`, `DELETE /category/{id}`, `POST /category/{id}/image`, `DELETE /category/{id}/image` |
|
||||
* | `articles` | `POST /article`, `PATCH /article/{sku}`, `DELETE /article/{sku}` |
|
||||
* | `article-<sku>` | `PUT /article/{sku}/weight`, `PUT /article/{sku}/prices`, `PUT /article/{sku}/eans`, `PUT /article/{sku}/categories`, `PUT /article/{sku}/brand`, `PUT /article/{sku}/images/order`, `POST /article/{sku}/image`, `DELETE /article/{sku}/image/{fullHash}` |
|
||||
* | `brand` | `POST /brand`, `PATCH /brand/{id}`, `DELETE /brand/{id}`, `POST /brand/{id}/image`, `DELETE /brand/{id}/image` |
|
||||
*
|
||||
* The `brand` signal carries a JSON payload `{ sender, brandId }`:
|
||||
* `sender` echoes the caller's `x-client-id` header (empty string if
|
||||
* absent) so the sender can ignore its own event; `brandId` is the
|
||||
* affected brand id (`null` only if unknown). Other signals send `{}`.
|
||||
*
|
||||
* Signals are only sent when the mutation actually succeeds (2xx).
|
||||
* Failed or no-op validation errors do not emit. The `article-<sku>`
|
||||
@@ -49,7 +55,8 @@ export function register(app, basePath = '') {
|
||||
* 200:
|
||||
* description: |
|
||||
* SSE stream (`text/event-stream`). Each signal is an SSE event
|
||||
* whose name is the signal id and whose data is `{}`.
|
||||
* whose name is the signal id. Most signals send `{}` as data;
|
||||
* `brand` sends `{ "sender": "<x-client-id>", "brandId": 12 }`.
|
||||
* content:
|
||||
* text/event-stream:
|
||||
* schema:
|
||||
@@ -63,6 +70,9 @@ export function register(app, basePath = '') {
|
||||
*
|
||||
* event: article-42000045
|
||||
* data: {}
|
||||
*
|
||||
* event: brand
|
||||
* data: {"sender":"tab-1","brandId":12}
|
||||
* 400:
|
||||
* description: No company selected
|
||||
* content:
|
||||
|
||||
Reference in New Issue
Block a user