import { Responses, Requests, post, post_token } from './base'; export const auth_login = ( username: string, password: string, otp?: string ): Promise< | Responses.Auth.LoginResponse | Responses.Auth.TfaRequiredResponse | Responses.ErrorResponse > => post('/api/auth/login', { username: username, password: password, otp: otp }); export const auth_signup = ( username: string, password: string ): Promise => post('/api/auth/signup', { username: username, password: password }); export const refresh_token = ( token: string ): Promise => post_token('/api/auth/refresh', '', token);