adding "session.revoke" to events type#500
Merged
rarevalo13 merged 3 commits intomainfrom Dec 15, 2025
Merged
Conversation
Contributor
Greptile OverviewGreptile SummaryAdds support for Changes:
Minor issues:
Confidence Score: 4/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant App as Application
participant SDK as WorkOS Python SDK
participant API as WorkOS API
participant Webhook as Webhook Handler
Note over App,Webhook: Session Revoked Event Flow
rect rgb(240, 240, 255)
Note right of API: Event occurs in WorkOS
API->>API: Session revoked
API->>Webhook: POST session.revoked event
Webhook->>SDK: Parse webhook payload
SDK->>SDK: Deserialize to SessionRevokedWebhook
SDK->>SDK: Extract SessionRevokedPayload
Webhook-->>App: SessionRevokedEvent object
end
rect rgb(255, 240, 240)
Note right of App: Polling for events
App->>SDK: client.events.list_events(events=["session.revoked"])
SDK->>API: GET /events?events=session.revoked
API-->>SDK: Event data
SDK->>SDK: Deserialize to SessionRevokedEvent
SDK-->>App: List[SessionRevokedEvent]
end
Note over App,Webhook: SessionRevokedPayload contains:<br/>id, user_id, ip_address, user_agent,<br/>organization_id, impersonator, timestamps
|
| user_agent: Optional[str] = None | ||
| user_id: str | ||
| created_at: str | ||
| updated_at: str No newline at end of file |
Contributor
There was a problem hiding this comment.
style: missing newline at end of file
Suggested change
| updated_at: str | |
| updated_at: str | |
Prompt To Fix With AI
This is a comment left during a code review.
Path: workos/types/events/session_payload.py
Line: 27:27
Comment:
**style:** missing newline at end of file
```suggestion
updated_at: str
```
How can I resolve this? If you propose a fix, please make it concise.
workos/types/events/event.py
Outdated
Comment on lines
39
to
42
| from workos.types.events.session_payload import( | ||
| SessionCreatedPayload, | ||
| SessionRevokedPayload | ||
| ) |
Contributor
There was a problem hiding this comment.
style: missing space before ( in import statement - should be import ( not import(
Suggested change
| from workos.types.events.session_payload import( | |
| SessionCreatedPayload, | |
| SessionRevokedPayload | |
| ) | |
| from workos.types.events.session_payload import ( | |
| SessionCreatedPayload, | |
| SessionRevokedPayload | |
| ) |
Prompt To Fix With AI
This is a comment left during a code review.
Path: workos/types/events/event.py
Line: 39:42
Comment:
**style:** missing space before `(` in import statement - should be `import (` not `import(`
```suggestion
from workos.types.events.session_payload import (
SessionCreatedPayload,
SessionRevokedPayload
)
```
How can I resolve this? If you propose a fix, please make it concise.
workos/types/events/event_model.py
Outdated
Comment on lines
39
to
42
| from workos.types.events.session_payload import( | ||
| SessionCreatedPayload, | ||
| SessionRevokedPayload | ||
| ) |
Contributor
There was a problem hiding this comment.
style: missing space before ( in import statement - should be import ( not import(
Suggested change
| from workos.types.events.session_payload import( | |
| SessionCreatedPayload, | |
| SessionRevokedPayload | |
| ) | |
| from workos.types.events.session_payload import ( | |
| SessionCreatedPayload, | |
| SessionRevokedPayload | |
| ) |
Prompt To Fix With AI
This is a comment left during a code review.
Path: workos/types/events/event_model.py
Line: 39:42
Comment:
**style:** missing space before `(` in import statement - should be `import (` not `import(`
```suggestion
from workos.types.events.session_payload import (
SessionCreatedPayload,
SessionRevokedPayload
)
```
How can I resolve this? If you propose a fix, please make it concise.
workos/types/webhooks/webhook.py
Outdated
Comment on lines
39
to
42
| from workos.types.events.session_payload import( | ||
| SessionCreatedPayload, | ||
| SessionRevokedPayload | ||
| ) |
Contributor
There was a problem hiding this comment.
style: missing space before ( in import statement - should be import ( not import(
Suggested change
| from workos.types.events.session_payload import( | |
| SessionCreatedPayload, | |
| SessionRevokedPayload | |
| ) | |
| from workos.types.events.session_payload import ( | |
| SessionCreatedPayload, | |
| SessionRevokedPayload | |
| ) |
Prompt To Fix With AI
This is a comment left during a code review.
Path: workos/types/webhooks/webhook.py
Line: 39:42
Comment:
**style:** missing space before `(` in import statement - should be `import (` not `import(`
```suggestion
from workos.types.events.session_payload import (
SessionCreatedPayload,
SessionRevokedPayload
)
```
How can I resolve this? If you propose a fix, please make it concise.
mattgd
approved these changes
Dec 15, 2025
Contributor
mattgd
left a comment
There was a problem hiding this comment.
Minor formatting fixes needed, but this looks good otherwise. Thanks!
rarevalo13
pushed a commit
that referenced
this pull request
Dec 15, 2025
Merged
rarevalo13
pushed a commit
that referenced
this pull request
Dec 15, 2025
rarevalo13
added a commit
that referenced
this pull request
Dec 16, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Session.revoke event was missing, this PR adds support for it in the Python SDK
Local Test using Ipython:
Documentation
Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.
If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.