Skip to content

feat(pipes)!: Support organization-owned and multiple connections - #1712

Open
dandorman wants to merge 5 commits into
mainfrom
feat/pipes-connection-sharing
Open

dandorman wants to merge 5 commits into
mainfrom
feat/pipes-connection-sharing

Conversation

@dandorman

Copy link
Copy Markdown
Contributor

Description

Bring Pipes up to date with organization-owned connections, multiple connections per provider, and API-key/client-credentials integrations without letting regeneration undo existing SDK behavior.

  • Thread ownership, account selectors, provider config, and plural-connection opt-in through the public options and wire serializers.
  • Add organization integration/account operations and client-credentials rotation; deserialize all credential variants, including client-credentials metadata.
  • Adopt the credential component from workos/workos#73671 while retaining published DTO/type/serializer names and common property-access patterns through compatibility shims.
  • Preserve and protect the manual DELETE query correction until the Node emitter fix is available; remove an unused conflicting interface and make generation ownership explicit.

Compatibility and release impact

This is intentionally marked as a breaking SDK type change, not an HTTP wire-contract change:

  • DataIntegration.credentials can be null for non-OAuth integrations; consumers must check it before reading OAuth application credentials.
  • Credential responses now describe active/inactive outcomes and authentication-method variants accurately. Typed mocks must include the matching discriminator and fields; API-key credentials do not expose OAuth scope/expiry fields.
  • Expanded authentication-method/state unions may require updates to exhaustive switches. Custom types extending the old credential interfaces need intersections with the new unions.

Existing method names, published DTOs, and credential type/serializer imports remain available. Reads such as result.error and result.credential?.value still compile. The new organization integration methods were not previously released.

Plural connections remain opt-in: omitted/false supportsMultipleConnections keeps compatibility-slot behavior. Legacy provider ownership: 'userland_user' remains available; new code can use connectionOwner: 'user'. See Pipes compatibility and migration notes.

Keep the breaking-change marker when squash-merging. With the repository's default release-please configuration, this requests a major release. No changelog or package-version files are manually changed here.

Validation

Rebased onto current main (4c12d5a1, release 10.14.0) and ran locally:

  • npm run typecheck
  • npm run lint
  • npm run prettier, plus formatting checks for changed JSON/Markdown files
  • npm run build (including the package type/export checks)
  • npm test -- --runInBand: 1,112 passed, 12 skipped, 17 snapshots passed

Coverage includes request bodies/query parameters, true/false/omitted plural opt-ins, pagination filters, credential variants, metadata, date conversion, and compatibility aliases. A temporary regeneration also preserved the protected DELETE methods and credential compatibility shims. The old package tarball and build-generated metadata changes are excluded.

Documentation

  • Yes — the related API schema/reference change is merged in https://github.com/workos/workos/pull/73671.
  • SDK-specific migration and generation-boundary guidance is included in docs/PIPES_COMPATIBILITY.md.
  • The known generated-docs optionality/nullability presentation issue is deferred to a separate docs-parser PR.

BREAKING CHANGE: Integration credentials may be null, and credential responses now reflect active/inactive and authentication-method variants. Consumers relying on non-null OAuth credentials, unconditional token fields, or the former flat credential interfaces must update their types and guards as described in the compatibility guide.

Shared and multiple provider connections need request and response
contracts that stay consistent end to end. Keep SDK-side corrections
while the generator and source-schema fixes are handled upstream.

BREAKING CHANGE: Credential responses now use discriminated unions.
Narrow on active and authMethod before reading variant-specific fields.
The merged credential schema can replace handwritten decoding, but
regeneration must not remove published names or revive the DELETE query
bug. Keep the compatibility boundaries explicit while the remaining
emitter fixes are handled upstream.
@dandorman
dandorman requested review from a team as code owners September 24, 2026 20:34
@dandorman
dandorman requested a review from stacurry September 24, 2026 20:34
@greptile-apps

greptile-apps Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[High risk] Expands data integration API types and adds organization-owned connections.

The PR appears safe to merge; no new actionable issue or outstanding previous finding remains.

Summary

The PR adds organization-owned and multiple Pipes connections, API-key and client-credentials flows, and credential response variants while retaining compatibility exports and protecting hand-maintained code from regeneration. The change since the previous review clarifies the API dependency for idempotent POST retries.

Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Integration and ownership] --> B[Create or select connection]
  B --> C[OAuth, API key, or client credentials]
  C --> D[Vend credential]
  B --> E[Compatibility connection]
  B --> F[Plural connections when opted in]
Loading

Reviews (4) · Last reviewed commit: "docs(pipes): Clarify idempotency-key not..."

Comment thread src/pipes/pipes-requests.spec.ts
Comment thread .oagen-manifest.json
Comment thread src/pipes/fixtures/create-data-integration.json
Add a provider-list regression with distinct compatibility and standard
connections, plus a provider with only a standard connection, so the
plural-list deserialization cannot silently drop peers.

Remove the DataIntegrationCredentialsResponseCredential alias interface,
serializer, and fixture from .oagen-manifest.json: they are hand-maintained
compatibility shims (@oagen-ignore-file) whose paths the current spec no
longer emits, so listing them as generated made them prune candidates.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@dandorman
dandorman requested a review from a team September 25, 2026 17:34
Pipes now returns provider routing config and distinguishes creating a
connection from reauthorizing one. Expose that contract without losing
the SDK's compatibility aliases, reviewed plural-list coverage, or the
local DELETE and PUT serialization fixes.
Comment thread docs/PIPES_COMPATIBILITY.md Outdated
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants