Skip to content

feat(pipes): Add Data Integration operations and models#1653

Open
gjtorikian wants to merge 1 commit into
mainfrom
pipes-updates
Open

feat(pipes): Add Data Integration operations and models#1653
gjtorikian wants to merge 1 commit into
mainfrom
pipes-updates

Conversation

@gjtorikian

Copy link
Copy Markdown
Contributor

Summary

  • Add Data Integration CRUD methods to the Pipes module: listDataIntegrations, createDataIntegration, getDataIntegration, updateDataIntegration, and deleteDataIntegration
  • Add user connected account operations: createUserConnectedAccount and updateUserConnectedAccount
  • Add supporting interfaces for data integrations, custom provider definitions, credentials, and connected account DTOs
  • Add serializers and JSON fixtures backing the new models
  • Add unit tests (pipes.spec.ts, serializers.spec.ts) covering the new operations and serialization round-trips
  • Generated via oagen from the updated API spec

Test plan

  • yarn test src/pipes passes
  • Lint/build succeeds (yarn build)
  • New serializers round-trip fixtures correctly

@gjtorikian gjtorikian requested review from a team as code owners July 2, 2026 16:24
@gjtorikian gjtorikian requested a review from nicknisi July 2, 2026 16:24
@greptile-apps

greptile-apps Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds generated Pipes SDK support for Data Integrations and connected account token management. The main changes are:

  • Data Integration CRUD methods in src/pipes/pipes.ts.
  • Connected account create and update methods for imported OAuth tokens.
  • New interfaces, serializers, and fixtures for data integrations, custom providers, credentials, and connected account DTOs.
  • Tests covering the new Pipes methods and serializer fixtures.

Confidence Score: 4/5

The 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

T-Rex T-Rex Logs

What T-Rex did

  • Ran a focused serializer runtime script for serializeUpdateDataIntegration with input { slug: 'integration', enabled: true } and observed that the serialized body included description: null and scopes: null, not just { enabled: true }, demonstrating that omitted fields are preserved with null values.
  • Ran a focused serializer runtime script for serializeUpdateCustomProviderDefinition with input { name: 'New name' } and confirmed that refresh_token_url is emitted as null when omitted.
  • Ran a focused Jest scenario for Data Integration CRUD, showing the baseline where methods are absent and no HTTP call is made, and after changes, methods exist with expected HTTP methods/routes and responses deserializing successfully.
  • Executed focused tests for user-connected-account-ops, capturing before with method-absence and after with runtime fetch evidence for both methods, including HTTP status and request/response details, with exit code 0.
  • Validated serializer fixtures by running Jest with focused tests, noting that the before state failed due to a missing fixture and the after state passed with verbose assertions and EXIT_CODE: 0.

View all artifacts

T-Rex Ran code and verified through T-Rex

Prompt To Fix All With AI
Fix 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

Comment on lines +13 to +15
description: model.description ?? null,
enabled: model.enabled,
scopes: model.scopes ?? null,

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.

P1 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.

View artifacts

T-Rex 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,

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.

P1 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.

View artifacts

T-Rex 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.

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.

1 participant