UNPKG

@bitmovin/api-sdk

Version:

Bitmovin JS/TS API SDK

59 lines (58 loc) 2.99 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const BaseAPI_1 = require("../../../../../common/BaseAPI"); const Mapper_1 = require("../../../../../common/Mapper"); const EmailNotificationWithStreamConditions_1 = require("../../../../../models/EmailNotificationWithStreamConditions"); /** * LiveInputStreamChangedApi - object-oriented interface * @export * @class LiveInputStreamChangedApi * @extends {BaseAPI} */ class LiveInputStreamChangedApi extends BaseAPI_1.BaseAPI { constructor(configuration) { super(configuration); } /** * @summary Add Live Input Stream Changed Email Notification (All Encodings) * @param {EmailNotificationWithStreamConditionsRequest} emailNotificationWithStreamConditionsRequest The email notifications object * @throws {BitmovinError} * @memberof LiveInputStreamChangedApi */ create(emailNotificationWithStreamConditionsRequest) { return this.restClient.post('/notifications/emails/encoding/encodings/live-input-stream-changed', {}, emailNotificationWithStreamConditionsRequest).then((response) => { return (0, Mapper_1.map)(response, EmailNotificationWithStreamConditions_1.default); }); } /** * @summary Add Live Input Stream Changed Email Notification (Specific Encoding) * @param {string} encodingId Id of the encoding resource * @param {EmailNotificationWithStreamConditionsRequest} emailNotificationWithStreamConditionsRequest The email notifications object * @throws {BitmovinError} * @memberof LiveInputStreamChangedApi */ createByEncodingId(encodingId, emailNotificationWithStreamConditionsRequest) { const pathParamMap = { encoding_id: encodingId }; return this.restClient.post('/notifications/emails/encoding/encodings/{encoding_id}/live-input-stream-changed', pathParamMap, emailNotificationWithStreamConditionsRequest).then((response) => { return (0, Mapper_1.map)(response, EmailNotificationWithStreamConditions_1.default); }); } /** * @summary Replace Live Input Stream Changed Email Notification * @param {string} notificationId Id of the email notification * @param {EmailNotificationWithStreamConditionsRequest} emailNotificationWithStreamConditionsRequest The email notification with the updated values * @throws {BitmovinError} * @memberof LiveInputStreamChangedApi */ update(notificationId, emailNotificationWithStreamConditionsRequest) { const pathParamMap = { notification_id: notificationId }; return this.restClient.put('/notifications/emails/encoding/encodings/live-input-stream-changed/{notification_id}', pathParamMap, emailNotificationWithStreamConditionsRequest).then((response) => { return (0, Mapper_1.map)(response, EmailNotificationWithStreamConditions_1.default); }); } } exports.default = LiveInputStreamChangedApi;