Repository navigation
feat(pipes): regenerate Pipes from the spec and add finishConnection - #1745
Merged
Merged
Conversation
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>
Contributor
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
Original prompt from dan
|
dandorman
marked this pull request as ready for review
October 29, 2026 23:25
dandorman
requested review from
awolfden and
thompsongl
and removed request for
awolfden
October 29, 2026 23:25
Contributor
[Medium impact] The PR appears safe to merge; the earlier findings are addressed and no new actionable issues remain. SummaryAdds
Reviews (2) · Last reviewed commit: "fix(pipes): send account labels on upser..." · Reviewed by Greptile |
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
thompsongl
approved these changes
Oct 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Regenerates the Pipes service from the current OpenAPI spec with oagen (
npm run sdk:generate -- --lang node --services Pipesinopenapi-spec, with workos/openapi-spec#248 applied), plus the Pipes event changes the generator doesn't cover.Generated (Pipes service)
pipes.finishConnection({ connectCode, codeVerifier, state })→POST /data-integrations/finish.getDataIntegrationAuthorizeUrlacceptsaccountDisplayName,codeChallenge,codeChallengeMethod,connectionIntent(add|reauthorize) andconnectedAccountId; the response gainscompletion.ConnectedAccount(and its list/org variants) gainestablishedByUserId,stateReasonandwarnings; connect/upsert inputs gainaccountDisplayName.Hand-written (events)
PipesConnectedAccount, the payload for thepipes.connected_account.*andpipes.account_connection.*events, was missing 7 optional fields the spec defines:connectionRole,accountIdentifier,accountDisplayName,authMethod,apiKeyLast4,establishedByUserId,stateReason. They're added to the type anddeserializeEvent, 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:
serializeConnectedAccountDto,DataIntegrationCredentialsResponse, …)expiresAtdeserialized as a string instead ofDateauthMethods/configdefaulting to[]/{}instead ofundefinedconnected_accountspipes.spec.ts/serializers.spec.tsand some fixtures that switched timestamps to strings, used placeholder values like"test_createdAt", or produced invalidactive: true+errorcredential responsesThe scoped run also rewrote some non-Pipes
index.tsbarrels, which I dropped (including their.oagen-manifest.jsonentries). The existing specs are kept, with new tests forfinishConnectionand the new event fields.Documentation
Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.
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