Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion src/realtime/src/realtime/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,15 @@ class PostgresChangesPayload(TypedDict):
ids: List[int]


class BroadcastMeta(TypedDict, total=False):
replayed: bool
id: str


class BroadcastPayload(TypedDict):
event: str
payload: dict[str, Any]
meta: NotRequired[BroadcastMeta]


@dataclass(frozen=True)
Expand Down Expand Up @@ -172,9 +178,15 @@ def __init__(self, events: PresenceEvents):


# TypedDicts
class RealtimeChannelBroadcastConfig(TypedDict):
class ReplayOption(TypedDict, total=False):
since: int
limit: int


class RealtimeChannelBroadcastConfig(TypedDict, total=False):
ack: bool
self: bool
replay: ReplayOption


class RealtimeChannelPresenceConfig(TypedDict):
Expand Down