This commit is contained in:
2026-06-11 18:35:54 +03:00
parent db3b85adca
commit 85105f88d2
3 changed files with 13 additions and 1 deletions
+3 -1
View File
@@ -205,7 +205,7 @@ This file lists the current HTTP routes exposed by Core, grouped by access level
| Method | Route | Input | Output / Notes | | Method | Route | Input | Output / Notes |
| --- | --- | --- | --- | | --- | --- | --- | --- |
| `GET` | `/admin/settings/:category` | none | Returns settings for the given category (`panel`, `subscription`, `telegram`, `ipinfo`, `donation_alerts`) | | `GET` | `/admin/settings/:category` | none | Returns settings for the given category (`panel`, `subscription`, `telegram`, `ipinfo`, `donation_alerts`, `donatepay`) |
| `PATCH` | `/admin/settings/panel` | `PanelSettingsDto` | Updates panel settings | | `PATCH` | `/admin/settings/panel` | `PanelSettingsDto` | Updates panel settings |
| `PATCH` | `/admin/settings/subscription` | `SubscriptionSettingsDto` | Updates subscription delivery settings | | `PATCH` | `/admin/settings/subscription` | `SubscriptionSettingsDto` | Updates subscription delivery settings |
| `PATCH` | `/admin/settings/telegram` | `TelegramSettingsDto` | Updates Telegram bot settings | | `PATCH` | `/admin/settings/telegram` | `TelegramSettingsDto` | Updates Telegram bot settings |
@@ -213,6 +213,7 @@ This file lists the current HTTP routes exposed by Core, grouped by access level
| `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. | | `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/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. | | `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. |
| `PATCH` | `/admin/settings/donatepay` | `{ accessToken?: string, donationPageUrl?: string, commissionPercent?: number }` | Configures DonatePay transaction polling and optional commission. |
## Admin routes - broadcasts ## Admin routes - broadcasts
@@ -370,6 +371,7 @@ This file lists the current HTTP routes exposed by Core, grouped by access level
- `SubscriptionSettingsDto` - `allowedHosts?`, `rootPath?`, `updateInterval?`, `name?`, `supportUrl?`, `websiteUrl?` - `SubscriptionSettingsDto` - `allowedHosts?`, `rootPath?`, `updateInterval?`, `name?`, `supportUrl?`, `websiteUrl?`
- `TelegramSettingsDto` - `botToken?` - `TelegramSettingsDto` - `botToken?`
- `DonationAlertsSettingsDto` - `clientId?`, `clientSecret?`, `redirectUri?`, `donationPageUrl?`, `commissionPercent?` - `DonationAlertsSettingsDto` - `clientId?`, `clientSecret?`, `redirectUri?`, `donationPageUrl?`, `commissionPercent?`
- `DonatePaySettingsDto` - `accessToken?`, `donationPageUrl?`, `commissionPercent?`
### Broadcasts ### Broadcasts
+2
View File
@@ -19,6 +19,7 @@ This page is public operator documentation. It describes behavior, API, environm
- Platform settings management (panel, subscription delivery, Telegram, IP information provider). - Platform settings management (panel, subscription delivery, Telegram, IP information provider).
- User IP history with country, city, ISP, and ASN enrichment through IPinfo.io or ip-api.com. - User IP history with country, city, ISP, and ASN enrichment through IPinfo.io or ip-api.com.
- OAuth-based DonationAlerts integration with automatic token refresh and RUB balance deposits linked by user UUID. - OAuth-based DonationAlerts integration with automatic token refresh and RUB balance deposits linked by user UUID.
- DonatePay API integration with automatic RUB balance deposits linked by UUID in the donation comment.
- Telegram broadcast messages with user filtering and delivery tracking. - Telegram broadcast messages with user filtering and delivery tracking.
- Referral system with code-based self-approval for pending users. - Referral system with code-based self-approval for pending users.
- Audit logs, usage queries, metrics, and health checks. - Audit logs, usage queries, metrics, and health checks.
@@ -160,6 +161,7 @@ Missing or unknown `format` falls back to `v2ray`.
| `GET` | `/me/balance` | Current balance. | | `GET` | `/me/balance` | Current balance. |
| `GET` | `/me/balance/transactions` | User balance history. | | `GET` | `/me/balance/transactions` | User balance history. |
| `GET` | `/me/donation-alerts` | Safe DonationAlerts payment settings and the current user's UUID. | | `GET` | `/me/donation-alerts` | Safe DonationAlerts payment settings and the current user's UUID. |
| `GET` | `/me/donatepay` | Safe DonatePay payment settings and the current user's UUID. |
| `GET` | `/me/subscriptions` | User subscriptions. | | `GET` | `/me/subscriptions` | User subscriptions. |
| `GET` | `/me/links` | User subscription links. | | `GET` | `/me/links` | User subscription links. |
| `GET` | `/me/configs` | Available configs for the user. | | `GET` | `/me/configs` | Available configs for the user. |
+8
View File
@@ -72,6 +72,7 @@ This page is public operator documentation. It describes panel capabilities, rou
- Configure Telegram bot token. - Configure Telegram bot token.
- Configure the user IP information provider: IPinfo.io with an API token, or ip-api.com with Russian or English result language. English is the default for ip-api.com. - Configure the user IP information provider: IPinfo.io with an API token, or ip-api.com with Russian or English result language. English is the default for ip-api.com.
- Configure a DonationAlerts OAuth application with its client ID, client secret, generated callback URL, public donation page URL, and commission percentage. After saving, authorize it through DonationAlerts; access and refresh tokens are stored and refreshed automatically. - Configure a DonationAlerts OAuth application with its client ID, client secret, generated callback URL, public donation page URL, and commission percentage. After saving, authorize it through DonationAlerts; access and refresh tokens are stored and refreshed automatically.
- Configure DonatePay with an API token, public donation page URL, and an optional commission percentage.
### DonationAlerts Payments ### DonationAlerts Payments
@@ -82,6 +83,13 @@ This page is public operator documentation. It describes panel capabilities, rou
- Only positive whole-RUB donations are processed. The configured commission is deducted and the credited result is rounded down to whole RUB; other currencies and fractional gross amounts are skipped. - Only positive whole-RUB donations are processed. The configured commission is deducted and the credited result is rounded down to whole RUB; other currencies and fractional gross amounts are skipped.
- Donation IDs are stored as unique external transaction references, preventing duplicate credits. - Donation IDs are stored as unique external transaction references, preventing duplicate credits.
### DonatePay Payments
- Core checks successful DonatePay donations every 5 minutes, scanning the previous hour.
- The user UUID is read from the transaction `comment`; donations without exactly one valid UUID remain unassigned.
- Only positive whole-RUB donations are credited. The optional configured commission is deducted and rounded down.
- DonatePay transaction IDs are stored as provider-specific external references to prevent duplicate credits.
### User IP History ### User IP History
- View the number of recorded IP addresses on the admin user overview. - View the number of recorded IP addresses on the admin user overview.