UPDATE: VERSION-20260314
This commit is contained in:
35
modeler/src/views/decision/rule/api.ts
Normal file
35
modeler/src/views/decision/rule/api.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* This file is part of the kernelstudio package.
|
||||
*
|
||||
* (c) 2014-2026 zlin <admin@kernelstudio.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE file
|
||||
* that was distributed with this source code.
|
||||
*/
|
||||
|
||||
import { HttpRequestClient } from '@/utils/request';
|
||||
import type { FireRule, FireRulePageableResponse, FireRuleRequest } from './types';
|
||||
import type { BasicResponse } from '@/types';
|
||||
|
||||
const req = HttpRequestClient.create<BasicResponse>({
|
||||
baseURL: '/api',
|
||||
});
|
||||
|
||||
export const findFireRuleByQuery = (query: Partial<FireRuleRequest> = {}): Promise<FireRulePageableResponse> => {
|
||||
return req.get('/system/rule/list', query);
|
||||
};
|
||||
|
||||
export const createFireRule = (fireRule: FireRule): Promise<BasicResponse> => {
|
||||
return req.postJson('/system/rule', fireRule);
|
||||
};
|
||||
|
||||
export const updateFireRule = (fireRule: FireRule): Promise<BasicResponse> => {
|
||||
return req.putJson('/system/rule', fireRule);
|
||||
};
|
||||
|
||||
export const deleteFireRule = (id: number): Promise<BasicResponse> => {
|
||||
return req.delete(`/system/rule/${id}`);
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user