List all files with optional pagination.
(
self, source_id: str, actor: PydanticUser, after: Optional[str] = None, limit: Optional[int] = 50
)
| 149 | |
| 150 | @enforce_types |
| 151 | def list_files( |
| 152 | self, source_id: str, actor: PydanticUser, after: Optional[str] = None, limit: Optional[int] = 50 |
| 153 | ) -> List[PydanticFileMetadata]: |
| 154 | """List all files with optional pagination.""" |
| 155 | with self.session_maker() as session: |
| 156 | files = FileMetadataModel.list( |
| 157 | db_session=session, after=after, limit=limit, organization_id=actor.organization_id, source_id=source_id |
| 158 | ) |
| 159 | return [file.to_pydantic() for file in files] |
| 160 | |
| 161 | @enforce_types |
| 162 | def delete_file(self, file_id: str, actor: PydanticUser) -> PydanticFileMetadata: |
no test coverage detected