c5f8c50872
BREAKING CHANGES:
- Removed Workspace, WorkspaceMember, WorkspaceInvitation entities
- Project now has owner_user_id instead of workspace_id
- Added shared_users list to Project for collaboration
- Subscription/quota moved from Workspace to User level
Changes:
- packages/domain/entities.py: Removed Workspace entities, updated Project
- packages/adapters/sqlalchemy_impl/models.py: Updated models
- packages/application/: Removed workspace use cases, updated other use cases
- packages/ports/: Removed workspace repository interfaces
- apps/api/: Updated routes, schemas, dependencies, router
- alembic/versions/007_remove_workspace_concept.py: Database migration
New APIs:
- POST /projects/{id}/share: Share project with user
- DELETE /projects/{id}/share/{user_id}: Unshare project
36 lines
1002 B
Python
36 lines
1002 B
Python
from pydantic import BaseModel, Field
|
|
|
|
|
|
class UploadAssetResponse(BaseModel):
|
|
storage_key: str
|
|
ingest_job_id: str
|
|
url: str = Field(..., description="Public URL of uploaded file")
|
|
|
|
|
|
class DirectUploadPrepareRequest(BaseModel):
|
|
project_id: str = Field(..., min_length=1)
|
|
library_id: str = Field(..., min_length=1)
|
|
filename: str = Field(..., min_length=1, max_length=255)
|
|
content_type: str = Field(default="application/octet-stream", min_length=1, max_length=100)
|
|
file_size: int = Field(..., gt=0)
|
|
|
|
|
|
class DirectUploadPrepareResponse(BaseModel):
|
|
upload_url: str
|
|
method: str
|
|
storage_key: str
|
|
expires_at: str
|
|
fields: dict[str, str]
|
|
max_size_bytes: int
|
|
|
|
|
|
class DirectUploadCompleteRequest(BaseModel):
|
|
project_id: str = Field(..., min_length=1)
|
|
library_id: str = Field(..., min_length=1)
|
|
storage_key: str = Field(..., min_length=1, max_length=255)
|
|
|
|
|
|
class DirectUploadCompleteResponse(BaseModel):
|
|
storage_key: str
|
|
ingest_job_id: str
|