2021-04-12 13:32:25 +00:00
|
|
|
import PropTypes from "prop-types";
|
2021-12-14 05:50:24 +00:00
|
|
|
import { IHost } from "./host";
|
|
|
|
|
import { ILabel } from "./label";
|
|
|
|
|
import { ITeam } from "./team";
|
2022-03-10 15:10:44 +00:00
|
|
|
import { ITarget } from "./target";
|
2016-11-21 19:49:36 +00:00
|
|
|
|
|
|
|
|
export default PropTypes.shape({
|
2021-08-16 14:30:19 +00:00
|
|
|
created_at: PropTypes.string,
|
|
|
|
|
updated_at: PropTypes.string,
|
2016-11-21 19:49:36 +00:00
|
|
|
id: PropTypes.number,
|
|
|
|
|
name: PropTypes.string,
|
2021-08-16 14:30:19 +00:00
|
|
|
description: PropTypes.string,
|
|
|
|
|
type: PropTypes.string,
|
2021-08-10 18:25:34 +00:00
|
|
|
disabled: PropTypes.bool,
|
2021-08-16 14:30:19 +00:00
|
|
|
query_count: PropTypes.number,
|
|
|
|
|
total_host_count: PropTypes.number,
|
2021-08-10 18:25:34 +00:00
|
|
|
host_ids: PropTypes.arrayOf(PropTypes.number),
|
|
|
|
|
label_ids: PropTypes.arrayOf(PropTypes.number),
|
2021-08-16 14:30:19 +00:00
|
|
|
team_ids: PropTypes.arrayOf(PropTypes.number),
|
2016-11-21 19:49:36 +00:00
|
|
|
});
|
2021-03-03 16:51:39 +00:00
|
|
|
|
2022-11-18 16:25:39 +00:00
|
|
|
export interface IStoredPacksResponse {
|
|
|
|
|
packs: IPack[];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface IStoredPackResponse {
|
|
|
|
|
pack: IPack;
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-03 16:51:39 +00:00
|
|
|
export interface IPack {
|
2021-08-16 14:30:19 +00:00
|
|
|
created_at: string;
|
|
|
|
|
updated_at: string;
|
2021-03-03 16:51:39 +00:00
|
|
|
id: number;
|
|
|
|
|
name: string;
|
2021-08-16 14:30:19 +00:00
|
|
|
description: string;
|
|
|
|
|
type: string;
|
|
|
|
|
disabled?: boolean;
|
2021-08-10 18:25:34 +00:00
|
|
|
query_count: number;
|
|
|
|
|
total_hosts_count: number;
|
2021-12-14 05:50:24 +00:00
|
|
|
hosts: IHost[];
|
2021-08-10 18:25:34 +00:00
|
|
|
host_ids: number[];
|
2021-12-14 05:50:24 +00:00
|
|
|
labels: ILabel[];
|
2021-08-10 18:25:34 +00:00
|
|
|
label_ids: number[];
|
2021-12-14 05:50:24 +00:00
|
|
|
teams: ITeam[];
|
2021-08-16 14:30:19 +00:00
|
|
|
team_ids: number[];
|
2021-03-03 16:51:39 +00:00
|
|
|
}
|
2022-03-10 15:10:44 +00:00
|
|
|
|
|
|
|
|
export interface IUpdatePack {
|
|
|
|
|
name?: string;
|
|
|
|
|
description?: string;
|
|
|
|
|
disabled?: boolean;
|
|
|
|
|
targets?: ITarget[];
|
|
|
|
|
}
|
2022-04-01 06:42:26 +00:00
|
|
|
|
|
|
|
|
export interface IEditPackFormData {
|
|
|
|
|
name: string;
|
|
|
|
|
description: string;
|
|
|
|
|
targets: ITarget[];
|
|
|
|
|
}
|