import { APIClient } from '../APIClient' ; import { LoginData } from '../auth' ; import { ClientType } from '../client' ; import { Config } from '../Config' ; require ( 'dotenv' ) . config ( ) ; export async function initClient ( ) { const credentials = { clientType : ClientType . TEMPORARY , email : process . env . WIRE_EMAIL , password : process . env . WIRE_PASSWORD , } ; const apiConfig = { urls : { name : 'default' , rest : process . env . WIRE_BACKEND_REST ! , ws : process . env . WIRE_BACKEND_WS ! , } , } ; const apiClient = new APIClient ( apiConfig ) ; await apiClient . login ( credentials ) ; return apiClient ; }