mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-31 19:45:15 +02:00
23 lines
615 B
Python
23 lines
615 B
Python
"""``EventTriggerParams`` — params for the ``event`` trigger type."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import Any
|
|
|
|
from pydantic import BaseModel, ConfigDict, Field
|
|
|
|
|
|
class EventTriggerParams(BaseModel):
|
|
model_config = ConfigDict(extra="forbid")
|
|
|
|
event_type: str = Field(
|
|
...,
|
|
min_length=1,
|
|
description="Event type to listen for.",
|
|
examples=["document.indexed"],
|
|
)
|
|
filter: dict[str, Any] = Field(
|
|
default_factory=dict,
|
|
description="JSON filter matched against the event payload.",
|
|
examples=[{"document_type": "FILE"}],
|
|
)
|