workos/workos-python

Webhook union type missing org membership hooks

Closed this issue · 2 comments

This union doesn't contain OrganizationMembership{Created,Updated,Deleted} so the library parses the body into an UntypedWebhook.

Webhook = Annotated[
Union[
AuthenticationEmailVerificationSucceededWebhook,
AuthenticationMagicAuthFailedWebhook,
AuthenticationMagicAuthSucceededWebhook,
AuthenticationMfaSucceededWebhook,
AuthenticationOauthFailedWebhook,
AuthenticationOauthSucceededWebhook,
AuthenticationPasswordFailedWebhook,
AuthenticationPasswordSucceededWebhook,
AuthenticationSsoFailedWebhook,
AuthenticationSsoSucceededWebhook,
ConnectionActivatedWebhook,
ConnectionDeactivatedWebhook,
ConnectionDeletedWebhook,
DirectoryActivatedWebhook,
DirectoryDeletedWebhook,
DirectoryGroupCreatedWebhook,
DirectoryGroupDeletedWebhook,
DirectoryGroupUpdatedWebhook,
DirectoryUserCreatedWebhook,
DirectoryUserDeletedWebhook,
DirectoryUserUpdatedWebhook,
DirectoryUserAddedToGroupWebhook,
DirectoryUserRemovedFromGroupWebhook,
EmailVerificationCreatedWebhook,
InvitationCreatedWebhook,
MagicAuthCreatedWebhook,
OrganizationCreatedWebhook,
OrganizationDeletedWebhook,
OrganizationUpdatedWebhook,
OrganizationDomainVerificationFailedWebhook,
OrganizationDomainVerifiedWebhook,
PasswordResetCreatedWebhook,
RoleCreatedWebhook,
RoleDeletedWebhook,
RoleUpdatedWebhook,
SessionCreatedWebhook,
UserCreatedWebhook,
UserDeletedWebhook,
UserUpdatedWebhook,
],

Hey @gatesn - thanks for the report. Will put out a release to fix this shortly.

This has been fixed in version 5.4.3. Thanks again!