Skip to content

Commit 0108479

Browse files
authored
add invitation accepted, revoked events (#469)
1 parent 2f52b53 commit 0108479

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

workos/types/events/event.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,18 @@ class EmailVerificationCreatedEvent(EventModel[EmailVerificationCommon]):
163163
event: Literal["email_verification.created"]
164164

165165

166+
class InvitationAcceptedEvent(EventModel[InvitationCommon]):
167+
event: Literal["invitation.accepted"]
168+
169+
166170
class InvitationCreatedEvent(EventModel[InvitationCommon]):
167171
event: Literal["invitation.created"]
168172

169173

174+
class InvitationRevokedEvent(EventModel[InvitationCommon]):
175+
event: Literal["invitation.revoked"]
176+
177+
170178
class MagicAuthCreatedEvent(EventModel[MagicAuthCommon]):
171179
event: Literal["magic_auth.created"]
172180

@@ -279,7 +287,9 @@ class UserUpdatedEvent(EventModel[User]):
279287
DirectoryUserAddedToGroupEvent,
280288
DirectoryUserRemovedFromGroupEvent,
281289
EmailVerificationCreatedEvent,
290+
InvitationAcceptedEvent,
282291
InvitationCreatedEvent,
292+
InvitationRevokedEvent,
283293
MagicAuthCreatedEvent,
284294
OrganizationCreatedEvent,
285295
OrganizationDeletedEvent,

workos/types/events/event_type.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@
2929
"dsync.group.user_added",
3030
"dsync.group.user_removed",
3131
"email_verification.created",
32+
"invitation.accepted",
3233
"invitation.created",
34+
"invitation.revoked",
3335
"magic_auth.created",
3436
"organization.created",
3537
"organization.deleted",

workos/types/webhooks/webhook.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,18 @@ class EmailVerificationCreatedWebhook(WebhookModel[EmailVerificationCommon]):
167167
event: Literal["email_verification.created"]
168168

169169

170+
class InvitationAcceptedWebhook(WebhookModel[InvitationCommon]):
171+
event: Literal["invitation.accepted"]
172+
173+
170174
class InvitationCreatedWebhook(WebhookModel[InvitationCommon]):
171175
event: Literal["invitation.created"]
172176

173177

178+
class InvitationRevokedWebhook(WebhookModel[InvitationCommon]):
179+
event: Literal["invitation.revoked"]
180+
181+
174182
class MagicAuthCreatedWebhook(WebhookModel[MagicAuthCommon]):
175183
event: Literal["magic_auth.created"]
176184

@@ -271,7 +279,9 @@ class UserUpdatedWebhook(WebhookModel[User]):
271279
DirectoryUserAddedToGroupWebhook,
272280
DirectoryUserRemovedFromGroupWebhook,
273281
EmailVerificationCreatedWebhook,
282+
InvitationAcceptedWebhook,
274283
InvitationCreatedWebhook,
284+
InvitationRevokedWebhook,
275285
MagicAuthCreatedWebhook,
276286
OrganizationCreatedWebhook,
277287
OrganizationDeletedWebhook,

0 commit comments

Comments
 (0)