feat(generated): Changes to events and pipes - #533
Conversation
…thods" was removed
…iKeys, AuditLogs, Authorization, ClientApi, Connect, DirectorySync, Events, FeatureFlags, Groups, MultiFactorAuth, OrganizationDomains, OrganizationMembership, Organizations, Pipes, PipesProvider, Radar, SSO, UserManagement, Vault, Webhooks, Widgets
Greptile SummaryThis generated update expands Events, Pipes, Groups, User Management, SSO provider enums, and webhook models from the latest API specification.
Confidence Score: 4/5The PR should not merge until the new refreshed webhook is registered for typed parsing; the RBI constructor mismatch is also worth correcting. Subscribing to the newly introduced webhook currently yields raw Hash data despite the generated typed model, while Sorbet consumers also see an optional runtime constructor keyword as mandatory. Files Needing Attention: lib/workos/types/create_webhook_endpoint_events.rb, lib/workos/webhook_event.rb, rbi/workos/user_management.rbi Important Files Changed
Prompt To Fix All With AI### Issue 1
lib/workos/types/create_webhook_endpoint_events.rb:13
**Refreshed webhook remains untyped**
When an endpoint receives the newly supported `agent.registration.refreshed` event, `WebhookEvent#coerce_data` finds no corresponding entry in `EVENT_DATA_MODELS` and returns a raw `Hash`, causing consumers of `WorkOS::AgentRegistrationRefreshedData` accessors to fail or skip typed handling.
### Issue 2
rbi/workos/user_management.rbi:31-38
**Optional keyword declared mandatory**
The runtime constructor defaults `password_salt_position` to `nil`, but this RBI requires the keyword, so Sorbet rejects existing valid two-keyword `PasswordHashed.new` calls after an upgrade.
```suggestion
sig do
params(
password_hash: String,
password_hash_type: String,
password_salt_position: T.nilable(String)
).returns(WorkOS::UserManagement::PasswordHashed)
end
def self.new(password_hash:, password_hash_type:, password_salt_position: nil); end
```
---
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 |
| AGENT_REGISTRATION_CLAIM_COMPLETED = "agent.registration.claim.completed" | ||
| AGENT_REGISTRATION_CREDENTIAL_ISSUED = "agent.registration.credential.issued" | ||
| AGENT_REGISTRATION_DELETED = "agent.registration.deleted" | ||
| AGENT_REGISTRATION_REFRESHED = "agent.registration.refreshed" |
There was a problem hiding this comment.
Refreshed webhook remains untyped
When an endpoint receives the newly supported agent.registration.refreshed event, WebhookEvent#coerce_data finds no corresponding entry in EVENT_DATA_MODELS and returns a raw Hash, causing consumers of WorkOS::AgentRegistrationRefreshedData accessors to fail or skip typed handling.
Knowledge Base Used: Webhooks and Pipes
Prompt To Fix With AI
This is a comment left during a code review.
Path: lib/workos/types/create_webhook_endpoint_events.rb
Line: 13
Comment:
**Refreshed webhook remains untyped**
When an endpoint receives the newly supported `agent.registration.refreshed` event, `WebhookEvent#coerce_data` finds no corresponding entry in `EVENT_DATA_MODELS` and returns a raw `Hash`, causing consumers of `WorkOS::AgentRegistrationRefreshedData` accessors to fail or skip typed handling.
**Knowledge Base Used:** [Webhooks and Pipes](https://app.greptile.com/workos/-/custom-context/knowledge-base/workos/workos-ruby/-/docs/webhooks-pipes.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| sig do | ||
| params( | ||
| password_hash: String, | ||
| password_hash_type: String | ||
| password_hash_type: String, | ||
| password_salt_position: T.nilable(String) | ||
| ).returns(WorkOS::UserManagement::PasswordHashed) | ||
| end | ||
| def self.new(password_hash:, password_hash_type:); end | ||
| def self.new(password_hash:, password_hash_type:, password_salt_position:); end |
There was a problem hiding this comment.
Optional keyword declared mandatory
The runtime constructor defaults password_salt_position to nil, but this RBI requires the keyword, so Sorbet rejects existing valid two-keyword PasswordHashed.new calls after an upgrade.
| sig do | |
| params( | |
| password_hash: String, | |
| password_hash_type: String | |
| password_hash_type: String, | |
| password_salt_position: T.nilable(String) | |
| ).returns(WorkOS::UserManagement::PasswordHashed) | |
| end | |
| def self.new(password_hash:, password_hash_type:); end | |
| def self.new(password_hash:, password_hash_type:, password_salt_position:); end | |
| sig do | |
| params( | |
| password_hash: String, | |
| password_hash_type: String, | |
| password_salt_position: T.nilable(String) | |
| ).returns(WorkOS::UserManagement::PasswordHashed) | |
| end | |
| def self.new(password_hash:, password_hash_type:, password_salt_position: nil); end |
Knowledge Base Used: User Management, Authentication, and Sessions
Prompt To Fix With AI
This is a comment left during a code review.
Path: rbi/workos/user_management.rbi
Line: 31-38
Comment:
**Optional keyword declared mandatory**
The runtime constructor defaults `password_salt_position` to `nil`, but this RBI requires the keyword, so Sorbet rejects existing valid two-keyword `PasswordHashed.new` calls after an upgrade.
```suggestion
sig do
params(
password_hash: String,
password_hash_type: String,
password_salt_position: T.nilable(String)
).returns(WorkOS::UserManagement::PasswordHashed)
end
def self.new(password_hash:, password_hash_type:, password_salt_position: nil); end
```
**Knowledge Base Used:** [User Management, Authentication, and Sessions](https://app.greptile.com/workos/-/custom-context/knowledge-base/workos/workos-ruby/-/docs/user-management.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.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!
Summary
feat(events)!: Change required status for parameter
Events.list.eventsEvents.list.events.feat(pipes)!: SDK surface change: Symbol "CreateDataIntegrationAuthMethods" was removed
Triggered by workos/openapi-spec@c4d55e1
BEGIN_COMMIT_OVERRIDE
feat(events): Change required status for parameter
Events.list.events(#533)feat(pipes): SDK surface change: Symbol "CreateDataIntegrationAuthMethods" was removed (#533)
END_COMMIT_OVERRIDE