@dolbyio/dolbyio-rest-apis-client 6.1.0 → 6.2.1

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/dist/index.js CHANGED
@@ -34,4 +34,4 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
34
34
  // Expose the logger to control when/where to log
35
35
 
36
36
  /** Gets the version of this library. */
37
- var version = exports.version = "6.1.0";
37
+ var version = exports.version = "6.2.1";
@@ -44,6 +44,7 @@ var sendRequest = function sendRequest(options) {
44
44
  };
45
45
 
46
46
  // Override the User Agent
47
+ // @ts-ignore
47
48
  opts.headers['User-Agent'] = "DolbyIoRestApiSdk/".concat(_index.version, "; Node/").concat(process.versions.node);
48
49
  var req = _followRedirects.https.request(opts, function (res) {
49
50
  _jsLogger["default"].info("[".concat(opts.method, "] ").concat(res.statusCode, " - https://").concat(opts.hostname).concat(opts.path));
@@ -202,6 +203,7 @@ var download = exports.download = function download(filepath, options) {
202
203
  };
203
204
 
204
205
  // Override the User Agent
206
+ // @ts-ignore
205
207
  opts.headers['User-Agent'] = "DolbyIoRestApiSdk/".concat(_index.version, "; Node/").concat(process.versions.node);
206
208
  var req = _followRedirects.https.request(opts, function (res) {
207
209
  _jsLogger["default"].info("[".concat(opts.method, "] ").concat(res.statusCode, " - https://").concat(opts.hostname).concat(opts.path));
@@ -59,7 +59,7 @@ export declare const list: (apiSecret: string, params: ListMediaAssetsQueryParam
59
59
  export declare const deleteAssets: (apiSecret: string, assetIds: string[]) => Promise<{
60
60
  id?: string;
61
61
  error?: string;
62
- }[]>;
62
+ }[] | null>;
63
63
  /**
64
64
  * ## Read Media Asset
65
65
  *
@@ -88,7 +88,7 @@ export declare const read: (apiSecret: string, assetId: string) => Promise<Asset
88
88
  export declare const deleteAllAssets: (apiSecret: string, mediaAssetType: "recording" | "clip" | "storageValidation" | "timeline") => Promise<{
89
89
  id?: string;
90
90
  error?: string;
91
- }[]>;
91
+ }[] | null>;
92
92
  /**
93
93
  * ## Generate Upload Credentials
94
94
  *
@@ -8,6 +8,12 @@ export * as account from './account';
8
8
  * Read about {@link https://optiview.dolby.com/docs/millicast/distribution/stream-recordings/ | Stream Recordings} in the documentation.
9
9
  */
10
10
  export * as assets from './assets';
11
+ /**
12
+ * ## Media Distributions
13
+ *
14
+ * APIs to manage the media distributions.
15
+ */
16
+ export * as mediaDistributions from './mediaDistributions';
11
17
  /** APIs to update the default and list the Dolby OptiView clusters of the account. */
12
18
  export * as cluster from './cluster';
13
19
  /**
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  var _exportNames = {
8
8
  account: true,
9
9
  assets: true,
10
+ mediaDistributions: true,
10
11
  cluster: true,
11
12
  transcoders: true,
12
13
  director: true,
@@ -16,7 +17,7 @@ var _exportNames = {
16
17
  subscribeToken: true,
17
18
  webhooks: true
18
19
  };
19
- exports.webhooks = exports.transcoders = exports.subscribeToken = exports.stream = exports.publishToken = exports.monitoring = exports.director = exports.cluster = exports.assets = exports.account = void 0;
20
+ exports.webhooks = exports.transcoders = exports.subscribeToken = exports.stream = exports.publishToken = exports.monitoring = exports.mediaDistributions = exports.director = exports.cluster = exports.assets = exports.account = void 0;
20
21
  var _types = require("./types");
21
22
  Object.keys(_types).forEach(function (key) {
22
23
  if (key === "default" || key === "__esModule") return;
@@ -33,6 +34,8 @@ var _account = _interopRequireWildcard(require("./account"));
33
34
  exports.account = _account;
34
35
  var _assets = _interopRequireWildcard(require("./assets"));
35
36
  exports.assets = _assets;
37
+ var _mediaDistributions = _interopRequireWildcard(require("./mediaDistributions"));
38
+ exports.mediaDistributions = _mediaDistributions;
36
39
  var _cluster = _interopRequireWildcard(require("./cluster"));
37
40
  exports.cluster = _cluster;
38
41
  var _transcoders = _interopRequireWildcard(require("./transcoders"));
@@ -0,0 +1,112 @@
1
+ import { CreateMediaDistributionRequest, UpdateMediaDistributionRequest, MediaDistribution, ListMediaDistributionsQueryParams, ListMediaDistributionsResponse, SecurityKey, CreaseSecurityKeyRequest } from './types/mediaDistributions';
2
+ /**
3
+ * ## Creates Media Distribution
4
+ *
5
+ * Creates a new media distribution for viewing HLS media assets.
6
+ *
7
+ * @see {@link https://optiview.dolby.com/docs/millicast/api/media-distributions-create-media-distribution/}
8
+ *
9
+ * @param apiSecret The API Secret used to authenticate this request.
10
+ * @param createRequest The request body for creating a new media asset.
11
+ *
12
+ * @returns A {@link !Promise Promise} whose fulfillment handler receives an {@link MediaDistribution} object.
13
+ */
14
+ export declare const create: (apiSecret: string, createRequest: CreateMediaDistributionRequest) => Promise<MediaDistribution>;
15
+ /**
16
+ * ## Lists Media Distribution
17
+ *
18
+ * List all media distributions with specific sorting and pagination.
19
+ *
20
+ * @see {@link https://optiview.dolby.com/docs/millicast/api/media-distributions-list-media-distribution/}
21
+ *
22
+ * @param apiSecret The API Secret used to authenticate this request.
23
+ * @param params Query parameters for filtering the list of media distributions.
24
+ *
25
+ * @returns A {@link !Promise Promise} whose fulfillment handler receives an array of {@link ListMediaDistributionsResponse} objects.
26
+ */
27
+ export declare const list: (apiSecret: string, params: ListMediaDistributionsQueryParams) => Promise<ListMediaDistributionsResponse[]>;
28
+ /**
29
+ * ## Reads Media Distribution
30
+ *
31
+ * Gets media distribution specified by `mediaDistributionId`.
32
+ *
33
+ * @see {@link https://optiview.dolby.com/docs/millicast/api/media-distributions-read-media-distribution/}
34
+ *
35
+ * @param apiSecret The API Secret used to authenticate this request.
36
+ * @param mediaDistributionId The ID of the media distribution to read.
37
+ *
38
+ * @returns A {@link !Promise Promise} whose fulfillment handler receives an {@link MediaDistribution} object.
39
+ */
40
+ export declare const read: (apiSecret: string, mediaDistributionId: string) => Promise<MediaDistribution>;
41
+ /**
42
+ * ## Deletes Media Distribution
43
+ *
44
+ * Deletes media distribution specified by a `mediaDistributionId`.
45
+ *
46
+ * @see {@link https://optiview.dolby.com/docs/millicast/api/media-distributions-delete-media-distribution/}
47
+ *
48
+ * @param apiSecret The API Secret used to authenticate this request.
49
+ * @param mediaDistributionId The ID of the media distribution to delete.
50
+ *
51
+ * @returns A {@link !Promise Promise} whose fulfillment handler receives an array of asset deletion tasks that failed.
52
+ */
53
+ export declare const deleteMediaDistribution: (apiSecret: string, mediaDistributionId: string) => Promise<{
54
+ id?: string;
55
+ error?: string;
56
+ }[] | null>;
57
+ /**
58
+ * ## Updates Media Asset
59
+ *
60
+ * Update media asset settings.
61
+ *
62
+ * @see {@link https://optiview.dolby.com/docs/millicast/api/media-distributions-update-media-distribution/}
63
+ *
64
+ * @param apiSecret The API Secret used to authenticate this request.
65
+ * @param updateRequest The request body for creating a new media asset.
66
+ *
67
+ * @returns A {@link !Promise Promise} whose fulfillment handler receives a {@link MediaDistribution} object.
68
+ */
69
+ export declare const updateMediaDistribution: (apiSecret: string, updateRequest: UpdateMediaDistributionRequest) => Promise<MediaDistribution>;
70
+ /**
71
+ * ## Gets all security keys of a media distribution by ID
72
+ *
73
+ * Get all security keys of a media distribution by ID.
74
+ *
75
+ * @see {@link https://optiview.dolby.com/docs/millicast/api/media-distributions-get-security-keys/}
76
+ *
77
+ * @param apiSecret The API Secret used to authenticate this request.
78
+ * @param mediaDistributionId The ID of the media distribution to get the security keys from.
79
+ *
80
+ * @returns A {@link !Promise Promise} whose fulfillment handler receives a {@link SecurityKey} object.
81
+ */
82
+ export declare const getSecurityKey: (apiSecret: string, mediaDistributionId: string) => Promise<SecurityKey[]>;
83
+ /**
84
+ * ## Creates a Security Key
85
+ *
86
+ * Creates a new security key for a media distribution. Each media distribution may have up to 2 security keys.
87
+ *
88
+ * @see {@link https://optiview.dolby.com/docs/millicast/api/media-distributions-create-security-key/}
89
+ *
90
+ * @param apiSecret The API Secret used to authenticate this request.
91
+ * @param createRequest The request body for creating a new security key.
92
+ *
93
+ * @returns A {@link !Promise Promise} whose fulfillment handler receives a {@link SecurityKey} object.
94
+ */
95
+ export declare const createSecurityKey: (apiSecret: string, createRequest: CreaseSecurityKeyRequest) => Promise<SecurityKey>;
96
+ /**
97
+ * ## Deletes Media Distribution Security Key
98
+ *
99
+ * Deletes a media distribution security key.
100
+ *
101
+ * @see {@link https://optiview.dolby.com/docs/millicast/api/media-distributions-delete-security-key/}
102
+ *
103
+ * @param apiSecret The API Secret used to authenticate this request.
104
+ * @param mediaDistributionId The ID of the media distribution to get the key from.
105
+ * @param securityKeyId The ID of the security key to delete.
106
+ *
107
+ * @returns A {@link !Promise Promise} whose fulfillment handler receives an array of asset deletion tasks that failed.
108
+ */
109
+ export declare const deleteSecurityKey: (apiSecret: string, mediaDistributionId: string, securityKeyId: string) => Promise<{
110
+ status?: string;
111
+ message?: string;
112
+ }[] | null>;
@@ -0,0 +1,337 @@
1
+ "use strict";
2
+
3
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.updateMediaDistribution = exports.read = exports.list = exports.getSecurityKey = exports.deleteSecurityKey = exports.deleteMediaDistribution = exports.createSecurityKey = exports.create = void 0;
8
+ var Urls = _interopRequireWildcard(require("../urls"));
9
+ var _httpHelpers = require("./internal/httpHelpers");
10
+ var _stringHelpers = require("./internal/stringHelpers");
11
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
12
+ function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
13
+ function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
14
+ function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
15
+ function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
16
+ /**
17
+ * ## Creates Media Distribution
18
+ *
19
+ * Creates a new media distribution for viewing HLS media assets.
20
+ *
21
+ * @see {@link https://optiview.dolby.com/docs/millicast/api/media-distributions-create-media-distribution/}
22
+ *
23
+ * @param apiSecret The API Secret used to authenticate this request.
24
+ * @param createRequest The request body for creating a new media asset.
25
+ *
26
+ * @returns A {@link !Promise Promise} whose fulfillment handler receives an {@link MediaDistribution} object.
27
+ */
28
+ var create = exports.create = /*#__PURE__*/function () {
29
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(apiSecret, createRequest) {
30
+ var options;
31
+ return _regenerator().w(function (_context) {
32
+ while (1) switch (_context.n) {
33
+ case 0:
34
+ options = {
35
+ hostname: Urls.getRtsHostname(),
36
+ path: '/api/v3/media/distributions',
37
+ headers: {
38
+ Accept: 'application/json',
39
+ 'Content-Type': 'application/json',
40
+ Authorization: "Bearer ".concat(apiSecret)
41
+ },
42
+ body: JSON.stringify(createRequest)
43
+ };
44
+ _context.n = 1;
45
+ return (0, _httpHelpers.sendPost)(options);
46
+ case 1:
47
+ return _context.a(2, _context.v);
48
+ }
49
+ }, _callee);
50
+ }));
51
+ return function create(_x, _x2) {
52
+ return _ref.apply(this, arguments);
53
+ };
54
+ }();
55
+
56
+ /**
57
+ * ## Lists Media Distribution
58
+ *
59
+ * List all media distributions with specific sorting and pagination.
60
+ *
61
+ * @see {@link https://optiview.dolby.com/docs/millicast/api/media-distributions-list-media-distribution/}
62
+ *
63
+ * @param apiSecret The API Secret used to authenticate this request.
64
+ * @param params Query parameters for filtering the list of media distributions.
65
+ *
66
+ * @returns A {@link !Promise Promise} whose fulfillment handler receives an array of {@link ListMediaDistributionsResponse} objects.
67
+ */
68
+ var list = exports.list = /*#__PURE__*/function () {
69
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(apiSecret, params) {
70
+ var options;
71
+ return _regenerator().w(function (_context2) {
72
+ while (1) switch (_context2.n) {
73
+ case 0:
74
+ options = {
75
+ hostname: Urls.getRtsHostname(),
76
+ path: '/api/v3/media/distributions',
77
+ headers: {
78
+ Accept: 'application/json',
79
+ 'Content-Type': 'application/json',
80
+ Authorization: "Bearer ".concat(apiSecret)
81
+ },
82
+ params: (0, _stringHelpers.toDictString)(params)
83
+ };
84
+ _context2.n = 1;
85
+ return (0, _httpHelpers.sendGet)(options);
86
+ case 1:
87
+ return _context2.a(2, _context2.v);
88
+ }
89
+ }, _callee2);
90
+ }));
91
+ return function list(_x3, _x4) {
92
+ return _ref2.apply(this, arguments);
93
+ };
94
+ }();
95
+
96
+ /**
97
+ * ## Reads Media Distribution
98
+ *
99
+ * Gets media distribution specified by `mediaDistributionId`.
100
+ *
101
+ * @see {@link https://optiview.dolby.com/docs/millicast/api/media-distributions-read-media-distribution/}
102
+ *
103
+ * @param apiSecret The API Secret used to authenticate this request.
104
+ * @param mediaDistributionId The ID of the media distribution to read.
105
+ *
106
+ * @returns A {@link !Promise Promise} whose fulfillment handler receives an {@link MediaDistribution} object.
107
+ */
108
+ var read = exports.read = /*#__PURE__*/function () {
109
+ var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(apiSecret, mediaDistributionId) {
110
+ var options;
111
+ return _regenerator().w(function (_context3) {
112
+ while (1) switch (_context3.n) {
113
+ case 0:
114
+ options = {
115
+ hostname: Urls.getRtsHostname(),
116
+ path: "/api/v3/media/distributions/".concat(mediaDistributionId),
117
+ headers: {
118
+ Accept: 'application/json',
119
+ Authorization: "Bearer ".concat(apiSecret)
120
+ }
121
+ };
122
+ _context3.n = 1;
123
+ return (0, _httpHelpers.sendGet)(options);
124
+ case 1:
125
+ return _context3.a(2, _context3.v);
126
+ }
127
+ }, _callee3);
128
+ }));
129
+ return function read(_x5, _x6) {
130
+ return _ref3.apply(this, arguments);
131
+ };
132
+ }();
133
+
134
+ /**
135
+ * ## Deletes Media Distribution
136
+ *
137
+ * Deletes media distribution specified by a `mediaDistributionId`.
138
+ *
139
+ * @see {@link https://optiview.dolby.com/docs/millicast/api/media-distributions-delete-media-distribution/}
140
+ *
141
+ * @param apiSecret The API Secret used to authenticate this request.
142
+ * @param mediaDistributionId The ID of the media distribution to delete.
143
+ *
144
+ * @returns A {@link !Promise Promise} whose fulfillment handler receives an array of asset deletion tasks that failed.
145
+ */
146
+ var deleteMediaDistribution = exports.deleteMediaDistribution = /*#__PURE__*/function () {
147
+ var _ref4 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(apiSecret, mediaDistributionId) {
148
+ var options;
149
+ return _regenerator().w(function (_context4) {
150
+ while (1) switch (_context4.n) {
151
+ case 0:
152
+ options = {
153
+ hostname: Urls.getRtsHostname(),
154
+ path: "/api/v3/media/distributions/".concat(mediaDistributionId),
155
+ headers: {
156
+ Accept: 'application/json',
157
+ 'Content-Type': 'application/json',
158
+ Authorization: "Bearer ".concat(apiSecret)
159
+ }
160
+ };
161
+ _context4.n = 1;
162
+ return (0, _httpHelpers.sendDelete)(options);
163
+ case 1:
164
+ return _context4.a(2, _context4.v);
165
+ }
166
+ }, _callee4);
167
+ }));
168
+ return function deleteMediaDistribution(_x7, _x8) {
169
+ return _ref4.apply(this, arguments);
170
+ };
171
+ }();
172
+
173
+ /**
174
+ * ## Updates Media Asset
175
+ *
176
+ * Update media asset settings.
177
+ *
178
+ * @see {@link https://optiview.dolby.com/docs/millicast/api/media-distributions-update-media-distribution/}
179
+ *
180
+ * @param apiSecret The API Secret used to authenticate this request.
181
+ * @param updateRequest The request body for creating a new media asset.
182
+ *
183
+ * @returns A {@link !Promise Promise} whose fulfillment handler receives a {@link MediaDistribution} object.
184
+ */
185
+ var updateMediaDistribution = exports.updateMediaDistribution = /*#__PURE__*/function () {
186
+ var _ref5 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5(apiSecret, updateRequest) {
187
+ var body, options;
188
+ return _regenerator().w(function (_context5) {
189
+ while (1) switch (_context5.n) {
190
+ case 0:
191
+ body = {
192
+ name: updateRequest.name,
193
+ "default": updateRequest["default"]
194
+ };
195
+ options = {
196
+ hostname: Urls.getRtsHostname(),
197
+ path: "/api/v3/media/distributions/".concat(updateRequest.id),
198
+ headers: {
199
+ Accept: 'application/json',
200
+ 'Content-Type': 'application/json',
201
+ Authorization: "Bearer ".concat(apiSecret)
202
+ },
203
+ body: JSON.stringify(body)
204
+ };
205
+ _context5.n = 1;
206
+ return (0, _httpHelpers.sendPatch)(options);
207
+ case 1:
208
+ return _context5.a(2, _context5.v);
209
+ }
210
+ }, _callee5);
211
+ }));
212
+ return function updateMediaDistribution(_x9, _x0) {
213
+ return _ref5.apply(this, arguments);
214
+ };
215
+ }();
216
+
217
+ /**
218
+ * ## Gets all security keys of a media distribution by ID
219
+ *
220
+ * Get all security keys of a media distribution by ID.
221
+ *
222
+ * @see {@link https://optiview.dolby.com/docs/millicast/api/media-distributions-get-security-keys/}
223
+ *
224
+ * @param apiSecret The API Secret used to authenticate this request.
225
+ * @param mediaDistributionId The ID of the media distribution to get the security keys from.
226
+ *
227
+ * @returns A {@link !Promise Promise} whose fulfillment handler receives a {@link SecurityKey} object.
228
+ */
229
+ var getSecurityKey = exports.getSecurityKey = /*#__PURE__*/function () {
230
+ var _ref6 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6(apiSecret, mediaDistributionId) {
231
+ var options;
232
+ return _regenerator().w(function (_context6) {
233
+ while (1) switch (_context6.n) {
234
+ case 0:
235
+ options = {
236
+ hostname: Urls.getRtsHostname(),
237
+ path: "/api/v3/media/distributions/".concat(mediaDistributionId, "/security/keys"),
238
+ headers: {
239
+ Accept: 'application/json',
240
+ Authorization: "Bearer ".concat(apiSecret)
241
+ }
242
+ };
243
+ _context6.n = 1;
244
+ return (0, _httpHelpers.sendGet)(options);
245
+ case 1:
246
+ return _context6.a(2, _context6.v);
247
+ }
248
+ }, _callee6);
249
+ }));
250
+ return function getSecurityKey(_x1, _x10) {
251
+ return _ref6.apply(this, arguments);
252
+ };
253
+ }();
254
+
255
+ /**
256
+ * ## Creates a Security Key
257
+ *
258
+ * Creates a new security key for a media distribution. Each media distribution may have up to 2 security keys.
259
+ *
260
+ * @see {@link https://optiview.dolby.com/docs/millicast/api/media-distributions-create-security-key/}
261
+ *
262
+ * @param apiSecret The API Secret used to authenticate this request.
263
+ * @param createRequest The request body for creating a new security key.
264
+ *
265
+ * @returns A {@link !Promise Promise} whose fulfillment handler receives a {@link SecurityKey} object.
266
+ */
267
+ var createSecurityKey = exports.createSecurityKey = /*#__PURE__*/function () {
268
+ var _ref7 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee7(apiSecret, createRequest) {
269
+ var body, options;
270
+ return _regenerator().w(function (_context7) {
271
+ while (1) switch (_context7.n) {
272
+ case 0:
273
+ body = {
274
+ name: createRequest.name,
275
+ key: createRequest.key
276
+ };
277
+ options = {
278
+ hostname: Urls.getRtsHostname(),
279
+ path: "/api/v3/media/distributions/".concat(createRequest.mediaDistributionId, "/security/keys"),
280
+ headers: {
281
+ Accept: 'application/json',
282
+ 'Content-Type': 'application/json',
283
+ Authorization: "Bearer ".concat(apiSecret)
284
+ },
285
+ body: JSON.stringify(body)
286
+ };
287
+ _context7.n = 1;
288
+ return (0, _httpHelpers.sendPost)(options);
289
+ case 1:
290
+ return _context7.a(2, _context7.v);
291
+ }
292
+ }, _callee7);
293
+ }));
294
+ return function createSecurityKey(_x11, _x12) {
295
+ return _ref7.apply(this, arguments);
296
+ };
297
+ }();
298
+
299
+ /**
300
+ * ## Deletes Media Distribution Security Key
301
+ *
302
+ * Deletes a media distribution security key.
303
+ *
304
+ * @see {@link https://optiview.dolby.com/docs/millicast/api/media-distributions-delete-security-key/}
305
+ *
306
+ * @param apiSecret The API Secret used to authenticate this request.
307
+ * @param mediaDistributionId The ID of the media distribution to get the key from.
308
+ * @param securityKeyId The ID of the security key to delete.
309
+ *
310
+ * @returns A {@link !Promise Promise} whose fulfillment handler receives an array of asset deletion tasks that failed.
311
+ */
312
+ var deleteSecurityKey = exports.deleteSecurityKey = /*#__PURE__*/function () {
313
+ var _ref8 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee8(apiSecret, mediaDistributionId, securityKeyId) {
314
+ var options;
315
+ return _regenerator().w(function (_context8) {
316
+ while (1) switch (_context8.n) {
317
+ case 0:
318
+ options = {
319
+ hostname: Urls.getRtsHostname(),
320
+ path: "/api/v3/media/distributions/".concat(mediaDistributionId, "/security/keys/").concat(securityKeyId),
321
+ headers: {
322
+ Accept: 'application/json',
323
+ 'Content-Type': 'application/json',
324
+ Authorization: "Bearer ".concat(apiSecret)
325
+ }
326
+ };
327
+ _context8.n = 1;
328
+ return (0, _httpHelpers.sendDelete)(options);
329
+ case 1:
330
+ return _context8.a(2, _context8.v);
331
+ }
332
+ }, _callee8);
333
+ }));
334
+ return function deleteSecurityKey(_x13, _x14, _x15) {
335
+ return _ref8.apply(this, arguments);
336
+ };
337
+ }();
@@ -1,4 +1,4 @@
1
- import { GetStreamDetailsOptions, ListAllStreamsSortOptions, ListStreamsResponse, ListStreamsSortOptions, StreamDetails } from './types/monitoring';
1
+ import { GetStreamDetailsOptions, ListAllStreamsSortOptions, ListStreamsResponse, ListStreamsSortOptions, ListStreamSummariesResponse, ListStreamSummariesSortOptions, StreamDetails, StreamSummary } from './types/monitoring';
2
2
  /**
3
3
  * ## List Streams
4
4
  *
@@ -39,6 +39,51 @@ export declare const listAllStreams: (apiSecret: string, options: ListAllStreams
39
39
  * @param apiSecret The API Secret used to authenticate this request.
40
40
  * @param options Options to sort the response.
41
41
  *
42
- * @returns A {@link !Promise Promise} whose fulfillment handler receives an array of {@link PublishToken} objects.
42
+ * @returns A {@link !Promise Promise} whose fulfillment handler receives a {@link StreamDetails} object.
43
43
  */
44
44
  export declare const streamDetails: (apiSecret: string, options: GetStreamDetailsOptions) => Promise<StreamDetails>;
45
+ /**
46
+ * ## List Stream Summaries
47
+ *
48
+ * List a summary of all streams created within last hour with specific sorting and pagination.
49
+ * If the transcoderId is provided, all streams associated with the current or last active instance will be returned,
50
+ * regardless of the stream creation time. If response array is empty, you have reached the end of the list ordering.
51
+ * This is a lite version of {@link listStreams} which does not include feed details.
52
+ *
53
+ * @see {@link https://optiview.dolby.com/docs/millicast/api/monitoring-list-stream-summary/}
54
+ *
55
+ * @param apiSecret The API Secret used to authenticate this request.
56
+ * @param options Options to sort the response.
57
+ *
58
+ * @returns A {@link !Promise Promise} whose fulfillment handler receives an {@link ListStreamSummariesResponse} object.
59
+ */
60
+ export declare const listStreamSummaries: (apiSecret: string, options: ListStreamSummariesSortOptions) => Promise<ListStreamSummariesResponse>;
61
+ /**
62
+ * ## List all Stream Summaries
63
+ *
64
+ * List a summary of all streams created within last hour with specific sorting and pagination.
65
+ * If the transcoderId is provided, all streams associated with the current or last active instance will be returned,
66
+ * regardless of the stream creation time. If response array is empty, you have reached the end of the list ordering.
67
+ * This is a lite version of {@link listAllStreams} which does not include feed details.
68
+ *
69
+ * @see {@link https://optiview.dolby.com/docs/millicast/api/monitoring-list-stream-summary/}
70
+ *
71
+ * @param apiSecret The API Secret used to authenticate this request.
72
+ * @param options Options to sort the response.
73
+ *
74
+ * @returns A {@link !Promise Promise} whose fulfillment handler receives an array of {@link StreamSummary} object.
75
+ */
76
+ export declare const listAllStreamSummaries: (apiSecret: string, options: ListAllStreamsSortOptions) => Promise<StreamSummary[]>;
77
+ /**
78
+ * ## Stream Summary
79
+ *
80
+ * Get stream summary by stream name.
81
+ *
82
+ * @see {@link https://optiview.dolby.com/docs/millicast/api/monitoring-get-stream-summary/}
83
+ *
84
+ * @param apiSecret The API Secret used to authenticate this request.
85
+ * @param options Options to sort the response.
86
+ *
87
+ * @returns A {@link !Promise Promise} whose fulfillment handler receives a {@link StreamSummary} object.
88
+ */
89
+ export declare const streamSummary: (apiSecret: string, options: GetStreamDetailsOptions) => Promise<StreamSummary>;
@@ -4,7 +4,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.streamDetails = exports.listStreams = exports.listAllStreams = void 0;
7
+ exports.streamSummary = exports.streamDetails = exports.listStreams = exports.listStreamSummaries = exports.listAllStreams = exports.listAllStreamSummaries = void 0;
8
8
  var _httpHelpers = require("./internal/httpHelpers");
9
9
  var Urls = _interopRequireWildcard(require("../urls"));
10
10
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
@@ -162,7 +162,7 @@ var listAllStreams = exports.listAllStreams = /*#__PURE__*/function () {
162
162
  * @param apiSecret The API Secret used to authenticate this request.
163
163
  * @param options Options to sort the response.
164
164
  *
165
- * @returns A {@link !Promise Promise} whose fulfillment handler receives an array of {@link PublishToken} objects.
165
+ * @returns A {@link !Promise Promise} whose fulfillment handler receives a {@link StreamDetails} object.
166
166
  */
167
167
  var streamDetails = exports.streamDetails = /*#__PURE__*/function () {
168
168
  var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(apiSecret, options) {
@@ -188,4 +188,167 @@ var streamDetails = exports.streamDetails = /*#__PURE__*/function () {
188
188
  return function streamDetails(_x5, _x6) {
189
189
  return _ref3.apply(this, arguments);
190
190
  };
191
+ }();
192
+
193
+ /**
194
+ * ## List Stream Summaries
195
+ *
196
+ * List a summary of all streams created within last hour with specific sorting and pagination.
197
+ * If the transcoderId is provided, all streams associated with the current or last active instance will be returned,
198
+ * regardless of the stream creation time. If response array is empty, you have reached the end of the list ordering.
199
+ * This is a lite version of {@link listStreams} which does not include feed details.
200
+ *
201
+ * @see {@link https://optiview.dolby.com/docs/millicast/api/monitoring-list-stream-summary/}
202
+ *
203
+ * @param apiSecret The API Secret used to authenticate this request.
204
+ * @param options Options to sort the response.
205
+ *
206
+ * @returns A {@link !Promise Promise} whose fulfillment handler receives an {@link ListStreamSummariesResponse} object.
207
+ */
208
+ var listStreamSummaries = exports.listStreamSummaries = /*#__PURE__*/function () {
209
+ var _ref4 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(apiSecret, options) {
210
+ var _options$sortBy2, _options$page2, _options$itemsOnPage2, _options$isDescending2;
211
+ var params, queryOptions;
212
+ return _regenerator().w(function (_context4) {
213
+ while (1) switch (_context4.n) {
214
+ case 0:
215
+ params = {
216
+ sortBy: (_options$sortBy2 = options.sortBy) !== null && _options$sortBy2 !== void 0 ? _options$sortBy2 : 'Live',
217
+ page: ((_options$page2 = options.page) !== null && _options$page2 !== void 0 ? _options$page2 : 1).toString(),
218
+ itemsOnPage: ((_options$itemsOnPage2 = options.itemsOnPage) !== null && _options$itemsOnPage2 !== void 0 ? _options$itemsOnPage2 : 10).toString(),
219
+ isDescending: ((_options$isDescending2 = options.isDescending) !== null && _options$isDescending2 !== void 0 ? _options$isDescending2 : false).toString()
220
+ };
221
+ if (options.isActive) {
222
+ params['isActive'] = options.isActive;
223
+ }
224
+ if (options.cluster) {
225
+ params['cluster'] = options.cluster.join(',');
226
+ }
227
+ if (options.isSecure) {
228
+ params['isSecure'] = options.isSecure;
229
+ }
230
+ if (options.isMultisource) {
231
+ params['isMultisource'] = options.isMultisource;
232
+ }
233
+ if (options.searchSubstring) {
234
+ params['searchSubstring'] = options.searchSubstring;
235
+ }
236
+ if (options.isRecordingAllowed) {
237
+ params['isRecordingAllowed'] = options.isRecordingAllowed;
238
+ }
239
+ if (options.transcoderId) {
240
+ params['transcoderId'] = options.transcoderId;
241
+ }
242
+ queryOptions = {
243
+ hostname: Urls.getRtsHostname(),
244
+ path: '/api/monitoring/summary',
245
+ params: params,
246
+ headers: {
247
+ Accept: 'application/json',
248
+ Authorization: "Bearer ".concat(apiSecret)
249
+ }
250
+ };
251
+ _context4.n = 1;
252
+ return (0, _httpHelpers.sendGet)(queryOptions);
253
+ case 1:
254
+ return _context4.a(2, _context4.v);
255
+ }
256
+ }, _callee4);
257
+ }));
258
+ return function listStreamSummaries(_x7, _x8) {
259
+ return _ref4.apply(this, arguments);
260
+ };
261
+ }();
262
+
263
+ /**
264
+ * ## List all Stream Summaries
265
+ *
266
+ * List a summary of all streams created within last hour with specific sorting and pagination.
267
+ * If the transcoderId is provided, all streams associated with the current or last active instance will be returned,
268
+ * regardless of the stream creation time. If response array is empty, you have reached the end of the list ordering.
269
+ * This is a lite version of {@link listAllStreams} which does not include feed details.
270
+ *
271
+ * @see {@link https://optiview.dolby.com/docs/millicast/api/monitoring-list-stream-summary/}
272
+ *
273
+ * @param apiSecret The API Secret used to authenticate this request.
274
+ * @param options Options to sort the response.
275
+ *
276
+ * @returns A {@link !Promise Promise} whose fulfillment handler receives an array of {@link StreamSummary} object.
277
+ */
278
+ var listAllStreamSummaries = exports.listAllStreamSummaries = /*#__PURE__*/function () {
279
+ var _ref5 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5(apiSecret, options) {
280
+ var result, page, listOptions, response;
281
+ return _regenerator().w(function (_context5) {
282
+ while (1) switch (_context5.n) {
283
+ case 0:
284
+ result = [];
285
+ page = 1;
286
+ case 1:
287
+ listOptions = _objectSpread(_objectSpread({}, options), {}, {
288
+ page: page,
289
+ itemsOnPage: 25
290
+ });
291
+ _context5.n = 2;
292
+ return listStreamSummaries(apiSecret, listOptions);
293
+ case 2:
294
+ response = _context5.v;
295
+ if (!(response.data.length === 0)) {
296
+ _context5.n = 3;
297
+ break;
298
+ }
299
+ return _context5.a(3, 5);
300
+ case 3:
301
+ result.push.apply(result, _toConsumableArray(response.data));
302
+ page++;
303
+ case 4:
304
+ if (true) {
305
+ _context5.n = 1;
306
+ break;
307
+ }
308
+ case 5:
309
+ return _context5.a(2, result);
310
+ }
311
+ }, _callee5);
312
+ }));
313
+ return function listAllStreamSummaries(_x9, _x0) {
314
+ return _ref5.apply(this, arguments);
315
+ };
316
+ }();
317
+
318
+ /**
319
+ * ## Stream Summary
320
+ *
321
+ * Get stream summary by stream name.
322
+ *
323
+ * @see {@link https://optiview.dolby.com/docs/millicast/api/monitoring-get-stream-summary/}
324
+ *
325
+ * @param apiSecret The API Secret used to authenticate this request.
326
+ * @param options Options to sort the response.
327
+ *
328
+ * @returns A {@link !Promise Promise} whose fulfillment handler receives a {@link StreamSummary} object.
329
+ */
330
+ var streamSummary = exports.streamSummary = /*#__PURE__*/function () {
331
+ var _ref6 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6(apiSecret, options) {
332
+ var queryOptions;
333
+ return _regenerator().w(function (_context6) {
334
+ while (1) switch (_context6.n) {
335
+ case 0:
336
+ queryOptions = {
337
+ hostname: Urls.getRtsHostname(),
338
+ path: "/api/monitoring/summary/".concat(options.streamName),
339
+ headers: {
340
+ Accept: 'application/json',
341
+ Authorization: "Bearer ".concat(apiSecret)
342
+ }
343
+ };
344
+ _context6.n = 1;
345
+ return (0, _httpHelpers.sendGet)(queryOptions);
346
+ case 1:
347
+ return _context6.a(2, _context6.v);
348
+ }
349
+ }, _callee6);
350
+ }));
351
+ return function streamSummary(_x1, _x10) {
352
+ return _ref6.apply(this, arguments);
353
+ };
191
354
  }();
@@ -123,7 +123,7 @@ export interface AssetResponseData {
123
123
  /** Optional, ID of the object. */
124
124
  id?: string | null;
125
125
  /** Required, type of the object. */
126
- type: 'recording' | 'clip' | 'storageValidation' | 'timeline' | 'feed';
126
+ type: 'recording' | 'clip' | 'storageValidation' | 'timeline' | 'vod';
127
127
  /** Optional, information about the asset. */
128
128
  feed?: MediaAssetFeedSelectionModel;
129
129
  /** Required, ISO 8601 date string, Start time of clip. */
@@ -148,6 +148,10 @@ export interface AssetResponseData {
148
148
  metadata?: RecordMetadata;
149
149
  /** Optional, asset download URL. */
150
150
  download?: RecordDownloadUrl;
151
+ /** Optional, Media distribution ID. */
152
+ mediaDistributionId?: string | null;
153
+ /** Optional, custom path for VOD content. */
154
+ customPath?: string | null;
151
155
  }
152
156
  /**
153
157
  * The allowable sort options for listing media assets.
@@ -2,6 +2,7 @@ export * from './account';
2
2
  export * from './asset';
3
3
  export * from './cluster';
4
4
  export * from './director';
5
+ export * from './mediaDistributions';
5
6
  export * from './monitoring';
6
7
  export * from './publishToken';
7
8
  export * from './stream';
@@ -47,6 +47,17 @@ Object.keys(_director).forEach(function (key) {
47
47
  }
48
48
  });
49
49
  });
50
+ var _mediaDistributions = require("./mediaDistributions");
51
+ Object.keys(_mediaDistributions).forEach(function (key) {
52
+ if (key === "default" || key === "__esModule") return;
53
+ if (key in exports && exports[key] === _mediaDistributions[key]) return;
54
+ Object.defineProperty(exports, key, {
55
+ enumerable: true,
56
+ get: function get() {
57
+ return _mediaDistributions[key];
58
+ }
59
+ });
60
+ });
50
61
  var _monitoring = require("./monitoring");
51
62
  Object.keys(_monitoring).forEach(function (key) {
52
63
  if (key === "default" || key === "__esModule") return;
@@ -0,0 +1,112 @@
1
+ /**
2
+ * The allowable parameters for requesting the creation of a media distribution.
3
+ */
4
+ export interface CreateMediaDistributionRequest {
5
+ /** User-friendly name for the media distribution. The '*' character is not allowed. */
6
+ name: string;
7
+ /**
8
+ * Set this as the default media distribution that will be associated with
9
+ * all future media assets created without an explicit MediaDistributionId set.
10
+ */
11
+ default?: boolean;
12
+ /** Optional. Specify security settings for your media distribution. */
13
+ security?: {
14
+ /**
15
+ * Security keys that can be used to sign a JWT to authenticate media asset views.
16
+ * If no keys are provided the media distribution will be unsecured.
17
+ * This means any associated assets can be viewed without a token, and if a token is
18
+ * provided the signing key will not be validated.
19
+ * If a key is specified the media distribution will be secured and a valid token
20
+ * signed with one of the provided keys will be required to view associated media assets.
21
+ */
22
+ keys?: {
23
+ /** Name for the security key. */
24
+ name?: string | null;
25
+ /** Optional, key for the security key. */
26
+ key: string;
27
+ }[];
28
+ };
29
+ }
30
+ /**
31
+ * The allowable sort options for listing media distributions.
32
+ */
33
+ export type ListMediaDistributionsSortBy = 'createdAt';
34
+ /**
35
+ * The allowable parameters for listing and filtering media distributions.
36
+ */
37
+ export interface ListMediaDistributionsQueryParams {
38
+ /** Defaults to "createdAt". */
39
+ sort?: ListMediaDistributionsSortBy;
40
+ /** Optional. Case insensitive. */
41
+ name?: string | null;
42
+ /** Optional, search for default media distribution. */
43
+ default?: boolean;
44
+ /**
45
+ * Used for pagination.
46
+ * Do not include on the first request.
47
+ * For subsequent requests use the `pagination.cursor` field from the previous response.
48
+ * You must use the same sort option when requesting each page
49
+ */
50
+ cursor?: string | null;
51
+ /** Optional, integer, 1 to 100, defaults to 25. */
52
+ limit?: number;
53
+ /** Optional, defaults to `false`, sort descending boolean. */
54
+ desc?: boolean;
55
+ }
56
+ /**
57
+ * Response data for the list media distributions requests.
58
+ */
59
+ export interface ListMediaDistributionsResponse {
60
+ /** Defaults to "createdAt". */
61
+ data: MediaDistribution[];
62
+ /** Pagination object. */
63
+ pagination?: {
64
+ /** Has more pages. */
65
+ hasMore: boolean;
66
+ /** Cursor to go to the next page. */
67
+ cursor: string;
68
+ };
69
+ }
70
+ /**
71
+ * Response data for the creation of a media distribution.
72
+ */
73
+ export interface MediaDistribution extends CreateMediaDistributionRequest {
74
+ /** Identifier of the media distribution */
75
+ id: string;
76
+ /** When was the media distribution created. */
77
+ createdAt: string;
78
+ }
79
+ /**
80
+ * The allowable parameters for requesting the update of a media distribution.
81
+ */
82
+ export interface UpdateMediaDistributionRequest {
83
+ /** Identifier of the media distribution. */
84
+ id: string;
85
+ /** User-friendly name for the media distribution. The '*' character is not allowed. */
86
+ name: string;
87
+ /**
88
+ * Set this as the default media distribution that will be associated with
89
+ * all future media assets created without an explicit MediaDistributionId set.
90
+ */
91
+ default?: boolean;
92
+ }
93
+ /**
94
+ * Represents a security key.
95
+ */
96
+ export interface SecurityKey {
97
+ /** Identifier of the security key. */
98
+ id: string;
99
+ /** Name of the security key. */
100
+ name?: string;
101
+ }
102
+ /**
103
+ * Represents a security key.
104
+ */
105
+ export interface CreaseSecurityKeyRequest {
106
+ /** Identifier of the media distribution */
107
+ mediaDistributionId: string;
108
+ /** Key of the security key. */
109
+ key: string;
110
+ /** Name of the security key. */
111
+ name?: string;
112
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -12,8 +12,21 @@ export interface ListStreamsResponse {
12
12
  /** Array of stream details. */
13
13
  data: StreamDetails[];
14
14
  }
15
- /** Represents a stream details. */
16
- export interface StreamDetails {
15
+ export interface ListStreamSummariesResponse {
16
+ /** Pagination object. */
17
+ pagination?: {
18
+ /** Total number of items. */
19
+ totalItems: number;
20
+ /** Total number of pages. */
21
+ totalPages: number;
22
+ /** Number of items in that page. */
23
+ itemsOnPage: number;
24
+ };
25
+ /** Array of stream details. */
26
+ data: StreamSummary[];
27
+ }
28
+ /** Represents a stream summary. */
29
+ export interface StreamSummary {
17
30
  /** Identifier of the stream. */
18
31
  streamId: string;
19
32
  /** Name of the stream. */
@@ -36,6 +49,9 @@ export interface StreamDetails {
36
49
  endTime: string;
37
50
  /** Viewer count. */
38
51
  viewerCount: number;
52
+ }
53
+ /** Represents a stream details. */
54
+ export interface StreamDetails extends StreamSummary {
39
55
  /** Has redundant stream. */
40
56
  hasRedundant: boolean;
41
57
  /** Restreaming enabled. */
@@ -170,7 +186,7 @@ export interface FeedStats {
170
186
  packetLoss: number;
171
187
  }
172
188
  /** Represents the options to sort the response for listing all the streams. */
173
- export interface ListAllStreamsSortOptions {
189
+ export interface ListAllStreamSummariesSortOptions {
174
190
  /** How to sort the response. */
175
191
  sortBy: 'Live';
176
192
  /** Active streams. */
@@ -181,19 +197,25 @@ export interface ListAllStreamsSortOptions {
181
197
  isSecure?: boolean;
182
198
  /** Multi source streams. */
183
199
  isMultisource?: boolean;
184
- /** Redundant streams. */
185
- hasRedundant?: boolean;
186
200
  /** Filter the stream names. */
187
201
  searchSubstring?: string;
188
202
  /** Recorded allowed. */
189
203
  isRecordingAllowed?: boolean;
190
- /** Restreaming streams. */
191
- isRestreaming?: boolean;
192
204
  /** Identifier of the transcoder. */
193
205
  transcoderId?: string;
194
206
  }
207
+ /** Represents the options to sort the response for listing all the streams. */
208
+ export interface ListAllStreamsSortOptions extends ListAllStreamSummariesSortOptions {
209
+ /** Redundant streams. */
210
+ hasRedundant?: boolean;
211
+ /** Restreaming streams. */
212
+ isRestreaming?: boolean;
213
+ }
214
+ /** Represents the options to sort the response for listing streams. */
215
+ export interface ListStreamSummariesSortOptions extends ListAllStreamsSortOptions, ListSortOptions<'Live'> {
216
+ }
195
217
  /** Represents the options to sort the response for listing streams. */
196
- export interface ListStreamsSortOptions extends ListAllStreamsSortOptions, ListSortOptions<'Live'> {
218
+ export interface ListStreamsSortOptions extends ListStreamSummariesSortOptions {
197
219
  }
198
220
  /** Represents the options to query the stream details. */
199
221
  export interface GetStreamDetailsOptions {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dolbyio/dolbyio-rest-apis-client",
3
- "version": "6.1.0",
3
+ "version": "6.2.1",
4
4
  "description": "Node.JS wrapper for the Dolby OptiView REST APIs",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -45,16 +45,16 @@
45
45
  "@babel/preset-env": "^7.29.0",
46
46
  "@babel/preset-typescript": "^7.28.5",
47
47
  "@types/follow-redirects": "^1.14.4",
48
- "@types/node": "^25.3.0",
48
+ "@types/node": "^25.6.2",
49
49
  "babel-plugin-inline-replace-variables": "^1.3.1",
50
50
  "npm-watch": "^0.13.0",
51
- "prettier": "^3.8.1",
52
- "typedoc": "^0.28.17",
51
+ "prettier": "^3.8.3",
52
+ "typedoc": "^0.28.19",
53
53
  "typedoc-plugin-mdn-links": "^5.1.1",
54
- "typescript": "^5.9.3"
54
+ "typescript": "^6.0.3"
55
55
  },
56
56
  "dependencies": {
57
- "follow-redirects": "^1.15.11",
57
+ "follow-redirects": "^1.16.0",
58
58
  "js-logger": "^1.6.1"
59
59
  }
60
60
  }