UNPKG

microsoft-speech-browser-sdk

Version:
173 lines (171 loc) 6.81 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); var PlatformEvent_1 = require("./PlatformEvent"); var ConnectionEvent = /** @class */ (function (_super) { __extends(ConnectionEvent, _super); function ConnectionEvent(eventName, connectionId, eventType) { if (eventType === void 0) { eventType = PlatformEvent_1.EventType.Info; } var _this = _super.call(this, eventName, eventType) || this; _this.connectionId = connectionId; return _this; } Object.defineProperty(ConnectionEvent.prototype, "ConnectionId", { get: function () { return this.connectionId; }, enumerable: true, configurable: true }); return ConnectionEvent; }(PlatformEvent_1.PlatformEvent)); exports.ConnectionEvent = ConnectionEvent; // tslint:disable-next-line:max-classes-per-file var ConnectionStartEvent = /** @class */ (function (_super) { __extends(ConnectionStartEvent, _super); function ConnectionStartEvent(connectionId, uri, headers) { var _this = _super.call(this, "ConnectionStartEvent", connectionId) || this; _this.uri = uri; _this.headers = headers; return _this; } Object.defineProperty(ConnectionStartEvent.prototype, "Uri", { get: function () { return this.uri; }, enumerable: true, configurable: true }); Object.defineProperty(ConnectionStartEvent.prototype, "Headers", { get: function () { return this.headers; }, enumerable: true, configurable: true }); return ConnectionStartEvent; }(ConnectionEvent)); exports.ConnectionStartEvent = ConnectionStartEvent; // tslint:disable-next-line:max-classes-per-file var ConnectionEstablishedEvent = /** @class */ (function (_super) { __extends(ConnectionEstablishedEvent, _super); function ConnectionEstablishedEvent(connectionId, metadata) { return _super.call(this, "ConnectionEstablishedEvent", connectionId) || this; } return ConnectionEstablishedEvent; }(ConnectionEvent)); exports.ConnectionEstablishedEvent = ConnectionEstablishedEvent; // tslint:disable-next-line:max-classes-per-file var ConnectionClosedEvent = /** @class */ (function (_super) { __extends(ConnectionClosedEvent, _super); function ConnectionClosedEvent(connectionId, statusCode, reason) { var _this = _super.call(this, "ConnectionClosedEvent", connectionId, PlatformEvent_1.EventType.Warning) || this; _this.reason = reason; _this.statusCode = statusCode; return _this; } Object.defineProperty(ConnectionClosedEvent.prototype, "Reason", { get: function () { return this.reason; }, enumerable: true, configurable: true }); Object.defineProperty(ConnectionClosedEvent.prototype, "StatusCode", { get: function () { return this.statusCode; }, enumerable: true, configurable: true }); return ConnectionClosedEvent; }(ConnectionEvent)); exports.ConnectionClosedEvent = ConnectionClosedEvent; // tslint:disable-next-line:max-classes-per-file var ConnectionEstablishErrorEvent = /** @class */ (function (_super) { __extends(ConnectionEstablishErrorEvent, _super); function ConnectionEstablishErrorEvent(connectionId, statuscode, reason) { var _this = _super.call(this, "ConnectionEstablishErrorEvent", connectionId, PlatformEvent_1.EventType.Error) || this; _this.statusCode = statuscode; _this.reason = reason; return _this; } Object.defineProperty(ConnectionEstablishErrorEvent.prototype, "Reason", { get: function () { return this.reason; }, enumerable: true, configurable: true }); Object.defineProperty(ConnectionEstablishErrorEvent.prototype, "StatusCode", { get: function () { return this.statusCode; }, enumerable: true, configurable: true }); return ConnectionEstablishErrorEvent; }(ConnectionEvent)); exports.ConnectionEstablishErrorEvent = ConnectionEstablishErrorEvent; // tslint:disable-next-line:max-classes-per-file var ConnectionMessageReceivedEvent = /** @class */ (function (_super) { __extends(ConnectionMessageReceivedEvent, _super); function ConnectionMessageReceivedEvent(connectionId, networkReceivedTimeISO, message) { var _this = _super.call(this, "ConnectionMessageReceivedEvent", connectionId) || this; _this.networkReceivedTime = networkReceivedTimeISO; _this.message = message; return _this; } Object.defineProperty(ConnectionMessageReceivedEvent.prototype, "NetworkReceivedTime", { get: function () { return this.networkReceivedTime; }, enumerable: true, configurable: true }); Object.defineProperty(ConnectionMessageReceivedEvent.prototype, "Message", { get: function () { return this.message; }, enumerable: true, configurable: true }); return ConnectionMessageReceivedEvent; }(ConnectionEvent)); exports.ConnectionMessageReceivedEvent = ConnectionMessageReceivedEvent; // tslint:disable-next-line:max-classes-per-file var ConnectionMessageSentEvent = /** @class */ (function (_super) { __extends(ConnectionMessageSentEvent, _super); function ConnectionMessageSentEvent(connectionId, networkSentTimeISO, message) { var _this = _super.call(this, "ConnectionMessageSentEvent", connectionId) || this; _this.networkSentTime = networkSentTimeISO; _this.message = message; return _this; } Object.defineProperty(ConnectionMessageSentEvent.prototype, "NetworkSentTime", { get: function () { return this.networkSentTime; }, enumerable: true, configurable: true }); Object.defineProperty(ConnectionMessageSentEvent.prototype, "Message", { get: function () { return this.message; }, enumerable: true, configurable: true }); return ConnectionMessageSentEvent; }(ConnectionEvent)); exports.ConnectionMessageSentEvent = ConnectionMessageSentEvent; //# sourceMappingURL=ConnectionEvents.js.map