This commit is contained in:
seb
2026-10-16 15:38:47 +02:00
parent 5ed634990e
commit f506dd35be
5 changed files with 6 additions and 28 deletions

View File

@@ -54,7 +54,6 @@ export function register(app, basePath = '') {
* | `modelconversation-<id>` | `{}` | Conversation-specific updates on the same model conversation thread; the concrete ID is used in the event name |
* | `brand` | `{ sender, brandId }` | `POST /brand`, `PATCH /brand/{id}`, `DELETE /brand/{id}`, `POST /brand/{id}/image`, `DELETE /brand/{id}/image` |
* | `draft` | `{ sender, action, name, content }` | Draft update on `drafts/quote`, `drafts/order`, `drafts/delivery` (`sender` echoes the caller's `x-client-id`) |
* | `draft:request` | `{ requestId, action, name, target, sender }` | Server request to frontend to read a draft or list drafts |
*
* The `brand` payload is `{ sender, brandId }`: `sender` echoes the
* caller's `x-client-id` header (empty string if absent) so the sender
@@ -99,8 +98,6 @@ export function register(app, basePath = '') {
* payload: "{ sender, brandId }"
* - name: draft
* payload: "{ sender, action, name, content }"
* - name: draft:request
* payload: "{ requestId, action, name, target, sender }"
* responses:
* 200:
* description: |

View File

@@ -75,7 +75,7 @@ export function hasActiveClient({ companyId, userId, clientId } = {}) {
* Broadcast or target a named signal to subscribers.
* If `targetClientId` or `targetUserId` is specified, sends only to matching clients of that user.
*
* @param {string} signal - SSE event name (e.g. `category`, `draft`, `draft:request`)
* @param {string} signal - SSE event name (e.g. `category`, `draft`, `modelconversation`)
* @param {{ companyId: number, data?: string|object, targetClientId?: string, targetUserId?: number }} options
*/
export function emit(signal, { companyId, data, targetClientId, targetUserId }) {