UNPKG

okta-mcp-server

Version:

Model Context Protocol (MCP) server for Okta API operations with support for bulk operations and caching

65 lines 2.1 kB
import { IOktaClient } from '../../lib/okta-client-interface.js'; export interface BatchProcessorOptions { batchSize: number; continueOnError: boolean; rateLimitPerMinute: number; delayBetweenBatches?: number; } export interface BatchResult<T> { success: boolean; data?: T; error?: Error; identifier?: string; } export declare class BatchProcessor { private client; private options; private rateLimiter; constructor(client: IOktaClient, options: BatchProcessorOptions); /** * Process items in batches with rate limiting */ processBatches<T, R>(items: T[], operationId: string, processor: (item: T, index: number) => Promise<BatchResult<R>>): Promise<BatchResult<R>[]>; /** * Process items with automatic retry on failure */ processWithRetry<T, R>(item: T, processor: (item: T) => Promise<R>, maxRetries?: number, retryDelay?: number): Promise<BatchResult<R>>; /** * Helper to delay execution */ private delay; /** * Create users in batches */ createUsersInBatches(users: Array<{ profile: Record<string, unknown>; credentials?: Record<string, unknown>; groupIds?: string[]; }>, operationId: string, options?: { activate?: boolean; provider?: boolean; nextLogin?: string; }): Promise<BatchResult<any>[]>; /** * Update users in batches */ updateUsersInBatches(updates: Array<{ userId: string; userData: { profile?: Record<string, unknown>; credentials?: Record<string, unknown>; }; }>, operationId: string): Promise<BatchResult<any>[]>; /** * Delete/deactivate users in batches */ deleteUsersInBatches(userIds: string[], operationId: string, options: { action: 'deactivate' | 'delete'; sendEmail?: boolean; }): Promise<BatchResult<void>[]>; /** * Fetch all users matching a filter */ fetchAllUsers(filter?: string, search?: string): AsyncGenerator<any[]>; } //# sourceMappingURL=batch-processor.d.ts.map