import { components } from './autogenerated-api.types';

export type ApiSchemas = components['schemas'];

type PluginConnectionCheck = {
  ok: boolean;
  error?: string;
};

type PluginConnection = {
  settings: PluginConnectionCheck;
  grafana_url_from_plugin: PluginConnectionCheck;
  service_account_token: PluginConnectionCheck;
  oncall_api_url: PluginConnectionCheck;
  oncall_token: PluginConnectionCheck;
  grafana_url_from_engine: PluginConnectionCheck;
};

export type StatusResponse = {
  pluginConnection: PluginConnection;
  api_url: string;
  currently_undergoing_maintenance_message: string | null;
  license: string;
  version: string;
};
