Skip to content

Commit 6622211

Browse files
committed
extend ApiKey response model by missing fields
1 parent aa51996 commit 6622211

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

tests/utils/fixtures/mock_api_key.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ def __init__(self, id="api_key_01234567890"):
99
super().__init__(
1010
object="api_key",
1111
id=id,
12+
owner={"type": "organization", "id": "org_1337"},
1213
name="Development API Key",
14+
obfuscated_value="api_..0",
15+
permissions=[],
1316
last_used_at=now,
1417
created_at=now,
1518
updated_at=now,

workos/types/api_keys/api_keys.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,18 @@
33
from workos.types.workos_model import WorkOSModel
44

55

6+
class ApiKeyOwner(WorkOSModel):
7+
type: str
8+
id: str
9+
10+
611
class ApiKey(WorkOSModel):
712
object: Literal["api_key"]
813
id: str
14+
owner: ApiKeyOwner
915
name: str
16+
obfuscated_value: str
1017
last_used_at: str | None = None
18+
permissions: list[str]
1119
created_at: str
1220
updated_at: str

0 commit comments

Comments
 (0)