mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-13 17:52:38 +02:00
Add typed event payload modules for the streaming service.
This commit is contained in:
parent
a9bf7ab7d2
commit
5510c6c314
11 changed files with 571 additions and 0 deletions
|
|
@ -0,0 +1,24 @@
|
|||
"""Action-log events relayed from ``ActionLogMiddleware`` custom dispatches."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from ..emitter import Emitter
|
||||
from .data import format_data
|
||||
|
||||
|
||||
def format_action_log(
|
||||
payload: dict[str, Any],
|
||||
*,
|
||||
emitter: Emitter | None = None,
|
||||
) -> str:
|
||||
return format_data("action-log", payload, emitter=emitter)
|
||||
|
||||
|
||||
def format_action_log_updated(
|
||||
payload: dict[str, Any],
|
||||
*,
|
||||
emitter: Emitter | None = None,
|
||||
) -> str:
|
||||
return format_data("action-log-updated", payload, emitter=emitter)
|
||||
Loading…
Add table
Add a link
Reference in a new issue