This repository has been archived on 2023-11-06. You can view files and clone it, but cannot push or open issues or pull requests.
lfk-client-node/dist/services/AuthService.d.ts
Nicolai Ort 1fb61ca6f8
All checks were successful
continuous-integration/drone Build is passing
updated lib
2023-02-02 16:15:30 +01:00

64 lines
3.2 KiB
TypeScript

import type { CreateAuth } from '../models/CreateAuth';
import type { CreateResetToken } from '../models/CreateResetToken';
import type { HandleLogout } from '../models/HandleLogout';
import type { IllegalJWTError } from '../models/IllegalJWTError';
import type { InvalidCredentialsError } from '../models/InvalidCredentialsError';
import type { JwtNotProvidedError } from '../models/JwtNotProvidedError';
import type { Logout } from '../models/Logout';
import type { PasswordNeededError } from '../models/PasswordNeededError';
import type { RefreshAuth } from '../models/RefreshAuth';
import type { RefreshTokenCountInvalidError } from '../models/RefreshTokenCountInvalidError';
import type { ResetPassword } from '../models/ResetPassword';
import type { ResponseAuth } from '../models/ResponseAuth';
import type { ResponseEmpty } from '../models/ResponseEmpty';
import type { UsernameOrEmailNeededError } from '../models/UsernameOrEmailNeededError';
import type { UserNotFoundError } from '../models/UserNotFoundError';
export declare class AuthService {
/**
* Login
* Login with your username/email and password. <br> You will receive:
* * access token (use it as a bearer token)
* * refresh token (will also be sent as a cookie)
* @param requestBody CreateAuth
* @returns any
* @throws ApiError
*/
static authControllerLogin(requestBody?: CreateAuth): Promise<(ResponseAuth | InvalidCredentialsError | UserNotFoundError | UsernameOrEmailNeededError | PasswordNeededError)>;
/**
* Logout
* Logout using your refresh token. <br> This instantly invalidates all your access and refresh tokens.
* @param requestBody HandleLogout
* @returns any
* @throws ApiError
*/
static authControllerLogout(requestBody?: HandleLogout): Promise<(Logout | InvalidCredentialsError | UserNotFoundError | UsernameOrEmailNeededError | PasswordNeededError)>;
/**
* Refresh
* Refresh your access and refresh tokens using a valid refresh token. <br> You will receive:
* * access token (use it as a bearer token)
* * refresh token (will also be sent as a cookie)
* @param requestBody RefreshAuth
* @returns any
* @throws ApiError
*/
static authControllerRefresh(requestBody?: RefreshAuth): Promise<(ResponseAuth | JwtNotProvidedError | IllegalJWTError | UserNotFoundError | RefreshTokenCountInvalidError)>;
/**
* Get reset token
* Request a password reset token. <br> This will provide you with a reset token that you can use by posting to /api/auth/reset/{token}.
* @param locale
* @param requestBody CreateResetToken
* @returns ResponseEmpty
* @throws ApiError
*/
static authControllerGetResetToken(locale?: string, requestBody?: CreateResetToken): Promise<ResponseEmpty>;
/**
* Reset password
* Reset a user's utilising a valid password reset token. <br> This will set the user's password to the one you provided in the body. <br> To get a reset token post to /api/auth/reset with your username.
* @param token
* @param requestBody ResetPassword
* @returns any
* @throws ApiError
*/
static authControllerResetPassword(token: string, requestBody?: ResetPassword): Promise<(ResponseAuth | UserNotFoundError | UsernameOrEmailNeededError)>;
}