Skip to content

Conversation

@antn
Copy link
Member

@antn antn commented Nov 18, 2025

Toward AUTH-5514.

Description

This adds support for the new resend invitation endpoint.

It can be used like this:

$invitation = $userManagement->resendInvitation(
    "invitation_01E4ZCR3C56J083X43JQXF3JK5"
);

Documentation

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

[x] Yes

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

https://github.com/workos/workos/pull/47145

@antn antn self-assigned this Nov 18, 2025
@antn antn requested a review from a team as a code owner November 18, 2025 09:05
@antn antn requested a review from mattgd November 18, 2025 09:05
@linear
Copy link

linear bot commented Nov 18, 2025

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Nov 18, 2025

Greptile Summary

  • Adds resendInvitation method to UserManagement class for resending invitations via POST endpoint
  • Includes comprehensive test coverage for success and error scenarios (404, expired, revoked, accepted states)

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • Implementation follows established patterns, includes comprehensive test coverage, and introduces no security concerns
  • No files require special attention

Sequence Diagram

sequenceDiagram
    participant User
    participant UserManagement
    participant Client
    participant API as "WorkOS API"
    
    User->>UserManagement: "resendInvitation(invitationId)"
    UserManagement->>Client: "request(POST, /user_management/invitations/{id}/resend)"
    Client->>API: "POST /user_management/invitations/{id}/resend"
    API-->>Client: "Invitation response"
    Client-->>UserManagement: "Response data"
    UserManagement->>UserManagement: "constructFromResponse()"
    UserManagement-->>User: "Invitation object"
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
React with 👍 or 👎 to share your feedback on this new summary format

@antn antn merged commit b4a437b into main Nov 19, 2025
5 checks passed
@antn antn deleted the resend-invites branch November 19, 2025 19:38
@antn antn mentioned this pull request Nov 20, 2025
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.

4 participants