89 lines
3.5 KiB
Python
89 lines
3.5 KiB
Python
"""Provider registry — drives integration UI cards and agent help text."""
|
|
from __future__ import annotations
|
|
|
|
PROVIDER_REGISTRY: dict[str, dict] = {
|
|
"strava": {
|
|
"name": "Strava",
|
|
"type": "oauth2",
|
|
"fields": ["client_id", "client_secret"],
|
|
"auth_url": "https://www.strava.com/oauth/authorize",
|
|
"token_url": "https://www.strava.com/oauth/token",
|
|
"scopes": "read,activity:read_all",
|
|
"help_url": "https://developers.strava.com/",
|
|
"help_text": "Create an app at developers.strava.com. Set the callback URL to {BASE_URL}/api/integrations/strava/callback",
|
|
},
|
|
"polar": {
|
|
"name": "Polar",
|
|
"type": "oauth2",
|
|
"fields": ["client_id", "client_secret"],
|
|
"auth_url": "https://flow.polar.com/oauth2/authorization",
|
|
"token_url": "https://polarremote.com/v2/oauth2/token",
|
|
"help_url": "https://admin.polaraccesslink.com/",
|
|
"help_text": "Register at admin.polaraccesslink.com",
|
|
},
|
|
"garmin": {
|
|
"name": "Garmin Connect",
|
|
"type": "oauth2",
|
|
"fields": ["client_id", "client_secret"],
|
|
"help_url": "https://developer.garmin.com/gc-developer-program/",
|
|
"help_text": "Apply at developer.garmin.com — approval takes 1-4 weeks",
|
|
},
|
|
"fitbit": {
|
|
"name": "Fitbit",
|
|
"type": "oauth2",
|
|
"fields": ["client_id", "client_secret"],
|
|
"auth_url": "https://www.fitbit.com/oauth2/authorize",
|
|
"token_url": "https://api.fitbit.com/oauth2/token",
|
|
"help_url": "https://dev.fitbit.com/",
|
|
"help_text": "Register at dev.fitbit.com",
|
|
},
|
|
"withings": {
|
|
"name": "Withings",
|
|
"type": "oauth2",
|
|
"fields": ["client_id", "client_secret"],
|
|
"help_url": "https://developer.withings.com/",
|
|
"help_text": "Register at developer.withings.com — body metrics, scales, blood pressure",
|
|
},
|
|
"whoop": {
|
|
"name": "WHOOP",
|
|
"type": "oauth2",
|
|
"fields": ["client_id", "client_secret"],
|
|
"help_url": "https://developer.whoop.com/",
|
|
"help_text": "Apply at developer.whoop.com — recovery, strain, sleep",
|
|
},
|
|
"oura": {
|
|
"name": "Oura Ring",
|
|
"type": "oauth2",
|
|
"fields": ["client_id", "client_secret"],
|
|
"help_url": "https://cloud.ouraring.com/v2/docs",
|
|
"help_text": "Register at cloud.ouraring.com — sleep, readiness, HRV",
|
|
},
|
|
"usda": {
|
|
"name": "USDA FoodData Central",
|
|
"type": "api_key",
|
|
"fields": ["api_key"],
|
|
"help_url": "https://fdc.nal.usda.gov/api-key-signup",
|
|
"help_text": "Free API key, no approval needed. 400K+ foods with research-grade nutrition data.",
|
|
},
|
|
"nutritionix": {
|
|
"name": "Nutritionix",
|
|
"type": "api_key",
|
|
"fields": ["app_id", "api_key"],
|
|
"help_url": "https://developer.nutritionix.com/",
|
|
"help_text": "Free tier: 1K calls/month. Natural language food parsing.",
|
|
},
|
|
"groq": {
|
|
"name": "Groq (Program Research)",
|
|
"type": "api_key",
|
|
"fields": ["api_key"],
|
|
"help_url": "https://console.groq.com/keys",
|
|
"help_text": "Free API key. Enables AI-powered workout program extraction.",
|
|
},
|
|
"telegram": {
|
|
"name": "Telegram Notifications",
|
|
"type": "api_key",
|
|
"fields": ["bot_token", "chat_id"],
|
|
"help_url": "https://core.telegram.org/bots#botfather",
|
|
"help_text": "Create a bot via @BotFather, then get your chat ID",
|
|
},
|
|
}
|