Repository navigation
feat(templates): clone returns the new copy's id - #66
Merged
Merged
Conversation
The clone hooks (useCloneEmailTemplateMutation, useCloneSmsTemplateMutation, useClonePushTemplateMutation) take their result type from @norbix.ai/ts, which answers IdResponse since 4.37.0 (was EmptyResponse): `data.id` is the new copy's id. @norbix.ai/ts raised to ^4.37.0 (dev) and >=4.37.0 (peer) so the hooks are typed with the id answer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🚀 Release previewNext version on merge to semantic-release dry-run output
|
…e npm like its siblings Same as sdk-ts 96936c5: ip-address 10.5.0 comes only from the npm CLI that @semantic-release/npm bundles; overrides cannot reach it. Dev-only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
🎉 This PR is included in version 1.22.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.
The clone hooks hand the new copy's id to the caller:
useCloneEmailTemplateMutation,useCloneSmsTemplateMutationanduseClonePushTemplateMutationresolve toIdResponse(wasEmptyResponse) —data.idis the copy. Additive.What changed
Result<Norbix['hub']['notifications']['clone…Template']>), so no hook code changed.@norbix.ai/tsraised to^4.37.0(dev) and>=4.37.0(peer, was>=4.32.0) — 4.37.0 (sdk-ts #108) is the first version whose clone methods answerIdResponse. A project on an older @norbix.ai/ts gets an npm peer warning; the hooks still work there, only typed with the empty answer.tests/template-clone.test.ts: a type check that the three clone results areCodeMashHub2.IdResponse, and per clone hook the real@norbix.ai/tsclient + this package's base query with a fake fetch answering{ "id": "…" }— POST to/v2/notifications/<channel>/templates/tpl_1/clone, the id lands indata.osv-scanner.toml: ignore GHSA-rxp7-6hxx-x8q5 until 2027-01-04 (the CI security scan failed on it; already on main).ip-address10.5.0 comes only from the npm CLI that@semantic-release/npmbundles — overrides cannot reach it, dev-only. Same decision as sdk-ts 96936c5.Tests
npx vitest run20 files / 429 tests passed ·npm run lint·npm run typecheck·npm run build·npm audit --omit=dev --audit-level=high(0) — all green.npm run format:checkreports 20 files already unformatted on main (not touched here; CI does not run it).🤖 Generated with Claude Code