UNPKG

okta-mcp-server

Version:

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

229 lines 5.22 kB
/** * Core type definitions for the Okta MCP Server */ import type { z } from 'zod'; export interface OktaConfig { domain: string; apiToken: string; requestTimeout?: number; maxRetries?: number; rateLimitPerMinute?: number; } export interface MCPAuthConfig { required: boolean; audience?: string; issuer?: string; } export interface ServerConfig { name: string; version: string; okta: OktaConfig; auth?: MCPAuthConfig; cache?: CacheConfig; logging?: LoggingConfig; features?: FeatureFlags; audit?: AuditConfig; } export interface CacheConfig { enabled: boolean; ttl?: number; maxSize?: number; type?: 'memory' | 'sqlite'; } export interface LoggingConfig { level: 'debug' | 'info' | 'warn' | 'error'; format: 'json' | 'pretty'; file?: string; } export interface FeatureFlags { streaming?: boolean; caching?: boolean; rateLimit?: boolean; audit?: boolean; metrics?: boolean; readOnlyMode?: boolean; } export interface AuditConfig { enabled?: boolean; dbPath?: string; retention?: { retentionDays: number; archiveAfterDays?: number; deletePersonalDataAfterDays?: number; }; enableIntegrityChecks?: boolean; performanceTracking?: boolean; performanceThreshold?: number; piiMasking?: { enabled?: boolean; fields?: string[]; strategy?: 'hash' | 'partial' | 'remove' | 'encrypt'; }; } export interface ToolDefinition { name: string; description: string; inputSchema: z.ZodSchema<any>; } export interface ResourceDefinition { uri: string; name: string; description: string; mimeType: string; } export interface OktaUser { id: string; status: string; created: string; activated?: string; statusChanged?: string; lastLogin?: string; lastUpdated: string; passwordChanged?: string; profile: { login: string; email: string; firstName?: string; lastName?: string; [key: string]: any; }; credentials?: { password?: {}; provider?: { type: string; name: string; }; }; _links?: Record<string, { href: string; }>; } export interface OktaGroup { id: string; created: string; lastUpdated: string; lastMembershipUpdated: string; objectClass?: string[]; type: string; profile: { name: string; description?: string; [key: string]: any; }; _links?: Record<string, { href: string; }>; } export interface OktaApplication { id: string; name: string; label: string; status: string; lastUpdated: string; created: string; accessibility?: { selfService?: boolean; errorRedirectUrl?: string; loginRedirectUrl?: string; }; visibility?: { autoSubmitToolbar?: boolean; hide?: { iOS?: boolean; web?: boolean; }; }; features?: string[]; signOnMode: string; credentials?: { scheme?: string; userNameTemplate?: { template: string; type: string; }; signing?: { kid: string; }; }; settings?: Record<string, any>; _links?: Record<string, { href: string; }>; } export interface OktaPolicy { id: string; status: string; name: string; description?: string; priority: number; system?: boolean; created: string; lastUpdated: string; conditions?: { people?: { users?: { include?: string[]; exclude?: string[]; }; groups?: { include?: string[]; exclude?: string[]; }; }; [key: string]: any; }; _links?: Record<string, { href: string; }>; } export interface PaginationParams { limit?: number; after?: string; filter?: string; search?: string; expand?: string; } export interface PaginatedResponse<T> { data: T[]; nextCursor?: string; hasMore: boolean; } export interface OktaErrorResponse { errorCode: string; errorSummary: string; errorLink: string; errorId: string; errorCauses?: Array<{ errorSummary: string; }>; } export interface QueryOptions { filter?: string; search?: string; limit?: number; after?: string; expand?: string | string[]; fields?: string[]; sortBy?: string; sortOrder?: 'asc' | 'desc'; } export interface Repository<T> { find(options?: QueryOptions): Promise<PaginatedResponse<T>>; findOne(id: string): Promise<T | null>; create(data: Partial<T>): Promise<T>; update(id: string, data: Partial<T>): Promise<T>; delete(id: string): Promise<void>; } export interface OktaPlugin { name: string; version: string; initialize(context: PluginContext): Promise<void>; tools?: ToolDefinition[]; resources?: ResourceDefinition[]; } export interface PluginContext { container: any; eventBus: any; logger: any; } //# sourceMappingURL=index.d.ts.map