Initialize configurable Quick Access module
Module Package Release / publish-packages (push) Successful in 12s

This commit is contained in:
2026-08-06 19:02:54 +02:00
parent f3cf91b898
commit 3fbbb84267
34 changed files with 3086 additions and 1 deletions
@@ -0,0 +1,89 @@
from __future__ import annotations
from typing import Literal
from pydantic import BaseModel, ConfigDict, Field
class PreferenceEntry(BaseModel):
model_config = ConfigDict(extra="forbid")
enabled: bool | None = None
forced: bool = False
order: int | None = Field(default=None, ge=0, le=100_000)
class ProfileUpdateRequest(BaseModel):
model_config = ConfigDict(extra="forbid")
base_revision: int = Field(ge=1)
category_preferences: dict[str, PreferenceEntry] = Field(default_factory=dict)
tool_preferences: dict[str, PreferenceEntry] = Field(default_factory=dict)
class ProfileResponse(BaseModel):
scope_type: Literal["system", "tenant", "user"]
tenant_id: str | None = None
scope_id: str | None = None
revision: int
etag: str
category_preferences: dict[str, PreferenceEntry]
tool_preferences: dict[str, PreferenceEntry]
stale_category_ids: list[str] = Field(default_factory=list)
stale_tool_ids: list[str] = Field(default_factory=list)
class CatalogueCategoryResponse(BaseModel):
id: str
label: str
description: str
icon: str
order: int
class CatalogueToolResponse(BaseModel):
id: str
module_id: str
category_id: str
label: str
description: str | None = None
icon: str
surface_id: str
full_page_path: str | None = None
required_all: list[str]
required_any: list[str]
order: int
default_enabled: bool
modes: list[str]
class CatalogueResponse(BaseModel):
categories: list[CatalogueCategoryResponse]
tools: list[CatalogueToolResponse]
class EffectiveToolResponse(CatalogueToolResponse):
enabled: bool
forced: bool
locked_by: str | None = None
class EffectiveCategoryResponse(CatalogueCategoryResponse):
enabled: bool
forced: bool
locked_by: str | None = None
tools: list[EffectiveToolResponse]
class EffectiveQuickAccessResponse(BaseModel):
categories: list[EffectiveCategoryResponse]
diagnostics: list[str] = Field(default_factory=list)
__all__ = [
"CatalogueResponse",
"EffectiveQuickAccessResponse",
"PreferenceEntry",
"ProfileResponse",
"ProfileUpdateRequest",
]