mirror of
https://github.com/Dvorinka/Primora.git
synced 2026-10-28 15:51:23 +00:00
- POST /projects/:id/events accepts client-authored events restricted to
the custom.* namespace — system types can't be spoofed. They flow
through the same publishEvent fan-out: realtime, webhooks, and
event_pattern functions all fire.
- Presence: subscribe/unsubscribe bumps a per-project count and
broadcasts presence.update {online} to the realtime stream only —
deliberately not through publishEvent so webhooks and "*" functions
don't fire on connect noise. GET …/realtime/presence reads the count.
- @primora/client gains publish() and presence(); CLI gains events:send.
Verified live: presence 0->1 on subscribe, presence.update frame
delivered, custom event delivered to SSE + fired a custom.* function,
spoofed document.created rejected 400.
Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
16 lines
436 B
TypeScript
16 lines
436 B
TypeScript
/* generated using openapi-typescript-codegen -- do not edit */
|
|
/* istanbul ignore file */
|
|
/* tslint:disable */
|
|
/* eslint-disable */
|
|
export type PublishEventRequest = {
|
|
/**
|
|
* Event type in the custom.* namespace — realtime subscribers, matching webhooks, and event_pattern functions all fire.
|
|
*/
|
|
type: string;
|
|
/**
|
|
* Arbitrary JSON payload carried to subscribers.
|
|
*/
|
|
data?: Record<string, any>;
|
|
};
|
|
|