@wazo/sdk 0.43.14 → 0.44.0

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 (887) hide show
  1. package/README.md +84 -57
  2. package/dist/index.js +10630 -0
  3. package/dist/index.mjs +10541 -0
  4. package/dist/types/api-client.d.ts +26 -0
  5. package/dist/types/api-client.d.ts.map +1 -0
  6. package/{lib/types/api-client.d.ts → dist/types/base-api-client.d.ts} +3 -24
  7. package/dist/types/base-api-client.d.ts.map +1 -0
  8. package/dist/types/constants.d.ts +12 -0
  9. package/dist/types/constants.d.ts.map +1 -0
  10. package/{lib → dist}/types/domain/Contact.d.ts +3 -1
  11. package/dist/types/domain/Contact.d.ts.map +1 -0
  12. package/{lib → dist}/types/index.d.ts +14 -13
  13. package/dist/types/index.d.ts.map +1 -0
  14. package/dist/types/service/__tests__/getApiclient.test.d.ts +2 -0
  15. package/dist/types/service/__tests__/getApiclient.test.d.ts.map +1 -0
  16. package/{lib → dist}/types/service/getApiClient.d.ts +5 -2
  17. package/dist/types/service/getApiClient.d.ts.map +1 -0
  18. package/{esm → dist}/types/simple/index.d.ts +1 -1
  19. package/{lib → dist}/types/utils/api-requester.d.ts.map +1 -1
  20. package/dist/wazo-sdk.js +69378 -43
  21. package/dist/wazo-sdk.js.LICENSE.txt +684 -0
  22. package/package.json +10 -21
  23. package/esm/__tests__/api-client.test.js +0 -281
  24. package/esm/__tests__/web-rtc-client.test.js +0 -192
  25. package/esm/api/agentd.js +0 -23
  26. package/esm/api/amid.js +0 -17
  27. package/esm/api/application.js +0 -63
  28. package/esm/api/auth.js +0 -198
  29. package/esm/api/call-logd.js +0 -24
  30. package/esm/api/calld.js +0 -120
  31. package/esm/api/chatd.js +0 -50
  32. package/esm/api/confd.js +0 -77
  33. package/esm/api/ctid-ng.js +0 -96
  34. package/esm/api/dird.js +0 -110
  35. package/esm/api/webhookd.js +0 -7
  36. package/esm/api-client.js +0 -166
  37. package/esm/checker/Checker.js +0 -54
  38. package/esm/checker/checks/aor.js +0 -28
  39. package/esm/checker/checks/api.js +0 -76
  40. package/esm/checker/checks/ice-ipv4.js +0 -69
  41. package/esm/checker/checks/index.js +0 -8
  42. package/esm/checker/checks/symmetric-nat.js +0 -59
  43. package/esm/checker/checks/wazo-websocket.js +0 -38
  44. package/esm/checker/checks/webrtc-transport.js +0 -35
  45. package/esm/checker/checks/webrtc.js +0 -40
  46. package/esm/domain/AdHocAPIConference.js +0 -102
  47. package/esm/domain/Agent.js +0 -30
  48. package/esm/domain/BadResponse.js +0 -21
  49. package/esm/domain/Call.js +0 -123
  50. package/esm/domain/CallLog.js +0 -157
  51. package/esm/domain/CallSession.js +0 -253
  52. package/esm/domain/CallerID.js +0 -24
  53. package/esm/domain/ChatMessage.js +0 -55
  54. package/esm/domain/ChatRoom.js +0 -30
  55. package/esm/domain/Contact.js +0 -464
  56. package/esm/domain/Country.js +0 -19
  57. package/esm/domain/Device/DebugDevice.js +0 -32
  58. package/esm/domain/Device/Device.js +0 -1
  59. package/esm/domain/DirectorySource.js +0 -1
  60. package/esm/domain/ExternalApp.js +0 -24
  61. package/esm/domain/Features.js +0 -77
  62. package/esm/domain/ForwardOption.js +0 -37
  63. package/esm/domain/Incall.js +0 -28
  64. package/esm/domain/IndirectTransfer.js +0 -40
  65. package/esm/domain/Line.js +0 -39
  66. package/esm/domain/Meeting.js +0 -61
  67. package/esm/domain/MeetingAuthorization.js +0 -46
  68. package/esm/domain/MeetingStatus.js +0 -14
  69. package/esm/domain/NotificationOptions.js +0 -45
  70. package/esm/domain/Phone/CTIPhone.js +0 -288
  71. package/esm/domain/Phone/Phone.js +0 -1
  72. package/esm/domain/Phone/WebRTCPhone.js +0 -1482
  73. package/esm/domain/Profile.js +0 -128
  74. package/esm/domain/Recording.js +0 -30
  75. package/esm/domain/Relocation.js +0 -20
  76. package/esm/domain/Room.js +0 -97
  77. package/esm/domain/SFUNotAvailableError.js +0 -6
  78. package/esm/domain/ServerError.js +0 -9
  79. package/esm/domain/Session.js +0 -174
  80. package/esm/domain/SipLine.js +0 -82
  81. package/esm/domain/Subscription.js +0 -42
  82. package/esm/domain/SwitchboardCall.js +0 -56
  83. package/esm/domain/Voicemail.js +0 -76
  84. package/esm/domain/__tests__/Agent.test.js +0 -37
  85. package/esm/domain/__tests__/Call.test.js +0 -25
  86. package/esm/domain/__tests__/CallLog.test.js +0 -181
  87. package/esm/domain/__tests__/CallSession.test.js +0 -78
  88. package/esm/domain/__tests__/Contact.test.js +0 -393
  89. package/esm/domain/__tests__/IndirectTransfer.test.js +0 -67
  90. package/esm/domain/__tests__/Line.test.js +0 -52
  91. package/esm/domain/__tests__/Meeting.test.js +0 -77
  92. package/esm/domain/__tests__/MeetingAuthorization.test.js +0 -49
  93. package/esm/domain/__tests__/Profile.test.js +0 -169
  94. package/esm/domain/__tests__/Room.test.js +0 -206
  95. package/esm/domain/__tests__/Session.test.js +0 -382
  96. package/esm/domain/__tests__/SipLine.test.js +0 -27
  97. package/esm/domain/__tests__/Voicemail.test.js +0 -90
  98. package/esm/domain/types.js +0 -2
  99. package/esm/index.js +0 -50
  100. package/esm/lib/WazoSessionDescriptionHandler.js +0 -429
  101. package/esm/pubkey.js +0 -10
  102. package/esm/service/CallApi.js +0 -61
  103. package/esm/service/IssueReporter.js +0 -331
  104. package/esm/service/__tests__/IssueReporter.test.js +0 -112
  105. package/esm/service/getApiClient.js +0 -92
  106. package/esm/simple/Auth.js +0 -384
  107. package/esm/simple/Configuration.js +0 -13
  108. package/esm/simple/Directory.js +0 -11
  109. package/esm/simple/Phone.js +0 -389
  110. package/esm/simple/Websocket.js +0 -81
  111. package/esm/simple/__tests__/Auth.test.js +0 -144
  112. package/esm/simple/index.js +0 -137
  113. package/esm/simple/room/LocalParticipant.js +0 -4
  114. package/esm/simple/room/Participant.js +0 -315
  115. package/esm/simple/room/RemoteParticipant.js +0 -10
  116. package/esm/simple/room/Room.js +0 -714
  117. package/esm/simple/room/SipRoom.js +0 -121
  118. package/esm/simple/room/Stream.js +0 -47
  119. package/esm/simple/room/__tests__/Participant.test.js +0 -71
  120. package/esm/simple/room/__tests__/RemoteParticipant.test.js +0 -12
  121. package/esm/simple/utils.js +0 -10
  122. package/esm/types/WebSocketMessage.js +0 -1
  123. package/esm/types/api-client.d.ts +0 -64
  124. package/esm/types/api-client.d.ts.map +0 -1
  125. package/esm/types/domain/Contact.d.ts +0 -332
  126. package/esm/types/domain/Contact.d.ts.map +0 -1
  127. package/esm/types/index.d.ts +0 -58
  128. package/esm/types/index.d.ts.map +0 -1
  129. package/esm/types/service/getApiClient.d.ts +0 -18
  130. package/esm/types/service/getApiClient.d.ts.map +0 -1
  131. package/esm/types/utils/api-requester.d.ts.map +0 -1
  132. package/esm/utils/Emitter.js +0 -19
  133. package/esm/utils/Heartbeat.js +0 -73
  134. package/esm/utils/PhoneNumberUtil.js +0 -67
  135. package/esm/utils/__tests__/Heartbeat.test.js +0 -65
  136. package/esm/utils/__tests__/PhoneNumberUtil.test.js +0 -70
  137. package/esm/utils/__tests__/api-requester.test.js +0 -166
  138. package/esm/utils/__tests__/array.test.js +0 -18
  139. package/esm/utils/__tests__/compare-version.test.js +0 -10
  140. package/esm/utils/__tests__/object.test.js +0 -76
  141. package/esm/utils/__tests__/sdp.test.js +0 -172
  142. package/esm/utils/__tests__/string.test.js +0 -49
  143. package/esm/utils/api-requester.js +0 -214
  144. package/esm/utils/array.js +0 -9
  145. package/esm/utils/compare-version.js +0 -17
  146. package/esm/utils/isMobile.js +0 -3
  147. package/esm/utils/new-from.js +0 -7
  148. package/esm/utils/object.js +0 -10
  149. package/esm/utils/once.js +0 -15
  150. package/esm/utils/sdp.js +0 -104
  151. package/esm/utils/string.js +0 -12
  152. package/esm/utils/update-from.js +0 -10
  153. package/esm/utils/webrtc.js +0 -37
  154. package/esm/web-rtc-client.js +0 -2200
  155. package/esm/websocket-client.js +0 -385
  156. package/index.js +0 -1
  157. package/lib/__tests__/api-client.test.js +0 -295
  158. package/lib/__tests__/web-rtc-client.test.js +0 -210
  159. package/lib/api/agentd.js +0 -28
  160. package/lib/api/amid.js +0 -28
  161. package/lib/api/application.js +0 -68
  162. package/lib/api/auth.js +0 -210
  163. package/lib/api/call-logd.js +0 -29
  164. package/lib/api/calld.js +0 -134
  165. package/lib/api/chatd.js +0 -68
  166. package/lib/api/confd.js +0 -91
  167. package/lib/api/ctid-ng.js +0 -101
  168. package/lib/api/dird.js +0 -124
  169. package/lib/api/webhookd.js +0 -12
  170. package/lib/api-client.js +0 -164
  171. package/lib/checker/Checker.js +0 -68
  172. package/lib/checker/checks/aor.js +0 -42
  173. package/lib/checker/checks/api.js +0 -90
  174. package/lib/checker/checks/ice-ipv4.js +0 -73
  175. package/lib/checker/checks/index.js +0 -13
  176. package/lib/checker/checks/symmetric-nat.js +0 -61
  177. package/lib/checker/checks/wazo-websocket.js +0 -63
  178. package/lib/checker/checks/webrtc-transport.js +0 -49
  179. package/lib/checker/checks/webrtc.js +0 -54
  180. package/lib/domain/AdHocAPIConference.js +0 -101
  181. package/lib/domain/Agent.js +0 -25
  182. package/lib/domain/BadResponse.js +0 -19
  183. package/lib/domain/Call.js +0 -112
  184. package/lib/domain/CallLog.js +0 -151
  185. package/lib/domain/CallSession.js +0 -224
  186. package/lib/domain/CallerID.js +0 -27
  187. package/lib/domain/ChatMessage.js +0 -53
  188. package/lib/domain/ChatRoom.js +0 -32
  189. package/lib/domain/Contact.js +0 -439
  190. package/lib/domain/Country.js +0 -21
  191. package/lib/domain/Device/DebugDevice.js +0 -35
  192. package/lib/domain/Device/Device.js +0 -2
  193. package/lib/domain/DirectorySource.js +0 -2
  194. package/lib/domain/ExternalApp.js +0 -27
  195. package/lib/domain/Features.js +0 -87
  196. package/lib/domain/ForwardOption.js +0 -41
  197. package/lib/domain/Incall.js +0 -32
  198. package/lib/domain/IndirectTransfer.js +0 -42
  199. package/lib/domain/Line.js +0 -39
  200. package/lib/domain/Meeting.js +0 -55
  201. package/lib/domain/MeetingAuthorization.js +0 -45
  202. package/lib/domain/MeetingStatus.js +0 -15
  203. package/lib/domain/NotificationOptions.js +0 -49
  204. package/lib/domain/Phone/CTIPhone.js +0 -324
  205. package/lib/domain/Phone/Phone.js +0 -2
  206. package/lib/domain/Phone/WebRTCPhone.js +0 -1492
  207. package/lib/domain/Profile.js +0 -138
  208. package/lib/domain/Recording.js +0 -31
  209. package/lib/domain/Relocation.js +0 -18
  210. package/lib/domain/Room.js +0 -81
  211. package/lib/domain/SFUNotAvailableError.js +0 -9
  212. package/lib/domain/ServerError.js +0 -15
  213. package/lib/domain/Session.js +0 -166
  214. package/lib/domain/SipLine.js +0 -76
  215. package/lib/domain/Subscription.js +0 -34
  216. package/lib/domain/SwitchboardCall.js +0 -50
  217. package/lib/domain/Voicemail.js +0 -77
  218. package/lib/domain/__tests__/Agent.test.js +0 -42
  219. package/lib/domain/__tests__/Call.test.js +0 -30
  220. package/lib/domain/__tests__/CallLog.test.js +0 -166
  221. package/lib/domain/__tests__/CallSession.test.js +0 -83
  222. package/lib/domain/__tests__/Contact.test.js +0 -371
  223. package/lib/domain/__tests__/IndirectTransfer.test.js +0 -81
  224. package/lib/domain/__tests__/Line.test.js +0 -57
  225. package/lib/domain/__tests__/Meeting.test.js +0 -82
  226. package/lib/domain/__tests__/MeetingAuthorization.test.js +0 -54
  227. package/lib/domain/__tests__/Profile.test.js +0 -197
  228. package/lib/domain/__tests__/Room.test.js +0 -220
  229. package/lib/domain/__tests__/Session.test.js +0 -378
  230. package/lib/domain/__tests__/SipLine.test.js +0 -32
  231. package/lib/domain/__tests__/Voicemail.test.js +0 -95
  232. package/lib/domain/types.js +0 -38
  233. package/lib/index.js +0 -125
  234. package/lib/lib/WazoSessionDescriptionHandler.js +0 -434
  235. package/lib/pubkey.js +0 -12
  236. package/lib/service/CallApi.js +0 -112
  237. package/lib/service/IssueReporter.js +0 -317
  238. package/lib/service/__tests__/IssueReporter.test.js +0 -117
  239. package/lib/service/getApiClient.js +0 -112
  240. package/lib/simple/Auth.js +0 -433
  241. package/lib/simple/Configuration.js +0 -31
  242. package/lib/simple/Directory.js +0 -29
  243. package/lib/simple/Phone.js +0 -418
  244. package/lib/simple/Websocket.js +0 -116
  245. package/lib/simple/__tests__/Auth.test.js +0 -181
  246. package/lib/simple/index.js +0 -165
  247. package/lib/simple/room/LocalParticipant.js +0 -9
  248. package/lib/simple/room/Participant.js +0 -302
  249. package/lib/simple/room/RemoteParticipant.js +0 -15
  250. package/lib/simple/room/Room.js +0 -711
  251. package/lib/simple/room/SipRoom.js +0 -141
  252. package/lib/simple/room/Stream.js +0 -50
  253. package/lib/simple/room/__tests__/Participant.test.js +0 -85
  254. package/lib/simple/room/__tests__/RemoteParticipant.test.js +0 -17
  255. package/lib/simple/utils.js +0 -27
  256. package/lib/types/WebSocketMessage.js +0 -2
  257. package/lib/types/__tests__/api-client.test.d.ts +0 -2
  258. package/lib/types/__tests__/api-client.test.d.ts.map +0 -1
  259. package/lib/types/__tests__/web-rtc-client.test.d.ts +0 -2
  260. package/lib/types/__tests__/web-rtc-client.test.d.ts.map +0 -1
  261. package/lib/types/api/agentd.d.ts +0 -17
  262. package/lib/types/api/agentd.d.ts.map +0 -1
  263. package/lib/types/api/amid.d.ts +0 -8
  264. package/lib/types/api/amid.d.ts.map +0 -1
  265. package/lib/types/api/application.d.ts +0 -34
  266. package/lib/types/api/application.d.ts.map +0 -1
  267. package/lib/types/api/auth.d.ts +0 -69
  268. package/lib/types/api/auth.d.ts.map +0 -1
  269. package/lib/types/api/call-logd.d.ts +0 -12
  270. package/lib/types/api/call-logd.d.ts.map +0 -1
  271. package/lib/types/api/calld.d.ts +0 -52
  272. package/lib/types/api/calld.d.ts.map +0 -1
  273. package/lib/types/api/chatd.d.ts +0 -29
  274. package/lib/types/api/chatd.d.ts.map +0 -1
  275. package/lib/types/api/confd.d.ts +0 -46
  276. package/lib/types/api/confd.d.ts.map +0 -1
  277. package/lib/types/api/ctid-ng.d.ts +0 -36
  278. package/lib/types/api/ctid-ng.d.ts.map +0 -1
  279. package/lib/types/api/dird.d.ts +0 -33
  280. package/lib/types/api/dird.d.ts.map +0 -1
  281. package/lib/types/api/webhookd.d.ts +0 -24
  282. package/lib/types/api/webhookd.d.ts.map +0 -1
  283. package/lib/types/api-client.d.ts.map +0 -1
  284. package/lib/types/checker/Checker.d.ts +0 -13
  285. package/lib/types/checker/Checker.d.ts.map +0 -1
  286. package/lib/types/checker/checks/aor.d.ts +0 -6
  287. package/lib/types/checker/checks/aor.d.ts.map +0 -1
  288. package/lib/types/checker/checks/api.d.ts +0 -6
  289. package/lib/types/checker/checks/api.d.ts.map +0 -1
  290. package/lib/types/checker/checks/ice-ipv4.d.ts +0 -6
  291. package/lib/types/checker/checks/ice-ipv4.d.ts.map +0 -1
  292. package/lib/types/checker/checks/index.d.ts +0 -9
  293. package/lib/types/checker/checks/index.d.ts.map +0 -1
  294. package/lib/types/checker/checks/symmetric-nat.d.ts +0 -6
  295. package/lib/types/checker/checks/symmetric-nat.d.ts.map +0 -1
  296. package/lib/types/checker/checks/wazo-websocket.d.ts +0 -6
  297. package/lib/types/checker/checks/wazo-websocket.d.ts.map +0 -1
  298. package/lib/types/checker/checks/webrtc-transport.d.ts +0 -7
  299. package/lib/types/checker/checks/webrtc-transport.d.ts.map +0 -1
  300. package/lib/types/checker/checks/webrtc.d.ts +0 -6
  301. package/lib/types/checker/checks/webrtc.d.ts.map +0 -1
  302. package/lib/types/domain/AdHocAPIConference.d.ts +0 -54
  303. package/lib/types/domain/AdHocAPIConference.d.ts.map +0 -1
  304. package/lib/types/domain/Agent.d.ts +0 -31
  305. package/lib/types/domain/Agent.d.ts.map +0 -1
  306. package/lib/types/domain/BadResponse.d.ts +0 -11
  307. package/lib/types/domain/BadResponse.d.ts.map +0 -1
  308. package/lib/types/domain/Call.d.ts +0 -79
  309. package/lib/types/domain/Call.d.ts.map +0 -1
  310. package/lib/types/domain/CallLog.d.ts +0 -88
  311. package/lib/types/domain/CallLog.d.ts.map +0 -1
  312. package/lib/types/domain/CallSession.d.ts +0 -119
  313. package/lib/types/domain/CallSession.d.ts.map +0 -1
  314. package/lib/types/domain/CallerID.d.ts +0 -22
  315. package/lib/types/domain/CallerID.d.ts.map +0 -1
  316. package/lib/types/domain/ChatMessage.d.ts +0 -41
  317. package/lib/types/domain/ChatMessage.d.ts.map +0 -1
  318. package/lib/types/domain/ChatRoom.d.ts +0 -22
  319. package/lib/types/domain/ChatRoom.d.ts.map +0 -1
  320. package/lib/types/domain/Contact.d.ts.map +0 -1
  321. package/lib/types/domain/Country.d.ts +0 -21
  322. package/lib/types/domain/Country.d.ts.map +0 -1
  323. package/lib/types/domain/Device/DebugDevice.d.ts +0 -14
  324. package/lib/types/domain/Device/DebugDevice.d.ts.map +0 -1
  325. package/lib/types/domain/Device/Device.d.ts +0 -13
  326. package/lib/types/domain/Device/Device.d.ts.map +0 -1
  327. package/lib/types/domain/DirectorySource.d.ts +0 -13
  328. package/lib/types/domain/DirectorySource.d.ts.map +0 -1
  329. package/lib/types/domain/ExternalApp.d.ts +0 -22
  330. package/lib/types/domain/ExternalApp.d.ts.map +0 -1
  331. package/lib/types/domain/Features.d.ts +0 -26
  332. package/lib/types/domain/Features.d.ts.map +0 -1
  333. package/lib/types/domain/ForwardOption.d.ts +0 -28
  334. package/lib/types/domain/ForwardOption.d.ts.map +0 -1
  335. package/lib/types/domain/Incall.d.ts +0 -21
  336. package/lib/types/domain/Incall.d.ts.map +0 -1
  337. package/lib/types/domain/IndirectTransfer.d.ts +0 -31
  338. package/lib/types/domain/IndirectTransfer.d.ts.map +0 -1
  339. package/lib/types/domain/Line.d.ts +0 -35
  340. package/lib/types/domain/Line.d.ts.map +0 -1
  341. package/lib/types/domain/Meeting.d.ts +0 -45
  342. package/lib/types/domain/Meeting.d.ts.map +0 -1
  343. package/lib/types/domain/MeetingAuthorization.d.ts +0 -32
  344. package/lib/types/domain/MeetingAuthorization.d.ts.map +0 -1
  345. package/lib/types/domain/MeetingStatus.d.ts +0 -10
  346. package/lib/types/domain/MeetingStatus.d.ts.map +0 -1
  347. package/lib/types/domain/NotificationOptions.d.ts +0 -22
  348. package/lib/types/domain/NotificationOptions.d.ts.map +0 -1
  349. package/lib/types/domain/Phone/CTIPhone.d.ts +0 -79
  350. package/lib/types/domain/Phone/CTIPhone.d.ts.map +0 -1
  351. package/lib/types/domain/Phone/Phone.d.ts +0 -83
  352. package/lib/types/domain/Phone/Phone.d.ts.map +0 -1
  353. package/lib/types/domain/Phone/WebRTCPhone.d.ts +0 -183
  354. package/lib/types/domain/Phone/WebRTCPhone.d.ts.map +0 -1
  355. package/lib/types/domain/Profile.d.ts +0 -155
  356. package/lib/types/domain/Profile.d.ts.map +0 -1
  357. package/lib/types/domain/Recording.d.ts +0 -26
  358. package/lib/types/domain/Recording.d.ts.map +0 -1
  359. package/lib/types/domain/Relocation.d.ts +0 -23
  360. package/lib/types/domain/Relocation.d.ts.map +0 -1
  361. package/lib/types/domain/Room.d.ts +0 -33
  362. package/lib/types/domain/Room.d.ts.map +0 -1
  363. package/lib/types/domain/SFUNotAvailableError.d.ts +0 -4
  364. package/lib/types/domain/SFUNotAvailableError.d.ts.map +0 -1
  365. package/lib/types/domain/ServerError.d.ts +0 -6
  366. package/lib/types/domain/ServerError.d.ts.map +0 -1
  367. package/lib/types/domain/Session.d.ts +0 -100
  368. package/lib/types/domain/Session.d.ts.map +0 -1
  369. package/lib/types/domain/SipLine.d.ts +0 -54
  370. package/lib/types/domain/SipLine.d.ts.map +0 -1
  371. package/lib/types/domain/Subscription.d.ts +0 -43
  372. package/lib/types/domain/Subscription.d.ts.map +0 -1
  373. package/lib/types/domain/SwitchboardCall.d.ts +0 -62
  374. package/lib/types/domain/SwitchboardCall.d.ts.map +0 -1
  375. package/lib/types/domain/Voicemail.d.ts +0 -58
  376. package/lib/types/domain/Voicemail.d.ts.map +0 -1
  377. package/lib/types/domain/__tests__/Agent.test.d.ts +0 -2
  378. package/lib/types/domain/__tests__/Agent.test.d.ts.map +0 -1
  379. package/lib/types/domain/__tests__/Call.test.d.ts +0 -2
  380. package/lib/types/domain/__tests__/Call.test.d.ts.map +0 -1
  381. package/lib/types/domain/__tests__/CallLog.test.d.ts +0 -2
  382. package/lib/types/domain/__tests__/CallLog.test.d.ts.map +0 -1
  383. package/lib/types/domain/__tests__/CallSession.test.d.ts +0 -2
  384. package/lib/types/domain/__tests__/CallSession.test.d.ts.map +0 -1
  385. package/lib/types/domain/__tests__/Contact.test.d.ts +0 -2
  386. package/lib/types/domain/__tests__/Contact.test.d.ts.map +0 -1
  387. package/lib/types/domain/__tests__/IndirectTransfer.test.d.ts +0 -2
  388. package/lib/types/domain/__tests__/IndirectTransfer.test.d.ts.map +0 -1
  389. package/lib/types/domain/__tests__/Line.test.d.ts +0 -2
  390. package/lib/types/domain/__tests__/Line.test.d.ts.map +0 -1
  391. package/lib/types/domain/__tests__/Meeting.test.d.ts +0 -2
  392. package/lib/types/domain/__tests__/Meeting.test.d.ts.map +0 -1
  393. package/lib/types/domain/__tests__/MeetingAuthorization.test.d.ts +0 -2
  394. package/lib/types/domain/__tests__/MeetingAuthorization.test.d.ts.map +0 -1
  395. package/lib/types/domain/__tests__/Profile.test.d.ts +0 -2
  396. package/lib/types/domain/__tests__/Profile.test.d.ts.map +0 -1
  397. package/lib/types/domain/__tests__/Room.test.d.ts +0 -2
  398. package/lib/types/domain/__tests__/Room.test.d.ts.map +0 -1
  399. package/lib/types/domain/__tests__/Session.test.d.ts +0 -2
  400. package/lib/types/domain/__tests__/Session.test.d.ts.map +0 -1
  401. package/lib/types/domain/__tests__/SipLine.test.d.ts +0 -2
  402. package/lib/types/domain/__tests__/SipLine.test.d.ts.map +0 -1
  403. package/lib/types/domain/__tests__/Voicemail.test.d.ts +0 -2
  404. package/lib/types/domain/__tests__/Voicemail.test.d.ts.map +0 -1
  405. package/lib/types/domain/types.d.ts +0 -378
  406. package/lib/types/domain/types.d.ts.map +0 -1
  407. package/lib/types/index.d.ts.map +0 -1
  408. package/lib/types/lib/WazoSessionDescriptionHandler.d.ts +0 -31
  409. package/lib/types/lib/WazoSessionDescriptionHandler.d.ts.map +0 -1
  410. package/lib/types/pubkey.d.ts +0 -3
  411. package/lib/types/pubkey.d.ts.map +0 -1
  412. package/lib/types/service/CallApi.d.ts +0 -28
  413. package/lib/types/service/CallApi.d.ts.map +0 -1
  414. package/lib/types/service/IssueReporter.d.ts +0 -42
  415. package/lib/types/service/IssueReporter.d.ts.map +0 -1
  416. package/lib/types/service/__tests__/IssueReporter.test.d.ts +0 -2
  417. package/lib/types/service/__tests__/IssueReporter.test.d.ts.map +0 -1
  418. package/lib/types/service/getApiClient.d.ts.map +0 -1
  419. package/lib/types/simple/Auth.d.ts +0 -75
  420. package/lib/types/simple/Auth.d.ts.map +0 -1
  421. package/lib/types/simple/Configuration.d.ts +0 -7
  422. package/lib/types/simple/Configuration.d.ts.map +0 -1
  423. package/lib/types/simple/Directory.d.ts +0 -7
  424. package/lib/types/simple/Directory.d.ts.map +0 -1
  425. package/lib/types/simple/Phone.d.ts +0 -119
  426. package/lib/types/simple/Phone.d.ts.map +0 -1
  427. package/lib/types/simple/Websocket.d.ts +0 -21
  428. package/lib/types/simple/Websocket.d.ts.map +0 -1
  429. package/lib/types/simple/__tests__/Auth.test.d.ts +0 -2
  430. package/lib/types/simple/__tests__/Auth.test.d.ts.map +0 -1
  431. package/lib/types/simple/index.d.ts +0 -153
  432. package/lib/types/simple/index.d.ts.map +0 -1
  433. package/lib/types/simple/room/LocalParticipant.d.ts +0 -5
  434. package/lib/types/simple/room/LocalParticipant.d.ts.map +0 -1
  435. package/lib/types/simple/room/Participant.d.ts +0 -77
  436. package/lib/types/simple/room/Participant.d.ts.map +0 -1
  437. package/lib/types/simple/room/RemoteParticipant.d.ts +0 -7
  438. package/lib/types/simple/room/RemoteParticipant.d.ts.map +0 -1
  439. package/lib/types/simple/room/Room.d.ts +0 -127
  440. package/lib/types/simple/room/Room.d.ts.map +0 -1
  441. package/lib/types/simple/room/SipRoom.d.ts +0 -14
  442. package/lib/types/simple/room/SipRoom.d.ts.map +0 -1
  443. package/lib/types/simple/room/Stream.d.ts +0 -13
  444. package/lib/types/simple/room/Stream.d.ts.map +0 -1
  445. package/lib/types/simple/room/__tests__/Participant.test.d.ts +0 -2
  446. package/lib/types/simple/room/__tests__/Participant.test.d.ts.map +0 -1
  447. package/lib/types/simple/room/__tests__/RemoteParticipant.test.d.ts +0 -2
  448. package/lib/types/simple/room/__tests__/RemoteParticipant.test.d.ts.map +0 -1
  449. package/lib/types/simple/utils.d.ts +0 -3
  450. package/lib/types/simple/utils.d.ts.map +0 -1
  451. package/lib/types/types/WebSocketMessage.d.ts +0 -285
  452. package/lib/types/types/WebSocketMessage.d.ts.map +0 -1
  453. package/lib/types/utils/Emitter.d.ts +0 -18
  454. package/lib/types/utils/Emitter.d.ts.map +0 -1
  455. package/lib/types/utils/Heartbeat.d.ts +0 -22
  456. package/lib/types/utils/Heartbeat.d.ts.map +0 -1
  457. package/lib/types/utils/PhoneNumberUtil.d.ts +0 -7
  458. package/lib/types/utils/PhoneNumberUtil.d.ts.map +0 -1
  459. package/lib/types/utils/__tests__/Heartbeat.test.d.ts +0 -2
  460. package/lib/types/utils/__tests__/Heartbeat.test.d.ts.map +0 -1
  461. package/lib/types/utils/__tests__/PhoneNumberUtil.test.d.ts +0 -2
  462. package/lib/types/utils/__tests__/PhoneNumberUtil.test.d.ts.map +0 -1
  463. package/lib/types/utils/__tests__/api-requester.test.d.ts +0 -2
  464. package/lib/types/utils/__tests__/api-requester.test.d.ts.map +0 -1
  465. package/lib/types/utils/__tests__/array.test.d.ts +0 -2
  466. package/lib/types/utils/__tests__/array.test.d.ts.map +0 -1
  467. package/lib/types/utils/__tests__/compare-version.test.d.ts +0 -2
  468. package/lib/types/utils/__tests__/compare-version.test.d.ts.map +0 -1
  469. package/lib/types/utils/__tests__/object.test.d.ts +0 -2
  470. package/lib/types/utils/__tests__/object.test.d.ts.map +0 -1
  471. package/lib/types/utils/__tests__/sdp.test.d.ts +0 -2
  472. package/lib/types/utils/__tests__/sdp.test.d.ts.map +0 -1
  473. package/lib/types/utils/__tests__/string.test.d.ts +0 -2
  474. package/lib/types/utils/__tests__/string.test.d.ts.map +0 -1
  475. package/lib/types/utils/api-requester.d.ts +0 -48
  476. package/lib/types/utils/array.d.ts +0 -2
  477. package/lib/types/utils/array.d.ts.map +0 -1
  478. package/lib/types/utils/compare-version.d.ts +0 -3
  479. package/lib/types/utils/compare-version.d.ts.map +0 -1
  480. package/lib/types/utils/isMobile.d.ts +0 -3
  481. package/lib/types/utils/isMobile.d.ts.map +0 -1
  482. package/lib/types/utils/new-from.d.ts +0 -3
  483. package/lib/types/utils/new-from.d.ts.map +0 -1
  484. package/lib/types/utils/object.d.ts +0 -2
  485. package/lib/types/utils/object.d.ts.map +0 -1
  486. package/lib/types/utils/once.d.ts +0 -2
  487. package/lib/types/utils/once.d.ts.map +0 -1
  488. package/lib/types/utils/sdp.d.ts +0 -28
  489. package/lib/types/utils/sdp.d.ts.map +0 -1
  490. package/lib/types/utils/string.d.ts +0 -3
  491. package/lib/types/utils/string.d.ts.map +0 -1
  492. package/lib/types/utils/update-from.d.ts +0 -3
  493. package/lib/types/utils/update-from.d.ts.map +0 -1
  494. package/lib/types/utils/webrtc.d.ts +0 -15
  495. package/lib/types/utils/webrtc.d.ts.map +0 -1
  496. package/lib/types/web-rtc-client.d.ts +0 -198
  497. package/lib/types/web-rtc-client.d.ts.map +0 -1
  498. package/lib/types/websocket-client.d.ts +0 -138
  499. package/lib/types/websocket-client.d.ts.map +0 -1
  500. package/lib/utils/Emitter.js +0 -24
  501. package/lib/utils/Heartbeat.js +0 -66
  502. package/lib/utils/PhoneNumberUtil.js +0 -73
  503. package/lib/utils/__tests__/Heartbeat.test.js +0 -79
  504. package/lib/utils/__tests__/PhoneNumberUtil.test.js +0 -72
  505. package/lib/utils/__tests__/api-requester.test.js +0 -180
  506. package/lib/utils/__tests__/array.test.js +0 -20
  507. package/lib/utils/__tests__/compare-version.test.js +0 -15
  508. package/lib/utils/__tests__/object.test.js +0 -78
  509. package/lib/utils/__tests__/sdp.test.js +0 -188
  510. package/lib/utils/__tests__/string.test.js +0 -51
  511. package/lib/utils/api-requester.js +0 -201
  512. package/lib/utils/array.js +0 -13
  513. package/lib/utils/compare-version.js +0 -19
  514. package/lib/utils/isMobile.js +0 -5
  515. package/lib/utils/new-from.js +0 -9
  516. package/lib/utils/object.js +0 -14
  517. package/lib/utils/once.js +0 -18
  518. package/lib/utils/sdp.js +0 -115
  519. package/lib/utils/string.js +0 -17
  520. package/lib/utils/update-from.js +0 -12
  521. package/lib/utils/webrtc.js +0 -41
  522. package/lib/web-rtc-client.js +0 -2239
  523. package/lib/websocket-client.js +0 -390
  524. package/src/__tests__/api-client.test.ts +0 -315
  525. package/src/__tests__/web-rtc-client.test.ts +0 -198
  526. package/src/api/agentd.ts +0 -37
  527. package/src/api/amid.ts +0 -25
  528. package/src/api/application.ts +0 -96
  529. package/src/api/auth.ts +0 -305
  530. package/src/api/call-logd.ts +0 -38
  531. package/src/api/calld.ts +0 -185
  532. package/src/api/chatd.ts +0 -87
  533. package/src/api/confd.ts +0 -119
  534. package/src/api/ctid-ng.ts +0 -152
  535. package/src/api/dird.ts +0 -143
  536. package/src/api/webhookd.ts +0 -30
  537. package/src/api-client.ts +0 -233
  538. package/src/checker/Checker.ts +0 -73
  539. package/src/checker/checks/aor.ts +0 -34
  540. package/src/checker/checks/api.ts +0 -78
  541. package/src/checker/checks/ice-ipv4.ts +0 -80
  542. package/src/checker/checks/index.ts +0 -9
  543. package/src/checker/checks/symmetric-nat.ts +0 -69
  544. package/src/checker/checks/wazo-websocket.ts +0 -41
  545. package/src/checker/checks/webrtc-transport.ts +0 -42
  546. package/src/checker/checks/webrtc.ts +0 -48
  547. package/src/domain/AdHocAPIConference.ts +0 -166
  548. package/src/domain/Agent.ts +0 -68
  549. package/src/domain/BadResponse.ts +0 -29
  550. package/src/domain/Call.ts +0 -217
  551. package/src/domain/CallLog.ts +0 -265
  552. package/src/domain/CallSession.ts +0 -401
  553. package/src/domain/CallerID.ts +0 -49
  554. package/src/domain/ChatMessage.ts +0 -107
  555. package/src/domain/ChatRoom.ts +0 -55
  556. package/src/domain/Contact.ts +0 -851
  557. package/src/domain/Country.ts +0 -19
  558. package/src/domain/Device/DebugDevice.ts +0 -44
  559. package/src/domain/Device/Device.ts +0 -12
  560. package/src/domain/DirectorySource.ts +0 -13
  561. package/src/domain/ExternalApp.ts +0 -46
  562. package/src/domain/Features.ts +0 -105
  563. package/src/domain/ForwardOption.ts +0 -65
  564. package/src/domain/Incall.ts +0 -50
  565. package/src/domain/IndirectTransfer.ts +0 -73
  566. package/src/domain/Line.ts +0 -79
  567. package/src/domain/Meeting.ts +0 -113
  568. package/src/domain/MeetingAuthorization.ts +0 -81
  569. package/src/domain/MeetingStatus.ts +0 -23
  570. package/src/domain/NotificationOptions.ts +0 -68
  571. package/src/domain/Phone/CTIPhone.ts +0 -381
  572. package/src/domain/Phone/Phone.ts +0 -81
  573. package/src/domain/Phone/WebRTCPhone.ts +0 -1830
  574. package/src/domain/Profile.ts +0 -289
  575. package/src/domain/Recording.ts +0 -60
  576. package/src/domain/Relocation.ts +0 -45
  577. package/src/domain/Room.ts +0 -141
  578. package/src/domain/SFUNotAvailableError.ts +0 -7
  579. package/src/domain/ServerError.ts +0 -12
  580. package/src/domain/Session.ts +0 -297
  581. package/src/domain/SipLine.ts +0 -154
  582. package/src/domain/Subscription.ts +0 -95
  583. package/src/domain/SwitchboardCall.ts +0 -127
  584. package/src/domain/Voicemail.ts +0 -138
  585. package/src/domain/__tests__/Agent.test.ts +0 -38
  586. package/src/domain/__tests__/Call.test.ts +0 -26
  587. package/src/domain/__tests__/CallLog.test.ts +0 -203
  588. package/src/domain/__tests__/CallSession.test.ts +0 -80
  589. package/src/domain/__tests__/Contact.test.ts +0 -407
  590. package/src/domain/__tests__/IndirectTransfer.test.ts +0 -68
  591. package/src/domain/__tests__/Line.test.ts +0 -53
  592. package/src/domain/__tests__/Meeting.test.ts +0 -93
  593. package/src/domain/__tests__/MeetingAuthorization.test.ts +0 -50
  594. package/src/domain/__tests__/Profile.test.ts +0 -170
  595. package/src/domain/__tests__/Room.test.ts +0 -207
  596. package/src/domain/__tests__/Session.test.ts +0 -385
  597. package/src/domain/__tests__/SipLine.test.ts +0 -30
  598. package/src/domain/__tests__/Voicemail.test.ts +0 -91
  599. package/src/domain/types.ts +0 -331
  600. package/src/index.ts +0 -59
  601. package/src/lib/WazoSessionDescriptionHandler.ts +0 -532
  602. package/src/pubkey.ts +0 -11
  603. package/src/service/CallApi.ts +0 -86
  604. package/src/service/IssueReporter.ts +0 -434
  605. package/src/service/__tests__/IssueReporter.test.ts +0 -127
  606. package/src/service/getApiClient.ts +0 -106
  607. package/src/simple/Auth.ts +0 -496
  608. package/src/simple/Configuration.ts +0 -18
  609. package/src/simple/Directory.ts +0 -16
  610. package/src/simple/Phone.ts +0 -531
  611. package/src/simple/Websocket.ts +0 -107
  612. package/src/simple/__tests__/Auth.test.ts +0 -168
  613. package/src/simple/index.ts +0 -153
  614. package/src/simple/room/LocalParticipant.ts +0 -5
  615. package/src/simple/room/Participant.ts +0 -409
  616. package/src/simple/room/RemoteParticipant.ts +0 -15
  617. package/src/simple/room/Room.ts +0 -942
  618. package/src/simple/room/SipRoom.ts +0 -164
  619. package/src/simple/room/Stream.ts +0 -64
  620. package/src/simple/room/__tests__/Participant.test.ts +0 -73
  621. package/src/simple/room/__tests__/RemoteParticipant.test.ts +0 -15
  622. package/src/simple/utils.ts +0 -12
  623. package/src/types/WebSocketMessage.ts +0 -335
  624. package/src/types/global.d.ts +0 -33
  625. package/src/types/wazo.d.ts +0 -1
  626. package/src/utils/Emitter.ts +0 -34
  627. package/src/utils/Heartbeat.ts +0 -102
  628. package/src/utils/PhoneNumberUtil.ts +0 -81
  629. package/src/utils/__tests__/Heartbeat.test.ts +0 -66
  630. package/src/utils/__tests__/PhoneNumberUtil.test.ts +0 -79
  631. package/src/utils/__tests__/api-requester.test.ts +0 -180
  632. package/src/utils/__tests__/array.test.ts +0 -19
  633. package/src/utils/__tests__/compare-version.test.ts +0 -11
  634. package/src/utils/__tests__/object.test.ts +0 -77
  635. package/src/utils/__tests__/sdp.test.ts +0 -173
  636. package/src/utils/__tests__/string.test.ts +0 -55
  637. package/src/utils/api-requester.ts +0 -295
  638. package/src/utils/array.ts +0 -11
  639. package/src/utils/compare-version.ts +0 -21
  640. package/src/utils/isMobile.ts +0 -4
  641. package/src/utils/new-from.ts +0 -7
  642. package/src/utils/object.ts +0 -12
  643. package/src/utils/once.ts +0 -14
  644. package/src/utils/sdp.ts +0 -140
  645. package/src/utils/string.ts +0 -15
  646. package/src/utils/update-from.ts +0 -11
  647. package/src/utils/webrtc.ts +0 -56
  648. package/src/web-rtc-client.ts +0 -2687
  649. package/src/websocket-client.ts +0 -475
  650. /package/{esm → dist}/types/__tests__/api-client.test.d.ts +0 -0
  651. /package/{esm → dist}/types/__tests__/api-client.test.d.ts.map +0 -0
  652. /package/{esm → dist}/types/__tests__/web-rtc-client.test.d.ts +0 -0
  653. /package/{esm → dist}/types/__tests__/web-rtc-client.test.d.ts.map +0 -0
  654. /package/{esm → dist}/types/api/agentd.d.ts +0 -0
  655. /package/{esm → dist}/types/api/agentd.d.ts.map +0 -0
  656. /package/{esm → dist}/types/api/amid.d.ts +0 -0
  657. /package/{esm → dist}/types/api/amid.d.ts.map +0 -0
  658. /package/{esm → dist}/types/api/application.d.ts +0 -0
  659. /package/{esm → dist}/types/api/application.d.ts.map +0 -0
  660. /package/{esm → dist}/types/api/auth.d.ts +0 -0
  661. /package/{esm → dist}/types/api/auth.d.ts.map +0 -0
  662. /package/{esm → dist}/types/api/call-logd.d.ts +0 -0
  663. /package/{esm → dist}/types/api/call-logd.d.ts.map +0 -0
  664. /package/{esm → dist}/types/api/calld.d.ts +0 -0
  665. /package/{esm → dist}/types/api/calld.d.ts.map +0 -0
  666. /package/{esm → dist}/types/api/chatd.d.ts +0 -0
  667. /package/{esm → dist}/types/api/chatd.d.ts.map +0 -0
  668. /package/{esm → dist}/types/api/confd.d.ts +0 -0
  669. /package/{esm → dist}/types/api/confd.d.ts.map +0 -0
  670. /package/{esm → dist}/types/api/ctid-ng.d.ts +0 -0
  671. /package/{esm → dist}/types/api/ctid-ng.d.ts.map +0 -0
  672. /package/{esm → dist}/types/api/dird.d.ts +0 -0
  673. /package/{esm → dist}/types/api/dird.d.ts.map +0 -0
  674. /package/{esm → dist}/types/api/webhookd.d.ts +0 -0
  675. /package/{esm → dist}/types/api/webhookd.d.ts.map +0 -0
  676. /package/{esm → dist}/types/checker/Checker.d.ts +0 -0
  677. /package/{esm → dist}/types/checker/Checker.d.ts.map +0 -0
  678. /package/{esm → dist}/types/checker/checks/aor.d.ts +0 -0
  679. /package/{esm → dist}/types/checker/checks/aor.d.ts.map +0 -0
  680. /package/{esm → dist}/types/checker/checks/api.d.ts +0 -0
  681. /package/{esm → dist}/types/checker/checks/api.d.ts.map +0 -0
  682. /package/{esm → dist}/types/checker/checks/ice-ipv4.d.ts +0 -0
  683. /package/{esm → dist}/types/checker/checks/ice-ipv4.d.ts.map +0 -0
  684. /package/{esm → dist}/types/checker/checks/index.d.ts +0 -0
  685. /package/{esm → dist}/types/checker/checks/index.d.ts.map +0 -0
  686. /package/{esm → dist}/types/checker/checks/symmetric-nat.d.ts +0 -0
  687. /package/{esm → dist}/types/checker/checks/symmetric-nat.d.ts.map +0 -0
  688. /package/{esm → dist}/types/checker/checks/wazo-websocket.d.ts +0 -0
  689. /package/{esm → dist}/types/checker/checks/wazo-websocket.d.ts.map +0 -0
  690. /package/{esm → dist}/types/checker/checks/webrtc-transport.d.ts +0 -0
  691. /package/{esm → dist}/types/checker/checks/webrtc-transport.d.ts.map +0 -0
  692. /package/{esm → dist}/types/checker/checks/webrtc.d.ts +0 -0
  693. /package/{esm → dist}/types/checker/checks/webrtc.d.ts.map +0 -0
  694. /package/{esm → dist}/types/domain/AdHocAPIConference.d.ts +0 -0
  695. /package/{esm → dist}/types/domain/AdHocAPIConference.d.ts.map +0 -0
  696. /package/{esm → dist}/types/domain/Agent.d.ts +0 -0
  697. /package/{esm → dist}/types/domain/Agent.d.ts.map +0 -0
  698. /package/{esm → dist}/types/domain/BadResponse.d.ts +0 -0
  699. /package/{esm → dist}/types/domain/BadResponse.d.ts.map +0 -0
  700. /package/{esm → dist}/types/domain/Call.d.ts +0 -0
  701. /package/{esm → dist}/types/domain/Call.d.ts.map +0 -0
  702. /package/{esm → dist}/types/domain/CallLog.d.ts +0 -0
  703. /package/{esm → dist}/types/domain/CallLog.d.ts.map +0 -0
  704. /package/{esm → dist}/types/domain/CallSession.d.ts +0 -0
  705. /package/{esm → dist}/types/domain/CallSession.d.ts.map +0 -0
  706. /package/{esm → dist}/types/domain/CallerID.d.ts +0 -0
  707. /package/{esm → dist}/types/domain/CallerID.d.ts.map +0 -0
  708. /package/{esm → dist}/types/domain/ChatMessage.d.ts +0 -0
  709. /package/{esm → dist}/types/domain/ChatMessage.d.ts.map +0 -0
  710. /package/{esm → dist}/types/domain/ChatRoom.d.ts +0 -0
  711. /package/{esm → dist}/types/domain/ChatRoom.d.ts.map +0 -0
  712. /package/{esm → dist}/types/domain/Country.d.ts +0 -0
  713. /package/{esm → dist}/types/domain/Country.d.ts.map +0 -0
  714. /package/{esm → dist}/types/domain/Device/DebugDevice.d.ts +0 -0
  715. /package/{esm → dist}/types/domain/Device/DebugDevice.d.ts.map +0 -0
  716. /package/{esm → dist}/types/domain/Device/Device.d.ts +0 -0
  717. /package/{esm → dist}/types/domain/Device/Device.d.ts.map +0 -0
  718. /package/{esm → dist}/types/domain/DirectorySource.d.ts +0 -0
  719. /package/{esm → dist}/types/domain/DirectorySource.d.ts.map +0 -0
  720. /package/{esm → dist}/types/domain/ExternalApp.d.ts +0 -0
  721. /package/{esm → dist}/types/domain/ExternalApp.d.ts.map +0 -0
  722. /package/{esm → dist}/types/domain/Features.d.ts +0 -0
  723. /package/{esm → dist}/types/domain/Features.d.ts.map +0 -0
  724. /package/{esm → dist}/types/domain/ForwardOption.d.ts +0 -0
  725. /package/{esm → dist}/types/domain/ForwardOption.d.ts.map +0 -0
  726. /package/{esm → dist}/types/domain/Incall.d.ts +0 -0
  727. /package/{esm → dist}/types/domain/Incall.d.ts.map +0 -0
  728. /package/{esm → dist}/types/domain/IndirectTransfer.d.ts +0 -0
  729. /package/{esm → dist}/types/domain/IndirectTransfer.d.ts.map +0 -0
  730. /package/{esm → dist}/types/domain/Line.d.ts +0 -0
  731. /package/{esm → dist}/types/domain/Line.d.ts.map +0 -0
  732. /package/{esm → dist}/types/domain/Meeting.d.ts +0 -0
  733. /package/{esm → dist}/types/domain/Meeting.d.ts.map +0 -0
  734. /package/{esm → dist}/types/domain/MeetingAuthorization.d.ts +0 -0
  735. /package/{esm → dist}/types/domain/MeetingAuthorization.d.ts.map +0 -0
  736. /package/{esm → dist}/types/domain/MeetingStatus.d.ts +0 -0
  737. /package/{esm → dist}/types/domain/MeetingStatus.d.ts.map +0 -0
  738. /package/{esm → dist}/types/domain/NotificationOptions.d.ts +0 -0
  739. /package/{esm → dist}/types/domain/NotificationOptions.d.ts.map +0 -0
  740. /package/{esm → dist}/types/domain/Phone/CTIPhone.d.ts +0 -0
  741. /package/{esm → dist}/types/domain/Phone/CTIPhone.d.ts.map +0 -0
  742. /package/{esm → dist}/types/domain/Phone/Phone.d.ts +0 -0
  743. /package/{esm → dist}/types/domain/Phone/Phone.d.ts.map +0 -0
  744. /package/{esm → dist}/types/domain/Phone/WebRTCPhone.d.ts +0 -0
  745. /package/{esm → dist}/types/domain/Phone/WebRTCPhone.d.ts.map +0 -0
  746. /package/{esm → dist}/types/domain/Profile.d.ts +0 -0
  747. /package/{esm → dist}/types/domain/Profile.d.ts.map +0 -0
  748. /package/{esm → dist}/types/domain/Recording.d.ts +0 -0
  749. /package/{esm → dist}/types/domain/Recording.d.ts.map +0 -0
  750. /package/{esm → dist}/types/domain/Relocation.d.ts +0 -0
  751. /package/{esm → dist}/types/domain/Relocation.d.ts.map +0 -0
  752. /package/{esm → dist}/types/domain/Room.d.ts +0 -0
  753. /package/{esm → dist}/types/domain/Room.d.ts.map +0 -0
  754. /package/{esm → dist}/types/domain/SFUNotAvailableError.d.ts +0 -0
  755. /package/{esm → dist}/types/domain/SFUNotAvailableError.d.ts.map +0 -0
  756. /package/{esm → dist}/types/domain/ServerError.d.ts +0 -0
  757. /package/{esm → dist}/types/domain/ServerError.d.ts.map +0 -0
  758. /package/{esm → dist}/types/domain/Session.d.ts +0 -0
  759. /package/{esm → dist}/types/domain/Session.d.ts.map +0 -0
  760. /package/{esm → dist}/types/domain/SipLine.d.ts +0 -0
  761. /package/{esm → dist}/types/domain/SipLine.d.ts.map +0 -0
  762. /package/{esm → dist}/types/domain/Subscription.d.ts +0 -0
  763. /package/{esm → dist}/types/domain/Subscription.d.ts.map +0 -0
  764. /package/{esm → dist}/types/domain/SwitchboardCall.d.ts +0 -0
  765. /package/{esm → dist}/types/domain/SwitchboardCall.d.ts.map +0 -0
  766. /package/{esm → dist}/types/domain/Voicemail.d.ts +0 -0
  767. /package/{esm → dist}/types/domain/Voicemail.d.ts.map +0 -0
  768. /package/{esm → dist}/types/domain/__tests__/Agent.test.d.ts +0 -0
  769. /package/{esm → dist}/types/domain/__tests__/Agent.test.d.ts.map +0 -0
  770. /package/{esm → dist}/types/domain/__tests__/Call.test.d.ts +0 -0
  771. /package/{esm → dist}/types/domain/__tests__/Call.test.d.ts.map +0 -0
  772. /package/{esm → dist}/types/domain/__tests__/CallLog.test.d.ts +0 -0
  773. /package/{esm → dist}/types/domain/__tests__/CallLog.test.d.ts.map +0 -0
  774. /package/{esm → dist}/types/domain/__tests__/CallSession.test.d.ts +0 -0
  775. /package/{esm → dist}/types/domain/__tests__/CallSession.test.d.ts.map +0 -0
  776. /package/{esm → dist}/types/domain/__tests__/Contact.test.d.ts +0 -0
  777. /package/{esm → dist}/types/domain/__tests__/Contact.test.d.ts.map +0 -0
  778. /package/{esm → dist}/types/domain/__tests__/IndirectTransfer.test.d.ts +0 -0
  779. /package/{esm → dist}/types/domain/__tests__/IndirectTransfer.test.d.ts.map +0 -0
  780. /package/{esm → dist}/types/domain/__tests__/Line.test.d.ts +0 -0
  781. /package/{esm → dist}/types/domain/__tests__/Line.test.d.ts.map +0 -0
  782. /package/{esm → dist}/types/domain/__tests__/Meeting.test.d.ts +0 -0
  783. /package/{esm → dist}/types/domain/__tests__/Meeting.test.d.ts.map +0 -0
  784. /package/{esm → dist}/types/domain/__tests__/MeetingAuthorization.test.d.ts +0 -0
  785. /package/{esm → dist}/types/domain/__tests__/MeetingAuthorization.test.d.ts.map +0 -0
  786. /package/{esm → dist}/types/domain/__tests__/Profile.test.d.ts +0 -0
  787. /package/{esm → dist}/types/domain/__tests__/Profile.test.d.ts.map +0 -0
  788. /package/{esm → dist}/types/domain/__tests__/Room.test.d.ts +0 -0
  789. /package/{esm → dist}/types/domain/__tests__/Room.test.d.ts.map +0 -0
  790. /package/{esm → dist}/types/domain/__tests__/Session.test.d.ts +0 -0
  791. /package/{esm → dist}/types/domain/__tests__/Session.test.d.ts.map +0 -0
  792. /package/{esm → dist}/types/domain/__tests__/SipLine.test.d.ts +0 -0
  793. /package/{esm → dist}/types/domain/__tests__/SipLine.test.d.ts.map +0 -0
  794. /package/{esm → dist}/types/domain/__tests__/Voicemail.test.d.ts +0 -0
  795. /package/{esm → dist}/types/domain/__tests__/Voicemail.test.d.ts.map +0 -0
  796. /package/{esm → dist}/types/domain/types.d.ts +0 -0
  797. /package/{esm → dist}/types/domain/types.d.ts.map +0 -0
  798. /package/{esm → dist}/types/lib/WazoSessionDescriptionHandler.d.ts +0 -0
  799. /package/{esm → dist}/types/lib/WazoSessionDescriptionHandler.d.ts.map +0 -0
  800. /package/{esm → dist}/types/pubkey.d.ts +0 -0
  801. /package/{esm → dist}/types/pubkey.d.ts.map +0 -0
  802. /package/{esm → dist}/types/service/CallApi.d.ts +0 -0
  803. /package/{esm → dist}/types/service/CallApi.d.ts.map +0 -0
  804. /package/{esm → dist}/types/service/IssueReporter.d.ts +0 -0
  805. /package/{esm → dist}/types/service/IssueReporter.d.ts.map +0 -0
  806. /package/{esm → dist}/types/service/__tests__/IssueReporter.test.d.ts +0 -0
  807. /package/{esm → dist}/types/service/__tests__/IssueReporter.test.d.ts.map +0 -0
  808. /package/{esm → dist}/types/simple/Auth.d.ts +0 -0
  809. /package/{esm → dist}/types/simple/Auth.d.ts.map +0 -0
  810. /package/{esm → dist}/types/simple/Configuration.d.ts +0 -0
  811. /package/{esm → dist}/types/simple/Configuration.d.ts.map +0 -0
  812. /package/{esm → dist}/types/simple/Directory.d.ts +0 -0
  813. /package/{esm → dist}/types/simple/Directory.d.ts.map +0 -0
  814. /package/{esm → dist}/types/simple/Phone.d.ts +0 -0
  815. /package/{esm → dist}/types/simple/Phone.d.ts.map +0 -0
  816. /package/{esm → dist}/types/simple/Websocket.d.ts +0 -0
  817. /package/{esm → dist}/types/simple/Websocket.d.ts.map +0 -0
  818. /package/{esm → dist}/types/simple/__tests__/Auth.test.d.ts +0 -0
  819. /package/{esm → dist}/types/simple/__tests__/Auth.test.d.ts.map +0 -0
  820. /package/{esm → dist}/types/simple/index.d.ts.map +0 -0
  821. /package/{esm → dist}/types/simple/room/LocalParticipant.d.ts +0 -0
  822. /package/{esm → dist}/types/simple/room/LocalParticipant.d.ts.map +0 -0
  823. /package/{esm → dist}/types/simple/room/Participant.d.ts +0 -0
  824. /package/{esm → dist}/types/simple/room/Participant.d.ts.map +0 -0
  825. /package/{esm → dist}/types/simple/room/RemoteParticipant.d.ts +0 -0
  826. /package/{esm → dist}/types/simple/room/RemoteParticipant.d.ts.map +0 -0
  827. /package/{esm → dist}/types/simple/room/Room.d.ts +0 -0
  828. /package/{esm → dist}/types/simple/room/Room.d.ts.map +0 -0
  829. /package/{esm → dist}/types/simple/room/SipRoom.d.ts +0 -0
  830. /package/{esm → dist}/types/simple/room/SipRoom.d.ts.map +0 -0
  831. /package/{esm → dist}/types/simple/room/Stream.d.ts +0 -0
  832. /package/{esm → dist}/types/simple/room/Stream.d.ts.map +0 -0
  833. /package/{esm → dist}/types/simple/room/__tests__/Participant.test.d.ts +0 -0
  834. /package/{esm → dist}/types/simple/room/__tests__/Participant.test.d.ts.map +0 -0
  835. /package/{esm → dist}/types/simple/room/__tests__/RemoteParticipant.test.d.ts +0 -0
  836. /package/{esm → dist}/types/simple/room/__tests__/RemoteParticipant.test.d.ts.map +0 -0
  837. /package/{esm → dist}/types/simple/utils.d.ts +0 -0
  838. /package/{esm → dist}/types/simple/utils.d.ts.map +0 -0
  839. /package/{esm → dist}/types/types/WebSocketMessage.d.ts +0 -0
  840. /package/{esm → dist}/types/types/WebSocketMessage.d.ts.map +0 -0
  841. /package/{esm → dist}/types/utils/Emitter.d.ts +0 -0
  842. /package/{esm → dist}/types/utils/Emitter.d.ts.map +0 -0
  843. /package/{esm → dist}/types/utils/Heartbeat.d.ts +0 -0
  844. /package/{esm → dist}/types/utils/Heartbeat.d.ts.map +0 -0
  845. /package/{esm → dist}/types/utils/PhoneNumberUtil.d.ts +0 -0
  846. /package/{esm → dist}/types/utils/PhoneNumberUtil.d.ts.map +0 -0
  847. /package/{esm → dist}/types/utils/__tests__/Heartbeat.test.d.ts +0 -0
  848. /package/{esm → dist}/types/utils/__tests__/Heartbeat.test.d.ts.map +0 -0
  849. /package/{esm → dist}/types/utils/__tests__/PhoneNumberUtil.test.d.ts +0 -0
  850. /package/{esm → dist}/types/utils/__tests__/PhoneNumberUtil.test.d.ts.map +0 -0
  851. /package/{esm → dist}/types/utils/__tests__/api-requester.test.d.ts +0 -0
  852. /package/{esm → dist}/types/utils/__tests__/api-requester.test.d.ts.map +0 -0
  853. /package/{esm → dist}/types/utils/__tests__/array.test.d.ts +0 -0
  854. /package/{esm → dist}/types/utils/__tests__/array.test.d.ts.map +0 -0
  855. /package/{esm → dist}/types/utils/__tests__/compare-version.test.d.ts +0 -0
  856. /package/{esm → dist}/types/utils/__tests__/compare-version.test.d.ts.map +0 -0
  857. /package/{esm → dist}/types/utils/__tests__/object.test.d.ts +0 -0
  858. /package/{esm → dist}/types/utils/__tests__/object.test.d.ts.map +0 -0
  859. /package/{esm → dist}/types/utils/__tests__/sdp.test.d.ts +0 -0
  860. /package/{esm → dist}/types/utils/__tests__/sdp.test.d.ts.map +0 -0
  861. /package/{esm → dist}/types/utils/__tests__/string.test.d.ts +0 -0
  862. /package/{esm → dist}/types/utils/__tests__/string.test.d.ts.map +0 -0
  863. /package/{esm → dist}/types/utils/api-requester.d.ts +0 -0
  864. /package/{esm → dist}/types/utils/array.d.ts +0 -0
  865. /package/{esm → dist}/types/utils/array.d.ts.map +0 -0
  866. /package/{esm → dist}/types/utils/compare-version.d.ts +0 -0
  867. /package/{esm → dist}/types/utils/compare-version.d.ts.map +0 -0
  868. /package/{esm → dist}/types/utils/isMobile.d.ts +0 -0
  869. /package/{esm → dist}/types/utils/isMobile.d.ts.map +0 -0
  870. /package/{esm → dist}/types/utils/new-from.d.ts +0 -0
  871. /package/{esm → dist}/types/utils/new-from.d.ts.map +0 -0
  872. /package/{esm → dist}/types/utils/object.d.ts +0 -0
  873. /package/{esm → dist}/types/utils/object.d.ts.map +0 -0
  874. /package/{esm → dist}/types/utils/once.d.ts +0 -0
  875. /package/{esm → dist}/types/utils/once.d.ts.map +0 -0
  876. /package/{esm → dist}/types/utils/sdp.d.ts +0 -0
  877. /package/{esm → dist}/types/utils/sdp.d.ts.map +0 -0
  878. /package/{esm → dist}/types/utils/string.d.ts +0 -0
  879. /package/{esm → dist}/types/utils/string.d.ts.map +0 -0
  880. /package/{esm → dist}/types/utils/update-from.d.ts +0 -0
  881. /package/{esm → dist}/types/utils/update-from.d.ts.map +0 -0
  882. /package/{esm → dist}/types/utils/webrtc.d.ts +0 -0
  883. /package/{esm → dist}/types/utils/webrtc.d.ts.map +0 -0
  884. /package/{esm → dist}/types/web-rtc-client.d.ts +0 -0
  885. /package/{esm → dist}/types/web-rtc-client.d.ts.map +0 -0
  886. /package/{esm → dist}/types/websocket-client.d.ts +0 -0
  887. /package/{esm → dist}/types/websocket-client.d.ts.map +0 -0
@@ -1,54 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- /* global MediaStream */
16
- const web_rtc_client_1 = __importDefault(require("../../web-rtc-client"));
17
- exports.default = {
18
- name: 'WebRTC',
19
- check: (server, session) => new Promise((resolve, reject) => {
20
- if (typeof MediaStream === 'undefined') {
21
- return resolve('Skipped on node');
22
- }
23
- const [host, port = 443] = server.split(':');
24
- const client = new web_rtc_client_1.default({
25
- host,
26
- port,
27
- media: {
28
- audio: true,
29
- },
30
- }, session);
31
- const handleError = (message) => {
32
- client.close();
33
- reject(new Error(message));
34
- };
35
- const handleSuccess = () => __awaiter(void 0, void 0, void 0, function* () {
36
- client.stopHeartbeat();
37
- yield client.close();
38
- resolve();
39
- });
40
- client.on(client.TRANSPORT_ERROR, error => {
41
- handleError(`Transport error : ${error}`);
42
- });
43
- client.on(client.REGISTERED, () => {
44
- const sipSession = client.call('*10');
45
- if (!sipSession || !client.getSipSessionId(sipSession)) {
46
- return handleError('Unable to make call through WebRTC');
47
- }
48
- setTimeout(() => {
49
- client.hangup(sipSession);
50
- handleSuccess();
51
- }, 1000);
52
- });
53
- }),
54
- };
@@ -1,101 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- const getApiClient_1 = __importDefault(require("../service/getApiClient"));
16
- class AdHocAPIConference {
17
- constructor({ phone, host, participants, started, finished, answerTime, conferenceId, muted, paused, }) {
18
- this.phone = phone;
19
- this.host = host;
20
- this.participants = participants || {};
21
- this.started = started || false;
22
- this.finished = finished || false;
23
- this.answerTime = answerTime;
24
- this.conferenceId = conferenceId || '';
25
- this.muted = muted || false;
26
- this.paused = paused || false;
27
- if (this.host) {
28
- this.host.setIsConference(true);
29
- }
30
- }
31
- start() {
32
- return __awaiter(this, void 0, void 0, function* () {
33
- this.started = true;
34
- // @ts-ignore: date / number
35
- this.answerTime = Object.values(this.participants).length ? Object.values(this.participants)[0].answerTime : null;
36
- const participantIds = Object.keys(this.participants);
37
- const conference = yield (0, getApiClient_1.default)().calld.createAdHocConference(this.host.callId, participantIds);
38
- this.conferenceId = conference.conference_id;
39
- return this;
40
- });
41
- }
42
- getParticipants() {
43
- return Object.values(this.participants);
44
- }
45
- addParticipant(newParticipant) {
46
- return __awaiter(this, void 0, void 0, function* () {
47
- const participantCallId = newParticipant.getTalkingToIds()[0];
48
- const participants = Object.assign(Object.assign({}, this.participants), { [participantCallId]: newParticipant });
49
- yield (0, getApiClient_1.default)().calld.addAdHocConferenceParticipant(this.conferenceId, participantCallId);
50
- return new AdHocAPIConference(Object.assign(Object.assign({}, this), { participants }));
51
- });
52
- }
53
- participantHasLeft(leaver) {
54
- delete this.participants[leaver.getId()];
55
- return new AdHocAPIConference(Object.assign(Object.assign({}, this), { participants: this.participants }));
56
- }
57
- hasParticipants() {
58
- return Object.keys(this.participants).length > 0;
59
- }
60
- mute() {
61
- this.muted = true;
62
- this.phone.mute(this.host);
63
- return new AdHocAPIConference(Object.assign({}, this));
64
- }
65
- unmute() {
66
- this.muted = false;
67
- this.phone.unmute(this.host);
68
- return new AdHocAPIConference(Object.assign({}, this));
69
- }
70
- hold() {
71
- this.paused = true;
72
- this.phone.hold(this.host);
73
- return new AdHocAPIConference(Object.assign({}, this));
74
- }
75
- resume() {
76
- this.paused = false;
77
- this.phone.resume(this.host);
78
- return new AdHocAPIConference(Object.assign({}, this));
79
- }
80
- isOnHold() {
81
- return this.paused;
82
- }
83
- isMuted() {
84
- return this.muted;
85
- }
86
- hangup() {
87
- return __awaiter(this, void 0, void 0, function* () {
88
- yield (0, getApiClient_1.default)().calld.deleteAdHocConference(this.conferenceId);
89
- return new AdHocAPIConference(Object.assign(Object.assign({}, this), { finished: true, participant: [] }));
90
- });
91
- }
92
- removeParticipant(participantToRemove) {
93
- return __awaiter(this, void 0, void 0, function* () {
94
- const callId = participantToRemove.getTalkingToIds()[0];
95
- delete this.participants[callId];
96
- yield (0, getApiClient_1.default)().calld.removeAdHocConferenceParticipant(this.conferenceId, callId);
97
- return new AdHocAPIConference(Object.assign(Object.assign({}, this), { participants: this.participants }));
98
- });
99
- }
100
- }
101
- exports.default = AdHocAPIConference;
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- class Agent {
4
- static parse(plain) {
5
- return new Agent({
6
- context: plain.context,
7
- extension: plain.extension,
8
- id: plain.id,
9
- logged: plain.logged,
10
- number: plain.number,
11
- paused: plain.paused,
12
- pausedReason: plain.paused_reason,
13
- });
14
- }
15
- constructor({ context, extension, id, logged, number, paused, pausedReason, }) {
16
- this.context = context;
17
- this.extension = extension;
18
- this.id = id;
19
- this.logged = logged;
20
- this.number = number;
21
- this.paused = paused;
22
- this.pausedReason = pausedReason;
23
- }
24
- }
25
- exports.default = Agent;
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- class BadResponse extends Error {
4
- static fromResponse(error, status) {
5
- return new BadResponse(error.message || JSON.stringify(error), status, error.timestamp, error.error_id, error.details, error);
6
- }
7
- static fromText(response, status) {
8
- return new BadResponse(response, status);
9
- }
10
- constructor(message, status, timestamp = null, errorId = null, details = null, error = null) {
11
- super(message);
12
- this.timestamp = timestamp;
13
- this.status = status;
14
- this.errorId = errorId;
15
- this.details = details;
16
- this.error = error;
17
- }
18
- }
19
- exports.default = BadResponse;
@@ -1,112 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const moment_1 = __importDefault(require("moment"));
7
- const new_from_1 = __importDefault(require("../utils/new-from"));
8
- const RECORD_STATE_ACTIVE = 'active';
9
- class Call {
10
- static parseMany(plain) {
11
- if (!plain) {
12
- return [];
13
- }
14
- return plain.map((plainCall) => Call.parse(plainCall));
15
- }
16
- static parse(plain) {
17
- return new Call({
18
- id: plain.call_id,
19
- sipCallId: plain.sip_call_id,
20
- callerName: plain.caller_id_name,
21
- callerNumber: plain.caller_id_number,
22
- calleeName: plain.peer_caller_id_name,
23
- calleeNumber: plain.peer_caller_id_number,
24
- dialedExtension: plain.dialed_extension,
25
- isCaller: plain.is_caller,
26
- isVideo: plain.is_video,
27
- muted: plain.muted,
28
- onHold: plain.on_hold,
29
- status: plain.status,
30
- lineId: plain.line_id,
31
- startingTime: (0, moment_1.default)(plain.creation_time).toDate(),
32
- talkingToIds: Object.keys(plain.talking_to || {}),
33
- recording: plain.record_state === RECORD_STATE_ACTIVE,
34
- });
35
- }
36
- static newFrom(call) {
37
- return (0, new_from_1.default)(call, Call);
38
- }
39
- constructor({ id, sipCallId, callerName, callerNumber, calleeName, calleeNumber, dialedExtension, isCaller, isVideo, lineId, muted, onHold, status, startingTime, talkingToIds, recording, }) {
40
- this.id = id;
41
- this.sipCallId = sipCallId;
42
- this.callerName = callerName;
43
- this.callerNumber = callerNumber;
44
- this.calleeName = calleeName;
45
- this.calleeNumber = calleeNumber;
46
- this.dialedExtension = dialedExtension;
47
- this.muted = muted;
48
- this.onHold = onHold;
49
- this.isCaller = isCaller;
50
- this.lineId = lineId;
51
- this.status = status;
52
- this.startingTime = startingTime;
53
- this.talkingToIds = talkingToIds || [];
54
- this.recording = recording;
55
- this.isVideo = !!isVideo;
56
- // Useful to compare instead of instanceof with minified code
57
- this.type = 'Call';
58
- }
59
- getElapsedTimeInSeconds() {
60
- const now = Date.now();
61
- return (now - +this.startingTime) / 1000;
62
- }
63
- separateCalleeName() {
64
- const names = this.calleeName.split(' ');
65
- const firstName = names[0];
66
- const lastName = names.slice(1).join(' ');
67
- return {
68
- firstName,
69
- lastName,
70
- };
71
- }
72
- is(other) {
73
- return !!other && this.id === other.id;
74
- }
75
- hasACalleeName() {
76
- return this.calleeName.length > 0;
77
- }
78
- hasNumber(number) {
79
- return this.calleeNumber === number;
80
- }
81
- isUp() {
82
- return this.status === 'Up';
83
- }
84
- isDown() {
85
- return this.status === 'Down';
86
- }
87
- isRinging() {
88
- return this.isRingingIncoming() || this.isRingingOutgoing();
89
- }
90
- isRingingIncoming() {
91
- return this.status === 'Ringing';
92
- }
93
- isRingingOutgoing() {
94
- return this.status === 'Ring';
95
- }
96
- isFromTransfer() {
97
- return this.status === 'Down' || this.status === 'Ringing';
98
- }
99
- isOnHold() {
100
- return this.onHold;
101
- }
102
- putOnHold() {
103
- this.onHold = true;
104
- }
105
- resume() {
106
- this.onHold = false;
107
- }
108
- isRecording() {
109
- return this.recording;
110
- }
111
- }
112
- exports.default = Call;
@@ -1,151 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.CALL_LOG_VALID_REQUESTED_VERSION = void 0;
7
- const moment_1 = __importDefault(require("moment"));
8
- const new_from_1 = __importDefault(require("../utils/new-from"));
9
- const Recording_1 = __importDefault(require("./Recording"));
10
- // note: 24.14 fixes requested (first contact reached) and destination (last contact reached)
11
- exports.CALL_LOG_VALID_REQUESTED_VERSION = '24.14';
12
- class CallLog {
13
- static merge(current, toMerge) {
14
- const onlyUnique = (value, index, self) => self.indexOf(value) === index;
15
- const allLogs = current.concat(toMerge);
16
- const onlyUniqueIds = allLogs.map(c => c.id).filter(onlyUnique);
17
- return onlyUniqueIds.map(id => allLogs.find(log => log && log.id === id));
18
- }
19
- static parseMany(plain) {
20
- if (!plain || !plain.items) {
21
- return [];
22
- }
23
- return plain.items.map(item => CallLog.parse(item));
24
- }
25
- static parse(plain) {
26
- return new CallLog({
27
- answer: plain.answer ? (0, moment_1.default)(plain.answer).toDate() : null,
28
- answered: plain.answered,
29
- callDirection: plain.call_direction,
30
- destination: {
31
- // @TEMP: Temporarily assuming empty numbers are meetings
32
- // which is admittedly a very dangerous assumption. Did i mention it was temporary?
33
- uuid: plain.destination_user_uuid,
34
- name: plain.requested_name || plain.destination_name || '',
35
- extension: plain.requested_extension || plain.destination_extension || `meeting-${plain.requested_name || plain.destination_name || ''}`,
36
- plainExtension: plain.destination_extension,
37
- plainName: plain.destination_name,
38
- },
39
- requested: {
40
- uuid: plain.requested_user_uuid,
41
- name: plain.requested_name || '',
42
- extension: plain.requested_extension,
43
- },
44
- source: {
45
- uuid: plain.source_user_uuid,
46
- name: plain.source_name,
47
- extension: plain.source_extension,
48
- },
49
- id: plain.id,
50
- duration: (plain.duration || 0) * 1000,
51
- // duration is in seconds
52
- start: (0, moment_1.default)(plain.start).toDate(),
53
- end: plain.end ? (0, moment_1.default)(plain.end).toDate() : null,
54
- recordings: Recording_1.default.parseMany(plain.recordings || []),
55
- });
56
- }
57
- static parseNew(plain, session) {
58
- const callLog = CallLog.parse(plain);
59
- callLog.newMissedCall = session && plain.destination_user_uuid === session.uuid && !plain.answered;
60
- return callLog;
61
- }
62
- static newFrom(profile) {
63
- return (0, new_from_1.default)(profile, CallLog);
64
- }
65
- constructor({ answer, answered, callDirection, destination, requested, source, id, duration, start, end, recordings, }) {
66
- this.answer = answer;
67
- this.answered = answered;
68
- this.callDirection = callDirection;
69
- this.destination = destination;
70
- this.requested = requested;
71
- this.source = source;
72
- this.id = id;
73
- this.duration = duration;
74
- this.start = start;
75
- this.end = end;
76
- this.recordings = recordings || [];
77
- // Useful to compare instead of instanceof with minified code
78
- this.type = 'CallLog';
79
- }
80
- isFromSameParty(other, session) {
81
- return this.theOtherParty(session).extension === other.theOtherParty(session).extension;
82
- }
83
- theOtherParty(session) {
84
- if (this.callDirection === 'inbound') {
85
- return this.source;
86
- }
87
- if (this.callDirection === 'outbound') {
88
- return this.destination;
89
- }
90
- return (session === null || session === void 0 ? void 0 : session.hasExtension(this.source.extension)) ? this.destination : this.source;
91
- }
92
- isNewMissedCall() {
93
- return this.newMissedCall;
94
- }
95
- acknowledgeCall() {
96
- this.newMissedCall = false;
97
- return this;
98
- }
99
- isAcknowledged() {
100
- return this.newMissedCall;
101
- }
102
- isAnswered() {
103
- return this.answered;
104
- }
105
- isOutgoing(session) {
106
- if (this.callDirection === 'internal') {
107
- return session.hasExtension(this.source.extension);
108
- }
109
- return this.callDirection === 'outbound';
110
- }
111
- isIncoming(session) {
112
- if (this.callDirection === 'internal') {
113
- return session.hasExtension(this.destination.plainExtension)
114
- || session.hasExtension(this.requested.extension)
115
- || session.uuid === this.destination.uuid
116
- || session.uuid === this.requested.uuid;
117
- }
118
- return this.callDirection === 'inbound';
119
- }
120
- // Example of call flow: User A => User B (No anwser forward) => User C or external number
121
- isIncomingAndForwarded(session) {
122
- if (!session.hasEngineVersionGte(exports.CALL_LOG_VALID_REQUESTED_VERSION) || !this.isIncoming(session)) {
123
- return false;
124
- }
125
- return this.requested.extension !== this.destination.plainExtension;
126
- }
127
- isAnOutgoingCall(session) {
128
- console.warn(`@wazo/sdk
129
- CallLog.isAnOutgoingcall(session) method is obsolete.
130
- Please use CallLog.isOutgoing(session).
131
- `);
132
- return session.hasExtension(this.source.extension) && this.answered;
133
- }
134
- isAMissedOutgoingCall(session) {
135
- return session.hasExtension(this.source.extension) && !this.answered;
136
- }
137
- isAnIncomingCall(session) {
138
- console.warn(`@wazo/sdk
139
- CallLog.isAnIncomingCall(session) method is obsolete.
140
- Please use CallLog.isIncoming(session).
141
- `);
142
- return session.hasExtension(this.destination.extension) && this.answered;
143
- }
144
- isADeclinedCall(session) {
145
- return !this.answered && session.hasExtension(this.destination.extension);
146
- }
147
- getRecordings() {
148
- return this.recordings;
149
- }
150
- }
151
- exports.default = CallLog;
@@ -1,224 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const session_state_1 = require("sip.js/lib/api/session-state");
7
- const new_from_1 = __importDefault(require("../utils/new-from"));
8
- const update_from_1 = __importDefault(require("../utils/update-from"));
9
- class CallSession {
10
- constructor({ answered, answeredBySystem, isCaller, displayName, callId, muted, videoMuted, number, paused, ringing, startTime, creationTime, endTime, cameraEnabled, dialedExtension, sipCallId, sipStatus, callerNumber, call, autoAnswer, ignored, screensharing, recording, recordingPaused, videoRemotelyDowngraded, sipSession, answerTime, conference, }) {
11
- this.callId = callId;
12
- this.sipCallId = sipCallId;
13
- this.displayName = displayName;
14
- this.number = number;
15
- this.creationTime = creationTime;
16
- this.startTime = startTime;
17
- this.endTime = endTime;
18
- this.isCaller = isCaller;
19
- this.answered = answered;
20
- this.answeredBySystem = answeredBySystem;
21
- this.ringing = ringing;
22
- this.paused = paused;
23
- this.muted = muted;
24
- this.videoMuted = videoMuted;
25
- this.callerNumber = callerNumber;
26
- this.cameraEnabled = cameraEnabled;
27
- this.dialedExtension = dialedExtension || '';
28
- this.call = call;
29
- this.sipStatus = sipStatus;
30
- this.autoAnswer = autoAnswer || false;
31
- this.ignored = ignored || false;
32
- this.screensharing = screensharing || false;
33
- this.recording = recording || false;
34
- this.recordingPaused = recordingPaused || false;
35
- this.videoRemotelyDowngraded = videoRemotelyDowngraded;
36
- this.sipSession = sipSession;
37
- this.answerTime = answerTime || this.answerTime;
38
- this.conference = conference;
39
- // Useful to compare instead of instanceof with minified code
40
- this.type = 'CallSession';
41
- }
42
- resume() {
43
- this.paused = false;
44
- }
45
- hold() {
46
- this.paused = true;
47
- }
48
- mute() {
49
- this.muted = true;
50
- }
51
- unmute() {
52
- this.muted = false;
53
- }
54
- muteVideo() {
55
- this.videoMuted = true;
56
- }
57
- unmuteVideo() {
58
- this.videoMuted = false;
59
- }
60
- answer() {
61
- this.answerTime = new Date();
62
- }
63
- systemAnswer() {
64
- this.answeredBySystem = true;
65
- }
66
- enableCamera() {
67
- this.cameraEnabled = true;
68
- }
69
- disableCamera() {
70
- this.cameraEnabled = false;
71
- }
72
- ignore() {
73
- this.ignored = true;
74
- }
75
- startScreenSharing() {
76
- this.screensharing = true;
77
- }
78
- stopScreenSharing() {
79
- this.screensharing = false;
80
- }
81
- setIsConference(conference) {
82
- this.conference = conference;
83
- }
84
- isIncoming() {
85
- return !this.isCaller && !this.answered;
86
- }
87
- isOutgoing() {
88
- return this.isCaller && !this.answered;
89
- }
90
- isActive() {
91
- return this.answered || this.isOutgoing();
92
- }
93
- isAnswered() {
94
- return this.answered;
95
- }
96
- isAnsweredBySystem() {
97
- return this.answeredBySystem;
98
- }
99
- isRinging() {
100
- return this.ringing;
101
- }
102
- isOnHold() {
103
- return this.paused;
104
- }
105
- isMuted() {
106
- return this.muted;
107
- }
108
- isVideoMuted() {
109
- return this.videoMuted;
110
- }
111
- isCameraEnabled() {
112
- return this.cameraEnabled;
113
- }
114
- isIgnored() {
115
- return this.ignored;
116
- }
117
- isScreenSharing() {
118
- return this.screensharing;
119
- }
120
- isRecording() {
121
- return this.recording;
122
- }
123
- recordingIsPaused() {
124
- return this.recordingPaused;
125
- }
126
- hasAnInitialInterceptionNumber() {
127
- return this.number.startsWith('*8');
128
- }
129
- isAnInterception() {
130
- return this.dialedExtension.startsWith('*8');
131
- }
132
- isEstablished() {
133
- return this.sipStatus === session_state_1.SessionState.Established;
134
- }
135
- isTerminating() {
136
- return this.sipStatus === session_state_1.SessionState.Terminating;
137
- }
138
- isTerminated() {
139
- return this.sipStatus === session_state_1.SessionState.Terminated;
140
- }
141
- isConference() {
142
- return this.conference;
143
- }
144
- getElapsedTimeInSeconds() {
145
- if (!this.startTime) {
146
- return 0;
147
- }
148
- return (Date.now() - this.startTime) / 1000;
149
- }
150
- getId() {
151
- return this.sipCallId || this.callId;
152
- }
153
- is(callSession) {
154
- if (!callSession) {
155
- return false;
156
- }
157
- return this.isId(callSession.sipCallId) || this.isId(callSession.callId);
158
- }
159
- isId(id) {
160
- return this.getId() === id || (!!this.sipCallId && this.sipCallId === id) || (!!this.callId && this.callId === id);
161
- }
162
- updateFrom(session) {
163
- (0, update_from_1.default)(this, session);
164
- }
165
- separateDisplayName() {
166
- const names = this.displayName.split(' ');
167
- const firstName = names[0];
168
- const lastName = names.slice(1).join(' ');
169
- return {
170
- firstName,
171
- lastName,
172
- };
173
- }
174
- getTalkingToIds() {
175
- return this.call ? this.call.talkingToIds : [];
176
- }
177
- setVideoRemotelyDowngraded(value) {
178
- this.videoRemotelyDowngraded = value;
179
- }
180
- isVideoRemotelyDowngraded() {
181
- return this.videoRemotelyDowngraded;
182
- }
183
- static newFrom(callSession) {
184
- return (0, new_from_1.default)(callSession, CallSession);
185
- }
186
- // Retro-compatibility: `answered` was a boolean before. We can reproduce the behaviour with a getter/setter
187
- set answered(value) {
188
- this.answerTime = value ? this.answerTime || new Date() : null;
189
- }
190
- get answered() {
191
- return !!this.answerTime;
192
- }
193
- toJSON() {
194
- const jsonObj = Object.assign({}, this);
195
- jsonObj.answered = this.answered;
196
- return jsonObj;
197
- }
198
- static parseCall(call) {
199
- return new CallSession({
200
- callId: call.id,
201
- sipCallId: call.sipCallId,
202
- displayName: call.calleeName || call.calleeNumber,
203
- number: call.calleeNumber,
204
- callerNumber: call.callerNumber,
205
- startTime: +call.startingTime,
206
- paused: call.isOnHold(),
207
- isCaller: call.isCaller,
208
- muted: call.muted,
209
- videoMuted: false,
210
- screensharing: false,
211
- recording: call.isRecording(),
212
- recordingPaused: false,
213
- // @TODO
214
- ringing: call.isRinging(),
215
- answered: call.isUp(),
216
- answeredBySystem: call.isUp() && call.talkingToIds.length === 0,
217
- cameraEnabled: call.isVideo,
218
- dialedExtension: call.dialedExtension,
219
- call,
220
- conference: false, // @FIXME?
221
- });
222
- }
223
- }
224
- exports.default = CallSession;