"""Type definitions for vikdata SDK."""

from datetime import datetime
from typing import Any

from pydantic import BaseModel, ConfigDict


class TokenClaims(BaseModel):
    """JWT token claims."""

    sub: str  # user_id
    tenant_id: str
    email: str
    permissions: list[str]
    roles: list[str] | None = None
    exp: int
    iat: int
    iss: str
    aud: str

    model_config = ConfigDict(extra="allow")


class PaginatedResponse[T](BaseModel):
    """Generic paginated response."""

    data: list[T]
    meta: dict[str, Any]

    model_config = ConfigDict(extra="allow")
