Skip to content

feat(generated)!: Changes to user_management - #545

Closed
workos-sdk-automation[bot] wants to merge 5 commits into
mainfrom
oagen/batch-0c83d704
Closed

workos-sdk-automation[bot] wants to merge 5 commits into
mainfrom
oagen/batch-0c83d704

Conversation

@workos-sdk-automation

@workos-sdk-automation workos-sdk-automation Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

feat(user_management)!: SDK surface change: Symbol "CreatePasswordResetToken" was removed

  • SDK surface change: Symbol "CreatePasswordResetToken" was removed.

feat(user_management): Add model EmailCompletionSessionAuthenticateRequest

  • Added model EmailCompletionSessionAuthenticateRequest.

fix(user_management): Update user management API surface

  • Changed request body for UserManagementAuthentication.authenticate.
  • Changed errors for endpoint POST /user_management/authenticate.

Triggered by workos/openapi-spec@6676276

BEGIN_COMMIT_OVERRIDE
feat(user_management)!: SDK surface change: Symbol "CreatePasswordResetToken" was removed (#545)
feat(user_management): Add model EmailCompletionSessionAuthenticateRequest (#545)
fix(user_management): Update user management API surface (#545)
END_COMMIT_OVERRIDE

@workos-sdk-automation workos-sdk-automation Bot added the autogenerated Autogenerated code or content label Sep 1, 2026
@workos-sdk-automation
workos-sdk-automation Bot requested review from a team as code owners September 1, 2026 16:10
@workos-sdk-automation workos-sdk-automation Bot added the autogenerated Autogenerated code or content label Sep 1, 2026
@greptile-apps

greptile-apps Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR regenerates User Management to add email-completion authentication support and a waitlist API surface while removing several generated symbols and enum values.

  • Adds waitlist models, enums, CRUD/state-transition methods, pagination support, RBIs, and tests.
  • Adds email_completion_token to authentication and introduces its request model.
  • Updates generated aliases, provider enums, manifests, and changelog metadata.

Confidence Score: 1/5

The PR is not safe to merge until the undefined generated aliases and incorrect User Management RBI declarations are corrected.

Two public constants now fail during autoload because their alias targets do not exist, while typed consumers cannot correctly call the new email-completion flow or use the paginated waitlist return values.

Files Needing Attention: lib/workos/user_management/create_password_reset_token.rb, lib/workos/types/user_sessions_status.rb, rbi/workos/user_management.rbi

Important Files Changed

Filename Overview
lib/workos/user_management.rb Adds email-completion authentication input and waitlist endpoints; the runtime methods consistently use shared request, model, and pagination infrastructure.
lib/workos/user_management/create_password_reset_token.rb Replaces the existing model with an alias to an undefined constant, breaking retained callers and tests.
lib/workos/types/user_sessions_status.rb Redirects the public status alias to an undefined enum constant.
rbi/workos/user_management.rbi Omits the new authentication keyword and declares paginated waitlist results as arrays rather than ListStruct values.
lib/workos/user_management/email_completion_session_authenticate_request.rb Adds the generated request model with fields aligned to the new email-completion authentication payload.
lib/workos/user_management/waitlist_entry.rb Adds the waitlist-entry response model with expected state, metadata, and timestamp fields.

Sequence Diagram

sequenceDiagram
  participant App
  participant UM as User Management SDK
  participant API as WorkOS API
  App->>UM: create_authenticate(email_completion_token, email)
  UM->>API: POST /user_management/authenticate
  API-->>UM: AuthenticateResponse
  UM-->>App: Typed authentication result
  App->>UM: list/create/update waitlist entries
  UM->>API: "/user_management/waitlists/*"
  API-->>UM: Waitlist or paginated WaitlistEntry data
  UM-->>App: Typed model or ListStruct
Loading

Comments Outside Diff (1)

  1. rbi/workos/user_management.rbi, line 52-67 (link)

    P1 Authentication keyword missing from RBI

    When typed applications call create_authenticate with the newly supported email_completion_token, the runtime accepts and forwards it but this signature rejects it as an unrecognized keyword, preventing Sorbet users from using the email-completion flow.

    Knowledge Base Used: User management and sessions

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: rbi/workos/user_management.rbi
    Line: 52-67
    
    Comment:
    **Authentication keyword missing from RBI**
    
    When typed applications call `create_authenticate` with the newly supported `email_completion_token`, the runtime accepts and forwards it but this signature rejects it as an unrecognized keyword, preventing Sorbet users from using the email-completion flow.
    
    **Knowledge Base Used:** [User management and sessions](https://app.greptile.com/workos/-/custom-context/knowledge-base/workos/workos-ruby/-/docs/user-management-and-sessions.md)
    
    ---
    
    For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Prompt To Fix All With AI
### Issue 1
lib/workos/user_management/create_password_reset_token.rb:6
**Password reset alias is undefined**

When `WorkOS::CreatePasswordResetToken` is loaded or instantiated, this alias resolves `CreateItContact`, which has no runtime definition, causing a `NameError` in the retained round-trip test and downstream callers.

### Issue 2
lib/workos/types/user_sessions_status.rb:7
**Session status alias is undefined**

When an application references `WorkOS::Types::UserSessionsStatus`, this alias resolves `AgentInstanceSessionStatus`, which has no runtime definition, causing a `NameError` instead of exposing the session-status constants.

### Issue 3
rbi/workos/user_management.rbi:52-67
**Authentication keyword missing from RBI**

When typed applications call `create_authenticate` with the newly supported `email_completion_token`, the runtime accepts and forwards it but this signature rejects it as an unrecognized keyword, preventing Sorbet users from using the email-completion flow.

### Issue 4
rbi/workos/user_management.rbi:490-517
**Waitlist pagination types are incorrect**

The runtime returns `WorkOS::Types::ListStruct` from both waitlist list methods, but these signatures declare arrays. Sorbet therefore rejects valid pagination methods such as `next_page` and permits Array-only operations that the returned object does not implement.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "chore(generated): add release notes frag..." | Re-trigger Greptile

@email = hash[:email]
end
end
CreatePasswordResetToken = CreateItContact

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Password reset alias is undefined

When WorkOS::CreatePasswordResetToken is loaded or instantiated, this alias resolves CreateItContact, which has no runtime definition, causing a NameError in the retained round-trip test and downstream callers.

Knowledge Base Used:

Prompt To Fix With AI
This is a comment left during a code review.
Path: lib/workos/user_management/create_password_reset_token.rb
Line: 6

Comment:
**Password reset alias is undefined**

When `WorkOS::CreatePasswordResetToken` is loaded or instantiated, this alias resolves `CreateItContact`, which has no runtime definition, causing a `NameError` in the retained round-trip test and downstream callers.

**Knowledge Base Used:**
- [Shared models and utilities](https://app.greptile.com/workos/-/custom-context/knowledge-base/workos/workos-ruby/-/docs/shared-models-and-utilities.md)
- [User management and sessions](https://app.greptile.com/workos/-/custom-context/knowledge-base/workos/workos-ruby/-/docs/user-management-and-sessions.md)

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

module WorkOS
module Types
UserSessionsStatus = SessionCreatedDataStatus
UserSessionsStatus = AgentInstanceSessionStatus

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Session status alias is undefined

When an application references WorkOS::Types::UserSessionsStatus, this alias resolves AgentInstanceSessionStatus, which has no runtime definition, causing a NameError instead of exposing the session-status constants.

Knowledge Base Used:

Prompt To Fix With AI
This is a comment left during a code review.
Path: lib/workos/types/user_sessions_status.rb
Line: 7

Comment:
**Session status alias is undefined**

When an application references `WorkOS::Types::UserSessionsStatus`, this alias resolves `AgentInstanceSessionStatus`, which has no runtime definition, causing a `NameError` instead of exposing the session-status constants.

**Knowledge Base Used:**
- [Shared models and utilities](https://app.greptile.com/workos/-/custom-context/knowledge-base/workos/workos-ruby/-/docs/shared-models-and-utilities.md)
- [User management and sessions](https://app.greptile.com/workos/-/custom-context/knowledge-base/workos/workos-ruby/-/docs/user-management-and-sessions.md)

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Comment on lines +490 to +517
sig do
params(
request_options: T::Hash[Symbol, T.untyped]
).returns(T::Array[WorkOS::Waitlist])
end
def list_waitlists(request_options:); end

sig do
params(
id: String,
request_options: T::Hash[Symbol, T.untyped]
).returns(WorkOS::Waitlist)
end
def get_waitlist(id:, request_options:); end

sig do
params(
id: String,
before: T.nilable(String),
after: T.nilable(String),
limit: T.nilable(Integer),
order: T.nilable(String),
state: T.nilable(String),
email: T.nilable(String),
request_options: T::Hash[Symbol, T.untyped]
).returns(T::Array[WorkOS::WaitlistEntry])
end
def list_waitlist_entries(id:, before:, after:, limit:, order:, state:, email:, request_options:); end

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Waitlist pagination types are incorrect

The runtime returns WorkOS::Types::ListStruct from both waitlist list methods, but these signatures declare arrays. Sorbet therefore rejects valid pagination methods such as next_page and permits Array-only operations that the returned object does not implement.

Knowledge Base Used: Shared models and utilities

Prompt To Fix With AI
This is a comment left during a code review.
Path: rbi/workos/user_management.rbi
Line: 490-517

Comment:
**Waitlist pagination types are incorrect**

The runtime returns `WorkOS::Types::ListStruct` from both waitlist list methods, but these signatures declare arrays. Sorbet therefore rejects valid pagination methods such as `next_page` and permits Array-only operations that the returned object does not implement.

**Knowledge Base Used:** [Shared models and utilities](https://app.greptile.com/workos/-/custom-context/knowledge-base/workos/workos-ruby/-/docs/shared-models-and-utilities.md)

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

@gjtorikian gjtorikian closed this Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autogenerated Autogenerated code or content

Development

Successfully merging this pull request may close these issues.

1 participant