feat(communications): unified CommunicationTemplate CRUD and orchestration#1508
Open
kkopanidis wants to merge 1 commit into
Open
feat(communications): unified CommunicationTemplate CRUD and orchestration#1508kkopanidis wants to merge 1 commit into
kkopanidis wants to merge 1 commit into
Conversation
…ation Wire template resolution into orchestrated sends, admin REST and gRPC CRUD, GitOps import validation, and grpc-sdk client methods so templateName resolves CommunicationTemplate first with EmailTemplate email fallback.
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.
Problem
Unified
CommunicationTemplatedocuments existed in schema and GitOps export, but operators could not manage them via Admin API or gRPC, andtemplateNameon orchestrated sends was ignored. Email-only templates and multi-channel sends could not share a single resolution path.Summary
CommunicationTemplateServicewith validation, Handlebars resolution, and email-template migration helper/communications/templatesplustemplateNameon/send/multiple,/send/fallback, and new/communications/sendRegisterCommunicationTemplateimplementationCommunicationTemplatefirst,EmailTemplatefallback for email (preserves external-managed email path)communication_templates_totalmetric and unified send counters on orchestrated pathstemplateNameon send helpersWhat kind of change does this PR introduce?
Does this PR introduce a breaking change?
The PR fulfills these requirements:
mainbranchTest plan
POST /communications/templates— create email+push template; verify variables auto-extractedGET/PATCH/DELETE /communications/templates/:id— round-trip CRUDPOST /communications/sendwithtemplateName— single-channel send renders template contentPOST /send/multiplewithtemplateName— per-channel rendered contenttemplateNamematching onlyEmailTemplate— email still sends (external-managed path intact)EmailTemplate— expectALREADY_EXISTScommunicationTemplatesrecord with invalid channel/content — record fails with descriptive errorPOST /communications/templates/migrate-from-emailwithdryRun: true— returns planned documentsRegisterCommunicationTemplate+ListCommunicationTemplatesreturn persisted JSON