|
1 | 1 | # generated by datamodel-codegen:
|
2 | 2 | # filename: https://staging.openbraininstitute.org/api/entitycore/openapi.json
|
3 |
| -# timestamp: 2025-06-18T08:10:19+00:00 |
| 3 | +# timestamp: 2025-06-19T12:22:45+00:00 |
4 | 4 |
|
5 | 5 | from __future__ import annotations
|
6 | 6 | from enum import Enum
|
7 | 7 | from enum import StrEnum
|
8 | 8 | from uuid import UUID
|
9 | 9 | from typing import Annotated, Any
|
10 |
| -from pydantic import BaseModel, Field, RootModel, UUID4 |
| 10 | +from pydantic import AnyUrl, BaseModel, Field, RootModel, UUID4 |
11 | 11 | from datetime import datetime
|
| 12 | +from pathlib import Path |
12 | 13 |
|
13 | 14 |
|
14 | 15 | class ActivityType(StrEnum):
|
@@ -47,6 +48,7 @@ class ApiErrorCode(StrEnum):
|
47 | 48 | ASSET_NOT_A_DIRECTORY = "ASSET_NOT_A_DIRECTORY"
|
48 | 49 | ASSET_INVALID_SCHEMA = "ASSET_INVALID_SCHEMA"
|
49 | 50 | ION_NAME_NOT_FOUND = "ION_NAME_NOT_FOUND"
|
| 51 | + S3_CANNOT_CREATE_PRESIGNED_URL = "S3_CANNOT_CREATE_PRESIGNED_URL" |
50 | 52 |
|
51 | 53 |
|
52 | 54 | class AssetLabel(StrEnum):
|
@@ -105,6 +107,23 @@ class ContributionCreate(BaseModel):
|
105 | 107 | entity_id: Annotated[UUID, Field(title="Entity Id")]
|
106 | 108 |
|
107 | 109 |
|
| 110 | +class DetailedFile(BaseModel): |
| 111 | + name: Annotated[str, Field(title="Name")] |
| 112 | + size: Annotated[int, Field(title="Size")] |
| 113 | + last_modified: Annotated[datetime, Field(title="Last Modified")] |
| 114 | + |
| 115 | + |
| 116 | +class DetailedFileList(BaseModel): |
| 117 | + files: Annotated[dict[str, DetailedFile], Field(title="Files")] |
| 118 | + |
| 119 | + |
| 120 | +class DirectoryUpload(BaseModel): |
| 121 | + directory_name: Annotated[Path, Field(title="Directory Name")] |
| 122 | + files: Annotated[list[Path], Field(title="Files")] |
| 123 | + meta: Annotated[dict[str, Any] | None, Field(title="Meta")] = None |
| 124 | + label: AssetLabel | None = None |
| 125 | + |
| 126 | + |
108 | 127 | class EModelCreate(BaseModel):
|
109 | 128 | authorized_public: Annotated[bool | None, Field(title="Authorized Public")] = False
|
110 | 129 | description: Annotated[str, Field(title="Description")]
|
@@ -1225,6 +1244,11 @@ class SingleNeuronSynaptomeSimulationRead(BaseModel):
|
1225 | 1244 | synaptome: NestedSynaptome
|
1226 | 1245 |
|
1227 | 1246 |
|
| 1247 | +class AssetAndPresignedURLS(BaseModel): |
| 1248 | + asset: AssetRead |
| 1249 | + files: Annotated[dict[str, AnyUrl], Field(title="Files")] |
| 1250 | + |
| 1251 | + |
1228 | 1252 | class CircuitRead(BaseModel):
|
1229 | 1253 | assets: Annotated[list[AssetRead], Field(title="Assets")]
|
1230 | 1254 | authorized_project_id: Annotated[UUID4, Field(title="Authorized Project Id")]
|
@@ -1284,6 +1308,9 @@ class EModelRead(BaseModel):
|
1284 | 1308 |
|
1285 | 1309 |
|
1286 | 1310 | class ElectricalCellRecordingRead(BaseModel):
|
| 1311 | + contributions: Annotated[list[NestedContributionRead] | None, Field(title="Contributions")] = ( |
| 1312 | + None |
| 1313 | + ) |
1287 | 1314 | subject: NestedSubjectRead
|
1288 | 1315 | created_by: NestedPersonRead
|
1289 | 1316 | updated_by: NestedPersonRead
|
|
0 commit comments