|
1 | 1 | from typing import Literal, Union |
| 2 | + |
2 | 3 | from pydantic import Field |
3 | 4 | from typing_extensions import Annotated |
| 5 | + |
4 | 6 | 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 |
7 | 7 | from workos.types.directory_sync.directory_user import DirectoryUser |
8 | 8 | from workos.types.events.authentication_payload import ( |
9 | 9 | AuthenticationEmailVerificationSucceededPayload, |
|
37 | 37 | OrganizationDomainVerificationFailedPayload, |
38 | 38 | ) |
39 | 39 | from workos.types.events.session_created_payload import SessionCreatedPayload |
40 | | -from workos.types.organizations.organization_common import OrganizationCommon |
41 | 40 | from workos.types.organization_domains import OrganizationDomain |
| 41 | +from workos.types.organizations.organization_common import OrganizationCommon |
42 | 42 | from workos.types.roles.role import EventRole |
43 | 43 | from workos.types.sso.connection import Connection |
| 44 | +from workos.types.user_management import OrganizationMembership, User |
44 | 45 | from workos.types.user_management.email_verification import ( |
45 | 46 | EmailVerificationCommon, |
46 | 47 | ) |
47 | 48 | from workos.types.user_management.invitation import InvitationCommon |
48 | 49 | from workos.types.user_management.magic_auth import MagicAuthCommon |
49 | 50 | from workos.types.user_management.password_reset import PasswordResetCommon |
| 51 | +from workos.types.webhooks.webhook_model import WebhookModel |
50 | 52 |
|
51 | 53 | # README |
52 | 54 | # When adding a new webhook event type, ensure the new webhook class is |
@@ -205,6 +207,18 @@ class OrganizationDomainVerifiedWebhook(WebhookModel[OrganizationDomain]): |
205 | 207 | event: Literal["organization_domain.verified"] |
206 | 208 |
|
207 | 209 |
|
| 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 | + |
208 | 222 | class OrganizationMembershipCreatedWebhook(WebhookModel[OrganizationMembership]): |
209 | 223 | event: Literal["organization_membership.created"] |
210 | 224 |
|
@@ -286,6 +300,9 @@ class UserUpdatedWebhook(WebhookModel[User]): |
286 | 300 | OrganizationCreatedWebhook, |
287 | 301 | OrganizationDeletedWebhook, |
288 | 302 | OrganizationUpdatedWebhook, |
| 303 | + OrganizationDomainCreatedWebhook, |
| 304 | + OrganizationDomainDeletedWebhook, |
| 305 | + OrganizationDomainUpdatedWebhook, |
289 | 306 | OrganizationDomainVerificationFailedWebhook, |
290 | 307 | OrganizationDomainVerifiedWebhook, |
291 | 308 | OrganizationMembershipCreatedWebhook, |
|
0 commit comments