mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-23 12:46:42 +02:00
✨ feat(api-gateway): add Swagger, admin endpoints, and scheduler
- Add Swagger/OpenAPI documentation at /docs endpoint - Add admin module for system-wide API key management - Add scheduler for monthly credit reset and usage cleanup - Add Docker Compose entry for Mac Mini deployment - Document all endpoints with descriptions and examples
This commit is contained in:
parent
4b322f59b1
commit
fc0ed636fc
21 changed files with 1059 additions and 1 deletions
|
|
@ -1,7 +1,14 @@
|
|||
import { IsOptional, IsString, IsDateString, IsInt, Min, Max } from 'class-validator';
|
||||
import { Transform } from 'class-transformer';
|
||||
import { ApiPropertyOptional } from '@nestjs/swagger';
|
||||
|
||||
export class UsageQueryDto {
|
||||
@ApiPropertyOptional({
|
||||
description: 'Number of days to query (1-365)',
|
||||
minimum: 1,
|
||||
maximum: 365,
|
||||
default: 30,
|
||||
})
|
||||
@IsOptional()
|
||||
@Transform(({ value }) => parseInt(value, 10))
|
||||
@IsInt()
|
||||
|
|
@ -9,14 +16,26 @@ export class UsageQueryDto {
|
|||
@Max(365)
|
||||
days?: number = 30;
|
||||
|
||||
@ApiPropertyOptional({
|
||||
description: 'Start date for custom range (ISO 8601)',
|
||||
example: '2025-01-01',
|
||||
})
|
||||
@IsOptional()
|
||||
@IsDateString()
|
||||
startDate?: string;
|
||||
|
||||
@ApiPropertyOptional({
|
||||
description: 'End date for custom range (ISO 8601)',
|
||||
example: '2025-01-31',
|
||||
})
|
||||
@IsOptional()
|
||||
@IsDateString()
|
||||
endDate?: string;
|
||||
|
||||
@ApiPropertyOptional({
|
||||
description: 'Filter by endpoint',
|
||||
example: 'search',
|
||||
})
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
endpoint?: string;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue