Skip to content

Commit f9126a0

Browse files
fix missing organization_domain events in webhook defs (#471)
1 parent c720c6a commit f9126a0

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

workos/types/webhooks/webhook.py

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from typing import Literal, Union
2+
23
from pydantic import Field
34
from typing_extensions import Annotated
5+
46
from workos.types.directory_sync import DirectoryGroup
5-
from workos.types.user_management import OrganizationMembership, User
6-
from workos.types.webhooks.webhook_model import WebhookModel
77
from workos.types.directory_sync.directory_user import DirectoryUser
88
from workos.types.events.authentication_payload import (
99
AuthenticationEmailVerificationSucceededPayload,
@@ -37,16 +37,18 @@
3737
OrganizationDomainVerificationFailedPayload,
3838
)
3939
from workos.types.events.session_created_payload import SessionCreatedPayload
40-
from workos.types.organizations.organization_common import OrganizationCommon
4140
from workos.types.organization_domains import OrganizationDomain
41+
from workos.types.organizations.organization_common import OrganizationCommon
4242
from workos.types.roles.role import EventRole
4343
from workos.types.sso.connection import Connection
44+
from workos.types.user_management import OrganizationMembership, User
4445
from workos.types.user_management.email_verification import (
4546
EmailVerificationCommon,
4647
)
4748
from workos.types.user_management.invitation import InvitationCommon
4849
from workos.types.user_management.magic_auth import MagicAuthCommon
4950
from workos.types.user_management.password_reset import PasswordResetCommon
51+
from workos.types.webhooks.webhook_model import WebhookModel
5052

5153
# README
5254
# When adding a new webhook event type, ensure the new webhook class is
@@ -205,6 +207,18 @@ class OrganizationDomainVerifiedWebhook(WebhookModel[OrganizationDomain]):
205207
event: Literal["organization_domain.verified"]
206208

207209

210+
class OrganizationDomainCreatedWebhook(WebhookModel[OrganizationDomain]):
211+
event: Literal["organization_domain.created"]
212+
213+
214+
class OrganizationDomainUpdatedWebhook(WebhookModel[OrganizationDomain]):
215+
event: Literal["organization_domain.updated"]
216+
217+
218+
class OrganizationDomainDeletedWebhook(WebhookModel[OrganizationDomain]):
219+
event: Literal["organization_domain.deleted"]
220+
221+
208222
class OrganizationMembershipCreatedWebhook(WebhookModel[OrganizationMembership]):
209223
event: Literal["organization_membership.created"]
210224

@@ -286,6 +300,9 @@ class UserUpdatedWebhook(WebhookModel[User]):
286300
OrganizationCreatedWebhook,
287301
OrganizationDeletedWebhook,
288302
OrganizationUpdatedWebhook,
303+
OrganizationDomainCreatedWebhook,
304+
OrganizationDomainDeletedWebhook,
305+
OrganizationDomainUpdatedWebhook,
289306
OrganizationDomainVerificationFailedWebhook,
290307
OrganizationDomainVerifiedWebhook,
291308
OrganizationMembershipCreatedWebhook,

0 commit comments

Comments
 (0)