mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-30 18:27:45 -05:00
Feature: Workflows (#5121)
This commit is contained in:
@@ -1,23 +1,10 @@
|
||||
import { ObjectWithId } from './object-with-id'
|
||||
|
||||
export enum DocumentSource {
|
||||
ConsumeFolder = 1,
|
||||
ApiUpload = 2,
|
||||
MailFetch = 3,
|
||||
export enum WorkflowActionType {
|
||||
Assignment = 1,
|
||||
}
|
||||
|
||||
export interface ConsumptionTemplate extends ObjectWithId {
|
||||
name: string
|
||||
|
||||
order: number
|
||||
|
||||
sources: DocumentSource[]
|
||||
|
||||
filter_filename: string
|
||||
|
||||
filter_path?: string
|
||||
|
||||
filter_mailrule?: number // MailRule.id
|
||||
export interface WorkflowAction extends ObjectWithId {
|
||||
type: WorkflowActionType
|
||||
|
||||
assign_title?: string
|
||||
|
37
src-ui/src/app/data/workflow-trigger.ts
Normal file
37
src-ui/src/app/data/workflow-trigger.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
import { ObjectWithId } from './object-with-id'
|
||||
|
||||
export enum DocumentSource {
|
||||
ConsumeFolder = 1,
|
||||
ApiUpload = 2,
|
||||
MailFetch = 3,
|
||||
}
|
||||
|
||||
export enum WorkflowTriggerType {
|
||||
Consumption = 1,
|
||||
DocumentAdded = 2,
|
||||
DocumentUpdated = 3,
|
||||
}
|
||||
|
||||
export interface WorkflowTrigger extends ObjectWithId {
|
||||
type: WorkflowTriggerType
|
||||
|
||||
sources?: DocumentSource[]
|
||||
|
||||
filter_filename?: string
|
||||
|
||||
filter_path?: string
|
||||
|
||||
filter_mailrule?: number // MailRule.id
|
||||
|
||||
match?: string
|
||||
|
||||
matching_algorithm?: number
|
||||
|
||||
is_insensitive?: boolean
|
||||
|
||||
filter_has_tags?: number[] // Tag.id[]
|
||||
|
||||
filter_has_correspondent?: number // Correspondent.id
|
||||
|
||||
filter_has_document_type?: number // DocumentType.id
|
||||
}
|
15
src-ui/src/app/data/workflow.ts
Normal file
15
src-ui/src/app/data/workflow.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { ObjectWithId } from './object-with-id'
|
||||
import { WorkflowAction } from './workflow-action'
|
||||
import { WorkflowTrigger } from './workflow-trigger'
|
||||
|
||||
export interface Workflow extends ObjectWithId {
|
||||
name: string
|
||||
|
||||
order: number
|
||||
|
||||
enabled: boolean
|
||||
|
||||
triggers: WorkflowTrigger[]
|
||||
|
||||
actions: WorkflowAction[]
|
||||
}
|
Reference in New Issue
Block a user