Label: complexity: high
Points: 200
Description
Apps sending invoice event notifications must format messages manually. This issue adds a NotificationTemplate system with built-in templates for each invoice event type and support for custom template strings with variable interpolation.
Technical Context
Involves a new src/notificationTemplates.ts. Define built-in templates for created, payment, released, refunded, expiring events. renderTemplate(event: InvoiceEvent, template?: string): string interpolates {{invoiceId}}, {{amount}}, {{creator}} variables. Custom templates override built-ins.
Acceptance Criteria
Label: complexity: high
Points: 200
Description
Apps sending invoice event notifications must format messages manually. This issue adds a
NotificationTemplatesystem with built-in templates for each invoice event type and support for custom template strings with variable interpolation.Technical Context
Involves a new
src/notificationTemplates.ts. Define built-in templates forcreated,payment,released,refunded,expiringevents.renderTemplate(event: InvoiceEvent, template?: string): stringinterpolates{{invoiceId}},{{amount}},{{creator}}variables. Custom templates override built-ins.Acceptance Criteria
renderTemplate(event, template?): stringexported fromsrc/index.ts{{invoiceId}},{{amount}},{{creator}}variables interpolatedanytypes