feat(pipes): Add Data Integration operations and models#1653
Conversation
Greptile SummaryThis PR adds generated Pipes SDK support for Data Integrations and connected account token management. The main changes are:
Confidence Score: 4/5The new SDK surface is mostly generated and well covered, but merge safety depends on fixing partial-update serialization that currently sends explicit clears for omitted fields. Focused checks covered the new Pipes methods and serializer round-trips, and the remaining concerns are localized to update payload generation rather than broad architectural risk. src/pipes/serializers/update-data-integration.serializer.ts and src/pipes/serializers/update-custom-provider-definition.serializer.ts
What T-Rex did
Prompt To Fix All With AIFix the following 2 code review issues. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 2
src/pipes/serializers/update-data-integration.serializer.ts:13-15
**Preserve omitted fields**
`updateDataIntegration({ slug, enabled: true })` serializes to `{ description: null, scopes: null, enabled: true }`. The interface documents `scopes: null` as the explicit reset signal, so omitting `scopes` resets provider scopes and clears `description` on every partial update instead of leaving those fields unchanged.
### Issue 2 of 2
src/pipes/serializers/update-custom-provider-definition.serializer.ts:14
**Preserve refresh URL**
`customProvider` updates are typed as partial updates, but an update like `{ customProvider: { name: 'New name' } }` serializes `refresh_token_url: null`. That sends an explicit clear for the refresh endpoint even when the caller omitted `refreshTokenUrl`, so unrelated custom-provider edits can remove the configured refresh URL.
Reviews (1): Last reviewed commit: "feat(generated): Add Pipes operations an..." | Re-trigger Greptile |
| description: model.description ?? null, | ||
| enabled: model.enabled, | ||
| scopes: model.scopes ?? null, |
There was a problem hiding this comment.
Preserve omitted fields
updateDataIntegration({ slug, enabled: true }) serializes to { description: null, scopes: null, enabled: true }. The interface documents scopes: null as the explicit reset signal, so omitting scopes resets provider scopes and clears description on every partial update instead of leaving those fields unchanged.
Artifacts
Repro: focused serializer runtime script
- Contains supporting evidence from the run (text/javascript; charset=utf-8).
Repro: serializer output showing omitted fields serialized as null
- Keeps the command output available without making the summary code-heavy.
Ran code and verified through T-Rex
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/pipes/serializers/update-data-integration.serializer.ts
Line: 13-15
Comment:
**Preserve omitted fields**
`updateDataIntegration({ slug, enabled: true })` serializes to `{ description: null, scopes: null, enabled: true }`. The interface documents `scopes: null` as the explicit reset signal, so omitting `scopes` resets provider scopes and clears `description` on every partial update instead of leaving those fields unchanged.
How can I resolve this? If you propose a fix, please make it concise.| name: model.name, | ||
| authorization_url: model.authorizationUrl, | ||
| token_url: model.tokenUrl, | ||
| refresh_token_url: model.refreshTokenUrl ?? null, |
There was a problem hiding this comment.
Preserve refresh URL
customProvider updates are typed as partial updates, but an update like { customProvider: { name: 'New name' } } serializes refresh_token_url: null. That sends an explicit clear for the refresh endpoint even when the caller omitted refreshTokenUrl, so unrelated custom-provider edits can remove the configured refresh URL.
Artifacts
Repro: focused serializer runtime script
- Contains supporting evidence from the run (text/typescript; charset=utf-8).
Repro: serializer command output showing refresh_token_url null
- Keeps the command output available without making the summary code-heavy.
Ran code and verified through T-Rex
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/pipes/serializers/update-custom-provider-definition.serializer.ts
Line: 14
Comment:
**Preserve refresh URL**
`customProvider` updates are typed as partial updates, but an update like `{ customProvider: { name: 'New name' } }` serializes `refresh_token_url: null`. That sends an explicit clear for the refresh endpoint even when the caller omitted `refreshTokenUrl`, so unrelated custom-provider edits can remove the configured refresh URL.
How can I resolve this? If you propose a fix, please make it concise.
Summary
listDataIntegrations,createDataIntegration,getDataIntegration,updateDataIntegration, anddeleteDataIntegrationcreateUserConnectedAccountandupdateUserConnectedAccountpipes.spec.ts,serializers.spec.ts) covering the new operations and serialization round-tripsTest plan
yarn test src/pipespassesyarn build)