@webex/calling 3.0.0-next.8 → 3.0.0-next.9
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/CallHistory/CallHistory.js +1 -1
- package/dist/CallHistory/CallHistory.js.map +1 -1
- package/dist/CallHistory/types.js.map +1 -1
- package/dist/CallSettings/types.js.map +1 -1
- package/dist/CallingClient/CallingClient.js +26 -11
- package/dist/CallingClient/CallingClient.js.map +1 -1
- package/dist/CallingClient/calling/CallerId/types.js.map +1 -1
- package/dist/CallingClient/calling/call.js +4 -10
- package/dist/CallingClient/calling/call.js.map +1 -1
- package/dist/CallingClient/calling/callManager.js +0 -9
- package/dist/CallingClient/calling/callManager.js.map +1 -1
- package/dist/CallingClient/calling/types.js.map +1 -1
- package/dist/CallingClient/line/index.js +2 -1
- package/dist/CallingClient/line/index.js.map +1 -1
- package/dist/CallingClient/line/types.js +3 -0
- package/dist/CallingClient/line/types.js.map +1 -1
- package/dist/CallingClient/registration/register.js +12 -40
- package/dist/CallingClient/registration/register.js.map +1 -1
- package/dist/CallingClient/registration/types.js.map +1 -1
- package/dist/CallingClient/types.js.map +1 -1
- package/dist/Voicemail/Voicemail.js +18 -21
- package/dist/Voicemail/Voicemail.js.map +1 -1
- package/dist/Voicemail/WxCallBackendConnector.js +1 -1
- package/dist/Voicemail/WxCallBackendConnector.js.map +1 -1
- package/dist/Voicemail/types.js.map +1 -1
- package/dist/api.js +13 -20
- package/dist/api.js.map +1 -1
- package/dist/module/CallingClient/calling/callManager.js +0 -6
- package/dist/types/CallSettings/types.d.ts.map +1 -1
- package/dist/types/CallingClient/CallingClient.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/CallerId/types.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/call.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/callManager.d.ts +0 -1
- package/dist/types/CallingClient/calling/callManager.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/types.d.ts +29 -30
- package/dist/types/CallingClient/calling/types.d.ts.map +1 -1
- package/dist/types/CallingClient/line/index.d.ts.map +1 -1
- package/dist/types/CallingClient/line/types.d.ts +7 -7
- package/dist/types/CallingClient/line/types.d.ts.map +1 -1
- package/dist/types/CallingClient/registration/register.d.ts.map +1 -1
- package/dist/types/CallingClient/registration/types.d.ts +13 -13
- package/dist/types/CallingClient/registration/types.d.ts.map +1 -1
- package/dist/types/CallingClient/types.d.ts +6 -4
- package/dist/types/CallingClient/types.d.ts.map +1 -1
- package/dist/types/Voicemail/Voicemail.d.ts.map +1 -1
- package/dist/types/Voicemail/types.d.ts +10 -10
- package/dist/types/Voicemail/types.d.ts.map +1 -1
- package/dist/types/api.d.ts +4 -5
- package/dist/types/api.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -32,7 +32,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_R
|
|
|
32
32
|
*
|
|
33
33
|
* This code snippet demonstrates how to create an instance of `CallHistory` using webex and logger.
|
|
34
34
|
*
|
|
35
|
-
*
|
|
35
|
+
* @example
|
|
36
36
|
* ```javascript
|
|
37
37
|
* const callHistory = createCallHistoryClient(webex, logger);
|
|
38
38
|
* ```
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_SDKConnector","_interopRequireDefault","require","_types","_Logger","_Utils","_constants","_constants2","_types2","_impl","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","default","result","NewTarget","constructor","_Reflect$construct","arguments","apply","_possibleConstructorReturn2","Reflect","sham","Proxy","Boolean","prototype","valueOf","call","e","CallHistory","_Eventing","_inherits2","_super","webex","logger","_this","_classCallCheck2","_defineProperty2","_assertThisInitialized2","file","CALL_HISTORY_FILE","method","sdkConnector","SDKConnector","getWebex","setWebex","janusUrl","internal","services","_serviceUrls","janus","registerSessionsListener","log","setLogger","level","_createClass2","key","value","_getCallHistoryData","_asyncToGenerator2","_regenerator","mark","_callee","days","limit","sort","sortBy","date","sortByParam","sortParam","url","janusResponse","responseDetails","errorInfo","errorStatus","_args","wrap","_callee$","_context","prev","next","length","undefined","NUMBER_OF_DAYS","LIMIT","SORT","DEFAULT","SORT_BY","Date","setDate","getDate","fromDate","toISOString","_values","includes","concat","loggerContext","info","HISTORY","USER_SESSIONS","FROM_DATE","request","uri","HTTP_METHODS","GET","service","ALLOWED_SERVICES","JANUS","sent","userSessions","body","START_TIME","DESC","element","compareElement","getTime","ASC","statusCode","STATUS_CODE","data","message","SUCCESS_MESSAGE","abrupt","t0","serviceErrorCodeHandler","stop","getCallHistoryData","_this2","registerListener","MOBIUS_EVENT_KEYS","CALL_SESSION_EVENT_INCLUSIVE","_ref","_callee2","event","_callee2$","_context2","emit","COMMON_EVENT_KEYS","CALL_HISTORY_USER_SESSION_INFO","_x","Eventing","exports","createCallHistoryClient"],"sources":["CallHistory.ts"],"sourcesContent":["/* eslint-disable dot-notation */\n/* eslint-disable no-underscore-dangle */\nimport SDKConnector from '../SDKConnector';\nimport {ISDKConnector, WebexSDK} from '../SDKConnector/types';\nimport {ALLOWED_SERVICES, HTTP_METHODS, WebexRequestPayload, SORT, SORT_BY} from '../common/types';\nimport {ICallHistory, JanusResponseEvent, LoggerInterface} from './types';\nimport log from '../Logger';\nimport {serviceErrorCodeHandler} from '../common/Utils';\nimport {CALL_HISTORY_FILE, FROM_DATE, HISTORY, LIMIT, NUMBER_OF_DAYS} from './constants';\nimport {STATUS_CODE, SUCCESS_MESSAGE, USER_SESSIONS} from '../common/constants';\nimport {\n COMMON_EVENT_KEYS,\n CallHistoryEventTypes,\n CallSessionEvent,\n MOBIUS_EVENT_KEYS,\n UserSession,\n} from '../Events/types';\nimport {Eventing} from '../Events/impl';\n/**\n * `CallHistory` module is designed to facilitate the retrieval of Call History Records by providing a set of APIs.\n *\n * This code snippet demonstrates how to create an instance of `CallHistory` using webex and logger.\n *\n * Example\n * ```javascript\n * const callHistory = createCallHistoryClient(webex, logger);\n * ```\n */\nexport class CallHistory extends Eventing<CallHistoryEventTypes> implements ICallHistory {\n private sdkConnector: ISDKConnector;\n\n private webex: WebexSDK;\n\n private janusUrl = '';\n\n private fromDate = '';\n\n private loggerContext = {\n file: CALL_HISTORY_FILE,\n method: 'getCallHistoryData',\n };\n\n private userSessions: UserSession[] | undefined;\n\n /**\n * @ignore\n */\n constructor(webex: WebexSDK, logger: LoggerInterface) {\n super();\n this.sdkConnector = SDKConnector;\n if (!this.sdkConnector.getWebex()) {\n SDKConnector.setWebex(webex);\n }\n this.webex = this.sdkConnector.getWebex();\n this.janusUrl = this.webex.internal.services._serviceUrls.janus;\n this.registerSessionsListener();\n log.setLogger(logger.level, CALL_HISTORY_FILE);\n }\n\n /**\n * Function to display the Janus API response.\n * @param days - Number of days to fetch the call history data.\n * @param limit - Number of records to be fetched.\n * @param sort - Sort the records in ascending or descending order.\n * @param sortBy - Sort the records by start time or end time.\n */\n public async getCallHistoryData(\n days: number = NUMBER_OF_DAYS,\n limit: number = LIMIT,\n sort: SORT = SORT.DEFAULT,\n sortBy: SORT_BY = SORT_BY.DEFAULT\n ): Promise<JanusResponseEvent> {\n /*\n 1. Mandatory field for Janus API - fromDate\n 2. Calculating the fromDate by deducting the NUMBER_OF_DAYS with the current date\n */\n const date = new Date();\n\n date.setDate(date.getDate() - days);\n this.fromDate = date.toISOString();\n const sortByParam = Object.values(SORT_BY).includes(sortBy) ? sortBy : SORT_BY.DEFAULT;\n const sortParam = Object.values(SORT).includes(sort) ? sort : SORT.DEFAULT;\n\n log.log(`Janus API URL ${this.janusUrl}`, this.loggerContext);\n log.info(`Call history from date : ${this.fromDate}`, this.loggerContext);\n log.info(`Call history sort type : ${sortParam}`, this.loggerContext);\n log.info(`Call history sortby type : ${sortByParam}`, this.loggerContext);\n const url = `${this.janusUrl}/${HISTORY}/${USER_SESSIONS}${FROM_DATE}=${this.fromDate}&limit=${limit}&includeNewSessionTypes=true&sort=${sortParam}`;\n\n try {\n const janusResponse = <WebexRequestPayload>await this.webex.request({\n uri: `${url}`,\n method: HTTP_METHODS.GET,\n service: ALLOWED_SERVICES.JANUS,\n });\n\n this.userSessions = janusResponse.body as UserSession[];\n if (sortByParam === SORT_BY.START_TIME) {\n if (sortParam === SORT.DESC) {\n this.userSessions[USER_SESSIONS].sort(\n (element: Date, compareElement: Date) =>\n new Date(compareElement[sortByParam]).getTime() -\n new Date(element[sortByParam]).getTime()\n );\n } else if (sortParam === SORT.ASC) {\n this.userSessions[USER_SESSIONS].sort(\n (element: Date, compareElement: Date) =>\n new Date(element[sortByParam]).getTime() -\n new Date(compareElement[sortByParam]).getTime()\n );\n }\n }\n const responseDetails = {\n statusCode: this.userSessions[STATUS_CODE],\n data: {\n userSessions: this.userSessions[USER_SESSIONS],\n },\n message: SUCCESS_MESSAGE,\n };\n\n return responseDetails;\n } catch (err: unknown) {\n const errorInfo = err as WebexRequestPayload;\n const errorStatus = serviceErrorCodeHandler(errorInfo, this.loggerContext);\n\n return errorStatus;\n }\n }\n\n /**\n *\n */\n private registerSessionsListener() {\n this.sdkConnector.registerListener<CallSessionEvent>(\n MOBIUS_EVENT_KEYS.CALL_SESSION_EVENT_INCLUSIVE,\n async (event?: CallSessionEvent) => {\n if (event && event.data.userSessions.userSessions) {\n this.emit(COMMON_EVENT_KEYS.CALL_HISTORY_USER_SESSION_INFO, event as CallSessionEvent);\n }\n }\n );\n }\n}\n/**\n * Creates a `CallHistory` client instance for accessing Call History APIs.\n *\n * @param {WebexSDK} webex - `Webex SDK` instance.\n * @param {LoggerInterface} logger - An instance implementing LoggerInterface used to set the log level for the module.\n */\nexport const createCallHistoryClient = (webex: WebexSDK, logger: LoggerInterface): ICallHistory =>\n new CallHistory(webex, logger);\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAEA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAEA,IAAAE,OAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,MAAA,GAAAH,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,OAAA,gBAAA+C,YAAA,CAAA/C,OAAA,CAAAgD,IAAA,CAC9C,SAAAuE,SAAOC,KAAwB;UAAA,OAAAzE,YAAA,CAAA/C,OAAA,CAAA+D,IAAA,UAAA0D,UAAAC,SAAA;YAAA,kBAAAA,SAAA,CAAAxD,IAAA,GAAAwD,SAAA,CAAAvD,IAAA;cAAA;gBAC7B,IAAIqD,KAAK,IAAIA,KAAK,CAACd,IAAI,CAACV,YAAY,CAACA,YAAY,EAAE;kBACjDkB,MAAI,CAACS,IAAI,CAACC,yBAAiB,CAACC,8BAA8B,EAAEL,KAAK,CAAqB;gBACxF;cAAC;cAAA;gBAAA,OAAAE,SAAA,CAAAV,IAAA;YAAA;UAAA,GAAAO,QAAA;QAAA,CACF;QAAA,iBAAAO,EAAA;UAAA,OAAAR,IAAA,CAAAhH,KAAA,OAAAD,SAAA;QAAA;MAAA,IACF;IACH;EAAC;EAAA,OAAAW,WAAA;AAAA,EAjH8B+G,cAAQ;AAmHzC;AACA;AACA;AACA;AACA;AACA;AALAC,OAAA,CAAAhH,WAAA,GAAAA,WAAA;AAMO,IAAMiH,uBAAuB,GAAG,SAA1BA,uBAAuBA,CAAI7G,KAAe,EAAEC,MAAuB;EAAA,OAC9E,IAAIL,WAAW,CAACI,KAAK,EAAEC,MAAM,CAAC;AAAA;AAAC2G,OAAA,CAAAC,uBAAA,GAAAA,uBAAA"}
|
|
1
|
+
{"version":3,"names":["_SDKConnector","_interopRequireDefault","require","_types","_Logger","_Utils","_constants","_constants2","_types2","_impl","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","default","result","NewTarget","constructor","_Reflect$construct","arguments","apply","_possibleConstructorReturn2","Reflect","sham","Proxy","Boolean","prototype","valueOf","call","e","CallHistory","_Eventing","_inherits2","_super","webex","logger","_this","_classCallCheck2","_defineProperty2","_assertThisInitialized2","file","CALL_HISTORY_FILE","method","sdkConnector","SDKConnector","getWebex","setWebex","janusUrl","internal","services","_serviceUrls","janus","registerSessionsListener","log","setLogger","level","_createClass2","key","value","_getCallHistoryData","_asyncToGenerator2","_regenerator","mark","_callee","days","limit","sort","sortBy","date","sortByParam","sortParam","url","janusResponse","responseDetails","errorInfo","errorStatus","_args","wrap","_callee$","_context","prev","next","length","undefined","NUMBER_OF_DAYS","LIMIT","SORT","DEFAULT","SORT_BY","Date","setDate","getDate","fromDate","toISOString","_values","includes","concat","loggerContext","info","HISTORY","USER_SESSIONS","FROM_DATE","request","uri","HTTP_METHODS","GET","service","ALLOWED_SERVICES","JANUS","sent","userSessions","body","START_TIME","DESC","element","compareElement","getTime","ASC","statusCode","STATUS_CODE","data","message","SUCCESS_MESSAGE","abrupt","t0","serviceErrorCodeHandler","stop","getCallHistoryData","_this2","registerListener","MOBIUS_EVENT_KEYS","CALL_SESSION_EVENT_INCLUSIVE","_ref","_callee2","event","_callee2$","_context2","emit","COMMON_EVENT_KEYS","CALL_HISTORY_USER_SESSION_INFO","_x","Eventing","exports","createCallHistoryClient"],"sources":["CallHistory.ts"],"sourcesContent":["/* eslint-disable dot-notation */\n/* eslint-disable no-underscore-dangle */\nimport SDKConnector from '../SDKConnector';\nimport {ISDKConnector, WebexSDK} from '../SDKConnector/types';\nimport {ALLOWED_SERVICES, HTTP_METHODS, WebexRequestPayload, SORT, SORT_BY} from '../common/types';\nimport {ICallHistory, JanusResponseEvent, LoggerInterface} from './types';\nimport log from '../Logger';\nimport {serviceErrorCodeHandler} from '../common/Utils';\nimport {CALL_HISTORY_FILE, FROM_DATE, HISTORY, LIMIT, NUMBER_OF_DAYS} from './constants';\nimport {STATUS_CODE, SUCCESS_MESSAGE, USER_SESSIONS} from '../common/constants';\nimport {\n COMMON_EVENT_KEYS,\n CallHistoryEventTypes,\n CallSessionEvent,\n MOBIUS_EVENT_KEYS,\n UserSession,\n} from '../Events/types';\nimport {Eventing} from '../Events/impl';\n/**\n * `CallHistory` module is designed to facilitate the retrieval of Call History Records by providing a set of APIs.\n *\n * This code snippet demonstrates how to create an instance of `CallHistory` using webex and logger.\n *\n * @example\n * ```javascript\n * const callHistory = createCallHistoryClient(webex, logger);\n * ```\n */\nexport class CallHistory extends Eventing<CallHistoryEventTypes> implements ICallHistory {\n private sdkConnector: ISDKConnector;\n\n private webex: WebexSDK;\n\n private janusUrl = '';\n\n private fromDate = '';\n\n private loggerContext = {\n file: CALL_HISTORY_FILE,\n method: 'getCallHistoryData',\n };\n\n private userSessions: UserSession[] | undefined;\n\n /**\n * @ignore\n */\n constructor(webex: WebexSDK, logger: LoggerInterface) {\n super();\n this.sdkConnector = SDKConnector;\n if (!this.sdkConnector.getWebex()) {\n SDKConnector.setWebex(webex);\n }\n this.webex = this.sdkConnector.getWebex();\n this.janusUrl = this.webex.internal.services._serviceUrls.janus;\n this.registerSessionsListener();\n log.setLogger(logger.level, CALL_HISTORY_FILE);\n }\n\n /**\n * Function to display the Janus API response.\n * @param days - Number of days to fetch the call history data.\n * @param limit - Number of records to be fetched.\n * @param sort - Sort the records in ascending or descending order.\n * @param sortBy - Sort the records by start time or end time.\n */\n public async getCallHistoryData(\n days: number = NUMBER_OF_DAYS,\n limit: number = LIMIT,\n sort: SORT = SORT.DEFAULT,\n sortBy: SORT_BY = SORT_BY.DEFAULT\n ): Promise<JanusResponseEvent> {\n /*\n 1. Mandatory field for Janus API - fromDate\n 2. Calculating the fromDate by deducting the NUMBER_OF_DAYS with the current date\n */\n const date = new Date();\n\n date.setDate(date.getDate() - days);\n this.fromDate = date.toISOString();\n const sortByParam = Object.values(SORT_BY).includes(sortBy) ? sortBy : SORT_BY.DEFAULT;\n const sortParam = Object.values(SORT).includes(sort) ? sort : SORT.DEFAULT;\n\n log.log(`Janus API URL ${this.janusUrl}`, this.loggerContext);\n log.info(`Call history from date : ${this.fromDate}`, this.loggerContext);\n log.info(`Call history sort type : ${sortParam}`, this.loggerContext);\n log.info(`Call history sortby type : ${sortByParam}`, this.loggerContext);\n const url = `${this.janusUrl}/${HISTORY}/${USER_SESSIONS}${FROM_DATE}=${this.fromDate}&limit=${limit}&includeNewSessionTypes=true&sort=${sortParam}`;\n\n try {\n const janusResponse = <WebexRequestPayload>await this.webex.request({\n uri: `${url}`,\n method: HTTP_METHODS.GET,\n service: ALLOWED_SERVICES.JANUS,\n });\n\n this.userSessions = janusResponse.body as UserSession[];\n if (sortByParam === SORT_BY.START_TIME) {\n if (sortParam === SORT.DESC) {\n this.userSessions[USER_SESSIONS].sort(\n (element: Date, compareElement: Date) =>\n new Date(compareElement[sortByParam]).getTime() -\n new Date(element[sortByParam]).getTime()\n );\n } else if (sortParam === SORT.ASC) {\n this.userSessions[USER_SESSIONS].sort(\n (element: Date, compareElement: Date) =>\n new Date(element[sortByParam]).getTime() -\n new Date(compareElement[sortByParam]).getTime()\n );\n }\n }\n const responseDetails = {\n statusCode: this.userSessions[STATUS_CODE],\n data: {\n userSessions: this.userSessions[USER_SESSIONS],\n },\n message: SUCCESS_MESSAGE,\n };\n\n return responseDetails;\n } catch (err: unknown) {\n const errorInfo = err as WebexRequestPayload;\n const errorStatus = serviceErrorCodeHandler(errorInfo, this.loggerContext);\n\n return errorStatus;\n }\n }\n\n /**\n *\n */\n private registerSessionsListener() {\n this.sdkConnector.registerListener<CallSessionEvent>(\n MOBIUS_EVENT_KEYS.CALL_SESSION_EVENT_INCLUSIVE,\n async (event?: CallSessionEvent) => {\n if (event && event.data.userSessions.userSessions) {\n this.emit(COMMON_EVENT_KEYS.CALL_HISTORY_USER_SESSION_INFO, event as CallSessionEvent);\n }\n }\n );\n }\n}\n/**\n * Creates a `CallHistory` client instance for accessing Call History APIs.\n *\n * @param {WebexSDK} webex - `Webex SDK` instance.\n * @param {LoggerInterface} logger - An instance implementing LoggerInterface used to set the log level for the module.\n */\nexport const createCallHistoryClient = (webex: WebexSDK, logger: LoggerInterface): ICallHistory =>\n new CallHistory(webex, logger);\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAEA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AA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,CAACrF,YAAY,CAACsF,gBAAgB,CAChCC,yBAAiB,CAACC,4BAA4B;QAAA,IAAAC,IAAA,OAAAxE,kBAAA,CAAA9C,OAAA,gBAAA+C,YAAA,CAAA/C,OAAA,CAAAgD,IAAA,CAC9C,SAAAuE,SAAOC,KAAwB;UAAA,OAAAzE,YAAA,CAAA/C,OAAA,CAAA+D,IAAA,UAAA0D,UAAAC,SAAA;YAAA,kBAAAA,SAAA,CAAAxD,IAAA,GAAAwD,SAAA,CAAAvD,IAAA;cAAA;gBAC7B,IAAIqD,KAAK,IAAIA,KAAK,CAACd,IAAI,CAACV,YAAY,CAACA,YAAY,EAAE;kBACjDkB,MAAI,CAACS,IAAI,CAACC,yBAAiB,CAACC,8BAA8B,EAAEL,KAAK,CAAqB;gBACxF;cAAC;cAAA;gBAAA,OAAAE,SAAA,CAAAV,IAAA;YAAA;UAAA,GAAAO,QAAA;QAAA,CACF;QAAA,iBAAAO,EAAA;UAAA,OAAAR,IAAA,CAAAhH,KAAA,OAAAD,SAAA;QAAA;MAAA,IACF;IACH;EAAC;EAAA,OAAAW,WAAA;AAAA,EAjH8B+G,cAAQ;AAmHzC;AACA;AACA;AACA;AACA;AACA;AALAC,OAAA,CAAAhH,WAAA,GAAAA,WAAA;AAMO,IAAMiH,uBAAuB,GAAG,SAA1BA,uBAAuBA,CAAI7G,KAAe,EAAEC,MAAuB;EAAA,OAC9E,IAAIL,WAAW,CAACI,KAAK,EAAEC,MAAM,CAAC;AAAA;AAAC2G,OAAA,CAAAC,uBAAA,GAAAA,uBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import {Eventing} from '../Events/impl';\nimport {CallHistoryEventTypes, UserSession} from '../Events/types';\nimport {LOGGER} from '../Logger/types';\nimport {SORT, SORT_BY} from '../common/types';\n\nexport interface LoggerInterface {\n level: LOGGER;\n}\n\nexport type JanusResponseEvent = {\n statusCode: number;\n data: {\n userSessions?: UserSession[];\n error?: string;\n };\n message: string | null;\n};\n\n/**\n * Interface for CallHistory Client.\n * This encompasses a set of APIs designed to facilitate the retrieval of recent Call History Record.\n */\nexport interface ICallHistory extends Eventing<CallHistoryEventTypes> {\n /**\n * This API `getCallHistoryData` is utilized to request and retrieve Call History Records based on specified parameters.\n * It accepts the following input parameters:\n *\n * @param days - Number of days to fetch the call history data.\n * @param limit - Number of records to be fetched.\n * @param sort - Sort the records in ascending or descending order.\n * @param sortBy - Sort the records by start time or end time.\n *\n *
|
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import {Eventing} from '../Events/impl';\nimport {CallHistoryEventTypes, UserSession} from '../Events/types';\nimport {LOGGER} from '../Logger/types';\nimport {SORT, SORT_BY} from '../common/types';\n\nexport interface LoggerInterface {\n level: LOGGER;\n}\n\nexport type JanusResponseEvent = {\n statusCode: number;\n data: {\n userSessions?: UserSession[];\n error?: string;\n };\n message: string | null;\n};\n\n/**\n * Interface for CallHistory Client.\n * This encompasses a set of APIs designed to facilitate the retrieval of recent Call History Record.\n */\nexport interface ICallHistory extends Eventing<CallHistoryEventTypes> {\n /**\n * This API `getCallHistoryData` is utilized to request and retrieve Call History Records based on specified parameters.\n * It accepts the following input parameters:\n *\n * @param days - Number of days to fetch the call history data.\n * @param limit - Number of records to be fetched.\n * @param sort - Sort the records in ascending or descending order.\n * @param sortBy - Sort the records by start time or end time.\n *\n * @example\n * ```javascript\n * const callHistoryResponse = await callHistory.getCallHistoryData(days, limit, sort, sortBy);\n * ```\n */\n getCallHistoryData(\n days: number,\n limit: number,\n sort: SORT,\n sortBy: SORT_BY\n ): Promise<JanusResponseEvent>;\n}\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import {LOGGER} from '../Logger/types';\n\nexport interface LoggerInterface {\n level: LOGGER;\n}\n\nexport type ToggleSetting = {\n enabled: boolean;\n ringSplashEnabled?: boolean;\n};\n\n/**\n * `CallForwardAlwaysSetting` object used for Call forwarding APIs in case of always forwarding.\n */\nexport type CallForwardAlwaysSetting = {\n /**\n * This indicates if the call forward always is enabled or disabled.\n */\n enabled: boolean;\n /**\n * If this property is set to true, a brief tone will be played on the user's line when a call has been forwarded.\n */\n ringReminderEnabled?: boolean;\n /**\n * This property signifies whether incoming calls are directed to the voicemail of the destination number,\n * provided that the destination is an internal phone number with an enabled voicemail service.\n */\n destinationVoicemailEnabled?: boolean;\n /**\n * Specify the destination number to which the call is forwarded when the call goes unanswered.\n * Destination is a phone number or a voicemail.\n */\n destination?: string;\n};\n\n/**\n * `CallForwardSetting` object used within the callSetting object for Call forwarding APIs\n */\nexport type CallForwardSetting = {\n callForwarding: {\n /**\n * Object to configure properties to enable/disable call forward to a destination of your choice for all the incoming calls.\n */\n always: CallForwardAlwaysSetting;\n /**\n * Object to configure properties to enable/disable call forwarding to a destination of your choice when the user's line is busy.\n */\n busy: {\n /**\n * This indicates if the call forward is enabled or disabled when the user's line is busy.\n */\n enabled: boolean;\n /**\n * This property signifies whether incoming calls are directed to the voicemail of the destination number when the user's line is busy,\n * provided that the destination is an internal phone number with an enabled voicemail service.\n */\n destinationVoicemailEnabled?: boolean;\n /**\n * Specify the destination number to which the call is forwarded in case of an unanswered call, if this feature is enabled.\n * The destination can be either a phone number or a voicemail service.\n */\n destination?: string;\n };\n /**\n * Object to configure properties to enable/disable call forward to a destination of your choice in case the call goes unanswered.\n */\n noAnswer: {\n /**\n * This indicates if the call forward is enabled or disabled when the call goes unanswered.\n */\n enabled: boolean;\n /**\n * This property indicates number of rings before the call is forwarded to the destination number if unanswered.\n */\n numberOfRings?: number;\n /**\n * System-wide maximum number of rings allowed to specify under numberOfRings property.\n */\n systemMaxNumberOfRings?: number;\n /**\n * This property signifies whether incoming calls are directed to the voicemail of the destination number when the call goes unanswered,\n * provided that the destination is an internal phone number with an enabled voicemail service.\n */\n destinationVoicemailEnabled?: boolean;\n /**\n * If noAnswer is enabled, incoming calls are routed to the specified destination number in the event that the call remains unanswered.\n * This destination can be either a phone number or a voicemail.\n */\n destination?: string;\n };\n };\n /**\n * Object to configure properties to enable/disable call forward to a destination of your choice when the user's line is not connected to the network.\n */\n businessContinuity: {\n /**\n * This indicates if the call forward is enabled or disabled when the user's line is not connected to the network.\n */\n enabled: boolean;\n /**\n * This property signifies whether incoming calls are directed to the voicemail of the destination number in case the user's line is not connected to the network,\n * provided that the destination is an internal phone number with an enabled voicemail service.\n */\n destinationVoicemailEnabled?: boolean;\n /**\n * Once the \"businessContinuity\" feature is enabled, calls will be redirected to the specified destination number in case the user's line is not connected to the network.\n * The designated destination can either be a phone number or a voicemail service.\n */\n destination?: string;\n };\n};\n\n/**\n * `VoicemailSetting` object used within the callSetting object for Voicemail APIs\n */\nexport type VoicemailSetting = {\n /**\n * Boolean property to indicate if the voicemail is enabled/disabled for the user.\n */\n enabled: boolean;\n /**\n * Object to configure properties for enabling/disabling the forwarding of all the incoming calls to voicemail.\n * Please note that this setting can only be adjusted when voicemail is enabled.\n */\n sendAllCalls: {\n /**\n * This indicates if the voicemail is enabled/disabled for all the incoming calls.\n */\n enabled: boolean;\n };\n /**\n * Object to configure properties for enabling/disabling the forwarding of busy calls to voicemail.\n * Please note that this setting can only be adjusted when voicemail is enabled.\n */\n sendBusyCalls: {\n /**\n * This indicates if the voicemail is enabled/disabled for the calls when the user's line is busy.\n */\n enabled: boolean;\n /**\n * Type of voicemail greeting to be played when the user's line is busy, 'default' or 'custom' is specified here.\n */\n greeting?: string;\n /**\n * This indicates if the custom voicemail greeting is uploaded or not.\n */\n greetingUploaded?: boolean;\n };\n /**\n * Object to configure properties for enabling/disabling the forwarding of unanswered calls to voicemail.\n * Please note that this setting can only be adjusted when voicemail is enabled.\n */\n sendUnansweredCalls: {\n /**\n * This indicates if the voicemail is enabled/disabled for the calls when the call goes unanswered.\n */\n enabled: boolean;\n /**\n * Type of voicemail greeting to be played when the call goes unanswered, 'default' or 'custom' is specified here.\n */\n greeting?: string;\n /**\n * This indicates if the custom voicemail greeting is uploaded or not.\n */\n greetingUploaded?: boolean;\n /**\n * This property indicates number of rings before the call goes to voicemail if unanswered.\n */\n numberOfRings: number;\n /**\n * System-wide maximum number of rings allowed to specify under numberOfRings property.\n */\n systemMaxNumberOfRings?: number;\n };\n /**\n * Settings for sending notifications when there are any new voicemails.\n */\n notifications: {\n /**\n * Boolean property to indicate if sending notifications for any new voicemails is enabled/disabled.\n */\n enabled: boolean;\n /**\n * Notifications are sent to the email address specifed here when there are any new voicemails.\n */\n destination?: string;\n };\n /**\n * Settings for voicemail caller to transfer to a different number by pressing zero (0).\n */\n transferToNumber?: {\n /**\n * Boolean property to indicate if voicemail caller transfer to a destination is enabled/disabled if they press zero (0).\n */\n enabled: boolean;\n /**\n * \tThe number voicemail caller will be transferred to when they press zero (0).\n */\n destination: string;\n };\n /**\n * Settings for sending a copy of new voicemail message audio via email.\n */\n emailCopyOfMessage: {\n /**\n * Boolean property to enable sending the copy of the new voicemail message audio will be sent to the designated email address.\n */\n enabled: boolean;\n /**\n * Email address to which the new voicemail audio will be sent\n */\n emailId?: string;\n };\n /**\n * Object to configure the storage for new voicemails\n */\n messageStorage: {\n /**\n * Property to indicate on the line that there are new voicemails in the mailbox if enabled.\n */\n mwiEnabled: boolean;\n /**\n * Designates which type of voicemail message storage to use, 'internal' or 'external' is specified here.\n */\n storageType: string;\n /**\n * External email address to which the new voicemail audio will be sent.\n */\n externalEmail?: string;\n };\n /**\n * \tSettings for sending fax messages for new voicemails.\n */\n faxMessage?: {\n /**\n * Boolean property to enable sending fax messages to the designated number for new voicemails.\n */\n enabled: boolean;\n /**\n * Designated phone number is specified here where fax messages will be sent to if enabled for new voicemails.\n */\n phoneNumber?: string;\n /**\n * Designated optional extension is specified here where fax messages will be sent to if enabled for new voicemails.\n */\n extension?: string;\n };\n /**\n *\n */\n voiceMessageForwardingEnabled?: boolean;\n};\n\nexport type CallSettingResponse = {\n statusCode: number;\n data: {\n callSetting?: ToggleSetting | CallForwardSetting | VoicemailSetting | CallForwardAlwaysSetting;\n error?: string;\n };\n message: string | null;\n};\n\n/**\n * Interface for Call Settings Module.\n * This encompasses set of APIs that allows to retrieve and update the settings like CallWaiting, DND, CallForward, Voicemail and more.\n\n * These APIs return promises that resolve to a `CallSettingResponse` object, which contains a status code, data, and message.\n * The data field within this response object holds the `callSetting` object, which can take on different types depending on the specific API called.\n *\n * Example\n * ```json\n * {\n * statusCode: 200,\n * data: {\n * callSetting: ToggleSetting | CallForwardSetting | VoicemailSetting | CallForwardAlwaysSetting\n * },\n * message: 'SUCCESS'| 'FAILURE' | null\n * }\n * ```\n */\nexport interface ICallSettings {\n /**\n * This API is used to fetch the call waiting setting.\n *\n * Example\n * ```javascript\n * const callWaitingResponse = await callSettings.getCallWaitingSetting();\n * ```\n *\n * The callWaitingResponse object will have callSetting object with the properties as mentioned in `ToggleSetting`.\n *\n * Example - ToggleSetting\n * ```json\n * {\n * statusCode: 200,\n * data: {\n * callSetting: {\n * enabled: true,\n * ringSplashEnabled: true\n * },\n * },\n * message: null\n * }\n * ```\n */\n getCallWaitingSetting(): Promise<CallSettingResponse>;\n\n /**\n * This API is used to fetch the do not disturb(DND) status.\n *\n * Example\n * ```javascript\n * const dndResponse = await callSettings.getDoNotDisturbSetting();\n * ```\n *\n * The dndResponse object will have callSetting object with the properties as mentioned in `ToggleSetting`.\n *\n * Example - ToggleSetting\n * ```json\n * {\n * statusCode: 200,\n * data: {\n * callSetting: {\n * enabled: true,\n * ringSplashEnabled: true\n * },\n * },\n * message: null\n * }\n * ```\n */\n getDoNotDisturbSetting(): Promise<CallSettingResponse>;\n\n /**\n * This API is used to set DND to true or false based on parameter received.\n *\n * Example\n * ```javascript\n * const dndResponse = await callSettings.setDoNotDisturbSetting(true|false);\n * ```\n */\n setDoNotDisturbSetting(flag: boolean): Promise<CallSettingResponse>;\n\n /**\n * This API is used to fetch the call forward setting.\n *\n * Example\n * ```javascript\n * const callForwardResponse = await callSettings.getCallForwardSetting();\n * ```\n *\n * The `callForwardResponse` object will have callSetting object with the properties as mentioned in {@link CallForwardSetting}.\n */\n getCallForwardSetting(): Promise<CallSettingResponse>;\n\n /**\n * This API is used to set the call forward setting.\n * ```javascript\n * const callForwardResponse = await callSettings.setCallForwardSetting(callForwardSetting);\n * ```\n *\n * The `callForwardSetting` object will be populated with the properties as mentioned in {@link CallForwardSetting} and passed as a parameter to the API.\n */\n setCallForwardSetting(request: CallForwardSetting): Promise<CallSettingResponse>;\n\n /**\n * This API is used to fetch the voicemail.\n * Example\n * ```javascript\n * const voicemailResponse = await callSettings.getVoicemailSetting();\n * ```\n *\n * The `voicemailResponse` object will have callSetting object with the properties as mentioned in {@link VoicemailSetting}.\n */\n getVoicemailSetting(): Promise<CallSettingResponse>;\n\n /**\n * This API is used to set voicemail.\n *\n * Example\n * ```javascript\n * const voicemailResponse = await callSettings.setVoicemailSetting();\n * ```\n *\n * The `voicemailSetting` object will be populated with the properties as mentioned in {@link VoicemailSetting} and passed as a parameter to the API.\n */\n setVoicemailSetting(request: VoicemailSetting): Promise<CallSettingResponse>;\n\n /**\n * This API is used to fetch the call forward settings including the Voicemail.\n *\n * @param directoryNumber - Directory number for which the call forward always setting is to be fetched.\n * This parameter is only required for Cloud Connected Unified Communications(CCUC): https://www.cisco.com/c/en/us/products/unified-communications/webex-cloud-connected-uc/index.html backend.\n *\n * Example\n * ```javascript\n * const callForwardAlwaysResponse = await callSettings.setVoicemailSetting();\n * ```\n *\n * The `callForwardAlwaysResponse` object will have callSetting object with the properties as mentioned in {@link CallForwardAlwaysSetting}.\n */\n getCallForwardAlwaysSetting(directoryNumber?: string): Promise<CallSettingResponse>;\n}\n\nexport type IWxCallBackendConnector = ICallSettings;\nexport type IUcmBackendConnector = ICallSettings;\n\nexport type CallForwardingAlwaysSettingsUCM = {\n dn: string;\n destination?: string;\n destinationVoicemailEnabled: boolean;\n};\n\nexport type CallForwardingSettingsUCM = {\n callForwarding: {\n always: CallForwardingAlwaysSettingsUCM[];\n };\n};\n"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import {LOGGER} from '../Logger/types';\n\nexport interface LoggerInterface {\n level: LOGGER;\n}\n\nexport type ToggleSetting = {\n enabled: boolean;\n ringSplashEnabled?: boolean;\n};\n\n/**\n * `CallForwardAlwaysSetting` object used for Call forwarding APIs in case of always forwarding.\n */\nexport type CallForwardAlwaysSetting = {\n /**\n * This indicates if the call forward always is enabled or disabled.\n */\n enabled: boolean;\n /**\n * If this property is set to true, a brief tone will be played on the user's line when a call has been forwarded.\n */\n ringReminderEnabled?: boolean;\n /**\n * This property signifies whether incoming calls are directed to the voicemail of the destination number,\n * provided that the destination is an internal phone number with an enabled voicemail service.\n */\n destinationVoicemailEnabled?: boolean;\n /**\n * Specify the destination number to which the call is forwarded when the call goes unanswered.\n * Destination is a phone number or a voicemail.\n */\n destination?: string;\n};\n\n/**\n * `CallForwardSetting` object used within the callSetting object for Call forwarding APIs\n */\nexport type CallForwardSetting = {\n callForwarding: {\n /**\n * Object to configure properties to enable/disable call forward to a destination of your choice for all the incoming calls.\n */\n always: CallForwardAlwaysSetting;\n /**\n * Object to configure properties to enable/disable call forwarding to a destination of your choice when the user's line is busy.\n */\n busy: {\n /**\n * This indicates if the call forward is enabled or disabled when the user's line is busy.\n */\n enabled: boolean;\n /**\n * This property signifies whether incoming calls are directed to the voicemail of the destination number when the user's line is busy,\n * provided that the destination is an internal phone number with an enabled voicemail service.\n */\n destinationVoicemailEnabled?: boolean;\n /**\n * Specify the destination number to which the call is forwarded in case of an unanswered call, if this feature is enabled.\n * The destination can be either a phone number or a voicemail service.\n */\n destination?: string;\n };\n /**\n * Object to configure properties to enable/disable call forward to a destination of your choice in case the call goes unanswered.\n */\n noAnswer: {\n /**\n * This indicates if the call forward is enabled or disabled when the call goes unanswered.\n */\n enabled: boolean;\n /**\n * This property indicates number of rings before the call is forwarded to the destination number if unanswered.\n */\n numberOfRings?: number;\n /**\n * System-wide maximum number of rings allowed to specify under numberOfRings property.\n */\n systemMaxNumberOfRings?: number;\n /**\n * This property signifies whether incoming calls are directed to the voicemail of the destination number when the call goes unanswered,\n * provided that the destination is an internal phone number with an enabled voicemail service.\n */\n destinationVoicemailEnabled?: boolean;\n /**\n * If noAnswer is enabled, incoming calls are routed to the specified destination number in the event that the call remains unanswered.\n * This destination can be either a phone number or a voicemail.\n */\n destination?: string;\n };\n };\n /**\n * Object to configure properties to enable/disable call forward to a destination of your choice when the user's line is not connected to the network.\n */\n businessContinuity: {\n /**\n * This indicates if the call forward is enabled or disabled when the user's line is not connected to the network.\n */\n enabled: boolean;\n /**\n * This property signifies whether incoming calls are directed to the voicemail of the destination number in case the user's line is not connected to the network,\n * provided that the destination is an internal phone number with an enabled voicemail service.\n */\n destinationVoicemailEnabled?: boolean;\n /**\n * Once the \"businessContinuity\" feature is enabled, calls will be redirected to the specified destination number in case the user's line is not connected to the network.\n * The designated destination can either be a phone number or a voicemail service.\n */\n destination?: string;\n };\n};\n\n/**\n * `VoicemailSetting` object used within the callSetting object for Voicemail APIs\n */\nexport type VoicemailSetting = {\n /**\n * Boolean property to indicate if the voicemail is enabled/disabled for the user.\n */\n enabled: boolean;\n /**\n * Object to configure properties for enabling/disabling the forwarding of all the incoming calls to voicemail.\n * Please note that this setting can only be adjusted when voicemail is enabled.\n */\n sendAllCalls: {\n /**\n * This indicates if the voicemail is enabled/disabled for all the incoming calls.\n */\n enabled: boolean;\n };\n /**\n * Object to configure properties for enabling/disabling the forwarding of busy calls to voicemail.\n * Please note that this setting can only be adjusted when voicemail is enabled.\n */\n sendBusyCalls: {\n /**\n * This indicates if the voicemail is enabled/disabled for the calls when the user's line is busy.\n */\n enabled: boolean;\n /**\n * Type of voicemail greeting to be played when the user's line is busy, 'default' or 'custom' is specified here.\n */\n greeting?: string;\n /**\n * This indicates if the custom voicemail greeting is uploaded or not.\n */\n greetingUploaded?: boolean;\n };\n /**\n * Object to configure properties for enabling/disabling the forwarding of unanswered calls to voicemail.\n * Please note that this setting can only be adjusted when voicemail is enabled.\n */\n sendUnansweredCalls: {\n /**\n * This indicates if the voicemail is enabled/disabled for the calls when the call goes unanswered.\n */\n enabled: boolean;\n /**\n * Type of voicemail greeting to be played when the call goes unanswered, 'default' or 'custom' is specified here.\n */\n greeting?: string;\n /**\n * This indicates if the custom voicemail greeting is uploaded or not.\n */\n greetingUploaded?: boolean;\n /**\n * This property indicates number of rings before the call goes to voicemail if unanswered.\n */\n numberOfRings: number;\n /**\n * System-wide maximum number of rings allowed to specify under numberOfRings property.\n */\n systemMaxNumberOfRings?: number;\n };\n /**\n * Settings for sending notifications when there are any new voicemails.\n */\n notifications: {\n /**\n * Boolean property to indicate if sending notifications for any new voicemails is enabled/disabled.\n */\n enabled: boolean;\n /**\n * Notifications are sent to the email address specifed here when there are any new voicemails.\n */\n destination?: string;\n };\n /**\n * Settings for voicemail caller to transfer to a different number by pressing zero (0).\n */\n transferToNumber?: {\n /**\n * Boolean property to indicate if voicemail caller transfer to a destination is enabled/disabled if they press zero (0).\n */\n enabled: boolean;\n /**\n * \tThe number voicemail caller will be transferred to when they press zero (0).\n */\n destination: string;\n };\n /**\n * Settings for sending a copy of new voicemail message audio via email.\n */\n emailCopyOfMessage: {\n /**\n * Boolean property to enable sending the copy of the new voicemail message audio will be sent to the designated email address.\n */\n enabled: boolean;\n /**\n * Email address to which the new voicemail audio will be sent\n */\n emailId?: string;\n };\n /**\n * Object to configure the storage for new voicemails\n */\n messageStorage: {\n /**\n * Property to indicate on the line that there are new voicemails in the mailbox if enabled.\n */\n mwiEnabled: boolean;\n /**\n * Designates which type of voicemail message storage to use, 'internal' or 'external' is specified here.\n */\n storageType: string;\n /**\n * External email address to which the new voicemail audio will be sent.\n */\n externalEmail?: string;\n };\n /**\n * \tSettings for sending fax messages for new voicemails.\n */\n faxMessage?: {\n /**\n * Boolean property to enable sending fax messages to the designated number for new voicemails.\n */\n enabled: boolean;\n /**\n * Designated phone number is specified here where fax messages will be sent to if enabled for new voicemails.\n */\n phoneNumber?: string;\n /**\n * Designated optional extension is specified here where fax messages will be sent to if enabled for new voicemails.\n */\n extension?: string;\n };\n /**\n *\n */\n voiceMessageForwardingEnabled?: boolean;\n};\n\nexport type CallSettingResponse = {\n statusCode: number;\n data: {\n callSetting?: ToggleSetting | CallForwardSetting | VoicemailSetting | CallForwardAlwaysSetting;\n error?: string;\n };\n message: string | null;\n};\n\n/**\n * Interface for Call Settings Module.\n * This encompasses set of APIs that allows to retrieve and update the settings like CallWaiting, DND, CallForward, Voicemail and more.\n\n * These APIs return promises that resolve to a `CallSettingResponse` object, which contains a status code, data, and message.\n * The data field within this response object holds the `callSetting` object, which can take on different types depending on the specific API called.\n *\n * @example\n * ```json\n * {\n * statusCode: 200,\n * data: {\n * callSetting: ToggleSetting | CallForwardSetting | VoicemailSetting | CallForwardAlwaysSetting\n * },\n * message: 'SUCCESS'| 'FAILURE' | null\n * }\n * ```\n */\nexport interface ICallSettings {\n /**\n * This API is used to fetch the call waiting setting.\n *\n * @example\n * ```javascript\n * const callWaitingResponse = await callSettings.getCallWaitingSetting();\n * ```\n *\n * The callWaitingResponse object will have callSetting object with the properties as mentioned in `ToggleSetting`.\n *\n * @example\n * ToggleSetting:\n * ```json\n * {\n * statusCode: 200,\n * data: {\n * callSetting: {\n * enabled: true,\n * ringSplashEnabled: true\n * },\n * },\n * message: null\n * }\n * ```\n */\n getCallWaitingSetting(): Promise<CallSettingResponse>;\n\n /**\n * This API is used to fetch the do not disturb(DND) status.\n *\n * @example\n * ```javascript\n * const dndResponse = await callSettings.getDoNotDisturbSetting();\n * ```\n *\n * The dndResponse object will have callSetting object with the properties as mentioned in `ToggleSetting`.\n *\n * Example - ToggleSetting\n * ```json\n * {\n * statusCode: 200,\n * data: {\n * callSetting: {\n * enabled: true,\n * ringSplashEnabled: true\n * },\n * },\n * message: null\n * }\n * ```\n */\n getDoNotDisturbSetting(): Promise<CallSettingResponse>;\n\n /**\n * This API is used to set DND to true or false based on parameter received.\n *\n * @example\n * ```javascript\n * const dndResponse = await callSettings.setDoNotDisturbSetting(true|false);\n * ```\n */\n setDoNotDisturbSetting(flag: boolean): Promise<CallSettingResponse>;\n\n /**\n * This API is used to fetch the call forward setting.\n *\n * @example\n * ```javascript\n * const callForwardResponse = await callSettings.getCallForwardSetting();\n * ```\n *\n * The `callForwardResponse` object will have callSetting object with the properties as mentioned in {@link CallForwardSetting}.\n */\n getCallForwardSetting(): Promise<CallSettingResponse>;\n\n /**\n * This API is used to set the call forward setting.\n * ```javascript\n * const callForwardResponse = await callSettings.setCallForwardSetting(callForwardSetting);\n * ```\n *\n * The `callForwardSetting` object will be populated with the properties as mentioned in {@link CallForwardSetting} and passed as a parameter to the API.\n */\n setCallForwardSetting(request: CallForwardSetting): Promise<CallSettingResponse>;\n\n /**\n * This API is used to fetch the voicemail.\n * @example\n * ```javascript\n * const voicemailResponse = await callSettings.getVoicemailSetting();\n * ```\n *\n * The `voicemailResponse` object will have callSetting object with the properties as mentioned in {@link VoicemailSetting}.\n */\n getVoicemailSetting(): Promise<CallSettingResponse>;\n\n /**\n * This API is used to set voicemail.\n *\n * @example\n * ```javascript\n * const voicemailResponse = await callSettings.setVoicemailSetting();\n * ```\n *\n * The `voicemailSetting` object will be populated with the properties as mentioned in {@link VoicemailSetting} and passed as a parameter to the API.\n */\n setVoicemailSetting(request: VoicemailSetting): Promise<CallSettingResponse>;\n\n /**\n * This API is used to fetch the call forward settings including the Voicemail.\n *\n * @param directoryNumber - Directory number for which the call forward always setting is to be fetched.\n * This parameter is only required for Cloud Connected Unified Communications(CCUC): https://www.cisco.com/c/en/us/products/unified-communications/webex-cloud-connected-uc/index.html backend.\n *\n * @example\n * ```javascript\n * const callForwardAlwaysResponse = await callSettings.setVoicemailSetting();\n * ```\n *\n * The `callForwardAlwaysResponse` object will have callSetting object with the properties as mentioned in {@link CallForwardAlwaysSetting}.\n */\n getCallForwardAlwaysSetting(directoryNumber?: string): Promise<CallSettingResponse>;\n}\n\nexport type IWxCallBackendConnector = ICallSettings;\nexport type IUcmBackendConnector = ICallSettings;\n\nexport type CallForwardingAlwaysSettingsUCM = {\n dn: string;\n destination?: string;\n destinationVoicemailEnabled: boolean;\n};\n\nexport type CallForwardingSettingsUCM = {\n callForwarding: {\n always: CallForwardingAlwaysSettingsUCM[];\n };\n};\n"],"mappings":""}
|
|
@@ -41,14 +41,20 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
41
41
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
42
42
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
43
43
|
/**
|
|
44
|
+
* The `CallingClient` module provides a set of APIs for line registration and calling functionalities within the SDK.
|
|
44
45
|
*
|
|
46
|
+
* The following code snippet demonstrates how to create an instance of `CallingClient` using a `webex` instance and `callingConfig`:
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```javascript
|
|
50
|
+
* const callingClient = createClient(webex, callingConfig);
|
|
51
|
+
* ```
|
|
45
52
|
*/
|
|
46
53
|
var CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
47
54
|
(0, _inherits2.default)(CallingClient, _Eventing);
|
|
48
55
|
var _super = _createSuper(CallingClient);
|
|
49
56
|
/**
|
|
50
|
-
* @
|
|
51
|
-
* @param config - Config to start the CallingClient with.
|
|
57
|
+
* @ignore
|
|
52
58
|
*/
|
|
53
59
|
function CallingClient(webex, config) {
|
|
54
60
|
var _this$sdkConfig, _this$sdkConfig$servi, _this$sdkConfig2, _this$sdkConfig2$logg;
|
|
@@ -136,6 +142,19 @@ var CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
136
142
|
}
|
|
137
143
|
|
|
138
144
|
// async calls required to run after constructor
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Initializes the `CallingClient` by performing the following steps:
|
|
148
|
+
*
|
|
149
|
+
* 1. Retrieves list of servers.
|
|
150
|
+
* 2. Creates a line.
|
|
151
|
+
* 3. Sets up network change detection.
|
|
152
|
+
*
|
|
153
|
+
* This method should be called once to initialize the `callingClient`.
|
|
154
|
+
*
|
|
155
|
+
* @returns A promise that resolves when the initialization is complete.
|
|
156
|
+
* @ignore
|
|
157
|
+
*/
|
|
139
158
|
(0, _createClass2.default)(CallingClient, [{
|
|
140
159
|
key: "init",
|
|
141
160
|
value: function () {
|
|
@@ -407,25 +426,21 @@ var CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
407
426
|
value:
|
|
408
427
|
/**
|
|
409
428
|
* To get the current log Level.
|
|
410
|
-
*
|
|
411
|
-
* @returns - Log level.
|
|
429
|
+
* @ignore
|
|
412
430
|
*/
|
|
413
431
|
function getLoggingLevel() {
|
|
414
432
|
return _Logger.default.getLogLevel();
|
|
415
433
|
}
|
|
416
434
|
|
|
417
435
|
/**
|
|
418
|
-
*
|
|
436
|
+
* To return the `sdkConnector` instance that was used during sdk initialisation.
|
|
437
|
+
* @ignore
|
|
419
438
|
*/
|
|
420
439
|
}, {
|
|
421
440
|
key: "getSDKConnector",
|
|
422
441
|
value: function getSDKConnector() {
|
|
423
442
|
return this.sdkConnector;
|
|
424
443
|
}
|
|
425
|
-
|
|
426
|
-
/**
|
|
427
|
-
*
|
|
428
|
-
*/
|
|
429
444
|
}, {
|
|
430
445
|
key: "registerSessionsListener",
|
|
431
446
|
value: function registerSessionsListener() {
|
|
@@ -496,9 +511,8 @@ var CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
496
511
|
return createLine;
|
|
497
512
|
}()
|
|
498
513
|
/**
|
|
499
|
-
* Retrieves details of all the
|
|
514
|
+
* Retrieves details of all the Line objects belonging to a User
|
|
500
515
|
* NOTE: currently multiple lines are not supported
|
|
501
|
-
* so this API will return a single line object
|
|
502
516
|
*/
|
|
503
517
|
}, {
|
|
504
518
|
key: "getLines",
|
|
@@ -543,6 +557,7 @@ var CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
543
557
|
return CallingClient;
|
|
544
558
|
}(_impl.Eventing);
|
|
545
559
|
/**
|
|
560
|
+
* Create the `CallingClient` instance using the `webex` object and callingSdk `config`
|
|
546
561
|
* @param webex - A webex instance.
|
|
547
562
|
* @param config - Config to start the CallingClient with.
|
|
548
563
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Media","_interopRequireWildcard","require","_asyncMutex","_Utils","_types","_SDKConnector","_interopRequireDefault","_impl","_types2","_types3","_Logger","_callManager","_constants","_line","_types4","_types5","_Metrics","_getRequireWildcardCache","nodeInterop","_WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","default","cache","has","get","newObj","hasPropertyDescriptor","_Object$defineProperty","_Object$getOwnPropertyDescriptor","key","Object","prototype","hasOwnProperty","call","desc","set","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","constructor","_Reflect$construct","arguments","apply","_possibleConstructorReturn2","Reflect","sham","Proxy","Boolean","valueOf","e","CallingClient","_Eventing","_inherits2","_super","webex","config","_this$sdkConfig","_this$sdkConfig$servi","_this$sdkConfig2","_this$sdkConfig2$logg","_this","_classCallCheck2","_defineProperty2","_assertThisInitialized2","_asyncToGenerator2","_regenerator","mark","_callee2","registration","wrap","_callee2$","_context2","prev","next","_values","lineDict","isDeviceRegistered","mutex","runExclusive","_callee","_callee$","_context","isReconnectPending","log","file","CALLING_CLIENT_FILE","method","CALLS_CLEARED_HANDLER_UTIL","reconnectOnFailure","stop","sdkConnector","SDKConnector","getWebex","setWebex","Mutex","sdkConfig","serviceData","indicator","ServiceIndicator","CALLING","domain","logLevel","logger","level","LOGGER","ERROR","validateServiceData","callManager","getCallManager","metricManager","getMetricManager","mediaEngine","primaryMobiusUris","backupMobiusUris","registerSessionsListener","setLogger","registerCallsClearedListener","_createClass2","value","_init","_callee3","_callee3$","_context3","getMobiusServers","createLine","detectNetworkChange","init","_detectNetworkChange","_callee5","_this2","retry","line","_callee5$","_context5","setInterval","_callee4","_callee4$","_context4","internal","mercury","connected","_keys","getActiveCalls","length","warn","name","lineEmitter","LINE_EVENTS","UNREGISTERED","clearKeepaliveTimer","handleConnectionRestoration","sent","NETWORK_FLAP_TIMEOUT","_getClientRegionInfo","_callee6","_this3","regionInfo","_headers","temp","myIP","response","clientRegionInfo","_callee6$","_context6","request","uri","concat","services","_serviceUrls","mobius","URL_ENDPOINT","IP_ENDPOINT","HTTP_METHODS","GET","headers","CISCO_DEVICE_URL","device","url","SPARK_USER_AGENT","CALLING_USER_AGENT","service","ALLOWED_SERVICES","MOBIUS","body","ipv4","DISCOVERY_URL","addAuthHeader","clientRegion","countryCode","t0","handleCallingClientErrors","clientError","submitRegistrationMetric","METRIC_EVENT","REGISTRATION_ERROR","REG_ACTION","REGISTER","METRIC_TYPE","BEHAVIORAL","emit","CALLING_CLIENT_EVENT_KEYS","GET_MOBIUS_SERVERS_UTIL","abrupt","getClientRegionInfo","_getMobiusServers","_callee7","_this$sdkConfig3","_this$sdkConfig3$disc","_this$sdkConfig4","_this$sdkConfig4$disc","_this4","useDefault","_this$sdkConfig5","_this$sdkConfig5$disc","_this$sdkConfig6","_this$sdkConfig6$disc","_headers3","mobiusServers","mobiusUris","_callee7$","_context7","discovery","country","region","info","filterMobiusUris","primary","backup","logContext","on","ALL_CALLS_CLEARED","callsClearedHandler","getLoggingLevel","getLogLevel","getSDKConnector","_this5","registerListener","MOBIUS_EVENT_KEYS","CALL_SESSION_EVENT_INCLUSIVE","_ref4","_callee8","event","sessionArr","i","_callee8$","_context8","data","userSessions","sessionType","SessionType","WEBEX_CALLING","splice","USER_SESSION_INFO","_x","_createLine","_callee9","_this$sdkConfig7","_callee9$","_context9","Line","userId","LineStatus","INACTIVE","lineId","getLines","activeCalls","calls","forEach","correlationId","push","getConnectedCall","connectCall","isConnected","isHeld","Eventing","exports","createClient","_ref5","_callee10","callingClientInstance","_callee10$","_context10","_x2","_x3"],"sources":["CallingClient.ts"],"sourcesContent":["/* eslint-disable no-underscore-dangle */\n/* eslint-disable valid-jsdoc */\n/* eslint-disable @typescript-eslint/no-shadow */\nimport * as Media from '@webex/internal-media-core';\nimport {Mutex} from 'async-mutex';\nimport {filterMobiusUris, handleCallingClientErrors, validateServiceData} from '../common/Utils';\nimport {LOGGER, LogContext} from '../Logger/types';\nimport SDKConnector from '../SDKConnector';\nimport {ClientRegionInfo, ISDKConnector, WebexSDK} from '../SDKConnector/types';\nimport {Eventing} from '../Events/impl';\nimport {\n CallingClientEventTypes,\n MOBIUS_EVENT_KEYS,\n CallSessionEvent,\n SessionType,\n CALLING_CLIENT_EVENT_KEYS,\n} from '../Events/types';\nimport {\n ServiceIndicator,\n RegionInfo,\n ALLOWED_SERVICES,\n HTTP_METHODS,\n IpInfo,\n MobiusServers,\n WebexRequestPayload,\n} from '../common/types';\nimport {ICallingClient, CallingClientConfig} from './types';\nimport {ICall, ICallManager} from './calling/types';\nimport log from '../Logger';\nimport {getCallManager} from './calling/callManager';\nimport {\n CALLING_CLIENT_FILE,\n CALLS_CLEARED_HANDLER_UTIL,\n CALLING_USER_AGENT,\n CISCO_DEVICE_URL,\n DISCOVERY_URL,\n GET_MOBIUS_SERVERS_UTIL,\n IP_ENDPOINT,\n SPARK_USER_AGENT,\n URL_ENDPOINT,\n NETWORK_FLAP_TIMEOUT,\n} from './constants';\nimport Line from './line';\nimport {ILine, LINE_EVENTS, LineStatus} from './line/types';\nimport {METRIC_EVENT, REG_ACTION, METRIC_TYPE, IMetricManager} from '../Metrics/types';\nimport {getMetricManager} from '../Metrics';\n\n/**\n *\n */\nexport class CallingClient extends Eventing<CallingClientEventTypes> implements ICallingClient {\n private sdkConnector: ISDKConnector;\n\n private webex: WebexSDK;\n\n private mutex: Mutex;\n\n private callManager: ICallManager;\n\n private metricManager: IMetricManager;\n\n private sdkConfig?: CallingClientConfig;\n\n private primaryMobiusUris: string[];\n\n private backupMobiusUris: string[];\n\n public mediaEngine: typeof Media;\n\n private lineDict: Record<string, ILine> = {};\n\n /**\n * @param webex - A webex instance.\n * @param config - Config to start the CallingClient with.\n */\n constructor(webex: WebexSDK, config?: CallingClientConfig) {\n super();\n this.sdkConnector = SDKConnector;\n\n if (!this.sdkConnector.getWebex()) {\n SDKConnector.setWebex(webex);\n }\n this.mutex = new Mutex();\n this.webex = this.sdkConnector.getWebex();\n\n this.sdkConfig = config;\n const serviceData = this.sdkConfig?.serviceData?.indicator\n ? this.sdkConfig.serviceData\n : {indicator: ServiceIndicator.CALLING, domain: ''};\n\n const logLevel = this.sdkConfig?.logger?.level ? this.sdkConfig.logger.level : LOGGER.ERROR;\n validateServiceData(serviceData);\n\n this.callManager = getCallManager(this.webex, serviceData.indicator);\n this.metricManager = getMetricManager(this.webex, serviceData.indicator);\n\n this.mediaEngine = Media;\n\n this.primaryMobiusUris = [];\n this.backupMobiusUris = [];\n\n this.registerSessionsListener();\n\n log.setLogger(logLevel, CALLING_CLIENT_FILE);\n\n this.registerCallsClearedListener();\n }\n\n // async calls required to run after constructor\n public async init() {\n await this.getMobiusServers();\n await this.createLine();\n\n /* Better to run the timer once rather than after every registration */\n this.detectNetworkChange();\n }\n\n /**\n * Register callbacks for network changes.\n */\n private async detectNetworkChange() {\n let retry = false;\n\n // this is a temporary logic to get registration obj\n // it will change once we have proper lineId and multiple lines as well\n const line = Object.values(this.lineDict)[0];\n\n setInterval(async () => {\n if (\n !this.webex.internal.mercury.connected &&\n !retry &&\n !Object.keys(this.callManager.getActiveCalls()).length\n ) {\n log.warn(`Network has flapped, waiting for mercury connection to be up`, {\n file: CALLING_CLIENT_FILE,\n method: this.detectNetworkChange.name,\n });\n\n line.lineEmitter(LINE_EVENTS.UNREGISTERED);\n line.registration.clearKeepaliveTimer();\n\n retry = true;\n }\n\n if (retry && this.webex.internal.mercury.connected) {\n retry = await line.registration.handleConnectionRestoration(retry);\n }\n }, NETWORK_FLAP_TIMEOUT);\n }\n\n /**\n * Fetches countryCode and region of the client.\n */\n private async getClientRegionInfo(): Promise<RegionInfo> {\n const regionInfo = {} as RegionInfo;\n\n try {\n const temp = <WebexRequestPayload>await this.webex.request({\n uri: `${this.webex.internal.services._serviceUrls.mobius}${URL_ENDPOINT}${IP_ENDPOINT}`,\n method: HTTP_METHODS.GET,\n headers: {\n [CISCO_DEVICE_URL]: this.webex.internal.device.url,\n [SPARK_USER_AGENT]: CALLING_USER_AGENT,\n },\n service: ALLOWED_SERVICES.MOBIUS,\n });\n\n const myIP = (temp.body as IpInfo).ipv4;\n const response = <WebexRequestPayload>await this.webex.request({\n uri: `${DISCOVERY_URL}/${myIP}`,\n method: HTTP_METHODS.GET,\n addAuthHeader: false,\n headers: {\n [SPARK_USER_AGENT]: null,\n },\n });\n\n const clientRegionInfo = response.body as ClientRegionInfo;\n\n regionInfo.clientRegion = clientRegionInfo?.clientRegion ? clientRegionInfo.clientRegion : '';\n\n regionInfo.countryCode = clientRegionInfo?.countryCode ? clientRegionInfo.countryCode : '';\n } catch (err: unknown) {\n handleCallingClientErrors(\n err as WebexRequestPayload,\n (clientError) => {\n this.metricManager.submitRegistrationMetric(\n METRIC_EVENT.REGISTRATION_ERROR,\n REG_ACTION.REGISTER,\n METRIC_TYPE.BEHAVIORAL,\n clientError\n );\n this.emit(CALLING_CLIENT_EVENT_KEYS.ERROR, clientError);\n },\n {method: GET_MOBIUS_SERVERS_UTIL, file: CALLING_CLIENT_FILE}\n );\n regionInfo.clientRegion = '';\n regionInfo.countryCode = '';\n }\n\n return regionInfo;\n }\n\n /**\n * Local method for finding the mobius servers.\n */\n private async getMobiusServers() {\n /* Following operations are performed in a synchronous way ->\n\n 1. Get RegionInfo\n 2. Get Mobius Server with that RegionInfo\n 3. Check whether Mobius server was found without any error\n 4. If there is error , we don't need to send registration\n 5. Otherwise send registration\n */\n\n let useDefault = false;\n\n let clientRegion: string;\n let countryCode: string;\n\n if (this.sdkConfig?.discovery?.country && this.sdkConfig?.discovery?.region) {\n log.info('Updating region and country from the SDK config', {\n file: CALLING_CLIENT_FILE,\n method: GET_MOBIUS_SERVERS_UTIL,\n });\n clientRegion = this.sdkConfig?.discovery?.region;\n countryCode = this.sdkConfig?.discovery?.country;\n } else {\n log.info('Updating region and country through Region discovery', {\n file: CALLING_CLIENT_FILE,\n method: GET_MOBIUS_SERVERS_UTIL,\n });\n\n const regionInfo = await this.getClientRegionInfo();\n\n clientRegion = regionInfo.clientRegion;\n countryCode = regionInfo.countryCode;\n }\n\n if (clientRegion && countryCode) {\n log.log(\n `Found Region: ${clientRegion} and country: ${countryCode}, going to fetch Mobius server`,\n '' as LogContext\n );\n\n try {\n const temp = <WebexRequestPayload>await this.webex.request({\n uri: `${this.webex.internal.services._serviceUrls.mobius}${URL_ENDPOINT}?regionCode=${clientRegion}&countryCode=${countryCode}`,\n method: HTTP_METHODS.GET,\n headers: {\n [CISCO_DEVICE_URL]: this.webex.internal.device.url,\n [SPARK_USER_AGENT]: CALLING_USER_AGENT,\n },\n service: ALLOWED_SERVICES.MOBIUS,\n });\n\n log.log('Mobius Server found for the region', '' as LogContext);\n const mobiusServers = temp.body as MobiusServers;\n\n /* update arrays of Mobius Uris. */\n const mobiusUris = filterMobiusUris(\n mobiusServers,\n this.webex.internal.services._serviceUrls.mobius\n );\n this.primaryMobiusUris = mobiusUris.primary;\n this.backupMobiusUris = mobiusUris.backup;\n log.info(\n `Final list of Mobius Servers, primary: ${mobiusUris.primary} and backup: ${mobiusUris.backup}`,\n '' as LogContext\n );\n } catch (err: unknown) {\n handleCallingClientErrors(\n err as WebexRequestPayload,\n (clientError) => {\n this.metricManager.submitRegistrationMetric(\n METRIC_EVENT.REGISTRATION_ERROR,\n REG_ACTION.REGISTER,\n METRIC_TYPE.BEHAVIORAL,\n clientError\n );\n this.emit(CALLING_CLIENT_EVENT_KEYS.ERROR, clientError);\n },\n {method: GET_MOBIUS_SERVERS_UTIL, file: CALLING_CLIENT_FILE}\n );\n\n useDefault = true;\n }\n } else {\n /* Setting this to true because region info is possibly undefined */\n useDefault = true;\n }\n\n /* Use a default URL if Mobius discovery fails either because of region info failure\n * or because the discovered Mobius couldn't be reached\n */\n\n if (useDefault) {\n log.warn('Error in finding Mobius Servers. Will use the default URL.', '' as LogContext);\n this.primaryMobiusUris = [\n `${this.webex.internal.services._serviceUrls.mobius}${URL_ENDPOINT}`,\n ];\n }\n }\n\n /**\n * Registers a listener/handler for ALL_CALLS_CLEARED\n * event emitted by callManager when all the calls\n * present on sdk are cleaned up.\n */\n private registerCallsClearedListener() {\n const logContext = {\n file: CALLING_CLIENT_FILE,\n method: this.registerCallsClearedListener.name,\n };\n\n log.log('Registering listener for all calls cleared event', logContext);\n this.callManager.on(CALLING_CLIENT_EVENT_KEYS.ALL_CALLS_CLEARED, this.callsClearedHandler);\n }\n\n /**\n * Handler registered for ALL_CALLS_CLEARED event emitted by callManager.\n *\n * If re-register attempt was deferred earlier due to active call(s), then it\n * will be attempted here on receiving a notification from callManager that all\n * calls are cleaned up.\n */\n private callsClearedHandler = async () => {\n // this is a temporary logic to get registration obj\n // it will change once we have proper lineId and multiple lines as well\n const {registration} = Object.values(this.lineDict)[0];\n\n if (!registration.isDeviceRegistered()) {\n await this.mutex.runExclusive(async () => {\n if (registration.isReconnectPending()) {\n log.log('All calls cleared, reconnecting', {\n file: CALLING_CLIENT_FILE,\n method: CALLS_CLEARED_HANDLER_UTIL,\n });\n await registration.reconnectOnFailure(CALLS_CLEARED_HANDLER_UTIL);\n }\n });\n }\n };\n\n /**\n * To get the current log Level.\n *\n * @returns - Log level.\n */\n public getLoggingLevel(): LOGGER {\n return log.getLogLevel();\n }\n\n /**\n *\n */\n public getSDKConnector(): ISDKConnector {\n return this.sdkConnector;\n }\n\n /**\n *\n */\n private registerSessionsListener() {\n this.sdkConnector.registerListener<CallSessionEvent>(\n MOBIUS_EVENT_KEYS.CALL_SESSION_EVENT_INCLUSIVE,\n async (event?: CallSessionEvent) => {\n if (event && event.data.userSessions.userSessions) {\n const sessionArr = event?.data.userSessions.userSessions;\n\n if (sessionArr.length === 1) {\n if (sessionArr[0].sessionType !== SessionType.WEBEX_CALLING) {\n return;\n }\n }\n\n for (let i = 0; i < sessionArr.length; i += 1) {\n if (sessionArr[i].sessionType !== SessionType.WEBEX_CALLING) {\n sessionArr.splice(i, 1);\n }\n }\n this.emit(CALLING_CLIENT_EVENT_KEYS.USER_SESSION_INFO, event as CallSessionEvent);\n }\n }\n );\n }\n\n /**\n * Creates line object inside calling client per user\n * NOTE: currently multiple lines are not supported\n */\n private async createLine(): Promise<void> {\n const line = new Line(\n this.webex.internal.device.userId,\n this.webex.internal.device.url,\n LineStatus.INACTIVE,\n this.mutex,\n this.primaryMobiusUris,\n this.backupMobiusUris,\n this.getLoggingLevel(),\n this.sdkConfig?.serviceData\n );\n\n this.lineDict[line.lineId] = line;\n }\n\n /**\n * Retrieves details of all the line objects belonging to a User\n * NOTE: currently multiple lines are not supported\n * so this API will return a single line object\n */\n public getLines(): Record<string, ILine> {\n return this.lineDict;\n }\n\n /**\n * Retrieves call objects for all the active calls present in the client\n */\n public getActiveCalls(): Record<string, ICall[]> {\n const activeCalls = {};\n const calls = this.callManager.getActiveCalls();\n Object.keys(calls).forEach((correlationId) => {\n const call = calls[correlationId];\n if (!activeCalls[call.lineId]) {\n activeCalls[call.lineId] = [];\n }\n activeCalls[call.lineId].push(call);\n });\n\n return activeCalls;\n }\n\n /**\n * Retrieves call object for the connected call in the client\n */\n public getConnectedCall(): ICall | undefined {\n let connectCall;\n const calls = this.callManager.getActiveCalls();\n Object.keys(calls).forEach((correlationId) => {\n if (calls[correlationId].isConnected() && !calls[correlationId].isHeld()) {\n connectCall = calls[correlationId];\n }\n });\n\n return connectCall;\n }\n}\n\n/**\n * @param webex - A webex instance.\n * @param config - Config to start the CallingClient with.\n */\nexport const createClient = async (\n webex: WebexSDK,\n config?: CallingClientConfig\n): Promise<ICallingClient> => {\n const callingClientInstance = new CallingClient(webex, config);\n await callingClientInstance.init();\n\n return callingClientInstance;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAC,sBAAA,CAAAL,OAAA;AAEA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AAOA,IAAAQ,OAAA,GAAAR,OAAA;AAWA,IAAAS,OAAA,GAAAJ,sBAAA,CAAAL,OAAA;AACA,IAAAU,YAAA,GAAAV,OAAA;AACA,IAAAW,UAAA,GAAAX,OAAA;AAYA,IAAAY,KAAA,GAAAP,sBAAA,CAAAL,OAAA;AACA,IAAAa,OAAA,GAAAb,OAAA;AACA,IAAAc,OAAA,GAAAd,OAAA;AACA,IAAAe,QAAA,GAAAf,OAAA;AAA4C,SAAAgB,yBAAAC,WAAA,eAAAC,QAAA,kCAAAC,iBAAA,OAAAD,QAAA,QAAAE,gBAAA,OAAAF,QAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAlB,wBAAAsB,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,aAAAE,OAAA,CAAAF,GAAA,yBAAAA,GAAA,4BAAAG,OAAA,EAAAH,GAAA,UAAAI,KAAA,GAAAT,wB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AA,OAAAN,KAAA,CAAA3O,KAAA,OAAAD,SAAA;EAAA;AAAA,GAQxB;AAAC0O,OAAA,CAAAC,YAAA,GAAAA,YAAA"}
|
|
1
|
+
{"version":3,"names":["Media","_interopRequireWildcard","require","_asyncMutex","_Utils","_types","_SDKConnector","_interopRequireDefault","_impl","_types2","_types3","_Logger","_callManager","_constants","_line","_types4","_types5","_Metrics","_getRequireWildcardCache","nodeInterop","_WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","default","cache","has","get","newObj","hasPropertyDescriptor","_Object$defineProperty","_Object$getOwnPropertyDescriptor","key","Object","prototype","hasOwnProperty","call","desc","set","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","constructor","_Reflect$construct","arguments","apply","_possibleConstructorReturn2","Reflect","sham","Proxy","Boolean","valueOf","e","CallingClient","_Eventing","_inherits2","_super","webex","config","_this$sdkConfig","_this$sdkConfig$servi","_this$sdkConfig2","_this$sdkConfig2$logg","_this","_classCallCheck2","_defineProperty2","_assertThisInitialized2","_asyncToGenerator2","_regenerator","mark","_callee2","registration","wrap","_callee2$","_context2","prev","next","_values","lineDict","isDeviceRegistered","mutex","runExclusive","_callee","_callee$","_context","isReconnectPending","log","file","CALLING_CLIENT_FILE","method","CALLS_CLEARED_HANDLER_UTIL","reconnectOnFailure","stop","sdkConnector","SDKConnector","getWebex","setWebex","Mutex","sdkConfig","serviceData","indicator","ServiceIndicator","CALLING","domain","logLevel","logger","level","LOGGER","ERROR","validateServiceData","callManager","getCallManager","metricManager","getMetricManager","mediaEngine","primaryMobiusUris","backupMobiusUris","registerSessionsListener","setLogger","registerCallsClearedListener","_createClass2","value","_init","_callee3","_callee3$","_context3","getMobiusServers","createLine","detectNetworkChange","init","_detectNetworkChange","_callee5","_this2","retry","line","_callee5$","_context5","setInterval","_callee4","_callee4$","_context4","internal","mercury","connected","_keys","getActiveCalls","length","warn","name","lineEmitter","LINE_EVENTS","UNREGISTERED","clearKeepaliveTimer","handleConnectionRestoration","sent","NETWORK_FLAP_TIMEOUT","_getClientRegionInfo","_callee6","_this3","regionInfo","_headers","temp","myIP","response","clientRegionInfo","_callee6$","_context6","request","uri","concat","services","_serviceUrls","mobius","URL_ENDPOINT","IP_ENDPOINT","HTTP_METHODS","GET","headers","CISCO_DEVICE_URL","device","url","SPARK_USER_AGENT","CALLING_USER_AGENT","service","ALLOWED_SERVICES","MOBIUS","body","ipv4","DISCOVERY_URL","addAuthHeader","clientRegion","countryCode","t0","handleCallingClientErrors","clientError","submitRegistrationMetric","METRIC_EVENT","REGISTRATION_ERROR","REG_ACTION","REGISTER","METRIC_TYPE","BEHAVIORAL","emit","CALLING_CLIENT_EVENT_KEYS","GET_MOBIUS_SERVERS_UTIL","abrupt","getClientRegionInfo","_getMobiusServers","_callee7","_this$sdkConfig3","_this$sdkConfig3$disc","_this$sdkConfig4","_this$sdkConfig4$disc","_this4","useDefault","_this$sdkConfig5","_this$sdkConfig5$disc","_this$sdkConfig6","_this$sdkConfig6$disc","_headers3","mobiusServers","mobiusUris","_callee7$","_context7","discovery","country","region","info","filterMobiusUris","primary","backup","logContext","on","ALL_CALLS_CLEARED","callsClearedHandler","getLoggingLevel","getLogLevel","getSDKConnector","_this5","registerListener","MOBIUS_EVENT_KEYS","CALL_SESSION_EVENT_INCLUSIVE","_ref4","_callee8","event","sessionArr","i","_callee8$","_context8","data","userSessions","sessionType","SessionType","WEBEX_CALLING","splice","USER_SESSION_INFO","_x","_createLine","_callee9","_this$sdkConfig7","_callee9$","_context9","Line","userId","LineStatus","INACTIVE","lineId","getLines","activeCalls","calls","forEach","correlationId","push","getConnectedCall","connectCall","isConnected","isHeld","Eventing","exports","createClient","_ref5","_callee10","callingClientInstance","_callee10$","_context10","_x2","_x3"],"sources":["CallingClient.ts"],"sourcesContent":["/* eslint-disable no-underscore-dangle */\n/* eslint-disable valid-jsdoc */\n/* eslint-disable @typescript-eslint/no-shadow */\nimport * as Media from '@webex/internal-media-core';\nimport {Mutex} from 'async-mutex';\nimport {filterMobiusUris, handleCallingClientErrors, validateServiceData} from '../common/Utils';\nimport {LOGGER, LogContext} from '../Logger/types';\nimport SDKConnector from '../SDKConnector';\nimport {ClientRegionInfo, ISDKConnector, WebexSDK} from '../SDKConnector/types';\nimport {Eventing} from '../Events/impl';\nimport {\n CallingClientEventTypes,\n MOBIUS_EVENT_KEYS,\n CallSessionEvent,\n SessionType,\n CALLING_CLIENT_EVENT_KEYS,\n} from '../Events/types';\nimport {\n ServiceIndicator,\n RegionInfo,\n ALLOWED_SERVICES,\n HTTP_METHODS,\n IpInfo,\n MobiusServers,\n WebexRequestPayload,\n} from '../common/types';\nimport {ICallingClient, CallingClientConfig} from './types';\nimport {ICall, ICallManager} from './calling/types';\nimport log from '../Logger';\nimport {getCallManager} from './calling/callManager';\nimport {\n CALLING_CLIENT_FILE,\n CALLS_CLEARED_HANDLER_UTIL,\n CALLING_USER_AGENT,\n CISCO_DEVICE_URL,\n DISCOVERY_URL,\n GET_MOBIUS_SERVERS_UTIL,\n IP_ENDPOINT,\n SPARK_USER_AGENT,\n URL_ENDPOINT,\n NETWORK_FLAP_TIMEOUT,\n} from './constants';\nimport Line from './line';\nimport {ILine, LINE_EVENTS, LineStatus} from './line/types';\nimport {METRIC_EVENT, REG_ACTION, METRIC_TYPE, IMetricManager} from '../Metrics/types';\nimport {getMetricManager} from '../Metrics';\n\n/**\n * The `CallingClient` module provides a set of APIs for line registration and calling functionalities within the SDK.\n *\n * The following code snippet demonstrates how to create an instance of `CallingClient` using a `webex` instance and `callingConfig`:\n *\n * @example\n * ```javascript\n * const callingClient = createClient(webex, callingConfig);\n * ```\n */\n\nexport class CallingClient extends Eventing<CallingClientEventTypes> implements ICallingClient {\n private sdkConnector: ISDKConnector;\n\n private webex: WebexSDK;\n\n private mutex: Mutex;\n\n private callManager: ICallManager;\n\n private metricManager: IMetricManager;\n\n private sdkConfig?: CallingClientConfig;\n\n private primaryMobiusUris: string[];\n\n private backupMobiusUris: string[];\n\n public mediaEngine: typeof Media;\n\n private lineDict: Record<string, ILine> = {};\n\n /**\n * @ignore\n */\n constructor(webex: WebexSDK, config?: CallingClientConfig) {\n super();\n this.sdkConnector = SDKConnector;\n\n if (!this.sdkConnector.getWebex()) {\n SDKConnector.setWebex(webex);\n }\n this.mutex = new Mutex();\n this.webex = this.sdkConnector.getWebex();\n\n this.sdkConfig = config;\n const serviceData = this.sdkConfig?.serviceData?.indicator\n ? this.sdkConfig.serviceData\n : {indicator: ServiceIndicator.CALLING, domain: ''};\n\n const logLevel = this.sdkConfig?.logger?.level ? this.sdkConfig.logger.level : LOGGER.ERROR;\n validateServiceData(serviceData);\n\n this.callManager = getCallManager(this.webex, serviceData.indicator);\n this.metricManager = getMetricManager(this.webex, serviceData.indicator);\n\n this.mediaEngine = Media;\n\n this.primaryMobiusUris = [];\n this.backupMobiusUris = [];\n\n this.registerSessionsListener();\n\n log.setLogger(logLevel, CALLING_CLIENT_FILE);\n\n this.registerCallsClearedListener();\n }\n\n // async calls required to run after constructor\n\n /**\n * Initializes the `CallingClient` by performing the following steps:\n *\n * 1. Retrieves list of servers.\n * 2. Creates a line.\n * 3. Sets up network change detection.\n *\n * This method should be called once to initialize the `callingClient`.\n *\n * @returns A promise that resolves when the initialization is complete.\n * @ignore\n */\n public async init() {\n await this.getMobiusServers();\n await this.createLine();\n\n /* Better to run the timer once rather than after every registration */\n this.detectNetworkChange();\n }\n\n /**\n * Register callbacks for network changes.\n */\n private async detectNetworkChange() {\n let retry = false;\n\n // this is a temporary logic to get registration obj\n // it will change once we have proper lineId and multiple lines as well\n const line = Object.values(this.lineDict)[0];\n\n setInterval(async () => {\n if (\n !this.webex.internal.mercury.connected &&\n !retry &&\n !Object.keys(this.callManager.getActiveCalls()).length\n ) {\n log.warn(`Network has flapped, waiting for mercury connection to be up`, {\n file: CALLING_CLIENT_FILE,\n method: this.detectNetworkChange.name,\n });\n\n line.lineEmitter(LINE_EVENTS.UNREGISTERED);\n line.registration.clearKeepaliveTimer();\n\n retry = true;\n }\n\n if (retry && this.webex.internal.mercury.connected) {\n retry = await line.registration.handleConnectionRestoration(retry);\n }\n }, NETWORK_FLAP_TIMEOUT);\n }\n\n /**\n * Fetches countryCode and region of the client.\n */\n private async getClientRegionInfo(): Promise<RegionInfo> {\n const regionInfo = {} as RegionInfo;\n\n try {\n const temp = <WebexRequestPayload>await this.webex.request({\n uri: `${this.webex.internal.services._serviceUrls.mobius}${URL_ENDPOINT}${IP_ENDPOINT}`,\n method: HTTP_METHODS.GET,\n headers: {\n [CISCO_DEVICE_URL]: this.webex.internal.device.url,\n [SPARK_USER_AGENT]: CALLING_USER_AGENT,\n },\n service: ALLOWED_SERVICES.MOBIUS,\n });\n\n const myIP = (temp.body as IpInfo).ipv4;\n const response = <WebexRequestPayload>await this.webex.request({\n uri: `${DISCOVERY_URL}/${myIP}`,\n method: HTTP_METHODS.GET,\n addAuthHeader: false,\n headers: {\n [SPARK_USER_AGENT]: null,\n },\n });\n\n const clientRegionInfo = response.body as ClientRegionInfo;\n\n regionInfo.clientRegion = clientRegionInfo?.clientRegion ? clientRegionInfo.clientRegion : '';\n\n regionInfo.countryCode = clientRegionInfo?.countryCode ? clientRegionInfo.countryCode : '';\n } catch (err: unknown) {\n handleCallingClientErrors(\n err as WebexRequestPayload,\n (clientError) => {\n this.metricManager.submitRegistrationMetric(\n METRIC_EVENT.REGISTRATION_ERROR,\n REG_ACTION.REGISTER,\n METRIC_TYPE.BEHAVIORAL,\n clientError\n );\n this.emit(CALLING_CLIENT_EVENT_KEYS.ERROR, clientError);\n },\n {method: GET_MOBIUS_SERVERS_UTIL, file: CALLING_CLIENT_FILE}\n );\n regionInfo.clientRegion = '';\n regionInfo.countryCode = '';\n }\n\n return regionInfo;\n }\n\n /**\n * Local method for finding the mobius servers.\n */\n private async getMobiusServers() {\n /* Following operations are performed in a synchronous way ->\n\n 1. Get RegionInfo\n 2. Get Mobius Server with that RegionInfo\n 3. Check whether Mobius server was found without any error\n 4. If there is error , we don't need to send registration\n 5. Otherwise send registration\n */\n\n let useDefault = false;\n\n let clientRegion: string;\n let countryCode: string;\n\n if (this.sdkConfig?.discovery?.country && this.sdkConfig?.discovery?.region) {\n log.info('Updating region and country from the SDK config', {\n file: CALLING_CLIENT_FILE,\n method: GET_MOBIUS_SERVERS_UTIL,\n });\n clientRegion = this.sdkConfig?.discovery?.region;\n countryCode = this.sdkConfig?.discovery?.country;\n } else {\n log.info('Updating region and country through Region discovery', {\n file: CALLING_CLIENT_FILE,\n method: GET_MOBIUS_SERVERS_UTIL,\n });\n\n const regionInfo = await this.getClientRegionInfo();\n\n clientRegion = regionInfo.clientRegion;\n countryCode = regionInfo.countryCode;\n }\n\n if (clientRegion && countryCode) {\n log.log(\n `Found Region: ${clientRegion} and country: ${countryCode}, going to fetch Mobius server`,\n '' as LogContext\n );\n\n try {\n const temp = <WebexRequestPayload>await this.webex.request({\n uri: `${this.webex.internal.services._serviceUrls.mobius}${URL_ENDPOINT}?regionCode=${clientRegion}&countryCode=${countryCode}`,\n method: HTTP_METHODS.GET,\n headers: {\n [CISCO_DEVICE_URL]: this.webex.internal.device.url,\n [SPARK_USER_AGENT]: CALLING_USER_AGENT,\n },\n service: ALLOWED_SERVICES.MOBIUS,\n });\n\n log.log('Mobius Server found for the region', '' as LogContext);\n const mobiusServers = temp.body as MobiusServers;\n\n /* update arrays of Mobius Uris. */\n const mobiusUris = filterMobiusUris(\n mobiusServers,\n this.webex.internal.services._serviceUrls.mobius\n );\n this.primaryMobiusUris = mobiusUris.primary;\n this.backupMobiusUris = mobiusUris.backup;\n log.info(\n `Final list of Mobius Servers, primary: ${mobiusUris.primary} and backup: ${mobiusUris.backup}`,\n '' as LogContext\n );\n } catch (err: unknown) {\n handleCallingClientErrors(\n err as WebexRequestPayload,\n (clientError) => {\n this.metricManager.submitRegistrationMetric(\n METRIC_EVENT.REGISTRATION_ERROR,\n REG_ACTION.REGISTER,\n METRIC_TYPE.BEHAVIORAL,\n clientError\n );\n this.emit(CALLING_CLIENT_EVENT_KEYS.ERROR, clientError);\n },\n {method: GET_MOBIUS_SERVERS_UTIL, file: CALLING_CLIENT_FILE}\n );\n\n useDefault = true;\n }\n } else {\n /* Setting this to true because region info is possibly undefined */\n useDefault = true;\n }\n\n /* Use a default URL if Mobius discovery fails either because of region info failure\n * or because the discovered Mobius couldn't be reached\n */\n\n if (useDefault) {\n log.warn('Error in finding Mobius Servers. Will use the default URL.', '' as LogContext);\n this.primaryMobiusUris = [\n `${this.webex.internal.services._serviceUrls.mobius}${URL_ENDPOINT}`,\n ];\n }\n }\n\n /**\n * Registers a listener/handler for ALL_CALLS_CLEARED\n * event emitted by callManager when all the calls\n * present on sdk are cleaned up.\n */\n private registerCallsClearedListener() {\n const logContext = {\n file: CALLING_CLIENT_FILE,\n method: this.registerCallsClearedListener.name,\n };\n\n log.log('Registering listener for all calls cleared event', logContext);\n this.callManager.on(CALLING_CLIENT_EVENT_KEYS.ALL_CALLS_CLEARED, this.callsClearedHandler);\n }\n\n /**\n * Handler registered for ALL_CALLS_CLEARED event emitted by callManager.\n *\n * If re-register attempt was deferred earlier due to active call(s), then it\n * will be attempted here on receiving a notification from callManager that all\n * calls are cleaned up.\n */\n private callsClearedHandler = async () => {\n // this is a temporary logic to get registration obj\n // it will change once we have proper lineId and multiple lines as well\n const {registration} = Object.values(this.lineDict)[0];\n\n if (!registration.isDeviceRegistered()) {\n await this.mutex.runExclusive(async () => {\n if (registration.isReconnectPending()) {\n log.log('All calls cleared, reconnecting', {\n file: CALLING_CLIENT_FILE,\n method: CALLS_CLEARED_HANDLER_UTIL,\n });\n await registration.reconnectOnFailure(CALLS_CLEARED_HANDLER_UTIL);\n }\n });\n }\n };\n\n /**\n * To get the current log Level.\n * @ignore\n */\n public getLoggingLevel(): LOGGER {\n return log.getLogLevel();\n }\n\n /**\n * To return the `sdkConnector` instance that was used during sdk initialisation.\n * @ignore\n */\n public getSDKConnector(): ISDKConnector {\n return this.sdkConnector;\n }\n\n private registerSessionsListener() {\n this.sdkConnector.registerListener<CallSessionEvent>(\n MOBIUS_EVENT_KEYS.CALL_SESSION_EVENT_INCLUSIVE,\n async (event?: CallSessionEvent) => {\n if (event && event.data.userSessions.userSessions) {\n const sessionArr = event?.data.userSessions.userSessions;\n\n if (sessionArr.length === 1) {\n if (sessionArr[0].sessionType !== SessionType.WEBEX_CALLING) {\n return;\n }\n }\n\n for (let i = 0; i < sessionArr.length; i += 1) {\n if (sessionArr[i].sessionType !== SessionType.WEBEX_CALLING) {\n sessionArr.splice(i, 1);\n }\n }\n this.emit(CALLING_CLIENT_EVENT_KEYS.USER_SESSION_INFO, event as CallSessionEvent);\n }\n }\n );\n }\n\n /**\n * Creates line object inside calling client per user\n * NOTE: currently multiple lines are not supported\n */\n private async createLine(): Promise<void> {\n const line = new Line(\n this.webex.internal.device.userId,\n this.webex.internal.device.url,\n LineStatus.INACTIVE,\n this.mutex,\n this.primaryMobiusUris,\n this.backupMobiusUris,\n this.getLoggingLevel(),\n this.sdkConfig?.serviceData\n );\n\n this.lineDict[line.lineId] = line;\n }\n\n /**\n * Retrieves details of all the Line objects belonging to a User\n * NOTE: currently multiple lines are not supported\n */\n public getLines(): Record<string, ILine> {\n return this.lineDict;\n }\n\n /**\n * Retrieves call objects for all the active calls present in the client\n */\n public getActiveCalls(): Record<string, ICall[]> {\n const activeCalls = {};\n const calls = this.callManager.getActiveCalls();\n Object.keys(calls).forEach((correlationId) => {\n const call = calls[correlationId];\n if (!activeCalls[call.lineId]) {\n activeCalls[call.lineId] = [];\n }\n activeCalls[call.lineId].push(call);\n });\n\n return activeCalls;\n }\n\n /**\n * Retrieves call object for the connected call in the client\n */\n public getConnectedCall(): ICall | undefined {\n let connectCall;\n const calls = this.callManager.getActiveCalls();\n\n Object.keys(calls).forEach((correlationId) => {\n if (calls[correlationId].isConnected() && !calls[correlationId].isHeld()) {\n connectCall = calls[correlationId];\n }\n });\n\n return connectCall;\n }\n}\n\n/**\n * Create the `CallingClient` instance using the `webex` object and callingSdk `config`\n * @param webex - A webex instance.\n * @param config - Config to start the CallingClient with.\n */\nexport const createClient = async (\n webex: WebexSDK,\n config?: CallingClientConfig\n): Promise<ICallingClient> => {\n const callingClientInstance = new CallingClient(webex, config);\n await callingClientInstance.init();\n\n return callingClientInstance;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAC,sBAAA,CAAAL,OAAA;AAEA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AAOA,IAAAQ,OAAA,GAAAR,OAAA;AAWA,IAAAS,OAAA,GAAAJ,sBAAA,CAAAL,OAAA;AACA,IAAAU,YAAA,GAAAV,OAAA;AACA,IAAAW,UAAA,GAAAX,OAAA;AAYA,IAAAY,KAAA,GAAAP,sBAAA,CAAAL,OAAA;AACA,IAAAa,OAAA,GAAAb,OAAA;AACA,IAAAc,OAAA,GAAAd,OAAA;AACA,IAAAe,QAAA,GAAAf,OAAA;AAA4C,SAAAgB,yBAAAC,WAAA,eAAAC,QAAA,kCAAAC,iBAAA,OAAAD,QAAA,QAAAE,gBAAA,OAAAF,QAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAlB,wBAAAsB,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,aAAAE,OAAA,CAAAF,GAAA,yBAAAA,GAAA,4BAAAG,OAAA,EAAAH,GAAA,UAAAI,KAAA,GAAAT,wBAAA,CAAAC,WAAA,OAAAQ,KAAA,IAAAA,KAAA,CAA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AAA,EAAAC,GAAA;IAAA,OAAAN,KAAA,CAAA3O,KAAA,OAAAD,SAAA;EAAA;AAAA,GAQxB;AAAC0O,OAAA,CAAAC,YAAA,GAAAA,YAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import {CallerIdInfo} from '../../../Events/types';\nimport {DisplayInformation, PhoneNumber} from '../../../common/types';\n\nexport type EmailType = {\n primary: boolean;\n type: string;\n value: string;\n};\n\nexport type SipAddressType = {\n type: string;\n value: string;\n primary?: boolean;\n};\n\nexport type PhotoType = {\n type: string;\n value: string;\n};\n\nexport type ResourceType = {\n userName: string;\n emails: Array<EmailType>;\n name: {\n givenName: string;\n familyName: string;\n };\n phoneNumbers: Array<PhoneNumber>;\n entitlements: Array<string>;\n id: string;\n photos: Array<PhotoType>;\n displayName: string;\n active: boolean;\n sipAddresses: Array<SipAddressType>;\n};\n\n/* The scim response has many fields , dropping few of them as they are not to be consumed by us */\nexport type scimResponseBody = {\n totalResults: number;\n itemsPerPage: number;\n startIndex: number;\n schemas: Array<string>;\n Resources: Array<ResourceType>;\n};\n\nexport interface ICallerId {\n fetchCallerDetails: (callerId: CallerIdInfo) => DisplayInformation;\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import {CallerIdInfo} from '../../../Events/types';\nimport {DisplayInformation, PhoneNumber} from '../../../common/types';\n\nexport type EmailType = {\n primary: boolean;\n type: string;\n value: string;\n};\n\nexport type SipAddressType = {\n type: string;\n value: string;\n primary?: boolean;\n};\n\nexport type PhotoType = {\n type: string;\n value: string;\n};\n\nexport type ResourceType = {\n userName: string;\n emails: Array<EmailType>;\n name: {\n givenName: string;\n familyName: string;\n };\n phoneNumbers: Array<PhoneNumber>;\n entitlements: Array<string>;\n id: string;\n photos: Array<PhotoType>;\n displayName: string;\n active: boolean;\n sipAddresses: Array<SipAddressType>;\n};\n\n/* The scim response has many fields , dropping few of them as they are not to be consumed by us */\nexport type scimResponseBody = {\n totalResults: number;\n itemsPerPage: number;\n startIndex: number;\n schemas: Array<string>;\n Resources: Array<ResourceType>;\n};\n\n/**\n * Represents the interface for fetching caller ID details.\n */\nexport interface ICallerId {\n /**\n * Fetches caller ID details based on the provided caller ID information.\n *\n * This method takes a {@link CallerIdInfo} object as input and performs caller ID\n * resolution in the background, returning a {@link DisplayInformation} object\n * containing intermediate name and number.\n *\n * @param callerId - Caller ID data passed to the method.\n *\n * @remarks\n * The `fetchCallerDetails` method is the main entrypoint for retrieving\n * caller ID information. It initiates the caller ID resolution process\n * based on the provided {@link CallerIdInfo} and returns the result as\n * {@link DisplayInformation}.\n *\n * @example\n * ```typescript\n * const callerIdInfo: CallerIdInfo = { callerIdData };\n * const displayInfo = callerIdInstance.fetchCallerDetails(callerIdInfo);\n * console.log(`Name: ${displayInfo.name}, Number: ${displayInfo.number}`);\n * ```\n */\n fetchCallerDetails: (callerId: CallerIdInfo) => DisplayInformation;\n}\n"],"mappings":""}
|
|
@@ -44,14 +44,7 @@ var Call = /*#__PURE__*/function (_Eventing) {
|
|
|
44
44
|
(0, _inherits2.default)(Call, _Eventing);
|
|
45
45
|
var _super = _createSuper(Call);
|
|
46
46
|
/**
|
|
47
|
-
* @
|
|
48
|
-
* @param webex -.
|
|
49
|
-
* @param destination -.
|
|
50
|
-
* @param direction -.
|
|
51
|
-
* @param deviceId -.
|
|
52
|
-
* @param serverCb
|
|
53
|
-
* @param deleteCb
|
|
54
|
-
* @param indicator - Service Indicator.
|
|
47
|
+
* @ignore
|
|
55
48
|
*/
|
|
56
49
|
function Call(activeUrl, webex, destination, direction, deviceId, lineId, deleteCb, indicator) {
|
|
57
50
|
var _this;
|
|
@@ -2236,8 +2229,9 @@ var Call = /*#__PURE__*/function (_Eventing) {
|
|
|
2236
2229
|
key: "answer",
|
|
2237
2230
|
value:
|
|
2238
2231
|
/**
|
|
2239
|
-
*
|
|
2240
|
-
*
|
|
2232
|
+
* Answers the call with the provided local audio stream.
|
|
2233
|
+
*
|
|
2234
|
+
* @param localAudioStream - The local audio stream for the call.
|
|
2241
2235
|
*/
|
|
2242
2236
|
function () {
|
|
2243
2237
|
var _answer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17(localAudioStream) {
|