plugnmeet-sdk-js 1.0.2 → 1.2.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.
- package/README.md +1 -1
- package/{PlugNmeet.d.ts → dist/PlugNmeet.d.ts} +0 -0
- package/dist/PlugNmeet.js +198 -0
- package/dist/PlugNmeet.js.map +1 -0
- package/{api.d.ts → dist/api.d.ts} +1 -1
- package/dist/api.js +67 -0
- package/dist/api.js.map +1 -0
- package/dist/cjs/PlugNmeet.d.ts +76 -0
- package/{PlugNmeet.js → dist/cjs/PlugNmeet.js} +1 -0
- package/dist/cjs/PlugNmeet.js.map +1 -0
- package/dist/cjs/api.d.ts +6 -0
- package/{api.js → dist/cjs/api.js} +1 -0
- package/dist/cjs/api.js.map +1 -0
- package/{index.d.ts → dist/cjs/index.d.ts} +1 -1
- package/{index.js → dist/cjs/index.js} +1 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/types/RecordingDownloadToken.d.ts +8 -0
- package/{types → dist/cjs/types}/RecordingDownloadToken.js +1 -0
- package/dist/cjs/types/RecordingDownloadToken.js.map +1 -0
- package/{types → dist/cjs/types}/activeRoomInfo.d.ts +5 -5
- package/{types → dist/cjs/types}/activeRoomInfo.js +1 -0
- package/dist/cjs/types/activeRoomInfo.js.map +1 -0
- package/{types → dist/cjs/types}/activeRoomsInfo.d.ts +1 -1
- package/{types → dist/cjs/types}/activeRoomsInfo.js +1 -0
- package/dist/cjs/types/activeRoomsInfo.js.map +1 -0
- package/{types → dist/cjs/types}/clientFiles.d.ts +1 -1
- package/{types → dist/cjs/types}/clientFiles.js +1 -0
- package/dist/cjs/types/clientFiles.js.map +1 -0
- package/{types → dist/cjs/types}/createRoom.d.ts +19 -13
- package/{types → dist/cjs/types}/createRoom.js +1 -0
- package/dist/cjs/types/createRoom.js.map +1 -0
- package/dist/cjs/types/deleteRecordings.d.ts +7 -0
- package/{types → dist/cjs/types}/deleteRecordings.js +1 -0
- package/dist/cjs/types/deleteRecordings.js.map +1 -0
- package/dist/cjs/types/endRoom.d.ts +7 -0
- package/{types → dist/cjs/types}/endRoom.js +1 -0
- package/dist/cjs/types/endRoom.js.map +1 -0
- package/{types → dist/cjs/types}/fetchRecordings.d.ts +4 -4
- package/{types → dist/cjs/types}/fetchRecordings.js +1 -0
- package/dist/cjs/types/fetchRecordings.js.map +1 -0
- package/dist/cjs/types/isRoomActive.d.ts +7 -0
- package/{types → dist/cjs/types}/isRoomActive.js +1 -0
- package/dist/cjs/types/isRoomActive.js.map +1 -0
- package/{types → dist/cjs/types}/joinToken.d.ts +4 -4
- package/{types → dist/cjs/types}/joinToken.js +1 -0
- package/dist/cjs/types/joinToken.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/types/RecordingDownloadToken.d.ts +8 -0
- package/dist/types/RecordingDownloadToken.js +2 -0
- package/dist/types/RecordingDownloadToken.js.map +1 -0
- package/dist/types/activeRoomInfo.d.ts +34 -0
- package/dist/types/activeRoomInfo.js +2 -0
- package/dist/types/activeRoomInfo.js.map +1 -0
- package/dist/types/activeRoomsInfo.d.ts +6 -0
- package/dist/types/activeRoomsInfo.js +2 -0
- package/dist/types/activeRoomsInfo.js.map +1 -0
- package/dist/types/clientFiles.d.ts +6 -0
- package/dist/types/clientFiles.js +2 -0
- package/dist/types/clientFiles.js.map +1 -0
- package/dist/types/createRoom.d.ts +82 -0
- package/dist/types/createRoom.js +2 -0
- package/dist/types/createRoom.js.map +1 -0
- package/dist/types/deleteRecordings.d.ts +7 -0
- package/dist/types/deleteRecordings.js +2 -0
- package/dist/types/deleteRecordings.js.map +1 -0
- package/dist/types/endRoom.d.ts +7 -0
- package/dist/types/endRoom.js +2 -0
- package/dist/types/endRoom.js.map +1 -0
- package/dist/types/fetchRecordings.d.ts +27 -0
- package/dist/types/fetchRecordings.js +2 -0
- package/dist/types/fetchRecordings.js.map +1 -0
- package/dist/types/isRoomActive.d.ts +7 -0
- package/dist/types/isRoomActive.js +2 -0
- package/dist/types/isRoomActive.js.map +1 -0
- package/dist/types/joinToken.d.ts +21 -0
- package/dist/types/joinToken.js +2 -0
- package/dist/types/joinToken.js.map +1 -0
- package/package.json +22 -12
- package/src/PlugNmeet.ts +255 -0
- package/src/api.ts +92 -0
- package/src/index.ts +48 -0
- package/src/types/RecordingDownloadToken.ts +9 -0
- package/src/types/activeRoomInfo.ts +38 -0
- package/src/types/activeRoomsInfo.ts +7 -0
- package/src/types/clientFiles.ts +6 -0
- package/src/types/createRoom.ts +94 -0
- package/src/types/deleteRecordings.ts +8 -0
- package/src/types/endRoom.ts +8 -0
- package/src/types/fetchRecordings.ts +30 -0
- package/src/types/isRoomActive.ts +8 -0
- package/src/types/joinToken.ts +25 -0
- package/types/RecordingDownloadToken.d.ts +0 -8
- package/types/deleteRecordings.d.ts +0 -7
- package/types/endRoom.d.ts +0 -7
- package/types/isRoomActive.d.ts +0 -7
package/README.md
CHANGED
|
File without changes
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { prepareAPI, sendRequest } from './api';
|
|
2
|
+
export class PlugNmeet {
|
|
3
|
+
/**
|
|
4
|
+
* @param serverUrl plugNmeet server URL
|
|
5
|
+
* @param apiKey plugNmeet API_Key
|
|
6
|
+
* @param apiSecret plugNmeet API_Secret
|
|
7
|
+
*/
|
|
8
|
+
constructor(serverUrl, apiKey, apiSecret) {
|
|
9
|
+
this.defaultPath = '/auth';
|
|
10
|
+
prepareAPI(serverUrl + this.defaultPath, apiKey, apiSecret);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Create new room
|
|
14
|
+
* @param params: CreateRoomParams
|
|
15
|
+
* @returns Promise<CreateRoomResponse>
|
|
16
|
+
*/
|
|
17
|
+
async createRoom(params) {
|
|
18
|
+
const output = await sendRequest('/room/create', params);
|
|
19
|
+
if (!output.status) {
|
|
20
|
+
return {
|
|
21
|
+
status: false,
|
|
22
|
+
msg: output.response,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
return {
|
|
26
|
+
status: output.response.status,
|
|
27
|
+
msg: output.response.msg,
|
|
28
|
+
roomInfo: output.response.roomInfo,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Generate join token
|
|
33
|
+
* @param params: JoinTokenParams
|
|
34
|
+
* @returns Promise<JoinTokenResponse>
|
|
35
|
+
*/
|
|
36
|
+
async getJoinToken(params) {
|
|
37
|
+
const output = await sendRequest('/room/getJoinToken', params);
|
|
38
|
+
if (!output.status) {
|
|
39
|
+
return {
|
|
40
|
+
status: false,
|
|
41
|
+
msg: output.response,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
status: output.response.status,
|
|
46
|
+
msg: output.response.msg,
|
|
47
|
+
token: output.response.token,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* If room is active or not
|
|
52
|
+
* @param params: IsRoomActiveParams
|
|
53
|
+
* @returns Promise<IsRoomActiveResponse>
|
|
54
|
+
*/
|
|
55
|
+
async isRoomActive(params) {
|
|
56
|
+
const output = await sendRequest('/room/isRoomActive', params);
|
|
57
|
+
if (!output.status) {
|
|
58
|
+
return {
|
|
59
|
+
status: false,
|
|
60
|
+
msg: output.response,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
status: output.response.status,
|
|
65
|
+
msg: output.response.msg,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Get active room information
|
|
70
|
+
* @param params: ActiveRoomInfoParams
|
|
71
|
+
* @returns Promise<ActiveRoomInfoResponse>
|
|
72
|
+
*/
|
|
73
|
+
async getActiveRoomInfo(params) {
|
|
74
|
+
const output = await sendRequest('/room/getActiveRoomInfo', params);
|
|
75
|
+
if (!output.status) {
|
|
76
|
+
return {
|
|
77
|
+
status: false,
|
|
78
|
+
msg: output.response,
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
status: output.response.status,
|
|
83
|
+
msg: output.response.msg,
|
|
84
|
+
room: output.response.room,
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Get all active rooms
|
|
89
|
+
* @returns Promise<ActiveRoomsInfoResponse>
|
|
90
|
+
*/
|
|
91
|
+
async getActiveRoomsInfo() {
|
|
92
|
+
const output = await sendRequest('/room/getActiveRoomsInfo', {});
|
|
93
|
+
if (!output.status) {
|
|
94
|
+
return {
|
|
95
|
+
status: false,
|
|
96
|
+
msg: output.response,
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
return {
|
|
100
|
+
status: output.response.status,
|
|
101
|
+
msg: output.response.msg,
|
|
102
|
+
rooms: output.response.rooms,
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* End active room
|
|
107
|
+
* @param params: EndRoomParams
|
|
108
|
+
* @returns Promise<EndRoomResponse>
|
|
109
|
+
*/
|
|
110
|
+
async endRoom(params) {
|
|
111
|
+
const output = await sendRequest('/room/endRoom', params);
|
|
112
|
+
if (!output.status) {
|
|
113
|
+
return {
|
|
114
|
+
status: false,
|
|
115
|
+
msg: output.response,
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
return {
|
|
119
|
+
status: output.response.status,
|
|
120
|
+
msg: output.response.msg,
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Fetch recordings
|
|
125
|
+
* @param params: FetchRecordingsParams
|
|
126
|
+
* @returns Promise<FetchRecordingsResponse>
|
|
127
|
+
*/
|
|
128
|
+
async fetchRecordings(params) {
|
|
129
|
+
const output = await sendRequest('/recording/fetch', params);
|
|
130
|
+
if (!output.status) {
|
|
131
|
+
return {
|
|
132
|
+
status: false,
|
|
133
|
+
msg: output.response,
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
return {
|
|
137
|
+
status: output.response.status,
|
|
138
|
+
msg: output.response.msg,
|
|
139
|
+
result: output.response.result,
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Delete recording
|
|
144
|
+
* @param params: DeleteRecordingsParams
|
|
145
|
+
* @returns Promise<DeleteRecordingsResponse>
|
|
146
|
+
*/
|
|
147
|
+
async deleteRecordings(params) {
|
|
148
|
+
const output = await sendRequest('/recording/delete', params);
|
|
149
|
+
if (!output.status) {
|
|
150
|
+
return {
|
|
151
|
+
status: false,
|
|
152
|
+
msg: output.response,
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
return {
|
|
156
|
+
status: output.response.status,
|
|
157
|
+
msg: output.response.msg,
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* @returns Promise<ClientFilesResponse>
|
|
162
|
+
*/
|
|
163
|
+
async getClientFiles() {
|
|
164
|
+
const output = await sendRequest('/getClientFiles', {});
|
|
165
|
+
if (!output.status) {
|
|
166
|
+
return {
|
|
167
|
+
status: false,
|
|
168
|
+
msg: output.response,
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
return {
|
|
172
|
+
status: output.response.status,
|
|
173
|
+
msg: output.response.msg,
|
|
174
|
+
css: output.response.css,
|
|
175
|
+
js: output.response.js,
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Generate token to download recording
|
|
180
|
+
* @param params: RecordingDownloadTokenParams
|
|
181
|
+
* @returns Promise<RecordingDownloadTokenResponse>
|
|
182
|
+
*/
|
|
183
|
+
async getRecordingDownloadToken(params) {
|
|
184
|
+
const output = await sendRequest('/recording/getDownloadToken', params);
|
|
185
|
+
if (!output.status) {
|
|
186
|
+
return {
|
|
187
|
+
status: false,
|
|
188
|
+
msg: output.response,
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
return {
|
|
192
|
+
status: output.response.status,
|
|
193
|
+
msg: output.response.msg,
|
|
194
|
+
token: output.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ecure = true, _apiKey = "", _apiSecret = "";
|
|
5
|
+
export const prepareAPI = (apiEndPointURL, apiKey, apiSecret) => {
|
|
6
|
+
_apiKey = apiKey;
|
|
7
|
+
_apiSecret = apiSecret;
|
|
8
|
+
const url = new URL(apiEndPointURL);
|
|
9
|
+
let port = url.protocol === 'https:' ? 443 : 80;
|
|
10
|
+
isSecure = url.protocol === 'https:' ?? false;
|
|
11
|
+
// use port if supplied with url
|
|
12
|
+
if (url.port) {
|
|
13
|
+
port = Number(url.port);
|
|
14
|
+
}
|
|
15
|
+
mainOptions = {
|
|
16
|
+
hostname: url.hostname,
|
|
17
|
+
path: url.pathname,
|
|
18
|
+
method: 'POST',
|
|
19
|
+
port,
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
const prepareHeader = (body) => {
|
|
23
|
+
const signature = createHmac('sha256', _apiSecret)
|
|
24
|
+
.update(body)
|
|
25
|
+
.digest('hex');
|
|
26
|
+
const headers = {
|
|
27
|
+
'Content-Type': 'application/json',
|
|
28
|
+
'API-KEY': _apiKey,
|
|
29
|
+
'HASH-SIGNATURE': signature,
|
|
30
|
+
};
|
|
31
|
+
return headers;
|
|
32
|
+
};
|
|
33
|
+
export const sendRequest = async (path, body) => {
|
|
34
|
+
return new Promise((resolve) => {
|
|
35
|
+
const output = {
|
|
36
|
+
status: false,
|
|
37
|
+
response: undefined,
|
|
38
|
+
};
|
|
39
|
+
const chunk = JSON.stringify(body);
|
|
40
|
+
const options = { ...mainOptions };
|
|
41
|
+
options.path += path;
|
|
42
|
+
options.headers = prepareHeader(chunk);
|
|
43
|
+
const req = (isSecure ? https : http).request(options, (res) => {
|
|
44
|
+
const body = [];
|
|
45
|
+
res.on('data', (chunk) => body.push(chunk));
|
|
46
|
+
res.on('end', () => {
|
|
47
|
+
const resString = Buffer.concat(body).toString();
|
|
48
|
+
try {
|
|
49
|
+
output.status = true;
|
|
50
|
+
output.response = JSON.parse(resString);
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
output.status = false;
|
|
54
|
+
output.response = error;
|
|
55
|
+
}
|
|
56
|
+
resolve(output);
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
req.on('error', (error) => {
|
|
60
|
+
output.response = error.message;
|
|
61
|
+
resolve(output);
|
|
62
|
+
});
|
|
63
|
+
req.write(chunk);
|
|
64
|
+
req.end();
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=api.js.map
|
package/dist/api.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAyB,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,IAAI,WAA2B,EAC7B,QAAQ,GAAG,IAAI,EAAE,OAAO,GAAG,EAAE,EAAE,UAAU,GAAG,EAAE,CAAC;AAOjD,MAAM,CAAC,MAAM,UAAU,GAAG,CACxB,cAAsB,EACtB,MAAc,EACd,SAAiB,EACjB,EAAE;IACF,OAAO,GAAG,MAAM,CAAC;IACjB,UAAU,GAAG,SAAS,CAAC;IAEvB,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,cAAc,CAAC,CAAC;IACpC,IAAI,IAAI,GAAG,GAAG,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;IAChD,QAAQ,GAAG,GAAG,CAAC,QAAQ,KAAK,QAAQ,IAAI,KAAK,CAAC;IAE9C,gCAAgC;IAChC,IAAI,GAAG,CAAC,IAAI,EAAE;QACZ,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;KACzB;IAED,WAAW,GAAG;QACZ,QAAQ,EAAE,GAAG,CAAC,QAAQ;QACtB,IAAI,EAAE,GAAG,CAAC,QAAQ;QAClB,MA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MAAM,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;gBAEjD,IAAI;oBACF,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC;oBACrB,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;iBACzC;gBAAC,OAAO,KAAK,EAAE;oBACd,MAAM,CAAC,MAAM,GAAG,KAAK,CAAC;oBACtB,MAAM,CAAC,QAAQ,GAAG,KAAK,CAAC;iBACzB;gBAED,OAAO,CAAC,MAAM,CAAC,CAAC;YAClB,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;YACxB,MAAM,CAAC,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;YAChC,OAAO,CAAC,MAAM,CAAC,CAAC;QAClB,CAAC,CAAC,CAAC;QAEH,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACjB,GAAG,CAAC,GAAG,EAAE,CAAC;IACZ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { CreateRoomParams, CreateRoomResponse } from './types/createRoom';
|
|
2
|
+
import { JoinTokenParams, JoinTokenResponse } from './types/joinToken';
|
|
3
|
+
import { IsRoomActiveParams, IsRoomActiveResponse } from './types/isRoomActive';
|
|
4
|
+
import { ActiveRoomInfoParams, ActiveRoomInfoResponse } from './types/activeRoomInfo';
|
|
5
|
+
import { ActiveRoomsInfoResponse } from './types/activeRoomsInfo';
|
|
6
|
+
import { EndRoomParams, EndRoomResponse } from './types/endRoom';
|
|
7
|
+
import { FetchRecordingsParams, FetchRecordingsResponse } from './types/fetchRecordings';
|
|
8
|
+
import { DeleteRecordingsParams, DeleteRecordingsResponse } from './types/deleteRecordings';
|
|
9
|
+
import { RecordingDownloadTokenParams, RecordingDownloadTokenResponse } from './types/RecordingDownloadToken';
|
|
10
|
+
import { ClientFilesResponse } from './types/clientFiles';
|
|
11
|
+
export declare class PlugNmeet {
|
|
12
|
+
protected defaultPath: string;
|
|
13
|
+
/**
|
|
14
|
+
* @param serverUrl plugNmeet server URL
|
|
15
|
+
* @param apiKey plugNmeet API_Key
|
|
16
|
+
* @param apiSecret plugNmeet API_Secret
|
|
17
|
+
*/
|
|
18
|
+
constructor(serverUrl: string, apiKey: string, apiSecret: string);
|
|
19
|
+
/**
|
|
20
|
+
* Create new room
|
|
21
|
+
* @param params: CreateRoomParams
|
|
22
|
+
* @returns Promise<CreateRoomResponse>
|
|
23
|
+
*/
|
|
24
|
+
createRoom(params: CreateRoomParams): Promise<CreateRoomResponse>;
|
|
25
|
+
/**
|
|
26
|
+
* Generate join token
|
|
27
|
+
* @param params: JoinTokenParams
|
|
28
|
+
* @returns Promise<JoinTokenResponse>
|
|
29
|
+
*/
|
|
30
|
+
getJoinToken(params: JoinTokenParams): Promise<JoinTokenResponse>;
|
|
31
|
+
/**
|
|
32
|
+
* If room is active or not
|
|
33
|
+
* @param params: IsRoomActiveParams
|
|
34
|
+
* @returns Promise<IsRoomActiveResponse>
|
|
35
|
+
*/
|
|
36
|
+
isRoomActive(params: IsRoomActiveParams): Promise<IsRoomActiveResponse>;
|
|
37
|
+
/**
|
|
38
|
+
* Get active room information
|
|
39
|
+
* @param params: ActiveRoomInfoParams
|
|
40
|
+
* @returns Promise<ActiveRoomInfoResponse>
|
|
41
|
+
*/
|
|
42
|
+
getActiveRoomInfo(params: ActiveRoomInfoParams): Promise<ActiveRoomInfoResponse>;
|
|
43
|
+
/**
|
|
44
|
+
* Get all active rooms
|
|
45
|
+
* @returns Promise<ActiveRoomsInfoResponse>
|
|
46
|
+
*/
|
|
47
|
+
getActiveRoomsInfo(): Promise<ActiveRoomsInfoResponse>;
|
|
48
|
+
/**
|
|
49
|
+
* End active room
|
|
50
|
+
* @param params: EndRoomParams
|
|
51
|
+
* @returns Promise<EndRoomResponse>
|
|
52
|
+
*/
|
|
53
|
+
endRoom(params: EndRoomParams): Promise<EndRoomResponse>;
|
|
54
|
+
/**
|
|
55
|
+
* Fetch recordings
|
|
56
|
+
* @param params: FetchRecordingsParams
|
|
57
|
+
* @returns Promise<FetchRecordingsResponse>
|
|
58
|
+
*/
|
|
59
|
+
fetchRecordings(params: FetchRecordingsParams): Promise<FetchRecordingsResponse>;
|
|
60
|
+
/**
|
|
61
|
+
* Delete recording
|
|
62
|
+
* @param params: DeleteRecordingsParams
|
|
63
|
+
* @returns Promise<DeleteRecordingsResponse>
|
|
64
|
+
*/
|
|
65
|
+
deleteRecordings(params: DeleteRecordingsParams): Promise<DeleteRecordingsResponse>;
|
|
66
|
+
/**
|
|
67
|
+
* @returns Promise<ClientFilesResponse>
|
|
68
|
+
*/
|
|
69
|
+
getClientFiles(): Promise<ClientFilesResponse>;
|
|
70
|
+
/**
|
|
71
|
+
* Generate token to download recording
|
|
72
|
+
* @param params: RecordingDownloadTokenParams
|
|
73
|
+
* @returns Promise<RecordingDownloadTokenResponse>
|
|
74
|
+
*/
|
|
75
|
+
getRecordingDownloadToken(params: RecordingDownloadTokenParams): Promise<RecordingDownloadTokenResponse>;
|
|
76
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlugNmeet.js","sourceRoot":"","sources":["../../src/PlugNmeet.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+BAAgD;AAwBhD,MAAa,SAAS;IAGpB;;;;OAIG;IACH,YAAY,SAAiB,EAAE,MAAc,EAAE,SAAiB;QAPtD,gBAAW,GAAG,OAAO,CAAC;QAQ9B,IAAA,gBAAU,EAAC,SAAS,GAAG,IAAI,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;IAC9D,CAAC;IAED;;;;OAIG;IACU,UAAU,CACrB,MAAwB;;YAExB,MAAM,MAAM,GAAG,MAAM,IAAA,iBAAW,EAAC,cAAc,EAAE,MAAM,CAAC,CAAC;YACzD,IAAI,CAAC,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ACnC,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;YAE5C,GAAG,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;gBACjB,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;gBAEjD,IAAI;oBACF,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC;oBACrB,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;iBACzC;gBAAC,OAAO,KAAK,EAAE;oBACd,MAAM,CAAC,MAAM,GAAG,KAAK,CAAC;oBACtB,MAAM,CAAC,QAAQ,GAAG,KAAK,CAAC;iBACzB;gBAED,OAAO,CAAC,MAAM,CAAC,CAAC;YAClB,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;YACxB,MAAM,CAAC,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;YAChC,OAAO,CAAC,MAAM,CAAC,CAAC;QAClB,CAAC,CAAC,CAAC;QAEH,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACjB,GAAG,CAAC,GAAG,EAAE,CAAC;IACZ,CAAC,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAxCW,QAAA,WAAW,eAwCtB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { RooMetadata, CreateRoomParams, CreateRoomResponse, CreateRoomResponseRoomInfo, LockSettingsParams, RoomFeaturesParams, ChatFeaturesParams, SharedNotePadFeaturesParams, WhiteboardFeaturesParams, ExternalMediaPlayerFeatures, WaitingRoomFeatures, BreakoutRoomFeatures, } from './types/createRoom';
|
|
1
|
+
export { RooMetadata, CreateRoomParams, CreateRoomResponse, CreateRoomResponseRoomInfo, LockSettingsParams, RoomFeaturesParams, RecordingFeaturesParams, ChatFeaturesParams, SharedNotePadFeaturesParams, WhiteboardFeaturesParams, ExternalMediaPlayerFeatures, WaitingRoomFeatures, BreakoutRoomFeatures, } from './types/createRoom';
|
|
2
2
|
export { JoinTokenParams, JoinTokenResponse, JoinTokenUserMetadata, JoinTokenUserInfo, } from './types/joinToken';
|
|
3
3
|
export { IsRoomActiveParams, IsRoomActiveResponse } from './types/isRoomActive';
|
|
4
4
|
export { Room, ActiveRoomInfoParams, ActiveRoomInfoResponse, ParticipantInfo, ActiveRoomInfo, } from './types/activeRoomInfo';
|
|
@@ -3,3 +3,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PlugNmeet = void 0;
|
|
4
4
|
var PlugNmeet_1 = require("./PlugNmeet");
|
|
5
5
|
Object.defineProperty(exports, "PlugNmeet", { enumerable: true, get: function () { return PlugNmeet_1.PlugNmeet; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AA+CA,yCAAwC;AAA/B,sGAAA,SAAS,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RecordingDownloadToken.js","sourceRoot":"","sources":["../../../src/types/RecordingDownloadToken.ts"],"names":[],"mappings":""}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type ActiveRoomInfoParams = {
|
|
2
2
|
room_id: string;
|
|
3
3
|
};
|
|
4
|
-
export
|
|
4
|
+
export type ActiveRoomInfoResponse = {
|
|
5
5
|
status: boolean;
|
|
6
6
|
msg: string;
|
|
7
7
|
room?: Room;
|
|
8
8
|
};
|
|
9
|
-
export
|
|
9
|
+
export type Room = {
|
|
10
10
|
room_info: ActiveRoomInfo;
|
|
11
11
|
participants_info: Array<ParticipantInfo>;
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type ActiveRoomInfo = {
|
|
14
14
|
room_title: string;
|
|
15
15
|
room_id: string;
|
|
16
16
|
sid: string;
|
|
@@ -22,7 +22,7 @@ export declare type ActiveRoomInfo = {
|
|
|
22
22
|
creation_time: number;
|
|
23
23
|
metadata: string;
|
|
24
24
|
};
|
|
25
|
-
export
|
|
25
|
+
export type ParticipantInfo = {
|
|
26
26
|
sid: string;
|
|
27
27
|
identity: string;
|
|
28
28
|
state: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activeRoomInfo.js","sourceRoot":"","sources":["../../../src/types/activeRoomInfo.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activeRoomsInfo.js","sourceRoot":"","sources":["../../../src/types/activeRoomsInfo.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clientFiles.js","sourceRoot":"","sources":["../../../src/types/clientFiles.ts"],"names":[],"mappings":""}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type CreateRoomParams = {
|
|
2
2
|
room_id: string;
|
|
3
3
|
max_participants?: number;
|
|
4
4
|
empty_timeout?: number;
|
|
5
5
|
metadata: RooMetadata;
|
|
6
6
|
};
|
|
7
|
-
export
|
|
7
|
+
export type RooMetadata = {
|
|
8
8
|
room_title: string;
|
|
9
9
|
welcome_message?: string;
|
|
10
10
|
webhook_url?: string;
|
|
11
11
|
room_features: RoomFeaturesParams;
|
|
12
12
|
default_lock_settings?: LockSettingsParams;
|
|
13
13
|
};
|
|
14
|
-
export
|
|
14
|
+
export type RoomFeaturesParams = {
|
|
15
15
|
allow_webcams: boolean;
|
|
16
16
|
mute_on_start: boolean;
|
|
17
17
|
allow_screen_share: boolean;
|
|
18
|
-
allow_recording: boolean;
|
|
19
18
|
allow_rtmp: boolean;
|
|
20
19
|
admin_only_webcams: boolean;
|
|
21
20
|
allow_view_other_webcams: boolean;
|
|
22
21
|
allow_view_other_users_list: boolean;
|
|
22
|
+
recording_features: RecordingFeaturesParams;
|
|
23
23
|
chat_features: ChatFeaturesParams;
|
|
24
24
|
shared_note_pad_features?: SharedNotePadFeaturesParams;
|
|
25
25
|
whiteboard_features?: WhiteboardFeaturesParams;
|
|
@@ -27,29 +27,35 @@ export declare type RoomFeaturesParams = {
|
|
|
27
27
|
waiting_room_features?: WaitingRoomFeatures;
|
|
28
28
|
breakout_room_features?: BreakoutRoomFeatures;
|
|
29
29
|
};
|
|
30
|
-
export
|
|
30
|
+
export type RecordingFeaturesParams = {
|
|
31
|
+
is_allow: boolean;
|
|
32
|
+
is_allow_cloud: boolean;
|
|
33
|
+
is_allow_local: boolean;
|
|
34
|
+
enable_auto_cloud_recording: boolean;
|
|
35
|
+
};
|
|
36
|
+
export type ChatFeaturesParams = {
|
|
31
37
|
allow_chat: boolean;
|
|
32
38
|
allow_file_upload: boolean;
|
|
33
39
|
allowed_file_types: Array<string>;
|
|
34
40
|
max_file_size: number;
|
|
35
41
|
};
|
|
36
|
-
export
|
|
42
|
+
export type SharedNotePadFeaturesParams = {
|
|
37
43
|
allowed_shared_note_pad: boolean;
|
|
38
44
|
};
|
|
39
|
-
export
|
|
45
|
+
export type WhiteboardFeaturesParams = {
|
|
40
46
|
allowed_whiteboard: boolean;
|
|
41
47
|
};
|
|
42
|
-
export
|
|
48
|
+
export type ExternalMediaPlayerFeatures = {
|
|
43
49
|
allowed_external_media_player: boolean;
|
|
44
50
|
};
|
|
45
|
-
export
|
|
51
|
+
export type WaitingRoomFeatures = {
|
|
46
52
|
is_active: boolean;
|
|
47
53
|
waiting_room_msg?: string;
|
|
48
54
|
};
|
|
49
|
-
export
|
|
55
|
+
export type BreakoutRoomFeatures = {
|
|
50
56
|
is_allow: boolean;
|
|
51
57
|
};
|
|
52
|
-
export
|
|
58
|
+
export type LockSettingsParams = {
|
|
53
59
|
lock_microphone?: boolean;
|
|
54
60
|
lock_webcam?: boolean;
|
|
55
61
|
lock_screen_sharing?: boolean;
|
|
@@ -59,12 +65,12 @@ export declare type LockSettingsParams = {
|
|
|
59
65
|
lock_chat_send_message?: boolean;
|
|
60
66
|
lock_chat_file_share?: boolean;
|
|
61
67
|
};
|
|
62
|
-
export
|
|
68
|
+
export type CreateRoomResponse = {
|
|
63
69
|
status: boolean;
|
|
64
70
|
msg: string;
|
|
65
71
|
roomInfo?: CreateRoomResponseRoomInfo;
|
|
66
72
|
};
|
|
67
|
-
export
|
|
73
|
+
export type CreateRoomResponseRoomInfo = {
|
|
68
74
|
sid: string;
|
|
69
75
|
name: string;
|
|
70
76
|
max_participants: number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createRoom.js","sourceRoot":"","sources":["../../../src/types/createRoom.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteRecordings.js","sourceRoot":"","sources":["../../../src/types/deleteRecordings.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"endRoom.js","sourceRoot":"","sources":["../../../src/types/endRoom.ts"],"names":[],"mappings":""}
|