@webex/calling 3.10.0-next.12 → 3.10.0-next.14

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.
Files changed (90) hide show
  1. package/dist/CallHistory/CallHistory.js +118 -124
  2. package/dist/CallHistory/CallHistory.js.map +1 -1
  3. package/dist/CallHistory/CallHistory.test.js +189 -201
  4. package/dist/CallHistory/CallHistory.test.js.map +1 -1
  5. package/dist/CallSettings/CallSettings.js +17 -18
  6. package/dist/CallSettings/CallSettings.js.map +1 -1
  7. package/dist/CallSettings/CallSettings.test.js +14 -14
  8. package/dist/CallSettings/CallSettings.test.js.map +1 -1
  9. package/dist/CallSettings/UcmBackendConnector.js +19 -20
  10. package/dist/CallSettings/UcmBackendConnector.js.map +1 -1
  11. package/dist/CallSettings/UcmBackendConnector.test.js +32 -32
  12. package/dist/CallSettings/UcmBackendConnector.test.js.map +1 -1
  13. package/dist/CallSettings/WxCallBackendConnector.js +135 -137
  14. package/dist/CallSettings/WxCallBackendConnector.js.map +1 -1
  15. package/dist/CallSettings/WxCallBackendConnector.test.js +145 -149
  16. package/dist/CallSettings/WxCallBackendConnector.test.js.map +1 -1
  17. package/dist/CallingClient/CallingClient.js +198 -201
  18. package/dist/CallingClient/CallingClient.js.map +1 -1
  19. package/dist/CallingClient/CallingClient.test.js +168 -168
  20. package/dist/CallingClient/CallingClient.test.js.map +1 -1
  21. package/dist/CallingClient/calling/CallerId/index.js +7 -8
  22. package/dist/CallingClient/calling/CallerId/index.js.map +1 -1
  23. package/dist/CallingClient/calling/CallerId/index.test.js +24 -24
  24. package/dist/CallingClient/calling/CallerId/index.test.js.map +1 -1
  25. package/dist/CallingClient/calling/call.js +647 -621
  26. package/dist/CallingClient/calling/call.js.map +1 -1
  27. package/dist/CallingClient/calling/call.test.js +602 -624
  28. package/dist/CallingClient/calling/call.test.js.map +1 -1
  29. package/dist/CallingClient/calling/callManager.js +15 -18
  30. package/dist/CallingClient/calling/callManager.js.map +1 -1
  31. package/dist/CallingClient/calling/callManager.test.js +113 -113
  32. package/dist/CallingClient/calling/callManager.test.js.map +1 -1
  33. package/dist/CallingClient/line/index.js +57 -74
  34. package/dist/CallingClient/line/index.js.map +1 -1
  35. package/dist/CallingClient/line/line.test.js +22 -22
  36. package/dist/CallingClient/line/line.test.js.map +1 -1
  37. package/dist/CallingClient/registration/register.js +293 -300
  38. package/dist/CallingClient/registration/register.js.map +1 -1
  39. package/dist/CallingClient/registration/register.test.js +246 -246
  40. package/dist/CallingClient/registration/register.test.js.map +1 -1
  41. package/dist/CallingClient/registration/webWorker.js +24 -24
  42. package/dist/CallingClient/registration/webWorker.js.map +1 -1
  43. package/dist/CallingClient/registration/webWorker.test.js +20 -20
  44. package/dist/CallingClient/registration/webWorker.test.js.map +1 -1
  45. package/dist/CallingClient/windowsChromiumIceWarmupUtils.js +28 -28
  46. package/dist/CallingClient/windowsChromiumIceWarmupUtils.js.map +1 -1
  47. package/dist/Contacts/ContactsClient.js +250 -253
  48. package/dist/Contacts/ContactsClient.js.map +1 -1
  49. package/dist/Contacts/ContactsClient.test.js +60 -60
  50. package/dist/Contacts/ContactsClient.test.js.map +1 -1
  51. package/dist/Errors/catalog/CallError.js +7 -10
  52. package/dist/Errors/catalog/CallError.js.map +1 -1
  53. package/dist/Errors/catalog/CallingDeviceError.js +6 -9
  54. package/dist/Errors/catalog/CallingDeviceError.js.map +1 -1
  55. package/dist/Errors/catalog/ExtendedError.js +6 -8
  56. package/dist/Errors/catalog/ExtendedError.js.map +1 -1
  57. package/dist/Errors/catalog/LineError.js +6 -9
  58. package/dist/Errors/catalog/LineError.js.map +1 -1
  59. package/dist/Events/impl/index.js +11 -13
  60. package/dist/Events/impl/index.js.map +1 -1
  61. package/dist/Metrics/index.js +1 -2
  62. package/dist/Metrics/index.js.map +1 -1
  63. package/dist/SDKConnector/index.js +1 -2
  64. package/dist/SDKConnector/index.js.map +1 -1
  65. package/dist/Voicemail/BroadworksBackendConnector.js +126 -127
  66. package/dist/Voicemail/BroadworksBackendConnector.js.map +1 -1
  67. package/dist/Voicemail/BroadworksBackendConnector.test.js +98 -98
  68. package/dist/Voicemail/BroadworksBackendConnector.test.js.map +1 -1
  69. package/dist/Voicemail/UcmBackendConnector.js +84 -85
  70. package/dist/Voicemail/UcmBackendConnector.js.map +1 -1
  71. package/dist/Voicemail/UcmBackendConnector.test.js +72 -72
  72. package/dist/Voicemail/UcmBackendConnector.test.js.map +1 -1
  73. package/dist/Voicemail/Voicemail.js +58 -61
  74. package/dist/Voicemail/Voicemail.js.map +1 -1
  75. package/dist/Voicemail/Voicemail.test.js +20 -20
  76. package/dist/Voicemail/Voicemail.test.js.map +1 -1
  77. package/dist/Voicemail/WxCallBackendConnector.js +116 -117
  78. package/dist/Voicemail/WxCallBackendConnector.js.map +1 -1
  79. package/dist/Voicemail/WxCallBackendConnector.test.js +140 -140
  80. package/dist/Voicemail/WxCallBackendConnector.test.js.map +1 -1
  81. package/dist/common/Utils.js +168 -167
  82. package/dist/common/Utils.js.map +1 -1
  83. package/dist/common/Utils.test.js +120 -120
  84. package/dist/common/Utils.test.js.map +1 -1
  85. package/dist/common/testUtil.js +3 -3
  86. package/dist/common/testUtil.js.map +1 -1
  87. package/dist/module/CallingClient/calling/call.js +54 -45
  88. package/dist/types/CallingClient/calling/call.d.ts +3 -1
  89. package/dist/types/CallingClient/calling/call.d.ts.map +1 -1
  90. package/package.json +2 -2
@@ -17,7 +17,7 @@ var utils = _interopRequireWildcard(require("../common/Utils"));
17
17
  var _WxCallBackendConnector = require("./WxCallBackendConnector");
18
18
  var _Logger = _interopRequireDefault(require("../Logger"));
19
19
  var _testFixtures = require("./testFixtures");
20
- function _interopRequireWildcard(e, t) { if ("function" == typeof _WeakMap) var r = new _WeakMap(), n = new _WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = _Object$defineProperty) && _Object$getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
20
+ function _interopRequireWildcard(e, t) { if ("function" == typeof _WeakMap) var r = new _WeakMap(), n = new _WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t19 in e) "default" !== _t19 && {}.hasOwnProperty.call(e, _t19) && ((i = (o = _Object$defineProperty) && _Object$getOwnPropertyDescriptor(e, _t19)) && (i.get || i.set) ? o(f, _t19, i) : f[_t19] = e[_t19]); return f; })(e, t); }
21
21
  /* eslint-disable dot-notation */
22
22
 
23
23
  jest.spyOn(utils, 'uploadLogs').mockResolvedValue(undefined);
@@ -55,7 +55,7 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
55
55
  var callWaitingUrl = "".concat(xsiEndpoint, "/").concat(_constants2.XSI_VERSION, "/").concat(_constants2.USER_ENDPOINT, "/").concat(userId, "/").concat(_constants.SERVICES_ENDPOINT, "/").concat(_constants2.CALL_WAITING_ENDPOINT);
56
56
  beforeAll(/*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
57
57
  var urlResponsePayload;
58
- return _regenerator.default.wrap(function _callee$(_context) {
58
+ return _regenerator.default.wrap(function (_context) {
59
59
  while (1) switch (_context.prev = _context.next) {
60
60
  case 0:
61
61
  callSettingsClient = new _WxCallBackendConnector.WxCallBackendConnector(webex, {
@@ -66,24 +66,24 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
66
66
  body: _testFixtures.xsiEndpointUrlResponse
67
67
  };
68
68
  webex.request.mockResolvedValue(urlResponsePayload);
69
- _context.next = 5;
69
+ _context.next = 1;
70
70
  return callSettingsClient.getCallWaitingSetting();
71
- case 5:
71
+ case 1:
72
72
  expect(webex.request).toBeCalledOnceWith({
73
73
  method: _types2.HTTP_METHODS.GET,
74
74
  uri: webexUri
75
75
  });
76
76
  expect(callSettingsClient['xsiEndpoint']).toEqual(xsiEndpoint);
77
77
  webex.request.mockClear();
78
- case 8:
78
+ case 2:
79
79
  case "end":
80
80
  return _context.stop();
81
81
  }
82
82
  }, _callee);
83
83
  })));
84
84
  it('Success: Get Call Waiting setting enabled', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() {
85
- var callWaitingMockedResponse, response, toggleSetting;
86
- return _regenerator.default.wrap(function _callee2$(_context2) {
85
+ var callWaitingMockedResponse, response, toggleSetting, _t, _t2, _t3, _t4, _t5;
86
+ return _regenerator.default.wrap(function (_context2) {
87
87
  while (1) switch (_context2.prev = _context2.next) {
88
88
  case 0:
89
89
  callWaitingMockedResponse = '<CallWaiting><active>true</active></CallWaiting>';
@@ -96,30 +96,29 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
96
96
  }
97
97
  });
98
98
  });
99
- _context2.next = 4;
99
+ _context2.next = 1;
100
100
  return callSettingsClient.getCallWaitingSetting();
101
- case 4:
101
+ case 1:
102
102
  response = _context2.sent;
103
103
  toggleSetting = response.data.callSetting;
104
104
  expect(webex.request).not.toBeCalled();
105
105
  expect(response.statusCode).toBe(200);
106
106
  expect(response.message).toBe(_constants.SUCCESS_MESSAGE);
107
107
  expect(toggleSetting.enabled).toStrictEqual(true);
108
- _context2.t0 = expect(global.fetch);
109
- _context2.t1 = callWaitingUrl;
110
- _context2.t2 = _types2.HTTP_METHODS.GET;
111
- _context2.next = 15;
108
+ _t = expect(global.fetch);
109
+ _t2 = callWaitingUrl;
110
+ _t3 = _types2.HTTP_METHODS.GET;
111
+ _context2.next = 2;
112
112
  return webex.credentials.getUserToken();
113
- case 15:
114
- _context2.t3 = _context2.sent;
115
- _context2.t4 = {
116
- Authorization: _context2.t3
113
+ case 2:
114
+ _t4 = _context2.sent;
115
+ _t5 = {
116
+ Authorization: _t4
117
117
  };
118
- _context2.t5 = {
119
- method: _context2.t2,
120
- headers: _context2.t4
121
- };
122
- _context2.t0.toBeCalledOnceWith.call(_context2.t0, _context2.t1, _context2.t5);
118
+ _t.toBeCalledOnceWith.call(_t, _t2, {
119
+ method: _t3,
120
+ headers: _t5
121
+ });
123
122
  expect(infoSpy).toHaveBeenCalledWith(_constants.METHOD_START_MESSAGE, {
124
123
  file: _constants.WEBEX_CALLING_CONNECTOR_FILE,
125
124
  method: 'getCallWaitingSetting'
@@ -129,15 +128,15 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
129
128
  method: 'getCallWaitingSetting'
130
129
  });
131
130
  expect(errorSpy).not.toHaveBeenCalled();
132
- case 22:
131
+ case 3:
133
132
  case "end":
134
133
  return _context2.stop();
135
134
  }
136
135
  }, _callee2);
137
136
  })));
138
137
  it('Success: Get Call Waiting setting disabled', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() {
139
- var callWaitingMockedResponse, response, toggleSetting;
140
- return _regenerator.default.wrap(function _callee3$(_context3) {
138
+ var callWaitingMockedResponse, response, toggleSetting, _t6, _t7, _t8, _t9, _t0;
139
+ return _regenerator.default.wrap(function (_context3) {
141
140
  while (1) switch (_context3.prev = _context3.next) {
142
141
  case 0:
143
142
  callWaitingMockedResponse = '<CallWaiting><active>false</active></CallWaiting>';
@@ -150,39 +149,38 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
150
149
  }
151
150
  });
152
151
  });
153
- _context3.next = 4;
152
+ _context3.next = 1;
154
153
  return callSettingsClient.getCallWaitingSetting();
155
- case 4:
154
+ case 1:
156
155
  response = _context3.sent;
157
156
  toggleSetting = response.data.callSetting;
158
157
  expect(webex.request).not.toBeCalled();
159
158
  expect(response.statusCode).toBe(200);
160
159
  expect(response.message).toBe(_constants.SUCCESS_MESSAGE);
161
160
  expect(toggleSetting.enabled).toStrictEqual(false);
162
- _context3.t0 = expect(global.fetch);
163
- _context3.t1 = callWaitingUrl;
164
- _context3.t2 = _types2.HTTP_METHODS.GET;
165
- _context3.next = 15;
161
+ _t6 = expect(global.fetch);
162
+ _t7 = callWaitingUrl;
163
+ _t8 = _types2.HTTP_METHODS.GET;
164
+ _context3.next = 2;
166
165
  return webex.credentials.getUserToken();
167
- case 15:
168
- _context3.t3 = _context3.sent;
169
- _context3.t4 = {
170
- Authorization: _context3.t3
166
+ case 2:
167
+ _t9 = _context3.sent;
168
+ _t0 = {
169
+ Authorization: _t9
171
170
  };
172
- _context3.t5 = {
173
- method: _context3.t2,
174
- headers: _context3.t4
175
- };
176
- _context3.t0.toBeCalledOnceWith.call(_context3.t0, _context3.t1, _context3.t5);
177
- case 19:
171
+ _t6.toBeCalledOnceWith.call(_t6, _t7, {
172
+ method: _t8,
173
+ headers: _t0
174
+ });
175
+ case 3:
178
176
  case "end":
179
177
  return _context3.stop();
180
178
  }
181
179
  }, _callee3);
182
180
  })));
183
181
  it('Error: Get Call Waiting setting throw 403 error', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4() {
184
- var response;
185
- return _regenerator.default.wrap(function _callee4$(_context4) {
182
+ var response, _t1, _t10, _t11, _t12, _t13;
183
+ return _regenerator.default.wrap(function (_context4) {
186
184
  while (1) switch (_context4.prev = _context4.next) {
187
185
  case 0:
188
186
  global.fetch = jest.fn(function () {
@@ -191,27 +189,26 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
191
189
  ok: false
192
190
  });
193
191
  });
194
- _context4.next = 3;
192
+ _context4.next = 1;
195
193
  return callSettingsClient.getCallWaitingSetting();
196
- case 3:
194
+ case 1:
197
195
  response = _context4.sent;
198
196
  expect(response.statusCode).toBe(403);
199
197
  expect(response.message).toBe(_constants.FAILURE_MESSAGE);
200
- _context4.t0 = expect(global.fetch);
201
- _context4.t1 = callWaitingUrl;
202
- _context4.t2 = _types2.HTTP_METHODS.GET;
203
- _context4.next = 11;
198
+ _t1 = expect(global.fetch);
199
+ _t10 = callWaitingUrl;
200
+ _t11 = _types2.HTTP_METHODS.GET;
201
+ _context4.next = 2;
204
202
  return webex.credentials.getUserToken();
205
- case 11:
206
- _context4.t3 = _context4.sent;
207
- _context4.t4 = {
208
- Authorization: _context4.t3
209
- };
210
- _context4.t5 = {
211
- method: _context4.t2,
212
- headers: _context4.t4
203
+ case 2:
204
+ _t12 = _context4.sent;
205
+ _t13 = {
206
+ Authorization: _t12
213
207
  };
214
- _context4.t0.toBeCalledOnceWith.call(_context4.t0, _context4.t1, _context4.t5);
208
+ _t1.toBeCalledOnceWith.call(_t1, _t10, {
209
+ method: _t11,
210
+ headers: _t13
211
+ });
215
212
  expect(serviceErrorCodeHandlerSpy).toBeCalledOnceWith({
216
213
  statusCode: 403
217
214
  }, {
@@ -227,48 +224,47 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
227
224
  method: 'getCallWaitingSetting'
228
225
  });
229
226
  expect(logSpy).not.toHaveBeenCalled();
230
- case 19:
227
+ case 3:
231
228
  case "end":
232
229
  return _context4.stop();
233
230
  }
234
231
  }, _callee4);
235
232
  })));
236
233
  it('Error: Get Call Waiting settings throw URI error', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee5() {
237
- var response;
238
- return _regenerator.default.wrap(function _callee5$(_context5) {
234
+ var response, _t14, _t15, _t16, _t17, _t18;
235
+ return _regenerator.default.wrap(function (_context5) {
239
236
  while (1) switch (_context5.prev = _context5.next) {
240
237
  case 0:
241
238
  global.fetch = jest.fn().mockImplementation(function () {
242
239
  throw new URIError('422');
243
240
  });
244
- _context5.next = 3;
241
+ _context5.next = 1;
245
242
  return callSettingsClient.getCallWaitingSetting();
246
- case 3:
243
+ case 1:
247
244
  response = _context5.sent;
248
245
  expect(response.statusCode).toBe(422);
249
246
  expect(response.message).toBe(_constants.FAILURE_MESSAGE);
250
- _context5.t0 = expect(global.fetch);
251
- _context5.t1 = callWaitingUrl;
252
- _context5.t2 = _types2.HTTP_METHODS.GET;
253
- _context5.next = 11;
247
+ _t14 = expect(global.fetch);
248
+ _t15 = callWaitingUrl;
249
+ _t16 = _types2.HTTP_METHODS.GET;
250
+ _context5.next = 2;
254
251
  return webex.credentials.getUserToken();
255
- case 11:
256
- _context5.t3 = _context5.sent;
257
- _context5.t4 = {
258
- Authorization: _context5.t3
259
- };
260
- _context5.t5 = {
261
- method: _context5.t2,
262
- headers: _context5.t4
252
+ case 2:
253
+ _t17 = _context5.sent;
254
+ _t18 = {
255
+ Authorization: _t17
263
256
  };
264
- _context5.t0.toBeCalledOnceWith.call(_context5.t0, _context5.t1, _context5.t5);
257
+ _t14.toBeCalledOnceWith.call(_t14, _t15, {
258
+ method: _t16,
259
+ headers: _t18
260
+ });
265
261
  expect(serviceErrorCodeHandlerSpy).toBeCalledOnceWith({
266
262
  statusCode: 422
267
263
  }, {
268
264
  file: _constants.WEBEX_CALLING_CONNECTOR_FILE,
269
265
  method: 'getCallWaitingSetting'
270
266
  });
271
- case 16:
267
+ case 3:
272
268
  case "end":
273
269
  return _context5.stop();
274
270
  }
@@ -285,7 +281,7 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
285
281
  });
286
282
  it('Success: Set DND settings', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee6() {
287
283
  var dndRequestBody, response;
288
- return _regenerator.default.wrap(function _callee6$(_context6) {
284
+ return _regenerator.default.wrap(function (_context6) {
289
285
  while (1) switch (_context6.prev = _context6.next) {
290
286
  case 0:
291
287
  dndRequestBody = {
@@ -293,9 +289,9 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
293
289
  ringSplashEnabled: false
294
290
  };
295
291
  webex.request.mockResolvedValueOnce(responsePayload204);
296
- _context6.next = 4;
292
+ _context6.next = 1;
297
293
  return callSettingsClient.setDoNotDisturbSetting(false);
298
- case 4:
294
+ case 1:
299
295
  response = _context6.sent;
300
296
  expect(response.statusCode).toBe(204);
301
297
  expect(response.message).toBe(_constants.SUCCESS_MESSAGE);
@@ -304,7 +300,7 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
304
300
  uri: uri,
305
301
  body: dndRequestBody
306
302
  });
307
- case 8:
303
+ case 2:
308
304
  case "end":
309
305
  return _context6.stop();
310
306
  }
@@ -312,7 +308,7 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
312
308
  })));
313
309
  it('Success: Get DND setting', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee7() {
314
310
  var dndResponsePayload, response, toggleSetting;
315
- return _regenerator.default.wrap(function _callee7$(_context7) {
311
+ return _regenerator.default.wrap(function (_context7) {
316
312
  while (1) switch (_context7.prev = _context7.next) {
317
313
  case 0:
318
314
  dndResponsePayload = {
@@ -322,9 +318,9 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
322
318
  }
323
319
  };
324
320
  webex.request.mockResolvedValueOnce(dndResponsePayload);
325
- _context7.next = 4;
321
+ _context7.next = 1;
326
322
  return callSettingsClient.getDoNotDisturbSetting();
327
- case 4:
323
+ case 1:
328
324
  response = _context7.sent;
329
325
  toggleSetting = response.data.callSetting;
330
326
  expect(response.statusCode).toBe(200);
@@ -343,7 +339,7 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
343
339
  method: 'getDoNotDisturbSetting'
344
340
  });
345
341
  expect(errorSpy).not.toHaveBeenCalled();
346
- case 13:
342
+ case 2:
347
343
  case "end":
348
344
  return _context7.stop();
349
345
  }
@@ -351,7 +347,7 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
351
347
  })));
352
348
  it('Error: Set DND setting', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee8() {
353
349
  var dndRequestBody, response;
354
- return _regenerator.default.wrap(function _callee8$(_context8) {
350
+ return _regenerator.default.wrap(function (_context8) {
355
351
  while (1) switch (_context8.prev = _context8.next) {
356
352
  case 0:
357
353
  dndRequestBody = {
@@ -359,9 +355,9 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
359
355
  ringSplashEnabled: false
360
356
  };
361
357
  webex.request.mockRejectedValueOnce(responsePayload400);
362
- _context8.next = 4;
358
+ _context8.next = 1;
363
359
  return callSettingsClient.setDoNotDisturbSetting(false);
364
- case 4:
360
+ case 1:
365
361
  response = _context8.sent;
366
362
  expect(response.statusCode).toBe(400);
367
363
  expect(response.message).toBe(_constants.FAILURE_MESSAGE);
@@ -376,7 +372,7 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
376
372
  file: _constants.WEBEX_CALLING_CONNECTOR_FILE,
377
373
  method: 'setDoNotDisturbSetting'
378
374
  });
379
- case 9:
375
+ case 2:
380
376
  case "end":
381
377
  return _context8.stop();
382
378
  }
@@ -384,13 +380,13 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
384
380
  })));
385
381
  it('Error: Get DND setting', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee9() {
386
382
  var response;
387
- return _regenerator.default.wrap(function _callee9$(_context9) {
383
+ return _regenerator.default.wrap(function (_context9) {
388
384
  while (1) switch (_context9.prev = _context9.next) {
389
385
  case 0:
390
386
  webex.request.mockRejectedValueOnce(responsePayload403);
391
- _context9.next = 3;
387
+ _context9.next = 1;
392
388
  return callSettingsClient.getDoNotDisturbSetting();
393
- case 3:
389
+ case 1:
394
390
  response = _context9.sent;
395
391
  expect(response.statusCode).toBe(403);
396
392
  expect(response.message).toBe(_constants.FAILURE_MESSAGE);
@@ -410,7 +406,7 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
410
406
  });
411
407
  expect(errorSpy).toHaveBeenCalled();
412
408
  expect(logSpy).not.toHaveBeenCalled();
413
- case 11:
409
+ case 2:
414
410
  case "end":
415
411
  return _context9.stop();
416
412
  }
@@ -427,13 +423,13 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
427
423
  });
428
424
  it('Success: Set Call Forward setting', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee0() {
429
425
  var response;
430
- return _regenerator.default.wrap(function _callee0$(_context0) {
426
+ return _regenerator.default.wrap(function (_context0) {
431
427
  while (1) switch (_context0.prev = _context0.next) {
432
428
  case 0:
433
429
  webex.request.mockResolvedValueOnce(responsePayload204);
434
- _context0.next = 3;
430
+ _context0.next = 1;
435
431
  return callSettingsClient.setCallForwardSetting(_testFixtures.callForwardPayload);
436
- case 3:
432
+ case 1:
437
433
  response = _context0.sent;
438
434
  expect(response.statusCode).toBe(204);
439
435
  expect(response.message).toBe(_constants.SUCCESS_MESSAGE);
@@ -442,7 +438,7 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
442
438
  uri: uri,
443
439
  body: _testFixtures.callForwardPayload
444
440
  });
445
- case 7:
441
+ case 2:
446
442
  case "end":
447
443
  return _context0.stop();
448
444
  }
@@ -450,7 +446,7 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
450
446
  })));
451
447
  it('Success: Get Call Forward setting', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee1() {
452
448
  var responsePayload, response, callForwardSetting;
453
- return _regenerator.default.wrap(function _callee1$(_context1) {
449
+ return _regenerator.default.wrap(function (_context1) {
454
450
  while (1) switch (_context1.prev = _context1.next) {
455
451
  case 0:
456
452
  responsePayload = {
@@ -458,9 +454,9 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
458
454
  body: _testFixtures.callForwardPayload
459
455
  };
460
456
  webex.request.mockResolvedValueOnce(responsePayload);
461
- _context1.next = 4;
457
+ _context1.next = 1;
462
458
  return callSettingsClient.getCallForwardSetting();
463
- case 4:
459
+ case 1:
464
460
  response = _context1.sent;
465
461
  callForwardSetting = response.data.callSetting;
466
462
  expect(response.statusCode).toBe(200);
@@ -470,7 +466,7 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
470
466
  method: _types2.HTTP_METHODS.GET,
471
467
  uri: uri
472
468
  });
473
- case 10:
469
+ case 2:
474
470
  case "end":
475
471
  return _context1.stop();
476
472
  }
@@ -478,13 +474,13 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
478
474
  })));
479
475
  it('Error: Set Call Forwarding setting', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee10() {
480
476
  var response;
481
- return _regenerator.default.wrap(function _callee10$(_context10) {
477
+ return _regenerator.default.wrap(function (_context10) {
482
478
  while (1) switch (_context10.prev = _context10.next) {
483
479
  case 0:
484
480
  webex.request.mockRejectedValueOnce(responsePayload400);
485
- _context10.next = 3;
481
+ _context10.next = 1;
486
482
  return callSettingsClient.setCallForwardSetting(_testFixtures.callForwardPayload);
487
- case 3:
483
+ case 1:
488
484
  response = _context10.sent;
489
485
  expect(response.statusCode).toBe(400);
490
486
  expect(response.message).toBe(_constants.FAILURE_MESSAGE);
@@ -499,7 +495,7 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
499
495
  file: _constants.WEBEX_CALLING_CONNECTOR_FILE,
500
496
  method: 'setCallForwardSetting'
501
497
  });
502
- case 8:
498
+ case 2:
503
499
  case "end":
504
500
  return _context10.stop();
505
501
  }
@@ -507,13 +503,13 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
507
503
  })));
508
504
  it('Error: Get Call Forwarding setting', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee11() {
509
505
  var response;
510
- return _regenerator.default.wrap(function _callee11$(_context11) {
506
+ return _regenerator.default.wrap(function (_context11) {
511
507
  while (1) switch (_context11.prev = _context11.next) {
512
508
  case 0:
513
509
  webex.request.mockRejectedValueOnce(responsePayload403);
514
- _context11.next = 3;
510
+ _context11.next = 1;
515
511
  return callSettingsClient.getCallForwardSetting();
516
- case 3:
512
+ case 1:
517
513
  response = _context11.sent;
518
514
  expect(response.statusCode).toBe(403);
519
515
  expect(response.message).toBe(_constants.FAILURE_MESSAGE);
@@ -527,7 +523,7 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
527
523
  file: _constants.WEBEX_CALLING_CONNECTOR_FILE,
528
524
  method: 'getCallForwardSetting'
529
525
  });
530
- case 8:
526
+ case 2:
531
527
  case "end":
532
528
  return _context11.stop();
533
529
  }
@@ -544,13 +540,13 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
544
540
  });
545
541
  it('Success: Set Voicemail setting', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee12() {
546
542
  var response;
547
- return _regenerator.default.wrap(function _callee12$(_context12) {
543
+ return _regenerator.default.wrap(function (_context12) {
548
544
  while (1) switch (_context12.prev = _context12.next) {
549
545
  case 0:
550
546
  webex.request.mockResolvedValueOnce(responsePayload204);
551
- _context12.next = 3;
547
+ _context12.next = 1;
552
548
  return callSettingsClient.setVoicemailSetting(_testFixtures.voicemailPayload);
553
- case 3:
549
+ case 1:
554
550
  response = _context12.sent;
555
551
  expect(response.statusCode).toBe(204);
556
552
  expect(response.message).toBe(_constants.SUCCESS_MESSAGE);
@@ -559,7 +555,7 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
559
555
  uri: uri,
560
556
  body: _testFixtures.voicemailPayload
561
557
  });
562
- case 7:
558
+ case 2:
563
559
  case "end":
564
560
  return _context12.stop();
565
561
  }
@@ -567,7 +563,7 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
567
563
  })));
568
564
  it('Success: Get Voicemail setting', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee13() {
569
565
  var responsePayload, response, voicemailSetting;
570
- return _regenerator.default.wrap(function _callee13$(_context13) {
566
+ return _regenerator.default.wrap(function (_context13) {
571
567
  while (1) switch (_context13.prev = _context13.next) {
572
568
  case 0:
573
569
  responsePayload = {
@@ -575,9 +571,9 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
575
571
  body: _testFixtures.voicemailPayload
576
572
  };
577
573
  webex.request.mockResolvedValueOnce(responsePayload);
578
- _context13.next = 4;
574
+ _context13.next = 1;
579
575
  return callSettingsClient.getVoicemailSetting();
580
- case 4:
576
+ case 1:
581
577
  response = _context13.sent;
582
578
  voicemailSetting = response.data.callSetting;
583
579
  expect(response.statusCode).toBe(200);
@@ -587,7 +583,7 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
587
583
  method: _types2.HTTP_METHODS.GET,
588
584
  uri: uri
589
585
  });
590
- case 10:
586
+ case 2:
591
587
  case "end":
592
588
  return _context13.stop();
593
589
  }
@@ -595,13 +591,13 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
595
591
  })));
596
592
  it('Error: Set Voicemail setting', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee14() {
597
593
  var response;
598
- return _regenerator.default.wrap(function _callee14$(_context14) {
594
+ return _regenerator.default.wrap(function (_context14) {
599
595
  while (1) switch (_context14.prev = _context14.next) {
600
596
  case 0:
601
597
  webex.request.mockRejectedValueOnce(responsePayload400);
602
- _context14.next = 3;
598
+ _context14.next = 1;
603
599
  return callSettingsClient.setVoicemailSetting(_testFixtures.voicemailPayload);
604
- case 3:
600
+ case 1:
605
601
  response = _context14.sent;
606
602
  expect(response.statusCode).toBe(400);
607
603
  expect(response.message).toBe(_constants.FAILURE_MESSAGE);
@@ -616,7 +612,7 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
616
612
  file: _constants.WEBEX_CALLING_CONNECTOR_FILE,
617
613
  method: 'setVoicemailSetting'
618
614
  });
619
- case 8:
615
+ case 2:
620
616
  case "end":
621
617
  return _context14.stop();
622
618
  }
@@ -624,13 +620,13 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
624
620
  })));
625
621
  it('Error: Get Voicemail setting', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee15() {
626
622
  var response;
627
- return _regenerator.default.wrap(function _callee15$(_context15) {
623
+ return _regenerator.default.wrap(function (_context15) {
628
624
  while (1) switch (_context15.prev = _context15.next) {
629
625
  case 0:
630
626
  webex.request.mockRejectedValueOnce(responsePayload403);
631
- _context15.next = 3;
627
+ _context15.next = 1;
632
628
  return callSettingsClient.getVoicemailSetting();
633
- case 3:
629
+ case 1:
634
630
  response = _context15.sent;
635
631
  expect(response.statusCode).toBe(403);
636
632
  expect(response.message).toBe(_constants.FAILURE_MESSAGE);
@@ -644,7 +640,7 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
644
640
  file: _constants.WEBEX_CALLING_CONNECTOR_FILE,
645
641
  method: 'getVoicemailSetting'
646
642
  });
647
- case 8:
643
+ case 2:
648
644
  case "end":
649
645
  return _context15.stop();
650
646
  }
@@ -662,7 +658,7 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
662
658
  });
663
659
  it('Success: Get Call Forward Always setting when set to destination', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee16() {
664
660
  var responsePayload, response, callForwardSetting;
665
- return _regenerator.default.wrap(function _callee16$(_context16) {
661
+ return _regenerator.default.wrap(function (_context16) {
666
662
  while (1) switch (_context16.prev = _context16.next) {
667
663
  case 0:
668
664
  responsePayload = {
@@ -670,9 +666,9 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
670
666
  body: _testFixtures.callForwardPayload
671
667
  };
672
668
  webex.request.mockResolvedValueOnce(responsePayload);
673
- _context16.next = 4;
669
+ _context16.next = 1;
674
670
  return callSettingsClient.getCallForwardAlwaysSetting();
675
- case 4:
671
+ case 1:
676
672
  response = _context16.sent;
677
673
  callForwardSetting = response.data.callSetting;
678
674
  expect(response.statusCode).toBe(200);
@@ -683,7 +679,7 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
683
679
  method: _types2.HTTP_METHODS.GET,
684
680
  uri: callForwardingUri
685
681
  });
686
- case 11:
682
+ case 2:
687
683
  case "end":
688
684
  return _context16.stop();
689
685
  }
@@ -691,7 +687,7 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
691
687
  })));
692
688
  it('Success: Get Call Forward Always setting in Fedramp with limited options in payload', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee17() {
693
689
  var responsePayload, voicemailResponsePayload, response, callSetting;
694
- return _regenerator.default.wrap(function _callee17$(_context17) {
690
+ return _regenerator.default.wrap(function (_context17) {
695
691
  while (1) switch (_context17.prev = _context17.next) {
696
692
  case 0:
697
693
  responsePayload = {
@@ -730,9 +726,9 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
730
726
  }
731
727
  };
732
728
  webex.request.mockResolvedValueOnce(responsePayload).mockResolvedValueOnce(voicemailResponsePayload);
733
- _context17.next = 5;
729
+ _context17.next = 1;
734
730
  return callSettingsClient.getCallForwardAlwaysSetting();
735
- case 5:
731
+ case 1:
736
732
  response = _context17.sent;
737
733
  callSetting = response.data.callSetting;
738
734
  expect(response.statusCode).toBe(200);
@@ -750,7 +746,7 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
750
746
  method: _types2.HTTP_METHODS.GET,
751
747
  uri: voicemailUri
752
748
  });
753
- case 16:
749
+ case 2:
754
750
  case "end":
755
751
  return _context17.stop();
756
752
  }
@@ -758,7 +754,7 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
758
754
  })));
759
755
  it('Success: Get Call Forward Always setting when set to disabled and voicemail request fails', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee18() {
760
756
  var responsePayload, response;
761
- return _regenerator.default.wrap(function _callee18$(_context18) {
757
+ return _regenerator.default.wrap(function (_context18) {
762
758
  while (1) switch (_context18.prev = _context18.next) {
763
759
  case 0:
764
760
  _testFixtures.callForwardPayload.callForwarding.always.enabled = false;
@@ -769,9 +765,9 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
769
765
  webex.request.mockResolvedValueOnce(responsePayload).mockRejectedValueOnce({
770
766
  statusCode: 503
771
767
  });
772
- _context18.next = 5;
768
+ _context18.next = 1;
773
769
  return callSettingsClient.getCallForwardAlwaysSetting();
774
- case 5:
770
+ case 1:
775
771
  response = _context18.sent;
776
772
  expect(response.statusCode).toBe(503);
777
773
  expect(response.message).toBe(_constants.FAILURE_MESSAGE);
@@ -794,7 +790,7 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
794
790
  file: _constants.WEBEX_CALLING_CONNECTOR_FILE,
795
791
  method: callSettingsClient.getCallForwardAlwaysSetting.name
796
792
  });
797
- case 15:
793
+ case 2:
798
794
  case "end":
799
795
  return _context18.stop();
800
796
  }
@@ -802,7 +798,7 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
802
798
  })));
803
799
  it('Success: Get Call Forward Always setting when set to voicemail', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee19() {
804
800
  var responsePayload, response, callForwardSetting;
805
- return _regenerator.default.wrap(function _callee19$(_context19) {
801
+ return _regenerator.default.wrap(function (_context19) {
806
802
  while (1) switch (_context19.prev = _context19.next) {
807
803
  case 0:
808
804
  _testFixtures.callForwardPayload.callForwarding.always.enabled = false;
@@ -814,9 +810,9 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
814
810
  statusCode: 200,
815
811
  body: _testFixtures.voicemailPayload
816
812
  });
817
- _context19.next = 5;
813
+ _context19.next = 1;
818
814
  return callSettingsClient.getCallForwardAlwaysSetting();
819
- case 5:
815
+ case 1:
820
816
  response = _context19.sent;
821
817
  callForwardSetting = response.data.callSetting;
822
818
  expect(response.statusCode).toBe(200);
@@ -832,7 +828,7 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
832
828
  method: _types2.HTTP_METHODS.GET,
833
829
  uri: voicemailUri
834
830
  });
835
- case 14:
831
+ case 2:
836
832
  case "end":
837
833
  return _context19.stop();
838
834
  }
@@ -840,7 +836,7 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
840
836
  })));
841
837
  it('Success: Get Call Forward Always setting when not set', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee20() {
842
838
  var responsePayload, response, callForwardSetting;
843
- return _regenerator.default.wrap(function _callee20$(_context20) {
839
+ return _regenerator.default.wrap(function (_context20) {
844
840
  while (1) switch (_context20.prev = _context20.next) {
845
841
  case 0:
846
842
  _testFixtures.callForwardPayload.callForwarding.always.enabled = false;
@@ -854,9 +850,9 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
854
850
  statusCode: 200,
855
851
  body: _testFixtures.voicemailPayload
856
852
  });
857
- _context20.next = 7;
853
+ _context20.next = 1;
858
854
  return callSettingsClient.getCallForwardAlwaysSetting();
859
- case 7:
855
+ case 1:
860
856
  response = _context20.sent;
861
857
  callForwardSetting = response.data.callSetting;
862
858
  expect(response.statusCode).toBe(200);
@@ -872,7 +868,7 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
872
868
  method: _types2.HTTP_METHODS.GET,
873
869
  uri: voicemailUri
874
870
  });
875
- case 16:
871
+ case 2:
876
872
  case "end":
877
873
  return _context20.stop();
878
874
  }
@@ -880,16 +876,16 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
880
876
  })));
881
877
  it('Failure: Get Call Forward Always setting fails', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee21() {
882
878
  var responsePayload, response;
883
- return _regenerator.default.wrap(function _callee21$(_context21) {
879
+ return _regenerator.default.wrap(function (_context21) {
884
880
  while (1) switch (_context21.prev = _context21.next) {
885
881
  case 0:
886
882
  responsePayload = {
887
883
  statusCode: 503
888
884
  };
889
885
  webex.request.mockRejectedValueOnce(responsePayload);
890
- _context21.next = 4;
886
+ _context21.next = 1;
891
887
  return callSettingsClient.getCallForwardAlwaysSetting();
892
- case 4:
888
+ case 1:
893
889
  response = _context21.sent;
894
890
  expect(response.statusCode).toBe(503);
895
891
  expect(response.message).toBe(_constants.FAILURE_MESSAGE);
@@ -897,7 +893,7 @@ describe('Call Settings Client Tests for WxCallBackendConnector', function () {
897
893
  method: _types2.HTTP_METHODS.GET,
898
894
  uri: callForwardingUri
899
895
  });
900
- case 8:
896
+ case 2:
901
897
  case "end":
902
898
  return _context21.stop();
903
899
  }