mirror of
https://github.com/idanoo/autobrr
synced 2025-07-25 09:49:13 +00:00
feat(filters): add support for multiple external filters (#1030)
* feat(filters): add support for multiple ext filters * refactor(filters): crud and check * feat(filters): add postgres migrations * fix(filters): field array types * fix(filters): formatting * fix(filters): formatting * feat(filters): external webhook improve logs
This commit is contained in:
parent
db209319da
commit
dde0d0ed61
15 changed files with 1514 additions and 478 deletions
21
web/src/types/Filter.d.ts
vendored
21
web/src/types/Filter.d.ts
vendored
|
@ -70,6 +70,7 @@ interface Filter {
|
|||
actions_count: number;
|
||||
actions: Action[];
|
||||
indexers: Indexer[];
|
||||
external: ExternalFilter[];
|
||||
external_script_enabled: boolean;
|
||||
external_script_cmd: string;
|
||||
external_script_args: string;
|
||||
|
@ -116,3 +117,23 @@ interface Action {
|
|||
type ActionContentLayout = "ORIGINAL" | "SUBFOLDER_CREATE" | "SUBFOLDER_NONE";
|
||||
|
||||
type ActionType = "TEST" | "EXEC" | "WATCH_FOLDER" | "WEBHOOK" | DownloadClientType;
|
||||
|
||||
type ExternalType = "EXEC" | "WEBHOOK";
|
||||
|
||||
type WebhookMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
||||
|
||||
interface ExternalFilter {
|
||||
id: number;
|
||||
index: number;
|
||||
name: string;
|
||||
type: ExternalType;
|
||||
enabled: boolean;
|
||||
exec_cmd?: string;
|
||||
exec_args?: string;
|
||||
webhook_host?: string,
|
||||
webhook_type?: string;
|
||||
webhook_method?: WebhookMethod;
|
||||
webhook_data?: string,
|
||||
webhook_headers?: string;
|
||||
filter_id?: number;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue