diff --git a/mobile/openapi/doc/AssetApi.md b/mobile/openapi/doc/AssetApi.md index 93b758a59..c65e6a605 100644 Binary files a/mobile/openapi/doc/AssetApi.md and b/mobile/openapi/doc/AssetApi.md differ diff --git a/mobile/openapi/lib/api/asset_api.dart b/mobile/openapi/lib/api/asset_api.dart index bdcb87409..786129b45 100644 Binary files a/mobile/openapi/lib/api/asset_api.dart and b/mobile/openapi/lib/api/asset_api.dart differ diff --git a/mobile/openapi/test/asset_api_test.dart b/mobile/openapi/test/asset_api_test.dart index 06375c6b4..846a5998c 100644 Binary files a/mobile/openapi/test/asset_api_test.dart and b/mobile/openapi/test/asset_api_test.dart differ diff --git a/open-api/immich-openapi-specs.json b/open-api/immich-openapi-specs.json index f38780f29..c0e868985 100644 --- a/open-api/immich-openapi-specs.json +++ b/open-api/immich-openapi-specs.json @@ -7541,9 +7541,6 @@ "isArchived": { "type": "boolean" }, - "isExternal": { - "type": "boolean" - }, "isFavorite": { "type": "boolean" }, diff --git a/open-api/typescript-sdk/src/fetch-client.ts b/open-api/typescript-sdk/src/fetch-client.ts index ce768d518..b512bce29 100644 --- a/open-api/typescript-sdk/src/fetch-client.ts +++ b/open-api/typescript-sdk/src/fetch-client.ts @@ -289,7 +289,6 @@ export type CreateAssetDto = { fileCreatedAt: string; fileModifiedAt: string; isArchived?: boolean; - isExternal?: boolean; isFavorite?: boolean; isOffline?: boolean; isReadOnly?: boolean; diff --git a/server/src/immich/api-v1/asset/asset.service.ts b/server/src/immich/api-v1/asset/asset.service.ts index 17488016c..5dcc487be 100644 --- a/server/src/immich/api-v1/asset/asset.service.ts +++ b/server/src/immich/api-v1/asset/asset.service.ts @@ -341,7 +341,6 @@ export class AssetService { fileCreatedAt: dto.fileCreatedAt, fileModifiedAt: dto.fileModifiedAt, localDateTime: dto.fileCreatedAt, - deletedAt: null, type: mimeTypes.assetType(file.originalPath), isFavorite: dto.isFavorite, @@ -349,17 +348,9 @@ export class AssetService { duration: dto.duration || null, isVisible: dto.isVisible ?? true, livePhotoVideo: livePhotoAssetId === null ? null : ({ id: livePhotoAssetId } as AssetEntity), - resizePath: null, - webpPath: null, - thumbhash: null, - encodedVideoPath: null, - tags: [], - sharedLinks: [], originalFileName: parse(file.originalName).name, - faces: [], sidecarPath: sidecarPath || null, isReadOnly: dto.isReadOnly ?? false, - isExternal: dto.isExternal ?? false, isOffline: dto.isOffline ?? false, }); diff --git a/server/src/immich/api-v1/asset/dto/create-asset.dto.ts b/server/src/immich/api-v1/asset/dto/create-asset.dto.ts index ae347e61b..9850384d9 100644 --- a/server/src/immich/api-v1/asset/dto/create-asset.dto.ts +++ b/server/src/immich/api-v1/asset/dto/create-asset.dto.ts @@ -3,7 +3,10 @@ import { ApiProperty } from '@nestjs/swagger'; import { Transform, Type } from 'class-transformer'; import { IsBoolean, IsDate, IsNotEmpty, IsString } from 'class-validator'; -export class CreateAssetBase { +export class CreateAssetDto { + @ValidateUUID({ optional: true }) + libraryId?: string; + @IsNotEmpty() @IsString() deviceAssetId!: string; @@ -22,6 +25,10 @@ export class CreateAssetBase { @Type(() => Date) fileModifiedAt!: Date; + @Optional() + @IsString() + duration?: string; + @Optional() @IsBoolean() @Transform(toBoolean) @@ -37,28 +44,16 @@ export class CreateAssetBase { @Transform(toBoolean) isVisible?: boolean; - @Optional() - @IsString() - duration?: string; - - @Optional() - @IsBoolean() - isExternal?: boolean; - @Optional() @IsBoolean() + @Transform(toBoolean) isOffline?: boolean; -} -export class CreateAssetDto extends CreateAssetBase { @Optional() @IsBoolean() @Transform(toBoolean) isReadOnly?: boolean; - @ValidateUUID({ optional: true }) - libraryId?: string; - // 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' })