chore(server): move dtos (#8131)

move dtos
This commit is contained in:
Daniel Dietzler
2024-03-20 23:53:07 +01:00
committed by GitHub
parent 0c13c63bb6
commit 6d9e7694b1
145 changed files with 917 additions and 964 deletions

View File

@@ -0,0 +1,33 @@
import { ValidateUUID } from 'src/validation';
/** @deprecated Use `BulkIdResponseDto` instead */
export enum AssetIdErrorReason {
DUPLICATE = 'duplicate',
NO_PERMISSION = 'no_permission',
NOT_FOUND = 'not_found',
}
/** @deprecated Use `BulkIdResponseDto` instead */
export class AssetIdsResponseDto {
assetId!: string;
success!: boolean;
error?: AssetIdErrorReason;
}
export enum BulkIdErrorReason {
DUPLICATE = 'duplicate',
NO_PERMISSION = 'no_permission',
NOT_FOUND = 'not_found',
UNKNOWN = 'unknown',
}
export class BulkIdsDto {
@ValidateUUID({ each: true })
ids!: string[];
}
export class BulkIdResponseDto {
id!: string;
success!: boolean;
error?: BulkIdErrorReason;
}