adapter weather {
  binding "./weather.binding.ts"
  consumes bynk { Fetch, Secrets }

  exports capability  { Weather }
  exports transparent { Report, WeatherError }

  type Report = {
    tempC: Int,
    summary: String,
  }

  type WeatherError = enum {
    NotFound,
    Upstream,
  }

  capability Weather {
    fn current(city: String) -> Effect[Result[Report, WeatherError]]
  }

  provides Weather = FetchWeather given Fetch, Secrets
}
