feat: 收口模板升级与阶段七持续回归
This commit is contained in:
1 parent
ec16fff70e
commit
71c528de34
29 files changed
+1962
-304
No files matched your search
@@ -7,6 +7,7 @@ import {
|
||||
IsObject,
|
||||
IsOptional,
|
||||
IsString,
|
||||
ValidateNested,
|
||||
MinLength,
|
||||
Matches,
|
||||
Max,
|
||||
@@ -14,6 +15,7 @@ import {
|
||||
} from "class-validator";
|
||||
import { brandTemplateKeys } from "@personal-brand/config";
|
||||
import type { BrandTemplateKey } from "@personal-brand/config";
|
||||
import { Type } from "class-transformer";
|
||||
export class UpdateBrandDto {
|
||||
@IsOptional() @IsString() name?: string;
|
||||
@IsOptional() @IsString() tagline?: string;
|
||||
@@ -107,6 +109,29 @@ export class InstallTemplateDto {
|
||||
@IsOptional() @IsUUID() templatePackageVersionId?: string;
|
||||
}
|
||||
|
||||
export class UpgradeTemplateDto {
|
||||
@IsUUID() templatePackageVersionId!: string;
|
||||
@IsString() @MinLength(1) expectedContentChecksum!: string;
|
||||
@IsString() @MinLength(1) expectedCurrentVersion!: string;
|
||||
@IsOptional() @IsUUID() expectedCurrentPackageVersionId?: string | null;
|
||||
@IsBoolean() confirm!: boolean;
|
||||
@IsArray()
|
||||
@ValidateNested({ each: true })
|
||||
@Type(() => PreserveTemplateBindingDto)
|
||||
preservedBindings!: PreserveTemplateBindingDto[];
|
||||
}
|
||||
|
||||
export class PreserveTemplateBindingDto {
|
||||
@IsString() key!: string;
|
||||
@IsString() binding!: string;
|
||||
@IsIn(["preserve"]) action!: "preserve";
|
||||
}
|
||||
|
||||
export class RollbackTemplateDto {
|
||||
@IsString() @MinLength(1) expectedCurrentVersion!: string;
|
||||
@IsBoolean() confirm!: boolean;
|
||||
}
|
||||
|
||||
export class PreviewTemplateSampleDto {
|
||||
@IsOptional() @IsUUID() templatePackageVersionId?: string;
|
||||
@IsOptional() @IsIn(["missing_only"]) strategy?: "missing_only";
|
||||
|
||||
Reference in new issue
Block a user