# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

from typing_extensions import Literal, Required, Annotated, TypedDict

from ....._utils import PropertyInfo

__all__ = ["DeviceListParams"]


class DeviceListParams(TypedDict, total=False):
    account_id: Required[str]
    """Unique identifier linked to an account."""

    from_: Required[Annotated[str, PropertyInfo(alias="from")]]
    """Start of the time range to query.

    Timestamp can be provided in ISO 8601 datetime format or milliseconds since
    epoch.
    """

    page: Required[float]
    """Page number of paginated results."""

    per_page: Required[float]
    """Number of results per page."""

    to: Required[str]
    """End of the time range to query.

    Timestamp can be provided in ISO 8601 datetime format or milliseconds since
    epoch.
    """

    colo: str
    """Cloudflare colo airport code."""

    device_id: str
    """Device-specific ID, given as UUID."""

    mode: str
    """The mode under which the WARP client is run."""

    platform: str
    """Operating system."""

    sort_by: Literal["colo", "device_id", "mode", "platform", "status", "timestamp", "version"]
    """Dimension to sort results by."""

    source: Literal["last_seen", "hourly", "raw"]
    """Source:

    - `hourly` - device details aggregated hourly, up to 7 days prior
    - `last_seen` - device details, up to 60 minutes prior. Time windows exceeding
      60 minutes will be rejected from June 1st, 2026. Please use 'hourly' or 'raw'
      instead for longer time ranges.
    - `raw` - device details, up to 7 days prior
    """

    status: str
    """Network status."""

    version: str
    """WARP client version."""
