@bwi-mentorspaces/application-utils-npm 0.0.127 → 0.0.129
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/chat/stream/models/_/event.data.d.ts +0 -2
- package/chat/stream/stream.channel.d.ts +0 -17
- package/chat/stream/stream.channel.js +1 -84
- package/chat/stream/stream.channel.js.map +1 -1
- package/chat/stream/stream.member.d.ts +0 -22
- package/chat/stream/stream.member.js +0 -68
- package/chat/stream/stream.member.js.map +1 -1
- package/chat/stream/stream.user.js +1 -1
- package/enums/index.d.ts +0 -1
- package/enums/index.js.map +1 -1
- package/meet/index.js +63 -52
- package/meet/tests/unit/twilio/twilio.room.test.js +1 -1
- package/meet/twilio/enum/index.js +2 -2
- package/meet/twilio/index.js +25 -5
- package/meet/twilio/models/_/room.data.js +1 -1
- package/meet/twilio/models/_/twilio.config.js +1 -1
- package/meet/twilio/models/index.js +1 -1
- package/meet/twilio/twilio.api.js +1 -1
- package/meet/twilio/twilio.auth.js +106 -78
- package/meet/twilio/twilio.base.js +1 -1
- package/meet/twilio/twilio.room.js +158 -131
- package/package.json +1 -2
- package/session/ms.live/ms.live.room.js +26 -23
- package/session/ms.live/ms.live.room.js.map +1 -1
|
@@ -124,7 +124,6 @@ export interface IEventTypesData {
|
|
|
124
124
|
sessionId: number;
|
|
125
125
|
sessionType: string | null;
|
|
126
126
|
attendeeType: string;
|
|
127
|
-
twilioRef: string;
|
|
128
127
|
senderEmail: string;
|
|
129
128
|
senderFirstName: string;
|
|
130
129
|
senderLastName: string;
|
|
@@ -142,7 +141,6 @@ export interface IEventTypesData {
|
|
|
142
141
|
sessionId: number;
|
|
143
142
|
sessionType: string | null;
|
|
144
143
|
attendeeType: string;
|
|
145
|
-
twilioRef: string;
|
|
146
144
|
senderEmail: string;
|
|
147
145
|
senderFirstName: string;
|
|
148
146
|
senderLastName: string;
|
|
@@ -69,13 +69,6 @@ export declare class StreamChannel extends StreamBase implements IStreamChannel
|
|
|
69
69
|
* @returns {Promise<EventAPIResponse | SendMessageAPIResponse>} channel object response
|
|
70
70
|
*/
|
|
71
71
|
sendChannelEvent<T extends IEventTypes>(channelId: string, eventType: T, user: UserResponse, data?: IEventTypesData[T], asMessage?: boolean, message?: string): Promise<EventAPIResponse | SendMessageAPIResponse>;
|
|
72
|
-
/**
|
|
73
|
-
* Add new members into a specific channel.
|
|
74
|
-
*
|
|
75
|
-
* @param {IChannelData} data channel data object
|
|
76
|
-
* @returns {Promise<boolean>} promise of the result to add members
|
|
77
|
-
*/
|
|
78
|
-
addMembers(data: IChannelData): Promise<boolean>;
|
|
79
72
|
/**
|
|
80
73
|
* Add new members directly into a specific channel without sending invitations.
|
|
81
74
|
* This bypasses the invitation process completely.
|
|
@@ -131,16 +124,6 @@ export declare class StreamChannel extends StreamBase implements IStreamChannel
|
|
|
131
124
|
* @returns {boolean} true / false
|
|
132
125
|
*/
|
|
133
126
|
rejectInvite(channelId: string, userId: string): Promise<UpdateChannelAPIResponse>;
|
|
134
|
-
/**
|
|
135
|
-
* Create channel with automatic invite acceptance
|
|
136
|
-
*
|
|
137
|
-
* This method creates a channel and automatically accepts invitations for all members.
|
|
138
|
-
* All members will be immediately active in the channel without needing to accept invitations.
|
|
139
|
-
*
|
|
140
|
-
* @param {IChannelData} data channel data object
|
|
141
|
-
* @returns {Promise<ChannelAPIResponse>} channel object response
|
|
142
|
-
*/
|
|
143
|
-
createWithAutoAccept(data: IChannelData): Promise<ChannelAPIResponse>;
|
|
144
127
|
/**
|
|
145
128
|
* Sync a channel
|
|
146
129
|
*
|
|
@@ -52,7 +52,7 @@ class StreamChannel extends stream_base_1.StreamBase {
|
|
|
52
52
|
isMatchChannel: data.isMatchChannel,
|
|
53
53
|
isPairGlobalMatchChannel: data.isPairGlobalMatchChannel,
|
|
54
54
|
matchRef: data.matchRef,
|
|
55
|
-
programRef: data.programRef
|
|
55
|
+
programRef: data.programRef
|
|
56
56
|
})
|
|
57
57
|
.create();
|
|
58
58
|
});
|
|
@@ -92,45 +92,6 @@ class StreamChannel extends stream_base_1.StreamBase {
|
|
|
92
92
|
}
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
|
-
/**
|
|
96
|
-
* Add new members into a specific channel.
|
|
97
|
-
*
|
|
98
|
-
* @param {IChannelData} data channel data object
|
|
99
|
-
* @returns {Promise<boolean>} promise of the result to add members
|
|
100
|
-
*/
|
|
101
|
-
addMembers(data) {
|
|
102
|
-
const _super = Object.create(null, {
|
|
103
|
-
getChannelById: { get: () => super.getChannelById }
|
|
104
|
-
});
|
|
105
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
106
|
-
//Retrieve the channel
|
|
107
|
-
const rChannel = yield _super.getChannelById.call(this, data.channelId);
|
|
108
|
-
if (rChannel && rChannel.length > 0) {
|
|
109
|
-
//get the channel from the response
|
|
110
|
-
const channel = rChannel[0];
|
|
111
|
-
//retrieve the data for members
|
|
112
|
-
const existingMemberCount = channel.data.member_count;
|
|
113
|
-
//Create the message if is necessary
|
|
114
|
-
let message = undefined;
|
|
115
|
-
//Add message text if is necessary
|
|
116
|
-
if (data.inviteMessage !== undefined) {
|
|
117
|
-
message = { text: data.inviteMessage, user_id: channel.data.created_by["id"] };
|
|
118
|
-
}
|
|
119
|
-
//Send the invite request to stream
|
|
120
|
-
const r = yield channel.inviteMembers(data.members, message);
|
|
121
|
-
//check the result
|
|
122
|
-
if (existingMemberCount == r.members.length) {
|
|
123
|
-
// error, did not add members
|
|
124
|
-
return false;
|
|
125
|
-
}
|
|
126
|
-
//Members invited successfully
|
|
127
|
-
return true;
|
|
128
|
-
}
|
|
129
|
-
else {
|
|
130
|
-
return false;
|
|
131
|
-
}
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
95
|
/**
|
|
135
96
|
* Add new members directly into a specific channel without sending invitations.
|
|
136
97
|
* This bypasses the invitation process completely.
|
|
@@ -332,50 +293,6 @@ class StreamChannel extends stream_base_1.StreamBase {
|
|
|
332
293
|
return channelResponse;
|
|
333
294
|
});
|
|
334
295
|
}
|
|
335
|
-
/**
|
|
336
|
-
* Create channel with automatic invite acceptance
|
|
337
|
-
*
|
|
338
|
-
* This method creates a channel and automatically accepts invitations for all members.
|
|
339
|
-
* All members will be immediately active in the channel without needing to accept invitations.
|
|
340
|
-
*
|
|
341
|
-
* @param {IChannelData} data channel data object
|
|
342
|
-
* @returns {Promise<ChannelAPIResponse>} channel object response
|
|
343
|
-
*/
|
|
344
|
-
createWithAutoAccept(data) {
|
|
345
|
-
const _super = Object.create(null, {
|
|
346
|
-
server: { get: () => super.server },
|
|
347
|
-
getChannelById: { get: () => super.getChannelById }
|
|
348
|
-
});
|
|
349
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
350
|
-
// Create the channel first
|
|
351
|
-
const channelResponse = yield _super.server
|
|
352
|
-
.channel(data.type, data.channelId, {
|
|
353
|
-
name: data.name,
|
|
354
|
-
created_by_id: data.createdById,
|
|
355
|
-
subType: data.subType ? data.subType.toString() : undefined,
|
|
356
|
-
companyId: data.companyId ? data.companyId.toString() : undefined,
|
|
357
|
-
topicRef: data.topicRef ? data.topicRef.toString() : undefined,
|
|
358
|
-
sessionRef: data.sessionRef ? data.sessionRef.toString() : undefined
|
|
359
|
-
})
|
|
360
|
-
.create();
|
|
361
|
-
// If members are provided, add them to the channel with auto-acceptance
|
|
362
|
-
if (data.members && Object.keys(data.members).length > 0) {
|
|
363
|
-
const channel = yield _super.getChannelById.call(this, data.channelId);
|
|
364
|
-
if (channel && channel.length > 0) {
|
|
365
|
-
// Add members and automatically accept invitations for each member
|
|
366
|
-
yield channel[0].addMembers(Object.keys(data.members), {
|
|
367
|
-
text: data.inviteMessage || "You have been added to this channel",
|
|
368
|
-
skipPush: false
|
|
369
|
-
});
|
|
370
|
-
// Auto-accept invitations for all members
|
|
371
|
-
for (const memberId of Object.keys(data.members)) {
|
|
372
|
-
yield channel[0].acceptInvite({ user_id: memberId });
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
return channelResponse;
|
|
377
|
-
});
|
|
378
|
-
}
|
|
379
296
|
/**
|
|
380
297
|
* Sync a channel
|
|
381
298
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stream.channel.js","sourceRoot":"","sources":["../../../chat/stream/stream.channel.ts"],"names":[],"mappings":";;;;;;;;;;;;AAiBA,uCAA2C;AAE3C,+CAA2C;AAE3C,iCAAyC;AAsDzC;;GAEG;AACH,MAAa,aAAc,SAAQ,wBAAU;IACzC,aAAa;IAEb;;;;;OAKG;IACH,YAAY,IAAgB,EAAE,MAAkB;QAC5C,KAAK,EAAE,CAAC;QACR,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;QAClB,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;IAC1B,CAAC;IACD,UAAU;IAEV;;;;;OAKG;IACG,MAAM,CAAC,IAAkB;;;;;YAC3B,OAAO,OAAM,MAAM;iBACd,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,EAAE;gBAChC,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,aAAa,EAAE,IAAI,CAAC,WAAW;gBAC/B,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS;gBAC3D,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS;gBACjE,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS;gBAC9D,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS;gBACpE,cAAc,EAAE,IAAI,CAAC,cAAc;gBAC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,IAAI,CAAC,IAAI,EAAE,EAAE;oBACT,eAAe,GAAG,CAAC,CAAC;iBACvB;aACJ;YACD,OAAO,eAAe,CAAC;QAC3B,CAAC;KAAA;IAED;;;;;OAKG;IACG,WAAW,CAAC,IAAkB;;;;;YAChC,sBAAsB;YACtB,MAAM,QAAQ,GAAG,MAAM,OAAM,cAAc,YAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YAC5D,IAAI,QAAQ,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;gBACjC,mCAAmC;gBACnC,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;gBAC5B,oBAAoB;gBACpB,MAAM,CAAC,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;gBACrC,kBAAkB;gBAClB,IAAI,CAAC,CAAC,EAAE;oBACJ,OAAO,KAAK,CAAC;iBAChB;gBACD,OAAO,IAAI,CAAC;aACf;iBAAM;gBACH,OAAO,KAAK,CAAC;aAChB;QACL,CAAC;KAAA;CACJ;AAxRD,sCAwRC"}
|
|
@@ -5,14 +5,6 @@ import { StreamBase } from "./stream.base";
|
|
|
5
5
|
* Channel Api declarations
|
|
6
6
|
*/
|
|
7
7
|
interface IStreamMember {
|
|
8
|
-
/**
|
|
9
|
-
* Add Members to a specific channel
|
|
10
|
-
*/
|
|
11
|
-
inviteMembers(data: IChannelData): Promise<boolean>;
|
|
12
|
-
/**
|
|
13
|
-
* Add new members into a specific channel. *
|
|
14
|
-
*/
|
|
15
|
-
addMembers(data: IChannelData): Promise<boolean>;
|
|
16
8
|
/**
|
|
17
9
|
* Add new moderator into a specific channel.
|
|
18
10
|
*/
|
|
@@ -36,20 +28,6 @@ export declare class StreamMember extends StreamBase implements IStreamMember {
|
|
|
36
28
|
* @param {StreamChat} server Stream API server
|
|
37
29
|
*/
|
|
38
30
|
constructor(server: StreamChat);
|
|
39
|
-
/**
|
|
40
|
-
* Add new members into a specific channel.
|
|
41
|
-
*
|
|
42
|
-
* @param {IChannelData} data channel data object
|
|
43
|
-
* @returns {Promise<boolean>} promise of the result to add members
|
|
44
|
-
*/
|
|
45
|
-
inviteMembers(data: IChannelData): Promise<boolean>;
|
|
46
|
-
/**
|
|
47
|
-
* Add new members into a specific channel.
|
|
48
|
-
*
|
|
49
|
-
* @param {IChannelData} data channel data object
|
|
50
|
-
* @returns {Promise<boolean>} promise of the result to add members
|
|
51
|
-
*/
|
|
52
|
-
addMembers(data: IChannelData): Promise<boolean>;
|
|
53
31
|
/**
|
|
54
32
|
* Add new moderator into a specific channel.
|
|
55
33
|
*
|
|
@@ -27,74 +27,6 @@ class StreamMember extends stream_base_1.StreamBase {
|
|
|
27
27
|
super.server = server;
|
|
28
28
|
}
|
|
29
29
|
// methods
|
|
30
|
-
/**
|
|
31
|
-
* Add new members into a specific channel.
|
|
32
|
-
*
|
|
33
|
-
* @param {IChannelData} data channel data object
|
|
34
|
-
* @returns {Promise<boolean>} promise of the result to add members
|
|
35
|
-
*/
|
|
36
|
-
inviteMembers(data) {
|
|
37
|
-
const _super = Object.create(null, {
|
|
38
|
-
getChannelById: { get: () => super.getChannelById }
|
|
39
|
-
});
|
|
40
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
-
//Retrieve the channel
|
|
42
|
-
const rChannel = yield _super.getChannelById.call(this, data.channelId);
|
|
43
|
-
//get the channel from the response
|
|
44
|
-
const channel = rChannel[0];
|
|
45
|
-
//retrieve the data for members
|
|
46
|
-
const existingMemberCount = channel.data.member_count;
|
|
47
|
-
//Create the message if is necessary
|
|
48
|
-
let message = undefined;
|
|
49
|
-
//Add message text if is necessary
|
|
50
|
-
if (data.inviteMessage !== undefined) {
|
|
51
|
-
message = { text: data.inviteMessage, user_id: channel.data.created_by["id"] };
|
|
52
|
-
}
|
|
53
|
-
//Send the invite request to stream
|
|
54
|
-
const r = yield channel.inviteMembers(data.members, message);
|
|
55
|
-
//check the result
|
|
56
|
-
if (existingMemberCount == r.members.length) {
|
|
57
|
-
// error, did not add members
|
|
58
|
-
return false;
|
|
59
|
-
}
|
|
60
|
-
//Members invited successfully
|
|
61
|
-
return true;
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Add new members into a specific channel.
|
|
66
|
-
*
|
|
67
|
-
* @param {IChannelData} data channel data object
|
|
68
|
-
* @returns {Promise<boolean>} promise of the result to add members
|
|
69
|
-
*/
|
|
70
|
-
addMembers(data) {
|
|
71
|
-
const _super = Object.create(null, {
|
|
72
|
-
getChannelById: { get: () => super.getChannelById }
|
|
73
|
-
});
|
|
74
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
-
//Retrieve the channel
|
|
76
|
-
const rChannel = yield _super.getChannelById.call(this, data.channelId);
|
|
77
|
-
//get the channel from the response
|
|
78
|
-
const channel = rChannel[0];
|
|
79
|
-
//retrieve the data for members
|
|
80
|
-
const existingMemberCount = channel.data.member_count;
|
|
81
|
-
//Create the message if is necessary
|
|
82
|
-
let message = undefined;
|
|
83
|
-
//Add message text if is necessary
|
|
84
|
-
if (data.inviteMessage !== undefined) {
|
|
85
|
-
message = { text: data.inviteMessage, user_id: channel.data.created_by["id"] };
|
|
86
|
-
}
|
|
87
|
-
//Send the invite request to stream
|
|
88
|
-
const r = yield channel.addMembers(data.members, message);
|
|
89
|
-
//check the result
|
|
90
|
-
if (existingMemberCount == r.members.length) {
|
|
91
|
-
// error, did not add members
|
|
92
|
-
return false;
|
|
93
|
-
}
|
|
94
|
-
//Members invited successfully
|
|
95
|
-
return true;
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
30
|
/**
|
|
99
31
|
* Add new moderator into a specific channel.
|
|
100
32
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stream.member.js","sourceRoot":"","sources":["../../../chat/stream/stream.member.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,qCAA+E;AAE/E,+CAA2C;
|
|
1
|
+
{"version":3,"file":"stream.member.js","sourceRo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A/FD,oCA+FC"}
|
|
@@ -59,7 +59,7 @@ class StreamUser extends stream_base_1.StreamBase {
|
|
|
59
59
|
// Create a custom event with sender information
|
|
60
60
|
const eventData = {
|
|
61
61
|
type: eventType,
|
|
62
|
-
customData: Object.assign(Object.assign({}, data), { _senderId: senderId, _sentFrom:
|
|
62
|
+
customData: Object.assign(Object.assign({}, data), { _senderId: senderId, _sentFrom: "system" // Mark as system message
|
|
63
63
|
})
|
|
64
64
|
};
|
|
65
65
|
return yield _super.server.sendUserCustomEvent(userId, eventData);
|
package/enums/index.d.ts
CHANGED
|
@@ -70,7 +70,6 @@ export declare const enum Message {
|
|
|
70
70
|
ExpiredToken = "Token Expired.",
|
|
71
71
|
InvalidToken = "Invalid Token.",
|
|
72
72
|
ExistingUser = "User already exists.",
|
|
73
|
-
TopicSharingRequired = "Sorry, you must belong to the same topic(s) as this user to connect with them.",
|
|
74
73
|
InactiveAccount = "You cannot create new connections because your account is currently inactive. Please contact support for assistance."
|
|
75
74
|
}
|
|
76
75
|
/**
|
package/enums/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../enums/index.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../enums/index.ts"],"names":[],"mappings":";;AA+EA,CAAC,CAAC"}
|
package/meet/index.js
CHANGED
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __decorate =
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
var __decorate =
|
|
3
|
+
(this && this.__decorate) ||
|
|
4
|
+
function (decorators, target, key, desc) {
|
|
5
|
+
var c = arguments.length,
|
|
6
|
+
r = c < 3 ? target : desc === null ? (desc = Object.getOwnPropertyDescriptor(target, key)) : desc,
|
|
7
|
+
d;
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
9
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
10
|
+
else
|
|
11
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
12
|
+
if ((d = decorators[i])) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
13
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
14
|
+
};
|
|
15
|
+
var __metadata =
|
|
16
|
+
(this && this.__metadata) ||
|
|
17
|
+
function (k, v) {
|
|
18
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
19
|
+
};
|
|
11
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
21
|
exports.Meet = void 0;
|
|
13
22
|
const tsyringe_1 = require("tsyringe");
|
|
@@ -16,48 +25,50 @@ const twilio_api_1 = require("./twilio/twilio.api");
|
|
|
16
25
|
/**
|
|
17
26
|
* Meet implementation
|
|
18
27
|
*/
|
|
19
|
-
let Meet =
|
|
20
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
21
|
-
class Meet {
|
|
22
|
-
/**
|
|
23
|
-
* Meet constructor
|
|
24
|
-
*
|
|
25
|
-
* @param {ClientType} clientType client type
|
|
26
|
-
* @param {IMeetConfig} config meet configuration
|
|
27
|
-
*/
|
|
28
|
-
constructor(clientType, config) {
|
|
29
|
-
this._clientType = clientType;
|
|
30
|
-
this._config = config;
|
|
31
|
-
this.init();
|
|
32
|
-
}
|
|
33
|
-
// getter / setter
|
|
34
|
-
/**
|
|
35
|
-
* getter for client
|
|
36
|
-
*
|
|
37
|
-
* @returns {T} client of type T
|
|
38
|
-
*/
|
|
39
|
-
get client() {
|
|
40
|
-
return this._client;
|
|
41
|
-
}
|
|
42
|
-
// methods
|
|
43
|
-
/**
|
|
44
|
-
* initialize method
|
|
45
|
-
*
|
|
46
|
-
* @returns {void} promise of type void
|
|
47
|
-
*/
|
|
48
|
-
init() {
|
|
49
|
-
// change to switch when adding new client types
|
|
50
|
-
//Create a new Stream Client
|
|
51
|
-
if (this._clientType == enum_1.ClientType.Twilio) {
|
|
52
|
-
this._client = new twilio_api_1.TwilioApi(this._config);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
Meet = __decorate([
|
|
57
|
-
(0, tsyringe_1.injectable)()
|
|
28
|
+
let Meet =
|
|
58
29
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
30
|
+
class Meet {
|
|
31
|
+
/**
|
|
32
|
+
* Meet constructor
|
|
33
|
+
*
|
|
34
|
+
* @param {ClientType} clientType client type
|
|
35
|
+
* @param {IMeetConfig} config meet configuration
|
|
36
|
+
*/
|
|
37
|
+
constructor(clientType, config) {
|
|
38
|
+
this._clientType = clientType;
|
|
39
|
+
this._config = config;
|
|
40
|
+
this.init();
|
|
41
|
+
}
|
|
42
|
+
// getter / setter
|
|
43
|
+
/**
|
|
44
|
+
* getter for client
|
|
45
|
+
*
|
|
46
|
+
* @returns {T} client of type T
|
|
47
|
+
*/
|
|
48
|
+
get client() {
|
|
49
|
+
return this._client;
|
|
50
|
+
}
|
|
51
|
+
// methods
|
|
52
|
+
/**
|
|
53
|
+
* initialize method
|
|
54
|
+
*
|
|
55
|
+
* @returns {void} promise of type void
|
|
56
|
+
*/
|
|
57
|
+
init() {
|
|
58
|
+
// change to switch when adding new client types
|
|
59
|
+
//Create a new Stream Client
|
|
60
|
+
if (this._clientType == enum_1.ClientType.Twilio) {
|
|
61
|
+
this._client = new twilio_api_1.TwilioApi(this._config);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
Meet = __decorate(
|
|
66
|
+
[
|
|
67
|
+
(0, tsyringe_1.injectable)(),
|
|
68
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
69
|
+
__metadata("design:paramtypes", [String, Object])
|
|
70
|
+
],
|
|
71
|
+
Meet
|
|
72
|
+
);
|
|
62
73
|
exports.Meet = Meet;
|
|
63
|
-
//# sourceMappingURL=index.js.map
|
|
74
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -7,5 +7,5 @@ exports.ClientType = void 0;
|
|
|
7
7
|
var ClientType;
|
|
8
8
|
(function (ClientType) {
|
|
9
9
|
ClientType["Twilio"] = "twilio";
|
|
10
|
-
})(ClientType = exports.ClientType || (exports.ClientType = {}));
|
|
11
|
-
//# sourceMappingURL=index.js.map
|
|
10
|
+
})((ClientType = exports.ClientType || (exports.ClientType = {})));
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
package/meet/twilio/index.js
CHANGED
|
@@ -2,11 +2,31 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TwilioRoom = exports.TwilioBase = exports.TwilioAuth = exports.TwilioApi = void 0;
|
|
4
4
|
const twilio_auth_1 = require("./twilio.auth");
|
|
5
|
-
Object.defineProperty(exports, "TwilioAuth", {
|
|
5
|
+
Object.defineProperty(exports, "TwilioAuth", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function () {
|
|
8
|
+
return twilio_auth_1.TwilioAuth;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
6
11
|
const twilio_api_1 = require("./twilio.api");
|
|
7
|
-
Object.defineProperty(exports, "TwilioApi", {
|
|
12
|
+
Object.defineProperty(exports, "TwilioApi", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return twilio_api_1.TwilioApi;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
8
18
|
const twilio_base_1 = require("./twilio.base");
|
|
9
|
-
Object.defineProperty(exports, "TwilioBase", {
|
|
19
|
+
Object.defineProperty(exports, "TwilioBase", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () {
|
|
22
|
+
return twilio_base_1.TwilioBase;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
10
25
|
const twilio_room_1 = require("./twilio.room");
|
|
11
|
-
Object.defineProperty(exports, "TwilioRoom", {
|
|
12
|
-
|
|
26
|
+
Object.defineProperty(exports, "TwilioRoom", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
get: function () {
|
|
29
|
+
return twilio_room_1.TwilioRoom;
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,32 +1,58 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding =
|
|
3
|
-
|
|
4
|
-
Object.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
};
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
|
|
2
|
+
var __createBinding =
|
|
3
|
+
(this && this.__createBinding) ||
|
|
4
|
+
(Object.create
|
|
5
|
+
? function (o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
Object.defineProperty(o, k2, {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return m[k];
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
: function (o, m, k, k2) {
|
|
15
|
+
if (k2 === undefined) k2 = k;
|
|
16
|
+
o[k2] = m[k];
|
|
17
|
+
});
|
|
18
|
+
var __setModuleDefault =
|
|
19
|
+
(this && this.__setModuleDefault) ||
|
|
20
|
+
(Object.create
|
|
21
|
+
? function (o, v) {
|
|
22
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
23
|
+
}
|
|
24
|
+
: function (o, v) {
|
|
25
|
+
o["default"] = v;
|
|
26
|
+
});
|
|
27
|
+
var __decorate =
|
|
28
|
+
(this && this.__decorate) ||
|
|
29
|
+
function (decorators, target, key, desc) {
|
|
30
|
+
var c = arguments.length,
|
|
31
|
+
r = c < 3 ? target : desc === null ? (desc = Object.getOwnPropertyDescriptor(target, key)) : desc,
|
|
32
|
+
d;
|
|
33
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
34
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
35
|
+
else
|
|
36
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
37
|
+
if ((d = decorators[i])) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
38
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
39
|
+
};
|
|
40
|
+
var __importStar =
|
|
41
|
+
(this && this.__importStar) ||
|
|
42
|
+
function (mod) {
|
|
43
|
+
if (mod && mod.__esModule) return mod;
|
|
44
|
+
var result = {};
|
|
45
|
+
if (mod != null)
|
|
46
|
+
for (var k in mod)
|
|
47
|
+
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
48
|
+
__setModuleDefault(result, mod);
|
|
49
|
+
return result;
|
|
50
|
+
};
|
|
51
|
+
var __metadata =
|
|
52
|
+
(this && this.__metadata) ||
|
|
53
|
+
function (k, v) {
|
|
54
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
55
|
+
};
|
|
30
56
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
57
|
exports.TwilioAuth = void 0;
|
|
32
58
|
const tsyringe_1 = require("tsyringe");
|
|
@@ -34,55 +60,57 @@ const AccessToken_1 = __importStar(require("twilio/lib/jwt/AccessToken"));
|
|
|
34
60
|
/**
|
|
35
61
|
* Meet Auth implementation
|
|
36
62
|
*/
|
|
37
|
-
let TwilioAuth =
|
|
38
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
39
|
-
class TwilioAuth {
|
|
40
|
-
/**
|
|
41
|
-
* Twilio auth constructor
|
|
42
|
-
*
|
|
43
|
-
* @param {IMeetConfig} config meet config
|
|
44
|
-
*/
|
|
45
|
-
constructor(config) {
|
|
46
|
-
this.init(config.account.main.sid, config.account.main.api.key, config.account.main.api.secret);
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Instance the twilio client
|
|
50
|
-
*
|
|
51
|
-
* @param {string} mainAccountSID main account SID
|
|
52
|
-
* @param {string} mainApiKeySID main api SID
|
|
53
|
-
* @param {string} mainApiKeySecret main apy secret
|
|
54
|
-
* @returns {void} promise of type void
|
|
55
|
-
*/
|
|
56
|
-
init(mainAccountSID, mainApiKeySID, mainApiKeySecret) {
|
|
57
|
-
this._mainAccountSID = mainAccountSID;
|
|
58
|
-
this._mainApiKeySID = mainApiKeySID;
|
|
59
|
-
this._mainApiKeySecret = mainApiKeySecret;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Get token
|
|
63
|
-
*
|
|
64
|
-
* @param {string} userId user id
|
|
65
|
-
* @param {string} roomName room name
|
|
66
|
-
* @returns {string} returns token value
|
|
67
|
-
*/
|
|
68
|
-
token(userId, roomName) {
|
|
69
|
-
//Instance the AccessToken token
|
|
70
|
-
const token = new AccessToken_1.default(this._mainAccountSID, this._mainApiKeySID, this._mainApiKeySecret);
|
|
71
|
-
// Assign identity to the token
|
|
72
|
-
token.identity = userId;
|
|
73
|
-
// Grant the access token Twilio Video capabilities
|
|
74
|
-
const grant = new AccessToken_1.VideoGrant();
|
|
75
|
-
grant.room = roomName;
|
|
76
|
-
token.addGrant(grant);
|
|
77
|
-
// Serialize the token to a JWT string
|
|
78
|
-
return token.toJwt();
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
TwilioAuth = __decorate([
|
|
82
|
-
(0, tsyringe_1.injectable)()
|
|
63
|
+
let TwilioAuth =
|
|
83
64
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
65
|
+
class TwilioAuth {
|
|
66
|
+
/**
|
|
67
|
+
* Twilio auth constructor
|
|
68
|
+
*
|
|
69
|
+
* @param {IMeetConfig} config meet config
|
|
70
|
+
*/
|
|
71
|
+
constructor(config) {
|
|
72
|
+
this.init(config.account.main.sid, config.account.main.api.key, config.account.main.api.secret);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Instance the twilio client
|
|
76
|
+
*
|
|
77
|
+
* @param {string} mainAccountSID main account SID
|
|
78
|
+
* @param {string} mainApiKeySID main api SID
|
|
79
|
+
* @param {string} mainApiKeySecret main apy secret
|
|
80
|
+
* @returns {void} promise of type void
|
|
81
|
+
*/
|
|
82
|
+
init(mainAccountSID, mainApiKeySID, mainApiKeySecret) {
|
|
83
|
+
this._mainAccountSID = mainAccountSID;
|
|
84
|
+
this._mainApiKeySID = mainApiKeySID;
|
|
85
|
+
this._mainApiKeySecret = mainApiKeySecret;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Get token
|
|
89
|
+
*
|
|
90
|
+
* @param {string} userId user id
|
|
91
|
+
* @param {string} roomName room name
|
|
92
|
+
* @returns {string} returns token value
|
|
93
|
+
*/
|
|
94
|
+
token(userId, roomName) {
|
|
95
|
+
//Instance the AccessToken token
|
|
96
|
+
const token = new AccessToken_1.default(this._mainAccountSID, this._mainApiKeySID, this._mainApiKeySecret);
|
|
97
|
+
// Assign identity to the token
|
|
98
|
+
token.identity = userId;
|
|
99
|
+
// Grant the access token Twilio Video capabilities
|
|
100
|
+
const grant = new AccessToken_1.VideoGrant();
|
|
101
|
+
grant.room = roomName;
|
|
102
|
+
token.addGrant(grant);
|
|
103
|
+
// Serialize the token to a JWT string
|
|
104
|
+
return token.toJwt();
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
TwilioAuth = __decorate(
|
|
108
|
+
[
|
|
109
|
+
(0, tsyringe_1.injectable)(),
|
|
110
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
111
|
+
__metadata("design:paramtypes", [Object])
|
|
112
|
+
],
|
|
113
|
+
TwilioAuth
|
|
114
|
+
);
|
|
87
115
|
exports.TwilioAuth = TwilioAuth;
|
|
88
|
-
//# sourceMappingURL=twilio.auth.js.map
|
|
116
|
+
//# sourceMappingURL=twilio.auth.js.map
|
|
@@ -1,22 +1,53 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __decorate =
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
};
|
|
2
|
+
var __decorate =
|
|
3
|
+
(this && this.__decorate) ||
|
|
4
|
+
function (decorators, target, key, desc) {
|
|
5
|
+
var c = arguments.length,
|
|
6
|
+
r = c < 3 ? target : desc === null ? (desc = Object.getOwnPropertyDescriptor(target, key)) : desc,
|
|
7
|
+
d;
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
9
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
10
|
+
else
|
|
11
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
12
|
+
if ((d = decorators[i])) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
13
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
14
|
+
};
|
|
15
|
+
var __metadata =
|
|
16
|
+
(this && this.__metadata) ||
|
|
17
|
+
function (k, v) {
|
|
18
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
19
|
+
};
|
|
20
|
+
var __awaiter =
|
|
21
|
+
(this && this.__awaiter) ||
|
|
22
|
+
function (thisArg, _arguments, P, generator) {
|
|
23
|
+
function adopt(value) {
|
|
24
|
+
return value instanceof P
|
|
25
|
+
? value
|
|
26
|
+
: new P(function (resolve) {
|
|
27
|
+
resolve(value);
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
31
|
+
function fulfilled(value) {
|
|
32
|
+
try {
|
|
33
|
+
step(generator.next(value));
|
|
34
|
+
} catch (e) {
|
|
35
|
+
reject(e);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function rejected(value) {
|
|
39
|
+
try {
|
|
40
|
+
step(generator["throw"](value));
|
|
41
|
+
} catch (e) {
|
|
42
|
+
reject(e);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
function step(result) {
|
|
46
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
47
|
+
}
|
|
48
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
49
|
+
});
|
|
50
|
+
};
|
|
20
51
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
52
|
exports.TwilioRoom = void 0;
|
|
22
53
|
const twilio_auth_1 = require("./twilio.auth");
|
|
@@ -26,121 +57,117 @@ const twilio_base_1 = require("./twilio.base");
|
|
|
26
57
|
/**
|
|
27
58
|
* Twilio Room API implementation
|
|
28
59
|
*/
|
|
29
|
-
let TwilioRoom =
|
|
30
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
31
|
-
class TwilioRoom extends twilio_base_1.TwilioBase {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
60
|
+
let TwilioRoom =
|
|
61
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
62
|
+
class TwilioRoom extends twilio_base_1.TwilioBase {
|
|
63
|
+
/**
|
|
64
|
+
* Twilio room constructor
|
|
65
|
+
*
|
|
66
|
+
* @param {TwilioAuth} auth Twilio auth
|
|
67
|
+
* @param {Twilio} server Twilio API Server
|
|
68
|
+
* @param {number} expMins expiration time for the timeout room, in minutes.
|
|
69
|
+
*/
|
|
70
|
+
constructor(auth, server, expMins) {
|
|
71
|
+
super();
|
|
72
|
+
super.auth = auth;
|
|
73
|
+
super.server = server;
|
|
74
|
+
this._expMinutes = expMins;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* This will find or Create a new room in Twilio
|
|
78
|
+
*
|
|
79
|
+
* @param {string} roomName room name
|
|
80
|
+
* @param {string} roomTypeStr room type to create in Twilio ("group" | "peer-to-peer" | "go")
|
|
81
|
+
* @returns {Promise<IRoomData>} promise of the result to create or get a room
|
|
82
|
+
*/
|
|
83
|
+
findOrCreateRoom(roomName, roomTypeStr = "group") {
|
|
84
|
+
const _super = Object.create(null, {
|
|
85
|
+
server: { get: () => super.server }
|
|
86
|
+
});
|
|
87
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
88
|
+
try {
|
|
89
|
+
// see if the room exists already. If it doesn't, this will throw
|
|
90
|
+
// error 20404.
|
|
91
|
+
const r = yield _super.server.video.rooms(roomName).fetch();
|
|
92
|
+
return {
|
|
93
|
+
sid: r.sid,
|
|
94
|
+
exist: true,
|
|
95
|
+
status: r.status
|
|
96
|
+
};
|
|
97
|
+
} catch (error) {
|
|
98
|
+
// the room was not found, so create it
|
|
99
|
+
if (error.code == 20404) {
|
|
100
|
+
//Create the room in Twilio
|
|
101
|
+
const roomType = roomTypeStr;
|
|
102
|
+
const r = yield _super.server.video.rooms.create({
|
|
103
|
+
uniqueName: roomName,
|
|
104
|
+
unusedRoomTimeout: this._expMinutes,
|
|
105
|
+
type: roomType
|
|
106
|
+
});
|
|
107
|
+
//Check the result of the request
|
|
108
|
+
if (r) {
|
|
109
|
+
//Return the sid for the new room
|
|
110
|
+
return { sid: r.sid, exist: false };
|
|
111
|
+
} else {
|
|
112
|
+
//Return null
|
|
113
|
+
return null;
|
|
114
|
+
}
|
|
115
|
+
} else {
|
|
116
|
+
// let other errors bubble up
|
|
117
|
+
throw error;
|
|
85
118
|
}
|
|
86
119
|
}
|
|
87
|
-
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Convenience method to determine if a roomType is valid
|
|
124
|
+
*
|
|
125
|
+
* @param {string} roomType The room type to validate.
|
|
126
|
+
* @returns {Promise<boolean>} true if a valid roomType, false otherwise
|
|
127
|
+
*/
|
|
128
|
+
validateRoomType(roomType) {
|
|
129
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
130
|
+
if (roomType === "peer-to-peer" || roomType === "go" || roomType === "group") {
|
|
131
|
+
return true;
|
|
132
|
+
}
|
|
133
|
+
return false;
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Find an existing room un Twilio
|
|
138
|
+
*
|
|
139
|
+
* @param {string} roomName room name
|
|
140
|
+
* @returns {Promise<IRoomData>} promise of the result to get a room
|
|
141
|
+
*/
|
|
142
|
+
findRoom(roomName) {
|
|
143
|
+
const _super = Object.create(null, {
|
|
144
|
+
server: { get: () => super.server }
|
|
145
|
+
});
|
|
146
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
147
|
+
// see if the room exists already. If it doesn't, this will return undefined
|
|
148
|
+
try {
|
|
149
|
+
const r = yield _super.server.video.rooms(roomName).fetch();
|
|
150
|
+
return {
|
|
151
|
+
sid: r.sid,
|
|
152
|
+
exist: true,
|
|
153
|
+
status: r.status
|
|
154
|
+
};
|
|
155
|
+
} catch (error) {
|
|
156
|
+
// the room was not found, so create it
|
|
157
|
+
if (error.code == 20404) return undefined;
|
|
88
158
|
// let other errors bubble up
|
|
89
|
-
throw error;
|
|
159
|
+
else throw error;
|
|
90
160
|
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
if (roomType === "peer-to-peer" || roomType === "go" || roomType === "group") {
|
|
103
|
-
return true;
|
|
104
|
-
}
|
|
105
|
-
return false;
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Find an existing room un Twilio
|
|
110
|
-
*
|
|
111
|
-
* @param {string} roomName room name
|
|
112
|
-
* @returns {Promise<IRoomData>} promise of the result to get a room
|
|
113
|
-
*/
|
|
114
|
-
findRoom(roomName) {
|
|
115
|
-
const _super = Object.create(null, {
|
|
116
|
-
server: { get: () => super.server }
|
|
117
|
-
});
|
|
118
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
119
|
-
// see if the room exists already. If it doesn't, this will return undefined
|
|
120
|
-
try {
|
|
121
|
-
const r = yield _super.server.video.rooms(roomName).fetch();
|
|
122
|
-
return {
|
|
123
|
-
sid: r.sid,
|
|
124
|
-
exist: true,
|
|
125
|
-
status: r.status
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
catch (error) {
|
|
129
|
-
// the room was not found, so create it
|
|
130
|
-
if (error.code == 20404)
|
|
131
|
-
return undefined;
|
|
132
|
-
// let other errors bubble up
|
|
133
|
-
else
|
|
134
|
-
throw error;
|
|
135
|
-
}
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
};
|
|
139
|
-
TwilioRoom = __decorate([
|
|
140
|
-
(0, tsyringe_1.injectable)()
|
|
141
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
142
|
-
,
|
|
143
|
-
__metadata("design:paramtypes", [twilio_auth_1.TwilioAuth, twilio_1.Twilio, Number])
|
|
144
|
-
], TwilioRoom);
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
TwilioRoom = __decorate(
|
|
165
|
+
[
|
|
166
|
+
(0, tsyringe_1.injectable)(),
|
|
167
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
168
|
+
__metadata("design:paramtypes", [twilio_auth_1.TwilioAuth, twilio_1.Twilio, Number])
|
|
169
|
+
],
|
|
170
|
+
TwilioRoom
|
|
171
|
+
);
|
|
145
172
|
exports.TwilioRoom = TwilioRoom;
|
|
146
|
-
//# sourceMappingURL=twilio.room.js.map
|
|
173
|
+
//# sourceMappingURL=twilio.room.js.map
|
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.129",
|
|
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",
|
|
@@ -52,7 +52,6 @@
|
|
|
52
52
|
"swagger-jsdoc": "^6.1.0",
|
|
53
53
|
"swagger-ui-express": "^4.3.0",
|
|
54
54
|
"tsyringe": "^4.6.0",
|
|
55
|
-
"twilio": "^3.76.0",
|
|
56
55
|
"uuid": "^8.3.2"
|
|
57
56
|
}
|
|
58
57
|
}
|
|
@@ -79,23 +79,23 @@ class MSLiveRoom extends ms_live_base_1.MSLiveBase {
|
|
|
79
79
|
const roomData = yield this.server.get(`/rooms`);
|
|
80
80
|
// Handle different possible response structures
|
|
81
81
|
if (!roomData) {
|
|
82
|
-
console.error(
|
|
82
|
+
console.error("getAllRooms: No response from 100ms API");
|
|
83
83
|
return [];
|
|
84
84
|
}
|
|
85
85
|
if (!roomData.data) {
|
|
86
|
-
console.error(
|
|
86
|
+
console.error("getAllRooms: No data in response from 100ms API", { response: roomData });
|
|
87
87
|
return [];
|
|
88
88
|
}
|
|
89
89
|
// Handle nested data structure (roomData.data.data) or direct data (roomData.data)
|
|
90
90
|
const rooms = roomData.data.data || roomData.data;
|
|
91
91
|
if (!Array.isArray(rooms)) {
|
|
92
|
-
console.error(
|
|
92
|
+
console.error("getAllRooms: Invalid rooms format", { rooms });
|
|
93
93
|
return [];
|
|
94
94
|
}
|
|
95
95
|
return rooms;
|
|
96
96
|
}
|
|
97
97
|
catch (error) {
|
|
98
|
-
console.error(
|
|
98
|
+
console.error("getAllRooms: Error fetching rooms", { error: error.message });
|
|
99
99
|
return [];
|
|
100
100
|
}
|
|
101
101
|
});
|
|
@@ -110,29 +110,29 @@ class MSLiveRoom extends ms_live_base_1.MSLiveBase {
|
|
|
110
110
|
return __awaiter(this, void 0, void 0, function* () {
|
|
111
111
|
try {
|
|
112
112
|
if (!roomId) {
|
|
113
|
-
console.warn(
|
|
113
|
+
console.warn("createRoomCodes: roomId is null or undefined");
|
|
114
114
|
return [];
|
|
115
115
|
}
|
|
116
116
|
const roomCode = yield this.server.post(`/room-codes/room/${roomId}`);
|
|
117
117
|
// Handle different possible response structures
|
|
118
118
|
if (!roomCode) {
|
|
119
|
-
console.error(
|
|
119
|
+
console.error("createRoomCodes: No response from 100ms API");
|
|
120
120
|
return [];
|
|
121
121
|
}
|
|
122
122
|
if (!roomCode.data) {
|
|
123
|
-
console.error(
|
|
123
|
+
console.error("createRoomCodes: No data in response from 100ms API", { roomId, response: roomCode });
|
|
124
124
|
return [];
|
|
125
125
|
}
|
|
126
126
|
// Handle nested data structure (roomCode.data.data) or direct data (roomCode.data)
|
|
127
127
|
const roomCodes = roomCode.data.data || roomCode.data;
|
|
128
128
|
if (!Array.isArray(roomCodes)) {
|
|
129
|
-
console.error(
|
|
129
|
+
console.error("createRoomCodes: Invalid room codes format", { roomId, roomCodes });
|
|
130
130
|
return [];
|
|
131
131
|
}
|
|
132
132
|
return roomCodes;
|
|
133
133
|
}
|
|
134
134
|
catch (error) {
|
|
135
|
-
console.error(
|
|
135
|
+
console.error("createRoomCodes: Error creating room codes", { roomId, error: error.message });
|
|
136
136
|
return [];
|
|
137
137
|
}
|
|
138
138
|
});
|
|
@@ -147,29 +147,29 @@ class MSLiveRoom extends ms_live_base_1.MSLiveBase {
|
|
|
147
147
|
return __awaiter(this, void 0, void 0, function* () {
|
|
148
148
|
try {
|
|
149
149
|
if (!roomId) {
|
|
150
|
-
console.warn(
|
|
150
|
+
console.warn("getRoomCodes: roomId is null or undefined");
|
|
151
151
|
return [];
|
|
152
152
|
}
|
|
153
153
|
const roomCode = yield this.server.get(`/room-codes/room/${roomId}`);
|
|
154
154
|
// Handle different possible response structures
|
|
155
155
|
if (!roomCode) {
|
|
156
|
-
console.error(
|
|
156
|
+
console.error("getRoomCodes: No response from 100ms API");
|
|
157
157
|
return [];
|
|
158
158
|
}
|
|
159
159
|
if (!roomCode.data) {
|
|
160
|
-
console.error(
|
|
160
|
+
console.error("getRoomCodes: No data in response from 100ms API", { roomId, response: roomCode });
|
|
161
161
|
return [];
|
|
162
162
|
}
|
|
163
163
|
// Handle nested data structure (roomCode.data.data) or direct data (roomCode.data)
|
|
164
164
|
const roomCodes = roomCode.data.data || roomCode.data;
|
|
165
165
|
if (!Array.isArray(roomCodes)) {
|
|
166
|
-
console.error(
|
|
166
|
+
console.error("getRoomCodes: Invalid room codes format", { roomId, roomCodes });
|
|
167
167
|
return [];
|
|
168
168
|
}
|
|
169
169
|
return roomCodes;
|
|
170
170
|
}
|
|
171
171
|
catch (error) {
|
|
172
|
-
console.error(
|
|
172
|
+
console.error("getRoomCodes: Error fetching room codes", { roomId, error: error.message });
|
|
173
173
|
return [];
|
|
174
174
|
}
|
|
175
175
|
});
|
|
@@ -248,29 +248,32 @@ class MSLiveRoom extends ms_live_base_1.MSLiveBase {
|
|
|
248
248
|
return __awaiter(this, void 0, void 0, function* () {
|
|
249
249
|
try {
|
|
250
250
|
if (!roomId) {
|
|
251
|
-
console.warn(
|
|
252
|
-
throw new Error(
|
|
251
|
+
console.warn("stopRecording: roomId is null or undefined");
|
|
252
|
+
throw new Error("Room ID is required");
|
|
253
253
|
}
|
|
254
254
|
const stopRecordingData = yield this.server.post(`/recordings/room/${roomId}/stop`);
|
|
255
255
|
// Handle different possible response structures
|
|
256
256
|
if (!stopRecordingData) {
|
|
257
|
-
console.error(
|
|
258
|
-
throw new Error(
|
|
257
|
+
console.error("stopRecording: No response from 100ms API");
|
|
258
|
+
throw new Error("No response from recording service");
|
|
259
259
|
}
|
|
260
260
|
if (!stopRecordingData.data) {
|
|
261
|
-
console.error(
|
|
262
|
-
|
|
261
|
+
console.error("stopRecording: No data in response from 100ms API", {
|
|
262
|
+
roomId,
|
|
263
|
+
response: stopRecordingData
|
|
264
|
+
});
|
|
265
|
+
throw new Error("No data in response from recording service");
|
|
263
266
|
}
|
|
264
267
|
// Handle nested data structure (stopRecordingData.data.data) or direct data (stopRecordingData.data)
|
|
265
268
|
const recordingData = stopRecordingData.data.data || stopRecordingData.data;
|
|
266
269
|
if (!recordingData) {
|
|
267
|
-
console.error(
|
|
268
|
-
throw new Error(
|
|
270
|
+
console.error("stopRecording: Invalid recording data format", { roomId, recordingData });
|
|
271
|
+
throw new Error("Invalid recording data format");
|
|
269
272
|
}
|
|
270
273
|
return recordingData;
|
|
271
274
|
}
|
|
272
275
|
catch (error) {
|
|
273
|
-
console.error(
|
|
276
|
+
console.error("stopRecording: Error stopping recording", { roomId, error: error.message });
|
|
274
277
|
throw error;
|
|
275
278
|
}
|
|
276
279
|
});
|
|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