@webex/calling 3.9.0 → 3.10.0-next.1

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 (193) hide show
  1. package/dist/CallHistory/CallHistory.js +43 -43
  2. package/dist/CallHistory/CallHistory.js.map +1 -1
  3. package/dist/CallHistory/CallHistory.test.js +157 -152
  4. package/dist/CallHistory/CallHistory.test.js.map +1 -1
  5. package/dist/CallHistory/callHistoryFixtures.js.map +1 -1
  6. package/dist/CallHistory/constants.js.map +1 -1
  7. package/dist/CallHistory/types.js.map +1 -1
  8. package/dist/CallSettings/CallSettings.js +8 -8
  9. package/dist/CallSettings/CallSettings.js.map +1 -1
  10. package/dist/CallSettings/CallSettings.test.js +1 -1
  11. package/dist/CallSettings/CallSettings.test.js.map +1 -1
  12. package/dist/CallSettings/UcmBackendConnector.js +12 -11
  13. package/dist/CallSettings/UcmBackendConnector.js.map +1 -1
  14. package/dist/CallSettings/UcmBackendConnector.test.js +11 -11
  15. package/dist/CallSettings/UcmBackendConnector.test.js.map +1 -1
  16. package/dist/CallSettings/WxCallBackendConnector.js +53 -52
  17. package/dist/CallSettings/WxCallBackendConnector.js.map +1 -1
  18. package/dist/CallSettings/WxCallBackendConnector.test.js +112 -110
  19. package/dist/CallSettings/WxCallBackendConnector.test.js.map +1 -1
  20. package/dist/CallSettings/constants.js.map +1 -1
  21. package/dist/CallSettings/testFixtures.js.map +1 -1
  22. package/dist/CallSettings/types.js.map +1 -1
  23. package/dist/CallingClient/CallingClient.js +458 -203
  24. package/dist/CallingClient/CallingClient.js.map +1 -1
  25. package/dist/CallingClient/CallingClient.test.js +458 -315
  26. package/dist/CallingClient/CallingClient.test.js.map +1 -1
  27. package/dist/CallingClient/callRecordFixtures.js.map +1 -1
  28. package/dist/CallingClient/calling/CallerId/index.js +2 -2
  29. package/dist/CallingClient/calling/CallerId/index.js.map +1 -1
  30. package/dist/CallingClient/calling/CallerId/index.test.js +8 -7
  31. package/dist/CallingClient/calling/CallerId/index.test.js.map +1 -1
  32. package/dist/CallingClient/calling/CallerId/types.js.map +1 -1
  33. package/dist/CallingClient/calling/call.js +405 -372
  34. package/dist/CallingClient/calling/call.js.map +1 -1
  35. package/dist/CallingClient/calling/call.test.js +411 -410
  36. package/dist/CallingClient/calling/call.test.js.map +1 -1
  37. package/dist/CallingClient/calling/callManager.js +3 -4
  38. package/dist/CallingClient/calling/callManager.js.map +1 -1
  39. package/dist/CallingClient/calling/callManager.test.js +68 -69
  40. package/dist/CallingClient/calling/callManager.test.js.map +1 -1
  41. package/dist/CallingClient/calling/index.js.map +1 -1
  42. package/dist/CallingClient/calling/types.js.map +1 -1
  43. package/dist/CallingClient/callingClientFixtures.js.map +1 -1
  44. package/dist/CallingClient/constants.js +9 -6
  45. package/dist/CallingClient/constants.js.map +1 -1
  46. package/dist/CallingClient/line/index.js +10 -11
  47. package/dist/CallingClient/line/index.js.map +1 -1
  48. package/dist/CallingClient/line/line.test.js +10 -9
  49. package/dist/CallingClient/line/line.test.js.map +1 -1
  50. package/dist/CallingClient/line/types.js.map +1 -1
  51. package/dist/CallingClient/registration/index.js.map +1 -1
  52. package/dist/CallingClient/registration/register.js +285 -205
  53. package/dist/CallingClient/registration/register.js.map +1 -1
  54. package/dist/CallingClient/registration/register.test.js +251 -180
  55. package/dist/CallingClient/registration/register.test.js.map +1 -1
  56. package/dist/CallingClient/registration/registerFixtures.js.map +1 -1
  57. package/dist/CallingClient/registration/types.js.map +1 -1
  58. package/dist/CallingClient/registration/webWorker.js +25 -10
  59. package/dist/CallingClient/registration/webWorker.js.map +1 -1
  60. package/dist/CallingClient/registration/webWorker.test.js +85 -38
  61. package/dist/CallingClient/registration/webWorker.test.js.map +1 -1
  62. package/dist/CallingClient/registration/webWorkerStr.js +1 -1
  63. package/dist/CallingClient/registration/webWorkerStr.js.map +1 -1
  64. package/dist/CallingClient/types.js.map +1 -1
  65. package/dist/CallingClient/windowsChromiumIceWarmupUtils.js +142 -0
  66. package/dist/CallingClient/windowsChromiumIceWarmupUtils.js.map +1 -0
  67. package/dist/Contacts/ContactsClient.js +244 -247
  68. package/dist/Contacts/ContactsClient.js.map +1 -1
  69. package/dist/Contacts/ContactsClient.test.js +93 -93
  70. package/dist/Contacts/ContactsClient.test.js.map +1 -1
  71. package/dist/Contacts/constants.js +2 -2
  72. package/dist/Contacts/constants.js.map +1 -1
  73. package/dist/Contacts/contactFixtures.js.map +1 -1
  74. package/dist/Contacts/types.js.map +1 -1
  75. package/dist/Errors/catalog/CallError.js +2 -2
  76. package/dist/Errors/catalog/CallError.js.map +1 -1
  77. package/dist/Errors/catalog/CallingDeviceError.js +2 -2
  78. package/dist/Errors/catalog/CallingDeviceError.js.map +1 -1
  79. package/dist/Errors/catalog/ExtendedError.js +3 -3
  80. package/dist/Errors/catalog/ExtendedError.js.map +1 -1
  81. package/dist/Errors/catalog/LineError.js +2 -2
  82. package/dist/Errors/catalog/LineError.js.map +1 -1
  83. package/dist/Errors/index.js.map +1 -1
  84. package/dist/Errors/types.js.map +1 -1
  85. package/dist/Events/impl/index.js +4 -3
  86. package/dist/Events/impl/index.js.map +1 -1
  87. package/dist/Events/types.js.map +1 -1
  88. package/dist/Logger/index.js +3 -3
  89. package/dist/Logger/index.js.map +1 -1
  90. package/dist/Logger/index.test.js +1 -1
  91. package/dist/Logger/index.test.js.map +1 -1
  92. package/dist/Logger/types.js.map +1 -1
  93. package/dist/Metrics/index.js +221 -104
  94. package/dist/Metrics/index.js.map +1 -1
  95. package/dist/Metrics/index.test.js +112 -23
  96. package/dist/Metrics/index.test.js.map +1 -1
  97. package/dist/Metrics/types.js +15 -1
  98. package/dist/Metrics/types.js.map +1 -1
  99. package/dist/SDKConnector/index.js +0 -1
  100. package/dist/SDKConnector/index.js.map +1 -1
  101. package/dist/SDKConnector/index.test.js.map +1 -1
  102. package/dist/SDKConnector/types.js.map +1 -1
  103. package/dist/SDKConnector/utils.js.map +1 -1
  104. package/dist/SDKConnector/utils.test.js.map +1 -1
  105. package/dist/Voicemail/BroadworksBackendConnector.js +55 -61
  106. package/dist/Voicemail/BroadworksBackendConnector.js.map +1 -1
  107. package/dist/Voicemail/BroadworksBackendConnector.test.js +129 -122
  108. package/dist/Voicemail/BroadworksBackendConnector.test.js.map +1 -1
  109. package/dist/Voicemail/UcmBackendConnector.js +53 -50
  110. package/dist/Voicemail/UcmBackendConnector.js.map +1 -1
  111. package/dist/Voicemail/UcmBackendConnector.test.js +73 -74
  112. package/dist/Voicemail/UcmBackendConnector.test.js.map +1 -1
  113. package/dist/Voicemail/Voicemail.js +89 -113
  114. package/dist/Voicemail/Voicemail.js.map +1 -1
  115. package/dist/Voicemail/Voicemail.test.js +2 -2
  116. package/dist/Voicemail/Voicemail.test.js.map +1 -1
  117. package/dist/Voicemail/WxCallBackendConnector.js +87 -92
  118. package/dist/Voicemail/WxCallBackendConnector.js.map +1 -1
  119. package/dist/Voicemail/WxCallBackendConnector.test.js +228 -203
  120. package/dist/Voicemail/WxCallBackendConnector.test.js.map +1 -1
  121. package/dist/Voicemail/constants.js.map +1 -1
  122. package/dist/Voicemail/types.js.map +1 -1
  123. package/dist/Voicemail/voicemailFixture.js.map +1 -1
  124. package/dist/api.js.map +1 -1
  125. package/dist/common/Utils.js +85 -66
  126. package/dist/common/Utils.js.map +1 -1
  127. package/dist/common/Utils.test.js +113 -123
  128. package/dist/common/Utils.test.js.map +1 -1
  129. package/dist/common/constants.js.map +1 -1
  130. package/dist/common/index.js.map +1 -1
  131. package/dist/common/testUtil.js +1 -1
  132. package/dist/common/testUtil.js.map +1 -1
  133. package/dist/common/types.js.map +1 -1
  134. package/dist/index.js +5 -5
  135. package/dist/index.js.map +1 -1
  136. package/dist/module/CallHistory/CallHistory.js +17 -8
  137. package/dist/module/CallSettings/UcmBackendConnector.js +2 -2
  138. package/dist/module/CallSettings/WxCallBackendConnector.js +14 -14
  139. package/dist/module/CallingClient/CallingClient.js +176 -36
  140. package/dist/module/CallingClient/calling/call.js +91 -61
  141. package/dist/module/CallingClient/constants.js +8 -4
  142. package/dist/module/CallingClient/line/index.js +3 -3
  143. package/dist/module/CallingClient/registration/register.js +37 -13
  144. package/dist/module/CallingClient/registration/webWorker.js +17 -3
  145. package/dist/module/CallingClient/registration/webWorkerStr.js +19 -3
  146. package/dist/module/CallingClient/windowsChromiumIceWarmupUtils.js +59 -0
  147. package/dist/module/Contacts/ContactsClient.js +33 -37
  148. package/dist/module/Contacts/constants.js +1 -1
  149. package/dist/module/Events/impl/index.js +2 -1
  150. package/dist/module/Logger/index.js +2 -2
  151. package/dist/module/Metrics/index.js +142 -55
  152. package/dist/module/Metrics/types.js +14 -0
  153. package/dist/module/Voicemail/BroadworksBackendConnector.js +10 -17
  154. package/dist/module/Voicemail/UcmBackendConnector.js +11 -10
  155. package/dist/module/Voicemail/Voicemail.js +42 -68
  156. package/dist/module/Voicemail/WxCallBackendConnector.js +22 -28
  157. package/dist/module/common/Utils.js +29 -12
  158. package/dist/types/CallHistory/CallHistory.d.ts.map +1 -1
  159. package/dist/types/CallSettings/UcmBackendConnector.d.ts.map +1 -1
  160. package/dist/types/CallSettings/WxCallBackendConnector.d.ts.map +1 -1
  161. package/dist/types/CallingClient/CallingClient.d.ts +12 -1
  162. package/dist/types/CallingClient/CallingClient.d.ts.map +1 -1
  163. package/dist/types/CallingClient/calling/call.d.ts.map +1 -1
  164. package/dist/types/CallingClient/calling/types.d.ts +2 -1
  165. package/dist/types/CallingClient/calling/types.d.ts.map +1 -1
  166. package/dist/types/CallingClient/constants.d.ts +8 -4
  167. package/dist/types/CallingClient/constants.d.ts.map +1 -1
  168. package/dist/types/CallingClient/line/index.d.ts.map +1 -1
  169. package/dist/types/CallingClient/registration/register.d.ts +1 -0
  170. package/dist/types/CallingClient/registration/register.d.ts.map +1 -1
  171. package/dist/types/CallingClient/registration/webWorker.d.ts +2 -1
  172. package/dist/types/CallingClient/registration/webWorker.d.ts.map +1 -1
  173. package/dist/types/CallingClient/registration/webWorkerStr.d.ts +1 -1
  174. package/dist/types/CallingClient/registration/webWorkerStr.d.ts.map +1 -1
  175. package/dist/types/CallingClient/windowsChromiumIceWarmupUtils.d.ts +5 -0
  176. package/dist/types/CallingClient/windowsChromiumIceWarmupUtils.d.ts.map +1 -0
  177. package/dist/types/Contacts/ContactsClient.d.ts.map +1 -1
  178. package/dist/types/Contacts/constants.d.ts +1 -1
  179. package/dist/types/Contacts/constants.d.ts.map +1 -1
  180. package/dist/types/Events/impl/index.d.ts.map +1 -1
  181. package/dist/types/Logger/index.d.ts +1 -2
  182. package/dist/types/Logger/index.d.ts.map +1 -1
  183. package/dist/types/Metrics/index.d.ts.map +1 -1
  184. package/dist/types/Metrics/types.d.ts +18 -3
  185. package/dist/types/Metrics/types.d.ts.map +1 -1
  186. package/dist/types/Voicemail/BroadworksBackendConnector.d.ts.map +1 -1
  187. package/dist/types/Voicemail/UcmBackendConnector.d.ts.map +1 -1
  188. package/dist/types/Voicemail/Voicemail.d.ts.map +1 -1
  189. package/dist/types/Voicemail/WxCallBackendConnector.d.ts.map +1 -1
  190. package/dist/types/common/Utils.d.ts.map +1 -1
  191. package/dist/types/common/types.d.ts +1 -0
  192. package/dist/types/common/types.d.ts.map +1 -1
  193. package/package.json +10 -8
@@ -13,6 +13,7 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regene
13
13
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
14
14
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
15
15
  var _assign = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/assign"));
16
+ var _stringify = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/json/stringify"));
16
17
  var _types = require("../common/types");
17
18
  var _testUtil = require("../common/testUtil");
18
19
  var _types2 = require("../Logger/types");
@@ -22,8 +23,7 @@ var _Logger = _interopRequireDefault(require("../Logger"));
22
23
  var _constants2 = require("./constants");
23
24
  var utils = _interopRequireWildcard(require("../common/Utils"));
24
25
  var _contactFixtures = require("./contactFixtures");
25
- 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); }
26
- 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; }
26
+ 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); }
27
27
  function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
28
28
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
29
29
  describe('ContactClient Tests', function () {
@@ -172,7 +172,7 @@ describe('ContactClient Tests', function () {
172
172
  });
173
173
  });
174
174
  it.each(errorCodes)('%s', /*#__PURE__*/function () {
175
- var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(codeObj) {
175
+ var _ref = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(codeObj) {
176
176
  var respPayload, contactsResponse;
177
177
  return _regenerator.default.wrap(function _callee$(_context) {
178
178
  while (1) switch (_context.prev = _context.next) {
@@ -219,12 +219,12 @@ describe('ContactClient Tests', function () {
219
219
  });
220
220
  }
221
221
  expect(_Logger.default.info).toHaveBeenCalledWith(_constants.METHOD_START_MESSAGE, {
222
- file: _constants2.CONTACTS_FILE,
222
+ file: _constants2.CONTACTS_CLIENT,
223
223
  method: _constants2.METHODS.GET_CONTACTS
224
224
  });
225
225
  if (codeObj.payloadData) {
226
226
  expect(_Logger.default.log).toHaveBeenCalledWith('Successfully fetched contacts and groups', {
227
- file: _constants2.CONTACTS_FILE,
227
+ file: _constants2.CONTACTS_CLIENT,
228
228
  method: _constants2.METHODS.GET_CONTACTS
229
229
  });
230
230
  } else {
@@ -236,7 +236,7 @@ describe('ContactClient Tests', function () {
236
236
  method: _types.HTTP_METHODS.GET
237
237
  });
238
238
  expect(_Logger.default.info).toHaveBeenCalledWith(_constants.METHOD_START_MESSAGE, {
239
- file: _constants2.CONTACTS_FILE,
239
+ file: _constants2.CONTACTS_CLIENT,
240
240
  method: _constants2.METHODS.GET_CONTACTS
241
241
  });
242
242
  expect(_Logger.default.error).toHaveBeenCalled();
@@ -250,7 +250,7 @@ describe('ContactClient Tests', function () {
250
250
  expect(serviceErrorCodeHandlerSpy).not.toBeCalled();
251
251
  } else {
252
252
  expect(serviceErrorCodeHandlerSpy).toBeCalledOnceWith(codeObj.payloadData ? respPayload : expect.any(Error), {
253
- file: _constants2.CONTACTS_FILE,
253
+ file: _constants2.CONTACTS_CLIENT,
254
254
  method: _constants2.METHODS.GET_CONTACTS
255
255
  });
256
256
  }
@@ -264,7 +264,7 @@ describe('ContactClient Tests', function () {
264
264
  return _ref.apply(this, arguments);
265
265
  };
266
266
  }());
267
- it('create a contact group without encryptionKey', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
267
+ it('create a contact group without encryptionKey', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() {
268
268
  var _contactsResponse$dat;
269
269
  var successResponsePayload, contactsResponse;
270
270
  return _regenerator.default.wrap(function _callee2$(_context2) {
@@ -316,23 +316,23 @@ describe('ContactClient Tests', function () {
316
316
  expect(contactClient['groups'].length).toEqual(2);
317
317
  expect(contactClient['groups'][1].displayName).toEqual('Top Contacts');
318
318
  expect(_Logger.default.info).toHaveBeenCalledWith("".concat(_constants.METHOD_START_MESSAGE, " with displayName: Top Contacts"), {
319
- file: _constants2.CONTACTS_FILE,
319
+ file: _constants2.CONTACTS_CLIENT,
320
320
  method: _constants2.METHODS.CREATE_CONTACT_GROUP
321
321
  });
322
322
  expect(_Logger.default.info).toHaveBeenCalledWith(_constants.METHOD_START_MESSAGE, {
323
- file: _constants2.CONTACTS_FILE,
323
+ file: _constants2.CONTACTS_CLIENT,
324
324
  method: _constants2.METHODS.CREATE_NEW_ENCRYPTION_KEY_URL
325
325
  });
326
326
  expect(_Logger.default.info).toHaveBeenCalledWith('Requesting kms for a new KRO and key', {
327
- file: _constants2.CONTACTS_FILE,
327
+ file: _constants2.CONTACTS_CLIENT,
328
328
  method: _constants2.METHODS.CREATE_NEW_ENCRYPTION_KEY_URL
329
329
  });
330
330
  expect(_Logger.default.log).toHaveBeenCalledWith("Creating a default group: ".concat(_constants2.DEFAULT_GROUP_NAME), {
331
- file: _constants2.CONTACTS_FILE,
331
+ file: _constants2.CONTACTS_CLIENT,
332
332
  method: 'fetchEncryptionKeyUrl'
333
333
  });
334
334
  expect(_Logger.default.log).toHaveBeenCalledWith("Contact group Top Contacts successfully created", {
335
- file: _constants2.CONTACTS_FILE,
335
+ file: _constants2.CONTACTS_CLIENT,
336
336
  method: _constants2.METHODS.CREATE_CONTACT_GROUP
337
337
  });
338
338
  case 24:
@@ -341,7 +341,7 @@ describe('ContactClient Tests', function () {
341
341
  }
342
342
  }, _callee2);
343
343
  })));
344
- it('create a contact group with existing key info', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
344
+ it('create a contact group with existing key info', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() {
345
345
  var _contactsResponse$dat2;
346
346
  var successResponsePayload, infoSpy, contactsResponse;
347
347
  return _regenerator.default.wrap(function _callee3$(_context3) {
@@ -362,15 +362,15 @@ describe('ContactClient Tests', function () {
362
362
  expect(contactsResponse.statusCode).toEqual(201);
363
363
  expect((_contactsResponse$dat2 = contactsResponse.data.group) === null || _contactsResponse$dat2 === void 0 ? void 0 : _contactsResponse$dat2.groupId).toBe(mockGroupResponse.groupId);
364
364
  expect(infoSpy).toBeCalledWith("".concat(_constants.METHOD_START_MESSAGE, " with displayName: Top Contacts"), {
365
- file: _constants2.CONTACTS_FILE,
365
+ file: _constants2.CONTACTS_CLIENT,
366
366
  method: _constants2.METHODS.CREATE_CONTACT_GROUP
367
367
  });
368
368
  expect(_Logger.default.log).toBeCalledWith("Contact group Top Contacts successfully created", {
369
- file: _constants2.CONTACTS_FILE,
369
+ file: _constants2.CONTACTS_CLIENT,
370
370
  method: _constants2.METHODS.CREATE_CONTACT_GROUP
371
371
  });
372
372
  expect(infoSpy).not.toBeCalledWith(_constants.METHOD_START_MESSAGE, {
373
- file: _constants2.CONTACTS_FILE,
373
+ file: _constants2.CONTACTS_CLIENT,
374
374
  method: _constants2.METHODS.CREATE_NEW_ENCRYPTION_KEY_URL
375
375
  });
376
376
  expect(webex.request).toBeCalledOnceWith({
@@ -391,7 +391,7 @@ describe('ContactClient Tests', function () {
391
391
  }
392
392
  }, _callee3);
393
393
  })));
394
- it('create a contact group with same displayName', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
394
+ it('create a contact group with same displayName', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4() {
395
395
  var logSpy, contactsResponse;
396
396
  return _regenerator.default.wrap(function _callee4$(_context4) {
397
397
  while (1) switch (_context4.prev = _context4.next) {
@@ -407,11 +407,11 @@ describe('ContactClient Tests', function () {
407
407
  expect(webex.request).not.toBeCalled();
408
408
  expect(contactsResponse.statusCode).toBe(400);
409
409
  expect(logSpy).toBeCalledOnceWith("Group name ".concat(mockGroupResponse.displayName, " already exists."), {
410
- file: _constants2.CONTACTS_FILE,
410
+ file: _constants2.CONTACTS_CLIENT,
411
411
  method: _constants2.METHODS.CREATE_CONTACT_GROUP
412
412
  });
413
413
  expect(_Logger.default.info).toBeCalledWith("".concat(_constants.METHOD_START_MESSAGE, " with displayName: ").concat(mockGroupResponse.displayName), {
414
- file: _constants2.CONTACTS_FILE,
414
+ file: _constants2.CONTACTS_CLIENT,
415
415
  method: _constants2.METHODS.CREATE_CONTACT_GROUP
416
416
  });
417
417
  expect(contactClient['groups']).toEqual(_contactFixtures.mockContactResponseBodyOne.groups);
@@ -421,13 +421,13 @@ describe('ContactClient Tests', function () {
421
421
  }
422
422
  }, _callee4);
423
423
  })));
424
- it('create a contact group - service unavailable', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
424
+ it('create a contact group - service unavailable', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee5() {
425
425
  var loggerContext, warnSpy, errorSpy, contactsResponse;
426
426
  return _regenerator.default.wrap(function _callee5$(_context5) {
427
427
  while (1) switch (_context5.prev = _context5.next) {
428
428
  case 0:
429
429
  loggerContext = {
430
- file: _constants2.CONTACTS_FILE,
430
+ file: _constants2.CONTACTS_CLIENT,
431
431
  method: 'createContactGroup'
432
432
  };
433
433
  contactClient['groups'] = _contactFixtures.mockContactGroupListOne;
@@ -456,7 +456,7 @@ describe('ContactClient Tests', function () {
456
456
  expect(warnSpy).toBeCalledTimes(1);
457
457
  expect(warnSpy).toHaveBeenNthCalledWith(1, '503 Unable to establish a connection with the server', loggerContext);
458
458
  expect(errorSpy).toBeCalledTimes(1);
459
- expect(errorSpy).toHaveBeenNthCalledWith(1, Error("Unable to create contact group: ".concat(failureResponsePayload)), loggerContext);
459
+ expect(errorSpy).toHaveBeenNthCalledWith(1, "Unable to create contact group: ".concat((0, _stringify.default)(failureResponsePayload)), loggerContext);
460
460
  expect(contactClient['groups']).toEqual(_contactFixtures.mockContactGroupListOne);
461
461
  expect(serviceErrorCodeHandlerSpy).toBeCalledOnceWith(failureResponsePayload, loggerContext);
462
462
  case 20:
@@ -465,13 +465,13 @@ describe('ContactClient Tests', function () {
465
465
  }
466
466
  }, _callee5);
467
467
  })));
468
- it('delete a contact group - service unavailable', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
468
+ it('delete a contact group - service unavailable', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee6() {
469
469
  var loggerContext, warnSpy, errorSpy, contactsResponse;
470
470
  return _regenerator.default.wrap(function _callee6$(_context6) {
471
471
  while (1) switch (_context6.prev = _context6.next) {
472
472
  case 0:
473
473
  loggerContext = {
474
- file: _constants2.CONTACTS_FILE,
474
+ file: _constants2.CONTACTS_CLIENT,
475
475
  method: 'deleteContactGroup'
476
476
  };
477
477
  contactClient['groups'] = _contactFixtures.mockContactGroupListOne;
@@ -494,7 +494,7 @@ describe('ContactClient Tests', function () {
494
494
  expect(warnSpy).toBeCalledTimes(1);
495
495
  expect(errorSpy).toBeCalledTimes(1);
496
496
  expect(uploadLogsSpy).toBeCalledTimes(1);
497
- expect(errorSpy).toHaveBeenNthCalledWith(1, Error("Unable to delete contact group ".concat(mockGroupResponse.groupId, ": ").concat(failureResponsePayload)), loggerContext);
497
+ expect(errorSpy).toHaveBeenNthCalledWith(1, "Unable to delete contact group ".concat(mockGroupResponse.groupId, ": ").concat((0, _stringify.default)(failureResponsePayload)), loggerContext);
498
498
  expect(warnSpy).toHaveBeenNthCalledWith(1, '503 Unable to establish a connection with the server', loggerContext);
499
499
  expect(contactClient['groups']).toEqual(_contactFixtures.mockContactGroupListOne);
500
500
  expect(serviceErrorCodeHandlerSpy).toBeCalledOnceWith(failureResponsePayload, loggerContext);
@@ -504,7 +504,7 @@ describe('ContactClient Tests', function () {
504
504
  }
505
505
  }, _callee6);
506
506
  })));
507
- it('successful deletion of contact group', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
507
+ it('successful deletion of contact group', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee7() {
508
508
  var successResponsePayload, response;
509
509
  return _regenerator.default.wrap(function _callee7$(_context7) {
510
510
  while (1) switch (_context7.prev = _context7.next) {
@@ -525,11 +525,11 @@ describe('ContactClient Tests', function () {
525
525
  });
526
526
  expect(contactClient['groups']).toEqual([]);
527
527
  expect(_Logger.default.info).toBeCalledWith("Deleting contact group: ".concat(_contactFixtures.mockContactGroupListOne[0].groupId), {
528
- file: _constants2.CONTACTS_FILE,
528
+ file: _constants2.CONTACTS_CLIENT,
529
529
  method: 'deleteContactGroup'
530
530
  });
531
531
  expect(_Logger.default.log).toBeCalledWith("Contact group ".concat(_contactFixtures.mockContactGroupListOne[0].groupId, " successfully deleted"), {
532
- file: _constants2.CONTACTS_FILE,
532
+ file: _constants2.CONTACTS_CLIENT,
533
533
  method: 'deleteContactGroup'
534
534
  });
535
535
  case 11:
@@ -538,7 +538,7 @@ describe('ContactClient Tests', function () {
538
538
  }
539
539
  }, _callee7);
540
540
  })));
541
- it('create a contact with an existing group', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
541
+ it('create a contact with an existing group', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee8() {
542
542
  var _res$data$contact, _result$data$contact;
543
543
  var mockContactResponse, successResponsePayload, infoSpy, logSpy, contact, res, result;
544
544
  return _regenerator.default.wrap(function _callee8$(_context8) {
@@ -564,23 +564,23 @@ describe('ContactClient Tests', function () {
564
564
  expect(res.statusCode).toEqual(201);
565
565
  expect((_res$data$contact = res.data.contact) === null || _res$data$contact === void 0 ? void 0 : _res$data$contact.contactId).toBe(mockContactResponse.contactId);
566
566
  expect(infoSpy).toBeCalledWith("".concat(_constants.METHOD_START_MESSAGE, " with contactType: ").concat(contact.contactType), {
567
- file: _constants2.CONTACTS_FILE,
567
+ file: _constants2.CONTACTS_CLIENT,
568
568
  method: _constants2.METHODS.CREATE_CONTACT
569
569
  });
570
570
  expect(logSpy).toBeCalledWith("Contact successfully created", {
571
- file: _constants2.CONTACTS_FILE,
571
+ file: _constants2.CONTACTS_CLIENT,
572
572
  method: _constants2.METHODS.CREATE_CONTACT
573
573
  });
574
574
  expect(logSpy).not.toBeCalledWith('Created a KRO and encryptionKeyUrl', {
575
- file: _constants2.CONTACTS_FILE,
575
+ file: _constants2.CONTACTS_CLIENT,
576
576
  method: 'createNewEncryptionKeyUrl'
577
577
  });
578
578
  expect(logSpy).not.toBeCalledWith('Created a KRO and encryptionKeyUrl', {
579
- file: _constants2.CONTACTS_FILE,
579
+ file: _constants2.CONTACTS_CLIENT,
580
580
  method: 'createNewEncryptionKeyUrl'
581
581
  });
582
582
  expect(infoSpy).not.toBeCalledWith("Creating a default group: ".concat(_constants2.DEFAULT_GROUP_NAME), {
583
- file: _constants2.CONTACTS_FILE,
583
+ file: _constants2.CONTACTS_CLIENT,
584
584
  method: 'fetchEncryptionKeyUrl'
585
585
  });
586
586
  expect(webex.internal.encryption.encryptText).toBeCalledOnceWith(_contactFixtures.mockContactGroupListOne[0].encryptionKeyUrl, contact.displayName);
@@ -602,7 +602,7 @@ describe('ContactClient Tests', function () {
602
602
  result = _context8.sent;
603
603
  expect((_result$data$contact = result.data.contact) === null || _result$data$contact === void 0 ? void 0 : _result$data$contact.contactId).toBe(mockContactResponse.contactId);
604
604
  expect(logSpy).not.toBeCalledWith("Creating a default group: ".concat(_constants2.DEFAULT_GROUP_NAME), {
605
- file: _constants2.CONTACTS_FILE,
605
+ file: _constants2.CONTACTS_CLIENT,
606
606
  method: 'fetchEncryptionKeyUrl'
607
607
  });
608
608
  case 28:
@@ -611,7 +611,7 @@ describe('ContactClient Tests', function () {
611
611
  }
612
612
  }, _callee8);
613
613
  })));
614
- it('create a contact without a group and encryptionKey', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
614
+ it('create a contact without a group and encryptionKey', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee9() {
615
615
  var _res$data$contact2;
616
616
  var mockContactResponse, successContactGroupResponsePayload, successContactResponsePayload, contact, res;
617
617
  return _regenerator.default.wrap(function _callee9$(_context9) {
@@ -670,23 +670,23 @@ describe('ContactClient Tests', function () {
670
670
  });
671
671
  expect((_res$data$contact2 = res.data.contact) === null || _res$data$contact2 === void 0 ? void 0 : _res$data$contact2.contactId).toBe(mockContactResponse.contactId);
672
672
  expect(_Logger.default.info).toBeCalledWith("".concat(_constants.METHOD_START_MESSAGE, " with contactType: CUSTOM"), {
673
- file: _constants2.CONTACTS_FILE,
673
+ file: _constants2.CONTACTS_CLIENT,
674
674
  method: _constants2.METHODS.CREATE_CONTACT
675
675
  });
676
676
  expect(_Logger.default.info).toBeCalledWith(_constants.METHOD_START_MESSAGE, {
677
- file: _constants2.CONTACTS_FILE,
677
+ file: _constants2.CONTACTS_CLIENT,
678
678
  method: _constants2.METHODS.CREATE_NEW_ENCRYPTION_KEY_URL
679
679
  });
680
680
  expect(_Logger.default.info).toBeCalledWith('Requesting kms for a new KRO and key', {
681
- file: _constants2.CONTACTS_FILE,
681
+ file: _constants2.CONTACTS_CLIENT,
682
682
  method: _constants2.METHODS.CREATE_NEW_ENCRYPTION_KEY_URL
683
683
  });
684
684
  expect(_Logger.default.log).toBeCalledWith("Creating a default group: ".concat(_constants2.DEFAULT_GROUP_NAME), {
685
- file: _constants2.CONTACTS_FILE,
685
+ file: _constants2.CONTACTS_CLIENT,
686
686
  method: _constants2.METHODS.FETCH_ENCRYPTION_KEY_URL
687
687
  });
688
688
  expect(_Logger.default.log).toBeCalledWith("Contact successfully created", {
689
- file: _constants2.CONTACTS_FILE,
689
+ file: _constants2.CONTACTS_CLIENT,
690
690
  method: 'createContact'
691
691
  });
692
692
  case 26:
@@ -695,11 +695,11 @@ describe('ContactClient Tests', function () {
695
695
  }
696
696
  }, _callee9);
697
697
  })));
698
- it('create a cloud contact with no existing groups', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10() {
698
+ it('create a cloud contact with no existing groups', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee0() {
699
699
  var _res$data$contact3;
700
700
  var mockContactResponse, successResponsePayload, successResponsePayloadGroup, contact, res;
701
- return _regenerator.default.wrap(function _callee10$(_context10) {
702
- while (1) switch (_context10.prev = _context10.next) {
701
+ return _regenerator.default.wrap(function _callee0$(_context0) {
702
+ while (1) switch (_context0.prev = _context0.next) {
703
703
  case 0:
704
704
  mockContactResponse = _contactFixtures.mockContactResponseBodyOne.contacts[0];
705
705
  successResponsePayload = {
@@ -718,21 +718,21 @@ describe('ContactClient Tests', function () {
718
718
  contactType: 'CLOUD'
719
719
  };
720
720
  contact.groups = [];
721
- _context10.next = 11;
721
+ _context0.next = 11;
722
722
  return contactClient.createContact(contact);
723
723
  case 11:
724
- res = _context10.sent;
724
+ res = _context0.sent;
725
725
  expect(res.statusCode).toEqual(400);
726
726
  expect(res.data.error).toEqual('contactId is required for contactType:CLOUD.');
727
727
  expect(_Logger.default.info).toBeCalledWith("".concat(_constants.METHOD_START_MESSAGE, " with contactType: CLOUD"), {
728
- file: _constants2.CONTACTS_FILE,
728
+ file: _constants2.CONTACTS_CLIENT,
729
729
  method: _constants2.METHODS.CREATE_CONTACT
730
730
  });
731
731
  contact.contactId = mockContactResponse.contactId;
732
- _context10.next = 18;
732
+ _context0.next = 18;
733
733
  return contactClient.createContact(contact);
734
734
  case 18:
735
- res = _context10.sent;
735
+ res = _context0.sent;
736
736
  expect(res.statusCode).toEqual(201);
737
737
  expect((_res$data$contact3 = res.data.contact) === null || _res$data$contact3 === void 0 ? void 0 : _res$data$contact3.contactId).toBe(mockContactResponse.contactId);
738
738
  expect(webex.request).toBeCalledTimes(3);
@@ -766,19 +766,19 @@ describe('ContactClient Tests', function () {
766
766
  }
767
767
  });
768
768
  expect(_Logger.default.log).toBeCalledWith("Contact successfully created", {
769
- file: _constants2.CONTACTS_FILE,
769
+ file: _constants2.CONTACTS_CLIENT,
770
770
  method: 'createContact'
771
771
  });
772
772
  case 26:
773
773
  case "end":
774
- return _context10.stop();
774
+ return _context0.stop();
775
775
  }
776
- }, _callee10);
776
+ }, _callee0);
777
777
  })));
778
- it('create a contact - service unavailable', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11() {
778
+ it('create a contact - service unavailable', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee1() {
779
779
  var contact, res;
780
- return _regenerator.default.wrap(function _callee11$(_context11) {
781
- while (1) switch (_context11.prev = _context11.next) {
780
+ return _regenerator.default.wrap(function _callee1$(_context1) {
781
+ while (1) switch (_context1.prev = _context1.next) {
782
782
  case 0:
783
783
  webex.request.mockRejectedValue(failureResponsePayload);
784
784
  contactClient['groups'] = _contactFixtures.mockContactGroupListOne.slice();
@@ -787,10 +787,10 @@ describe('ContactClient Tests', function () {
787
787
  contactType: 'CLOUD',
788
788
  contactId: '801bb994-343b-4f6b-97ae-d13c91d4b877'
789
789
  };
790
- _context11.next = 6;
790
+ _context1.next = 6;
791
791
  return contactClient.createContact(contact);
792
792
  case 6:
793
- res = _context11.sent;
793
+ res = _context1.sent;
794
794
  expect(webex.request).toBeCalledOnceWith({
795
795
  uri: contactServiceUrl,
796
796
  method: _types.HTTP_METHODS.POST,
@@ -801,38 +801,38 @@ describe('ContactClient Tests', function () {
801
801
  })
802
802
  });
803
803
  expect(serviceErrorCodeHandlerSpy).toBeCalledOnceWith(failureResponsePayload, {
804
- file: _constants2.CONTACTS_FILE,
804
+ file: _constants2.CONTACTS_CLIENT,
805
805
  method: _constants2.METHODS.CREATE_CONTACT
806
806
  });
807
807
  expect(res.statusCode).toEqual(503);
808
808
  expect(_Logger.default.info).toBeCalledWith("".concat(_constants.METHOD_START_MESSAGE, " with contactType: CLOUD"), {
809
- file: _constants2.CONTACTS_FILE,
809
+ file: _constants2.CONTACTS_CLIENT,
810
810
  method: _constants2.METHODS.CREATE_CONTACT
811
811
  });
812
- expect(_Logger.default.error).toBeCalledWith(Error("Failed to create contact: ".concat(failureResponsePayload)), {
813
- file: _constants2.CONTACTS_FILE,
812
+ expect(_Logger.default.error).toBeCalledWith("Failed to create contact: ".concat((0, _stringify.default)(failureResponsePayload)), {
813
+ file: _constants2.CONTACTS_CLIENT,
814
814
  method: _constants2.METHODS.CREATE_CONTACT
815
815
  });
816
816
  case 12:
817
817
  case "end":
818
- return _context11.stop();
818
+ return _context1.stop();
819
819
  }
820
- }, _callee11);
820
+ }, _callee1);
821
821
  })));
822
- it('successful deletion of contacts', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12() {
822
+ it('successful deletion of contacts', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee10() {
823
823
  var successResponsePayload, response;
824
- return _regenerator.default.wrap(function _callee12$(_context12) {
825
- while (1) switch (_context12.prev = _context12.next) {
824
+ return _regenerator.default.wrap(function _callee10$(_context10) {
825
+ while (1) switch (_context10.prev = _context10.next) {
826
826
  case 0:
827
827
  successResponsePayload = {
828
828
  statusCode: 204
829
829
  };
830
830
  contactClient['contacts'] = [_contactFixtures.mockContactListOne[0]];
831
831
  webex.request.mockResolvedValue(successResponsePayload);
832
- _context12.next = 5;
832
+ _context10.next = 5;
833
833
  return contactClient.deleteContact(_contactFixtures.mockContactListOne[0].contactId);
834
834
  case 5:
835
- response = _context12.sent;
835
+ response = _context10.sent;
836
836
  expect(response.statusCode).toEqual(204);
837
837
  expect(webex.request).toBeCalledOnceWith({
838
838
  uri: "".concat(contactServiceUrl, "/").concat(_contactFixtures.mockContactListOne[0].contactId),
@@ -840,53 +840,53 @@ describe('ContactClient Tests', function () {
840
840
  });
841
841
  expect(contactClient['contacts']).toEqual([]);
842
842
  expect(_Logger.default.info).toBeCalledWith("".concat(_constants.METHOD_START_MESSAGE, " with contactId: ").concat(_contactFixtures.mockContactListOne[0].contactId), {
843
- file: _constants2.CONTACTS_FILE,
843
+ file: _constants2.CONTACTS_CLIENT,
844
844
  method: _constants2.METHODS.DELETE_CONTACT
845
845
  });
846
846
  expect(_Logger.default.info).toBeCalledWith("Deleting contact : ".concat(_contactFixtures.mockContactListOne[0].contactId), {
847
- file: _constants2.CONTACTS_FILE,
847
+ file: _constants2.CONTACTS_CLIENT,
848
848
  method: _constants2.METHODS.DELETE_CONTACT
849
849
  });
850
850
  case 11:
851
851
  case "end":
852
- return _context12.stop();
852
+ return _context10.stop();
853
853
  }
854
- }, _callee12);
854
+ }, _callee10);
855
855
  })));
856
- it('delete a contact - service unavailable', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13() {
856
+ it('delete a contact - service unavailable', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee11() {
857
857
  var response;
858
- return _regenerator.default.wrap(function _callee13$(_context13) {
859
- while (1) switch (_context13.prev = _context13.next) {
858
+ return _regenerator.default.wrap(function _callee11$(_context11) {
859
+ while (1) switch (_context11.prev = _context11.next) {
860
860
  case 0:
861
861
  contactClient['contacts'] = _contactFixtures.mockContactListOne;
862
862
  webex.request.mockRejectedValue(failureResponsePayload);
863
- _context13.next = 4;
863
+ _context11.next = 4;
864
864
  return contactClient.deleteContact(_contactFixtures.mockContactListOne[0].contactId);
865
865
  case 4:
866
- response = _context13.sent;
866
+ response = _context11.sent;
867
867
  expect(response.statusCode).toEqual(503);
868
868
  expect(webex.request).toBeCalledOnceWith({
869
869
  uri: "".concat(contactServiceUrl, "/").concat(_contactFixtures.mockContactListOne[0].contactId),
870
870
  method: _types.HTTP_METHODS.DELETE
871
871
  });
872
872
  expect(serviceErrorCodeHandlerSpy).toBeCalledOnceWith(failureResponsePayload, {
873
- file: _constants2.CONTACTS_FILE,
873
+ file: _constants2.CONTACTS_CLIENT,
874
874
  method: _constants2.METHODS.DELETE_CONTACT
875
875
  });
876
876
  expect(contactClient['contacts']).toEqual(_contactFixtures.mockContactListOne);
877
877
  expect(_Logger.default.info).toBeCalledWith("".concat(_constants.METHOD_START_MESSAGE, " with contactId: ").concat(_contactFixtures.mockContactListOne[0].contactId), {
878
- file: _constants2.CONTACTS_FILE,
878
+ file: _constants2.CONTACTS_CLIENT,
879
879
  method: _constants2.METHODS.DELETE_CONTACT
880
880
  });
881
881
  expect(_Logger.default.info).toBeCalledWith("Deleting contact : ".concat(_contactFixtures.mockContactListOne[0].contactId), {
882
- file: _constants2.CONTACTS_FILE,
882
+ file: _constants2.CONTACTS_CLIENT,
883
883
  method: _constants2.METHODS.DELETE_CONTACT
884
884
  });
885
885
  case 11:
886
886
  case "end":
887
- return _context13.stop();
887
+ return _context11.stop();
888
888
  }
889
- }, _callee13);
889
+ }, _callee11);
890
890
  })));
891
891
  it('test resolveContacts function for a minimal contact with few details', function () {
892
892
  var contact = contactClient['resolveCloudContacts']({
@@ -952,14 +952,14 @@ describe('ContactClient Tests', function () {
952
952
  }, _contactFixtures.mockSCIMMinListResponse);
953
953
  expect(contact).toEqual(null);
954
954
  expect(warnSpy).toHaveBeenCalledWith('Error occurred while parsing resolved contacts', {
955
- file: _constants2.CONTACTS_FILE,
955
+ file: _constants2.CONTACTS_CLIENT,
956
956
  method: 'resolveCloudContacts'
957
957
  });
958
958
  });
959
- it('logs error for chunk when scimQuery API call fails in the loop for getContacts', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14() {
959
+ it('logs error for chunk when scimQuery API call fails in the loop for getContacts', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee12() {
960
960
  var mockData, respPayload, warnSpy, infoSpy, logSpy;
961
- return _regenerator.default.wrap(function _callee14$(_context14) {
962
- while (1) switch (_context14.prev = _context14.next) {
961
+ return _regenerator.default.wrap(function _callee12$(_context12) {
962
+ while (1) switch (_context12.prev = _context12.next) {
963
963
  case 0:
964
964
  mockData = errorCodes[0];
965
965
  respPayload = {
@@ -977,28 +977,28 @@ describe('ContactClient Tests', function () {
977
977
  warnSpy = jest.spyOn(_Logger.default, 'warn');
978
978
  infoSpy = jest.spyOn(_Logger.default, 'info');
979
979
  logSpy = jest.spyOn(_Logger.default, 'log');
980
- _context14.next = 9;
980
+ _context12.next = 9;
981
981
  return contactClient.getContacts();
982
982
  case 9:
983
983
  expect(webex.request).toBeCalledTimes(2);
984
984
  expect(warnSpy).toBeCalledTimes(1);
985
985
  expect(warnSpy).toBeCalledWith('Error processing contact chunk 0-50', {
986
- file: 'Contacts',
986
+ file: _constants2.CONTACTS_CLIENT,
987
987
  method: _constants2.METHODS.GET_CONTACTS
988
988
  });
989
989
  expect(infoSpy).toBeCalledWith(_constants.METHOD_START_MESSAGE, {
990
- file: _constants2.CONTACTS_FILE,
990
+ file: _constants2.CONTACTS_CLIENT,
991
991
  method: _constants2.METHODS.GET_CONTACTS
992
992
  });
993
993
  expect(logSpy).toBeCalledWith('Successfully fetched contacts and groups', {
994
- file: _constants2.CONTACTS_FILE,
994
+ file: _constants2.CONTACTS_CLIENT,
995
995
  method: _constants2.METHODS.GET_CONTACTS
996
996
  });
997
997
  case 14:
998
998
  case "end":
999
- return _context14.stop();
999
+ return _context12.stop();
1000
1000
  }
1001
- }, _callee14);
1001
+ }, _callee12);
1002
1002
  })));
1003
1003
  });
1004
1004
  //# sourceMappingURL=ContactsClient.test.js.map