mirror of
https://github.com/langgenius/dify.git
synced 2026-04-16 02:16:57 +08:00
refactor: migrate verify_subscription_credentials return type to TypedDict (#34967)
This commit is contained in:
parent
34ce3cac70
commit
859920a81f
@ -3,7 +3,7 @@ import logging
|
||||
import time as _time
|
||||
import uuid
|
||||
from collections.abc import Mapping
|
||||
from typing import Any
|
||||
from typing import Any, TypedDict
|
||||
|
||||
from sqlalchemy import desc, func
|
||||
from sqlalchemy.orm import Session, sessionmaker
|
||||
@ -42,6 +42,10 @@ from services.plugin.plugin_service import PluginService
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class VerifyCredentialsResult(TypedDict):
|
||||
verified: bool
|
||||
|
||||
|
||||
class TriggerProviderService:
|
||||
"""Service for managing trigger providers and credentials"""
|
||||
|
||||
@ -792,7 +796,7 @@ class TriggerProviderService:
|
||||
provider_id: TriggerProviderID,
|
||||
subscription_id: str,
|
||||
credentials: dict[str, Any],
|
||||
) -> dict[str, Any]:
|
||||
) -> VerifyCredentialsResult:
|
||||
"""
|
||||
Verify credentials for an existing subscription without updating it.
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user