@bitmovin/api-sdk 1.169.0 → 1.171.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -31,7 +31,7 @@ If you have any questions regarding the SDK, provided examples or our services,
31
31
  ## Installation
32
32
 
33
33
  ``` bash
34
- npm install @bitmovin/api-sdk@1.169.0
34
+ npm install @bitmovin/api-sdk@1.171.0
35
35
  ```
36
36
 
37
37
  ## Initialization
@@ -5987,7 +5987,7 @@ var HeaderHandler = /** @class */ (function (_super) {
5987
5987
  var headers = {
5988
5988
  'X-Api-Key': apiKey,
5989
5989
  'X-Api-Client': 'bitmovin-api-sdk-javascript',
5990
- 'X-Api-Client-Version': '1.169.0',
5990
+ 'X-Api-Client-Version': '1.171.0',
5991
5991
  'Content-Type': 'application/json'
5992
5992
  };
5993
5993
  if (tenantOrgId) {
@@ -15820,7 +15820,7 @@ var HdApi = /** @class */ (function (_super) {
15820
15820
  });
15821
15821
  };
15822
15822
  /**
15823
- * @summary Start Live Encoding
15823
+ * @summary Start HD Options Live Encoding
15824
15824
  * @param {string} encodingId Id of the encoding
15825
15825
  * @param {StartLiveChannelEncodingRequest} startLiveChannelEncodingRequest Live Encoding startup options
15826
15826
  * @throws {BitmovinError}
@@ -55571,6 +55571,7 @@ var AnalyticsAttribute;
55571
55571
  AnalyticsAttribute["VIDEOTIME_START"] = "VIDEOTIME_START";
55572
55572
  AnalyticsAttribute["VIDEOSTART_FAILED"] = "VIDEOSTART_FAILED";
55573
55573
  AnalyticsAttribute["VIDEOSTART_FAILED_REASON"] = "VIDEOSTART_FAILED_REASON";
55574
+ AnalyticsAttribute["VIEWTIME"] = "VIEWTIME";
55574
55575
  })(AnalyticsAttribute = exports.AnalyticsAttribute || (exports.AnalyticsAttribute = {}));
55575
55576
  exports["default"] = AnalyticsAttribute;
55576
55577
 
@@ -82470,6 +82471,7 @@ var StreamsLiveResponse = /** @class */ (function () {
82470
82471
  this.posterUrl = (0, Mapper_1.map)(obj.posterUrl);
82471
82472
  this.adConfig = (0, Mapper_1.map)(obj.adConfig, StreamsAdConfigResponse_1.default);
82472
82473
  this.contentProtection = (0, Mapper_1.map)(obj.contentProtection, StreamsContentProtectionResponse_1.default);
82474
+ this.trimming = (0, Mapper_1.map)(obj.trimming);
82473
82475
  }
82474
82476
  return StreamsLiveResponse;
82475
82477
  }());
@@ -82512,6 +82514,40 @@ exports.StreamsLiveUpdateRequest = StreamsLiveUpdateRequest;
82512
82514
  exports["default"] = StreamsLiveUpdateRequest;
82513
82515
 
82514
82516
 
82517
+ /***/ }),
82518
+
82519
+ /***/ "./models/StreamsSearchResponse.ts":
82520
+ /*!*****************************************!*\
82521
+ !*** ./models/StreamsSearchResponse.ts ***!
82522
+ \*****************************************/
82523
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
82524
+
82525
+ "use strict";
82526
+
82527
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
82528
+ exports.StreamsSearchResponse = void 0;
82529
+ var Mapper_1 = __webpack_require__(/*! ../common/Mapper */ "./common/Mapper.ts");
82530
+ /**
82531
+ * @export
82532
+ * @class StreamsSearchResponse
82533
+ */
82534
+ var StreamsSearchResponse = /** @class */ (function () {
82535
+ function StreamsSearchResponse(obj) {
82536
+ if (!obj) {
82537
+ return;
82538
+ }
82539
+ this.id = (0, Mapper_1.map)(obj.id);
82540
+ this.title = (0, Mapper_1.map)(obj.title);
82541
+ this.description = (0, Mapper_1.map)(obj.description);
82542
+ this.createdAt = (0, Mapper_1.map)(obj.createdAt, Date);
82543
+ this.type = (0, Mapper_1.map)(obj.type);
82544
+ }
82545
+ return StreamsSearchResponse;
82546
+ }());
82547
+ exports.StreamsSearchResponse = StreamsSearchResponse;
82548
+ exports["default"] = StreamsSearchResponse;
82549
+
82550
+
82515
82551
  /***/ }),
82516
82552
 
82517
82553
  /***/ "./models/StreamsStyleConfigPlayerStyle.ts":
@@ -82584,6 +82620,57 @@ exports.StreamsStyleConfigResponse = StreamsStyleConfigResponse;
82584
82620
  exports["default"] = StreamsStyleConfigResponse;
82585
82621
 
82586
82622
 
82623
+ /***/ }),
82624
+
82625
+ /***/ "./models/StreamsTrimmingStatus.ts":
82626
+ /*!*****************************************!*\
82627
+ !*** ./models/StreamsTrimmingStatus.ts ***!
82628
+ \*****************************************/
82629
+ /***/ ((__unused_webpack_module, exports) => {
82630
+
82631
+ "use strict";
82632
+
82633
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
82634
+ exports.StreamsTrimmingStatus = void 0;
82635
+ /**
82636
+ * @export
82637
+ * @enum {string}
82638
+ */
82639
+ var StreamsTrimmingStatus;
82640
+ (function (StreamsTrimmingStatus) {
82641
+ StreamsTrimmingStatus["UNAVAILABLE"] = "UNAVAILABLE";
82642
+ StreamsTrimmingStatus["AVAILABLE"] = "AVAILABLE";
82643
+ StreamsTrimmingStatus["STARTED"] = "STARTED";
82644
+ StreamsTrimmingStatus["ERROR"] = "ERROR";
82645
+ StreamsTrimmingStatus["FINISHED"] = "FINISHED";
82646
+ })(StreamsTrimmingStatus = exports.StreamsTrimmingStatus || (exports.StreamsTrimmingStatus = {}));
82647
+ exports["default"] = StreamsTrimmingStatus;
82648
+
82649
+
82650
+ /***/ }),
82651
+
82652
+ /***/ "./models/StreamsType.ts":
82653
+ /*!*******************************!*\
82654
+ !*** ./models/StreamsType.ts ***!
82655
+ \*******************************/
82656
+ /***/ ((__unused_webpack_module, exports) => {
82657
+
82658
+ "use strict";
82659
+
82660
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
82661
+ exports.StreamsType = void 0;
82662
+ /**
82663
+ * @export
82664
+ * @enum {string}
82665
+ */
82666
+ var StreamsType;
82667
+ (function (StreamsType) {
82668
+ StreamsType["VIDEO"] = "VIDEO";
82669
+ StreamsType["LIVE"] = "LIVE";
82670
+ })(StreamsType = exports.StreamsType || (exports.StreamsType = {}));
82671
+ exports["default"] = StreamsType;
82672
+
82673
+
82587
82674
  /***/ }),
82588
82675
 
82589
82676
  /***/ "./models/StreamsVideoCreateRequest.ts":
@@ -82736,6 +82823,7 @@ var StreamsVideoResponse = /** @class */ (function () {
82736
82823
  this.posterUrl = (0, Mapper_1.map)(obj.posterUrl);
82737
82824
  this.adConfig = (0, Mapper_1.map)(obj.adConfig, StreamsAdConfigResponse_1.default);
82738
82825
  this.contentProtection = (0, Mapper_1.map)(obj.contentProtection, StreamsContentProtectionResponse_1.default);
82826
+ this.trimming = (0, Mapper_1.map)(obj.trimming);
82739
82827
  }
82740
82828
  return StreamsVideoResponse;
82741
82829
  }());
@@ -86746,8 +86834,11 @@ __exportStar(__webpack_require__(/*! ./StreamsLiveCreateRequest */ "./models/Str
86746
86834
  __exportStar(__webpack_require__(/*! ./StreamsLiveLifeCycle */ "./models/StreamsLiveLifeCycle.ts"), exports);
86747
86835
  __exportStar(__webpack_require__(/*! ./StreamsLiveResponse */ "./models/StreamsLiveResponse.ts"), exports);
86748
86836
  __exportStar(__webpack_require__(/*! ./StreamsLiveUpdateRequest */ "./models/StreamsLiveUpdateRequest.ts"), exports);
86837
+ __exportStar(__webpack_require__(/*! ./StreamsSearchResponse */ "./models/StreamsSearchResponse.ts"), exports);
86749
86838
  __exportStar(__webpack_require__(/*! ./StreamsStyleConfigPlayerStyle */ "./models/StreamsStyleConfigPlayerStyle.ts"), exports);
86750
86839
  __exportStar(__webpack_require__(/*! ./StreamsStyleConfigResponse */ "./models/StreamsStyleConfigResponse.ts"), exports);
86840
+ __exportStar(__webpack_require__(/*! ./StreamsTrimmingStatus */ "./models/StreamsTrimmingStatus.ts"), exports);
86841
+ __exportStar(__webpack_require__(/*! ./StreamsType */ "./models/StreamsType.ts"), exports);
86751
86842
  __exportStar(__webpack_require__(/*! ./StreamsVideoCreateRequest */ "./models/StreamsVideoCreateRequest.ts"), exports);
86752
86843
  __exportStar(__webpack_require__(/*! ./StreamsVideoEncodingStatus */ "./models/StreamsVideoEncodingStatus.ts"), exports);
86753
86844
  __exportStar(__webpack_require__(/*! ./StreamsVideoEncodingTask */ "./models/StreamsVideoEncodingTask.ts"), exports);
@@ -90444,6 +90535,7 @@ var __extends = (this && this.__extends) || (function () {
90444
90535
  })();
90445
90536
  Object.defineProperty(exports, "__esModule", ({ value: true }));
90446
90537
  var BaseAPI_1 = __webpack_require__(/*! ../common/BaseAPI */ "./common/BaseAPI.ts");
90538
+ var SearchApi_1 = __webpack_require__(/*! ./search/SearchApi */ "./streams/search/SearchApi.ts");
90447
90539
  var VideoApi_1 = __webpack_require__(/*! ./video/VideoApi */ "./streams/video/VideoApi.ts");
90448
90540
  var LiveApi_1 = __webpack_require__(/*! ./live/LiveApi */ "./streams/live/LiveApi.ts");
90449
90541
  /**
@@ -90456,6 +90548,7 @@ var StreamsApi = /** @class */ (function (_super) {
90456
90548
  __extends(StreamsApi, _super);
90457
90549
  function StreamsApi(configuration) {
90458
90550
  var _this = _super.call(this, configuration) || this;
90551
+ _this.search = new SearchApi_1.default(configuration);
90459
90552
  _this.video = new VideoApi_1.default(configuration);
90460
90553
  _this.live = new LiveApi_1.default(configuration);
90461
90554
  return _this;
@@ -90754,6 +90847,118 @@ var StopApi = /** @class */ (function (_super) {
90754
90847
  exports["default"] = StopApi;
90755
90848
 
90756
90849
 
90850
+ /***/ }),
90851
+
90852
+ /***/ "./streams/search/SearchApi.ts":
90853
+ /*!*************************************!*\
90854
+ !*** ./streams/search/SearchApi.ts ***!
90855
+ \*************************************/
90856
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
90857
+
90858
+ "use strict";
90859
+
90860
+ var __extends = (this && this.__extends) || (function () {
90861
+ var extendStatics = function (d, b) {
90862
+ extendStatics = Object.setPrototypeOf ||
90863
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
90864
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
90865
+ return extendStatics(d, b);
90866
+ };
90867
+ return function (d, b) {
90868
+ if (typeof b !== "function" && b !== null)
90869
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
90870
+ extendStatics(d, b);
90871
+ function __() { this.constructor = d; }
90872
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
90873
+ };
90874
+ })();
90875
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
90876
+ var BaseAPI_1 = __webpack_require__(/*! ../../common/BaseAPI */ "./common/BaseAPI.ts");
90877
+ var StreamsSearchResponse_1 = __webpack_require__(/*! ../../models/StreamsSearchResponse */ "./models/StreamsSearchResponse.ts");
90878
+ var PaginationResponse_1 = __webpack_require__(/*! ../../models/PaginationResponse */ "./models/PaginationResponse.ts");
90879
+ var StreamsSearchResponseListQueryParams_1 = __webpack_require__(/*! ./StreamsSearchResponseListQueryParams */ "./streams/search/StreamsSearchResponseListQueryParams.ts");
90880
+ /**
90881
+ * SearchApi - object-oriented interface
90882
+ * @export
90883
+ * @class SearchApi
90884
+ * @extends {BaseAPI}
90885
+ */
90886
+ var SearchApi = /** @class */ (function (_super) {
90887
+ __extends(SearchApi, _super);
90888
+ function SearchApi(configuration) {
90889
+ return _super.call(this, configuration) || this;
90890
+ }
90891
+ /**
90892
+ * @summary Get paginated search results of VOD and Live streams
90893
+ * @param {*} [queryParameters] query parameters for filtering, sorting and pagination
90894
+ * @throws {BitmovinError}
90895
+ * @memberof SearchApi
90896
+ */
90897
+ SearchApi.prototype.list = function (queryParameters) {
90898
+ var queryParams = {};
90899
+ if (typeof queryParameters === 'function') {
90900
+ queryParams = queryParameters(new StreamsSearchResponseListQueryParams_1.StreamsSearchResponseListQueryParamsBuilder()).buildQueryParams();
90901
+ }
90902
+ else if (queryParameters) {
90903
+ queryParams = queryParameters;
90904
+ }
90905
+ return this.restClient.get('/streams/search', {}, queryParams).then(function (response) {
90906
+ return new PaginationResponse_1.default(response, StreamsSearchResponse_1.default);
90907
+ });
90908
+ };
90909
+ return SearchApi;
90910
+ }(BaseAPI_1.BaseAPI));
90911
+ exports["default"] = SearchApi;
90912
+
90913
+
90914
+ /***/ }),
90915
+
90916
+ /***/ "./streams/search/StreamsSearchResponseListQueryParams.ts":
90917
+ /*!****************************************************************!*\
90918
+ !*** ./streams/search/StreamsSearchResponseListQueryParams.ts ***!
90919
+ \****************************************************************/
90920
+ /***/ ((__unused_webpack_module, exports) => {
90921
+
90922
+ "use strict";
90923
+
90924
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
90925
+ exports.StreamsSearchResponseListQueryParamsBuilder = void 0;
90926
+ var StreamsSearchResponseListQueryParamsBuilder = /** @class */ (function () {
90927
+ function StreamsSearchResponseListQueryParamsBuilder() {
90928
+ this.internalParams = {};
90929
+ }
90930
+ /**
90931
+ *
90932
+ * @param offset Index of the first item to return, starting at 0. Default is 0
90933
+ */
90934
+ StreamsSearchResponseListQueryParamsBuilder.prototype.offset = function (offset) {
90935
+ this.internalParams.offset = offset;
90936
+ return this;
90937
+ };
90938
+ /**
90939
+ *
90940
+ * @param limit Maximum number of items to return. Default is 25, maximum is 100
90941
+ */
90942
+ StreamsSearchResponseListQueryParamsBuilder.prototype.limit = function (limit) {
90943
+ this.internalParams.limit = limit;
90944
+ return this;
90945
+ };
90946
+ /**
90947
+ *
90948
+ * @param query Query to search against
90949
+ */
90950
+ StreamsSearchResponseListQueryParamsBuilder.prototype.query = function (query) {
90951
+ this.internalParams.query = query;
90952
+ return this;
90953
+ };
90954
+ StreamsSearchResponseListQueryParamsBuilder.prototype.buildQueryParams = function () {
90955
+ return this.internalParams;
90956
+ };
90957
+ return StreamsSearchResponseListQueryParamsBuilder;
90958
+ }());
90959
+ exports.StreamsSearchResponseListQueryParamsBuilder = StreamsSearchResponseListQueryParamsBuilder;
90960
+
90961
+
90757
90962
  /***/ }),
90758
90963
 
90759
90964
  /***/ "./streams/video/StreamsVideoResponseListQueryParams.ts":
@@ -91556,10 +91761,16 @@ function fetch(input, init) {
91556
91761
 
91557
91762
  xhr.onload = function() {
91558
91763
  var options = {
91559
- status: xhr.status,
91560
91764
  statusText: xhr.statusText,
91561
91765
  headers: parseHeaders(xhr.getAllResponseHeaders() || '')
91562
91766
  }
91767
+ // This check if specifically for when a user fetches a file locally from the file system
91768
+ // Only if the status is out of a normal range
91769
+ if (request.url.startsWith('file://') && (xhr.status < 200 || xhr.status > 599)) {
91770
+ options.status = 200;
91771
+ } else {
91772
+ options.status = xhr.status;
91773
+ }
91563
91774
  options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL')
91564
91775
  var body = 'response' in xhr ? xhr.response : xhr.responseText
91565
91776
  setTimeout(function() {
@@ -91652,7 +91863,6 @@ if (!g.fetch) {
91652
91863
  g.Response = Response
91653
91864
  }
91654
91865
 
91655
-
91656
91866
  /***/ })
91657
91867
 
91658
91868
  /******/ });