Skip to content
Roboto
Esc
↑↓navigate↵open⌘Jpreview
On this page

roboto.domain.triggers.operations

Module Contents

CreateTriggerRequest

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

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

Attributes

CreateTriggerRequest.condition

condition roboto.query.ConditionType | None = None #

Optional predicate over the firing’s namespace.

CreateTriggerRequest.enabled

enabled bool = True #

Whether the trigger should be active immediately after creation.

CreateTriggerRequest.fires_on

What makes the trigger fire: an event subscription or a schedule.

CreateTriggerRequest.name

name str = None #

Trigger name. Unique within the caller’s organization.

CreateTriggerRequest.targets

What the trigger dispatches when it fires. At least one.

MAX_TRIGGER_NAME_LENGTH

roboto.domain.triggers.operations.MAX_TRIGGER_NAME_LENGTH = 256#View Source

Maximum trigger name length.

TRIGGER_NAME_PATTERN

roboto.domain.triggers.operations.TRIGGER_NAME_PATTERN = '[\\w\\-]+'#View Source

Legal trigger names: word characters and hyphens.

UpdateTriggerRequest

class roboto.domain.triggers.operations.UpdateTriggerRequest(/, **data)#View Source

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

Attributes

UpdateTriggerRequest.condition

New condition; explicit None clears it.

UpdateTriggerRequest.enabled

New enabled status.

UpdateTriggerRequest.fires_on

New firing source. Replaces the whole source: an event subscription’s events and once_per change together, and a trigger may switch between events and a schedule.

UpdateTriggerRequest.model_config

model_config #

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

UpdateTriggerRequest.targets

New target list. A target whose target_id is referenced by existing dispatches must keep that id.

Was this page helpful?