@webex/calling 3.0.0-next.31 → 3.0.0-next.33

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.
@@ -12,12 +12,12 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/
12
12
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
13
13
  var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
14
14
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
15
- var _constants = require("../common/constants");
16
- var _SDKConnector = _interopRequireDefault(require("../SDKConnector"));
17
15
  var _Logger = _interopRequireDefault(require("../Logger"));
16
+ var _SDKConnector = _interopRequireDefault(require("../SDKConnector"));
17
+ var _Utils = require("../common/Utils");
18
+ var _constants = require("../common/constants");
18
19
  var _types = require("../common/types");
19
20
  var _constants2 = require("./constants");
20
- var _Utils = require("../common/Utils");
21
21
  /**
22
22
  * This Connector class will implement child interface of ICallSettings and
23
23
  * has methods for the CCUC with UCM backend.
@@ -158,7 +158,7 @@ var UcmBackendConnector = exports.UcmBackendConnector = /*#__PURE__*/function ()
158
158
  resp = _context.sent;
159
159
  _ref = resp.body, callForwarding = _ref.callForwarding;
160
160
  cfa = callForwarding.always.find(function (item) {
161
- return item.dn.endsWith(directoryNumber);
161
+ return item.dn.endsWith(directoryNumber) || item.e164Number.endsWith(directoryNumber);
162
162
  });
163
163
  if (!cfa) {
164
164
  _context.next = 12;
@@ -1 +1 @@
1
- {"version":3,"names":["_constants","require","_SDKConnector","_interopRequireDefault","_Logger","_types","_constants2","_Utils","UcmBackendConnector","exports","webex","logger","useProdWebexApis","arguments","length","undefined","_classCallCheck2","default","_defineProperty2","sdkConnector","SDKConnector","getWebex","setWebex","log","setLogger","level","UCM_CONNECTOR_FILE","userId","internal","device","orgId","_createClass2","key","value","getCallWaitingSetting","getMethodNotSupportedResponse","getDoNotDisturbSetting","setDoNotDisturbSetting","getCallForwardSetting","setCallForwardSetting","getVoicemailSetting","setVoicemailSetting","response","serviceErrorCodeHandler","statusCode","file","method","name","_promise","resolve","_getCallForwardAlwaysSetting","_asyncToGenerator2","_regenerator","mark","_callee","directoryNumber","loggerContext","webexApisUrl","resp","_ref","callForwarding","cfa","_response","_response2","errorInfo","errorStatus","wrap","_callee$","_context","prev","next","getCallForwardAlwaysSetting","WEBEX_APIS_PROD_URL","WEBEX_APIS_INT_URL","request","uri","concat","PEOPLE_ENDPOINT","CF_ENDPOINT","toLowerCase","ORG_ENDPOINT","HTTP_METHODS","GET","sent","body","always","find","item","dn","endsWith","Number","STATUS_CODE","message","SUCCESS_MESSAGE","data","callSetting","enabled","destinationVoicemailEnabled","destination","VOICEMAIL","abrupt","FAILURE_MESSAGE","error","t0","stop","_x","apply"],"sources":["UcmBackendConnector.ts"],"sourcesContent":["import {\n FAILURE_MESSAGE,\n STATUS_CODE,\n SUCCESS_MESSAGE,\n UCM_CONNECTOR_FILE,\n VOICEMAIL,\n} from '../common/constants';\nimport SDKConnector from '../SDKConnector';\nimport {ISDKConnector, WebexSDK} from '../SDKConnector/types';\nimport {\n LoggerInterface,\n CallSettingResponse,\n CallForwardAlwaysSetting,\n IUcmBackendConnector,\n CallForwardingSettingsUCM,\n} from './types';\nimport log from '../Logger';\nimport {WebexRequestPayload, HTTP_METHODS} from '../common/types';\nimport {\n CF_ENDPOINT,\n ORG_ENDPOINT,\n PEOPLE_ENDPOINT,\n WEBEX_APIS_INT_URL,\n WEBEX_APIS_PROD_URL,\n} from './constants';\nimport {serviceErrorCodeHandler} from '../common/Utils';\n\n/**\n * This Connector class will implement child interface of ICallSettings and\n * has methods for the CCUC with UCM backend.\n */\nexport class UcmBackendConnector implements IUcmBackendConnector {\n private sdkConnector: ISDKConnector;\n\n private webex: WebexSDK;\n\n private userId: string;\n\n private orgId: string;\n\n private useProdWebexApis: boolean;\n\n /**\n * @param useProdWebexApis - default value is true\n */\n constructor(webex: WebexSDK, logger: LoggerInterface, useProdWebexApis = true) {\n this.sdkConnector = SDKConnector;\n\n if (!this.sdkConnector.getWebex()) {\n SDKConnector.setWebex(webex);\n }\n\n this.webex = this.sdkConnector.getWebex();\n log.setLogger(logger.level, UCM_CONNECTOR_FILE);\n this.userId = this.webex.internal.device.userId;\n this.orgId = this.webex.internal.device.orgId;\n this.useProdWebexApis = useProdWebexApis;\n }\n\n /**\n * Reads call waiting setting at the backend.\n */\n public getCallWaitingSetting(): Promise<CallSettingResponse> {\n return this.getMethodNotSupportedResponse();\n }\n\n /**\n * Reads DND setting at the backend.\n */\n public getDoNotDisturbSetting(): Promise<CallSettingResponse> {\n return this.getMethodNotSupportedResponse();\n }\n\n /**\n * Updates DND setting at the backend.\n */\n public setDoNotDisturbSetting(): Promise<CallSettingResponse> {\n return this.getMethodNotSupportedResponse();\n }\n\n /**\n * Reads Call Forward setting at the backend.\n */\n public getCallForwardSetting(): Promise<CallSettingResponse> {\n return this.getMethodNotSupportedResponse();\n }\n\n /**\n * Updates Call Forward setting at the backend.\n */\n public setCallForwardSetting(): Promise<CallSettingResponse> {\n return this.getMethodNotSupportedResponse();\n }\n\n /**\n * Reads Voicemail setting at the backend.\n */\n public getVoicemailSetting(): Promise<CallSettingResponse> {\n return this.getMethodNotSupportedResponse();\n }\n\n /**\n * Updates Voicemail setting at the backend.\n */\n public setVoicemailSetting(): Promise<CallSettingResponse> {\n return this.getMethodNotSupportedResponse();\n }\n\n /**\n * Returns a default error response for unsupported methods.\n */\n private getMethodNotSupportedResponse(): Promise<CallSettingResponse> {\n const response = serviceErrorCodeHandler(\n {statusCode: 501},\n {file: UCM_CONNECTOR_FILE, method: this.getMethodNotSupportedResponse.name}\n );\n\n return Promise.resolve(response);\n }\n\n /**\n * Reads the Call Forwarding Always settings at the backend.\n * This will also check if CFA is set to Voicemail.\n * If CFA is set to destination, that will take precedence.\n * For UCM backend, relevant fields in the response are `enabled` & `destination`.\n *\n * @param directoryNumber - Directory number for which CFA needs to returned.\n */\n public async getCallForwardAlwaysSetting(directoryNumber?: string): Promise<CallSettingResponse> {\n const loggerContext = {\n file: UCM_CONNECTOR_FILE,\n method: this.getCallForwardAlwaysSetting.name,\n };\n\n const webexApisUrl = this.useProdWebexApis ? WEBEX_APIS_PROD_URL : WEBEX_APIS_INT_URL;\n\n try {\n if (directoryNumber) {\n const resp = <WebexRequestPayload>await this.webex.request({\n uri: `${webexApisUrl}/${PEOPLE_ENDPOINT}/${\n this.userId\n }/${CF_ENDPOINT.toLowerCase()}?${ORG_ENDPOINT}=${this.orgId}`,\n method: HTTP_METHODS.GET,\n });\n\n const {callForwarding} = resp.body as CallForwardingSettingsUCM;\n const cfa = callForwarding.always.find((item) => item.dn.endsWith(directoryNumber));\n\n if (cfa) {\n const response = {\n statusCode: Number(resp[STATUS_CODE]),\n message: SUCCESS_MESSAGE,\n data: {\n callSetting: {\n enabled: cfa.destinationVoicemailEnabled || !!cfa.destination,\n destination: cfa.destinationVoicemailEnabled ? VOICEMAIL : cfa.destination,\n } as CallForwardAlwaysSetting,\n },\n };\n\n return response;\n }\n const response = {\n statusCode: 404,\n message: FAILURE_MESSAGE,\n data: {\n error: 'Directory Number is not assigned to the user',\n },\n };\n\n return response;\n }\n const response = {\n statusCode: 400,\n message: FAILURE_MESSAGE,\n data: {\n error: 'Directory Number is mandatory for UCM backend',\n },\n };\n\n return response;\n } catch (err: unknown) {\n const errorInfo = err as WebexRequestPayload;\n const errorStatus = serviceErrorCodeHandler(errorInfo, loggerContext);\n\n return errorStatus;\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAOA,IAAAC,aAAA,GAAAC,sBAAA,CAAAF,OAAA;AASA,IAAAG,OAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAOA,IAAAM,MAAA,GAAAN,OAAA;AAEA;AACA;AACA;A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;EAAA,OAAA/D,mBAAA;AAAA"}
1
+ {"version":3,"names":["_Logger","_interopRequireDefault","require","_SDKConnector","_Utils","_constants","_types","_constants2","UcmBackendConnector","exports","webex","logger","useProdWebexApis","arguments","length","undefined","_classCallCheck2","default","_defineProperty2","sdkConnector","SDKConnector","getWebex","setWebex","log","setLogger","level","UCM_CONNECTOR_FILE","userId","internal","device","orgId","_createClass2","key","value","getCallWaitingSetting","getMethodNotSupportedResponse","getDoNotDisturbSetting","setDoNotDisturbSetting","getCallForwardSetting","setCallForwardSetting","getVoicemailSetting","setVoicemailSetting","response","serviceErrorCodeHandler","statusCode","file","method","name","_promise","resolve","_getCallForwardAlwaysSetting","_asyncToGenerator2","_regenerator","mark","_callee","directoryNumber","loggerContext","webexApisUrl","resp","_ref","callForwarding","cfa","_response","_response2","errorInfo","errorStatus","wrap","_callee$","_context","prev","next","getCallForwardAlwaysSetting","WEBEX_APIS_PROD_URL","WEBEX_APIS_INT_URL","request","uri","concat","PEOPLE_ENDPOINT","CF_ENDPOINT","toLowerCase","ORG_ENDPOINT","HTTP_METHODS","GET","sent","body","always","find","item","dn","endsWith","e164Number","Number","STATUS_CODE","message","SUCCESS_MESSAGE","data","callSetting","enabled","destinationVoicemailEnabled","destination","VOICEMAIL","abrupt","FAILURE_MESSAGE","error","t0","stop","_x","apply"],"sources":["UcmBackendConnector.ts"],"sourcesContent":["import log from '../Logger';\nimport SDKConnector from '../SDKConnector';\nimport {ISDKConnector, WebexSDK} from '../SDKConnector/types';\nimport {serviceErrorCodeHandler} from '../common/Utils';\nimport {\n FAILURE_MESSAGE,\n STATUS_CODE,\n SUCCESS_MESSAGE,\n UCM_CONNECTOR_FILE,\n VOICEMAIL,\n} from '../common/constants';\nimport {HTTP_METHODS, WebexRequestPayload} from '../common/types';\nimport {\n CF_ENDPOINT,\n ORG_ENDPOINT,\n PEOPLE_ENDPOINT,\n WEBEX_APIS_INT_URL,\n WEBEX_APIS_PROD_URL,\n} from './constants';\nimport {\n CallForwardAlwaysSetting,\n CallForwardingSettingsUCM,\n CallSettingResponse,\n IUcmBackendConnector,\n LoggerInterface,\n} from './types';\n\n/**\n * This Connector class will implement child interface of ICallSettings and\n * has methods for the CCUC with UCM backend.\n */\nexport class UcmBackendConnector implements IUcmBackendConnector {\n private sdkConnector: ISDKConnector;\n\n private webex: WebexSDK;\n\n private userId: string;\n\n private orgId: string;\n\n private useProdWebexApis: boolean;\n\n /**\n * @param useProdWebexApis - default value is true\n */\n constructor(webex: WebexSDK, logger: LoggerInterface, useProdWebexApis = true) {\n this.sdkConnector = SDKConnector;\n\n if (!this.sdkConnector.getWebex()) {\n SDKConnector.setWebex(webex);\n }\n\n this.webex = this.sdkConnector.getWebex();\n log.setLogger(logger.level, UCM_CONNECTOR_FILE);\n this.userId = this.webex.internal.device.userId;\n this.orgId = this.webex.internal.device.orgId;\n this.useProdWebexApis = useProdWebexApis;\n }\n\n /**\n * Reads call waiting setting at the backend.\n */\n public getCallWaitingSetting(): Promise<CallSettingResponse> {\n return this.getMethodNotSupportedResponse();\n }\n\n /**\n * Reads DND setting at the backend.\n */\n public getDoNotDisturbSetting(): Promise<CallSettingResponse> {\n return this.getMethodNotSupportedResponse();\n }\n\n /**\n * Updates DND setting at the backend.\n */\n public setDoNotDisturbSetting(): Promise<CallSettingResponse> {\n return this.getMethodNotSupportedResponse();\n }\n\n /**\n * Reads Call Forward setting at the backend.\n */\n public getCallForwardSetting(): Promise<CallSettingResponse> {\n return this.getMethodNotSupportedResponse();\n }\n\n /**\n * Updates Call Forward setting at the backend.\n */\n public setCallForwardSetting(): Promise<CallSettingResponse> {\n return this.getMethodNotSupportedResponse();\n }\n\n /**\n * Reads Voicemail setting at the backend.\n */\n public getVoicemailSetting(): Promise<CallSettingResponse> {\n return this.getMethodNotSupportedResponse();\n }\n\n /**\n * Updates Voicemail setting at the backend.\n */\n public setVoicemailSetting(): Promise<CallSettingResponse> {\n return this.getMethodNotSupportedResponse();\n }\n\n /**\n * Returns a default error response for unsupported methods.\n */\n private getMethodNotSupportedResponse(): Promise<CallSettingResponse> {\n const response = serviceErrorCodeHandler(\n {statusCode: 501},\n {file: UCM_CONNECTOR_FILE, method: this.getMethodNotSupportedResponse.name}\n );\n\n return Promise.resolve(response);\n }\n\n /**\n * Reads the Call Forwarding Always settings at the backend.\n * This will also check if CFA is set to Voicemail.\n * If CFA is set to destination, that will take precedence.\n * For UCM backend, relevant fields in the response are `enabled` & `destination`.\n *\n * @param directoryNumber - Directory number for which CFA needs to returned.\n */\n public async getCallForwardAlwaysSetting(directoryNumber?: string): Promise<CallSettingResponse> {\n const loggerContext = {\n file: UCM_CONNECTOR_FILE,\n method: this.getCallForwardAlwaysSetting.name,\n };\n\n const webexApisUrl = this.useProdWebexApis ? WEBEX_APIS_PROD_URL : WEBEX_APIS_INT_URL;\n\n try {\n if (directoryNumber) {\n const resp = <WebexRequestPayload>await this.webex.request({\n uri: `${webexApisUrl}/${PEOPLE_ENDPOINT}/${\n this.userId\n }/${CF_ENDPOINT.toLowerCase()}?${ORG_ENDPOINT}=${this.orgId}`,\n method: HTTP_METHODS.GET,\n });\n\n const {callForwarding} = resp.body as CallForwardingSettingsUCM;\n const cfa = callForwarding.always.find(\n (item) => item.dn.endsWith(directoryNumber) || item.e164Number.endsWith(directoryNumber)\n );\n\n if (cfa) {\n const response = {\n statusCode: Number(resp[STATUS_CODE]),\n message: SUCCESS_MESSAGE,\n data: {\n callSetting: {\n enabled: cfa.destinationVoicemailEnabled || !!cfa.destination,\n destination: cfa.destinationVoicemailEnabled ? VOICEMAIL : cfa.destination,\n } as CallForwardAlwaysSetting,\n },\n };\n\n return response;\n }\n const response = {\n statusCode: 404,\n message: FAILURE_MESSAGE,\n data: {\n error: 'Directory Number is not assigned to the user',\n },\n };\n\n return response;\n }\n const response = {\n statusCode: 400,\n message: FAILURE_MESSAGE,\n data: {\n error: 'Directory Number is mandatory for UCM backend',\n },\n };\n\n return response;\n } catch (err: unknown) {\n const errorInfo = err as WebexRequestPayload;\n const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AA,CAAAoC,EAAA,GAAApC,QAAA;cAETJ,SAAS,GAAAI,QAAA,CAAAoC,EAAA;cACTvC,WAAW,GAAG,IAAAtB,8BAAuB,EAACqB,SAAS,EAAER,aAAa,CAAC;cAAA,OAAAY,QAAA,CAAAiC,MAAA,WAE9DpC,WAAW;YAAA;YAAA;cAAA,OAAAG,QAAA,CAAAqC,IAAA;UAAA;QAAA,GAAAnD,OAAA;MAAA,CAErB;MAAA,SAAAiB,4BAAAmC,EAAA;QAAA,OAAAxD,4BAAA,CAAAyD,KAAA,OAAA9F,SAAA;MAAA;MAAA,OAAA0D,2BAAA;IAAA;EAAA;EAAA,OAAA/D,mBAAA;AAAA"}
@@ -7,13 +7,13 @@ var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs2/core-js/o
7
7
  var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
8
8
  var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
9
9
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
10
- var _testUtil = require("../common/testUtil");
11
10
  var _types = require("../Logger/types");
12
- var _types2 = require("../common/types");
13
- var _constants = require("../common/constants");
14
- var _constants2 = require("./constants");
15
11
  var utils = _interopRequireWildcard(require("../common/Utils"));
12
+ var _constants = require("../common/constants");
13
+ var _testUtil = require("../common/testUtil");
14
+ var _types2 = require("../common/types");
16
15
  var _UcmBackendConnector = require("./UcmBackendConnector");
16
+ var _constants2 = require("./constants");
17
17
  function _getRequireWildcardCache(e) { if ("function" != typeof _WeakMap) return null; var r = new _WeakMap(), t = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
18
18
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? _Object$getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? _Object$defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
19
19
  describe('Call Settings Client Tests for UcmBackendConnector', function () {
@@ -27,13 +27,21 @@ describe('Call Settings Client Tests for UcmBackendConnector', function () {
27
27
  always: [{
28
28
  dn: '8001',
29
29
  destination: '8004',
30
- destinationVoicemailEnabled: false
30
+ destinationVoicemailEnabled: false,
31
+ e164Number: '+14922999903'
31
32
  }, {
32
33
  dn: '8002',
33
- destinationVoicemailEnabled: true
34
+ destinationVoicemailEnabled: true,
35
+ e164Number: ''
34
36
  }, {
35
37
  dn: '8003',
36
- destinationVoicemailEnabled: false
38
+ destinationVoicemailEnabled: false,
39
+ e164Number: ''
40
+ }, {
41
+ dn: '8000',
42
+ destination: '8007',
43
+ destinationVoicemailEnabled: false,
44
+ e164Number: '8006'
37
45
  }]
38
46
  }
39
47
  };
@@ -122,10 +130,34 @@ describe('Call Settings Client Tests for UcmBackendConnector', function () {
122
130
  }
123
131
  }, _callee3);
124
132
  })));
125
- it('Failure: Get Call Forward Always setting fails', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
126
- var responsePayload, serviceErrorCodeHandlerSpy, response;
133
+ it('Success: Get Call Forward Always setting when directory num matching with e16number and set to destination', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
134
+ var response, callForwardSetting;
127
135
  return _regenerator.default.wrap(function _callee4$(_context4) {
128
136
  while (1) switch (_context4.prev = _context4.next) {
137
+ case 0:
138
+ _context4.next = 2;
139
+ return callSettingsClient.getCallForwardAlwaysSetting('8006');
140
+ case 2:
141
+ response = _context4.sent;
142
+ callForwardSetting = response.data.callSetting;
143
+ expect(response.statusCode).toEqual(200);
144
+ expect(response.message).toEqual(_constants.SUCCESS_MESSAGE);
145
+ expect(callForwardSetting.enabled).toEqual(true);
146
+ expect(callForwardSetting.destination).toEqual('8007');
147
+ expect(webex.request).toBeCalledOnceWith({
148
+ method: _types2.HTTP_METHODS.GET,
149
+ uri: callForwardingUri
150
+ });
151
+ case 9:
152
+ case "end":
153
+ return _context4.stop();
154
+ }
155
+ }, _callee4);
156
+ })));
157
+ it('Failure: Get Call Forward Always setting fails', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
158
+ var responsePayload, serviceErrorCodeHandlerSpy, response;
159
+ return _regenerator.default.wrap(function _callee5$(_context5) {
160
+ while (1) switch (_context5.prev = _context5.next) {
129
161
  case 0:
130
162
  responsePayload = {
131
163
  statusCode: 503
@@ -133,10 +165,10 @@ describe('Call Settings Client Tests for UcmBackendConnector', function () {
133
165
  webex.request.mockClear();
134
166
  webex.request.mockRejectedValue(responsePayload);
135
167
  serviceErrorCodeHandlerSpy = jest.spyOn(utils, 'serviceErrorCodeHandler');
136
- _context4.next = 6;
168
+ _context5.next = 6;
137
169
  return callSettingsClient.getCallForwardAlwaysSetting('8002');
138
170
  case 6:
139
- response = _context4.sent;
171
+ response = _context5.sent;
140
172
  expect(response.statusCode).toEqual(503);
141
173
  expect(response.message).toEqual(_constants.FAILURE_MESSAGE);
142
174
  expect(response.data.error).toEqual('Unable to establish a connection with the server');
@@ -150,19 +182,19 @@ describe('Call Settings Client Tests for UcmBackendConnector', function () {
150
182
  });
151
183
  case 12:
152
184
  case "end":
153
- return _context4.stop();
185
+ return _context5.stop();
154
186
  }
155
- }, _callee4);
187
+ }, _callee5);
156
188
  })));
157
- it('Failure: Get Call Forward Always setting fails - wrong directoryNumber', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
189
+ it('Failure: Get Call Forward Always setting fails - wrong directoryNumber', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
158
190
  var response;
159
- return _regenerator.default.wrap(function _callee5$(_context5) {
160
- while (1) switch (_context5.prev = _context5.next) {
191
+ return _regenerator.default.wrap(function _callee6$(_context6) {
192
+ while (1) switch (_context6.prev = _context6.next) {
161
193
  case 0:
162
- _context5.next = 2;
194
+ _context6.next = 2;
163
195
  return callSettingsClient.getCallForwardAlwaysSetting('8005');
164
196
  case 2:
165
- response = _context5.sent;
197
+ response = _context6.sent;
166
198
  expect(response.statusCode).toEqual(404);
167
199
  expect(response.message).toEqual(_constants.FAILURE_MESSAGE);
168
200
  expect(response.data.error).toEqual('Directory Number is not assigned to the user');
@@ -172,53 +204,53 @@ describe('Call Settings Client Tests for UcmBackendConnector', function () {
172
204
  });
173
205
  case 7:
174
206
  case "end":
175
- return _context5.stop();
207
+ return _context6.stop();
176
208
  }
177
- }, _callee5);
209
+ }, _callee6);
178
210
  })));
179
- it('Failure: Get Call Forward Always setting fails when no directoryNumberProvided', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
211
+ it('Failure: Get Call Forward Always setting fails when no directoryNumberProvided', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
180
212
  var response;
181
- return _regenerator.default.wrap(function _callee6$(_context6) {
182
- while (1) switch (_context6.prev = _context6.next) {
213
+ return _regenerator.default.wrap(function _callee7$(_context7) {
214
+ while (1) switch (_context7.prev = _context7.next) {
183
215
  case 0:
184
- _context6.next = 2;
216
+ _context7.next = 2;
185
217
  return callSettingsClient.getCallForwardAlwaysSetting();
186
218
  case 2:
187
- response = _context6.sent;
219
+ response = _context7.sent;
188
220
  expect(response.statusCode).toEqual(400);
189
221
  expect(response.message).toEqual(_constants.FAILURE_MESSAGE);
190
222
  expect(response.data.error).toEqual('Directory Number is mandatory for UCM backend');
191
223
  expect(webex.request).not.toBeCalled();
192
224
  case 7:
193
225
  case "end":
194
- return _context6.stop();
226
+ return _context7.stop();
195
227
  }
196
- }, _callee6);
228
+ }, _callee7);
197
229
  })));
198
230
  describe('Unsupported methods return failure', function () {
199
231
  var unsupportedMethods = ['getCallWaitingSetting', 'getDoNotDisturbSetting', 'setDoNotDisturbSetting', 'getCallForwardSetting', 'setCallForwardSetting', 'getVoicemailSetting', 'setVoicemailSetting'];
200
232
  it.each(unsupportedMethods)('%s', /*#__PURE__*/function () {
201
- var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(methodName) {
233
+ var _ref8 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(methodName) {
202
234
  var response;
203
- return _regenerator.default.wrap(function _callee7$(_context7) {
204
- while (1) switch (_context7.prev = _context7.next) {
235
+ return _regenerator.default.wrap(function _callee8$(_context8) {
236
+ while (1) switch (_context8.prev = _context8.next) {
205
237
  case 0:
206
- _context7.next = 2;
238
+ _context8.next = 2;
207
239
  return callSettingsClient[methodName]();
208
240
  case 2:
209
- response = _context7.sent;
241
+ response = _context8.sent;
210
242
  expect(response.statusCode).toEqual(501);
211
243
  expect(response.message).toEqual(_constants.FAILURE_MESSAGE);
212
244
  expect(response.data.error).toEqual('Method is not implemented at the backend');
213
245
  expect(webex.request).not.toBeCalled();
214
246
  case 7:
215
247
  case "end":
216
- return _context7.stop();
248
+ return _context8.stop();
217
249
  }
218
- }, _callee7);
250
+ }, _callee8);
219
251
  }));
220
252
  return function (_x) {
221
- return _ref7.apply(this, arguments);
253
+ return _ref8.apply(this, arguments);
222
254
  };
223
255
  }());
224
256
  });
@@ -1 +1 @@
1
- {"version":3,"names":["_testUtil","require","_types","_types2","_constants","_constants2","utils","_interopRequireWildcard","_UcmBackendConnector","_getRequireWildcardCache","e","_WeakMap","r","t","__esModule","_typeof","default","has","get","n","__proto__","a","_Object$defineProperty","_Object$getOwnPropertyDescriptor","u","Object","prototype","hasOwnProperty","call","i","set","describe","webex","getTestUtilsWebex","userId","orgId","callSettingsClient","callForwardPayload","callForwarding","always","dn","destination","destinationVoicemailEnabled","callForwardingUri","concat","WEBEX_APIS_INT_URL","PEOPLE_ENDPOINT","CF_ENDPOINT","toLowerCase","ORG_ENDPOINT","beforeAll","UcmBackendConnector","level","LOGGER","INFO","beforeEach","responsePayload","statusCode","body","request","mockResolvedValue","it","_asyncToGenerator2","_regenerator","mark","_callee","response","callForwardSetting","wrap","_callee$","_context","prev","next","getCallForwardAlwaysSetting","sent","data","callSetting","expect","toEqual","message","SUCCESS_MESSAGE","enabled","toBeCalledOnceWith","method","HTTP_METHODS","GET","uri","stop","_callee2","_callee2$","_context2","_callee3","_callee3$","_context3","toBeFalsy","_callee4","serviceErrorCodeHandlerSpy","_callee4$","_context4","mockClear","mockRejectedValue","jest","spyOn","FAILURE_MESSAGE","error","file","UCM_CONNECTOR_FILE","name","_callee5","_callee5$","_context5","_callee6","_callee6$","_context6","not","toBeCalled","unsupportedMethods","each","_ref7","_callee7","methodName","_callee7$","_context7","_x","apply","arguments"],"sources":["UcmBackendConnector.test.ts"],"sourcesContent":["import {getTestUtilsWebex} from '../common/testUtil';\nimport {LOGGER} from '../Logger/types';\nimport {IUcmBackendConnector, CallForwardAlwaysSetting, CallForwardingSettingsUCM} from './types';\nimport {HTTP_METHODS, WebexRequestPayload} from '../common/types';\nimport {FAILURE_MESSAGE, SUCCESS_MESSAGE, UCM_CONNECTOR_FILE} from '../common/constants';\nimport {CF_ENDPOINT, ORG_ENDPOINT, PEOPLE_ENDPOINT, WEBEX_APIS_INT_URL} from './constants';\nimport * as utils from '../common/Utils';\nimport {UcmBackendConnector} from './UcmBackendConnector';\n\ndescribe('Call Settings Client Tests for UcmBackendConnector', () => {\n const webex = getTestUtilsWebex();\n\n const userId = '8a67806f-fc4d-446b-a131-31e71ea5b0e9';\n const orgId = '1704d30d-a131-4bc7-9449-948487643793';\n\n describe('Call Forward Always test', () => {\n let callSettingsClient: IUcmBackendConnector;\n const callForwardPayload: CallForwardingSettingsUCM = {\n callForwarding: {\n always: [\n {\n dn: '8001',\n destination: '8004',\n destinationVoicemailEnabled: false,\n },\n {\n dn: '8002',\n destinationVoicemailEnabled: true,\n },\n {\n dn: '8003',\n destinationVoicemailEnabled: false,\n },\n ],\n },\n };\n\n const callForwardingUri = `${WEBEX_APIS_INT_URL}/${PEOPLE_ENDPOINT}/${userId}/${CF_ENDPOINT.toLowerCase()}?${ORG_ENDPOINT}=${orgId}`;\n\n beforeAll(() => {\n callSettingsClient = new UcmBackendConnector(webex, {level: LOGGER.INFO}, false);\n });\n\n beforeEach(() => {\n const responsePayload = <WebexRequestPayload>(<unknown>{\n statusCode: 200,\n body: callForwardPayload,\n });\n\n webex.request.mockResolvedValue(responsePayload);\n });\n\n it('Success: Get Call Forward Always setting when set to destination', async () => {\n const response = await callSettingsClient.getCallForwardAlwaysSetting('8001');\n\n const callForwardSetting = response.data.callSetting as CallForwardAlwaysSetting;\n\n expect(response.statusCode).toEqual(200);\n expect(response.message).toEqual(SUCCESS_MESSAGE);\n expect(callForwardSetting.enabled).toEqual(true);\n expect(callForwardSetting.destination).toEqual('8004');\n expect(webex.request).toBeCalledOnceWith({\n method: HTTP_METHODS.GET,\n uri: callForwardingUri,\n });\n });\n\n it('Success: Get Call Forward Always setting when set to voicemail', async () => {\n const response = await callSettingsClient.getCallForwardAlwaysSetting('8002');\n\n const callForwardSetting = response.data.callSetting as CallForwardAlwaysSetting;\n\n expect(response.statusCode).toEqual(200);\n expect(response.message).toEqual(SUCCESS_MESSAGE);\n expect(callForwardSetting.enabled).toEqual(true);\n expect(callForwardSetting.destination).toEqual('VOICEMAIL');\n expect(webex.request).toBeCalledOnceWith({\n method: HTTP_METHODS.GET,\n uri: callForwardingUri,\n });\n });\n\n it('Success: Get Call Forward Always setting when not set', async () => {\n const response = await callSettingsClient.getCallForwardAlwaysSetting('8003');\n\n const callForwardSetting = response.data.callSetting as CallForwardAlwaysSetting;\n\n expect(response.statusCode).toEqual(200);\n expect(response.message).toEqual(SUCCESS_MESSAGE);\n expect(callForwardSetting.enabled).toEqual(false);\n expect(callForwardSetting.destination).toBeFalsy();\n expect(webex.request).toBeCalledOnceWith({\n method: HTTP_METHODS.GET,\n uri: callForwardingUri,\n });\n });\n\n it('Failure: Get Call Forward Always setting fails', async () => {\n const responsePayload = <WebexRequestPayload>(<unknown>{\n statusCode: 503,\n });\n\n webex.request.mockClear();\n webex.request.mockRejectedValue(responsePayload);\n const serviceErrorCodeHandlerSpy = jest.spyOn(utils, 'serviceErrorCodeHandler');\n const response = await callSettingsClient.getCallForwardAlwaysSetting('8002');\n\n expect(response.statusCode).toEqual(503);\n expect(response.message).toEqual(FAILURE_MESSAGE);\n expect(response.data.error).toEqual('Unable to establish a connection with the server');\n expect(webex.request).toBeCalledOnceWith({\n method: HTTP_METHODS.GET,\n uri: callForwardingUri,\n });\n expect(serviceErrorCodeHandlerSpy).toBeCalledOnceWith(responsePayload, {\n file: UCM_CONNECTOR_FILE,\n method: callSettingsClient.getCallForwardAlwaysSetting.name,\n });\n });\n\n it('Failure: Get Call Forward Always setting fails - wrong directoryNumber', async () => {\n const response = await callSettingsClient.getCallForwardAlwaysSetting('8005');\n\n expect(response.statusCode).toEqual(404);\n expect(response.message).toEqual(FAILURE_MESSAGE);\n expect(response.data.error).toEqual('Directory Number is not assigned to the user');\n expect(webex.request).toBeCalledOnceWith({\n method: HTTP_METHODS.GET,\n uri: callForwardingUri,\n });\n });\n\n it('Failure: Get Call Forward Always setting fails when no directoryNumberProvided', async () => {\n const response = await callSettingsClient.getCallForwardAlwaysSetting();\n\n expect(response.statusCode).toEqual(400);\n expect(response.message).toEqual(FAILURE_MESSAGE);\n expect(response.data.error).toEqual('Directory Number is mandatory for UCM backend');\n expect(webex.request).not.toBeCalled();\n });\n\n describe('Unsupported methods return failure', () => {\n const unsupportedMethods: string[] = [\n 'getCallWaitingSetting',\n 'getDoNotDisturbSetting',\n 'setDoNotDisturbSetting',\n 'getCallForwardSetting',\n 'setCallForwardSetting',\n 'getVoicemailSetting',\n 'setVoicemailSetting',\n ];\n\n it.each(unsupportedMethods)('%s', async (methodName) => {\n const response = await callSettingsClient[methodName]();\n\n expect(response.statusCode).toEqual(501);\n expect(response.message).toEqual(FAILURE_MESSAGE);\n expect(response.data.error).toEqual('Method is not implemented at the backend');\n expect(webex.request).not.toBeCalled();\n });\n });\n });\n});\n"],"mappings":";;;;;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAEA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAC,uBAAA,CAAAN,OAAA;AACA,IAAAO,oBAAA,GAAAP,OAAA;AAA0D,SAAAQ,yBAAAC,CAAA,6BAAAC,QAAA,mBAAAC,CAAA,OAAAD,QAAA,IAAAE,CAAA,OAAAF,QAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAH,wBAAAG,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,gBAAAK,OAAA,CAAAL,CAAA,0BAAAA,CAAA,WAAAM,OAAA,EAAAN,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAI,GAAA,CAAAP,CAAA,UAAAG,CAAA,CAAAK,GAAA,CAAAR,CAAA,OAAAS,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,sBAAA,IAAAC,gCAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,IAAAC,MAAA,CAAAC,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAlB,CAAA,EAAAc,CAAA,SAAAK,CAAA,GAAAR,CAAA,GAAAE,gCAAA,CAAAb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AnC,IAAA;YAAA;UAAA,GAAAgC,QAAA;QAAA,CACxC;QAAA,iBAAAI,EAAA;UAAA,OAAAL,KAAA,CAAAM,KAAA,OAAAC,SAAA;QAAA;MAAA,IAAC;IACJ,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"names":["_types","require","utils","_interopRequireWildcard","_constants","_testUtil","_types2","_UcmBackendConnector","_constants2","_getRequireWildcardCache","e","_WeakMap","r","t","__esModule","_typeof","default","has","get","n","__proto__","a","_Object$defineProperty","_Object$getOwnPropertyDescriptor","u","Object","prototype","hasOwnProperty","call","i","set","describe","webex","getTestUtilsWebex","userId","orgId","callSettingsClient","callForwardPayload","callForwarding","always","dn","destination","destinationVoicemailEnabled","e164Number","callForwardingUri","concat","WEBEX_APIS_INT_URL","PEOPLE_ENDPOINT","CF_ENDPOINT","toLowerCase","ORG_ENDPOINT","beforeAll","UcmBackendConnector","level","LOGGER","INFO","beforeEach","responsePayload","statusCode","body","request","mockResolvedValue","it","_asyncToGenerator2","_regenerator","mark","_callee","response","callForwardSetting","wrap","_callee$","_context","prev","next","getCallForwardAlwaysSetting","sent","data","callSetting","expect","toEqual","message","SUCCESS_MESSAGE","enabled","toBeCalledOnceWith","method","HTTP_METHODS","GET","uri","stop","_callee2","_callee2$","_context2","_callee3","_callee3$","_context3","toBeFalsy","_callee4","_callee4$","_context4","_callee5","serviceErrorCodeHandlerSpy","_callee5$","_context5","mockClear","mockRejectedValue","jest","spyOn","FAILURE_MESSAGE","error","file","UCM_CONNECTOR_FILE","name","_callee6","_callee6$","_context6","_callee7","_callee7$","_context7","not","toBeCalled","unsupportedMethods","each","_ref8","_callee8","methodName","_callee8$","_context8","_x","apply","arguments"],"sources":["UcmBackendConnector.test.ts"],"sourcesContent":["import {LOGGER} from '../Logger/types';\nimport * as utils from '../common/Utils';\nimport {FAILURE_MESSAGE, SUCCESS_MESSAGE, UCM_CONNECTOR_FILE} from '../common/constants';\nimport {getTestUtilsWebex} from '../common/testUtil';\nimport {HTTP_METHODS, WebexRequestPayload} from '../common/types';\nimport {UcmBackendConnector} from './UcmBackendConnector';\nimport {CF_ENDPOINT, ORG_ENDPOINT, PEOPLE_ENDPOINT, WEBEX_APIS_INT_URL} from './constants';\nimport {CallForwardAlwaysSetting, CallForwardingSettingsUCM, IUcmBackendConnector} from './types';\n\ndescribe('Call Settings Client Tests for UcmBackendConnector', () => {\n const webex = getTestUtilsWebex();\n\n const userId = '8a67806f-fc4d-446b-a131-31e71ea5b0e9';\n const orgId = '1704d30d-a131-4bc7-9449-948487643793';\n\n describe('Call Forward Always test', () => {\n let callSettingsClient: IUcmBackendConnector;\n const callForwardPayload: CallForwardingSettingsUCM = {\n callForwarding: {\n always: [\n {\n dn: '8001',\n destination: '8004',\n destinationVoicemailEnabled: false,\n e164Number: '+14922999903',\n },\n {\n dn: '8002',\n destinationVoicemailEnabled: true,\n e164Number: '',\n },\n {\n dn: '8003',\n destinationVoicemailEnabled: false,\n e164Number: '',\n },\n {\n dn: '8000',\n destination: '8007',\n destinationVoicemailEnabled: false,\n e164Number: '8006',\n },\n ],\n },\n };\n\n const callForwardingUri = `${WEBEX_APIS_INT_URL}/${PEOPLE_ENDPOINT}/${userId}/${CF_ENDPOINT.toLowerCase()}?${ORG_ENDPOINT}=${orgId}`;\n\n beforeAll(() => {\n callSettingsClient = new UcmBackendConnector(webex, {level: LOGGER.INFO}, false);\n });\n\n beforeEach(() => {\n const responsePayload = <WebexRequestPayload>(<unknown>{\n statusCode: 200,\n body: callForwardPayload,\n });\n\n webex.request.mockResolvedValue(responsePayload);\n });\n\n it('Success: Get Call Forward Always setting when set to destination', async () => {\n const response = await callSettingsClient.getCallForwardAlwaysSetting('8001');\n\n const callForwardSetting = response.data.callSetting as CallForwardAlwaysSetting;\n\n expect(response.statusCode).toEqual(200);\n expect(response.message).toEqual(SUCCESS_MESSAGE);\n expect(callForwardSetting.enabled).toEqual(true);\n expect(callForwardSetting.destination).toEqual('8004');\n expect(webex.request).toBeCalledOnceWith({\n method: HTTP_METHODS.GET,\n uri: callForwardingUri,\n });\n });\n\n it('Success: Get Call Forward Always setting when set to voicemail', async () => {\n const response = await callSettingsClient.getCallForwardAlwaysSetting('8002');\n\n const callForwardSetting = response.data.callSetting as CallForwardAlwaysSetting;\n\n expect(response.statusCode).toEqual(200);\n expect(response.message).toEqual(SUCCESS_MESSAGE);\n expect(callForwardSetting.enabled).toEqual(true);\n expect(callForwardSetting.destination).toEqual('VOICEMAIL');\n expect(webex.request).toBeCalledOnceWith({\n method: HTTP_METHODS.GET,\n uri: callForwardingUri,\n });\n });\n\n it('Success: Get Call Forward Always setting when not set', async () => {\n const response = await callSettingsClient.getCallForwardAlwaysSetting('8003');\n\n const callForwardSetting = response.data.callSetting as CallForwardAlwaysSetting;\n\n expect(response.statusCode).toEqual(200);\n expect(response.message).toEqual(SUCCESS_MESSAGE);\n expect(callForwardSetting.enabled).toEqual(false);\n expect(callForwardSetting.destination).toBeFalsy();\n expect(webex.request).toBeCalledOnceWith({\n method: HTTP_METHODS.GET,\n uri: callForwardingUri,\n });\n });\n\n it('Success: Get Call Forward Always setting when directory num matching with e16number and set to destination', async () => {\n const response = await callSettingsClient.getCallForwardAlwaysSetting('8006');\n\n const callForwardSetting = response.data.callSetting as CallForwardAlwaysSetting;\n\n expect(response.statusCode).toEqual(200);\n expect(response.message).toEqual(SUCCESS_MESSAGE);\n expect(callForwardSetting.enabled).toEqual(true);\n expect(callForwardSetting.destination).toEqual('8007');\n expect(webex.request).toBeCalledOnceWith({\n method: HTTP_METHODS.GET,\n uri: callForwardingUri,\n });\n });\n\n it('Failure: Get Call Forward Always setting fails', async () => {\n const responsePayload = <WebexRequestPayload>(<unknown>{\n statusCode: 503,\n });\n\n webex.request.mockClear();\n webex.request.mockRejectedValue(responsePayload);\n const serviceErrorCodeHandlerSpy = jest.spyOn(utils, 'serviceErrorCodeHandler');\n const response = await callSettingsClient.getCallForwardAlwaysSetting('8002');\n\n expect(response.statusCode).toEqual(503);\n expect(response.message).toEqual(FAILURE_MESSAGE);\n expect(response.data.error).toEqual('Unable to establish a connection with the server');\n expect(webex.request).toBeCalledOnceWith({\n method: HTTP_METHODS.GET,\n uri: callForwardingUri,\n });\n expect(serviceErrorCodeHandlerSpy).toBeCalledOnceWith(responsePayload, {\n file: UCM_CONNECTOR_FILE,\n method: callSettingsClient.getCallForwardAlwaysSetting.name,\n });\n });\n\n it('Failure: Get Call Forward Always setting fails - wrong directoryNumber', async () => {\n const response = await callSettingsClient.getCallForwardAlwaysSetting('8005');\n\n expect(response.statusCode).toEqual(404);\n expect(response.message).toEqual(FAILURE_MESSAGE);\n expect(response.data.error).toEqual('Directory Number is not assigned to the user');\n expect(webex.request).toBeCalledOnceWith({\n method: HTTP_METHODS.GET,\n uri: callForwardingUri,\n });\n });\n\n it('Failure: Get Call Forward Always setting fails when no directoryNumberProvided', async () => {\n const response = await callSettingsClient.getCallForwardAlwaysSetting();\n\n expect(response.statusCode).toEqual(400);\n expect(response.message).toEqual(FAILURE_MESSAGE);\n expect(response.data.error).toEqual('Directory Number is mandatory for UCM backend');\n expect(webex.request).not.toBeCalled();\n });\n\n describe('Unsupported methods return failure', () => {\n const unsupportedMethods: string[] = [\n 'getCallWaitingSetting',\n 'getDoNotDisturbSetting',\n 'setDoNotDisturbSetting',\n 'getCallForwardSetting',\n 'setCallForwardSetting',\n 'getVoicemailSetting',\n 'setVoicemailSetting',\n ];\n\n it.each(unsupportedMethods)('%s', async (methodName) => {\n const response = await callSettingsClient[methodName]();\n\n expect(response.statusCode).toEqual(501);\n expect(response.message).toEqual(FAILURE_MESSAGE);\n expect(response.data.error).toEqual('Method is not implemented at the backend');\n expect(webex.request).not.toBeCalled();\n });\n });\n });\n});\n"],"mappings":";;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ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AC2D,IAAI,CAACD,kBAAkB,CAAC,CAAC,IAAI;QAAA,IAAAE,KAAA,OAAA3D,kBAAA,CAAA/C,OAAA,gBAAAgD,YAAA,CAAAhD,OAAA,CAAAiD,IAAA,CAAE,SAAA0D,SAAOC,UAAU;UAAA,IAAAzD,QAAA;UAAA,OAAAH,YAAA,CAAAhD,OAAA,CAAAqD,IAAA,UAAAwD,UAAAC,SAAA;YAAA,kBAAAA,SAAA,CAAAtD,IAAA,GAAAsD,SAAA,CAAArD,IAAA;cAAA;gBAAAqD,SAAA,CAAArD,IAAA;gBAAA,OAC1BrC,kBAAkB,CAACwF,UAAU,CAAC,CAAC,CAAC;cAAA;gBAAjDzD,QAAQ,GAAA2D,SAAA,CAAAnD,IAAA;gBAEdG,MAAM,CAACX,QAAQ,CAACT,UAAU,CAAC,CAACqB,OAAO,CAAC,GAAG,CAAC;gBACxCD,MAAM,CAACX,QAAQ,CAACa,OAAO,CAAC,CAACD,OAAO,CAAC4B,0BAAe,CAAC;gBACjD7B,MAAM,CAACX,QAAQ,CAACS,IAAI,CAACgC,KAAK,CAAC,CAAC7B,OAAO,CAAC,0CAA0C,CAAC;gBAC/ED,MAAM,CAAC9C,KAAK,CAAC4B,OAAO,CAAC,CAAC0D,GAAG,CAACC,UAAU,CAAC,CAAC;cAAC;cAAA;gBAAA,OAAAO,SAAA,CAAAtC,IAAA;YAAA;UAAA,GAAAmC,QAAA;QAAA,CACxC;QAAA,iBAAAI,EAAA;UAAA,OAAAL,KAAA,CAAAM,KAAA,OAAAC,SAAA;QAAA;MAAA,IAAC;IACJ,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC"}
@@ -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\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":""}
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 e164Number: string;\n};\n\nexport type CallForwardingSettingsUCM = {\n callForwarding: {\n always: CallForwardingAlwaysSettingsUCM[];\n };\n};\n"],"mappings":""}
@@ -1,9 +1,9 @@
1
- import { FAILURE_MESSAGE, STATUS_CODE, SUCCESS_MESSAGE, UCM_CONNECTOR_FILE, VOICEMAIL, } from '../common/constants';
2
- import SDKConnector from '../SDKConnector';
3
1
  import log from '../Logger';
2
+ import SDKConnector from '../SDKConnector';
3
+ import { serviceErrorCodeHandler } from '../common/Utils';
4
+ import { FAILURE_MESSAGE, STATUS_CODE, SUCCESS_MESSAGE, UCM_CONNECTOR_FILE, VOICEMAIL, } from '../common/constants';
4
5
  import { HTTP_METHODS } from '../common/types';
5
6
  import { CF_ENDPOINT, ORG_ENDPOINT, PEOPLE_ENDPOINT, WEBEX_APIS_INT_URL, WEBEX_APIS_PROD_URL, } from './constants';
6
- import { serviceErrorCodeHandler } from '../common/Utils';
7
7
  export class UcmBackendConnector {
8
8
  sdkConnector;
9
9
  webex;
@@ -59,7 +59,7 @@ export class UcmBackendConnector {
59
59
  method: HTTP_METHODS.GET,
60
60
  });
61
61
  const { callForwarding } = resp.body;
62
- const cfa = callForwarding.always.find((item) => item.dn.endsWith(directoryNumber));
62
+ const cfa = callForwarding.always.find((item) => item.dn.endsWith(directoryNumber) || item.e164Number.endsWith(directoryNumber));
63
63
  if (cfa) {
64
64
  const response = {
65
65
  statusCode: Number(resp[STATUS_CODE]),
@@ -1,5 +1,5 @@
1
1
  import { WebexSDK } from '../SDKConnector/types';
2
- import { LoggerInterface, CallSettingResponse, IUcmBackendConnector } from './types';
2
+ import { CallSettingResponse, IUcmBackendConnector, LoggerInterface } from './types';
3
3
  export declare class UcmBackendConnector implements IUcmBackendConnector {
4
4
  private sdkConnector;
5
5
  private webex;
@@ -1 +1 @@
1
- {"version":3,"file":"UcmBackendConnector.d.ts","sourceRoot":"","sources":["../../../src/CallSettings/UcmBackendConnector.ts"],"names":[],"mappings":"AAQA,OAAO,EAAgB,QAAQ,EAAC,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EACL,eAAe,EACf,mBAAmB,EAEnB,oBAAoB,EAErB,MAAM,SAAS,CAAC;AAgBjB,qBAAa,mBAAoB,YAAW,oBAAoB;IAC9D,OAAO,CAAC,YAAY,CAAgB;IAEpC,OAAO,CAAC,KAAK,CAAW;IAExB,OAAO,CAAC,MAAM,CAAS;IAEvB,OAAO,CAAC,KAAK,CAAS;IAEtB,OAAO,CAAC,gBAAgB,CAAU;gBAKtB,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,gBAAgB,UAAO;IAiBtE,qBAAqB,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAOrD,sBAAsB,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAOtD,sBAAsB,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAOtD,qBAAqB,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAOrD,qBAAqB,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAOrD,mBAAmB,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAOnD,mBAAmB,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAO1D,OAAO,CAAC,6BAA6B;IAiBxB,2BAA2B,CAAC,eAAe,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;CA4DjG"}
1
+ {"version":3,"file":"UcmBackendConnector.d.ts","sourceRoot":"","sources":["../../../src/CallSettings/UcmBackendConnector.ts"],"names":[],"mappings":"AAEA,OAAO,EAAgB,QAAQ,EAAC,MAAM,uBAAuB,CAAC;AAiB9D,OAAO,EAGL,mBAAmB,EACnB,oBAAoB,EACpB,eAAe,EAChB,MAAM,SAAS,CAAC;AAMjB,qBAAa,mBAAoB,YAAW,oBAAoB;IAC9D,OAAO,CAAC,YAAY,CAAgB;IAEpC,OAAO,CAAC,KAAK,CAAW;IAExB,OAAO,CAAC,MAAM,CAAS;IAEvB,OAAO,CAAC,KAAK,CAAS;IAEtB,OAAO,CAAC,gBAAgB,CAAU;gBAKtB,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,gBAAgB,UAAO;IAiBtE,qBAAqB,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAOrD,sBAAsB,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAOtD,sBAAsB,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAOtD,qBAAqB,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAOrD,qBAAqB,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAOrD,mBAAmB,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAOnD,mBAAmB,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAO1D,OAAO,CAAC,6BAA6B;IAiBxB,2BAA2B,CAAC,eAAe,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;CA8DjG"}
@@ -99,6 +99,7 @@ export type CallForwardingAlwaysSettingsUCM = {
99
99
  dn: string;
100
100
  destination?: string;
101
101
  destinationVoicemailEnabled: boolean;
102
+ e164Number: string;
102
103
  };
103
104
  export type CallForwardingSettingsUCM = {
104
105
  callForwarding: {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/CallSettings/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,iBAAiB,CAAC;AAEvC,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAKF,MAAM,MAAM,wBAAwB,GAAG;IAIrC,OAAO,EAAE,OAAO,CAAC;IAIjB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAK9B,2BAA2B,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;IACrB,2BAA2B,EAAE,OAAO,CAAC;IACrC,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,cAAc,EAAE;QACd,MAAM,EAAE,+BAA+B,EAAE,CAAC;KAC3C,CAAC;CACH,CAAC"}
package/package.json CHANGED
@@ -40,7 +40,7 @@
40
40
  "dependencies": {
41
41
  "@types/platform": "1.3.4",
42
42
  "@webex/internal-media-core": "2.0.0",
43
- "@webex/media-helpers": "3.0.0-next.17",
43
+ "@webex/media-helpers": "3.0.0-next.18",
44
44
  "async-mutex": "0.4.0",
45
45
  "buffer": "6.0.3",
46
46
  "jest-html-reporters": "3.0.11",
@@ -131,5 +131,5 @@
131
131
  "staticpath": "docs",
132
132
  "noprompt": true
133
133
  },
134
- "version": "3.0.0-next.31"
134
+ "version": "3.0.0-next.33"
135
135
  }