@webex/calling 3.12.0-webex-services-ready.4 → 3.13.0
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/CallRecording/WxcCallRecordingConnector.js +345 -174
- package/dist/CallRecording/WxcCallRecordingConnector.js.map +1 -1
- package/dist/CallRecording/WxcCallRecordingConnector.test.js +354 -182
- package/dist/CallRecording/WxcCallRecordingConnector.test.js.map +1 -1
- package/dist/CallRecording/callRecordingFixtures.js +40 -9
- package/dist/CallRecording/callRecordingFixtures.js.map +1 -1
- package/dist/CallRecording/constants.js +12 -27
- package/dist/CallRecording/constants.js.map +1 -1
- package/dist/CallRecording/types.js +21 -16
- package/dist/CallRecording/types.js.map +1 -1
- package/dist/CallRecording/userhub.js +117 -0
- package/dist/CallRecording/userhub.js.map +1 -0
- package/dist/CallRecording/utils.js +3 -3
- package/dist/CallRecording/utils.js.map +1 -1
- package/dist/CallingClient/CallingClient.js +19 -13
- package/dist/CallingClient/CallingClient.js.map +1 -1
- package/dist/CallingClient/CallingClient.test.js +383 -185
- package/dist/CallingClient/CallingClient.test.js.map +1 -1
- package/dist/CallingClient/calling/CallerId/index.js +3 -1
- package/dist/CallingClient/calling/CallerId/index.js.map +1 -1
- package/dist/CallingClient/calling/CallerId/index.test.js +12 -2
- package/dist/CallingClient/calling/CallerId/index.test.js.map +1 -1
- package/dist/CallingClient/calling/call.js +15 -8
- package/dist/CallingClient/calling/call.js.map +1 -1
- package/dist/CallingClient/calling/call.test.js +617 -527
- package/dist/CallingClient/calling/call.test.js.map +1 -1
- package/dist/CallingClient/constants.js +5 -2
- package/dist/CallingClient/constants.js.map +1 -1
- package/dist/CallingClient/line/index.js +23 -2
- package/dist/CallingClient/line/index.js.map +1 -1
- package/dist/CallingClient/line/line.test.js +87 -17
- package/dist/CallingClient/line/line.test.js.map +1 -1
- package/dist/CallingClient/registration/register.js +559 -411
- package/dist/CallingClient/registration/register.js.map +1 -1
- package/dist/CallingClient/registration/register.test.js +646 -83
- package/dist/CallingClient/registration/register.test.js.map +1 -1
- package/dist/CallingClient/registration/types.js +26 -0
- package/dist/CallingClient/registration/types.js.map +1 -1
- package/dist/CallingClient/types.js.map +1 -1
- package/dist/Errors/types.js +2 -0
- package/dist/Errors/types.js.map +1 -1
- package/dist/Events/types.js.map +1 -1
- package/dist/SDKConnector/types.js.map +1 -1
- package/dist/common/Utils.js +124 -105
- package/dist/common/Utils.js.map +1 -1
- package/dist/common/Utils.test.js +346 -243
- package/dist/common/Utils.test.js.map +1 -1
- package/dist/common/callUtils.js +187 -0
- package/dist/common/callUtils.js.map +1 -0
- package/dist/common/callUtils.test.js +313 -0
- package/dist/common/callUtils.test.js.map +1 -0
- package/dist/common/constants.js +27 -1
- package/dist/common/constants.js.map +1 -1
- package/dist/common/index.js +11 -0
- package/dist/common/index.js.map +1 -1
- package/dist/common/testUtil.js +2 -1
- package/dist/common/testUtil.js.map +1 -1
- package/dist/mobius-socket/mobius-socket-events.test.js +1 -0
- package/dist/mobius-socket/mobius-socket-events.test.js.map +1 -1
- package/dist/mobius-socket/mobius-socket.test.js +12 -12
- package/dist/mobius-socket/mobius-socket.test.js.map +1 -1
- package/dist/mobius-socket/socket/socket-base.js +10 -0
- package/dist/mobius-socket/socket/socket-base.js.map +1 -1
- package/dist/mobius-socket/socket.test.js +34 -14
- package/dist/mobius-socket/socket.test.js.map +1 -1
- package/dist/module/CallRecording/WxcCallRecordingConnector.js +155 -63
- package/dist/module/CallRecording/callRecordingFixtures.js +38 -8
- package/dist/module/CallRecording/constants.js +11 -12
- package/dist/module/CallRecording/userhub.js +100 -0
- package/dist/module/CallingClient/CallingClient.js +12 -11
- package/dist/module/CallingClient/calling/CallerId/index.js +2 -2
- package/dist/module/CallingClient/calling/call.js +10 -3
- package/dist/module/CallingClient/constants.js +3 -0
- package/dist/module/CallingClient/line/index.js +9 -1
- package/dist/module/CallingClient/registration/register.js +69 -16
- package/dist/module/CallingClient/registration/types.js +5 -1
- package/dist/module/Errors/types.js +2 -0
- package/dist/module/common/Utils.js +43 -43
- package/dist/module/common/callUtils.js +90 -0
- package/dist/module/common/constants.js +11 -0
- package/dist/module/common/index.js +1 -0
- package/dist/module/common/testUtil.js +1 -0
- package/dist/module/mobius-socket/socket/socket-base.js +8 -0
- package/dist/types/CallRecording/WxcCallRecordingConnector.d.ts +6 -2
- package/dist/types/CallRecording/WxcCallRecordingConnector.d.ts.map +1 -1
- package/dist/types/CallRecording/callRecordingFixtures.d.ts +95 -4
- package/dist/types/CallRecording/callRecordingFixtures.d.ts.map +1 -1
- package/dist/types/CallRecording/constants.d.ts +11 -12
- package/dist/types/CallRecording/constants.d.ts.map +1 -1
- package/dist/types/CallRecording/types.d.ts +11 -3
- package/dist/types/CallRecording/types.d.ts.map +1 -1
- package/dist/types/CallRecording/userhub.d.ts +44 -0
- package/dist/types/CallRecording/userhub.d.ts.map +1 -0
- package/dist/types/CallingClient/CallingClient.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/CallerId/index.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/call.d.ts.map +1 -1
- package/dist/types/CallingClient/constants.d.ts +3 -0
- package/dist/types/CallingClient/constants.d.ts.map +1 -1
- package/dist/types/CallingClient/line/index.d.ts +2 -1
- package/dist/types/CallingClient/line/index.d.ts.map +1 -1
- package/dist/types/CallingClient/registration/register.d.ts +3 -1
- package/dist/types/CallingClient/registration/register.d.ts.map +1 -1
- package/dist/types/CallingClient/registration/types.d.ts +22 -0
- package/dist/types/CallingClient/registration/types.d.ts.map +1 -1
- package/dist/types/CallingClient/types.d.ts +2 -0
- package/dist/types/CallingClient/types.d.ts.map +1 -1
- package/dist/types/Errors/types.d.ts +2 -0
- package/dist/types/Errors/types.d.ts.map +1 -1
- package/dist/types/Events/types.d.ts +1 -1
- package/dist/types/Events/types.d.ts.map +1 -1
- package/dist/types/SDKConnector/types.d.ts +1 -0
- package/dist/types/SDKConnector/types.d.ts.map +1 -1
- package/dist/types/common/Utils.d.ts +4 -6
- package/dist/types/common/Utils.d.ts.map +1 -1
- package/dist/types/common/callUtils.d.ts +6 -0
- package/dist/types/common/callUtils.d.ts.map +1 -0
- package/dist/types/common/constants.d.ts +6 -0
- package/dist/types/common/constants.d.ts.map +1 -1
- package/dist/types/common/index.d.ts +1 -0
- package/dist/types/common/index.d.ts.map +1 -1
- package/dist/types/common/testUtil.d.ts +1 -0
- package/dist/types/common/testUtil.d.ts.map +1 -1
- package/dist/types/mobius-socket/socket/socket-base.d.ts.map +1 -1
- package/package.json +12 -11
|
@@ -4,4 +4,30 @@ var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/defi
|
|
|
4
4
|
_Object$defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
+
exports.HARD_STOP_REASON = void 0;
|
|
8
|
+
/**
|
|
9
|
+
* Reason a registration is torn down without any re-registration attempt.
|
|
10
|
+
* The values double as the label used in hard-stop log messages.
|
|
11
|
+
*/
|
|
12
|
+
var HARD_STOP_REASON = exports.HARD_STOP_REASON = /*#__PURE__*/function (HARD_STOP_REASON) {
|
|
13
|
+
HARD_STOP_REASON["REGISTRATION_DOWN"] = "registration-down";
|
|
14
|
+
HARD_STOP_REASON["SESSION_SUPERSEDED"] = "session-superseded";
|
|
15
|
+
return HARD_STOP_REASON;
|
|
16
|
+
}({});
|
|
17
|
+
/**
|
|
18
|
+
* Describes a hard stop of the registration. A superseded session must carry the
|
|
19
|
+
* {@link LineError} that is handed to the SDK consumer as the reason on
|
|
20
|
+
* `LINE_EVENTS.UNREGISTERED`; a registration-down stop carries no reason.
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* Specialized handlers a caller of `handleRegistrationErrors` opts into. A flow only
|
|
24
|
+
* passes the handlers for the status codes it can act on, which is what keeps handling
|
|
25
|
+
* such as the `409` session-superseded hard stop scoped to the keepalive flow.
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* Outcome of `handleRegistrationErrors`.
|
|
29
|
+
*/
|
|
30
|
+
/**
|
|
31
|
+
* Represents an interface for managing registration-related operations.
|
|
32
|
+
*/
|
|
7
33
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import {Devices, IDeviceInfo, RegistrationStatus} from '../../common/types';\nimport {MobiusAsyncEvent} from '../calling/types';\n\nexport type Header = {\n [key: string]: string;\n};\n\nexport type restoreRegistrationCallBack = (\n restoreData: IDeviceInfo,\n caller: string\n) => Promise<boolean>;\n\nexport type retry429CallBack = (retryAfter: number, caller: string) => Promise<void>;\n\nexport type FailoverCacheState = {\n attempt: number;\n timeElapsed: number;\n retryScheduledTime: number;\n serverType: 'primary' | 'backup';\n};\n\n/**\n * Represents an interface for managing registration-related operations.\n */\nexport interface IRegistration {\n /**\n * Sets the primary and backup Mobius server URLs.\n *\n * @param primaryMobiusUris - An array of primary Mobius server URLs.\n * @param backupMobiusUris - An array of backup Mobius server URLs.\n */\n setMobiusServers(primaryMobiusUris: string[], backupMobiusUris: string[]): void;\n\n /**\n * Triggers the registration process with the given list of servers\n * Registration is attempted with primary and backup until it succeeds or the list is exhausted\n */\n triggerRegistration(): Promise<void>;\n\n /**\n * Checks if the device is currently registered.\n *\n */\n isDeviceRegistered(): boolean;\n\n /**\n * Sets the status of the registration.\n *\n * @param value - The registration status to set.\n */\n setStatus(value: RegistrationStatus): void;\n\n /**\n * Retrieves the current registration status.\n *\n */\n getStatus(): RegistrationStatus;\n\n /**\n * Retrieves information about the device as {@link IDeviceInfo}.\n *\n */\n getDeviceInfo(): IDeviceInfo;\n\n /**\n * Clears the keep-alive timer used for registration.\n */\n clearKeepaliveTimer(): void;\n\n /**\n * Deregisters the device.\n */\n deregister(closeMobiusWss: boolean): void;\n\n /**\n * Sets the active Mobius server URL to use for registration.\n *\n * @param url - The Mobius server URL to set as active.\n */\n setActiveMobiusUrl(url: string): void;\n\n /**\n * Retrieves the active Mobius server URL.\n *\n */\n getActiveMobiusUrl(): string;\n\n /**\n * Attempts to reconnect after a connection failure.\n *\n * @param caller - The caller's identifier for reconnection.\n */\n reconnectOnFailure(caller: string): Promise<void>;\n\n /**\n * Checks if a reconnection attempt is pending.\n *\n */\n isReconnectPending(): boolean;\n\n /**\n * Restores the connection and attempts refreshing existing registration with server.\n * Allows retry if not restored in the first attempt.\n *\n * @param retry - Set to `true` to trigger a retry after restoration.\n */\n handleConnectionRestoration(retry: boolean): Promise<boolean>;\n\n /**\n * Populate deviceInfo from a devices response (e.g., getDevices API).\n */\n setDeviceInfo(body: Devices): void;\n\n /**\n * Handles a Mobius REGISTRATION_DOWN async event. Ends the first active\n * call (if any) and runs registration-side cleanup.\n *\n * @param event - The Mobius async event payload (optional).\n */\n handleRegistrationDownEvent(event?: MobiusAsyncEvent): Promise<void>;\n}\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["HARD_STOP_REASON","exports"],"sources":["types.ts"],"sourcesContent":["import {Devices, IDeviceInfo, RegistrationStatus} from '../../common/types';\nimport {LineError} from '../../Errors/catalog/LineError';\nimport {MobiusAsyncEvent} from '../calling/types';\n\nexport type Header = {\n [key: string]: string;\n};\n\n/**\n * Reason a registration is torn down without any re-registration attempt.\n * The values double as the label used in hard-stop log messages.\n */\nexport enum HARD_STOP_REASON {\n REGISTRATION_DOWN = 'registration-down',\n SESSION_SUPERSEDED = 'session-superseded',\n}\n\n/**\n * Describes a hard stop of the registration. A superseded session must carry the\n * {@link LineError} that is handed to the SDK consumer as the reason on\n * `LINE_EVENTS.UNREGISTERED`; a registration-down stop carries no reason.\n */\nexport type HardStop =\n | {reason: HARD_STOP_REASON.REGISTRATION_DOWN; error?: undefined}\n | {reason: HARD_STOP_REASON.SESSION_SUPERSEDED; error: LineError};\n\nexport type restoreRegistrationCallBack = (\n restoreData: IDeviceInfo,\n caller: string\n) => Promise<boolean>;\n\nexport type retry429CallBack = (retryAfter: number, caller: string) => Promise<void>;\n\nexport type sessionSupersededCallBack = (clientError: LineError) => Promise<void>;\n\n/**\n * Specialized handlers a caller of `handleRegistrationErrors` opts into. A flow only\n * passes the handlers for the status codes it can act on, which is what keeps handling\n * such as the `409` session-superseded hard stop scoped to the keepalive flow.\n */\nexport type RegistrationErrorHandlers = {\n /** Invoked on `429` so the caller can reschedule its own flow after `Retry-After`. */\n retry429Cb?: retry429CallBack;\n /** Invoked on `403` device-limit so the caller can restore the existing registration. */\n restoreRegCb?: restoreRegistrationCallBack;\n /** Invoked on `409` so the caller can hard stop a superseded calling session. */\n sessionSupersededCb?: sessionSupersededCallBack;\n};\n\n/**\n * Outcome of `handleRegistrationErrors`.\n */\nexport type RegistrationErrorResult = {\n /** The error is terminal — the caller must not retry. */\n finalError: boolean;\n /** The Mobius WebSocket of the failed server must be torn down before moving on. */\n shouldDisconnect: boolean;\n};\n\nexport type FailoverCacheState = {\n attempt: number;\n timeElapsed: number;\n retryScheduledTime: number;\n serverType: 'primary' | 'backup';\n};\n\n/**\n * Represents an interface for managing registration-related operations.\n */\nexport interface IRegistration {\n /**\n * Sets the primary and backup Mobius server URLs.\n *\n * @param primaryMobiusUris - An array of primary Mobius server URLs.\n * @param backupMobiusUris - An array of backup Mobius server URLs.\n */\n setMobiusServers(primaryMobiusUris: string[], backupMobiusUris: string[]): void;\n\n /**\n * Triggers the registration process with the given list of servers\n * Registration is attempted with primary and backup until it succeeds or the list is exhausted\n */\n triggerRegistration(): Promise<void>;\n\n /**\n * Checks if the device is currently registered.\n *\n */\n isDeviceRegistered(): boolean;\n\n /**\n * Sets the status of the registration.\n *\n * @param value - The registration status to set.\n */\n setStatus(value: RegistrationStatus): void;\n\n /**\n * Retrieves the current registration status.\n *\n */\n getStatus(): RegistrationStatus;\n\n /**\n * Retrieves information about the device as {@link IDeviceInfo}.\n *\n */\n getDeviceInfo(): IDeviceInfo;\n\n /**\n * Clears the keep-alive timer used for registration.\n */\n clearKeepaliveTimer(): void;\n\n /**\n * Deregisters the device.\n */\n deregister(closeMobiusWss: boolean): void;\n\n /**\n * Sets the active Mobius server URL to use for registration.\n *\n * @param url - The Mobius server URL to set as active.\n */\n setActiveMobiusUrl(url: string): void;\n\n /**\n * Retrieves the active Mobius server URL.\n *\n */\n getActiveMobiusUrl(): string;\n\n /**\n * Attempts to reconnect after a connection failure.\n *\n * @param caller - The caller's identifier for reconnection.\n */\n reconnectOnFailure(caller: string): Promise<void>;\n\n /**\n * Checks if a reconnection attempt is pending.\n *\n */\n isReconnectPending(): boolean;\n\n /**\n * Restores the connection and attempts refreshing existing registration with server.\n * Allows retry if not restored in the first attempt.\n *\n * @param retry - Set to `true` to trigger a retry after restoration.\n */\n handleConnectionRestoration(retry: boolean): Promise<boolean>;\n\n /**\n * Populate deviceInfo from a devices response (e.g., getDevices API).\n */\n setDeviceInfo(body: Devices): void;\n\n /**\n * Handles a Mobius REGISTRATION_DOWN async event. Ends the first active\n * call (if any) and runs registration-side cleanup.\n *\n * @param event - The Mobius async event payload (optional).\n */\n handleRegistrationDownEvent(event?: MobiusAsyncEvent): Promise<void>;\n}\n"],"mappings":";;;;;;;AAQA;AACA;AACA;AACA;AAHA,IAIYA,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,0BAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;AAK5B;AACA;AACA;AACA;AACA;AAcA;AACA;AACA;AACA;AACA;AAUA;AACA;AACA;AAeA;AACA;AACA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_types","require"],"sources":["types.ts"],"sourcesContent":["import * as Media from '@webex/internal-media-core';\nimport {LOGGER} from '../Logger/types';\nimport {ISDKConnector} from '../SDKConnector/types';\nimport {Eventing} from '../Events/impl';\nimport {CallingClientEventTypes} from '../Events/types';\nimport {DeviceType, ServiceData} from '../common/types';\nimport {ICall, IceGatheringConfig} from './calling/types';\nimport {CallingClientError} from '../Errors';\nimport {ILine} from './line/types';\n\nexport interface LoggerConfig {\n level: LOGGER;\n}\n\ninterface DiscoveryConfig {\n country: string;\n region: string;\n}\n\nexport {IceGatheringConfig};\n\nexport interface CallingClientConfig {\n logger?: LoggerConfig;\n discovery?: DiscoveryConfig;\n serviceData?: ServiceData;\n jwe?: string;\n\n /**\n * Optional configuration to tune ICE candidate gathering during media negotiation.\n */\n iceGathering?: IceGatheringConfig;\n}\n\nexport type CallingClientErrorEmitterCallback = (\n err: CallingClientError,\n finalError?: boolean\n) => void;\n\n/**\n * An interface for the `CallingClient` module.\n * The `CallingClient` module is designed to provide a set of APIs related to line registration and calling functionalities within the SDK.\n *\n * @example\n * ```javascript\n * const callingClient = createClient(webex, callingConfig);\n * ```\n */\nexport interface ICallingClient extends Eventing<CallingClientEventTypes> {\n /**\n * Represents the `mediaEngine for managing media-related operations within the CallingClient.\n * The media engine provides access to audio and video devices such as cameras, microphones, and speakers within the media layer.\n *\n * @public\n * @example\n * ```\n * const microphones = await callingClient.mediaEngine.Media.getMicrophones();\n * const speakers = await callingClient.mediaEngine.Media.getSpeakers();\n * const cameras = await callingClient.mediaEngine.Media.getCameras();\n * ```\n */\n mediaEngine: typeof Media;\n\n /**\n * @ignore\n */\n getSDKConnector(): ISDKConnector;\n\n /**\n * @ignore\n */\n getLoggingLevel(): LOGGER;\n\n /**\n * Retrieves details of the line object(s) belonging to a user.\n *\n * This method gathers all the {@link ILine} objects and organizes them into a dictionary\n * where keys represent `lineId`s and values are arrays of {@link ILine} objects registered with\n * the `callingClient`\n *\n * @example\n * ```typescript\n * const lines = callingClient.getLines();\n * ```\n * The `lines` response object will have `lineId` as its key and\n * a list {@link ILine} objects as it's value.\n * ```\n * {\n * 'lineId1': lineObj1,\n * 'lineId2': lineObj2,\n * }\n * ```\n */\n getLines(): Record<string, ILine>;\n\n /**\n * Retrieves the list of devices registered for the given userId from Mobius.\n * @param userId - The user identifier whose devices should be fetched.\n * @returns List of devices associated with the user.\n */\n getDevices(userId?: string): Promise<DeviceType[]>;\n\n /**\n * Retrieves a dictionary of active calls grouped by `lineId`.\n *\n * This method gathers active {@link ICall} objects and organizes them into a dictionary\n * where keys represent `lineId`s and values are arrays of {@link ICall} objects of active calls associated\n * with each line.\n *\n * @example\n * ```typescript\n * const activeCalls = callingClient.getActiveCalls();\n * ```\n * The `activeCalls` response object will have `lineId` as its key and\n * a list {@link ICall} objects as it's value.\n *\n * ```\n * {\n * 'line1': [call1, call2],\n * 'line2': [call3],\n * }\n * ```\n */\n getActiveCalls(): Record<string, ICall[]>;\n\n /**\n * Retrieves the {@link ICall} object for the currently connected call in the client.\n *\n * This method iterates through active call objects and returns the call\n * that is currently connected (not on hold).\n *\n * @example\n * ```typescript\n * const connectedCall : ICall = callingClient.getConnectedCall();\n * ```\n * The `connectedCall` object will be the Call object of the connected call with the client\n */\n getConnectedCall(): ICall | undefined;\n\n /**\n * Indicates whether the Mobius WebSocket transport is currently connected.\n *\n * The `callingClient:mobius_socket_connected` event is emitted during client\n * initialization, so consumers that subscribe afterwards may miss it. This method\n * lets them reconcile the current connection state right after subscribing. Returns\n * `false` when the WebSocket transport is not in use.\n *\n * @example\n * ```typescript\n * callingClient.on(CALLING_CLIENT_EVENT_KEYS.MOBIUS_SOCKET_CONNECTED, onConnected);\n * if (callingClient.isMobiusSocketConnected()) {\n * onConnected();\n * }\n * ```\n */\n isMobiusSocketConnected(): boolean;\n}\n"],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"names":["_types","require"],"sources":["types.ts"],"sourcesContent":["import * as Media from '@webex/internal-media-core';\nimport {LocalMicrophoneStream} from '@webex/internal-media-core';\nimport {LOGGER} from '../Logger/types';\nimport {ISDKConnector} from '../SDKConnector/types';\nimport {Eventing} from '../Events/impl';\nimport {CallingClientEventTypes} from '../Events/types';\nimport {DeviceType, ServiceData} from '../common/types';\nimport {ICall, IceGatheringConfig} from './calling/types';\nimport {CallingClientError} from '../Errors';\nimport {ILine} from './line/types';\n\nexport interface LoggerConfig {\n level: LOGGER;\n}\n\ninterface DiscoveryConfig {\n country: string;\n region: string;\n}\n\nexport {IceGatheringConfig};\n\nexport interface CallingClientConfig {\n logger?: LoggerConfig;\n discovery?: DiscoveryConfig;\n serviceData?: ServiceData;\n jwe?: string;\n\n /**\n * Optional configuration to tune ICE candidate gathering during media negotiation.\n */\n iceGathering?: IceGatheringConfig;\n\n /**\n * Microphone stream to discover the host ip addresses of this client with during\n * initialization, which are then reported to Mobius on registration. Leave it out to skip that\n * discovery: without a stream the browser withholds the addresses, so there is nothing to\n * report.\n */\n localAudioStream?: LocalMicrophoneStream;\n}\n\nexport type CallingClientErrorEmitterCallback = (\n err: CallingClientError,\n finalError?: boolean\n) => void;\n\n/**\n * An interface for the `CallingClient` module.\n * The `CallingClient` module is designed to provide a set of APIs related to line registration and calling functionalities within the SDK.\n *\n * @example\n * ```javascript\n * const callingClient = createClient(webex, callingConfig);\n * ```\n */\nexport interface ICallingClient extends Eventing<CallingClientEventTypes> {\n /**\n * Represents the `mediaEngine for managing media-related operations within the CallingClient.\n * The media engine provides access to audio and video devices such as cameras, microphones, and speakers within the media layer.\n *\n * @public\n * @example\n * ```\n * const microphones = await callingClient.mediaEngine.Media.getMicrophones();\n * const speakers = await callingClient.mediaEngine.Media.getSpeakers();\n * const cameras = await callingClient.mediaEngine.Media.getCameras();\n * ```\n */\n mediaEngine: typeof Media;\n\n /**\n * @ignore\n */\n getSDKConnector(): ISDKConnector;\n\n /**\n * @ignore\n */\n getLoggingLevel(): LOGGER;\n\n /**\n * Retrieves details of the line object(s) belonging to a user.\n *\n * This method gathers all the {@link ILine} objects and organizes them into a dictionary\n * where keys represent `lineId`s and values are arrays of {@link ILine} objects registered with\n * the `callingClient`\n *\n * @example\n * ```typescript\n * const lines = callingClient.getLines();\n * ```\n * The `lines` response object will have `lineId` as its key and\n * a list {@link ILine} objects as it's value.\n * ```\n * {\n * 'lineId1': lineObj1,\n * 'lineId2': lineObj2,\n * }\n * ```\n */\n getLines(): Record<string, ILine>;\n\n /**\n * Retrieves the list of devices registered for the given userId from Mobius.\n * @param userId - The user identifier whose devices should be fetched.\n * @returns List of devices associated with the user.\n */\n getDevices(userId?: string): Promise<DeviceType[]>;\n\n /**\n * Retrieves a dictionary of active calls grouped by `lineId`.\n *\n * This method gathers active {@link ICall} objects and organizes them into a dictionary\n * where keys represent `lineId`s and values are arrays of {@link ICall} objects of active calls associated\n * with each line.\n *\n * @example\n * ```typescript\n * const activeCalls = callingClient.getActiveCalls();\n * ```\n * The `activeCalls` response object will have `lineId` as its key and\n * a list {@link ICall} objects as it's value.\n *\n * ```\n * {\n * 'line1': [call1, call2],\n * 'line2': [call3],\n * }\n * ```\n */\n getActiveCalls(): Record<string, ICall[]>;\n\n /**\n * Retrieves the {@link ICall} object for the currently connected call in the client.\n *\n * This method iterates through active call objects and returns the call\n * that is currently connected (not on hold).\n *\n * @example\n * ```typescript\n * const connectedCall : ICall = callingClient.getConnectedCall();\n * ```\n * The `connectedCall` object will be the Call object of the connected call with the client\n */\n getConnectedCall(): ICall | undefined;\n\n /**\n * Indicates whether the Mobius WebSocket transport is currently connected.\n *\n * The `callingClient:mobius_socket_connected` event is emitted during client\n * initialization, so consumers that subscribe afterwards may miss it. This method\n * lets them reconcile the current connection state right after subscribing. Returns\n * `false` when the WebSocket transport is not in use.\n *\n * @example\n * ```typescript\n * callingClient.on(CALLING_CLIENT_EVENT_KEYS.MOBIUS_SOCKET_CONNECTED, onConnected);\n * if (callingClient.isMobiusSocketConnected()) {\n * onConnected();\n * }\n * ```\n */\n isMobiusSocketConnected(): boolean;\n}\n"],"mappings":";;;;;;;;;;;;AAOA,IAAAA,MAAA,GAAAC,OAAA","ignoreList":[]}
|
package/dist/Errors/types.js
CHANGED
|
@@ -19,6 +19,7 @@ var ERROR_TYPE = exports.ERROR_TYPE = /*#__PURE__*/function (ERROR_TYPE) {
|
|
|
19
19
|
ERROR_TYPE["NOT_FOUND"] = "not_found";
|
|
20
20
|
ERROR_TYPE["REGISTRATION_ERROR"] = "registration_error";
|
|
21
21
|
ERROR_TYPE["SERVICE_UNAVAILABLE"] = "service_unavailable";
|
|
22
|
+
ERROR_TYPE["SESSION_SUPERSEDED"] = "session_superseded";
|
|
22
23
|
ERROR_TYPE["TIMEOUT"] = "timeout";
|
|
23
24
|
ERROR_TYPE["TOKEN_ERROR"] = "token_error";
|
|
24
25
|
ERROR_TYPE["TOO_MANY_REQUESTS"] = "too_many_requests";
|
|
@@ -29,6 +30,7 @@ var ERROR_CODE = exports.ERROR_CODE = /*#__PURE__*/function (ERROR_CODE) {
|
|
|
29
30
|
ERROR_CODE[ERROR_CODE["UNAUTHORIZED"] = 401] = "UNAUTHORIZED";
|
|
30
31
|
ERROR_CODE[ERROR_CODE["FORBIDDEN"] = 403] = "FORBIDDEN";
|
|
31
32
|
ERROR_CODE[ERROR_CODE["DEVICE_NOT_FOUND"] = 404] = "DEVICE_NOT_FOUND";
|
|
33
|
+
ERROR_CODE[ERROR_CODE["CONFLICT"] = 409] = "CONFLICT";
|
|
32
34
|
ERROR_CODE[ERROR_CODE["INTERNAL_SERVER_ERROR"] = 500] = "INTERNAL_SERVER_ERROR";
|
|
33
35
|
ERROR_CODE[ERROR_CODE["NOT_IMPLEMENTED"] = 501] = "NOT_IMPLEMENTED";
|
|
34
36
|
ERROR_CODE[ERROR_CODE["SERVICE_UNAVAILABLE"] = 503] = "SERVICE_UNAVAILABLE";
|
package/dist/Errors/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ERROR_LAYER","exports","ERROR_TYPE","ERROR_CODE","CALL_ERROR_CODE","DEVICE_ERROR_CODE"],"sources":["types.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-empty-interface */\nimport {CorrelationId, IMetaContext, RegistrationStatus} from '../common/types';\n\nexport type ErrorMessage = string;\n\nexport enum ERROR_LAYER {\n CALL_CONTROL = 'call_control',\n MEDIA = 'media',\n}\n\nexport enum ERROR_TYPE {\n CALL_ERROR = 'call_error',\n DEFAULT = 'default_error',\n BAD_REQUEST = 'bad_request',\n FORBIDDEN_ERROR = 'forbidden',\n NOT_FOUND = 'not_found',\n REGISTRATION_ERROR = 'registration_error',\n SERVICE_UNAVAILABLE = 'service_unavailable',\n TIMEOUT = 'timeout',\n TOKEN_ERROR = 'token_error',\n TOO_MANY_REQUESTS = 'too_many_requests',\n SERVER_ERROR = 'server_error',\n}\n\nexport enum ERROR_CODE {\n UNAUTHORIZED = 401,\n FORBIDDEN = 403,\n DEVICE_NOT_FOUND = 404,\n INTERNAL_SERVER_ERROR = 500,\n NOT_IMPLEMENTED = 501,\n SERVICE_UNAVAILABLE = 503,\n BAD_REQUEST = 400,\n REQUEST_TIMEOUT = 408,\n TOO_MANY_REQUESTS = 429,\n}\n\nexport enum CALL_ERROR_CODE {\n INVALID_STATUS_UPDATE = 111,\n DEVICE_NOT_REGISTERED = 112,\n CALL_NOT_FOUND = 113,\n ERROR_PROCESSING = 114,\n USER_BUSY = 115,\n PARSING_ERROR = 116,\n TIMEOUT_ERROR = 117,\n NOT_ACCEPTABLE = 118,\n CALL_REJECTED = 119,\n NOT_AVAILABLE = 120,\n}\n\nexport enum DEVICE_ERROR_CODE {\n DEVICE_LIMIT_EXCEEDED = 101,\n DEVICE_CREATION_DISABLED = 102,\n DEVICE_CREATION_FAILED = 103,\n}\n\nexport interface ErrorContext extends IMetaContext {}\n\nexport type ErrorObject = {\n message: ErrorMessage;\n type: ERROR_TYPE;\n context: ErrorContext;\n};\n\nexport interface LineErrorObject extends ErrorObject {\n status: RegistrationStatus;\n}\n\nexport interface CallErrorObject extends ErrorObject {\n correlationId: CorrelationId;\n errorLayer: ERROR_LAYER;\n}\n"],"mappings":";;;;;;;AAAA;AAAA,IAKYA,WAAW,GAAAC,OAAA,CAAAD,WAAA,0BAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA;AAAA,IAKXE,UAAU,GAAAD,OAAA,CAAAC,UAAA,0BAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA;AAAA,
|
|
1
|
+
{"version":3,"names":["ERROR_LAYER","exports","ERROR_TYPE","ERROR_CODE","CALL_ERROR_CODE","DEVICE_ERROR_CODE"],"sources":["types.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-empty-interface */\nimport {CorrelationId, IMetaContext, RegistrationStatus} from '../common/types';\n\nexport type ErrorMessage = string;\n\nexport enum ERROR_LAYER {\n CALL_CONTROL = 'call_control',\n MEDIA = 'media',\n}\n\nexport enum ERROR_TYPE {\n CALL_ERROR = 'call_error',\n DEFAULT = 'default_error',\n BAD_REQUEST = 'bad_request',\n FORBIDDEN_ERROR = 'forbidden',\n NOT_FOUND = 'not_found',\n REGISTRATION_ERROR = 'registration_error',\n SERVICE_UNAVAILABLE = 'service_unavailable',\n SESSION_SUPERSEDED = 'session_superseded',\n TIMEOUT = 'timeout',\n TOKEN_ERROR = 'token_error',\n TOO_MANY_REQUESTS = 'too_many_requests',\n SERVER_ERROR = 'server_error',\n}\n\nexport enum ERROR_CODE {\n UNAUTHORIZED = 401,\n FORBIDDEN = 403,\n DEVICE_NOT_FOUND = 404,\n CONFLICT = 409,\n INTERNAL_SERVER_ERROR = 500,\n NOT_IMPLEMENTED = 501,\n SERVICE_UNAVAILABLE = 503,\n BAD_REQUEST = 400,\n REQUEST_TIMEOUT = 408,\n TOO_MANY_REQUESTS = 429,\n}\n\nexport enum CALL_ERROR_CODE {\n INVALID_STATUS_UPDATE = 111,\n DEVICE_NOT_REGISTERED = 112,\n CALL_NOT_FOUND = 113,\n ERROR_PROCESSING = 114,\n USER_BUSY = 115,\n PARSING_ERROR = 116,\n TIMEOUT_ERROR = 117,\n NOT_ACCEPTABLE = 118,\n CALL_REJECTED = 119,\n NOT_AVAILABLE = 120,\n}\n\nexport enum DEVICE_ERROR_CODE {\n DEVICE_LIMIT_EXCEEDED = 101,\n DEVICE_CREATION_DISABLED = 102,\n DEVICE_CREATION_FAILED = 103,\n}\n\nexport interface ErrorContext extends IMetaContext {}\n\nexport type ErrorObject = {\n message: ErrorMessage;\n type: ERROR_TYPE;\n context: ErrorContext;\n};\n\nexport interface LineErrorObject extends ErrorObject {\n status: RegistrationStatus;\n}\n\nexport interface CallErrorObject extends ErrorObject {\n correlationId: CorrelationId;\n errorLayer: ERROR_LAYER;\n}\n"],"mappings":";;;;;;;AAAA;AAAA,IAKYA,WAAW,GAAAC,OAAA,CAAAD,WAAA,0BAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA;AAAA,IAKXE,UAAU,GAAAD,OAAA,CAAAC,UAAA,0BAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA;AAAA,IAeVC,UAAU,GAAAF,OAAA,CAAAE,UAAA,0BAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA;AAAA,IAaVC,eAAe,GAAAH,OAAA,CAAAG,eAAA,0BAAfA,eAAe;EAAfA,eAAe,CAAfA,eAAe;EAAfA,eAAe,CAAfA,eAAe;EAAfA,eAAe,CAAfA,eAAe;EAAfA,eAAe,CAAfA,eAAe;EAAfA,eAAe,CAAfA,eAAe;EAAfA,eAAe,CAAfA,eAAe;EAAfA,eAAe,CAAfA,eAAe;EAAfA,eAAe,CAAfA,eAAe;EAAfA,eAAe,CAAfA,eAAe;EAAfA,eAAe,CAAfA,eAAe;EAAA,OAAfA,eAAe;AAAA;AAAA,IAafC,iBAAiB,GAAAJ,OAAA,CAAAI,iBAAA,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA","ignoreList":[]}
|
package/dist/Events/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_types","require","_constants","COMMON_EVENT_KEYS","exports","LINE_EVENT_KEYS","CALLING_CLIENT_EVENT_KEYS","CALL_EVENT_KEYS","SUPPLEMENTARY_SERVICES","MOBIUS_MIDCALL_STATE","Disposition","SessionType","MOBIUS_EVENT_KEYS","MEDIA_CONNECTION_EVENT_KEYS","RECORDING_EVENT_TYPE","RECORDING_EVENT_SUBTYPE","CALL_STATE"],"sources":["types.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */ // TODO: remove once we define the payloads\nimport {ILine} from '../api';\nimport {LINE_EVENTS} from '../CallingClient/line/types';\nimport type {ICall} from '../CallingClient/calling/types';\nimport {CallId, DisplayInformation} from '../common/types';\nimport {CallError, CallingClientError, LineError} from '../Errors';\nimport {MOBIUS_SOCKET_DISCONNECT_REASON} from '../CallingClient/utils/constants';\n\nexport {MOBIUS_SOCKET_DISCONNECT_REASON};\n\n/** External Eventing Start */\nexport enum COMMON_EVENT_KEYS {\n CB_VOICEMESSAGE_CONTENT_GET = 'call_back_voicemail_content_get',\n CALL_HISTORY_USER_SESSION_INFO = 'callHistory:user_recent_sessions',\n CALL_HISTORY_USER_VIEWED_SESSIONS = 'callHistory:user_viewed_sessions',\n CALL_HISTORY_USER_SESSIONS_DELETED = 'callHistory:user_sessions_deleted',\n CALL_RECORDING_CREATED = 'callRecording:created',\n CALL_RECORDING_UPDATED = 'callRecording:updated',\n CALL_RECORDING_DELETED = 'callRecording:deleted',\n}\n\nexport enum LINE_EVENT_KEYS {\n INCOMING_CALL = 'incoming_call',\n}\n\nexport enum CALLING_CLIENT_EVENT_KEYS {\n ERROR = 'callingClient:error',\n OUTGOING_CALL = 'callingClient:outgoing_call',\n USER_SESSION_INFO = 'callingClient:user_recent_sessions',\n ALL_CALLS_CLEARED = 'callingClient:all_calls_cleared',\n MOBIUS_SOCKET_CONNECTED = 'callingClient:mobius_socket_connected',\n MOBIUS_SOCKET_DISCONNECTED = 'callingClient:mobius_socket_disconnected',\n}\n\nexport type MobiusSocketDisconnectedEvent = {\n reason: MOBIUS_SOCKET_DISCONNECT_REASON;\n};\n\nexport enum CALL_EVENT_KEYS {\n ALERTING = 'alerting',\n CALL_ERROR = 'call_error',\n CALLER_ID = 'caller_id',\n CONNECT = 'connect',\n DISCONNECT = 'disconnect',\n ESTABLISHED = 'established',\n HELD = 'held',\n HOLD_ERROR = 'hold_error',\n PROGRESS = 'progress',\n REMOTE_MEDIA = 'remote_media',\n RESUME_ERROR = 'resume_error',\n RESUMED = 'resumed',\n TRANSFER_ERROR = 'transfer_error',\n}\n\nexport enum SUPPLEMENTARY_SERVICES {\n HOLD = 'hold',\n RESUME = 'resume',\n DIVERT = 'divert',\n TRANSFER = 'transfer',\n PARK = 'park',\n}\n\nexport enum MOBIUS_MIDCALL_STATE {\n HELD = 'HELD',\n CONNECTED = 'CONNECTED',\n}\n\nexport enum Disposition {\n ANSWERED = 'Answered',\n CANCELED = 'Canceled',\n INITIATED = 'Initiated',\n MISSED = 'MISSED',\n}\n\nexport type CallRecordLink = {\n locusUrl?: string;\n conversationUrl?: string;\n callbackAddress: string;\n};\n\nexport type CallBackInfo = {\n callbackAddress: string;\n callbackType: string;\n};\n\nexport type LookUpInfo = {\n lookupLink: string;\n type: string;\n};\n\nexport type CallRecordSelf = {\n id: string;\n name?: string;\n phoneNumber?: string;\n cucmDN?: string;\n ucmLineNumber?: number;\n};\n\nexport type CallRecordListOther = {\n ownerId?: string;\n id: string;\n name?: string;\n sipUrl?: string;\n primaryDisplayString?: string;\n secondaryDisplayString?: string;\n isPrivate: boolean;\n callbackAddress: string;\n phoneNumber?: string;\n contact?: string;\n email?: string;\n};\n\nexport type RedirectionDetails = {\n phoneNumber?: string;\n sipUrl?: string;\n name?: string;\n reason: string;\n userId?: string;\n isPrivate: boolean;\n};\n\nexport enum SessionType {\n SPARK = 'SPARK',\n WEBEX_CALLING = 'WEBEXCALLING',\n}\n\nexport type UserSession = {\n id: string;\n sessionId: string;\n disposition: Disposition;\n startTime: string;\n endTime: string;\n url: string;\n durationSeconds: number;\n joinedDurationSeconds: number;\n participantCount: number;\n isDeleted: boolean;\n isPMR: boolean;\n correlationIds: string[];\n links: CallRecordLink;\n self: CallRecordSelf;\n durationSecs: number;\n other: CallRecordListOther;\n sessionType: SessionType;\n direction: string;\n callingSpecifics?: {\n redirectionDetails: RedirectionDetails;\n };\n};\n\nexport type CallingParty = {\n name?: string;\n number?: string;\n privacyEnabled?: boolean;\n userId?: string;\n address?: string;\n};\n\nexport type Item = {\n id?: string;\n duration?: number;\n callingParty?: CallingParty;\n urgent?: boolean;\n confidential?: boolean;\n read?: boolean;\n created?: string;\n messageId?: string;\n time?: number;\n};\n\nexport enum MOBIUS_EVENT_KEYS {\n SERVER_EVENT_INCLUSIVE = 'event:mobius',\n CALL_SESSION_EVENT_INCLUSIVE = 'event:janus.user_recent_sessions',\n CALL_SESSION_EVENT_LEGACY = 'event:janus.user_sessions',\n CALL_SESSION_EVENT_VIEWED = 'event:janus.user_viewed_sessions',\n CALL_SESSION_EVENT_DELETED = 'event:janus.user_sessions_deleted',\n RECORDING_EVENT_CREATED = 'event:convergedRecordings.created',\n RECORDING_EVENT_UPDATED = 'event:convergedRecordings.updated',\n RECORDING_EVENT_DELETED = 'event:convergedRecordings.deleted',\n}\n\nexport type CallSessionData = {\n userSessions: {\n userSessions: UserSession[];\n statusCode: number;\n };\n eventType:\n | MOBIUS_EVENT_KEYS.CALL_SESSION_EVENT_INCLUSIVE\n | MOBIUS_EVENT_KEYS.CALL_SESSION_EVENT_LEGACY;\n};\n\nexport type CallSessionEvent = {\n id: string;\n data: CallSessionData;\n timestamp: number;\n trackingId: string;\n};\n\nexport enum MEDIA_CONNECTION_EVENT_KEYS {\n ROAP_MESSAGE_TO_SEND = 'roap:messageToSend',\n MEDIA_TYPE_AUDIO = 'audio',\n}\n\nexport type CallerIdDisplay = {\n correlationId: string;\n callerId: DisplayInformation;\n};\n\nexport type LineEventTypes = {\n [LINE_EVENTS.CONNECTING]: () => void;\n [LINE_EVENTS.ERROR]: (error: LineError) => void;\n [LINE_EVENTS.RECONNECTED]: () => void;\n [LINE_EVENTS.RECONNECTING]: () => void;\n [LINE_EVENTS.REGISTERED]: (lineInfo: ILine) => void;\n [LINE_EVENTS.UNREGISTERED]: () => void;\n [LINE_EVENTS.INCOMING_CALL]: (callObj: ICall) => void;\n};\n\nexport type CallEventTypes = {\n [CALL_EVENT_KEYS.CALL_ERROR]: (error: CallError) => void;\n [CALL_EVENT_KEYS.CALLER_ID]: (display: CallerIdDisplay) => void;\n [CALL_EVENT_KEYS.CONNECT]: (callId: CallId) => void;\n [CALL_EVENT_KEYS.DISCONNECT]: (callId: CallId) => void;\n [CALL_EVENT_KEYS.ESTABLISHED]: (callId: CallId) => void;\n [CALL_EVENT_KEYS.HELD]: (callId: CallId) => void;\n [CALL_EVENT_KEYS.HOLD_ERROR]: (error: CallError) => void;\n [LINE_EVENT_KEYS.INCOMING_CALL]: (callObj: ICall) => void;\n [CALL_EVENT_KEYS.PROGRESS]: (callId: CallId) => void;\n [CALL_EVENT_KEYS.REMOTE_MEDIA]: (track: MediaStreamTrack) => void;\n [CALL_EVENT_KEYS.RESUME_ERROR]: (error: CallError) => void;\n [CALL_EVENT_KEYS.RESUMED]: (callId: CallId) => void;\n [CALL_EVENT_KEYS.TRANSFER_ERROR]: (error: CallError) => void;\n [CALLING_CLIENT_EVENT_KEYS.ALL_CALLS_CLEARED]: () => void;\n};\n\nexport type MessageId = {\n messageId: string;\n};\n\nexport type VoicemailEventTypes = {\n [COMMON_EVENT_KEYS.CB_VOICEMESSAGE_CONTENT_GET]: (messageId: MessageId) => void;\n};\n\nexport type CallingClientEventTypes = {\n [CALLING_CLIENT_EVENT_KEYS.ERROR]: (error: CallingClientError) => void;\n [CALLING_CLIENT_EVENT_KEYS.USER_SESSION_INFO]: (event: CallSessionEvent) => void;\n [CALLING_CLIENT_EVENT_KEYS.OUTGOING_CALL]: (callId: string) => void;\n [CALLING_CLIENT_EVENT_KEYS.ALL_CALLS_CLEARED]: () => void;\n [CALLING_CLIENT_EVENT_KEYS.MOBIUS_SOCKET_CONNECTED]: () => void;\n [CALLING_CLIENT_EVENT_KEYS.MOBIUS_SOCKET_DISCONNECTED]: (\n event: MobiusSocketDisconnectedEvent\n ) => void;\n};\n\nexport type CallHistoryEventTypes = {\n [COMMON_EVENT_KEYS.CALL_HISTORY_USER_SESSION_INFO]: (event: CallSessionEvent) => void;\n [COMMON_EVENT_KEYS.CALL_HISTORY_USER_VIEWED_SESSIONS]: (event: CallSessionViewedEvent) => void;\n [COMMON_EVENT_KEYS.CALL_HISTORY_USER_SESSIONS_DELETED]: (event: CallSessionDeletedEvent) => void;\n};\n\n/**\n * Backend recording Mercury `eventType` values, surfaced on the recording activity envelope.\n */\nexport enum RECORDING_EVENT_TYPE {\n CREATED = 'convergedRecordings.created',\n UPDATED = 'convergedRecordings.updated',\n DELETED = 'convergedRecordings.deleted',\n}\n\n/**\n * Sub-type that qualifies a `convergedRecordings.updated` event. Notably, AI summary/transcript\n * availability is surfaced as an `updated` event with `eventSubType: SUMMARY_CREATE` — there are\n * no separate `transcriptAvailable`/`summaryAvailable` backend events.\n */\nexport enum RECORDING_EVENT_SUBTYPE {\n TRASH = 'TRASH',\n PURGE = 'PURGE',\n RESTORE = 'RESTORE',\n SUMMARY_CREATE = 'SUMMARY_CREATE',\n}\n\nexport type RecordingActor = {\n id?: string;\n objectType?: string;\n emailAddress?: string;\n displayName?: string;\n};\n\nexport type RecordingActivityObject = {\n id: string;\n objectType?: string;\n suiteID?: string;\n callSessionID?: string;\n locationID?: string;\n topic?: string;\n durationSeconds?: number;\n sizeBytes?: number;\n callingActorID?: string;\n calledActorID?: string;\n personality?: string;\n storageRegion?: string;\n playbackUrl?: string;\n published?: string;\n};\n\nexport type RecordingActivity = {\n id?: string;\n objectType?: string;\n verb?: string;\n published?: string;\n actor?: RecordingActor;\n object: RecordingActivityObject;\n};\n\nexport type RecordingEventData = {\n activity: RecordingActivity;\n eventType: RECORDING_EVENT_TYPE;\n eventSubType?: RECORDING_EVENT_SUBTYPE;\n};\n\nexport type RecordingEvent = {\n id?: string;\n data: RecordingEventData;\n timestamp?: number;\n trackingId?: string;\n};\n\nexport type CallRecordingEventTypes = {\n [COMMON_EVENT_KEYS.CALL_RECORDING_CREATED]: (event: RecordingEvent) => void;\n [COMMON_EVENT_KEYS.CALL_RECORDING_UPDATED]: (event: RecordingEvent) => void;\n [COMMON_EVENT_KEYS.CALL_RECORDING_DELETED]: (event: RecordingEvent) => void;\n};\n/* External Eventing End */\n\n/** Internal Eventing Start */\nenum CALL_STATE {\n HELD = 'held',\n REMOTE_HELD = 'remoteheld',\n CONNECTED = 'connected',\n}\n\ntype eventType = string;\n\ntype callProgressData = {\n alerting: boolean;\n inbandROAP: boolean;\n};\n\nexport type CallerIdInfo = {\n 'x-broadworks-remote-party-info'?: string;\n 'p-asserted-identity'?: string;\n from?: string;\n};\n\ntype callId = string;\ntype deviceId = string;\ntype correlationId = string;\ntype callUrl = string;\ntype causecode = number;\ntype cause = string;\n\ntype eventData = {\n callerId: CallerIdInfo;\n callState: CALL_STATE;\n};\n\ntype midCallServiceData = {\n eventType: eventType;\n eventData: eventData;\n};\n\ntype midCallService = Array<midCallServiceData>;\ninterface BaseMessage {\n eventType: eventType;\n correlationId: correlationId;\n deviceId: deviceId;\n callId: callId;\n callUrl: callUrl;\n}\nexport interface CallSetupMessage extends BaseMessage {\n callerId: CallerIdInfo;\n trackingId: string;\n alertType: string;\n}\n\n/** Internal Eventing End */\n\n/** State Machine Events */\n\nexport type CallEvent =\n /* Received Events */\n | {type: 'E_RECV_CALL_SETUP'; data?: unknown}\n | {type: 'E_RECV_CALL_PROGRESS'; data?: unknown}\n | {type: 'E_RECV_CALL_CONNECT'; data?: unknown}\n | {type: 'E_RECV_CALL_DISCONNECT'; data?: unknown}\n\n /* Sent Events */\n | {type: 'E_SEND_CALL_SETUP'; data?: unknown}\n | {type: 'E_SEND_CALL_ALERTING'; data?: unknown}\n | {type: 'E_SEND_CALL_CONNECT'; data?: unknown}\n | {type: 'E_SEND_CALL_DISCONNECT'; data?: unknown}\n\n /* Common Events */\n | {type: 'E_CALL_ESTABLISHED'; data?: unknown}\n | {type: 'E_CALL_INFO'; data?: unknown}\n | {type: 'E_UNKNOWN'; data?: unknown}\n | {type: 'E_CALL_CLEARED'; data?: unknown}\n | {type: 'E_CALL_HOLD'; data?: unknown}\n | {type: 'E_CALL_RESUME'; data?: unknown};\n\n/* ROAP Events */\nexport type RoapEvent =\n | {type: 'E_SEND_ROAP_OFFER'; data?: unknown}\n | {type: 'E_SEND_ROAP_ANSWER'; data?: unknown}\n | {type: 'E_RECV_ROAP_OFFER'; data?: unknown}\n | {type: 'E_RECV_ROAP_ANSWER'; data?: unknown}\n | {type: 'E_ROAP_ERROR'; data?: unknown}\n | {type: 'E_ROAP_OK'; data?: unknown}\n | {type: 'E_RECV_ROAP_OFFER_REQUEST'; data?: unknown} // ROAP request to explicitly ask Client to do OFFER\n | {type: 'E_ROAP_TEARDOWN'; data?: unknown};\n\n// TODO: export RoapMessage type from the media SDK to use here\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport interface RoapMessage {\n seq: number;\n messageType: 'OFFER' | 'ANSWER' | 'OK' | 'ERROR' | 'OFFER_REQUEST' | 'OFFER_RESPONSE';\n offererSessionId?: string;\n answererSessionId?: string;\n sdp?: string;\n version?: string;\n tieBreaker?: string;\n errorType?: string;\n}\n\nexport interface RoapMessageEvent {\n roapMessage: RoapMessage;\n}\n\nexport type UserReadSessions = {\n sessionId: string;\n};\n\nexport type CallSessionViewedData = {\n userReadSessions: {\n userReadSessions: UserReadSessions[];\n statusCode: number;\n };\n eventType: MOBIUS_EVENT_KEYS.CALL_SESSION_EVENT_VIEWED;\n};\n\nexport type CallSessionViewedEvent = {\n id: string;\n data: CallSessionViewedData;\n timestamp: number;\n trackingId: string;\n};\n\nexport type CallSessionDeletedData = {\n deletedSessions: string[];\n eventType: MOBIUS_EVENT_KEYS.CALL_SESSION_EVENT_DELETED;\n};\n\nexport type CallSessionDeletedEvent = {\n id: string;\n data: CallSessionDeletedData;\n timestamp: number;\n trackingId: string;\n};\n\nexport type EndTimeSessionId = {\n endTime: string;\n sessionId: string;\n};\n\nexport type SanitizedEndTimeAndSessionId = {\n endTime: number;\n sessionId: string;\n};\n\nexport type UCMLine = {\n dnorpattern: string;\n index: number;\n label: string | null;\n};\n\nexport type UCMDevice = {\n name: string;\n model: number;\n lines: UCMLine[];\n};\n\nexport type UCMLinesApiResponse = {\n devices: UCMDevice[];\n};\n"],"mappings":";;;;;;;;;;;;;;AAEA,IAAAA,MAAA,GAAAC,OAAA;AAIA,IAAAC,UAAA,GAAAD,OAAA;AANA;AAAuD;AAUvD;AAAA,IACYE,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,0BAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAAA,IAUjBE,eAAe,GAAAD,OAAA,CAAAC,eAAA,0BAAfA,eAAe;EAAfA,eAAe;EAAA,OAAfA,eAAe;AAAA;AAAA,IAIfC,yBAAyB,GAAAF,OAAA,CAAAE,yBAAA,0BAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAA,OAAzBA,yBAAyB;AAAA;AAAA,IAazBC,eAAe,GAAAH,OAAA,CAAAG,eAAA,0BAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAA,OAAfA,eAAe;AAAA;AAAA,IAgBfC,sBAAsB,GAAAJ,OAAA,CAAAI,sBAAA,0BAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAA,OAAtBA,sBAAsB;AAAA;AAAA,IAQtBC,oBAAoB,GAAAL,OAAA,CAAAK,oBAAA,0BAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAAA,OAApBA,oBAAoB;AAAA;AAAA,IAKpBC,WAAW,GAAAN,OAAA,CAAAM,WAAA,0BAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA;AAAA,IAsDXC,WAAW,GAAAP,OAAA,CAAAO,WAAA,0BAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA;AAAA,IAiDXC,iBAAiB,GAAAR,OAAA,CAAAQ,iBAAA,0BAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAAA,IA4BjBC,2BAA2B,GAAAT,OAAA,CAAAS,2BAAA,0BAA3BA,2BAA2B;EAA3BA,2BAA2B;EAA3BA,2BAA2B;EAAA,OAA3BA,2BAA2B;AAAA;AA8DvC;AACA;AACA;AAFA,IAGYC,oBAAoB,GAAAV,OAAA,CAAAU,oBAAA,0BAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAAA,OAApBA,oBAAoB;AAAA;AAMhC;AACA;AACA;AACA;AACA;AAJA,IAKYC,uBAAuB,GAAAX,OAAA,CAAAW,uBAAA,0BAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAA,OAAvBA,uBAAuB;AAAA;AA0DnC;AAEA;AAAA,IACKC,UAAU,0BAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA,EAAVA,UAAU;AAkDf;AAEA;AAuBA;AAWA;AACA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_types","require","_constants","COMMON_EVENT_KEYS","exports","LINE_EVENT_KEYS","CALLING_CLIENT_EVENT_KEYS","CALL_EVENT_KEYS","SUPPLEMENTARY_SERVICES","MOBIUS_MIDCALL_STATE","Disposition","SessionType","MOBIUS_EVENT_KEYS","MEDIA_CONNECTION_EVENT_KEYS","RECORDING_EVENT_TYPE","RECORDING_EVENT_SUBTYPE","CALL_STATE"],"sources":["types.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */ // TODO: remove once we define the payloads\nimport {ILine} from '../api';\nimport {LINE_EVENTS} from '../CallingClient/line/types';\nimport type {ICall} from '../CallingClient/calling/types';\nimport {CallId, DisplayInformation} from '../common/types';\nimport {CallError, CallingClientError, LineError} from '../Errors';\nimport {MOBIUS_SOCKET_DISCONNECT_REASON} from '../CallingClient/utils/constants';\n\nexport {MOBIUS_SOCKET_DISCONNECT_REASON};\n\n/** External Eventing Start */\nexport enum COMMON_EVENT_KEYS {\n CB_VOICEMESSAGE_CONTENT_GET = 'call_back_voicemail_content_get',\n CALL_HISTORY_USER_SESSION_INFO = 'callHistory:user_recent_sessions',\n CALL_HISTORY_USER_VIEWED_SESSIONS = 'callHistory:user_viewed_sessions',\n CALL_HISTORY_USER_SESSIONS_DELETED = 'callHistory:user_sessions_deleted',\n CALL_RECORDING_CREATED = 'callRecording:created',\n CALL_RECORDING_UPDATED = 'callRecording:updated',\n CALL_RECORDING_DELETED = 'callRecording:deleted',\n}\n\nexport enum LINE_EVENT_KEYS {\n INCOMING_CALL = 'incoming_call',\n}\n\nexport enum CALLING_CLIENT_EVENT_KEYS {\n ERROR = 'callingClient:error',\n OUTGOING_CALL = 'callingClient:outgoing_call',\n USER_SESSION_INFO = 'callingClient:user_recent_sessions',\n ALL_CALLS_CLEARED = 'callingClient:all_calls_cleared',\n MOBIUS_SOCKET_CONNECTED = 'callingClient:mobius_socket_connected',\n MOBIUS_SOCKET_DISCONNECTED = 'callingClient:mobius_socket_disconnected',\n}\n\nexport type MobiusSocketDisconnectedEvent = {\n reason: MOBIUS_SOCKET_DISCONNECT_REASON;\n};\n\nexport enum CALL_EVENT_KEYS {\n ALERTING = 'alerting',\n CALL_ERROR = 'call_error',\n CALLER_ID = 'caller_id',\n CONNECT = 'connect',\n DISCONNECT = 'disconnect',\n ESTABLISHED = 'established',\n HELD = 'held',\n HOLD_ERROR = 'hold_error',\n PROGRESS = 'progress',\n REMOTE_MEDIA = 'remote_media',\n RESUME_ERROR = 'resume_error',\n RESUMED = 'resumed',\n TRANSFER_ERROR = 'transfer_error',\n}\n\nexport enum SUPPLEMENTARY_SERVICES {\n HOLD = 'hold',\n RESUME = 'resume',\n DIVERT = 'divert',\n TRANSFER = 'transfer',\n PARK = 'park',\n}\n\nexport enum MOBIUS_MIDCALL_STATE {\n HELD = 'HELD',\n CONNECTED = 'CONNECTED',\n}\n\nexport enum Disposition {\n ANSWERED = 'Answered',\n CANCELED = 'Canceled',\n INITIATED = 'Initiated',\n MISSED = 'MISSED',\n}\n\nexport type CallRecordLink = {\n locusUrl?: string;\n conversationUrl?: string;\n callbackAddress: string;\n};\n\nexport type CallBackInfo = {\n callbackAddress: string;\n callbackType: string;\n};\n\nexport type LookUpInfo = {\n lookupLink: string;\n type: string;\n};\n\nexport type CallRecordSelf = {\n id: string;\n name?: string;\n phoneNumber?: string;\n cucmDN?: string;\n ucmLineNumber?: number;\n};\n\nexport type CallRecordListOther = {\n ownerId?: string;\n id: string;\n name?: string;\n sipUrl?: string;\n primaryDisplayString?: string;\n secondaryDisplayString?: string;\n isPrivate: boolean;\n callbackAddress: string;\n phoneNumber?: string;\n contact?: string;\n email?: string;\n};\n\nexport type RedirectionDetails = {\n phoneNumber?: string;\n sipUrl?: string;\n name?: string;\n reason: string;\n userId?: string;\n isPrivate: boolean;\n};\n\nexport enum SessionType {\n SPARK = 'SPARK',\n WEBEX_CALLING = 'WEBEXCALLING',\n}\n\nexport type UserSession = {\n id: string;\n sessionId: string;\n disposition: Disposition;\n startTime: string;\n endTime: string;\n url: string;\n durationSeconds: number;\n joinedDurationSeconds: number;\n participantCount: number;\n isDeleted: boolean;\n isPMR: boolean;\n correlationIds: string[];\n links: CallRecordLink;\n self: CallRecordSelf;\n durationSecs: number;\n other: CallRecordListOther;\n sessionType: SessionType;\n direction: string;\n callingSpecifics?: {\n redirectionDetails: RedirectionDetails;\n };\n};\n\nexport type CallingParty = {\n name?: string;\n number?: string;\n privacyEnabled?: boolean;\n userId?: string;\n address?: string;\n};\n\nexport type Item = {\n id?: string;\n duration?: number;\n callingParty?: CallingParty;\n urgent?: boolean;\n confidential?: boolean;\n read?: boolean;\n created?: string;\n messageId?: string;\n time?: number;\n};\n\nexport enum MOBIUS_EVENT_KEYS {\n SERVER_EVENT_INCLUSIVE = 'event:mobius',\n CALL_SESSION_EVENT_INCLUSIVE = 'event:janus.user_recent_sessions',\n CALL_SESSION_EVENT_LEGACY = 'event:janus.user_sessions',\n CALL_SESSION_EVENT_VIEWED = 'event:janus.user_viewed_sessions',\n CALL_SESSION_EVENT_DELETED = 'event:janus.user_sessions_deleted',\n RECORDING_EVENT_CREATED = 'event:convergedRecordings.created',\n RECORDING_EVENT_UPDATED = 'event:convergedRecordings.updated',\n RECORDING_EVENT_DELETED = 'event:convergedRecordings.deleted',\n}\n\nexport type CallSessionData = {\n userSessions: {\n userSessions: UserSession[];\n statusCode: number;\n };\n eventType:\n | MOBIUS_EVENT_KEYS.CALL_SESSION_EVENT_INCLUSIVE\n | MOBIUS_EVENT_KEYS.CALL_SESSION_EVENT_LEGACY;\n};\n\nexport type CallSessionEvent = {\n id: string;\n data: CallSessionData;\n timestamp: number;\n trackingId: string;\n};\n\nexport enum MEDIA_CONNECTION_EVENT_KEYS {\n ROAP_MESSAGE_TO_SEND = 'roap:messageToSend',\n MEDIA_TYPE_AUDIO = 'audio',\n}\n\nexport type CallerIdDisplay = {\n correlationId: string;\n callerId: DisplayInformation;\n};\n\nexport type LineEventTypes = {\n [LINE_EVENTS.CONNECTING]: () => void;\n [LINE_EVENTS.ERROR]: (error: LineError) => void;\n [LINE_EVENTS.RECONNECTED]: () => void;\n [LINE_EVENTS.RECONNECTING]: () => void;\n [LINE_EVENTS.REGISTERED]: (lineInfo: ILine) => void;\n /**\n * Emitted whenever the line is no longer registered.\n *\n * `error` is present only when the SDK knows why the registration ended and will not\n * re-establish it. Today that is a session superseded by another registration for the\n * same user, for example calling opened in a second browser tab, reported as\n * `ERROR_TYPE.SESSION_SUPERSEDED`.\n */\n [LINE_EVENTS.UNREGISTERED]: (error?: LineError) => void;\n [LINE_EVENTS.INCOMING_CALL]: (callObj: ICall) => void;\n};\n\nexport type CallEventTypes = {\n [CALL_EVENT_KEYS.CALL_ERROR]: (error: CallError) => void;\n [CALL_EVENT_KEYS.CALLER_ID]: (display: CallerIdDisplay) => void;\n [CALL_EVENT_KEYS.CONNECT]: (callId: CallId) => void;\n [CALL_EVENT_KEYS.DISCONNECT]: (callId: CallId) => void;\n [CALL_EVENT_KEYS.ESTABLISHED]: (callId: CallId) => void;\n [CALL_EVENT_KEYS.HELD]: (callId: CallId) => void;\n [CALL_EVENT_KEYS.HOLD_ERROR]: (error: CallError) => void;\n [LINE_EVENT_KEYS.INCOMING_CALL]: (callObj: ICall) => void;\n [CALL_EVENT_KEYS.PROGRESS]: (callId: CallId) => void;\n [CALL_EVENT_KEYS.REMOTE_MEDIA]: (track: MediaStreamTrack) => void;\n [CALL_EVENT_KEYS.RESUME_ERROR]: (error: CallError) => void;\n [CALL_EVENT_KEYS.RESUMED]: (callId: CallId) => void;\n [CALL_EVENT_KEYS.TRANSFER_ERROR]: (error: CallError) => void;\n [CALLING_CLIENT_EVENT_KEYS.ALL_CALLS_CLEARED]: () => void;\n};\n\nexport type MessageId = {\n messageId: string;\n};\n\nexport type VoicemailEventTypes = {\n [COMMON_EVENT_KEYS.CB_VOICEMESSAGE_CONTENT_GET]: (messageId: MessageId) => void;\n};\n\nexport type CallingClientEventTypes = {\n [CALLING_CLIENT_EVENT_KEYS.ERROR]: (error: CallingClientError) => void;\n [CALLING_CLIENT_EVENT_KEYS.USER_SESSION_INFO]: (event: CallSessionEvent) => void;\n [CALLING_CLIENT_EVENT_KEYS.OUTGOING_CALL]: (callId: string) => void;\n [CALLING_CLIENT_EVENT_KEYS.ALL_CALLS_CLEARED]: () => void;\n [CALLING_CLIENT_EVENT_KEYS.MOBIUS_SOCKET_CONNECTED]: () => void;\n [CALLING_CLIENT_EVENT_KEYS.MOBIUS_SOCKET_DISCONNECTED]: (\n event: MobiusSocketDisconnectedEvent\n ) => void;\n};\n\nexport type CallHistoryEventTypes = {\n [COMMON_EVENT_KEYS.CALL_HISTORY_USER_SESSION_INFO]: (event: CallSessionEvent) => void;\n [COMMON_EVENT_KEYS.CALL_HISTORY_USER_VIEWED_SESSIONS]: (event: CallSessionViewedEvent) => void;\n [COMMON_EVENT_KEYS.CALL_HISTORY_USER_SESSIONS_DELETED]: (event: CallSessionDeletedEvent) => void;\n};\n\n/**\n * Backend recording Mercury `eventType` values, surfaced on the recording activity envelope.\n */\nexport enum RECORDING_EVENT_TYPE {\n CREATED = 'convergedRecordings.created',\n UPDATED = 'convergedRecordings.updated',\n DELETED = 'convergedRecordings.deleted',\n}\n\n/**\n * Sub-type that qualifies a `convergedRecordings.updated` event. Notably, AI summary/transcript\n * availability is surfaced as an `updated` event with `eventSubType: SUMMARY_CREATE` — there are\n * no separate `transcriptAvailable`/`summaryAvailable` backend events.\n */\nexport enum RECORDING_EVENT_SUBTYPE {\n TRASH = 'TRASH',\n PURGE = 'PURGE',\n RESTORE = 'RESTORE',\n SUMMARY_CREATE = 'SUMMARY_CREATE',\n}\n\nexport type RecordingActor = {\n id?: string;\n objectType?: string;\n emailAddress?: string;\n displayName?: string;\n};\n\nexport type RecordingActivityObject = {\n id: string;\n objectType?: string;\n suiteID?: string;\n callSessionID?: string;\n locationID?: string;\n topic?: string;\n durationSeconds?: number;\n sizeBytes?: number;\n callingActorID?: string;\n calledActorID?: string;\n personality?: string;\n storageRegion?: string;\n playbackUrl?: string;\n published?: string;\n};\n\nexport type RecordingActivity = {\n id?: string;\n objectType?: string;\n verb?: string;\n published?: string;\n actor?: RecordingActor;\n object: RecordingActivityObject;\n};\n\nexport type RecordingEventData = {\n activity: RecordingActivity;\n eventType: RECORDING_EVENT_TYPE;\n eventSubType?: RECORDING_EVENT_SUBTYPE;\n};\n\nexport type RecordingEvent = {\n id?: string;\n data: RecordingEventData;\n timestamp?: number;\n trackingId?: string;\n};\n\nexport type CallRecordingEventTypes = {\n [COMMON_EVENT_KEYS.CALL_RECORDING_CREATED]: (event: RecordingEvent) => void;\n [COMMON_EVENT_KEYS.CALL_RECORDING_UPDATED]: (event: RecordingEvent) => void;\n [COMMON_EVENT_KEYS.CALL_RECORDING_DELETED]: (event: RecordingEvent) => void;\n};\n/* External Eventing End */\n\n/** Internal Eventing Start */\nenum CALL_STATE {\n HELD = 'held',\n REMOTE_HELD = 'remoteheld',\n CONNECTED = 'connected',\n}\n\ntype eventType = string;\n\ntype callProgressData = {\n alerting: boolean;\n inbandROAP: boolean;\n};\n\nexport type CallerIdInfo = {\n 'x-broadworks-remote-party-info'?: string;\n 'p-asserted-identity'?: string;\n from?: string;\n};\n\ntype callId = string;\ntype deviceId = string;\ntype correlationId = string;\ntype callUrl = string;\ntype causecode = number;\ntype cause = string;\n\ntype eventData = {\n callerId: CallerIdInfo;\n callState: CALL_STATE;\n};\n\ntype midCallServiceData = {\n eventType: eventType;\n eventData: eventData;\n};\n\ntype midCallService = Array<midCallServiceData>;\ninterface BaseMessage {\n eventType: eventType;\n correlationId: correlationId;\n deviceId: deviceId;\n callId: callId;\n callUrl: callUrl;\n}\nexport interface CallSetupMessage extends BaseMessage {\n callerId: CallerIdInfo;\n trackingId: string;\n alertType: string;\n}\n\n/** Internal Eventing End */\n\n/** State Machine Events */\n\nexport type CallEvent =\n /* Received Events */\n | {type: 'E_RECV_CALL_SETUP'; data?: unknown}\n | {type: 'E_RECV_CALL_PROGRESS'; data?: unknown}\n | {type: 'E_RECV_CALL_CONNECT'; data?: unknown}\n | {type: 'E_RECV_CALL_DISCONNECT'; data?: unknown}\n\n /* Sent Events */\n | {type: 'E_SEND_CALL_SETUP'; data?: unknown}\n | {type: 'E_SEND_CALL_ALERTING'; data?: unknown}\n | {type: 'E_SEND_CALL_CONNECT'; data?: unknown}\n | {type: 'E_SEND_CALL_DISCONNECT'; data?: unknown}\n\n /* Common Events */\n | {type: 'E_CALL_ESTABLISHED'; data?: unknown}\n | {type: 'E_CALL_INFO'; data?: unknown}\n | {type: 'E_UNKNOWN'; data?: unknown}\n | {type: 'E_CALL_CLEARED'; data?: unknown}\n | {type: 'E_CALL_HOLD'; data?: unknown}\n | {type: 'E_CALL_RESUME'; data?: unknown};\n\n/* ROAP Events */\nexport type RoapEvent =\n | {type: 'E_SEND_ROAP_OFFER'; data?: unknown}\n | {type: 'E_SEND_ROAP_ANSWER'; data?: unknown}\n | {type: 'E_RECV_ROAP_OFFER'; data?: unknown}\n | {type: 'E_RECV_ROAP_ANSWER'; data?: unknown}\n | {type: 'E_ROAP_ERROR'; data?: unknown}\n | {type: 'E_ROAP_OK'; data?: unknown}\n | {type: 'E_RECV_ROAP_OFFER_REQUEST'; data?: unknown} // ROAP request to explicitly ask Client to do OFFER\n | {type: 'E_ROAP_TEARDOWN'; data?: unknown};\n\n// TODO: export RoapMessage type from the media SDK to use here\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport interface RoapMessage {\n seq: number;\n messageType: 'OFFER' | 'ANSWER' | 'OK' | 'ERROR' | 'OFFER_REQUEST' | 'OFFER_RESPONSE';\n offererSessionId?: string;\n answererSessionId?: string;\n sdp?: string;\n version?: string;\n tieBreaker?: string;\n errorType?: string;\n}\n\nexport interface RoapMessageEvent {\n roapMessage: RoapMessage;\n}\n\nexport type UserReadSessions = {\n sessionId: string;\n};\n\nexport type CallSessionViewedData = {\n userReadSessions: {\n userReadSessions: UserReadSessions[];\n statusCode: number;\n };\n eventType: MOBIUS_EVENT_KEYS.CALL_SESSION_EVENT_VIEWED;\n};\n\nexport type CallSessionViewedEvent = {\n id: string;\n data: CallSessionViewedData;\n timestamp: number;\n trackingId: string;\n};\n\nexport type CallSessionDeletedData = {\n deletedSessions: string[];\n eventType: MOBIUS_EVENT_KEYS.CALL_SESSION_EVENT_DELETED;\n};\n\nexport type CallSessionDeletedEvent = {\n id: string;\n data: CallSessionDeletedData;\n timestamp: number;\n trackingId: string;\n};\n\nexport type EndTimeSessionId = {\n endTime: string;\n sessionId: string;\n};\n\nexport type SanitizedEndTimeAndSessionId = {\n endTime: number;\n sessionId: string;\n};\n\nexport type UCMLine = {\n dnorpattern: string;\n index: number;\n label: string | null;\n};\n\nexport type UCMDevice = {\n name: string;\n model: number;\n lines: UCMLine[];\n};\n\nexport type UCMLinesApiResponse = {\n devices: UCMDevice[];\n};\n"],"mappings":";;;;;;;;;;;;;;AAEA,IAAAA,MAAA,GAAAC,OAAA;AAIA,IAAAC,UAAA,GAAAD,OAAA;AANA;AAAuD;AAUvD;AAAA,IACYE,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,0BAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAAA,IAUjBE,eAAe,GAAAD,OAAA,CAAAC,eAAA,0BAAfA,eAAe;EAAfA,eAAe;EAAA,OAAfA,eAAe;AAAA;AAAA,IAIfC,yBAAyB,GAAAF,OAAA,CAAAE,yBAAA,0BAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAA,OAAzBA,yBAAyB;AAAA;AAAA,IAazBC,eAAe,GAAAH,OAAA,CAAAG,eAAA,0BAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAA,OAAfA,eAAe;AAAA;AAAA,IAgBfC,sBAAsB,GAAAJ,OAAA,CAAAI,sBAAA,0BAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAA,OAAtBA,sBAAsB;AAAA;AAAA,IAQtBC,oBAAoB,GAAAL,OAAA,CAAAK,oBAAA,0BAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAAA,OAApBA,oBAAoB;AAAA;AAAA,IAKpBC,WAAW,GAAAN,OAAA,CAAAM,WAAA,0BAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA;AAAA,IAsDXC,WAAW,GAAAP,OAAA,CAAAO,WAAA,0BAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA;AAAA,IAiDXC,iBAAiB,GAAAR,OAAA,CAAAQ,iBAAA,0BAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAAA,IA4BjBC,2BAA2B,GAAAT,OAAA,CAAAS,2BAAA,0BAA3BA,2BAA2B;EAA3BA,2BAA2B;EAA3BA,2BAA2B;EAAA,OAA3BA,2BAA2B;AAAA;AAsEvC;AACA;AACA;AAFA,IAGYC,oBAAoB,GAAAV,OAAA,CAAAU,oBAAA,0BAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAAA,OAApBA,oBAAoB;AAAA;AAMhC;AACA;AACA;AACA;AACA;AAJA,IAKYC,uBAAuB,GAAAX,OAAA,CAAAW,uBAAA,0BAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAA,OAAvBA,uBAAuB;AAAA;AA0DnC;AAEA;AAAA,IACKC,UAAU,0BAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA,EAAVA,UAAU;AAkDf;AAEA;AAuBA;AAWA;AACA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import {FailoverCacheState} from 'CallingClient/registration/types';\nimport {\n KmsKey,\n KmsResourceObject,\n LogsMetaData,\n PeopleListResponse,\n UploadLogsResponse,\n WebexRequestPayload,\n} from '../common/types';\n/* eslint-disable no-shadow */\n\ntype Listener = (e: string, data?: unknown) => void;\ntype ListenerOff = (e: string) => void;\n\nexport type ServiceHost = {\n host: string;\n ttl: number;\n priority: number;\n id: string;\n homeCluster?: boolean;\n};\n\nexport type Model = {\n _values: {\n key: string;\n };\n};\n\nexport type WDMDevice = {\n url: string;\n userId: string;\n orgId: string;\n version: string;\n callingBehavior: string;\n registered?: boolean;\n webSocketUrl?: string;\n register?: () => Promise<unknown>;\n refresh?: () => Promise<unknown>;\n /** WDM / device-registration settings (e.g. `webrtc-calling-over-ws`). */\n settings?: Record<string, {value?: boolean} | undefined>;\n features: {\n developer: {\n models: Model[];\n get: (key: string) => {value: boolean} | undefined;\n };\n entitlement: {\n models: Model[];\n };\n };\n};\n\nexport type ServiceCatalog = {\n serviceGroups: {\n // cSpell:disable\n postauth: [\n {\n _values: {\n name: string;\n hosts: ServiceHost[];\n };\n }\n ];\n /* cSpell:enable */\n };\n};\n\nexport type ClientRegionInfo = {\n attribution: string;\n clientAddress: string;\n clientRegion: string;\n countryCode: string;\n disclaimer: string;\n regionCode: string;\n timezone: string;\n};\n\nexport type Logger = {\n config?: {\n level: string;\n bufferLogLevel: string;\n };\n log: (payload: string) => void;\n error: (payload: string) => void;\n warn: (payload: string) => void;\n info: (payload: string) => void;\n trace: (payload: string) => void;\n debug: (payload: string) => void;\n};\n\n// TODO: is there a way to import bindings from the Webex JS SDK without having to redefine expected methods and structure?\n// This defines the shape for the webex SDK, if a typing doesn't exist, it should be added here\nexport interface WebexSDK {\n boundedStorage: {\n get: (namespace: string, key: string) => Promise<FailoverCacheState>;\n put: (namespace: string, key: string, value: FailoverCacheState) => Promise<void>;\n del: (namespace: string, key: string) => Promise<void>;\n };\n // top level primitives/funcs\n config: {\n fedramp: boolean;\n defaultMobiusSocketOptions?: Record<string, unknown>;\n };\n version: string;\n canAuthorize: boolean;\n credentials: {\n getUserToken: () => Promise<string>;\n canRefresh?: boolean;\n refresh?: (options: {force: boolean}) => Promise<unknown>;\n };\n ready: boolean;\n sessionId?: string;\n request: <T>(payload: WebexRequestPayload) => Promise<T>;\n // internal plugins\n internal: {\n mercury: {\n on: Listener;\n off: ListenerOff;\n connected: boolean;\n connecting: boolean;\n };\n feature?: {\n updateFeature?: (featureToggle: unknown) => void;\n };\n calendar: unknown;\n device: WDMDevice;\n encryption: {\n decryptText: (encryptionKeyUrl: string, encryptedData?: string) => Promise<string>;\n encryptText: (encryptionKeyUrl: string, text?: string) => Promise<string>;\n kms: {\n createUnboundKeys: (arg0: {count?: number}) => Promise<KmsKey[]>;\n createResource: (arg0: {keyUris: string[]}) => Promise<KmsResourceObject>;\n bindKey: (arg0: {kroUri: string; keyUri: string}) => Promise<KmsKey>;\n };\n };\n presence: unknown;\n support: {\n submitLogs: (\n metaData: LogsMetaData,\n logs?: string,\n options?: {\n type: 'diff' | 'full';\n }\n ) => Promise<UploadLogsResponse>;\n };\n services: {\n _hostCatalog: Record<string, ServiceHost[]>;\n _serviceUrls: {\n mobius: string;\n identity: string;\n janus: string;\n wdm: string;\n broadworksIdpProxy: string;\n hydra: string;\n mercuryApi: string;\n 'ucmgmt-gateway': string;\n contactsService: string;\n hydraDeveloperApi?: string;\n };\n _activeServices: {\n broadworksIdpProxy: string;\n contactsService: string;\n hydra: string;\n janus: string;\n mercuryApi: string;\n mobius: string;\n hydraDeveloperApi?: string;\n };\n get: (service: string) => string;\n getMobiusClusters: () => ServiceHost[];\n fetchClientRegionInfo: () => Promise<ClientRegionInfo>;\n invalidateCache?: (timestamp: unknown) => void;\n switchActiveClusterIds?: (activeClusters: unknown) => void;\n };\n metrics: {\n submitClientMetrics: (name: string, data: unknown) => void;\n };\n };\n // public plugins\n logger: Logger;\n messages: unknown;\n memberships: unknown;\n people: {\n list: (arg: object) => Promise<PeopleListResponse>;\n };\n rooms: unknown;\n teams: unknown;\n}\n\nexport interface ISDKConnector {\n setWebex: (webexInstance: WebexSDK) => void;\n getWebex: () => WebexSDK;\n get: () => ISDKConnector;\n registerListener: <T>(event: string, cb: (data?: T) => unknown) => void;\n unregisterListener: (event: string) => void;\n}\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import {FailoverCacheState} from 'CallingClient/registration/types';\nimport {\n KmsKey,\n KmsResourceObject,\n LogsMetaData,\n PeopleListResponse,\n UploadLogsResponse,\n WebexRequestPayload,\n} from '../common/types';\n/* eslint-disable no-shadow */\n\ntype Listener = (e: string, data?: unknown) => void;\ntype ListenerOff = (e: string) => void;\n\nexport type ServiceHost = {\n host: string;\n ttl: number;\n priority: number;\n id: string;\n homeCluster?: boolean;\n};\n\nexport type Model = {\n _values: {\n key: string;\n };\n};\n\nexport type WDMDevice = {\n url: string;\n userId: string;\n orgId: string;\n version: string;\n callingBehavior: string;\n registered?: boolean;\n webSocketUrl?: string;\n register?: () => Promise<unknown>;\n refresh?: () => Promise<unknown>;\n /** WDM / device-registration settings (e.g. `webrtc-calling-over-ws`). */\n settings?: Record<string, {value?: boolean} | undefined>;\n features: {\n developer: {\n models: Model[];\n get: (key: string) => {value: boolean} | undefined;\n };\n entitlement: {\n models: Model[];\n };\n };\n};\n\nexport type ServiceCatalog = {\n serviceGroups: {\n // cSpell:disable\n postauth: [\n {\n _values: {\n name: string;\n hosts: ServiceHost[];\n };\n }\n ];\n /* cSpell:enable */\n };\n};\n\nexport type ClientRegionInfo = {\n attribution: string;\n clientAddress: string;\n clientRegion: string;\n countryCode: string;\n disclaimer: string;\n regionCode: string;\n timezone: string;\n};\n\nexport type Logger = {\n config?: {\n level: string;\n bufferLogLevel: string;\n };\n log: (payload: string) => void;\n error: (payload: string) => void;\n warn: (payload: string) => void;\n info: (payload: string) => void;\n trace: (payload: string) => void;\n debug: (payload: string) => void;\n};\n\n// TODO: is there a way to import bindings from the Webex JS SDK without having to redefine expected methods and structure?\n// This defines the shape for the webex SDK, if a typing doesn't exist, it should be added here\nexport interface WebexSDK {\n boundedStorage: {\n get: (namespace: string, key: string) => Promise<FailoverCacheState>;\n put: (namespace: string, key: string, value: FailoverCacheState) => Promise<void>;\n del: (namespace: string, key: string) => Promise<void>;\n };\n // top level primitives/funcs\n config: {\n fedramp: boolean;\n defaultMobiusSocketOptions?: Record<string, unknown>;\n };\n version: string;\n canAuthorize: boolean;\n credentials: {\n getUserToken: () => Promise<string>;\n canRefresh?: boolean;\n refresh?: (options: {force: boolean}) => Promise<unknown>;\n };\n ready: boolean;\n sessionId?: string;\n request: <T>(payload: WebexRequestPayload) => Promise<T>;\n // internal plugins\n internal: {\n mercury: {\n on: Listener;\n off: ListenerOff;\n connected: boolean;\n connecting: boolean;\n };\n feature?: {\n updateFeature?: (featureToggle: unknown) => void;\n };\n calendar: unknown;\n device: WDMDevice;\n encryption: {\n decryptText: (encryptionKeyUrl: string, encryptedData?: string) => Promise<string>;\n encryptText: (encryptionKeyUrl: string, text?: string) => Promise<string>;\n kms: {\n createUnboundKeys: (arg0: {count?: number}) => Promise<KmsKey[]>;\n createResource: (arg0: {keyUris: string[]}) => Promise<KmsResourceObject>;\n bindKey: (arg0: {kroUri: string; keyUri: string}) => Promise<KmsKey>;\n };\n };\n presence: unknown;\n support: {\n submitLogs: (\n metaData: LogsMetaData,\n logs?: string,\n options?: {\n type: 'diff' | 'full';\n }\n ) => Promise<UploadLogsResponse>;\n };\n services: {\n _hostCatalog: Record<string, ServiceHost[]>;\n _serviceUrls: {\n mobius: string;\n identity: string;\n janus: string;\n wdm: string;\n broadworksIdpProxy: string;\n hydra: string;\n mercuryApi: string;\n 'ucmgmt-gateway': string;\n contactsService: string;\n hydraDeveloperApi?: string;\n 'webex-user-hub-service'?: string;\n };\n _activeServices: {\n broadworksIdpProxy: string;\n contactsService: string;\n hydra: string;\n janus: string;\n mercuryApi: string;\n mobius: string;\n hydraDeveloperApi?: string;\n };\n get: (service: string) => string;\n getMobiusClusters: () => ServiceHost[];\n fetchClientRegionInfo: () => Promise<ClientRegionInfo>;\n invalidateCache?: (timestamp: unknown) => void;\n switchActiveClusterIds?: (activeClusters: unknown) => void;\n };\n metrics: {\n submitClientMetrics: (name: string, data: unknown) => void;\n };\n };\n // public plugins\n logger: Logger;\n messages: unknown;\n memberships: unknown;\n people: {\n list: (arg: object) => Promise<PeopleListResponse>;\n };\n rooms: unknown;\n teams: unknown;\n}\n\nexport interface ISDKConnector {\n setWebex: (webexInstance: WebexSDK) => void;\n getWebex: () => WebexSDK;\n get: () => ISDKConnector;\n registerListener: <T>(event: string, cb: (data?: T) => unknown) => void;\n unregisterListener: (event: string) => void;\n}\n"],"mappings":"","ignoreList":[]}
|