Conversation
Greptile OverviewGreptile SummaryAdded 21 missing event types from WorkOS documentation to align SDK with API capabilities. Created 5 new payload model files ( The changes follow existing patterns:
Confidence Score: 5/5
Important Files Changed
|
|
|
||
|
|
||
| class FlagPayload(WorkOSModel): | ||
| object: str |
There was a problem hiding this comment.
Inconsistent type annotation - use Literal["flag"] instead of str for consistency with other payload models like ApiKeyPayload, PermissionPayload, and OrganizationRolePayload
| object: str | |
| object: Literal["flag"] |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
8f96bf8 to
02de12d
Compare
Add support for the following event types that were documented but missing from the SDK: - api_key.created, api_key.revoked - authentication.email_verification_failed, authentication.mfa_failed, authentication.passkey_failed, authentication.passkey_succeeded, authentication.radar_risk_detected - connection.saml_certificate_renewed, connection.saml_certificate_renewal_required - flag.created, flag.updated, flag.deleted, flag.rule_updated - invitation.resent - organization_role.created, organization_role.deleted, organization_role.updated - permission.created, permission.deleted, permission.updated New payload models: ApiKeyPayload, ConnectionSamlCertificate payloads, FlagPayload, OrganizationRolePayload, PermissionPayload. New auth payloads for email_verification_failed, mfa_failed, passkey, and radar_risk_detected. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
02de12d to
01542a2
Compare
The backend flag.rule_updated event includes a context object (with actor, access_type, configured_targets, and previous_attributes) as a sibling of the data field. Without this, the context was silently dropped during deserialization. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Description
This was entirely written by pointing claude at the workos docs because it's such manual work
https://workos.com/docs/events but absent from the SDK:
api_key.created,api_key.revoked,authentication.email_verification_failed,authentication.mfa_failed,authentication.passkey_failed,authentication.passkey_succeeded,authentication.radar_risk_detected,connection.saml_certificate_renewed,connection.saml_certificate_renewal_required,flag.created,flag.updated,flag.deleted,flag.rule_updated,invitation.resent,organization_role.created,organization_role.deleted,organization_role.updated,permission.created,permission.deleted,permission.updatedApiKeyPayload,ConnectionSamlCertificate*Payload,FlagPayload,OrganizationRolePayload,PermissionPayload) and new auth payloads for the missing authentication eventsEventTypeliteral,Event/Webhookdiscriminated unions,EventPayloadTypeVar, and__init__.pybarrel exportsDocumentation
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.