import { http, HttpResponse } from "msw";

export const externalApiHandlers = [
  http.get("https://prometheus.dimensionlab.net/api/v1/query", () =>
    HttpResponse.json({
      status: "success",
      data: {
        resultType: "vector",
        result: [
          {
            metric: { instance: "fixture" },
            value: [1771430400, "1"],
          },
        ],
      },
    }),
  ),
  http.get("https://uptime.dimensionlab.net/api/status-page/*", () =>
    HttpResponse.json({
      status: "ok",
      incidents: [],
      monitors: [{ name: "fixture", status: "up" }],
    }),
  ),
  http.get("https://api.open-meteo.com/v1/forecast", () =>
    HttpResponse.json({
      current: {
        temperature_2m: 21.4,
        weather_code: 0,
      },
    }),
  ),
];
