import { api } from "./api";
import type { Nullable } from "./apiTypes.ts";

// Typescript: TSEndpoint= path=/metrics;  name=metrics; method=GET; response=string

// /Users/fabio/CODE/omnimed/go-quasar-partial-ssr/backend/internal/systemUtils/routes.go Line: 39
export const metrics = async (): Promise<{
  data: string;
  error: Nullable<string>;
}> => {
  return (await api.GET("/metrics")) as {
    data: string;
    error: Nullable<string>;
  };
};

// Typescript: TSEndpoint= path=/maildebug; name=mailDebug; method=GET; response=[]MailDebugItem

// /Users/fabio/CODE/omnimed/go-quasar-partial-ssr/backend/internal/systemUtils/routes.go Line: 51
export const mailDebug = async (): Promise<{
  data: MailDebugItem[];
  error: Nullable<string>;
}> => {
  return (await api.GET("/maildebug")) as {
    data: MailDebugItem[];
    error: Nullable<string>;
  };
};

// Typescript: TSEndpoint= path=/health; name=health; method=GET; response=string

// /Users/fabio/CODE/omnimed/go-quasar-partial-ssr/backend/internal/systemUtils/routes.go Line: 36
export const health = async (): Promise<{
  data: string;
  error: Nullable<string>;
}> => {
  return (await api.GET("/health")) as {
    data: string;
    error: Nullable<string>;
  };
};

export interface MailDebugItem {
  name: string;
  content: string;
}
