@wazo/sdk 1.0.0-alpha.8 → 1.0.0-alpha.9

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 (50) hide show
  1. package/README.md +16 -7
  2. package/dist/wazo-sdk.js +2 -2
  3. package/esm/api/auth.js +3 -0
  4. package/esm/domain/CallLog.js +2 -3
  5. package/esm/domain/Phone/WebRTCPhone.js +29 -27
  6. package/esm/simple/Auth.js +13 -3
  7. package/esm/simple/Phone.js +2 -2
  8. package/esm/types/api/auth.d.ts +3 -0
  9. package/esm/types/api/auth.d.ts.map +1 -1
  10. package/esm/types/domain/CallLog.d.ts.map +1 -1
  11. package/esm/types/domain/Phone/WebRTCPhone.d.ts +3 -3
  12. package/esm/types/domain/Phone/WebRTCPhone.d.ts.map +1 -1
  13. package/esm/types/simple/Auth.d.ts +6 -1
  14. package/esm/types/simple/Auth.d.ts.map +1 -1
  15. package/esm/types/simple/Phone.d.ts +2 -2
  16. package/esm/types/simple/Phone.d.ts.map +1 -1
  17. package/esm/types/utils/sdp.d.ts.map +1 -1
  18. package/esm/types/voice/call.d.ts.map +1 -1
  19. package/esm/types/web-rtc-client.d.ts.map +1 -1
  20. package/esm/utils/sdp.js +8 -7
  21. package/esm/voice/call.js +1 -2
  22. package/esm/web-rtc-client.js +23 -26
  23. package/lib/api/auth.js +3 -0
  24. package/lib/domain/CallLog.js +2 -3
  25. package/lib/domain/Phone/WebRTCPhone.js +29 -27
  26. package/lib/simple/Auth.js +15 -3
  27. package/lib/types/api/auth.d.ts +3 -0
  28. package/lib/types/api/auth.d.ts.map +1 -1
  29. package/lib/types/domain/CallLog.d.ts.map +1 -1
  30. package/lib/types/domain/Phone/WebRTCPhone.d.ts +3 -3
  31. package/lib/types/domain/Phone/WebRTCPhone.d.ts.map +1 -1
  32. package/lib/types/simple/Auth.d.ts +6 -1
  33. package/lib/types/simple/Auth.d.ts.map +1 -1
  34. package/lib/types/simple/Phone.d.ts +2 -2
  35. package/lib/types/simple/Phone.d.ts.map +1 -1
  36. package/lib/types/utils/sdp.d.ts.map +1 -1
  37. package/lib/types/voice/call.d.ts.map +1 -1
  38. package/lib/types/web-rtc-client.d.ts.map +1 -1
  39. package/lib/utils/sdp.js +7 -6
  40. package/lib/voice/call.js +1 -2
  41. package/lib/web-rtc-client.js +22 -25
  42. package/package.json +1 -1
  43. package/src/api/auth.ts +5 -0
  44. package/src/domain/CallLog.ts +2 -3
  45. package/src/domain/Phone/WebRTCPhone.ts +33 -31
  46. package/src/simple/Auth.ts +15 -3
  47. package/src/simple/Phone.ts +3 -3
  48. package/src/utils/sdp.ts +9 -8
  49. package/src/voice/call.ts +2 -3
  50. package/src/web-rtc-client.ts +24 -25
package/README.md CHANGED
@@ -272,6 +272,15 @@ const session = await Wazo.Auth.samlLogIn(samlSessionId);
272
272
 
273
273
  Returns as `Wazo.domain.Session`. This object contains, among other information, the user's token.
274
274
 
275
+
276
+ ```js
277
+ const logoutResponse = await Wazo.Auth.samlLogOut();
278
+ ```
279
+
280
+ Returns an object that contains a `location`
281
+
282
+ `location` is the URL to open for the user to log out from their identity provider.
283
+
275
284
  #### Validating a token
276
285
 
277
286
  ```js
@@ -647,7 +656,7 @@ Depending on your environment you can import:
647
656
  ##### WebRTC Library
648
657
 
649
658
  ```js
650
- import { WazoWebRTCClient } from '@wazo/sdk';
659
+ import { WebRTCClient } from '@wazo/sdk';
651
660
  ```
652
661
 
653
662
  ##### WebSocket Library
@@ -947,11 +956,11 @@ const results = await requester.call('dird/0.1/personal');
947
956
  This sample describes the very first steps to place a call using WebRTC.
948
957
 
949
958
  ```js
950
- import { WazoWebRTCClient } from '@wazo/sdk'; // import the library
959
+ import { WebRTCClient } from '@wazo/sdk'; // import the library
951
960
 
952
961
  const session = await client.auth.logIn({ ... }); // log in
953
962
 
954
- const client = new WazoWebRTCClient({
963
+ const client = new WebRTCClient({
955
964
  displayName: 'From WEB',
956
965
  host: 'stack.example.com',
957
966
  websocketSip: 'other.url.com', // Allows to connect throught another URL than host (default to `host` is not set).
@@ -1012,7 +1021,7 @@ const uaConfigOverrides = {
1012
1021
  }
1013
1022
  }
1014
1023
 
1015
- const client = new WazoWebRTCClient(config, session, /* optional */ uaConfigOverrides);
1024
+ const client = new WebRTCClient(config, session, /* optional */ uaConfigOverrides);
1016
1025
  ```
1017
1026
 
1018
1027
  #### Basic client features
@@ -1138,12 +1147,12 @@ client.close();
1138
1147
  Higher level of abstraction to use the `WebRtcClient`.
1139
1148
 
1140
1149
  ```js
1141
- import { WazoWebRTCClient, WebRTCPhone } from '@wazo/sdk';
1150
+ import { WebRTCClient, WebRTCPhone } from '@wazo/sdk';
1142
1151
 
1143
- const webRtcClient = new WazoWebRTCClient({/* See above for parameters */});
1152
+ const webRtcClient = new WebRTCClient({/* See above for parameters */});
1144
1153
 
1145
1154
  const phone = new WebRTCPhone(
1146
- webRtcClient: WazoWebRTCClient, // Instance of WazoWebRTCClient
1155
+ webRtcClient: WebRTCClient, // Instance of WebRTCClient
1147
1156
  audioDeviceOutput: string, // The output device used to play audio
1148
1157
  allowVideo: boolean, // Allow to send and receive video
1149
1158
  audioDeviceRing, // The output device used to play ringtones