@dolbyio/dolbyio-rest-apis-client 2.0.0 → 3.0.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/communications/authentication.d.ts +10 -10
- package/dist/communications/authentication.js +16 -16
- package/dist/communications/authentication.js.map +1 -1
- package/dist/communications/conference.d.ts +0 -12
- package/dist/communications/conference.js +1 -26
- package/dist/communications/conference.js.map +1 -1
- package/dist/communications/streaming.d.ts +8 -55
- package/dist/communications/streaming.js +19 -114
- package/dist/communications/streaming.js.map +1 -1
- package/dist/internal/httpHelpers.d.ts +6 -6
- package/dist/internal/httpHelpers.js +7 -7
- package/dist/internal/httpHelpers.js.map +1 -1
- package/dist/media/analyze.d.ts +4 -4
- package/dist/media/analyze.js +6 -6
- package/dist/media/analyze.js.map +1 -1
- package/dist/media/analyzeSpeech.d.ts +4 -4
- package/dist/media/analyzeSpeech.js +6 -6
- package/dist/media/analyzeSpeech.js.map +1 -1
- package/dist/media/diagnose.d.ts +4 -4
- package/dist/media/diagnose.js +6 -6
- package/dist/media/diagnose.js.map +1 -1
- package/dist/media/enhance.d.ts +4 -4
- package/dist/media/enhance.js +6 -6
- package/dist/media/enhance.js.map +1 -1
- package/dist/media/index.d.ts +2 -1
- package/dist/media/index.js +3 -1
- package/dist/media/index.js.map +1 -1
- package/dist/media/internal/httpHelpers.d.ts +5 -5
- package/dist/media/internal/httpHelpers.js +5 -30
- package/dist/media/internal/httpHelpers.js.map +1 -1
- package/dist/media/io.d.ts +4 -4
- package/dist/media/io.js +6 -6
- package/dist/media/io.js.map +1 -1
- package/dist/media/jobs.d.ts +6 -6
- package/dist/media/jobs.js +9 -9
- package/dist/media/jobs.js.map +1 -1
- package/dist/media/mastering.d.ts +70 -0
- package/dist/media/mastering.js +136 -0
- package/dist/media/mastering.js.map +1 -0
- package/dist/media/platform.d.ts +5 -8
- package/dist/media/platform.js +13 -13
- package/dist/media/platform.js.map +1 -1
- package/dist/media/transcode.d.ts +4 -4
- package/dist/media/transcode.js +6 -6
- package/dist/media/transcode.js.map +1 -1
- package/dist/media/types/mastering.d.ts +13 -0
- package/dist/media/types/mastering.js +3 -0
- package/dist/media/types/mastering.js.map +1 -0
- package/dist/media/webhooks.d.ts +8 -8
- package/dist/media/webhooks.js +12 -12
- package/dist/media/webhooks.js.map +1 -1
- package/package.json +5 -1
package/dist/media/jobs.js
CHANGED
|
@@ -17,12 +17,12 @@ const httpHelpers_1 = require("./internal/httpHelpers");
|
|
|
17
17
|
*
|
|
18
18
|
* @link https://docs.dolby.io/media-apis/reference/media-jobs-get
|
|
19
19
|
*
|
|
20
|
-
* @param
|
|
20
|
+
* @param accessToken Access token to use for authentication.
|
|
21
21
|
* @param options Options to request the list of jobs.
|
|
22
22
|
*
|
|
23
23
|
* @returns A `JobsResponse` object through a `Promise`.
|
|
24
24
|
*/
|
|
25
|
-
const list = (
|
|
25
|
+
const list = (accessToken, options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
26
26
|
const params = {};
|
|
27
27
|
if (options.submitted_after) {
|
|
28
28
|
params['submitted_after'] = options.submitted_after;
|
|
@@ -41,7 +41,7 @@ const list = (auth, options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
41
41
|
path: '/media/jobs',
|
|
42
42
|
params,
|
|
43
43
|
headers: {},
|
|
44
|
-
|
|
44
|
+
accessToken,
|
|
45
45
|
};
|
|
46
46
|
const response = yield (0, httpHelpers_1.sendGet)(requestOptions);
|
|
47
47
|
return response;
|
|
@@ -53,12 +53,12 @@ exports.list = list;
|
|
|
53
53
|
*
|
|
54
54
|
* @link https://docs.dolby.io/media-apis/reference/media-jobs-get
|
|
55
55
|
*
|
|
56
|
-
* @param
|
|
56
|
+
* @param accessToken Access token to use for authentication.
|
|
57
57
|
* @param options Options to request the list of jobs.
|
|
58
58
|
*
|
|
59
59
|
* @returns An array of `Job` objects through a `Promise`.
|
|
60
60
|
*/
|
|
61
|
-
const listAll = (
|
|
61
|
+
const listAll = (accessToken, options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
62
62
|
const params = {};
|
|
63
63
|
if (options.submitted_after) {
|
|
64
64
|
params['submitted_after'] = options.submitted_after;
|
|
@@ -73,7 +73,7 @@ const listAll = (auth, options) => __awaiter(void 0, void 0, void 0, function* (
|
|
|
73
73
|
hostname: 'api.dolby.com',
|
|
74
74
|
path: '/media/jobs',
|
|
75
75
|
headers: {},
|
|
76
|
-
|
|
76
|
+
accessToken,
|
|
77
77
|
};
|
|
78
78
|
const result = [];
|
|
79
79
|
do {
|
|
@@ -96,10 +96,10 @@ exports.listAll = listAll;
|
|
|
96
96
|
*
|
|
97
97
|
* @link https://docs.dolby.io/media-apis/reference/media-jobs-cancel-post
|
|
98
98
|
*
|
|
99
|
-
* @param
|
|
99
|
+
* @param accessToken Access token to use for authentication.
|
|
100
100
|
* @param jobId Identifier of the job to cancel.
|
|
101
101
|
*/
|
|
102
|
-
const cancel = (
|
|
102
|
+
const cancel = (accessToken, jobId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
103
103
|
const params = {
|
|
104
104
|
job_id: jobId,
|
|
105
105
|
};
|
|
@@ -107,7 +107,7 @@ const cancel = (auth, jobId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
107
107
|
hostname: 'api.dolby.com',
|
|
108
108
|
path: '/media/jobs/cancel',
|
|
109
109
|
headers: {},
|
|
110
|
-
|
|
110
|
+
accessToken,
|
|
111
111
|
params: params,
|
|
112
112
|
};
|
|
113
113
|
yield (0, httpHelpers_1.sendPost)(requestOptions);
|
package/dist/media/jobs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jobs.js","sourceRoot":"","sources":["../../src/media/jobs.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wDAA+E;AAI/E;;;;;;;;;;GAUG;AACI,MAAM,IAAI,GAAG,CAAO,
|
|
1
|
+
{"version":3,"file":"jobs.js","sourceRoot":"","sources":["../../src/media/jobs.ts"],"names":[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,UAcjB"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import JwtToken from './types/jwtToken';
|
|
2
|
+
import { MasteringPreviewJob, MasteringJob } from './types/mastering';
|
|
3
|
+
/**
|
|
4
|
+
* Starts mastering preview to improve your music.
|
|
5
|
+
*
|
|
6
|
+
* The `inputs` location for your source media file as well as the `outputs` location for the processed media file are required.
|
|
7
|
+
*
|
|
8
|
+
* A `preset` applies dynamic EQ processing to shape your music to match a desired sound. There are also additional optional parameters that can be provided to control the mastering output.
|
|
9
|
+
*
|
|
10
|
+
* A `segment` object specifying preview `start` may optionally be provided.
|
|
11
|
+
*
|
|
12
|
+
* This is an asynchronous operation. You receive a `job_id` that you use to retrieve the results when the mastering is complete.
|
|
13
|
+
*
|
|
14
|
+
* To learn more, see the example requests and responses.
|
|
15
|
+
*
|
|
16
|
+
* @link https://docs.dolby.io/media-apis/reference/media-music-mastering-post
|
|
17
|
+
*
|
|
18
|
+
* @param accessToken Access token to use for authentication.
|
|
19
|
+
* @param jobContent Content of the job description as a JSON payload. You can find the definition at this URL: https://docs.dolby.io/media-apis/reference/media-music-mastering-post
|
|
20
|
+
*
|
|
21
|
+
* @returns The job identifier through a `Promise`.
|
|
22
|
+
*/
|
|
23
|
+
export declare const startPreview: (accessToken: JwtToken, jobContent: string) => Promise<string | null>;
|
|
24
|
+
/**
|
|
25
|
+
* Gets Mastering Preview Results
|
|
26
|
+
*
|
|
27
|
+
* For a given job_id, this method will check if the mastering task has completed.
|
|
28
|
+
* When the status is Success you'll be able to retrieve your results from the outputs locations you provided in the original POST.
|
|
29
|
+
*
|
|
30
|
+
* @link https://docs.dolby.io/media-apis/reference/media-music-mastering-preview-get
|
|
31
|
+
*
|
|
32
|
+
* @param accessToken Access token to use for authentication.
|
|
33
|
+
* @param jobId Identifier of the job to retrieve.
|
|
34
|
+
*
|
|
35
|
+
* @returns The `MasteringPreviewJob` object through a `Promise`.
|
|
36
|
+
*/
|
|
37
|
+
export declare const getPreviewResults: (accessToken: JwtToken, jobId: string) => Promise<MasteringPreviewJob>;
|
|
38
|
+
/**
|
|
39
|
+
* Starts mastering to improve your music.
|
|
40
|
+
*
|
|
41
|
+
* The `inputs` location for your source media file as well as the `outputs` location for the processed media file are required.
|
|
42
|
+
*
|
|
43
|
+
* A `preset` applies dynamic EQ processing to shape your music to match a desired sound. There are also additional optional parameters that can be provided to control the mastering output.
|
|
44
|
+
*
|
|
45
|
+
* This is an asynchronous operation. You receive a `job_id` that you use to retrieve the results when the mastering is complete.
|
|
46
|
+
*
|
|
47
|
+
* To learn more, see the example requests and responses.
|
|
48
|
+
*
|
|
49
|
+
* @link https://docs.dolby.io/media-apis/reference/media-music-mastering-post
|
|
50
|
+
*
|
|
51
|
+
* @param accessToken Access token to use for authentication.
|
|
52
|
+
* @param jobContent Content of the job description as a JSON payload. You can find the definition at this URL: https://docs.dolby.io/media-apis/reference/media-music-mastering-post
|
|
53
|
+
*
|
|
54
|
+
* @returns The job identifier through a `Promise`.
|
|
55
|
+
*/
|
|
56
|
+
export declare const start: (accessToken: JwtToken, jobContent: string) => Promise<string | null>;
|
|
57
|
+
/**
|
|
58
|
+
* Gets Mastering Results
|
|
59
|
+
*
|
|
60
|
+
* For a given job_id, this method will check if the mastering task has completed.
|
|
61
|
+
* When the status is Success you'll be able to retrieve your results from the outputs locations you provided in the original POST.
|
|
62
|
+
*
|
|
63
|
+
* @link https://docs.dolby.io/media-apis/reference/media-music-mastering-get
|
|
64
|
+
*
|
|
65
|
+
* @param accessToken Access token to use for authentication.
|
|
66
|
+
* @param jobId Identifier of the job to retrieve.
|
|
67
|
+
*
|
|
68
|
+
* @returns The `MasteringJob` object through a `Promise`.
|
|
69
|
+
*/
|
|
70
|
+
export declare const getResults: (accessToken: JwtToken, jobId: string) => Promise<MasteringJob>;
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.getResults = exports.start = exports.getPreviewResults = exports.startPreview = void 0;
|
|
13
|
+
const httpHelpers_1 = require("./internal/httpHelpers");
|
|
14
|
+
/**
|
|
15
|
+
* Starts mastering preview to improve your music.
|
|
16
|
+
*
|
|
17
|
+
* The `inputs` location for your source media file as well as the `outputs` location for the processed media file are required.
|
|
18
|
+
*
|
|
19
|
+
* A `preset` applies dynamic EQ processing to shape your music to match a desired sound. There are also additional optional parameters that can be provided to control the mastering output.
|
|
20
|
+
*
|
|
21
|
+
* A `segment` object specifying preview `start` may optionally be provided.
|
|
22
|
+
*
|
|
23
|
+
* This is an asynchronous operation. You receive a `job_id` that you use to retrieve the results when the mastering is complete.
|
|
24
|
+
*
|
|
25
|
+
* To learn more, see the example requests and responses.
|
|
26
|
+
*
|
|
27
|
+
* @link https://docs.dolby.io/media-apis/reference/media-music-mastering-post
|
|
28
|
+
*
|
|
29
|
+
* @param accessToken Access token to use for authentication.
|
|
30
|
+
* @param jobContent Content of the job description as a JSON payload. You can find the definition at this URL: https://docs.dolby.io/media-apis/reference/media-music-mastering-post
|
|
31
|
+
*
|
|
32
|
+
* @returns The job identifier through a `Promise`.
|
|
33
|
+
*/
|
|
34
|
+
const startPreview = (accessToken, jobContent) => __awaiter(void 0, void 0, void 0, function* () {
|
|
35
|
+
const requestOptions = {
|
|
36
|
+
hostname: 'api.dolby.com',
|
|
37
|
+
path: '/media/master/preview',
|
|
38
|
+
headers: {},
|
|
39
|
+
accessToken,
|
|
40
|
+
body: jobContent,
|
|
41
|
+
};
|
|
42
|
+
const response = yield (0, httpHelpers_1.sendPost)(requestOptions);
|
|
43
|
+
if (response.hasOwnProperty('job_id')) {
|
|
44
|
+
return response['job_id'];
|
|
45
|
+
}
|
|
46
|
+
return null;
|
|
47
|
+
});
|
|
48
|
+
exports.startPreview = startPreview;
|
|
49
|
+
/**
|
|
50
|
+
* Gets Mastering Preview Results
|
|
51
|
+
*
|
|
52
|
+
* For a given job_id, this method will check if the mastering task has completed.
|
|
53
|
+
* When the status is Success you'll be able to retrieve your results from the outputs locations you provided in the original POST.
|
|
54
|
+
*
|
|
55
|
+
* @link https://docs.dolby.io/media-apis/reference/media-music-mastering-preview-get
|
|
56
|
+
*
|
|
57
|
+
* @param accessToken Access token to use for authentication.
|
|
58
|
+
* @param jobId Identifier of the job to retrieve.
|
|
59
|
+
*
|
|
60
|
+
* @returns The `MasteringPreviewJob` object through a `Promise`.
|
|
61
|
+
*/
|
|
62
|
+
const getPreviewResults = (accessToken, jobId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
63
|
+
const requestOptions = {
|
|
64
|
+
hostname: 'api.dolby.com',
|
|
65
|
+
path: '/media/master/preview',
|
|
66
|
+
params: {
|
|
67
|
+
job_id: jobId,
|
|
68
|
+
},
|
|
69
|
+
headers: {},
|
|
70
|
+
accessToken,
|
|
71
|
+
};
|
|
72
|
+
const response = yield (0, httpHelpers_1.sendGet)(requestOptions);
|
|
73
|
+
return response;
|
|
74
|
+
});
|
|
75
|
+
exports.getPreviewResults = getPreviewResults;
|
|
76
|
+
/**
|
|
77
|
+
* Starts mastering to improve your music.
|
|
78
|
+
*
|
|
79
|
+
* The `inputs` location for your source media file as well as the `outputs` location for the processed media file are required.
|
|
80
|
+
*
|
|
81
|
+
* A `preset` applies dynamic EQ processing to shape your music to match a desired sound. There are also additional optional parameters that can be provided to control the mastering output.
|
|
82
|
+
*
|
|
83
|
+
* This is an asynchronous operation. You receive a `job_id` that you use to retrieve the results when the mastering is complete.
|
|
84
|
+
*
|
|
85
|
+
* To learn more, see the example requests and responses.
|
|
86
|
+
*
|
|
87
|
+
* @link https://docs.dolby.io/media-apis/reference/media-music-mastering-post
|
|
88
|
+
*
|
|
89
|
+
* @param accessToken Access token to use for authentication.
|
|
90
|
+
* @param jobContent Content of the job description as a JSON payload. You can find the definition at this URL: https://docs.dolby.io/media-apis/reference/media-music-mastering-post
|
|
91
|
+
*
|
|
92
|
+
* @returns The job identifier through a `Promise`.
|
|
93
|
+
*/
|
|
94
|
+
const start = (accessToken, jobContent) => __awaiter(void 0, void 0, void 0, function* () {
|
|
95
|
+
const requestOptions = {
|
|
96
|
+
hostname: 'api.dolby.com',
|
|
97
|
+
path: '/media/master',
|
|
98
|
+
headers: {},
|
|
99
|
+
accessToken,
|
|
100
|
+
body: jobContent,
|
|
101
|
+
};
|
|
102
|
+
const response = yield (0, httpHelpers_1.sendPost)(requestOptions);
|
|
103
|
+
if (response.hasOwnProperty('job_id')) {
|
|
104
|
+
return response['job_id'];
|
|
105
|
+
}
|
|
106
|
+
return null;
|
|
107
|
+
});
|
|
108
|
+
exports.start = start;
|
|
109
|
+
/**
|
|
110
|
+
* Gets Mastering Results
|
|
111
|
+
*
|
|
112
|
+
* For a given job_id, this method will check if the mastering task has completed.
|
|
113
|
+
* When the status is Success you'll be able to retrieve your results from the outputs locations you provided in the original POST.
|
|
114
|
+
*
|
|
115
|
+
* @link https://docs.dolby.io/media-apis/reference/media-music-mastering-get
|
|
116
|
+
*
|
|
117
|
+
* @param accessToken Access token to use for authentication.
|
|
118
|
+
* @param jobId Identifier of the job to retrieve.
|
|
119
|
+
*
|
|
120
|
+
* @returns The `MasteringJob` object through a `Promise`.
|
|
121
|
+
*/
|
|
122
|
+
const getResults = (accessToken, jobId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
123
|
+
const requestOptions = {
|
|
124
|
+
hostname: 'api.dolby.com',
|
|
125
|
+
path: '/media/master',
|
|
126
|
+
params: {
|
|
127
|
+
job_id: jobId,
|
|
128
|
+
},
|
|
129
|
+
headers: {},
|
|
130
|
+
accessToken,
|
|
131
|
+
};
|
|
132
|
+
const response = yield (0, httpHelpers_1.sendGet)(requestOptions);
|
|
133
|
+
return response;
|
|
134
|
+
});
|
|
135
|
+
exports.getResults = getResults;
|
|
136
|
+
//# sourceMappingURL=mastering.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mastering.js","sourceRoot":"","sources":["../../src/media/mastering.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wDAA+E;AAI/E;;;;;;;;;;;;;;;;;;;GAmBG;AACI,MAAM,YAAY,GAAG,CAAO,WAAqB,EAAE,UAAkB,EAA0B,EAAE;IACpG,MAAM,cAAc,GAAuB;QACvC,QAAQ,EAAE,eAAe;QACzB,IAAI,EAAE,uBAAuB;QAC7B,OAAO,EAAE,EAAE;QACX,WAAW;QACX,IAAI,EAAE,UAAU;KACnB,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,IAAA,sBAAQ,EAAC,cAAc,CAAC,CAAC;IAChD,IAAI,QAAQ,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE;QACnC,OAAO,QAAQ,CAAC,QAAQ,CAAC,CAAC;KAC7B;IAED,OAAO,IAAI,CAAC;AAChB,CAAC,CAAA,CAAC;AAfW,QAAA,YAAY,gBAevB;AAEF;;;;;;;;;;;;GAYG;AACI,MAAM,iBAAiB,GAAG,CAAO,WAAqB,EAAE,KAAa,EAAgC,EAAE;IAC1G,MAAM,cAAc,GAAuB;QACvC,QAAQ,EAAE,eAAe;QACzB,IAAI,EAAE,uBAAuB;QAC7B,MAAM,EAAE;YACJ,MAAM,EAAE,KAAK;SAChB;QACD,OAAO,EAAE,EAAE;QACX,WAAW;KACd,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,IAAA,qBAAO,EAAC,cAAc,CAAC,CAAC;IAC/C,OAAO,QAA+B,CAAC;AAC3C,CAAC,CAAA,CAAC;AAbW,QAAA,iBAAiB,qBAa5B;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACI,MAAM,KAAK,GAAG,CAAO,WAAqB,EAAE,UAAkB,EAA0B,EAAE;IAC7F,MAAM,cAAc,GAAuB;QACvC,QAAQ,EAAE,eAAe;QACzB,IAAI,EAAE,eAAe;QACrB,OAAO,EAAE,EAAE;QACX,WAAW;QACX,IAAI,EAAE,UAAU;KACnB,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,IAAA,sBAAQ,EAAC,cAAc,CAAC,CAAC;IAChD,IAAI,QAAQ,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE;QACnC,OAAO,QAAQ,CAAC,QAAQ,CAAC,CAAC;KAC7B;IAED,OAAO,IAAI,CAAC;AAChB,CAAC,CAAA,CAAC;AAfW,QAAA,KAAK,SAehB;AAEF;;;;;;;;;;;;GAYG;AACI,MAAM,UAAU,GAAG,CAAO,WAAqB,EAAE,KAAa,EAAyB,EAAE;IAC5F,MAAM,cAAc,GAAuB;QACvC,QAAQ,EAAE,eAAe;QACzB,IAAI,EAAE,eAAe;QACrB,MAAM,EAAE;YACJ,MAAM,EAAE,KAAK;SAChB;QACD,OAAO,EAAE,EAAE;QACX,WAAW;KACd,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,IAAA,qBAAO,EAAC,cAAc,CAAC,CAAC;IAC/C,OAAO,QAAwB,CAAC;AACpC,CAAC,CAAA,CAAC;AAbW,QAAA,UAAU,cAarB"}
|
package/dist/media/platform.d.ts
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import JwtToken from './types/jwtToken';
|
|
2
2
|
/**
|
|
3
|
-
* Generates
|
|
3
|
+
* Generates an API token.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
* The token will expire in 12 hours.
|
|
5
|
+
* @link https://docs.dolby.io/media-apis/reference/get-api-token
|
|
7
6
|
*
|
|
8
|
-
* @
|
|
9
|
-
*
|
|
10
|
-
* @param apiKey Your Dolby.io API Key.
|
|
11
|
-
* @param apiSecret Your Dolby.io API Secret.
|
|
7
|
+
* @param appKey Your Dolby.io App Key.
|
|
8
|
+
* @param appSecret Your Dolby.io App Secret.
|
|
12
9
|
*
|
|
13
10
|
* @returns A `JwtToken` object through a `Promise`.
|
|
14
11
|
*/
|
|
15
|
-
export declare const
|
|
12
|
+
export declare const getApiAccessToken: (appKey: string, appSecret: string, expiresIn: number | undefined) => Promise<JwtToken>;
|
package/dist/media/platform.js
CHANGED
|
@@ -9,27 +9,27 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.getApiAccessToken = void 0;
|
|
13
13
|
const httpHelpers_1 = require("../internal/httpHelpers");
|
|
14
14
|
/**
|
|
15
|
-
* Generates
|
|
15
|
+
* Generates an API token.
|
|
16
16
|
*
|
|
17
|
-
*
|
|
18
|
-
* The token will expire in 12 hours.
|
|
17
|
+
* @link https://docs.dolby.io/media-apis/reference/get-api-token
|
|
19
18
|
*
|
|
20
|
-
* @
|
|
21
|
-
*
|
|
22
|
-
* @param apiKey Your Dolby.io API Key.
|
|
23
|
-
* @param apiSecret Your Dolby.io API Secret.
|
|
19
|
+
* @param appKey Your Dolby.io App Key.
|
|
20
|
+
* @param appSecret Your Dolby.io App Secret.
|
|
24
21
|
*
|
|
25
22
|
* @returns A `JwtToken` object through a `Promise`.
|
|
26
23
|
*/
|
|
27
|
-
const
|
|
24
|
+
const getApiAccessToken = (appKey, appSecret, expiresIn) => __awaiter(void 0, void 0, void 0, function* () {
|
|
28
25
|
let body = 'grant_type=client_credentials';
|
|
29
|
-
|
|
26
|
+
if (expiresIn) {
|
|
27
|
+
body += `&expires_in=${expiresIn}`;
|
|
28
|
+
}
|
|
29
|
+
const authz = Buffer.from(`${appKey}:${appSecret}`).toString('base64');
|
|
30
30
|
const options = {
|
|
31
|
-
hostname: 'api.dolby.
|
|
32
|
-
path: '/
|
|
31
|
+
hostname: 'api.dolby.io',
|
|
32
|
+
path: '/v1/auth/token',
|
|
33
33
|
headers: {
|
|
34
34
|
'Content-Type': 'application/x-www-form-urlencoded',
|
|
35
35
|
'Cache-Control': 'no-cache',
|
|
@@ -40,5 +40,5 @@ const getAccessToken = (apiKey, apiSecret) => __awaiter(void 0, void 0, void 0,
|
|
|
40
40
|
const response = yield (0, httpHelpers_1.sendPost)(options);
|
|
41
41
|
return response;
|
|
42
42
|
});
|
|
43
|
-
exports.
|
|
43
|
+
exports.getApiAccessToken = getApiAccessToken;
|
|
44
44
|
//# sourceMappingURL=platform.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform.js","sourceRoot":"","sources":["../../src/media/platform.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAmD;AAGnD
|
|
1
|
+
{"version":3,"file":"platform.js","sourceRoot":"","sources":["../../src/media/platform.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAmD;AAGnD;;;;;;;;;GASG;AACI,MAAM,iBAAiB,GAAG,CAAO,MAAc,EAAE,SAAiB,EAAE,SAA6B,EAAqB,EAAE;IAC3H,IAAI,IAAI,GAAG,+BAA+B,CAAC;IAC3C,IAAI,SAAS,EAAE;QACX,IAAI,IAAI,eAAe,SAAS,EAAE,CAAC;KACtC;IAED,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,IAAI,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAEvE,MAAM,OAAO,GAAG;QACZ,QAAQ,EAAE,cAAc;QACxB,IAAI,EAAE,gBAAgB;QACtB,OAAO,EAAE;YACL,cAAc,EAAE,mCAAmC;YACnD,eAAe,EAAE,UAAU;YAC3B,aAAa,EAAE,SAAS,KAAK,EAAE;SAClC;QACD,IAAI;KACP,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,IAAA,sBAAQ,EAAC,OAAO,CAAC,CAAC;IACzC,OAAO,QAAoB,CAAC;AAChC,CAAC,CAAA,CAAC;AArBW,QAAA,iBAAiB,qBAqB5B"}
|
|
@@ -7,12 +7,12 @@ import { TranscodeJob } from './types/transcode';
|
|
|
7
7
|
*
|
|
8
8
|
* @link https://docs.dolby.io/media-apis/reference/media-transcode-post
|
|
9
9
|
*
|
|
10
|
-
* @param
|
|
10
|
+
* @param accessToken Access token to use for authentication.
|
|
11
11
|
* @param jobContent Content of the job description as a JSON payload. You can find the definition at this URL: https://docs.dolby.io/media-apis/reference/media-transcode-post
|
|
12
12
|
*
|
|
13
13
|
* @returns The job identifier through a `Promise`.
|
|
14
14
|
*/
|
|
15
|
-
export declare const start: (
|
|
15
|
+
export declare const start: (accessToken: JwtToken, jobContent: string) => Promise<string | null>;
|
|
16
16
|
/**
|
|
17
17
|
* Gets Transcode Results.
|
|
18
18
|
*
|
|
@@ -22,9 +22,9 @@ export declare const start: (auth: string | JwtToken, jobContent: string) => Pro
|
|
|
22
22
|
*
|
|
23
23
|
* @link https://docs.dolby.io/media-apis/reference/media-transcode-get
|
|
24
24
|
*
|
|
25
|
-
* @param
|
|
25
|
+
* @param accessToken Access token to use for authentication.
|
|
26
26
|
* @param jobId Identifier of the job to retrieve.
|
|
27
27
|
*
|
|
28
28
|
* @returns The `TranscodeJob` object through a `Promise`.
|
|
29
29
|
*/
|
|
30
|
-
export declare const getResults: (
|
|
30
|
+
export declare const getResults: (accessToken: JwtToken, jobId: string) => Promise<TranscodeJob>;
|
package/dist/media/transcode.js
CHANGED
|
@@ -18,17 +18,17 @@ const httpHelpers_1 = require("./internal/httpHelpers");
|
|
|
18
18
|
*
|
|
19
19
|
* @link https://docs.dolby.io/media-apis/reference/media-transcode-post
|
|
20
20
|
*
|
|
21
|
-
* @param
|
|
21
|
+
* @param accessToken Access token to use for authentication.
|
|
22
22
|
* @param jobContent Content of the job description as a JSON payload. You can find the definition at this URL: https://docs.dolby.io/media-apis/reference/media-transcode-post
|
|
23
23
|
*
|
|
24
24
|
* @returns The job identifier through a `Promise`.
|
|
25
25
|
*/
|
|
26
|
-
const start = (
|
|
26
|
+
const start = (accessToken, jobContent) => __awaiter(void 0, void 0, void 0, function* () {
|
|
27
27
|
const requestOptions = {
|
|
28
28
|
hostname: 'api.dolby.com',
|
|
29
29
|
path: '/media/transcode',
|
|
30
30
|
headers: {},
|
|
31
|
-
|
|
31
|
+
accessToken,
|
|
32
32
|
body: jobContent,
|
|
33
33
|
};
|
|
34
34
|
const response = yield (0, httpHelpers_1.sendPost)(requestOptions);
|
|
@@ -47,12 +47,12 @@ exports.start = start;
|
|
|
47
47
|
*
|
|
48
48
|
* @link https://docs.dolby.io/media-apis/reference/media-transcode-get
|
|
49
49
|
*
|
|
50
|
-
* @param
|
|
50
|
+
* @param accessToken Access token to use for authentication.
|
|
51
51
|
* @param jobId Identifier of the job to retrieve.
|
|
52
52
|
*
|
|
53
53
|
* @returns The `TranscodeJob` object through a `Promise`.
|
|
54
54
|
*/
|
|
55
|
-
const getResults = (
|
|
55
|
+
const getResults = (accessToken, jobId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
56
56
|
const requestOptions = {
|
|
57
57
|
hostname: 'api.dolby.com',
|
|
58
58
|
path: '/media/transcode',
|
|
@@ -60,7 +60,7 @@ const getResults = (auth, jobId) => __awaiter(void 0, void 0, void 0, function*
|
|
|
60
60
|
job_id: jobId,
|
|
61
61
|
},
|
|
62
62
|
headers: {},
|
|
63
|
-
|
|
63
|
+
accessToken,
|
|
64
64
|
};
|
|
65
65
|
const response = yield (0, httpHelpers_1.sendGet)(requestOptions);
|
|
66
66
|
return response;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transcode.js","sourceRoot":"","sources":["../../src/media/transcode.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wDAA+E;AAI/E;;;;;;;;;;;GAWG;AACI,MAAM,KAAK,GAAG,CAAO,
|
|
1
|
+
{"version":3,"file":"transcode.js","sourceRoot":"","sources":["../../src/media/transcode.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wDAA+E;AAI/E;;;;;;;;;;;GAWG;AACI,MAAM,KAAK,GAAG,CAAO,WAAqB,EAAE,UAAkB,EAA0B,EAAE;IAC7F,MAAM,cAAc,GAAuB;QACvC,QAAQ,EAAE,eAAe;QACzB,IAAI,EAAE,kBAAkB;QACxB,OAAO,EAAE,EAAE;QACX,WAAW;QACX,IAAI,EAAE,UAAU;KACnB,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,IAAA,sBAAQ,EAAC,cAAc,CAAC,CAAC;IAChD,IAAI,QAAQ,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE;QACnC,OAAO,QAAQ,CAAC,QAAQ,CAAC,CAAC;KAC7B;IAED,OAAO,IAAI,CAAC;AAChB,CAAC,CAAA,CAAC;AAfW,QAAA,KAAK,SAehB;AAEF;;;;;;;;;;;;;GAaG;AACI,MAAM,UAAU,GAAG,CAAO,WAAqB,EAAE,KAAa,EAAyB,EAAE;IAC5F,MAAM,cAAc,GAAuB;QACvC,QAAQ,EAAE,eAAe;QACzB,IAAI,EAAE,kBAAkB;QACxB,MAAM,EAAE;YACJ,MAAM,EAAE,KAAK;SAChB;QACD,OAAO,EAAE,EAAE;QACX,WAAW;KACd,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,IAAA,qBAAO,EAAC,cAAc,CAAC,CAAC;IAC/C,OAAO,QAAwB,CAAC;AACpC,CAAC,CAAA,CAAC;AAbW,QAAA,UAAU,cAarB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { JobResult } from './jobResults';
|
|
2
|
+
export interface MasteringPreviewJobResult {
|
|
3
|
+
/** Level of the media prior to mastering. Measured in loudness units relative to full scale (LUFS). */
|
|
4
|
+
initial_level: string;
|
|
5
|
+
}
|
|
6
|
+
export interface MasteringPreviewJob extends JobResult<MasteringPreviewJobResult> {
|
|
7
|
+
}
|
|
8
|
+
export interface MasteringJobResult extends MasteringPreviewJobResult {
|
|
9
|
+
/** Level of the media after mastering. Measured in loudness units relative to full scale (LUFS). */
|
|
10
|
+
final_level: string;
|
|
11
|
+
}
|
|
12
|
+
export interface MasteringJob extends JobResult<MasteringJobResult> {
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mastering.js","sourceRoot":"","sources":["../../../src/media/types/mastering.ts"],"names":[],"mappings":""}
|
package/dist/media/webhooks.d.ts
CHANGED
|
@@ -6,41 +6,41 @@ import { UpdateWebhookOptions, Webhook } from './types/webhooks';
|
|
|
6
6
|
*
|
|
7
7
|
* @link https://docs.dolby.io/media-apis/reference/media-webhook-post
|
|
8
8
|
*
|
|
9
|
-
* @param
|
|
9
|
+
* @param accessToken Access token to use for authentication.
|
|
10
10
|
* @param url The callback url that will be called when job execution completes.
|
|
11
11
|
* @param headers (Optional) Headers to include in the webhook call.
|
|
12
12
|
*
|
|
13
13
|
* @returns The webhook identifier through a `Promise`.
|
|
14
14
|
*/
|
|
15
|
-
export declare const registerWebhook: (
|
|
15
|
+
export declare const registerWebhook: (accessToken: JwtToken, url: string, headers?: http.OutgoingHttpHeaders) => Promise<string | null>;
|
|
16
16
|
/**
|
|
17
17
|
* Updates the previously registered webhook configuration.
|
|
18
18
|
*
|
|
19
19
|
* @link https://docs.dolby.io/media-apis/reference/media-webhook-put
|
|
20
20
|
*
|
|
21
|
-
* @param
|
|
21
|
+
* @param accessToken Access token to use for authentication.
|
|
22
22
|
* @param options Options to update the webhook.
|
|
23
23
|
*/
|
|
24
|
-
export declare const updateWebhook: (
|
|
24
|
+
export declare const updateWebhook: (accessToken: JwtToken, options: UpdateWebhookOptions) => Promise<void>;
|
|
25
25
|
/**
|
|
26
26
|
* Retrieves the previously registered webhook configuration.
|
|
27
27
|
*
|
|
28
28
|
* @link https://docs.dolby.io/media-apis/reference/media-webhook-get
|
|
29
29
|
*
|
|
30
|
-
* @param
|
|
30
|
+
* @param accessToken Access token to use for authentication.
|
|
31
31
|
* @param webhookId Identifier of the webhook to retrieve.
|
|
32
32
|
*
|
|
33
33
|
* @returns The `Webhook` object through a `Promise`.
|
|
34
34
|
*/
|
|
35
|
-
export declare const retrieveWebhook: (
|
|
35
|
+
export declare const retrieveWebhook: (accessToken: JwtToken, webhookId: string) => Promise<Webhook>;
|
|
36
36
|
/**
|
|
37
37
|
* Deletes a previously registered webhook configuration.
|
|
38
38
|
*
|
|
39
39
|
* @link https://docs.dolby.io/media-apis/reference/media-webhook-delete
|
|
40
40
|
*
|
|
41
|
-
* @param
|
|
41
|
+
* @param accessToken Access token to use for authentication.
|
|
42
42
|
* @param webhookId Identifier of the webhook to delete.
|
|
43
43
|
*
|
|
44
44
|
* @returns The webhook identifier through a `Promise`.
|
|
45
45
|
*/
|
|
46
|
-
export declare const deleteWebhook: (
|
|
46
|
+
export declare const deleteWebhook: (accessToken: JwtToken, webhookId: string) => Promise<string | null>;
|
package/dist/media/webhooks.js
CHANGED
|
@@ -16,13 +16,13 @@ const httpHelpers_1 = require("./internal/httpHelpers");
|
|
|
16
16
|
*
|
|
17
17
|
* @link https://docs.dolby.io/media-apis/reference/media-webhook-post
|
|
18
18
|
*
|
|
19
|
-
* @param
|
|
19
|
+
* @param accessToken Access token to use for authentication.
|
|
20
20
|
* @param url The callback url that will be called when job execution completes.
|
|
21
21
|
* @param headers (Optional) Headers to include in the webhook call.
|
|
22
22
|
*
|
|
23
23
|
* @returns The webhook identifier through a `Promise`.
|
|
24
24
|
*/
|
|
25
|
-
const registerWebhook = (
|
|
25
|
+
const registerWebhook = (accessToken, url, headers) => __awaiter(void 0, void 0, void 0, function* () {
|
|
26
26
|
const payload = {
|
|
27
27
|
callback: {
|
|
28
28
|
url: url,
|
|
@@ -35,7 +35,7 @@ const registerWebhook = (auth, url, headers) => __awaiter(void 0, void 0, void 0
|
|
|
35
35
|
hostname: 'api.dolby.com',
|
|
36
36
|
path: '/media/webhooks',
|
|
37
37
|
headers: {},
|
|
38
|
-
|
|
38
|
+
accessToken,
|
|
39
39
|
body: JSON.stringify(payload, null, ' '),
|
|
40
40
|
};
|
|
41
41
|
const response = yield (0, httpHelpers_1.sendPost)(requestOptions);
|
|
@@ -50,10 +50,10 @@ exports.registerWebhook = registerWebhook;
|
|
|
50
50
|
*
|
|
51
51
|
* @link https://docs.dolby.io/media-apis/reference/media-webhook-put
|
|
52
52
|
*
|
|
53
|
-
* @param
|
|
53
|
+
* @param accessToken Access token to use for authentication.
|
|
54
54
|
* @param options Options to update the webhook.
|
|
55
55
|
*/
|
|
56
|
-
const updateWebhook = (
|
|
56
|
+
const updateWebhook = (accessToken, options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
57
57
|
const payload = {
|
|
58
58
|
callback: {
|
|
59
59
|
url: options.url,
|
|
@@ -69,7 +69,7 @@ const updateWebhook = (auth, options) => __awaiter(void 0, void 0, void 0, funct
|
|
|
69
69
|
id: options.webhookId,
|
|
70
70
|
},
|
|
71
71
|
headers: {},
|
|
72
|
-
|
|
72
|
+
accessToken,
|
|
73
73
|
body: JSON.stringify(payload, null, ' '),
|
|
74
74
|
};
|
|
75
75
|
yield (0, httpHelpers_1.sendPut)(requestOptions);
|
|
@@ -80,12 +80,12 @@ exports.updateWebhook = updateWebhook;
|
|
|
80
80
|
*
|
|
81
81
|
* @link https://docs.dolby.io/media-apis/reference/media-webhook-get
|
|
82
82
|
*
|
|
83
|
-
* @param
|
|
83
|
+
* @param accessToken Access token to use for authentication.
|
|
84
84
|
* @param webhookId Identifier of the webhook to retrieve.
|
|
85
85
|
*
|
|
86
86
|
* @returns The `Webhook` object through a `Promise`.
|
|
87
87
|
*/
|
|
88
|
-
const retrieveWebhook = (
|
|
88
|
+
const retrieveWebhook = (accessToken, webhookId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
89
89
|
const requestOptions = {
|
|
90
90
|
hostname: 'api.dolby.com',
|
|
91
91
|
path: '/media/webhooks',
|
|
@@ -93,7 +93,7 @@ const retrieveWebhook = (auth, webhookId) => __awaiter(void 0, void 0, void 0, f
|
|
|
93
93
|
id: webhookId,
|
|
94
94
|
},
|
|
95
95
|
headers: {},
|
|
96
|
-
|
|
96
|
+
accessToken,
|
|
97
97
|
};
|
|
98
98
|
const response = yield (0, httpHelpers_1.sendGet)(requestOptions);
|
|
99
99
|
return response;
|
|
@@ -104,12 +104,12 @@ exports.retrieveWebhook = retrieveWebhook;
|
|
|
104
104
|
*
|
|
105
105
|
* @link https://docs.dolby.io/media-apis/reference/media-webhook-delete
|
|
106
106
|
*
|
|
107
|
-
* @param
|
|
107
|
+
* @param accessToken Access token to use for authentication.
|
|
108
108
|
* @param webhookId Identifier of the webhook to delete.
|
|
109
109
|
*
|
|
110
110
|
* @returns The webhook identifier through a `Promise`.
|
|
111
111
|
*/
|
|
112
|
-
const deleteWebhook = (
|
|
112
|
+
const deleteWebhook = (accessToken, webhookId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
113
113
|
const requestOptions = {
|
|
114
114
|
hostname: 'api.dolby.com',
|
|
115
115
|
path: '/media/webhooks',
|
|
@@ -117,7 +117,7 @@ const deleteWebhook = (auth, webhookId) => __awaiter(void 0, void 0, void 0, fun
|
|
|
117
117
|
id: webhookId,
|
|
118
118
|
},
|
|
119
119
|
headers: {},
|
|
120
|
-
|
|
120
|
+
accessToken,
|
|
121
121
|
};
|
|
122
122
|
const response = yield (0, httpHelpers_1.sendDelete)(requestOptions);
|
|
123
123
|
if (response.hasOwnProperty('webhook_id')) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../../src/media/webhooks.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,wDAAoG;AAIpG;;;;;;;;;;GAUG;AACI,MAAM,eAAe,GAAG,CAAO,
|
|
1
|
+
{"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../../src/media/webhoo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