@webex/contact-center 3.12.0-next.85 → 3.12.0-next.87

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["HTTP_METHODS","exports","GET","POST","PATCH","PUT","DELETE","LOGGING_LEVEL","LoginOption","AGENT_DN","EXTENSION","BROWSER","AIAssistantEventType","CUSTOM_EVENT","CTI_EVENT","AIAssistantEventName","GET_TRANSCRIPTS","GET_SUGGESTIONS","ADD_SUGGESTIONS_EXTRA_CONTEXT","GET_MID_CALL_SUMMARY","GET_POST_CALL_SUMMARY","MID_CALL_SUMMARY_RESPONSE","POST_CALL_SUMMARY_RESPONSE","SUGGESTED_RESPONSES_DIGITAL"],"sources":["types.ts"],"sourcesContent":["import {CallingClientConfig} from '@webex/calling';\nimport {\n SubmitBehavioralEvent,\n SubmitOperationalEvent,\n SubmitBusinessEvent,\n} from '@webex/internal-plugin-metrics/src/metrics.types';\nimport * as Agent from './services/agent/types';\nimport * as Contact from './services/task/types';\nimport {\n AIFeatureFlags,\n Profile,\n CreateUserPreferenceRequest,\n UpdateUserPreferenceRequest,\n} from './services/config/types';\nimport {PaginatedResponse, BaseSearchParams} from './utils/PageCache';\n\n/**\n * Generic type for converting a const enum object into a union type of its values.\n * @template T The enum object type\n * @internal\n * @ignore\n */\ntype Enum<T extends Record<string, unknown>> = T[keyof T];\n\n/**\n * HTTP methods supported by WebexRequest.\n * @enum {string}\n * @public\n * @example\n * const method: HTTP_METHODS = HTTP_METHODS.GET;\n * @ignore\n */\nexport const HTTP_METHODS = {\n /** HTTP GET method for retrieving data */\n GET: 'GET',\n /** HTTP POST method for creating resources */\n POST: 'POST',\n /** HTTP PATCH method for partial updates */\n PATCH: 'PATCH',\n /** HTTP PUT method for complete updates */\n PUT: 'PUT',\n /** HTTP DELETE method for removing resources */\n DELETE: 'DELETE',\n} as const;\n\n/**\n * Union type of HTTP methods.\n * @public\n * @example\n * function makeRequest(method: HTTP_METHODS) { ... }\n * @ignore\n */\nexport type HTTP_METHODS = Enum<typeof HTTP_METHODS>;\n\n/**\n * Payload for making requests to Webex APIs.\n * @public\n * @example\n * const payload: WebexRequestPayload = {\n * service: 'identity',\n * resource: '/users',\n * method: HTTP_METHODS.GET\n * };\n * @ignore\n */\nexport type WebexRequestPayload = {\n /** Service name to target */\n service?: string;\n /** Resource path within the service */\n resource?: string;\n /** HTTP method to use */\n method?: HTTP_METHODS;\n /** Full URI if not using service/resource pattern */\n uri?: string;\n /** Whether to add authorization header */\n addAuthHeader?: boolean;\n /** Custom headers to include in request */\n headers?: {\n [key: string]: string | null;\n };\n /** Request body data */\n body?: object;\n /** Expected response status code */\n statusCode?: number;\n /** Whether to parse response as JSON */\n json?: boolean;\n};\n\n/**\n * Event listener function type.\n * @internal\n * @ignore\n */\ntype Listener = (e: string, data?: unknown) => void;\n\n/**\n * Event listener removal function type.\n * @internal\n * @ignore\n */\ntype ListenerOff = (e: string) => void;\n\n/**\n * Service host configuration.\n * @internal\n * @ignore\n */\ntype ServiceHost = {\n /** Host URL/domain for the service */\n host: string;\n /** Time-to-live in seconds */\n ttl: number;\n /** Priority level for load balancing (lower is higher priority) */\n priority: number;\n /** Unique identifier for this host */\n id: string;\n /** Whether this is the home cluster for the user */\n homeCluster?: boolean;\n};\n\n/**\n * Configuration options for the Contact Center Plugin.\n * @interface CCPluginConfig\n * @public\n * @example\n * const config: CCPluginConfig = {\n * allowMultiLogin: true,\n * allowAutomatedRelogin: false,\n * clientType: 'browser',\n * isKeepAliveEnabled: true,\n * force: false,\n * metrics: { clientName: 'myClient', clientType: 'browser' },\n * logging: { enable: true, verboseEvents: false },\n * callingClientConfig: { ... }\n * };\n */\nexport interface CCPluginConfig {\n /** Whether to allow multiple logins from different devices */\n allowMultiLogin: boolean;\n /** Whether to automatically attempt relogin on connection loss */\n allowAutomatedRelogin: boolean;\n /** The type of client making the connection */\n clientType: string;\n /** Whether to enable keep-alive messages */\n isKeepAliveEnabled: boolean;\n /** Whether to force registration */\n force: boolean;\n /** Metrics configuration */\n metrics: {\n /** Name of the client for metrics */\n clientName: string;\n /** Type of client for metrics */\n clientType: string;\n };\n /** Logging configuration */\n logging: {\n /** Whether to enable logging */\n enable: boolean;\n /** Whether to log verbose events */\n verboseEvents: boolean;\n };\n /** Configuration for the calling client */\n callingClientConfig: CallingClientConfig;\n /** Whether to skip Mobius/WebRTC registration for browser login flows */\n disableWebRTCRegistration?: boolean;\n}\n\n/**\n * Logger interface for standardized logging throughout the plugin.\n * @public\n * @example\n * logger.log('This is a log message');\n * logger.error('This is an error message');\n * @ignore\n */\nexport type Logger = {\n /** Log general messages */\n log: (payload: string) => void;\n /** Log error messages */\n error: (payload: string) => void;\n /** Log warning messages */\n warn: (payload: string) => void;\n /** Log informational messages */\n info: (payload: string) => void;\n /** Log detailed trace messages */\n trace: (payload: string) => void;\n /** Log debug messages */\n debug: (payload: string) => void;\n};\n\n/**\n * Contextual information for log entries.\n * @public\n * @ignore\n */\nexport interface LogContext {\n /** Module name where the log originated */\n module?: string;\n /** Method name where the log originated */\n method?: string;\n interactionId?: string;\n trackingId?: string;\n /** Additional structured data to include in logs */\n data?: Record<string, any>;\n /** Error object to include in logs */\n error?: Error | unknown;\n}\n\n/**\n * Available logging severity levels.\n * @enum {string}\n * @public\n * @example\n * const level: LOGGING_LEVEL = LOGGING_LEVEL.error;\n * @ignore\n */\nexport enum LOGGING_LEVEL {\n /** Critical failures that require immediate attention */\n error = 'ERROR',\n /** Important issues that don't prevent the system from working */\n warn = 'WARN',\n /** General informational logs */\n log = 'LOG',\n /** Detailed information about system operation */\n info = 'INFO',\n /** Highly detailed diagnostic information */\n trace = 'TRACE',\n}\n\n/**\n * Metadata for log uploads.\n * @public\n * @example\n * const meta: LogsMetaData = { feedbackId: 'fb123', correlationId: 'corr456' };\n * @ignore\n */\nexport type LogsMetaData = {\n /** Optional feedback ID to associate with logs */\n feedbackId?: string;\n /** Optional correlation ID to track related operations */\n correlationId?: string;\n};\n\n/**\n * Response from uploading logs to the server.\n * @public\n * @example\n * const response: UploadLogsResponse = { trackingid: 'track123', url: 'https://...', userId: 'user1' };\n */\nexport type UploadLogsResponse = {\n /** Tracking ID for the upload request */\n trackingid?: string;\n /** URL where the logs can be accessed */\n url?: string;\n /** ID of the user who uploaded logs */\n userId?: string;\n /** Feedback ID associated with the logs */\n feedbackId?: string;\n /** Correlation ID for tracking related operations */\n correlationId?: string;\n};\n\n/**\n * Internal Webex SDK interfaces needed for plugin integration.\n * @internal\n * @ignore\n */\ninterface IWebexInternal {\n /** Mercury service for real-time messaging */\n mercury: {\n /** Register an event listener */\n on: Listener;\n /** Remove an event listener */\n off: ListenerOff;\n /** Establish a connection to the Mercury service */\n connect: () => Promise<void>;\n /** Disconnect from the Mercury service */\n disconnect: () => Promise<void>;\n /** Whether Mercury is currently connected */\n connected: boolean;\n /** Whether Mercury is in the process of connecting */\n connecting: boolean;\n };\n /** Device information */\n device: {\n /** Current WDM URL */\n url: string;\n /** Current user's ID */\n userId: string;\n /** Current organization ID */\n orgId: string;\n /** Device version */\n version: string;\n /** Calling behavior configuration */\n callingBehavior: string;\n };\n /** Presence service */\n presence: unknown;\n /** Services discovery and management */\n services: {\n /** Get a service URL by name */\n get: (service: string) => string;\n /** Wait for service catalog to be loaded */\n waitForCatalog: (service: string) => Promise<void>;\n /** Check if current environment is INT (integration) */\n isIntegrationEnvironment: () => boolean;\n /** Host catalog for service discovery */\n _hostCatalog: Record<string, ServiceHost[]>;\n /** Service URLs cache */\n _serviceUrls: {\n /** Mobius calling service */\n mobius: string;\n /** Identity service */\n identity: string;\n /** Janus media server */\n janus: string;\n /** WDM (WebEx Device Management) service */\n wdm: string;\n /** BroadWorks IDP proxy service */\n broadworksIdpProxy: string;\n /** Hydra API service */\n hydra: string;\n /** Mercury API service */\n mercuryApi: string;\n /** UC Management gateway service */\n 'ucmgmt-gateway': string;\n /** Contacts service */\n contactsService: string;\n };\n };\n /** Metrics collection services */\n newMetrics: {\n /** Submit behavioral events (user actions) */\n submitBehavioralEvent: SubmitBehavioralEvent;\n /** Submit operational events (system operations) */\n submitOperationalEvent: SubmitOperationalEvent;\n /** Submit business events (business outcomes) */\n submitBusinessEvent: SubmitBusinessEvent;\n };\n /** Support functionality */\n support: {\n /** Submit logs to server */\n submitLogs: (\n metaData: LogsMetaData,\n logs: string,\n options: {\n /** Whether to submit full logs or just differences */\n type: 'diff' | 'full';\n }\n ) => Promise<UploadLogsResponse>;\n };\n}\n\n/**\n * Interface representing the WebexSDK core functionality.\n * @interface WebexSDK\n * @public\n * @example\n * const sdk: WebexSDK = ...;\n * sdk.request({ service: 'identity', resource: '/users', method: HTTP_METHODS.GET });\n * @ignore\n */\nexport interface WebexSDK {\n /** Version of the WebexSDK */\n version: string;\n /** Whether the SDK can authorize requests */\n canAuthorize: boolean;\n /** Credentials management */\n credentials: {\n /** Get the user token for authentication */\n getUserToken: () => Promise<string>;\n /** Get the organization ID */\n getOrgId: () => string;\n };\n /** Whether the SDK is ready for use */\n ready: boolean;\n /** Make a request to the Webex APIs */\n request: <T>(payload: WebexRequestPayload) => Promise<T>;\n /** Register a one-time event handler */\n once: (event: string, callBack: () => void) => void;\n /** Internal plugins and services */\n internal: IWebexInternal;\n /** Logger instance */\n logger: Logger;\n}\n\n/**\n * An interface for the `ContactCenter` class.\n * The `ContactCenter` package is designed to provide a set of APIs to perform various operations for the Agent flow within Webex Contact Center.\n * @public\n * @example\n * const cc: IContactCenter = ...;\n * cc.register().then(profile => { ... });\n * @ignore\n */\nexport interface IContactCenter {\n /**\n * Initialize the CC SDK by setting up the contact center mercury connection.\n * This establishes WebSocket connectivity for real-time communication.\n *\n * @returns A Promise that resolves to the agent's profile upon successful registration\n * @public\n * @example\n * cc.register().then(profile => { ... });\n */\n register(): Promise<Profile>;\n}\n\n/**\n * Generic HTTP response structure.\n * @public\n * @example\n * const response: IHttpResponse = { body: {}, statusCode: 200, method: 'GET', headers: {}, url: '...' };\n * @ignore\n */\nexport interface IHttpResponse {\n /** Response body content */\n body: any;\n /** HTTP status code */\n statusCode: number;\n /** HTTP method used for the request */\n method: string;\n /** Response headers */\n headers: Headers;\n /** Request URL */\n url: string;\n}\n\n/**\n * Supported login options for agent authentication.\n * @public\n * @example\n * const option: LoginOption = LoginOption.AGENT_DN;\n * @ignore\n */\nexport const LoginOption = {\n /** Login using agent's direct number */\n AGENT_DN: 'AGENT_DN',\n /** Login using an extension number */\n EXTENSION: 'EXTENSION',\n /** Login using browser WebRTC capabilities */\n BROWSER: 'BROWSER',\n} as const;\n\n/**\n * Union type of login options.\n * @public\n * @example\n * function login(option: LoginOption) { ... }\n * @ignore\n */\nexport type LoginOption = Enum<typeof LoginOption>;\n\n/**\n * Request payload for subscribing to the contact center websocket.\n * @public\n * @example\n * const req: SubscribeRequest = { force: true, isKeepAliveEnabled: true, clientType: 'browser', allowMultiLogin: false };\n * @ignore\n */\nexport type SubscribeRequest = {\n /** Whether to force connection even if another exists */\n force: boolean;\n /** Whether to send keepalive messages */\n isKeepAliveEnabled: boolean;\n /** Type of client connecting */\n clientType: string;\n /** Whether to allow login from multiple devices */\n allowMultiLogin: boolean;\n};\n\n/**\n * Represents the response from getListOfTeams method.\n * Teams are groups of agents that can be managed together.\n * @public\n * @example\n * const team: Team = { id: 'team1', name: 'Support', desktopLayoutId: 'layout1' };\n * @ignore\n */\nexport type Team = {\n /**\n * Unique identifier of the team.\n */\n id: string;\n\n /**\n * Display name of the team.\n */\n name: string;\n\n /**\n * Associated desktop layout ID for the team.\n * Controls how the agent desktop is displayed for team members.\n */\n desktopLayoutId?: string;\n};\n\n/**\n * Represents the request to perform agent login.\n * @public\n * @example\n * const login: AgentLogin = { dialNumber: '1234', teamId: 'team1', loginOption: LoginOption.AGENT_DN };\n */\nexport type AgentLogin = {\n /**\n * A dialNumber field contains the number to dial such as a route point or extension.\n * Required for AGENT_DN and EXTENSION login options.\n */\n dialNumber?: string;\n\n /**\n * The unique ID representing a team of users.\n * The agent must belong to this team.\n */\n teamId: string;\n\n /**\n * The loginOption field specifies the type of login method.\n * Controls how calls are delivered to the agent.\n */\n loginOption: LoginOption;\n};\n\n/**\n * Represents the request to update agent profile settings.\n * @public\n * @example\n * const update: AgentProfileUpdate = { loginOption: LoginOption.BROWSER, dialNumber: '5678' };\n */\nexport type AgentProfileUpdate = Pick<AgentLogin, 'loginOption' | 'dialNumber' | 'teamId'>;\n\n/**\n * Union type for all possible request body types.\n * @internal\n * @ignore\n */\nexport type RequestBody =\n | SubscribeRequest\n | Agent.Logout\n | Agent.UserStationLogin\n | Agent.StateChange\n | Agent.BuddyAgents\n | Contact.HoldResumePayload\n | Contact.ResumeRecordingPayload\n | Contact.ConsultPayload\n | Contact.ConsultEndAPIPayload // API Payload accepts only QueueId wheres SDK API allows more params\n | Contact.TransferPayLoad\n | Contact.ConsultTransferPayLoad\n | Contact.cancelCtq\n | Contact.WrapupPayLoad\n | Contact.DialerPayload\n | Contact.PreviewContactPayload\n | CreateUserPreferenceRequest\n | UpdateUserPreferenceRequest;\n\n/**\n * Represents the options to fetch buddy agents for the logged in agent.\n * Buddy agents are other agents who can be consulted or transfered to.\n * @public\n * @example\n * const opts: BuddyAgents = { mediaType: 'telephony', state: 'Available' };\n * @ignore\n */\nexport type BuddyAgents = {\n /**\n * The media type channel to filter buddy agents.\n * Determines which channel capability the returned agents must have.\n */\n mediaType: 'telephony' | 'chat' | 'social' | 'email';\n\n /**\n * Optional filter for agent state.\n * If specified, returns only agents in that state.\n * If omitted, returns both available and idle agents.\n */\n state?: 'Available' | 'Idle';\n};\n\n/**\n * Holds the configuration flags for the Agent.\n * These flags determine the availability of certain features in the Agent UI.\n * @internal\n */\nexport type ConfigFlags = {\n isEndTaskEnabled: boolean;\n isEndConsultEnabled: boolean;\n webRtcEnabled: boolean;\n autoWrapup: boolean;\n aiFeature?: AIFeatureFlags;\n /**\n * Optional toggle to globally enable/disable recording controls.\n * Falls back to backend hints when omitted.\n */\n isRecordingEnabled?: boolean;\n};\n\n/**\n\n * Generic error structure for Contact Center SDK errors.\n * Contains detailed information about the error context.\n * @public\n * @example\n * const err: GenericError = new Error('Failed');\n * err.details = { type: 'ERR', orgId: 'org1', trackingId: 'track1', data: {} };\n * @ignore\n */\nexport interface GenericError extends Error {\n /** Structured details about the error */\n details: {\n /** Error type identifier */\n type: string;\n /** Organization ID where the error occurred */\n orgId: string;\n /** Unique tracking ID for the error */\n trackingId: string;\n /** Additional error context data */\n data: Record<string, any>;\n };\n}\n\n/**\n * Response type for station login operations.\n * Either a success response with agent details or an error.\n * @public\n * @example\n * function handleLogin(resp: StationLoginResponse) { ... }\n */\nexport type StationLoginResponse = Agent.StationLoginSuccessResponse | Error;\n\n/**\n * Response type for station logout operations.\n * Either a success response with logout details or an error.\n * @public\n * @example\n * function handleLogout(resp: StationLogoutResponse) { ... }\n */\nexport type StationLogoutResponse = Agent.LogoutSuccess | Error;\n\n/**\n * Response type for station relogin operations.\n * Either a success response with relogin details or an error.\n * @public\n * @example\n * function handleReLogin(resp: StationReLoginResponse) { ... }\n * @ignore\n */\nexport type StationReLoginResponse = Agent.ReloginSuccess | Error;\n\n/**\n * Response type for agent state change operations.\n * Either a success response with state change details or an error.\n * @public\n * @example\n * function handleStateChange(resp: SetStateResponse) { ... }\n * @ignore\n */\nexport type SetStateResponse = Agent.StateChangeSuccess | Error;\n\n/**\n * AddressBook types\n */\nexport interface AddressBookEntry {\n id: string;\n organizationId?: string;\n version?: number;\n name: string;\n number: string;\n createdTime?: number;\n lastUpdatedTime?: number;\n}\n\nexport type AddressBookEntriesResponse = PaginatedResponse<AddressBookEntry>;\n\nexport interface AddressBookEntrySearchParams extends BaseSearchParams {\n addressBookId?: string;\n}\n\n/**\n * EntryPointRecord types\n */\nexport interface EntryPointRecord {\n id: string;\n name: string;\n description?: string;\n type: string;\n isActive: boolean;\n orgId: string;\n createdAt?: string;\n updatedAt?: string;\n settings?: Record<string, any>;\n}\n\nexport type EntryPointListResponse = PaginatedResponse<EntryPointRecord>;\nexport type EntryPointSearchParams = BaseSearchParams;\n\n/**\n * Queue types\n */\nexport interface QueueSkillRequirement {\n organizationId?: string;\n id?: string;\n version?: number;\n skillId: string;\n skillName?: string;\n skillType?: string;\n condition: string;\n skillValue: string;\n createdTime?: number;\n lastUpdatedTime?: number;\n}\n\nexport interface QueueAgent {\n id: string;\n ciUserId?: string;\n}\n\nexport interface AgentGroup {\n teamId: string;\n}\n\nexport interface CallDistributionGroup {\n agentGroups: AgentGroup[];\n order: number;\n duration?: number;\n}\n\nexport interface AssistantSkillMapping {\n assistantSkillId?: string;\n assistantSkillUpdatedTime?: number;\n}\n\n/**\n * Configuration for a contact service queue\n * @public\n */\nexport interface ContactServiceQueue {\n /** Organization ID */\n organizationId?: string;\n /** Unique identifier for the queue */\n id?: string;\n /** Version of the queue */\n version?: number;\n /** Name of the Contact Service Queue */\n name: string;\n /** Description of the queue */\n description?: string;\n /** Queue type (INBOUND, OUTBOUND) */\n queueType: 'INBOUND' | 'OUTBOUND';\n /** Whether to check agent availability */\n checkAgentAvailability: boolean;\n /** Channel type (TELEPHONY, EMAIL, SOCIAL_CHANNEL, CHAT, etc.) */\n channelType: 'TELEPHONY' | 'EMAIL' | 'FAX' | 'CHAT' | 'VIDEO' | 'OTHERS' | 'SOCIAL_CHANNEL';\n /** Social channel type for SOCIAL_CHANNEL channelType */\n socialChannelType?:\n | 'MESSAGEBIRD'\n | 'MESSENGER'\n | 'WHATSAPP'\n | 'APPLE_BUSINESS_CHAT'\n | 'GOOGLE_BUSINESS_MESSAGES';\n /** Service level threshold in seconds */\n serviceLevelThreshold: number;\n /** Maximum number of simultaneous contacts */\n maxActiveContacts: number;\n /** Maximum time in queue in seconds */\n maxTimeInQueue: number;\n /** Default music in queue media file ID */\n defaultMusicInQueueMediaFileId: string;\n /** Timezone for routing strategies */\n timezone?: string;\n /** Whether the queue is active */\n active: boolean;\n /** Whether outdial campaign is enabled */\n outdialCampaignEnabled?: boolean;\n /** Whether monitoring is permitted */\n monitoringPermitted: boolean;\n /** Whether parking is permitted */\n parkingPermitted: boolean;\n /** Whether recording is permitted */\n recordingPermitted: boolean;\n /** Whether recording all calls is permitted */\n recordingAllCallsPermitted: boolean;\n /** Whether pausing recording is permitted */\n pauseRecordingPermitted: boolean;\n /** Recording pause duration in seconds */\n recordingPauseDuration?: number;\n /** Control flow script URL */\n controlFlowScriptUrl: string;\n /** IVR requeue URL */\n ivrRequeueUrl: string;\n /** Overflow number for telephony */\n overflowNumber?: string;\n /** Vendor ID */\n vendorId?: string;\n /** Routing type */\n routingType: 'LONGEST_AVAILABLE_AGENT' | 'SKILLS_BASED' | 'CIRCULAR' | 'LINEAR';\n /** Skills-based routing type */\n skillBasedRoutingType?: 'LONGEST_AVAILABLE_AGENT' | 'BEST_AVAILABLE_AGENT';\n /** Queue routing type */\n queueRoutingType: 'TEAM_BASED' | 'SKILL_BASED' | 'AGENT_BASED';\n /** Queue skill requirements */\n queueSkillRequirements?: QueueSkillRequirement[];\n /** List of agents for agent-based queue */\n agents?: QueueAgent[];\n /** Call distribution groups */\n callDistributionGroups: CallDistributionGroup[];\n /** XSP version */\n xspVersion?: string;\n /** Subscription ID */\n subscriptionId?: string;\n /** Assistant skill mapping */\n assistantSkill?: AssistantSkillMapping;\n /** Whether this is a system default queue */\n systemDefault?: boolean;\n /** User who last updated agents list */\n agentsLastUpdatedByUserName?: string;\n /** Email of user who last updated agents list */\n agentsLastUpdatedByUserEmailPrefix?: string;\n /** When agents list was last updated */\n agentsLastUpdatedTime?: number;\n /** Creation timestamp in epoch millis */\n createdTime?: number;\n /** Last updated timestamp in epoch millis */\n lastUpdatedTime?: number;\n}\n\nexport type ContactServiceQueuesResponse = PaginatedResponse<ContactServiceQueue>;\n\nexport interface ContactServiceQueueSearchParams extends BaseSearchParams {\n desktopProfileFilter?: boolean;\n provisioningView?: boolean;\n singleObjectResponse?: boolean;\n}\n\n/**\n * Response type for buddy agents query operations.\n * Either a success response with list of buddy agents or an error.\n * @public\n * @example\n * function handleBuddyAgents(resp: BuddyAgentsResponse) { ... }\n */\nexport type BuddyAgentsResponse = Agent.BuddyAgentsSuccess | Error;\n\n/**\n * Response type for device type update operations.\n * Either a success response with update confirmation or an error.\n * @public\n * @example\n * function handleUpdateDeviceType(resp: UpdateDeviceTypeResponse) { ... }\n */\nexport type UpdateDeviceTypeResponse = Agent.DeviceTypeUpdateSuccess | Error;\n\n/**\n * Supported transcript control actions for AI Assistant events.\n * @public\n * @example\n * const action: TranscriptAction = 'START';\n * @ignore\n */\nexport type TranscriptAction = 'START' | 'STOP';\n\n/**\n * Parameters used to request an AI Assistant suggested response.\n * @public\n * @example\n * const params: SuggestedResponseParams = {\n * interactionId: 'interaction-123',\n * actionTimeStamp: Date.now(),\n * context: 'Need help with credit card payment due date',\n * };\n */\nexport type SuggestedResponseParams = {\n /** Agent identifier */\n agentId: string;\n /** Interaction identifier for which suggestion should be generated */\n interactionId: string;\n /** Optional additional context that should refine the suggestion */\n context?: string;\n /** Optional language code for suggestions (for example, 'en'). Defaults to 'en'. */\n languageCode?: string;\n};\n\n/**\n * Supported AI Assistant event categories.\n * @public\n * @example\n * const eventType: AIAssistantEventType = AIAssistantEventType.CUSTOM_EVENT;\n * @ignore\n */\nexport const AIAssistantEventType = {\n /** Custom AI Assistant event */\n CUSTOM_EVENT: 'CUSTOM_EVENT',\n /** CTI-backed AI Assistant event */\n CTI_EVENT: 'CTI_EVENT',\n} as const;\n\n/**\n * Union type of AI Assistant event categories.\n * @public\n * @example\n * function send(type: AIAssistantEventType) { ... }\n * @ignore\n */\nexport type AIAssistantEventType = Enum<typeof AIAssistantEventType>;\n\n/**\n * Supported AI Assistant event names.\n * @public\n * @example\n * const name: AIAssistantEventName = AIAssistantEventName.GET_TRANSCRIPTS;\n * @ignore\n */\nexport const AIAssistantEventName = {\n /** Request transcript streaming for an interaction */\n GET_TRANSCRIPTS: 'GET_TRANSCRIPTS',\n /** Request a suggested response for an interaction */\n GET_SUGGESTIONS: 'GET_SUGGESTIONS',\n /** Add extra context to refine a suggested response */\n ADD_SUGGESTIONS_EXTRA_CONTEXT: 'ADD_SUGGESTIONS_EXTRA_CONTEXT',\n /** Request mid-call summary generation */\n GET_MID_CALL_SUMMARY: 'GET_MID_CALL_SUMMARY',\n /** Request post-call summary generation */\n GET_POST_CALL_SUMMARY: 'GET_POST_CALL_SUMMARY',\n /** Mid-call summary response event */\n MID_CALL_SUMMARY_RESPONSE: 'MID_CALL_SUMMARY_RESPONSE',\n /** Post-call summary response event */\n POST_CALL_SUMMARY_RESPONSE: 'POST_CALL_SUMMARY_RESPONSE',\n /** Suggested digital response event */\n SUGGESTED_RESPONSES_DIGITAL: 'SUGGESTED_RESPONSES_DIGITAL',\n} as const;\n\n/**\n * Union type of AI Assistant event names.\n * @public\n * @example\n * function handle(name: AIAssistantEventName) { ... }\n * @ignore\n */\nexport type AIAssistantEventName = Enum<typeof AIAssistantEventName>;\n\n/**\n * A single transcript message entry returned by AI Assistant APIs.\n * @public\n * @example\n * const message: TranscriptMessage = { role: 'AGENT', content: 'Hello', messageId: '1', publishTimestamp: Date.now() };\n *\n */\nexport type TranscriptMessage = {\n /** Speaker role for this message */\n role: string;\n /** Transcript chunk content */\n content: string;\n /** Unique message identifier */\n messageId: string;\n /** Message publish timestamp (epoch milliseconds) */\n publishTimestamp: number;\n};\n\n/**\n * Response payload for historic transcripts API.\n * @public\n * @example\n * const resp: HistoricTranscriptsResponse = { orgId: 'org', agentId: 'agent', conversationId: null, interactionId: 'int', source: 'AI', data: [] };\n *\n */\nexport type HistoricTranscriptsResponse = {\n /** Organization identifier */\n orgId: string;\n /** Agent identifier */\n agentId: string;\n /** Conversation identifier when available */\n conversationId: string | null;\n /** Interaction identifier */\n interactionId: string;\n /** Data source identifier */\n source: string;\n /** Transcript messages */\n data: TranscriptMessage[];\n};\n"],"mappings":";;;;;;AAgBA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG;EAC1B;EACAE,GAAG,EAAE,KAAK;EACV;EACAC,IAAI,EAAE,MAAM;EACZ;EACAC,KAAK,EAAE,OAAO;EACd;EACAC,GAAG,EAAE,KAAK;EACV;EACAC,MAAM,EAAE;AACV,CAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAwBA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgBA;AACA;AACA;AACA;AACA;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPA,IAQYC,aAAa,GAAAN,OAAA,CAAAM,aAAA,0BAAbA,aAAa;EACvB;EADUA,aAAa;EAGvB;EAHUA,aAAa;EAKvB;EALUA,aAAa;EAOvB;EAPUA,aAAa;EASvB;EATUA,aAAa;EAAA,OAAbA,aAAa;AAAA;AAazB;AACA;AACA;AACA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AACA;AACA;AAcA;AACA;AACA;AACA;AACA;AAuFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAyBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,WAAW,GAAAP,OAAA,CAAAO,WAAA,GAAG;EACzB;EACAC,QAAQ,EAAE,UAAU;EACpB;EACAC,SAAS,EAAE,WAAW;EACtB;EACAC,OAAO,EAAE;AACX,CAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAmBA;AACA;AACA;AACA;AACA;AACA;;AAqBA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;;AAoBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgBA;AACA;AACA;AACA;AACA;;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAeA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAiBA;AACA;AACA;;AAgBA;AACA;AACA;;AAkCA;AACA;AACA;AACA;;AAmGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,oBAAoB,GAAAX,OAAA,CAAAW,oBAAA,GAAG;EAClC;EACAC,YAAY,EAAE,cAAc;EAC5B;EACAC,SAAS,EAAE;AACb,CAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,oBAAoB,GAAAd,OAAA,CAAAc,oBAAA,GAAG;EAClC;EACAC,eAAe,EAAE,iBAAiB;EAClC;EACAC,eAAe,EAAE,iBAAiB;EAClC;EACAC,6BAA6B,EAAE,+BAA+B;EAC9D;EACAC,oBAAoB,EAAE,sBAAsB;EAC5C;EACAC,qBAAqB,EAAE,uBAAuB;EAC9C;EACAC,yBAAyB,EAAE,2BAA2B;EACtD;EACAC,0BAA0B,EAAE,4BAA4B;EACxD;EACAC,2BAA2B,EAAE;AAC/B,CAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
1
+ {"version":3,"names":["HTTP_METHODS","exports","GET","POST","PATCH","PUT","DELETE","LOGGING_LEVEL","LoginOption","AGENT_DN","EXTENSION","BROWSER","RealTimeAssistanceUserActionId","LIKE","DISLIKE","COPY","AIAssistantEventType","CUSTOM_EVENT","CTI_EVENT","AIAssistantEventName","GET_TRANSCRIPTS","GET_SUGGESTIONS","ADD_SUGGESTIONS_EXTRA_CONTEXT","GET_MID_CALL_SUMMARY","GET_POST_CALL_SUMMARY","MID_CALL_SUMMARY_RESPONSE","POST_CALL_SUMMARY_RESPONSE","SUGGESTED_RESPONSES_DIGITAL","SUGGESTED_RESPONSES_USER_ACTION"],"sources":["types.ts"],"sourcesContent":["import {CallingClientConfig} from '@webex/calling';\nimport {\n SubmitBehavioralEvent,\n SubmitOperationalEvent,\n SubmitBusinessEvent,\n} from '@webex/internal-plugin-metrics/src/metrics.types';\nimport * as Agent from './services/agent/types';\nimport * as Contact from './services/task/types';\nimport {\n AIFeatureFlags,\n Profile,\n CreateUserPreferenceRequest,\n UpdateUserPreferenceRequest,\n} from './services/config/types';\nimport {PaginatedResponse, BaseSearchParams} from './utils/PageCache';\n\n/**\n * Generic type for converting a const enum object into a union type of its values.\n * @template T The enum object type\n * @internal\n * @ignore\n */\ntype Enum<T extends Record<string, unknown>> = T[keyof T];\n\n/**\n * HTTP methods supported by WebexRequest.\n * @enum {string}\n * @public\n * @example\n * const method: HTTP_METHODS = HTTP_METHODS.GET;\n * @ignore\n */\nexport const HTTP_METHODS = {\n /** HTTP GET method for retrieving data */\n GET: 'GET',\n /** HTTP POST method for creating resources */\n POST: 'POST',\n /** HTTP PATCH method for partial updates */\n PATCH: 'PATCH',\n /** HTTP PUT method for complete updates */\n PUT: 'PUT',\n /** HTTP DELETE method for removing resources */\n DELETE: 'DELETE',\n} as const;\n\n/**\n * Union type of HTTP methods.\n * @public\n * @example\n * function makeRequest(method: HTTP_METHODS) { ... }\n * @ignore\n */\nexport type HTTP_METHODS = Enum<typeof HTTP_METHODS>;\n\n/**\n * Payload for making requests to Webex APIs.\n * @public\n * @example\n * const payload: WebexRequestPayload = {\n * service: 'identity',\n * resource: '/users',\n * method: HTTP_METHODS.GET\n * };\n * @ignore\n */\nexport type WebexRequestPayload = {\n /** Service name to target */\n service?: string;\n /** Resource path within the service */\n resource?: string;\n /** HTTP method to use */\n method?: HTTP_METHODS;\n /** Full URI if not using service/resource pattern */\n uri?: string;\n /** Whether to add authorization header */\n addAuthHeader?: boolean;\n /** Custom headers to include in request */\n headers?: {\n [key: string]: string | null;\n };\n /** Request body data */\n body?: object;\n /** Expected response status code */\n statusCode?: number;\n /** Whether to parse response as JSON */\n json?: boolean;\n};\n\n/**\n * Event listener function type.\n * @internal\n * @ignore\n */\ntype Listener = (e: string, data?: unknown) => void;\n\n/**\n * Event listener removal function type.\n * @internal\n * @ignore\n */\ntype ListenerOff = (e: string) => void;\n\n/**\n * Service host configuration.\n * @internal\n * @ignore\n */\ntype ServiceHost = {\n /** Host URL/domain for the service */\n host: string;\n /** Time-to-live in seconds */\n ttl: number;\n /** Priority level for load balancing (lower is higher priority) */\n priority: number;\n /** Unique identifier for this host */\n id: string;\n /** Whether this is the home cluster for the user */\n homeCluster?: boolean;\n};\n\n/**\n * Configuration options for the Contact Center Plugin.\n * @interface CCPluginConfig\n * @public\n * @example\n * const config: CCPluginConfig = {\n * allowMultiLogin: true,\n * allowAutomatedRelogin: false,\n * clientType: 'browser',\n * isKeepAliveEnabled: true,\n * force: false,\n * metrics: { clientName: 'myClient', clientType: 'browser' },\n * logging: { enable: true, verboseEvents: false },\n * callingClientConfig: { ... }\n * };\n */\nexport interface CCPluginConfig {\n /** Whether to allow multiple logins from different devices */\n allowMultiLogin: boolean;\n /** Whether to automatically attempt relogin on connection loss */\n allowAutomatedRelogin: boolean;\n /** The type of client making the connection */\n clientType: string;\n /** Whether to enable keep-alive messages */\n isKeepAliveEnabled: boolean;\n /** Whether to force registration */\n force: boolean;\n /** Metrics configuration */\n metrics: {\n /** Name of the client for metrics */\n clientName: string;\n /** Type of client for metrics */\n clientType: string;\n };\n /** Logging configuration */\n logging: {\n /** Whether to enable logging */\n enable: boolean;\n /** Whether to log verbose events */\n verboseEvents: boolean;\n };\n /** Configuration for the calling client */\n callingClientConfig: CallingClientConfig;\n /** Whether to skip Mobius/WebRTC registration for browser login flows */\n disableWebRTCRegistration?: boolean;\n}\n\n/**\n * Logger interface for standardized logging throughout the plugin.\n * @public\n * @example\n * logger.log('This is a log message');\n * logger.error('This is an error message');\n * @ignore\n */\nexport type Logger = {\n /** Log general messages */\n log: (payload: string) => void;\n /** Log error messages */\n error: (payload: string) => void;\n /** Log warning messages */\n warn: (payload: string) => void;\n /** Log informational messages */\n info: (payload: string) => void;\n /** Log detailed trace messages */\n trace: (payload: string) => void;\n /** Log debug messages */\n debug: (payload: string) => void;\n};\n\n/**\n * Contextual information for log entries.\n * @public\n * @ignore\n */\nexport interface LogContext {\n /** Module name where the log originated */\n module?: string;\n /** Method name where the log originated */\n method?: string;\n interactionId?: string;\n trackingId?: string;\n /** Additional structured data to include in logs */\n data?: Record<string, any>;\n /** Error object to include in logs */\n error?: Error | unknown;\n}\n\n/**\n * Available logging severity levels.\n * @enum {string}\n * @public\n * @example\n * const level: LOGGING_LEVEL = LOGGING_LEVEL.error;\n * @ignore\n */\nexport enum LOGGING_LEVEL {\n /** Critical failures that require immediate attention */\n error = 'ERROR',\n /** Important issues that don't prevent the system from working */\n warn = 'WARN',\n /** General informational logs */\n log = 'LOG',\n /** Detailed information about system operation */\n info = 'INFO',\n /** Highly detailed diagnostic information */\n trace = 'TRACE',\n}\n\n/**\n * Metadata for log uploads.\n * @public\n * @example\n * const meta: LogsMetaData = { feedbackId: 'fb123', correlationId: 'corr456' };\n * @ignore\n */\nexport type LogsMetaData = {\n /** Optional feedback ID to associate with logs */\n feedbackId?: string;\n /** Optional correlation ID to track related operations */\n correlationId?: string;\n};\n\n/**\n * Response from uploading logs to the server.\n * @public\n * @example\n * const response: UploadLogsResponse = { trackingid: 'track123', url: 'https://...', userId: 'user1' };\n */\nexport type UploadLogsResponse = {\n /** Tracking ID for the upload request */\n trackingid?: string;\n /** URL where the logs can be accessed */\n url?: string;\n /** ID of the user who uploaded logs */\n userId?: string;\n /** Feedback ID associated with the logs */\n feedbackId?: string;\n /** Correlation ID for tracking related operations */\n correlationId?: string;\n};\n\n/**\n * Internal Webex SDK interfaces needed for plugin integration.\n * @internal\n * @ignore\n */\ninterface IWebexInternal {\n /** Mercury service for real-time messaging */\n mercury: {\n /** Register an event listener */\n on: Listener;\n /** Remove an event listener */\n off: ListenerOff;\n /** Establish a connection to the Mercury service */\n connect: () => Promise<void>;\n /** Disconnect from the Mercury service */\n disconnect: () => Promise<void>;\n /** Whether Mercury is currently connected */\n connected: boolean;\n /** Whether Mercury is in the process of connecting */\n connecting: boolean;\n };\n /** Device information */\n device: {\n /** Current WDM URL */\n url: string;\n /** Current user's ID */\n userId: string;\n /** Current organization ID */\n orgId: string;\n /** Device version */\n version: string;\n /** Calling behavior configuration */\n callingBehavior: string;\n };\n /** Presence service */\n presence: unknown;\n /** Services discovery and management */\n services: {\n /** Get a service URL by name */\n get: (service: string) => string;\n /** Wait for service catalog to be loaded */\n waitForCatalog: (service: string) => Promise<void>;\n /** Check if current environment is INT (integration) */\n isIntegrationEnvironment: () => boolean;\n /** Host catalog for service discovery */\n _hostCatalog: Record<string, ServiceHost[]>;\n /** Service URLs cache */\n _serviceUrls: {\n /** Mobius calling service */\n mobius: string;\n /** Identity service */\n identity: string;\n /** Janus media server */\n janus: string;\n /** WDM (WebEx Device Management) service */\n wdm: string;\n /** BroadWorks IDP proxy service */\n broadworksIdpProxy: string;\n /** Hydra API service */\n hydra: string;\n /** Mercury API service */\n mercuryApi: string;\n /** UC Management gateway service */\n 'ucmgmt-gateway': string;\n /** Contacts service */\n contactsService: string;\n };\n };\n /** Metrics collection services */\n newMetrics: {\n /** Submit behavioral events (user actions) */\n submitBehavioralEvent: SubmitBehavioralEvent;\n /** Submit operational events (system operations) */\n submitOperationalEvent: SubmitOperationalEvent;\n /** Submit business events (business outcomes) */\n submitBusinessEvent: SubmitBusinessEvent;\n };\n /** Support functionality */\n support: {\n /** Submit logs to server */\n submitLogs: (\n metaData: LogsMetaData,\n logs: string,\n options: {\n /** Whether to submit full logs or just differences */\n type: 'diff' | 'full';\n }\n ) => Promise<UploadLogsResponse>;\n };\n}\n\n/**\n * Interface representing the WebexSDK core functionality.\n * @interface WebexSDK\n * @public\n * @example\n * const sdk: WebexSDK = ...;\n * sdk.request({ service: 'identity', resource: '/users', method: HTTP_METHODS.GET });\n * @ignore\n */\nexport interface WebexSDK {\n /** Version of the WebexSDK */\n version: string;\n /** Whether the SDK can authorize requests */\n canAuthorize: boolean;\n /** Credentials management */\n credentials: {\n /** Get the user token for authentication */\n getUserToken: () => Promise<string>;\n /** Get the organization ID */\n getOrgId: () => string;\n };\n /** Whether the SDK is ready for use */\n ready: boolean;\n /** Make a request to the Webex APIs */\n request: <T>(payload: WebexRequestPayload) => Promise<T>;\n /** Register a one-time event handler */\n once: (event: string, callBack: () => void) => void;\n /** Internal plugins and services */\n internal: IWebexInternal;\n /** Logger instance */\n logger: Logger;\n}\n\n/**\n * An interface for the `ContactCenter` class.\n * The `ContactCenter` package is designed to provide a set of APIs to perform various operations for the Agent flow within Webex Contact Center.\n * @public\n * @example\n * const cc: IContactCenter = ...;\n * cc.register().then(profile => { ... });\n * @ignore\n */\nexport interface IContactCenter {\n /**\n * Initialize the CC SDK by setting up the contact center mercury connection.\n * This establishes WebSocket connectivity for real-time communication.\n *\n * @returns A Promise that resolves to the agent's profile upon successful registration\n * @public\n * @example\n * cc.register().then(profile => { ... });\n */\n register(): Promise<Profile>;\n}\n\n/**\n * Generic HTTP response structure.\n * @public\n * @example\n * const response: IHttpResponse = { body: {}, statusCode: 200, method: 'GET', headers: {}, url: '...' };\n * @ignore\n */\nexport interface IHttpResponse {\n /** Response body content */\n body: any;\n /** HTTP status code */\n statusCode: number;\n /** HTTP method used for the request */\n method: string;\n /** Response headers */\n headers: Headers;\n /** Request URL */\n url: string;\n}\n\n/**\n * Supported login options for agent authentication.\n * @public\n * @example\n * const option: LoginOption = LoginOption.AGENT_DN;\n * @ignore\n */\nexport const LoginOption = {\n /** Login using agent's direct number */\n AGENT_DN: 'AGENT_DN',\n /** Login using an extension number */\n EXTENSION: 'EXTENSION',\n /** Login using browser WebRTC capabilities */\n BROWSER: 'BROWSER',\n} as const;\n\n/**\n * Union type of login options.\n * @public\n * @example\n * function login(option: LoginOption) { ... }\n * @ignore\n */\nexport type LoginOption = Enum<typeof LoginOption>;\n\n/**\n * Request payload for subscribing to the contact center websocket.\n * @public\n * @example\n * const req: SubscribeRequest = { force: true, isKeepAliveEnabled: true, clientType: 'browser', allowMultiLogin: false };\n * @ignore\n */\nexport type SubscribeRequest = {\n /** Whether to force connection even if another exists */\n force: boolean;\n /** Whether to send keepalive messages */\n isKeepAliveEnabled: boolean;\n /** Type of client connecting */\n clientType: string;\n /** Whether to allow login from multiple devices */\n allowMultiLogin: boolean;\n};\n\n/**\n * Represents the response from getListOfTeams method.\n * Teams are groups of agents that can be managed together.\n * @public\n * @example\n * const team: Team = { id: 'team1', name: 'Support', desktopLayoutId: 'layout1' };\n * @ignore\n */\nexport type Team = {\n /**\n * Unique identifier of the team.\n */\n id: string;\n\n /**\n * Display name of the team.\n */\n name: string;\n\n /**\n * Associated desktop layout ID for the team.\n * Controls how the agent desktop is displayed for team members.\n */\n desktopLayoutId?: string;\n};\n\n/**\n * Represents the request to perform agent login.\n * @public\n * @example\n * const login: AgentLogin = { dialNumber: '1234', teamId: 'team1', loginOption: LoginOption.AGENT_DN };\n */\nexport type AgentLogin = {\n /**\n * A dialNumber field contains the number to dial such as a route point or extension.\n * Required for AGENT_DN and EXTENSION login options.\n */\n dialNumber?: string;\n\n /**\n * The unique ID representing a team of users.\n * The agent must belong to this team.\n */\n teamId: string;\n\n /**\n * The loginOption field specifies the type of login method.\n * Controls how calls are delivered to the agent.\n */\n loginOption: LoginOption;\n};\n\n/**\n * Represents the request to update agent profile settings.\n * @public\n * @example\n * const update: AgentProfileUpdate = { loginOption: LoginOption.BROWSER, dialNumber: '5678' };\n */\nexport type AgentProfileUpdate = Pick<AgentLogin, 'loginOption' | 'dialNumber' | 'teamId'>;\n\n/**\n * Union type for all possible request body types.\n * @internal\n * @ignore\n */\nexport type RequestBody =\n | SubscribeRequest\n | Agent.Logout\n | Agent.UserStationLogin\n | Agent.StateChange\n | Agent.BuddyAgents\n | Contact.HoldResumePayload\n | Contact.ResumeRecordingPayload\n | Contact.ConsultPayload\n | Contact.ConsultEndAPIPayload // API Payload accepts only QueueId wheres SDK API allows more params\n | Contact.TransferPayLoad\n | Contact.ConsultTransferPayLoad\n | Contact.cancelCtq\n | Contact.WrapupPayLoad\n | Contact.DialerPayload\n | Contact.PreviewContactPayload\n | CreateUserPreferenceRequest\n | UpdateUserPreferenceRequest;\n\n/**\n * Represents the options to fetch buddy agents for the logged in agent.\n * Buddy agents are other agents who can be consulted or transfered to.\n * @public\n * @example\n * const opts: BuddyAgents = { mediaType: 'telephony', state: 'Available' };\n * @ignore\n */\nexport type BuddyAgents = {\n /**\n * The media type channel to filter buddy agents.\n * Determines which channel capability the returned agents must have.\n */\n mediaType: 'telephony' | 'chat' | 'social' | 'email';\n\n /**\n * Optional filter for agent state.\n * If specified, returns only agents in that state.\n * If omitted, returns both available and idle agents.\n */\n state?: 'Available' | 'Idle';\n};\n\n/**\n * Holds the configuration flags for the Agent.\n * These flags determine the availability of certain features in the Agent UI.\n * @internal\n */\nexport type ConfigFlags = {\n isEndTaskEnabled: boolean;\n isEndConsultEnabled: boolean;\n webRtcEnabled: boolean;\n autoWrapup: boolean;\n aiFeature?: AIFeatureFlags;\n /**\n * Optional toggle to globally enable/disable recording controls.\n * Falls back to backend hints when omitted.\n */\n isRecordingEnabled?: boolean;\n};\n\n/**\n\n * Generic error structure for Contact Center SDK errors.\n * Contains detailed information about the error context.\n * @public\n * @example\n * const err: GenericError = new Error('Failed');\n * err.details = { type: 'ERR', orgId: 'org1', trackingId: 'track1', data: {} };\n * @ignore\n */\nexport interface GenericError extends Error {\n /** Structured details about the error */\n details: {\n /** Error type identifier */\n type: string;\n /** Organization ID where the error occurred */\n orgId: string;\n /** Unique tracking ID for the error */\n trackingId: string;\n /** Additional error context data */\n data: Record<string, any>;\n };\n}\n\n/**\n * Response type for station login operations.\n * Either a success response with agent details or an error.\n * @public\n * @example\n * function handleLogin(resp: StationLoginResponse) { ... }\n */\nexport type StationLoginResponse = Agent.StationLoginSuccessResponse | Error;\n\n/**\n * Response type for station logout operations.\n * Either a success response with logout details or an error.\n * @public\n * @example\n * function handleLogout(resp: StationLogoutResponse) { ... }\n */\nexport type StationLogoutResponse = Agent.LogoutSuccess | Error;\n\n/**\n * Response type for station relogin operations.\n * Either a success response with relogin details or an error.\n * @public\n * @example\n * function handleReLogin(resp: StationReLoginResponse) { ... }\n * @ignore\n */\nexport type StationReLoginResponse = Agent.ReloginSuccess | Error;\n\n/**\n * Response type for agent state change operations.\n * Either a success response with state change details or an error.\n * @public\n * @example\n * function handleStateChange(resp: SetStateResponse) { ... }\n * @ignore\n */\nexport type SetStateResponse = Agent.StateChangeSuccess | Error;\n\n/**\n * AddressBook types\n */\nexport interface AddressBookEntry {\n id: string;\n organizationId?: string;\n version?: number;\n name: string;\n number: string;\n createdTime?: number;\n lastUpdatedTime?: number;\n}\n\nexport type AddressBookEntriesResponse = PaginatedResponse<AddressBookEntry>;\n\nexport interface AddressBookEntrySearchParams extends BaseSearchParams {\n addressBookId?: string;\n}\n\n/**\n * EntryPointRecord types\n */\nexport interface EntryPointRecord {\n id: string;\n name: string;\n description?: string;\n type: string;\n isActive: boolean;\n orgId: string;\n createdAt?: string;\n updatedAt?: string;\n settings?: Record<string, any>;\n}\n\nexport type EntryPointListResponse = PaginatedResponse<EntryPointRecord>;\nexport type EntryPointSearchParams = BaseSearchParams;\n\n/**\n * Queue types\n */\nexport interface QueueSkillRequirement {\n organizationId?: string;\n id?: string;\n version?: number;\n skillId: string;\n skillName?: string;\n skillType?: string;\n condition: string;\n skillValue: string;\n createdTime?: number;\n lastUpdatedTime?: number;\n}\n\nexport interface QueueAgent {\n id: string;\n ciUserId?: string;\n}\n\nexport interface AgentGroup {\n teamId: string;\n}\n\nexport interface CallDistributionGroup {\n agentGroups: AgentGroup[];\n order: number;\n duration?: number;\n}\n\nexport interface AssistantSkillMapping {\n assistantSkillId?: string;\n assistantSkillUpdatedTime?: number;\n}\n\n/**\n * Configuration for a contact service queue\n * @public\n */\nexport interface ContactServiceQueue {\n /** Organization ID */\n organizationId?: string;\n /** Unique identifier for the queue */\n id?: string;\n /** Version of the queue */\n version?: number;\n /** Name of the Contact Service Queue */\n name: string;\n /** Description of the queue */\n description?: string;\n /** Queue type (INBOUND, OUTBOUND) */\n queueType: 'INBOUND' | 'OUTBOUND';\n /** Whether to check agent availability */\n checkAgentAvailability: boolean;\n /** Channel type (TELEPHONY, EMAIL, SOCIAL_CHANNEL, CHAT, etc.) */\n channelType: 'TELEPHONY' | 'EMAIL' | 'FAX' | 'CHAT' | 'VIDEO' | 'OTHERS' | 'SOCIAL_CHANNEL';\n /** Social channel type for SOCIAL_CHANNEL channelType */\n socialChannelType?:\n | 'MESSAGEBIRD'\n | 'MESSENGER'\n | 'WHATSAPP'\n | 'APPLE_BUSINESS_CHAT'\n | 'GOOGLE_BUSINESS_MESSAGES';\n /** Service level threshold in seconds */\n serviceLevelThreshold: number;\n /** Maximum number of simultaneous contacts */\n maxActiveContacts: number;\n /** Maximum time in queue in seconds */\n maxTimeInQueue: number;\n /** Default music in queue media file ID */\n defaultMusicInQueueMediaFileId: string;\n /** Timezone for routing strategies */\n timezone?: string;\n /** Whether the queue is active */\n active: boolean;\n /** Whether outdial campaign is enabled */\n outdialCampaignEnabled?: boolean;\n /** Whether monitoring is permitted */\n monitoringPermitted: boolean;\n /** Whether parking is permitted */\n parkingPermitted: boolean;\n /** Whether recording is permitted */\n recordingPermitted: boolean;\n /** Whether recording all calls is permitted */\n recordingAllCallsPermitted: boolean;\n /** Whether pausing recording is permitted */\n pauseRecordingPermitted: boolean;\n /** Recording pause duration in seconds */\n recordingPauseDuration?: number;\n /** Control flow script URL */\n controlFlowScriptUrl: string;\n /** IVR requeue URL */\n ivrRequeueUrl: string;\n /** Overflow number for telephony */\n overflowNumber?: string;\n /** Vendor ID */\n vendorId?: string;\n /** Routing type */\n routingType: 'LONGEST_AVAILABLE_AGENT' | 'SKILLS_BASED' | 'CIRCULAR' | 'LINEAR';\n /** Skills-based routing type */\n skillBasedRoutingType?: 'LONGEST_AVAILABLE_AGENT' | 'BEST_AVAILABLE_AGENT';\n /** Queue routing type */\n queueRoutingType: 'TEAM_BASED' | 'SKILL_BASED' | 'AGENT_BASED';\n /** Queue skill requirements */\n queueSkillRequirements?: QueueSkillRequirement[];\n /** List of agents for agent-based queue */\n agents?: QueueAgent[];\n /** Call distribution groups */\n callDistributionGroups: CallDistributionGroup[];\n /** XSP version */\n xspVersion?: string;\n /** Subscription ID */\n subscriptionId?: string;\n /** Assistant skill mapping */\n assistantSkill?: AssistantSkillMapping;\n /** Whether this is a system default queue */\n systemDefault?: boolean;\n /** User who last updated agents list */\n agentsLastUpdatedByUserName?: string;\n /** Email of user who last updated agents list */\n agentsLastUpdatedByUserEmailPrefix?: string;\n /** When agents list was last updated */\n agentsLastUpdatedTime?: number;\n /** Creation timestamp in epoch millis */\n createdTime?: number;\n /** Last updated timestamp in epoch millis */\n lastUpdatedTime?: number;\n}\n\nexport type ContactServiceQueuesResponse = PaginatedResponse<ContactServiceQueue>;\n\nexport interface ContactServiceQueueSearchParams extends BaseSearchParams {\n desktopProfileFilter?: boolean;\n provisioningView?: boolean;\n singleObjectResponse?: boolean;\n}\n\n/**\n * Response type for buddy agents query operations.\n * Either a success response with list of buddy agents or an error.\n * @public\n * @example\n * function handleBuddyAgents(resp: BuddyAgentsResponse) { ... }\n */\nexport type BuddyAgentsResponse = Agent.BuddyAgentsSuccess | Error;\n\n/**\n * Response type for device type update operations.\n * Either a success response with update confirmation or an error.\n * @public\n * @example\n * function handleUpdateDeviceType(resp: UpdateDeviceTypeResponse) { ... }\n */\nexport type UpdateDeviceTypeResponse = Agent.DeviceTypeUpdateSuccess | Error;\n\n/**\n * Supported transcript control actions for AI Assistant events.\n * @public\n * @example\n * const action: TranscriptAction = 'START';\n * @ignore\n */\nexport type TranscriptAction = 'START' | 'STOP';\n\n/**\n * Parameters used to request AI Assistant real-time assistance.\n * @public\n * @example\n * const params: RealTimeAssistanceParams = {\n * interactionId: 'interaction-123',\n * context: 'Need help with credit card payment due date',\n * };\n */\nexport type RealTimeAssistanceParams = {\n /** Agent identifier */\n agentId: string;\n /** Interaction identifier for which assistance should be generated */\n interactionId: string;\n /** Optional additional context that should refine the assistance */\n context?: string;\n /** Optional language code for assistance (for example, 'en'). Defaults to 'en'. */\n languageCode?: string;\n};\n\n/**\n * Supported user actions on an AI Assistant real-time assistance adaptive card.\n * @public\n */\nexport const RealTimeAssistanceUserActionId = {\n /** User liked the real-time assistance response */\n LIKE: 'likeButton',\n /** User disliked the real-time assistance response */\n DISLIKE: 'dislikeButton',\n /** User copied the real-time assistance response */\n COPY: 'copyButton',\n} as const;\n\n/**\n * Union type of supported real-time assistance user actions.\n * @public\n */\nexport type RealTimeAssistanceUserActionId = Enum<typeof RealTimeAssistanceUserActionId>;\n\n/**\n * Parameters used to send user action feedback for a real-time assistance adaptive card.\n * @public\n * @example\n * const params: RealTimeAssistanceUserActionParams = {\n * agentId: 'agent-123',\n * interactionId: 'interaction-123',\n * adaptiveCardId: 'adaptive-card-123',\n * actionId: RealTimeAssistanceUserActionId.LIKE,\n * };\n */\nexport type RealTimeAssistanceUserActionParams = {\n /** Agent identifier */\n agentId: string;\n /** Interaction identifier associated with the real-time assistance response */\n interactionId: string;\n /** Adaptive card identifier from the real-time assistance payload */\n adaptiveCardId: string;\n /** User action performed on the adaptive card */\n actionId: RealTimeAssistanceUserActionId;\n /** Optional language code. Defaults to 'en'. */\n languageCode?: string;\n};\n\n/**\n * Supported AI Assistant event categories.\n * @public\n * @example\n * const eventType: AIAssistantEventType = AIAssistantEventType.CUSTOM_EVENT;\n * @ignore\n */\nexport const AIAssistantEventType = {\n /** Custom AI Assistant event */\n CUSTOM_EVENT: 'CUSTOM_EVENT',\n /** CTI-backed AI Assistant event */\n CTI_EVENT: 'CTI_EVENT',\n} as const;\n\n/**\n * Union type of AI Assistant event categories.\n * @public\n * @example\n * function send(type: AIAssistantEventType) { ... }\n * @ignore\n */\nexport type AIAssistantEventType = Enum<typeof AIAssistantEventType>;\n\n/**\n * Supported AI Assistant event names.\n * @public\n * @example\n * const name: AIAssistantEventName = AIAssistantEventName.GET_TRANSCRIPTS;\n * @ignore\n */\nexport const AIAssistantEventName = {\n /** Request transcript streaming for an interaction */\n GET_TRANSCRIPTS: 'GET_TRANSCRIPTS',\n /** Request a suggested response for an interaction */\n GET_SUGGESTIONS: 'GET_SUGGESTIONS',\n /** Add extra context to refine a suggested response */\n ADD_SUGGESTIONS_EXTRA_CONTEXT: 'ADD_SUGGESTIONS_EXTRA_CONTEXT',\n /** Request mid-call summary generation */\n GET_MID_CALL_SUMMARY: 'GET_MID_CALL_SUMMARY',\n /** Request post-call summary generation */\n GET_POST_CALL_SUMMARY: 'GET_POST_CALL_SUMMARY',\n /** Mid-call summary response event */\n MID_CALL_SUMMARY_RESPONSE: 'MID_CALL_SUMMARY_RESPONSE',\n /** Post-call summary response event */\n POST_CALL_SUMMARY_RESPONSE: 'POST_CALL_SUMMARY_RESPONSE',\n /** Suggested digital response event */\n SUGGESTED_RESPONSES_DIGITAL: 'SUGGESTED_RESPONSES_DIGITAL',\n /** User action on a suggested response adaptive card */\n SUGGESTED_RESPONSES_USER_ACTION: 'SUGGESTED_RESPONSES_USER_ACTION',\n} as const;\n\n/**\n * Union type of AI Assistant event names.\n * @public\n * @example\n * function handle(name: AIAssistantEventName) { ... }\n * @ignore\n */\nexport type AIAssistantEventName = Enum<typeof AIAssistantEventName>;\n\n/**\n * A single transcript message entry returned by AI Assistant APIs.\n * @public\n * @example\n * const message: TranscriptMessage = { role: 'AGENT', content: 'Hello', messageId: '1', publishTimestamp: Date.now() };\n *\n */\nexport type TranscriptMessage = {\n /** Speaker role for this message */\n role: string;\n /** Transcript chunk content */\n content: string;\n /** Unique message identifier */\n messageId: string;\n /** Message publish timestamp (epoch milliseconds) */\n publishTimestamp: number;\n};\n\n/**\n * Response payload for historic transcripts API.\n * @public\n * @example\n * const resp: HistoricTranscriptsResponse = { orgId: 'org', agentId: 'agent', conversationId: null, interactionId: 'int', source: 'AI', data: [] };\n *\n */\nexport type HistoricTranscriptsResponse = {\n /** Organization identifier */\n orgId: string;\n /** Agent identifier */\n agentId: string;\n /** Conversation identifier when available */\n conversationId: string | null;\n /** Interaction identifier */\n interactionId: string;\n /** Data source identifier */\n source: string;\n /** Transcript messages */\n data: TranscriptMessage[];\n};\n"],"mappings":";;;;;;AAgBA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG;EAC1B;EACAE,GAAG,EAAE,KAAK;EACV;EACAC,IAAI,EAAE,MAAM;EACZ;EACAC,KAAK,EAAE,OAAO;EACd;EACAC,GAAG,EAAE,KAAK;EACV;EACAC,MAAM,EAAE;AACV,CAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAwBA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgBA;AACA;AACA;AACA;AACA;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPA,IAQYC,aAAa,GAAAN,OAAA,CAAAM,aAAA,0BAAbA,aAAa;EACvB;EADUA,aAAa;EAGvB;EAHUA,aAAa;EAKvB;EALUA,aAAa;EAOvB;EAPUA,aAAa;EASvB;EATUA,aAAa;EAAA,OAAbA,aAAa;AAAA;AAazB;AACA;AACA;AACA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AACA;AACA;AAcA;AACA;AACA;AACA;AACA;AAuFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAyBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,WAAW,GAAAP,OAAA,CAAAO,WAAA,GAAG;EACzB;EACAC,QAAQ,EAAE,UAAU;EACpB;EACAC,SAAS,EAAE,WAAW;EACtB;EACAC,OAAO,EAAE;AACX,CAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAmBA;AACA;AACA;AACA;AACA;AACA;;AAqBA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;;AAoBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgBA;AACA;AACA;AACA;AACA;;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAeA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAiBA;AACA;AACA;;AAgBA;AACA;AACA;;AAkCA;AACA;AACA;AACA;;AAmGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACO,MAAMC,8BAA8B,GAAAX,OAAA,CAAAW,8BAAA,GAAG;EAC5C;EACAC,IAAI,EAAE,YAAY;EAClB;EACAC,OAAO,EAAE,eAAe;EACxB;EACAC,IAAI,EAAE;AACR,CAAU;;AAEV;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,oBAAoB,GAAAf,OAAA,CAAAe,oBAAA,GAAG;EAClC;EACAC,YAAY,EAAE,cAAc;EAC5B;EACAC,SAAS,EAAE;AACb,CAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,oBAAoB,GAAAlB,OAAA,CAAAkB,oBAAA,GAAG;EAClC;EACAC,eAAe,EAAE,iBAAiB;EAClC;EACAC,eAAe,EAAE,iBAAiB;EAClC;EACAC,6BAA6B,EAAE,+BAA+B;EAC9D;EACAC,oBAAoB,EAAE,sBAAsB;EAC5C;EACAC,qBAAqB,EAAE,uBAAuB;EAC9C;EACAC,yBAAyB,EAAE,2BAA2B;EACtD;EACAC,0BAA0B,EAAE,4BAA4B;EACxD;EACAC,2BAA2B,EAAE,6BAA6B;EAC1D;EACAC,+BAA+B,EAAE;AACnC,CAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
package/dist/webex.js CHANGED
@@ -41,7 +41,7 @@ if (!global.Buffer) {
41
41
  */
42
42
  const Webex = _webexCore.default.extend({
43
43
  webex: true,
44
- version: `3.12.0-next.85`
44
+ version: `3.12.0-next.87`
45
45
  });
46
46
 
47
47
  /**
package/package.json CHANGED
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "dependencies": {
47
47
  "@types/platform": "1.3.4",
48
- "@webex/calling": "3.12.0-next.74",
48
+ "@webex/calling": "3.12.0-next.75",
49
49
  "@webex/internal-plugin-mercury": "3.12.0-next.33",
50
50
  "@webex/internal-plugin-metrics": "3.12.0-next.32",
51
51
  "@webex/internal-plugin-support": "3.12.0-next.34",
@@ -83,5 +83,5 @@
83
83
  "typedoc": "^0.25.0",
84
84
  "typescript": "5.4.5"
85
85
  },
86
- "version": "3.12.0-next.85"
86
+ "version": "3.12.0-next.87"
87
87
  }
package/src/constants.ts CHANGED
@@ -66,6 +66,7 @@ export const METHODS = {
66
66
  REMOVE_PREVIEW_CONTACT: 'removePreviewContact',
67
67
  GET_BASE_URL: 'getBaseUrl',
68
68
  SEND_EVENT: 'sendEvent',
69
- GET_SUGGESTED_RESPONSE: 'getSuggestedResponse',
69
+ GET_REAL_TIME_ASSISTANCE: 'getRealTimeAssistance',
70
+ SEND_REAL_TIME_ASSISTANCE_USER_ACTION: 'sendRealTimeAssistanceUserAction',
70
71
  FETCH_HISTORIC_TRANSCRIPTS: 'fetchHistoricTranscripts',
71
72
  };
@@ -174,8 +174,12 @@ export const METRIC_EVENT_NAMES = {
174
174
  // AI Assistant Transcript events
175
175
  AI_ASSISTANT_SEND_EVENT_SUCCESS: 'AI Assistant Send Event Success',
176
176
  AI_ASSISTANT_SEND_EVENT_FAILED: 'AI Assistant Send Event Failed',
177
- AI_ASSISTANT_GET_SUGGESTED_RESPONSE_SUCCESS: 'AI Assistant Get Suggested Response Success',
178
- AI_ASSISTANT_GET_SUGGESTED_RESPONSE_FAILED: 'AI Assistant Get Suggested Response Failed',
177
+ AI_ASSISTANT_GET_REAL_TIME_ASSISTANCE_SUCCESS: 'AI Assistant Get Real Time Assistance Success',
178
+ AI_ASSISTANT_GET_REAL_TIME_ASSISTANCE_FAILED: 'AI Assistant Get Real Time Assistance Failed',
179
+ AI_ASSISTANT_SEND_REAL_TIME_ASSISTANCE_USER_ACTION_SUCCESS:
180
+ 'AI Assistant Send Real Time Assistance User Action Success',
181
+ AI_ASSISTANT_SEND_REAL_TIME_ASSISTANCE_USER_ACTION_FAILED:
182
+ 'AI Assistant Send Real Time Assistance User Action Failed',
179
183
  AI_ASSISTANT_FETCH_HISTORIC_TRANSCRIPTS_SUCCESS:
180
184
  'AI Assistant Fetch Historic Transcripts Success',
181
185
  AI_ASSISTANT_FETCH_HISTORIC_TRANSCRIPTS_FAILED: 'AI Assistant Fetch Historic Transcripts Failed',
@@ -7,11 +7,11 @@ import {
7
7
  HTTP_METHODS,
8
8
  WebexSDK,
9
9
  IHttpResponse,
10
- TranscriptAction,
11
10
  AIAssistantEventType,
12
11
  AIAssistantEventName,
13
12
  HistoricTranscriptsResponse,
14
- SuggestedResponseParams,
13
+ RealTimeAssistanceParams,
14
+ RealTimeAssistanceUserActionParams,
15
15
  } from '../types';
16
16
  import {getErrorDetails} from './core/Utils';
17
17
  import {
@@ -78,15 +78,16 @@ export class ApiAIAssistant {
78
78
  * @param interactionId - interaction/conversation identifier
79
79
  * @param eventType - the type of event (e.g. 'CUSTOM_EVENT')
80
80
  * @param eventName - the name of the event (e.g. 'GET_TRANSCRIPTS')
81
- * @param action - action within eventDetails (e.g. 'START' or 'STOP')
81
+ * @param eventMetaData - event-specific fields to include in eventDetails.data
82
+ * @param languageCode - language code within eventDetails.data
83
+ * @param trackingId - tracking identifier within eventDetails.data
82
84
  */
83
85
  public async sendEvent(
84
86
  agentId: string,
85
87
  interactionId: string,
86
88
  eventType: AIAssistantEventType,
87
89
  eventName: AIAssistantEventName,
88
- action?: TranscriptAction,
89
- context?: string,
90
+ eventMetaData?: Record<string, unknown>,
90
91
  languageCode?: string,
91
92
  trackingId?: string
92
93
  ): Promise<Record<string, unknown>> {
@@ -94,7 +95,7 @@ export class ApiAIAssistant {
94
95
  module: CC_FILE,
95
96
  method: METHODS.SEND_EVENT,
96
97
  interactionId,
97
- data: {eventType, eventName, action, context},
98
+ data: {eventType, eventName, eventMetaData},
98
99
  });
99
100
  this.metricsManager.timeEvent([
100
101
  METRIC_EVENT_NAMES.AI_ASSISTANT_SEND_EVENT_SUCCESS,
@@ -115,9 +116,8 @@ export class ApiAIAssistant {
115
116
  eventName,
116
117
  eventDetails: {
117
118
  data: {
119
+ ...eventMetaData,
118
120
  interactionId,
119
- action,
120
- context,
121
121
  actionTimeStamp: String(Date.now()),
122
122
  languageCode,
123
123
  trackingId,
@@ -128,7 +128,7 @@ export class ApiAIAssistant {
128
128
 
129
129
  this.metricsManager.trackEvent(
130
130
  METRIC_EVENT_NAMES.AI_ASSISTANT_SEND_EVENT_SUCCESS,
131
- {agentId, orgId, interactionId, eventType, eventName, action},
131
+ {agentId, orgId, interactionId, eventType, eventName},
132
132
  ['operational']
133
133
  );
134
134
 
@@ -140,7 +140,6 @@ export class ApiAIAssistant {
140
140
  interactionId,
141
141
  eventType,
142
142
  eventName,
143
- action,
144
143
  error: error instanceof Error ? error.message : String(error),
145
144
  },
146
145
  ['operational']
@@ -152,13 +151,13 @@ export class ApiAIAssistant {
152
151
  }
153
152
 
154
153
  /**
155
- * Requests a suggested response for an interaction.
154
+ * Requests real-time assistance for an interaction.
156
155
  *
157
- * @param params - Suggestion request parameters
156
+ * @param params - Real-time assistance request parameters
158
157
  * @returns HTTP response body from the AI Assistant event API
159
158
  * @public
160
159
  */
161
- public async getSuggestedResponse(params: SuggestedResponseParams): Promise<any> {
160
+ public async getRealTimeAssistance(params: RealTimeAssistanceParams) {
162
161
  const {agentId, interactionId, context} = params;
163
162
  const trimmedContext = context?.trim();
164
163
  const languageCode = params.languageCode ?? 'en';
@@ -169,24 +168,24 @@ export class ApiAIAssistant {
169
168
 
170
169
  const loggerContext = {
171
170
  module: CC_FILE,
172
- method: METHODS.GET_SUGGESTED_RESPONSE,
171
+ method: METHODS.GET_REAL_TIME_ASSISTANCE,
173
172
  interactionId,
174
173
  trackingId,
175
174
  data: {eventName},
176
175
  };
177
176
 
178
- LoggerProxy.info('Requesting suggested response', loggerContext);
177
+ LoggerProxy.info('Requesting real-time assistance', loggerContext);
179
178
 
180
179
  this.metricsManager.timeEvent([
181
- METRIC_EVENT_NAMES.AI_ASSISTANT_GET_SUGGESTED_RESPONSE_SUCCESS,
182
- METRIC_EVENT_NAMES.AI_ASSISTANT_GET_SUGGESTED_RESPONSE_FAILED,
180
+ METRIC_EVENT_NAMES.AI_ASSISTANT_GET_REAL_TIME_ASSISTANCE_SUCCESS,
181
+ METRIC_EVENT_NAMES.AI_ASSISTANT_GET_REAL_TIME_ASSISTANCE_FAILED,
183
182
  ]);
184
183
 
185
184
  try {
186
185
  if (!this.aiFeature?.suggestedResponses?.enable) {
187
186
  const {error: detailedError} = getErrorDetails(
188
187
  new Error('SUGGESTED_RESPONSES_NOT_ENABLED'),
189
- METHODS.GET_SUGGESTED_RESPONSE,
188
+ METHODS.GET_REAL_TIME_ASSISTANCE,
190
189
  CC_FILE
191
190
  );
192
191
  throw detailedError;
@@ -199,14 +198,13 @@ export class ApiAIAssistant {
199
198
  interactionId,
200
199
  AIAssistantEventType.CUSTOM_EVENT,
201
200
  eventName,
202
- undefined,
203
- trimmedContext,
201
+ trimmedContext !== undefined ? {context: trimmedContext} : undefined,
204
202
  languageCode,
205
203
  trackingId
206
204
  );
207
205
 
208
206
  this.metricsManager.trackEvent(
209
- METRIC_EVENT_NAMES.AI_ASSISTANT_GET_SUGGESTED_RESPONSE_SUCCESS,
207
+ METRIC_EVENT_NAMES.AI_ASSISTANT_GET_REAL_TIME_ASSISTANCE_SUCCESS,
210
208
  {
211
209
  agentId,
212
210
  orgId,
@@ -217,13 +215,13 @@ export class ApiAIAssistant {
217
215
  },
218
216
  ['operational']
219
217
  );
220
- LoggerProxy.log('Suggested response request succeeded', loggerContext);
218
+ LoggerProxy.log('Real-time assistance request succeeded', loggerContext);
221
219
 
222
220
  return response;
223
221
  } catch (error) {
224
- LoggerProxy.error('Suggested response request failed', {...loggerContext, error});
222
+ LoggerProxy.error('Real-time assistance request failed', {...loggerContext, error});
225
223
  this.metricsManager.trackEvent(
226
- METRIC_EVENT_NAMES.AI_ASSISTANT_GET_SUGGESTED_RESPONSE_FAILED,
224
+ METRIC_EVENT_NAMES.AI_ASSISTANT_GET_REAL_TIME_ASSISTANCE_FAILED,
227
225
  {
228
226
  agentId,
229
227
  interactionId,
@@ -236,7 +234,103 @@ export class ApiAIAssistant {
236
234
 
237
235
  const {error: detailedError} = getErrorDetails(
238
236
  error,
239
- METHODS.GET_SUGGESTED_RESPONSE,
237
+ METHODS.GET_REAL_TIME_ASSISTANCE,
238
+ CC_FILE
239
+ );
240
+ throw detailedError;
241
+ }
242
+ }
243
+
244
+ /**
245
+ * Sends user action feedback for a real-time assistance adaptive card.
246
+ *
247
+ * @param params - Real-time assistance user action parameters
248
+ * @returns HTTP response body from the AI Assistant event API
249
+ * @public
250
+ */
251
+ public async sendRealTimeAssistanceUserAction(
252
+ params: RealTimeAssistanceUserActionParams
253
+ ): Promise<Record<string, unknown>> {
254
+ const {agentId, interactionId, adaptiveCardId, actionId} = params;
255
+ const actionType = 'Action.Submit';
256
+ const languageCode = params.languageCode ?? 'en';
257
+ const trackingId = `WX_CC_SDK_${uuidv4()}`;
258
+
259
+ const loggerContext = {
260
+ module: CC_FILE,
261
+ method: METHODS.SEND_REAL_TIME_ASSISTANCE_USER_ACTION,
262
+ interactionId,
263
+ trackingId,
264
+ data: {actionId, adaptiveCardId},
265
+ };
266
+
267
+ LoggerProxy.info('Sending real-time assistance user action', loggerContext);
268
+
269
+ this.metricsManager.timeEvent([
270
+ METRIC_EVENT_NAMES.AI_ASSISTANT_SEND_REAL_TIME_ASSISTANCE_USER_ACTION_SUCCESS,
271
+ METRIC_EVENT_NAMES.AI_ASSISTANT_SEND_REAL_TIME_ASSISTANCE_USER_ACTION_FAILED,
272
+ ]);
273
+
274
+ try {
275
+ if (!this.aiFeature?.suggestedResponses?.enable) {
276
+ const {error: detailedError} = getErrorDetails(
277
+ new Error('SUGGESTED_RESPONSES_NOT_ENABLED'),
278
+ METHODS.SEND_REAL_TIME_ASSISTANCE_USER_ACTION,
279
+ CC_FILE
280
+ );
281
+ throw detailedError;
282
+ }
283
+
284
+ const orgId = this.webex.credentials.getOrgId();
285
+ const response = await this.sendEvent(
286
+ agentId,
287
+ interactionId,
288
+ AIAssistantEventType.CUSTOM_EVENT,
289
+ AIAssistantEventName.SUGGESTED_RESPONSES_USER_ACTION,
290
+ {
291
+ adaptiveCardId,
292
+ userAction: {
293
+ actionType,
294
+ actionId,
295
+ },
296
+ },
297
+ languageCode,
298
+ trackingId
299
+ );
300
+
301
+ this.metricsManager.trackEvent(
302
+ METRIC_EVENT_NAMES.AI_ASSISTANT_SEND_REAL_TIME_ASSISTANCE_USER_ACTION_SUCCESS,
303
+ {
304
+ agentId,
305
+ orgId,
306
+ interactionId,
307
+ adaptiveCardId,
308
+ actionId,
309
+ trackingId,
310
+ },
311
+ ['operational']
312
+ );
313
+ LoggerProxy.log('Real-time assistance user action sent', loggerContext);
314
+
315
+ return response;
316
+ } catch (error) {
317
+ LoggerProxy.error('Real-time assistance user action failed', {...loggerContext, error});
318
+ this.metricsManager.trackEvent(
319
+ METRIC_EVENT_NAMES.AI_ASSISTANT_SEND_REAL_TIME_ASSISTANCE_USER_ACTION_FAILED,
320
+ {
321
+ agentId,
322
+ interactionId,
323
+ adaptiveCardId,
324
+ actionId,
325
+ trackingId,
326
+ error: error instanceof Error ? error.message : String(error),
327
+ },
328
+ ['operational']
329
+ );
330
+
331
+ const {error: detailedError} = getErrorDetails(
332
+ error,
333
+ METHODS.SEND_REAL_TIME_ASSISTANCE_USER_ACTION,
240
334
  CC_FILE
241
335
  );
242
336
  throw detailedError;
@@ -936,7 +936,7 @@ export default class TaskManager extends EventEmitter {
936
936
  interactionId,
937
937
  AIAssistantEventType.CUSTOM_EVENT,
938
938
  AIAssistantEventName.GET_TRANSCRIPTS,
939
- action
939
+ {action}
940
940
  )
941
941
  .catch((error) => {
942
942
  LoggerProxy.error(`Failed to send transcript ${action} event`, {
package/src/types.ts CHANGED
@@ -859,23 +859,65 @@ export type UpdateDeviceTypeResponse = Agent.DeviceTypeUpdateSuccess | Error;
859
859
  export type TranscriptAction = 'START' | 'STOP';
860
860
 
861
861
  /**
862
- * Parameters used to request an AI Assistant suggested response.
862
+ * Parameters used to request AI Assistant real-time assistance.
863
863
  * @public
864
864
  * @example
865
- * const params: SuggestedResponseParams = {
865
+ * const params: RealTimeAssistanceParams = {
866
866
  * interactionId: 'interaction-123',
867
- * actionTimeStamp: Date.now(),
868
867
  * context: 'Need help with credit card payment due date',
869
868
  * };
870
869
  */
871
- export type SuggestedResponseParams = {
870
+ export type RealTimeAssistanceParams = {
872
871
  /** Agent identifier */
873
872
  agentId: string;
874
- /** Interaction identifier for which suggestion should be generated */
873
+ /** Interaction identifier for which assistance should be generated */
875
874
  interactionId: string;
876
- /** Optional additional context that should refine the suggestion */
875
+ /** Optional additional context that should refine the assistance */
877
876
  context?: string;
878
- /** Optional language code for suggestions (for example, 'en'). Defaults to 'en'. */
877
+ /** Optional language code for assistance (for example, 'en'). Defaults to 'en'. */
878
+ languageCode?: string;
879
+ };
880
+
881
+ /**
882
+ * Supported user actions on an AI Assistant real-time assistance adaptive card.
883
+ * @public
884
+ */
885
+ export const RealTimeAssistanceUserActionId = {
886
+ /** User liked the real-time assistance response */
887
+ LIKE: 'likeButton',
888
+ /** User disliked the real-time assistance response */
889
+ DISLIKE: 'dislikeButton',
890
+ /** User copied the real-time assistance response */
891
+ COPY: 'copyButton',
892
+ } as const;
893
+
894
+ /**
895
+ * Union type of supported real-time assistance user actions.
896
+ * @public
897
+ */
898
+ export type RealTimeAssistanceUserActionId = Enum<typeof RealTimeAssistanceUserActionId>;
899
+
900
+ /**
901
+ * Parameters used to send user action feedback for a real-time assistance adaptive card.
902
+ * @public
903
+ * @example
904
+ * const params: RealTimeAssistanceUserActionParams = {
905
+ * agentId: 'agent-123',
906
+ * interactionId: 'interaction-123',
907
+ * adaptiveCardId: 'adaptive-card-123',
908
+ * actionId: RealTimeAssistanceUserActionId.LIKE,
909
+ * };
910
+ */
911
+ export type RealTimeAssistanceUserActionParams = {
912
+ /** Agent identifier */
913
+ agentId: string;
914
+ /** Interaction identifier associated with the real-time assistance response */
915
+ interactionId: string;
916
+ /** Adaptive card identifier from the real-time assistance payload */
917
+ adaptiveCardId: string;
918
+ /** User action performed on the adaptive card */
919
+ actionId: RealTimeAssistanceUserActionId;
920
+ /** Optional language code. Defaults to 'en'. */
879
921
  languageCode?: string;
880
922
  };
881
923
 
@@ -926,6 +968,8 @@ export const AIAssistantEventName = {
926
968
  POST_CALL_SUMMARY_RESPONSE: 'POST_CALL_SUMMARY_RESPONSE',
927
969
  /** Suggested digital response event */
928
970
  SUGGESTED_RESPONSES_DIGITAL: 'SUGGESTED_RESPONSES_DIGITAL',
971
+ /** User action on a suggested response adaptive card */
972
+ SUGGESTED_RESPONSES_USER_ACTION: 'SUGGESTED_RESPONSES_USER_ACTION',
929
973
  } as const;
930
974
 
931
975
  /**
@@ -112,7 +112,7 @@ describe('webex.cc', () => {
112
112
 
113
113
  mockApiAIAssistant = {
114
114
  sendEvent: jest.fn(),
115
- getSuggestedResponse: jest.fn(),
115
+ getRealTimeAssistance: jest.fn(),
116
116
  fetchHistoricTranscripts: jest.fn(),
117
117
  setAIFeatureFlags: jest.fn(),
118
118
  setAgentId: jest.fn(),