u
This commit is contained in:
@@ -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: |
|
||||
|
||||
@@ -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 }) {
|
||||
|
||||
Reference in New Issue
Block a user