@wazo/sdk 0.37.34 → 0.37.37
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.
- package/README.md +8 -2
- package/dist/wazo-sdk.js +2 -2
- package/esm/__tests__/api-client.test.js +17 -0
- package/esm/__tests__/web-rtc-client.test.js +17 -0
- package/esm/api/auth.js +7 -1
- package/esm/api/call-logd.js +6 -0
- package/esm/api/chatd.js +6 -0
- package/esm/api/confd.js +6 -0
- package/esm/api-client.js +17 -0
- package/esm/checker/Checker.js +17 -0
- package/esm/checker/checks/aor.js +17 -0
- package/esm/checker/checks/api.js +17 -0
- package/esm/checker/checks/index.js +17 -0
- package/esm/checker/checks/webrtc-transport.js +17 -0
- package/esm/checker/checks/webrtc.js +17 -0
- package/esm/domain/AdHocAPIConference.js +21 -0
- package/esm/domain/CallLog.js +6 -0
- package/esm/domain/CallSession.js +14 -0
- package/esm/domain/Features.js +17 -0
- package/esm/domain/Phone/CTIPhone.js +31 -0
- package/esm/domain/Phone/WebRTCPhone.js +42 -11
- package/esm/domain/Profile.js +6 -0
- package/esm/domain/__tests__/CallLog.test.js +10 -0
- package/esm/domain/__tests__/CallSession.test.js +14 -0
- package/esm/domain/__tests__/IndirectTransfer.test.js +14 -0
- package/esm/domain/__tests__/Profile.test.js +6 -0
- package/esm/domain/__tests__/Room.test.js +14 -0
- package/esm/domain/__tests__/Session.test.js +6 -0
- package/esm/index.js +83 -18
- package/esm/service/CallApi.js +17 -0
- package/esm/service/getApiClient.js +17 -0
- package/esm/simple/Auth.js +84 -19
- package/esm/simple/Configuration.js +83 -18
- package/esm/simple/Directory.js +17 -0
- package/esm/simple/Phone.js +83 -18
- package/esm/simple/index.js +83 -18
- package/esm/simple/room/LocalParticipant.js +83 -18
- package/esm/simple/room/Participant.js +83 -18
- package/esm/simple/room/RemoteParticipant.js +83 -18
- package/esm/simple/room/Room.js +83 -18
- package/esm/simple/room/SipRoom.js +83 -18
- package/esm/simple/room/Stream.js +83 -18
- package/esm/simple/room/__tests__/RemoteParticipant.test.js +83 -18
- package/esm/simple/utils.js +83 -18
- package/esm/web-rtc-client.js +17 -0
- package/lib/__tests__/api-client.test.js +17 -0
- package/lib/__tests__/web-rtc-client.test.js +17 -0
- package/lib/api/auth.js +8 -0
- package/lib/api/call-logd.js +6 -0
- package/lib/api/chatd.js +6 -0
- package/lib/api/confd.js +6 -0
- package/lib/api-client.js +17 -0
- package/lib/checker/Checker.js +17 -0
- package/lib/checker/checks/aor.js +17 -0
- package/lib/checker/checks/api.js +17 -0
- package/lib/checker/checks/index.js +17 -0
- package/lib/checker/checks/webrtc-transport.js +17 -0
- package/lib/checker/checks/webrtc.js +17 -0
- package/lib/domain/AdHocAPIConference.js +21 -0
- package/lib/domain/CallLog.js +6 -0
- package/lib/domain/CallSession.js +14 -0
- package/lib/domain/Features.js +17 -0
- package/lib/domain/Phone/CTIPhone.js +31 -0
- package/lib/domain/Phone/WebRTCPhone.js +42 -11
- package/lib/domain/Profile.js +6 -0
- package/lib/domain/__tests__/CallLog.test.js +10 -0
- package/lib/domain/__tests__/CallSession.test.js +14 -0
- package/lib/domain/__tests__/IndirectTransfer.test.js +14 -0
- package/lib/domain/__tests__/Profile.test.js +6 -0
- package/lib/domain/__tests__/Room.test.js +14 -0
- package/lib/domain/__tests__/Session.test.js +6 -0
- package/lib/index.js +83 -18
- package/lib/service/CallApi.js +17 -0
- package/lib/service/getApiClient.js +17 -0
- package/lib/simple/Auth.js +84 -18
- package/lib/simple/Configuration.js +83 -18
- package/lib/simple/Directory.js +17 -0
- package/lib/simple/Phone.js +83 -18
- package/lib/simple/index.js +83 -18
- package/lib/simple/room/LocalParticipant.js +83 -18
- package/lib/simple/room/Participant.js +83 -18
- package/lib/simple/room/RemoteParticipant.js +83 -18
- package/lib/simple/room/Room.js +83 -18
- package/lib/simple/room/SipRoom.js +83 -18
- package/lib/simple/room/Stream.js +83 -18
- package/lib/simple/room/__tests__/RemoteParticipant.test.js +83 -18
- package/lib/simple/utils.js +83 -18
- package/lib/web-rtc-client.js +17 -0
- package/package.json +1 -1
- package/src/api/auth.js +7 -1
- package/src/domain/AdHocAPIConference.js +4 -0
- package/src/domain/CallLog.js +6 -0
- package/src/domain/CallSession.js +14 -0
- package/src/domain/Phone/WebRTCPhone.js +28 -11
- package/src/domain/Profile.js +6 -0
- package/src/domain/__tests__/CallLog.test.js +4 -0
- package/src/simple/Auth.js +13 -2
- package/src/simple/Phone.js +6 -6
- package/src/simple/index.js +2 -1
package/README.md
CHANGED
|
@@ -224,7 +224,7 @@ Wazo.Auth.fetchOptions({
|
|
|
224
224
|
- Options passed to all the `fetch` requests of the SDK.
|
|
225
225
|
|
|
226
226
|
### Authenticating an user
|
|
227
|
-
```
|
|
227
|
+
```js
|
|
228
228
|
const session = await Wazo.Auth.logIn(username, password);
|
|
229
229
|
```
|
|
230
230
|
|
|
@@ -233,7 +233,12 @@ const session = await Wazo.Auth.logIn(username, password);
|
|
|
233
233
|
|
|
234
234
|
- `password`: string
|
|
235
235
|
- User's password
|
|
236
|
-
|
|
236
|
+
|
|
237
|
+
- `backend`: string
|
|
238
|
+
- Optional string. If omitted, defaults to wazo_user
|
|
239
|
+
|
|
240
|
+
- `tenantId`: string
|
|
241
|
+
- Optional string. The tenant identifier (uuid or slug). Needed when backend is external (not wazo_user)
|
|
237
242
|
Returns as `Wazo.domain.Session`. This object contains, among other information, the user's token.
|
|
238
243
|
|
|
239
244
|
Note: you need to set `clientId` in your WazoAPIClient in order to get a refresh token in the returned `Session`.
|
|
@@ -651,6 +656,7 @@ client.auth.logIn({
|
|
|
651
656
|
password, // required string
|
|
652
657
|
backend, // optional string. If omitted, defaults to wazo_user
|
|
653
658
|
mobile, // optional boolean. If omitted, defaults to false: tells if the current user uses a mobile application
|
|
659
|
+
tenantId, // optional string. The tenant identifier (uuid or slug). Needed when backend is external (not wazo_user)
|
|
654
660
|
}).then(/* undefined if login failed, or : */{
|
|
655
661
|
metadata: {
|
|
656
662
|
username,
|