UNPKG

@vonage/voice

Version:

The Voice API lets you create outbound calls, control in-progress calls and get information about historical calls.

54 lines 1.93 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.WebsocketEndpoint = void 0; const debug_1 = __importDefault(require("debug")); (0, debug_1.default)('@vonage/voice')('This class is deprecated. Please update to use the WebsocketEndpointType type instead'); /** * Represents a WebSocket endpoint for making voice calls. * * @deprecated This class is deprecated. Please update to use the WebsocketEndpointType type instead. */ class WebsocketEndpoint { /** * The type of the endpoint, which is always 'websocket'. */ type; /** * The WebSocket URI associated with this endpoint. * * @param {string} uri - The WebSocket URI for the WebSocket endpoint. */ uri; /** * The content type or bitrate for WebSocket streaming. * * @param {WebsocketBitrate} contentType - The content type or bitrate for WebSocket streaming. */ contentType; /** * Optional custom headers to include in WebSocket requests. * * @param {Record<string, unknown>} headers - Optional custom headers as key-value pairs. */ headers; /** * Create a new WebsocketEndpoint instance. * * @param {string} uri - The WebSocket URI for the WebSocket endpoint. * @param {WebsocketBitrate} contentType - The content type or bitrate for WebSocket streaming. * @param {Record<string, unknown>} headers - Optional custom headers as key-value pairs. */ constructor(uri, contentType, headers) { this.type = 'websocket'; this.uri = uri; this.contentType = contentType; if (headers) { this.headers = headers; } } } exports.WebsocketEndpoint = WebsocketEndpoint; //# sourceMappingURL=WebsocketEndpoint.js.map