mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
refactor(server): standardize user controller (#3501)
* chore: remove redundant sortint * chore: standardize user controller * chore: open api * fix: web dtos
This commit is contained in:
96
cli/src/api/open-api/api.ts
generated
96
cli/src/api/open-api/api.ts
generated
@@ -12111,15 +12111,15 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {string} userId
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteUser: async (userId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'userId' is not null or undefined
|
||||
assertParamExists('deleteUser', 'userId', userId)
|
||||
const localVarPath = `/user/{userId}`
|
||||
.replace(`{${"userId"}}`, encodeURIComponent(String(userId)));
|
||||
deleteUser: async (id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
assertParamExists('deleteUser', 'id', id)
|
||||
const localVarPath = `/user/{id}`
|
||||
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
@@ -12236,15 +12236,15 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {string} userId
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getProfileImage: async (userId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'userId' is not null or undefined
|
||||
assertParamExists('getProfileImage', 'userId', userId)
|
||||
const localVarPath = `/user/profile-image/{userId}`
|
||||
.replace(`{${"userId"}}`, encodeURIComponent(String(userId)));
|
||||
getProfileImage: async (id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
assertParamExists('getProfileImage', 'id', id)
|
||||
const localVarPath = `/user/profile-image/{id}`
|
||||
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
@@ -12278,15 +12278,15 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {string} userId
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getUserById: async (userId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'userId' is not null or undefined
|
||||
assertParamExists('getUserById', 'userId', userId)
|
||||
const localVarPath = `/user/info/{userId}`
|
||||
.replace(`{${"userId"}}`, encodeURIComponent(String(userId)));
|
||||
getUserById: async (id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
assertParamExists('getUserById', 'id', id)
|
||||
const localVarPath = `/user/info/{id}`
|
||||
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
@@ -12354,15 +12354,15 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {string} userId
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
restoreUser: async (userId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'userId' is not null or undefined
|
||||
assertParamExists('restoreUser', 'userId', userId)
|
||||
const localVarPath = `/user/{userId}/restore`
|
||||
.replace(`{${"userId"}}`, encodeURIComponent(String(userId)));
|
||||
restoreUser: async (id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
assertParamExists('restoreUser', 'id', id)
|
||||
const localVarPath = `/user/{id}/restore`
|
||||
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
@@ -12470,12 +12470,12 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {string} userId
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async deleteUser(userId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserResponseDto>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(userId, options);
|
||||
async deleteUser(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserResponseDto>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(id, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
/**
|
||||
@@ -12499,22 +12499,22 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {string} userId
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getProfileImage(userId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getProfileImage(userId, options);
|
||||
async getProfileImage(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getProfileImage(id, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {string} userId
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getUserById(userId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserResponseDto>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getUserById(userId, options);
|
||||
async getUserById(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserResponseDto>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getUserById(id, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
/**
|
||||
@@ -12529,12 +12529,12 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {string} userId
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async restoreUser(userId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserResponseDto>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.restoreUser(userId, options);
|
||||
async restoreUser(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserResponseDto>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.restoreUser(id, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
/**
|
||||
@@ -12582,7 +12582,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteUser(requestParameters: UserApiDeleteUserRequest, options?: AxiosRequestConfig): AxiosPromise<UserResponseDto> {
|
||||
return localVarFp.deleteUser(requestParameters.userId, options).then((request) => request(axios, basePath));
|
||||
return localVarFp.deleteUser(requestParameters.id, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@@ -12608,7 +12608,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getProfileImage(requestParameters: UserApiGetProfileImageRequest, options?: AxiosRequestConfig): AxiosPromise<object> {
|
||||
return localVarFp.getProfileImage(requestParameters.userId, options).then((request) => request(axios, basePath));
|
||||
return localVarFp.getProfileImage(requestParameters.id, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@@ -12617,7 +12617,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getUserById(requestParameters: UserApiGetUserByIdRequest, options?: AxiosRequestConfig): AxiosPromise<UserResponseDto> {
|
||||
return localVarFp.getUserById(requestParameters.userId, options).then((request) => request(axios, basePath));
|
||||
return localVarFp.getUserById(requestParameters.id, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@@ -12635,7 +12635,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
restoreUser(requestParameters: UserApiRestoreUserRequest, options?: AxiosRequestConfig): AxiosPromise<UserResponseDto> {
|
||||
return localVarFp.restoreUser(requestParameters.userId, options).then((request) => request(axios, basePath));
|
||||
return localVarFp.restoreUser(requestParameters.id, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@@ -12688,7 +12688,7 @@ export interface UserApiDeleteUserRequest {
|
||||
* @type {string}
|
||||
* @memberof UserApiDeleteUser
|
||||
*/
|
||||
readonly userId: string
|
||||
readonly id: string
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -12716,7 +12716,7 @@ export interface UserApiGetProfileImageRequest {
|
||||
* @type {string}
|
||||
* @memberof UserApiGetProfileImage
|
||||
*/
|
||||
readonly userId: string
|
||||
readonly id: string
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -12730,7 +12730,7 @@ export interface UserApiGetUserByIdRequest {
|
||||
* @type {string}
|
||||
* @memberof UserApiGetUserById
|
||||
*/
|
||||
readonly userId: string
|
||||
readonly id: string
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -12758,7 +12758,7 @@ export interface UserApiRestoreUserRequest {
|
||||
* @type {string}
|
||||
* @memberof UserApiRestoreUser
|
||||
*/
|
||||
readonly userId: string
|
||||
readonly id: string
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -12812,7 +12812,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public deleteUser(requestParameters: UserApiDeleteUserRequest, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).deleteUser(requestParameters.userId, options).then((request) => request(this.axios, this.basePath));
|
||||
return UserApiFp(this.configuration).deleteUser(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -12844,7 +12844,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public getProfileImage(requestParameters: UserApiGetProfileImageRequest, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).getProfileImage(requestParameters.userId, options).then((request) => request(this.axios, this.basePath));
|
||||
return UserApiFp(this.configuration).getProfileImage(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -12855,7 +12855,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public getUserById(requestParameters: UserApiGetUserByIdRequest, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).getUserById(requestParameters.userId, options).then((request) => request(this.axios, this.basePath));
|
||||
return UserApiFp(this.configuration).getUserById(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -12877,7 +12877,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public restoreUser(requestParameters: UserApiRestoreUserRequest, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).restoreUser(requestParameters.userId, options).then((request) => request(this.axios, this.basePath));
|
||||
return UserApiFp(this.configuration).restoreUser(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user