mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-14 10:36:58 +01:00
Feature: OAuth2 Gmail and Outlook email support (#7866)
This commit is contained in:
parent
dcc8d4046a
commit
2353f7c2db
30 changed files with 1110 additions and 121 deletions
|
|
@ -6,6 +6,12 @@ export enum IMAPSecurity {
|
|||
STARTTLS = 3,
|
||||
}
|
||||
|
||||
export enum MailAccountType {
|
||||
IMAP = 1,
|
||||
Gmail_OAuth = 2,
|
||||
Outlook_OAuth = 3,
|
||||
}
|
||||
|
||||
export interface MailAccount extends ObjectWithPermissions {
|
||||
name: string
|
||||
|
||||
|
|
@ -22,4 +28,8 @@ export interface MailAccount extends ObjectWithPermissions {
|
|||
character_set?: string
|
||||
|
||||
is_token: boolean
|
||||
|
||||
account_type: MailAccountType
|
||||
|
||||
expiration?: string // Date
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,6 +64,8 @@ export const SETTINGS_KEYS = {
|
|||
SEARCH_DB_ONLY: 'general-settings:search:db-only',
|
||||
SEARCH_FULL_TYPE: 'general-settings:search:more-link',
|
||||
EMPTY_TRASH_DELAY: 'trash_delay',
|
||||
GMAIL_OAUTH_URL: 'gmail_oauth_url',
|
||||
OUTLOOK_OAUTH_URL: 'outlook_oauth_url',
|
||||
}
|
||||
|
||||
export const SETTINGS: UiSetting[] = [
|
||||
|
|
@ -242,4 +244,14 @@ export const SETTINGS: UiSetting[] = [
|
|||
type: 'number',
|
||||
default: 30,
|
||||
},
|
||||
{
|
||||
key: SETTINGS_KEYS.GMAIL_OAUTH_URL,
|
||||
type: 'string',
|
||||
default: null,
|
||||
},
|
||||
{
|
||||
key: SETTINGS_KEYS.OUTLOOK_OAUTH_URL,
|
||||
type: 'string',
|
||||
default: null,
|
||||
},
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue