This commit is contained in:
2026-06-11 18:23:31 +03:00
parent bfc3628e09
commit db3b85adca
3 changed files with 18 additions and 1 deletions
+6 -1
View File
@@ -51,6 +51,7 @@ This file lists the current HTTP routes exposed by Core, grouped by access level
| `GET` | `/me/node-protocols` | none | Available node protocols for the current user |
| `GET` | `/me/balance` | none | `{ balance }` |
| `GET` | `/me/balance/transactions` | none | User balance transaction history |
| `GET` | `/me/donation-alerts` | none | Returns configured state, donation page URL, displayed commission, `RUB`, and the current user's UUID. Never returns the access token. |
| `GET` | `/me/subscriptions` | none | User subscriptions |
| `GET` | `/me/links` | none | All user subscription links |
| `GET` | `/me/configs` | none | Available node/protocol configs for the current user |
@@ -204,11 +205,14 @@ This file lists the current HTTP routes exposed by Core, grouped by access level
| Method | Route | Input | Output / Notes |
| --- | --- | --- | --- |
| `GET` | `/admin/settings/:category` | none | Returns settings for the given category (`panel`, `subscription`, `telegram`, `ipinfo`) |
| `GET` | `/admin/settings/:category` | none | Returns settings for the given category (`panel`, `subscription`, `telegram`, `ipinfo`, `donation_alerts`) |
| `PATCH` | `/admin/settings/panel` | `PanelSettingsDto` | Updates panel settings |
| `PATCH` | `/admin/settings/subscription` | `SubscriptionSettingsDto` | Updates subscription delivery settings |
| `PATCH` | `/admin/settings/telegram` | `TelegramSettingsDto` | Updates Telegram bot settings |
| `PATCH` | `/admin/settings/ipinfo` | `{ provider?: "ipinfo" \| "ip-api", token?: string, language?: "ru" \| "en" }` | Updates the IP information provider settings. `token` is required by IPinfo.io; `language` is used by ip-api.com and defaults to `en`. The route name is retained for compatibility. |
| `PATCH` | `/admin/settings/donation-alerts` | `{ clientId?: string, clientSecret?: string, redirectUri?: string, donationPageUrl?: string, commissionPercent?: number }` | Saves DonationAlerts OAuth application and payment settings. Changing OAuth credentials clears existing tokens. |
| `POST` | `/admin/payments/donation-alerts/authorization-url` | none | Creates a short-lived OAuth state and returns the DonationAlerts authorization URL with `oauth-donation-index` scope. |
| `POST` | `/admin/payments/donation-alerts/callback` | `{ code: string, state: string }` | Exchanges an OAuth callback code for access and refresh tokens. Access tokens are refreshed automatically. |
## Admin routes - broadcasts
@@ -365,6 +369,7 @@ This file lists the current HTTP routes exposed by Core, grouped by access level
- `PanelSettingsDto` - `allowedHosts?`, `rootPath?`
- `SubscriptionSettingsDto` - `allowedHosts?`, `rootPath?`, `updateInterval?`, `name?`, `supportUrl?`, `websiteUrl?`
- `TelegramSettingsDto` - `botToken?`
- `DonationAlertsSettingsDto` - `clientId?`, `clientSecret?`, `redirectUri?`, `donationPageUrl?`, `commissionPercent?`
### Broadcasts