Skip to content

feat(generated): Changes to pipes - #738

Open
workos-sdk-automation[bot] wants to merge 4 commits into
mainfrom
oagen/batch-a5c70910
Open

workos-sdk-automation[bot] wants to merge 4 commits into
mainfrom
oagen/batch-a5c70910

Conversation

@workos-sdk-automation

@workos-sdk-automation workos-sdk-automation Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

feat(pipes): Change Pipes API surface

  • SDK surface change: Parameter type changed for "state" on "Pipes.create_organization_connected_account".
  • SDK surface change: Required parameter "user_id" added to "Pipes.create_organization_connected_account".
  • SDK surface change: Parameter type changed for "state" on "Pipes.create_user_connected_account".
  • SDK surface change: Parameter "user_id" renamed to "body" on "Pipes.update_data_integration_api_key".
  • SDK surface change: Parameter "secret" removed from "Pipes.update_data_integration_api_key".
  • SDK surface change: Parameter "organization_id" removed from "Pipes.update_data_integration_api_key".
  • SDK surface change: Parameter "connected_account_id" removed from "Pipes.update_data_integration_api_key".
  • SDK surface change: Parameter "connection_owner" removed from "Pipes.update_data_integration_api_key".
  • SDK surface change: Parameter "user_id" renamed to "body" on "Pipes.update_data_integration_client_credentials".
  • SDK surface change: Parameter "client_id" removed from "Pipes.update_data_integration_client_credentials".
  • SDK surface change: Parameter "client_secret" removed from "Pipes.update_data_integration_client_credentials".
  • SDK surface change: Parameter "organization_id" removed from "Pipes.update_data_integration_client_credentials".
  • SDK surface change: Parameter "connected_account_id" removed from "Pipes.update_data_integration_client_credentials".
  • SDK surface change: Parameter "connection_owner" removed from "Pipes.update_data_integration_client_credentials".
  • SDK surface change: Parameter "config" removed from "Pipes.update_data_integration_client_credentials".
  • SDK surface change: Parameter type changed for "state" on "Pipes.update_organization_connected_account".
  • SDK surface change: Required parameter "user_id" added to "Pipes.update_organization_connected_account".

Triggered by workos/openapi-spec@0b0182d

BEGIN_COMMIT_OVERRIDE
feat(pipes): Change Pipes API surface (#738)
END_COMMIT_OVERRIDE

@workos-sdk-automation workos-sdk-automation Bot added the autogenerated Autogenerated code or content label Sep 25, 2026
@workos-sdk-automation
workos-sdk-automation Bot requested review from a team as code owners September 25, 2026 17:40
@greptile-apps

greptile-apps Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium risk] Regenerates data integration models from API spec.

The PR appears safe to merge, with three previously reported non-blocking issues still outstanding.

Findings

  1. P2 Credential type excludes supported methods ▶
  2. P2 Absent expiry becomes null ▶
  3. P2 Typed update bodies remain untested ▶
Fix with agent prompt
### Issue 1
src/workos/pipes/models/data_integration_vended_credential.py:undefined-18
The new public `auth_method` annotation permits only `"oauth"`, while this model documents API-key and client-credentials responses too. Type-checked consumers cannot handle those documented variants without working around the SDK's annotation.

### Issue 2
src/workos/pipes/models/data_integration_vended_credential.py:58-61
API-key credentials are documented to omit `expires_at`, but deserializing one and calling `to_dict()` inserts `"expires_at": null`. A valid response therefore changes shape when it is round-tripped through this model.

### Issue 3
tests/test_pipes.py:135-138
The updated API-key and client-credentials PUT tests pass fixture dictionaries, so neither exercises the new `body.to_dict()` path. A test using a typed body, especially an exact-connection variant, would catch regressions in how `connected_account_id` and `connection_intent` are sent.

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.

Summary

The PR regenerates the Pipes API surface, adding connection-creation endpoints, typed update bodies, and organization connected-account parameters.

  • Adds sync and async methods for creating API-key and client-credentials connections.
  • Changes PUT methods to accept request-body models or dictionaries.
  • Adds connected-account models, fixtures, and endpoint tests.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Pipes client] --> B{Operation}
  B -->|Create| C[POST connection]
  B -->|Update| D[PUT typed body]
  C --> E[ConnectedAccount]
  D --> E
Loading

Reviews (2) · Last reviewed commit: "chore(generated): drop breaking marker f..."

object: Literal["credential"] | None = None
"""Distinguishes the credential object."""
auth_method: Literal["oauth"] | None = None
"""The authentication method for this credential. Additional values may be added in the future; handle unknown values gracefully."""

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 Credential type excludes supported methods The new public auth_method annotation permits only "oauth", while this model documents API-key and client-credentials responses too. Type-checked consumers cannot handle those documented variants without working around the SDK's annotation.

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/workos/pipes/models/data_integration_vended_credential.py
Line: 18

Comment:
**Credential type excludes supported methods** The new public `auth_method` annotation permits only `"oauth"`, while this model documents API-key and client-credentials responses too. Type-checked consumers cannot handle those documented variants without working around the SDK's annotation.

---

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

Comment on lines +58 to +61
if self.expires_at is not None:
result["expires_at"] = self.expires_at
else:
result["expires_at"] = None

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 Absent expiry becomes null API-key credentials are documented to omit expires_at, but deserializing one and calling to_dict() inserts "expires_at": null. A valid response therefore changes shape when it is round-tripped through this model.

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/workos/pipes/models/data_integration_vended_credential.py
Line: 58-61

Comment:
**Absent expiry becomes null** API-key credentials are documented to omit `expires_at`, but deserializing one and calling `to_dict()` inserts `"expires_at": null`. A valid response therefore changes shape when it is round-tripped through this model.

---

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

Comment thread tests/test_pipes.py
Comment on lines +135 to +138
result = workos.pipes.update_data_integration_api_key(
"test_slug",
body=load_fixture("data_integrations_upsert_api_key_request.json"),
)

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 Typed update bodies remain untested The updated API-key and client-credentials PUT tests pass fixture dictionaries, so neither exercises the new body.to_dict() path. A test using a typed body, especially an exact-connection variant, would catch regressions in how connected_account_id and connection_intent are sent.

Prompt To Fix With AI
This is a comment left during a code review.
Path: tests/test_pipes.py
Line: 135-138

Comment:
**Typed update bodies remain untested** The updated API-key and client-credentials PUT tests pass fixture dictionaries, so neither exercises the new `body.to_dict()` path. A test using a typed body, especially an exact-connection variant, would catch regressions in how `connected_account_id` and `connection_intent` are sent.

---

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!

@gjtorikian gjtorikian changed the title feat(generated)!: Changes to pipes feat(generated): Changes to pipes Sep 25, 2026

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.

1 participant