Skip to content

feat(generated): Add user management operations and models (+1 more)#511

Closed
workos-sdk-automation[bot] wants to merge 4 commits into
mainfrom
oagen/batch-3e7992ec
Closed

feat(generated): Add user management operations and models (+1 more)#511
workos-sdk-automation[bot] wants to merge 4 commits into
mainfrom
oagen/batch-3e7992ec

Conversation

@workos-sdk-automation

@workos-sdk-automation workos-sdk-automation Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

feat(user_management): Add user management operations and models

  • Added model SendRadarSmsChallenge.
  • Added model SendRadarSmsChallengeResponse.
  • Added model UrnWorkosOAuthGrantTypeRadarEmailChallengeCodeSessionAuthenticateRequest.
  • Added model UrnWorkosOAuthGrantTypeRadarSmsChallengeCodeSessionAuthenticateRequest.
  • Added model MagicAuthSendMagicAuthCodeAndReturnResponse.
  • Added model UserCreateResponse.
  • Added ip_address to CreateMagicCodeAndReturn.
  • Added user_agent to CreateMagicCodeAndReturn.
  • Added radar_auth_attempt_id to CreateMagicCodeAndReturn.
  • Added signals_id to CreateMagicCodeAndReturn.
  • Added ip_address to CreateUser.
  • Added user_agent to CreateUser.
  • Added signals_id to CreateUser.
  • Added signals_id to AuthorizationCodeSessionAuthenticateRequest.
  • Added signals_id to PasswordSessionAuthenticateRequest.
  • Added radar_auth_attempt_id to PasswordSessionAuthenticateRequest.
  • Added radar_auth_attempt_id to UrnWorkosOAuthGrantTypeMagicAuthCodeSessionAuthenticateRequest.
  • Added endpoint POST /user_management/radar_challenges.

fix(user_management): Update user management API surface

  • Changed request body for UserManagementAuthentication.authenticate.
  • Changed response of UserManagementUsers.create from User to UserCreateResponse.
  • Changed response of UserManagementMagicAuth.sendMagicAuthCodeAndReturn from MagicAuth to MagicAuthSendMagicAuthCodeAndReturnResponse.

Triggered by workos/openapi-spec@e350eb0

BEGIN_COMMIT_OVERRIDE
feat(user_management): Add user management operations and models (#511)
fix(user_management): Update user management API surface (#511)
END_COMMIT_OVERRIDE

@workos-sdk-automation workos-sdk-automation Bot requested a review from a team as a code owner July 2, 2026 14:11
@workos-sdk-automation workos-sdk-automation Bot added the autogenerated Autogenerated code or content label Jul 2, 2026
@workos-sdk-automation workos-sdk-automation Bot requested a review from a team as a code owner July 2, 2026 14:11
@workos-sdk-automation workos-sdk-automation Bot requested a review from tribble July 2, 2026 14:11
@workos-sdk-automation workos-sdk-automation Bot added the autogenerated Autogenerated code or content label Jul 2, 2026
@greptile-apps

greptile-apps Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR regenerates the Ruby SDK for new Radar and User Management API support. The main changes are:

  • Added Radar signals_id support for standalone assessment requests.
  • Added Radar SMS challenge request and response models.
  • Added Radar email and SMS challenge authentication request models.
  • Updated User Management create and magic-auth response types.
  • Added RBI and generated test coverage for the new models and endpoint.

Confidence Score: 4/5

The generated model and endpoint additions are mostly low-risk, with one helper API gap that can block callers from using the new Radar correlation fields through the intended convenience methods.

The changes are largely generated, scoped to SDK request/response surfaces, and include model round-trip coverage, but the helper methods should be aligned with the expanded authenticate payload before merging.

lib/workos/user_management.rb

T-Rex T-Rex Logs

What T-Rex did

  • Baseline state verified: the base lacked create_radar_challenge, Radar keywords on create_authenticate, create_user, and create_magic_auth are rejected, and the new Radar SMS challenge, response flow, and related constants are not present in the base models.
  • A stubbed HTTP 200 OK response was observed for POST /user_management/radar_challenges with user_id, pending_authentication_token, phone_number, ip_address, and user_agent, and a parsed verification_id of verif_123.
  • The authenticate flow now serializes signals_id, radar_auth_attempt_id, radar_challenge_id, verification_id, and phone_number for the generic method.
  • The create_user flow serializes ip_address, user_agent, and signals_id, returning WorkOS::MagicAuthSendMagicAuthCodeAndReturnResponse via UserCreateResponse with radar_auth_attempt_id=raa_user_123.
  • The create_magic_auth flow serializes ip_address, user_agent, radar_auth_attempt_id, and signals_id, returning WorkOS::MagicAuthSendMagicAuthCodeAndReturnResponse with radar_auth_attempt_id=raa_magic_123.
  • All requested model constants instantiate and their claimed attributes are round-tripped through runtime to_h/accessor checks.
  • Baseline Radar#create_attempt behavior shows an ArgumentError for unknown keyword: :sign als_id, and RadarStandaloneAssessRequest does not respond to signals_id.
  • The after-state for Radar#create_attempt shows HTTP_STATUS_CODE=201 Created, a POST to /radar/attempts, a body containing signals_id, BODY_HAS_NIL_VALUES=false, and a returned WorkOS::RadarStandaloneResponse with MODEL_SIGNALS_ID="signals_abc123".

View all artifacts

T-Rex Ran code and verified through T-Rex

Comments Outside Diff (1)

  1. lib/workos/user_management.rb, line 138-145 (link)

    P2 Expose Radar parameters
    create_authenticate now accepts signals_id and radar_auth_attempt_id, but the convenience authentication helpers still drop those values. Callers using authenticate_with_password or authenticate_with_magic_auth cannot correlate Radar attempts through the helper API even though the underlying authenticate endpoint supports it, so they must bypass these methods to use the new flow.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: lib/workos/user_management.rb
    Line: 138-145
    
    Comment:
    **Expose Radar parameters**
    `create_authenticate` now accepts `signals_id` and `radar_auth_attempt_id`, but the convenience authentication helpers still drop those values. Callers using `authenticate_with_password` or `authenticate_with_magic_auth` cannot correlate Radar attempts through the helper API even though the underlying authenticate endpoint supports it, so they must bypass these methods to use the new flow.
    
    How can I resolve this? If you propose a fix, please make it concise.

    Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
lib/workos/user_management.rb:138-145
**Expose Radar parameters**
`create_authenticate` now accepts `signals_id` and `radar_auth_attempt_id`, but the convenience authentication helpers still drop those values. Callers using `authenticate_with_password` or `authenticate_with_magic_auth` cannot correlate Radar attempts through the helper API even though the underlying authenticate endpoint supports it, so they must bypass these methods to use the new flow.

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

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.

0 participants