@wazo/sdk 0.38.3 → 0.38.6

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 (93) hide show
  1. package/README.md +10 -10
  2. package/dist/wazo-sdk.js +2 -2
  3. package/esm/__tests__/api-client.test.js +6 -0
  4. package/esm/__tests__/web-rtc-client.test.js +66 -2
  5. package/esm/api/calld.js +6 -0
  6. package/esm/api/ctid-ng.js +6 -0
  7. package/esm/api-client.js +6 -0
  8. package/esm/checker/Checker.js +16 -2
  9. package/esm/checker/checks/aor.js +6 -0
  10. package/esm/checker/checks/api.js +6 -0
  11. package/esm/checker/checks/index.js +16 -2
  12. package/esm/checker/checks/webrtc-transport.js +16 -2
  13. package/esm/checker/checks/webrtc.js +16 -2
  14. package/esm/domain/AdHocAPIConference.js +6 -0
  15. package/esm/domain/Call.js +6 -0
  16. package/esm/domain/CallSession.js +1 -1
  17. package/esm/domain/Features.js +6 -0
  18. package/esm/domain/Phone/CTIPhone.js +7 -1
  19. package/esm/domain/Phone/WebRTCPhone.js +3 -3
  20. package/esm/domain/__tests__/Call.test.js +6 -0
  21. package/esm/domain/__tests__/CallSession.test.js +1 -1
  22. package/esm/domain/__tests__/IndirectTransfer.test.js +1 -1
  23. package/esm/domain/__tests__/Line.test.js +5 -5
  24. package/esm/domain/__tests__/Room.test.js +1 -1
  25. package/esm/index.js +24 -11
  26. package/esm/lib/WazoSessionDescriptionHandler.js +8 -0
  27. package/esm/service/CallApi.js +6 -0
  28. package/esm/service/getApiClient.js +6 -0
  29. package/esm/simple/Auth.js +24 -11
  30. package/esm/simple/Configuration.js +24 -11
  31. package/esm/simple/Directory.js +6 -0
  32. package/esm/simple/Phone.js +24 -11
  33. package/esm/simple/Softphone.js +5 -6
  34. package/esm/simple/index.js +24 -11
  35. package/esm/simple/room/LocalParticipant.js +24 -11
  36. package/esm/simple/room/Participant.js +24 -11
  37. package/esm/simple/room/RemoteParticipant.js +24 -11
  38. package/esm/simple/room/Room.js +24 -11
  39. package/esm/simple/room/SipRoom.js +24 -11
  40. package/esm/simple/room/Stream.js +24 -11
  41. package/esm/simple/room/__tests__/RemoteParticipant.test.js +24 -11
  42. package/esm/simple/utils.js +24 -11
  43. package/esm/web-rtc-client.js +16 -2
  44. package/lib/__tests__/api-client.test.js +6 -0
  45. package/lib/__tests__/web-rtc-client.test.js +66 -2
  46. package/lib/api/calld.js +6 -0
  47. package/lib/api/ctid-ng.js +6 -0
  48. package/lib/api-client.js +6 -0
  49. package/lib/checker/Checker.js +16 -2
  50. package/lib/checker/checks/aor.js +6 -0
  51. package/lib/checker/checks/api.js +6 -0
  52. package/lib/checker/checks/index.js +16 -2
  53. package/lib/checker/checks/webrtc-transport.js +16 -2
  54. package/lib/checker/checks/webrtc.js +16 -2
  55. package/lib/domain/AdHocAPIConference.js +6 -0
  56. package/lib/domain/Call.js +6 -0
  57. package/lib/domain/CallSession.js +1 -1
  58. package/lib/domain/Features.js +6 -0
  59. package/lib/domain/Phone/CTIPhone.js +7 -1
  60. package/lib/domain/Phone/WebRTCPhone.js +3 -3
  61. package/lib/domain/__tests__/Call.test.js +6 -0
  62. package/lib/domain/__tests__/CallSession.test.js +1 -1
  63. package/lib/domain/__tests__/IndirectTransfer.test.js +1 -1
  64. package/lib/domain/__tests__/Line.test.js +5 -5
  65. package/lib/domain/__tests__/Room.test.js +1 -1
  66. package/lib/index.js +24 -11
  67. package/lib/lib/WazoSessionDescriptionHandler.js +8 -0
  68. package/lib/service/CallApi.js +6 -0
  69. package/lib/service/getApiClient.js +6 -0
  70. package/lib/simple/Auth.js +24 -11
  71. package/lib/simple/Configuration.js +24 -11
  72. package/lib/simple/Directory.js +6 -0
  73. package/lib/simple/Phone.js +24 -11
  74. package/lib/simple/Softphone.js +5 -6
  75. package/lib/simple/index.js +24 -11
  76. package/lib/simple/room/LocalParticipant.js +24 -11
  77. package/lib/simple/room/Participant.js +24 -11
  78. package/lib/simple/room/RemoteParticipant.js +24 -11
  79. package/lib/simple/room/Room.js +24 -11
  80. package/lib/simple/room/SipRoom.js +24 -11
  81. package/lib/simple/room/Stream.js +24 -11
  82. package/lib/simple/room/__tests__/RemoteParticipant.test.js +24 -11
  83. package/lib/simple/utils.js +24 -11
  84. package/lib/web-rtc-client.js +16 -2
  85. package/package.json +1 -1
  86. package/src/__tests__/web-rtc-client.test.js +50 -0
  87. package/src/domain/Call.js +6 -0
  88. package/src/domain/CallSession.js +1 -1
  89. package/src/domain/Phone/WebRTCPhone.js +2 -2
  90. package/src/domain/__tests__/Line.test.js +5 -5
  91. package/src/lib/WazoSessionDescriptionHandler.js +8 -0
  92. package/src/simple/Softphone.js +5 -6
  93. package/src/web-rtc-client.js +2 -2
package/README.md CHANGED
@@ -777,8 +777,8 @@ Softphone.onCallLocallyAnswered = call => {
777
777
  // Invoked when the user accepts the call locally
778
778
  };
779
779
 
780
- Softphone.onCallRemotelyAnswered = call => {
781
- // Invoked when the other party accepts the call
780
+ Softphone.onCallEstablished = call => {
781
+ // Invoked when the call is up
782
782
  };
783
783
 
784
784
  Softphone.onOutgoingCallMade = call => {
@@ -797,10 +797,6 @@ Softphone.onCardSaved = card => {
797
797
  // Invoked when the user save the card at the end of the call
798
798
  };
799
799
 
800
- Softphone.onCallMade = call => {
801
- // Invoked when an outgoing call is made
802
- };
803
-
804
800
  Softphone.onSearchOptions = (fieldId: string, query: string) => {
805
801
  // Invoked when the user is making a search from an Autocomplete field in the card form
806
802
  // We need to call `onOptionsResults` here to send results to the softphone
@@ -890,6 +886,10 @@ Softphone.onAuthenticated = session => {
890
886
  Softphone.onLoggedOut = session => {
891
887
  // Invoked when the user is is logged out in the softphone
892
888
  };
889
+
890
+ Softphone.onIFrameLoaded = session => {
891
+ // Invoked when the iframe is loaded
892
+ };
893
893
  ```
894
894
 
895
895
  ## Advanced API
@@ -928,7 +928,7 @@ import { WazoWebSocketClient } from '@wazo/sdk';
928
928
 
929
929
  ```js
930
930
  const client = new WazoApiClient({
931
- server: 'stack.dev.wazo.io', // required string
931
+ server: 'stack.example.com', // required string
932
932
  agent: null, // http(s).Agent instance, allows custom proxy, unsecured https, certificate etc.
933
933
  clientId: null, // Set an identifier for your app when using refreshToken
934
934
  isMobile: false,
@@ -1196,7 +1196,7 @@ Use this generic method to request endpoints directly.
1196
1196
 
1197
1197
  ```js
1198
1198
  const requester = new ApiRequester({
1199
- server: 'stack.dev.wazo.io', // Engine server
1199
+ server: 'stack.example.com', // Engine server
1200
1200
  refreshTokenCallback: () => {}, // Called when the token is refreshed
1201
1201
  clientId: 'my-id', // ClientId used for refreshToken
1202
1202
  agent: null, // http(s).Agent instance, allows custom proxy, unsecured https, certificate etc.
@@ -1218,7 +1218,7 @@ const session = await client.auth.logIn({ ... }); // log in
1218
1218
 
1219
1219
  const client = new WazoWebRTCClient({
1220
1220
  displayName: 'From WEB',
1221
- host: 'stack.dev.wazo.io',
1221
+ host: 'stack.example.com',
1222
1222
  websocketSip: 'other.url.com', // Allows to connect throught another URL than host (default to `host` is not set).
1223
1223
  media: {
1224
1224
  audio: boolean,
@@ -1636,7 +1636,7 @@ phone.changeRingDevice(someDevice: string);
1636
1636
  ##### Updating audio input device
1637
1637
 
1638
1638
  ```js
1639
- phone.changeAudioInputDevice(someDevice: string);
1639
+ phone.changeAudioInputDevice(someDevice: string, session: ?Inviter, force: ?boolean);
1640
1640
  ```
1641
1641
 
1642
1642
  ##### Updating video input device