Realtime
2 routes. Paths are relative to https://api.intersink.com/v1.
Alive
POST/realtime/alive
Needs a signed-in user (Bearer token or access_token cookie).
Client keepalive for a device stream: send it every 25 s while the app is
in the foreground (with x-device-id or ?device_id=). An open stream
alone does not make a device "online": a suspended app or a dead network
keeps the server's socket open (and the server's own pings never count),
so the device counts as online only while these keep coming: each one
lasts ALIVE_TTL_MS (40 s, E2EE_ALIVE_TTL_MS), and a call needs one at
most CALL_ALIVE_MS (35 s) old. Wake pushes apply as soon as they stop.
Parameters
| Name | Type | Description |
|---|---|---|
| device_idrequired | string, query | |
| device_tokenrequired | string, query |
Response
204. The payload in data is not described in the spec yet.
Stream
GET/realtime/stream
Needs a signed-in user (Bearer token or access_token cookie).
Server-Sent Events stream of the caller's realtime events.
Written by hand on the raw response instead of Nest's @Sse(): @Sse cannot
send comment heartbeats and stamps an auto-increment id: on every
message, which would break Last-Event-ID replay. Auth is the normal
JwtAuthGuard (access_token cookie for EventSource, or Bearer). The guard,
including the device-fingerprint and session checks, runs on connect
and again on every reconnect (streams are recycled after maxStreamMs).
Parameters
| Name | Type | Description |
|---|---|---|
| last_event_idrequired | string, query | |
| device_idrequired | string, query | |
| device_tokenrequired | string, query |
Response
200. The payload in data is not described in the spec yet.