fix(workspace): expose last opened in contract (#38323)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
yyh
2026-07-02 11:14:35 +00:00
committed by GitHub
co-authored by autofix-ci[bot]
parent 3f92e38616
commit ff56fb7e23
5 changed files with 10 additions and 9 deletions
@@ -102,6 +102,7 @@ class TenantListItemResponse(ResponseModel):
plan: str | None = None
status: str | None = None
created_at: int | None = None
last_opened_at: int | None = None
current: bool
@field_validator("plan", "status", mode="before")
@@ -113,9 +114,9 @@ class TenantListItemResponse(ResponseModel):
return value
return str(getattr(value, "value", value))
@field_validator("created_at", mode="before")
@field_validator("created_at", "last_opened_at", mode="before")
@classmethod
def _normalize_created_at(cls, value: datetime | int | None):
def _normalize_timestamp(cls, value: datetime | int | None):
return to_timestamp(value)
+1
View File
@@ -21199,6 +21199,7 @@ Tag type
| created_at | integer | | No |
| current | boolean | | Yes |
| id | string | | Yes |
| last_opened_at | integer | | No |
| name | string | | No |
| plan | string | | No |
| status | string | | No |