mirror of
https://github.com/root-fr/jmap-webmail.git
synced 2026-09-23 00:01:13 +00:00
Server-side email filtering with visual rule builder and raw Sieve editor. Conditions (From/To/Subject/Size/Body), actions (Move/Forward/Star/Discard), auto-save with rollback, drag-and-drop reorder, opaque script reset, accessibility focus traps, toast validation, and 8-language i18n support.
56 lines
1.2 KiB
TypeScript
56 lines
1.2 KiB
TypeScript
export interface SieveScript {
|
|
id: string;
|
|
name: string;
|
|
blobId: string;
|
|
isActive: boolean;
|
|
}
|
|
|
|
export interface SieveCapabilities {
|
|
implementation: string;
|
|
maxSizeScript: number;
|
|
sieveExtensions: string[];
|
|
notificationMethods: string[];
|
|
externalLists: string[];
|
|
}
|
|
|
|
export type FilterConditionField = 'from' | 'to' | 'cc' | 'subject' | 'header' | 'size' | 'body';
|
|
|
|
export type FilterComparator =
|
|
| 'contains' | 'not_contains'
|
|
| 'is' | 'not_is'
|
|
| 'starts_with' | 'ends_with'
|
|
| 'matches'
|
|
| 'greater_than' | 'less_than';
|
|
|
|
export type FilterActionType =
|
|
| 'move' | 'copy' | 'forward'
|
|
| 'mark_read' | 'star' | 'add_label'
|
|
| 'discard' | 'reject' | 'keep' | 'stop';
|
|
|
|
export interface FilterCondition {
|
|
field: FilterConditionField;
|
|
comparator: FilterComparator;
|
|
value: string;
|
|
headerName?: string;
|
|
}
|
|
|
|
export interface FilterAction {
|
|
type: FilterActionType;
|
|
value?: string;
|
|
}
|
|
|
|
export interface FilterRule {
|
|
id: string;
|
|
name: string;
|
|
enabled: boolean;
|
|
matchType: 'all' | 'any';
|
|
conditions: FilterCondition[];
|
|
actions: FilterAction[];
|
|
stopProcessing: boolean;
|
|
}
|
|
|
|
export interface FilterMetadata {
|
|
version: 1;
|
|
rules: FilterRule[];
|
|
}
|