mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-31 19:45:15 +02:00
refactor(automation): rename schema config to params, drop dead fields
This commit is contained in:
parent
c8a89ccac8
commit
9fa35f21cf
11 changed files with 31 additions and 37 deletions
|
|
@ -1,11 +1,11 @@
|
|||
"""Per-trigger config schemas, one per trigger type."""
|
||||
"""Per-trigger params schemas, one per trigger type."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from .manual import ManualTriggerConfig
|
||||
from .schedule import ScheduleTriggerConfig
|
||||
from .manual import ManualTriggerParams
|
||||
from .schedule import ScheduleTriggerParams
|
||||
|
||||
__all__ = [
|
||||
"ManualTriggerConfig",
|
||||
"ScheduleTriggerConfig",
|
||||
"ManualTriggerParams",
|
||||
"ScheduleTriggerParams",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
"""``ManualTriggerConfig`` — config for the ``manual`` trigger (empty in v1)."""
|
||||
"""``ManualTriggerParams`` — params for the ``manual`` trigger (empty in v1)."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
class ManualTriggerConfig(BaseModel):
|
||||
class ManualTriggerParams(BaseModel):
|
||||
model_config = ConfigDict(extra="forbid")
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
"""``ScheduleTriggerConfig`` — config for the ``schedule`` trigger type."""
|
||||
"""``ScheduleTriggerParams`` — params for the ``schedule`` trigger type."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field
|
||||
|
||||
|
||||
class ScheduleTriggerConfig(BaseModel):
|
||||
class ScheduleTriggerParams(BaseModel):
|
||||
model_config = ConfigDict(extra="forbid")
|
||||
|
||||
cron: str = Field(..., description="Five-field cron expression.", examples=["0 9 * * 1-5"])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue