@bwi-mentorspaces/application-utils-npm 0.0.78 → 0.0.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/calendar/cronofy/cronofy.api.d.ts +26 -14
- package/calendar/cronofy/cronofy.api.js +28 -16
- package/calendar/cronofy/cronofy.api.js.map +1 -1
- package/calendar/cronofy/models/_/cronofy.data.d.ts +6 -2
- package/calendar/index.d.ts +3 -0
- package/calendar/index.js +3 -0
- package/calendar/index.js.map +1 -1
- package/chat/index.d.ts +3 -0
- package/chat/index.js +3 -0
- package/chat/index.js.map +1 -1
- package/chat/stream/enum/index.d.ts +2 -1
- package/chat/stream/enum/index.js +1 -0
- package/chat/stream/enum/index.js.map +1 -1
- package/chat/stream/models/_/job.response.d.ts +8 -0
- package/chat/stream/models/_/job.response.js +8 -0
- package/chat/stream/models/_/job.response.js.map +1 -1
- package/chat/stream/stream.api.d.ts +6 -0
- package/chat/stream/stream.api.js +6 -0
- package/chat/stream/stream.api.js.map +1 -1
- package/chat/stream/stream.auth.d.ts +7 -0
- package/chat/stream/stream.auth.js +4 -0
- package/chat/stream/stream.auth.js.map +1 -1
- package/chat/stream/stream.base.d.ts +7 -0
- package/chat/stream/stream.base.js +9 -2
- package/chat/stream/stream.base.js.map +1 -1
- package/chat/stream/stream.channel.d.ts +19 -0
- package/chat/stream/stream.channel.js +50 -0
- package/chat/stream/stream.channel.js.map +1 -1
- package/chat/stream/stream.error.d.ts +1 -0
- package/chat/stream/stream.error.js +1 -0
- package/chat/stream/stream.error.js.map +1 -1
- package/chat/stream/stream.member.d.ts +6 -0
- package/chat/stream/stream.member.js +6 -0
- package/chat/stream/stream.member.js.map +1 -1
- package/chat/stream/stream.message.d.ts +4 -0
- package/chat/stream/stream.message.js +4 -0
- package/chat/stream/stream.message.js.map +1 -1
- package/chat/stream/stream.user.d.ts +7 -0
- package/chat/stream/stream.user.js +7 -0
- package/chat/stream/stream.user.js.map +1 -1
- package/core/_/api-error.d.ts +1 -0
- package/core/_/api-error.js +1 -0
- package/core/_/api-error.js.map +1 -1
- package/core/_/api-response.d.ts +1 -0
- package/core/_/api-response.js +1 -0
- package/core/_/api-response.js.map +1 -1
- package/core/_/cors-headers.d.ts +1 -0
- package/core/_/cors-headers.js +10 -9
- package/core/_/cors-headers.js.map +1 -1
- package/core/_/service-request.d.ts +2 -0
- package/core/_/service-request.js +7 -5
- package/core/_/service-request.js.map +1 -1
- package/deployment/_/serverless.d.ts +2 -0
- package/deployment/_/serverless.js +2 -0
- package/deployment/_/serverless.js.map +1 -1
- package/endpoint-test-factory/_/test-factory.d.ts +4 -0
- package/endpoint-test-factory/_/test-factory.js +9 -5
- package/endpoint-test-factory/_/test-factory.js.map +1 -1
- package/enums/index.d.ts +2 -1
- package/meet/index.d.ts +3 -0
- package/meet/index.js +3 -0
- package/meet/index.js.map +1 -1
- package/meet/twilio/twilio.api.d.ts +3 -0
- package/meet/twilio/twilio.api.js +3 -0
- package/meet/twilio/twilio.api.js.map +1 -1
- package/meet/twilio/twilio.auth.d.ts +5 -0
- package/meet/twilio/twilio.auth.js +4 -5
- package/meet/twilio/twilio.auth.js.map +1 -1
- package/meet/twilio/twilio.base.d.ts +5 -0
- package/meet/twilio/twilio.base.js +5 -0
- package/meet/twilio/twilio.base.js.map +1 -1
- package/meet/twilio/twilio.room.d.ts +4 -0
- package/meet/twilio/twilio.room.js +4 -0
- package/meet/twilio/twilio.room.js.map +1 -1
- package/package.json +1 -1
- package/session/index.d.ts +3 -0
- package/session/index.js +3 -0
- package/session/index.js.map +1 -1
- package/session/ms.live/models/_/room.data.d.ts +16 -2
- package/session/ms.live/ms.live.api.d.ts +12 -0
- package/session/ms.live/ms.live.api.js +16 -4
- package/session/ms.live/ms.live.api.js.map +1 -1
- package/session/ms.live/ms.live.auth.d.ts +21 -0
- package/session/ms.live/ms.live.auth.js +20 -4
- package/session/ms.live/ms.live.auth.js.map +1 -1
- package/session/ms.live/ms.live.base.d.ts +4 -0
- package/session/ms.live/ms.live.base.js +4 -0
- package/session/ms.live/ms.live.base.js.map +1 -1
- package/session/ms.live/ms.live.room.d.ts +16 -4
- package/session/ms.live/ms.live.room.js +15 -3
- package/session/ms.live/ms.live.room.js.map +1 -1
- package/swagger/_/swagger.d.ts +2 -0
- package/swagger/_/swagger.js +3 -5
- package/swagger/_/swagger.js.map +1 -1
- package/utils/_/encoder.d.ts +2 -0
- package/utils/_/encoder.js +2 -0
- package/utils/_/encoder.js.map +1 -1
- package/utils/_/encryptor.d.ts +2 -0
- package/utils/_/encryptor.js +5 -7
- package/utils/_/encryptor.js.map +1 -1
- package/utils/_/hasher.d.ts +3 -0
- package/utils/_/hasher.js +4 -5
- package/utils/_/hasher.js.map +1 -1
- package/utils/_/object-mapper.d.ts +1 -0
- package/utils/_/object-mapper.js +1 -0
- package/utils/_/object-mapper.js.map +1 -1
- package/utils/_/string-formatter.d.ts +4 -0
- package/utils/_/string-formatter.js +4 -0
- package/utils/_/string-formatter.js.map +1 -1
- package/utils/_/utc-date.d.ts +4 -0
- package/utils/_/utc-date.js +12 -8
- package/utils/_/utc-date.js.map +1 -1
- package/validators/_/checker.d.ts +7 -0
- package/validators/_/checker.js +7 -0
- package/validators/_/checker.js.map +1 -1
- package/validators/_/regex.d.ts +15 -0
- package/validators/_/regex.js +15 -0
- package/validators/_/regex.js.map +1 -1
|
@@ -26,6 +26,7 @@ export declare class TwilioRoom extends TwilioBase implements ITwilioRoom {
|
|
|
26
26
|
private _expMinutes;
|
|
27
27
|
/**
|
|
28
28
|
* Twilio room constructor
|
|
29
|
+
*
|
|
29
30
|
* @param {TwilioAuth} auth Twilio auth
|
|
30
31
|
* @param {Twilio} server Twilio API Server
|
|
31
32
|
* @param {number} expMins expiration time for the timeout room, in minutes.
|
|
@@ -33,6 +34,7 @@ export declare class TwilioRoom extends TwilioBase implements ITwilioRoom {
|
|
|
33
34
|
constructor(auth: TwilioAuth, server: Twilio, expMins: number);
|
|
34
35
|
/**
|
|
35
36
|
* This will find or Create a new room in Twilio
|
|
37
|
+
*
|
|
36
38
|
* @param {string} roomName room name
|
|
37
39
|
* @param {string} roomTypeStr room type to create in Twilio ("group" | "peer-to-peer" | "go")
|
|
38
40
|
* @returns {Promise<IRoomData>} promise of the result to create or get a room
|
|
@@ -40,12 +42,14 @@ export declare class TwilioRoom extends TwilioBase implements ITwilioRoom {
|
|
|
40
42
|
findOrCreateRoom(roomName: string, roomTypeStr?: string): Promise<IRoomData>;
|
|
41
43
|
/**
|
|
42
44
|
* Convenience method to determine if a roomType is valid
|
|
45
|
+
*
|
|
43
46
|
* @param {string} roomType The room type to validate.
|
|
44
47
|
* @returns {Promise<boolean>} true if a valid roomType, false otherwise
|
|
45
48
|
*/
|
|
46
49
|
validateRoomType(roomType: string): Promise<boolean>;
|
|
47
50
|
/**
|
|
48
51
|
* Find an existing room un Twilio
|
|
52
|
+
*
|
|
49
53
|
* @param {string} roomName room name
|
|
50
54
|
* @returns {Promise<IRoomData>} promise of the result to get a room
|
|
51
55
|
*/
|
|
@@ -29,6 +29,7 @@ const twilio_base_1 = require("./twilio.base");
|
|
|
29
29
|
let TwilioRoom = class TwilioRoom extends twilio_base_1.TwilioBase {
|
|
30
30
|
/**
|
|
31
31
|
* Twilio room constructor
|
|
32
|
+
*
|
|
32
33
|
* @param {TwilioAuth} auth Twilio auth
|
|
33
34
|
* @param {Twilio} server Twilio API Server
|
|
34
35
|
* @param {number} expMins expiration time for the timeout room, in minutes.
|
|
@@ -41,6 +42,7 @@ let TwilioRoom = class TwilioRoom extends twilio_base_1.TwilioBase {
|
|
|
41
42
|
}
|
|
42
43
|
/**
|
|
43
44
|
* This will find or Create a new room in Twilio
|
|
45
|
+
*
|
|
44
46
|
* @param {string} roomName room name
|
|
45
47
|
* @param {string} roomTypeStr room type to create in Twilio ("group" | "peer-to-peer" | "go")
|
|
46
48
|
* @returns {Promise<IRoomData>} promise of the result to create or get a room
|
|
@@ -89,6 +91,7 @@ let TwilioRoom = class TwilioRoom extends twilio_base_1.TwilioBase {
|
|
|
89
91
|
}
|
|
90
92
|
/**
|
|
91
93
|
* Convenience method to determine if a roomType is valid
|
|
94
|
+
*
|
|
92
95
|
* @param {string} roomType The room type to validate.
|
|
93
96
|
* @returns {Promise<boolean>} true if a valid roomType, false otherwise
|
|
94
97
|
*/
|
|
@@ -102,6 +105,7 @@ let TwilioRoom = class TwilioRoom extends twilio_base_1.TwilioBase {
|
|
|
102
105
|
}
|
|
103
106
|
/**
|
|
104
107
|
* Find an existing room un Twilio
|
|
108
|
+
*
|
|
105
109
|
* @param {string} roomName room name
|
|
106
110
|
* @returns {Promise<IRoomData>} promise of the result to get a room
|
|
107
111
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"twilio.room.js","sourceRoot":"","sources":["../../../meet/twilio/twilio.room.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,+CAA2C;AAC3C,uCAAsC;AACtC,mCAAgC;AAChC,+CAA2C;AAwB3C;;GAEG;
|
|
1
|
+
{"version":3,"file":"twilio.room.js","sourceRoot":"","sources":["../../../meet/twilio/twilio.room.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,+CAA2C;AAC3C,uCAAsC;AACtC,mCAAgC;AAChC,+CAA2C;AAwB3C;;GAEG;AAEH,IAAa,UAAU,GAAvB,MAAa,UAAW,SAAQ,wBAAU;IAGtC;;;;;;OAMG;IACH,YAAY,IAAgB,EAAE,MAAc,EAAE,OAAe;QACzD,KAAK,EAAE,CAAC;QACR,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;QAClB,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC;IAC/B,CAAC;IAED;;;;;;OAMG;IACG,gBAAgB,CAAC,QAAgB,EAAE,cAAsB,OAAO;;;;;YAClE,IAAI;gBACA,iEAAiE;gBACjE,eAAe;gBACf,MAAM,CAAC,GAAiB,MAAM,OAAM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BACH,GAAG,EAAE,CAAC,CAAC,GAAG;oBACV,KAAK,EAAE,IAAI;oBACX,MAAM,EAAE,CAAC,CAAC,MAAM;iBACN,CAAC;aAClB;YAAC,OAAO,KAAK,EAAE;gBACZ,uCAAuC;gBACvC,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK;oBAAE,OAAO,SAAS,CAAC;gBAC1C,6BAA6B;;oBACxB,MAAM,KAAK,CAAC;aACpB;QACL,CAAC;KAAA;CACJ,CAAA;AA9FY,UAAU;IADtB,IAAA,qBAAU,GAAE;qCAWS,wBAAU,EAAU,eAAM;GAVnC,UAAU,CA8FtB;AA9FY,gCAAU"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bwi-mentorspaces/application-utils-npm",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.83",
|
|
4
4
|
"description": "Mentor Spaces npm packages for reusable models, utils, and abstracted, commonly used processes for DB Repo, Logging, etc.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Mentor Spaces",
|
package/session/index.d.ts
CHANGED
|
@@ -15,17 +15,20 @@ export declare class Session<T> implements ISession<T> {
|
|
|
15
15
|
private _clientType;
|
|
16
16
|
/**
|
|
17
17
|
* Session constructor
|
|
18
|
+
*
|
|
18
19
|
* @param {ClientType} clientType client type
|
|
19
20
|
* @param {IMSLiveConfig} config session configuration
|
|
20
21
|
*/
|
|
21
22
|
constructor(clientType: ClientType, config: IMSLiveConfig);
|
|
22
23
|
/**
|
|
23
24
|
* getter for client
|
|
25
|
+
*
|
|
24
26
|
* @returns {T} client of type T
|
|
25
27
|
*/
|
|
26
28
|
get client(): T;
|
|
27
29
|
/**
|
|
28
30
|
* initialize method
|
|
31
|
+
*
|
|
29
32
|
* @returns {void} promise of type void
|
|
30
33
|
*/
|
|
31
34
|
private init;
|
package/session/index.js
CHANGED
|
@@ -19,6 +19,7 @@ const ms_live_api_1 = require("./ms.live/ms.live.api");
|
|
|
19
19
|
let Session = class Session {
|
|
20
20
|
/**
|
|
21
21
|
* Session constructor
|
|
22
|
+
*
|
|
22
23
|
* @param {ClientType} clientType client type
|
|
23
24
|
* @param {IMSLiveConfig} config session configuration
|
|
24
25
|
*/
|
|
@@ -30,6 +31,7 @@ let Session = class Session {
|
|
|
30
31
|
// getter / setter
|
|
31
32
|
/**
|
|
32
33
|
* getter for client
|
|
34
|
+
*
|
|
33
35
|
* @returns {T} client of type T
|
|
34
36
|
*/
|
|
35
37
|
get client() {
|
|
@@ -38,6 +40,7 @@ let Session = class Session {
|
|
|
38
40
|
// methods
|
|
39
41
|
/**
|
|
40
42
|
* initialize method
|
|
43
|
+
*
|
|
41
44
|
* @returns {void} promise of type void
|
|
42
45
|
*/
|
|
43
46
|
init() {
|
package/session/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../session/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAsC;AACtC,yCAA4C;AAE5C,uDAAkD;AAUlD;;GAEG;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../session/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAsC;AACtC,yCAA4C;AAE5C,uDAAkD;AAUlD;;GAEG;AAEH,IAAa,OAAO,GAApB,MAAa,OAAO;IAMhB;;;;;OAKG;IACH,YAAY,UAAsB,EAAE,MAAqB;QACrD,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;QAC9B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,IAAI,EAAE,CAAC;IAChB,CAAC;IAED,kBAAkB;IAClB;;;;OAIG;IACH,IAAW,MAAM;QACb,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,UAAU;IACV;;;;OAIG;IACK,IAAI;QACR,gDAAgD;QAChD,IAAI,IAAI,CAAC,WAAW,IAAI,iBAAU,CAAC,MAAM,EAAE;YACvC,IAAI,CAAC,OAAO,GAAG,IAAI,uBAAS,CAAC,IAAI,CAAC,OAAO,CAAiB,CAAC;SAC9D;IACL,CAAC;CACJ,CAAA;AAxCY,OAAO;IADnB,IAAA,qBAAU,GAAE;;GACA,OAAO,CAwCnB;AAxCY,0BAAO"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* MS Live Room data
|
|
3
|
+
* Represents the data for a Microsoft Live Room
|
|
4
|
+
*/
|
|
2
5
|
export interface IMSRoomData {
|
|
3
6
|
id: string;
|
|
4
7
|
name: string;
|
|
@@ -22,7 +25,10 @@ export interface IMSRoomData {
|
|
|
22
25
|
created_at: Date;
|
|
23
26
|
updated_at: Date;
|
|
24
27
|
}
|
|
25
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* MS Live Room Code data
|
|
30
|
+
* Represents the data for a Microsoft Live Room code
|
|
31
|
+
*/
|
|
26
32
|
export interface IMSRoomCode {
|
|
27
33
|
code: string;
|
|
28
34
|
room_id: string;
|
|
@@ -31,9 +37,17 @@ export interface IMSRoomCode {
|
|
|
31
37
|
created_at: Date;
|
|
32
38
|
updated_at: Date;
|
|
33
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* End Room interface
|
|
42
|
+
* Represents the response when ending a live session room
|
|
43
|
+
*/
|
|
34
44
|
export interface IEndRoom {
|
|
35
45
|
message: string;
|
|
36
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* Session Recording Data interface
|
|
49
|
+
* Contains information about a recorded session including its status and identifiers
|
|
50
|
+
*/
|
|
37
51
|
export interface ISessionRecordingData {
|
|
38
52
|
id: string;
|
|
39
53
|
room_id: string;
|
|
@@ -2,24 +2,36 @@ import { IMSLiveConfig } from "./models";
|
|
|
2
2
|
import { MSLiveAuth } from "./ms.live.auth";
|
|
3
3
|
import { MSLiveBase } from "./ms.live.base";
|
|
4
4
|
import { MSLiveRoom } from "./ms.live.room";
|
|
5
|
+
/**
|
|
6
|
+
* Microsoft Live API Service
|
|
7
|
+
* Provides methods to interact with the Microsoft Live API for video conferencing
|
|
8
|
+
*/
|
|
5
9
|
export declare class MSLiveAPI extends MSLiveBase {
|
|
6
10
|
#private;
|
|
7
11
|
private _msLiveRoom;
|
|
8
12
|
private _msLiveToken;
|
|
9
13
|
private _config;
|
|
14
|
+
/**
|
|
15
|
+
* Creates a new instance of the Microsoft Live API service
|
|
16
|
+
*
|
|
17
|
+
* @param {IMSLiveConfig} config - Configuration for the Microsoft Live API client
|
|
18
|
+
*/
|
|
10
19
|
constructor(config: IMSLiveConfig);
|
|
11
20
|
/**
|
|
12
21
|
* initialize method
|
|
22
|
+
*
|
|
13
23
|
* @returns {void} promise of type void
|
|
14
24
|
*/
|
|
15
25
|
private init;
|
|
16
26
|
/**
|
|
17
27
|
* getter for MSLive API Room
|
|
28
|
+
*
|
|
18
29
|
* @returns {MSLiveRoom} msLive room instance
|
|
19
30
|
*/
|
|
20
31
|
get msLiveRoom(): MSLiveRoom;
|
|
21
32
|
/**
|
|
22
33
|
* getter for Auth API
|
|
34
|
+
*
|
|
23
35
|
* @returns {MSLiveToken} msLive room instance
|
|
24
36
|
*/
|
|
25
37
|
get msLiveToken(): MSLiveAuth;
|
|
@@ -31,7 +31,16 @@ const ms_live_auth_1 = require("./ms.live.auth");
|
|
|
31
31
|
const ms_live_base_1 = require("./ms.live.base");
|
|
32
32
|
const ms_live_room_1 = require("./ms.live.room");
|
|
33
33
|
// A service class for all REST API operations
|
|
34
|
+
/**
|
|
35
|
+
* Microsoft Live API Service
|
|
36
|
+
* Provides methods to interact with the Microsoft Live API for video conferencing
|
|
37
|
+
*/
|
|
34
38
|
let MSLiveAPI = class MSLiveAPI extends ms_live_base_1.MSLiveBase {
|
|
39
|
+
/**
|
|
40
|
+
* Creates a new instance of the Microsoft Live API service
|
|
41
|
+
*
|
|
42
|
+
* @param {IMSLiveConfig} config - Configuration for the Microsoft Live API client
|
|
43
|
+
*/
|
|
35
44
|
constructor(config) {
|
|
36
45
|
super();
|
|
37
46
|
_MSLiveAPI_instances.add(this);
|
|
@@ -48,6 +57,7 @@ let MSLiveAPI = class MSLiveAPI extends ms_live_base_1.MSLiveBase {
|
|
|
48
57
|
}
|
|
49
58
|
/**
|
|
50
59
|
* initialize method
|
|
60
|
+
*
|
|
51
61
|
* @returns {void} promise of type void
|
|
52
62
|
*/
|
|
53
63
|
init() {
|
|
@@ -58,6 +68,7 @@ let MSLiveAPI = class MSLiveAPI extends ms_live_base_1.MSLiveBase {
|
|
|
58
68
|
}
|
|
59
69
|
/**
|
|
60
70
|
* getter for MSLive API Room
|
|
71
|
+
*
|
|
61
72
|
* @returns {MSLiveRoom} msLive room instance
|
|
62
73
|
*/
|
|
63
74
|
get msLiveRoom() {
|
|
@@ -65,6 +76,7 @@ let MSLiveAPI = class MSLiveAPI extends ms_live_base_1.MSLiveBase {
|
|
|
65
76
|
}
|
|
66
77
|
/**
|
|
67
78
|
* getter for Auth API
|
|
79
|
+
*
|
|
68
80
|
* @returns {MSLiveToken} msLive room instance
|
|
69
81
|
*/
|
|
70
82
|
get msLiveToken() {
|
|
@@ -77,7 +89,7 @@ _MSLiveAPI_axiosInstance = new WeakMap(), _MSLiveAPI_msLiveAuthInstance = new We
|
|
|
77
89
|
config.headers = {
|
|
78
90
|
Authorization: `Bearer ${__classPrivateFieldGet(this, _MSLiveAPI_msLiveAuthInstance, "f").getManagementToken()}`,
|
|
79
91
|
Accept: "application/json",
|
|
80
|
-
"Content-Type": "application/json"
|
|
92
|
+
"Content-Type": "application/json"
|
|
81
93
|
};
|
|
82
94
|
return config;
|
|
83
95
|
}, (error) => Promise.reject(error));
|
|
@@ -87,12 +99,12 @@ _MSLiveAPI_axiosInstance = new WeakMap(), _MSLiveAPI_msLiveAuthInstance = new We
|
|
|
87
99
|
var _a, _b, _c;
|
|
88
100
|
console.error("Error in making API call", { response: (_a = error.response) === null || _a === void 0 ? void 0 : _a.data });
|
|
89
101
|
const originalRequest = error.config;
|
|
90
|
-
if ((((_b = error.response) === null || _b === void 0 ? void 0 : _b.status) === 403 || ((_c = error.response) === null || _c === void 0 ? void 0 : _c.status) === 401) &&
|
|
91
|
-
!originalRequest._retry) {
|
|
102
|
+
if ((((_b = error.response) === null || _b === void 0 ? void 0 : _b.status) === 403 || ((_c = error.response) === null || _c === void 0 ? void 0 : _c.status) === 401) && !originalRequest._retry) {
|
|
92
103
|
console.log("Retrying request with refreshed token");
|
|
93
104
|
originalRequest._retry = true;
|
|
94
105
|
// Force refresh Management token on error making API call
|
|
95
|
-
axios_1.default.defaults.headers.common["Authorization"] =
|
|
106
|
+
axios_1.default.defaults.headers.common["Authorization"] =
|
|
107
|
+
"Bearer " + __classPrivateFieldGet(this, _MSLiveAPI_msLiveAuthInstance, "f").getManagementToken(true);
|
|
96
108
|
try {
|
|
97
109
|
return (0, axios_1.default)(originalRequest);
|
|
98
110
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ms.live.api.js","sourceRoot":"","sources":["../../../session/ms.live/ms.live.api.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA4F;AAC5F,uCAAsC;AAEtC,iDAA4C;AAC5C,iDAA4C;AAC5C,iDAA4C;
|
|
1
|
+
{"version":3,"file":"ms.live.api.js","sourceRoot":"","sources":["../../../session/ms.live/ms.live.api.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA4F;AAC5F,uCAAsC;AAEtC,iDAA4C;AAC5C,iDAA4C;AAC5C,iDAA4C;AAU5C,8CAA8C;AAC9C;;;GAGG;AAEH,IAAa,SAAS,GAAtB,MAAa,SAAU,SAAQ,yBAAU;IAOrC;;;;OAIG;IACH,YAAY,MAAqB;QAC7B,KAAK,EAAE,CAAC;;QATZ,2CAA8B;QAC9B,gDAAgC;QAS5B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,yCAAyC;QACzC,uBAAA,IAAI,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AAC,KAAiB,EAAE,EAAE;;QAClB,OAAO,CAAC,KAAK,CAAC,0BAA0B,EAAE,EAAE,QAAQ,EAAE,MAAA,KAAK,CAAC,QAAQ,0CAAE,IAAI,EAAE,CAAC,CAAC;QAC9E,MAAM,eAAe,GAA0B,KAAK,CAAC,MAAM,CAAC;QAC5D,IAAI,CAAC,CAAA,MAAA,KAAK,CAAC,QAAQ,0CAAE,MAAM,MAAK,GAAG,IAAI,CAAA,MAAA,KAAK,CAAC,QAAQ,0CAAE,MAAM,MAAK,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE;YAC/F,OAAO,CAAC,GAAG,CAAC,uCAAuC,CAAC,CAAC;YACrD,eAAe,CAAC,MAAM,GAAG,IAAI,CAAC;YAE9B,0DAA0D;YAC1D,eAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC;gBAC1C,SAAS,GAAG,uBAAA,IAAI,qCAAoB,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;YAClE,IAAI;gBACA,OAAO,IAAA,eAAK,EAAC,eAAe,CAAC,CAAC;aACjC;YAAC,OAAO,KAAK,EAAE;gBACZ,OAAO,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;aACrC;SACJ;QACD,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC,CACJ,CAAC;AACN,CAAC;AAlGQ,SAAS;IADrB,IAAA,qBAAU,GAAE;;GACA,SAAS,CAmGrB;AAnGY,8BAAS;AAqGtB,MAAM,CAAC,OAAO,GAAG,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -5,20 +5,25 @@ import { IMSLiveConfig } from "./models";
|
|
|
5
5
|
interface IMSLiveAuth {
|
|
6
6
|
/**
|
|
7
7
|
* Authentication initialization
|
|
8
|
+
*
|
|
8
9
|
* @param {string} msLiveAccessKey msLive access key
|
|
9
10
|
* @param {string} msLiveSecret msLive secret
|
|
10
11
|
*/
|
|
11
12
|
init(msLiveAccessKey: string, msLiveSecret: string): void;
|
|
12
13
|
/**
|
|
13
14
|
* Get management key
|
|
15
|
+
*
|
|
14
16
|
* @param {boolean} forceNew boolean to force new management key
|
|
17
|
+
* @returns {string} The management token
|
|
15
18
|
*/
|
|
16
19
|
getManagementToken(forceNew?: boolean): string;
|
|
17
20
|
/**
|
|
18
21
|
* Get management key
|
|
22
|
+
*
|
|
19
23
|
* @param {string} roomId msLive room Id
|
|
20
24
|
* @param {string} userRef peer's user's ref
|
|
21
25
|
* @param {string} role peer's role
|
|
26
|
+
* @returns {string} The authentication token
|
|
22
27
|
*/
|
|
23
28
|
getAuthToken(roomId: string, userRef: string, role: string): string;
|
|
24
29
|
}
|
|
@@ -32,17 +37,33 @@ export declare class MSLiveAuth implements IMSLiveAuth {
|
|
|
32
37
|
private _managementToken;
|
|
33
38
|
/**
|
|
34
39
|
* MSLive auth constructor
|
|
40
|
+
*
|
|
35
41
|
* @param { IMSLiveConfig } config msLive config
|
|
36
42
|
*/
|
|
37
43
|
constructor(config: IMSLiveConfig);
|
|
38
44
|
/**
|
|
39
45
|
* Get MSLive Credentials
|
|
46
|
+
*
|
|
40
47
|
* @param {string} msLiveAccessKey msLive access key
|
|
41
48
|
* @param {string} msLiveSecretKey msLive secret key
|
|
42
49
|
* @returns {void} promise of type void
|
|
43
50
|
*/
|
|
44
51
|
init(msLiveAccessKey: string, msLiveSecretKey: string): void;
|
|
52
|
+
/**
|
|
53
|
+
* Generates a new management token if the existing one is expired or if forced
|
|
54
|
+
*
|
|
55
|
+
* @param {boolean} forceNew - Whether to force a new management token
|
|
56
|
+
* @returns {string} The management token
|
|
57
|
+
*/
|
|
45
58
|
getManagementToken(forceNew?: boolean): string;
|
|
59
|
+
/**
|
|
60
|
+
* Generates a new authentication token for a peer
|
|
61
|
+
*
|
|
62
|
+
* @param {string} roomId - The room ID
|
|
63
|
+
* @param {string} userId - The user ID
|
|
64
|
+
* @param {string} role - The role of the peer
|
|
65
|
+
* @returns {string} The authentication token
|
|
66
|
+
*/
|
|
46
67
|
getAuthToken(roomId: string, userId: string, role: string): string;
|
|
47
68
|
}
|
|
48
69
|
export {};
|
|
@@ -28,6 +28,7 @@ const uuid_1 = require("uuid");
|
|
|
28
28
|
let MSLiveAuth = class MSLiveAuth {
|
|
29
29
|
/**
|
|
30
30
|
* MSLive auth constructor
|
|
31
|
+
*
|
|
31
32
|
* @param { IMSLiveConfig } config msLive config
|
|
32
33
|
*/
|
|
33
34
|
constructor(config) {
|
|
@@ -36,6 +37,7 @@ let MSLiveAuth = class MSLiveAuth {
|
|
|
36
37
|
}
|
|
37
38
|
/**
|
|
38
39
|
* Get MSLive Credentials
|
|
40
|
+
*
|
|
39
41
|
* @param {string} msLiveAccessKey msLive access key
|
|
40
42
|
* @param {string} msLiveSecretKey msLive secret key
|
|
41
43
|
* @returns {void} promise of type void
|
|
@@ -46,11 +48,17 @@ let MSLiveAuth = class MSLiveAuth {
|
|
|
46
48
|
this._managementToken = this.getManagementToken(true);
|
|
47
49
|
}
|
|
48
50
|
// Generate new Management token, if expired or forced
|
|
51
|
+
/**
|
|
52
|
+
* Generates a new management token if the existing one is expired or if forced
|
|
53
|
+
*
|
|
54
|
+
* @param {boolean} forceNew - Whether to force a new management token
|
|
55
|
+
* @returns {string} The management token
|
|
56
|
+
*/
|
|
49
57
|
getManagementToken(forceNew) {
|
|
50
58
|
if (forceNew || __classPrivateFieldGet(this, _MSLiveAuth_instances, "m", _MSLiveAuth_isTokenExpired).call(this, this._managementToken)) {
|
|
51
59
|
const payload = {
|
|
52
60
|
access_key: this._msLiveAccessKey,
|
|
53
|
-
type:
|
|
61
|
+
type: "management",
|
|
54
62
|
version: 2,
|
|
55
63
|
iat: Math.floor(Date.now() / 1000),
|
|
56
64
|
nbf: Math.floor(Date.now() / 1000)
|
|
@@ -60,13 +68,21 @@ let MSLiveAuth = class MSLiveAuth {
|
|
|
60
68
|
return this._managementToken;
|
|
61
69
|
}
|
|
62
70
|
// Generate new Auth token for a peer
|
|
71
|
+
/**
|
|
72
|
+
* Generates a new authentication token for a peer
|
|
73
|
+
*
|
|
74
|
+
* @param {string} roomId - The room ID
|
|
75
|
+
* @param {string} userId - The user ID
|
|
76
|
+
* @param {string} role - The role of the peer
|
|
77
|
+
* @returns {string} The authentication token
|
|
78
|
+
*/
|
|
63
79
|
getAuthToken(roomId, userId, role) {
|
|
64
80
|
const payload = {
|
|
65
81
|
access_key: this._msLiveAccessKey,
|
|
66
82
|
room_id: roomId,
|
|
67
83
|
user_id: userId,
|
|
68
84
|
role: role,
|
|
69
|
-
type:
|
|
85
|
+
type: "app",
|
|
70
86
|
version: 2,
|
|
71
87
|
iat: Math.floor(Date.now() / 1000),
|
|
72
88
|
nbf: Math.floor(Date.now() / 1000)
|
|
@@ -76,8 +92,8 @@ let MSLiveAuth = class MSLiveAuth {
|
|
|
76
92
|
};
|
|
77
93
|
_MSLiveAuth_instances = new WeakSet(), _MSLiveAuth_signPayloadToToken = function _MSLiveAuth_signPayloadToToken(payload) {
|
|
78
94
|
const token = jsonwebtoken_1.default.sign(payload, this._msLiveSecretKey, {
|
|
79
|
-
algorithm:
|
|
80
|
-
expiresIn:
|
|
95
|
+
algorithm: "HS256",
|
|
96
|
+
expiresIn: "24h",
|
|
81
97
|
jwtid: (0, uuid_1.v4)()
|
|
82
98
|
});
|
|
83
99
|
return token;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ms.live.auth.js","sourceRoot":"","sources":["../../../session/ms.live/ms.live.auth.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,uCAAsC;AAEtC,gEAA+B;AAC/B,+BAAoC;
|
|
1
|
+
{"version":3,"file":"ms.live.auth.js","sourceRoot":"","sources":["../../../session/ms.live/ms.live.auth.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,uCAAsC;AAEtC,gEAA+B;AAC/B,+BAAoC;AA+CpC;;GAEG;AAEH,IAAa,UAAU,GAAvB,M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
10
|
* getter for msLive instance
|
|
11
|
+
*
|
|
11
12
|
* @returns {AxiosInstance} msLive instance
|
|
12
13
|
*/
|
|
13
14
|
get server(): AxiosInstance;
|
|
14
15
|
/**
|
|
15
16
|
* setter for msLive instance
|
|
17
|
+
*
|
|
16
18
|
* @param {MSLiveAuth} value msLive instance
|
|
17
19
|
*/
|
|
18
20
|
set server(value: AxiosInstance);
|
|
19
21
|
/**
|
|
20
22
|
* getter for msLive auth
|
|
23
|
+
*
|
|
21
24
|
* @returns {MSLiveAuth} msLive auth instance
|
|
22
25
|
*/
|
|
23
26
|
get auth(): MSLiveAuth;
|
|
24
27
|
/**
|
|
25
28
|
* setter for msLive auth instance
|
|
29
|
+
*
|
|
26
30
|
* @param {MSLiveAuth} value msLive auth instance
|
|
27
31
|
*/
|
|
28
32
|
set auth(value: MSLiveAuth);
|
|
@@ -8,6 +8,7 @@ class MSLiveBase {
|
|
|
8
8
|
// getter / setter
|
|
9
9
|
/**
|
|
10
10
|
* getter for msLive instance
|
|
11
|
+
*
|
|
11
12
|
* @returns {AxiosInstance} msLive instance
|
|
12
13
|
*/
|
|
13
14
|
get server() {
|
|
@@ -15,6 +16,7 @@ class MSLiveBase {
|
|
|
15
16
|
}
|
|
16
17
|
/**
|
|
17
18
|
* setter for msLive instance
|
|
19
|
+
*
|
|
18
20
|
* @param {MSLiveAuth} value msLive instance
|
|
19
21
|
*/
|
|
20
22
|
set server(value) {
|
|
@@ -22,6 +24,7 @@ class MSLiveBase {
|
|
|
22
24
|
}
|
|
23
25
|
/**
|
|
24
26
|
* getter for msLive auth
|
|
27
|
+
*
|
|
25
28
|
* @returns {MSLiveAuth} msLive auth instance
|
|
26
29
|
*/
|
|
27
30
|
get auth() {
|
|
@@ -29,6 +32,7 @@ class MSLiveBase {
|
|
|
29
32
|
}
|
|
30
33
|
/**
|
|
31
34
|
* setter for msLive auth instance
|
|
35
|
+
*
|
|
32
36
|
* @param {MSLiveAuth} value msLive auth instance
|
|
33
37
|
*/
|
|
34
38
|
set auth(value) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ms.live.base.js","sourceRoot":"","sources":["../../../session/ms.live/ms.live.base.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,MAAsB,UAAU;IAK5B,kBAAkB;IAClB
|
|
1
|
+
{"version":3,"file":"ms.live.base.js","sourceRoot":"","sources":["../../../session/ms.live/ms.live.base.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,MAAsB,UAAU;IAK5B,kBAAkB;IAClB;;;;OAIG;IACH,IAAW,MAAM;QACb,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IACD;;;;OAIG;IACH,IAAW,MAAM,CAAC,KAAoB;QAClC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACzB,CAAC;IAED;;;;OAIG;IACH,IAAW,IAAI;QACX,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAED;;;;OAIG;IACH,IAAW,IAAI,CAAC,KAAiB;QAC7B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;CACJ;AAxCD,gCAwCC"}
|
|
@@ -34,8 +34,8 @@ interface IMSLiveRoom {
|
|
|
34
34
|
*/
|
|
35
35
|
enableRoom(roomId: string): Promise<IMSRoomData>;
|
|
36
36
|
/**
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
* Remove all peers from the room by roomId
|
|
38
|
+
*/
|
|
39
39
|
endRoomForAll(roomId: string): Promise<IEndRoom>;
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
@@ -44,11 +44,13 @@ interface IMSLiveRoom {
|
|
|
44
44
|
export declare class MSLiveRoom extends MSLiveBase implements IMSLiveRoom {
|
|
45
45
|
/**
|
|
46
46
|
* MSLive room constructor
|
|
47
|
+
*
|
|
47
48
|
* @param { AxiosInstance } server Axios instance
|
|
48
49
|
*/
|
|
49
50
|
constructor(server: AxiosInstance);
|
|
50
51
|
/**
|
|
51
52
|
* Create a new room in MSLive
|
|
53
|
+
*
|
|
52
54
|
* @param {string} name room name
|
|
53
55
|
* @param {string} description room description
|
|
54
56
|
* @param {string} templateId 100ms template id
|
|
@@ -57,60 +59,70 @@ export declare class MSLiveRoom extends MSLiveBase implements IMSLiveRoom {
|
|
|
57
59
|
createRoom(name: string, description: string, templateId: string): Promise<IMSRoomData>;
|
|
58
60
|
/**
|
|
59
61
|
* Get 100ms room by id
|
|
62
|
+
*
|
|
60
63
|
* @param {string} roomId 100ms room id
|
|
61
64
|
* @returns {Promise<IMSRoomData>} promise of the result to get a room
|
|
62
65
|
*/
|
|
63
66
|
findRoom(roomId: string): Promise<IMSRoomData>;
|
|
64
67
|
/**
|
|
65
68
|
* Get all rooms
|
|
69
|
+
*
|
|
66
70
|
* @returns {Promise<IMSRoomCode[]>} promise of the result to get room codes
|
|
67
71
|
*/
|
|
68
72
|
getAllRooms(): Promise<IMSRoomData[]>;
|
|
69
73
|
/**
|
|
70
74
|
* Create room codes
|
|
75
|
+
*
|
|
71
76
|
* @param {string} roomId 100ms room id
|
|
72
77
|
* @returns {Promise<IMSRoomCode[]>} promise of the result to create room codes
|
|
73
78
|
*/
|
|
74
79
|
createRoomCodes(roomId: string): Promise<IMSRoomCode[]>;
|
|
75
80
|
/**
|
|
76
81
|
* Get room codes
|
|
82
|
+
*
|
|
77
83
|
* @param {string} roomId 100ms room id
|
|
78
84
|
* @returns {Promise<IMSRoomCode[]>} promise of the result to get room codes
|
|
79
85
|
*/
|
|
80
86
|
getRoomCodes(roomId: string): Promise<IMSRoomCode[]>;
|
|
81
87
|
/**
|
|
82
88
|
* Enables 100ms room by roomId
|
|
89
|
+
*
|
|
83
90
|
* @param {string} roomId 100ms room id
|
|
84
91
|
* @returns {Promise<IMSRoomData>} promise of the result to enable room
|
|
85
92
|
*/
|
|
86
93
|
enableRoom(roomId: string): Promise<IMSRoomData>;
|
|
87
94
|
/**
|
|
88
95
|
* Disables 100ms room by roomId
|
|
96
|
+
*
|
|
89
97
|
* @param {string} roomId 100ms room id
|
|
90
98
|
* @returns {Promise<IMSRoomData>} promise of the result to disable room
|
|
91
99
|
*/
|
|
92
100
|
disableRoom(roomId: string): Promise<IMSRoomData>;
|
|
93
101
|
/**
|
|
94
102
|
* Remove all peers from the room by roomId
|
|
103
|
+
*
|
|
95
104
|
* @param {string} roomId 100ms room id
|
|
96
105
|
* @returns {Promise<IEndRoom>} returns string about room ending
|
|
97
106
|
*/
|
|
98
107
|
endRoomForAll(roomId: string): Promise<IEndRoom>;
|
|
99
108
|
/**
|
|
100
109
|
* Get recording by recording Id
|
|
110
|
+
*
|
|
101
111
|
* @param {string} recordingId recording Id
|
|
102
112
|
* @returns {Promise<IEndRoom>} returns data about session recording
|
|
103
113
|
*/
|
|
104
114
|
getRecording(recordingId: string): Promise<ISessionRecordingData>;
|
|
105
115
|
/**
|
|
106
116
|
* Start session recording by roomId
|
|
107
|
-
*
|
|
117
|
+
*
|
|
108
118
|
* @param {string} subdomain template's subdomain
|
|
109
|
-
* @
|
|
119
|
+
* @param {string} roomId 100ms room id
|
|
120
|
+
* @returns {Promise<ISessionRecordingData>} returns data about session recording
|
|
110
121
|
*/
|
|
111
122
|
startRecording(subdomain: string, roomId: string): Promise<ISessionRecordingData>;
|
|
112
123
|
/**
|
|
113
124
|
* Stop session recording by roomId
|
|
125
|
+
*
|
|
114
126
|
* @param {string} roomId 100ms room id
|
|
115
127
|
* @returns {Promise<IMSRoomData>} returns data about session recording
|
|
116
128
|
*/
|