Skip to content

Commit 5d57abe

Browse files
authored
Add missing organization membership types to Event type union. (#363)
1 parent b3ea86a commit 5d57abe

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

workos/types/events/event.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@
4949
from workos.types.user_management.password_reset import PasswordResetCommon
5050

5151

52+
# README
53+
# When adding a new event type, ensure the new event class is
54+
# added to the Event union type at the bottom of this file, and
55+
# the event name is added to the EventType union type in event_type.py.
56+
57+
5258
class AuthenticationEmailVerificationSucceededEvent(
5359
EventModel[AuthenticationEmailVerificationSucceededPayload,]
5460
):
@@ -264,6 +270,9 @@ class UserUpdatedEvent(EventModel[User]):
264270
OrganizationUpdatedEvent,
265271
OrganizationDomainVerificationFailedEvent,
266272
OrganizationDomainVerifiedEvent,
273+
OrganizationMembershipCreatedEvent,
274+
OrganizationMembershipDeletedEvent,
275+
OrganizationMembershipUpdatedEvent,
267276
PasswordResetCreatedEvent,
268277
RoleCreatedEvent,
269278
RoleDeletedEvent,

workos/types/events/event_type.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
from typing import Literal, TypeVar
22

3+
# README
4+
# When adding a new event type, ensure a new event class is created
5+
# and added to the Event class union type in event.py.
36

47
EventType = Literal[
58
"authentication.email_verification_succeeded",

0 commit comments

Comments
 (0)