2022-02-17 22:54:27 +00:00
|
|
|
import { IPolicy } from "./policy";
|
2021-10-18 17:44:13 +00:00
|
|
|
import { IQuery } from "./query";
|
2021-07-26 20:04:35 +00:00
|
|
|
|
|
|
|
export enum ActivityType {
|
|
|
|
CreatedPack = "created_pack",
|
|
|
|
DeletedPack = "deleted_pack",
|
|
|
|
EditedPack = "edited_pack",
|
2022-02-17 22:54:27 +00:00
|
|
|
CreatedPolicy = "created_policy",
|
|
|
|
DeletedPolicy = "deleted_policy",
|
|
|
|
EditedPolicy = "edited_policy",
|
2021-07-26 20:04:35 +00:00
|
|
|
CreatedSavedQuery = "created_saved_query",
|
|
|
|
DeletedSavedQuery = "deleted_saved_query",
|
|
|
|
EditedSavedQuery = "edited_saved_query",
|
|
|
|
CreatedTeam = "created_team",
|
|
|
|
DeletedTeam = "deleted_team",
|
|
|
|
LiveQuery = "live_query",
|
2021-10-18 17:44:13 +00:00
|
|
|
AppliedSpecPack = "applied_spec_pack",
|
2022-02-17 22:54:27 +00:00
|
|
|
AppliedSpecPolicy = "applied_spec_policy",
|
2021-10-18 17:44:13 +00:00
|
|
|
AppliedSpecSavedQuery = "applied_spec_saved_query",
|
2021-07-26 20:04:35 +00:00
|
|
|
}
|
|
|
|
export interface IActivity {
|
|
|
|
created_at: string;
|
2021-08-16 14:30:19 +00:00
|
|
|
id: number;
|
2021-07-26 20:04:35 +00:00
|
|
|
actor_full_name: string;
|
|
|
|
actor_id: number;
|
2021-08-16 14:30:19 +00:00
|
|
|
actor_gravatar: string;
|
|
|
|
actor_email?: string;
|
2021-07-26 20:04:35 +00:00
|
|
|
type: ActivityType;
|
|
|
|
details?: IActivityDetails;
|
|
|
|
}
|
|
|
|
export interface IActivityDetails {
|
|
|
|
pack_id?: number;
|
|
|
|
pack_name?: string;
|
2022-02-17 22:54:27 +00:00
|
|
|
policy_id?: number;
|
|
|
|
policy_name?: string;
|
2021-07-26 20:04:35 +00:00
|
|
|
query_id?: number;
|
|
|
|
query_name?: string;
|
|
|
|
team_id?: number;
|
|
|
|
team_name?: string;
|
|
|
|
targets_count?: number;
|
2022-02-17 22:54:27 +00:00
|
|
|
specs?: IQuery[] | IPolicy[];
|
2021-07-26 20:04:35 +00:00
|
|
|
}
|