1
0
mirror of https://github.com/immich-app/immich.git synced 2025-06-17 03:47:45 +02:00

feat(web,server): user avatar color (#4779)

This commit is contained in:
martin
2023-11-14 04:10:35 +01:00
committed by GitHub
parent 14c7187539
commit d25a245049
58 changed files with 1123 additions and 141 deletions

View File

@ -2355,6 +2355,12 @@ export interface OAuthConfigResponseDto {
* @interface PartnerResponseDto
*/
export interface PartnerResponseDto {
/**
*
* @type {UserAvatarColor}
* @memberof PartnerResponseDto
*/
'avatarColor': UserAvatarColor;
/**
*
* @type {string}
@ -2440,6 +2446,8 @@ export interface PartnerResponseDto {
*/
'updatedAt': string;
}
/**
*
* @export
@ -4344,6 +4352,12 @@ export interface UpdateTagDto {
* @interface UpdateUserDto
*/
export interface UpdateUserDto {
/**
*
* @type {UserAvatarColor}
* @memberof UpdateUserDto
*/
'avatarColor'?: UserAvatarColor;
/**
*
* @type {string}
@ -4399,6 +4413,8 @@ export interface UpdateUserDto {
*/
'storageLabel'?: string;
}
/**
*
* @export
@ -4436,12 +4452,40 @@ export interface UsageByUserDto {
*/
'videos': number;
}
/**
*
* @export
* @enum {string}
*/
export const UserAvatarColor = {
Primary: 'primary',
Pink: 'pink',
Red: 'red',
Yellow: 'yellow',
Blue: 'blue',
Green: 'green',
Purple: 'purple',
Orange: 'orange',
Gray: 'gray',
Amber: 'amber'
} as const;
export type UserAvatarColor = typeof UserAvatarColor[keyof typeof UserAvatarColor];
/**
*
* @export
* @interface UserDto
*/
export interface UserDto {
/**
*
* @type {UserAvatarColor}
* @memberof UserDto
*/
'avatarColor': UserAvatarColor;
/**
*
* @type {string}
@ -4467,12 +4511,20 @@ export interface UserDto {
*/
'profileImagePath': string;
}
/**
*
* @export
* @interface UserResponseDto
*/
export interface UserResponseDto {
/**
*
* @type {UserAvatarColor}
* @memberof UserResponseDto
*/
'avatarColor': UserAvatarColor;
/**
*
* @type {string}
@ -4552,6 +4604,8 @@ export interface UserResponseDto {
*/
'updatedAt': string;
}
/**
*
* @export
@ -16477,6 +16531,44 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
options: localVarRequestOptions,
};
},
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteProfileImage: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/user/profile-image`;
// 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: 'DELETE', ...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 {string} id
@ -16802,6 +16894,15 @@ export const UserApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(createUserDto, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async deleteProfileImage(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteProfileImage(options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @param {string} id
@ -16899,6 +17000,14 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
createUser(requestParameters: UserApiCreateUserRequest, options?: AxiosRequestConfig): AxiosPromise<UserResponseDto> {
return localVarFp.createUser(requestParameters.createUserDto, options).then((request) => request(axios, basePath));
},
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteProfileImage(options?: AxiosRequestConfig): AxiosPromise<void> {
return localVarFp.deleteProfileImage(options).then((request) => request(axios, basePath));
},
/**
*
* @param {UserApiDeleteUserRequest} requestParameters Request parameters.
@ -17105,6 +17214,16 @@ export class UserApi extends BaseAPI {
return UserApiFp(this.configuration).createUser(requestParameters.createUserDto, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof UserApi
*/
public deleteProfileImage(options?: AxiosRequestConfig) {
return UserApiFp(this.configuration).deleteProfileImage(options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @param {UserApiDeleteUserRequest} requestParameters Request parameters.