Add comprehensive admin features and multi-system integration
- Add admin dashboard with sync controls and data browser - Implement RMM, Auvik, and Addigy organization mappings - Add chunked ticket sync with progress tracking - Implement entity sync service with rate limiting - Add analytics engine and performance optimizer - Create data browser for all PSA entities - Add navigation components and UI improvements - Implement background processing and sync services - Add comprehensive documentation and migration scripts - Update configuration items with multi-system support - Enhance contact management and purchase history - Add issue type assignment and LLM analyzer - Improve error handling and logging utilities
This commit is contained in:
parent
e8462ef301
commit
6eee14f8af
171 changed files with 32671 additions and 621 deletions
38
app/api/sync/status/route.ts
Normal file
38
app/api/sync/status/route.ts
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
/**
|
||||
* Sync Status API Endpoint
|
||||
* GET /api/sync/status - Check if a sync is currently in progress
|
||||
*/
|
||||
|
||||
import { NextResponse } from 'next/server';
|
||||
import { AutotaskClient } from '@/lib/services/autotask-client';
|
||||
import { createSyncService } from '@/lib/services/sync-service';
|
||||
|
||||
export async function GET() {
|
||||
try {
|
||||
// Initialize Autotask client (needed to create sync service)
|
||||
const autotaskClient = new AutotaskClient({
|
||||
apiUrl: process.env.AUTOTASK_API_URL || '',
|
||||
username: process.env.AUTOTASK_USERNAME || '',
|
||||
password: process.env.AUTOTASK_SECRET || '',
|
||||
apiIntegrationCode: process.env.AUTOTASK_API_INTEGRATION_CODE || '',
|
||||
});
|
||||
|
||||
// Create sync service
|
||||
const syncService = createSyncService(autotaskClient);
|
||||
|
||||
// Check if sync is in progress
|
||||
const inProgress = syncService.isSyncInProgress();
|
||||
const currentSyncId = syncService.getCurrentSyncId();
|
||||
|
||||
return NextResponse.json({
|
||||
inProgress,
|
||||
syncId: currentSyncId,
|
||||
});
|
||||
} catch (error) {
|
||||
console.error('Failed to check sync status:', error);
|
||||
return NextResponse.json(
|
||||
{ error: 'Failed to check sync status' },
|
||||
{ status: 500 }
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue