from typing import Optional, Any

from .....core.interfaces.dto import Dto
from .....core.interfaces.core import Core
from .....core.collection import Collection
from .....core.interfaces.meta import Metadata
from .....enums.essential.sagas.stages import SagaStageAction


class SagaStage[Properties: Any](Core[Properties]):
  saga: str  # saga

  bucket: Collection
  action: SagaStageAction

  req: Any
  res: Any

  meta: Optional[Metadata]


# ----------------------------------------
# Data Transfer Object Interface
# ----------------------------------------


class SagaStageDto[Properties: Any](Dto[Properties]):
  saga: str  # saga

  bucket: Collection
  action: SagaStageAction

  req: Any
  res: Any

  meta: Optional[Metadata]


class SagaStageAddDto[Properties: Any](Dto[Properties]):
  saga: str  # saga

  bucket: Collection
  action: SagaStageAction

  req: Any
  res: Optional[Any]

  meta: Optional[Metadata]
