Repository navigation
feat(email): a command, a route test and a doc line for every Email endpoint - #30
Merged
Merged
Conversation
… batch-notification route
4.4.0 is the published release with every Email method. It drops
getPushCampaignMessage / getSmsCampaignMessage because the gateway removed
GET /campaigns/{campaignId}/messages/{notificationId}. `push campaign message`
and `sms campaign message` keep their arguments and now read the same
notification from GET /campaigns/{id}/batches/{batchId}/{notificationId}, so
scripts that use them keep working. Route counts: push 37, sms 34.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The guard for SDKs older than 1.3.0 is dead (the CLI requires @norbix.ai/ts ^4.4.0), and its fallback line told users to run `norbix api "<path>" --hub --method POST` — `api` takes plain words, not a path; the raw path command is `norbix raw`. Same change `sms stop` got in #29. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… from a terminal 37 new commands next to the 9 that existed, shaped like their push / SMS twins: email enable / disable / disable-dependencies / settings; email integrations, integration <id>, integration save / enable / disable / default / delete / test / confirm-delivery / domain-health; email validation save / test; email footers, footer <id>, footer save / delete; email signatures, signature <id>, signature save / delete; email system-templates, system-template <id>; email template create / update / tokens / render / attach; email campaign create / delete / batches / batch / messages; email preview (signed link with no login, or a notification id with a login). `email campaign create` follows the push shape (campaign.source), with the five Email audiences: all-users, users, account-users, emails, collection. Template bodies are MJML with Razor tokens; --body-file / --content-file read them from a file, because Razor code itself starts with `@`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-transport route test for 48 routes tests/email-existing.test.ts covers the 9 commands that shipped with no test (and pins that `email stop` no longer prints the `norbix api` fallback — red on the old command, green now); tests/email.test.ts the new ones, the signed-link preview with no login, and that every sms command has an email twin; tests/email-routes.test.ts runs every command through oclif and the real @norbix.ai/ts transport with fetch replaced, asserting verb + resolved path (48 distinct routes) and the request bodies: Fake integration save, the validation provider sent by name, the MJML template translation, and the five campaign audiences on the wire. Suite: 10 files, 369 tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…and-less list; README and COVERAGE rows COVERAGE: email 48/51 (the three without a command are the recipient's preferences page, the mail client's one-click unsubscribe and the Mailgun webhook — reasons in docs/email.md); sms 34/34 after the campaign-message route was removed; the version note says ^4.4.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The three examples of the raw path command started with `norbix api` (the plain-words command, which does not take a path) and two of them passed `--hub`, a flag `raw` does not have (the hub is its default; `--api` picks the data-plane service). tests/examples.test.ts checks that every example of every CLI command starts with that command — red on the old raw examples, green now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Without it oclif shows the first subcommand's description for the topic. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Only the two `preview` rows share a route (49 rows, 48 routes); `--stats` and the two `batch` rows each have their own path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
🎉 This PR is included in version 1.4.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.
A
norbix emailcommand, a route test and a doc line for every Email endpoint a developer calls from a terminal — the Email twin of #29 (SMS).What changed
@norbix.ai/ts^4.2.0 → ^4.4.0 (published; has every Email method). 4.4.0 droppedgetPushCampaignMessage/getSmsCampaignMessagebecause the gateway removedGET /campaigns/{campaignId}/messages/{notificationId};push campaign messageandsms campaign messagekeep their arguments and now read the same notification fromGET /campaigns/{id}/batches/{batchId}/{notificationId}. No command was removed.email preview(signed link with no login, or--notification <id>with a login).email stopcallsstopEmailCampaigndirectly; its dead old-SDK guard printed a wrongnorbix api "<path>"fallback.rawhelp examples printednorbix api …and a--hubflagrawdoes not have; nownorbix raw …. A new test checks that every example of every command starts with its own command.docs/email.md(one line per command, plus the 3 routes with no command and why: the recipient's preferences page, the mail client's one-click unsubscribe, the Mailgun webhook); README and COVERAGE rows (email 48/51, sms 34/34).Test evidence (after
git rebase origin/main, a no-op):npx tsc --noEmitclean;npm test11 files, 370 tests passed (was 7 files / 225 on main).tests/email-routes.test.tsruns every email command through oclif and the real SDK transport withfetchreplaced — 48 distinct verb + path pairs, plus the request bodies. Only the Fake provider is ever saved; nothing leaves the process.Expected version: v1.3.0 → v1.4.0 (
feat→ minor; nothing breaking).Campaign item file:
docs/testing/testing-plan/13-emails/items/cli.mdon gateway branchaudit/emails.🤖 Generated with Claude Code