Repository navigation
feat(integriq): build messaging-sms-providers-and-notifynl-mail - #3628
Merged
rubenvdlinde merged 18 commits intoNov 17, 2026
Merged
rubenvdlinde merged 18 commits into
rubenvdlinde merged 18 commits into
Conversation
…fynl-mail [skip ci] Assisted-by: ClaudeCode:claude-opus-5-5
… ci] Task 5: a caller names the SMS source with sourceSlug; a slug that is not an enabled SMS source is refused (400 unknown-source) before anything is stored or sent; the sending source's slug is stored on sms_message (1.1.0) and shown on the SMS page, and a status read goes through that source. GET /api/sms/providers lists the registry's bindings with name and config schema, and the source form gets an SMS provider picker built from it, with the picked provider's settings. Assisted-by: ClaudeCode:claude-opus-5-5
… ci]
Task 6: vendor delivery callbacks. POST /api/sms/{provider}/status/{token} (public, rate limited, a standard-protocol path so the signed URL is left as is) picks the source by its per-source token in constant time before reading the body; Twilio's X-Twilio-Signature and MessageBird's MessageBird-Signature-JWT are verified with the source's signing key; a checked status goes to handleStatusCallback, which leaves an unknown id unchanged. An SMS source gets its random token on save, and a typed signing key is stored encrypted. The source form shows the callback URL and the signing key field.
Assisted-by: ClaudeCode:claude-opus-5-5
Assisted-by: ClaudeCode:claude-opus-5-5
… ci] Task 7: NotifyNL e-mail. RestNotifyNlProvider::sendEmail() posts to /v2/notifications/email; POST /api/notifynl/emails (action notifynl.email) validates the address before anything is sent or recorded, asks the opt-out list, opens the outbound log row on channel notifynl, sends with the row uuid as NotifyNL's reference and hands the row over with NotifyNL's id. notifyNl#inbound falls back from sms_message to that row and moves the recipient the id was handed over for. Assisted-by: ClaudeCode:claude-opus-5-5
…fynl-mail [skip ci] Assisted-by: ClaudeCode:claude-opus-5-5
rubenvdlinde
requested review from
Rem-Dam,
SudoThijn,
WilcoLouwerse,
bbrands02,
remko48 and
rjzondervan
as code owners
November 14, 2026 16:05
…ogue tail [skip ci] Assisted-by: ClaudeCode:claude-opus-5-5
…ed catalogue tail [skip ci] Assisted-by: ClaudeCode:claude-opus-5-5
…fynl-mail [skip ci] integriq_register.json: info.version 1.2.1, above development's 1.2.0, so the register import still runs for this branch's schema change. Assisted-by: ClaudeCode:claude-opus-5-5
…r steps [skip ci] SmsDispatchService::sendMessage, NotifyNlEmailService::sendEmail and CmComSmsProvider::readStatusCallback each hand a self-contained step (recipient normalisation, the opt-out check, the unsubscribe text, the queued record, the log-row settlement, the report flattening) to a private helper. Same order of calls, same values, same exceptions. Assisted-by: ClaudeCode:claude-opus-5-5
…fynl-mail [skip ci]
…inability floor [skip ci] NotifyNlEmailService and SmsStatusCallbackService each repeated the enabled-source search ActiveSourceLookup already ran. ActiveSourceLookup now offers it as enabledQuery() and resultsOf(), and all three use it. The search, its filters and limits, and every refusal are unchanged. Assisted-by: ClaudeCode:claude-opus-5-5
Assisted-by: ClaudeCode:claude-opus-5-5
…nd-notifynl-mail [skip ci]
…, not classes [skip ci] The controllers and the SMS source listener reached SmsDispatchService, NotifyNlEmailService, SmsStatusCallbackService and SmsProviderRegistry directly, and NotifyNlEmailService reached MessageRecorder, which exposed about 1000 lines across components and put the tree that would land at 3.54, under integriq's 3.56 maintainability floor. They now take NotifyNlEmailServiceInterface, SmsStatusCallbackServiceInterface, SmsProviderRegistryInterface and MessageRecorderInterface, bound next to the existing aliases; the constants callers read (SOURCE_TYPE, ERROR_UNKNOWN_SOURCE, ERROR_INVALID_ADDRESS, ERROR_MISSING_TEMPLATE, TOKEN_KEY, SIGNING_KEY) move onto the contracts, so Class::CONST keeps resolving. No method body, value or route changed. Estimated maintainability after merge: 3.56 to 3.65. Assisted-by: ClaudeCode:claude-opus-5-5
…fynl-mail [skip ci] Keeps the branch's queueMessage() helper and saves through development's RegisterSave::options() (openregister main object API). Assisted-by: ClaudeCode:claude-opus-5-5
…e sent [skip ci] SmsStatusCallbackService resolved the source from the callback token but handed only the provider message id on, so a callback through one source could set the status of a message another source sent. handleStatusCallback takes the source (slug and provider) as an optional last argument and matches the message on its stored sourceSlug; a message stored without one matches a source of its provider. Callers without a source are unchanged. Assisted-by: ClaudeCode:claude-opus-5-5
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.
Continues
openspec/changes/messaging-sms-providers-and-notifynl-mailafter #3563 (tasks 1 to 4 and 8). This builds the remaining code tasks 5, 6 and 7.Tasks done
sendMessage()takessourceSlug; a slug that is not an enabled source of typesmsis refused (unknown-source, 400) before anything is stored or sent. The sending source's slug is stored onsms_message(schema 1.1.0) and shown as a column on the SMS page, and a status read goes through that source.GET /api/sms/providerslists the registry's bindings with name and config schema; the source form gets an SMS provider picker built from it, showing the picked provider's settings.smsjoins the form's type list.POST /api/sms/{provider}/status/{token}(public, rate limited, kept as a standard-protocol path so the URL a vendor signs is not rewritten). The per-source token picks the source in constant time before the body is read; Twilio and MessageBird signatures are verified with the source's signing key; a checked status goes tohandleStatusCallback(), which leaves an unknown id unchanged. A save listener gives an SMS source its token and stores a typed signing key encrypted. The form shows the callback URL and a signing key field.RestNotifyNlProvider::sendEmail()posts to/v2/notifications/email.POST /api/notifynl/emails(new actionnotifynl.email) validates the address first, asks the opt-out list, opens the outbound log row on channelnotifynl, sends with the row uuid as NotifyNL's reference and hands the row over with NotifyNL's id.notifyNl#inboundfalls back fromsms_messageto that row and moves the recipient the id was handed over for.Tasks left
tests/e2e/sms-providers.spec.tsfor tasks 5 to 7 and one live send per vendor: browser and vendor accounts needed, not done here.Tests added
SmsProvidersController(2), NotifyNL controller send/e-mail/inbound paths (10), the three vendors' callback signature checks and status mapping (20),SmsStatusCallbackService(4),SmsStatusController(3),SmsSourceCallbackListener(3),NotifyNlEmailService(10),RestNotifyNlProvider::sendEmail()(2).Suite before/after
tests/validate-register.jspasses.Generated by Claude Code