You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-06-24 04:46:50 +02:00
feat(web,server): offline/untracked files admin tool (#4447)
* feat: admin repair orphans tool * chore: open api * fix: include upload folder * fix: bugs * feat: empty placeholder * fix: checks * feat: move buttons to top of page * feat: styling and clipboard * styling * better clicking hitbox * fix: show title on hover * feat: download report * restrict file access to immich related files * Add description --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com> Co-authored-by: Daniel Dietzler <mail@ddietzler.dev>
This commit is contained in:
378
cli/src/api/open-api/api.ts
generated
378
cli/src/api/open-api/api.ts
generated
@ -1604,6 +1604,109 @@ export interface ExifResponseDto {
|
||||
*/
|
||||
'timeZone'?: string | null;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface FileChecksumDto
|
||||
*/
|
||||
export interface FileChecksumDto {
|
||||
/**
|
||||
*
|
||||
* @type {Array<string>}
|
||||
* @memberof FileChecksumDto
|
||||
*/
|
||||
'filenames': Array<string>;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface FileChecksumResponseDto
|
||||
*/
|
||||
export interface FileChecksumResponseDto {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FileChecksumResponseDto
|
||||
*/
|
||||
'checksum': string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FileChecksumResponseDto
|
||||
*/
|
||||
'filename': string;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface FileReportDto
|
||||
*/
|
||||
export interface FileReportDto {
|
||||
/**
|
||||
*
|
||||
* @type {Array<string>}
|
||||
* @memberof FileReportDto
|
||||
*/
|
||||
'extras': Array<string>;
|
||||
/**
|
||||
*
|
||||
* @type {Array<FileReportItemDto>}
|
||||
* @memberof FileReportDto
|
||||
*/
|
||||
'orphans': Array<FileReportItemDto>;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface FileReportFixDto
|
||||
*/
|
||||
export interface FileReportFixDto {
|
||||
/**
|
||||
*
|
||||
* @type {Array<FileReportItemDto>}
|
||||
* @memberof FileReportFixDto
|
||||
*/
|
||||
'items': Array<FileReportItemDto>;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface FileReportItemDto
|
||||
*/
|
||||
export interface FileReportItemDto {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FileReportItemDto
|
||||
*/
|
||||
'checksum'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FileReportItemDto
|
||||
*/
|
||||
'entityId': string;
|
||||
/**
|
||||
*
|
||||
* @type {PathEntityType}
|
||||
* @memberof FileReportItemDto
|
||||
*/
|
||||
'entityType': PathEntityType;
|
||||
/**
|
||||
*
|
||||
* @type {PathType}
|
||||
* @memberof FileReportItemDto
|
||||
*/
|
||||
'pathType': PathType;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FileReportItemDto
|
||||
*/
|
||||
'pathValue': string;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
@ -2186,6 +2289,40 @@ export interface OAuthConfigResponseDto {
|
||||
*/
|
||||
'url'?: string;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @enum {string}
|
||||
*/
|
||||
|
||||
export const PathEntityType = {
|
||||
Asset: 'asset',
|
||||
Person: 'person',
|
||||
User: 'user'
|
||||
} as const;
|
||||
|
||||
export type PathEntityType = typeof PathEntityType[keyof typeof PathEntityType];
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @enum {string}
|
||||
*/
|
||||
|
||||
export const PathType = {
|
||||
Original: 'original',
|
||||
JpegThumbnail: 'jpeg_thumbnail',
|
||||
WebpThumbnail: 'webp_thumbnail',
|
||||
EncodedVideo: 'encoded_video',
|
||||
Sidecar: 'sidecar',
|
||||
Face: 'face',
|
||||
Profile: 'profile'
|
||||
} as const;
|
||||
|
||||
export type PathType = typeof PathType[keyof typeof PathType];
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
@ -8821,6 +8958,50 @@ export class AssetApi extends BaseAPI {
|
||||
*/
|
||||
export const AuditApiAxiosParamCreator = function (configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @param {FileReportFixDto} fileReportFixDto
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
fixAuditFiles: async (fileReportFixDto: FileReportFixDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'fileReportFixDto' is not null or undefined
|
||||
assertParamExists('fixAuditFiles', 'fileReportFixDto', fileReportFixDto)
|
||||
const localVarPath = `/audit/file-report/fix`;
|
||||
// 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(fileReportFixDto, localVarRequestOptions, configuration)
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {EntityType} entityType
|
||||
@ -8875,6 +9056,88 @@ export const AuditApiAxiosParamCreator = function (configuration?: Configuration
|
||||
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}
|
||||
*/
|
||||
getAuditFiles: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/audit/file-report`;
|
||||
// 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: 'GET', ...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 {FileChecksumDto} fileChecksumDto
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getFileChecksums: async (fileChecksumDto: FileChecksumDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'fileChecksumDto' is not null or undefined
|
||||
assertParamExists('getFileChecksums', 'fileChecksumDto', fileChecksumDto)
|
||||
const localVarPath = `/audit/file-report/checksum`;
|
||||
// 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(fileChecksumDto, localVarRequestOptions, configuration)
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
@ -8890,6 +9153,16 @@ export const AuditApiAxiosParamCreator = function (configuration?: Configuration
|
||||
export const AuditApiFp = function(configuration?: Configuration) {
|
||||
const localVarAxiosParamCreator = AuditApiAxiosParamCreator(configuration)
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @param {FileReportFixDto} fileReportFixDto
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async fixAuditFiles(fileReportFixDto: FileReportFixDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.fixAuditFiles(fileReportFixDto, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {EntityType} entityType
|
||||
@ -8902,6 +9175,25 @@ export const AuditApiFp = function(configuration?: Configuration) {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getAuditDeletes(entityType, after, userId, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getAuditFiles(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FileReportDto>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getAuditFiles(options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {FileChecksumDto} fileChecksumDto
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getFileChecksums(fileChecksumDto: FileChecksumDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<FileChecksumResponseDto>>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getFileChecksums(fileChecksumDto, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
@ -8912,6 +9204,15 @@ export const AuditApiFp = function(configuration?: Configuration) {
|
||||
export const AuditApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||
const localVarFp = AuditApiFp(configuration)
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @param {AuditApiFixAuditFilesRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
fixAuditFiles(requestParameters: AuditApiFixAuditFilesRequest, options?: AxiosRequestConfig): AxiosPromise<void> {
|
||||
return localVarFp.fixAuditFiles(requestParameters.fileReportFixDto, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {AuditApiGetAuditDeletesRequest} requestParameters Request parameters.
|
||||
@ -8921,9 +9222,40 @@ export const AuditApiFactory = function (configuration?: Configuration, basePath
|
||||
getAuditDeletes(requestParameters: AuditApiGetAuditDeletesRequest, options?: AxiosRequestConfig): AxiosPromise<AuditDeletesResponseDto> {
|
||||
return localVarFp.getAuditDeletes(requestParameters.entityType, requestParameters.after, requestParameters.userId, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getAuditFiles(options?: AxiosRequestConfig): AxiosPromise<FileReportDto> {
|
||||
return localVarFp.getAuditFiles(options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {AuditApiGetFileChecksumsRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getFileChecksums(requestParameters: AuditApiGetFileChecksumsRequest, options?: AxiosRequestConfig): AxiosPromise<Array<FileChecksumResponseDto>> {
|
||||
return localVarFp.getFileChecksums(requestParameters.fileChecksumDto, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Request parameters for fixAuditFiles operation in AuditApi.
|
||||
* @export
|
||||
* @interface AuditApiFixAuditFilesRequest
|
||||
*/
|
||||
export interface AuditApiFixAuditFilesRequest {
|
||||
/**
|
||||
*
|
||||
* @type {FileReportFixDto}
|
||||
* @memberof AuditApiFixAuditFiles
|
||||
*/
|
||||
readonly fileReportFixDto: FileReportFixDto
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for getAuditDeletes operation in AuditApi.
|
||||
* @export
|
||||
@ -8952,6 +9284,20 @@ export interface AuditApiGetAuditDeletesRequest {
|
||||
readonly userId?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for getFileChecksums operation in AuditApi.
|
||||
* @export
|
||||
* @interface AuditApiGetFileChecksumsRequest
|
||||
*/
|
||||
export interface AuditApiGetFileChecksumsRequest {
|
||||
/**
|
||||
*
|
||||
* @type {FileChecksumDto}
|
||||
* @memberof AuditApiGetFileChecksums
|
||||
*/
|
||||
readonly fileChecksumDto: FileChecksumDto
|
||||
}
|
||||
|
||||
/**
|
||||
* AuditApi - object-oriented interface
|
||||
* @export
|
||||
@ -8959,6 +9305,17 @@ export interface AuditApiGetAuditDeletesRequest {
|
||||
* @extends {BaseAPI}
|
||||
*/
|
||||
export class AuditApi extends BaseAPI {
|
||||
/**
|
||||
*
|
||||
* @param {AuditApiFixAuditFilesRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof AuditApi
|
||||
*/
|
||||
public fixAuditFiles(requestParameters: AuditApiFixAuditFilesRequest, options?: AxiosRequestConfig) {
|
||||
return AuditApiFp(this.configuration).fixAuditFiles(requestParameters.fileReportFixDto, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {AuditApiGetAuditDeletesRequest} requestParameters Request parameters.
|
||||
@ -8969,6 +9326,27 @@ export class AuditApi extends BaseAPI {
|
||||
public getAuditDeletes(requestParameters: AuditApiGetAuditDeletesRequest, options?: AxiosRequestConfig) {
|
||||
return AuditApiFp(this.configuration).getAuditDeletes(requestParameters.entityType, requestParameters.after, requestParameters.userId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof AuditApi
|
||||
*/
|
||||
public getAuditFiles(options?: AxiosRequestConfig) {
|
||||
return AuditApiFp(this.configuration).getAuditFiles(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {AuditApiGetFileChecksumsRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof AuditApi
|
||||
*/
|
||||
public getFileChecksums(requestParameters: AuditApiGetFileChecksumsRequest, options?: AxiosRequestConfig) {
|
||||
return AuditApiFp(this.configuration).getFileChecksums(requestParameters.fileChecksumDto, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user