@dolbyio/dolbyio-rest-apis-client 4.0.2 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +60 -118
  3. package/dist/index.d.ts +15 -6
  4. package/dist/index.js +33 -14
  5. package/dist/internal/httpHelpers.js +15 -21
  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 +12 -11
  19. package/dist/media/index.js +50 -23
  20. package/dist/media/internal/httpHelpers.d.ts +1 -1
  21. package/dist/media/internal/httpHelpers.js +2 -2
  22. package/dist/media/internal/jobsHelpers.d.ts +1 -1
  23. package/dist/media/internal/jobsHelpers.js +5 -5
  24. package/dist/media/io.d.ts +1 -1
  25. package/dist/media/io.js +5 -5
  26. package/dist/media/jobs.d.ts +1 -1
  27. package/dist/media/jobs.js +5 -5
  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 +11 -0
  35. package/dist/media/types/index.js +126 -0
  36. package/dist/media/types/jobs.d.ts +2 -0
  37. package/dist/media/types/jwtToken.d.ts +13 -0
  38. package/dist/media/types/webhooks.d.ts +6 -7
  39. package/dist/media/webhooks.d.ts +2 -1
  40. package/dist/media/webhooks.js +5 -5
  41. package/dist/streaming/account.d.ts +48 -0
  42. package/dist/streaming/account.js +184 -0
  43. package/dist/streaming/cluster.d.ts +19 -0
  44. package/dist/streaming/cluster.js +25 -5
  45. package/dist/streaming/director.d.ts +2 -2
  46. package/dist/streaming/director.js +7 -7
  47. package/dist/streaming/index.d.ts +18 -7
  48. package/dist/streaming/index.js +44 -15
  49. package/dist/streaming/internal/httpHelpers.js +5 -5
  50. package/dist/streaming/publishToken.d.ts +86 -3
  51. package/dist/streaming/publishToken.js +96 -6
  52. package/dist/streaming/recordFiles.d.ts +55 -0
  53. package/dist/streaming/recordFiles.js +214 -0
  54. package/dist/streaming/stream.d.ts +24 -2
  55. package/dist/streaming/stream.js +32 -6
  56. package/dist/streaming/subscribeToken.d.ts +54 -0
  57. package/dist/streaming/subscribeToken.js +63 -5
  58. package/dist/streaming/transcoders.d.ts +143 -0
  59. package/dist/streaming/transcoders.js +481 -0
  60. package/dist/streaming/types/account.d.ts +25 -0
  61. package/dist/streaming/types/cluster.d.ts +17 -0
  62. package/dist/streaming/types/core.d.ts +1 -0
  63. package/dist/streaming/types/director.d.ts +15 -6
  64. package/dist/streaming/types/index.d.ts +9 -0
  65. package/dist/streaming/types/index.js +104 -0
  66. package/dist/streaming/types/publishToken.d.ts +273 -12
  67. package/dist/streaming/types/recordFiles.d.ts +49 -0
  68. package/dist/streaming/types/stream.d.ts +3 -0
  69. package/dist/streaming/types/subscribeToken.d.ts +150 -4
  70. package/dist/streaming/types/transcoders.d.ts +138 -0
  71. package/dist/streaming/types/webhooks.d.ts +69 -0
  72. package/dist/streaming/webhooks.d.ts +57 -0
  73. package/dist/streaming/webhooks.js +224 -0
  74. package/dist/urls.d.ts +0 -2
  75. package/dist/urls.js +1 -5
  76. package/package.json +15 -11
  77. package/dist/authentication.d.ts +0 -29
  78. package/dist/authentication.js +0 -82
  79. package/dist/communications/authentication.d.ts +0 -14
  80. package/dist/communications/authentication.js +0 -62
  81. package/dist/communications/conference.d.ts +0 -95
  82. package/dist/communications/conference.js +0 -404
  83. package/dist/communications/index.d.ts +0 -6
  84. package/dist/communications/index.js +0 -19
  85. package/dist/communications/internal/httpHelpers.d.ts +0 -10
  86. package/dist/communications/internal/httpHelpers.js +0 -67
  87. package/dist/communications/monitor/conferences.d.ts +0 -91
  88. package/dist/communications/monitor/conferences.js +0 -389
  89. package/dist/communications/monitor/index.d.ts +0 -4
  90. package/dist/communications/monitor/index.js +0 -15
  91. package/dist/communications/monitor/recordings.d.ts +0 -77
  92. package/dist/communications/monitor/recordings.js +0 -287
  93. package/dist/communications/monitor/webhooks.d.ts +0 -24
  94. package/dist/communications/monitor/webhooks.js +0 -136
  95. package/dist/communications/recording.d.ts +0 -44
  96. package/dist/communications/recording.js +0 -117
  97. package/dist/communications/remix.js +0 -122
  98. package/dist/communications/streaming.d.ts +0 -76
  99. package/dist/communications/streaming.js +0 -217
  100. package/dist/communications/types/authentication.d.ts +0 -25
  101. package/dist/communications/types/conference.d.ts +0 -76
  102. package/dist/communications/types/conferences.d.ts +0 -140
  103. package/dist/communications/types/core.d.ts +0 -30
  104. package/dist/communications/types/mixOptions.d.ts +0 -39
  105. package/dist/communications/types/participant.d.ts +0 -6
  106. package/dist/communications/types/participant.js +0 -1
  107. package/dist/communications/types/permission.d.ts +0 -26
  108. package/dist/communications/types/permission.js +0 -21
  109. package/dist/communications/types/recordings.d.ts +0 -85
  110. package/dist/communications/types/recordings.js +0 -5
  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 -27
  124. package/dist/streaming/geo.js +0 -106
  125. package/dist/streaming/types/geo.d.ts +0 -4
  126. package/dist/streaming/types/geo.js +0 -5
  127. package/dist/types/jwtToken.d.ts +0 -6
  128. package/dist/types/jwtToken.js +0 -1
  129. /package/dist/{communications/types/authentication.js → media/types/jwtToken.js} +0 -0
  130. /package/dist/{communications/types/conference.js → streaming/types/account.js} +0 -0
  131. /package/dist/{communications/types/conferences.js → streaming/types/recordFiles.js} +0 -0
  132. /package/dist/{communications/types/core.js → streaming/types/stream.js} +0 -0
  133. /package/dist/{communications/types/mixOptions.js → streaming/types/transcoders.js} +0 -0
  134. /package/dist/{communications → streaming}/types/webhooks.js +0 -0
@@ -1,89 +1,76 @@
1
1
  import { JobResult } from './jobResults';
2
- export interface DiagnoseJobResultMediaInfoContainer {
3
- kind: string;
4
- duration: number;
5
- bitrate: number;
6
- size: number;
7
- }
8
- export interface DiagnoseJobResultMediaInfoAudio {
9
- codec: string;
10
- bit_depth: number;
11
- channels: number;
12
- sample_rate: number;
13
- duration: number;
14
- bitrate: number;
15
- }
16
- export interface DiagnoseJobResultMediaInfoVideo {
17
- codec: string;
18
- frame_rate: number;
19
- height: number;
20
- width: number;
21
- duration: number;
22
- bitrate: number;
23
- }
24
- export interface DiagnoseJobResultMediaInfo {
25
- container: DiagnoseJobResultMediaInfoContainer;
26
- audio: DiagnoseJobResultMediaInfoAudio;
27
- video: DiagnoseJobResultMediaInfoVideo;
28
- }
29
- export interface DiagnoseJobResultScoreDistribution {
30
- lower_bound: number;
31
- upper_bound: number;
32
- duration: number;
33
- percentage: number;
34
- }
35
- export interface DiagnoseJobResultScoreWorstSegment {
36
- start: number;
37
- end: number;
38
- score: number;
39
- }
40
2
  export interface DiagnoseJobResultQualityScore {
41
3
  average: number;
42
- distribution: DiagnoseJobResultScoreDistribution[];
4
+ distribution: {
5
+ lower_bound: number;
6
+ upper_bound: number;
7
+ duration: number;
8
+ percentage: number;
9
+ }[];
43
10
  }
44
11
  export interface DiagnoseJobResultScore extends DiagnoseJobResultQualityScore {
45
- worst_segment: DiagnoseJobResultScoreWorstSegment;
46
- }
47
- export interface DiagnoseJobResultClipping {
48
- events: number;
49
- }
50
- export interface DiagnoseJobResultLoudness {
51
- measured: number;
52
- range: number;
53
- sample_peak: number;
54
- true_peak: number;
55
- gating_mode: string;
56
- }
57
- export interface DiagnoseJobResultMusic {
58
- percentage: number;
59
- }
60
- export interface DiagnoseJobResultSilence {
61
- percentage: number;
62
- at_beginning: number;
63
- at_end: number;
64
- num_sections: number;
65
- silent_channels: string[];
66
- }
67
- export interface DiagnoseJobResultSpeechEvent {
68
- plosive: number;
69
- sibilance: number;
70
- }
71
- export interface DiagnoseJobResultSpeech {
72
- percentage: number;
73
- events: DiagnoseJobResultSpeechEvent;
74
- }
75
- export interface DiagnoseJobResultAudio {
76
- quality_score: DiagnoseJobResultQualityScore;
77
- noise_score: DiagnoseJobResultScore;
78
- clipping: DiagnoseJobResultClipping;
79
- loudness: DiagnoseJobResultLoudness;
80
- music: DiagnoseJobResultMusic;
81
- silence: DiagnoseJobResultSilence;
82
- speech: DiagnoseJobResultSpeech;
12
+ worst_segment: {
13
+ start: number;
14
+ end: number;
15
+ score: number;
16
+ };
83
17
  }
84
18
  export interface DiagnoseJobResult {
85
- media_info: DiagnoseJobResultMediaInfo;
86
- audio: DiagnoseJobResultAudio;
19
+ media_info: {
20
+ container: {
21
+ kind: string;
22
+ duration: number;
23
+ bitrate: number;
24
+ size: number;
25
+ };
26
+ audio: {
27
+ codec: string;
28
+ bit_depth: number;
29
+ channels: number;
30
+ sample_rate: number;
31
+ duration: number;
32
+ bitrate: number;
33
+ };
34
+ video: {
35
+ codec: string;
36
+ frame_rate: number;
37
+ height: number;
38
+ width: number;
39
+ duration: number;
40
+ bitrate: number;
41
+ };
42
+ };
43
+ audio: {
44
+ quality_score: DiagnoseJobResultQualityScore;
45
+ noise_score: DiagnoseJobResultScore;
46
+ clipping: {
47
+ events: number;
48
+ };
49
+ loudness: {
50
+ measured: number;
51
+ range: number;
52
+ sample_peak: number;
53
+ true_peak: number;
54
+ gating_mode: string;
55
+ };
56
+ music: {
57
+ percentage: number;
58
+ };
59
+ silence: {
60
+ percentage: number;
61
+ at_beginning: number;
62
+ at_end: number;
63
+ num_sections: number;
64
+ silent_channels: string[];
65
+ };
66
+ speech: {
67
+ percentage: number;
68
+ events: {
69
+ plosive: number;
70
+ sibilance: number;
71
+ };
72
+ };
73
+ };
87
74
  }
88
75
  export interface DiagnoseJob extends JobResult<DiagnoseJobResult> {
89
76
  }
@@ -0,0 +1,11 @@
1
+ export * from './analyze';
2
+ export * from './analyzeMusic';
3
+ export * from './analyzeSpeech';
4
+ export * from './diagnose';
5
+ export * from './enhance';
6
+ export * from './jobResults';
7
+ export * from './jobs';
8
+ export * from './jwtToken';
9
+ export * from './mastering';
10
+ export * from './transcode';
11
+ export * from './webhooks';
@@ -0,0 +1,126 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _analyze = require("./analyze");
7
+ Object.keys(_analyze).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _analyze[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function get() {
13
+ return _analyze[key];
14
+ }
15
+ });
16
+ });
17
+ var _analyzeMusic = require("./analyzeMusic");
18
+ Object.keys(_analyzeMusic).forEach(function (key) {
19
+ if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _analyzeMusic[key]) return;
21
+ Object.defineProperty(exports, key, {
22
+ enumerable: true,
23
+ get: function get() {
24
+ return _analyzeMusic[key];
25
+ }
26
+ });
27
+ });
28
+ var _analyzeSpeech = require("./analyzeSpeech");
29
+ Object.keys(_analyzeSpeech).forEach(function (key) {
30
+ if (key === "default" || key === "__esModule") return;
31
+ if (key in exports && exports[key] === _analyzeSpeech[key]) return;
32
+ Object.defineProperty(exports, key, {
33
+ enumerable: true,
34
+ get: function get() {
35
+ return _analyzeSpeech[key];
36
+ }
37
+ });
38
+ });
39
+ var _diagnose = require("./diagnose");
40
+ Object.keys(_diagnose).forEach(function (key) {
41
+ if (key === "default" || key === "__esModule") return;
42
+ if (key in exports && exports[key] === _diagnose[key]) return;
43
+ Object.defineProperty(exports, key, {
44
+ enumerable: true,
45
+ get: function get() {
46
+ return _diagnose[key];
47
+ }
48
+ });
49
+ });
50
+ var _enhance = require("./enhance");
51
+ Object.keys(_enhance).forEach(function (key) {
52
+ if (key === "default" || key === "__esModule") return;
53
+ if (key in exports && exports[key] === _enhance[key]) return;
54
+ Object.defineProperty(exports, key, {
55
+ enumerable: true,
56
+ get: function get() {
57
+ return _enhance[key];
58
+ }
59
+ });
60
+ });
61
+ var _jobResults = require("./jobResults");
62
+ Object.keys(_jobResults).forEach(function (key) {
63
+ if (key === "default" || key === "__esModule") return;
64
+ if (key in exports && exports[key] === _jobResults[key]) return;
65
+ Object.defineProperty(exports, key, {
66
+ enumerable: true,
67
+ get: function get() {
68
+ return _jobResults[key];
69
+ }
70
+ });
71
+ });
72
+ var _jobs = require("./jobs");
73
+ Object.keys(_jobs).forEach(function (key) {
74
+ if (key === "default" || key === "__esModule") return;
75
+ if (key in exports && exports[key] === _jobs[key]) return;
76
+ Object.defineProperty(exports, key, {
77
+ enumerable: true,
78
+ get: function get() {
79
+ return _jobs[key];
80
+ }
81
+ });
82
+ });
83
+ var _jwtToken = require("./jwtToken");
84
+ Object.keys(_jwtToken).forEach(function (key) {
85
+ if (key === "default" || key === "__esModule") return;
86
+ if (key in exports && exports[key] === _jwtToken[key]) return;
87
+ Object.defineProperty(exports, key, {
88
+ enumerable: true,
89
+ get: function get() {
90
+ return _jwtToken[key];
91
+ }
92
+ });
93
+ });
94
+ var _mastering = require("./mastering");
95
+ Object.keys(_mastering).forEach(function (key) {
96
+ if (key === "default" || key === "__esModule") return;
97
+ if (key in exports && exports[key] === _mastering[key]) return;
98
+ Object.defineProperty(exports, key, {
99
+ enumerable: true,
100
+ get: function get() {
101
+ return _mastering[key];
102
+ }
103
+ });
104
+ });
105
+ var _transcode = require("./transcode");
106
+ Object.keys(_transcode).forEach(function (key) {
107
+ if (key === "default" || key === "__esModule") return;
108
+ if (key in exports && exports[key] === _transcode[key]) return;
109
+ Object.defineProperty(exports, key, {
110
+ enumerable: true,
111
+ get: function get() {
112
+ return _transcode[key];
113
+ }
114
+ });
115
+ });
116
+ var _webhooks = require("./webhooks");
117
+ Object.keys(_webhooks).forEach(function (key) {
118
+ if (key === "default" || key === "__esModule") return;
119
+ if (key in exports && exports[key] === _webhooks[key]) return;
120
+ Object.defineProperty(exports, key, {
121
+ enumerable: true,
122
+ get: function get() {
123
+ return _webhooks[key];
124
+ }
125
+ });
126
+ });
@@ -10,7 +10,9 @@ export interface ListAllJobsOptions {
10
10
  /** Query jobs that have the specified status. `Running`, `Pending`, `Success`, `Failed` or `InternalError`. */
11
11
  status?: string;
12
12
  }
13
+ /** Represents a job submitted to the Media APIs. */
13
14
  export interface Job {
15
+ /** Job identifier. */
14
16
  job_id: string;
15
17
  api_version: string;
16
18
  path: string;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Represents a JWT token used for authentication.
3
+ */
4
+ export interface JwtToken {
5
+ /** The access token to use to authenticate requests. */
6
+ access_token: string;
7
+ /** Expiration of the access token. */
8
+ expires_in: number;
9
+ /** The type of access token. Always `Bearer`. */
10
+ token_type: string;
11
+ /** Authorization scope for the access token. */
12
+ scope?: string;
13
+ }
@@ -8,14 +8,13 @@ export interface UpdateWebhookOptions {
8
8
  /** Headers to include in the webhook call. */
9
9
  headers?: http.OutgoingHttpHeaders;
10
10
  }
11
- export interface WebhookCallback {
12
- /** The callback url that will be called when job execution completes. */
13
- url: string;
14
- /** Headers to include in the webhook call. */
15
- headers: any;
16
- }
17
11
  export interface Webhook {
18
12
  /** The identifier for the webhook. */
19
13
  webhook_id: string;
20
- callback: WebhookCallback;
14
+ callback: {
15
+ /** The callback url that will be called when job execution completes. */
16
+ url: string;
17
+ /** Headers to include in the webhook call. */
18
+ headers: any;
19
+ };
21
20
  }
@@ -1,5 +1,6 @@
1
+ /// <reference types="node" />
1
2
  import http from 'http';
2
- import JwtToken from '../types/jwtToken';
3
+ import { JwtToken } from './types/jwtToken';
3
4
  import { UpdateWebhookOptions, Webhook } from './types/webhooks';
4
5
  /**
5
6
  * Registers a webhook that is triggered when a job completes.
@@ -7,11 +7,11 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.updateWebhook = exports.retrieveWebhook = exports.registerWebhook = exports.deleteWebhook = void 0;
8
8
  var _httpHelpers = require("./internal/httpHelpers");
9
9
  var Urls = _interopRequireWildcard(require("../urls"));
10
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
11
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
12
- 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; }
13
- 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); } }
14
- 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); }); }; }
10
+ 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); }
11
+ 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; }
12
+ 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; }
13
+ 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); }
14
+ 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); }); }; }
15
15
  /**
16
16
  * Registers a webhook that is triggered when a job completes.
17
17
  *
@@ -0,0 +1,48 @@
1
+ import { AccountGeoCascade, GeoRestrictions } from './types/account';
2
+ /**
3
+ * Gets account wide geo cascade settings.
4
+ * If a Publish Token does not define any geo cascade settings, the account wide settings are used.
5
+ *
6
+ * @link https://docs.dolby.io/streaming-apis/reference/account_getgeocascade
7
+ *
8
+ * @param apiSecret The API Secret used to authenticate this request.
9
+ *
10
+ * @returns A {@link !Promise Promise} whose fulfillment handler receives a {@link AccountGeoCascade} object.
11
+ */
12
+ export declare const getGeoCascade: (apiSecret: string) => Promise<AccountGeoCascade>;
13
+ /**
14
+ * Update account wide geo cascade settings to enable/disable the feature or update the account default cluster list.
15
+ * `["all"]` could be used in place of cluster list to cascade stream to all existing and any future clusters available to the account.
16
+ *
17
+ * @link https://docs.dolby.io/streaming-apis/reference/account_updategeocascade
18
+ *
19
+ * @param apiSecret The API Secret used to authenticate this request.
20
+ * @param settings The new default geo cascading cluster settings.
21
+ *
22
+ * @returns A {@link !Promise Promise} whose fulfillment handler receives a {@link AccountGeoCascade} object.
23
+ */
24
+ export declare const updateGeoCascade: (apiSecret: string, settings: AccountGeoCascade) => Promise<AccountGeoCascade>;
25
+ /**
26
+ * Gets the account geo restrictions.
27
+ *
28
+ * If a Token (either Publish or Subscribe) does not define any geo restrictions, the account wide rules are used.
29
+ *
30
+ * @link https://docs.dolby.io/streaming-apis/reference/geo_geo
31
+ *
32
+ * @param apiSecret The API Secret used to authenticate this request.
33
+ *
34
+ * @returns A {@link GeoRestrictions} object through a {@link Promise}.
35
+ */
36
+ export declare const readGeoRestrictions: (apiSecret: string) => Promise<GeoRestrictions>;
37
+ /**
38
+ * Updates the account geo restrictions.
39
+ *
40
+ * @link https://docs.dolby.io/streaming-apis/reference/geo_updategeo
41
+ *
42
+ * @param apiSecret The API Secret used to authenticate this request.
43
+ * @param allowedCountries The list of allowed countries. An empty array [] removes all rules.
44
+ * @param deniedCountries The list of denied countries. An empty array [] removes all rules.
45
+ *
46
+ * @returns A {@link GeoRestrictions} object through a {@link Promise}.
47
+ */
48
+ export declare const updateGeoRestrictions: (apiSecret: string, allowedCountries?: string[] | null, deniedCountries?: string[] | null) => Promise<GeoRestrictions>;