mirror of
https://github.com/immich-app/immich.git
synced 2025-11-29 01:35:21 -05:00
34 lines
710 B
TypeScript
34 lines
710 B
TypeScript
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;
|
|
}
|