"""页级图片质量服务接口。"""

from __future__ import annotations

from abc import ABC, abstractmethod

from fastapi_modules.fastapi_leaudit.domian.vo.pageQualityVo import (
    PageQualityDetailVO,
    PageQualityRecheckVO,
    PageQualitySummaryVO,
)


class IPageQualityService(ABC):
    """页级图片质量服务接口。"""

    @abstractmethod
    async def DispatchForDocument(
        self,
        DocumentId: int,
        TriggerUserId: int | None = None,
        Force: bool = False,
        Speed: str = "normal",
    ) -> PageQualityRecheckVO | None:
        """按文档触发页级模糊检测任务。"""
        ...

    @abstractmethod
    async def GetDocumentSummary(
        self,
        CurrentUserId: int,
        DocumentId: int,
    ) -> PageQualitySummaryVO:
        """获取文档页级模糊检测摘要。"""
        ...

    @abstractmethod
    async def GetDocumentDetail(
        self,
        CurrentUserId: int,
        DocumentId: int,
    ) -> PageQualityDetailVO:
        """获取文档页级模糊检测详情。"""
        ...

    @abstractmethod
    async def RecheckDocument(
        self,
        CurrentUserId: int,
        DocumentId: int,
        Speed: str = "normal",
    ) -> PageQualityRecheckVO:
        """手工重跑页级模糊检测。"""
        ...
