ue-softphone-sdk 2.2.2 → 2.2.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 (390) hide show
  1. package/dist/api/bye.d.ts +16 -0
  2. package/dist/api/dtmf.d.ts +15 -0
  3. package/dist/api/emitter.d.ts +88 -0
  4. package/dist/api/exceptions/content-type-unsupported.d.ts +8 -0
  5. package/dist/api/exceptions/index.d.ts +5 -0
  6. package/dist/api/exceptions/request-pending.d.ts +9 -0
  7. package/dist/api/exceptions/session-description-handler.d.ts +8 -0
  8. package/dist/api/exceptions/session-terminated.d.ts +8 -0
  9. package/dist/api/exceptions/state-transition.d.ts +8 -0
  10. package/dist/api/index.d.ts +58 -0
  11. package/dist/api/info.d.ts +16 -0
  12. package/dist/api/invitation-accept-options.d.ts +19 -0
  13. package/dist/api/invitation-progress-options.d.ts +38 -0
  14. package/dist/api/invitation-reject-options.d.ts +25 -0
  15. package/dist/api/invitation.d.ts +179 -0
  16. package/dist/api/inviter-cancel-options.d.ts +9 -0
  17. package/dist/api/inviter-invite-options.d.ts +28 -0
  18. package/dist/api/inviter-options.d.ts +43 -0
  19. package/dist/api/inviter.d.ts +236 -0
  20. package/dist/api/message.d.ts +16 -0
  21. package/dist/api/messager-message-options.d.ts +11 -0
  22. package/dist/api/messager-options.d.ts +17 -0
  23. package/dist/api/messager.d.ts +26 -0
  24. package/dist/api/notification.d.ts +16 -0
  25. package/dist/api/notifier.d.ts +8 -0
  26. package/dist/api/publisher-options.d.ts +33 -0
  27. package/dist/api/publisher-publish-options.d.ts +6 -0
  28. package/dist/api/publisher-state.d.ts +21 -0
  29. package/dist/api/publisher-unpublish-options.d.ts +6 -0
  30. package/dist/api/publisher.d.ts +65 -0
  31. package/dist/api/referral.d.ts +38 -0
  32. package/dist/api/registerer-options.d.ts +46 -0
  33. package/dist/api/registerer-register-options.d.ts +11 -0
  34. package/dist/api/registerer-state.d.ts +21 -0
  35. package/dist/api/registerer-unregister-options.d.ts +16 -0
  36. package/dist/api/registerer.d.ts +144 -0
  37. package/dist/api/session-bye-options.d.ts +11 -0
  38. package/dist/api/session-delegate.d.ts +73 -0
  39. package/dist/api/session-description-handler-factory.d.ts +15 -0
  40. package/dist/api/session-description-handler.d.ts +74 -0
  41. package/dist/api/session-info-options.d.ts +11 -0
  42. package/dist/api/session-invite-options.d.ts +28 -0
  43. package/dist/api/session-message-options.d.ts +11 -0
  44. package/dist/api/session-options.d.ts +8 -0
  45. package/dist/api/session-refer-options.d.ts +14 -0
  46. package/dist/api/session-state.d.ts +45 -0
  47. package/dist/api/session.d.ts +359 -0
  48. package/dist/api/subscriber-options.d.ts +11 -0
  49. package/dist/api/subscriber-subscribe-options.d.ts +6 -0
  50. package/dist/api/subscriber.d.ts +94 -0
  51. package/dist/api/subscription-delegate.d.ts +12 -0
  52. package/dist/api/subscription-options.d.ts +8 -0
  53. package/dist/api/subscription-state.d.ts +19 -0
  54. package/dist/api/subscription-subscribe-options.d.ts +6 -0
  55. package/dist/api/subscription-unsubscribe-options.d.ts +6 -0
  56. package/dist/api/subscription.d.ts +84 -0
  57. package/dist/api/transport-state.d.ts +37 -0
  58. package/dist/api/transport.d.ts +159 -0
  59. package/dist/api/user-agent-delegate.d.ts +84 -0
  60. package/dist/api/user-agent-options.d.ts +253 -0
  61. package/dist/api/user-agent-state.d.ts +14 -0
  62. package/dist/api/user-agent.d.ts +200 -0
  63. package/dist/core/dialogs/dialog-state.d.ts +34 -0
  64. package/dist/core/dialogs/dialog.d.ts +161 -0
  65. package/dist/core/dialogs/index.d.ts +4 -0
  66. package/dist/core/dialogs/session-dialog.d.ts +196 -0
  67. package/dist/core/dialogs/subscription-dialog.d.ts +120 -0
  68. package/dist/core/exceptions/exception.d.ts +8 -0
  69. package/dist/core/exceptions/index.d.ts +3 -0
  70. package/dist/core/exceptions/transaction-state-error.d.ts +8 -0
  71. package/dist/core/exceptions/transport-error.d.ts +8 -0
  72. package/dist/core/index.d.ts +15 -0
  73. package/dist/core/log/index.d.ts +3 -0
  74. package/dist/core/log/levels.d.ts +10 -0
  75. package/dist/core/log/logger-factory.d.ts +21 -0
  76. package/dist/core/log/logger.d.ts +19 -0
  77. package/dist/core/messages/body.d.ts +64 -0
  78. package/dist/core/messages/digest-authentication.d.ts +51 -0
  79. package/dist/core/messages/incoming-message.d.ts +79 -0
  80. package/dist/core/messages/incoming-request-message.d.ts +10 -0
  81. package/dist/core/messages/incoming-request.d.ts +67 -0
  82. package/dist/core/messages/incoming-response-message.d.ts +10 -0
  83. package/dist/core/messages/incoming-response.d.ts +12 -0
  84. package/dist/core/messages/index.d.ts +13 -0
  85. package/dist/core/messages/md5.d.ts +32 -0
  86. package/dist/core/messages/methods/ack.d.ts +18 -0
  87. package/dist/core/messages/methods/bye.d.ts +21 -0
  88. package/dist/core/messages/methods/cancel.d.ts +21 -0
  89. package/dist/core/messages/methods/constants.d.ts +20 -0
  90. package/dist/core/messages/methods/index.d.ts +13 -0
  91. package/dist/core/messages/methods/info.d.ts +21 -0
  92. package/dist/core/messages/methods/invite.d.ts +86 -0
  93. package/dist/core/messages/methods/message.d.ts +21 -0
  94. package/dist/core/messages/methods/notify.d.ts +21 -0
  95. package/dist/core/messages/methods/prack.d.ts +21 -0
  96. package/dist/core/messages/methods/publish.d.ts +21 -0
  97. package/dist/core/messages/methods/refer.d.ts +21 -0
  98. package/dist/core/messages/methods/register.d.ts +21 -0
  99. package/dist/core/messages/methods/subscribe.d.ts +54 -0
  100. package/dist/core/messages/outgoing-request-message.d.ts +94 -0
  101. package/dist/core/messages/outgoing-request.d.ts +67 -0
  102. package/dist/core/messages/outgoing-response.d.ts +42 -0
  103. package/dist/core/messages/parser.d.ts +14 -0
  104. package/dist/core/messages/utils.d.ts +24 -0
  105. package/dist/core/session/index.d.ts +2 -0
  106. package/dist/core/session/session-delegate.d.ts +70 -0
  107. package/dist/core/session/session.d.ts +134 -0
  108. package/dist/core/subscription/index.d.ts +2 -0
  109. package/dist/core/subscription/subscription-delegate.d.ts +27 -0
  110. package/dist/core/subscription/subscription.d.ts +55 -0
  111. package/dist/core/timers.d.ts +20 -0
  112. package/dist/core/transactions/client-transaction.d.ts +45 -0
  113. package/dist/core/transactions/index.d.ts +10 -0
  114. package/dist/core/transactions/invite-client-transaction.d.ts +116 -0
  115. package/dist/core/transactions/invite-server-transaction.d.ts +127 -0
  116. package/dist/core/transactions/non-invite-client-transaction.d.ts +69 -0
  117. package/dist/core/transactions/non-invite-server-transaction.d.ts +57 -0
  118. package/dist/core/transactions/server-transaction.d.ts +35 -0
  119. package/dist/core/transactions/transaction-state.d.ts +13 -0
  120. package/dist/core/transactions/transaction-user.d.ts +72 -0
  121. package/dist/core/transactions/transaction.d.ts +79 -0
  122. package/dist/core/transport.d.ts +31 -0
  123. package/dist/core/user-agent-core/allowed-methods.d.ts +4 -0
  124. package/dist/core/user-agent-core/index.d.ts +3 -0
  125. package/dist/core/user-agent-core/user-agent-core-configuration.d.ts +99 -0
  126. package/dist/core/user-agent-core/user-agent-core-delegate.d.ts +37 -0
  127. package/dist/core/user-agent-core/user-agent-core.d.ts +179 -0
  128. package/dist/core/user-agents/bye-user-agent-client.d.ts +10 -0
  129. package/dist/core/user-agents/bye-user-agent-server.d.ts +10 -0
  130. package/dist/core/user-agents/cancel-user-agent-client.d.ts +10 -0
  131. package/dist/core/user-agents/index.d.ts +26 -0
  132. package/dist/core/user-agents/info-user-agent-client.d.ts +10 -0
  133. package/dist/core/user-agents/info-user-agent-server.d.ts +10 -0
  134. package/dist/core/user-agents/invite-user-agent-client.d.ts +35 -0
  135. package/dist/core/user-agents/invite-user-agent-server.d.ts +77 -0
  136. package/dist/core/user-agents/message-user-agent-client.d.ts +10 -0
  137. package/dist/core/user-agents/message-user-agent-server.d.ts +10 -0
  138. package/dist/core/user-agents/notify-user-agent-client.d.ts +10 -0
  139. package/dist/core/user-agents/notify-user-agent-server.d.ts +16 -0
  140. package/dist/core/user-agents/prack-user-agent-client.d.ts +10 -0
  141. package/dist/core/user-agents/prack-user-agent-server.d.ts +16 -0
  142. package/dist/core/user-agents/publish-user-agent-client.d.ts +10 -0
  143. package/dist/core/user-agents/re-invite-user-agent-client.d.ts +18 -0
  144. package/dist/core/user-agents/re-invite-user-agent-server.d.ts +41 -0
  145. package/dist/core/user-agents/re-subscribe-user-agent-client.d.ts +17 -0
  146. package/dist/core/user-agents/re-subscribe-user-agent-server.d.ts +10 -0
  147. package/dist/core/user-agents/refer-user-agent-client.d.ts +10 -0
  148. package/dist/core/user-agents/refer-user-agent-server.d.ts +16 -0
  149. package/dist/core/user-agents/register-user-agent-client.d.ts +10 -0
  150. package/dist/core/user-agents/register-user-agent-server.d.ts +11 -0
  151. package/dist/core/user-agents/subscribe-user-agent-client.d.ts +65 -0
  152. package/dist/core/user-agents/subscribe-user-agent-server.d.ts +11 -0
  153. package/dist/core/user-agents/user-agent-client.d.ts +103 -0
  154. package/dist/core/user-agents/user-agent-server.d.ts +79 -0
  155. package/dist/grammar/grammar.d.ts +26 -0
  156. package/dist/grammar/index.d.ts +4 -0
  157. package/dist/grammar/name-addr-header.d.ts +24 -0
  158. package/dist/grammar/parameters.d.ts +16 -0
  159. package/dist/grammar/pegjs/dist/grammar.d.ts +50 -0
  160. package/dist/grammar/uri.d.ts +62 -0
  161. package/dist/{types/index.d.ts → index.d.ts} +7 -3
  162. package/dist/main.d.ts +9 -0
  163. package/dist/new-index.d.ts +199 -0
  164. package/dist/platform/web/index.d.ts +4 -0
  165. package/dist/platform/web/modifiers/index.d.ts +5 -0
  166. package/dist/platform/web/modifiers/modifiers.d.ts +41 -0
  167. package/dist/platform/web/session-description-handler/index.d.ts +14 -0
  168. package/dist/platform/web/session-description-handler/media-stream-factory-default.d.ts +6 -0
  169. package/dist/platform/web/session-description-handler/media-stream-factory.d.ts +6 -0
  170. package/dist/platform/web/session-description-handler/peer-connection-configuration-default.d.ts +5 -0
  171. package/dist/platform/web/session-description-handler/peer-connection-delegate.d.ts +63 -0
  172. package/dist/platform/web/session-description-handler/session-description-handler-configuration.d.ts +16 -0
  173. package/dist/platform/web/session-description-handler/session-description-handler-factory-default.d.ts +11 -0
  174. package/dist/platform/web/session-description-handler/session-description-handler-factory-options.d.ts +9 -0
  175. package/dist/platform/web/session-description-handler/session-description-handler-factory.d.ts +16 -0
  176. package/dist/platform/web/session-description-handler/session-description-handler-options.d.ts +47 -0
  177. package/dist/platform/web/session-description-handler/session-description-handler.d.ts +212 -0
  178. package/dist/platform/web/simple-user/index.d.ts +7 -0
  179. package/dist/platform/web/simple-user/simple-user-delegate.d.ts +72 -0
  180. package/dist/platform/web/simple-user/simple-user-options.d.ts +90 -0
  181. package/dist/platform/web/simple-user/simple-user.d.ts +226 -0
  182. package/dist/platform/web/transport/index.d.ts +6 -0
  183. package/dist/platform/web/transport/transport-options.d.ts +30 -0
  184. package/dist/platform/web/transport/transport.d.ts +125 -0
  185. package/dist/ue-softphone-sdk.js +2 -1
  186. package/dist/ue-softphone-sdk.js.map +1 -0
  187. package/dist/version.d.ts +1 -0
  188. package/dist/webPhoneSdk.d.ts +24 -0
  189. package/dist/webrtc.d.ts +17 -0
  190. package/{rollup-new.config.mjs → new-rollup.config.mjs} +1 -1
  191. package/package.json +6 -6
  192. package/rollup.config.js +15 -14
  193. package/src/api/api-extractor.json +358 -0
  194. package/src/api/bye.ts +27 -0
  195. package/src/api/dtmf.ts +27 -0
  196. package/src/api/emitter.ts +110 -0
  197. package/src/api/exceptions/content-type-unsupported.ts +11 -0
  198. package/src/api/exceptions/index.ts +5 -0
  199. package/src/api/exceptions/request-pending.ts +12 -0
  200. package/src/api/exceptions/session-description-handler.ts +11 -0
  201. package/src/api/exceptions/session-terminated.ts +11 -0
  202. package/src/api/exceptions/state-transition.ts +11 -0
  203. package/src/api/index.ts +58 -0
  204. package/src/api/info.ts +27 -0
  205. package/src/api/invitation-accept-options.ts +20 -0
  206. package/src/api/invitation-progress-options.ts +36 -0
  207. package/src/api/invitation-reject-options.ts +22 -0
  208. package/src/api/invitation.ts +816 -0
  209. package/src/api/inviter-cancel-options.ts +9 -0
  210. package/src/api/inviter-invite-options.ts +29 -0
  211. package/src/api/inviter-options.ts +44 -0
  212. package/src/api/inviter.ts +1126 -0
  213. package/src/api/message.ts +27 -0
  214. package/src/api/messager-message-options.ts +12 -0
  215. package/src/api/messager-options.ts +18 -0
  216. package/src/api/messager.ts +89 -0
  217. package/src/api/notification.ts +27 -0
  218. package/src/api/notifier.ts +7 -0
  219. package/src/api/publisher-options.ts +34 -0
  220. package/src/api/publisher-publish-options.ts +6 -0
  221. package/src/api/publisher-state.ts +21 -0
  222. package/src/api/publisher-unpublish-options.ts +6 -0
  223. package/src/api/publisher.ts +418 -0
  224. package/src/api/referral.ts +89 -0
  225. package/src/api/registerer-options.ts +55 -0
  226. package/src/api/registerer-register-options.ts +12 -0
  227. package/src/api/registerer-state.ts +21 -0
  228. package/src/api/registerer-unregister-options.ts +17 -0
  229. package/src/api/registerer.ts +814 -0
  230. package/src/api/session-bye-options.ts +12 -0
  231. package/src/api/session-delegate.ts +80 -0
  232. package/src/api/session-description-handler-factory.ts +16 -0
  233. package/src/api/session-description-handler.ts +89 -0
  234. package/src/api/session-info-options.ts +12 -0
  235. package/src/api/session-invite-options.ts +29 -0
  236. package/src/api/session-message-options.ts +12 -0
  237. package/src/api/session-options.ts +8 -0
  238. package/src/api/session-refer-options.ts +15 -0
  239. package/src/api/session-state.ts +45 -0
  240. package/src/api/session.ts +1448 -0
  241. package/src/api/subscriber-options.ts +12 -0
  242. package/src/api/subscriber-subscribe-options.ts +6 -0
  243. package/src/api/subscriber.ts +536 -0
  244. package/src/api/subscription-delegate.ts +13 -0
  245. package/src/api/subscription-options.ts +8 -0
  246. package/src/api/subscription-state.ts +19 -0
  247. package/src/api/subscription-subscribe-options.ts +6 -0
  248. package/src/api/subscription-unsubscribe-options.ts +6 -0
  249. package/src/api/subscription.ts +161 -0
  250. package/src/api/transport-state.ts +37 -0
  251. package/src/api/transport.ts +169 -0
  252. package/src/api/user-agent-delegate.ts +95 -0
  253. package/src/api/user-agent-options.ts +322 -0
  254. package/src/api/user-agent-state.ts +14 -0
  255. package/src/api/user-agent.ts +1014 -0
  256. package/src/core/api-extractor.json +358 -0
  257. package/src/core/dialogs/dialog-state.ts +35 -0
  258. package/src/core/dialogs/dialog.ts +605 -0
  259. package/src/core/dialogs/index.ts +4 -0
  260. package/src/core/dialogs/session-dialog.ts +996 -0
  261. package/src/core/dialogs/subscription-dialog.ts +557 -0
  262. package/src/core/exceptions/exception.ts +11 -0
  263. package/src/core/exceptions/index.ts +3 -0
  264. package/src/core/exceptions/transaction-state-error.ts +11 -0
  265. package/src/core/exceptions/transport-error.ts +11 -0
  266. package/src/core/index.ts +19 -0
  267. package/src/core/log/index.ts +3 -0
  268. package/src/core/log/levels.ts +10 -0
  269. package/src/core/log/logger-factory.ts +119 -0
  270. package/src/core/log/logger.ts +42 -0
  271. package/src/core/messages/body.ts +171 -0
  272. package/src/core/messages/digest-authentication.ts +190 -0
  273. package/src/core/messages/incoming-message.ts +152 -0
  274. package/src/core/messages/incoming-request-message.ts +14 -0
  275. package/src/core/messages/incoming-request.ts +75 -0
  276. package/src/core/messages/incoming-response-message.ts +14 -0
  277. package/src/core/messages/incoming-response.ts +13 -0
  278. package/src/core/messages/index.ts +18 -0
  279. package/src/core/messages/md5.ts +437 -0
  280. package/src/core/messages/methods/ack.ts +22 -0
  281. package/src/core/messages/methods/bye.ts +22 -0
  282. package/src/core/messages/methods/cancel.ts +22 -0
  283. package/src/core/messages/methods/constants.ts +21 -0
  284. package/src/core/messages/methods/index.ts +13 -0
  285. package/src/core/messages/methods/info.ts +22 -0
  286. package/src/core/messages/methods/invite.ts +104 -0
  287. package/src/core/messages/methods/message.ts +22 -0
  288. package/src/core/messages/methods/notify.ts +22 -0
  289. package/src/core/messages/methods/prack.ts +22 -0
  290. package/src/core/messages/methods/publish.ts +22 -0
  291. package/src/core/messages/methods/refer.ts +22 -0
  292. package/src/core/messages/methods/register.ts +22 -0
  293. package/src/core/messages/methods/subscribe.ts +59 -0
  294. package/src/core/messages/outgoing-request-message.ts +299 -0
  295. package/src/core/messages/outgoing-request.ts +77 -0
  296. package/src/core/messages/outgoing-response.ts +174 -0
  297. package/src/core/messages/parser.ts +265 -0
  298. package/src/core/messages/utils.ts +144 -0
  299. package/src/core/session/index.ts +2 -0
  300. package/src/core/session/session-delegate.ts +88 -0
  301. package/src/core/session/session.ts +158 -0
  302. package/src/core/subscription/index.ts +2 -0
  303. package/src/core/subscription/subscription-delegate.ts +30 -0
  304. package/src/core/subscription/subscription.ts +61 -0
  305. package/src/core/timers.ts +24 -0
  306. package/src/core/transactions/client-transaction.ts +78 -0
  307. package/src/core/transactions/index.ts +10 -0
  308. package/src/core/transactions/invite-client-transaction.ts +504 -0
  309. package/src/core/transactions/invite-server-transaction.ts +432 -0
  310. package/src/core/transactions/non-invite-client-transaction.ts +257 -0
  311. package/src/core/transactions/non-invite-server-transaction.ts +241 -0
  312. package/src/core/transactions/server-transaction.ts +47 -0
  313. package/src/core/transactions/transaction-state.ts +13 -0
  314. package/src/core/transactions/transaction-user.ts +82 -0
  315. package/src/core/transactions/transaction.ts +149 -0
  316. package/src/core/transport.ts +32 -0
  317. package/src/core/user-agent-core/allowed-methods.ts +19 -0
  318. package/src/core/user-agent-core/index.ts +3 -0
  319. package/src/core/user-agent-core/user-agent-core-configuration.ts +111 -0
  320. package/src/core/user-agent-core/user-agent-core-delegate.ts +50 -0
  321. package/src/core/user-agent-core/user-agent-core.ts +905 -0
  322. package/src/core/user-agents/bye-user-agent-client.ts +16 -0
  323. package/src/core/user-agents/bye-user-agent-server.ts +14 -0
  324. package/src/core/user-agents/cancel-user-agent-client.ts +14 -0
  325. package/src/core/user-agents/index.ts +26 -0
  326. package/src/core/user-agents/info-user-agent-client.ts +15 -0
  327. package/src/core/user-agents/info-user-agent-server.ts +14 -0
  328. package/src/core/user-agents/invite-user-agent-client.ts +405 -0
  329. package/src/core/user-agents/invite-user-agent-server.ts +269 -0
  330. package/src/core/user-agents/message-user-agent-client.ts +14 -0
  331. package/src/core/user-agents/message-user-agent-server.ts +14 -0
  332. package/src/core/user-agents/notify-user-agent-client.ts +15 -0
  333. package/src/core/user-agents/notify-user-agent-server.ts +30 -0
  334. package/src/core/user-agents/prack-user-agent-client.ts +16 -0
  335. package/src/core/user-agents/prack-user-agent-server.ts +37 -0
  336. package/src/core/user-agents/publish-user-agent-client.ts +14 -0
  337. package/src/core/user-agents/re-invite-user-agent-client.ts +127 -0
  338. package/src/core/user-agents/re-invite-user-agent-server.ts +109 -0
  339. package/src/core/user-agents/re-subscribe-user-agent-client.ts +78 -0
  340. package/src/core/user-agents/re-subscribe-user-agent-server.ts +14 -0
  341. package/src/core/user-agents/refer-user-agent-client.ts +15 -0
  342. package/src/core/user-agents/refer-user-agent-server.ts +30 -0
  343. package/src/core/user-agents/register-user-agent-client.ts +14 -0
  344. package/src/core/user-agents/register-user-agent-server.ts +14 -0
  345. package/src/core/user-agents/subscribe-user-agent-client.ts +341 -0
  346. package/src/core/user-agents/subscribe-user-agent-server.ts +14 -0
  347. package/src/core/user-agents/user-agent-client.ts +378 -0
  348. package/src/core/user-agents/user-agent-server.ts +276 -0
  349. package/src/grammar/grammar.ts +55 -0
  350. package/src/grammar/index.ts +4 -0
  351. package/src/grammar/name-addr-header.ts +58 -0
  352. package/src/grammar/parameters.ts +45 -0
  353. package/src/grammar/pegjs/README.md +9 -0
  354. package/src/grammar/pegjs/dist/grammar.ts +1557 -0
  355. package/src/grammar/pegjs/src/grammar.pegjs +1009 -0
  356. package/src/grammar/uri.ts +370 -0
  357. package/src/index.ts +59 -28
  358. package/src/lib/socket.io.esm.min.js +7 -0
  359. package/src/main.ts +26 -0
  360. package/src/new-index.ts +2478 -0
  361. package/src/platform/react/README.md +1 -0
  362. package/src/platform/web/index.ts +4 -0
  363. package/src/platform/web/modifiers/index.ts +5 -0
  364. package/src/platform/web/modifiers/modifiers.ts +180 -0
  365. package/src/platform/web/session-description-handler/api-extractor.json +358 -0
  366. package/src/platform/web/session-description-handler/index.ts +14 -0
  367. package/src/platform/web/session-description-handler/media-stream-factory-default.ts +22 -0
  368. package/src/platform/web/session-description-handler/media-stream-factory.ts +10 -0
  369. package/src/platform/web/session-description-handler/peer-connection-configuration-default.ts +17 -0
  370. package/src/platform/web/session-description-handler/peer-connection-delegate.ts +72 -0
  371. package/src/platform/web/session-description-handler/session-description-handler-configuration.ts +17 -0
  372. package/src/platform/web/session-description-handler/session-description-handler-factory-default.ts +45 -0
  373. package/src/platform/web/session-description-handler/session-description-handler-factory-options.ts +10 -0
  374. package/src/platform/web/session-description-handler/session-description-handler-factory.ts +17 -0
  375. package/src/platform/web/session-description-handler/session-description-handler-options.ts +56 -0
  376. package/src/platform/web/session-description-handler/session-description-handler.ts +938 -0
  377. package/src/platform/web/simple-user/api-extractor.json +358 -0
  378. package/src/platform/web/simple-user/index.ts +7 -0
  379. package/src/platform/web/simple-user/simple-user-delegate.ts +82 -0
  380. package/src/platform/web/simple-user/simple-user-options.ts +102 -0
  381. package/src/platform/web/simple-user/simple-user.ts +1099 -0
  382. package/src/platform/web/transport/api-extractor.json +358 -0
  383. package/src/platform/web/transport/index.ts +6 -0
  384. package/src/platform/web/transport/transport-options.ts +34 -0
  385. package/src/platform/web/transport/transport.ts +742 -0
  386. package/src/version.ts +8 -0
  387. package/src/webPhoneSdk.ts +67 -0
  388. package/src/webrtc.ts +318 -0
  389. package/tsconfig.json +26 -10
  390. /package/dist/{types/config.d.ts → config.d.ts} +0 -0
@@ -0,0 +1,370 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2
+ import { Parameters } from "./parameters";
3
+
4
+ interface URIObject {
5
+ scheme: string;
6
+ user: string | undefined;
7
+ host: string;
8
+ port: number | undefined;
9
+ }
10
+
11
+ /**
12
+ * URI.
13
+ * @public
14
+ */
15
+ export class URI extends Parameters {
16
+ public headers: {[name: string]: Array<string>} = {};
17
+ private normal: URIObject;
18
+ private raw: URIObject;
19
+
20
+ /**
21
+ * Constructor
22
+ * @param scheme -
23
+ * @param user -
24
+ * @param host -
25
+ * @param port -
26
+ * @param parameters -
27
+ * @param headers -
28
+ */
29
+ constructor(
30
+ scheme = "sip",
31
+ user: string,
32
+ host: string,
33
+ port?: number,
34
+ parameters?: { [name: string]: string | number | null },
35
+ headers?: {[name: string]: Array<string>}
36
+ ) {
37
+ super(parameters || {});
38
+ // Checks
39
+ if (!host) {
40
+ throw new TypeError('missing or invalid "host" parameter');
41
+ }
42
+
43
+ for (const header in headers) {
44
+ // eslint-disable-next-line no-prototype-builtins
45
+ if (headers.hasOwnProperty(header)) {
46
+ this.setHeader(header, headers[header]);
47
+ }
48
+ }
49
+
50
+ // Raw URI
51
+ this.raw = {
52
+ scheme,
53
+ user,
54
+ host,
55
+ port
56
+ };
57
+
58
+ // Normalized URI
59
+ this.normal = {
60
+ scheme: scheme.toLowerCase(),
61
+ user,
62
+ host: host.toLowerCase(),
63
+ port
64
+ };
65
+ }
66
+
67
+ get scheme(): string { return this.normal.scheme; }
68
+ set scheme(value: string) {
69
+ this.raw.scheme = value;
70
+ this.normal.scheme = value.toLowerCase();
71
+ }
72
+
73
+ get user(): string | undefined { return this.normal.user; }
74
+ set user(value: string | undefined) {
75
+ this.normal.user = this.raw.user = value;
76
+ }
77
+
78
+ get host(): string { return this.normal.host; }
79
+ set host(value: string) {
80
+ this.raw.host = value;
81
+ this.normal.host = value.toLowerCase();
82
+ }
83
+
84
+ get aor(): string { return this.normal.user + "@" + this.normal.host; }
85
+
86
+ get port(): number | undefined { return this.normal.port; }
87
+ set port(value: number | undefined) {
88
+ this.normal.port = this.raw.port = value === 0 ? value : value;
89
+ }
90
+
91
+ public setHeader(name: string, value: Array<string> | string): void {
92
+ this.headers[this.headerize(name)] = (value instanceof Array) ? value : [value];
93
+ }
94
+
95
+ public getHeader(name: string): Array<string> | undefined {
96
+ if (name) {
97
+ return this.headers[this.headerize(name)];
98
+ }
99
+ }
100
+
101
+ public hasHeader(name: string): boolean {
102
+ // eslint-disable-next-line no-prototype-builtins
103
+ return !!name && !!this.headers.hasOwnProperty(this.headerize(name));
104
+ }
105
+
106
+ public deleteHeader(header: string): Array<string> | undefined {
107
+ header = this.headerize(header);
108
+
109
+ // eslint-disable-next-line no-prototype-builtins
110
+ if (this.headers.hasOwnProperty(header)) {
111
+ const value = this.headers[header];
112
+ delete this.headers[header];
113
+ return value;
114
+ }
115
+ }
116
+
117
+ public clearHeaders(): void {
118
+ this.headers = {};
119
+ }
120
+
121
+ public clone(): URI {
122
+ return new URI(
123
+ this._raw.scheme,
124
+ this._raw.user || "",
125
+ this._raw.host,
126
+ this._raw.port,
127
+ JSON.parse(JSON.stringify(this.parameters)),
128
+ JSON.parse(JSON.stringify(this.headers)));
129
+ }
130
+
131
+ public toRaw(): string {
132
+ return this._toString(this._raw);
133
+ }
134
+
135
+ public toString(): string {
136
+ return this._toString(this._normal);
137
+ }
138
+
139
+ private get _normal(): URIObject { return this.normal; }
140
+
141
+ private get _raw(): URIObject { return this.raw; }
142
+
143
+ private _toString(uri: any): string {
144
+ let uriString: string = uri.scheme + ":";
145
+ // add slashes if it's not a sip(s) URI
146
+ if (!uri.scheme.toLowerCase().match("^sips?$")) {
147
+ uriString += "//";
148
+ }
149
+ if (uri.user) {
150
+ uriString += this.escapeUser(uri.user) + "@";
151
+ }
152
+ uriString += uri.host;
153
+ if (uri.port || uri.port === 0) {
154
+ uriString += ":" + uri.port;
155
+ }
156
+
157
+ for (const parameter in this.parameters) {
158
+ // eslint-disable-next-line no-prototype-builtins
159
+ if (this.parameters.hasOwnProperty(parameter)) {
160
+ uriString += ";" + parameter;
161
+
162
+ if (this.parameters[parameter] !== null) {
163
+ uriString += "=" + this.parameters[parameter];
164
+ }
165
+ }
166
+ }
167
+
168
+ const headers: Array<string> = [];
169
+ for (const header in this.headers) {
170
+ // eslint-disable-next-line no-prototype-builtins
171
+ if (this.headers.hasOwnProperty(header)) {
172
+ // eslint-disable-next-line @typescript-eslint/no-for-in-array
173
+ for (const idx in this.headers[header]) {
174
+ // eslint-disable-next-line no-prototype-builtins
175
+ if (this.headers[header].hasOwnProperty(idx)) {
176
+ headers.push(header + "=" + this.headers[header][idx]);
177
+ }
178
+ }
179
+ }
180
+ }
181
+
182
+ if (headers.length > 0) {
183
+ uriString += "?" + headers.join("&");
184
+ }
185
+
186
+ return uriString;
187
+ }
188
+
189
+ /*
190
+ * Hex-escape a SIP URI user.
191
+ * @private
192
+ * @param {String} user
193
+ */
194
+ private escapeUser(user: string): string {
195
+ let decodedUser: string;
196
+
197
+ // FIXME: This is called by toString above which should never throw, but
198
+ // decodeURIComponent can throw and I've seen one case in production where
199
+ // it did throw resulting in a cascading failure. This class should be
200
+ // fixed so that decodeURIComponent is not called at this point (in toString).
201
+ // The user should be decoded when the URI is constructor or some other
202
+ // place where we can catch the error before the URI is created or somesuch.
203
+ // eslint-disable-next-line no-useless-catch
204
+ try {
205
+ decodedUser = decodeURIComponent(user);
206
+ } catch (error) {
207
+ throw error;
208
+ }
209
+
210
+ // Don't hex-escape ':' (%3A), '+' (%2B), '?' (%3F"), '/' (%2F).
211
+ return encodeURIComponent(decodedUser)
212
+ .replace(/%3A/ig, ":")
213
+ .replace(/%2B/ig, "+")
214
+ .replace(/%3F/ig, "?")
215
+ .replace(/%2F/ig, "/");
216
+ }
217
+
218
+ private headerize(str: string): string {
219
+ const exceptions: any = {
220
+ "Call-Id": "Call-ID",
221
+ "Cseq": "CSeq",
222
+ "Min-Se": "Min-SE",
223
+ "Rack": "RAck",
224
+ "Rseq": "RSeq",
225
+ "Www-Authenticate": "WWW-Authenticate",
226
+ };
227
+ const name: Array<string> = str.toLowerCase().replace(/_/g, "-").split("-");
228
+ const parts: number = name.length;
229
+ let hname = "";
230
+
231
+ for (let part = 0; part < parts; part++) {
232
+ if (part !== 0) {
233
+ hname += "-";
234
+ }
235
+ hname += name[part].charAt(0).toUpperCase() + name[part].substring(1);
236
+ }
237
+ if (exceptions[hname]) {
238
+ hname = exceptions[hname];
239
+ }
240
+ return hname;
241
+ }
242
+ }
243
+
244
+ /**
245
+ * Returns true if URIs are equivalent per RFC 3261 Section 19.1.4.
246
+ * @param a URI to compare
247
+ * @param b URI to compare
248
+ *
249
+ * @remarks
250
+ * 19.1.4 URI Comparison
251
+ * Some operations in this specification require determining whether two
252
+ * SIP or SIPS URIs are equivalent.
253
+ *
254
+ * https://tools.ietf.org/html/rfc3261#section-19.1.4
255
+ * @internal
256
+ */
257
+ export function equivalentURI(a: URI, b: URI): boolean {
258
+
259
+ // o A SIP and SIPS URI are never equivalent.
260
+ if (a.scheme !== b.scheme) {
261
+ return false;
262
+ }
263
+
264
+ // o Comparison of the userinfo of SIP and SIPS URIs is case-
265
+ // sensitive. This includes userinfo containing passwords or
266
+ // formatted as telephone-subscribers. Comparison of all other
267
+ // components of the URI is case-insensitive unless explicitly
268
+ // defined otherwise.
269
+ //
270
+ // o The ordering of parameters and header fields is not significant
271
+ // in comparing SIP and SIPS URIs.
272
+ //
273
+ // o Characters other than those in the "reserved" set (see RFC 2396
274
+ // [5]) are equivalent to their ""%" HEX HEX" encoding.
275
+ //
276
+ // o An IP address that is the result of a DNS lookup of a host name
277
+ // does not match that host name.
278
+ //
279
+ // o For two URIs to be equal, the user, password, host, and port
280
+ // components must match.
281
+ //
282
+ // A URI omitting the user component will not match a URI that
283
+ // includes one. A URI omitting the password component will not
284
+ // match a URI that includes one.
285
+ //
286
+ // A URI omitting any component with a default value will not
287
+ // match a URI explicitly containing that component with its
288
+ // default value. For instance, a URI omitting the optional port
289
+ // component will not match a URI explicitly declaring port 5060.
290
+ // The same is true for the transport-parameter, ttl-parameter,
291
+ // user-parameter, and method components.
292
+ //
293
+ // Defining sip:user@host to not be equivalent to
294
+ // sip:user@host:5060 is a change from RFC 2543. When deriving
295
+ // addresses from URIs, equivalent addresses are expected from
296
+ // equivalent URIs. The URI sip:user@host:5060 will always
297
+ // resolve to port 5060. The URI sip:user@host may resolve to
298
+ // other ports through the DNS SRV mechanisms detailed in [4].
299
+
300
+ // FIXME: TODO:
301
+ // - character compared to hex encoding is not handled
302
+ // - password does not exist on URI currently
303
+ if (a.user !== b.user || a.host !== b.host || a.port !== b.port) {
304
+ return false;
305
+ }
306
+
307
+ // o URI uri-parameter components are compared as follows:
308
+ function compareParameters(a: URI, b: URI): boolean {
309
+ // - Any uri-parameter appearing in both URIs must match.
310
+ const parameterKeysA = Object.keys(a.parameters);
311
+ const parameterKeysB = Object.keys(b.parameters);
312
+ const intersection = parameterKeysA.filter(x => parameterKeysB.includes(x));
313
+ if (!intersection.every(key => a.parameters[key] === b.parameters[key])) {
314
+ return false;
315
+ }
316
+
317
+ // - A user, ttl, or method uri-parameter appearing in only one
318
+ // URI never matches, even if it contains the default value.
319
+ if (!["user", "ttl", "method", "transport"].every(key => a.hasParam(key) && b.hasParam(key) || !a.hasParam(key) && !b.hasParam(key))) {
320
+ return false;
321
+ }
322
+
323
+ // - A URI that includes an maddr parameter will not match a URI
324
+ // that contains no maddr parameter.
325
+ if (!["maddr"].every(key => a.hasParam(key) && b.hasParam(key) || !a.hasParam(key) && !b.hasParam(key))) {
326
+ return false;
327
+ }
328
+
329
+ // - All other uri-parameters appearing in only one URI are
330
+ // ignored when comparing the URIs.
331
+ return true;
332
+ }
333
+
334
+ if (!compareParameters(a, b)) {
335
+ return false;
336
+ }
337
+
338
+ // o URI header components are never ignored. Any present header
339
+ // component MUST be present in both URIs and match for the URIs
340
+ // to match. The matching rules are defined for each header field
341
+ // in Section 20.
342
+ const headerKeysA = Object.keys(a.headers);
343
+ const headerKeysB = Object.keys(b.headers);
344
+
345
+ // No need to check if no headers
346
+ if (headerKeysA.length !== 0 || headerKeysB.length !== 0) {
347
+
348
+ // Must have same number of headers
349
+ if (headerKeysA.length !== headerKeysB.length) {
350
+ return false;
351
+ }
352
+
353
+ // Must have same headers
354
+ const intersection = headerKeysA.filter(x => headerKeysB.includes(x));
355
+ if (intersection.length !== headerKeysB.length) {
356
+ return false;
357
+ }
358
+
359
+ // FIXME: Not to spec. But perhaps not worth fixing?
360
+ // Must have same header values
361
+ // It seems too much to consider multiple headers with same name.
362
+ // It seems too much to compare two header params according to the rule of each header.
363
+ // We'll assume a single header and compare them string to string...
364
+ if (!intersection.every(key => a.headers[key].length && b.headers[key].length && a.headers[key][0] === b.headers[key][0])) {
365
+ return false;
366
+ }
367
+ }
368
+
369
+ return true;
370
+ }
package/src/index.ts CHANGED
@@ -11,8 +11,8 @@
11
11
  // @ts-ignore: Unreachable code error
12
12
  // import { Parameters } from './grammar/parameters.js'
13
13
  import io from "socket.io-client";
14
+ import WebPhoneSdk from "./webPhoneSdk";
14
15
  import { AUDIO_FORBIDDEN, DENIED, NOT_OPEN_AUDIO } from "./config";
15
- import { UeWebrtc } from "ue-webrtc";
16
16
 
17
17
  import { Base64 } from "js-base64";
18
18
  import md5 from "js-md5";
@@ -104,7 +104,7 @@ interface MuteOrUnMuteParams {
104
104
  fail?: Function;
105
105
  }
106
106
  interface TransferParams {
107
- type: String;
107
+ mode: String;
108
108
  number: String;
109
109
  agentNumber?: String;
110
110
  success?: Function;
@@ -158,6 +158,7 @@ interface consultParams {
158
158
  fail?: Function;
159
159
  }
160
160
  interface cancleConsultParams {
161
+ agentNumber: String;
161
162
  success?: Function;
162
163
  fail?: Function;
163
164
  }
@@ -166,15 +167,18 @@ interface stopConsultParams {
166
167
  fail?: Function;
167
168
  }
168
169
  interface resumeConsultParams {
170
+ agentNumber: String;
169
171
  success?: Function;
170
172
  fail?: Function;
171
173
  }
172
174
  interface consultTransferParams {
175
+ agentNumber: String;
173
176
  success?: Function;
174
177
  fail?: Function;
175
178
  }
176
179
 
177
180
  interface threeWayCallParams {
181
+ agentNumber: String;
178
182
  success?: Function;
179
183
  fail?: Function;
180
184
  }
@@ -389,7 +393,8 @@ export default class ueSoftphone {
389
393
  server,
390
394
  loginType,
391
395
  loginInfo.data.pushServer,
392
- loginInfo.data.agent
396
+ loginInfo.data.agent,
397
+ options.success
393
398
  );
394
399
  if (loginType === "WEBRTC") {
395
400
  this.getWebrtcInfo(server, options);
@@ -494,7 +499,6 @@ export default class ueSoftphone {
494
499
  callbacks.error = typeof callbacks.error == "function" ? callbacks.error : ueSoftphone.noop;
495
500
  callbacks.message =
496
501
  typeof callbacks.message == "function" ? callbacks.message : ueSoftphone.noop;
497
- callbacks.event = typeof callbacks.event == "function" ? callbacks.event : ueSoftphone.noop;
498
502
  callbacks.server =
499
503
  callbacks.serve === null || callbacks.serve === undefined
500
504
  ? "ws://152.136.72.209:3201/phoneBarGateway"
@@ -544,13 +548,11 @@ export default class ueSoftphone {
544
548
  if (event.subType === "KICK_OFF") {
545
549
  this.Socketinstance.disconnect();
546
550
  try {
547
- ueSoftphone.webPhone.disconnect();
551
+ WebPhoneSdk.disconnect();
548
552
  } catch (error) {}
549
- console.error({
550
- message: "坐席账户在其他地方登录"
551
- });
552
- callbacks.event({
553
- message: "坐席账户在其他地方登录"
553
+ callbacks.error({
554
+ type: "accountError",
555
+ error: "您的账号在其他网页登录"
554
556
  });
555
557
  }
556
558
  });
@@ -598,7 +600,13 @@ export default class ueSoftphone {
598
600
  // }
599
601
  // };
600
602
  // 电话条事件回调
601
- private initAttachEvent = (server: any, loginType: string, options: any, userOptions: any) => {
603
+ private initAttachEvent = (
604
+ server: any,
605
+ loginType: string,
606
+ options: any,
607
+ userOptions: any,
608
+ success
609
+ ) => {
602
610
  if (this.attachEventCallbacks) {
603
611
  // 每次创建链接的时候,要获取最新的ws token
604
612
  ueSoftphone.request(server + "/platform/action/refreshWsToken", {
@@ -633,6 +641,7 @@ export default class ueSoftphone {
633
641
  transports: ["websocket"],
634
642
  timeout: 5000
635
643
  };
644
+ this.attachEventCallbacks.success = success;
636
645
  ueSoftphone.createEventHandle(this.attachEventCallbacks);
637
646
  }
638
647
  },
@@ -737,18 +746,15 @@ export default class ueSoftphone {
737
746
  }
738
747
 
739
748
  // webrtc事件回调
740
- private static initWebrtcEvent = async (extras: any) => {
741
- ueSoftphone.webPhone = new UeWebrtc({
749
+ private static initWebrtcEvent = (extras: any) => {
750
+ ueSoftphone.webPhone = new WebPhoneSdk({
742
751
  server: extras.wssUrl,
743
752
  sip: extras.sip,
744
753
  secret: extras.password
745
754
  });
746
-
747
- // Connect to server
748
- await this.webPhone.connect();
749
-
750
- // Register to receive inbound calls
751
- this.webPhone.register();
755
+ ueSoftphone.webPhone.message = (res: any) => {
756
+ console.log(res);
757
+ };
752
758
  };
753
759
  // 若是webrtc的模式,会检测权限,弹窗让客户授权
754
760
  private openMediaAudio = (failMsg: string, hasAlert: boolean) => {
@@ -1112,7 +1118,7 @@ export default class ueSoftphone {
1112
1118
  });
1113
1119
  return;
1114
1120
  }
1115
- if (params.type === null || params.type === undefined) {
1121
+ if (params.mode === null || params.mode === undefined) {
1116
1122
  params.fail({
1117
1123
  success: false,
1118
1124
  message: "Parameter mode is required!"
@@ -1241,6 +1247,13 @@ export default class ueSoftphone {
1241
1247
  });
1242
1248
  return;
1243
1249
  }
1250
+ if (params.agentNumber === null || params.agentNumber === undefined) {
1251
+ params.fail({
1252
+ success: false,
1253
+ message: "Parameter agentNumber is required!"
1254
+ });
1255
+ return;
1256
+ }
1244
1257
 
1245
1258
  const server = ueSoftphone.initOptions.server || ueSoftphone.callApiUrl;
1246
1259
 
@@ -1339,6 +1352,13 @@ export default class ueSoftphone {
1339
1352
  });
1340
1353
  return;
1341
1354
  }
1355
+ if (params.agentNumber === null || params.agentNumber === undefined) {
1356
+ params.fail({
1357
+ success: false,
1358
+ message: "Parameter agentNumber is required!"
1359
+ });
1360
+ return;
1361
+ }
1342
1362
 
1343
1363
  const server = ueSoftphone.initOptions.server || ueSoftphone.callApiUrl;
1344
1364
 
@@ -1388,6 +1408,13 @@ export default class ueSoftphone {
1388
1408
  });
1389
1409
  return;
1390
1410
  }
1411
+ if (params.agentNumber === null || params.agentNumber === undefined) {
1412
+ params.fail({
1413
+ success: false,
1414
+ message: "Parameter agentNumber is required!"
1415
+ });
1416
+ return;
1417
+ }
1391
1418
 
1392
1419
  const server = ueSoftphone.initOptions.server || ueSoftphone.callApiUrl;
1393
1420
 
@@ -1437,6 +1464,13 @@ export default class ueSoftphone {
1437
1464
  });
1438
1465
  return;
1439
1466
  }
1467
+ if (params.agentNumber === null || params.agentNumber === undefined) {
1468
+ params.fail({
1469
+ success: false,
1470
+ message: "Parameter agentNumber is required!"
1471
+ });
1472
+ return;
1473
+ }
1440
1474
 
1441
1475
  const server = ueSoftphone.initOptions.server || ueSoftphone.callApiUrl;
1442
1476
 
@@ -1797,7 +1831,7 @@ export default class ueSoftphone {
1797
1831
  if (params) {
1798
1832
  ueSoftphone.Socketinstance.disconnect();
1799
1833
  if (ueSoftphone.agentInfo.loginType === "WEBRTC") {
1800
- ueSoftphone.webPhone.disconnect();
1834
+ WebPhoneSdk.disconnect();
1801
1835
  }
1802
1836
  (params.success as Function)({
1803
1837
  success: true
@@ -1993,7 +2027,7 @@ export default class ueSoftphone {
1993
2027
  return {
1994
2028
  // 接听
1995
2029
  accept() {
1996
- ueSoftphone.webPhone.accept();
2030
+ WebPhoneSdk.accept();
1997
2031
  },
1998
2032
  // 注册设备,链接webrtc
1999
2033
  connect() {
@@ -2004,16 +2038,16 @@ export default class ueSoftphone {
2004
2038
  // 注销设备,跟webrtc断开链接
2005
2039
  disconnect() {
2006
2040
  if (ueSoftphone.webPhone && this.isConnected()) {
2007
- ueSoftphone.webPhone.disconnect();
2041
+ WebPhoneSdk.disconnect();
2008
2042
  }
2009
2043
  },
2010
2044
  // 检测设备是否有链接上
2011
2045
  isConnected() {
2012
- return ueSoftphone.webPhone.isConnected();
2046
+ return WebPhoneSdk.isConnected();
2013
2047
  },
2014
2048
  // 发送DTMF 可与demo中的软电话拨号盘结合使用
2015
2049
  sendDTMF(tone: string) {
2016
- ueSoftphone.webPhone.sendDTMF(tone);
2050
+ WebPhoneSdk.sendDTMF(tone);
2017
2051
  }
2018
2052
  };
2019
2053
  };
@@ -2022,9 +2056,6 @@ export default class ueSoftphone {
2022
2056
  class ueWebsocket {
2023
2057
  private ws: any;
2024
2058
  constructor(server: string, proto: any) {
2025
- delete proto.path;
2026
- delete proto.hostname;
2027
- delete proto.port;
2028
2059
  //@ts-ignore
2029
2060
  this.ws = io.connect(`wss://${server}`, proto);
2030
2061
  }