from typing import TypeVar, Protocol, Optional, List

T = TypeVar("T")


class CommonPort(Protocol[T]):
    def get_by_id(self, id: int, hide_deleted: bool = True) -> Optional[T]: ...
    def get_all(self, hide_deleted: bool = True) -> List[T]: ...
    def create(self, **kwargs) -> Optional[T]: ...
    def update(self, id: int, **kwargs) -> Optional[T]: ...
    def delete(self, id: int, **kwargs) -> Optional[T]: ...
    def delete_pure(self, id: int) -> Optional[T]: ...
    def delete_pure_bulk(self, ids: List[int]) -> List[T]: ...
