feat(generated): Changes to pipes - #561
workos-sdk-automation[bot] wants to merge 4 commits into
Conversation
|
| ).returns(WorkOS::ConnectedAccount) | ||
| end | ||
| def update_data_integration_api_key(slug:, user_id:, secret:, organization_id:, connected_account_id:, connection_owner:, request_options:); end | ||
| def update_data_integration_api_key(slug:, user_id:, secret:, organization_id:, connection_owner:, request_options:); end |
There was a problem hiding this comment.
Update signatures omit selection keywords
When a Sorbet-typed caller passes connected_account_id or connection_intent to reauthorize a specific API-key connection, this signature rejects the call even though the Ruby method accepts and sends both values. The client-credentials update signature has the same mismatch, so typed callers cannot select a connection through either method.
Knowledge Base Used: Connect, Pipes, and Admin Portal
Prompt To Fix With AI
This is a comment left during a code review.
Path: rbi/workos/pipes.rbi
Line: 94
Comment:
**Update signatures omit selection keywords**
When a Sorbet-typed caller passes `connected_account_id` or `connection_intent` to reauthorize a specific API-key connection, this signature rejects the call even though the Ruby method accepts and sends both values. The client-credentials update signature has the same mismatch, so typed callers cannot select a connection through either method.
**Knowledge Base Used:** [Connect, Pipes, and Admin Portal](https://app.greptile.com/workos/-/custom-context/knowledge-base/workos/workos-ruby/-/docs/connect-pipes-and-admin-portal.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| def test_create_data_integration_api_key_returns_expected_result | ||
| stub_request(:post, %r{\Ahttps://api\.workos\.com/data-integrations/stub/api-key(\?|\z)}) | ||
| .to_return(body: "{}", status: 200) | ||
| result = @client.pipes.create_data_integration_api_key(slug: "stub", user_id: "stub", secret: "stub", connection_intent: "add") | ||
| refute_nil result |
There was a problem hiding this comment.
Creation tests ignore request bodies
This test checks only the URL and that a result is returned. It would pass if the new API-key creation method omitted user_id, the secret, or the required connection_intent from its JSON body. The new client-credentials test has the same gap. Checking the outgoing bodies would catch mistakes in these new request contracts.
Prompt To Fix With AI
This is a comment left during a code review.
Path: test/workos/test_pipes.rb
Line: 49-53
Comment:
**Creation tests ignore request bodies**
This test checks only the URL and that a result is returned. It would pass if the new API-key creation method omitted `user_id`, the secret, or the required `connection_intent` from its JSON body. The new client-credentials test has the same gap. Checking the outgoing bodies would catch mistakes in these new request contracts.
---
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(pipes): Change Pipes API surface
Triggered by workos/openapi-spec@0b0182d
BEGIN_COMMIT_OVERRIDE
feat(pipes): Change Pipes API surface (#561)
END_COMMIT_OVERRIDE