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.
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.
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.
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.
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; /** * Reset password * Reset a user's utilising a valid password reset token.
This will set the user's password to the one you provided in the body.
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)>; }