feat(typescript): add client class name wrapping config options #10676
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Refs: User request from @aditya-arolkar-swe
Adds
clientClassNameandexportedClientClassNameconfig options to the TypeScript SDK generator, matching the C# generator functionality.Devin Session: https://app.devin.ai/sessions/62307c91d1a7499b91d5f724ae7d9559
Changes Made
clientClassNameandexportedClientClassNametoTypescriptCustomConfigSchemaSdkCustomConfiginterfaceSdkGeneratorCliSdkGenerator.ConfigAbstractSdkClientClassDeclarationReferencerto accept and store config optionsSdkRootClientClassDeclarationReferencerto use custom names:getExportedName(): ReturnsexportedClientClassNameif set, falls back toclientClassName, then defaultgetClientClassName(): ReturnsclientClassNameif set, falls back to defaultTesting
pnpm run check)Review Checklist
Incomplete implementation: This PR only adds the config plumbing and basic naming logic. The C# generator creates actual wrapper files when these configs are used. This implementation only changes the naming in the declaration referencer. Need to determine if wrapper file generation is required.
Untested behavior: The following scenarios have not been tested:
clientClassNameexportedClientClassNameMissing updates: The following may need updates but were not modified:
exportedClientClassName)exportedClientClassName)No tests: No unit or integration tests were added to verify the new functionality.
Config validation: No validation that
exportedClientClassNamemakes sense whenclientClassNameis not set.Recommendation: This PR establishes the config infrastructure but may need additional work to fully match the C# generator's behavior. Consider whether this partial implementation is acceptable or if wrapper file generation should be added before merging.