mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-02 19:55:18 +02:00
feat(automations): add event trigger source, selector and registration
This commit is contained in:
parent
4ba637ea44
commit
acd673023a
5 changed files with 157 additions and 0 deletions
|
|
@ -0,0 +1,16 @@
|
|||
"""``event`` ``TriggerDefinition`` registration."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from app.automations.triggers.store import register_trigger
|
||||
from app.automations.triggers.types import TriggerDefinition
|
||||
|
||||
from .params import EventTriggerParams
|
||||
|
||||
EVENT_TRIGGER = TriggerDefinition(
|
||||
type="event",
|
||||
description="Fire when a matching domain event is published.",
|
||||
params_model=EventTriggerParams,
|
||||
)
|
||||
|
||||
register_trigger(EVENT_TRIGGER)
|
||||
Loading…
Add table
Add a link
Reference in a new issue