|
|
|
@ -6,7 +6,7 @@ import { PropertyLifecycle } from 'src/decorators';
|
|
|
|
import { AlbumResponseDto } from 'src/dtos/album.dto';
|
|
|
|
import { AlbumResponseDto } from 'src/dtos/album.dto';
|
|
|
|
import { AssetResponseDto } from 'src/dtos/asset-response.dto';
|
|
|
|
import { AssetResponseDto } from 'src/dtos/asset-response.dto';
|
|
|
|
import { AssetOrder, AssetType, AssetVisibility } from 'src/enum';
|
|
|
|
import { AssetOrder, AssetType, AssetVisibility } from 'src/enum';
|
|
|
|
import { Optional, ValidateBoolean, ValidateDate, ValidateEnum, ValidateUUID } from 'src/validation';
|
|
|
|
import { Optional, ValidateBoolean, ValidateDate, ValidateEnum, ValidateString, ValidateUUID } from 'src/validation';
|
|
|
|
|
|
|
|
|
|
|
|
class BaseSearchDto {
|
|
|
|
class BaseSearchDto {
|
|
|
|
@ValidateUUID({ optional: true, nullable: true })
|
|
|
|
@ValidateUUID({ optional: true, nullable: true })
|
|
|
|
@ -144,9 +144,7 @@ export class MetadataSearchDto extends RandomSearchDto {
|
|
|
|
@Optional()
|
|
|
|
@Optional()
|
|
|
|
deviceAssetId?: string;
|
|
|
|
deviceAssetId?: string;
|
|
|
|
|
|
|
|
|
|
|
|
@IsString()
|
|
|
|
@ValidateString({ optional: true, trim: true })
|
|
|
|
@IsNotEmpty()
|
|
|
|
|
|
|
|
@Optional()
|
|
|
|
|
|
|
|
description?: string;
|
|
|
|
description?: string;
|
|
|
|
|
|
|
|
|
|
|
|
@IsString()
|
|
|
|
@IsString()
|
|
|
|
@ -154,9 +152,7 @@ export class MetadataSearchDto extends RandomSearchDto {
|
|
|
|
@Optional()
|
|
|
|
@Optional()
|
|
|
|
checksum?: string;
|
|
|
|
checksum?: string;
|
|
|
|
|
|
|
|
|
|
|
|
@IsString()
|
|
|
|
@ValidateString({ optional: true, trim: true })
|
|
|
|
@IsNotEmpty()
|
|
|
|
|
|
|
|
@Optional()
|
|
|
|
|
|
|
|
originalFileName?: string;
|
|
|
|
originalFileName?: string;
|
|
|
|
|
|
|
|
|
|
|
|
@IsString()
|
|
|
|
@IsString()
|
|
|
|
@ -190,16 +186,12 @@ export class MetadataSearchDto extends RandomSearchDto {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export class StatisticsSearchDto extends BaseSearchDto {
|
|
|
|
export class StatisticsSearchDto extends BaseSearchDto {
|
|
|
|
@IsString()
|
|
|
|
@ValidateString({ optional: true, trim: true })
|
|
|
|
@IsNotEmpty()
|
|
|
|
|
|
|
|
@Optional()
|
|
|
|
|
|
|
|
description?: string;
|
|
|
|
description?: string;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export class SmartSearchDto extends BaseSearchWithResultsDto {
|
|
|
|
export class SmartSearchDto extends BaseSearchWithResultsDto {
|
|
|
|
@IsString()
|
|
|
|
@ValidateString({ optional: true, trim: true })
|
|
|
|
@IsNotEmpty()
|
|
|
|
|
|
|
|
@Optional()
|
|
|
|
|
|
|
|
query?: string;
|
|
|
|
query?: string;
|
|
|
|
|
|
|
|
|
|
|
|
@ValidateUUID({ optional: true })
|
|
|
|
@ValidateUUID({ optional: true })
|
|
|
|
|