49 lines
1.3 KiB
TypeScript
49 lines
1.3 KiB
TypeScript
// @ts-ignore
|
|
/* eslint-disable */
|
|
import request from '@/utils/request';
|
|
|
|
/** 获取预警规则列表 POST /Warning/GetWarningRule */
|
|
export async function postWarningGetWarningRule(
|
|
body: API.GetWarningRuleInput,
|
|
options?: { [key: string]: any }
|
|
) {
|
|
return request<API.WarningRuleDto[]>(`api/trackApi/Warning/GetWarningRule`, {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'application/json-patch+json',
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** 修改预警主体启用状态 POST /Warning/UpdateEnabledStatus */
|
|
export async function postWarningUpdateEnabledStatus(
|
|
body: API.UpdateEnabledStatusInput,
|
|
options?: { [key: string]: any }
|
|
) {
|
|
return request<API.IdBaseDto>(`api/trackApi/Warning/UpdateEnabledStatus`, {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'application/json-patch+json',
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** 新增/修改预警规则主体 POST /Warning/UpsertWarningRule */
|
|
export async function postWarningUpsertWarningRule(
|
|
body: API.UpsertWarningRuleInput,
|
|
options?: { [key: string]: any }
|
|
) {
|
|
return request<API.IdBaseDto>(`api/trackApi/Warning/UpsertWarningRule`, {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'application/json-patch+json',
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
});
|
|
}
|