feat(api): implement persistent messaging and graceful draining

Add shared sessions, cached message history and transactional idempotency backed by PostgreSQL. Return readiness 503 during draining and finish in-flight requests before closing dependencies.
This commit is contained in:
2026-10-29 11:46:28 +03:00
parent 298204dbe9
commit 24f32c3fbe
35 changed files with 2102 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
import { ApiProperty } from '@nestjs/swagger';
export class CreateUserDto {
@ApiProperty({ example: 'alice', pattern: '^[a-z0-9_]{3,32}$' })
username!: string;
@ApiProperty({ example: 'Алиса', maxLength: 100 })
display_name!: string;
@ApiProperty({
writeOnly: true,
minLength: 12,
maxLength: 128,
example: 'Example-only-not-a-real-secret-123',
})
password!: string;
}
export class User {
@ApiProperty({ format: 'uuid' })
id!: string;
@ApiProperty({ pattern: '^[a-z0-9_]{3,32}$' })
username!: string;
@ApiProperty({ minLength: 1, maxLength: 100 })
display_name!: string;
@ApiProperty({ format: 'date-time' })
created_at!: string;
}