Complete audit history API: update endpoints, download logging, and history models (#20)
- Add PUT /api/v1/projects/{project} endpoint with audit logging
- Add PUT /api/v1/project/{project}/packages/{package} endpoint with audit logging
- Add artifact.download audit logging to download endpoint
- Enhance tag history endpoint with artifact metadata and pagination
- Add ProjectHistory and PackageHistory models for metadata change tracking
- Add database triggers for automatic history population on updates
- Add migration 004_history_tables.sql with tables and triggers
This commit is contained in:
@@ -40,6 +40,13 @@ class ProjectResponse(BaseModel):
|
||||
from_attributes = True
|
||||
|
||||
|
||||
class ProjectUpdate(BaseModel):
|
||||
"""Schema for updating a project"""
|
||||
|
||||
description: Optional[str] = None
|
||||
is_public: Optional[bool] = None
|
||||
|
||||
|
||||
# Package format and platform enums
|
||||
PACKAGE_FORMATS = [
|
||||
"generic",
|
||||
@@ -87,6 +94,14 @@ class PackageResponse(BaseModel):
|
||||
from_attributes = True
|
||||
|
||||
|
||||
class PackageUpdate(BaseModel):
|
||||
"""Schema for updating a package"""
|
||||
|
||||
description: Optional[str] = None
|
||||
format: Optional[str] = None
|
||||
platform: Optional[str] = None
|
||||
|
||||
|
||||
class TagSummary(BaseModel):
|
||||
"""Lightweight tag info for embedding in package responses"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user