import type { Optional } from "@johnqh/types"; import type { WildduckConfig } from "@johnqh/types"; interface WildduckFilter { id: string; name?: string; query: { from?: string; to?: string; subject?: string; text?: string; ha?: boolean; size?: number; }; action: { seen?: boolean; flag?: boolean; delete?: boolean; spam?: boolean; mailbox?: string; forward?: string; targetUrl?: string; }; disabled?: boolean; created: string; } interface CreateFilterParams { name?: string; query: { from?: string; to?: string; subject?: string; text?: string; ha?: boolean; size?: number; }; action: { seen?: boolean; flag?: boolean; delete?: boolean; spam?: boolean; mailbox?: string; forward?: string; targetUrl?: string; }; disabled?: boolean; } interface UpdateFilterParams { name?: string; query?: { from?: string; to?: string; subject?: string; text?: string; ha?: boolean; size?: number; }; action?: { seen?: boolean; flag?: boolean; delete?: boolean; spam?: boolean; mailbox?: string; forward?: string; targetUrl?: string; }; disabled?: boolean; } interface UseWildduckFiltersReturn { isLoading: boolean; error: Optional; filters: WildduckFilter[]; getFilters: (userId: string) => Promise; getFilter: (userId: string, filterId: string) => Promise; createFilter: (userId: string, params: CreateFilterParams) => Promise<{ success: boolean; id: string; }>; updateFilter: (userId: string, filterId: string, params: UpdateFilterParams) => Promise<{ success: boolean; }>; deleteFilter: (userId: string, filterId: string) => Promise<{ success: boolean; }>; clearError: () => void; refresh: (userId: string) => Promise; } declare const useWildduckFilters: (config: WildduckConfig, devMode?: boolean) => UseWildduckFiltersReturn; export { useWildduckFilters, type WildduckFilter, type CreateFilterParams, type UpdateFilterParams, type UseWildduckFiltersReturn, }; //# sourceMappingURL=useWildduckFilters.d.ts.map