Skip to content
Snippets Groups Projects
Commit aa0f656e authored by Henrik's avatar Henrik
Browse files

feat: add reset password endpoints

parent da2022bd
No related branches found
No related tags found
No related merge requests found
Pipeline #276772 failed
......@@ -12,6 +12,7 @@ export type { ExceptionResponse } from './models/ExceptionResponse';
export type { LeaderboardDTO } from './models/LeaderboardDTO';
export type { LeaderboardEntryDTO } from './models/LeaderboardEntryDTO';
export type { LoginRequest } from './models/LoginRequest';
export type { PasswordResetDTO } from './models/PasswordResetDTO';
export type { ProfileDTO } from './models/ProfileDTO';
export type { SignUpRequest } from './models/SignUpRequest';
export type { UserDTO } from './models/UserDTO';
......@@ -19,4 +20,4 @@ export type { UserUpdateDTO } from './models/UserUpdateDTO';
export { AuthenticationService } from './services/AuthenticationService';
export { LeaderboardService } from './services/LeaderboardService';
export { UserControllerService } from './services/UserControllerService';
export { UserService } from './services/UserService';
......@@ -2,15 +2,55 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { PasswordResetDTO } from '../models/PasswordResetDTO';
import type { ProfileDTO } from '../models/ProfileDTO';
import type { UserDTO } from '../models/UserDTO';
import type { UserUpdateDTO } from '../models/UserUpdateDTO';
import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
export class UserControllerService {
export class UserService {
/**
* Update profile
* Initiate a password reset
* Send a password reset mail to the user with the specified email
* @returns any Successfully initiated a password reset
* @throws ApiError
*/
public static resetPassword({
requestBody,
}: {
requestBody: string,
}): CancelablePromise<any> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/users/reset-password',
body: requestBody,
mediaType: 'text/plain',
});
}
/**
* Confirm a password reset
* Confirms a password reset using a token and a new password
* @returns void
* @throws ApiError
*/
public static confirmPasswordReset({
requestBody,
}: {
requestBody: PasswordResetDTO,
}): CancelablePromise<void> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/users/confirm-password',
body: requestBody,
mediaType: 'application/json',
errors: {
403: `Invalid token`,
},
});
}
/**
* Update a profile
* Update the profile of the authenticated user
* @returns UserDTO Successfully updated profile
* @throws ApiError
......@@ -28,8 +68,8 @@ export class UserControllerService {
});
}
/**
* Get profile
* Get user profile
* Get a profile
* Get the profile of a user
* @returns ProfileDTO Successfully got profile
* @throws ApiError
*/
......@@ -47,8 +87,8 @@ export class UserControllerService {
});
}
/**
* Get user
* Get user information
* Get the authenticated user
* Get all user information for the authenticated user
* @returns UserDTO Successfully got user
* @throws ApiError
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment