2021-04-12 13:32:25 +00:00
|
|
|
import PropTypes from "prop-types";
|
2021-10-22 20:05:49 +00:00
|
|
|
import scheduledQueryStatsInterface, {
|
|
|
|
IScheduledQueryStats,
|
|
|
|
} from "./scheduled_query_stats";
|
2016-12-21 17:25:54 +00:00
|
|
|
|
|
|
|
export default PropTypes.shape({
|
2021-08-16 14:30:19 +00:00
|
|
|
created_at: PropTypes.string,
|
|
|
|
updated_at: PropTypes.string,
|
2016-12-21 17:25:54 +00:00
|
|
|
id: PropTypes.number.isRequired,
|
|
|
|
pack_id: PropTypes.number.isRequired,
|
2021-08-16 14:30:19 +00:00
|
|
|
name: PropTypes.string.isRequired,
|
2016-12-21 17:25:54 +00:00
|
|
|
query_id: PropTypes.number.isRequired,
|
2021-08-16 14:30:19 +00:00
|
|
|
query_name: PropTypes.string.isRequired,
|
|
|
|
query: PropTypes.string.isRequired,
|
|
|
|
interval: PropTypes.number.isRequired,
|
2021-04-01 18:45:21 +00:00
|
|
|
snapshot: PropTypes.bool,
|
2021-08-16 14:30:19 +00:00
|
|
|
removed: PropTypes.bool,
|
|
|
|
platform: PropTypes.string,
|
|
|
|
version: PropTypes.string,
|
|
|
|
shard: PropTypes.number,
|
|
|
|
denylist: PropTypes.bool,
|
2021-10-22 20:05:49 +00:00
|
|
|
stats: scheduledQueryStatsInterface,
|
2016-12-21 17:25:54 +00:00
|
|
|
});
|
|
|
|
|
2021-10-04 20:26:10 +00:00
|
|
|
export interface IPackQueryFormData {
|
2022-03-10 15:10:44 +00:00
|
|
|
interval?: number;
|
2021-10-04 20:26:10 +00:00
|
|
|
name?: string;
|
2022-03-10 15:10:44 +00:00
|
|
|
shard?: number;
|
2021-10-04 20:26:10 +00:00
|
|
|
query?: string;
|
|
|
|
query_id?: number;
|
|
|
|
pack_id?: number;
|
|
|
|
logging_type?: string;
|
|
|
|
removed?: boolean;
|
|
|
|
snapshot?: boolean;
|
2022-03-10 15:10:44 +00:00
|
|
|
platform?: string;
|
|
|
|
version?: string;
|
2021-10-04 20:26:10 +00:00
|
|
|
}
|
2021-03-03 16:51:39 +00:00
|
|
|
export interface IScheduledQuery {
|
2021-08-16 14:30:19 +00:00
|
|
|
created_at: string;
|
|
|
|
updated_at: string;
|
2021-03-03 16:51:39 +00:00
|
|
|
id: number;
|
|
|
|
pack_id: number;
|
2021-08-16 14:30:19 +00:00
|
|
|
name: string;
|
2021-03-03 16:51:39 +00:00
|
|
|
query_id: number;
|
2021-08-16 14:30:19 +00:00
|
|
|
query_name: string;
|
|
|
|
query: string;
|
|
|
|
interval: number;
|
2021-03-03 16:51:39 +00:00
|
|
|
snapshot: boolean;
|
2021-08-16 14:30:19 +00:00
|
|
|
removed: boolean;
|
|
|
|
platform?: string;
|
|
|
|
version?: string;
|
2022-03-10 15:10:44 +00:00
|
|
|
shard?: number | undefined;
|
2021-08-16 14:30:19 +00:00
|
|
|
denylist?: boolean;
|
2021-10-04 20:26:10 +00:00
|
|
|
logging_type?: string;
|
2021-10-22 20:05:49 +00:00
|
|
|
stats: IScheduledQueryStats;
|
2022-03-10 15:10:44 +00:00
|
|
|
team_id?: number;
|
|
|
|
}
|
|
|
|
export interface IEditScheduledQuery extends IScheduledQuery {
|
|
|
|
type: "global_scheduled_query" | "team_scheduled_query";
|
|
|
|
}
|
|
|
|
export interface ILoadAllGlobalScheduledQueriesResponse {
|
|
|
|
global_schedule: IScheduledQuery[];
|
|
|
|
}
|
|
|
|
|
2022-11-18 16:25:39 +00:00
|
|
|
export interface IStoredScheduledQueriesResponse {
|
2022-03-10 15:10:44 +00:00
|
|
|
scheduled: IScheduledQuery[];
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IUpdateScheduledQuery {
|
|
|
|
interval?: number;
|
|
|
|
logging_type: string;
|
|
|
|
platform?: string;
|
|
|
|
version?: string;
|
|
|
|
shard?: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IUpdateTeamScheduledQuery extends IUpdateScheduledQuery {
|
|
|
|
team_id: number;
|
2021-03-03 16:51:39 +00:00
|
|
|
}
|