import routingAgent from './agent'; import routingContact from './task/contact'; import AgentConfigService from './config'; import { WebSocketManager } from './core/websocket/WebSocketManager'; import { ConnectionService } from './core/websocket/connection-service'; import { WebexSDK, SubscribeRequest } from '../types'; import aqmDialer from './task/dialer'; /** * Services class provides centralized access to all contact center plugin services * using a singleton pattern to ensure a single instance throughout the application. * @private * @ignore * @class */ export default class Services { /** Agent services for managing agent state and capabilities */ readonly agent: ReturnType; /** Configuration services for agent settings */ readonly config: AgentConfigService; /** Contact services for managing customer interactions */ readonly contact: ReturnType; /** Dialer services for outbound calling features */ readonly dialer: ReturnType; /** WebSocket manager for handling real-time communications */ readonly webSocketManager: WebSocketManager; /** Connection service for managing websocket connections */ readonly connectionService: ConnectionService; /** Singleton instance of the Services class */ private static instance; /** * Creates a new Services instance * @param options - Configuration options * @param options.webex - WebexSDK instance * @param options.connectionConfig - Subscription configuration for websocket connection */ constructor(options: { webex: WebexSDK; connectionConfig: SubscribeRequest; }); /** * Gets singleton instance of Services class * Creates a new instance if one doesn't exist * @param options - Configuration options * @param options.webex - WebexSDK instance * @param options.connectionConfig - Subscription configuration for websocket connection * @returns The singleton Services instance */ static getInstance(options: { webex: WebexSDK; connectionConfig: SubscribeRequest; }): Services; }