Frontend basics

This commit is contained in:
Piotr Dec 2025-10-16 23:07:06 +02:00
parent 8565ce19fe
commit e310930d9e
Signed by: stawros
GPG key ID: 74B18A3F0F1E99C0
10 changed files with 607 additions and 58 deletions

View file

@ -1,5 +1,6 @@
from dataclasses import dataclass
from typing import List
from enum import Enum
from typing import List, Optional
@dataclass
@ -10,6 +11,49 @@ class Request:
commit_url: str
changelist: List[str]
@dataclass
class Response:
status: int
class EntryKind(str, Enum):
simple = "simple"
complex = "complex"
@dataclass
class EntrySimpleDTO:
key: str
value: str # mapowane na title/password
@dataclass
class EntryComplexDTO:
title: str
username: str
password: str
url: Optional[str] = None
notes: Optional[str] = None
@dataclass
class GroupDTO:
name: str
path: str
@dataclass
class EntryNodeDTO:
kind: EntryKind
title: str
path: str
@dataclass
class NodeDTO:
# Drzewo: grupa lub wpisy w grupach
name: str
path: str
groups: List["NodeDTO"]
entries: List[EntryNodeDTO]