from typing import Dict
from typing import Any


def get_sensors_info(
        aranet_conf, fields: list[str] = ['metrics', 'telemetry', 'name'],
        **kwargs) -> Dict[str, Any]:
    """Get information of sensors from the Aranet Cloud.

    Args:
        aranet_conf: Object of the Aranet Cloud configuration.
        fields (list[str], optional): Fields of the data to request. The fields
            available in the Aranet Cloud are:
                - `alarms`          Alarms raised by the sensor.
                - `devices`         List of base stations to which the
                                    sensor is paired.
                - `files`           Number of files stored in the sensor.
                - `integrations`    ?
                - `metrics`         Latest data captured by the sensor,
                                    e.g., CO2, temperature, humidity, pressure.
                - `name`            Name of the sensor.
                - `position`        Localization of the sensor.
                - `rules`           Alarm rules for the sensor.
                - `skills`          ?
                - `tagids`          Tags identifiers for the tags of the sensor.
                - `telemetry`       Telemetry data, e.g., battery, RSSI.
                - `txint`           ?
                - `virtual`         ?

            The defaults is ['metrics', 'telemetry', 'name'].

    Raises:
        NotAuthorizedError: If the request results in a not authorized
            (HTTP 401) response.

    Returns:
        Dict[str, Any]: A Dict with the contents of the response.
    """
    return aranet_conf["DEFAULT"]["endpoint"] + \
        "/sensors/" + kwargs['cloud_space_id'] + \
        "?fields=" + ','.join(fields)