Skip to content

Commit e6fb6c1

Browse files
jfrench9claude
andauthored
Add Connection Management Types and OAuth Support to SDK (#71)
## Summary Enhances the auto-generated SDK layer with comprehensive connection management types and OAuth support, adding ~970 lines of new type definitions and SDK methods. This lays the groundwork for managing third-party integrations and authentication flows within the application. ## Changes ### `sdk/types.gen.ts` (+758 lines) - Added extensive type definitions for connection management entities (connections, connection configs, OAuth credentials, integration metadata) - Introduced types for OAuth authorization flows, token handling, and credential storage - Added request/response types for CRUD operations on connections and connection configurations - Defined types for integration catalogs, provider schemas, and supported authentication methods - Added error response types and validation schemas for connection-related endpoints ### `sdk/sdk.gen.ts` (+222 lines) - Added new SDK client methods for connection lifecycle management (create, read, update, delete, list) - Implemented OAuth flow initiation and callback handling methods - Added methods for managing connection configurations and retrieving integration metadata - Wired up proper request/response type mappings for all new endpoints ### `sdk/index.ts` (+4/-4) - Updated barrel exports to expose new connection management and OAuth types/methods ## Key Improvements - **Connection CRUD**: Full lifecycle management for third-party service connections - **OAuth Support**: Type-safe OAuth authorization flow handling including token refresh patterns - **Integration Catalog**: Typed access to available integrations and their configuration schemas - **Developer Experience**: Strongly-typed SDK methods with proper request/response inference ## Breaking Changes - Minor modifications to existing exports in `sdk/index.ts` — consumers importing wildcard (`*`) from the SDK barrel may see new symbols; no removals detected, but verify that no existing type names collide with the newly introduced types. ## Testing Notes for Reviewers - **Type Validation**: Verify TypeScript compilation passes cleanly with `tsc --noEmit` — ensure no conflicting or duplicate type names across the SDK surface - **Generated Code Consistency**: These files appear to be auto-generated (`.gen.ts` suffix). Confirm the generation source (e.g., OpenAPI spec) is committed or referenced, and that manual edits were not made to generated files - **Runtime Verification**: Test that new SDK methods correctly call the expected API endpoints with proper serialization by exercising at least one connection CRUD flow and one OAuth initiation flow - **Integration Tests**: If an API sandbox/mock is available, validate the full OAuth round-trip (initiate → callback → token storage → refresh) - **Tree-shaking**: Confirm that the +970 lines of new code are properly tree-shakeable and don't inflate client bundles for consumers not using connection features ## Browser Compatibility Considerations - No direct DOM or browser API usage introduced — changes are purely TypeScript types and fetch-based SDK methods - OAuth redirect flows will depend on `window.location` handling at the consuming layer (not in this PR), so no browser-specific concerns here - Ensure that any OAuth popup/redirect patterns built on top of these SDK methods account for cross-browser popup blocker behavior and Safari's strict ITP (Intelligent Tracking Prevention) policies for third-party cookies --- 🤖 Generated with [Claude Code](https://claude.ai/code) **Branch Info:** - Source: `feature/connection-management` - Target: `main` - Type: feature Co-Authored-By: Claude <noreply@anthropic.com>
2 parents 0d0c2c2 + 594e2ef commit e6fb6c1

3 files changed

Lines changed: 973 additions & 11 deletions

File tree

0 commit comments

Comments
 (0)