feat(gateway): include production Telegram user gateway

Version the NestJS TDLib gateway with Docker deployment, migrations, automated tests and platform integration documentation while excluding all account sessions, credentials, runtime databases and backups.
This commit is contained in:
wmq
2026-08-01 18:38:20 +08:00
parent af49d22ca7
commit 06112602ec
142 changed files with 23107 additions and 7 deletions
@@ -0,0 +1,48 @@
import { Controller, Get, UseGuards } from '@nestjs/common';
import { ApiTags, ApiOperation } from '@nestjs/swagger';
import { SetMetadata } from '@nestjs/common';
import { AdminService } from './admin.service';
import { IS_PUBLIC_KEY } from '../../common/guards/jwt-auth.guard';
import { JwtAuthGuard } from '../../common/guards/jwt-auth.guard';
import { CurrentUser } from '../../common/decorators/current-user.decorator';
@ApiTags('Admin')
@Controller('admin')
export class AdminController {
constructor(private readonly adminService: AdminService) {}
@Get('health')
@SetMetadata(IS_PUBLIC_KEY, true)
@ApiOperation({ summary: 'Health check endpoint' })
health() {
return this.adminService.getHealth();
}
@Get('ready')
@SetMetadata(IS_PUBLIC_KEY, true)
@ApiOperation({ summary: 'Database and Redis readiness check' })
ready() {
return this.adminService.getReadiness();
}
@Get('metrics')
@UseGuards(JwtAuthGuard)
@ApiOperation({ summary: 'Application metrics' })
metrics(@CurrentUser('tenantId') tenantId: string) {
return this.adminService.getMetrics(tenantId);
}
@Get('status')
@UseGuards(JwtAuthGuard)
@ApiOperation({ summary: 'TDLib client status' })
status(@CurrentUser('tenantId') tenantId: string) {
return this.adminService.getClientStatus(tenantId);
}
@Get('alerts')
@UseGuards(JwtAuthGuard)
@ApiOperation({ summary: 'Evaluate active operational alerts' })
alerts(@CurrentUser('tenantId') tenantId: string) {
return this.adminService.getAlerts(tenantId);
}
}