From 8699d8cfbf78eb1eb36cec9941eebc56121524ce Mon Sep 17 00:00:00 2001 From: martabal <74269598+martabal@users.noreply.github.com> Date: Sat, 7 Oct 2023 17:02:44 +0200 Subject: [PATCH] regenerate api --- cli/src/api/open-api/api.ts | 513 ++++++++++++++---- mobile/openapi/.openapi-generator/FILES | 15 +- mobile/openapi/README.md | 12 +- mobile/openapi/lib/api.dart | 5 +- mobile/openapi/lib/api_client.dart | 10 +- web/src/api/open-api/api.ts | 513 ++++++++++++++---- .../(user)/people/[personId]/+page.svelte | 3 +- 7 files changed, 837 insertions(+), 234 deletions(-) diff --git a/cli/src/api/open-api/api.ts b/cli/src/api/open-api/api.ts index b61fa83fe..a060a79a1 100644 --- a/cli/src/api/open-api/api.ts +++ b/cli/src/api/open-api/api.ts @@ -4,7 +4,7 @@ * Immich * Immich API * - * The version of the OpenAPI document: 1.81.0 + * The version of the OpenAPI document: 1.81.1 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -356,6 +356,25 @@ export interface AllJobStatusResponseDto { */ 'videoConversion': JobStatusDto; } +/** + * + * @export + * @interface AssetBulkDeleteDto + */ +export interface AssetBulkDeleteDto { + /** + * + * @type {boolean} + * @memberof AssetBulkDeleteDto + */ + 'force'?: boolean; + /** + * + * @type {Array} + * @memberof AssetBulkDeleteDto + */ + 'ids': Array; +} /** * * @export @@ -732,6 +751,12 @@ export interface AssetResponseDto { * @memberof AssetResponseDto */ 'isReadOnly': boolean; + /** + * + * @type {boolean} + * @memberof AssetResponseDto + */ + 'isTrashed': boolean; /** * * @type {string} @@ -744,6 +769,12 @@ export interface AssetResponseDto { * @memberof AssetResponseDto */ 'livePhotoVideoId'?: string | null; + /** + * + * @type {string} + * @memberof AssetResponseDto + */ + 'localDateTime': string; /** * * @type {string} @@ -1426,54 +1457,6 @@ export interface CuratedObjectsResponseDto { */ 'resizePath': string; } -/** - * - * @export - * @interface DeleteAssetDto - */ -export interface DeleteAssetDto { - /** - * - * @type {Array} - * @memberof DeleteAssetDto - */ - 'ids': Array; -} -/** - * - * @export - * @interface DeleteAssetResponseDto - */ -export interface DeleteAssetResponseDto { - /** - * - * @type {string} - * @memberof DeleteAssetResponseDto - */ - 'id': string; - /** - * - * @type {DeleteAssetStatus} - * @memberof DeleteAssetResponseDto - */ - 'status': DeleteAssetStatus; -} - - -/** - * - * @export - * @enum {string} - */ - -export const DeleteAssetStatus = { - Success: 'SUCCESS', - Failed: 'FAILED' -} as const; - -export type DeleteAssetStatus = typeof DeleteAssetStatus[keyof typeof DeleteAssetStatus]; - - /** * * @export @@ -2692,6 +2675,12 @@ export interface ServerConfigDto { * @memberof ServerConfigDto */ 'oauthButtonText': string; + /** + * + * @type {number} + * @memberof ServerConfigDto + */ + 'trashDays': number; } /** * @@ -2765,6 +2754,12 @@ export interface ServerFeaturesDto { * @memberof ServerFeaturesDto */ 'tagImage': boolean; + /** + * + * @type {boolean} + * @memberof ServerFeaturesDto + */ + 'trash': boolean; } /** * @@ -3208,6 +3203,12 @@ export interface SystemConfigDto { * @memberof SystemConfigDto */ 'thumbnail': SystemConfigThumbnailDto; + /** + * + * @type {SystemConfigTrashDto} + * @memberof SystemConfigDto + */ + 'trash': SystemConfigTrashDto; } /** * @@ -3663,6 +3664,25 @@ export interface SystemConfigThumbnailDto { } +/** + * + * @export + * @interface SystemConfigTrashDto + */ +export interface SystemConfigTrashDto { + /** + * + * @type {number} + * @memberof SystemConfigTrashDto + */ + 'days': number; + /** + * + * @type {boolean} + * @memberof SystemConfigTrashDto + */ + 'enabled': boolean; +} /** * * @export @@ -5751,13 +5771,13 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration }, /** * - * @param {DeleteAssetDto} deleteAssetDto + * @param {AssetBulkDeleteDto} assetBulkDeleteDto * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteAsset: async (deleteAssetDto: DeleteAssetDto, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'deleteAssetDto' is not null or undefined - assertParamExists('deleteAsset', 'deleteAssetDto', deleteAssetDto) + deleteAssets: async (assetBulkDeleteDto: AssetBulkDeleteDto, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'assetBulkDeleteDto' is not null or undefined + assertParamExists('deleteAssets', 'assetBulkDeleteDto', assetBulkDeleteDto) const localVarPath = `/asset`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -5786,7 +5806,7 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(deleteAssetDto, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(assetBulkDeleteDto, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -5880,6 +5900,44 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + emptyTrash: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/asset/trash/empty`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication cookie required + + // authentication api_key required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -6048,10 +6106,11 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration * * @param {boolean} [isArchived] * @param {boolean} [isFavorite] + * @param {boolean} [isTrashed] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAssetStats: async (isArchived?: boolean, isFavorite?: boolean, options: AxiosRequestConfig = {}): Promise => { + getAssetStats: async (isArchived?: boolean, isFavorite?: boolean, isTrashed?: boolean, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/asset/statistics`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -6081,6 +6140,10 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration localVarQueryParameter['isFavorite'] = isFavorite; } + if (isTrashed !== undefined) { + localVarQueryParameter['isTrashed'] = isTrashed; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -6153,11 +6216,12 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration * @param {string} [personId] * @param {boolean} [isArchived] * @param {boolean} [isFavorite] + * @param {boolean} [isTrashed] * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getByTimeBucket: async (size: TimeBucketSize, timeBucket: string, userId?: string, albumId?: string, personId?: string, isArchived?: boolean, isFavorite?: boolean, key?: string, options: AxiosRequestConfig = {}): Promise => { + getByTimeBucket: async (size: TimeBucketSize, timeBucket: string, userId?: string, albumId?: string, personId?: string, isArchived?: boolean, isFavorite?: boolean, isTrashed?: boolean, key?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'size' is not null or undefined assertParamExists('getByTimeBucket', 'size', size) // verify required parameter 'timeBucket' is not null or undefined @@ -6207,6 +6271,10 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration localVarQueryParameter['isFavorite'] = isFavorite; } + if (isTrashed !== undefined) { + localVarQueryParameter['isTrashed'] = isTrashed; + } + if (timeBucket !== undefined) { localVarQueryParameter['timeBucket'] = timeBucket; } @@ -6353,13 +6421,14 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration }, /** * + * @param {boolean} [isArchived] * @param {boolean} [isFavorite] * @param {string} [fileCreatedAfter] * @param {string} [fileCreatedBefore] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getMapMarkers: async (isFavorite?: boolean, fileCreatedAfter?: string, fileCreatedBefore?: string, options: AxiosRequestConfig = {}): Promise => { + getMapMarkers: async (isArchived?: boolean, isFavorite?: boolean, fileCreatedAfter?: string, fileCreatedBefore?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/asset/map-marker`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -6381,6 +6450,10 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + if (isArchived !== undefined) { + localVarQueryParameter['isArchived'] = isArchived; + } + if (isFavorite !== undefined) { localVarQueryParameter['isFavorite'] = isFavorite; } @@ -6410,13 +6483,16 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration }, /** * - * @param {string} timestamp Get pictures for +24 hours from this time going back x years + * @param {number} day + * @param {number} month * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getMemoryLane: async (timestamp: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'timestamp' is not null or undefined - assertParamExists('getMemoryLane', 'timestamp', timestamp) + getMemoryLane: async (day: number, month: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'day' is not null or undefined + assertParamExists('getMemoryLane', 'day', day) + // verify required parameter 'month' is not null or undefined + assertParamExists('getMemoryLane', 'month', month) const localVarPath = `/asset/memory-lane`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -6438,10 +6514,12 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) - if (timestamp !== undefined) { - localVarQueryParameter['timestamp'] = (timestamp as any instanceof Date) ? - (timestamp as any).toISOString() : - timestamp; + if (day !== undefined) { + localVarQueryParameter['day'] = day; + } + + if (month !== undefined) { + localVarQueryParameter['month'] = month; } @@ -6506,11 +6584,12 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration * @param {string} [personId] * @param {boolean} [isArchived] * @param {boolean} [isFavorite] + * @param {boolean} [isTrashed] * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getTimeBuckets: async (size: TimeBucketSize, userId?: string, albumId?: string, personId?: string, isArchived?: boolean, isFavorite?: boolean, key?: string, options: AxiosRequestConfig = {}): Promise => { + getTimeBuckets: async (size: TimeBucketSize, userId?: string, albumId?: string, personId?: string, isArchived?: boolean, isFavorite?: boolean, isTrashed?: boolean, key?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'size' is not null or undefined assertParamExists('getTimeBuckets', 'size', size) const localVarPath = `/asset/time-buckets`; @@ -6558,6 +6637,10 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration localVarQueryParameter['isFavorite'] = isFavorite; } + if (isTrashed !== undefined) { + localVarQueryParameter['isTrashed'] = isTrashed; + } + if (key !== undefined) { localVarQueryParameter['key'] = key; } @@ -6659,6 +6742,88 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration options: localVarRequestOptions, }; }, + /** + * + * @param {BulkIdsDto} bulkIdsDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + restoreAssets: async (bulkIdsDto: BulkIdsDto, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'bulkIdsDto' is not null or undefined + assertParamExists('restoreAssets', 'bulkIdsDto', bulkIdsDto) + const localVarPath = `/asset/restore`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication cookie required + + // authentication api_key required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(bulkIdsDto, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + restoreTrash: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/asset/trash/restore`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication cookie required + + // authentication api_key required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** * * @param {AssetJobsDto} assetJobsDto @@ -7073,12 +7238,12 @@ export const AssetApiFp = function(configuration?: Configuration) { }, /** * - * @param {DeleteAssetDto} deleteAssetDto + * @param {AssetBulkDeleteDto} assetBulkDeleteDto * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteAsset(deleteAssetDto: DeleteAssetDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAsset(deleteAssetDto, options); + async deleteAssets(assetBulkDeleteDto: AssetBulkDeleteDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAssets(assetBulkDeleteDto, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -7103,6 +7268,15 @@ export const AssetApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.downloadFile(id, key, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async emptyTrash(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.emptyTrash(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, /** * Get all AssetEntity belong to the user * @param {string} [userId] @@ -7142,11 +7316,12 @@ export const AssetApiFp = function(configuration?: Configuration) { * * @param {boolean} [isArchived] * @param {boolean} [isFavorite] + * @param {boolean} [isTrashed] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getAssetStats(isArchived?: boolean, isFavorite?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getAssetStats(isArchived, isFavorite, options); + async getAssetStats(isArchived?: boolean, isFavorite?: boolean, isTrashed?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAssetStats(isArchived, isFavorite, isTrashed, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -7170,12 +7345,13 @@ export const AssetApiFp = function(configuration?: Configuration) { * @param {string} [personId] * @param {boolean} [isArchived] * @param {boolean} [isFavorite] + * @param {boolean} [isTrashed] * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getByTimeBucket(size: TimeBucketSize, timeBucket: string, userId?: string, albumId?: string, personId?: string, isArchived?: boolean, isFavorite?: boolean, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getByTimeBucket(size, timeBucket, userId, albumId, personId, isArchived, isFavorite, key, options); + async getByTimeBucket(size: TimeBucketSize, timeBucket: string, userId?: string, albumId?: string, personId?: string, isArchived?: boolean, isFavorite?: boolean, isTrashed?: boolean, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getByTimeBucket(size, timeBucket, userId, albumId, personId, isArchived, isFavorite, isTrashed, key, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -7209,24 +7385,26 @@ export const AssetApiFp = function(configuration?: Configuration) { }, /** * + * @param {boolean} [isArchived] * @param {boolean} [isFavorite] * @param {string} [fileCreatedAfter] * @param {string} [fileCreatedBefore] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getMapMarkers(isFavorite?: boolean, fileCreatedAfter?: string, fileCreatedBefore?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getMapMarkers(isFavorite, fileCreatedAfter, fileCreatedBefore, options); + async getMapMarkers(isArchived?: boolean, isFavorite?: boolean, fileCreatedAfter?: string, fileCreatedBefore?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMapMarkers(isArchived, isFavorite, fileCreatedAfter, fileCreatedBefore, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * - * @param {string} timestamp Get pictures for +24 hours from this time going back x years + * @param {number} day + * @param {number} month * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getMemoryLane(timestamp: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getMemoryLane(timestamp, options); + async getMemoryLane(day: number, month: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMemoryLane(day, month, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -7247,12 +7425,13 @@ export const AssetApiFp = function(configuration?: Configuration) { * @param {string} [personId] * @param {boolean} [isArchived] * @param {boolean} [isFavorite] + * @param {boolean} [isTrashed] * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getTimeBuckets(size: TimeBucketSize, userId?: string, albumId?: string, personId?: string, isArchived?: boolean, isFavorite?: boolean, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getTimeBuckets(size, userId, albumId, personId, isArchived, isFavorite, key, options); + async getTimeBuckets(size: TimeBucketSize, userId?: string, albumId?: string, personId?: string, isArchived?: boolean, isFavorite?: boolean, isTrashed?: boolean, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTimeBuckets(size, userId, albumId, personId, isArchived, isFavorite, isTrashed, key, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -7275,6 +7454,25 @@ export const AssetApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.importFile(importAssetDto, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + /** + * + * @param {BulkIdsDto} bulkIdsDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async restoreAssets(bulkIdsDto: BulkIdsDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.restoreAssets(bulkIdsDto, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async restoreTrash(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.restoreTrash(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, /** * * @param {AssetJobsDto} assetJobsDto @@ -7393,12 +7591,12 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath }, /** * - * @param {AssetApiDeleteAssetRequest} requestParameters Request parameters. + * @param {AssetApiDeleteAssetsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteAsset(requestParameters: AssetApiDeleteAssetRequest, options?: AxiosRequestConfig): AxiosPromise> { - return localVarFp.deleteAsset(requestParameters.deleteAssetDto, options).then((request) => request(axios, basePath)); + deleteAssets(requestParameters: AssetApiDeleteAssetsRequest, options?: AxiosRequestConfig): AxiosPromise { + return localVarFp.deleteAssets(requestParameters.assetBulkDeleteDto, options).then((request) => request(axios, basePath)); }, /** * @@ -7418,6 +7616,14 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath downloadFile(requestParameters: AssetApiDownloadFileRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.downloadFile(requestParameters.id, requestParameters.key, options).then((request) => request(axios, basePath)); }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + emptyTrash(options?: AxiosRequestConfig): AxiosPromise { + return localVarFp.emptyTrash(options).then((request) => request(axios, basePath)); + }, /** * Get all AssetEntity belong to the user * @param {AssetApiGetAllAssetsRequest} requestParameters Request parameters. @@ -7451,7 +7657,7 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath * @throws {RequiredError} */ getAssetStats(requestParameters: AssetApiGetAssetStatsRequest = {}, options?: AxiosRequestConfig): AxiosPromise { - return localVarFp.getAssetStats(requestParameters.isArchived, requestParameters.isFavorite, options).then((request) => request(axios, basePath)); + return localVarFp.getAssetStats(requestParameters.isArchived, requestParameters.isFavorite, requestParameters.isTrashed, options).then((request) => request(axios, basePath)); }, /** * @@ -7469,7 +7675,7 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath * @throws {RequiredError} */ getByTimeBucket(requestParameters: AssetApiGetByTimeBucketRequest, options?: AxiosRequestConfig): AxiosPromise> { - return localVarFp.getByTimeBucket(requestParameters.size, requestParameters.timeBucket, requestParameters.userId, requestParameters.albumId, requestParameters.personId, requestParameters.isArchived, requestParameters.isFavorite, requestParameters.key, options).then((request) => request(axios, basePath)); + return localVarFp.getByTimeBucket(requestParameters.size, requestParameters.timeBucket, requestParameters.userId, requestParameters.albumId, requestParameters.personId, requestParameters.isArchived, requestParameters.isFavorite, requestParameters.isTrashed, requestParameters.key, options).then((request) => request(axios, basePath)); }, /** * @@ -7503,7 +7709,7 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath * @throws {RequiredError} */ getMapMarkers(requestParameters: AssetApiGetMapMarkersRequest = {}, options?: AxiosRequestConfig): AxiosPromise> { - return localVarFp.getMapMarkers(requestParameters.isFavorite, requestParameters.fileCreatedAfter, requestParameters.fileCreatedBefore, options).then((request) => request(axios, basePath)); + return localVarFp.getMapMarkers(requestParameters.isArchived, requestParameters.isFavorite, requestParameters.fileCreatedAfter, requestParameters.fileCreatedBefore, options).then((request) => request(axios, basePath)); }, /** * @@ -7512,7 +7718,7 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath * @throws {RequiredError} */ getMemoryLane(requestParameters: AssetApiGetMemoryLaneRequest, options?: AxiosRequestConfig): AxiosPromise> { - return localVarFp.getMemoryLane(requestParameters.timestamp, options).then((request) => request(axios, basePath)); + return localVarFp.getMemoryLane(requestParameters.day, requestParameters.month, options).then((request) => request(axios, basePath)); }, /** * @@ -7530,7 +7736,7 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath * @throws {RequiredError} */ getTimeBuckets(requestParameters: AssetApiGetTimeBucketsRequest, options?: AxiosRequestConfig): AxiosPromise> { - return localVarFp.getTimeBuckets(requestParameters.size, requestParameters.userId, requestParameters.albumId, requestParameters.personId, requestParameters.isArchived, requestParameters.isFavorite, requestParameters.key, options).then((request) => request(axios, basePath)); + return localVarFp.getTimeBuckets(requestParameters.size, requestParameters.userId, requestParameters.albumId, requestParameters.personId, requestParameters.isArchived, requestParameters.isFavorite, requestParameters.isTrashed, requestParameters.key, options).then((request) => request(axios, basePath)); }, /** * Get all asset of a device that are in the database, ID only. @@ -7550,6 +7756,23 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath importFile(requestParameters: AssetApiImportFileRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.importFile(requestParameters.importAssetDto, options).then((request) => request(axios, basePath)); }, + /** + * + * @param {AssetApiRestoreAssetsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + restoreAssets(requestParameters: AssetApiRestoreAssetsRequest, options?: AxiosRequestConfig): AxiosPromise { + return localVarFp.restoreAssets(requestParameters.bulkIdsDto, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + restoreTrash(options?: AxiosRequestConfig): AxiosPromise { + return localVarFp.restoreTrash(options).then((request) => request(axios, basePath)); + }, /** * * @param {AssetApiRunAssetJobsRequest} requestParameters Request parameters. @@ -7657,17 +7880,17 @@ export interface AssetApiCheckExistingAssetsRequest { } /** - * Request parameters for deleteAsset operation in AssetApi. + * Request parameters for deleteAssets operation in AssetApi. * @export - * @interface AssetApiDeleteAssetRequest + * @interface AssetApiDeleteAssetsRequest */ -export interface AssetApiDeleteAssetRequest { +export interface AssetApiDeleteAssetsRequest { /** * - * @type {DeleteAssetDto} - * @memberof AssetApiDeleteAsset + * @type {AssetBulkDeleteDto} + * @memberof AssetApiDeleteAssets */ - readonly deleteAssetDto: DeleteAssetDto + readonly assetBulkDeleteDto: AssetBulkDeleteDto } /** @@ -7801,6 +8024,13 @@ export interface AssetApiGetAssetStatsRequest { * @memberof AssetApiGetAssetStats */ readonly isFavorite?: boolean + + /** + * + * @type {boolean} + * @memberof AssetApiGetAssetStats + */ + readonly isTrashed?: boolean } /** @@ -7886,6 +8116,13 @@ export interface AssetApiGetByTimeBucketRequest { */ readonly isFavorite?: boolean + /** + * + * @type {boolean} + * @memberof AssetApiGetByTimeBucket + */ + readonly isTrashed?: boolean + /** * * @type {string} @@ -7921,6 +8158,13 @@ export interface AssetApiGetDownloadInfoRequest { * @interface AssetApiGetMapMarkersRequest */ export interface AssetApiGetMapMarkersRequest { + /** + * + * @type {boolean} + * @memberof AssetApiGetMapMarkers + */ + readonly isArchived?: boolean + /** * * @type {boolean} @@ -7950,11 +8194,18 @@ export interface AssetApiGetMapMarkersRequest { */ export interface AssetApiGetMemoryLaneRequest { /** - * Get pictures for +24 hours from this time going back x years - * @type {string} + * + * @type {number} * @memberof AssetApiGetMemoryLane */ - readonly timestamp: string + readonly day: number + + /** + * + * @type {number} + * @memberof AssetApiGetMemoryLane + */ + readonly month: number } /** @@ -8019,6 +8270,13 @@ export interface AssetApiGetTimeBucketsRequest { */ readonly isFavorite?: boolean + /** + * + * @type {boolean} + * @memberof AssetApiGetTimeBuckets + */ + readonly isTrashed?: boolean + /** * * @type {string} @@ -8055,6 +8313,20 @@ export interface AssetApiImportFileRequest { readonly importAssetDto: ImportAssetDto } +/** + * Request parameters for restoreAssets operation in AssetApi. + * @export + * @interface AssetApiRestoreAssetsRequest + */ +export interface AssetApiRestoreAssetsRequest { + /** + * + * @type {BulkIdsDto} + * @memberof AssetApiRestoreAssets + */ + readonly bulkIdsDto: BulkIdsDto +} + /** * Request parameters for runAssetJobs operation in AssetApi. * @export @@ -8314,13 +8586,13 @@ export class AssetApi extends BaseAPI { /** * - * @param {AssetApiDeleteAssetRequest} requestParameters Request parameters. + * @param {AssetApiDeleteAssetsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AssetApi */ - public deleteAsset(requestParameters: AssetApiDeleteAssetRequest, options?: AxiosRequestConfig) { - return AssetApiFp(this.configuration).deleteAsset(requestParameters.deleteAssetDto, options).then((request) => request(this.axios, this.basePath)); + public deleteAssets(requestParameters: AssetApiDeleteAssetsRequest, options?: AxiosRequestConfig) { + return AssetApiFp(this.configuration).deleteAssets(requestParameters.assetBulkDeleteDto, options).then((request) => request(this.axios, this.basePath)); } /** @@ -8345,6 +8617,16 @@ export class AssetApi extends BaseAPI { return AssetApiFp(this.configuration).downloadFile(requestParameters.id, requestParameters.key, options).then((request) => request(this.axios, this.basePath)); } + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AssetApi + */ + public emptyTrash(options?: AxiosRequestConfig) { + return AssetApiFp(this.configuration).emptyTrash(options).then((request) => request(this.axios, this.basePath)); + } + /** * Get all AssetEntity belong to the user * @param {AssetApiGetAllAssetsRequest} requestParameters Request parameters. @@ -8385,7 +8667,7 @@ export class AssetApi extends BaseAPI { * @memberof AssetApi */ public getAssetStats(requestParameters: AssetApiGetAssetStatsRequest = {}, options?: AxiosRequestConfig) { - return AssetApiFp(this.configuration).getAssetStats(requestParameters.isArchived, requestParameters.isFavorite, options).then((request) => request(this.axios, this.basePath)); + return AssetApiFp(this.configuration).getAssetStats(requestParameters.isArchived, requestParameters.isFavorite, requestParameters.isTrashed, options).then((request) => request(this.axios, this.basePath)); } /** @@ -8407,7 +8689,7 @@ export class AssetApi extends BaseAPI { * @memberof AssetApi */ public getByTimeBucket(requestParameters: AssetApiGetByTimeBucketRequest, options?: AxiosRequestConfig) { - return AssetApiFp(this.configuration).getByTimeBucket(requestParameters.size, requestParameters.timeBucket, requestParameters.userId, requestParameters.albumId, requestParameters.personId, requestParameters.isArchived, requestParameters.isFavorite, requestParameters.key, options).then((request) => request(this.axios, this.basePath)); + return AssetApiFp(this.configuration).getByTimeBucket(requestParameters.size, requestParameters.timeBucket, requestParameters.userId, requestParameters.albumId, requestParameters.personId, requestParameters.isArchived, requestParameters.isFavorite, requestParameters.isTrashed, requestParameters.key, options).then((request) => request(this.axios, this.basePath)); } /** @@ -8449,7 +8731,7 @@ export class AssetApi extends BaseAPI { * @memberof AssetApi */ public getMapMarkers(requestParameters: AssetApiGetMapMarkersRequest = {}, options?: AxiosRequestConfig) { - return AssetApiFp(this.configuration).getMapMarkers(requestParameters.isFavorite, requestParameters.fileCreatedAfter, requestParameters.fileCreatedBefore, options).then((request) => request(this.axios, this.basePath)); + return AssetApiFp(this.configuration).getMapMarkers(requestParameters.isArchived, requestParameters.isFavorite, requestParameters.fileCreatedAfter, requestParameters.fileCreatedBefore, options).then((request) => request(this.axios, this.basePath)); } /** @@ -8460,7 +8742,7 @@ export class AssetApi extends BaseAPI { * @memberof AssetApi */ public getMemoryLane(requestParameters: AssetApiGetMemoryLaneRequest, options?: AxiosRequestConfig) { - return AssetApiFp(this.configuration).getMemoryLane(requestParameters.timestamp, options).then((request) => request(this.axios, this.basePath)); + return AssetApiFp(this.configuration).getMemoryLane(requestParameters.day, requestParameters.month, options).then((request) => request(this.axios, this.basePath)); } /** @@ -8482,7 +8764,7 @@ export class AssetApi extends BaseAPI { * @memberof AssetApi */ public getTimeBuckets(requestParameters: AssetApiGetTimeBucketsRequest, options?: AxiosRequestConfig) { - return AssetApiFp(this.configuration).getTimeBuckets(requestParameters.size, requestParameters.userId, requestParameters.albumId, requestParameters.personId, requestParameters.isArchived, requestParameters.isFavorite, requestParameters.key, options).then((request) => request(this.axios, this.basePath)); + return AssetApiFp(this.configuration).getTimeBuckets(requestParameters.size, requestParameters.userId, requestParameters.albumId, requestParameters.personId, requestParameters.isArchived, requestParameters.isFavorite, requestParameters.isTrashed, requestParameters.key, options).then((request) => request(this.axios, this.basePath)); } /** @@ -8507,6 +8789,27 @@ export class AssetApi extends BaseAPI { return AssetApiFp(this.configuration).importFile(requestParameters.importAssetDto, options).then((request) => request(this.axios, this.basePath)); } + /** + * + * @param {AssetApiRestoreAssetsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AssetApi + */ + public restoreAssets(requestParameters: AssetApiRestoreAssetsRequest, options?: AxiosRequestConfig) { + return AssetApiFp(this.configuration).restoreAssets(requestParameters.bulkIdsDto, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AssetApi + */ + public restoreTrash(options?: AxiosRequestConfig) { + return AssetApiFp(this.configuration).restoreTrash(options).then((request) => request(this.axios, this.basePath)); + } + /** * * @param {AssetApiRunAssetJobsRequest} requestParameters Request parameters. diff --git a/mobile/openapi/.openapi-generator/FILES b/mobile/openapi/.openapi-generator/FILES index bc52e21e5..ff15f00b0 100644 --- a/mobile/openapi/.openapi-generator/FILES +++ b/mobile/openapi/.openapi-generator/FILES @@ -15,6 +15,7 @@ doc/AlbumCountResponseDto.md doc/AlbumResponseDto.md doc/AllJobStatusResponseDto.md doc/AssetApi.md +doc/AssetBulkDeleteDto.md doc/AssetBulkUpdateDto.md doc/AssetBulkUploadCheckDto.md doc/AssetBulkUploadCheckItem.md @@ -56,9 +57,6 @@ doc/CreateTagDto.md doc/CreateUserDto.md doc/CuratedLocationsResponseDto.md doc/CuratedObjectsResponseDto.md -doc/DeleteAssetDto.md -doc/DeleteAssetResponseDto.md -doc/DeleteAssetStatus.md doc/DownloadArchiveInfo.md doc/DownloadInfoDto.md doc/DownloadResponseDto.md @@ -134,6 +132,7 @@ doc/SystemConfigReverseGeocodingDto.md doc/SystemConfigStorageTemplateDto.md doc/SystemConfigTemplateStorageOptionDto.md doc/SystemConfigThumbnailDto.md +doc/SystemConfigTrashDto.md doc/TagApi.md doc/TagResponseDto.md doc/TagTypeEnum.md @@ -189,6 +188,7 @@ lib/model/api_key_create_dto.dart lib/model/api_key_create_response_dto.dart lib/model/api_key_response_dto.dart lib/model/api_key_update_dto.dart +lib/model/asset_bulk_delete_dto.dart lib/model/asset_bulk_update_dto.dart lib/model/asset_bulk_upload_check_dto.dart lib/model/asset_bulk_upload_check_item.dart @@ -228,9 +228,6 @@ lib/model/create_tag_dto.dart lib/model/create_user_dto.dart lib/model/curated_locations_response_dto.dart lib/model/curated_objects_response_dto.dart -lib/model/delete_asset_dto.dart -lib/model/delete_asset_response_dto.dart -lib/model/delete_asset_status.dart lib/model/download_archive_info.dart lib/model/download_info_dto.dart lib/model/download_response_dto.dart @@ -297,6 +294,7 @@ lib/model/system_config_reverse_geocoding_dto.dart lib/model/system_config_storage_template_dto.dart lib/model/system_config_template_storage_option_dto.dart lib/model/system_config_thumbnail_dto.dart +lib/model/system_config_trash_dto.dart lib/model/tag_response_dto.dart lib/model/tag_type_enum.dart lib/model/thumbnail_format.dart @@ -328,6 +326,7 @@ test/api_key_create_response_dto_test.dart test/api_key_response_dto_test.dart test/api_key_update_dto_test.dart test/asset_api_test.dart +test/asset_bulk_delete_dto_test.dart test/asset_bulk_update_dto_test.dart test/asset_bulk_upload_check_dto_test.dart test/asset_bulk_upload_check_item_test.dart @@ -369,9 +368,6 @@ test/create_tag_dto_test.dart test/create_user_dto_test.dart test/curated_locations_response_dto_test.dart test/curated_objects_response_dto_test.dart -test/delete_asset_dto_test.dart -test/delete_asset_response_dto_test.dart -test/delete_asset_status_test.dart test/download_archive_info_test.dart test/download_info_dto_test.dart test/download_response_dto_test.dart @@ -447,6 +443,7 @@ test/system_config_reverse_geocoding_dto_test.dart test/system_config_storage_template_dto_test.dart test/system_config_template_storage_option_dto_test.dart test/system_config_thumbnail_dto_test.dart +test/system_config_trash_dto_test.dart test/tag_api_test.dart test/tag_response_dto_test.dart test/tag_type_enum_test.dart diff --git a/mobile/openapi/README.md b/mobile/openapi/README.md index 8395ae768..61d7368bd 100644 --- a/mobile/openapi/README.md +++ b/mobile/openapi/README.md @@ -3,7 +3,7 @@ Immich API This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 1.81.0 +- API version: 1.81.1 - Build package: org.openapitools.codegen.languages.DartClientCodegen ## Requirements @@ -90,9 +90,10 @@ Class | Method | HTTP request | Description *AssetApi* | [**bulkUploadCheck**](doc//AssetApi.md#bulkuploadcheck) | **POST** /asset/bulk-upload-check | *AssetApi* | [**checkDuplicateAsset**](doc//AssetApi.md#checkduplicateasset) | **POST** /asset/check | *AssetApi* | [**checkExistingAssets**](doc//AssetApi.md#checkexistingassets) | **POST** /asset/exist | -*AssetApi* | [**deleteAsset**](doc//AssetApi.md#deleteasset) | **DELETE** /asset | +*AssetApi* | [**deleteAssets**](doc//AssetApi.md#deleteassets) | **DELETE** /asset | *AssetApi* | [**downloadArchive**](doc//AssetApi.md#downloadarchive) | **POST** /asset/download/archive | *AssetApi* | [**downloadFile**](doc//AssetApi.md#downloadfile) | **POST** /asset/download/{id} | +*AssetApi* | [**emptyTrash**](doc//AssetApi.md#emptytrash) | **POST** /asset/trash/empty | *AssetApi* | [**getAllAssets**](doc//AssetApi.md#getallassets) | **GET** /asset | *AssetApi* | [**getAssetById**](doc//AssetApi.md#getassetbyid) | **GET** /asset/assetById/{id} | *AssetApi* | [**getAssetSearchTerms**](doc//AssetApi.md#getassetsearchterms) | **GET** /asset/search-terms | @@ -108,6 +109,8 @@ Class | Method | HTTP request | Description *AssetApi* | [**getTimeBuckets**](doc//AssetApi.md#gettimebuckets) | **GET** /asset/time-buckets | *AssetApi* | [**getUserAssetsByDeviceId**](doc//AssetApi.md#getuserassetsbydeviceid) | **GET** /asset/{deviceId} | *AssetApi* | [**importFile**](doc//AssetApi.md#importfile) | **POST** /asset/import | +*AssetApi* | [**restoreAssets**](doc//AssetApi.md#restoreassets) | **POST** /asset/restore | +*AssetApi* | [**restoreTrash**](doc//AssetApi.md#restoretrash) | **POST** /asset/trash/restore | *AssetApi* | [**runAssetJobs**](doc//AssetApi.md#runassetjobs) | **POST** /asset/jobs | *AssetApi* | [**searchAsset**](doc//AssetApi.md#searchasset) | **POST** /asset/search | *AssetApi* | [**serveFile**](doc//AssetApi.md#servefile) | **GET** /asset/file/{id} | @@ -204,6 +207,7 @@ Class | Method | HTTP request | Description - [AlbumCountResponseDto](doc//AlbumCountResponseDto.md) - [AlbumResponseDto](doc//AlbumResponseDto.md) - [AllJobStatusResponseDto](doc//AllJobStatusResponseDto.md) + - [AssetBulkDeleteDto](doc//AssetBulkDeleteDto.md) - [AssetBulkUpdateDto](doc//AssetBulkUpdateDto.md) - [AssetBulkUploadCheckDto](doc//AssetBulkUploadCheckDto.md) - [AssetBulkUploadCheckItem](doc//AssetBulkUploadCheckItem.md) @@ -243,9 +247,6 @@ Class | Method | HTTP request | Description - [CreateUserDto](doc//CreateUserDto.md) - [CuratedLocationsResponseDto](doc//CuratedLocationsResponseDto.md) - [CuratedObjectsResponseDto](doc//CuratedObjectsResponseDto.md) - - [DeleteAssetDto](doc//DeleteAssetDto.md) - - [DeleteAssetResponseDto](doc//DeleteAssetResponseDto.md) - - [DeleteAssetStatus](doc//DeleteAssetStatus.md) - [DownloadArchiveInfo](doc//DownloadArchiveInfo.md) - [DownloadInfoDto](doc//DownloadInfoDto.md) - [DownloadResponseDto](doc//DownloadResponseDto.md) @@ -312,6 +313,7 @@ Class | Method | HTTP request | Description - [SystemConfigStorageTemplateDto](doc//SystemConfigStorageTemplateDto.md) - [SystemConfigTemplateStorageOptionDto](doc//SystemConfigTemplateStorageOptionDto.md) - [SystemConfigThumbnailDto](doc//SystemConfigThumbnailDto.md) + - [SystemConfigTrashDto](doc//SystemConfigTrashDto.md) - [TagResponseDto](doc//TagResponseDto.md) - [TagTypeEnum](doc//TagTypeEnum.md) - [ThumbnailFormat](doc//ThumbnailFormat.md) diff --git a/mobile/openapi/lib/api.dart b/mobile/openapi/lib/api.dart index fe266f8c8..d11601bf2 100644 --- a/mobile/openapi/lib/api.dart +++ b/mobile/openapi/lib/api.dart @@ -54,6 +54,7 @@ part 'model/admin_signup_response_dto.dart'; part 'model/album_count_response_dto.dart'; part 'model/album_response_dto.dart'; part 'model/all_job_status_response_dto.dart'; +part 'model/asset_bulk_delete_dto.dart'; part 'model/asset_bulk_update_dto.dart'; part 'model/asset_bulk_upload_check_dto.dart'; part 'model/asset_bulk_upload_check_item.dart'; @@ -93,9 +94,6 @@ part 'model/create_tag_dto.dart'; part 'model/create_user_dto.dart'; part 'model/curated_locations_response_dto.dart'; part 'model/curated_objects_response_dto.dart'; -part 'model/delete_asset_dto.dart'; -part 'model/delete_asset_response_dto.dart'; -part 'model/delete_asset_status.dart'; part 'model/download_archive_info.dart'; part 'model/download_info_dto.dart'; part 'model/download_response_dto.dart'; @@ -162,6 +160,7 @@ part 'model/system_config_reverse_geocoding_dto.dart'; part 'model/system_config_storage_template_dto.dart'; part 'model/system_config_template_storage_option_dto.dart'; part 'model/system_config_thumbnail_dto.dart'; +part 'model/system_config_trash_dto.dart'; part 'model/tag_response_dto.dart'; part 'model/tag_type_enum.dart'; part 'model/thumbnail_format.dart'; diff --git a/mobile/openapi/lib/api_client.dart b/mobile/openapi/lib/api_client.dart index e5f9ddb97..5a0b913e3 100644 --- a/mobile/openapi/lib/api_client.dart +++ b/mobile/openapi/lib/api_client.dart @@ -199,6 +199,8 @@ class ApiClient { return AlbumResponseDto.fromJson(value); case 'AllJobStatusResponseDto': return AllJobStatusResponseDto.fromJson(value); + case 'AssetBulkDeleteDto': + return AssetBulkDeleteDto.fromJson(value); case 'AssetBulkUpdateDto': return AssetBulkUpdateDto.fromJson(value); case 'AssetBulkUploadCheckDto': @@ -277,12 +279,6 @@ class ApiClient { return CuratedLocationsResponseDto.fromJson(value); case 'CuratedObjectsResponseDto': return CuratedObjectsResponseDto.fromJson(value); - case 'DeleteAssetDto': - return DeleteAssetDto.fromJson(value); - case 'DeleteAssetResponseDto': - return DeleteAssetResponseDto.fromJson(value); - case 'DeleteAssetStatus': - return DeleteAssetStatusTypeTransformer().decode(value); case 'DownloadArchiveInfo': return DownloadArchiveInfo.fromJson(value); case 'DownloadInfoDto': @@ -415,6 +411,8 @@ class ApiClient { return SystemConfigTemplateStorageOptionDto.fromJson(value); case 'SystemConfigThumbnailDto': return SystemConfigThumbnailDto.fromJson(value); + case 'SystemConfigTrashDto': + return SystemConfigTrashDto.fromJson(value); case 'TagResponseDto': return TagResponseDto.fromJson(value); case 'TagTypeEnum': diff --git a/web/src/api/open-api/api.ts b/web/src/api/open-api/api.ts index b61fa83fe..a060a79a1 100644 --- a/web/src/api/open-api/api.ts +++ b/web/src/api/open-api/api.ts @@ -4,7 +4,7 @@ * Immich * Immich API * - * The version of the OpenAPI document: 1.81.0 + * The version of the OpenAPI document: 1.81.1 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -356,6 +356,25 @@ export interface AllJobStatusResponseDto { */ 'videoConversion': JobStatusDto; } +/** + * + * @export + * @interface AssetBulkDeleteDto + */ +export interface AssetBulkDeleteDto { + /** + * + * @type {boolean} + * @memberof AssetBulkDeleteDto + */ + 'force'?: boolean; + /** + * + * @type {Array} + * @memberof AssetBulkDeleteDto + */ + 'ids': Array; +} /** * * @export @@ -732,6 +751,12 @@ export interface AssetResponseDto { * @memberof AssetResponseDto */ 'isReadOnly': boolean; + /** + * + * @type {boolean} + * @memberof AssetResponseDto + */ + 'isTrashed': boolean; /** * * @type {string} @@ -744,6 +769,12 @@ export interface AssetResponseDto { * @memberof AssetResponseDto */ 'livePhotoVideoId'?: string | null; + /** + * + * @type {string} + * @memberof AssetResponseDto + */ + 'localDateTime': string; /** * * @type {string} @@ -1426,54 +1457,6 @@ export interface CuratedObjectsResponseDto { */ 'resizePath': string; } -/** - * - * @export - * @interface DeleteAssetDto - */ -export interface DeleteAssetDto { - /** - * - * @type {Array} - * @memberof DeleteAssetDto - */ - 'ids': Array; -} -/** - * - * @export - * @interface DeleteAssetResponseDto - */ -export interface DeleteAssetResponseDto { - /** - * - * @type {string} - * @memberof DeleteAssetResponseDto - */ - 'id': string; - /** - * - * @type {DeleteAssetStatus} - * @memberof DeleteAssetResponseDto - */ - 'status': DeleteAssetStatus; -} - - -/** - * - * @export - * @enum {string} - */ - -export const DeleteAssetStatus = { - Success: 'SUCCESS', - Failed: 'FAILED' -} as const; - -export type DeleteAssetStatus = typeof DeleteAssetStatus[keyof typeof DeleteAssetStatus]; - - /** * * @export @@ -2692,6 +2675,12 @@ export interface ServerConfigDto { * @memberof ServerConfigDto */ 'oauthButtonText': string; + /** + * + * @type {number} + * @memberof ServerConfigDto + */ + 'trashDays': number; } /** * @@ -2765,6 +2754,12 @@ export interface ServerFeaturesDto { * @memberof ServerFeaturesDto */ 'tagImage': boolean; + /** + * + * @type {boolean} + * @memberof ServerFeaturesDto + */ + 'trash': boolean; } /** * @@ -3208,6 +3203,12 @@ export interface SystemConfigDto { * @memberof SystemConfigDto */ 'thumbnail': SystemConfigThumbnailDto; + /** + * + * @type {SystemConfigTrashDto} + * @memberof SystemConfigDto + */ + 'trash': SystemConfigTrashDto; } /** * @@ -3663,6 +3664,25 @@ export interface SystemConfigThumbnailDto { } +/** + * + * @export + * @interface SystemConfigTrashDto + */ +export interface SystemConfigTrashDto { + /** + * + * @type {number} + * @memberof SystemConfigTrashDto + */ + 'days': number; + /** + * + * @type {boolean} + * @memberof SystemConfigTrashDto + */ + 'enabled': boolean; +} /** * * @export @@ -5751,13 +5771,13 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration }, /** * - * @param {DeleteAssetDto} deleteAssetDto + * @param {AssetBulkDeleteDto} assetBulkDeleteDto * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteAsset: async (deleteAssetDto: DeleteAssetDto, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'deleteAssetDto' is not null or undefined - assertParamExists('deleteAsset', 'deleteAssetDto', deleteAssetDto) + deleteAssets: async (assetBulkDeleteDto: AssetBulkDeleteDto, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'assetBulkDeleteDto' is not null or undefined + assertParamExists('deleteAssets', 'assetBulkDeleteDto', assetBulkDeleteDto) const localVarPath = `/asset`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -5786,7 +5806,7 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(deleteAssetDto, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(assetBulkDeleteDto, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -5880,6 +5900,44 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + emptyTrash: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/asset/trash/empty`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication cookie required + + // authentication api_key required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -6048,10 +6106,11 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration * * @param {boolean} [isArchived] * @param {boolean} [isFavorite] + * @param {boolean} [isTrashed] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAssetStats: async (isArchived?: boolean, isFavorite?: boolean, options: AxiosRequestConfig = {}): Promise => { + getAssetStats: async (isArchived?: boolean, isFavorite?: boolean, isTrashed?: boolean, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/asset/statistics`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -6081,6 +6140,10 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration localVarQueryParameter['isFavorite'] = isFavorite; } + if (isTrashed !== undefined) { + localVarQueryParameter['isTrashed'] = isTrashed; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -6153,11 +6216,12 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration * @param {string} [personId] * @param {boolean} [isArchived] * @param {boolean} [isFavorite] + * @param {boolean} [isTrashed] * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getByTimeBucket: async (size: TimeBucketSize, timeBucket: string, userId?: string, albumId?: string, personId?: string, isArchived?: boolean, isFavorite?: boolean, key?: string, options: AxiosRequestConfig = {}): Promise => { + getByTimeBucket: async (size: TimeBucketSize, timeBucket: string, userId?: string, albumId?: string, personId?: string, isArchived?: boolean, isFavorite?: boolean, isTrashed?: boolean, key?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'size' is not null or undefined assertParamExists('getByTimeBucket', 'size', size) // verify required parameter 'timeBucket' is not null or undefined @@ -6207,6 +6271,10 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration localVarQueryParameter['isFavorite'] = isFavorite; } + if (isTrashed !== undefined) { + localVarQueryParameter['isTrashed'] = isTrashed; + } + if (timeBucket !== undefined) { localVarQueryParameter['timeBucket'] = timeBucket; } @@ -6353,13 +6421,14 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration }, /** * + * @param {boolean} [isArchived] * @param {boolean} [isFavorite] * @param {string} [fileCreatedAfter] * @param {string} [fileCreatedBefore] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getMapMarkers: async (isFavorite?: boolean, fileCreatedAfter?: string, fileCreatedBefore?: string, options: AxiosRequestConfig = {}): Promise => { + getMapMarkers: async (isArchived?: boolean, isFavorite?: boolean, fileCreatedAfter?: string, fileCreatedBefore?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/asset/map-marker`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -6381,6 +6450,10 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + if (isArchived !== undefined) { + localVarQueryParameter['isArchived'] = isArchived; + } + if (isFavorite !== undefined) { localVarQueryParameter['isFavorite'] = isFavorite; } @@ -6410,13 +6483,16 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration }, /** * - * @param {string} timestamp Get pictures for +24 hours from this time going back x years + * @param {number} day + * @param {number} month * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getMemoryLane: async (timestamp: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'timestamp' is not null or undefined - assertParamExists('getMemoryLane', 'timestamp', timestamp) + getMemoryLane: async (day: number, month: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'day' is not null or undefined + assertParamExists('getMemoryLane', 'day', day) + // verify required parameter 'month' is not null or undefined + assertParamExists('getMemoryLane', 'month', month) const localVarPath = `/asset/memory-lane`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -6438,10 +6514,12 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) - if (timestamp !== undefined) { - localVarQueryParameter['timestamp'] = (timestamp as any instanceof Date) ? - (timestamp as any).toISOString() : - timestamp; + if (day !== undefined) { + localVarQueryParameter['day'] = day; + } + + if (month !== undefined) { + localVarQueryParameter['month'] = month; } @@ -6506,11 +6584,12 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration * @param {string} [personId] * @param {boolean} [isArchived] * @param {boolean} [isFavorite] + * @param {boolean} [isTrashed] * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getTimeBuckets: async (size: TimeBucketSize, userId?: string, albumId?: string, personId?: string, isArchived?: boolean, isFavorite?: boolean, key?: string, options: AxiosRequestConfig = {}): Promise => { + getTimeBuckets: async (size: TimeBucketSize, userId?: string, albumId?: string, personId?: string, isArchived?: boolean, isFavorite?: boolean, isTrashed?: boolean, key?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'size' is not null or undefined assertParamExists('getTimeBuckets', 'size', size) const localVarPath = `/asset/time-buckets`; @@ -6558,6 +6637,10 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration localVarQueryParameter['isFavorite'] = isFavorite; } + if (isTrashed !== undefined) { + localVarQueryParameter['isTrashed'] = isTrashed; + } + if (key !== undefined) { localVarQueryParameter['key'] = key; } @@ -6659,6 +6742,88 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration options: localVarRequestOptions, }; }, + /** + * + * @param {BulkIdsDto} bulkIdsDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + restoreAssets: async (bulkIdsDto: BulkIdsDto, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'bulkIdsDto' is not null or undefined + assertParamExists('restoreAssets', 'bulkIdsDto', bulkIdsDto) + const localVarPath = `/asset/restore`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication cookie required + + // authentication api_key required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(bulkIdsDto, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + restoreTrash: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/asset/trash/restore`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication cookie required + + // authentication api_key required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** * * @param {AssetJobsDto} assetJobsDto @@ -7073,12 +7238,12 @@ export const AssetApiFp = function(configuration?: Configuration) { }, /** * - * @param {DeleteAssetDto} deleteAssetDto + * @param {AssetBulkDeleteDto} assetBulkDeleteDto * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteAsset(deleteAssetDto: DeleteAssetDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAsset(deleteAssetDto, options); + async deleteAssets(assetBulkDeleteDto: AssetBulkDeleteDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAssets(assetBulkDeleteDto, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -7103,6 +7268,15 @@ export const AssetApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.downloadFile(id, key, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async emptyTrash(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.emptyTrash(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, /** * Get all AssetEntity belong to the user * @param {string} [userId] @@ -7142,11 +7316,12 @@ export const AssetApiFp = function(configuration?: Configuration) { * * @param {boolean} [isArchived] * @param {boolean} [isFavorite] + * @param {boolean} [isTrashed] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getAssetStats(isArchived?: boolean, isFavorite?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getAssetStats(isArchived, isFavorite, options); + async getAssetStats(isArchived?: boolean, isFavorite?: boolean, isTrashed?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAssetStats(isArchived, isFavorite, isTrashed, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -7170,12 +7345,13 @@ export const AssetApiFp = function(configuration?: Configuration) { * @param {string} [personId] * @param {boolean} [isArchived] * @param {boolean} [isFavorite] + * @param {boolean} [isTrashed] * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getByTimeBucket(size: TimeBucketSize, timeBucket: string, userId?: string, albumId?: string, personId?: string, isArchived?: boolean, isFavorite?: boolean, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getByTimeBucket(size, timeBucket, userId, albumId, personId, isArchived, isFavorite, key, options); + async getByTimeBucket(size: TimeBucketSize, timeBucket: string, userId?: string, albumId?: string, personId?: string, isArchived?: boolean, isFavorite?: boolean, isTrashed?: boolean, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getByTimeBucket(size, timeBucket, userId, albumId, personId, isArchived, isFavorite, isTrashed, key, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -7209,24 +7385,26 @@ export const AssetApiFp = function(configuration?: Configuration) { }, /** * + * @param {boolean} [isArchived] * @param {boolean} [isFavorite] * @param {string} [fileCreatedAfter] * @param {string} [fileCreatedBefore] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getMapMarkers(isFavorite?: boolean, fileCreatedAfter?: string, fileCreatedBefore?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getMapMarkers(isFavorite, fileCreatedAfter, fileCreatedBefore, options); + async getMapMarkers(isArchived?: boolean, isFavorite?: boolean, fileCreatedAfter?: string, fileCreatedBefore?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMapMarkers(isArchived, isFavorite, fileCreatedAfter, fileCreatedBefore, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * - * @param {string} timestamp Get pictures for +24 hours from this time going back x years + * @param {number} day + * @param {number} month * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getMemoryLane(timestamp: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getMemoryLane(timestamp, options); + async getMemoryLane(day: number, month: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMemoryLane(day, month, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -7247,12 +7425,13 @@ export const AssetApiFp = function(configuration?: Configuration) { * @param {string} [personId] * @param {boolean} [isArchived] * @param {boolean} [isFavorite] + * @param {boolean} [isTrashed] * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getTimeBuckets(size: TimeBucketSize, userId?: string, albumId?: string, personId?: string, isArchived?: boolean, isFavorite?: boolean, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getTimeBuckets(size, userId, albumId, personId, isArchived, isFavorite, key, options); + async getTimeBuckets(size: TimeBucketSize, userId?: string, albumId?: string, personId?: string, isArchived?: boolean, isFavorite?: boolean, isTrashed?: boolean, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTimeBuckets(size, userId, albumId, personId, isArchived, isFavorite, isTrashed, key, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -7275,6 +7454,25 @@ export const AssetApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.importFile(importAssetDto, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + /** + * + * @param {BulkIdsDto} bulkIdsDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async restoreAssets(bulkIdsDto: BulkIdsDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.restoreAssets(bulkIdsDto, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async restoreTrash(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.restoreTrash(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, /** * * @param {AssetJobsDto} assetJobsDto @@ -7393,12 +7591,12 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath }, /** * - * @param {AssetApiDeleteAssetRequest} requestParameters Request parameters. + * @param {AssetApiDeleteAssetsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteAsset(requestParameters: AssetApiDeleteAssetRequest, options?: AxiosRequestConfig): AxiosPromise> { - return localVarFp.deleteAsset(requestParameters.deleteAssetDto, options).then((request) => request(axios, basePath)); + deleteAssets(requestParameters: AssetApiDeleteAssetsRequest, options?: AxiosRequestConfig): AxiosPromise { + return localVarFp.deleteAssets(requestParameters.assetBulkDeleteDto, options).then((request) => request(axios, basePath)); }, /** * @@ -7418,6 +7616,14 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath downloadFile(requestParameters: AssetApiDownloadFileRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.downloadFile(requestParameters.id, requestParameters.key, options).then((request) => request(axios, basePath)); }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + emptyTrash(options?: AxiosRequestConfig): AxiosPromise { + return localVarFp.emptyTrash(options).then((request) => request(axios, basePath)); + }, /** * Get all AssetEntity belong to the user * @param {AssetApiGetAllAssetsRequest} requestParameters Request parameters. @@ -7451,7 +7657,7 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath * @throws {RequiredError} */ getAssetStats(requestParameters: AssetApiGetAssetStatsRequest = {}, options?: AxiosRequestConfig): AxiosPromise { - return localVarFp.getAssetStats(requestParameters.isArchived, requestParameters.isFavorite, options).then((request) => request(axios, basePath)); + return localVarFp.getAssetStats(requestParameters.isArchived, requestParameters.isFavorite, requestParameters.isTrashed, options).then((request) => request(axios, basePath)); }, /** * @@ -7469,7 +7675,7 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath * @throws {RequiredError} */ getByTimeBucket(requestParameters: AssetApiGetByTimeBucketRequest, options?: AxiosRequestConfig): AxiosPromise> { - return localVarFp.getByTimeBucket(requestParameters.size, requestParameters.timeBucket, requestParameters.userId, requestParameters.albumId, requestParameters.personId, requestParameters.isArchived, requestParameters.isFavorite, requestParameters.key, options).then((request) => request(axios, basePath)); + return localVarFp.getByTimeBucket(requestParameters.size, requestParameters.timeBucket, requestParameters.userId, requestParameters.albumId, requestParameters.personId, requestParameters.isArchived, requestParameters.isFavorite, requestParameters.isTrashed, requestParameters.key, options).then((request) => request(axios, basePath)); }, /** * @@ -7503,7 +7709,7 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath * @throws {RequiredError} */ getMapMarkers(requestParameters: AssetApiGetMapMarkersRequest = {}, options?: AxiosRequestConfig): AxiosPromise> { - return localVarFp.getMapMarkers(requestParameters.isFavorite, requestParameters.fileCreatedAfter, requestParameters.fileCreatedBefore, options).then((request) => request(axios, basePath)); + return localVarFp.getMapMarkers(requestParameters.isArchived, requestParameters.isFavorite, requestParameters.fileCreatedAfter, requestParameters.fileCreatedBefore, options).then((request) => request(axios, basePath)); }, /** * @@ -7512,7 +7718,7 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath * @throws {RequiredError} */ getMemoryLane(requestParameters: AssetApiGetMemoryLaneRequest, options?: AxiosRequestConfig): AxiosPromise> { - return localVarFp.getMemoryLane(requestParameters.timestamp, options).then((request) => request(axios, basePath)); + return localVarFp.getMemoryLane(requestParameters.day, requestParameters.month, options).then((request) => request(axios, basePath)); }, /** * @@ -7530,7 +7736,7 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath * @throws {RequiredError} */ getTimeBuckets(requestParameters: AssetApiGetTimeBucketsRequest, options?: AxiosRequestConfig): AxiosPromise> { - return localVarFp.getTimeBuckets(requestParameters.size, requestParameters.userId, requestParameters.albumId, requestParameters.personId, requestParameters.isArchived, requestParameters.isFavorite, requestParameters.key, options).then((request) => request(axios, basePath)); + return localVarFp.getTimeBuckets(requestParameters.size, requestParameters.userId, requestParameters.albumId, requestParameters.personId, requestParameters.isArchived, requestParameters.isFavorite, requestParameters.isTrashed, requestParameters.key, options).then((request) => request(axios, basePath)); }, /** * Get all asset of a device that are in the database, ID only. @@ -7550,6 +7756,23 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath importFile(requestParameters: AssetApiImportFileRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.importFile(requestParameters.importAssetDto, options).then((request) => request(axios, basePath)); }, + /** + * + * @param {AssetApiRestoreAssetsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + restoreAssets(requestParameters: AssetApiRestoreAssetsRequest, options?: AxiosRequestConfig): AxiosPromise { + return localVarFp.restoreAssets(requestParameters.bulkIdsDto, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + restoreTrash(options?: AxiosRequestConfig): AxiosPromise { + return localVarFp.restoreTrash(options).then((request) => request(axios, basePath)); + }, /** * * @param {AssetApiRunAssetJobsRequest} requestParameters Request parameters. @@ -7657,17 +7880,17 @@ export interface AssetApiCheckExistingAssetsRequest { } /** - * Request parameters for deleteAsset operation in AssetApi. + * Request parameters for deleteAssets operation in AssetApi. * @export - * @interface AssetApiDeleteAssetRequest + * @interface AssetApiDeleteAssetsRequest */ -export interface AssetApiDeleteAssetRequest { +export interface AssetApiDeleteAssetsRequest { /** * - * @type {DeleteAssetDto} - * @memberof AssetApiDeleteAsset + * @type {AssetBulkDeleteDto} + * @memberof AssetApiDeleteAssets */ - readonly deleteAssetDto: DeleteAssetDto + readonly assetBulkDeleteDto: AssetBulkDeleteDto } /** @@ -7801,6 +8024,13 @@ export interface AssetApiGetAssetStatsRequest { * @memberof AssetApiGetAssetStats */ readonly isFavorite?: boolean + + /** + * + * @type {boolean} + * @memberof AssetApiGetAssetStats + */ + readonly isTrashed?: boolean } /** @@ -7886,6 +8116,13 @@ export interface AssetApiGetByTimeBucketRequest { */ readonly isFavorite?: boolean + /** + * + * @type {boolean} + * @memberof AssetApiGetByTimeBucket + */ + readonly isTrashed?: boolean + /** * * @type {string} @@ -7921,6 +8158,13 @@ export interface AssetApiGetDownloadInfoRequest { * @interface AssetApiGetMapMarkersRequest */ export interface AssetApiGetMapMarkersRequest { + /** + * + * @type {boolean} + * @memberof AssetApiGetMapMarkers + */ + readonly isArchived?: boolean + /** * * @type {boolean} @@ -7950,11 +8194,18 @@ export interface AssetApiGetMapMarkersRequest { */ export interface AssetApiGetMemoryLaneRequest { /** - * Get pictures for +24 hours from this time going back x years - * @type {string} + * + * @type {number} * @memberof AssetApiGetMemoryLane */ - readonly timestamp: string + readonly day: number + + /** + * + * @type {number} + * @memberof AssetApiGetMemoryLane + */ + readonly month: number } /** @@ -8019,6 +8270,13 @@ export interface AssetApiGetTimeBucketsRequest { */ readonly isFavorite?: boolean + /** + * + * @type {boolean} + * @memberof AssetApiGetTimeBuckets + */ + readonly isTrashed?: boolean + /** * * @type {string} @@ -8055,6 +8313,20 @@ export interface AssetApiImportFileRequest { readonly importAssetDto: ImportAssetDto } +/** + * Request parameters for restoreAssets operation in AssetApi. + * @export + * @interface AssetApiRestoreAssetsRequest + */ +export interface AssetApiRestoreAssetsRequest { + /** + * + * @type {BulkIdsDto} + * @memberof AssetApiRestoreAssets + */ + readonly bulkIdsDto: BulkIdsDto +} + /** * Request parameters for runAssetJobs operation in AssetApi. * @export @@ -8314,13 +8586,13 @@ export class AssetApi extends BaseAPI { /** * - * @param {AssetApiDeleteAssetRequest} requestParameters Request parameters. + * @param {AssetApiDeleteAssetsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AssetApi */ - public deleteAsset(requestParameters: AssetApiDeleteAssetRequest, options?: AxiosRequestConfig) { - return AssetApiFp(this.configuration).deleteAsset(requestParameters.deleteAssetDto, options).then((request) => request(this.axios, this.basePath)); + public deleteAssets(requestParameters: AssetApiDeleteAssetsRequest, options?: AxiosRequestConfig) { + return AssetApiFp(this.configuration).deleteAssets(requestParameters.assetBulkDeleteDto, options).then((request) => request(this.axios, this.basePath)); } /** @@ -8345,6 +8617,16 @@ export class AssetApi extends BaseAPI { return AssetApiFp(this.configuration).downloadFile(requestParameters.id, requestParameters.key, options).then((request) => request(this.axios, this.basePath)); } + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AssetApi + */ + public emptyTrash(options?: AxiosRequestConfig) { + return AssetApiFp(this.configuration).emptyTrash(options).then((request) => request(this.axios, this.basePath)); + } + /** * Get all AssetEntity belong to the user * @param {AssetApiGetAllAssetsRequest} requestParameters Request parameters. @@ -8385,7 +8667,7 @@ export class AssetApi extends BaseAPI { * @memberof AssetApi */ public getAssetStats(requestParameters: AssetApiGetAssetStatsRequest = {}, options?: AxiosRequestConfig) { - return AssetApiFp(this.configuration).getAssetStats(requestParameters.isArchived, requestParameters.isFavorite, options).then((request) => request(this.axios, this.basePath)); + return AssetApiFp(this.configuration).getAssetStats(requestParameters.isArchived, requestParameters.isFavorite, requestParameters.isTrashed, options).then((request) => request(this.axios, this.basePath)); } /** @@ -8407,7 +8689,7 @@ export class AssetApi extends BaseAPI { * @memberof AssetApi */ public getByTimeBucket(requestParameters: AssetApiGetByTimeBucketRequest, options?: AxiosRequestConfig) { - return AssetApiFp(this.configuration).getByTimeBucket(requestParameters.size, requestParameters.timeBucket, requestParameters.userId, requestParameters.albumId, requestParameters.personId, requestParameters.isArchived, requestParameters.isFavorite, requestParameters.key, options).then((request) => request(this.axios, this.basePath)); + return AssetApiFp(this.configuration).getByTimeBucket(requestParameters.size, requestParameters.timeBucket, requestParameters.userId, requestParameters.albumId, requestParameters.personId, requestParameters.isArchived, requestParameters.isFavorite, requestParameters.isTrashed, requestParameters.key, options).then((request) => request(this.axios, this.basePath)); } /** @@ -8449,7 +8731,7 @@ export class AssetApi extends BaseAPI { * @memberof AssetApi */ public getMapMarkers(requestParameters: AssetApiGetMapMarkersRequest = {}, options?: AxiosRequestConfig) { - return AssetApiFp(this.configuration).getMapMarkers(requestParameters.isFavorite, requestParameters.fileCreatedAfter, requestParameters.fileCreatedBefore, options).then((request) => request(this.axios, this.basePath)); + return AssetApiFp(this.configuration).getMapMarkers(requestParameters.isArchived, requestParameters.isFavorite, requestParameters.fileCreatedAfter, requestParameters.fileCreatedBefore, options).then((request) => request(this.axios, this.basePath)); } /** @@ -8460,7 +8742,7 @@ export class AssetApi extends BaseAPI { * @memberof AssetApi */ public getMemoryLane(requestParameters: AssetApiGetMemoryLaneRequest, options?: AxiosRequestConfig) { - return AssetApiFp(this.configuration).getMemoryLane(requestParameters.timestamp, options).then((request) => request(this.axios, this.basePath)); + return AssetApiFp(this.configuration).getMemoryLane(requestParameters.day, requestParameters.month, options).then((request) => request(this.axios, this.basePath)); } /** @@ -8482,7 +8764,7 @@ export class AssetApi extends BaseAPI { * @memberof AssetApi */ public getTimeBuckets(requestParameters: AssetApiGetTimeBucketsRequest, options?: AxiosRequestConfig) { - return AssetApiFp(this.configuration).getTimeBuckets(requestParameters.size, requestParameters.userId, requestParameters.albumId, requestParameters.personId, requestParameters.isArchived, requestParameters.isFavorite, requestParameters.key, options).then((request) => request(this.axios, this.basePath)); + return AssetApiFp(this.configuration).getTimeBuckets(requestParameters.size, requestParameters.userId, requestParameters.albumId, requestParameters.personId, requestParameters.isArchived, requestParameters.isFavorite, requestParameters.isTrashed, requestParameters.key, options).then((request) => request(this.axios, this.basePath)); } /** @@ -8507,6 +8789,27 @@ export class AssetApi extends BaseAPI { return AssetApiFp(this.configuration).importFile(requestParameters.importAssetDto, options).then((request) => request(this.axios, this.basePath)); } + /** + * + * @param {AssetApiRestoreAssetsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AssetApi + */ + public restoreAssets(requestParameters: AssetApiRestoreAssetsRequest, options?: AxiosRequestConfig) { + return AssetApiFp(this.configuration).restoreAssets(requestParameters.bulkIdsDto, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AssetApi + */ + public restoreTrash(options?: AxiosRequestConfig) { + return AssetApiFp(this.configuration).restoreTrash(options).then((request) => request(this.axios, this.basePath)); + } + /** * * @param {AssetApiRunAssetJobsRequest} requestParameters Request parameters. diff --git a/web/src/routes/(user)/people/[personId]/+page.svelte b/web/src/routes/(user)/people/[personId]/+page.svelte index 7249efd1b..5339f27e1 100644 --- a/web/src/routes/(user)/people/[personId]/+page.svelte +++ b/web/src/routes/(user)/people/[personId]/+page.svelte @@ -122,6 +122,7 @@ personId: data.person.id, }); previousPersonId = data.person.id; + personName = ''; refreshAssetGrid = !refreshAssetGrid; } }); @@ -147,7 +148,7 @@ const handleReassignAssets = () => { viewMode = ViewMode.UNASSIGN_ASSETS; }; - + const handleMerge = () => { handleGoBack(); refreshAssetGrid = !refreshAssetGrid;