mirror of
https://github.com/langgenius/dify.git
synced 2026-11-11 05:41:09 +08:00
17 lines
594 B
Python
17 lines
594 B
Python
"""Read contract for the trigger providers installed in a workspace."""
|
|
|
|
from typing import Protocol
|
|
|
|
from core.trigger.entities.api_entities import TriggerProviderApiEntity
|
|
from models.provider_ids import TriggerProviderID
|
|
|
|
|
|
class TriggerProviderQuery(Protocol):
|
|
def list(self, *, tenant_id: str) -> list[TriggerProviderApiEntity]: ...
|
|
|
|
def get(self, *, tenant_id: str, provider_id: TriggerProviderID) -> TriggerProviderApiEntity: ...
|
|
|
|
def get_icon(self, *, tenant_id: str, provider_id: TriggerProviderID) -> str:
|
|
"""Return the icon URL, not the icon bytes."""
|
|
...
|