// @ts-ignore
/* eslint-disable */
import {request} from 'umi';


export async function institutionList(params: API.InstitutionListParams, skipErrorHandler?: boolean) {
  return request<API.Response<API.Page<API.Institution>>>('/api/v1/institution/list', {
    method: 'POST',
    data: params,
    skipErrorHandler: skipErrorHandler || false
  },);
}

export async function deleteInstitution(institutionId: number) {
  return request<API.Response<any>>('/api/v1/institution/delete', {
    method: 'POST',
    data: {institutionId,}
  });
}

export async function stopInstitution(institutionId: number) {
  return request<API.Response<any>>('/api/v1/institution/stop', {
    method: 'POST',
    data: {institutionId,}
  });
}

export async function restartInstitution(institutionId: number) {
  return request<API.Response<any>>('/api/v1/institution/restart', {
    method: 'POST',
    data: {institutionId,}
  });
}

export async function getInstitution(institutionId: number) {
  return request<API.Response<API.Institution>>('/api/v1/institution/get', {
    method: 'POST',
    data: {institutionId,}
  });
}

export async function addInstitution(params: API.AddInstitutionParams) {
  return request<API.Response<any>>('/api/v1/institution/add', {
    method: 'POST',
    data: params
  });
}

export async function updateInstitution(params: API.UpdateInstitutionParams) {
  return request<API.Response<any>>('/api/v1/institution/update', {
    method: 'POST',
    data: params
  });
}




