@wazo/sdk 0.39.15 → 0.40.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 (283) hide show
  1. package/README.md +2 -2
  2. package/dist/wazo-sdk.js +12 -12
  3. package/esm/__tests__/api-client.test.js +0 -10
  4. package/esm/__tests__/web-rtc-client.test.js +2 -15
  5. package/esm/api/chatd.js +0 -1
  6. package/esm/api/dird.js +7 -10
  7. package/esm/checker/checks/ice-ipv4.js +2 -3
  8. package/esm/checker/checks/symmetric-nat.js +7 -4
  9. package/esm/domain/AdHocAPIConference.js +1 -1
  10. package/esm/domain/CallLog.js +1 -1
  11. package/esm/domain/Contact.js +2 -1
  12. package/esm/domain/MeetingAuthorization.js +6 -0
  13. package/esm/domain/Phone/CTIPhone.js +2 -0
  14. package/esm/domain/Phone/WebRTCPhone.js +16 -18
  15. package/esm/domain/Session.js +2 -2
  16. package/esm/domain/__tests__/Agent.test.js +0 -2
  17. package/esm/domain/__tests__/Call.test.js +0 -1
  18. package/esm/domain/__tests__/CallLog.test.js +0 -1
  19. package/esm/domain/__tests__/CallSession.test.js +1 -2
  20. package/esm/domain/__tests__/Contact.test.js +2 -4
  21. package/esm/domain/__tests__/IndirectTransfer.test.js +0 -1
  22. package/esm/domain/__tests__/Profile.test.js +0 -1
  23. package/esm/domain/__tests__/Room.test.js +1 -25
  24. package/esm/domain/__tests__/Session.test.js +13 -14
  25. package/esm/domain/__tests__/SipLine.test.js +2 -3
  26. package/esm/index.js +42 -88
  27. package/esm/lib/WazoSessionDescriptionHandler.js +9 -15
  28. package/esm/service/IssueReporter.js +1 -3
  29. package/esm/service/__tests__/IssueReporter.test.js +0 -1
  30. package/esm/simple/Phone.js +1 -1
  31. package/esm/simple/Websocket.js +2 -2
  32. package/esm/simple/index.js +5 -4
  33. package/esm/simple/room/Room.js +15 -15
  34. package/esm/simple/room/SipRoom.js +1 -1
  35. package/esm/simple/room/Stream.js +1 -2
  36. package/esm/simple/room/__tests__/Participant.test.js +0 -2
  37. package/esm/simple/room/__tests__/RemoteParticipant.test.js +1 -2
  38. package/esm/types/api/auth.d.ts +2 -2
  39. package/esm/types/api/auth.d.ts.map +1 -1
  40. package/esm/types/api/call-logd.d.ts +3 -3
  41. package/esm/types/api/call-logd.d.ts.map +1 -1
  42. package/esm/types/api/chatd.d.ts +9 -22
  43. package/esm/types/api/chatd.d.ts.map +1 -1
  44. package/esm/types/api/dird.d.ts +21 -14
  45. package/esm/types/api/dird.d.ts.map +1 -1
  46. package/esm/types/checker/checks/ice-ipv4.d.ts.map +1 -1
  47. package/esm/types/checker/checks/index.d.ts +1 -1
  48. package/esm/types/checker/checks/symmetric-nat.d.ts.map +1 -1
  49. package/esm/types/checker/checks/webrtc-transport.d.ts +2 -2
  50. package/esm/types/checker/checks/webrtc-transport.d.ts.map +1 -1
  51. package/esm/types/domain/Agent.d.ts +1 -1
  52. package/esm/types/domain/Agent.d.ts.map +1 -1
  53. package/esm/types/domain/CallLog.d.ts +14 -26
  54. package/esm/types/domain/CallLog.d.ts.map +1 -1
  55. package/esm/types/domain/CallSession.d.ts +3 -4
  56. package/esm/types/domain/CallSession.d.ts.map +1 -1
  57. package/esm/types/domain/Contact.d.ts +8 -0
  58. package/esm/types/domain/Contact.d.ts.map +1 -1
  59. package/esm/types/domain/MeetingAuthorization.d.ts +6 -0
  60. package/esm/types/domain/MeetingAuthorization.d.ts.map +1 -1
  61. package/esm/types/domain/Phone/CTIPhone.d.ts +2 -0
  62. package/esm/types/domain/Phone/CTIPhone.d.ts.map +1 -1
  63. package/esm/types/domain/Phone/Phone.d.ts +12 -2
  64. package/esm/types/domain/Phone/Phone.d.ts.map +1 -1
  65. package/esm/types/domain/Phone/WebRTCPhone.d.ts +24 -20
  66. package/esm/types/domain/Phone/WebRTCPhone.d.ts.map +1 -1
  67. package/esm/types/domain/Room.d.ts +10 -12
  68. package/esm/types/domain/Room.d.ts.map +1 -1
  69. package/esm/types/domain/Session.d.ts +1 -1
  70. package/esm/types/domain/Session.d.ts.map +1 -1
  71. package/esm/types/domain/SipLine.d.ts +3 -3
  72. package/esm/types/domain/SipLine.d.ts.map +1 -1
  73. package/esm/types/domain/types.d.ts +64 -10
  74. package/esm/types/domain/types.d.ts.map +1 -1
  75. package/esm/types/index.d.ts +51 -314
  76. package/esm/types/index.d.ts.map +1 -1
  77. package/esm/types/lib/WazoSessionDescriptionHandler.d.ts +5 -4
  78. package/esm/types/lib/WazoSessionDescriptionHandler.d.ts.map +1 -1
  79. package/esm/types/service/CallApi.d.ts +3 -3
  80. package/esm/types/service/CallApi.d.ts.map +1 -1
  81. package/esm/types/service/IssueReporter.d.ts.map +1 -1
  82. package/esm/types/simple/Auth.d.ts +0 -40
  83. package/esm/types/simple/Auth.d.ts.map +1 -1
  84. package/esm/types/simple/Phone.d.ts +0 -113
  85. package/esm/types/simple/Phone.d.ts.map +1 -1
  86. package/esm/types/simple/Websocket.d.ts +0 -16
  87. package/esm/types/simple/Websocket.d.ts.map +1 -1
  88. package/esm/types/simple/index.d.ts +8 -8
  89. package/esm/types/simple/index.d.ts.map +1 -1
  90. package/esm/types/simple/room/Participant.d.ts +4 -3
  91. package/esm/types/simple/room/Participant.d.ts.map +1 -1
  92. package/esm/types/simple/room/Room.d.ts +29 -18
  93. package/esm/types/simple/room/Room.d.ts.map +1 -1
  94. package/esm/types/simple/room/SipRoom.d.ts +1 -1
  95. package/esm/types/simple/room/SipRoom.d.ts.map +1 -1
  96. package/esm/types/simple/room/Stream.d.ts +1 -1
  97. package/esm/types/simple/room/Stream.d.ts.map +1 -1
  98. package/esm/types/utils/PhoneNumberUtil.d.ts +1 -1
  99. package/esm/types/utils/PhoneNumberUtil.d.ts.map +1 -1
  100. package/esm/types/utils/api-requester.d.ts +1 -1
  101. package/esm/types/utils/api-requester.d.ts.map +1 -1
  102. package/esm/types/utils/sdp.d.ts +20 -5
  103. package/esm/types/utils/sdp.d.ts.map +1 -1
  104. package/esm/types/web-rtc-client.d.ts +51 -49
  105. package/esm/types/web-rtc-client.d.ts.map +1 -1
  106. package/esm/types/websocket-client.d.ts.map +1 -1
  107. package/esm/utils/__tests__/PhoneNumberUtil.test.js +0 -6
  108. package/esm/utils/__tests__/api-requester.test.js +0 -2
  109. package/esm/utils/__tests__/sdp.test.js +4 -18
  110. package/esm/utils/api-requester.js +1 -2
  111. package/esm/utils/sdp.js +8 -3
  112. package/esm/web-rtc-client.js +99 -136
  113. package/esm/websocket-client.js +1 -2
  114. package/index.js +1 -0
  115. package/lib/__tests__/api-client.test.js +0 -10
  116. package/lib/__tests__/web-rtc-client.test.js +2 -15
  117. package/lib/api/chatd.js +0 -1
  118. package/lib/api/dird.js +19 -22
  119. package/lib/checker/checks/ice-ipv4.js +2 -3
  120. package/lib/checker/checks/symmetric-nat.js +7 -4
  121. package/lib/domain/AdHocAPIConference.js +1 -1
  122. package/lib/domain/CallLog.js +1 -1
  123. package/lib/domain/Contact.js +2 -1
  124. package/lib/domain/MeetingAuthorization.js +6 -0
  125. package/lib/domain/Phone/CTIPhone.js +2 -0
  126. package/lib/domain/Phone/WebRTCPhone.js +16 -18
  127. package/lib/domain/Session.js +2 -2
  128. package/lib/domain/__tests__/Agent.test.js +0 -2
  129. package/lib/domain/__tests__/Call.test.js +0 -1
  130. package/lib/domain/__tests__/CallLog.test.js +0 -1
  131. package/lib/domain/__tests__/CallSession.test.js +1 -2
  132. package/lib/domain/__tests__/Contact.test.js +2 -4
  133. package/lib/domain/__tests__/IndirectTransfer.test.js +0 -1
  134. package/lib/domain/__tests__/Profile.test.js +0 -1
  135. package/lib/domain/__tests__/Room.test.js +1 -25
  136. package/lib/domain/__tests__/Session.test.js +13 -14
  137. package/lib/domain/__tests__/SipLine.test.js +2 -3
  138. package/lib/index.js +93 -99
  139. package/lib/lib/WazoSessionDescriptionHandler.js +9 -15
  140. package/lib/service/IssueReporter.js +1 -3
  141. package/lib/service/__tests__/IssueReporter.test.js +0 -1
  142. package/lib/simple/Phone.js +1 -1
  143. package/lib/simple/Websocket.js +2 -2
  144. package/lib/simple/index.js +2 -1
  145. package/lib/simple/room/Room.js +17 -15
  146. package/lib/simple/room/SipRoom.js +1 -1
  147. package/lib/simple/room/Stream.js +1 -2
  148. package/lib/simple/room/__tests__/Participant.test.js +0 -2
  149. package/lib/simple/room/__tests__/RemoteParticipant.test.js +1 -2
  150. package/lib/types/api/auth.d.ts +2 -2
  151. package/lib/types/api/auth.d.ts.map +1 -1
  152. package/lib/types/api/call-logd.d.ts +3 -3
  153. package/lib/types/api/call-logd.d.ts.map +1 -1
  154. package/lib/types/api/chatd.d.ts +9 -22
  155. package/lib/types/api/chatd.d.ts.map +1 -1
  156. package/lib/types/api/dird.d.ts +21 -14
  157. package/lib/types/api/dird.d.ts.map +1 -1
  158. package/lib/types/checker/checks/ice-ipv4.d.ts.map +1 -1
  159. package/lib/types/checker/checks/index.d.ts +1 -1
  160. package/lib/types/checker/checks/symmetric-nat.d.ts.map +1 -1
  161. package/lib/types/checker/checks/webrtc-transport.d.ts +2 -2
  162. package/lib/types/checker/checks/webrtc-transport.d.ts.map +1 -1
  163. package/lib/types/domain/Agent.d.ts +1 -1
  164. package/lib/types/domain/Agent.d.ts.map +1 -1
  165. package/lib/types/domain/CallLog.d.ts +14 -26
  166. package/lib/types/domain/CallLog.d.ts.map +1 -1
  167. package/lib/types/domain/CallSession.d.ts +3 -4
  168. package/lib/types/domain/CallSession.d.ts.map +1 -1
  169. package/lib/types/domain/Contact.d.ts +8 -0
  170. package/lib/types/domain/Contact.d.ts.map +1 -1
  171. package/lib/types/domain/MeetingAuthorization.d.ts +6 -0
  172. package/lib/types/domain/MeetingAuthorization.d.ts.map +1 -1
  173. package/lib/types/domain/Phone/CTIPhone.d.ts +2 -0
  174. package/lib/types/domain/Phone/CTIPhone.d.ts.map +1 -1
  175. package/lib/types/domain/Phone/Phone.d.ts +12 -2
  176. package/lib/types/domain/Phone/Phone.d.ts.map +1 -1
  177. package/lib/types/domain/Phone/WebRTCPhone.d.ts +24 -20
  178. package/lib/types/domain/Phone/WebRTCPhone.d.ts.map +1 -1
  179. package/lib/types/domain/Room.d.ts +10 -12
  180. package/lib/types/domain/Room.d.ts.map +1 -1
  181. package/lib/types/domain/Session.d.ts +1 -1
  182. package/lib/types/domain/Session.d.ts.map +1 -1
  183. package/lib/types/domain/SipLine.d.ts +3 -3
  184. package/lib/types/domain/SipLine.d.ts.map +1 -1
  185. package/lib/types/domain/types.d.ts +64 -10
  186. package/lib/types/domain/types.d.ts.map +1 -1
  187. package/lib/types/index.d.ts +51 -314
  188. package/lib/types/index.d.ts.map +1 -1
  189. package/lib/types/lib/WazoSessionDescriptionHandler.d.ts +5 -4
  190. package/lib/types/lib/WazoSessionDescriptionHandler.d.ts.map +1 -1
  191. package/lib/types/service/CallApi.d.ts +3 -3
  192. package/lib/types/service/CallApi.d.ts.map +1 -1
  193. package/lib/types/service/IssueReporter.d.ts.map +1 -1
  194. package/lib/types/simple/Auth.d.ts +0 -40
  195. package/lib/types/simple/Auth.d.ts.map +1 -1
  196. package/lib/types/simple/Phone.d.ts +0 -113
  197. package/lib/types/simple/Phone.d.ts.map +1 -1
  198. package/lib/types/simple/Websocket.d.ts +0 -16
  199. package/lib/types/simple/Websocket.d.ts.map +1 -1
  200. package/lib/types/simple/index.d.ts +8 -8
  201. package/lib/types/simple/index.d.ts.map +1 -1
  202. package/lib/types/simple/room/Participant.d.ts +4 -3
  203. package/lib/types/simple/room/Participant.d.ts.map +1 -1
  204. package/lib/types/simple/room/Room.d.ts +29 -18
  205. package/lib/types/simple/room/Room.d.ts.map +1 -1
  206. package/lib/types/simple/room/SipRoom.d.ts +1 -1
  207. package/lib/types/simple/room/SipRoom.d.ts.map +1 -1
  208. package/lib/types/simple/room/Stream.d.ts +1 -1
  209. package/lib/types/simple/room/Stream.d.ts.map +1 -1
  210. package/lib/types/utils/PhoneNumberUtil.d.ts +1 -1
  211. package/lib/types/utils/PhoneNumberUtil.d.ts.map +1 -1
  212. package/lib/types/utils/api-requester.d.ts +1 -1
  213. package/lib/types/utils/api-requester.d.ts.map +1 -1
  214. package/lib/types/utils/sdp.d.ts +20 -5
  215. package/lib/types/utils/sdp.d.ts.map +1 -1
  216. package/lib/types/web-rtc-client.d.ts +51 -49
  217. package/lib/types/web-rtc-client.d.ts.map +1 -1
  218. package/lib/types/websocket-client.d.ts.map +1 -1
  219. package/lib/utils/__tests__/PhoneNumberUtil.test.js +0 -6
  220. package/lib/utils/__tests__/api-requester.test.js +0 -2
  221. package/lib/utils/__tests__/sdp.test.js +6 -18
  222. package/lib/utils/api-requester.js +2 -3
  223. package/lib/utils/sdp.js +9 -3
  224. package/lib/web-rtc-client.js +105 -140
  225. package/lib/websocket-client.js +1 -2
  226. package/package.json +5 -18
  227. package/src/__tests__/api-client.test.ts +10 -19
  228. package/src/__tests__/web-rtc-client.test.ts +13 -25
  229. package/src/api/auth.ts +2 -5
  230. package/src/api/call-logd.ts +3 -3
  231. package/src/api/chatd.ts +10 -24
  232. package/src/api/dird.ts +33 -39
  233. package/src/checker/checks/ice-ipv4.ts +4 -5
  234. package/src/checker/checks/symmetric-nat.ts +11 -7
  235. package/src/checker/checks/webrtc-transport.ts +2 -2
  236. package/src/domain/AdHocAPIConference.ts +1 -1
  237. package/src/domain/Agent.ts +1 -1
  238. package/src/domain/CallLog.ts +19 -27
  239. package/src/domain/CallSession.ts +3 -4
  240. package/src/domain/Contact.ts +3 -1
  241. package/src/domain/MeetingAuthorization.ts +13 -0
  242. package/src/domain/Phone/CTIPhone.ts +4 -0
  243. package/src/domain/Phone/Phone.ts +11 -2
  244. package/src/domain/Phone/WebRTCPhone.ts +51 -52
  245. package/src/domain/Room.ts +12 -14
  246. package/src/domain/Session.ts +3 -3
  247. package/src/domain/SipLine.ts +3 -3
  248. package/src/domain/__tests__/Agent.test.ts +3 -5
  249. package/src/domain/__tests__/Call.test.ts +4 -5
  250. package/src/domain/__tests__/CallLog.test.ts +1 -3
  251. package/src/domain/__tests__/CallSession.test.ts +10 -11
  252. package/src/domain/__tests__/Contact.test.ts +2 -4
  253. package/src/domain/__tests__/IndirectTransfer.test.ts +6 -7
  254. package/src/domain/__tests__/Profile.test.ts +3 -4
  255. package/src/domain/__tests__/Room.test.ts +27 -51
  256. package/src/domain/__tests__/Session.test.ts +27 -28
  257. package/src/domain/__tests__/SipLine.test.ts +4 -5
  258. package/src/domain/types.ts +64 -11
  259. package/src/index.ts +51 -111
  260. package/src/lib/WazoSessionDescriptionHandler.ts +24 -30
  261. package/src/service/CallApi.ts +3 -3
  262. package/src/service/IssueReporter.ts +3 -5
  263. package/src/service/__tests__/IssueReporter.test.ts +1 -2
  264. package/src/simple/Auth.ts +1 -41
  265. package/src/simple/Phone.ts +9 -116
  266. package/src/simple/Websocket.ts +4 -20
  267. package/src/simple/index.ts +8 -7
  268. package/src/simple/room/Participant.ts +4 -3
  269. package/src/simple/room/Room.ts +44 -36
  270. package/src/simple/room/SipRoom.ts +4 -4
  271. package/src/simple/room/Stream.ts +2 -3
  272. package/src/simple/room/__tests__/Participant.test.ts +2 -4
  273. package/src/simple/room/__tests__/RemoteParticipant.test.ts +4 -3
  274. package/src/types/wazo.d.ts +1 -0
  275. package/src/utils/PhoneNumberUtil.ts +1 -1
  276. package/src/utils/__tests__/PhoneNumberUtil.test.ts +0 -6
  277. package/src/utils/__tests__/api-requester.test.ts +3 -4
  278. package/src/utils/__tests__/sdp.test.ts +16 -30
  279. package/src/utils/api-requester.ts +1 -4
  280. package/src/utils/sdp.ts +38 -17
  281. package/src/web-rtc-client.ts +196 -234
  282. package/src/websocket-client.ts +2 -3
  283. package/lib/.DS_Store +0 -0
@@ -25,7 +25,6 @@ describe('Session domain', () => {
25
25
  xivo_user_uuid: null,
26
26
  },
27
27
  };
28
- // @ts-ignore
29
28
  const session = Session.parse(plain);
30
29
  expect(session).toEqual(new Session({
31
30
  token: 'b93ae6bd-08d7-4001-9e61-057e72bbc4b3',
@@ -45,7 +44,7 @@ describe('Session domain', () => {
45
44
  const session = new Session({
46
45
  token: 'ref-12345',
47
46
  uuid: '1234',
48
- // @ts-expect-error
47
+ //
49
48
  profile: new Profile({
50
49
  voicemail: {
51
50
  id: 1234,
@@ -62,7 +61,7 @@ describe('Session domain', () => {
62
61
  const session = new Session({
63
62
  token: 'ref-12345',
64
63
  uuid: '1234',
65
- // @ts-expect-error
64
+ //
66
65
  profile: new Profile({
67
66
  lines: [new Line({
68
67
  id: 9012,
@@ -90,7 +89,7 @@ describe('Session domain', () => {
90
89
  const session = new Session({
91
90
  token: 'ref-12345',
92
91
  uuid: '1234',
93
- // @ts-expect-error
92
+ //
94
93
  profile: new Profile({
95
94
  lines: [new Line({
96
95
  id: 9012,
@@ -111,7 +110,7 @@ describe('Session domain', () => {
111
110
  const session = new Session({
112
111
  token: 'ref-12345',
113
112
  uuid: '1234',
114
- // @ts-expect-error
113
+ //
115
114
  profile: new Profile({
116
115
  voicemail: undefined,
117
116
  }),
@@ -162,7 +161,7 @@ describe('Session domain', () => {
162
161
  const session = new Session({
163
162
  token: 'ref-12345',
164
163
  uuid: '1234',
165
- // @ts-expect-error
164
+ //
166
165
  profile: new Profile({
167
166
  lines: [new Line({
168
167
  id: 9012,
@@ -224,7 +223,7 @@ describe('Session domain', () => {
224
223
  describe('and NO lines', () => {
225
224
  beforeEach(() => {
226
225
  A_SESSION = new Session({ ...A_SESSION,
227
- // @ts-expect-error
226
+ //
228
227
  profile: new Profile({
229
228
  lines: [],
230
229
  }),
@@ -244,10 +243,10 @@ describe('Session domain', () => {
244
243
  exten: '1',
245
244
  }],
246
245
  id: 1,
247
- // @ts-expect-error
246
+ //
248
247
  exten: 1,
249
248
  });
250
- // @ts-expect-error
249
+ //
251
250
  const profile = new Profile({
252
251
  lines: [line],
253
252
  });
@@ -270,7 +269,7 @@ describe('Session domain', () => {
270
269
  });
271
270
  describe('and NO lines', () => {
272
271
  beforeEach(() => {
273
- // @ts-expect-error
272
+ //
274
273
  const profile = new Profile({
275
274
  lines: [],
276
275
  });
@@ -292,10 +291,10 @@ describe('Session domain', () => {
292
291
  exten: '1',
293
292
  }],
294
293
  id: 1,
295
- // @ts-expect-error
294
+ //
296
295
  exten: 1,
297
296
  });
298
- // @ts-expect-error
297
+ //
299
298
  const profile = new Profile({
300
299
  lines: [line],
301
300
  });
@@ -327,10 +326,10 @@ describe('Session domain', () => {
327
326
  exten: '1',
328
327
  }],
329
328
  id: 1,
330
- // @ts-expect-error
329
+ //
331
330
  exten: 1,
332
331
  });
333
- // @ts-expect-error
332
+ //
334
333
  const profile = new Profile({
335
334
  lines: [line],
336
335
  });
@@ -1,9 +1,8 @@
1
- // @ts-nocheck
2
1
  import SipLine from '../SipLine';
3
2
  describe('SipLine domain', () => {
4
3
  describe('Endpoint (20.13 and higher)', () => {
5
4
  it('can tell if we have videoConference capabilities', () => {
6
- const getSipLine = endpointSectionOptions => new SipLine({
5
+ const getSipLine = (endpointSectionOptions) => new SipLine({
7
6
  endpointSectionOptions,
8
7
  });
9
8
  expect(getSipLine([['max_audio_streams', '1'], ['max_video_streams', '2']]).hasVideoConference()).toBe(true);
@@ -15,7 +14,7 @@ describe('SipLine domain', () => {
15
14
  });
16
15
  describe('Old Endpoint', () => {
17
16
  it('can tell if we have videoConference capabilities', () => {
18
- const getSipLine = options => new SipLine({
17
+ const getSipLine = (options) => new SipLine({
19
18
  options,
20
19
  });
21
20
  expect(getSipLine([['max_audio_streams', '1'], ['max_video_streams', '2']]).hasVideoConference()).toBe(true);
package/esm/index.js CHANGED
@@ -1,89 +1,43 @@
1
- import ApiClient from './api-client';
2
- import WebRTCClient from './web-rtc-client';
3
- import WebSocketClient, { SOCKET_EVENTS } from './websocket-client';
4
- import Emitter from './utils/Emitter';
5
- import IssueReporter from './service/IssueReporter';
6
- // Domain
7
- import BadResponse from './domain/BadResponse';
8
- import ServerError from './domain/ServerError';
9
- import SFUNotAvailableError from './domain/SFUNotAvailableError';
10
- import Call from './domain/Call';
11
- import CallLog from './domain/CallLog';
12
- import Recording from './domain/Recording';
13
- import ChatMessage from './domain/ChatMessage';
14
- import ChatRoom from './domain/ChatRoom';
15
- import Contact from './domain/Contact';
16
- import COUNTRIES from './domain/Country';
17
- import Features from './domain/Features';
18
- import ForwardOption, { FORWARD_KEYS } from './domain/ForwardOption';
19
- import Line from './domain/Line';
20
- import NotificationOptions from './domain/NotificationOptions';
21
- import Profile, { STATE as PROFILE_STATE, LINE_STATE } from './domain/Profile';
22
- import Session from './domain/Session';
23
- import Voicemail from './domain/Voicemail';
24
- import Relocation from './domain/Relocation';
25
- import Room from './domain/Room';
26
- import CallSession from './domain/CallSession';
27
- import IndirectTransfer from './domain/IndirectTransfer';
28
- import SwitchboardCall from './domain/SwitchboardCall';
29
- import WebRTCPhone from './domain/Phone/WebRTCPhone';
30
- import CTIPhone from './domain/Phone/CTIPhone';
31
- import Meeting from './domain/Meeting';
32
- import DebugDevice from './domain/Device/DebugDevice';
33
- import Checker from './checker/Checker';
34
- import { PhoneNumberUtil, PhoneNumberFormat, AsYouTypeFormatter, getDisplayableNumber, getCallableNumber } from './utils/PhoneNumberUtil';
35
- import ApiRequester from './utils/api-requester';
36
1
  import Wazo from './simple/index';
37
- import MeetingStatus from './domain/MeetingStatus';
38
- import MeetingAuthorization from './domain/MeetingAuthorization';
39
- import SipLine from './domain/SipLine';
40
- import getApiClient from './service/getApiClient';
41
- export default {
42
- ApiRequester,
43
- Checker,
44
- Emitter,
45
- PhoneNumberUtil,
46
- PhoneNumberFormat,
47
- AsYouTypeFormatter,
48
- getDisplayableNumber,
49
- getCallableNumber,
50
- WazoApiClient: ApiClient,
51
- WazoWebRTCClient: WebRTCClient,
52
- WazoWebSocketClient: WebSocketClient,
53
- BadResponse,
54
- ServerError,
55
- SFUNotAvailableError,
56
- Call,
57
- CallSession,
58
- CTIPhone,
59
- Features,
60
- IndirectTransfer,
61
- SwitchboardCall,
62
- CallLog,
63
- Recording,
64
- ChatMessage,
65
- ChatRoom,
66
- Contact,
67
- COUNTRIES,
68
- ForwardOption,
69
- Line,
70
- NotificationOptions,
71
- Profile,
72
- Session,
73
- Voicemail,
74
- Relocation,
75
- Room,
76
- IssueReporter,
77
- DebugDevice,
78
- PROFILE_STATE,
79
- FORWARD_KEYS,
80
- LINE_STATE,
81
- SOCKET_EVENTS,
82
- Wazo,
83
- WebRTCPhone,
84
- Meeting,
85
- MeetingAuthorization,
86
- MeetingStatus,
87
- SipLine,
88
- getApiClient,
89
- };
2
+ export { default as Emitter } from './utils/Emitter';
3
+ export { default as IssueReporter } from './service/IssueReporter';
4
+ export { default as BadResponse } from './domain/BadResponse';
5
+ export { default as ServerError } from './domain/ServerError';
6
+ export { default as SFUNotAvailableError } from './domain/SFUNotAvailableError';
7
+ export { default as Call } from './domain/Call';
8
+ export { default as CallLog } from './domain/CallLog';
9
+ export { default as Recording } from './domain/Recording';
10
+ export { default as ChatMessage } from './domain/ChatMessage';
11
+ export { default as ChatRoom } from './domain/ChatRoom';
12
+ export { default as Contact } from './domain/Contact';
13
+ export { default as COUNTRIES } from './domain/Country';
14
+ export { default as Features } from './domain/Features';
15
+ export { default as ForwardOption, FORWARD_KEYS } from './domain/ForwardOption';
16
+ export { default as Line } from './domain/Line';
17
+ export { default as NotificationOptions } from './domain/NotificationOptions';
18
+ export { default as Profile, STATE as PROFILE_STATE, LINE_STATE } from './domain/Profile';
19
+ export { default as Session } from './domain/Session';
20
+ export { default as Voicemail } from './domain/Voicemail';
21
+ export { default as Relocation } from './domain/Relocation';
22
+ export { default as Room } from './domain/Room';
23
+ export { default as CallSession } from './domain/CallSession';
24
+ export { default as IndirectTransfer } from './domain/IndirectTransfer';
25
+ export { default as SwitchboardCall } from './domain/SwitchboardCall';
26
+ export { default as WebRTCPhone } from './domain/Phone/WebRTCPhone';
27
+ export { default as CTIPhone } from './domain/Phone/CTIPhone';
28
+ export { default as Meeting } from './domain/Meeting';
29
+ export { default as DebugDevice } from './domain/Device/DebugDevice';
30
+ export { default as Checker } from './checker/Checker';
31
+ export * from './utils/PhoneNumberUtil';
32
+ export { default as ApiRequester } from './utils/api-requester';
33
+ export { default as MeetingStatus } from './domain/MeetingStatus';
34
+ export { default as MeetingAuthorization } from './domain/MeetingAuthorization';
35
+ export { default as SipLine } from './domain/SipLine';
36
+ export { default as getApiClient, setApiToken, setCurrentServer, setOnRefreshToken, setOnRefreshTokenError, setIsMobile } from './service/getApiClient';
37
+ export { default as CallApi } from './service/CallApi';
38
+ export { default as AdHocAPIConference } from './domain/AdHocAPIConference';
39
+ export { default as WebSocketClient, SOCKET_EVENTS } from './websocket-client';
40
+ export { default as WebRTCClient } from './web-rtc-client';
41
+ export { default as WazoApiClient } from './api-client';
42
+ export * from './domain/types';
43
+ export default Wazo;
@@ -55,7 +55,7 @@ class WazoSessionDescriptionHandler extends SessionDescriptionHandler {
55
55
  return Promise.reject(new Error('Peer connection closed.'));
56
56
  }
57
57
  // Callback on data channel creation
58
- // @ts-ignore
58
+ // @ts-ignore: private
59
59
  this.onDataChannel = options.onDataChannel;
60
60
  // ICE will restart upon applying an offer created with the iceRestart option
61
61
  const iceRestart = options.offerOptions ? options.offerOptions.iceRestart : false;
@@ -64,7 +64,7 @@ class WazoSessionDescriptionHandler extends SessionDescriptionHandler {
64
64
  // We should wait for ice when iceRestart (reinvite) or for the first invite
65
65
  // We shouldn't wait for ice when holding or resuming the call
66
66
  // We shouldn't wait for ice when receiving a reinvite (eg: pendingReinviteAck = true)
67
- // @ts-ignore
67
+ // @ts-ignore: private
68
68
  const shouldWaitForIce = !this.session.pendingReinviteAck && (iceRestart || 'constraints' in options);
69
69
  // ICE gathering timeout may be set on a per call basis, otherwise the configured default is used
70
70
  const iceTimeout = options.iceGatheringTimeout === undefined ? this.sessionDescriptionHandlerConfiguration?.iceGatheringTimeout : options.iceGatheringTimeout;
@@ -83,7 +83,7 @@ class WazoSessionDescriptionHandler extends SessionDescriptionHandler {
83
83
  done: true,
84
84
  });
85
85
  if (event.candidate) {
86
- // @ts-ignore @REEVALUATE
86
+ // @ts-ignore: we're possibly inject null candidates
87
87
  this.gatheredCandidates.push(parseCandidate(event.candidate.candidate));
88
88
  // When receiving a `srflx` or a `relay` candidate, consider the negotiation done.
89
89
  if (event.candidate.candidate.indexOf('srflx') !== -1 || event.candidate.candidate.indexOf('relay') !== -1) {
@@ -125,7 +125,6 @@ class WazoSessionDescriptionHandler extends SessionDescriptionHandler {
125
125
  return {
126
126
  type: description.type,
127
127
  // Fix sdp only when no candidates
128
- // @ts-ignore
129
128
  sdp: fixSdp(sdp, this.gatheredCandidates, options && options.constraints ? options.constraints.video : false),
130
129
  };
131
130
  })
@@ -171,16 +170,13 @@ class WazoSessionDescriptionHandler extends SessionDescriptionHandler {
171
170
  return;
172
171
  }
173
172
  // Closing senders via getLocalStreams, `getLocalStreams` is deprecated, we have to check if it exists.
174
- // @ts-ignore
175
173
  if (this.peerConnection?.getLocalStreams) {
176
- // @ts-ignore
177
174
  this.peerConnection?.getLocalStreams().forEach(stream => {
178
175
  stream.getTracks()
179
176
  .filter((track) => track.enabled)
180
177
  .forEach((track) => track.stop());
181
178
  });
182
179
  // Closing receivers via getRemoteStreams
183
- // @ts-ignore
184
180
  this.peerConnection?.getRemoteStreams().forEach(stream => {
185
181
  stream.getTracks()
186
182
  .filter((track) => track.enabled)
@@ -292,7 +288,6 @@ class WazoSessionDescriptionHandler extends SessionDescriptionHandler {
292
288
  })();
293
289
  // set the transceiver direction to the answer direction
294
290
  this._peerConnection.getTransceivers().forEach(transceiver => {
295
- // @ts-ignore
296
291
  if (transceiver.stopped) {
297
292
  return;
298
293
  }
@@ -352,11 +347,11 @@ class WazoSessionDescriptionHandler extends SessionDescriptionHandler {
352
347
  if (oldTrack) {
353
348
  oldTrack.stop();
354
349
  localStream.removeTrack(oldTrack);
355
- // @ts-ignore
350
+ // @ts-ignore: private
356
351
  SessionDescriptionHandler.dispatchRemoveTrackEvent(localStream, oldTrack);
357
352
  }
358
353
  localStream.addTrack(newTrack);
359
- // @ts-ignore
354
+ // @ts-ignore: private
360
355
  SessionDescriptionHandler.dispatchAddTrackEvent(localStream, newTrack);
361
356
  }).catch((error) => {
362
357
  this.logger.error(`SessionDescriptionHandler.setLocalMediaStream - failed to replace sender ${kind} track`);
@@ -383,7 +378,7 @@ class WazoSessionDescriptionHandler extends SessionDescriptionHandler {
383
378
  throw error;
384
379
  }
385
380
  localStream.addTrack(newTrack);
386
- // @ts-ignore
381
+ // @ts-ignore: private
387
382
  SessionDescriptionHandler.dispatchAddTrackEvent(localStream, newTrack);
388
383
  }));
389
384
  }
@@ -409,10 +404,10 @@ class WazoSessionDescriptionHandler extends SessionDescriptionHandler {
409
404
  let constraints = options.constraints ? { ...options.constraints,
410
405
  } : {};
411
406
  // if we already have a local media stream...
412
- // @ts-ignore
407
+ // @ts-ignore: private
413
408
  if (this.localMediaStreamConstraints) {
414
409
  // if constraints have not changed, do not get a new media stream
415
- // @ts-ignore
410
+ // @ts-ignore: private
416
411
  if (JSON.stringify(this.localMediaStreamConstraints.audio) === JSON.stringify(constraints.audio) && JSON.stringify(this.localMediaStreamConstraints.video) === JSON.stringify(constraints.video)) {
417
412
  return Promise.resolve();
418
413
  }
@@ -423,9 +418,8 @@ class WazoSessionDescriptionHandler extends SessionDescriptionHandler {
423
418
  audio: true,
424
419
  };
425
420
  }
426
- // @ts-ignore
421
+ // @ts-ignore: private
427
422
  this.localMediaStreamConstraints = constraints;
428
- // @ts-ignore
429
423
  return this.mediaStreamFactory(constraints, this).then(mediaStream => {
430
424
  this.setLocalMediaStream(mediaStream);
431
425
  return mediaStream;
@@ -126,7 +126,6 @@ class IssueReporter {
126
126
  errorMessage: lastArg.message,
127
127
  errorStack: lastArg.stack,
128
128
  errorType: lastArg.constructor.name,
129
- // @ts-ignore
130
129
  skipSendToRemote: lastArg.skipSendToRemote,
131
130
  };
132
131
  }
@@ -204,7 +203,7 @@ class IssueReporter {
204
203
  this.oldConsoleMethods = {};
205
204
  CONSOLE_METHODS.forEach((methodName) => {
206
205
  if (this.oldConsoleMethods) {
207
- // @ts-ignore
206
+ // @ts-ignore: keys
208
207
  // eslint-disable-next-line
209
208
  this.oldConsoleMethods[methodName] = console[methodName];
210
209
  }
@@ -297,7 +296,6 @@ class IssueReporter {
297
296
  },
298
297
  body,
299
298
  }).catch((e) => {
300
- // @ts-ignore
301
299
  e.skipSendToRemote = true;
302
300
  this.log('error', this._makeCategory('grafana'), 'Sending log to grafana, error', e);
303
301
  // wait at least 1 second, at most 50 seconds
@@ -18,7 +18,6 @@ describe('IssueReporter', () => {
18
18
  });
19
19
  beforeEach(() => {
20
20
  jest.resetAllMocks();
21
- // @ts-expect-error
22
21
  realFetch.mockImplementation(() => () => ({
23
22
  catch: () => { },
24
23
  }));
@@ -65,7 +65,7 @@ class Phone extends Emitter {
65
65
  super();
66
66
  // Sugar syntax for `Wazo.Phone.EVENT_NAME`
67
67
  Object.keys(PHONE_EVENTS).forEach((key) => {
68
- // @ts-ignore
68
+ // @ts-ignore: keys
69
69
  this[key] = PHONE_EVENTS[key];
70
70
  });
71
71
  this.SessionState = SessionState;
@@ -17,11 +17,11 @@ class Websocket extends Emitter {
17
17
  super();
18
18
  // Sugar syntax for `Wazo.WebSocket.EVENT_NAME`
19
19
  Object.keys(OTHER_EVENTS).forEach(key => {
20
- // @ts-ignore
20
+ // @ts-ignore: keys
21
21
  this[key] = OTHER_EVENTS[key];
22
22
  });
23
23
  Object.keys(SOCKET_EVENTS).forEach(key => {
24
- // @ts-ignore
24
+ // @ts-ignore: keys
25
25
  this[key] = SOCKET_EVENTS[key];
26
26
  });
27
27
  this.eventLists = WazoWebSocketClient.eventLists;
@@ -6,6 +6,7 @@ import Room from './room/Room';
6
6
  import SipRoom from './room/SipRoom';
7
7
  import RemoteParticipant from './room/RemoteParticipant';
8
8
  import LocalParticipant from './room/LocalParticipant';
9
+ import Participant from './room/Participant';
9
10
  import Stream from './room/Stream';
10
11
  import Directory from './Directory';
11
12
  import Configuration from './Configuration';
@@ -39,13 +40,14 @@ import Features from '../domain/Features';
39
40
  import Meeting from '../domain/Meeting';
40
41
  import Checker from '../checker/Checker';
41
42
  const Wazo = {
42
- Auth: Auth,
43
- Phone: Phone,
44
- Websocket: Websocket,
43
+ Auth,
44
+ Phone,
45
+ Websocket,
45
46
  Room,
46
47
  SipRoom,
47
48
  RemoteParticipant,
48
49
  LocalParticipant,
50
+ Participant,
49
51
  Stream,
50
52
  createLocalVideoStream,
51
53
  createLocalAudioStream,
@@ -124,7 +126,6 @@ const Wazo = {
124
126
  NoDomainNameError,
125
127
  };
126
128
  if (window) {
127
- // @ts-ignore
128
129
  window.Wazo = Wazo;
129
130
  }
130
131
  if (global) {
@@ -141,8 +141,9 @@ class Room extends Emitter {
141
141
  }
142
142
  });
143
143
  const callSession = await Wazo.Phone.call(extension, withCamera, null, audioOnly, true);
144
+ // @ts-fix: heads up: added an extra `null` here
144
145
  // eslint-disable-next-line no-param-reassign
145
- room = new Room(callSession, extension, null, null, extra);
146
+ room = new Room(callSession, extension, null, null, null, extra);
146
147
  // Wait for the call to be accepted
147
148
  await new Promise((resolve, reject) => {
148
149
  Wazo.Phone.once(Wazo.Phone.ON_CALL_ACCEPTED, resolve);
@@ -164,8 +165,8 @@ class Room extends Emitter {
164
165
  name: conference ? conference.name : null,
165
166
  });
166
167
  if (conference) {
167
- room.setSourceId(conference.sourceId);
168
- room.setName(conference.name);
168
+ room.setSourceId(parseInt(`${conference.sourceId}`, 10));
169
+ room.setName(`${conference.name}`);
169
170
  }
170
171
  }
171
172
  else if (meeting) {
@@ -362,8 +363,7 @@ class Room extends Emitter {
362
363
  return;
363
364
  }
364
365
  // Retrieve mapping
365
- // @ts-ignore
366
- Wazo.Phone.phone.currentSipSession.sessionDescriptionHandler.on('setDescription', ({ type, sdp: rawSdp, }) => {
366
+ Wazo.Phone.phone.currentSipSession.sessionDescriptionHandler?.on('setDescription', ({ type, sdp: rawSdp, }) => {
367
367
  if (type !== 'offer') {
368
368
  return;
369
369
  }
@@ -425,10 +425,11 @@ class Room extends Emitter {
425
425
  }
426
426
  _mapMsid(rawSdp) {
427
427
  const sdp = sdpParser.parse(rawSdp);
428
- const labelMsidArray = sdp.media.filter((media) => !!media.label).map(({ label, msid, }) => ({
428
+ // @ts-ignore: Property 'label' does not exist
429
+ const labelMsidArray = sdp.media.filter((media) => !!media.label).map(({ label, msid }) => ({
429
430
  label: String(label),
430
- streamId: msid.split(' ')[0],
431
- trackId: msid.split(' ')[1],
431
+ streamId: msid?.split(' ')[0],
432
+ trackId: msid?.split(' ')[1],
432
433
  }));
433
434
  labelMsidArray.forEach(({ label, streamId, trackId, }) => {
434
435
  this._callIdStreamIdMap[String(label)] = {
@@ -455,13 +456,11 @@ class Room extends Emitter {
455
456
  [this.ON_AUDIO_STREAM, this.ON_VIDEO_STREAM, this.ON_REMOVE_STREAM].forEach(event => Wazo.Phone.on(event, (...args) => this.eventEmitter.emit.apply(this.eventEmitter, [event, ...args])));
456
457
  }
457
458
  _onMessage(message) {
458
- // @ts-ignore
459
459
  if (message.method !== 'MESSAGE') {
460
460
  return null;
461
461
  }
462
462
  let body;
463
463
  try {
464
- // @ts-ignore
465
464
  body = JSON.parse(message.body);
466
465
  }
467
466
  catch (e) {
@@ -642,10 +641,9 @@ class Room extends Emitter {
642
641
  _onParticipantTrackUpdate(oldParticipant, update) {
643
642
  const newParticipant = oldParticipant;
644
643
  const { trackId, streamId, } = this._callIdStreamIdMap[newParticipant.callId] || {};
645
- // @ts-ignore
646
- const pc = Wazo.Phone.phone.currentSipSession.sessionDescriptionHandler.peerConnection;
644
+ const pc = Wazo.Phone.phone?.currentSipSession?.sessionDescriptionHandler?.peerConnection;
647
645
  // Can't use `getReceivers` here because on FF we make the mapping based on the streamId
648
- const stream = pc.getRemoteStreams().find((someStream) => someStream.id === streamId || someStream.getTracks().some((track) => track.id === trackId));
646
+ const stream = pc.getRemoteStreams().find(someStream => someStream.id === streamId || someStream.getTracks().some(track => track.id === trackId));
649
647
  if (update === 'downgrade') {
650
648
  newParticipant.resetStreams([]);
651
649
  newParticipant.onStreamUnSubscribed(stream);
@@ -669,11 +667,13 @@ class Room extends Emitter {
669
667
  }
670
668
  const streamId = this._getStreamIdFrTrackId(trackId);
671
669
  const key = this._getUnassociatedMapIdFromTrackIdOrStreamId(trackId, streamId);
672
- const stream = this._unassociatedVideoStreams[key];
670
+ const stream = key ? this._unassociatedVideoStreams[key] : null;
673
671
  if (stream) {
674
672
  // Try to associate stream
675
673
  this._associateStreamTo(stream, participant);
676
- delete this._unassociatedVideoStreams[key];
674
+ if (key) {
675
+ delete this._unassociatedVideoStreams[key];
676
+ }
677
677
  delete this._unassociatedParticipants[participant.callId];
678
678
  }
679
679
  }
@@ -37,7 +37,7 @@ class SipRoom extends Room {
37
37
  this.sendUnMuteStatus();
38
38
  }
39
39
  getLocalGuestName() {
40
- // @ts-ignore
40
+ // @ts-ignore: private
41
41
  return Wazo.Phone.phone?.client.userAgent?.options.displayName || null;
42
42
  }
43
43
  // Overridden to not listen to websocket messages
@@ -24,9 +24,8 @@ class Stream {
24
24
  }
25
25
  element.onloadedmetadata = () => {
26
26
  const tracks = this.htmlStream ? this.htmlStream.getVideoTracks() : [];
27
- tracks.forEach(track => {
27
+ tracks.forEach((track) => {
28
28
  track.enabled = true;
29
- // @ts-ignore
30
29
  track.loaded = true;
31
30
  });
32
31
  };
@@ -24,7 +24,6 @@ describe('Participant', () => {
24
24
  const room = new Room();
25
25
  room.setMeetingUuid(meetingUuid);
26
26
  const banMeetingParticipant = jest.fn();
27
- // @ts-expect-error
28
27
  getApiClient.mockImplementation(() => ({
29
28
  calld: {
30
29
  banMeetingParticipant,
@@ -50,7 +49,6 @@ describe('Participant', () => {
50
49
  const room = new Room();
51
50
  room.setMeetingUuid(meetingUuid);
52
51
  const banMeetingParticipant = jest.fn();
53
- // @ts-expect-error
54
52
  getApiClient.mockImplementation(() => ({
55
53
  calld: {
56
54
  banMeetingParticipant,
@@ -3,8 +3,7 @@ import Wazo from '../../index';
3
3
  describe('RemoteParticipant', () => {
4
4
  it('should fall back on number when name is <unknown>', () => {
5
5
  const number = '1234';
6
- // @ts-expect-error
7
- const participant = new Wazo.RemoteParticipant(null, {
6
+ const participant = new Wazo.RemoteParticipant({}, {
8
7
  caller_id_name: '<unknown>',
9
8
  caller_id_number: number,
10
9
  });
@@ -14,8 +14,8 @@ type LoginParams = {
14
14
  domainName?: string;
15
15
  };
16
16
  type SendResetPasswordArgs = {
17
- username: string;
18
- email: string;
17
+ username?: string;
18
+ email?: string;
19
19
  };
20
20
  export interface AuthD {
21
21
  checkToken: (token: Token) => Promise<boolean>;
@@ -1 +1 @@
1
- {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/api/auth.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,mBAAmB,EAAE,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACrN,OAAO,OAAqB,MAAM,mBAAmB,CAAC;AAEtD,eAAO,MAAM,oBAAoB,cAAc,CAAC;AAChD,eAAO,MAAM,iBAAiB,cAAc,CAAC;AAC7C,eAAO,MAAM,kBAAkB,OAAO,CAAC;AAEvC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,KAAK,qBAAqB,GAAG;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,WAAW,KAAK;IACpB,UAAU,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,C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AAE,GAAG,CAAC,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7G,YAAY,EAAE,MAAM,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAClD,YAAY,EAAE,CAAC,UAAU,EAAE,IAAI,KAAK,OAAO,CAAC,OAAO,GAAG,YAAY,CAAC,CAAC;IACpE,YAAY,EAAE,CAAC,QAAQ,EAAE,IAAI,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IAC/C,gBAAgB,EAAE,CAAC,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACxE,kBAAkB,EAAE,CAAC,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1E,mBAAmB,EAAE,CAAC,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1E;iCAEwB,YAAY,WAAW,MAAM,KAAG,KAAK;AAA9D,wBA6LI"}
@@ -1,10 +1,10 @@
1
1
  import ApiRequester from '../utils/api-requester';
2
2
  import CallLog from '../domain/CallLog';
3
3
  export interface CallLogD {
4
- search: (search: string, limit: number) => Promise<Array<CallLog>>;
5
- searchBy: (field: string, value: string, limit: number) => Promise<Array<CallLog>>;
4
+ search: (search: string, limit?: number) => Promise<Array<CallLog>>;
5
+ searchBy: (field: string, value: string, limit?: number) => Promise<Array<CallLog>>;
6
6
  listCallLogs: (offset?: number, limit?: number) => Promise<Array<CallLog>>;
7
- listDistinctCallLogs: (offset: number, limit: number, distinct?: string) => Promise<Array<CallLog>>;
7
+ listDistinctCallLogs: (offset: number, limit?: number, distinct?: string) => Promise<Array<CallLog>>;
8
8
  listCallLogsFromDate: (from: Date, number: string) => Promise<Array<CallLog>>;
9
9
  }
10
10
  declare const _default: (client: ApiRequester, baseUrl: string) => CallLogD;