Repository navigation
feat(generated): Changes to pipes and user_management - #758
workos-sdk-automation[bot] wants to merge 6 commits into
Conversation
…iKeys, AuditLogs, Authorization, ClientApi, Connect, DirectorySync, Events, FeatureFlags, Groups, MultiFactorAuth, OrganizationDomains, OrganizationMembership, Organizations, Pipes, PipesProvider, PlatformTeams, Radar, SSO, UserManagement, Vault, Webhooks, Widgets
[High impact] The refresh changes caller-facing contracts across several WorkOS SDK services. The PR appears safe to merge, with a non-blocking gap in tests for the new Pipes connection flow. Findings
Fix with agent prompt### Issue 1
tests/test_pipes.py:179-187
This test expects `completion="finish_required"` without sending `code_challenge`, so it never exercises the new connection flow. Add sync and async cases that pass `code_challenge`, `code_challenge_method`, and `return_to`, then assert those values reach the request body. Keep a separate case without a challenge where `completion` is absent. Otherwise, dropping any of these new request fields would leave the tests passing.
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!
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.SummaryThis PR adds the Pipes finish-connection flow and changes the generated API surface.
|
| result = workos.pipes.authorize_data_integration( | ||
| "test_slug", | ||
| body=load_fixture( | ||
| "data_integrations_get_data_integration_authorize_url_request.json" | ||
| ), | ||
| "test_slug", user_id="test_user_id" | ||
| ) | ||
| assert isinstance(result, DataIntegrationAuthorizeUrlResponse) | ||
| assert ( | ||
| result.url | ||
| == "https://api.workos.com/data-integrations/q2czJKmVAraSBg8xFpT7M9uR/authorize-redirect" | ||
| ) | ||
| assert result.completion == "finish_required" |
There was a problem hiding this comment.
Both authorization tests expect completion="finish_required" without sending code_challenge. Neither checks that code_challenge, code_challenge_method, and return_to reach the request body. Dropping the challenge could switch back to saving the connection immediately while these tests still pass.
Add sync and async tests that send these fields and inspect the body. Also test a response without completion for the ordinary flow.
Prompt To Fix With AI
This is a comment left during a code review.
Path: tests/test_pipes.py
Line: 179-187
Comment:
**Challenge fields go untested**
Both authorization tests expect `completion="finish_required"` without sending `code_challenge`. Neither checks that `code_challenge`, `code_challenge_method`, and `return_to` reach the request body. Dropping the challenge could switch back to saving the connection immediately while these tests still pass.
Add sync and async tests that send these fields and inspect the body. Also test a response without `completion` for the ordinary flow.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| result = workos.pipes.authorize_data_integration( | ||
| "test_slug", | ||
| body=load_fixture( | ||
| "data_integrations_get_data_integration_authorize_url_request.json" | ||
| ), | ||
| "test_slug", user_id="test_user_id" | ||
| ) | ||
| assert isinstance(result, DataIntegrationAuthorizeUrlResponse) | ||
| assert ( | ||
| result.url | ||
| == "https://api.workos.com/data-integrations/q2czJKmVAraSBg8xFpT7M9uR/authorize-redirect" | ||
| ) | ||
| assert result.completion == "finish_required" |
There was a problem hiding this comment.
Challenge fields remain untested
This test expects completion="finish_required" without sending code_challenge, so it never exercises the new connection flow. Add sync and async cases that pass code_challenge, code_challenge_method, and return_to, then assert those values reach the request body. Keep a separate case without a challenge where completion is absent. Otherwise, dropping any of these new request fields would leave the tests passing.
Prompt To Fix With AI
This is a comment left during a code review.
Path: tests/test_pipes.py
Line: 179-187
Comment:
**Challenge fields remain untested**
This test expects `completion="finish_required"` without sending `code_challenge`, so it never exercises the new connection flow. Add sync and async cases that pass `code_challenge`, `code_challenge_method`, and `return_to`, then assert those values reach the request body. Keep a separate case without a challenge where `completion` is absent. Otherwise, dropping any of these new request fields would leave the tests passing.
---
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
feat(user_management)!: Change user management API surface
feat(pipes): Add Pipes operations and models
DataIntegrationFinishConnectionResponse.DataIntegrationsFinishConnectionRequest.DataIntegrationsFinishConnectionError400.DataIntegrationsFinishConnectionError4002.DataIntegrationsFinishConnectionError403.DataIntegrationsGetDataIntegrationAuthorizeUrlError4002.completiontoDataIntegrationAuthorizeUrlResponse.code_challengetoDataIntegrationsGetDataIntegrationAuthorizeUrlRequest.code_challenge_methodtoDataIntegrationsGetDataIntegrationAuthorizeUrlRequest.codetoDataIntegrationsGetDataIntegrationAuthorizeUrlError400.DataIntegrationsFinishConnectionError400Code.DataIntegrationsGetDataIntegrationAuthorizeUrlError400Code.POST /data-integrations/finish.fix(pipes): Update Pipes API surface
DataIntegrationsGetDataIntegrationAuthorizeUrlError400.message.POST /data-integrations/{slug}/authorize.Triggered by workos/openapi-spec@7121685
BEGIN_COMMIT_OVERRIDE
feat(pipes): Change Pipes API surface (#758)
feat(user_management): Change user management API surface (#758)
feat(pipes): Add Pipes operations and models (#758)
fix(pipes): Update Pipes API surface (#758)
END_COMMIT_OVERRIDE