feat: generic webhook provider with JSONPath payload extraction
Add a new "webhook" provider type that accepts arbitrary HTTP POST payloads, extracts template variables via user-defined JSONPath mappings, and dispatches notifications through the existing pipeline. Supports three auth modes (HMAC-SHA256, Bearer token, none), bounded JSONPath cache, and 1MB payload limit. Full stack: core provider + event parser, API endpoint, DB migration, capabilities, seeds, default templates (EN/RU), frontend descriptor, i18n.
This commit is contained in:
@@ -153,6 +153,7 @@ async def _seed_default_templates() -> None:
|
||||
await _seed_provider_template(session, "scheduler", "Scheduler")
|
||||
await _seed_provider_template(session, "nut", "NUT")
|
||||
await _seed_provider_template(session, "google_photos", "Google Photos")
|
||||
await _seed_provider_template(session, "webhook", "Generic Webhook")
|
||||
await session.commit()
|
||||
|
||||
|
||||
@@ -179,6 +180,9 @@ async def _seed_default_command_templates() -> None:
|
||||
await _seed_provider_command_template(
|
||||
session, "google_photos", "Default Google Photos Commands", "Default Google Photos command templates",
|
||||
)
|
||||
await _seed_provider_command_template(
|
||||
session, "webhook", "Default Webhook Commands", "Default Generic Webhook command templates",
|
||||
)
|
||||
await session.commit()
|
||||
|
||||
|
||||
@@ -229,6 +233,11 @@ async def _seed_default_tracking_configs() -> None:
|
||||
"name": "Default Scheduler",
|
||||
"track_scheduled_message": True,
|
||||
},
|
||||
{
|
||||
"provider_type": "webhook",
|
||||
"name": "Default Webhook",
|
||||
"track_webhook_received": True,
|
||||
},
|
||||
{
|
||||
"provider_type": "nut",
|
||||
"name": "Default NUT",
|
||||
@@ -309,6 +318,14 @@ async def _seed_default_command_configs() -> None:
|
||||
"default_count": 5,
|
||||
"rate_limits": {"api": 15, "default": 10},
|
||||
},
|
||||
{
|
||||
"provider_type": "webhook",
|
||||
"name": "Default Webhook",
|
||||
"enabled_commands": ["help", "status"],
|
||||
"response_mode": "text",
|
||||
"default_count": 5,
|
||||
"rate_limits": {"default": 10},
|
||||
},
|
||||
{
|
||||
"provider_type": "google_photos",
|
||||
"name": "Default Google Photos",
|
||||
|
||||
Reference in New Issue
Block a user