Skip to content

Conversation

@kevinmitch14
Copy link
Contributor

Description

  • Introduced InvitationResentEvent and InvitationResentEventResponse interfaces to handle the 'invitation.resent' event.
  • Updated the Event and EventResponse types to include the new event interfaces.
  • Modified the deserializeEvent function to support the new event type.

Documentation

Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.

[ ] Yes

If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.

- Introduced `InvitationResentEvent` and `InvitationResentEventResponse` interfaces to handle the 'invitation.resent' event.
- Updated the `Event` and `EventResponse` types to include the new event interfaces.
- Modified the `deserializeEvent` function to support the new event type.
@kevinmitch14 kevinmitch14 requested a review from a team as a code owner January 2, 2026 21:18
@kevinmitch14 kevinmitch14 requested a review from gcarvelli January 2, 2026 21:18
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 2, 2026

Greptile Summary

  • Added InvitationResentEvent and InvitationResentEventResponse interfaces to handle the 'invitation.resent' event type from the WorkOS API
  • Updated union types Event and EventResponse to include the new interfaces, ensuring type safety for event processing
  • Modified deserializeEvent function to support the new event type by adding it to the invitation events switch case

Important Files Changed

Filename Overview
src/common/interfaces/event.interface.ts Added two new interfaces for invitation.resent event and integrated them into existing Event/EventResponse union types
src/common/serializers/event.serializer.ts Added 'invitation.resent' case to deserializeEvent switch statement to handle the new event type

Confidence score: 5/5

  • This PR is extremely safe to merge with minimal risk
  • Score reflects simple, well-structured changes that follow existing patterns perfectly and maintain type safety
  • No files require special attention as the changes are straightforward and follow established conventions

Sequence Diagram

sequenceDiagram
    participant WorkOS API
    participant "Event Deserializer" as Deserializer
    participant "Event Handler" as Handler
    
    WorkOS API->>Deserializer: "POST webhook with invitation.resent event"
    Deserializer->>Deserializer: "Parse EventResponse"
    Deserializer->>Deserializer: "Call deserializeInvitationEvent(event.data)"
    Deserializer->>Handler: "Return InvitationResentEvent"
    Handler->>Handler: "Process invitation resent event"
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

Copy link
Contributor

@cmatheson cmatheson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kevinmitch14

@cmatheson cmatheson merged commit 4149430 into workos:main Jan 2, 2026
6 of 7 checks passed
@stanleyphu stanleyphu mentioned this pull request Jan 6, 2026
stanleyphu added a commit that referenced this pull request Jan 7, 2026
## Description

Includes:
- #1434 
- #1433
@greptile-apps greptile-apps bot mentioned this pull request Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants