from typing import Optional, Any, List

from ....core.scope import Scope
from ....core.interfaces.dto import Dto
from ....core.interfaces.core import Core


class Apt[Properties: Any](Core[Properties]):
  token: Optional[str]

  name: str

  expires_at: int

  # ****************
  # JWT Token
  # ****************

  strict: Optional[bool]

  cid: str
  aid: Optional[str]
  uid: Optional[str]

  domain: str
  scopes: List[Scope]
  subjects: List[str]

  tz: str
  lang: str

  session: str
  client_id: str

  coworkers: Optional[str]


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


class AptDto[Properties: Any](Dto[Properties]):
  token: Optional[str]

  name: str

  expires_at: int

  # ****************
  # JWT Token
  # ****************

  strict: Optional[bool]

  cid: Optional[str]
  aid: Optional[str]
  uid: Optional[str]

  domain: Optional[str]
  scopes: List[Scope]
  subjects: List[str]

  tz: Optional[str]
  lang: Optional[str]

  session: Optional[str]
  client_id: Optional[str]

  coworkers: Optional[str]
