mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-10-12 02:26:09 -05:00
Refactor frontend data models
This commit is contained in:
75
src-ui/src/app/data/mail-rule.ts
Normal file
75
src-ui/src/app/data/mail-rule.ts
Normal file
@@ -0,0 +1,75 @@
|
||||
import { ObjectWithPermissions } from './object-with-permissions'
|
||||
|
||||
export enum MailFilterAttachmentType {
|
||||
Attachments = 1,
|
||||
Everything = 2,
|
||||
}
|
||||
|
||||
export enum MailRuleConsumptionScope {
|
||||
Attachments = 1,
|
||||
Email_Only = 2,
|
||||
Everything = 3,
|
||||
}
|
||||
|
||||
export enum MailAction {
|
||||
Delete = 1,
|
||||
Move = 2,
|
||||
MarkRead = 3,
|
||||
Flag = 4,
|
||||
Tag = 5,
|
||||
}
|
||||
|
||||
export enum MailMetadataTitleOption {
|
||||
FromSubject = 1,
|
||||
FromFilename = 2,
|
||||
None = 3,
|
||||
}
|
||||
|
||||
export enum MailMetadataCorrespondentOption {
|
||||
FromNothing = 1,
|
||||
FromEmail = 2,
|
||||
FromName = 3,
|
||||
FromCustom = 4,
|
||||
}
|
||||
|
||||
export interface MailRule extends ObjectWithPermissions {
|
||||
name: string
|
||||
|
||||
account: number // PaperlessMailAccount.id
|
||||
|
||||
order: number
|
||||
|
||||
folder: string
|
||||
|
||||
filter_from: string
|
||||
|
||||
filter_to: string
|
||||
|
||||
filter_subject: string
|
||||
|
||||
filter_body: string
|
||||
|
||||
filter_attachment_filename_include: string
|
||||
|
||||
filter_attachment_filename_exclude: string
|
||||
|
||||
maximum_age: number
|
||||
|
||||
attachment_type: MailFilterAttachmentType
|
||||
|
||||
action: MailAction
|
||||
|
||||
action_parameter?: string
|
||||
|
||||
assign_title_from: MailMetadataTitleOption
|
||||
|
||||
assign_tags?: number[] // PaperlessTag.id
|
||||
|
||||
assign_document_type?: number // PaperlessDocumentType.id
|
||||
|
||||
assign_correspondent_from?: MailMetadataCorrespondentOption
|
||||
|
||||
assign_correspondent?: number // PaperlessCorrespondent.id
|
||||
|
||||
assign_owner_from_rule: boolean
|
||||
}
|
Reference in New Issue
Block a user