diff --git a/cli/src/api/open-api/api.ts b/cli/src/api/open-api/api.ts index f73b6bcdf7..48fbad95d0 100644 --- a/cli/src/api/open-api/api.ts +++ b/cli/src/api/open-api/api.ts @@ -5151,14 +5151,13 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration * @param {string} [userId] * @param {boolean} [isFavorite] * @param {boolean} [isArchived] - * @param {boolean} [withoutThumbs] Include assets without thumbnails * @param {number} [skip] * @param {string} [updatedAfter] * @param {string} [ifNoneMatch] ETag of data already cached on the client * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAllAssets: async (userId?: string, isFavorite?: boolean, isArchived?: boolean, withoutThumbs?: boolean, skip?: number, updatedAfter?: string, ifNoneMatch?: string, options: AxiosRequestConfig = {}): Promise => { + getAllAssets: async (userId?: string, isFavorite?: boolean, isArchived?: boolean, skip?: number, updatedAfter?: string, ifNoneMatch?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/asset`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -5192,10 +5191,6 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration localVarQueryParameter['isArchived'] = isArchived; } - if (withoutThumbs !== undefined) { - localVarQueryParameter['withoutThumbs'] = withoutThumbs; - } - if (skip !== undefined) { localVarQueryParameter['skip'] = skip; } @@ -6312,15 +6307,14 @@ export const AssetApiFp = function(configuration?: Configuration) { * @param {string} [userId] * @param {boolean} [isFavorite] * @param {boolean} [isArchived] - * @param {boolean} [withoutThumbs] Include assets without thumbnails * @param {number} [skip] * @param {string} [updatedAfter] * @param {string} [ifNoneMatch] ETag of data already cached on the client * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getAllAssets(userId?: string, isFavorite?: boolean, isArchived?: boolean, withoutThumbs?: boolean, skip?: number, updatedAfter?: string, ifNoneMatch?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getAllAssets(userId, isFavorite, isArchived, withoutThumbs, skip, updatedAfter, ifNoneMatch, options); + async getAllAssets(userId?: string, isFavorite?: boolean, isArchived?: boolean, skip?: number, updatedAfter?: string, ifNoneMatch?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAllAssets(userId, isFavorite, isArchived, skip, updatedAfter, ifNoneMatch, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -6617,7 +6611,7 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath * @throws {RequiredError} */ getAllAssets(requestParameters: AssetApiGetAllAssetsRequest = {}, options?: AxiosRequestConfig): AxiosPromise> { - return localVarFp.getAllAssets(requestParameters.userId, requestParameters.isFavorite, requestParameters.isArchived, requestParameters.withoutThumbs, requestParameters.skip, requestParameters.updatedAfter, requestParameters.ifNoneMatch, options).then((request) => request(axios, basePath)); + return localVarFp.getAllAssets(requestParameters.userId, requestParameters.isFavorite, requestParameters.isArchived, requestParameters.skip, requestParameters.updatedAfter, requestParameters.ifNoneMatch, options).then((request) => request(axios, basePath)); }, /** * Get a single asset\'s information @@ -6922,13 +6916,6 @@ export interface AssetApiGetAllAssetsRequest { */ readonly isArchived?: boolean - /** - * Include assets without thumbnails - * @type {boolean} - * @memberof AssetApiGetAllAssets - */ - readonly withoutThumbs?: boolean - /** * * @type {number} @@ -7508,7 +7495,7 @@ export class AssetApi extends BaseAPI { * @memberof AssetApi */ public getAllAssets(requestParameters: AssetApiGetAllAssetsRequest = {}, options?: AxiosRequestConfig) { - return AssetApiFp(this.configuration).getAllAssets(requestParameters.userId, requestParameters.isFavorite, requestParameters.isArchived, requestParameters.withoutThumbs, requestParameters.skip, requestParameters.updatedAfter, requestParameters.ifNoneMatch, options).then((request) => request(this.axios, this.basePath)); + return AssetApiFp(this.configuration).getAllAssets(requestParameters.userId, requestParameters.isFavorite, requestParameters.isArchived, requestParameters.skip, requestParameters.updatedAfter, requestParameters.ifNoneMatch, options).then((request) => request(this.axios, this.basePath)); } /** diff --git a/mobile/lib/shared/services/asset.service.dart b/mobile/lib/shared/services/asset.service.dart index 9165e6308f..8e0fc1847f 100644 --- a/mobile/lib/shared/services/asset.service.dart +++ b/mobile/lib/shared/services/asset.service.dart @@ -69,7 +69,6 @@ class AssetService { await _apiService.assetApi.getAllAssetsWithETag( eTag: etag, userId: user.id, - withoutThumbs: true, ); if (assets == null) { return null; diff --git a/mobile/lib/utils/openapi_extensions.dart b/mobile/lib/utils/openapi_extensions.dart index 0fd3f2be5d..bd4458e4a5 100644 --- a/mobile/lib/utils/openapi_extensions.dart +++ b/mobile/lib/utils/openapi_extensions.dart @@ -17,14 +17,12 @@ extension WithETag on AssetApi { String? userId, bool? isFavorite, bool? isArchived, - bool? withoutThumbs, }) async { final response = await getAllAssetsWithHttpInfo( ifNoneMatch: eTag, userId: userId, isFavorite: isFavorite, isArchived: isArchived, - withoutThumbs: withoutThumbs, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); diff --git a/mobile/openapi/doc/AssetApi.md b/mobile/openapi/doc/AssetApi.md index 140f509b0b..4bec9fa2ac 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 a2f6b7b3a9..9067f8dd07 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 076521b0e8..ea45fc7d19 100644 Binary files a/mobile/openapi/test/asset_api_test.dart and b/mobile/openapi/test/asset_api_test.dart differ diff --git a/server/immich-openapi-specs.json b/server/immich-openapi-specs.json index dfbfe66cef..e12c50da46 100644 --- a/server/immich-openapi-specs.json +++ b/server/immich-openapi-specs.json @@ -752,15 +752,6 @@ "type": "boolean" } }, - { - "name": "withoutThumbs", - "required": false, - "in": "query", - "description": "Include assets without thumbnails", - "schema": { - "type": "boolean" - } - }, { "name": "skip", "required": false, diff --git a/server/src/immich/api-v1/asset/asset-repository.ts b/server/src/immich/api-v1/asset/asset-repository.ts index b19b33632f..a87a115e97 100644 --- a/server/src/immich/api-v1/asset/asset-repository.ts +++ b/server/src/immich/api-v1/asset/asset-repository.ts @@ -1,7 +1,7 @@ import { AssetEntity, ExifEntity } from '@app/infra/entities'; import { Injectable } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; -import { IsNull, MoreThan, Not } from 'typeorm'; +import { MoreThan } from 'typeorm'; import { In } from 'typeorm/find-options/operator/In'; import { Repository } from 'typeorm/repository/Repository'; import { AssetSearchDto } from './dto/asset-search.dto'; @@ -127,7 +127,6 @@ export class AssetRepository implements IAssetRepository { return this.assetRepository.find({ where: { ownerId, - resizePath: dto.withoutThumbs ? undefined : Not(IsNull()), isVisible: true, isFavorite: dto.isFavorite, isArchived: dto.isArchived, diff --git a/server/src/immich/api-v1/asset/dto/asset-search.dto.ts b/server/src/immich/api-v1/asset/dto/asset-search.dto.ts index 72d16edbed..52aee7c373 100644 --- a/server/src/immich/api-v1/asset/dto/asset-search.dto.ts +++ b/server/src/immich/api-v1/asset/dto/asset-search.dto.ts @@ -16,14 +16,6 @@ export class AssetSearchDto { @Transform(toBoolean) isArchived?: boolean; - /** - * Include assets without thumbnails - */ - @IsOptional() - @IsBoolean() - @Transform(toBoolean) - withoutThumbs?: boolean; - @IsOptional() @IsNumber() skip?: number; diff --git a/web/src/api/open-api/api.ts b/web/src/api/open-api/api.ts index f73b6bcdf7..48fbad95d0 100644 --- a/web/src/api/open-api/api.ts +++ b/web/src/api/open-api/api.ts @@ -5151,14 +5151,13 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration * @param {string} [userId] * @param {boolean} [isFavorite] * @param {boolean} [isArchived] - * @param {boolean} [withoutThumbs] Include assets without thumbnails * @param {number} [skip] * @param {string} [updatedAfter] * @param {string} [ifNoneMatch] ETag of data already cached on the client * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAllAssets: async (userId?: string, isFavorite?: boolean, isArchived?: boolean, withoutThumbs?: boolean, skip?: number, updatedAfter?: string, ifNoneMatch?: string, options: AxiosRequestConfig = {}): Promise => { + getAllAssets: async (userId?: string, isFavorite?: boolean, isArchived?: boolean, skip?: number, updatedAfter?: string, ifNoneMatch?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/asset`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -5192,10 +5191,6 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration localVarQueryParameter['isArchived'] = isArchived; } - if (withoutThumbs !== undefined) { - localVarQueryParameter['withoutThumbs'] = withoutThumbs; - } - if (skip !== undefined) { localVarQueryParameter['skip'] = skip; } @@ -6312,15 +6307,14 @@ export const AssetApiFp = function(configuration?: Configuration) { * @param {string} [userId] * @param {boolean} [isFavorite] * @param {boolean} [isArchived] - * @param {boolean} [withoutThumbs] Include assets without thumbnails * @param {number} [skip] * @param {string} [updatedAfter] * @param {string} [ifNoneMatch] ETag of data already cached on the client * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getAllAssets(userId?: string, isFavorite?: boolean, isArchived?: boolean, withoutThumbs?: boolean, skip?: number, updatedAfter?: string, ifNoneMatch?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getAllAssets(userId, isFavorite, isArchived, withoutThumbs, skip, updatedAfter, ifNoneMatch, options); + async getAllAssets(userId?: string, isFavorite?: boolean, isArchived?: boolean, skip?: number, updatedAfter?: string, ifNoneMatch?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAllAssets(userId, isFavorite, isArchived, skip, updatedAfter, ifNoneMatch, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -6617,7 +6611,7 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath * @throws {RequiredError} */ getAllAssets(requestParameters: AssetApiGetAllAssetsRequest = {}, options?: AxiosRequestConfig): AxiosPromise> { - return localVarFp.getAllAssets(requestParameters.userId, requestParameters.isFavorite, requestParameters.isArchived, requestParameters.withoutThumbs, requestParameters.skip, requestParameters.updatedAfter, requestParameters.ifNoneMatch, options).then((request) => request(axios, basePath)); + return localVarFp.getAllAssets(requestParameters.userId, requestParameters.isFavorite, requestParameters.isArchived, requestParameters.skip, requestParameters.updatedAfter, requestParameters.ifNoneMatch, options).then((request) => request(axios, basePath)); }, /** * Get a single asset\'s information @@ -6922,13 +6916,6 @@ export interface AssetApiGetAllAssetsRequest { */ readonly isArchived?: boolean - /** - * Include assets without thumbnails - * @type {boolean} - * @memberof AssetApiGetAllAssets - */ - readonly withoutThumbs?: boolean - /** * * @type {number} @@ -7508,7 +7495,7 @@ export class AssetApi extends BaseAPI { * @memberof AssetApi */ public getAllAssets(requestParameters: AssetApiGetAllAssetsRequest = {}, options?: AxiosRequestConfig) { - return AssetApiFp(this.configuration).getAllAssets(requestParameters.userId, requestParameters.isFavorite, requestParameters.isArchived, requestParameters.withoutThumbs, requestParameters.skip, requestParameters.updatedAfter, requestParameters.ifNoneMatch, options).then((request) => request(this.axios, this.basePath)); + return AssetApiFp(this.configuration).getAllAssets(requestParameters.userId, requestParameters.isFavorite, requestParameters.isArchived, requestParameters.skip, requestParameters.updatedAfter, requestParameters.ifNoneMatch, options).then((request) => request(this.axios, this.basePath)); } /**