feat: Google Photos provider backend + API hardening
- Add Google Photos provider: client, models, change detector, capabilities - Add notification templates (en/ru) for all GP event slots - Add command templates (en/ru) for GP bot commands - Register GP in slot/command loaders, capabilities, and seeds - Harden provider API: validate OAuth credentials on create/update - Add internal URL rewriting for asset fetches (LAN optimization) - Fix template renderer to handle missing variables gracefully - Improve webhook command routing for multi-provider support - Add provider health check endpoint and watcher improvements
This commit is contained in:
@@ -152,6 +152,7 @@ async def _seed_default_templates() -> None:
|
||||
await _seed_provider_template(session, "planka", "Planka")
|
||||
await _seed_provider_template(session, "scheduler", "Scheduler")
|
||||
await _seed_provider_template(session, "nut", "NUT")
|
||||
await _seed_provider_template(session, "google_photos", "Google Photos")
|
||||
await session.commit()
|
||||
|
||||
|
||||
@@ -175,6 +176,9 @@ async def _seed_default_command_templates() -> None:
|
||||
await _seed_provider_command_template(
|
||||
session, "nut", "Default NUT Commands", "Default NUT command templates",
|
||||
)
|
||||
await _seed_provider_command_template(
|
||||
session, "google_photos", "Default Google Photos Commands", "Default Google Photos command templates",
|
||||
)
|
||||
await session.commit()
|
||||
|
||||
|
||||
@@ -305,6 +309,16 @@ async def _seed_default_command_configs() -> None:
|
||||
"default_count": 5,
|
||||
"rate_limits": {"api": 15, "default": 10},
|
||||
},
|
||||
{
|
||||
"provider_type": "google_photos",
|
||||
"name": "Default Google Photos",
|
||||
"enabled_commands": [
|
||||
"help", "status", "albums", "latest", "search", "random",
|
||||
],
|
||||
"response_mode": "media",
|
||||
"default_count": 5,
|
||||
"rate_limits": {"search": 30, "default": 10},
|
||||
},
|
||||
]
|
||||
|
||||
for cfg in defaults:
|
||||
|
||||
Reference in New Issue
Block a user