2023-04-02 11:09:43 +02:00
|
|
|
from fastapi import HTTPException, status
|
|
|
|
|
|
2025-03-19 16:13:50 +01:00
|
|
|
from app.api.error_report.report import Report
|
2025-04-13 21:16:17 +02:00
|
|
|
from app.apps.impl.apps_base import AppManageResult, AppsBase
|
|
|
|
|
from app.apps.models import AppId, AppStatus, AppStatusQueryResult, AppUninstallInput
|
2025-03-19 16:13:50 +01:00
|
|
|
from app.external.result_type.src.result import Result
|
2022-09-10 22:14:37 +02:00
|
|
|
|
|
|
|
|
|
2023-04-02 11:09:43 +02:00
|
|
|
class _NotImplemented(HTTPException):
|
|
|
|
|
def __init__(self):
|
|
|
|
|
super().__init__(
|
|
|
|
|
status_code=status.HTTP_501_NOT_IMPLEMENTED,
|
|
|
|
|
detail="Not available in native python mode.",
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
2022-09-11 18:32:39 +02:00
|
|
|
class NativePythonApps(AppsBase):
|
2025-03-19 16:13:50 +01:00
|
|
|
async def get_app_status_single(self, app_id: str) -> Result[AppStatus, Report]:
|
2023-04-02 11:09:43 +02:00
|
|
|
raise _NotImplemented()
|
2022-09-11 18:32:39 +02:00
|
|
|
|
2025-03-19 16:13:50 +01:00
|
|
|
async def get_app_status(self) -> Result[AppStatusQueryResult, Report]:
|
|
|
|
|
raise _NotImplemented()
|
2022-09-11 18:32:39 +02:00
|
|
|
|
2025-03-19 16:13:50 +01:00
|
|
|
async def get_app_status_advanced(self, app_id: str) -> Result[AppStatus, Report]:
|
2024-02-18 12:10:35 +01:00
|
|
|
raise _NotImplemented()
|
|
|
|
|
|
2025-04-13 21:16:17 +02:00
|
|
|
def install_app(self, app_id: AppId) -> AppManageResult:
|
|
|
|
|
raise NotImplementedError()
|
2022-09-11 18:32:39 +02:00
|
|
|
|
2025-04-13 21:16:17 +02:00
|
|
|
def uninstall_app(self, input: AppUninstallInput) -> AppManageResult:
|
|
|
|
|
raise NotImplementedError()
|