feat: добавить базовые сервисы image-platform

- добавлены backend, admin, gateway и worker skeleton
- добавлены Drizzle schema, database package и initial migration
- добавлены shared packages для RabbitMQ topology и S3 helpers
- обновлены dev-инфраструктура, env example, scripts и dependencies
- обновлена документация под versioned image URLs и read-through flow
This commit is contained in:
2026-05-05 09:59:21 +03:00
parent 37592c8b81
commit bcadb85a83
66 changed files with 8698 additions and 213 deletions

View File

@@ -0,0 +1,21 @@
import { ApiProperty } from "@nestjs/swagger"
export class EnsureImageVariantRequestDto {
@ApiProperty({ example: "asset_123" })
assetId!: string
@ApiProperty({ example: 4, minimum: 1 })
version!: number
@ApiProperty({ example: "card" })
preset!: string
@ApiProperty({ example: 640, minimum: 1 })
width!: number
@ApiProperty({ example: 80, minimum: 1 })
quality!: number
@ApiProperty({ enum: ["auto", "avif", "webp", "jpg", "png"], example: "auto" })
format!: "auto" | "avif" | "jpg" | "png" | "webp"
}

View File

@@ -0,0 +1,19 @@
import { Body, Controller, NotImplementedException, Post } from "@nestjs/common"
import { ApiOperation, ApiResponse, ApiTags } from "@nestjs/swagger"
import { EnsureImageVariantRequestDto } from "./ensure-image-variant.dto"
@ApiTags("internal-images")
@Controller("internal/images")
export class InternalImagesController {
@Post("ensure")
@ApiOperation({ summary: "Ensure image variant for Gateway L1 miss" })
@ApiResponse({ status: 501, description: "Read-through image pipeline is not implemented yet" })
ensureImageVariant(@Body() request: EnsureImageVariantRequestDto): never {
throw new NotImplementedException({
message: "image read-through pipeline is not implemented yet",
request,
status: "not_implemented",
})
}
}