fleet/frontend/interfaces/webhook.ts
Jacob Shandling a5ab2213bf
UI – Activity feed webhook automation modal (#19285)
_This PR is the direct-to-`main` replacement for #19096, which merged to
a now-defunct feature branch_

## Addresses #19052 

- update config, webhook interfaces, mock
- clean up deprecated Sandbox code
- implement Activity Feed Automations Modal and associated logic
- Also addresses #19284 

![Screenshot-2024-05-24-at-21725PM](https://github.com/fleetdm/fleet/assets/61553566/1afc62f7-eeb3-49a8-a545-b971f2a19921)

- [x] Changes file added for user-visible changes in `changes/`
- [x] Manual QA for all new/changed functionality

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2024-05-28 13:18:02 -07:00

38 lines
976 B
TypeScript

import PropTypes from "prop-types";
export default PropTypes.shape({
destination_url: PropTypes.string,
policy_ids: PropTypes.arrayOf(PropTypes.number),
enable_failing_policies_webhook: PropTypes.bool,
host_batch_size: PropTypes.number,
});
export interface IWebhookHostStatus {
enable_host_status_webhook?: boolean;
destination_url?: string;
host_percentage?: number;
days_count?: number;
}
export interface IWebhookFailingPolicies {
destination_url?: string;
policy_ids?: number[];
enable_failing_policies_webhook?: boolean;
host_batch_size?: number;
}
export interface IWebhookSoftwareVulnerabilities {
destination_url?: string;
enable_vulnerabilities_webhook?: boolean;
host_batch_size?: number;
}
export interface IWebhookActivities {
enable_activities_webhook: boolean;
destination_url: string;
}
export type IWebhook =
| IWebhookHostStatus
| IWebhookFailingPolicies
| IWebhookSoftwareVulnerabilities
| IWebhookActivities;