roboto.domain.triggers.operations#
Module Contents#
- class roboto.domain.triggers.operations.CreateTriggerRequest(/, **data)#
Bases:
pydantic.BaseModelRequest payload to create a trigger.
The server assigns identity and audit fields, and runs
TriggerValidatorover the cross-field rules (exposed roots,once_perlegality, target placeholders) before persisting.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.
- enabled: bool = True#
Whether the trigger should be active immediately after creation.
- fires_on: roboto.domain.triggers.sources.TriggerSource#
an event subscription or a schedule.
- Type:
What makes the trigger fire
- name: str = None#
Trigger name. Unique within the caller’s organization.
- targets: list[roboto.domain.triggers.targets.TriggerTargetSpec]#
What the trigger dispatches when it fires. At least one.
- roboto.domain.triggers.operations.MAX_TRIGGER_NAME_LENGTH = 256#
Maximum trigger name length.
- roboto.domain.triggers.operations.TRIGGER_NAME_PATTERN = '[\\w\\-]+'#
word characters and hyphens.
- Type:
Legal trigger names
- class roboto.domain.triggers.operations.UpdateTriggerRequest(/, **data)#
Bases:
pydantic.BaseModelRequest payload to update a trigger.
Only fields explicitly provided are changed; the
NotSetTypesentinel distinguishes “field omitted” from “field set toNone”. The updated record must still satisfy everyTriggerValidatorrule.- Parameters:
data (Any)
- condition: roboto.query.ConditionType | roboto.sentinels.NotSetType | None#
New condition; explicit
Noneclears it.
- enabled: bool | roboto.sentinels.NotSetType#
New enabled status.
- fires_on: roboto.domain.triggers.sources.TriggerSource | roboto.sentinels.NotSetType#
an event subscription’s events and
once_perchange together, and a trigger may switch between events and a schedule.- Type:
New firing source. Replaces the whole source
- model_config#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- targets: list[roboto.domain.triggers.targets.TriggerTargetSpec] | roboto.sentinels.NotSetType#
New target list. A target whose
target_idis referenced by existing dispatches must keep that id.