Skip to content

feat(generated): AdminPortal, Authorization, Webhooks, UserManagement, AuditLogs (batch 08085e9d)#510

Merged
workos-sdk-automation[bot] merged 2 commits into
mainfrom
oagen/batch-08085e9d
Jul 1, 2026
Merged

feat(generated): AdminPortal, Authorization, Webhooks, UserManagement, AuditLogs (batch 08085e9d)#510
workos-sdk-automation[bot] merged 2 commits into
mainfrom
oagen/batch-08085e9d

Conversation

@workos-sdk-automation

Copy link
Copy Markdown
Contributor

Summary

Regenerated SDK from spec changes.

Triggered by workos/openapi-spec@704603f

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

greptile-apps Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR regenerates the Ruby SDK from the updated OpenAPI spec. The main changes are:

  • Added role assignment source models and RBI definitions.
  • Added new audit log export and webhook event enum values.
  • Added User Management list APIs for CORS origins and redirect URIs.
  • Added generated model round-trip tests across SDK areas.

Confidence Score: 4/5

Safe to merge after fixing the typed interface mismatch for the new list APIs.

Runtime SDK changes follow existing generated patterns, but one new RBI contract is incorrect for Sorbet users.

rbi/workos/user_management.rbi

T-Rex T-Rex Logs

What T-Rex did

  • I created a Ruby repro script trex-artifacts/repro_list_return_types.rb that stubs the UserManagement list endpoints and checks runtime return classes against RBI declarations.
  • I captured baseline and post-change outputs for the user-management-list-apis flow. Before the change, the base runtime showed list_cors_origins and list_redirect_uris as unsupported. After the change, the head runtime showed first-page GETs with HTTP 200 and next-page cursors.
  • I inspected pre- and post-change constants and accessors related to intent_options, GenerateLink, UserRoleAssignment#source, AuditLogExportState, and webhook events; noted the changes in which intent_options became unknown, and that webhook constants now exist and reflect the strings.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
lib/workos/admin_portal.rb Removes intent_options from the generated Admin Portal link request signature and body.
lib/workos/authorization/user_role_assignment.rb Adds nested source parsing to user role assignments.
lib/workos/user_management.rb Adds list methods for CORS origins and redirect URIs returning ListStruct.
rbi/workos/user_management.rbi Adds RBIs for new list methods, but both return types incorrectly declare arrays instead of ListStruct.
test/workos/test_user_management.rb Adds endpoint tests for listing CORS origins and redirect URIs.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant App as SDK consumer
participant UM as WorkOS::UserManagement
participant API as WorkOS API
participant LS as WorkOS::Types::ListStruct

App->>UM: list_cors_origins / list_redirect_uris
UM->>API: "GET /user_management/{cors_origins|redirect_uris}"
API-->>UM: data + list_metadata
UM->>LS: from_response(response, model, filters, fetch_next)
LS-->>App: paginated ListStruct
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant App as SDK consumer
participant UM as WorkOS::UserManagement
participant API as WorkOS API
participant LS as WorkOS::Types::ListStruct

App->>UM: list_cors_origins / list_redirect_uris
UM->>API: "GET /user_management/{cors_origins|redirect_uris}"
API-->>UM: data + list_metadata
UM->>LS: from_response(response, model, filters, fetch_next)
LS-->>App: paginated ListStruct
Loading
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
rbi/workos/user_management.rbi:87-89
**Fix list return types**
The RBI declares `list_cors_origins` as returning `T::Array`, but the implementation returns `WorkOS::Types::ListStruct.from_response` and the generated test asserts `WorkOS::Types::ListStruct`. Sorbet users receive the wrong type for pagination metadata and `next` behavior; `list_redirect_uris` has the same mismatch at lines 363-365.

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

Comment on lines +87 to +89
).returns(T::Array[WorkOS::CORSOriginResponse])
end
def list_cors_origins(before:, after:, limit:, order:, 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 Fix list return types
The RBI declares list_cors_origins as returning T::Array, but the implementation returns WorkOS::Types::ListStruct.from_response and the generated test asserts WorkOS::Types::ListStruct. Sorbet users receive the wrong type for pagination metadata and next behavior; list_redirect_uris has the same mismatch at lines 363-365.

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

Comment:
**Fix list return types**
The RBI declares `list_cors_origins` as returning `T::Array`, but the implementation returns `WorkOS::Types::ListStruct.from_response` and the generated test asserts `WorkOS::Types::ListStruct`. Sorbet users receive the wrong type for pagination metadata and `next` behavior; `list_redirect_uris` has the same mismatch at lines 363-365.

How can I resolve this? If you propose a fix, please make it concise.

@workos-sdk-automation workos-sdk-automation Bot merged commit fa3558b into main Jul 1, 2026
7 checks passed
@workos-sdk-automation workos-sdk-automation Bot deleted the oagen/batch-08085e9d branch July 1, 2026 18:42
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