from typing import Dict, Any, Optional
from ..http_client import HTTPClient


class VsatResource:
    def __init__(self, http: HTTPClient):
        self._http = http

    def list_sessions(self, device_id: str = None, page: int = 1, page_size: int = 20) -> Dict[str, Any]:
        params = {"page": page, "pageSize": page_size}
        if device_id:
            params["deviceId"] = device_id
        return self._http.get("/vsat/sessions", params=params)

    def get_session(self, session_id: str) -> Dict[str, Any]:
        return self._http.get(f"/vsat/sessions/{session_id}")

    def get_signal(self, device_id: str) -> Dict[str, Any]:
        return self._http.get(f"/vsat/devices/{device_id}/signal")
