@messagebird/client
Advanced tools
Comparing version 1.0.0-next.1 to 1.0.0-next.2
@@ -0,1 +1,13 @@ | ||
# [1.0.0-next.1](https://git.messagebird.io/frontend/javascript-webrtc-sdk/compare/v0.16.0-next.2...v1.0.0-next.1) (2020-04-20) | ||
### Code Refactoring | ||
* rename Device to MessageBirdClient ([fbad98a](https://git.messagebird.io/frontend/javascript-webrtc-sdk/commit/fbad98a116fa0aa36b4bc554b53f551ca46d7f14)) | ||
### BREAKING CHANGES | ||
* The "Device" import of public API changed to `import { MessageBirdClient } from '@messagebird/client'` | ||
# [0.16.0-next.2](https://git.messagebird.io/frontend/javascript-webrtc-sdk/compare/v0.16.0-next.1...v0.16.0-next.2) (2020-04-20) | ||
@@ -2,0 +14,0 @@ |
@@ -83,3 +83,3 @@ 'use strict'; | ||
function getSDKVersionHeader() { | ||
var version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "976385ee" ; | ||
var version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "c71020ed" ; | ||
return "SDK-Version: ".concat(version); | ||
@@ -1464,3 +1464,4 @@ } | ||
value: function on(name, callback) { | ||
// Device is the public API entrypoint reponsible for routing. | ||
// "CLient is the public API entrypoint reponsible for routing. | ||
// TODO: make this nicer | ||
if (name === 'status') { | ||
@@ -1481,3 +1482,3 @@ this.userAgent.on('status', callback); | ||
if (name === 'status' || name === 'error') { | ||
this.userAgent.removeEventListener('status', callback); | ||
this.userAgent.removeEventListener(name, callback); | ||
} | ||
@@ -1500,4 +1501,4 @@ | ||
}, { | ||
key: "connect", | ||
value: function connect(options) { | ||
key: "startSession", | ||
value: function startSession(options) { | ||
if (this.userAgent.status !== exports.ClientStatus.Connected) { | ||
@@ -1504,0 +1505,0 @@ throw new Error('No active connection. Call `client.setup()` to initialize the device first.'); |
@@ -19,3 +19,3 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty"; | ||
export function getSDKVersionHeader() { | ||
var version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "976385ee" || 'HEAD'; | ||
var version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "c71020ed" || 'HEAD'; | ||
return "SDK-Version: ".concat(version); | ||
@@ -22,0 +22,0 @@ } |
@@ -45,3 +45,4 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck"; | ||
value: function on(name, callback) { | ||
// Device is the public API entrypoint reponsible for routing. | ||
// "CLient is the public API entrypoint reponsible for routing. | ||
// TODO: make this nicer | ||
if (name === 'status') { | ||
@@ -62,3 +63,3 @@ this.userAgent.on('status', callback); | ||
if (name === 'status' || name === 'error') { | ||
this.userAgent.removeEventListener('status', callback); | ||
this.userAgent.removeEventListener(name, callback); | ||
} | ||
@@ -81,4 +82,4 @@ | ||
}, { | ||
key: "connect", | ||
value: function connect(options) { | ||
key: "startSession", | ||
value: function startSession(options) { | ||
if (this.userAgent.status !== ClientStatus.Connected) { | ||
@@ -85,0 +86,0 @@ throw new Error('No active connection. Call `client.setup()` to initialize the device first.'); |
@@ -24,3 +24,3 @@ import { SipUaOptions, UserAgentError } from './UserAgent'; | ||
destroy(): void; | ||
connect(options?: StartConnectionOptions): OutgoingSession; | ||
startSession(options?: StartConnectionOptions): OutgoingSession; | ||
private handleNewSession; | ||
@@ -27,0 +27,0 @@ get status(): ClientStatus; |
@@ -47,3 +47,3 @@ import { UA, WebSocketInterface, debug } from 'jssip'; | ||
function getSDKVersionHeader() { | ||
var version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "976385ee" ; | ||
var version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "c71020ed" ; | ||
return "SDK-Version: ".concat(version); | ||
@@ -1436,3 +1436,4 @@ } | ||
value: function on(name, callback) { | ||
// Device is the public API entrypoint reponsible for routing. | ||
// "CLient is the public API entrypoint reponsible for routing. | ||
// TODO: make this nicer | ||
if (name === 'status') { | ||
@@ -1453,3 +1454,3 @@ this.userAgent.on('status', callback); | ||
if (name === 'status' || name === 'error') { | ||
this.userAgent.removeEventListener('status', callback); | ||
this.userAgent.removeEventListener(name, callback); | ||
} | ||
@@ -1472,4 +1473,4 @@ | ||
}, { | ||
key: "connect", | ||
value: function connect(options) { | ||
key: "startSession", | ||
value: function startSession(options) { | ||
if (this.userAgent.status !== ClientStatus.Connected) { | ||
@@ -1476,0 +1477,0 @@ throw new Error('No active connection. Call `client.setup()` to initialize the device first.'); |
{ | ||
"name": "@messagebird/client", | ||
"version": "1.0.0-next.1", | ||
"version": "1.0.0-next.2", | ||
"license": "UNLICENSED", | ||
@@ -5,0 +5,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
399185
4408