roboto.domain.triggers.record#
Module Contents#
- class roboto.domain.triggers.record.ManagedBy(/, **data)#
Bases:
pydantic.BaseModelThe owner of a trigger whose definition is managed by something other than the org’s members.
No managed trigger can be deleted, or have its definition changed, through the triggers API. Org members may enable or disable a system-managed trigger. A trigger owned by an ingestion rule may not be enabled, disabled, edited or deleted directly: change the rule instead, e.g. turn its auto-ingest off. An org has at most one trigger per owner.
- Parameters:
data (Any)
- id: str#
for
ManagedByKind.System, the platform feature’s key (e.g."session_metrics"); forManagedByKind.IngestionRule, the rule’s id.- Type:
Which one
- kind: ManagedByKind#
What kind of thing manages the trigger.
- model_config#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class roboto.domain.triggers.record.ManagedByKind#
Bases:
roboto.compat.StrEnumWhat kind of thing in Roboto manages a trigger.
- IngestionRule = 'ingestion_rule'#
An ingestion rule owns the trigger and is its only edit surface.
- System = 'system'#
Roboto installed the trigger to run a platform feature.
- 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
- managed_by: ManagedBy | None = None#
The owner of the trigger’s definition when it is not the org’s members, e.g. the ingestion rule the trigger ingests files for;
Nonefor a trigger a user created. Server-assigned and read-only; no request model carries it.
- 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.