Sync types and clients with backend for social auth and agent assignments
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
3c75c2296e
commit
1576447b4b
4 files changed
+46
-9
No files matched your search
+12
-3
@@ -22,7 +22,8 @@ from .types import (
|
||||
GetMeResponse,
|
||||
GetOperationResponse,
|
||||
HealthResponse,
|
||||
IssueTokenResponse,
|
||||
IssueApiTokenResponse,
|
||||
RotateApiTokenResponse,
|
||||
JWKSResponse,
|
||||
ListAgentsResponse,
|
||||
ListEpochsResponse,
|
||||
@@ -190,13 +191,21 @@ class ElydoraClient:
|
||||
"""Get the current user's profile."""
|
||||
return self._request("GET", "/v1/auth/me")
|
||||
|
||||
def issue_token(self, ttl_seconds: Optional[int] = None) -> IssueTokenResponse:
|
||||
def issue_api_token(self, ttl_seconds: Optional[int] = None) -> IssueApiTokenResponse:
|
||||
"""Issue an API token with an optional TTL."""
|
||||
body: Dict[str, Any] = {}
|
||||
if ttl_seconds is not None:
|
||||
body["ttl_seconds"] = ttl_seconds
|
||||
return self._request("POST", "/v1/auth/token", json_body=body)
|
||||
|
||||
def issue_token(self, ttl_seconds: Optional[int] = None) -> IssueApiTokenResponse:
|
||||
"""Deprecated: Use issue_api_token() instead."""
|
||||
return self.issue_api_token(ttl_seconds=ttl_seconds)
|
||||
|
||||
def rotate_api_token(self) -> RotateApiTokenResponse:
|
||||
"""Rotate the current API token and keep the old token in 24h grace."""
|
||||
return self._request("POST", "/v1/auth/rotate", json_body={})
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# Agent management
|
||||
# -----------------------------------------------------------------
|
||||
@@ -293,7 +302,7 @@ class ElydoraClient:
|
||||
|
||||
def verify_operation(self, operation_id: str) -> VerifyOperationResponse:
|
||||
"""Verify an operation's integrity."""
|
||||
return self._request("POST", f"/v1/operations/{operation_id}/verify")
|
||||
return self._request("POST", f"/v1/operations/{operation_id}/verify", json_body={})
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# Audit
|
||||
|
||||
Reference in new issue
Block a user