@dolbyio/dolbyio-rest-apis-client 3.4.2 → 3.4.4

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.
Files changed (196) hide show
  1. package/dist/{src/authentication.d.ts → authentication.d.ts} +0 -0
  2. package/dist/authentication.js +64 -0
  3. package/dist/{src/communications → communications}/authentication.d.ts +0 -0
  4. package/dist/communications/authentication.js +62 -0
  5. package/dist/{src/communications → communications}/conference.d.ts +0 -0
  6. package/dist/communications/conference.js +380 -0
  7. package/dist/{src/communications → communications}/index.d.ts +0 -0
  8. package/dist/communications/index.js +19 -0
  9. package/dist/{src/communications → communications}/internal/httpHelpers.d.ts +0 -0
  10. package/dist/communications/internal/httpHelpers.js +69 -0
  11. package/dist/{src/communications → communications}/internal/urls.d.ts +0 -0
  12. package/dist/communications/internal/urls.js +10 -0
  13. package/dist/{src/communications → communications}/monitor/conferences.d.ts +0 -0
  14. package/dist/communications/monitor/conferences.js +399 -0
  15. package/dist/{src/communications → communications}/monitor/index.d.ts +0 -0
  16. package/dist/communications/monitor/index.js +15 -0
  17. package/dist/{src/communications → communications}/monitor/recordings.d.ts +0 -0
  18. package/dist/communications/monitor/recordings.js +356 -0
  19. package/dist/{src/communications → communications}/monitor/webhooks.d.ts +0 -0
  20. package/dist/communications/monitor/webhooks.js +140 -0
  21. package/dist/{src/communications → communications}/recording.d.ts +0 -0
  22. package/dist/communications/recording.js +100 -0
  23. package/dist/communications/remix.js +107 -0
  24. package/dist/{src/communications → communications}/streaming.d.ts +0 -0
  25. package/dist/communications/streaming.js +191 -0
  26. package/dist/{src/communications → communications}/types/conference.d.ts +0 -0
  27. package/dist/communications/types/conference.js +5 -0
  28. package/dist/{src/communications → communications}/types/conferences.d.ts +0 -0
  29. package/dist/communications/types/conferences.js +5 -0
  30. package/dist/{src/communications → communications}/types/core.d.ts +0 -0
  31. package/dist/communications/types/core.js +5 -0
  32. package/dist/{src/communications → communications}/types/participant.d.ts +0 -0
  33. package/dist/communications/types/participant.js +1 -0
  34. package/dist/{src/communications → communications}/types/permission.d.ts +0 -0
  35. package/dist/communications/types/permission.js +22 -0
  36. package/dist/{src/communications → communications}/types/recordings.d.ts +0 -0
  37. package/dist/communications/types/recordings.js +5 -0
  38. package/dist/communications/types/remixStatus.js +1 -0
  39. package/dist/{src/communications → communications}/types/rtcpMode.d.ts +0 -0
  40. package/dist/communications/types/rtcpMode.js +13 -0
  41. package/dist/{src/communications → communications}/types/spatialAudio.d.ts +0 -0
  42. package/dist/communications/types/spatialAudio.js +5 -0
  43. package/dist/{src/communications → communications}/types/videoCodec.d.ts +0 -0
  44. package/dist/communications/types/videoCodec.js +12 -0
  45. package/dist/{src/communications → communications}/types/webhooks.d.ts +0 -0
  46. package/dist/communications/types/webhooks.js +5 -0
  47. package/dist/{src/index.d.ts → index.d.ts} +2 -1
  48. package/dist/index.js +17 -0
  49. package/dist/{src/internal → internal}/httpHelpers.d.ts +0 -0
  50. package/dist/internal/httpHelpers.js +217 -0
  51. package/dist/{src/internal → internal}/urls.d.ts +0 -0
  52. package/dist/internal/urls.js +8 -0
  53. package/dist/{src/media → media}/analyze.d.ts +0 -0
  54. package/dist/media/analyze.js +95 -0
  55. package/dist/{src/media → media}/analyzeSpeech.d.ts +0 -0
  56. package/dist/media/analyzeSpeech.js +89 -0
  57. package/dist/{src/media → media}/diagnose.d.ts +0 -0
  58. package/dist/media/diagnose.js +91 -0
  59. package/dist/{src/media → media}/enhance.d.ts +0 -0
  60. package/dist/media/enhance.js +86 -0
  61. package/dist/{src/media → media}/index.d.ts +0 -0
  62. package/dist/media/index.js +27 -0
  63. package/dist/{src/media → media}/internal/httpHelpers.d.ts +0 -0
  64. package/dist/media/internal/httpHelpers.js +61 -0
  65. package/dist/{src/media → media}/internal/jobsHelpers.d.ts +0 -0
  66. package/dist/media/internal/jobsHelpers.js +85 -0
  67. package/dist/{src/media → media}/internal/urls.d.ts +0 -0
  68. package/dist/media/internal/urls.js +8 -0
  69. package/dist/{src/media → media}/io.d.ts +0 -0
  70. package/dist/media/io.js +176 -0
  71. package/dist/{src/media → media}/jobs.d.ts +0 -0
  72. package/dist/media/jobs.js +182 -0
  73. package/dist/{src/media → media}/mastering.d.ts +0 -0
  74. package/dist/media/mastering.js +166 -0
  75. package/dist/{src/media → media}/transcode.d.ts +0 -0
  76. package/dist/media/transcode.js +82 -0
  77. package/dist/{src/media → media}/types/analyze.d.ts +0 -0
  78. package/dist/media/types/analyze.js +5 -0
  79. package/dist/{src/media → media}/types/analyzeSpeech.d.ts +0 -0
  80. package/dist/media/types/analyzeSpeech.js +5 -0
  81. package/dist/{src/media → media}/types/diagnose.d.ts +0 -0
  82. package/dist/media/types/diagnose.js +5 -0
  83. package/dist/{src/media → media}/types/enhance.d.ts +0 -0
  84. package/dist/media/types/enhance.js +5 -0
  85. package/dist/{src/media → media}/types/jobResults.d.ts +0 -0
  86. package/dist/media/types/jobResults.js +5 -0
  87. package/dist/{src/media → media}/types/jobs.d.ts +0 -0
  88. package/dist/media/types/jobs.js +5 -0
  89. package/dist/{src/media → media}/types/mastering.d.ts +0 -0
  90. package/dist/media/types/mastering.js +5 -0
  91. package/dist/{src/media → media}/types/transcode.d.ts +0 -0
  92. package/dist/media/types/transcode.js +5 -0
  93. package/dist/{src/media → media}/types/webhooks.d.ts +0 -0
  94. package/dist/media/types/webhooks.js +5 -0
  95. package/dist/{src/media → media}/webhooks.d.ts +0 -0
  96. package/dist/media/webhooks.js +216 -0
  97. package/dist/{src/types → types}/jwtToken.d.ts +0 -0
  98. package/dist/types/jwtToken.js +1 -0
  99. package/package.json +8 -3
  100. package/dist/package.json +0 -30
  101. package/dist/src/authentication.js +0 -48
  102. package/dist/src/authentication.js.map +0 -1
  103. package/dist/src/communications/authentication.js +0 -46
  104. package/dist/src/communications/authentication.js.map +0 -1
  105. package/dist/src/communications/conference.js +0 -255
  106. package/dist/src/communications/conference.js.map +0 -1
  107. package/dist/src/communications/index.js +0 -37
  108. package/dist/src/communications/index.js.map +0 -1
  109. package/dist/src/communications/internal/httpHelpers.js +0 -47
  110. package/dist/src/communications/internal/httpHelpers.js.map +0 -1
  111. package/dist/src/communications/internal/urls.js +0 -6
  112. package/dist/src/communications/internal/urls.js.map +0 -1
  113. package/dist/src/communications/monitor/conferences.js +0 -271
  114. package/dist/src/communications/monitor/conferences.js.map +0 -1
  115. package/dist/src/communications/monitor/index.js +0 -33
  116. package/dist/src/communications/monitor/index.js.map +0 -1
  117. package/dist/src/communications/monitor/recordings.js +0 -226
  118. package/dist/src/communications/monitor/recordings.js.map +0 -1
  119. package/dist/src/communications/monitor/webhooks.js +0 -104
  120. package/dist/src/communications/monitor/webhooks.js.map +0 -1
  121. package/dist/src/communications/recording.js +0 -69
  122. package/dist/src/communications/recording.js.map +0 -1
  123. package/dist/src/communications/streaming.js +0 -123
  124. package/dist/src/communications/streaming.js.map +0 -1
  125. package/dist/src/communications/types/conference.js +0 -3
  126. package/dist/src/communications/types/conference.js.map +0 -1
  127. package/dist/src/communications/types/conferences.js +0 -3
  128. package/dist/src/communications/types/conferences.js.map +0 -1
  129. package/dist/src/communications/types/core.js +0 -3
  130. package/dist/src/communications/types/core.js.map +0 -1
  131. package/dist/src/communications/types/participant.js +0 -3
  132. package/dist/src/communications/types/participant.js.map +0 -1
  133. package/dist/src/communications/types/permission.js +0 -31
  134. package/dist/src/communications/types/permission.js.map +0 -1
  135. package/dist/src/communications/types/recordings.js +0 -3
  136. package/dist/src/communications/types/recordings.js.map +0 -1
  137. package/dist/src/communications/types/rtcpMode.js +0 -13
  138. package/dist/src/communications/types/rtcpMode.js.map +0 -1
  139. package/dist/src/communications/types/spatialAudio.js +0 -3
  140. package/dist/src/communications/types/spatialAudio.js.map +0 -1
  141. package/dist/src/communications/types/videoCodec.js +0 -9
  142. package/dist/src/communications/types/videoCodec.js.map +0 -1
  143. package/dist/src/communications/types/webhooks.js +0 -3
  144. package/dist/src/communications/types/webhooks.js.map +0 -1
  145. package/dist/src/index.js +0 -33
  146. package/dist/src/index.js.map +0 -1
  147. package/dist/src/internal/httpHelpers.js +0 -184
  148. package/dist/src/internal/httpHelpers.js.map +0 -1
  149. package/dist/src/internal/urls.js +0 -5
  150. package/dist/src/internal/urls.js.map +0 -1
  151. package/dist/src/media/analyze.js +0 -61
  152. package/dist/src/media/analyze.js.map +0 -1
  153. package/dist/src/media/analyzeSpeech.js +0 -55
  154. package/dist/src/media/analyzeSpeech.js.map +0 -1
  155. package/dist/src/media/diagnose.js +0 -57
  156. package/dist/src/media/diagnose.js.map +0 -1
  157. package/dist/src/media/enhance.js +0 -52
  158. package/dist/src/media/enhance.js.map +0 -1
  159. package/dist/src/media/index.js +0 -45
  160. package/dist/src/media/index.js.map +0 -1
  161. package/dist/src/media/internal/httpHelpers.js +0 -76
  162. package/dist/src/media/internal/httpHelpers.js.map +0 -1
  163. package/dist/src/media/internal/jobsHelpers.js +0 -47
  164. package/dist/src/media/internal/jobsHelpers.js.map +0 -1
  165. package/dist/src/media/internal/urls.js +0 -5
  166. package/dist/src/media/internal/urls.js.map +0 -1
  167. package/dist/src/media/io.js +0 -99
  168. package/dist/src/media/io.js.map +0 -1
  169. package/dist/src/media/jobs.js +0 -120
  170. package/dist/src/media/jobs.js.map +0 -1
  171. package/dist/src/media/mastering.js +0 -94
  172. package/dist/src/media/mastering.js.map +0 -1
  173. package/dist/src/media/transcode.js +0 -48
  174. package/dist/src/media/transcode.js.map +0 -1
  175. package/dist/src/media/types/analyze.js +0 -3
  176. package/dist/src/media/types/analyze.js.map +0 -1
  177. package/dist/src/media/types/analyzeSpeech.js +0 -3
  178. package/dist/src/media/types/analyzeSpeech.js.map +0 -1
  179. package/dist/src/media/types/diagnose.js +0 -3
  180. package/dist/src/media/types/diagnose.js.map +0 -1
  181. package/dist/src/media/types/enhance.js +0 -3
  182. package/dist/src/media/types/enhance.js.map +0 -1
  183. package/dist/src/media/types/jobResults.js +0 -3
  184. package/dist/src/media/types/jobResults.js.map +0 -1
  185. package/dist/src/media/types/jobs.js +0 -3
  186. package/dist/src/media/types/jobs.js.map +0 -1
  187. package/dist/src/media/types/mastering.js +0 -3
  188. package/dist/src/media/types/mastering.js.map +0 -1
  189. package/dist/src/media/types/transcode.js +0 -3
  190. package/dist/src/media/types/transcode.js.map +0 -1
  191. package/dist/src/media/types/webhooks.js +0 -3
  192. package/dist/src/media/types/webhooks.js.map +0 -1
  193. package/dist/src/media/webhooks.js +0 -136
  194. package/dist/src/media/webhooks.js.map +0 -1
  195. package/dist/src/types/jwtToken.js +0 -3
  196. package/dist/src/types/jwtToken.js.map +0 -1
@@ -1,99 +0,0 @@
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.downloadFile = exports.getDownloadUrl = exports.getUploadUrl = void 0;
13
- const httpHelpers_1 = require("./internal/httpHelpers");
14
- const httpHelpers_2 = require("../internal/httpHelpers");
15
- const urls_1 = require("./internal/urls");
16
- const getUrl = (accessToken, endpointUrl, dlbUrl) => __awaiter(void 0, void 0, void 0, function* () {
17
- const payload = {
18
- url: dlbUrl,
19
- };
20
- const requestOptions = {
21
- hostname: urls_1.API_HOSTNAME,
22
- path: endpointUrl,
23
- headers: {
24
- Accept: 'application/json',
25
- 'Content-Type': 'application/json',
26
- },
27
- accessToken,
28
- body: JSON.stringify(payload, null, ' '),
29
- };
30
- const response = yield (0, httpHelpers_1.sendPost)(requestOptions);
31
- if (response.hasOwnProperty('url')) {
32
- return response['url'];
33
- }
34
- return null;
35
- });
36
- /**
37
- * Gets an upload URL.
38
- *
39
- * To use the Dolby provided temporary storage is a two step process.
40
- *
41
- * You start by declaring a dlb:// url that you can reference in any other Media API calls. The response will provide a url where you can put your media. This allows you to use the dlb:// url as a short-cut for a temporary storage location.
42
- *
43
- * You'll be returned a pre-signed url you can use to PUT and upload your media file. The temporary storage should allow you to read and write to the dlb:// locations for a period of at least 24 hours before it is removed.
44
- *
45
- * @link https://docs.dolby.io/media-apis/reference/media-input
46
- *
47
- * @param accessToken Access token to use for authentication.
48
- * @param dlbUrl The `url` should be in the form `dlb://object-key` where the object-key can be any alpha-numeric string. The object-key is unique to your account API Key so there is no risk of collision with other users.
49
- *
50
- * @returns The upload URL through a `Promise`.
51
- */
52
- const getUploadUrl = (accessToken, dlbUrl) => __awaiter(void 0, void 0, void 0, function* () {
53
- return yield getUrl(accessToken, '/media/input', dlbUrl);
54
- });
55
- exports.getUploadUrl = getUploadUrl;
56
- /**
57
- * Gets the download URL.
58
- *
59
- * You can download media you previously uploaded with /media/input or media that was generated through another Dolby Media API.
60
- *
61
- * The temporary storage should allow you to read and write to the dlb:// locations for a period of at least 24 hours before it is removed.
62
- *
63
- * @link https://docs.dolby.io/media-apis/reference/media-output-post
64
- *
65
- * @param accessToken Access token to use for authentication.
66
- * @param dlbUrl The `url` should be in the form `dlb://object-key` where the object-key can be any alpha-numeric string. The object-key is unique to your account API Key so there is no risk of collision with other users.
67
- *
68
- * @returns The download URL through a `Promise`.
69
- */
70
- const getDownloadUrl = (accessToken, dlbUrl) => __awaiter(void 0, void 0, void 0, function* () {
71
- return yield getUrl(accessToken, '/media/output', dlbUrl);
72
- });
73
- exports.getDownloadUrl = getDownloadUrl;
74
- /**
75
- * Download a media file.
76
- *
77
- * You can download media you previously uploaded with /media/input or media that was generated through another Dolby Media API.
78
- *
79
- * The temporary storage should allow you to read and write to the dlb:// locations for a period of at least 24 hours before it is removed.
80
- *
81
- * @link https://docs.dolby.io/media-apis/reference/media-output-get
82
- *
83
- * @param accessToken Access token to use for authentication.
84
- * @param dlbUrl The `url` should be in the form `dlb://object-key` where the object-key can be any alpha-numeric string. The object-key is unique to your account API Key so there is no risk of collision with other users.
85
- * @param filePath Local file path where to download the file to.
86
- */
87
- const downloadFile = (accessToken, dlbUrl, filePath) => __awaiter(void 0, void 0, void 0, function* () {
88
- let downloadUrl = yield (0, exports.getDownloadUrl)(accessToken, dlbUrl);
89
- downloadUrl = downloadUrl.replace('https://', '');
90
- const idx = downloadUrl.indexOf('/');
91
- const requestOptions = {
92
- hostname: downloadUrl.substring(0, idx),
93
- path: downloadUrl.substring(idx + 1),
94
- headers: {},
95
- };
96
- return (0, httpHelpers_2.download)(filePath, requestOptions);
97
- });
98
- exports.downloadFile = downloadFile;
99
- //# sourceMappingURL=io.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"io.js","sourceRoot":"","sources":["../../../src/media/io.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wDAAsE;AACtE,yDAAmE;AACnE,0CAA+C;AAG/C,MAAM,MAAM,GAAG,CAAO,WAAqB,EAAE,WAAmB,EAAE,MAAc,EAA0B,EAAE;IACxG,MAAM,OAAO,GAAG;QACZ,GAAG,EAAE,MAAM;KACd,CAAC;IAEF,MAAM,cAAc,GAAuB;QACvC,QAAQ,EAAE,mBAAY;QACtB,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE;YACL,MAAM,EAAE,kBAAkB;YAC1B,cAAc,EAAE,kBAAkB;SACrC;QACD,WAAW;QACX,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC;KAC5C,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,IAAA,sBAAQ,EAAC,cAAc,CAAC,CAAC;IAChD,IAAI,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE;QAChC,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC;KAC1B;IAED,OAAO,IAAI,CAAC;AAChB,CAAC,CAAA,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACI,MAAM,YAAY,GAAG,CAAO,WAAqB,EAAE,MAAc,EAA0B,EAAE;IAChG,OAAO,MAAM,MAAM,CAAC,WAAW,EAAE,cAAc,EAAE,MAAM,CAAC,CAAC;AAC7D,CAAC,CAAA,CAAC;AAFW,QAAA,YAAY,gBAEvB;AAEF;;;;;;;;;;;;;GAaG;AACI,MAAM,cAAc,GAAG,CAAO,WAAqB,EAAE,MAAc,EAA0B,EAAE;IAClG,OAAO,MAAM,MAAM,CAAC,WAAW,EAAE,eAAe,EAAE,MAAM,CAAC,CAAC;AAC9D,CAAC,CAAA,CAAC;AAFW,QAAA,cAAc,kBAEzB;AAEF;;;;;;;;;;;;GAYG;AACI,MAAM,YAAY,GAAG,CAAO,WAAqB,EAAE,MAAc,EAAE,QAAgB,EAAiB,EAAE;IACzG,IAAI,WAAW,GAAW,MAAM,IAAA,sBAAc,EAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAEpE,WAAW,GAAG,WAAW,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IAClD,MAAM,GAAG,GAAG,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAErC,MAAM,cAAc,GAAmB;QACnC,QAAQ,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC;QACvC,IAAI,EAAE,WAAW,CAAC,SAAS,CAAC,GAAG,GAAG,CAAC,CAAC;QACpC,OAAO,EAAE,EAAE;KACd,CAAC;IAEF,OAAO,IAAA,sBAAQ,EAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;AAC9C,CAAC,CAAA,CAAC;AAbW,QAAA,YAAY,gBAavB"}
@@ -1,120 +0,0 @@
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.cancel = exports.listAll = exports.list = void 0;
13
- const httpHelpers_1 = require("./internal/httpHelpers");
14
- const urls_1 = require("./internal/urls");
15
- /**
16
- * Query Media Jobs.
17
- * List of jobs previously submitted, up to the last 31 days.
18
- *
19
- * @link https://docs.dolby.io/media-apis/reference/media-jobs-get
20
- *
21
- * @param accessToken Access token to use for authentication.
22
- * @param options Options to request the list of jobs.
23
- *
24
- * @returns A `JobsResponse` object through a `Promise`.
25
- */
26
- const list = (accessToken, options) => __awaiter(void 0, void 0, void 0, function* () {
27
- const params = {};
28
- if (options.submitted_after) {
29
- params['submitted_after'] = options.submitted_after;
30
- }
31
- if (options.submitted_before) {
32
- params['submitted_before'] = options.submitted_before;
33
- }
34
- if (options.status) {
35
- params['status'] = options.status;
36
- }
37
- if (options.next_token) {
38
- params['next_token'] = options.next_token;
39
- }
40
- const requestOptions = {
41
- hostname: urls_1.API_HOSTNAME,
42
- path: '/media/jobs',
43
- params,
44
- headers: {},
45
- accessToken,
46
- };
47
- const response = yield (0, httpHelpers_1.sendGet)(requestOptions);
48
- return response;
49
- });
50
- exports.list = list;
51
- /**
52
- * Query Media Jobs.
53
- * List of all jobs previously submitted, up to the last 31 days.
54
- *
55
- * @link https://docs.dolby.io/media-apis/reference/media-jobs-get
56
- *
57
- * @param accessToken Access token to use for authentication.
58
- * @param options Options to request the list of jobs.
59
- *
60
- * @returns An array of `Job` objects through a `Promise`.
61
- */
62
- const listAll = (accessToken, options) => __awaiter(void 0, void 0, void 0, function* () {
63
- const params = {};
64
- if (options.submitted_after) {
65
- params['submitted_after'] = options.submitted_after;
66
- }
67
- if (options.submitted_before) {
68
- params['submitted_before'] = options.submitted_before;
69
- }
70
- if (options.status) {
71
- params['status'] = options.status;
72
- }
73
- const requestOptions = {
74
- hostname: urls_1.API_HOSTNAME,
75
- path: '/media/jobs',
76
- headers: {},
77
- accessToken,
78
- };
79
- const result = [];
80
- do {
81
- requestOptions.params = params;
82
- const response = (yield (0, httpHelpers_1.sendGet)(requestOptions));
83
- for (let index = 0; index < response.jobs.length; index++) {
84
- const object = response.jobs[index];
85
- result.push(object);
86
- }
87
- if (!response.next_token || response.next_token.length <= 0) {
88
- break;
89
- }
90
- params['next_token'] = response.next_token;
91
- } while (true);
92
- return result;
93
- });
94
- exports.listAll = listAll;
95
- /**
96
- * Requests cancellation of a previously submitted job.
97
- *
98
- * @link https://docs.dolby.io/media-apis/reference/media-jobs-cancel-post
99
- *
100
- * @param accessToken Access token to use for authentication.
101
- * @param jobId Identifier of the job to cancel.
102
- */
103
- const cancel = (accessToken, jobId) => __awaiter(void 0, void 0, void 0, function* () {
104
- const params = {
105
- job_id: jobId,
106
- };
107
- const requestOptions = {
108
- hostname: urls_1.API_HOSTNAME,
109
- path: '/media/jobs/cancel',
110
- headers: {
111
- Accept: 'application/json',
112
- 'Content-Type': 'application/json',
113
- },
114
- accessToken,
115
- params: params,
116
- };
117
- yield (0, httpHelpers_1.sendPost)(requestOptions);
118
- });
119
- exports.cancel = cancel;
120
- //# sourceMappingURL=jobs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"jobs.js","sourceRoot":"","sources":["../../../src/media/jobs.ts"],"names":[],"mappings":"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"}
@@ -1,94 +0,0 @@
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 jobsHelpers_1 = require("./internal/jobsHelpers");
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-preview-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-preview-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
- return yield (0, jobsHelpers_1.startJob)(accessToken, '/media/master/preview', jobContent);
36
- });
37
- exports.startPreview = startPreview;
38
- /**
39
- * Gets Mastering Preview Results
40
- *
41
- * For a given job_id, this method will check if the mastering task has completed.
42
- * When the status is Success you'll be able to retrieve your results from the outputs locations you provided in the original POST.
43
- *
44
- * @link https://docs.dolby.io/media-apis/reference/media-music-mastering-preview-get
45
- *
46
- * @param accessToken Access token to use for authentication.
47
- * @param jobId Identifier of the job to retrieve.
48
- *
49
- * @returns The `MasteringPreviewJob` object through a `Promise`.
50
- */
51
- const getPreviewResults = (accessToken, jobId) => __awaiter(void 0, void 0, void 0, function* () {
52
- return yield (0, jobsHelpers_1.getJobResults)(accessToken, '/media/master/preview', jobId);
53
- });
54
- exports.getPreviewResults = getPreviewResults;
55
- /**
56
- * Starts mastering to improve your music.
57
- *
58
- * The `inputs` location for your source media file as well as the `outputs` location for the processed media file are required.
59
- *
60
- * 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.
61
- *
62
- * This is an asynchronous operation. You receive a `job_id` that you use to retrieve the results when the mastering is complete.
63
- *
64
- * To learn more, see the example requests and responses.
65
- *
66
- * @link https://docs.dolby.io/media-apis/reference/media-music-mastering-post
67
- *
68
- * @param accessToken Access token to use for authentication.
69
- * @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
70
- *
71
- * @returns The job identifier through a `Promise`.
72
- */
73
- const start = (accessToken, jobContent) => __awaiter(void 0, void 0, void 0, function* () {
74
- return yield (0, jobsHelpers_1.startJob)(accessToken, '/media/master', jobContent);
75
- });
76
- exports.start = start;
77
- /**
78
- * Gets Mastering Results
79
- *
80
- * For a given job_id, this method will check if the mastering task has completed.
81
- * When the status is Success you'll be able to retrieve your results from the outputs locations you provided in the original POST.
82
- *
83
- * @link https://docs.dolby.io/media-apis/reference/media-music-mastering-get
84
- *
85
- * @param accessToken Access token to use for authentication.
86
- * @param jobId Identifier of the job to retrieve.
87
- *
88
- * @returns The `MasteringJob` object through a `Promise`.
89
- */
90
- const getResults = (accessToken, jobId) => __awaiter(void 0, void 0, void 0, function* () {
91
- return yield (0, jobsHelpers_1.getJobResults)(accessToken, '/media/master', jobId);
92
- });
93
- exports.getResults = getResults;
94
- //# sourceMappingURL=mastering.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mastering.js","sourceRoot":"","sources":["../../../src/media/mastering.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wDAAiE;AAIjE;;;;;;;;;;;;;;;;;;;GAmBG;AACI,MAAM,YAAY,GAAG,CAAO,WAAqB,EAAE,UAAkB,EAA0B,EAAE;IACpG,OAAO,MAAM,IAAA,sBAAQ,EAAC,WAAW,EAAE,uBAAuB,EAAE,UAAU,CAAC,CAAC;AAC5E,CAAC,CAAA,CAAC;AAFW,QAAA,YAAY,gBAEvB;AAEF;;;;;;;;;;;;GAYG;AACI,MAAM,iBAAiB,GAAG,CAAO,WAAqB,EAAE,KAAa,EAAgC,EAAE;IAC1G,OAAO,MAAM,IAAA,2BAAa,EAAsB,WAAW,EAAE,uBAAuB,EAAE,KAAK,CAAC,CAAC;AACjG,CAAC,CAAA,CAAC;AAFW,QAAA,iBAAiB,qBAE5B;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACI,MAAM,KAAK,GAAG,CAAO,WAAqB,EAAE,UAAkB,EAA0B,EAAE;IAC7F,OAAO,MAAM,IAAA,sBAAQ,EAAC,WAAW,EAAE,eAAe,EAAE,UAAU,CAAC,CAAC;AACpE,CAAC,CAAA,CAAC;AAFW,QAAA,KAAK,SAEhB;AAEF;;;;;;;;;;;;GAYG;AACI,MAAM,UAAU,GAAG,CAAO,WAAqB,EAAE,KAAa,EAAyB,EAAE;IAC5F,OAAO,MAAM,IAAA,2BAAa,EAAe,WAAW,EAAE,eAAe,EAAE,KAAK,CAAC,CAAC;AAClF,CAAC,CAAA,CAAC;AAFW,QAAA,UAAU,cAErB"}
@@ -1,48 +0,0 @@
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 jobsHelpers_1 = require("./internal/jobsHelpers");
14
- /**
15
- * Starts Transcoding.
16
- *
17
- * Start transcoding to modify the size, bitrates, and formats for your media.
18
- *
19
- * @link https://docs.dolby.io/media-apis/reference/media-transcode-post
20
- *
21
- * @param accessToken Access token to use for authentication.
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
- *
24
- * @returns The job identifier through a `Promise`.
25
- */
26
- const start = (accessToken, jobContent) => __awaiter(void 0, void 0, void 0, function* () {
27
- return yield (0, jobsHelpers_1.startJob)(accessToken, '/media/transcode', jobContent);
28
- });
29
- exports.start = start;
30
- /**
31
- * Gets Transcode Results.
32
- *
33
- * For a given job_id, this method will check if the processing task has completed and return the transcode results.
34
- *
35
- * When the status is Success you'll be able to retrieve your result from the output location you provided in the original POST.
36
- *
37
- * @link https://docs.dolby.io/media-apis/reference/media-transcode-get
38
- *
39
- * @param accessToken Access token to use for authentication.
40
- * @param jobId Identifier of the job to retrieve.
41
- *
42
- * @returns The `TranscodeJob` object through a `Promise`.
43
- */
44
- const getResults = (accessToken, jobId) => __awaiter(void 0, void 0, void 0, function* () {
45
- return yield (0, jobsHelpers_1.getJobResults)(accessToken, '/media/transcode', jobId);
46
- });
47
- exports.getResults = getResults;
48
- //# sourceMappingURL=transcode.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transcode.js","sourceRoot":"","sources":["../../../src/media/transcode.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wDAAiE;AAIjE;;;;;;;;;;;GAWG;AACI,MAAM,KAAK,GAAG,CAAO,WAAqB,EAAE,UAAkB,EAA0B,EAAE;IAC7F,OAAO,MAAM,IAAA,sBAAQ,EAAC,WAAW,EAAE,kBAAkB,EAAE,UAAU,CAAC,CAAC;AACvE,CAAC,CAAA,CAAC;AAFW,QAAA,KAAK,SAEhB;AAEF;;;;;;;;;;;;;GAaG;AACI,MAAM,UAAU,GAAG,CAAO,WAAqB,EAAE,KAAa,EAAyB,EAAE;IAC5F,OAAO,MAAM,IAAA,2BAAa,EAAe,WAAW,EAAE,kBAAkB,EAAE,KAAK,CAAC,CAAC;AACrF,CAAC,CAAA,CAAC;AAFW,QAAA,UAAU,cAErB"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=analyze.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"analyze.js","sourceRoot":"","sources":["../../../../src/media/types/analyze.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=analyzeSpeech.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"analyzeSpeech.js","sourceRoot":"","sources":["../../../../src/media/types/analyzeSpeech.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=diagnose.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"diagnose.js","sourceRoot":"","sources":["../../../../src/media/types/diagnose.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=enhance.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"enhance.js","sourceRoot":"","sources":["../../../../src/media/types/enhance.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=jobResults.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"jobResults.js","sourceRoot":"","sources":["../../../../src/media/types/jobResults.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=jobs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"jobs.js","sourceRoot":"","sources":["../../../../src/media/types/jobs.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=mastering.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mastering.js","sourceRoot":"","sources":["../../../../src/media/types/mastering.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=transcode.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transcode.js","sourceRoot":"","sources":["../../../../src/media/types/transcode.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=webhooks.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../../../../src/media/types/webhooks.ts"],"names":[],"mappings":""}
@@ -1,136 +0,0 @@
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.deleteWebhook = exports.retrieveWebhook = exports.updateWebhook = exports.registerWebhook = void 0;
13
- const httpHelpers_1 = require("./internal/httpHelpers");
14
- const urls_1 = require("./internal/urls");
15
- /**
16
- * Registers a webhook that is triggered when a job completes.
17
- *
18
- * @link https://docs.dolby.io/media-apis/reference/media-webhook-post
19
- *
20
- * @param accessToken Access token to use for authentication.
21
- * @param url The callback url that will be called when job execution completes.
22
- * @param headers (Optional) Headers to include in the webhook call.
23
- *
24
- * @returns The webhook identifier through a `Promise`.
25
- */
26
- const registerWebhook = (accessToken, url, headers) => __awaiter(void 0, void 0, void 0, function* () {
27
- const payload = {
28
- callback: {
29
- url: url,
30
- },
31
- };
32
- if (headers) {
33
- payload.callback['headers'] = headers;
34
- }
35
- const requestOptions = {
36
- hostname: urls_1.API_HOSTNAME,
37
- path: '/media/webhooks',
38
- headers: {
39
- Accept: 'application/json',
40
- 'Content-Type': 'application/json',
41
- },
42
- accessToken,
43
- body: JSON.stringify(payload, null, ' '),
44
- };
45
- const response = yield (0, httpHelpers_1.sendPost)(requestOptions);
46
- if (response.hasOwnProperty('webhook_id')) {
47
- return response['webhook_id'];
48
- }
49
- return null;
50
- });
51
- exports.registerWebhook = registerWebhook;
52
- /**
53
- * Updates the previously registered webhook configuration.
54
- *
55
- * @link https://docs.dolby.io/media-apis/reference/media-webhook-put
56
- *
57
- * @param accessToken Access token to use for authentication.
58
- * @param options Options to update the webhook.
59
- */
60
- const updateWebhook = (accessToken, options) => __awaiter(void 0, void 0, void 0, function* () {
61
- const payload = {
62
- callback: {
63
- url: options.url,
64
- },
65
- };
66
- if (options.headers) {
67
- payload.callback['headers'] = options.headers;
68
- }
69
- const requestOptions = {
70
- hostname: urls_1.API_HOSTNAME,
71
- path: '/media/webhooks',
72
- params: {
73
- id: options.webhookId,
74
- },
75
- headers: {
76
- Accept: 'application/json',
77
- 'Content-Type': 'application/json',
78
- },
79
- accessToken,
80
- body: JSON.stringify(payload, null, ' '),
81
- };
82
- yield (0, httpHelpers_1.sendPut)(requestOptions);
83
- });
84
- exports.updateWebhook = updateWebhook;
85
- /**
86
- * Retrieves the previously registered webhook configuration.
87
- *
88
- * @link https://docs.dolby.io/media-apis/reference/media-webhook-get
89
- *
90
- * @param accessToken Access token to use for authentication.
91
- * @param webhookId Identifier of the webhook to retrieve.
92
- *
93
- * @returns The `Webhook` object through a `Promise`.
94
- */
95
- const retrieveWebhook = (accessToken, webhookId) => __awaiter(void 0, void 0, void 0, function* () {
96
- const requestOptions = {
97
- hostname: urls_1.API_HOSTNAME,
98
- path: '/media/webhooks',
99
- params: {
100
- id: webhookId,
101
- },
102
- headers: {},
103
- accessToken,
104
- };
105
- const response = yield (0, httpHelpers_1.sendGet)(requestOptions);
106
- return response;
107
- });
108
- exports.retrieveWebhook = retrieveWebhook;
109
- /**
110
- * Deletes a previously registered webhook configuration.
111
- *
112
- * @link https://docs.dolby.io/media-apis/reference/media-webhook-delete
113
- *
114
- * @param accessToken Access token to use for authentication.
115
- * @param webhookId Identifier of the webhook to delete.
116
- *
117
- * @returns The webhook identifier through a `Promise`.
118
- */
119
- const deleteWebhook = (accessToken, webhookId) => __awaiter(void 0, void 0, void 0, function* () {
120
- const requestOptions = {
121
- hostname: urls_1.API_HOSTNAME,
122
- path: '/media/webhooks',
123
- params: {
124
- id: webhookId,
125
- },
126
- headers: {},
127
- accessToken,
128
- };
129
- const response = yield (0, httpHelpers_1.sendDelete)(requestOptions);
130
- if (response.hasOwnProperty('webhook_id')) {
131
- return response['webhook_id'];
132
- }
133
- return null;
134
- });
135
- exports.deleteWebhook = deleteWebhook;
136
- //# sourceMappingURL=webhooks.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../../../src/media/webhooks.ts"],"names":[],"mappings":"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"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=jwtToken.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"jwtToken.js","sourceRoot":"","sources":["../../../src/types/jwtToken.ts"],"names":[],"mappings":""}