okta-mcp-server
Version:
Model Context Protocol (MCP) server for Okta API operations with support for bulk operations and caching
91 lines • 2.4 kB
TypeScript
import { EventEmitter } from 'events';
export interface BulkOperationProgress {
operationId: string;
type: 'create' | 'update' | 'delete' | 'export';
status: 'pending' | 'running' | 'completed' | 'failed' | 'cancelled';
total: number;
processed: number;
succeeded: number;
failed: number;
startTime: string;
endTime?: string;
errors: Array<{
index: number;
identifier?: string;
error: string;
details?: any;
}>;
results?: any[];
currentBatch?: number;
totalBatches?: number;
estimatedTimeRemaining?: number;
}
export declare class ProgressTracker extends EventEmitter {
private operations;
private updateInterval;
constructor();
/**
* Create a new bulk operation
*/
createOperation(type: BulkOperationProgress['type'], total: number): string;
/**
* Start a bulk operation
*/
startOperation(operationId: string, totalBatches?: number): void;
/**
* Update operation progress
*/
updateProgress(operationId: string, update: {
processed?: number;
succeeded?: number;
failed?: number;
currentBatch?: number;
}): void;
/**
* Increment progress counters
*/
incrementProgress(operationId: string, succeeded: boolean, error?: {
identifier?: string;
error: string;
details?: any;
}): void;
/**
* Add an error to the operation
*/
addError(operationId: string, error: {
index: number;
identifier?: string;
error: string;
details?: any;
}): void;
/**
* Complete a bulk operation
*/
completeOperation(operationId: string, results?: any[]): void;
/**
* Cancel a bulk operation
*/
cancelOperation(operationId: string): void;
/**
* Get operation status
*/
getOperation(operationId: string): BulkOperationProgress | undefined;
/**
* Get all operations
*/
getAllOperations(): BulkOperationProgress[];
/**
* Clean up old operations
*/
cleanupOldOperations(maxAgeMs?: number): void;
/**
* Start periodic update interval
*/
private startUpdateInterval;
/**
* Stop the progress tracker
*/
stop(): void;
}
export declare const progressTracker: ProgressTracker;
//# sourceMappingURL=progress-tracker.d.ts.map