@dolbyio/dolbyio-rest-apis-client 1.1.0 → 2.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/README.md +19 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/media/analyze.d.ts +43 -0
- package/dist/media/analyze.js +82 -0
- package/dist/media/analyze.js.map +1 -0
- package/dist/media/analyzeSpeech.d.ts +37 -0
- package/dist/media/analyzeSpeech.js +76 -0
- package/dist/media/analyzeSpeech.js.map +1 -0
- package/dist/media/diagnose.d.ts +39 -0
- package/dist/media/diagnose.js +78 -0
- package/dist/media/diagnose.js.map +1 -0
- package/dist/media/enhance.d.ts +34 -0
- package/dist/media/enhance.js +73 -0
- package/dist/media/enhance.js.map +1 -0
- package/dist/media/index.d.ts +10 -0
- package/dist/media/index.js +45 -0
- package/dist/media/index.js.map +1 -0
- package/dist/media/internal/httpHelpers.d.ts +46 -0
- package/dist/media/internal/httpHelpers.js +114 -0
- package/dist/media/internal/httpHelpers.js.map +1 -0
- package/dist/media/io.d.ts +32 -0
- package/dist/media/io.js +74 -0
- package/dist/media/io.js.map +1 -0
- package/dist/media/jobs.d.ts +35 -0
- package/dist/media/jobs.js +116 -0
- package/dist/media/jobs.js.map +1 -0
- package/dist/media/platform.d.ts +15 -0
- package/dist/media/platform.js +44 -0
- package/dist/media/platform.js.map +1 -0
- package/dist/media/transcode.d.ts +30 -0
- package/dist/media/transcode.js +69 -0
- package/dist/media/transcode.js.map +1 -0
- package/dist/media/types/analyze.d.ts +6 -0
- package/dist/media/types/analyze.js +3 -0
- package/dist/media/types/analyze.js.map +1 -0
- package/dist/media/types/analyzeSpeech.d.ts +6 -0
- package/dist/media/types/analyzeSpeech.js +3 -0
- package/dist/media/types/analyzeSpeech.js.map +1 -0
- package/dist/media/types/diagnose.d.ts +6 -0
- package/dist/media/types/diagnose.js +3 -0
- package/dist/media/types/diagnose.js.map +1 -0
- package/dist/media/types/enhance.d.ts +6 -0
- package/dist/media/types/enhance.js +3 -0
- package/dist/media/types/enhance.js.map +1 -0
- package/dist/media/types/jobResults.d.ts +12 -0
- package/dist/media/types/jobResults.js +3 -0
- package/dist/media/types/jobResults.js.map +1 -0
- package/dist/media/types/jobs.d.ts +29 -0
- package/dist/media/types/jobs.js +3 -0
- package/dist/media/types/jobs.js.map +1 -0
- package/dist/media/types/jwtToken.d.ts +6 -0
- package/dist/media/types/jwtToken.js +3 -0
- package/dist/media/types/jwtToken.js.map +1 -0
- package/dist/media/types/transcode.d.ts +6 -0
- package/dist/media/types/transcode.js +3 -0
- package/dist/media/types/transcode.js.map +1 -0
- package/dist/media/types/webhooks.d.ts +21 -0
- package/dist/media/types/webhooks.js +3 -0
- package/dist/media/types/webhooks.js.map +1 -0
- package/dist/media/webhooks.d.ts +46 -0
- package/dist/media/webhooks.js +129 -0
- package/dist/media/webhooks.js.map +1 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Dolby.io REST APIs
|
|
2
2
|
|
|
3
|
-
Node.JS wrapper for the dolby.io REST [Communications](https://docs.dolby.io/communications-apis/reference/authentication-api) APIs.
|
|
3
|
+
Node.JS wrapper for the dolby.io REST [Communications](https://docs.dolby.io/communications-apis/reference/authentication-api) and [Media](https://docs.dolby.io/media-processing/reference/media-enhance-overview) APIs.
|
|
4
4
|
|
|
5
5
|
## Install this project
|
|
6
6
|
|
|
@@ -10,7 +10,7 @@ Run the npm command to install the package `@dolbyio/dolbyio-rest-apis-client` i
|
|
|
10
10
|
npm install @dolbyio/dolbyio-rest-apis-client --save
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
## Examples
|
|
13
|
+
## Communications Examples
|
|
14
14
|
|
|
15
15
|
### Authenticate
|
|
16
16
|
|
|
@@ -73,6 +73,23 @@ const conference = await dolbyio.communications.conference.createConference(jwt,
|
|
|
73
73
|
console.log(`Conference created: ${conference.conferenceId}`);
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
+
## Media Examples
|
|
77
|
+
|
|
78
|
+
### Authenticate
|
|
79
|
+
|
|
80
|
+
To get an access token, use the following code:
|
|
81
|
+
|
|
82
|
+
```javascript
|
|
83
|
+
const dolbyio = require('@dolbyio/dolbyio-rest-apis-client');
|
|
84
|
+
|
|
85
|
+
const API_KEY = 'YOUR_API_KEY';
|
|
86
|
+
const API_SECRET = 'YOUR_API_SECRET';
|
|
87
|
+
|
|
88
|
+
const at = await dolbyio.media.platform.getAccessToken(API_KEY, API_SECRET);
|
|
89
|
+
|
|
90
|
+
console.log(`Access Token: ${at.access_token}`);
|
|
91
|
+
```
|
|
92
|
+
|
|
76
93
|
## Build this project
|
|
77
94
|
|
|
78
95
|
To build the `dist` folder, run the command:
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -23,7 +23,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.communications = void 0;
|
|
26
|
+
exports.media = exports.communications = void 0;
|
|
27
27
|
const communications = __importStar(require("./communications"));
|
|
28
28
|
exports.communications = communications;
|
|
29
|
+
const media = __importStar(require("./media"));
|
|
30
|
+
exports.media = media;
|
|
29
31
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iEAAmD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iEAAmD;AAG1C,wCAAc;AAFvB,+CAAiC;AAER,sBAAK"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import JwtToken from './types/jwtToken';
|
|
2
|
+
import { AnalyzeJob } from './types/analyze';
|
|
3
|
+
/**
|
|
4
|
+
* Starts analyzing to learn about your media.
|
|
5
|
+
*
|
|
6
|
+
* The `input` location of your source media file and `output` location of your Analyze JSON results file are required.
|
|
7
|
+
*
|
|
8
|
+
* This is an asynchronous operation so you will receive a `job_id` to be used to get the job status and result.
|
|
9
|
+
*
|
|
10
|
+
* There are additional optional parameters that can be provided to identify the type of content and additional loudness or validation requirements. See the samples for examples of what requests and responses look like.
|
|
11
|
+
*
|
|
12
|
+
* @link https://docs.dolby.io/media-apis/reference/media-analyze-post
|
|
13
|
+
*
|
|
14
|
+
* Beta API
|
|
15
|
+
* This API is being made available as an early preview.
|
|
16
|
+
* If you have feedback on how you'd like to use the API please reach out to share your feedback with our team.
|
|
17
|
+
* https://dolby.io/contact
|
|
18
|
+
*
|
|
19
|
+
* Content Length
|
|
20
|
+
*
|
|
21
|
+
* Media content with duration less than 2 seconds will not be processed. The API will return an ERROR in this case.
|
|
22
|
+
*
|
|
23
|
+
* @param auth Your Dolby.io Media API Key or a JWT Token.
|
|
24
|
+
* @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-analyze-post
|
|
25
|
+
*
|
|
26
|
+
* @returns The job identifier through a `Promise`.
|
|
27
|
+
*/
|
|
28
|
+
export declare const start: (auth: string | JwtToken, jobContent: string) => Promise<string | null>;
|
|
29
|
+
/**
|
|
30
|
+
* Gets Analyze Status.
|
|
31
|
+
*
|
|
32
|
+
* For a given job_id, this method will check the job status.
|
|
33
|
+
*
|
|
34
|
+
* When `status==Success` you'll be able to retrieve your result from the output location you provided in the original POST.
|
|
35
|
+
*
|
|
36
|
+
* @link https://docs.dolby.io/media-apis/reference/media-analyze-get
|
|
37
|
+
*
|
|
38
|
+
* @param auth Your Dolby.io Media API Key or a JWT Token.
|
|
39
|
+
* @param jobId Identifier of the job to retrieve.
|
|
40
|
+
*
|
|
41
|
+
* @returns The `AnalyzeJob` object through a `Promise`.
|
|
42
|
+
*/
|
|
43
|
+
export declare const getResults: (auth: string | JwtToken, jobId: string) => Promise<AnalyzeJob>;
|
|
@@ -0,0 +1,82 @@
|
|
|
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 = void 0;
|
|
13
|
+
const httpHelpers_1 = require("./internal/httpHelpers");
|
|
14
|
+
/**
|
|
15
|
+
* Starts analyzing to learn about your media.
|
|
16
|
+
*
|
|
17
|
+
* The `input` location of your source media file and `output` location of your Analyze JSON results file are required.
|
|
18
|
+
*
|
|
19
|
+
* This is an asynchronous operation so you will receive a `job_id` to be used to get the job status and result.
|
|
20
|
+
*
|
|
21
|
+
* There are additional optional parameters that can be provided to identify the type of content and additional loudness or validation requirements. See the samples for examples of what requests and responses look like.
|
|
22
|
+
*
|
|
23
|
+
* @link https://docs.dolby.io/media-apis/reference/media-analyze-post
|
|
24
|
+
*
|
|
25
|
+
* Beta API
|
|
26
|
+
* This API is being made available as an early preview.
|
|
27
|
+
* If you have feedback on how you'd like to use the API please reach out to share your feedback with our team.
|
|
28
|
+
* https://dolby.io/contact
|
|
29
|
+
*
|
|
30
|
+
* Content Length
|
|
31
|
+
*
|
|
32
|
+
* Media content with duration less than 2 seconds will not be processed. The API will return an ERROR in this case.
|
|
33
|
+
*
|
|
34
|
+
* @param auth Your Dolby.io Media API Key or a JWT Token.
|
|
35
|
+
* @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-analyze-post
|
|
36
|
+
*
|
|
37
|
+
* @returns The job identifier through a `Promise`.
|
|
38
|
+
*/
|
|
39
|
+
const start = (auth, jobContent) => __awaiter(void 0, void 0, void 0, function* () {
|
|
40
|
+
const requestOptions = {
|
|
41
|
+
hostname: 'api.dolby.com',
|
|
42
|
+
path: '/media/analyze',
|
|
43
|
+
headers: {},
|
|
44
|
+
auth,
|
|
45
|
+
body: jobContent,
|
|
46
|
+
};
|
|
47
|
+
const response = yield (0, httpHelpers_1.sendPost)(requestOptions);
|
|
48
|
+
if (response.hasOwnProperty('job_id')) {
|
|
49
|
+
return response['job_id'];
|
|
50
|
+
}
|
|
51
|
+
return null;
|
|
52
|
+
});
|
|
53
|
+
exports.start = start;
|
|
54
|
+
/**
|
|
55
|
+
* Gets Analyze Status.
|
|
56
|
+
*
|
|
57
|
+
* For a given job_id, this method will check the job status.
|
|
58
|
+
*
|
|
59
|
+
* When `status==Success` you'll be able to retrieve your result from the output location you provided in the original POST.
|
|
60
|
+
*
|
|
61
|
+
* @link https://docs.dolby.io/media-apis/reference/media-analyze-get
|
|
62
|
+
*
|
|
63
|
+
* @param auth Your Dolby.io Media API Key or a JWT Token.
|
|
64
|
+
* @param jobId Identifier of the job to retrieve.
|
|
65
|
+
*
|
|
66
|
+
* @returns The `AnalyzeJob` object through a `Promise`.
|
|
67
|
+
*/
|
|
68
|
+
const getResults = (auth, jobId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
69
|
+
const requestOptions = {
|
|
70
|
+
hostname: 'api.dolby.com',
|
|
71
|
+
path: '/media/analyze',
|
|
72
|
+
params: {
|
|
73
|
+
job_id: jobId,
|
|
74
|
+
},
|
|
75
|
+
headers: {},
|
|
76
|
+
auth,
|
|
77
|
+
};
|
|
78
|
+
const response = yield (0, httpHelpers_1.sendGet)(requestOptions);
|
|
79
|
+
return response;
|
|
80
|
+
});
|
|
81
|
+
exports.getResults = getResults;
|
|
82
|
+
//# sourceMappingURL=analyze.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analyze.js","sourceRoot":"","sources":["../../src/media/analyze.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wDAA+E;AAI/E;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACI,MAAM,KAAK,GAAG,CAAO,IAAuB,EAAE,UAAkB,EAA0B,EAAE;IAC/F,MAAM,cAAc,GAAuB;QACvC,QAAQ,EAAE,eAAe;QACzB,IAAI,EAAE,gBAAgB;QACtB,OAAO,EAAE,EAAE;QACX,IAAI;QACJ,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,IAAuB,EAAE,KAAa,EAAuB,EAAE;IAC5F,MAAM,cAAc,GAAuB;QACvC,QAAQ,EAAE,eAAe;QACzB,IAAI,EAAE,gBAAgB;QACtB,MAAM,EAAE;YACJ,MAAM,EAAE,KAAK;SAChB;QACD,OAAO,EAAE,EAAE;QACX,IAAI;KACP,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,IAAA,qBAAO,EAAC,cAAc,CAAC,CAAC;IAC/C,OAAO,QAAsB,CAAC;AAClC,CAAC,CAAA,CAAC;AAbW,QAAA,UAAU,cAarB"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import JwtToken from './types/jwtToken';
|
|
2
|
+
import { AnalyzeSpeechJob } from './types/analyzeSpeech';
|
|
3
|
+
/**
|
|
4
|
+
* Starts analyzing to learn about speech in your media.
|
|
5
|
+
*
|
|
6
|
+
* The `input` location of your source media file and `output` location of your Analyze JSON results file are required.
|
|
7
|
+
*
|
|
8
|
+
* This is an asynchronous operation so you will receive a `job_id` to be used to get the job status and result.
|
|
9
|
+
*
|
|
10
|
+
* @link https://docs.dolby.io/media-apis/reference/media-analyze-speech-post
|
|
11
|
+
*
|
|
12
|
+
* Beta API
|
|
13
|
+
* This API is being made available as an early preview.
|
|
14
|
+
* If you have feedback on how you'd like to use the API please reach out to share your feedback with our team.
|
|
15
|
+
* https://dolby.io/contact
|
|
16
|
+
*
|
|
17
|
+
* @param auth Your Dolby.io Media API Key or a JWT Token.
|
|
18
|
+
* @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-analyze-speech-post
|
|
19
|
+
*
|
|
20
|
+
* @returns The job identifier through a `Promise`.
|
|
21
|
+
*/
|
|
22
|
+
export declare const start: (auth: string | JwtToken, jobContent: string) => Promise<string | null>;
|
|
23
|
+
/**
|
|
24
|
+
* Gets Speech Analytics Status.
|
|
25
|
+
*
|
|
26
|
+
* For a given job_id, this method will check if the processing task has completed.
|
|
27
|
+
*
|
|
28
|
+
* When `status` is `Success`, you'll be able to retrieve your result from the `output` location you provided in the original `POST`.
|
|
29
|
+
*
|
|
30
|
+
* @link https://docs.dolby.io/media-apis/reference/media-analyze-speech-get
|
|
31
|
+
*
|
|
32
|
+
* @param auth Your Dolby.io Media API Key or a JWT Token.
|
|
33
|
+
* @param jobId Identifier of the job to retrieve.
|
|
34
|
+
*
|
|
35
|
+
* @returns The `AnalyzeSpeechJob` object through a `Promise`.
|
|
36
|
+
*/
|
|
37
|
+
export declare const getResults: (auth: string | JwtToken, jobId: string) => Promise<AnalyzeSpeechJob>;
|
|
@@ -0,0 +1,76 @@
|
|
|
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 = void 0;
|
|
13
|
+
const httpHelpers_1 = require("./internal/httpHelpers");
|
|
14
|
+
/**
|
|
15
|
+
* Starts analyzing to learn about speech in your media.
|
|
16
|
+
*
|
|
17
|
+
* The `input` location of your source media file and `output` location of your Analyze JSON results file are required.
|
|
18
|
+
*
|
|
19
|
+
* This is an asynchronous operation so you will receive a `job_id` to be used to get the job status and result.
|
|
20
|
+
*
|
|
21
|
+
* @link https://docs.dolby.io/media-apis/reference/media-analyze-speech-post
|
|
22
|
+
*
|
|
23
|
+
* Beta API
|
|
24
|
+
* This API is being made available as an early preview.
|
|
25
|
+
* If you have feedback on how you'd like to use the API please reach out to share your feedback with our team.
|
|
26
|
+
* https://dolby.io/contact
|
|
27
|
+
*
|
|
28
|
+
* @param auth Your Dolby.io Media API Key or a JWT Token.
|
|
29
|
+
* @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-analyze-speech-post
|
|
30
|
+
*
|
|
31
|
+
* @returns The job identifier through a `Promise`.
|
|
32
|
+
*/
|
|
33
|
+
const start = (auth, jobContent) => __awaiter(void 0, void 0, void 0, function* () {
|
|
34
|
+
const requestOptions = {
|
|
35
|
+
hostname: 'api.dolby.com',
|
|
36
|
+
path: '/media/analyze/speech',
|
|
37
|
+
headers: {},
|
|
38
|
+
auth,
|
|
39
|
+
body: jobContent,
|
|
40
|
+
};
|
|
41
|
+
const response = yield (0, httpHelpers_1.sendPost)(requestOptions);
|
|
42
|
+
if (response.hasOwnProperty('job_id')) {
|
|
43
|
+
return response['job_id'];
|
|
44
|
+
}
|
|
45
|
+
return null;
|
|
46
|
+
});
|
|
47
|
+
exports.start = start;
|
|
48
|
+
/**
|
|
49
|
+
* Gets Speech Analytics Status.
|
|
50
|
+
*
|
|
51
|
+
* For a given job_id, this method will check if the processing task has completed.
|
|
52
|
+
*
|
|
53
|
+
* When `status` is `Success`, you'll be able to retrieve your result from the `output` location you provided in the original `POST`.
|
|
54
|
+
*
|
|
55
|
+
* @link https://docs.dolby.io/media-apis/reference/media-analyze-speech-get
|
|
56
|
+
*
|
|
57
|
+
* @param auth Your Dolby.io Media API Key or a JWT Token.
|
|
58
|
+
* @param jobId Identifier of the job to retrieve.
|
|
59
|
+
*
|
|
60
|
+
* @returns The `AnalyzeSpeechJob` object through a `Promise`.
|
|
61
|
+
*/
|
|
62
|
+
const getResults = (auth, jobId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
63
|
+
const requestOptions = {
|
|
64
|
+
hostname: 'api.dolby.com',
|
|
65
|
+
path: '/media/analyze/speech',
|
|
66
|
+
params: {
|
|
67
|
+
job_id: jobId,
|
|
68
|
+
},
|
|
69
|
+
headers: {},
|
|
70
|
+
auth,
|
|
71
|
+
};
|
|
72
|
+
const response = yield (0, httpHelpers_1.sendGet)(requestOptions);
|
|
73
|
+
return response;
|
|
74
|
+
});
|
|
75
|
+
exports.getResults = getResults;
|
|
76
|
+
//# sourceMappingURL=analyzeSpeech.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analyzeSpeech.js","sourceRoot":"","sources":["../../src/media/analyzeSpeech.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wDAA+E;AAI/E;;;;;;;;;;;;;;;;;;GAkBG;AACI,MAAM,KAAK,GAAG,CAAO,IAAuB,EAAE,UAAkB,EAA0B,EAAE;IAC/F,MAAM,cAAc,GAAuB;QACvC,QAAQ,EAAE,eAAe;QACzB,IAAI,EAAE,uBAAuB;QAC7B,OAAO,EAAE,EAAE;QACX,IAAI;QACJ,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,IAAuB,EAAE,KAAa,EAA6B,EAAE;IAClG,MAAM,cAAc,GAAuB;QACvC,QAAQ,EAAE,eAAe;QACzB,IAAI,EAAE,uBAAuB;QAC7B,MAAM,EAAE;YACJ,MAAM,EAAE,KAAK;SAChB;QACD,OAAO,EAAE,EAAE;QACX,IAAI;KACP,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,IAAA,qBAAO,EAAC,cAAc,CAAC,CAAC;IAC/C,OAAO,QAA4B,CAAC;AACxC,CAAC,CAAA,CAAC;AAbW,QAAA,UAAU,cAarB"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import JwtToken from './types/jwtToken';
|
|
2
|
+
import { DiagnoseJob } from './types/diagnose';
|
|
3
|
+
/**
|
|
4
|
+
* Starts diagnosing to learn about the audio quality of your media.
|
|
5
|
+
*
|
|
6
|
+
* The `input` location of your source media file is required.
|
|
7
|
+
*
|
|
8
|
+
* This is an asynchronous operation so you will receive a `job_id` to be used to get the job status and result.
|
|
9
|
+
*
|
|
10
|
+
* @link https://docs.dolby.io/media-apis/reference/media-diagnose-post
|
|
11
|
+
*
|
|
12
|
+
* Beta API
|
|
13
|
+
* This API is being made available as an early preview.
|
|
14
|
+
* If you have feedback on how you'd like to use the API please reach out to share your feedback with our team.
|
|
15
|
+
* https://dolby.io/contact
|
|
16
|
+
*
|
|
17
|
+
* @param auth Your Dolby.io Media API Key or a JWT Token.
|
|
18
|
+
* @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-diagnose-post
|
|
19
|
+
*
|
|
20
|
+
* @returns The job identifier through a `Promise`.
|
|
21
|
+
*/
|
|
22
|
+
export declare const start: (auth: string | JwtToken, jobContent: string) => Promise<string | null>;
|
|
23
|
+
/**
|
|
24
|
+
* Gets Diagnose Results.
|
|
25
|
+
*
|
|
26
|
+
* For a given job_id, this method will check if the processing task has completed.
|
|
27
|
+
*
|
|
28
|
+
* The `progress` attribute provides a percentage of job progress.
|
|
29
|
+
*
|
|
30
|
+
* If the `status` is Success then the json result will be returned in the response.
|
|
31
|
+
*
|
|
32
|
+
* @link https://docs.dolby.io/media-apis/reference/media-diagnose-get
|
|
33
|
+
*
|
|
34
|
+
* @param auth Your Dolby.io Media API Key or a JWT Token.
|
|
35
|
+
* @param jobId Identifier of the job to retrieve.
|
|
36
|
+
*
|
|
37
|
+
* @returns The `DiagnoseJob` object through a `Promise`.
|
|
38
|
+
*/
|
|
39
|
+
export declare const getResults: (auth: string | JwtToken, jobId: string) => Promise<DiagnoseJob>;
|
|
@@ -0,0 +1,78 @@
|
|
|
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 = void 0;
|
|
13
|
+
const httpHelpers_1 = require("./internal/httpHelpers");
|
|
14
|
+
/**
|
|
15
|
+
* Starts diagnosing to learn about the audio quality of your media.
|
|
16
|
+
*
|
|
17
|
+
* The `input` location of your source media file is required.
|
|
18
|
+
*
|
|
19
|
+
* This is an asynchronous operation so you will receive a `job_id` to be used to get the job status and result.
|
|
20
|
+
*
|
|
21
|
+
* @link https://docs.dolby.io/media-apis/reference/media-diagnose-post
|
|
22
|
+
*
|
|
23
|
+
* Beta API
|
|
24
|
+
* This API is being made available as an early preview.
|
|
25
|
+
* If you have feedback on how you'd like to use the API please reach out to share your feedback with our team.
|
|
26
|
+
* https://dolby.io/contact
|
|
27
|
+
*
|
|
28
|
+
* @param auth Your Dolby.io Media API Key or a JWT Token.
|
|
29
|
+
* @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-diagnose-post
|
|
30
|
+
*
|
|
31
|
+
* @returns The job identifier through a `Promise`.
|
|
32
|
+
*/
|
|
33
|
+
const start = (auth, jobContent) => __awaiter(void 0, void 0, void 0, function* () {
|
|
34
|
+
const requestOptions = {
|
|
35
|
+
hostname: 'api.dolby.com',
|
|
36
|
+
path: '/media/diagnose',
|
|
37
|
+
headers: {},
|
|
38
|
+
auth,
|
|
39
|
+
body: jobContent,
|
|
40
|
+
};
|
|
41
|
+
const response = yield (0, httpHelpers_1.sendPost)(requestOptions);
|
|
42
|
+
if (response.hasOwnProperty('job_id')) {
|
|
43
|
+
return response['job_id'];
|
|
44
|
+
}
|
|
45
|
+
return null;
|
|
46
|
+
});
|
|
47
|
+
exports.start = start;
|
|
48
|
+
/**
|
|
49
|
+
* Gets Diagnose Results.
|
|
50
|
+
*
|
|
51
|
+
* For a given job_id, this method will check if the processing task has completed.
|
|
52
|
+
*
|
|
53
|
+
* The `progress` attribute provides a percentage of job progress.
|
|
54
|
+
*
|
|
55
|
+
* If the `status` is Success then the json result will be returned in the response.
|
|
56
|
+
*
|
|
57
|
+
* @link https://docs.dolby.io/media-apis/reference/media-diagnose-get
|
|
58
|
+
*
|
|
59
|
+
* @param auth Your Dolby.io Media API Key or a JWT Token.
|
|
60
|
+
* @param jobId Identifier of the job to retrieve.
|
|
61
|
+
*
|
|
62
|
+
* @returns The `DiagnoseJob` object through a `Promise`.
|
|
63
|
+
*/
|
|
64
|
+
const getResults = (auth, jobId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
65
|
+
const requestOptions = {
|
|
66
|
+
hostname: 'api.dolby.com',
|
|
67
|
+
path: '/media/diagnose',
|
|
68
|
+
params: {
|
|
69
|
+
job_id: jobId,
|
|
70
|
+
},
|
|
71
|
+
headers: {},
|
|
72
|
+
auth,
|
|
73
|
+
};
|
|
74
|
+
const response = yield (0, httpHelpers_1.sendGet)(requestOptions);
|
|
75
|
+
return response;
|
|
76
|
+
});
|
|
77
|
+
exports.getResults = getResults;
|
|
78
|
+
//# sourceMappingURL=diagnose.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagnose.js","sourceRoot":"","sources":["../../src/media/diagnose.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wDAA+E;AAI/E;;;;;;;;;;;;;;;;;;GAkBG;AACI,MAAM,KAAK,GAAG,CAAO,IAAuB,EAAE,UAAkB,EAA0B,EAAE;IAC/F,MAAM,cAAc,GAAuB;QACvC,QAAQ,EAAE,eAAe;QACzB,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,EAAE;QACX,IAAI;QACJ,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;;;;;;;;;;;;;;;GAeG;AACI,MAAM,UAAU,GAAG,CAAO,IAAuB,EAAE,KAAa,EAAwB,EAAE;IAC7F,MAAM,cAAc,GAAuB;QACvC,QAAQ,EAAE,eAAe;QACzB,IAAI,EAAE,iBAAiB;QACvB,MAAM,EAAE;YACJ,MAAM,EAAE,KAAK;SAChB;QACD,OAAO,EAAE,EAAE;QACX,IAAI;KACP,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,IAAA,qBAAO,EAAC,cAAc,CAAC,CAAC;IAC/C,OAAO,QAAuB,CAAC;AACnC,CAAC,CAAA,CAAC;AAbW,QAAA,UAAU,cAarB"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import JwtToken from './types/jwtToken';
|
|
2
|
+
import { EnhanceJob } from './types/enhance';
|
|
3
|
+
/**
|
|
4
|
+
* Starts enhancing to improve your media.
|
|
5
|
+
*
|
|
6
|
+
* The input location for your source media file as well as the output location for the processed result are required.
|
|
7
|
+
*
|
|
8
|
+
* This is an asynchronous operation so you will receive a job_id where you can retrieve the results when enhancement is complete.
|
|
9
|
+
*
|
|
10
|
+
* There are additional optional parameters that can be provided to control and select the type of enhancements made. See the samples for some examples of what requests and responses look like.
|
|
11
|
+
*
|
|
12
|
+
* @link https://docs.dolby.io/media-apis/reference/media-enhance-post
|
|
13
|
+
*
|
|
14
|
+
* @param auth Your Dolby.io Media API Key or a JWT Token.
|
|
15
|
+
* @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-enhance-post
|
|
16
|
+
*
|
|
17
|
+
* @returns The job identifier through a `Promise`.
|
|
18
|
+
*/
|
|
19
|
+
export declare const start: (auth: string | JwtToken, jobContent: string) => Promise<string | null>;
|
|
20
|
+
/**
|
|
21
|
+
* Gets Enhance Results
|
|
22
|
+
*
|
|
23
|
+
* For a given job_id, this method will check if the processing task has completed and return the enhanced results.
|
|
24
|
+
*
|
|
25
|
+
* When the status is Success you'll be able to retrieve your result from the output location you provided in the original POST.
|
|
26
|
+
*
|
|
27
|
+
* @link https://docs.dolby.io/media-apis/reference/media-enhance-get
|
|
28
|
+
*
|
|
29
|
+
* @param auth Your Dolby.io Media API Key or a JWT Token.
|
|
30
|
+
* @param jobId Identifier of the job to retrieve.
|
|
31
|
+
*
|
|
32
|
+
* @returns The `EnhanceJob` object through a `Promise`.
|
|
33
|
+
*/
|
|
34
|
+
export declare const getResults: (auth: string | JwtToken, jobId: string) => Promise<EnhanceJob>;
|
|
@@ -0,0 +1,73 @@
|
|
|
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 = void 0;
|
|
13
|
+
const httpHelpers_1 = require("./internal/httpHelpers");
|
|
14
|
+
/**
|
|
15
|
+
* Starts enhancing to improve your media.
|
|
16
|
+
*
|
|
17
|
+
* The input location for your source media file as well as the output location for the processed result are required.
|
|
18
|
+
*
|
|
19
|
+
* This is an asynchronous operation so you will receive a job_id where you can retrieve the results when enhancement is complete.
|
|
20
|
+
*
|
|
21
|
+
* There are additional optional parameters that can be provided to control and select the type of enhancements made. See the samples for some examples of what requests and responses look like.
|
|
22
|
+
*
|
|
23
|
+
* @link https://docs.dolby.io/media-apis/reference/media-enhance-post
|
|
24
|
+
*
|
|
25
|
+
* @param auth Your Dolby.io Media API Key or a JWT Token.
|
|
26
|
+
* @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-enhance-post
|
|
27
|
+
*
|
|
28
|
+
* @returns The job identifier through a `Promise`.
|
|
29
|
+
*/
|
|
30
|
+
const start = (auth, jobContent) => __awaiter(void 0, void 0, void 0, function* () {
|
|
31
|
+
const requestOptions = {
|
|
32
|
+
hostname: 'api.dolby.com',
|
|
33
|
+
path: '/media/enhance',
|
|
34
|
+
headers: {},
|
|
35
|
+
auth,
|
|
36
|
+
body: jobContent,
|
|
37
|
+
};
|
|
38
|
+
const response = yield (0, httpHelpers_1.sendPost)(requestOptions);
|
|
39
|
+
if (response.hasOwnProperty('job_id')) {
|
|
40
|
+
return response['job_id'];
|
|
41
|
+
}
|
|
42
|
+
return null;
|
|
43
|
+
});
|
|
44
|
+
exports.start = start;
|
|
45
|
+
/**
|
|
46
|
+
* Gets Enhance Results
|
|
47
|
+
*
|
|
48
|
+
* For a given job_id, this method will check if the processing task has completed and return the enhanced results.
|
|
49
|
+
*
|
|
50
|
+
* When the status is Success you'll be able to retrieve your result from the output location you provided in the original POST.
|
|
51
|
+
*
|
|
52
|
+
* @link https://docs.dolby.io/media-apis/reference/media-enhance-get
|
|
53
|
+
*
|
|
54
|
+
* @param auth Your Dolby.io Media API Key or a JWT Token.
|
|
55
|
+
* @param jobId Identifier of the job to retrieve.
|
|
56
|
+
*
|
|
57
|
+
* @returns The `EnhanceJob` object through a `Promise`.
|
|
58
|
+
*/
|
|
59
|
+
const getResults = (auth, jobId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
60
|
+
const requestOptions = {
|
|
61
|
+
hostname: 'api.dolby.com',
|
|
62
|
+
path: '/media/enhance',
|
|
63
|
+
params: {
|
|
64
|
+
job_id: jobId,
|
|
65
|
+
},
|
|
66
|
+
headers: {},
|
|
67
|
+
auth,
|
|
68
|
+
};
|
|
69
|
+
const response = yield (0, httpHelpers_1.sendGet)(requestOptions);
|
|
70
|
+
return response;
|
|
71
|
+
});
|
|
72
|
+
exports.getResults = getResults;
|
|
73
|
+
//# sourceMappingURL=enhance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enhance.js","sourceRoot":"","sources":["../../src/media/enhance.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wDAA+E;AAI/E;;;;;;;;;;;;;;;GAeG;AACI,MAAM,KAAK,GAAG,CAAO,IAAuB,EAAE,UAAkB,EAA0B,EAAE;IAC/F,MAAM,cAAc,GAAuB;QACvC,QAAQ,EAAE,eAAe;QACzB,IAAI,EAAE,gBAAgB;QACtB,OAAO,EAAE,EAAE;QACX,IAAI;QACJ,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,IAAuB,EAAE,KAAa,EAAuB,EAAE;IAC5F,MAAM,cAAc,GAAuB;QACvC,QAAQ,EAAE,eAAe;QACzB,IAAI,EAAE,gBAAgB;QACtB,MAAM,EAAE;YACJ,MAAM,EAAE,KAAK;SAChB;QACD,OAAO,EAAE,EAAE;QACX,IAAI;KACP,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,IAAA,qBAAO,EAAC,cAAc,CAAC,CAAC;IAC/C,OAAO,QAAsB,CAAC;AAClC,CAAC,CAAA,CAAC;AAbW,QAAA,UAAU,cAarB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as analyze from './analyze';
|
|
2
|
+
import * as analyzeSpeech from './analyzeSpeech';
|
|
3
|
+
import * as diagnose from './diagnose';
|
|
4
|
+
import * as enhance from './enhance';
|
|
5
|
+
import * as io from './io';
|
|
6
|
+
import * as jobs from './jobs';
|
|
7
|
+
import * as transcode from './transcode';
|
|
8
|
+
import * as platform from './platform';
|
|
9
|
+
import * as webhooks from './webhooks';
|
|
10
|
+
export { analyze, analyzeSpeech, diagnose, enhance, io, jobs, transcode, platform, webhooks };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.webhooks = exports.platform = exports.transcode = exports.jobs = exports.io = exports.enhance = exports.diagnose = exports.analyzeSpeech = exports.analyze = void 0;
|
|
27
|
+
const analyze = __importStar(require("./analyze"));
|
|
28
|
+
exports.analyze = analyze;
|
|
29
|
+
const analyzeSpeech = __importStar(require("./analyzeSpeech"));
|
|
30
|
+
exports.analyzeSpeech = analyzeSpeech;
|
|
31
|
+
const diagnose = __importStar(require("./diagnose"));
|
|
32
|
+
exports.diagnose = diagnose;
|
|
33
|
+
const enhance = __importStar(require("./enhance"));
|
|
34
|
+
exports.enhance = enhance;
|
|
35
|
+
const io = __importStar(require("./io"));
|
|
36
|
+
exports.io = io;
|
|
37
|
+
const jobs = __importStar(require("./jobs"));
|
|
38
|
+
exports.jobs = jobs;
|
|
39
|
+
const transcode = __importStar(require("./transcode"));
|
|
40
|
+
exports.transcode = transcode;
|
|
41
|
+
const platform = __importStar(require("./platform"));
|
|
42
|
+
exports.platform = platform;
|
|
43
|
+
const webhooks = __importStar(require("./webhooks"));
|
|
44
|
+
exports.webhooks = webhooks;
|
|
45
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/media/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAqC;AAU5B,0BAAO;AAThB,+DAAiD;AAS/B,sCAAa;AAR/B,qDAAuC;AAQN,4BAAQ;AAPzC,mDAAqC;AAOM,0BAAO;AANlD,yCAA2B;AAMyB,gBAAE;AALtD,6CAA+B;AAKyB,oBAAI;AAJ5D,uDAAyC;AAIqB,8BAAS;AAHvE,qDAAuC;AAGkC,4BAAQ;AAFjF,qDAAuC;AAE4C,4BAAQ"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as httpHelpers from '../../internal/httpHelpers';
|
|
2
|
+
import JwtToken from '../types/jwtToken';
|
|
3
|
+
export interface AuthRequestOptions extends httpHelpers.RequestOptions {
|
|
4
|
+
auth: string | JwtToken;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Sends a GET request.
|
|
8
|
+
*
|
|
9
|
+
* @param options Request options.
|
|
10
|
+
*
|
|
11
|
+
* @returns A JSON payload object through a Promise.
|
|
12
|
+
*/
|
|
13
|
+
export declare const sendGet: (options: AuthRequestOptions) => Promise<unknown>;
|
|
14
|
+
/**
|
|
15
|
+
* Sends a POST request.
|
|
16
|
+
*
|
|
17
|
+
* @param options Request options.
|
|
18
|
+
*
|
|
19
|
+
* @returns A JSON payload object through a Promise.
|
|
20
|
+
*/
|
|
21
|
+
export declare const sendPost: (options: AuthRequestOptions) => Promise<unknown>;
|
|
22
|
+
/**
|
|
23
|
+
* Sends a PUT request.
|
|
24
|
+
*
|
|
25
|
+
* @param options Request options.
|
|
26
|
+
*
|
|
27
|
+
* @returns A JSON payload object through a Promise.
|
|
28
|
+
*/
|
|
29
|
+
export declare const sendPut: (options: AuthRequestOptions) => Promise<unknown>;
|
|
30
|
+
/**
|
|
31
|
+
* Sends a DELETE request.
|
|
32
|
+
*
|
|
33
|
+
* @param options Request options.
|
|
34
|
+
*
|
|
35
|
+
* @returns A JSON payload object through a Promise.
|
|
36
|
+
*/
|
|
37
|
+
export declare const sendDelete: (options: AuthRequestOptions) => Promise<unknown>;
|
|
38
|
+
/**
|
|
39
|
+
* Download a file.
|
|
40
|
+
*
|
|
41
|
+
* @param filepath Where to save the file.
|
|
42
|
+
* @param options Request options.
|
|
43
|
+
*
|
|
44
|
+
* @returns A JSON payload object through a Promise.
|
|
45
|
+
*/
|
|
46
|
+
export declare const download: (filepath: string, options: AuthRequestOptions) => Promise<void>;
|