"""
Type definitions for NetOrca SDK v2.

Provides enums, TypedDicts, and other type definitions for improved type safety.
"""

from __future__ import annotations

from enum import Enum
from typing import TypedDict, Union


class ServiceItemRuntimeState(str, Enum):
    """Service item runtime states."""

    REQUESTED = "REQUESTED"
    IN_SERVICE = "IN_SERVICE"
    DECOMMISSIONED = "DECOMMISSIONED"


class ServiceItemChangeState(str, Enum):
    """Service item change states."""

    REQUESTED = "REQUESTED"
    APPROVED = "APPROVED"
    IN_PROGRESS = "IN_PROGRESS"
    DONE = "DONE"
    CANCELLED = "CANCELLED"


class ServiceState(str, Enum):
    """Service states."""

    DRAFT = "DRAFT"
    PUBLISHED = "PUBLISHED"
    ARCHIVED = "ARCHIVED"


class ServiceItemFilters(TypedDict, total=False):
    """Type definition for ServiceItem filter parameters."""

    application_id: int
    application_name: str
    application_name_contains: str
    change_state: Union[str, ServiceItemChangeState]
    consumer_team_id: int
    name: str
    ordering: str
    runtime_state: Union[str, ServiceItemRuntimeState]
    service_id: int
    service_name: str
    service_owner_id: int
    service_owner_team_id: int


class SubmissionFilters(TypedDict, total=False):
    """Type definition for Submission filter parameters."""

    limit: int
    ordering: str
    offset: int


class PaginationParams(TypedDict, total=False):
    """Type definition for common pagination parameters."""

    limit: int
    offset: int
    ordering: str
