Skip to content

feat(pipes): regenerate Pipes from the spec and add finishConnection - #1745

Merged
dandorman merged 2 commits into
mainfrom
devin/1793307670-regenerate-pipes
Oct 30, 2026
Merged

dandorman merged 2 commits into
mainfrom
devin/1793307670-regenerate-pipes

Conversation

@dandorman

Copy link
Copy Markdown
Contributor

Description

Regenerates the Pipes service from the current OpenAPI spec with oagen (npm run sdk:generate -- --lang node --services Pipes in openapi-spec, with workos/openapi-spec#248 applied), plus the Pipes event changes the generator doesn't cover.

Generated (Pipes service)

  • New pipes.finishConnection({ connectCode, codeVerifier, state }) → POST /data-integrations/finish.
  • getDataIntegrationAuthorizeUrl accepts accountDisplayName, codeChallenge, codeChallengeMethod, connectionIntent (add | reauthorize) and connectedAccountId; the response gains completion.
  • ConnectedAccount (and its list/org variants) gain establishedByUserId, stateReason and warnings; connect/upsert inputs gain accountDisplayName.
  • All new fields are optional, and no existing method is renamed or removed.

Hand-written (events)
PipesConnectedAccount, the payload for the pipes.connected_account.* and pipes.account_connection.* events, was missing 7 optional fields the spec defines: connectionRole, accountIdentifier, accountDisplayName, authMethod, apiKeyLast4, establishedByUserId, stateReason. They're added to the type and deserializeEvent, and only set when present in the payload, so older events deserialize as before. The 9 Pipes event names and the connection-failed payload already matched the spec.

Generator output I didn't keep
The raw regen also broke existing behavior, so I reverted these parts:

  • dropped exports from the Pipes barrels (serializeConnectedAccountDto, DataIntegrationCredentialsResponse, …)
  • expiresAt deserialized as a string instead of Date
  • authMethods / config defaulting to [] / {} instead of undefined
  • a missing null guard on connected_accounts
  • regenerated pipes.spec.ts / serializers.spec.ts and some fixtures that switched timestamps to strings, used placeholder values like "test_createdAt", or produced invalid active: true + error credential responses

The scoped run also rewrote some non-Pipes index.ts barrels, which I dropped (including their .oagen-manifest.json entries). The existing specs are kept, with new tests for finishConnection and the new event fields.

Documentation

Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.

[ ] Yes

If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.

Link to Devin session: https://app.devin.ai/sessions/bf88ed3db48d4419b9b38b37abc715d7
Open in Devin Desktop: https://app.devin.ai/desktop/session/bf88ed3db48d4419b9b38b37abc715d7?variant=devin
Requested by: @dandorman

Regenerates the Pipes service with oagen, adding finishConnection,
connection labels, PKCE and connection_intent options, warnings,
established_by_user_id and state_reason. Also adds the current
connected account fields to the hand-written Pipes event payloads.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

Original prompt from dan

no immediate action required: if i want you to make a new PR for the Node SDK that basically uses the oagen tooling to make it, can you do that?

@dandorman
dandorman marked this pull request as ready for review October 29, 2026 23:25
@dandorman
dandorman requested review from a team as code owners October 29, 2026 23:25
@dandorman
dandorman requested review from awolfden and thompsongl and removed request for awolfden October 29, 2026 23:25
@greptile-apps

greptile-apps Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the earlier findings are addressed and no new actionable issues remain.

Summary

Adds finishConnection and expands Pipes request, response, and event fields.

  • Pipes authorization can wait for the app to finish saving a connection.
  • Connected accounts expose their labels, status reasons, and non-blocking warnings.
  • Pipes events include the latest optional connected-account details.
  • The bundled jose dependency uses a newer patch version.

Reviews (2) · Last reviewed commit: "fix(pipes): send account labels on upser..." · Reviewed by Greptile

Comment thread src/pipes/pipes.ts Resolved
Comment thread src/pipes/pipes.spec.ts Resolved
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@dandorman
dandorman merged commit 7e19feb into main Oct 30, 2026
9 checks passed
@dandorman
dandorman deleted the devin/1793307670-regenerate-pipes branch October 30, 2026 18:25
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