Extract metadata tree builder
CI / python (push) Has been cancelled
CI / rust (push) Has been cancelled

This commit is contained in:
2026-05-17 20:07:50 +03:00
parent bb3e70f1e5
commit b97c449211
3 changed files with 1257 additions and 1193 deletions
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,50 @@
from __future__ import annotations
from pydantic import BaseModel, Field
class MetadataTreeNodeResponse(BaseModel):
id: str
label: str
kind: str
icon: str
qualified_name: str | None = None
count: int = 0
loaded_count: int = 0
has_more: bool = False
children: list["MetadataTreeNodeResponse"] = Field(default_factory=list)
class ProjectMetadataTreeResponse(BaseModel):
project_id: str
root: MetadataTreeNodeResponse
class MetadataTreeChildrenResponse(BaseModel):
project_id: str
parent_id: str
offset: int = 0
limit: int = 50
total: int = 0
has_more: bool = False
children: list[MetadataTreeNodeResponse] = Field(default_factory=list)
class MetadataTreeSearchResponse(BaseModel):
project_id: str
q: str
total: int = 0
results: list[MetadataTreeNodeResponse] = Field(default_factory=list)
class MetadataTreePathStepResponse(BaseModel):
parent_id: str
child_id: str
offset: int = 0
class MetadataTreePathResponse(BaseModel):
project_id: str
node_id: str
path: list[str] = Field(default_factory=list)
steps: list[MetadataTreePathStepResponse] = Field(default_factory=list)