Skip to content

feat(templates): clone returns the new copy's id - #66

Merged
Domantas merged 2 commits into
mainfrom
feat/clone-returns-id
Oct 23, 2026
Merged

Domantas merged 2 commits into
mainfrom
feat/clone-returns-id

Conversation

@Domantas

@Domantas Domantas commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

The clone hooks hand the new copy's id to the caller: useCloneEmailTemplateMutation, useCloneSmsTemplateMutation and useClonePushTemplateMutation resolve to IdResponse (was EmptyResponse) — data.id is the copy. Additive.

What changed

  • The hooks take their result type from the core SDK method (Result<Norbix['hub']['notifications']['clone…Template']>), so no hook code changed. @norbix.ai/ts raised 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 answer IdResponse. A project on an older @norbix.ai/ts gets an npm peer warning; the hooks still work there, only typed with the empty answer.
  • New tests/template-clone.test.ts: a type check that the three clone results are CodeMashHub2.IdResponse, and per clone hook the real @norbix.ai/ts client + this package's base query with a fake fetch answering { "id": "…" } — POST to /v2/notifications/<channel>/templates/tpl_1/clone, the id lands in data.
  • osv-scanner.toml: ignore GHSA-rxp7-6hxx-x8q5 until 2027-01-04 (the CI security scan failed on it; already on main). ip-address 10.5.0 comes only from the npm CLI that @semantic-release/npm bundles — overrides cannot reach it, dev-only. Same decision as sdk-ts 96936c5.

Tests

npx vitest run 20 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:check reports 20 files already unformatted on main (not touched here; CI does not run it).

🤖 Generated with Claude Code

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>
@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

🚀 Release preview

Next version on merge to main: none

semantic-release dry-run output
[3:43:07 PM] [semantic-release] › ℹ  Running semantic-release version 25.0.9
[3:43:07 PM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/npm"
[3:43:07 PM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/github"
[3:43:07 PM] [semantic-release] › ✔  Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
[3:43:07 PM] [semantic-release] › ✔  Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator"
[3:43:07 PM] [semantic-release] › ✔  Loaded plugin "prepare" from "@semantic-release/npm"
[3:43:07 PM] [semantic-release] › ✔  Loaded plugin "publish" from "@semantic-release/npm"
[3:43:07 PM] [semantic-release] › ✔  Loaded plugin "publish" from "@semantic-release/github"
[3:43:07 PM] [semantic-release] › ✔  Loaded plugin "addChannel" from "@semantic-release/npm"
[3:43:07 PM] [semantic-release] › ✔  Loaded plugin "addChannel" from "@semantic-release/github"
[3:43:07 PM] [semantic-release] › ✔  Loaded plugin "success" from "@semantic-release/github"
[3:43:07 PM] [semantic-release] › ✔  Loaded plugin "fail" from "@semantic-release/github"
[3:43:09 PM] [semantic-release] › ℹ  This test run was triggered on the branch refs/pull/66/merge, while semantic-release is configured to only publish from main, therefore a new version won’t be published.

If next_version is none, your commits don't trigger a release. Use feat: for minor (breaking changes too, until launch), fix: / perf: for patch.

…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>
@Domantas
Domantas merged commit 20ebb74 into main Oct 23, 2026
8 checks passed
@Domantas
Domantas deleted the feat/clone-returns-id branch October 23, 2026 15:44
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.22.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant