@webex/calling 3.0.0-next.2 → 3.0.0-next.4

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 (283) hide show
  1. package/CHANGELOG.md +1403 -0
  2. package/README.md +74 -74
  3. package/dist/module/CallHistory/CallHistory.js +81 -81
  4. package/dist/module/CallHistory/callHistoryFixtures.js +307 -307
  5. package/dist/module/CallHistory/constants.js +9 -9
  6. package/dist/module/CallHistory/types.js +1 -1
  7. package/dist/module/CallSettings/CallSettings.js +65 -65
  8. package/dist/module/CallSettings/UcmBackendConnector.js +100 -100
  9. package/dist/module/CallSettings/WxCallBackendConnector.js +287 -287
  10. package/dist/module/CallSettings/constants.js +11 -11
  11. package/dist/module/CallSettings/testFixtures.js +62 -62
  12. package/dist/module/CallSettings/types.js +1 -1
  13. package/dist/module/CallingClient/CallingClient.js +248 -248
  14. package/dist/module/CallingClient/callRecordFixtures.js +93 -93
  15. package/dist/module/CallingClient/calling/CallerId/index.js +169 -169
  16. package/dist/module/CallingClient/calling/CallerId/types.js +1 -1
  17. package/dist/module/CallingClient/calling/call.js +1658 -1658
  18. package/dist/module/CallingClient/calling/callManager.js +284 -284
  19. package/dist/module/CallingClient/calling/index.js +2 -2
  20. package/dist/module/CallingClient/calling/types.js +53 -53
  21. package/dist/module/CallingClient/callingClientFixtures.js +38 -38
  22. package/dist/module/CallingClient/constants.js +122 -122
  23. package/dist/module/CallingClient/line/index.js +158 -158
  24. package/dist/module/CallingClient/line/types.js +15 -15
  25. package/dist/module/CallingClient/registration/index.js +1 -1
  26. package/dist/module/CallingClient/registration/register.js +507 -507
  27. package/dist/module/CallingClient/registration/registerFixtures.js +28 -28
  28. package/dist/module/CallingClient/registration/types.js +1 -1
  29. package/dist/module/CallingClient/types.js +1 -1
  30. package/dist/module/Contacts/ContactsClient.js +484 -484
  31. package/dist/module/Contacts/constants.js +20 -20
  32. package/dist/module/Contacts/contactFixtures.js +284 -284
  33. package/dist/module/Contacts/types.js +10 -10
  34. package/dist/module/Errors/catalog/CallError.js +26 -26
  35. package/dist/module/Errors/catalog/CallingDeviceError.js +18 -18
  36. package/dist/module/Errors/catalog/ExtendedError.js +10 -10
  37. package/dist/module/Errors/catalog/LineError.js +24 -24
  38. package/dist/module/Errors/index.js +2 -2
  39. package/dist/module/Errors/types.js +48 -48
  40. package/dist/module/Events/impl/index.js +19 -19
  41. package/dist/module/Events/types.js +83 -83
  42. package/dist/module/Logger/index.js +114 -114
  43. package/dist/module/Logger/types.js +25 -25
  44. package/dist/module/Metrics/index.js +232 -232
  45. package/dist/module/Metrics/types.js +37 -37
  46. package/dist/module/SDKConnector/index.js +39 -39
  47. package/dist/module/SDKConnector/types.js +1 -1
  48. package/dist/module/SDKConnector/utils.js +12 -12
  49. package/dist/module/Voicemail/BroadworksBackendConnector.js +291 -291
  50. package/dist/module/Voicemail/UcmBackendConnector.js +279 -279
  51. package/dist/module/Voicemail/Voicemail.js +110 -110
  52. package/dist/module/Voicemail/WxCallBackendConnector.js +279 -279
  53. package/dist/module/Voicemail/constants.js +29 -29
  54. package/dist/module/Voicemail/types.js +1 -1
  55. package/dist/module/Voicemail/voicemailFixture.js +510 -510
  56. package/dist/module/api.js +6 -6
  57. package/dist/module/common/Utils.js +802 -802
  58. package/dist/module/common/constants.js +41 -41
  59. package/dist/module/common/index.js +1 -1
  60. package/dist/module/common/testUtil.js +938 -938
  61. package/dist/module/common/types.js +57 -57
  62. package/dist/module/index.js +8 -8
  63. package/dist/types/CallHistory/CallHistory.d.ts +17 -17
  64. package/dist/types/CallHistory/callHistoryFixtures.d.ts +94 -94
  65. package/dist/types/CallHistory/constants.d.ts +9 -9
  66. package/dist/types/CallHistory/types.d.ts +18 -18
  67. package/dist/types/CallSettings/CallSettings.d.ts +19 -19
  68. package/dist/types/CallSettings/UcmBackendConnector.d.ts +19 -19
  69. package/dist/types/CallSettings/WxCallBackendConnector.d.ts +21 -21
  70. package/dist/types/CallSettings/constants.d.ts +11 -11
  71. package/dist/types/CallSettings/testFixtures.d.ts +15 -15
  72. package/dist/types/CallSettings/types.d.ts +107 -107
  73. package/dist/types/CallingClient/CallingClient.d.ts +35 -35
  74. package/dist/types/CallingClient/callRecordFixtures.d.ts +3 -3
  75. package/dist/types/CallingClient/calling/CallerId/index.d.ts +17 -17
  76. package/dist/types/CallingClient/calling/CallerId/types.d.ts +41 -41
  77. package/dist/types/CallingClient/calling/call.d.ts +96 -96
  78. package/dist/types/CallingClient/calling/callManager.d.ts +25 -25
  79. package/dist/types/CallingClient/calling/index.d.ts +2 -2
  80. package/dist/types/CallingClient/calling/types.d.ts +206 -206
  81. package/dist/types/CallingClient/callingClientFixtures.d.ts +18 -18
  82. package/dist/types/CallingClient/constants.d.ts +122 -122
  83. package/dist/types/CallingClient/line/index.d.ts +43 -43
  84. package/dist/types/CallingClient/line/types.d.ts +55 -55
  85. package/dist/types/CallingClient/registration/index.d.ts +1 -1
  86. package/dist/types/CallingClient/registration/register.d.ts +64 -64
  87. package/dist/types/CallingClient/registration/registerFixtures.d.ts +28 -28
  88. package/dist/types/CallingClient/registration/types.d.ts +20 -20
  89. package/dist/types/CallingClient/types.d.ts +29 -29
  90. package/dist/types/Contacts/ContactsClient.d.ts +26 -26
  91. package/dist/types/Contacts/constants.d.ts +19 -19
  92. package/dist/types/Contacts/contactFixtures.d.ts +280 -280
  93. package/dist/types/Contacts/types.d.ts +72 -72
  94. package/dist/types/Errors/catalog/CallError.d.ts +11 -11
  95. package/dist/types/Errors/catalog/CallingDeviceError.d.ts +10 -10
  96. package/dist/types/Errors/catalog/ExtendedError.d.ts +6 -6
  97. package/dist/types/Errors/catalog/LineError.d.ts +10 -10
  98. package/dist/types/Errors/index.d.ts +2 -2
  99. package/dist/types/Errors/types.d.ts +60 -60
  100. package/dist/types/Events/impl/index.d.ts +8 -8
  101. package/dist/types/Events/types.d.ts +288 -288
  102. package/dist/types/Logger/index.d.ts +12 -12
  103. package/dist/types/Logger/types.d.ts +25 -25
  104. package/dist/types/Metrics/index.d.ts +5 -5
  105. package/dist/types/Metrics/types.d.ts +42 -42
  106. package/dist/types/SDKConnector/index.d.ts +12 -12
  107. package/dist/types/SDKConnector/types.d.ts +128 -128
  108. package/dist/types/SDKConnector/utils.d.ts +5 -5
  109. package/dist/types/Voicemail/BroadworksBackendConnector.d.ts +27 -27
  110. package/dist/types/Voicemail/UcmBackendConnector.d.ts +34 -34
  111. package/dist/types/Voicemail/Voicemail.d.ts +27 -27
  112. package/dist/types/Voicemail/WxCallBackendConnector.d.ts +23 -23
  113. package/dist/types/Voicemail/constants.d.ts +29 -29
  114. package/dist/types/Voicemail/types.d.ts +133 -133
  115. package/dist/types/Voicemail/voicemailFixture.d.ts +417 -417
  116. package/dist/types/api.d.ts +16 -16
  117. package/dist/types/common/Utils.d.ts +34 -34
  118. package/dist/types/common/constants.d.ts +41 -41
  119. package/dist/types/common/index.d.ts +1 -1
  120. package/dist/types/common/testUtil.d.ts +3611 -3611
  121. package/dist/types/common/types.d.ts +191 -191
  122. package/dist/types/index.d.ts +8 -8
  123. package/package.json +4 -4
  124. package/dist/CallHistory/CallHistory.js +0 -203
  125. package/dist/CallHistory/CallHistory.js.map +0 -1
  126. package/dist/CallHistory/CallHistory.test.js +0 -133
  127. package/dist/CallHistory/CallHistory.test.js.map +0 -1
  128. package/dist/CallHistory/callHistoryFixtures.js +0 -310
  129. package/dist/CallHistory/callHistoryFixtures.js.map +0 -1
  130. package/dist/CallHistory/constants.js +0 -26
  131. package/dist/CallHistory/constants.js.map +0 -1
  132. package/dist/CallHistory/types.js +0 -7
  133. package/dist/CallHistory/types.js.map +0 -1
  134. package/dist/CallSettings/CallSettings.js +0 -276
  135. package/dist/CallSettings/CallSettings.js.map +0 -1
  136. package/dist/CallSettings/CallSettings.test.js +0 -122
  137. package/dist/CallSettings/CallSettings.test.js.map +0 -1
  138. package/dist/CallSettings/UcmBackendConnector.js +0 -217
  139. package/dist/CallSettings/UcmBackendConnector.js.map +0 -1
  140. package/dist/CallSettings/UcmBackendConnector.test.js +0 -227
  141. package/dist/CallSettings/UcmBackendConnector.test.js.map +0 -1
  142. package/dist/CallSettings/WxCallBackendConnector.js +0 -541
  143. package/dist/CallSettings/WxCallBackendConnector.js.map +0 -1
  144. package/dist/CallSettings/WxCallBackendConnector.test.js +0 -802
  145. package/dist/CallSettings/WxCallBackendConnector.test.js.map +0 -1
  146. package/dist/CallSettings/constants.js +0 -30
  147. package/dist/CallSettings/constants.js.map +0 -1
  148. package/dist/CallSettings/testFixtures.js +0 -72
  149. package/dist/CallSettings/testFixtures.js.map +0 -1
  150. package/dist/CallSettings/types.js +0 -7
  151. package/dist/CallSettings/types.js.map +0 -1
  152. package/dist/CallingClient/CallingClient.js +0 -572
  153. package/dist/CallingClient/CallingClient.js.map +0 -1
  154. package/dist/CallingClient/CallingClient.test.js +0 -931
  155. package/dist/CallingClient/CallingClient.test.js.map +0 -1
  156. package/dist/CallingClient/callRecordFixtures.js +0 -103
  157. package/dist/CallingClient/callRecordFixtures.js.map +0 -1
  158. package/dist/CallingClient/calling/CallerId/index.js +0 -287
  159. package/dist/CallingClient/calling/CallerId/index.js.map +0 -1
  160. package/dist/CallingClient/calling/CallerId/index.test.js +0 -274
  161. package/dist/CallingClient/calling/CallerId/index.test.js.map +0 -1
  162. package/dist/CallingClient/calling/CallerId/types.js +0 -7
  163. package/dist/CallingClient/calling/CallerId/types.js.map +0 -1
  164. package/dist/CallingClient/calling/call.js +0 -2995
  165. package/dist/CallingClient/calling/call.js.map +0 -1
  166. package/dist/CallingClient/calling/call.test.js +0 -2614
  167. package/dist/CallingClient/calling/call.test.js.map +0 -1
  168. package/dist/CallingClient/calling/callManager.js +0 -443
  169. package/dist/CallingClient/calling/callManager.js.map +0 -1
  170. package/dist/CallingClient/calling/callManager.test.js +0 -683
  171. package/dist/CallingClient/calling/callManager.test.js.map +0 -1
  172. package/dist/CallingClient/calling/index.js +0 -30
  173. package/dist/CallingClient/calling/index.js.map +0 -1
  174. package/dist/CallingClient/calling/types.js +0 -71
  175. package/dist/CallingClient/calling/types.js.map +0 -1
  176. package/dist/CallingClient/callingClientFixtures.js +0 -53
  177. package/dist/CallingClient/callingClientFixtures.js.map +0 -1
  178. package/dist/CallingClient/constants.js +0 -226
  179. package/dist/CallingClient/constants.js.map +0 -1
  180. package/dist/CallingClient/line/index.js +0 -312
  181. package/dist/CallingClient/line/index.js.map +0 -1
  182. package/dist/CallingClient/line/line.test.js +0 -270
  183. package/dist/CallingClient/line/line.test.js.map +0 -1
  184. package/dist/CallingClient/line/types.js +0 -25
  185. package/dist/CallingClient/line/types.js.map +0 -1
  186. package/dist/CallingClient/registration/index.js +0 -19
  187. package/dist/CallingClient/registration/index.js.map +0 -1
  188. package/dist/CallingClient/registration/register.js +0 -1295
  189. package/dist/CallingClient/registration/register.js.map +0 -1
  190. package/dist/CallingClient/registration/register.test.js +0 -838
  191. package/dist/CallingClient/registration/register.test.js.map +0 -1
  192. package/dist/CallingClient/registration/registerFixtures.js +0 -41
  193. package/dist/CallingClient/registration/registerFixtures.js.map +0 -1
  194. package/dist/CallingClient/registration/types.js +0 -7
  195. package/dist/CallingClient/registration/types.js.map +0 -1
  196. package/dist/CallingClient/types.js +0 -7
  197. package/dist/CallingClient/types.js.map +0 -1
  198. package/dist/Contacts/ContactsClient.js +0 -1139
  199. package/dist/Contacts/ContactsClient.js.map +0 -1
  200. package/dist/Contacts/ContactsClient.test.js +0 -725
  201. package/dist/Contacts/ContactsClient.test.js.map +0 -1
  202. package/dist/Contacts/constants.js +0 -36
  203. package/dist/Contacts/constants.js.map +0 -1
  204. package/dist/Contacts/contactFixtures.js +0 -340
  205. package/dist/Contacts/contactFixtures.js.map +0 -1
  206. package/dist/Contacts/types.js +0 -20
  207. package/dist/Contacts/types.js.map +0 -1
  208. package/dist/Errors/catalog/CallError.js +0 -94
  209. package/dist/Errors/catalog/CallError.js.map +0 -1
  210. package/dist/Errors/catalog/CallingDeviceError.js +0 -88
  211. package/dist/Errors/catalog/CallingDeviceError.js.map +0 -1
  212. package/dist/Errors/catalog/ExtendedError.js +0 -45
  213. package/dist/Errors/catalog/ExtendedError.js.map +0 -1
  214. package/dist/Errors/catalog/LineError.js +0 -90
  215. package/dist/Errors/catalog/LineError.js.map +0 -1
  216. package/dist/Errors/index.js +0 -21
  217. package/dist/Errors/index.js.map +0 -1
  218. package/dist/Errors/types.js +0 -62
  219. package/dist/Errors/types.js.map +0 -1
  220. package/dist/Events/impl/index.js +0 -82
  221. package/dist/Events/impl/index.js.map +0 -1
  222. package/dist/Events/types.js +0 -111
  223. package/dist/Events/types.js.map +0 -1
  224. package/dist/Logger/index.js +0 -221
  225. package/dist/Logger/index.js.map +0 -1
  226. package/dist/Logger/index.test.js +0 -62
  227. package/dist/Logger/index.test.js.map +0 -1
  228. package/dist/Logger/types.js +0 -37
  229. package/dist/Logger/types.js.map +0 -1
  230. package/dist/Metrics/index.js +0 -329
  231. package/dist/Metrics/index.js.map +0 -1
  232. package/dist/Metrics/index.test.js +0 -291
  233. package/dist/Metrics/index.test.js.map +0 -1
  234. package/dist/Metrics/types.js +0 -50
  235. package/dist/Metrics/types.js.map +0 -1
  236. package/dist/SDKConnector/index.js +0 -105
  237. package/dist/SDKConnector/index.js.map +0 -1
  238. package/dist/SDKConnector/index.test.js +0 -9
  239. package/dist/SDKConnector/index.test.js.map +0 -1
  240. package/dist/SDKConnector/types.js +0 -7
  241. package/dist/SDKConnector/types.js.map +0 -1
  242. package/dist/SDKConnector/utils.js +0 -40
  243. package/dist/SDKConnector/utils.js.map +0 -1
  244. package/dist/SDKConnector/utils.test.js +0 -9
  245. package/dist/SDKConnector/utils.test.js.map +0 -1
  246. package/dist/Voicemail/BroadworksBackendConnector.js +0 -632
  247. package/dist/Voicemail/BroadworksBackendConnector.js.map +0 -1
  248. package/dist/Voicemail/BroadworksBackendConnector.test.js +0 -733
  249. package/dist/Voicemail/BroadworksBackendConnector.test.js.map +0 -1
  250. package/dist/Voicemail/UcmBackendConnector.js +0 -566
  251. package/dist/Voicemail/UcmBackendConnector.js.map +0 -1
  252. package/dist/Voicemail/UcmBackendConnector.test.js +0 -628
  253. package/dist/Voicemail/UcmBackendConnector.test.js.map +0 -1
  254. package/dist/Voicemail/Voicemail.js +0 -378
  255. package/dist/Voicemail/Voicemail.js.map +0 -1
  256. package/dist/Voicemail/Voicemail.test.js +0 -226
  257. package/dist/Voicemail/Voicemail.test.js.map +0 -1
  258. package/dist/Voicemail/WxCallBackendConnector.js +0 -540
  259. package/dist/Voicemail/WxCallBackendConnector.js.map +0 -1
  260. package/dist/Voicemail/WxCallBackendConnector.test.js +0 -942
  261. package/dist/Voicemail/WxCallBackendConnector.test.js.map +0 -1
  262. package/dist/Voicemail/constants.js +0 -66
  263. package/dist/Voicemail/constants.js.map +0 -1
  264. package/dist/Voicemail/types.js +0 -7
  265. package/dist/Voicemail/types.js.map +0 -1
  266. package/dist/Voicemail/voicemailFixture.js +0 -559
  267. package/dist/Voicemail/voicemailFixture.js.map +0 -1
  268. package/dist/api.js +0 -134
  269. package/dist/api.js.map +0 -1
  270. package/dist/common/Utils.js +0 -1264
  271. package/dist/common/Utils.js.map +0 -1
  272. package/dist/common/Utils.test.js +0 -1227
  273. package/dist/common/Utils.test.js.map +0 -1
  274. package/dist/common/constants.js +0 -90
  275. package/dist/common/constants.js.map +0 -1
  276. package/dist/common/index.js +0 -19
  277. package/dist/common/index.js.map +0 -1
  278. package/dist/common/testUtil.js +0 -968
  279. package/dist/common/testUtil.js.map +0 -1
  280. package/dist/common/types.js +0 -75
  281. package/dist/common/types.js.map +0 -1
  282. package/dist/index.js +0 -63
  283. package/dist/index.js.map +0 -1
@@ -1,274 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
4
- var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
5
- var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
6
- var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
7
- var _testUtil = require("../../../common/testUtil");
8
- var _ = require(".");
9
- var _Logger = _interopRequireDefault(require("../../../Logger"));
10
- /* eslint-disable dot-notation */
11
-
12
- var waitForMsecs = function waitForMsecs(msec) {
13
- return new _promise.default(function (resolve) {
14
- setTimeout(resolve, msec);
15
- });
16
- };
17
- var webex = (0, _testUtil.getTestUtilsWebex)();
18
- describe('CallerId tests', function () {
19
- var dummyAvatar = 'https://avatar-int-us-east-1.webexcontent.com/Avtr~V1~1704d30d-a131-4bc7-9449-948487643793/V1~bf911e86a1561896d7d0053b46a8d0c9ed82a7bc434a1f84621c2c45cc825f37~3720694b1e4340818a3d12d70eb2b6e1~80';
20
- var dummyScimResponse = {
21
- totalResults: '1',
22
- itemsPerPage: '1',
23
- startIndex: '1',
24
- schemas: ['urn:scim:schemas:core:1.0', 'urn:scim:schemas:extension:cisco:commonidentity:1.0'],
25
- Resources: [{
26
- userName: 'atlas.test.wxcwebrtc+user8@gmail.com',
27
- emails: [{
28
- primary: true,
29
- type: 'work',
30
- value: 'atlas.test.wxcwebrtc+user8@gmail.com'
31
- }],
32
- name: {
33
- givenName: 'Cathy',
34
- familyName: 'James'
35
- },
36
- phoneNumbers: [{
37
- primary: true,
38
- type: 'work',
39
- value: '5008'
40
- }],
41
- entitlements: ['basic-meeting', 'basic-message', 'bc-sp-standard', 'screen-share', 'spark', 'spark-test-account', 'squared-call-initiation', 'webex-squared'],
42
- cisSyncSource: 'SCIM',
43
- photos: [{
44
- type: 'photo',
45
- value: dummyAvatar
46
- }, {
47
- type: 'thumbnail',
48
- value: dummyAvatar
49
- }],
50
- id: '652fe0c7-05ce-4acd-8bda-9a080830187f',
51
- meta: {
52
- created: '2022-03-16T16:13:53.847Z',
53
- lastModified: '2022-05-31T14:39:12.782Z',
54
- lastLoginTime: '2022-05-31T14:39:12.780Z',
55
- version: 'W/"66025591113"',
56
- location: 'https://identitybts.webex.com/identity/scim/1704d30d-a131-4bc7-9449-948487643793/v1/Users/652fe0c7-05ce-4acd-8bda-9a080830187f',
57
- organizationID: '1704d30d-a131-4bc7-9449-948487643793',
58
- creator: '97fe25e3-d3e8-400e-856b-5b0cd5b0c790',
59
- modifier: '8c7abf2f-0c8e-49cf-b8e4-693d4ec7daee'
60
- },
61
- displayName: 'Cathy',
62
- active: true,
63
- licenseID: ['BCSTD_8c81f40c-e848-484e-8ca8-0fb6dabc75a5'],
64
- userSettings: ['{"spark.signUpDate":"1648547902173"}', '{"user-origin":"admin-invited"}'],
65
- sipAddresses: [{
66
- type: 'cloud-calling',
67
- value: 'atlas.test.wxcwebrtc+user8@webrtcmobius.call.wbx2.com',
68
- primary: true
69
- }],
70
- isTeamsOnJabberEnabled: false,
71
- isUCCallOnJabberEnabled: false,
72
- userType: 'user',
73
- mfaEnabled: false,
74
- teamsClusterId: 'urn:TEAM:us-east-1_int13'
75
- }]
76
- };
77
- webex.request.mockResolvedValue({
78
- statusCode: 200,
79
- body: dummyScimResponse
80
- });
81
- var callerId;
82
- it('create callerId Object', function () {
83
- callerId = (0, _.createCallerId)(webex, function () {
84
- return _Logger.default.log('dummy print', {});
85
- });
86
- expect(callerId).toBeTruthy();
87
- });
88
-
89
- /* Follow tests will follow different combinations of the headers.
90
- * We will check whether the priority order is followed or not.
91
- */
92
- it(' When PA-ID, From header is present along with x-broad-works, ', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
93
- var dummyCallerId, output;
94
- return _regenerator.default.wrap(function _callee$(_context) {
95
- while (1) switch (_context.prev = _context.next) {
96
- case 0:
97
- dummyCallerId = {
98
- 'x-broadworks-remote-party-info': 'userId="nkjwuovmbo@64941297.int10.bcld.webex.com";userDn="tel:+12142865888;ext=5888;country-code=1";externalId=69fde5ad-fb8b-4a1b-9998-b0999e95719b',
99
- 'p-asserted-identity': '"Bob Marley" <sip:5888@10.155.4.7;user=phone>',
100
- from: '"Alice" <sip:5889@64941297.int10.bcld.webex.com>;tag=1932136170-1654008881246'
101
- };
102
- output = callerId.fetchCallerDetails(dummyCallerId);
103
- /* PAI should be preferred */
104
- expect(output.name).toStrictEqual('Bob Marley');
105
- expect(output.num).toStrictEqual('5888');
106
- _context.next = 6;
107
- return waitForMsecs(50);
108
- case 6:
109
- /* Should be overwritten by x-broadworks */
110
- expect(callerId['callerInfo'].avatarSrc).toStrictEqual(dummyAvatar);
111
- expect(callerId['callerInfo'].id).toStrictEqual(dummyScimResponse.Resources[0].id);
112
- expect(callerId['callerInfo'].name).toStrictEqual('Cathy');
113
- expect(callerId['callerInfo'].num).toStrictEqual('5008');
114
- case 10:
115
- case "end":
116
- return _context.stop();
117
- }
118
- }, _callee);
119
- })));
120
- it(' When PA-ID ,From header is present along with x-broad-works , but name in PAI is of wrong format', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
121
- var dummyCallerId, output;
122
- return _regenerator.default.wrap(function _callee2$(_context2) {
123
- while (1) switch (_context2.prev = _context2.next) {
124
- case 0:
125
- dummyCallerId = {
126
- 'x-broadworks-remote-party-info': 'userId="nkjwuovmbo@64941297.int10.bcld.webex.com";userDn="tel:+12142865888;ext=5888;country-code=1";externalId=69fde5ad-fb8b-4a1b-9998-b0999e95719b',
127
- 'p-asserted-identity': '"69fde5ad-fb8b-4a1b-9998-b0999e95719b" <sip:5888@10.155.4.7;user=phone>',
128
- from: '"Alice" <sip:5889@64941297.int10.bcld.webex.com>;tag=1932136170-1654008881246'
129
- };
130
- callerId['callerInfo'] = {};
131
- output = callerId.fetchCallerDetails(dummyCallerId);
132
- /* PAI name is ignored and From's name should be taken, but number is taken from PAI */
133
- expect(output.name).toStrictEqual('Alice');
134
- expect(output.num).toStrictEqual('5888');
135
- _context2.next = 7;
136
- return waitForMsecs(50);
137
- case 7:
138
- /* Should be overwritten by x-broadworks */
139
- expect(callerId['callerInfo'].avatarSrc).toStrictEqual(dummyAvatar);
140
- expect(callerId['callerInfo'].id).toStrictEqual(dummyScimResponse.Resources[0].id);
141
- expect(callerId['callerInfo'].name).toStrictEqual('Cathy');
142
- expect(callerId['callerInfo'].num).toStrictEqual('5008');
143
- case 11:
144
- case "end":
145
- return _context2.stop();
146
- }
147
- }, _callee2);
148
- })));
149
- it(' When PA-ID ,From header is present along with x-broad-works , but name in PAI is of wrong format', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
150
- var dummyCallerId, output;
151
- return _regenerator.default.wrap(function _callee3$(_context3) {
152
- while (1) switch (_context3.prev = _context3.next) {
153
- case 0:
154
- dummyCallerId = {
155
- 'x-broadworks-remote-party-info': 'userId="nkjwuovmbo@64941297.int10.bcld.webex.com";userDn="tel:+12142865888;ext=5888;country-code=1";externalId=69fde5ad-fb8b-4a1b-9998-b0999e95719b',
156
- 'p-asserted-identity': '"69fde5ad-fb8b-4a1b-9998-b0999e95719b" <sip:69fde5ad-fb8b-4a1b-9998-b0999e95719b@10.155.4.7;user=phone>',
157
- from: '"Alice" <sip:5889@64941297.int10.bcld.webex.com>;tag=1932136170-1654008881246'
158
- };
159
- callerId['callerInfo'] = {};
160
- output = callerId.fetchCallerDetails(dummyCallerId);
161
- /* PAI name and number is ignored and From's name, number should be taken */
162
- expect(output.name).toStrictEqual('Alice');
163
- expect(output.num).toStrictEqual('5889');
164
- _context3.next = 7;
165
- return waitForMsecs(50);
166
- case 7:
167
- /* Should be overwritten by x-broadworks */
168
- expect(callerId['callerInfo'].avatarSrc).toStrictEqual(dummyAvatar);
169
- expect(callerId['callerInfo'].id).toStrictEqual(dummyScimResponse.Resources[0].id);
170
- expect(callerId['callerInfo'].name).toStrictEqual('Cathy');
171
- expect(callerId['callerInfo'].num).toStrictEqual('5008');
172
- case 11:
173
- case "end":
174
- return _context3.stop();
175
- }
176
- }, _callee3);
177
- })));
178
- it(' When PA-ID is present but From header is absent', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
179
- var dummyCallerId, output;
180
- return _regenerator.default.wrap(function _callee4$(_context4) {
181
- while (1) switch (_context4.prev = _context4.next) {
182
- case 0:
183
- dummyCallerId = {
184
- 'x-broadworks-remote-party-info': 'userId="nkjwuovmbo@64941297.int10.bcld.webex.com";userDn="tel:+12142865888;ext=5888;country-code=1";externalId=69fde5ad-fb8b-4a1b-9998-b0999e95719b',
185
- 'p-asserted-identity': '"Bob Marley" <sip:5888@10.155.4.7;user=phone>'
186
- };
187
- callerId['callerInfo'] = {};
188
- output = callerId.fetchCallerDetails(dummyCallerId);
189
- /* PAI name and number is taken */
190
- expect(output.name).toStrictEqual('Bob Marley');
191
- expect(output.num).toStrictEqual('5888');
192
- _context4.next = 7;
193
- return waitForMsecs(50);
194
- case 7:
195
- /* Should be overwritten by x-broadworks */
196
- expect(callerId['callerInfo'].avatarSrc).toStrictEqual(dummyAvatar);
197
- expect(callerId['callerInfo'].id).toStrictEqual(dummyScimResponse.Resources[0].id);
198
- expect(callerId['callerInfo'].name).toStrictEqual('Cathy');
199
- expect(callerId['callerInfo'].num).toStrictEqual('5008');
200
- case 11:
201
- case "end":
202
- return _context4.stop();
203
- }
204
- }, _callee4);
205
- })));
206
- it(' When PA-ID, From header is present but x-broad-works does not have externalId, ', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
207
- var dummyCallerId, output;
208
- return _regenerator.default.wrap(function _callee5$(_context5) {
209
- while (1) switch (_context5.prev = _context5.next) {
210
- case 0:
211
- dummyCallerId = {
212
- 'x-broadworks-remote-party-info': 'userId="nkjwuovmbo@64941297.int10.bcld.webex.com";userDn="tel:+12142865888;ext=5888;country-code=1";',
213
- 'p-asserted-identity': '"Bob Marley" <sip:5888@10.155.4.7;user=phone>',
214
- from: '"Alice" <sip:5889@64941297.int10.bcld.webex.com>;tag=1932136170-1654008881246'
215
- };
216
- callerId['callerInfo'] = {};
217
- output = callerId.fetchCallerDetails(dummyCallerId);
218
- /* PAI should be preferred */
219
- expect(output.name).toStrictEqual('Bob Marley');
220
- expect(output.num).toStrictEqual('5888');
221
- _context5.next = 7;
222
- return waitForMsecs(50);
223
- case 7:
224
- /* Since x-broadworks is not present , intermediary details should be retained */
225
- expect(callerId['callerInfo'].avatarSrc).toBeFalsy();
226
- expect(callerId['callerInfo'].id).toBeFalsy();
227
- expect(callerId['callerInfo'].name).toStrictEqual('Bob Marley');
228
- expect(callerId['callerInfo'].num).toStrictEqual('5888');
229
- case 11:
230
- case "end":
231
- return _context5.stop();
232
- }
233
- }, _callee5);
234
- })));
235
- it(' When PA-ID, From header is present along with x-broad-works but SCIM query fails, ', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
236
- var dummyCallerId, warnSpy, output;
237
- return _regenerator.default.wrap(function _callee6$(_context6) {
238
- while (1) switch (_context6.prev = _context6.next) {
239
- case 0:
240
- dummyCallerId = {
241
- 'x-broadworks-remote-party-info': 'userId="nkjwuovmbo@64941297.int10.bcld.webex.com";userDn="tel:+12142865888;ext=5888;country-code=1";externalId=69fde5ad-fb8b-4a1b-9998-b0999e95719b',
242
- 'p-asserted-identity': '"Bob Marley" <sip:5888@10.155.4.7;user=phone>',
243
- from: '"Alice" <sip:5889@64941297.int10.bcld.webex.com>;tag=1932136170-1654008881246'
244
- };
245
- webex.request.mockRejectedValue({
246
- statusCode: 404,
247
- body: dummyScimResponse
248
- });
249
- warnSpy = jest.spyOn(_Logger.default, 'warn');
250
- output = callerId.fetchCallerDetails(dummyCallerId);
251
- /* PAI should be preferred */
252
- expect(output.name).toStrictEqual('Bob Marley');
253
- expect(output.num).toStrictEqual('5888');
254
- _context6.next = 8;
255
- return waitForMsecs(50);
256
- case 8:
257
- expect(warnSpy).toHaveBeenCalledWith('Error response: - 404', {
258
- file: 'utils',
259
- method: 'resolveCallerIdDisplay'
260
- });
261
-
262
- /* Should not be overwritten by x-broadworks */
263
- expect(callerId['callerInfo'].avatarSrc).toBe(undefined);
264
- expect(callerId['callerInfo'].id).toBe(undefined);
265
- expect(callerId['callerInfo'].name).toStrictEqual('Bob Marley');
266
- expect(callerId['callerInfo'].num).toStrictEqual('5888');
267
- case 13:
268
- case "end":
269
- return _context6.stop();
270
- }
271
- }, _callee6);
272
- })));
273
- });
274
- //# sourceMappingURL=index.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_testUtil","require","_","_Logger","_interopRequireDefault","waitForMsecs","msec","_promise","default","resolve","setTimeout","webex","getTestUtilsWebex","describe","dummyAvatar","dummyScimResponse","totalResults","itemsPerPage","startIndex","schemas","Resources","userName","emails","primary","type","value","name","givenName","familyName","phoneNumbers","entitlements","cisSyncSource","photos","id","meta","created","lastModified","lastLoginTime","version","location","organizationID","creator","modifier","displayName","active","licenseID","userSettings","sipAddresses","isTeamsOnJabberEnabled","isUCCallOnJabberEnabled","userType","mfaEnabled","teamsClusterId","request","mockResolvedValue","statusCode","body","callerId","it","createCallerId","log","expect","toBeTruthy","_asyncToGenerator2","_regenerator","mark","_callee","dummyCallerId","output","wrap","_callee$","_context","prev","next","from","fetchCallerDetails","toStrictEqual","num","avatarSrc","stop","_callee2","_callee2$","_context2","_callee3","_callee3$","_context3","_callee4","_callee4$","_context4","_callee5","_callee5$","_context5","toBeFalsy","_callee6","warnSpy","_callee6$","_context6","mockRejectedValue","jest","spyOn","toHaveBeenCalledWith","file","method","toBe","undefined"],"sources":["index.test.ts"],"sourcesContent":["/* eslint-disable dot-notation */\nimport {DisplayInformation} from '../../../common/types';\nimport {getTestUtilsWebex} from '../../../common/testUtil';\nimport {createCallerId} from '.';\nimport log from '../../../Logger';\nimport {ICallerId} from './types';\n\nconst waitForMsecs = (msec: number) =>\n new Promise((resolve) => {\n setTimeout(resolve, msec);\n });\n\nconst webex = getTestUtilsWebex();\n\ndescribe('CallerId tests', () => {\n const dummyAvatar =\n 'https://avatar-int-us-east-1.webexcontent.com/Avtr~V1~1704d30d-a131-4bc7-9449-948487643793/V1~bf911e86a1561896d7d0053b46a8d0c9ed82a7bc434a1f84621c2c45cc825f37~3720694b1e4340818a3d12d70eb2b6e1~80';\n\n const dummyScimResponse = {\n totalResults: '1',\n itemsPerPage: '1',\n startIndex: '1',\n schemas: ['urn:scim:schemas:core:1.0', 'urn:scim:schemas:extension:cisco:commonidentity:1.0'],\n Resources: [\n {\n userName: 'atlas.test.wxcwebrtc+user8@gmail.com',\n emails: [\n {\n primary: true,\n type: 'work',\n value: 'atlas.test.wxcwebrtc+user8@gmail.com',\n },\n ],\n name: {\n givenName: 'Cathy',\n familyName: 'James',\n },\n phoneNumbers: [\n {\n primary: true,\n type: 'work',\n value: '5008',\n },\n ],\n entitlements: [\n 'basic-meeting',\n 'basic-message',\n 'bc-sp-standard',\n 'screen-share',\n 'spark',\n 'spark-test-account',\n 'squared-call-initiation',\n 'webex-squared',\n ],\n cisSyncSource: 'SCIM',\n photos: [\n {\n type: 'photo',\n value: dummyAvatar,\n },\n {\n type: 'thumbnail',\n value: dummyAvatar,\n },\n ],\n id: '652fe0c7-05ce-4acd-8bda-9a080830187f',\n meta: {\n created: '2022-03-16T16:13:53.847Z',\n lastModified: '2022-05-31T14:39:12.782Z',\n lastLoginTime: '2022-05-31T14:39:12.780Z',\n version: 'W/\"66025591113\"',\n location:\n 'https://identitybts.webex.com/identity/scim/1704d30d-a131-4bc7-9449-948487643793/v1/Users/652fe0c7-05ce-4acd-8bda-9a080830187f',\n organizationID: '1704d30d-a131-4bc7-9449-948487643793',\n creator: '97fe25e3-d3e8-400e-856b-5b0cd5b0c790',\n modifier: '8c7abf2f-0c8e-49cf-b8e4-693d4ec7daee',\n },\n displayName: 'Cathy',\n active: true,\n licenseID: ['BCSTD_8c81f40c-e848-484e-8ca8-0fb6dabc75a5'],\n userSettings: ['{\"spark.signUpDate\":\"1648547902173\"}', '{\"user-origin\":\"admin-invited\"}'],\n sipAddresses: [\n {\n type: 'cloud-calling',\n value: 'atlas.test.wxcwebrtc+user8@webrtcmobius.call.wbx2.com',\n primary: true,\n },\n ],\n isTeamsOnJabberEnabled: false,\n isUCCallOnJabberEnabled: false,\n userType: 'user',\n mfaEnabled: false,\n teamsClusterId: 'urn:TEAM:us-east-1_int13',\n },\n ],\n };\n\n webex.request.mockResolvedValue({\n statusCode: 200,\n body: dummyScimResponse,\n });\n\n let callerId: ICallerId;\n\n it('create callerId Object', () => {\n callerId = createCallerId(webex, () => log.log('dummy print', {}));\n expect(callerId).toBeTruthy();\n });\n\n /* Follow tests will follow different combinations of the headers.\n * We will check whether the priority order is followed or not.\n */\n it(' When PA-ID, From header is present along with x-broad-works, ', async () => {\n const dummyCallerId = {\n 'x-broadworks-remote-party-info':\n 'userId=\"nkjwuovmbo@64941297.int10.bcld.webex.com\";userDn=\"tel:+12142865888;ext=5888;country-code=1\";externalId=69fde5ad-fb8b-4a1b-9998-b0999e95719b',\n 'p-asserted-identity': '\"Bob Marley\" <sip:5888@10.155.4.7;user=phone>',\n from: '\"Alice\" <sip:5889@64941297.int10.bcld.webex.com>;tag=1932136170-1654008881246',\n };\n\n const output = callerId.fetchCallerDetails(dummyCallerId);\n\n /* PAI should be preferred */\n expect(output.name).toStrictEqual('Bob Marley');\n expect(output.num).toStrictEqual('5888');\n await waitForMsecs(50);\n\n /* Should be overwritten by x-broadworks */\n expect(callerId['callerInfo'].avatarSrc).toStrictEqual(dummyAvatar);\n expect(callerId['callerInfo'].id).toStrictEqual(dummyScimResponse.Resources[0].id);\n expect(callerId['callerInfo'].name).toStrictEqual('Cathy');\n expect(callerId['callerInfo'].num).toStrictEqual('5008');\n });\n\n it(' When PA-ID ,From header is present along with x-broad-works , but name in PAI is of wrong format', async () => {\n const dummyCallerId = {\n 'x-broadworks-remote-party-info':\n 'userId=\"nkjwuovmbo@64941297.int10.bcld.webex.com\";userDn=\"tel:+12142865888;ext=5888;country-code=1\";externalId=69fde5ad-fb8b-4a1b-9998-b0999e95719b',\n 'p-asserted-identity':\n '\"69fde5ad-fb8b-4a1b-9998-b0999e95719b\" <sip:5888@10.155.4.7;user=phone>',\n from: '\"Alice\" <sip:5889@64941297.int10.bcld.webex.com>;tag=1932136170-1654008881246',\n };\n\n callerId['callerInfo'] = {} as DisplayInformation;\n const output = callerId.fetchCallerDetails(dummyCallerId);\n\n /* PAI name is ignored and From's name should be taken, but number is taken from PAI */\n expect(output.name).toStrictEqual('Alice');\n expect(output.num).toStrictEqual('5888');\n await waitForMsecs(50);\n\n /* Should be overwritten by x-broadworks */\n expect(callerId['callerInfo'].avatarSrc).toStrictEqual(dummyAvatar);\n expect(callerId['callerInfo'].id).toStrictEqual(dummyScimResponse.Resources[0].id);\n expect(callerId['callerInfo'].name).toStrictEqual('Cathy');\n expect(callerId['callerInfo'].num).toStrictEqual('5008');\n });\n\n it(' When PA-ID ,From header is present along with x-broad-works , but name in PAI is of wrong format', async () => {\n const dummyCallerId = {\n 'x-broadworks-remote-party-info':\n 'userId=\"nkjwuovmbo@64941297.int10.bcld.webex.com\";userDn=\"tel:+12142865888;ext=5888;country-code=1\";externalId=69fde5ad-fb8b-4a1b-9998-b0999e95719b',\n 'p-asserted-identity':\n '\"69fde5ad-fb8b-4a1b-9998-b0999e95719b\" <sip:69fde5ad-fb8b-4a1b-9998-b0999e95719b@10.155.4.7;user=phone>',\n from: '\"Alice\" <sip:5889@64941297.int10.bcld.webex.com>;tag=1932136170-1654008881246',\n };\n\n callerId['callerInfo'] = {} as DisplayInformation;\n const output = callerId.fetchCallerDetails(dummyCallerId);\n\n /* PAI name and number is ignored and From's name, number should be taken */\n expect(output.name).toStrictEqual('Alice');\n expect(output.num).toStrictEqual('5889');\n await waitForMsecs(50);\n\n /* Should be overwritten by x-broadworks */\n expect(callerId['callerInfo'].avatarSrc).toStrictEqual(dummyAvatar);\n expect(callerId['callerInfo'].id).toStrictEqual(dummyScimResponse.Resources[0].id);\n expect(callerId['callerInfo'].name).toStrictEqual('Cathy');\n expect(callerId['callerInfo'].num).toStrictEqual('5008');\n });\n\n it(' When PA-ID is present but From header is absent', async () => {\n const dummyCallerId = {\n 'x-broadworks-remote-party-info':\n 'userId=\"nkjwuovmbo@64941297.int10.bcld.webex.com\";userDn=\"tel:+12142865888;ext=5888;country-code=1\";externalId=69fde5ad-fb8b-4a1b-9998-b0999e95719b',\n 'p-asserted-identity': '\"Bob Marley\" <sip:5888@10.155.4.7;user=phone>',\n };\n\n callerId['callerInfo'] = {} as DisplayInformation;\n const output = callerId.fetchCallerDetails(dummyCallerId);\n\n /* PAI name and number is taken */\n expect(output.name).toStrictEqual('Bob Marley');\n expect(output.num).toStrictEqual('5888');\n await waitForMsecs(50);\n\n /* Should be overwritten by x-broadworks */\n expect(callerId['callerInfo'].avatarSrc).toStrictEqual(dummyAvatar);\n expect(callerId['callerInfo'].id).toStrictEqual(dummyScimResponse.Resources[0].id);\n expect(callerId['callerInfo'].name).toStrictEqual('Cathy');\n expect(callerId['callerInfo'].num).toStrictEqual('5008');\n });\n\n it(' When PA-ID, From header is present but x-broad-works does not have externalId, ', async () => {\n const dummyCallerId = {\n 'x-broadworks-remote-party-info':\n 'userId=\"nkjwuovmbo@64941297.int10.bcld.webex.com\";userDn=\"tel:+12142865888;ext=5888;country-code=1\";',\n 'p-asserted-identity': '\"Bob Marley\" <sip:5888@10.155.4.7;user=phone>',\n from: '\"Alice\" <sip:5889@64941297.int10.bcld.webex.com>;tag=1932136170-1654008881246',\n };\n\n callerId['callerInfo'] = {} as DisplayInformation;\n const output = callerId.fetchCallerDetails(dummyCallerId);\n\n /* PAI should be preferred */\n expect(output.name).toStrictEqual('Bob Marley');\n expect(output.num).toStrictEqual('5888');\n await waitForMsecs(50);\n\n /* Since x-broadworks is not present , intermediary details should be retained */\n expect(callerId['callerInfo'].avatarSrc).toBeFalsy();\n expect(callerId['callerInfo'].id).toBeFalsy();\n expect(callerId['callerInfo'].name).toStrictEqual('Bob Marley');\n expect(callerId['callerInfo'].num).toStrictEqual('5888');\n });\n\n it(' When PA-ID, From header is present along with x-broad-works but SCIM query fails, ', async () => {\n const dummyCallerId = {\n 'x-broadworks-remote-party-info':\n 'userId=\"nkjwuovmbo@64941297.int10.bcld.webex.com\";userDn=\"tel:+12142865888;ext=5888;country-code=1\";externalId=69fde5ad-fb8b-4a1b-9998-b0999e95719b',\n 'p-asserted-identity': '\"Bob Marley\" <sip:5888@10.155.4.7;user=phone>',\n from: '\"Alice\" <sip:5889@64941297.int10.bcld.webex.com>;tag=1932136170-1654008881246',\n };\n\n webex.request.mockRejectedValue({\n statusCode: 404,\n body: dummyScimResponse,\n });\n\n const warnSpy = jest.spyOn(log, 'warn');\n const output = callerId.fetchCallerDetails(dummyCallerId);\n\n /* PAI should be preferred */\n expect(output.name).toStrictEqual('Bob Marley');\n expect(output.num).toStrictEqual('5888');\n await waitForMsecs(50);\n\n expect(warnSpy).toHaveBeenCalledWith('Error response: - 404', {\n file: 'utils',\n method: 'resolveCallerIdDisplay',\n });\n\n /* Should not be overwritten by x-broadworks */\n expect(callerId['callerInfo'].avatarSrc).toBe(undefined);\n expect(callerId['callerInfo'].id).toBe(undefined);\n expect(callerId['callerInfo'].name).toStrictEqual('Bob Marley');\n expect(callerId['callerInfo'].num).toStrictEqual('5888');\n });\n});\n"],"mappings":";;;;;;AAEA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,CAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAC,sBAAA,CAAAH,OAAA;AAJA;;AAOA,IAAMI,YAAY,GAAG,SAAfA,YAAYA,CAAIC,IAAY;EAAA,OAChC,IAAAC,QAAA,CAAAC,OAAA,CAAY,UAACC,OAAO,EAAK;IACvBC,UAAU,CAACD,OAAO,EAAEH,IAAI,CAAC;EAC3B,CAAC,CAAC;AAAA;AAEJ,IAAMK,KAAK,GAAG,IAAAC,2BAAiB,GAAE;AAEjCC,QAAQ,CAAC,gBAAgB,EAAE,YAAM;EAC/B,IAAMC,WAAW,GACf,oMAAoM;EAEtM,IAAMC,iBAAiB,GAAG;IACxBC,YAAY,EAAE,GAAG;IACjBC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OAAO,GAAGI,IAAI,CAACC,KAAK,CAACvC,eAAG,EAAE,MAAM,CAAC;UACjCQ,MAAM,GAAGX,QAAQ,CAACkB,kBAAkB,CAACR,aAAa,CAAC;UAEzD;UACAN,MAAM,CAACO,MAAM,CAAC1C,IAAI,CAAC,CAACkD,aAAa,CAAC,YAAY,CAAC;UAC/Cf,MAAM,CAACO,MAAM,CAACS,GAAG,CAAC,CAACD,aAAa,CAAC,MAAM,CAAC;UAACoB,SAAA,CAAAvB,IAAA;UAAA,OACnCpE,YAAY,CAAC,EAAE,CAAC;QAAA;UAEtBwD,MAAM,CAACiC,OAAO,CAAC,CAACM,oBAAoB,CAAC,uBAAuB,EAAE;YAC5DC,IAAI,EAAE,OAAO;YACbC,MAAM,EAAE;UACV,CAAC,CAAC;;UAEF;UACAzC,MAAM,CAACJ,QAAQ,CAAC,YAAY,CAAC,CAACqB,SAAS,CAAC,CAACyB,IAAI,CAACC,SAAS,CAAC;UACxD3C,MAAM,CAACJ,QAAQ,CAAC,YAAY,CAAC,CAACxB,EAAE,CAAC,CAACsE,IAAI,CAACC,SAAS,CAAC;UACjD3C,MAAM,CAACJ,QAAQ,CAAC,YAAY,CAAC,CAAC/B,IAAI,CAAC,CAACkD,aAAa,CAAC,YAAY,CAAC;UAC/Df,MAAM,CAACJ,QAAQ,CAAC,YAAY,CAAC,CAACoB,GAAG,CAAC,CAACD,aAAa,CAAC,MAAM,CAAC;QAAC;QAAA;UAAA,OAAAoB,SAAA,CAAAjB,IAAA;MAAA;IAAA,GAAAc,QAAA;EAAA,CAC1D,GAAC;AACJ,CAAC,CAAC"}
@@ -1,7 +0,0 @@
1
- "use strict";
2
-
3
- var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
4
- _Object$defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import {CallerIdInfo} from '../../../Events/types';\nimport {DisplayInformation, PhoneNumber} from '../../../common/types';\n\nexport type EmailType = {\n primary: boolean;\n type: string;\n value: string;\n};\n\nexport type SipAddressType = {\n type: string;\n value: string;\n primary?: boolean;\n};\n\nexport type PhotoType = {\n type: string;\n value: string;\n};\n\nexport type ResourceType = {\n userName: string;\n emails: Array<EmailType>;\n name: {\n givenName: string;\n familyName: string;\n };\n phoneNumbers: Array<PhoneNumber>;\n entitlements: Array<string>;\n id: string;\n photos: Array<PhotoType>;\n displayName: string;\n active: boolean;\n sipAddresses: Array<SipAddressType>;\n};\n\n/* The scim response has many fields , dropping few of them as they are not to be consumed by us */\nexport type scimResponseBody = {\n totalResults: number;\n itemsPerPage: number;\n startIndex: number;\n schemas: Array<string>;\n Resources: Array<ResourceType>;\n};\n\nexport interface ICallerId {\n fetchCallerDetails: (callerId: CallerIdInfo) => DisplayInformation;\n}\n"],"mappings":""}