@bwi-mentorspaces/application-utils-npm 0.0.50 → 0.0.51

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bwi-mentorspaces/application-utils-npm",
3
- "version": "0.0.50",
3
+ "version": "0.0.51",
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",
@@ -31,3 +31,6 @@ export interface IMSRoomCode {
31
31
  created_at: Date;
32
32
  updated_at: Date;
33
33
  }
34
+ export interface IEndRoom {
35
+ message: string;
36
+ }
@@ -1,3 +1,3 @@
1
- import { IMSRoomData, IMSRoomCode } from "./_/room.data";
1
+ import { IMSRoomData, IMSRoomCode, IEndRoom } from "./_/room.data";
2
2
  import { IMSLiveConfig } from "./_/ms.live.config";
3
- export { IMSLiveConfig, IMSRoomData, IMSRoomCode };
3
+ export { IMSLiveConfig, IMSRoomData, IMSRoomCode, IEndRoom };
@@ -1,4 +1,4 @@
1
- import { IMSRoomCode, IMSRoomData } from "./models";
1
+ import { IEndRoom, IMSRoomCode, IMSRoomData } from "./models";
2
2
  import { MSLiveBase } from "./ms.live.base";
3
3
  import { AxiosInstance } from "axios";
4
4
  /**
@@ -33,6 +33,10 @@ interface IMSLiveRoom {
33
33
  * Enables 100ms room by roomId
34
34
  */
35
35
  enableRoom(roomId: string): Promise<IMSRoomData>;
36
+ /**
37
+ * Remove all peers from the room by roomId
38
+ */
39
+ endRoomForAll(roomId: string): Promise<IEndRoom>;
36
40
  }
37
41
  /**
38
42
  * MSLive Room API implementation
@@ -74,6 +78,12 @@ export declare class MSLiveRoom extends MSLiveBase implements IMSLiveRoom {
74
78
  * @returns {Promise<IMSRoomCode[]>} promise of the result to get room codes
75
79
  */
76
80
  getRoomCodes(roomId: string): Promise<IMSRoomCode[]>;
81
+ /**
82
+ * Enables 100ms room by roomId
83
+ * @param {string} roomId 100ms room id
84
+ * @returns {Promise<IMSRoomData>} promise of the result to enable room
85
+ */
86
+ enableRoom(roomId: string): Promise<IMSRoomData>;
77
87
  /**
78
88
  * Disables 100ms room by roomId
79
89
  * @param {string} roomId 100ms room id
@@ -81,10 +91,10 @@ export declare class MSLiveRoom extends MSLiveBase implements IMSLiveRoom {
81
91
  */
82
92
  disableRoom(roomId: string): Promise<IMSRoomData>;
83
93
  /**
84
- * Enables 100ms room by roomId
94
+ * Remove all peers from the room by roomId
85
95
  * @param {string} roomId 100ms room id
86
- * @returns {Promise<IMSRoomData>} promise of the result to enable room
96
+ * @returns {Promise<IEndRoom>} returns string about room ending
87
97
  */
88
- enableRoom(roomId: string): Promise<IMSRoomData>;
98
+ endRoomForAll(roomId: string): Promise<IEndRoom>;
89
99
  }
90
100
  export {};
@@ -95,6 +95,17 @@ let MSLiveRoom = class MSLiveRoom extends ms_live_base_1.MSLiveBase {
95
95
  return roomCode.data.data;
96
96
  });
97
97
  }
98
+ /**
99
+ * Enables 100ms room by roomId
100
+ * @param {string} roomId 100ms room id
101
+ * @returns {Promise<IMSRoomData>} promise of the result to enable room
102
+ */
103
+ enableRoom(roomId) {
104
+ return __awaiter(this, void 0, void 0, function* () {
105
+ const roomData = yield this.server.post(`/rooms/${roomId}`, { enabled: true });
106
+ return roomData.data;
107
+ });
108
+ }
98
109
  /**
99
110
  * Disables 100ms room by roomId
100
111
  * @param {string} roomId 100ms room id
@@ -107,13 +118,13 @@ let MSLiveRoom = class MSLiveRoom extends ms_live_base_1.MSLiveBase {
107
118
  });
108
119
  }
109
120
  /**
110
- * Enables 100ms room by roomId
121
+ * Remove all peers from the room by roomId
111
122
  * @param {string} roomId 100ms room id
112
- * @returns {Promise<IMSRoomData>} promise of the result to enable room
123
+ * @returns {Promise<IEndRoom>} returns string about room ending
113
124
  */
114
- enableRoom(roomId) {
125
+ endRoomForAll(roomId) {
115
126
  return __awaiter(this, void 0, void 0, function* () {
116
- const roomData = yield this.server.post(`/rooms/${roomId}`, { enabled: true });
127
+ const roomData = yield this.server.post(`/active-rooms/${roomId}/end-room`);
117
128
  return roomData.data;
118
129
  });
119
130
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ms.live.room.js","sourceRoot":"","sources":["../../../session/ms.live/ms.live.room.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,uCAAsC;AAEtC,iDAA4C;AA4C5C;;GAEG;AAEI,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,yBAAU;IAEtC;;;OAGG;IACH,YAAY,MAAqB;QAC7B,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACxB,CAAC;IAED;;;;;;OAMG;IACG,UAAU,CAAC,IAAY,EAAE,WAAmB,EAAE,UAAkB;;YAClE,MAAM,OAAO,GAAG;gBACZ,IAAI,EAAE,IAAI;gBACV,WAAW,EAAE,WAAW;gBACxB,WAAW,EAAE,UAAU;gBACvB,MAAM,EAAE,IAAI;aACf,CAAC;YAEF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;YAC3D,OAAO,QAAQ,CAAC,IAAI,CAAC;QACzB,CAAC;KAAA;IAED;;;;OAIG;IACG,QAAQ,CAAC,MAAc;;YACzB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,UAAU,MAAM,EAAE,CAAC,CAAC;YAC3D,OAAO,QAAQ,CAAC,IAAI,CAAA;QACxB,CAAC;KAAA;IAED;;;OAGG;IACG,WAAW;;YACb,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;YACjD,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAA;QAC7B,CAAC;KAAA;IAED;;;;OAIG;IACG,eAAe,CAAC,MAAc;;YAChC,MA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