Repository navigation
feat(types): regenerate api/hub types from gateway refactoringV2; keep every patch type and public method - #94
Merged
Merged
Conversation
…a regeneration keeps it generate-endpoints now carries a // @Hand-Written:begin … :end block and imports ending in // @Hand-Written over to the regenerated module (sdks/typegen 5e7c21a). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A stale sync-types copy put the @sdk-dto-patches block after the namespace's closing brace: CodeMashHub2.GetApiKeys and 9 others stopped resolving and the type file threw "ReferenceError: ResponseBase is not defined" on load. 20 checks: every hub and api patch type resolves, and neither file declares a class outside its namespace. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…f5718 + the type-export fix
Regenerated with the maintained sdks/typegen scripts (325b2a8) against a private
gateway stack built from refactoringV2 0f17f5718 plus the type-export fix
(shipped as 77bca10db + 16c8b93cf). No type and no public method is lost (checked: class names per
namespace, method signatures, scopes and exports against the previous commit).
- The 10 @sdk-dto-patches types (GetApiKeys, RegenerateApiKeys, UserApiKey,
GetUserNotificationPreferences, GrantContactConsentRequest, ...) stay inside
their namespace. They seemed to vanish only because the old local
sync-types.mjs put the patch block after the namespace's closing brace.
- api2 keeps the 17 data schema field kinds (gateway 77bca10db exports them on
the Api host too).
- Picks up the gateway changes on refactoringV2: IdResponse.warnings, the
users-list filters, list-settings primary / linkReference, new endpoints
(files useFile, membership setUserAiPlan, account AI plans, ...).
- verifyAccount and resendAccountVerificationToken are POST now (gateway
4ece218e6); verifyAccount sends accountId and token in the body. The two
hand-written tests follow.
- Deprecated, kept: hub/api apikeys.getApiKeys / regenerateApiKeys (the gateway
has no /apikeys route), hub.notifications.getUserNotificationPreferences /
updateUserNotificationsPreferences (moved to api.membership, different shape).
hub.notifications.grantContactConsent / unsubscribeContact now call their real
API route (/membership/users/{contactId}/marketing-state/...) and are
deprecated in favour of api.membership.
- Hand-written code in generated files (scheduler typed inputs, the run-details
helper, docs sections, a logs test) is wrapped in @Hand-Written blocks, which
the generator now keeps.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🚀 Release previewNext version on merge to semantic-release dry-run output
|
|
🎉 This PR is included in version 4.27.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Regenerates
src/types/{api2,hub2}.dtos.ts, the generated modules, tests and docs from a private gateway stack (refactoringV2 0f17f5718 + the type-export fix 77bca10db / 16c8b93cf), with the maintainedsdks/typegenscripts (325b2a8).Why 9 types seemed to vanish: they never came from the gateway. They are the
@sdk-dto-patchesblock, and the old gitignoredscripts/sync-types.mjsput that block after the namespace's closing brace, soCodeMashHub2.GetApiKeys& co. stopped resolving (the file even threwReferenceError: ResponseBase is not definedon load). New testtests/types-sdk-dto-patches.test.tsfails if that happens again.Nothing public is lost — checked type names per namespace, method signatures, scopes and exports against
main.Behaviour changes:
hub.account.verifyAccount/resendAccountVerificationTokenare POST (gateway 4ece218e6);verifyAccountsendsaccountId+tokenin the body.hub.notifications.grantContactConsent/unsubscribeContactcall their real API route (/membership/users/{contactId}/marketing-state/…); deprecated in favour ofapi.membership.hub|api.apikeys.getApiKeys/regenerateApiKeys(no/apikeysroute in the gateway),hub.notifications.getUserNotificationPreferences/updateUserNotificationsPreferences(moved toapi.membership.getUserPreferences/updateUserPreferences, different shape).getMarketplaceFunctionRunDetails, docs sections, a logs test) is wrapped in@hand-writtenblocks the generator keeps.Tests: vitest 1047/1047, typecheck 0 errors, lint clean, prettier clean, build + typecheck:dist clean. Expected release: minor (4.27.0).
Item file: /Users/djovaisas/Projects/norbix/docs/tasks/ux-fixes-2026-10-14/sdk-ts-types.md (workspace, no git).
🤖 Generated with Claude Code