import {
  makeRequest
} from "./chunk-CAY57CKF.js";
import "./chunk-KOO5733S.js";

// src/langwatch-api-monitors.ts
async function listMonitors() {
  return makeRequest("GET", "/api/monitors");
}
async function getMonitor(id) {
  return makeRequest(
    "GET",
    `/api/monitors/${encodeURIComponent(id)}`
  );
}
async function createMonitor(data) {
  return makeRequest("POST", "/api/monitors", {
    ...data,
    preconditions: [],
    parameters: data.parameters ?? {}
  });
}
async function updateMonitor(params) {
  const { id, ...data } = params;
  return makeRequest(
    "PATCH",
    `/api/monitors/${encodeURIComponent(id)}`,
    data
  );
}
async function toggleMonitor(params) {
  return makeRequest(
    "POST",
    `/api/monitors/${encodeURIComponent(params.id)}/toggle`,
    { enabled: params.enabled }
  );
}
async function deleteMonitor(id) {
  return makeRequest(
    "DELETE",
    `/api/monitors/${encodeURIComponent(id)}`
  );
}
export {
  createMonitor,
  deleteMonitor,
  getMonitor,
  listMonitors,
  toggleMonitor,
  updateMonitor
};
//# sourceMappingURL=langwatch-api-monitors-3L25OOOS.js.map