feat: добавить версионирование source image

- добавлен endpoint создания новой версии asset
- реализовано переключение currentVersion через image_asset_versions
- обновлена документация business API и dev smoke flow
This commit is contained in:
2026-05-05 13:31:45 +03:00
parent 1c0e8277a3
commit 3ec1e51bea
6 changed files with 183 additions and 2 deletions

View File

@@ -0,0 +1,38 @@
import { ApiProperty } from "@nestjs/swagger"
export class CreateAssetVersionRequestDto {
@ApiProperty({
description: "Постоянная ссылка на новую версию исходного изображения.",
example: "https://storage.yandexcloud.net/shared1318/img/1.jpg",
})
sourceUrl!: string
}
export class CreateAssetVersionResponseDto {
@ApiProperty({ description: "Внутренний UUID asset.", example: "59fcf4f6-9891-4df4-8bb7-a4dbe570bb66" })
assetId!: string
@ApiProperty({ description: "Внутренний UUID новой версии source image.", example: "3b5da974-bb7f-4d73-b172-d6ad9c244528" })
versionId!: string
@ApiProperty({ description: "Публичный идентификатор asset.", example: "asset_demo" })
publicId!: string
@ApiProperty({ description: "Предыдущая активная версия source image.", example: 1 })
previousVersion!: number
@ApiProperty({ description: "Новая активная версия source image.", example: 2 })
version!: number
@ApiProperty({ description: "Нормализованный source URL новой версии.", example: "https://storage.yandexcloud.net/shared1318/img/1.jpg" })
sourceUrl!: string
@ApiProperty({ description: "Hostname source URL новой версии.", example: "storage.yandexcloud.net" })
sourceHost!: string
@ApiProperty({ description: "Базовый Gateway path для новой версии.", example: "/images/asset_demo/v2/card" })
imageBasePath!: string
@ApiProperty({ description: "Дата создания версии.", example: "2026-05-05T12:00:00.000Z" })
createdAt!: string
}