Description
Implement and validate the actions array on the notification model, ensuring that both navigate and api_call action types are correctly stored, serialised, and returned via the API so the UI has everything it needs to render actionable buttons on a notification.
User Story
As a user viewing an alert notification, I want to see one or more action buttons (e.g. "Go to host", "Acknowledge") so that I can act on the notification directly without having to navigate manually.
Acceptance Criteria
Definition of Done
Assumptions and Constraints
- Assumption: The UI is responsible for executing
api_call actions — the backend does not proxy or validate that the target path exists.
- Constraint: Action payloads are
map[string]string only at this stage. No nested objects or typed values.
Dependencies
No response
Additional Notes
No response
Description
Implement and validate the
actionsarray on the notification model, ensuring that bothnavigateandapi_callaction types are correctly stored, serialised, and returned via the API so the UI has everything it needs to render actionable buttons on a notification.User Story
As a user viewing an alert notification, I want to see one or more action buttons (e.g. "Go to host", "Acknowledge") so that I can act on the notification directly without having to navigate manually.
Acceptance Criteria
typevalues (anything other thannavigateorapi_call) are rejected with a descriptive error at dispatch time.navigateaction validated: Must have a non-emptytarget(a UI route string).methodandpayloadmust be absent or null.api_callaction validated: Must have a non-emptytarget(relative API path) and a validmethod(GET,POST,PUT,PATCH,DELETE).payloadis optional.actionsarray is stored and returned as[]notnull.actionsarray is included in thenotification.createdWebSocket message.actionsarray is included in all responses fromGET /notifications.payloadmaps.Definition of Done
Assumptions and Constraints
api_callactions — the backend does not proxy or validate that thetargetpath exists.map[string]stringonly at this stage. No nested objects or typed values.Dependencies
No response
Additional Notes
No response