@dolbyio/dolbyio-rest-apis-client 6.2.2 → 6.3.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/dist/index.js
CHANGED
|
@@ -50,6 +50,113 @@ export interface StreamSummary {
|
|
|
50
50
|
/** Viewer count. */
|
|
51
51
|
viewerCount: number;
|
|
52
52
|
}
|
|
53
|
+
/** Represents a Feed object. */
|
|
54
|
+
export interface Feed {
|
|
55
|
+
/** Identifier of the stream. */
|
|
56
|
+
streamId: string;
|
|
57
|
+
/** Identifier of the feed. */
|
|
58
|
+
feedId: string;
|
|
59
|
+
/** Identifier of the cluster. */
|
|
60
|
+
clusterId: string;
|
|
61
|
+
/** Identifier of the source. */
|
|
62
|
+
sourceId: string;
|
|
63
|
+
/** Simulcast ID. */
|
|
64
|
+
simulcastId: string;
|
|
65
|
+
/** Server ID. */
|
|
66
|
+
serverId: string;
|
|
67
|
+
/** Is the feed active. */
|
|
68
|
+
active: boolean;
|
|
69
|
+
/** Stream publishing start time. */
|
|
70
|
+
startTime: string;
|
|
71
|
+
/** Stream publishing end time. */
|
|
72
|
+
endTime?: string;
|
|
73
|
+
/** Is recording allowed for this stream. */
|
|
74
|
+
isRecordingAllowed: boolean;
|
|
75
|
+
/** Packet loss percentage over last five minutes. */
|
|
76
|
+
packetLoss: number;
|
|
77
|
+
/** Is the feed redundant. */
|
|
78
|
+
isRedundant?: boolean;
|
|
79
|
+
/** Feed priority. */
|
|
80
|
+
priority?: number;
|
|
81
|
+
/** Framerate. */
|
|
82
|
+
frameRate: number;
|
|
83
|
+
/** Feed type. */
|
|
84
|
+
type: string;
|
|
85
|
+
/** Identifier of the token. */
|
|
86
|
+
tokenId: number;
|
|
87
|
+
/** Client. */
|
|
88
|
+
client: {
|
|
89
|
+
/** Country. */
|
|
90
|
+
country: string;
|
|
91
|
+
/** City. */
|
|
92
|
+
city: string;
|
|
93
|
+
/** Continent. */
|
|
94
|
+
continent: string;
|
|
95
|
+
/** coordinates. */
|
|
96
|
+
coordinates: number[];
|
|
97
|
+
/** Sub. */
|
|
98
|
+
sub: string[];
|
|
99
|
+
/** IP Address. */
|
|
100
|
+
ip: string;
|
|
101
|
+
};
|
|
102
|
+
/** Restream information. */
|
|
103
|
+
restreams: Restream[];
|
|
104
|
+
/** Feed statistics. */
|
|
105
|
+
feedStats: FeedStats[];
|
|
106
|
+
/** Details for all tracks. */
|
|
107
|
+
trackDetails: TrackDetails[];
|
|
108
|
+
}
|
|
109
|
+
/** Represents the details of a track object. */
|
|
110
|
+
export interface TrackDetails {
|
|
111
|
+
/** Idenitfier of the track. */
|
|
112
|
+
trackId: string;
|
|
113
|
+
/** Encoding details. */
|
|
114
|
+
encodingDetails: EncodingDetails[];
|
|
115
|
+
}
|
|
116
|
+
/** Represents the encoding details of a track. */
|
|
117
|
+
export interface EncodingDetails {
|
|
118
|
+
/** Encoding ID. */
|
|
119
|
+
encodingId: string;
|
|
120
|
+
/** I-frame rate. */
|
|
121
|
+
iFrameRate: number;
|
|
122
|
+
/** B-frame rate. */
|
|
123
|
+
bFrameRate: number;
|
|
124
|
+
/** P-frame rate. */
|
|
125
|
+
pFrameRate: number;
|
|
126
|
+
/** Encoding statistics. */
|
|
127
|
+
encodingStats: EncodingStats[];
|
|
128
|
+
}
|
|
129
|
+
/** Represents the encoding statistic of a track. */
|
|
130
|
+
export interface EncodingStats {
|
|
131
|
+
/** Timestamp of the entry. */
|
|
132
|
+
timestamp: string;
|
|
133
|
+
/** Timestamp of the entry. */
|
|
134
|
+
resolution: {
|
|
135
|
+
/** Height of the frame. */
|
|
136
|
+
height: number;
|
|
137
|
+
/** Width of the frame. */
|
|
138
|
+
width: number;
|
|
139
|
+
};
|
|
140
|
+
/** Bitrate. */
|
|
141
|
+
bitRate: {
|
|
142
|
+
/** Audio bitrate. */
|
|
143
|
+
audioBitrate: number;
|
|
144
|
+
/** Video bitrate. */
|
|
145
|
+
videoBitrate: number;
|
|
146
|
+
};
|
|
147
|
+
/** Video codec. */
|
|
148
|
+
videoCodec: number;
|
|
149
|
+
/** Audio codec. */
|
|
150
|
+
audioCodec: number;
|
|
151
|
+
/** Frames. */
|
|
152
|
+
frames?: number;
|
|
153
|
+
/** RTT. */
|
|
154
|
+
rtt?: number;
|
|
155
|
+
/** Buffer Time. */
|
|
156
|
+
bufferTime?: number;
|
|
157
|
+
/** B-frames. */
|
|
158
|
+
bFrames?: number;
|
|
159
|
+
}
|
|
53
160
|
/** Represents a stream details. */
|
|
54
161
|
export interface StreamDetails extends StreamSummary {
|
|
55
162
|
/** Has redundant stream. */
|
|
@@ -57,106 +164,7 @@ export interface StreamDetails extends StreamSummary {
|
|
|
57
164
|
/** Restreaming enabled. */
|
|
58
165
|
restreaming: boolean;
|
|
59
166
|
/** Feeds. */
|
|
60
|
-
feeds:
|
|
61
|
-
/** Identifier of the stream. */
|
|
62
|
-
streamId: string;
|
|
63
|
-
/** Identifier of the feed. */
|
|
64
|
-
feedId: string;
|
|
65
|
-
/** Identifier of the cluster. */
|
|
66
|
-
clusterId: string;
|
|
67
|
-
/** Identifier of the source. */
|
|
68
|
-
sourceId: string;
|
|
69
|
-
/** Simulcast ID. */
|
|
70
|
-
simulcastId: string;
|
|
71
|
-
/** Server ID. */
|
|
72
|
-
serverId: string;
|
|
73
|
-
/** Is the feed active. */
|
|
74
|
-
active: boolean;
|
|
75
|
-
/** Stream publishing start time. */
|
|
76
|
-
startTime: string;
|
|
77
|
-
/** Stream publishing end time. */
|
|
78
|
-
endTime?: string;
|
|
79
|
-
/** Is recording allowed for this stream. */
|
|
80
|
-
isRecordingAllowed: boolean;
|
|
81
|
-
/** Packet loss percentage over last five minutes. */
|
|
82
|
-
packetLoss: number;
|
|
83
|
-
/** Is the feed redundant. */
|
|
84
|
-
isRedundant?: boolean;
|
|
85
|
-
/** Feed priority. */
|
|
86
|
-
priority?: number;
|
|
87
|
-
/** Framerate. */
|
|
88
|
-
frameRate: number;
|
|
89
|
-
/** Feed type. */
|
|
90
|
-
type: string;
|
|
91
|
-
/** Identifier of the token. */
|
|
92
|
-
tokenId: number;
|
|
93
|
-
/** Client. */
|
|
94
|
-
client: {
|
|
95
|
-
/** Country. */
|
|
96
|
-
country: string;
|
|
97
|
-
/** City. */
|
|
98
|
-
city: string;
|
|
99
|
-
/** Continent. */
|
|
100
|
-
continent: string;
|
|
101
|
-
/** coordinates. */
|
|
102
|
-
coordinates: number[];
|
|
103
|
-
/** Sub. */
|
|
104
|
-
sub: string[];
|
|
105
|
-
/** IP Address. */
|
|
106
|
-
ip: string;
|
|
107
|
-
};
|
|
108
|
-
/** Restream information. */
|
|
109
|
-
restreams: Restream[];
|
|
110
|
-
/** Feed statistics. */
|
|
111
|
-
feedStats: FeedStats[];
|
|
112
|
-
/** Details for all tracks. */
|
|
113
|
-
trackDetails: {
|
|
114
|
-
/** Idenitfier of the track. */
|
|
115
|
-
trackId: string;
|
|
116
|
-
/** Encoding details. */
|
|
117
|
-
encodingDetails: {
|
|
118
|
-
/** Encoding ID. */
|
|
119
|
-
encodingId: string;
|
|
120
|
-
/** I-frame rate. */
|
|
121
|
-
iFrameRate: number;
|
|
122
|
-
/** B-frame rate. */
|
|
123
|
-
bFrameRate: number;
|
|
124
|
-
/** P-frame rate. */
|
|
125
|
-
pFrameRate: number;
|
|
126
|
-
/** Encoding statistics. */
|
|
127
|
-
encodingStats: {
|
|
128
|
-
/** Timestamp of the entry. */
|
|
129
|
-
timestamp: string;
|
|
130
|
-
/** Timestamp of the entry. */
|
|
131
|
-
resolution: {
|
|
132
|
-
/** Height of the frame. */
|
|
133
|
-
height: number;
|
|
134
|
-
/** Width of the frame. */
|
|
135
|
-
width: number;
|
|
136
|
-
};
|
|
137
|
-
/** Bitrate. */
|
|
138
|
-
bitRate: {
|
|
139
|
-
/** Audio bitrate. */
|
|
140
|
-
audioBitrate: number;
|
|
141
|
-
/** Video bitrate. */
|
|
142
|
-
videoBitrate: number;
|
|
143
|
-
};
|
|
144
|
-
/** Video codec. */
|
|
145
|
-
videoCodec: number;
|
|
146
|
-
/** Audio codec. */
|
|
147
|
-
audioCodec: number;
|
|
148
|
-
/** Frames. */
|
|
149
|
-
frames?: number;
|
|
150
|
-
/** RTT. */
|
|
151
|
-
rtt?: number;
|
|
152
|
-
/** Buffer Time. */
|
|
153
|
-
bufferTime?: number;
|
|
154
|
-
/** B-frames. */
|
|
155
|
-
bFrames?: number;
|
|
156
|
-
}[];
|
|
157
|
-
}[];
|
|
158
|
-
}[];
|
|
159
|
-
}[];
|
|
167
|
+
feeds: Feed[];
|
|
160
168
|
}
|
|
161
169
|
/** Represents the restream information. */
|
|
162
170
|
export interface Restream {
|
|
@@ -8,8 +8,6 @@ export interface Webhook {
|
|
|
8
8
|
secret: string;
|
|
9
9
|
/** If `true` sends webhook events on feeds `start/stop`. */
|
|
10
10
|
isFeedHooks: boolean;
|
|
11
|
-
/** If `true` sends webhook events on recording `start/error/complete/deleted`. */
|
|
12
|
-
isRecordingHooks: boolean;
|
|
13
11
|
/** If `true` sends webhook events on thumbnail generation. */
|
|
14
12
|
isThumbnailHooks: boolean;
|
|
15
13
|
/** If `true` sends webhook events on transcoder instance updates. */
|
|
@@ -46,8 +44,6 @@ export interface UpdateWebhookRequest {
|
|
|
46
44
|
refreshSecret?: boolean;
|
|
47
45
|
/** Set to `true` to send webhook events on feeds `start/stop`. */
|
|
48
46
|
isFeedHooks?: boolean;
|
|
49
|
-
/** Set to `true` to send webhook events on recording `start/error/complete/deleted`. */
|
|
50
|
-
isRecordingHooks?: boolean;
|
|
51
47
|
/** Set to `true` to send webhook events on thumbnail generation. */
|
|
52
48
|
isThumbnailHooks?: boolean;
|
|
53
49
|
/** Set to `true` to send webhook events on transcoder instance updates. */
|
|
@@ -109,5 +105,14 @@ export interface AddWebhookRequest {
|
|
|
109
105
|
*/
|
|
110
106
|
filter?: string;
|
|
111
107
|
}
|
|
108
|
+
/** Represents a webhook test request. */
|
|
109
|
+
export interface TestWebhookRequest {
|
|
110
|
+
/** Type of webhook event to test. */
|
|
111
|
+
webhookType: WebhookType;
|
|
112
|
+
/** StreamName to include in test webhook payload. If not provided a default value will be used. */
|
|
113
|
+
streamName?: string;
|
|
114
|
+
/** TranscoderName to include in test webhook payload. If not provided a default value will be used.. */
|
|
115
|
+
transcoderName?: string;
|
|
116
|
+
}
|
|
112
117
|
/** Types of webhook events. */
|
|
113
|
-
export type WebhookType = '
|
|
118
|
+
export type WebhookType = 'Thumbnail' | 'Transcoder' | 'Media' | 'Feeds' | 'ViewerConnection';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Webhook, UpdateWebhookRequest, ListWebhooksRequest, AddWebhookRequest,
|
|
1
|
+
import { Webhook, UpdateWebhookRequest, ListWebhooksRequest, AddWebhookRequest, TestWebhookRequest } from './types/webhooks';
|
|
2
2
|
/**
|
|
3
3
|
* Gets the specified webhook.
|
|
4
4
|
*
|
|
@@ -61,8 +61,8 @@ export declare const add: (apiSecret: string, webhook: AddWebhookRequest) => Pro
|
|
|
61
61
|
* @see {@link https://optiview.dolby.com/docs/millicast/api/webhooks-test-webhook/}
|
|
62
62
|
*
|
|
63
63
|
* @param apiSecret The API Secret used to authenticate this request.
|
|
64
|
-
* @param
|
|
64
|
+
* @param testRequest Test request for the webhook.
|
|
65
65
|
*
|
|
66
66
|
* @returns A {@link !Promise Promise} whose fulfillment handler receives a flag indicating if the operation was successful or not.
|
|
67
67
|
*/
|
|
68
|
-
export declare const test: (apiSecret: string,
|
|
68
|
+
export declare const test: (apiSecret: string, testRequest: TestWebhookRequest) => Promise<boolean>;
|
|
@@ -214,24 +214,28 @@ var add = exports.add = /*#__PURE__*/function () {
|
|
|
214
214
|
* @see {@link https://optiview.dolby.com/docs/millicast/api/webhooks-test-webhook/}
|
|
215
215
|
*
|
|
216
216
|
* @param apiSecret The API Secret used to authenticate this request.
|
|
217
|
-
* @param
|
|
217
|
+
* @param testRequest Test request for the webhook.
|
|
218
218
|
*
|
|
219
219
|
* @returns A {@link !Promise Promise} whose fulfillment handler receives a flag indicating if the operation was successful or not.
|
|
220
220
|
*/
|
|
221
221
|
var test = exports.test = /*#__PURE__*/function () {
|
|
222
|
-
var _ref6 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6(apiSecret,
|
|
222
|
+
var _ref6 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6(apiSecret, testRequest) {
|
|
223
223
|
var options;
|
|
224
224
|
return _regenerator().w(function (_context6) {
|
|
225
225
|
while (1) switch (_context6.n) {
|
|
226
226
|
case 0:
|
|
227
227
|
options = {
|
|
228
228
|
hostname: Urls.getRtsHostname(),
|
|
229
|
-
path: "/api/webhooks/test/".concat(webhookType),
|
|
229
|
+
path: "/api/webhooks/test/".concat(testRequest.webhookType),
|
|
230
230
|
headers: {
|
|
231
231
|
Accept: 'application/json',
|
|
232
232
|
'Content-Type': 'application/json',
|
|
233
233
|
Authorization: "Bearer ".concat(apiSecret)
|
|
234
|
-
}
|
|
234
|
+
},
|
|
235
|
+
body: JSON.stringify({
|
|
236
|
+
streamName: testRequest.streamName,
|
|
237
|
+
transcoderName: testRequest.transcoderName
|
|
238
|
+
})
|
|
235
239
|
};
|
|
236
240
|
_context6.n = 1;
|
|
237
241
|
return (0, _httpHelpers.sendPost)(options);
|