2026-03-27 00:05:04 +08:00
|
|
|
/*
|
|
|
|
|
* This file is part of the kernelstudio package.
|
|
|
|
|
*
|
|
|
|
|
* (c) 2014-2025 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 { BasicResponse } from '@/types';
|
2026-03-31 14:32:54 +08:00
|
|
|
import type { NodeCommandListResponse, PlatformListableResponse } from './types';
|
2026-03-27 00:05:04 +08:00
|
|
|
|
|
|
|
|
const req = HttpRequestClient.create<BasicResponse>({
|
|
|
|
|
baseURL: '/api',
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export const findAllBasicPlatforms = (): Promise<PlatformListableResponse> => {
|
|
|
|
|
return req.get<PlatformListableResponse>('/system/firerule/platforms/basic');
|
2026-03-31 14:32:54 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const findAllNodeCommands = (): Promise<NodeCommandListResponse> => {
|
|
|
|
|
return req.get<NodeCommandListResponse>('/node/command/all')
|
|
|
|
|
}
|