@dolbyio/dolbyio-rest-apis-client 3.4.0 → 3.4.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.
@@ -1,5 +1,6 @@
1
1
  import * as authentication from './authentication';
2
2
  import * as conference from './conference';
3
3
  import * as monitor from './monitor';
4
+ import * as recording from './recording';
4
5
  import * as streaming from './streaming';
5
- export { authentication, conference, monitor, streaming };
6
+ export { authentication, conference, monitor, recording, streaming };
@@ -23,13 +23,15 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.streaming = exports.monitor = exports.conference = exports.authentication = void 0;
26
+ exports.streaming = exports.recording = exports.monitor = exports.conference = exports.authentication = void 0;
27
27
  const authentication = __importStar(require("./authentication"));
28
28
  exports.authentication = authentication;
29
29
  const conference = __importStar(require("./conference"));
30
30
  exports.conference = conference;
31
31
  const monitor = __importStar(require("./monitor"));
32
32
  exports.monitor = monitor;
33
+ const recording = __importStar(require("./recording"));
34
+ exports.recording = recording;
33
35
  const streaming = __importStar(require("./streaming"));
34
36
  exports.streaming = streaming;
35
37
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/communications/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iEAAmD;AAK1C,wCAAc;AAJvB,yDAA2C;AAIlB,gCAAU;AAHnC,mDAAqC;AAGA,0BAAO;AAF5C,uDAAyC;AAEK,8BAAS"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/communications/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iEAAmD;AAM1C,wCAAc;AALvB,yDAA2C;AAKlB,gCAAU;AAJnC,mDAAqC;AAIA,0BAAO;AAH5C,uDAAyC;AAGK,8BAAS;AAFvD,uDAAyC;AAEgB,8BAAS"}
@@ -0,0 +1,27 @@
1
+ import JwtToken from '../types/jwtToken';
2
+ /**
3
+ * Starts recording for the specified conference.
4
+ * You can specify a custom layout URL per recording request.
5
+ * The `layoutURL` parameter overrides the layout URL configured in the dashboard.
6
+ *
7
+ * @link https://docs.dolby.io/communications-apis/reference/api-recording-start
8
+ *
9
+ * @param accessToken Access token to use for authentication.
10
+ * @param conferenceId Identifier of the conference.
11
+ * @param layoutUrl Overwrites the layout URL configuration.
12
+ * This field is ignored if it is not relevant regarding recording configuration,
13
+ * for example if live_recording set to false or if the recording is MP3 only.
14
+ * - `null`: uses the layout URL configured in the dashboard (if no URL is set in the dashboard, then uses the Dolby.io default);
15
+ * - `default`: uses the Dolby.io default layout;
16
+ * - URL string: uses this layout URL
17
+ */
18
+ export declare const start: (accessToken: JwtToken, conferenceId: string, layoutUrl?: string) => Promise<void>;
19
+ /**
20
+ * Stops the recording of the specified conference.
21
+ *
22
+ * @link https://docs.dolby.io/communications-apis/reference/api-recording-stop
23
+ *
24
+ * @param accessToken Access token to use for authentication.
25
+ * @param conferenceId Identifier of the conference.
26
+ */
27
+ export declare const stop: (accessToken: JwtToken, conferenceId: string) => Promise<void>;
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.stop = exports.start = void 0;
13
+ const httpHelpers_1 = require("../internal/httpHelpers");
14
+ const urls_1 = require("./internal/urls");
15
+ /**
16
+ * Starts recording for the specified conference.
17
+ * You can specify a custom layout URL per recording request.
18
+ * The `layoutURL` parameter overrides the layout URL configured in the dashboard.
19
+ *
20
+ * @link https://docs.dolby.io/communications-apis/reference/api-recording-start
21
+ *
22
+ * @param accessToken Access token to use for authentication.
23
+ * @param conferenceId Identifier of the conference.
24
+ * @param layoutUrl Overwrites the layout URL configuration.
25
+ * This field is ignored if it is not relevant regarding recording configuration,
26
+ * for example if live_recording set to false or if the recording is MP3 only.
27
+ * - `null`: uses the layout URL configured in the dashboard (if no URL is set in the dashboard, then uses the Dolby.io default);
28
+ * - `default`: uses the Dolby.io default layout;
29
+ * - URL string: uses this layout URL
30
+ */
31
+ const start = (accessToken, conferenceId, layoutUrl) => __awaiter(void 0, void 0, void 0, function* () {
32
+ const body = {};
33
+ if (layoutUrl)
34
+ body['layoutUrl'] = layoutUrl;
35
+ const options = {
36
+ hostname: urls_1.COMMS_HOSTNAME,
37
+ path: `/v2/conferences/mix/${conferenceId}/recording/start`,
38
+ headers: {
39
+ Accept: 'application/json',
40
+ 'Content-Type': 'application/json',
41
+ Authorization: `${accessToken.token_type} ${accessToken.access_token}`,
42
+ },
43
+ body: JSON.stringify(body),
44
+ };
45
+ yield (0, httpHelpers_1.sendPost)(options);
46
+ });
47
+ exports.start = start;
48
+ /**
49
+ * Stops the recording of the specified conference.
50
+ *
51
+ * @link https://docs.dolby.io/communications-apis/reference/api-recording-stop
52
+ *
53
+ * @param accessToken Access token to use for authentication.
54
+ * @param conferenceId Identifier of the conference.
55
+ */
56
+ const stop = (accessToken, conferenceId) => __awaiter(void 0, void 0, void 0, function* () {
57
+ const options = {
58
+ hostname: urls_1.COMMS_HOSTNAME,
59
+ path: `/v2/conferences/mix/${conferenceId}/recording/stop`,
60
+ headers: {
61
+ Accept: 'application/json',
62
+ 'Content-Type': 'application/json',
63
+ Authorization: `${accessToken.token_type} ${accessToken.access_token}`,
64
+ },
65
+ };
66
+ yield (0, httpHelpers_1.sendPost)(options);
67
+ });
68
+ exports.stop = stop;
69
+ //# sourceMappingURL=recording.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recording.js","sourceRoot":"","sources":["../../src/communications/recording.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAmD;AACnD,0CAAiD;AAGjD;;;;;;;;;;;;;;;GAeG;AACI,MAAM,KAAK,GAAG,CAAO,WAAqB,EAAE,YAAoB,EAAE,SAAkB,EAAiB,EAAE;IAC1G,MAAM,IAAI,GAAG,EAAE,CAAC;IAChB,IAAI,SAAS;QAAE,IAAI,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC;IAE7C,MAAM,OAAO,GAAG;QACZ,QAAQ,EAAE,qBAAc;QACxB,IAAI,EAAE,uBAAuB,YAAY,kBAAkB;QAC3D,OAAO,EAAE;YACL,MAAM,EAAE,kBAAkB;YAC1B,cAAc,EAAE,kBAAkB;YAClC,aAAa,EAAE,GAAG,WAAW,CAAC,UAAU,IAAI,WAAW,CAAC,YAAY,EAAE;SACzE;QACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;KAC7B,CAAC;IAEF,MAAM,IAAA,sBAAQ,EAAC,OAAO,CAAC,CAAC;AAC5B,CAAC,CAAA,CAAC;AAhBW,QAAA,KAAK,SAgBhB;AAEF;;;;;;;GAOG;AACI,MAAM,IAAI,GAAG,CAAO,WAAqB,EAAE,YAAoB,EAAiB,EAAE;IACrF,MAAM,OAAO,GAAG;QACZ,QAAQ,EAAE,qBAAc;QACxB,IAAI,EAAE,uBAAuB,YAAY,iBAAiB;QAC1D,OAAO,EAAE;YACL,MAAM,EAAE,kBAAkB;YAC1B,cAAc,EAAE,kBAAkB;YAClC,aAAa,EAAE,GAAG,WAAW,CAAC,UAAU,IAAI,WAAW,CAAC,YAAY,EAAE;SACzE;KACJ,CAAC;IAEF,MAAM,IAAA,sBAAQ,EAAC,OAAO,CAAC,CAAC;AAC5B,CAAC,CAAA,CAAC;AAZW,QAAA,IAAI,QAYf"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dolbyio/dolbyio-rest-apis-client",
3
- "version": "3.4.0",
3
+ "version": "3.4.1",
4
4
  "description": "Node.JS wrapper for the dolby.io REST APIs",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {