Skip to content

feat(notifications): add Email stop / disable-dependencies / domain-health / preferences-by-link; remove campaign-message methods - #22

Merged
Domantas merged 3 commits into
mainfrom
feat/emails-coverage
Oct 3, 2026
Merged

Domantas merged 3 commits into
mainfrom
feat/emails-coverage

Conversation

@Domantas

@Domantas Domantas commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Email campaign (Norbix Emails coverage, item sdk). Python is untyped by design — nothing to regenerate.

  • Removed hub.notifications.get_email_campaign_message, get_sms_campaign_message, get_push_campaign_message (sync + async; their gateway route was deleted), with tests and docs rows.
  • Added hub.notifications.stop_email_campaign, get_email_disable_dependencies, check_email_integration_domain_health and hub.email.get_email_preferences_by_link (scope optional: the signed unsubscribe-link token is the key), sync + async, docs in docs/hub/notifications.md and docs/hub/email.md.
  • New tests/hub/test_email_routes.py mirroring test_push.py: 50 Email routes (routes and verbs from the gateway endpoint manifest) through the capture transport, surface guard, headers, no-credentials preferences call (sync + async), async-twin check.

Breaking: get_email_campaign_message, get_sms_campaign_message and get_push_campaign_message are removed. Use get_email_campaign_batch_notification / get_sms_campaign_batch_notification / get_push_campaign_batch_notification(id=campaign_id, batch_id=..., notification_id=...).

Expected release: v3.2.0 (minor; MinorUntilLaunchParser). Note: main already holds unreleased commits since v3.1.0 (feat(chat) remove ask_chat); if they release first, this becomes v3.3.0.

Tests: uv run pytest 677 passed, make typecheck clean, ruff check . clean.

Report: gateway branch audit/emails-sdk, docs/testing/testing-plan/13-emails/items/sdk.md

Follow-up 2026-10-02: one_click_unsubscribe (sync + async) now uses scope "optional"; two new no-credentials tests (red with "project"). 679 passed.

🤖 Generated with Claude Code

Domantas and others added 3 commits October 3, 2026 08:59
…teway route was deleted

The gateway removed the duplicate route
GET /{version}/notifications/{emails|sms|push}/campaigns/{campaignId}/messages/{notificationId}.
get_email_campaign_message, get_sms_campaign_message and
get_push_campaign_message (sync and async) are removed with their tests and
docs rows.

Breaking: hub.notifications.get_email_campaign_message,
get_sms_campaign_message and get_push_campaign_message are removed. Use
get_email_campaign_batch_notification / get_sms_campaign_batch_notification /
get_push_campaign_batch_notification(id=campaign_id, batch_id=...,
notification_id=...) instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ependencies, check_email_integration_domain_health, get_email_preferences_by_link

Four Email methods the gateway has and this SDK lacked (sync and async):
- hub.notifications.stop_email_campaign  POST .../email/campaigns/{Id}/stop
- hub.notifications.get_email_disable_dependencies  GET .../email/disable-dependencies
- hub.notifications.check_email_integration_domain_health  POST .../email/integrations/domain-health
- hub.email.get_email_preferences_by_link  GET /{version}/email/preferences
  (scope optional: the signed unsubscribe-link token is the key)

tests/hub/test_email_routes.py mirrors test_push.py: one case per Email
route (50, routes and verbs from the gateway endpoint manifest) through the
capture transport, a surface-size guard, the auth/project headers, the
no-credentials call for the preferences link (sync and async) and an
async-twin check. docs/hub/notifications.md and docs/hub/email.md list them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…works without a token

The gateway marks POST /{version}/email/one-click-unsubscribe as
requiresAuth false: the signed link in the e-mail is the key. With scope
"project" a client with no API key raised NORBIX_NOT_AUTHENTICATED. Sync and
async now use "optional" like get_email_preferences_by_link and the preview
links. Two new tests (sync, async): no credentials -> request sent, no
Authorization header (red with "project", green with "optional").

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Domantas
Domantas force-pushed the feat/emails-coverage branch from c5742d1 to 7616edc Compare October 3, 2026 05:59
@Domantas
Domantas merged commit ec588a9 into main Oct 3, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant