Skip to content

Refactor SDK types and rename repository subscription methods#73

Merged
jfrench9 merged 1 commit intomainfrom
feature/repo-sub-change
Mar 9, 2026
Merged

Refactor SDK types and rename repository subscription methods#73
jfrench9 merged 1 commit intomainfrom
feature/repo-sub-change

Conversation

@jfrench9
Copy link
Member

@jfrench9 jfrench9 commented Mar 9, 2026

Summary

This PR refactors the SDK layer by updating generated types and renaming repository subscription-related methods for improved clarity and consistency. The changes span the SDK's core files — index.ts, sdk.gen.ts, and types.gen.ts — affecting type definitions, method signatures, and re-exports.

Changes

SDK Type Refactoring (types.gen.ts)

  • Updated and restructured type definitions with improved type accuracy across 54 lines of changes
  • Renamed types associated with repository subscription operations to better reflect their purpose
  • Adjusted type signatures for consistency with the updated API contract

SDK Method Renaming (sdk.gen.ts)

  • Renamed repository subscription methods to align with updated naming conventions
  • Updated method implementations to reference the new type definitions
  • Net addition of logic suggests expanded or more explicit method signatures (+34 / -13)

Re-exports (index.ts)

  • Updated barrel exports to reflect the renamed methods and types
  • Ensures downstream consumers import the correct, renamed symbols

Breaking Changes ⚠️

Yes — this is a breaking change for SDK consumers.

  • Any code referencing the previous repository subscription method names or type names will need to be updated.
  • Consumers importing directly from sdk/types.gen.ts or calling methods from sdk/sdk.gen.ts must migrate to the new names.
  • Recommend a find-and-replace across the codebase for any usage of the old method/type names.

Key Improvements

  • Naming consistency: Method and type names now more clearly describe their relationship to repository subscriptions, reducing ambiguity.
  • Type accuracy: Refined type definitions improve type safety and developer experience with better autocompletion and compile-time checks.
  • Maintainability: Cleaner naming conventions make the SDK easier to navigate and extend in the future.

UI/UX Impact

  • No direct UI/UX changes — these are SDK-level refactors. However, any frontend features consuming these SDK methods should be verified to ensure they reference the updated method and type names.

Testing Notes for Reviewers

  1. Verify all call sites: Search the codebase for any usage of the old repository subscription method names and types to ensure nothing was missed.
  2. Type checking: Run tsc --noEmit to confirm there are no type errors introduced by the rename.
  3. Integration tests: Run any existing integration or API tests that exercise repository subscription flows (create, update, delete, list subscriptions).
  4. Runtime verification: If possible, manually test any UI flows that trigger repository subscription operations to confirm end-to-end functionality.
  5. Generated code validation: Confirm that sdk.gen.ts and types.gen.ts were regenerated correctly from the API schema (if applicable) and that no manual edits conflict with the code generator.

Browser Compatibility

No browser compatibility concerns — changes are limited to TypeScript SDK types and method definitions that compile down to standard JavaScript. No new browser APIs or polyfills are introduced.


🤖 Generated with Claude Code

Branch Info:

  • Source: feature/repo-sub-change
  • Target: main
  • Type: feature

Co-Authored-By: Claude noreply@anthropic.com

## Summary
This update refines the SDK type definitions by renaming and restructuring types related to repository subscriptions, enhancing clarity and usability.

## Changes Made
- **Renamed Types**: Changed `CreateRepositorySubscriptionData` to `ChangeRepositoryPlanData` and updated related types to reflect the new naming convention.
- **Updated Documentation**: Adjusted comments to clarify the purpose of the new types and their parameters.
- **Modified Response Types**: Updated response types to align with the new naming and functionality, ensuring consistency across the SDK.

## Key Benefits
- **Improved Clarity**: The renaming of types provides a clearer understanding of their purpose, aiding developers in utilizing the SDK effectively.
- **Enhanced Usability**: The updated types and documentation improve the overall developer experience when working with repository subscriptions.

## Breaking Changes
- Existing code relying on the previous type names will need to be updated to accommodate the new naming conventions.

## Testing Notes for Reviewers
- Verify that all references to the renamed types are updated throughout the codebase.
- Ensure that the SDK compiles without errors and that the new types integrate correctly into existing workflows.
@jfrench9 jfrench9 merged commit 07d50ef into main Mar 9, 2026
1 check passed
@jfrench9 jfrench9 deleted the feature/repo-sub-change branch March 10, 2026 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant