Skip to content

Conversation

@antn
Copy link
Member

@antn antn commented Nov 18, 2025

Toward AUTH-5511.

Description

This adds support for the new resend invitation endpoint.

It can be used like this:

WorkOS::UserManagement.resend_invitation(id: 'invitation_01H5JQDV7R7ATEYZDEG0W5PRYS')

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
@linear
Copy link

linear bot commented Nov 18, 2025

@antn antn requested a review from a team November 18, 2025 07:41
@greptile-apps
Copy link

greptile-apps bot commented Nov 18, 2025

Greptile Summary

  • Added resend_invitation method to UserManagement module for resending existing invitations via POST to /user_management/invitations/{id}/resend
  • Comprehensive test coverage with VCR cassettes for valid case and all error scenarios (invalid ID, expired, revoked, accepted invitations)

Confidence Score: 5/5

  • This PR is safe to merge with no concerns.
  • Implementation follows established patterns exactly, has comprehensive test coverage for all edge cases, and introduces no security issues or breaking changes.
  • No files require special attention.

Important Files Changed

Filename Overview
lib/workos/user_management.rb Added resend_invitation method following existing patterns for invitation management
spec/lib/workos/user_management_spec.rb Comprehensive test coverage for resend_invitation including all edge cases (invalid, expired, revoked, accepted)

Sequence Diagram

sequenceDiagram
    participant User
    participant WorkOS SDK
    participant API as "WorkOS API"
    
    User->>WorkOS SDK: "resend_invitation(id: 'invitation_01H5J...')"
    WorkOS SDK->>API: "POST /user_management/invitations/{id}/resend"
    API-->>WorkOS SDK: "200 OK with Invitation object"
    WorkOS SDK-->>User: "Return Invitation instance"
Loading

Copy link

@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.

7 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 1931e3f into main Nov 19, 2025
2 checks passed
@antn antn deleted the resend-invitation branch November 19, 2025 00:51
@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.

3 participants