roboto.domain.triggers.operations#

Module Contents#

class roboto.domain.triggers.operations.CreateTriggerRequest(/, **data)#

Bases: pydantic.BaseModel

Request payload to create a trigger.

The server assigns identity and audit fields, and runs TriggerValidator over the cross-field rules (exposed roots, once_per legality, 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.BaseModel

Request payload to update a trigger.

Only fields explicitly provided are changed; the NotSetType sentinel distinguishes “field omitted” from “field set to None”. The updated record must still satisfy every TriggerValidator rule.

Parameters:

data (Any)

condition: roboto.query.ConditionType | roboto.sentinels.NotSetType | None#

New condition; explicit None clears 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_per change 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_id is referenced by existing dispatches must keep that id.