feat: Generate Pipes off the OpenAPI spec#1625
Conversation
Greptile SummaryThis PR regenerates the Pipes module from the OpenAPI spec via
Confidence Score: 5/5Safe to merge — new methods are additive and the getAccessToken change is backward compatible at both the TypeScript and runtime levels. All five methods are well-tested, serialization logic is straightforward, and the discriminated-union deserializer handles the access-token response correctly with a defensive throw on unexpected values. The only open items are a type annotation inconsistency on a deprecated wire field and a dead exported interface, neither of which affects runtime behavior. src/pipes/interfaces/data-integrations-list-response-data-connected-account.interface.ts — the Important Files Changed
|
…coverage Addresses the review of the Pipes regeneration: - serializers/index.ts: re-export the discriminated-union serializer (deserializeDataIntegrationAccessTokenResponse) that was generated but missing from the barrel. - fixtures/data-integration-access-token-response.json: emit a single valid union branch instead of merging mutually-exclusive fields (dropped the contradictory `error` alongside `active: true`). - serializers/data-integrations-get-user-token-request.serializer.ts: pass organization_id straight through instead of coercing an omitted optional to `null`, matching the prior wire behavior. - Remove hand-written files orphaned when Pipes became an owned service (get-access-token/access-token serializers + 4 unused fixtures). - Add pipes-errors.spec.ts restoring coverage of getAccessToken's `active: false` branches and the null-expiry success path. The three generated-output changes come from fixes in oagen-emitters (node-bugfixes); regenerating with that build reproduces them. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Re-add the 500-error-throw assertion that the generated pipes.spec.ts dropped, completing the hand-owned coverage of getAccessToken alongside the active:false branches and null-expiry path. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Regenerate pipes.spec.ts with the new oagen test generation: an error-path test per method (asserts the client throws on a non-2xx response) and a union-branch test for getAccessToken's `active: false` arm (asserts the discriminator on the deserialized result). Only the pipes changes from the regen are committed; the unrelated cross-service emitter drift is left out. Trim the hand-owned pipes-errors.spec.ts now that the generator covers the `active: false` discriminator routing and the error throw. Two cases the generator can't reach are kept: the second failure enum value (`needs_reauthorization`, deep-asserting the deserialized `error` field — the generated branch test only emits the first value and asserts the discriminator) and the null-expiry success path (a nullable field, not a union branch). 21 pipes tests pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Description
This PR generates the Pipes API fresh from the OpenAPI spec.
The existing shape of methods is preserved. As well, new functions are added:
authorizeDataIntegrationgetUserConnectedAccountdeleteUserConnectedAccountlistUserDataProvidersBecause of this, this is a non-breaking change.