import axios from "axios"; const SELENIUM_BASE = process.env.SELENIUM_SERVICE_URL ?? "http://localhost:5002"; export async function forwardToSeleniumTuftsSCOPreAuthAgent(data: any) { const response = await axios.post(`${SELENIUM_BASE}/tuftssco-preauth`, data, { timeout: 30000, }); return response.data; } export async function getSeleniumTuftsSCOPreAuthSessionStatus(sessionId: string) { const response = await axios.get(`${SELENIUM_BASE}/session/${sessionId}/status`, { timeout: 10000, }); return response.data; } export async function forwardOtpToSeleniumTuftsSCOPreAuthAgent(sessionId: string, otp: string) { const response = await axios.post( `${SELENIUM_BASE}/submit-otp`, { session_id: sessionId, otp }, { timeout: 10000 } ); return response.data; }