feat: implement thin vertical slice of system-generated notifications (#13537)

This commit is contained in:
Danny Kopping
2024-07-08 15:38:50 +02:00
committed by GitHub
parent 10aa32ca08
commit bdd2caf95d
51 changed files with 3686 additions and 50 deletions
+6
View File
@@ -0,0 +1,6 @@
package types
type TemplateAction struct {
Label string `json:"label"`
URL string `json:"url"`
}
+19
View File
@@ -0,0 +1,19 @@
package types
// MessagePayload describes the JSON payload to be stored alongside the notification message, which specifies all of its
// metadata, labels, and routing information.
//
// Any BC-incompatible changes must bump the version, and special handling must be put in place to unmarshal multiple versions.
type MessagePayload struct {
Version string `json:"_version"`
NotificationName string `json:"notification_name"`
CreatedBy string `json:"created_by"`
UserID string `json:"user_id"`
UserEmail string `json:"user_email"`
UserName string `json:"user_name"`
Actions []TemplateAction `json:"actions"`
Labels map[string]string `json:"labels"`
}