Schließe die Connector-Kapselung ab, damit Paperless, IMAP und weitere Quellen über dieselbe Anbindung laufen.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
75a3949f7c
commit
d6b70d8f92
75 files changed
+9477
-414
No files matched your search
@@ -278,7 +278,7 @@ class ExternalDetail(APIModel):
|
||||
|
||||
class ExternalIn(APIModel):
|
||||
title: str = Field(min_length=1, max_length=200)
|
||||
source: Literal["paperless", "url", "imap"]
|
||||
source: str = Field(min_length=1, max_length=40)
|
||||
external_id: str = Field(min_length=1, max_length=200)
|
||||
context: ContextIn
|
||||
placement: ContextIn | None = None
|
||||
@@ -288,7 +288,13 @@ class ExternalIn(APIModel):
|
||||
|
||||
|
||||
class ConnectorIn(APIModel):
|
||||
kind: Literal["paperless", "imap"]
|
||||
"""Kind is checked against the source registry. Source fields stay optional.
|
||||
|
||||
Paperless and IMAP still send their existing fields. A further module
|
||||
uses ``config`` and validates that bag itself.
|
||||
"""
|
||||
|
||||
kind: str = Field(min_length=1, max_length=40)
|
||||
name: str = Field(min_length=1, max_length=120)
|
||||
base_url: str | None = None
|
||||
token: str | None = None
|
||||
@@ -298,6 +304,11 @@ class ConnectorIn(APIModel):
|
||||
password: str | None = None
|
||||
mailbox: str | None = Field(default=None, max_length=200)
|
||||
security: Literal["ssl", "starttls"] | None = None
|
||||
config: dict[str, str] | None = None
|
||||
|
||||
|
||||
class SourceAssignmentIn(APIModel):
|
||||
connector_id: UUID
|
||||
|
||||
|
||||
class DeleteElementIn(APIModel):
|
||||
|
||||
Reference in new issue
Block a user