paperless-ngx/src-ui/src/app/data/paperless-consumption-template.ts
shamoon 9712ac109d
Feature: consumption templates (#4196)
* Initial implementation of consumption templates

* Frontend implementation of consumption templates

Testing

* Support consumption template source

* order templates, automatically add permissions

* Support title assignment in consumption templates

* Refactoring, filters to and, show sources on list

Show sources on template list, update some translation strings

Make filters and

minor testing

* Update strings

* Only update django-multiselectfield

* Basic docs, document some methods

* Improve testing coverage, template multi-assignment merges
2023-09-22 16:53:13 -07:00

42 lines
892 B
TypeScript

import { ObjectWithId } from './object-with-id'
export enum DocumentSource {
ConsumeFolder = 1,
ApiUpload = 2,
MailFetch = 3,
}
export interface PaperlessConsumptionTemplate extends ObjectWithId {
name: string
order: number
sources: DocumentSource[]
filter_filename: string
filter_path?: string
filter_mailrule?: number // PaperlessMailRule.id
assign_title?: string
assign_tags?: number[] // PaperlessTag.id
assign_document_type?: number // PaperlessDocumentType.id
assign_correspondent?: number // PaperlessCorrespondent.id
assign_storage_path?: number // PaperlessStoragePath.id
assign_owner?: number // PaperlessUser.id
assign_view_users?: number[] // [PaperlessUser.id]
assign_view_groups?: number[] // [PaperlessGroup.id]
assign_change_users?: number[] // [PaperlessUser.id]
assign_change_groups?: number[] // [PaperlessGroup.id]
}