mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-29 19:35:20 +02:00
19 lines
532 B
Python
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.",
|
|
)
|