feat(server): read-write external assets (#9235)
* refactor: remove isReadOnly and isExternal usages * chore: open api * fix: linting * remove mobile isReadOnly dependency --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
@@ -36,8 +36,10 @@ export class AssetResponseDto extends SanitizedAssetResponseDto {
|
||||
isArchived!: boolean;
|
||||
isTrashed!: boolean;
|
||||
isOffline!: boolean;
|
||||
isExternal!: boolean;
|
||||
isReadOnly!: boolean;
|
||||
@PropertyLifecycle({ deprecatedAt: 'v1.104.0' })
|
||||
isExternal?: boolean;
|
||||
@PropertyLifecycle({ deprecatedAt: 'v1.104.0' })
|
||||
isReadOnly?: boolean;
|
||||
exifInfo?: ExifResponseDto;
|
||||
smartInfo?: SmartInfoResponseDto;
|
||||
tags?: TagResponseDto[];
|
||||
@@ -124,9 +126,9 @@ export function mapAsset(entity: AssetEntity, options: AssetMapOptions = {}): As
|
||||
.map((a) => mapAsset(a, { stripMetadata, auth: options.auth }))
|
||||
: undefined,
|
||||
stackCount: entity.stack?.assets?.length ?? null,
|
||||
isExternal: entity.isExternal,
|
||||
isOffline: entity.isOffline,
|
||||
isReadOnly: entity.isReadOnly,
|
||||
isExternal: false,
|
||||
isReadOnly: false,
|
||||
hasMetadata: true,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -97,9 +97,6 @@ export class CreateAssetDto {
|
||||
@ValidateBoolean({ optional: true })
|
||||
isOffline?: boolean;
|
||||
|
||||
@ValidateBoolean({ optional: true })
|
||||
isReadOnly?: boolean;
|
||||
|
||||
// The properties below are added to correctly generate the API docs
|
||||
// and client SDKs. Validation should be handled in the controller.
|
||||
@ApiProperty({ type: 'string', format: 'binary' })
|
||||
|
||||
@@ -33,9 +33,6 @@ class BaseSearchDto {
|
||||
@ValidateBoolean({ optional: true })
|
||||
isEncoded?: boolean;
|
||||
|
||||
@ValidateBoolean({ optional: true })
|
||||
isExternal?: boolean;
|
||||
|
||||
@ValidateBoolean({ optional: true })
|
||||
isFavorite?: boolean;
|
||||
|
||||
@@ -45,9 +42,6 @@ class BaseSearchDto {
|
||||
@ValidateBoolean({ optional: true })
|
||||
isOffline?: boolean;
|
||||
|
||||
@ValidateBoolean({ optional: true })
|
||||
isReadOnly?: boolean;
|
||||
|
||||
@ValidateBoolean({ optional: true })
|
||||
isVisible?: boolean;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user