roboto.domain.triggers.record#
Module Contents#
- class roboto.domain.triggers.record.TriggerRecord(/, **data)#
Bases:
pydantic.BaseModelWire-transmissible representation of a trigger.
A firing source (a platform event subscription or a schedule), an optional condition over the firing’s namespace, and the targets to dispatch on a match. Cross-field rules — exposed roots,
once_perlegality, template placeholders — are enforced when the trigger is saved, byTriggerValidator.Triggered work runs as the organization’s actions service user; a trigger cannot run its targets as anyone else.
- Parameters:
data (Any)
- condition: roboto.query.ConditionType | None = None#
Optional predicate over the firing’s namespace; the trigger fires only when it holds. Same
Conditionwire format the query system uses.
- created: datetime.datetime#
Timestamp when the trigger was created.
- created_by: str#
User ID who created the trigger.
- enabled: bool = True#
Whether the trigger is active.
- engine: str = 'v1'#
"v2"for the events/once_per/targets engine this module models (every trigger, once a deployment has cut over),"v1"for a trigger the oldercauses/for_eachengine still evaluates, projected onto this shape. Server-assigned and read-only; no request model carries it. Defaults to"v1"for a response that omits it, which is what a Roboto deployment older than the field sends.- Type:
Which engine evaluates this trigger
- fires_on: roboto.domain.triggers.sources.TriggerSource#
an
EventSubscription(which also carriesonce_per) or aSchedule.- Type:
What makes the trigger fire
- modified: datetime.datetime#
Timestamp when the trigger was last modified.
- modified_by: str#
User ID who last modified the trigger.
- org_id: str#
Organization that owns the trigger and whose events it sees.
- targets: list[roboto.domain.triggers.targets.TriggerTargetSpec]#
What the trigger dispatches when it fires, in order. At least one; each
target_idis unique within the trigger.
- trigger_id: str#
Unique identifier for the trigger.