SurfSense/surfsense_backend/app/automations/schemas/definition/trigger_spec.py
DESKTOP-RTLN3BA\$punk 94e834134f chore: linting
2026-05-28 19:21:29 -07:00

19 lines
532 B
Python

"""``TriggerSpec`` — one entry in the definition's ``triggers[]`` array."""
from __future__ import annotations
from typing import Any
from pydantic import BaseModel, ConfigDict, Field
class TriggerSpec(BaseModel):
model_config = ConfigDict(extra="forbid")
type: str = Field(
..., min_length=1, description="Trigger type; resolved via registry."
)
params: dict[str, Any] = Field(
default_factory=dict,
description="Type-specific params; validated against the trigger's schema.",
)