@dolbyio/dolbyio-rest-apis-client 4.1.0 → 5.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +38 -72
  3. package/dist/index.d.ts +2 -8
  4. package/dist/index.js +13 -32
  5. package/dist/internal/httpHelpers.js +14 -20
  6. package/dist/media/analyze.d.ts +1 -6
  7. package/dist/media/analyze.js +3 -8
  8. package/dist/media/analyzeMusic.d.ts +1 -6
  9. package/dist/media/analyzeMusic.js +3 -8
  10. package/dist/media/analyzeSpeech.d.ts +1 -6
  11. package/dist/media/analyzeSpeech.js +3 -8
  12. package/dist/media/authentication.d.ts +15 -0
  13. package/dist/media/authentication.js +65 -0
  14. package/dist/media/diagnose.d.ts +1 -6
  15. package/dist/media/diagnose.js +3 -8
  16. package/dist/media/enhance.d.ts +1 -1
  17. package/dist/media/enhance.js +3 -3
  18. package/dist/media/index.d.ts +1 -0
  19. package/dist/media/index.js +5 -2
  20. package/dist/media/internal/httpHelpers.d.ts +1 -1
  21. package/dist/media/internal/httpHelpers.js +1 -1
  22. package/dist/media/internal/jobsHelpers.d.ts +1 -1
  23. package/dist/media/internal/jobsHelpers.js +4 -4
  24. package/dist/media/io.d.ts +1 -1
  25. package/dist/media/io.js +4 -4
  26. package/dist/media/jobs.d.ts +1 -1
  27. package/dist/media/jobs.js +4 -4
  28. package/dist/media/mastering.d.ts +1 -1
  29. package/dist/media/mastering.js +3 -3
  30. package/dist/media/transcode.d.ts +1 -1
  31. package/dist/media/transcode.js +3 -3
  32. package/dist/media/types/analyzeMusic.d.ts +43 -50
  33. package/dist/media/types/diagnose.d.ts +66 -79
  34. package/dist/media/types/index.d.ts +1 -0
  35. package/dist/media/types/index.js +11 -0
  36. package/dist/media/types/jobs.d.ts +2 -0
  37. package/dist/media/types/webhooks.d.ts +6 -7
  38. package/dist/media/webhooks.d.ts +1 -1
  39. package/dist/media/webhooks.js +4 -4
  40. package/dist/streaming/account.d.ts +27 -3
  41. package/dist/streaming/account.js +98 -7
  42. package/dist/streaming/cluster.js +4 -4
  43. package/dist/streaming/director.js +4 -4
  44. package/dist/streaming/index.d.ts +11 -3
  45. package/dist/streaming/index.js +12 -6
  46. package/dist/streaming/internal/httpHelpers.js +4 -4
  47. package/dist/streaming/publishToken.js +5 -5
  48. package/dist/streaming/recordFiles.d.ts +55 -0
  49. package/dist/streaming/recordFiles.js +214 -0
  50. package/dist/streaming/stream.d.ts +8 -3
  51. package/dist/streaming/stream.js +18 -10
  52. package/dist/streaming/subscribeToken.js +14 -14
  53. package/dist/streaming/transcoders.d.ts +143 -0
  54. package/dist/streaming/transcoders.js +481 -0
  55. package/dist/streaming/types/account.d.ts +11 -2
  56. package/dist/streaming/types/cluster.d.ts +14 -5
  57. package/dist/streaming/types/core.d.ts +1 -0
  58. package/dist/streaming/types/director.d.ts +9 -11
  59. package/dist/streaming/types/index.d.ts +4 -1
  60. package/dist/streaming/types/index.js +41 -8
  61. package/dist/streaming/types/publishToken.d.ts +93 -35
  62. package/dist/streaming/types/recordFiles.d.ts +49 -0
  63. package/dist/streaming/types/stream.d.ts +3 -0
  64. package/dist/streaming/types/subscribeToken.d.ts +37 -42
  65. package/dist/streaming/types/transcoders.d.ts +136 -0
  66. package/dist/streaming/types/webhooks.d.ts +69 -0
  67. package/dist/streaming/webhooks.d.ts +57 -0
  68. package/dist/streaming/webhooks.js +224 -0
  69. package/dist/urls.d.ts +0 -2
  70. package/dist/urls.js +1 -5
  71. package/package.json +13 -12
  72. package/dist/authentication.d.ts +0 -29
  73. package/dist/authentication.js +0 -82
  74. package/dist/communications/authentication.d.ts +0 -14
  75. package/dist/communications/authentication.js +0 -62
  76. package/dist/communications/conference.d.ts +0 -95
  77. package/dist/communications/conference.js +0 -404
  78. package/dist/communications/index.d.ts +0 -6
  79. package/dist/communications/index.js +0 -38
  80. package/dist/communications/internal/httpHelpers.d.ts +0 -10
  81. package/dist/communications/internal/httpHelpers.js +0 -67
  82. package/dist/communications/monitor/conferences.d.ts +0 -91
  83. package/dist/communications/monitor/conferences.js +0 -389
  84. package/dist/communications/monitor/index.d.ts +0 -4
  85. package/dist/communications/monitor/index.js +0 -15
  86. package/dist/communications/monitor/recordings.d.ts +0 -77
  87. package/dist/communications/monitor/recordings.js +0 -287
  88. package/dist/communications/monitor/webhooks.d.ts +0 -24
  89. package/dist/communications/monitor/webhooks.js +0 -136
  90. package/dist/communications/recording.d.ts +0 -44
  91. package/dist/communications/recording.js +0 -117
  92. package/dist/communications/remix.js +0 -122
  93. package/dist/communications/streaming.d.ts +0 -76
  94. package/dist/communications/streaming.js +0 -217
  95. package/dist/communications/types/authentication.d.ts +0 -25
  96. package/dist/communications/types/conference.d.ts +0 -76
  97. package/dist/communications/types/conferences.d.ts +0 -140
  98. package/dist/communications/types/core.d.ts +0 -30
  99. package/dist/communications/types/core.js +0 -5
  100. package/dist/communications/types/index.d.ts +0 -13
  101. package/dist/communications/types/index.js +0 -131
  102. package/dist/communications/types/mixOptions.d.ts +0 -39
  103. package/dist/communications/types/mixOptions.js +0 -5
  104. package/dist/communications/types/participant.d.ts +0 -6
  105. package/dist/communications/types/participant.js +0 -1
  106. package/dist/communications/types/permission.d.ts +0 -26
  107. package/dist/communications/types/permission.js +0 -21
  108. package/dist/communications/types/recordings.d.ts +0 -85
  109. package/dist/communications/types/recordings.js +0 -5
  110. package/dist/communications/types/remixStatus.d.ts +0 -16
  111. package/dist/communications/types/remixStatus.js +0 -1
  112. package/dist/communications/types/rtcpMode.d.ts +0 -8
  113. package/dist/communications/types/rtcpMode.js +0 -12
  114. package/dist/communications/types/rtsStream.d.ts +0 -10
  115. package/dist/communications/types/rtsStream.js +0 -1
  116. package/dist/communications/types/spatialAudio.d.ts +0 -18
  117. package/dist/communications/types/spatialAudio.js +0 -5
  118. package/dist/communications/types/videoCodec.d.ts +0 -4
  119. package/dist/communications/types/videoCodec.js +0 -11
  120. package/dist/communications/types/webhooks.d.ts +0 -38
  121. package/dist/internal/utils.d.ts +0 -6
  122. package/dist/internal/utils.js +0 -5
  123. package/dist/streaming/geo.d.ts +0 -24
  124. package/dist/streaming/geo.js +0 -103
  125. package/dist/streaming/types/geo.d.ts +0 -9
  126. package/dist/streaming/types/geo.js +0 -5
  127. /package/dist/{types → media/types}/jwtToken.d.ts +0 -0
  128. /package/dist/{types → media/types}/jwtToken.js +0 -0
  129. /package/dist/{communications/types/authentication.js → streaming/types/recordFiles.js} +0 -0
  130. /package/dist/{communications/types/conference.js → streaming/types/stream.js} +0 -0
  131. /package/dist/{communications/types/conferences.js → streaming/types/transcoders.js} +0 -0
  132. /package/dist/{communications → streaming}/types/webhooks.js +0 -0
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023 Dolby Laboratories
3
+ Copyright (c) 2024 Dolby Laboratories
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -3,25 +3,29 @@
3
3
  [![Publish Package](https://github.com/DolbyIO/dolbyio-rest-apis-client-node/actions/workflows/publish-package.yml/badge.svg)](https://github.com/DolbyIO/dolbyio-rest-apis-client-node/actions/workflows/publish-package.yml)
4
4
  [![npm](https://img.shields.io/npm/v/@dolbyio/dolbyio-rest-apis-client)](https://www.npmjs.com/package/@dolbyio/dolbyio-rest-apis-client)
5
5
  [![License](https://img.shields.io/github/license/DolbyIO/dolbyio-rest-apis-client-node)](LICENSE)
6
+ [![GitHub](https://img.shields.io/badge/GitHub-_?logo=GitHub&labelColor=black&color=blue)](https://github.com/DolbyIO/dolbyio-rest-apis-client-node)
7
+ [![Documentation](https://img.shields.io/badge/Documentation-_?logo=readthedocs&labelColor=black&color=blue)](https://api-references.dolby.io/dolbyio-rest-apis-client-node/)
6
8
 
7
- Dolby.io REST APIs Client for Node.JS is wrapper for the dolby.io [Real-time Streaming](https://docs.dolby.io/streaming-apis/reference), [Media](https://docs.dolby.io/media-processing/reference/media-enhance-overview) and [Communications](https://docs.dolby.io/communications-apis/reference/authentication-api) REST APIs.
9
+ Dolby.io REST APIs Client for Node.JS is wrapper for the [Dolby Millicast](https://docs.dolby.io/streaming-apis/reference) and [Dolby.io Media](https://docs.dolby.io/media-processing/reference/media-enhance-overview) REST APIs.
8
10
 
9
11
  # Install this project
10
12
 
11
13
  Run the npm command to install the package `@dolbyio/dolbyio-rest-apis-client` into your Node project:
12
14
 
13
15
  ```bash
14
- npm install @dolbyio/dolbyio-rest-apis-client --save
16
+ npm install @dolbyio/dolbyio-rest-apis-client
15
17
  ```
16
18
 
17
- # Real-time Streaming Examples
19
+ # Dolby Millicast Examples
18
20
 
19
21
  ## Create a publish token
20
22
 
21
- ```javascript
22
- const dolbyio = require('@dolbyio/dolbyio-rest-apis-client');
23
+ ```ts
24
+ import { streaming } from '@dolbyio/dolbyio-rest-apis-client';
25
+
26
+ const API_KEY = process.env.DOLBYIO_API_SECRET;
23
27
 
24
- const publishToken = await dolbyio.streaming.publishToken.create('api_secret', {
28
+ const publishToken = await streaming.publishToken.create(API_KEY, {
25
29
  label: 'My token',
26
30
  streams: [
27
31
  {
@@ -34,10 +38,12 @@ console.log(publishToken);
34
38
 
35
39
  ## Create a subscribe token
36
40
 
37
- ```javascript
38
- const dolbyio = require('@dolbyio/dolbyio-rest-apis-client');
41
+ ```ts
42
+ import { streaming } from '@dolbyio/dolbyio-rest-apis-client';
39
43
 
40
- const subscribeToken = await dolbyio.streaming.subscribeToken.create('api_secret', {
44
+ const API_KEY = process.env.DOLBYIO_API_SECRET;
45
+
46
+ const subscribeToken = await streaming.subscribeToken.create(API_KEY, {
41
47
  label: 'My token',
42
48
  streams: [
43
49
  {
@@ -56,14 +62,14 @@ Here is an example on how to upload a file to the Dolby.io temporary cloud stora
56
62
 
57
63
  Get the App Key and Secret from the Dolby.io dashboard and use the following code in your python script.
58
64
 
59
- ```javascript
60
- const dolbyio = require('@dolbyio/dolbyio-rest-apis-client');
65
+ ```ts
66
+ import { media } from '@dolbyio/dolbyio-rest-apis-client';
61
67
 
62
- const APP_KEY = 'YOUR_APP_KEY';
63
- const APP_SECRET = 'YOUR_APP_SECRET';
68
+ const APP_KEY = process.env.DOLBYIO_APP_KEY;
69
+ const APP_SECRET = process.env.DOLBYIO_APP_SECRET;
64
70
 
65
71
  // Request an Access Token
66
- const jwt = await dolbyio.authentication.getApiAccessToken(APP_KEY, APP_SECRET);
72
+ const jwt = await media.authentication.getApiAccessToken(APP_KEY, APP_SECRET);
67
73
  console.log('Access token', jwt);
68
74
  ```
69
75
 
@@ -71,20 +77,20 @@ console.log('Access token', jwt);
71
77
 
72
78
  Upload a media file to the Dolby.io temporary cloud storage for processing:
73
79
 
74
- ```javascript
80
+ ```ts
75
81
  // Temporary storage URL that will be used as reference for the job processing
76
82
  const inputUrl = 'dlb://in/file.mp4';
77
83
  // Local path of the file to upload
78
84
  const originalFilePath = '/path/to/original_file.mp4';
79
85
 
80
- await dolbyio.media.io.uploadFile(jwt, inputUrl, originalFilePath);
86
+ await media.io.uploadFile(jwt, inputUrl, originalFilePath);
81
87
  ```
82
88
 
83
89
  ## Start an enhance job
84
90
 
85
91
  Generate a job description and send it to Dolby.io.
86
92
 
87
- ```javascript
93
+ ```ts
88
94
  // Temporary storage URL that will be used as reference for the job processing
89
95
  const outputUrl = 'dlb://out/file.mp4';
90
96
 
@@ -94,7 +100,7 @@ const jobDescription = JSON.stringify({
94
100
  output: outputUrl,
95
101
  });
96
102
 
97
- const jobId = await dolbyio.media.enhance.start(jwt, jobDescription);
103
+ const jobId = await media.enhance.start(jwt, jobDescription);
98
104
  console.log(`Job ID: ${jobId}`);
99
105
  ```
100
106
 
@@ -105,12 +111,12 @@ Get the job status and wait until it is completed.
105
111
  ```javascript
106
112
  const sleep = (delay) => new Promise((r) => setTimeout(r, delay));
107
113
 
108
- let result = await dolbyio.media.enhance.getResults(jwt, jobId);
114
+ let result = await media.enhance.getResults(jwt, jobId);
109
115
  while (result.status === 'Pending' || result.status === 'Running') {
110
116
  console.log(`Job status is ${result.status}, taking a 5 second break...`);
111
117
  await sleep(5000);
112
118
 
113
- result = await dolbyio.media.enhance.getResults(jwt, jobId);
119
+ result = await media.enhance.getResults(jwt, jobId);
114
120
  }
115
121
 
116
122
  if (result.status !== 'Success') {
@@ -127,64 +133,19 @@ At this stage, the file has been processed and written to the temporary storage
127
133
  // Local path where to download the file to
128
134
  const enhancedFilePath = '/path/to/enhanced_file.mp4';
129
135
 
130
- await dolbyio.media.io.downloadFile(jwt, outputUrl, enhancedFilePath);
136
+ await media.io.downloadFile(jwt, outputUrl, enhancedFilePath);
131
137
  ```
132
138
 
133
- # Communications Examples
134
-
135
- ## Authenticate
136
-
137
- To get an access token that will be used by the client SDK for an end user to open a session against dolby.io, use the following code:
139
+ # Logs
138
140
 
139
- ```javascript
140
- const dolbyio = require('@dolbyio/dolbyio-rest-apis-client');
141
-
142
- const APP_KEY = 'YOUR_APP_KEY';
143
- const APP_SECRET = 'YOUR_APP_SECRET';
141
+ You can also print the logs in the console and select the log level by using the following code.
144
142
 
145
- // Request an API Token
146
- const api_token = await dolbyio.authentication.getApiAccessToken(APP_KEY, APP_SECRET, 3600, ['comms:client_access_token:create']);
143
+ ```ts
144
+ import { Logger } from '@dolbyio/dolbyio-rest-apis-client';
147
145
 
148
- // Request the Client Access Token
149
- const cat = await dolbyio.communications.authentication.getClientAccessTokenV2({
150
- accessToken: api_token,
151
- sessionScope: ['*'],
146
+ Logger.useDefaults({
147
+ defaultLevel: Logger.TRACE,
152
148
  });
153
-
154
- console.log(`Client Access Token: ${cat.access_token}`);
155
- ```
156
-
157
- ## Create a conference
158
-
159
- To create a Dolby Voice conference, you first must retrieve an API Access Token, then use the following code to create the conference.
160
-
161
- ```javascript
162
- const dolbyio = require('@dolbyio/dolbyio-rest-apis-client');
163
-
164
- const APP_KEY = 'YOUR_APP_KEY';
165
- const APP_SECRET = 'YOUR_APP_SECRET';
166
-
167
- const ownerExternalId = ''; // Identifier of the owner of the conference
168
- const alias = ''; // Conference alias
169
-
170
- const options = {
171
- ownerExternalId: ownerExternalId,
172
- alias: alias,
173
- dolbyVoice: true,
174
- liveRecording: false,
175
- participants: [
176
- { externalId: 'hostA', permissions: ['JOIN', 'SEND_AUDIO', 'SEND_VIDEO'], notify: true },
177
- { externalId: 'listener1', permissions: ['JOIN'], notify: false },
178
- ],
179
- };
180
-
181
- // Request an API Token
182
- const jwt = await dolbyio.authentication.getApiAccessToken(APP_KEY, APP_SECRET, 3600, ['comms:conf:create']);
183
-
184
- // Create the conference
185
- const conference = await dolbyio.communications.conference.createConference(jwt, options);
186
-
187
- console.log(`Conference created: ${conference.conferenceId}`);
188
149
  ```
189
150
 
190
151
  # How to
@@ -200,3 +161,8 @@ The documentation is built on [TypeDoc](https://typedoc.org), to generate the do
200
161
  ```bash
201
162
  npm run docs
202
163
  ```
164
+
165
+ ## Related Projects
166
+
167
+ - [TypeDoc](https://typedoc.org)
168
+ - [js-logger](https://github.com/jonnyreeves/js-logger)
package/dist/index.d.ts CHANGED
@@ -1,22 +1,16 @@
1
- export * as authentication from './authentication';
2
- export * from './types/jwtToken';
3
- /**
4
- * Communications APIs.
5
- * @link https://docs.dolby.io/communications-apis/reference
6
- */
7
- export * as communications from './communications';
8
1
  /**
9
2
  * Media APIs.
10
3
  * @link https://docs.dolby.io/media-apis/reference
11
4
  */
12
5
  export * as media from './media';
13
6
  /**
14
- * Real-time Streaming APIs.
7
+ * Dolby Millicast APIs.
15
8
  * @link https://docs.dolby.io/streaming-apis/reference
16
9
  */
17
10
  export * as streaming from './streaming';
18
11
  /** @ignore */
19
12
  export * as urls from './urls';
13
+ export { default as Logger } from 'js-logger';
20
14
  /** Gets the version of this library. */
21
15
  declare const version: string;
22
16
  export { version };
package/dist/index.js CHANGED
@@ -4,55 +4,36 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- var _exportNames = {
8
- version: true,
9
- authentication: true,
10
- communications: true,
11
- media: true,
12
- streaming: true,
13
- urls: true
14
- };
15
- exports.version = exports.urls = exports.streaming = exports.media = exports.communications = exports.authentication = void 0;
16
- var _authentication = _interopRequireWildcard(require("./authentication"));
17
- exports.authentication = _authentication;
18
- var _jwtToken = require("./types/jwtToken");
19
- Object.keys(_jwtToken).forEach(function (key) {
20
- if (key === "default" || key === "__esModule") return;
21
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
22
- if (key in exports && exports[key] === _jwtToken[key]) return;
23
- Object.defineProperty(exports, key, {
24
- enumerable: true,
25
- get: function get() {
26
- return _jwtToken[key];
27
- }
28
- });
7
+ Object.defineProperty(exports, "Logger", {
8
+ enumerable: true,
9
+ get: function get() {
10
+ return _jsLogger["default"];
11
+ }
29
12
  });
30
- var _communications = _interopRequireWildcard(require("./communications"));
31
- exports.communications = _communications;
13
+ exports.version = exports.urls = exports.streaming = exports.media = void 0;
32
14
  var _media = _interopRequireWildcard(require("./media"));
33
15
  exports.media = _media;
34
16
  var _streaming = _interopRequireWildcard(require("./streaming"));
35
17
  exports.streaming = _streaming;
36
18
  var _urls = _interopRequireWildcard(require("./urls"));
37
19
  exports.urls = _urls;
20
+ var _jsLogger = _interopRequireDefault(require("js-logger"));
21
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
38
22
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
39
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
40
- /**
41
- * Communications APIs.
42
- * @link https://docs.dolby.io/communications-apis/reference
43
- */
44
-
23
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
45
24
  /**
46
25
  * Media APIs.
47
26
  * @link https://docs.dolby.io/media-apis/reference
48
27
  */
49
28
 
50
29
  /**
51
- * Real-time Streaming APIs.
30
+ * Dolby Millicast APIs.
52
31
  * @link https://docs.dolby.io/streaming-apis/reference
53
32
  */
54
33
 
55
34
  /** @ignore */
56
35
 
36
+ // Expose the logger to control when/where to log
37
+
57
38
  /** Gets the version of this library. */
58
- var version = exports.version = "4.1.0";
39
+ var version = exports.version = "5.0.1";
@@ -7,17 +7,18 @@ exports.upload = exports.sendPut = exports.sendPost = exports.sendPatch = export
7
7
  var _fs = _interopRequireDefault(require("fs"));
8
8
  var _followRedirects = require("follow-redirects");
9
9
  var _https = _interopRequireDefault(require("https"));
10
+ var _jsLogger = _interopRequireDefault(require("js-logger"));
10
11
  var _url = require("url");
11
12
  var _index = require("../index");
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
13
14
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
14
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
15
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
16
- function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
15
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
16
+ function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
17
+ function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
17
18
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
18
19
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
19
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
20
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
20
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
21
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
21
22
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
22
23
  /**
23
24
  * Sends a POST request.
@@ -44,7 +45,7 @@ var sendRequest = function sendRequest(options) {
44
45
  // Override the User Agent
45
46
  opts.headers['User-Agent'] = "DolbyIoRestApiSdk/".concat(_index.version, "; Node/").concat(process.versions.node);
46
47
  var req = _followRedirects.https.request(opts, function (res) {
47
- console.log("[".concat(opts.method, "] ").concat(res.statusCode, " - https://").concat(opts.hostname).concat(opts.path));
48
+ _jsLogger["default"].info("[".concat(opts.method, "] ").concat(res.statusCode, " - https://").concat(opts.hostname).concat(opts.path));
48
49
  var data = '';
49
50
  res.on('data', function (chunk) {
50
51
  data = data + chunk.toString();
@@ -67,7 +68,7 @@ var sendRequest = function sendRequest(options) {
67
68
  });
68
69
  });
69
70
  req.on('error', function (error) {
70
- console.error(error);
71
+ _jsLogger["default"].error(error);
71
72
  reject(error);
72
73
  });
73
74
  if (options.body && options.body.length > 0) {
@@ -99,12 +100,6 @@ var sendGet = exports.sendGet = function sendGet(options) {
99
100
  * @returns A JSON payload object through a {@link Promise}.
100
101
  */
101
102
  var sendPost = exports.sendPost = function sendPost(options) {
102
- if (!options.body) {
103
- // The REST APIs don't support an empty payload
104
- options.body = '{}';
105
- options.headers['Content-Type'] = 'application/json';
106
- }
107
- options.headers['Content-Length'] = options.body.length;
108
103
  var sendRequestOptions = _objectSpread({
109
104
  method: 'POST'
110
105
  }, options);
@@ -119,7 +114,6 @@ var sendPost = exports.sendPost = function sendPost(options) {
119
114
  * @returns A JSON payload object through a {@link Promise}.
120
115
  */
121
116
  var sendPut = exports.sendPut = function sendPut(options) {
122
- options.headers['Content-Length'] = options.body.length;
123
117
  var sendRequestOptions = _objectSpread({
124
118
  method: 'PUT'
125
119
  }, options);
@@ -215,7 +209,7 @@ var download = exports.download = function download(filepath, options) {
215
209
  // Override the User Agent
216
210
  opts.headers['User-Agent'] = "DolbyIoRestApiSdk/".concat(_index.version, "; Node/").concat(process.versions.node);
217
211
  var req = _followRedirects.https.request(opts, function (res) {
218
- console.log("[".concat(opts.method, "] ").concat(res.statusCode, " - https://").concat(opts.hostname).concat(opts.path));
212
+ _jsLogger["default"].info("[".concat(opts.method, "] ").concat(res.statusCode, " - https://").concat(opts.hostname).concat(opts.path));
219
213
  if (res.statusCode < 200 || res.statusCode >= 400) {
220
214
  reject('This request has been rejected with the response code ' + res.statusCode);
221
215
  return;
@@ -227,13 +221,13 @@ var download = exports.download = function download(filepath, options) {
227
221
  resolve();
228
222
  });
229
223
  fileStream.on('error', function (error) {
230
- console.error(error);
224
+ _jsLogger["default"].error(error);
231
225
  reject(error);
232
226
  });
233
227
  res.pipe(fileStream);
234
228
  });
235
229
  req.on('error', function (error) {
236
- console.error(error);
230
+ _jsLogger["default"].error(error);
237
231
  reject(error);
238
232
  });
239
233
  if (options.body && options.body.length > 0) {
@@ -260,7 +254,7 @@ var upload = exports.upload = function upload(filepath, uploadUrl) {
260
254
  }
261
255
  };
262
256
  var req = _https["default"].request(uploadUrl, opts, function (res) {
263
- console.log("[".concat(opts.method, "] ").concat(res.statusCode, " - ").concat(uploadUrl));
257
+ _jsLogger["default"].info("[".concat(opts.method, "] ").concat(res.statusCode, " - ").concat(uploadUrl));
264
258
  if (res.statusCode < 200 || res.statusCode >= 400) {
265
259
  reject('This request has been rejected with the response code ' + res.statusCode);
266
260
  } else {
@@ -268,7 +262,7 @@ var upload = exports.upload = function upload(filepath, uploadUrl) {
268
262
  }
269
263
  });
270
264
  req.on('error', function (error) {
271
- console.error(error);
265
+ _jsLogger["default"].error(error);
272
266
  reject(error);
273
267
  });
274
268
 
@@ -1,4 +1,4 @@
1
- import { JwtToken } from '../types/jwtToken';
1
+ import { JwtToken } from './types/jwtToken';
2
2
  import { AnalyzeJob } from './types/analyze';
3
3
  /**
4
4
  * Starts analyzing to learn about your media.
@@ -11,11 +11,6 @@ import { AnalyzeJob } from './types/analyze';
11
11
  *
12
12
  * @link https://docs.dolby.io/media-apis/reference/media-analyze-post
13
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
14
  * Content Length
20
15
  *
21
16
  * Media content with duration less than 2 seconds will not be processed. The API will return an ERROR in this case.
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.start = exports.getResults = void 0;
8
8
  var _jobsHelpers = require("./internal/jobsHelpers");
9
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
10
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
11
- function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
9
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
10
+ function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
11
+ function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
12
12
  /**
13
13
  * Starts analyzing to learn about your media.
14
14
  *
@@ -20,11 +20,6 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
20
20
  *
21
21
  * @link https://docs.dolby.io/media-apis/reference/media-analyze-post
22
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
23
  * Content Length
29
24
  *
30
25
  * Media content with duration less than 2 seconds will not be processed. The API will return an ERROR in this case.
@@ -1,4 +1,4 @@
1
- import { JwtToken } from '../types/jwtToken';
1
+ import { JwtToken } from './types/jwtToken';
2
2
  import { AnalyzeMusicJob } from './types/analyzeMusic';
3
3
  /**
4
4
  * Start analyzing to learn about music in your media.
@@ -9,11 +9,6 @@ import { AnalyzeMusicJob } from './types/analyzeMusic';
9
9
  *
10
10
  * @link https://docs.dolby.io/media-apis/reference/media-analyze-music-post
11
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
12
  * @param accessToken Access token to use for authentication.
18
13
  * @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-music-post
19
14
  *