UNPKG

@bitmovin/api-sdk

Version:

Bitmovin JS/TS API SDK

63 lines (62 loc) 2.76 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); 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 BaseAPI_1 = require("../../../../common/BaseAPI"); var ErrorApi_1 = require("./error/ErrorApi"); var FinishedApi_1 = require("./finished/FinishedApi"); var Notification_1 = require("../../../../models/Notification"); var PaginationResponse_1 = require("../../../../models/PaginationResponse"); var NotificationListQueryParams_1 = require("./NotificationListQueryParams"); /** * ManifestApi - object-oriented interface * @export * @class ManifestApi * @extends {BaseAPI} */ var ManifestApi = /** @class */ (function (_super) { __extends(ManifestApi, _super); function ManifestApi(configuration) { var _this = _super.call(this, configuration) || this; _this.error = new ErrorApi_1.default(configuration); _this.finished = new FinishedApi_1.default(configuration); return _this; } /** * @summary List Webhook Notifications (Specific Manifest) * @param {string} manifestId Id of the manifest resource * @param {*} [queryParameters] query parameters for filtering, sorting and pagination * @throws {BitmovinError} * @memberof ManifestApi */ ManifestApi.prototype.list = function (manifestId, queryParameters) { var pathParamMap = { manifest_id: manifestId }; var queryParams = {}; if (typeof queryParameters === 'function') { queryParams = queryParameters(new NotificationListQueryParams_1.NotificationListQueryParamsBuilder()).buildQueryParams(); } else if (queryParameters) { queryParams = queryParameters; } return this.restClient.get('/notifications/webhooks/encoding/manifest/{manifest_id}', pathParamMap, queryParams).then(function (response) { return new PaginationResponse_1.default(response, Notification_1.default); }); }; return ManifestApi; }(BaseAPI_1.BaseAPI)); exports.default = ManifestApi;