fleet/frontend/interfaces/scheduled_query.ts
RachelElysia a2fe3bae7e
Edit Packs Page: Refactor and revamp (#1400)
* New query pack table renders
* services/entities created/updated with 5+ needed APIs requests for EditPacksPage
* Refactor jsx to tsx PackQueriesListWrapper, EditPackForm, EditPackPage
* Refactor to new patterns on useQuery, useEffect, and useState
* Refactor to new pattern formData formatting
* Edit, remove pack query modals
* e2e test: packflow built to test create, update, delete of pack, fix brittle teamflow
2021-10-04 16:26:10 -04:00

52 lines
1.2 KiB
TypeScript

import PropTypes from "prop-types";
export default PropTypes.shape({
created_at: PropTypes.string,
updated_at: PropTypes.string,
id: PropTypes.number.isRequired,
pack_id: PropTypes.number.isRequired,
name: PropTypes.string.isRequired,
query_id: PropTypes.number.isRequired,
query_name: PropTypes.string.isRequired,
query: PropTypes.string.isRequired,
interval: PropTypes.number.isRequired,
snapshot: PropTypes.bool,
removed: PropTypes.bool,
platform: PropTypes.string,
version: PropTypes.string,
shard: PropTypes.number,
denylist: PropTypes.bool,
});
export interface IPackQueryFormData {
interval: number;
name?: string;
shard: number;
query?: string;
query_id?: number;
pack_id?: number;
logging_type?: string;
removed?: boolean;
snapshot?: boolean;
platform: string;
version: string;
}
export interface IScheduledQuery {
created_at: string;
updated_at: string;
id: number;
pack_id: number;
name: string;
query_id: number;
query_name: string;
query: string;
interval: number;
snapshot: boolean;
removed: boolean;
platform?: string;
version?: string;
shard: number | null;
denylist?: boolean;
logging_type?: string;
}