@bitmovin/api-sdk 1.168.0 → 1.170.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.
@@ -240,7 +240,7 @@ var HeaderHandler = /** @class */ (function (_super) {
240
240
  var headers = {
241
241
  'X-Api-Key': apiKey,
242
242
  'X-Api-Client': 'bitmovin-api-sdk-javascript',
243
- 'X-Api-Client-Version': '1.168.0',
243
+ 'X-Api-Client-Version': '1.170.0',
244
244
  'Content-Type': 'application/json'
245
245
  };
246
246
  if (tenantOrgId) {
@@ -1,5 +1,6 @@
1
1
  import { BaseAPI } from '../../../../common/BaseAPI';
2
2
  import Configuration from '../../../../common/Configuration';
3
+ import BitmovinResponse from '../../../../models/BitmovinResponse';
3
4
  import StartLiveChannelEncodingRequest from '../../../../models/StartLiveChannelEncodingRequest';
4
5
  /**
5
6
  * HdApi - object-oriented interface
@@ -16,4 +17,12 @@ export default class HdApi extends BaseAPI {
16
17
  * @memberof HdApi
17
18
  */
18
19
  getStartRequest(encodingId: string): Promise<StartLiveChannelEncodingRequest>;
20
+ /**
21
+ * @summary Start HD Options Live Encoding
22
+ * @param {string} encodingId Id of the encoding
23
+ * @param {StartLiveChannelEncodingRequest} startLiveChannelEncodingRequest Live Encoding startup options
24
+ * @throws {BitmovinError}
25
+ * @memberof HdApi
26
+ */
27
+ start(encodingId: string, startLiveChannelEncodingRequest?: StartLiveChannelEncodingRequest): Promise<BitmovinResponse>;
19
28
  }
@@ -17,6 +17,7 @@ var __extends = (this && this.__extends) || (function () {
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  var BaseAPI_1 = require("../../../../common/BaseAPI");
19
19
  var Mapper_1 = require("../../../../common/Mapper");
20
+ var BitmovinResponse_1 = require("../../../../models/BitmovinResponse");
20
21
  var StartLiveChannelEncodingRequest_1 = require("../../../../models/StartLiveChannelEncodingRequest");
21
22
  /**
22
23
  * HdApi - object-oriented interface
@@ -43,6 +44,21 @@ var HdApi = /** @class */ (function (_super) {
43
44
  return (0, Mapper_1.map)(response, StartLiveChannelEncodingRequest_1.default);
44
45
  });
45
46
  };
47
+ /**
48
+ * @summary Start HD Options Live Encoding
49
+ * @param {string} encodingId Id of the encoding
50
+ * @param {StartLiveChannelEncodingRequest} startLiveChannelEncodingRequest Live Encoding startup options
51
+ * @throws {BitmovinError}
52
+ * @memberof HdApi
53
+ */
54
+ HdApi.prototype.start = function (encodingId, startLiveChannelEncodingRequest) {
55
+ var pathParamMap = {
56
+ encoding_id: encodingId
57
+ };
58
+ return this.restClient.post('/encoding/encodings/{encoding_id}/live/hd/start', pathParamMap, startLiveChannelEncodingRequest).then(function (response) {
59
+ return (0, Mapper_1.map)(response, BitmovinResponse_1.default);
60
+ });
61
+ };
46
62
  return HdApi;
47
63
  }(BaseAPI_1.BaseAPI));
48
64
  exports.default = HdApi;
@@ -122,6 +122,7 @@ export declare enum AnalyticsAttribute {
122
122
  VIDEOTIME_END = "VIDEOTIME_END",
123
123
  VIDEOTIME_START = "VIDEOTIME_START",
124
124
  VIDEOSTART_FAILED = "VIDEOSTART_FAILED",
125
- VIDEOSTART_FAILED_REASON = "VIDEOSTART_FAILED_REASON"
125
+ VIDEOSTART_FAILED_REASON = "VIDEOSTART_FAILED_REASON",
126
+ VIEWTIME = "VIEWTIME"
126
127
  }
127
128
  export default AnalyticsAttribute;
@@ -127,5 +127,6 @@ var AnalyticsAttribute;
127
127
  AnalyticsAttribute["VIDEOTIME_START"] = "VIDEOTIME_START";
128
128
  AnalyticsAttribute["VIDEOSTART_FAILED"] = "VIDEOSTART_FAILED";
129
129
  AnalyticsAttribute["VIDEOSTART_FAILED_REASON"] = "VIDEOSTART_FAILED_REASON";
130
+ AnalyticsAttribute["VIEWTIME"] = "VIEWTIME";
130
131
  })(AnalyticsAttribute = exports.AnalyticsAttribute || (exports.AnalyticsAttribute = {}));
131
132
  exports.default = AnalyticsAttribute;
@@ -0,0 +1,39 @@
1
+ import StreamsType from './StreamsType';
2
+ /**
3
+ * @export
4
+ * @class StreamsSearchResponse
5
+ */
6
+ export declare class StreamsSearchResponse {
7
+ /**
8
+ * The identifier of the stream
9
+ * @type {string}
10
+ * @memberof StreamsSearchResponse
11
+ */
12
+ id?: string;
13
+ /**
14
+ * The title of the stream
15
+ * @type {string}
16
+ * @memberof StreamsSearchResponse
17
+ */
18
+ title?: string;
19
+ /**
20
+ * The description of the stream
21
+ * @type {string}
22
+ * @memberof StreamsSearchResponse
23
+ */
24
+ description?: string;
25
+ /**
26
+ * Creation timestamp, returned as UTC expressed in ISO 8601 format: YYYY-MM-DDThh:mm:ssZ
27
+ * @type {Date}
28
+ * @memberof StreamsSearchResponse
29
+ */
30
+ createdAt?: Date;
31
+ /**
32
+ * The type the stream
33
+ * @type {StreamsType}
34
+ * @memberof StreamsSearchResponse
35
+ */
36
+ type?: StreamsType;
37
+ constructor(obj?: Partial<StreamsSearchResponse>);
38
+ }
39
+ export default StreamsSearchResponse;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StreamsSearchResponse = void 0;
4
+ var Mapper_1 = require("../common/Mapper");
5
+ /**
6
+ * @export
7
+ * @class StreamsSearchResponse
8
+ */
9
+ var StreamsSearchResponse = /** @class */ (function () {
10
+ function StreamsSearchResponse(obj) {
11
+ if (!obj) {
12
+ return;
13
+ }
14
+ this.id = (0, Mapper_1.map)(obj.id);
15
+ this.title = (0, Mapper_1.map)(obj.title);
16
+ this.description = (0, Mapper_1.map)(obj.description);
17
+ this.createdAt = (0, Mapper_1.map)(obj.createdAt, Date);
18
+ this.type = (0, Mapper_1.map)(obj.type);
19
+ }
20
+ return StreamsSearchResponse;
21
+ }());
22
+ exports.StreamsSearchResponse = StreamsSearchResponse;
23
+ exports.default = StreamsSearchResponse;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @export
3
+ * @enum {string}
4
+ */
5
+ export declare enum StreamsType {
6
+ VIDEO = "VIDEO",
7
+ LIVE = "LIVE"
8
+ }
9
+ export default StreamsType;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StreamsType = void 0;
4
+ /**
5
+ * @export
6
+ * @enum {string}
7
+ */
8
+ var StreamsType;
9
+ (function (StreamsType) {
10
+ StreamsType["VIDEO"] = "VIDEO";
11
+ StreamsType["LIVE"] = "LIVE";
12
+ })(StreamsType = exports.StreamsType || (exports.StreamsType = {}));
13
+ exports.default = StreamsType;
@@ -5,6 +5,7 @@
5
5
  export declare enum StreamsVideoQuality {
6
6
  NONE = "NONE",
7
7
  PREVIEW = "PREVIEW",
8
- DEFAULT = "DEFAULT"
8
+ DEFAULT = "DEFAULT",
9
+ TRIMMED = "TRIMMED"
9
10
  }
10
11
  export default StreamsVideoQuality;
@@ -10,5 +10,6 @@ var StreamsVideoQuality;
10
10
  StreamsVideoQuality["NONE"] = "NONE";
11
11
  StreamsVideoQuality["PREVIEW"] = "PREVIEW";
12
12
  StreamsVideoQuality["DEFAULT"] = "DEFAULT";
13
+ StreamsVideoQuality["TRIMMED"] = "TRIMMED";
13
14
  })(StreamsVideoQuality = exports.StreamsVideoQuality || (exports.StreamsVideoQuality = {}));
14
15
  exports.default = StreamsVideoQuality;
@@ -711,8 +711,10 @@ export * from './StreamsLiveCreateRequest';
711
711
  export * from './StreamsLiveLifeCycle';
712
712
  export * from './StreamsLiveResponse';
713
713
  export * from './StreamsLiveUpdateRequest';
714
+ export * from './StreamsSearchResponse';
714
715
  export * from './StreamsStyleConfigPlayerStyle';
715
716
  export * from './StreamsStyleConfigResponse';
717
+ export * from './StreamsType';
716
718
  export * from './StreamsVideoCreateRequest';
717
719
  export * from './StreamsVideoEncodingStatus';
718
720
  export * from './StreamsVideoEncodingTask';
@@ -727,8 +727,10 @@ __exportStar(require("./StreamsLiveCreateRequest"), exports);
727
727
  __exportStar(require("./StreamsLiveLifeCycle"), exports);
728
728
  __exportStar(require("./StreamsLiveResponse"), exports);
729
729
  __exportStar(require("./StreamsLiveUpdateRequest"), exports);
730
+ __exportStar(require("./StreamsSearchResponse"), exports);
730
731
  __exportStar(require("./StreamsStyleConfigPlayerStyle"), exports);
731
732
  __exportStar(require("./StreamsStyleConfigResponse"), exports);
733
+ __exportStar(require("./StreamsType"), exports);
732
734
  __exportStar(require("./StreamsVideoCreateRequest"), exports);
733
735
  __exportStar(require("./StreamsVideoEncodingStatus"), exports);
734
736
  __exportStar(require("./StreamsVideoEncodingTask"), exports);
@@ -1,5 +1,6 @@
1
1
  import { BaseAPI } from '../common/BaseAPI';
2
2
  import Configuration from '../common/Configuration';
3
+ import SearchApi from './search/SearchApi';
3
4
  import VideoApi from './video/VideoApi';
4
5
  import LiveApi from './live/LiveApi';
5
6
  /**
@@ -9,6 +10,7 @@ import LiveApi from './live/LiveApi';
9
10
  * @extends {BaseAPI}
10
11
  */
11
12
  export default class StreamsApi extends BaseAPI {
13
+ search: SearchApi;
12
14
  video: VideoApi;
13
15
  live: LiveApi;
14
16
  constructor(configuration: Configuration);
@@ -16,6 +16,7 @@ var __extends = (this && this.__extends) || (function () {
16
16
  })();
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  var BaseAPI_1 = require("../common/BaseAPI");
19
+ var SearchApi_1 = require("./search/SearchApi");
19
20
  var VideoApi_1 = require("./video/VideoApi");
20
21
  var LiveApi_1 = require("./live/LiveApi");
21
22
  /**
@@ -28,6 +29,7 @@ var StreamsApi = /** @class */ (function (_super) {
28
29
  __extends(StreamsApi, _super);
29
30
  function StreamsApi(configuration) {
30
31
  var _this = _super.call(this, configuration) || this;
32
+ _this.search = new SearchApi_1.default(configuration);
31
33
  _this.video = new VideoApi_1.default(configuration);
32
34
  _this.live = new LiveApi_1.default(configuration);
33
35
  return _this;
@@ -0,0 +1,21 @@
1
+ import { BaseAPI } from '../../common/BaseAPI';
2
+ import Configuration from '../../common/Configuration';
3
+ import StreamsSearchResponse from '../../models/StreamsSearchResponse';
4
+ import PaginationResponse from '../../models/PaginationResponse';
5
+ import { StreamsSearchResponseListQueryParams, StreamsSearchResponseListQueryParamsBuilder } from './StreamsSearchResponseListQueryParams';
6
+ /**
7
+ * SearchApi - object-oriented interface
8
+ * @export
9
+ * @class SearchApi
10
+ * @extends {BaseAPI}
11
+ */
12
+ export default class SearchApi extends BaseAPI {
13
+ constructor(configuration: Configuration);
14
+ /**
15
+ * @summary Get paginated search results of VOD and Live streams
16
+ * @param {*} [queryParameters] query parameters for filtering, sorting and pagination
17
+ * @throws {BitmovinError}
18
+ * @memberof SearchApi
19
+ */
20
+ list(queryParameters?: StreamsSearchResponseListQueryParams | ((q: StreamsSearchResponseListQueryParamsBuilder) => StreamsSearchResponseListQueryParamsBuilder)): Promise<PaginationResponse<StreamsSearchResponse>>;
21
+ }
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ var BaseAPI_1 = require("../../common/BaseAPI");
19
+ var StreamsSearchResponse_1 = require("../../models/StreamsSearchResponse");
20
+ var PaginationResponse_1 = require("../../models/PaginationResponse");
21
+ var StreamsSearchResponseListQueryParams_1 = require("./StreamsSearchResponseListQueryParams");
22
+ /**
23
+ * SearchApi - object-oriented interface
24
+ * @export
25
+ * @class SearchApi
26
+ * @extends {BaseAPI}
27
+ */
28
+ var SearchApi = /** @class */ (function (_super) {
29
+ __extends(SearchApi, _super);
30
+ function SearchApi(configuration) {
31
+ return _super.call(this, configuration) || this;
32
+ }
33
+ /**
34
+ * @summary Get paginated search results of VOD and Live streams
35
+ * @param {*} [queryParameters] query parameters for filtering, sorting and pagination
36
+ * @throws {BitmovinError}
37
+ * @memberof SearchApi
38
+ */
39
+ SearchApi.prototype.list = function (queryParameters) {
40
+ var queryParams = {};
41
+ if (typeof queryParameters === 'function') {
42
+ queryParams = queryParameters(new StreamsSearchResponseListQueryParams_1.StreamsSearchResponseListQueryParamsBuilder()).buildQueryParams();
43
+ }
44
+ else if (queryParameters) {
45
+ queryParams = queryParameters;
46
+ }
47
+ return this.restClient.get('/streams/search', {}, queryParams).then(function (response) {
48
+ return new PaginationResponse_1.default(response, StreamsSearchResponse_1.default);
49
+ });
50
+ };
51
+ return SearchApi;
52
+ }(BaseAPI_1.BaseAPI));
53
+ exports.default = SearchApi;
@@ -0,0 +1,39 @@
1
+ export interface StreamsSearchResponseListQueryParams {
2
+ /**
3
+ * Index of the first item to return, starting at 0. Default is 0
4
+ * @type {number}
5
+ * @memberof StreamsSearchResponseListQueryParams
6
+ */
7
+ offset?: number | undefined;
8
+ /**
9
+ * Maximum number of items to return. Default is 25, maximum is 100
10
+ * @type {number}
11
+ * @memberof StreamsSearchResponseListQueryParams
12
+ */
13
+ limit?: number | undefined;
14
+ /**
15
+ * Query to search against
16
+ * @type {string}
17
+ * @memberof StreamsSearchResponseListQueryParams
18
+ */
19
+ query?: string | undefined;
20
+ }
21
+ export declare class StreamsSearchResponseListQueryParamsBuilder {
22
+ private internalParams;
23
+ /**
24
+ *
25
+ * @param offset Index of the first item to return, starting at 0. Default is 0
26
+ */
27
+ offset(offset: number): this;
28
+ /**
29
+ *
30
+ * @param limit Maximum number of items to return. Default is 25, maximum is 100
31
+ */
32
+ limit(limit: number): this;
33
+ /**
34
+ *
35
+ * @param query Query to search against
36
+ */
37
+ query(query: string): this;
38
+ buildQueryParams(): StreamsSearchResponseListQueryParams;
39
+ }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StreamsSearchResponseListQueryParamsBuilder = void 0;
4
+ var StreamsSearchResponseListQueryParamsBuilder = /** @class */ (function () {
5
+ function StreamsSearchResponseListQueryParamsBuilder() {
6
+ this.internalParams = {};
7
+ }
8
+ /**
9
+ *
10
+ * @param offset Index of the first item to return, starting at 0. Default is 0
11
+ */
12
+ StreamsSearchResponseListQueryParamsBuilder.prototype.offset = function (offset) {
13
+ this.internalParams.offset = offset;
14
+ return this;
15
+ };
16
+ /**
17
+ *
18
+ * @param limit Maximum number of items to return. Default is 25, maximum is 100
19
+ */
20
+ StreamsSearchResponseListQueryParamsBuilder.prototype.limit = function (limit) {
21
+ this.internalParams.limit = limit;
22
+ return this;
23
+ };
24
+ /**
25
+ *
26
+ * @param query Query to search against
27
+ */
28
+ StreamsSearchResponseListQueryParamsBuilder.prototype.query = function (query) {
29
+ this.internalParams.query = query;
30
+ return this;
31
+ };
32
+ StreamsSearchResponseListQueryParamsBuilder.prototype.buildQueryParams = function () {
33
+ return this.internalParams;
34
+ };
35
+ return StreamsSearchResponseListQueryParamsBuilder;
36
+ }());
37
+ exports.StreamsSearchResponseListQueryParamsBuilder = StreamsSearchResponseListQueryParamsBuilder;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitmovin/api-sdk",
3
- "version": "1.168.0",
3
+ "version": "1.170.0",
4
4
  "description": "Bitmovin JS/TS API SDK",
5
5
  "author": "Bitmovin Inc",
6
6
  "keywords": [