Skip to content

feat(generated): Changes to directory_sync, sso, webhooks, and 1 more service - #586

Open
workos-sdk-automation[bot] wants to merge 5 commits into
mainfrom
oagen/batch-880b6f9a
Open

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

Conversation

@workos-sdk-automation

@workos-sdk-automation workos-sdk-automation Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

feat(directory_sync)!: Change directory sync API surface

  • SDK surface change: Symbol "DirectorySync.get_directory_group" was removed.
  • SDK surface change: Symbol "DirectorySync.get_directory_user" was removed.
  • SDK surface change: Symbol "DirectorySync.list_directory_groups" was removed.
  • SDK surface change: Symbol "DirectorySync.list_directory_users" was removed.

feat(sso): Add SSO API surface

  • Added model ConnectionSAMLCertificateReplaced.
  • Added model ConnectionSAMLCertificateReplacedData.
  • Added model ConnectionSAMLCertificateReplacedDataConnection.
  • Added model ConnectionSAMLCertificateReplacedDataCertificate.
  • Added enum ConnectionSAMLCertificateReplacedDataCertificateCertificateType.

feat(webhooks): Add webhook API surface

  • Added connection.saml_certificate_replaced to CreateWebhookEndpointEvents.
  • Added connection.saml_certificate_replaced to UpdateWebhookEndpointEvents.

fix(events): Updated model EventSchema

  • Updated model EventSchema.

Triggered by workos/openapi-spec@ddc0648

BEGIN_COMMIT_OVERRIDE
feat(directory_sync): Change directory sync API surface (#586)
feat(sso): Add SSO API surface (#586)
feat(webhooks): Add webhook API surface (#586)
fix(events): Updated model EventSchema (#586)
END_COMMIT_OVERRIDE

…iKeys, AuditLogs, Authorization, ClientApi, Connect, DirectorySync, Events, FeatureFlags, Groups, MultiFactorAuth, OrganizationDomains, OrganizationMembership, Organizations, OrganizationsIssuerTrusts, Pipes, PipesProvider, PlatformTeams, Radar, SSO, UserManagement, Vault, Webhooks, Widgets
@workos-sdk-automation
workos-sdk-automation Bot requested a review from a team as a code owner November 24, 2026 18:46
@workos-sdk-automation workos-sdk-automation Bot added the autogenerated Autogenerated code or content label Nov 24, 2026
@gjtorikian gjtorikian changed the title feat(generated)!: Changes to directory_sync, sso, webhooks, and 1 more service feat(generated): Changes to directory_sync, sso, webhooks, and 1 more service Nov 24, 2026
@greptile-apps

greptile-apps Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 2/5

[High impact] The update reaches several identity, access, webhook, and risk-detection workflows.

Fix the permission request regression and lost Radar details before merging.

Findings

  1. P1 String permissions now raise ▶
  2. P1 Radar evidence loses details ▶
  3. P1 Match details become empty ▶
  4. P2 New webhook data stays untyped ▶
Fix with agent prompt
### Issue 1
lib/workos/agents/agent_blueprints_create_request.rb:28
Constructing `AgentBlueprintsCreateRequest` with `permissions: ["posts:read"]` now raises `JSON::ParserError`. Every entry goes through `AgentBlueprintsCreateRequestPermission.new`, which treats the slug as JSON. `AgentBlueprintsUpdateRequest` has the same regression, so existing callers cannot build these request models. Keep strings unchanged, wrap only permission hashes, and test a non-empty mixed array.

### Issue 2
lib/workos/radar/radar_detection.rb:52
`RadarDetection` always builds `RadarDetectionEvidence`, which keeps only `summary` and `allowed_by`. For the control-specific evidence shapes added here, this discards `control` and `details`, including bot signals and previous-attempt information. Callers cannot read or save the full reasons for a verdict. Select the matching evidence model or preserve these fields as a hash, and test a populated response through `get_detection`.

### Issue 3
lib/workos/shared/radar_detection_repeat_sign_up_details.rb:6
`RadarDetectionRepeatSignUpDetails` aliases `CreateApplicationSecret`, an empty model that discards its input. `RadarDetectionRestrictionDetails` does the same. Building `RepeatSignUp` with populated email-match details, or `RadarDetectionEvidenceRestriction` with list-match details, therefore produces `details.to_h == {}`. These fields are lost even when callers build the correct outer model directly. Use the matching detail types instead of an empty model.

### Issue 4
lib/workos/sso/connection_saml_certificate_replaced.rb:29
The new `connection.saml_certificate_replaced` event has a data model, but `WebhookEvent::EVENT_DATA_MODELS` does not register it. `construct_event` therefore returns a raw hash, unlike the two existing certificate events. Callers must rebuild the data themselves to use the new model. Register it and add a wrapper test. The new issuer-trust and token-exchange events have the same gap.

---

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

Summary

This PR expands several generated services and renames four Directory Sync methods.

  • Applications can manage issuer trusts for an organization.
  • Radar callers can look up a detection and read its evidence.
  • Applications can add and remove membership role assignments in one call.
  • Agent blueprints expose permissions scoped to instance types.
  • Directory Sync methods use names that put the directory first.
  • Webhook subscriptions can include more certificate and token events.
  • Callers can fetch webhook endpoints and delete CORS origins.

The Directory Sync method removals are intentional: workos-sdk-automation[bot] identifies them as breaking surface changes in the PR description.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Get Radar detection] --> B[RadarDetection]
  B --> C[RadarDetectionEvidence]
  C --> D[Summary and allowed_by kept]
  C --> E[Control and details discarded]
Loading

Reviews (1) · Last reviewed commit: "chore(generated): add release notes frag..." · Reviewed by Greptile

@name = hash[:name]
@description = hash[:description]
@permissions = hash[:permissions] || []
@permissions = (hash[:permissions] || []).map { |item| item ? WorkOS::AgentBlueprintsCreateRequestPermission.new(item) : nil }

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 String permissions now raise

Constructing AgentBlueprintsCreateRequest with permissions: ["posts:read"] now raises JSON::ParserError. Every entry goes through AgentBlueprintsCreateRequestPermission.new, which treats the slug as JSON. AgentBlueprintsUpdateRequest has the same regression, so existing callers cannot build these request models. Keep strings unchanged, wrap only permission hashes, and test a non-empty mixed array.

Prompt To Fix With AI
This is a comment left during a code review.
Path: lib/workos/agents/agent_blueprints_create_request.rb
Line: 28

Comment:
**String permissions now raise**

Constructing `AgentBlueprintsCreateRequest` with `permissions: ["posts:read"]` now raises `JSON::ParserError`. Every entry goes through `AgentBlueprintsCreateRequestPermission.new`, which treats the slug as JSON. `AgentBlueprintsUpdateRequest` has the same regression, so existing callers cannot build these request models. Keep strings unchanged, wrap only permission hashes, and test a non-empty mixed array.

---

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

@control = hash[:control]
@verdict = hash[:verdict]
@challenge_type = hash[:challenge_type]
@evidence = hash[:evidence] ? WorkOS::RadarDetectionEvidence.new(hash[:evidence]) : nil

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 Radar evidence loses details

RadarDetection always builds RadarDetectionEvidence, which keeps only summary and allowed_by. For the control-specific evidence shapes added here, this discards control and details, including bot signals and previous-attempt information. Callers cannot read or save the full reasons for a verdict. Select the matching evidence model or preserve these fields as a hash, and test a populated response through get_detection.

Prompt To Fix With AI
This is a comment left during a code review.
Path: lib/workos/radar/radar_detection.rb
Line: 52

Comment:
**Radar evidence loses details**

`RadarDetection` always builds `RadarDetectionEvidence`, which keeps only `summary` and `allowed_by`. For the control-specific evidence shapes added here, this discards `control` and `details`, including bot signals and previous-attempt information. Callers cannot read or save the full reasons for a verdict. Select the matching evidence model or preserve these fields as a hash, and test a populated response through `get_detection`.

---

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

# This file is auto-generated by oagen. Do not edit.

module WorkOS
RadarDetectionRepeatSignUpDetails = CreateApplicationSecret

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 Match details become empty

RadarDetectionRepeatSignUpDetails aliases CreateApplicationSecret, an empty model that discards its input. RadarDetectionRestrictionDetails does the same. Building RepeatSignUp with populated email-match details, or RadarDetectionEvidenceRestriction with list-match details, therefore produces details.to_h == {}. These fields are lost even when callers build the correct outer model directly. Use the matching detail types instead of an empty model.

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

Comment:
**Match details become empty**

`RadarDetectionRepeatSignUpDetails` aliases `CreateApplicationSecret`, an empty model that discards its input. `RadarDetectionRestrictionDetails` does the same. Building `RepeatSignUp` with populated email-match details, or `RadarDetectionEvidenceRestriction` with list-match details, therefore produces `details.to_h == {}`. These fields are lost even when callers build the correct outer model directly. Use the matching detail types instead of an empty model.

---

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

@object = hash[:object]
@id = hash[:id]
@event = hash[:event]
@data = hash[:data] ? WorkOS::ConnectionSAMLCertificateReplacedData.new(hash[:data]) : nil

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.

P2 New webhook data stays untyped

The new connection.saml_certificate_replaced event has a data model, but WebhookEvent::EVENT_DATA_MODELS does not register it. construct_event therefore returns a raw hash, unlike the two existing certificate events. Callers must rebuild the data themselves to use the new model. Register it and add a wrapper test. The new issuer-trust and token-exchange events have the same gap.

Knowledge Base Used: Events and risk management

Prompt To Fix With AI
This is a comment left during a code review.
Path: lib/workos/sso/connection_saml_certificate_replaced.rb
Line: 29

Comment:
**New webhook data stays untyped**

The new `connection.saml_certificate_replaced` event has a data model, but `WebhookEvent::EVENT_DATA_MODELS` does not register it. `construct_event` therefore returns a raw hash, unlike the two existing certificate events. Callers must rebuild the data themselves to use the new model. Register it and add a wrapper test. The new issuer-trust and token-exchange events have the same gap.

**Knowledge Base Used:** [Events and risk management](https://app.greptile.com/-/switch-tenant?tenant=workos&next=%2Fcustom-context%2Fknowledge-base%2Fworkos%2Fworkos-ruby%2F-%2Fdocs%2Fevents-and-risk.md)

---

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

This branch has not been deployed

No deployments
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