alerts: Teams webhook fan-out (contract 0.14.0) + printedparts detail revision column

send_webhook(title,text) posts alerts to an optional webhook (Teams Incoming
Webhook / Workflow, or generic JSON) via alert_webhook_url + alert_webhook_format
settings; send_alert fans out to it alongside email; exposed on shopdb.api
(0.13.0->0.14.0, PLUGIN-HOOKS synced); low-stock posts on its custom-recipient
path too. Also: recent-transactions table shows the consumed print-file revision.
This commit is contained in:
cproudlock
2026-07-22 10:21:42 -04:00
parent d141fef203
commit 38c7ec347b
9 changed files with 162 additions and 11 deletions

View File

@@ -838,6 +838,23 @@ def build_default_settings():
'description': 'Public base URL of this site (e.g. '
'https://host/ops), used to build links in emails'
},
{
'key': 'alert_webhook_url',
'value': '',
'valuetype': 'string',
'category': 'email',
'description': 'Optional webhook URL alerts also POST to (e.g. a '
'Microsoft Teams Incoming Webhook or Workflow)'
},
{
'key': 'alert_webhook_format',
'value': 'teams',
'valuetype': 'string',
'category': 'email',
'description': 'Alert webhook payload format: teams (classic '
'Incoming Webhook), adaptivecard (Teams Workflow), '
'or json (generic {title,text})'
},
# Audit log settings
{
'key': 'audit_retention_days',