Commit Graph

456 Commits

Author SHA1 Message Date
KM Koushik 9e588e2e6b feat: submit contact add form with Cmd/Ctrl+Enter (#366) 2026-03-01 00:58:02 +11:00
KM Koushik e3e9635a5f feat: add customizable contact double opt-in flow (#350)
* feat: add customizable contact double opt-in flow

* test: add double opt-in service coverage

* fix: address review comments for double opt-in PR

- Make pending status conditional on doubleOptInEnabled flag
- Backfill legacy unsubscribeReason for reliable pending detection
- Add doubleOptInContent to contact book listing select
- Fix duplicate toast on DOI editor subject save failure
- Harden searchParams parsing against string[] values
- Make default DOI template use link mark for clickable URL
- Make public API create+update atomic via transaction
- Prevent contact upsert failure when DOI email send fails
- Fix empty string template variable replacement

Co-authored-by: opencode <opencode@anthropic.com>

* fix: harden double opt-in confirmation safeguards

Preserve explicit unsubscribe intent in DOI flows and prevent confirmation links from re-subscribing opted-out contacts. Also sanitize subscribe-page error messaging and use timing-safe hash comparison for link verification.

* ui stuff

* fix: require doubleOptInUrl in double opt-in templates

* feat: add configurable from address for double opt-in emails

* feat: add resend confirmation flow for pending contacts

* fix: move subscribe confirmation to explicit POST flow

* test: add contact book public API endpoint coverage

* docs: add double opt-in documentation and update OpenAPI spec

Add a user guide for the double opt-in feature covering setup, contact
statuses, email customization, template variables, and best practices.
Update the OpenAPI spec to include doubleOptIn fields in all contactBook
request/response schemas.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: opencode <opencode@anthropic.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 00:34:20 +11:00
KM Koushik edcd32a4ea fix: prevent premature webhook auto-disable and allow re-enable (#364)
* fix: prevent premature webhook auto-disable and allow re-enable

Use persisted failure counters when deciding auto-disable status and restore dashboard re-enable flow so webhooks are not deactivated unexpectedly after reset.

* fix: count webhook failures per failed call

Only increment consecutive failure counters after a call exhausts retries, while keeping the 30-call auto-disable threshold and stale-state protection.

* fix(docs): correct webhook SDK package name (#363)

* test: isolate webhook unit suite from mailer deps

Mock limit service in webhook unit tests so Vitest does not resolve team-service and mailer paths requiring usesend-js during CI.
2026-02-28 07:40:26 +11:00
KM Koushik 1c644740f2 fix(docs): correct webhook SDK package name (#363) 2026-02-28 07:15:04 +11:00
Dan b2ed09e7a7 feat: add API key editing functionality to the dashboard (#358)
- new edit button in /dev-settings
- new updateApiKey mutation in api router
- new edit dialog-component
- new update-function in api-service
- changed sorting of api-key query to avoid list items jumping after updates
2026-02-25 23:11:11 +11:00
KM Koushik 0c9ebc86a3 fix: preserve reply-to metadata when duplicating campaigns (#357) 2026-02-23 12:06:33 +11:00
KM Koushik 61dfcee67d fix: enforce team scoping for campaign, contacts, and invites (#356)
* fix: enforce team-scoped lookups for campaign contacts and invites

* fix(test): mock domain service in campaign security test
2026-02-23 11:30:05 +11:00
KM Koushik f7a0d11758 Fix webhook documentation link in changelog
Updated webhook documentation link to point to the correct URL.
2026-02-22 23:28:15 +11:00
KM Koushik 091b99cb10 Add v1.8.0 changelog entry with February 2025 updates (#348)
* docs: add v1.8.0 changelog with features since v1.7.0

Adds changelog entry covering webhooks, Python SDK, Contact Books API,
email retention/cleanup, idempotency support, and various improvements.

https://claude.ai/code/session_012hGggJSKqRZB4PkaaPAyrS

* update

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-22 22:19:41 +11:00
Manoj Naik 585cd23ba2 fix: sync suppression list removal with AWS SES (closes #324) (#331)
* fix: sync suppression list removal with AWS SES (closes #324)

When removing an email from the suppression list, now also removes it from
AWS SES account-level suppression list across all regions where the team
has domains configured.

- Add deleteFromSesSuppressionList helper to ses.ts
- Update removeSuppression to query team domains for unique regions
- Use best-effort pattern: AWS failures don't block local DB deletion
- Handle NotFoundException gracefully (email not in SES list)

* fix: correct failure detection logic for SES suppression removal

deleteFromSesSuppressionList returns false on error (never throws),
so check for fulfilled promises with value === false instead of
rejected status.

* fix: account for rejected promises in SES suppression removal

Updated the filter logic for Promise.allSettled to include 'rejected'
status as well as 'fulfilled' with a 'false' value. This ensures that
any errors occurring before the try block in deleteFromSesSuppressionList
are correctly caught and logged.
2026-02-17 07:49:03 +11:00
Vincent Vu ed4a429a1d fix(doc): Correct API reference in Go package documentation (#354)
* Correct API reference in Go package documentation

Updated description to reference the useSend API instead of Unsend API.

* Update documentation to reflect useSend branding

Added a issue to the package maintainer.

If maintainer isn't actively maintaining the package. Will fork it.

* fix(docs): remove community section and update Go SDK documentation

- Remove community section until content is ready.
- Update Go SDK docs to useSend implementation.
2026-02-17 07:43:13 +11:00
Dave Stockley 752fe5a183 feat: add get-campaigns docs (#351) 2026-02-16 16:27:44 +11:00
KM Koushik 487902421b feat: add web testing foundation with infra-backed suites (#349)
* feat: add web test framework with infra-backed suites

* fix: honor DATABASE_URL env in integration prepare script

* fix: apply web test review feedback

* fix: streamline web test infra lifecycle and workflow scope
2026-02-16 09:13:29 +11:00
KM Koushik 09bdb8aaad feat(python-sdk): add webhook verification and event handling (#344)
* feat(python-sdk): add webhook verification and event handling

Add webhook support to the Python SDK matching the JS SDK implementation:
- Add Webhooks class with verify() and construct_event() methods
- Implement HMAC-SHA256 signature verification with timing-safe comparison
- Add timestamp validation with configurable tolerance (default 5 minutes)
- Add comprehensive webhook event types (18 events: email, contact, domain, test)
- Add WebhookVerificationError with typed error codes
- Export webhook constants (headers) and types

* fix(python-sdk): harden webhook parsing and typing

Normalize invalid UTF-8 webhook payloads to INVALID_BODY errors so verify() safely returns false, and narrow base email webhook event types to avoid discriminated-union overlap. Add regression tests for both paths.

* chore(python-sdk): bump package version to 0.2.9

* feat(python-sdk): add local webhook test example project

Add a runnable Flask receiver and signed webhook sender under packages/python-sdk/example, and link it from the Python SDK README for local verification.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-08 08:18:14 +11:00
KM Koushik e246d32ef9 fix: prevent duplicate notification emails via atomic Redis SET NX (#346)
The warning and limit-reached notification emails were being sent
multiple times because of a race condition: concurrent workers could
both read the Redis cooldown key as empty (GET), both send emails,
then both set the key (SETEX). Replaced the non-atomic GET + SETEX
pattern with a single atomic SET ... NX EX that claims the cooldown
slot before any emails are sent. Also increased cooldown from 6 hours
to 24 hours so each notification is sent at most once per day.

https://claude.ai/code/session_01VBYXi5e64Vtq1cXWsfTYTw

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-01 07:24:02 +11:00
KM Koushik 1b3b8f5751 fix: add repository field for npm provenance 2026-01-18 22:08:26 +11:00
KM Koushik 4c4d150dba fix: configure npm OIDC trusted publishing correctly 2026-01-18 22:03:24 +11:00
KM Koushik b3b7bddafb Change publish command from pnpm to npm 2026-01-18 21:56:01 +11:00
KM Koushik b0575ea9fc Update release workflow with OIDC permissions
Added permissions for OIDC and updated job steps.
2026-01-18 21:54:08 +11:00
KM Koushik eed37d09c6 fix build 2026-01-18 21:44:25 +11:00
KM Koushik d3b6ba7c0a fix: add tsup config for SDK and bump version to 1.6.0 (#343) 2026-01-18 21:04:43 +11:00
KM Koushik 8676965019 feat: add webhooks (#334) 2026-01-18 20:50:54 +11:00
KM Koushik f40a311cc9 fix: enforce contact book ownership (#341) 2026-01-17 18:08:05 +11:00
Dave Stockley 6786ff003e feat: contact books public api (#336)
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-01-17 17:24:25 +11:00
Thiago Praxedes 83119f97c8 Refine suppression list to include only affected recipients (#339) 2026-01-17 17:00:43 +11:00
Dave Stockley 68d951c55a feat: v1/campaign public api endpoint (#335)
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2026-01-11 09:37:57 +11:00
KM Koushik bba9e937bb fix seg fault (#329) 2025-12-30 07:45:34 +11:00
KM Koushik 95dfa6b532 Upgrade Next.js to 15.5.9 (#326)
Co-authored-by: Claude <noreply@anthropic.com>
2025-12-18 06:48:24 +11:00
KM Koushik bef580ff92 use turbo in dev mode (#321) 2025-12-14 20:29:53 +11:00
KM Koushik 11b5ac1bf7 Fix bar chart hover on zero delivery days (#320)
Co-authored-by: Claude <noreply@anthropic.com>
2025-12-14 10:27:28 +11:00
KM Koushik 1e79f13bd4 add export contact book option (#318) 2025-12-14 10:08:54 +11:00
KM Koushik 461cd949e5 Fix Infinity% display bug in email chart (#319)
Co-authored-by: Claude <noreply@anthropic.com>
2025-12-14 09:35:05 +11:00
KM Koushik fd3c600b2e add upload contacts support (#314) 2025-12-13 08:15:42 +11:00
Vincent Vu 9c1c6f3538 fix(security): CVE-2025-55184, CVE-2025-55183 (#313) 2025-12-12 10:11:43 +11:00
KM Koushik 7fdb82a9e9 Fix version display in side navigation (#306)
Co-authored-by: Claude <noreply@anthropic.com>
2025-12-08 09:19:37 +11:00
KM Koushik 3e3f6d521a Display Docker image version in sidebar (#304)
Co-authored-by: Claude <noreply@anthropic.com>
2025-12-07 22:18:56 +11:00
Krish Parekh 641d5f36d2 Feat/code blocks with copy 2025-12-07 16:38:54 +11:00
KM Koushik b4640ac5e4 update mintlify (#302) 2025-12-07 07:48:33 +11:00
KM Koushik 693ec9c0ce bump nextjx version (#301) 2025-12-07 07:41:15 +11:00
Krish Parekh a3b7e4c877 refactor: replace Image component with Avatar for improved user display in TrustedBy section (#297) 2025-12-06 07:29:29 +11:00
KM Koushik d6be1af5b9 fix image position issue 2025-12-04 08:24:06 +11:00
KM Koushik e1b64d0d7b Add feedback dialog for cloud dashboard (#293) 2025-11-29 10:22:12 +11:00
Deepak S 357d561a8e "[feat] Emails retention periods/cleanup #158" (#286) 2025-11-29 08:13:41 +11:00
KM Koushik 05a02844b2 Update prisma version in start script 2025-11-21 20:14:05 +11:00
KM Koushik b2e0233758 fix: update docker node version (#290) 2025-11-20 18:08:07 +11:00
KM Koushik cb489654b5 idempotency (#282) 2025-11-17 11:42:09 +11:00
mino eacf231173 docs: add .env symlink setup instructions for apps/web (#287)
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-08 06:52:47 +11:00
KM Koushik f525381fb9 send free limit reached email for inactive plans 2025-10-26 11:05:51 +11:00
KM Koushik 7edff5b783 Add subscription ID search to admin team lookup (#284)
Co-authored-by: Claude <noreply@anthropic.com>
2025-10-26 09:40:11 +11:00
KM Koushik 4fe354b85a Fix free limits and email notifications for inactive users (#283)
Co-authored-by: Claude <noreply@anthropic.com>
2025-10-26 07:52:44 +11:00