UNPKG

infobip-rtc

Version:

Infobip RTC JavaScript SDK - Infobip WebRTC API Implementation

86 lines 2.31 kB
export var EndpointType; (function (EndpointType) { EndpointType["WEBRTC"] = "WEBRTC"; EndpointType["SIP"] = "SIP"; EndpointType["PHONE"] = "PHONE"; EndpointType["VIBER"] = "VIBER"; EndpointType["WHATSAPP"] = "WHATSAPP"; EndpointType["WEBSOCKET"] = "WEBSOCKET"; })(EndpointType || (EndpointType = {})); export class Endpoint { constructor(type) { this.type = type; } } export class WebrtcEndpoint extends Endpoint { constructor(identity = null, displayName = null) { super(EndpointType.WEBRTC); this.identity = identity; this.displayName = displayName; } get identifier() { return this.identity; } get displayIdentifier() { return this.displayName; } } export class PhoneEndpoint extends Endpoint { constructor(phoneNumber = null) { super(EndpointType.PHONE); this.phoneNumber = phoneNumber; } get identifier() { return this.phoneNumber; } get displayIdentifier() { return this.phoneNumber; } } export class ViberEndpoint extends Endpoint { constructor(phoneNumber = null) { super(EndpointType.VIBER); this.phoneNumber = phoneNumber; } get identifier() { return this.phoneNumber; } get displayIdentifier() { return this.phoneNumber; } } export class SipEndpoint extends Endpoint { constructor(username = null) { super(EndpointType.SIP); this.username = username; } get identifier() { return this.username; } get displayIdentifier() { return this.username; } } export class WhatsAppEndpoint extends Endpoint { constructor(phoneNumber = null) { super(EndpointType.WHATSAPP); this.phoneNumber = phoneNumber; } get identifier() { return this.phoneNumber; } get displayIdentifier() { return this.phoneNumber; } } export class WebsocketEndpoint extends Endpoint { constructor(identifier = null, websocketEndpointConfigId = null) { super(EndpointType.WEBSOCKET); this.identifier = identifier; this.websocketEndpointConfigId = websocketEndpointConfigId; } get displayIdentifier() { return this.identifier; } } //# sourceMappingURL=Endpoint.js.map