feat: implement committee decision workspace

This commit is contained in:
2026-08-01 17:48:25 +02:00
parent 232329ac52
commit 758b59ca03
28 changed files with 4909 additions and 32 deletions
+45
View File
@@ -0,0 +1,45 @@
from __future__ import annotations
from datetime import datetime
from typing import Any
from pydantic import BaseModel, ConfigDict, Field
class CommitteeWorkspaceWriteRequest(BaseModel):
model_config = ConfigDict(extra="forbid")
record: dict[str, Any]
idempotency_key: str = Field(min_length=1, max_length=255)
expected_revision: int | None = Field(default=None, ge=1)
class CommitteeWorkspaceListResponse(BaseModel):
records: list[dict[str, Any]]
total: int
offset: int
limit: int
class CommitteeWorkspaceHistoryResponse(BaseModel):
revisions: list[dict[str, Any]]
class CommitteeBallotFinalizeRequest(BaseModel):
model_config = ConfigDict(extra="forbid")
provider_id: str = Field(min_length=1, max_length=80)
provider_ballot_ref: str = Field(min_length=1, max_length=255)
approval_ref: dict[str, Any]
expected_revision: int = Field(ge=1)
recorded_at: datetime
change_reason: str = Field(min_length=1, max_length=1_000)
idempotency_key: str = Field(min_length=1, max_length=255)
__all__ = [
"CommitteeWorkspaceHistoryResponse",
"CommitteeWorkspaceListResponse",
"CommitteeWorkspaceWriteRequest",
"CommitteeBallotFinalizeRequest",
]