const axios = require('axios'); async function checkStaxStatus() { try { console.log('šŸ” Checking STAX document processing status...'); // First login to get a token const loginResponse = await axios.post('http://localhost:5000/api/auth/login', { email: 'test@stax-processing.com', password: 'TestPass123!' }); const accessToken = loginResponse.data.data.tokens.accessToken; console.log('āœ… Authenticated successfully'); // Check document status const documentId = '73fe2304-be3e-4195-871e-98d860e768a4'; const docResponse = await axios.get(`http://localhost:5000/api/documents/${documentId}`, { headers: { 'Authorization': `Bearer ${accessToken}` } }); console.log('šŸ“„ Document Status:'); console.log(JSON.stringify(docResponse.data, null, 2)); // Check if there are any processing jobs const jobsResponse = await axios.get(`http://localhost:5000/api/documents/${documentId}/jobs`, { headers: { 'Authorization': `Bearer ${accessToken}` } }); console.log('\nšŸ”„ Processing Jobs:'); console.log(JSON.stringify(jobsResponse.data, null, 2)); } catch (error) { console.error('āŒ Error:', error.response?.data || error.message); } } checkStaxStatus();