Skip to content

Commit 60d7fb5

Browse files
committed
fix(interfaces): add github_user_normalized, cooldown fields, AuditEventContext TypedDict
1 parent 25ffd79 commit 60d7fb5

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

src/ghdcbot/core/interfaces.py

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
class IdentityLinkDict(TypedDict, total=False):
1818
discord_user_id: str
1919
github_user: str
20+
github_user_normalized: str
2021
verified: int
2122
verification_code: str | None
2223
expires_at: str | None
@@ -25,13 +26,18 @@ class IdentityLinkDict(TypedDict, total=False):
2526
unlinked_at: str | None
2627

2728

28-
class UnlinkResultDict(TypedDict):
29+
class _UnlinkResultRequired(TypedDict):
2930
discord_user_id: str
3031
github_user: str
3132
verified_at: str
3233
unlinked_at: str
3334

3435

36+
class UnlinkResultDict(_UnlinkResultRequired, total=False):
37+
cooldown_until: str | None
38+
cooldown_hours: int
39+
40+
3541
class IdentityStatusDict(TypedDict):
3642
github_user: str | None
3743
status: Literal["verified", "verified_stale", "pending", "not_linked"]
@@ -51,10 +57,19 @@ class IssueRequestDict(TypedDict):
5157
status: str
5258

5359

60+
class AuditEventContext(TypedDict, total=False):
61+
org: str
62+
repo: str
63+
snapshot_dir: str
64+
run_id: str
65+
files_written: int
66+
timestamp: str
67+
68+
5469
class AuditEventDict(TypedDict, total=False):
5570
event_type: str
5671
timestamp: str
57-
context: dict
72+
context: AuditEventContext
5873

5974

6075
class NotificationRecordDict(TypedDict):

0 commit comments

Comments
 (0)