Stelle den ersten nutzbaren Ablauf zum Organisieren und Nachverfolgen bereit.
Deploy Development / deploy (push) Successful in 23s
Deploy Development / deploy (push) Successful in 23s
Anmeldung, Datenraeume, Akten, Vorgaenge, gemeinsame Notizen, Dateien, manuelle Paperless-Referenzen, Aufgaben und unabhaengige Fristen laufen damit in der Entwicklungsumgebung. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
cfe17ff909
commit
2558239bfd
60 files changed
+8467
-71
No files matched your search
@@ -0,0 +1,203 @@
|
||||
"""Request bodies. Unknown fields are rejected."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import date
|
||||
from typing import Annotated, Literal
|
||||
from uuid import UUID
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field
|
||||
|
||||
Email = Annotated[str, Field(min_length=3, max_length=320, pattern=r"^[^@\s]+@[^@\s]+\.[^@\s]+$")]
|
||||
|
||||
|
||||
class APIModel(BaseModel):
|
||||
model_config = ConfigDict(extra="forbid")
|
||||
|
||||
|
||||
class LoginIn(APIModel):
|
||||
email: Email
|
||||
password: str = Field(min_length=1, max_length=200)
|
||||
|
||||
|
||||
class ScopeIn(APIModel):
|
||||
kind: Literal["personal", "organization"]
|
||||
id: UUID
|
||||
|
||||
|
||||
class AcceptInviteIn(APIModel):
|
||||
token: str = Field(min_length=20, max_length=200)
|
||||
display_name: str = Field(min_length=1, max_length=120)
|
||||
password: str = Field(min_length=10, max_length=200)
|
||||
|
||||
|
||||
class InvitationIn(APIModel):
|
||||
email: Email
|
||||
room_id: UUID
|
||||
|
||||
|
||||
class RoomIn(APIModel):
|
||||
name: str = Field(min_length=1, max_length=160)
|
||||
|
||||
|
||||
class MemberIn(APIModel):
|
||||
email: Email
|
||||
role: Literal["member", "manager"]
|
||||
|
||||
|
||||
class ContextIn(APIModel):
|
||||
kind: Literal["case", "matter"]
|
||||
id: UUID
|
||||
|
||||
|
||||
class CaseIn(APIModel):
|
||||
title: str = Field(min_length=1, max_length=200)
|
||||
parent_case_id: UUID | None = None
|
||||
rights_mode: Literal["inherit_parent", "explicit"] = "inherit_parent"
|
||||
|
||||
|
||||
class CasePatch(APIModel):
|
||||
expected_version: int = Field(ge=1)
|
||||
title: str | None = Field(default=None, min_length=1, max_length=200)
|
||||
status: Literal["open", "closed"] | None = None
|
||||
|
||||
|
||||
class ChapterIn(APIModel):
|
||||
title: str = Field(min_length=1, max_length=200)
|
||||
position: int | None = Field(default=None, ge=0, le=10000)
|
||||
|
||||
|
||||
class MatterIn(APIModel):
|
||||
title: str = Field(min_length=1, max_length=200)
|
||||
parent_matter_id: UUID | None = None
|
||||
context: ContextIn | None = None
|
||||
|
||||
|
||||
class MatterPatch(APIModel):
|
||||
expected_version: int = Field(ge=1)
|
||||
title: str | None = Field(default=None, min_length=1, max_length=200)
|
||||
status: Literal["open", "closed"] | None = None
|
||||
context: ContextIn | None = None
|
||||
|
||||
|
||||
class CaseLinkIn(APIModel):
|
||||
case_id: UUID
|
||||
context: ContextIn | None = None
|
||||
|
||||
|
||||
class CrossLinkIn(APIModel):
|
||||
target_matter_id: UUID
|
||||
target_context: ContextIn
|
||||
source_context: ContextIn | None = None
|
||||
|
||||
|
||||
class GrantIn(APIModel):
|
||||
email: Email
|
||||
can_read: bool = True
|
||||
can_edit: bool = False
|
||||
can_share: bool = False
|
||||
|
||||
|
||||
class ExceptionIn(APIModel):
|
||||
resource_kind: Literal["element", "matter", "task", "deadline"]
|
||||
resource_id: UUID
|
||||
context: ContextIn
|
||||
remove_read: bool = False
|
||||
remove_edit: bool = False
|
||||
remove_share: bool = False
|
||||
|
||||
|
||||
class DocumentIn(APIModel):
|
||||
version: Literal[1] = 1
|
||||
blocks: list[dict]
|
||||
|
||||
|
||||
class NoteIn(APIModel):
|
||||
title: str = Field(min_length=1, max_length=200)
|
||||
document: DocumentIn
|
||||
context: ContextIn
|
||||
placement: ContextIn | None = None
|
||||
chapter_id: UUID | None = None
|
||||
|
||||
|
||||
class NotePatch(APIModel):
|
||||
expected_version: int = Field(ge=1)
|
||||
document: DocumentIn
|
||||
context: ContextIn | None = None
|
||||
|
||||
|
||||
class BindingIn(APIModel):
|
||||
element_id: UUID
|
||||
source_context: ContextIn
|
||||
target: ContextIn
|
||||
target_context: ContextIn | None = None
|
||||
chapter_id: UUID | None = None
|
||||
|
||||
|
||||
class AnnotationIn(APIModel):
|
||||
body: str = Field(min_length=1, max_length=4000)
|
||||
|
||||
|
||||
class DatesIn(APIModel):
|
||||
document_on: date | None = None
|
||||
sent_on: date | None = None
|
||||
received_on: date | None = None
|
||||
|
||||
|
||||
class ExternalIn(APIModel):
|
||||
title: str = Field(min_length=1, max_length=200)
|
||||
source: Literal["paperless", "url"]
|
||||
external_id: str = Field(min_length=1, max_length=200)
|
||||
context: ContextIn
|
||||
placement: ContextIn | None = None
|
||||
chapter_id: UUID | None = None
|
||||
dates: DatesIn = DatesIn()
|
||||
|
||||
|
||||
class DeleteElementIn(APIModel):
|
||||
expected_version: int = Field(ge=1)
|
||||
|
||||
|
||||
class TaskIn(APIModel):
|
||||
title: str = Field(min_length=1, max_length=200)
|
||||
due_on: date | None = None
|
||||
matter_id: UUID | None = None
|
||||
context: ContextIn | None = None
|
||||
|
||||
|
||||
class TaskPatch(APIModel):
|
||||
expected_version: int = Field(ge=1)
|
||||
title: str | None = Field(default=None, min_length=1, max_length=200)
|
||||
due_on: date | None = None
|
||||
clear_due_on: bool = False
|
||||
status: Literal["open", "done"] | None = None
|
||||
context: ContextIn | None = None
|
||||
|
||||
|
||||
class AssigneeIn(APIModel):
|
||||
email: str | None = None
|
||||
context: ContextIn | None = None
|
||||
|
||||
|
||||
class DeadlineIn(APIModel):
|
||||
title: str = Field(min_length=1, max_length=200)
|
||||
due_on: date
|
||||
matter_id: UUID | None = None
|
||||
context: ContextIn | None = None
|
||||
|
||||
|
||||
class DeadlinePatch(APIModel):
|
||||
expected_version: int = Field(ge=1)
|
||||
title: str | None = Field(default=None, min_length=1, max_length=200)
|
||||
due_on: date | None = None
|
||||
context: ContextIn | None = None
|
||||
|
||||
|
||||
class FulfillIn(APIModel):
|
||||
expected_version: int = Field(ge=1)
|
||||
context: ContextIn | None = None
|
||||
|
||||
|
||||
class TaskDeadlineIn(APIModel):
|
||||
deadline_id: UUID
|
||||
context: ContextIn | None = None
|
||||
Reference in new issue
Block a user