mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-30 18:27:45 -05:00
Feature: OAuth2 Gmail and Outlook email support (#7866)
This commit is contained in:
@@ -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,
|
||||
},
|
||||
]
|
||||
|
Reference in New Issue
Block a user