@webex/plugin-meetings 3.12.0-next.9 → 3.12.0-task-refactor.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/dist/annotation/index.js +5 -14
- package/dist/annotation/index.js.map +1 -1
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/config.js +2 -8
- package/dist/config.js.map +1 -1
- package/dist/constants.js +6 -29
- package/dist/constants.js.map +1 -1
- package/dist/hashTree/hashTreeParser.js +29 -1563
- package/dist/hashTree/hashTreeParser.js.map +1 -1
- package/dist/hashTree/types.js +3 -13
- package/dist/hashTree/types.js.map +1 -1
- package/dist/index.js +2 -11
- package/dist/index.js.map +1 -1
- package/dist/interceptors/index.js +0 -7
- package/dist/interceptors/index.js.map +1 -1
- package/dist/interceptors/locusRouteToken.js +5 -27
- package/dist/interceptors/locusRouteToken.js.map +1 -1
- package/dist/interpretation/index.js +2 -2
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/controlsUtils.js +3 -7
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/index.js +247 -642
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/selfUtils.js +0 -1
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/locus-info/types.js.map +1 -1
- package/dist/media/MediaConnectionAwaiter.js +1 -57
- package/dist/media/MediaConnectionAwaiter.js.map +1 -1
- package/dist/media/properties.js +2 -4
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +1 -7
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +1036 -1481
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/request.js +0 -50
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js.map +1 -1
- package/dist/meeting/util.js +3 -133
- package/dist/meeting/util.js.map +1 -1
- package/dist/meetings/index.js +59 -142
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/util.js +7 -11
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +0 -10
- package/dist/member/index.js.map +1 -1
- package/dist/member/util.js +0 -10
- package/dist/member/util.js.map +1 -1
- package/dist/metrics/constants.js +1 -7
- package/dist/metrics/constants.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +60 -9
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +0 -11
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +2 -116
- package/dist/multistream/sendSlotManager.js.map +1 -1
- package/dist/reachability/clusterReachability.js +18 -171
- package/dist/reachability/clusterReachability.js.map +1 -1
- package/dist/reachability/index.js +11 -21
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/reachabilityPeerConnection.js +1 -1
- package/dist/reachability/reachabilityPeerConnection.js.map +1 -1
- package/dist/reactions/reactions.type.js.map +1 -1
- package/dist/reconnection-manager/index.js +1 -0
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/types/common/browser-detection.d.ts +0 -1
- package/dist/types/common/events/events-scope.d.ts +0 -1
- package/dist/types/common/events/events.d.ts +0 -1
- package/dist/types/config.d.ts +0 -5
- package/dist/types/constants.d.ts +1 -24
- package/dist/types/hashTree/hashTreeParser.d.ts +11 -260
- package/dist/types/hashTree/types.d.ts +0 -20
- package/dist/types/index.d.ts +0 -1
- package/dist/types/interceptors/index.d.ts +1 -2
- package/dist/types/interceptors/locusRouteToken.d.ts +0 -2
- package/dist/types/locus-info/index.d.ts +47 -68
- package/dist/types/locus-info/types.d.ts +12 -28
- package/dist/types/media/MediaConnectionAwaiter.d.ts +1 -10
- package/dist/types/media/properties.d.ts +1 -2
- package/dist/types/meeting/in-meeting-actions.d.ts +0 -6
- package/dist/types/meeting/index.d.ts +7 -86
- package/dist/types/meeting/request.d.ts +1 -16
- package/dist/types/meeting/request.type.d.ts +0 -5
- package/dist/types/meeting/util.d.ts +0 -31
- package/dist/types/meeting-info/util.d.ts +0 -1
- package/dist/types/meeting-info/utilv2.d.ts +0 -1
- package/dist/types/meetings/index.d.ts +2 -4
- package/dist/types/member/index.d.ts +0 -1
- package/dist/types/member/types.d.ts +4 -4
- package/dist/types/member/util.d.ts +0 -5
- package/dist/types/metrics/constants.d.ts +0 -6
- package/dist/types/multistream/mediaRequestManager.d.ts +23 -0
- package/dist/types/multistream/sendSlotManager.d.ts +1 -23
- package/dist/types/reachability/clusterReachability.d.ts +3 -30
- package/dist/types/reactions/reactions.type.d.ts +0 -1
- package/dist/types/recording-controller/util.d.ts +5 -5
- package/dist/types/roap/index.d.ts +1 -1
- package/dist/webinar/index.js +163 -438
- package/dist/webinar/index.js.map +1 -1
- package/package.json +24 -26
- package/src/annotation/index.ts +7 -27
- package/src/config.ts +0 -5
- package/src/constants.ts +1 -30
- package/src/hashTree/hashTreeParser.ts +25 -1523
- package/src/hashTree/types.ts +1 -24
- package/src/index.ts +1 -8
- package/src/interceptors/index.ts +1 -2
- package/src/interceptors/locusRouteToken.ts +5 -22
- package/src/interpretation/index.ts +2 -2
- package/src/locus-info/controlsUtils.ts +0 -17
- package/src/locus-info/index.ts +213 -707
- package/src/locus-info/selfUtils.ts +0 -1
- package/src/locus-info/types.ts +12 -27
- package/src/media/MediaConnectionAwaiter.ts +1 -41
- package/src/media/properties.ts +1 -3
- package/src/meeting/in-meeting-actions.ts +0 -12
- package/src/meeting/index.ts +84 -461
- package/src/meeting/request.ts +0 -42
- package/src/meeting/request.type.ts +0 -6
- package/src/meeting/util.ts +2 -160
- package/src/meetings/index.ts +60 -180
- package/src/meetings/util.ts +9 -10
- package/src/member/index.ts +0 -10
- package/src/member/util.ts +0 -12
- package/src/metrics/constants.ts +0 -7
- package/src/multistream/mediaRequestManager.ts +54 -4
- package/src/multistream/remoteMediaManager.ts +0 -13
- package/src/multistream/sendSlotManager.ts +3 -97
- package/src/reachability/clusterReachability.ts +27 -153
- package/src/reachability/index.ts +1 -15
- package/src/reachability/reachabilityPeerConnection.ts +1 -3
- package/src/reactions/reactions.type.ts +0 -1
- package/src/reconnection-manager/index.ts +1 -0
- package/src/webinar/index.ts +6 -265
- package/test/unit/spec/annotation/index.ts +7 -69
- package/test/unit/spec/interceptors/locusRouteToken.ts +0 -44
- package/test/unit/spec/locus-info/controlsUtils.js +1 -56
- package/test/unit/spec/locus-info/index.js +90 -1457
- package/test/unit/spec/media/MediaConnectionAwaiter.ts +1 -41
- package/test/unit/spec/media/properties.ts +3 -12
- package/test/unit/spec/meeting/in-meeting-actions.ts +2 -8
- package/test/unit/spec/meeting/index.js +128 -981
- package/test/unit/spec/meeting/request.js +0 -70
- package/test/unit/spec/meeting/utils.js +26 -438
- package/test/unit/spec/meetings/index.js +33 -845
- package/test/unit/spec/meetings/utils.js +1 -51
- package/test/unit/spec/member/index.js +4 -28
- package/test/unit/spec/member/util.js +27 -65
- package/test/unit/spec/multistream/mediaRequestManager.ts +85 -2
- package/test/unit/spec/multistream/remoteMediaManager.ts +0 -30
- package/test/unit/spec/multistream/sendSlotManager.ts +36 -135
- package/test/unit/spec/reachability/clusterReachability.ts +1 -125
- package/test/unit/spec/reachability/index.ts +3 -26
- package/test/unit/spec/reconnection-manager/index.js +8 -4
- package/test/unit/spec/webinar/index.ts +37 -534
- package/dist/aiEnableRequest/index.js +0 -184
- package/dist/aiEnableRequest/index.js.map +0 -1
- package/dist/aiEnableRequest/utils.js +0 -36
- package/dist/aiEnableRequest/utils.js.map +0 -1
- package/dist/hashTree/constants.js +0 -22
- package/dist/hashTree/constants.js.map +0 -1
- package/dist/hashTree/hashTree.js +0 -533
- package/dist/hashTree/hashTree.js.map +0 -1
- package/dist/hashTree/utils.js +0 -69
- package/dist/hashTree/utils.js.map +0 -1
- package/dist/interceptors/constant.js +0 -12
- package/dist/interceptors/constant.js.map +0 -1
- package/dist/interceptors/dataChannelAuthToken.js +0 -290
- package/dist/interceptors/dataChannelAuthToken.js.map +0 -1
- package/dist/interceptors/utils.js +0 -27
- package/dist/interceptors/utils.js.map +0 -1
- package/dist/types/aiEnableRequest/index.d.ts +0 -5
- package/dist/types/aiEnableRequest/utils.d.ts +0 -2
- package/dist/types/hashTree/constants.d.ts +0 -9
- package/dist/types/hashTree/hashTree.d.ts +0 -136
- package/dist/types/hashTree/utils.d.ts +0 -22
- package/dist/types/interceptors/constant.d.ts +0 -5
- package/dist/types/interceptors/dataChannelAuthToken.d.ts +0 -43
- package/dist/types/interceptors/utils.d.ts +0 -1
- package/dist/types/webinar/utils.d.ts +0 -6
- package/dist/webinar/utils.js +0 -25
- package/dist/webinar/utils.js.map +0 -1
- package/src/aiEnableRequest/README.md +0 -84
- package/src/aiEnableRequest/index.ts +0 -170
- package/src/aiEnableRequest/utils.ts +0 -25
- package/src/hashTree/constants.ts +0 -10
- package/src/hashTree/hashTree.ts +0 -480
- package/src/hashTree/utils.ts +0 -62
- package/src/interceptors/constant.ts +0 -6
- package/src/interceptors/dataChannelAuthToken.ts +0 -170
- package/src/interceptors/utils.ts +0 -16
- package/src/webinar/utils.ts +0 -16
- package/test/unit/spec/aiEnableRequest/index.ts +0 -981
- package/test/unit/spec/aiEnableRequest/utils.ts +0 -130
- package/test/unit/spec/hashTree/hashTree.ts +0 -721
- package/test/unit/spec/hashTree/hashTreeParser.ts +0 -3670
- package/test/unit/spec/hashTree/utils.ts +0 -140
- package/test/unit/spec/interceptors/dataChannelAuthToken.ts +0 -210
- package/test/unit/spec/interceptors/utils.ts +0 -75
- package/test/unit/spec/webinar/utils.ts +0 -39
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) 2015-2026 Cisco Systems, Inc. See LICENSE file.
|
|
3
|
-
*/
|
|
4
|
-
import { Interceptor } from '@webex/http-core';
|
|
5
|
-
/**
|
|
6
|
-
* @class
|
|
7
|
-
*/
|
|
8
|
-
export default class DataChannelAuthTokenInterceptor extends Interceptor {
|
|
9
|
-
private _refreshDataChannelToken;
|
|
10
|
-
private _isDataChannelTokenEnabled;
|
|
11
|
-
constructor(options: any);
|
|
12
|
-
/**
|
|
13
|
-
* @returns {DataChannelAuthTokenInterceptor}
|
|
14
|
-
*/
|
|
15
|
-
static create(): DataChannelAuthTokenInterceptor;
|
|
16
|
-
private getRetryKey;
|
|
17
|
-
private getHeader;
|
|
18
|
-
/**
|
|
19
|
-
* Intercepts outgoing requests and refreshes the Data-Channel-Auth-Token
|
|
20
|
-
* if the current JWT token is expired before the request is sent.
|
|
21
|
-
*
|
|
22
|
-
* @param {Object} options - The original request options.
|
|
23
|
-
* @returns {Promise<Object>} Updated request options with refreshed token if needed.
|
|
24
|
-
*/
|
|
25
|
-
onRequest(options: any): Promise<any>;
|
|
26
|
-
/**
|
|
27
|
-
* Intercept responses and, on 401/403 with `Data-Channel-Auth-Token` header,
|
|
28
|
-
* attempt to refresh the data channel token and retry the original request once.
|
|
29
|
-
*
|
|
30
|
-
* @param {Object} options
|
|
31
|
-
* @param {Object} reason
|
|
32
|
-
* @returns {Promise<HttpResponse>}
|
|
33
|
-
*/
|
|
34
|
-
onResponseError(options: any, reason: any): Promise<unknown>;
|
|
35
|
-
/**
|
|
36
|
-
* Retry the failed data channel request after a delay.
|
|
37
|
-
* Refreshes the Data-Channel-Auth-Token and re-sends the original request.
|
|
38
|
-
*
|
|
39
|
-
* @param {Object} options - Original request options.
|
|
40
|
-
* @returns {Promise<HttpResponse>} - Resolves on successful retry.
|
|
41
|
-
*/
|
|
42
|
-
refreshTokenAndRetryWithDelay(options: any): Promise<unknown>;
|
|
43
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const isJwtTokenExpired: (token: string) => boolean;
|
package/dist/webinar/utils.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
4
|
-
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
|
5
|
-
_Object$defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.sanitizeParams = void 0;
|
|
9
|
-
var _keys = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/keys"));
|
|
10
|
-
/**
|
|
11
|
-
* Remove null/undefined/empty string values from an object
|
|
12
|
-
* @param {object} params
|
|
13
|
-
* @returns {object}
|
|
14
|
-
*/
|
|
15
|
-
var sanitizeParams = exports.sanitizeParams = function sanitizeParams(params) {
|
|
16
|
-
var result = {};
|
|
17
|
-
(0, _keys.default)(params).forEach(function (key) {
|
|
18
|
-
var value = params[key];
|
|
19
|
-
if (value !== null && value !== undefined && value !== '') {
|
|
20
|
-
result[key] = value;
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["sanitizeParams","exports","params","result","_keys","default","forEach","key","value","undefined"],"sources":["utils.ts"],"sourcesContent":["/**\n * Remove null/undefined/empty string values from an object\n * @param {object} params\n * @returns {object}\n */\nexport const sanitizeParams = (params: Record<string, any>) => {\n const result: Record<string, any> = {};\n Object.keys(params).forEach((key) => {\n const value = params[key];\n if (value !== null && value !== undefined && value !== '') {\n result[key] = value;\n }\n });\n\n return result;\n};\n"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACO,IAAMA,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG,SAAjBA,cAAcA,CAAIE,MAA2B,EAAK;EAC7D,IAAMC,MAA2B,GAAG,CAAC,CAAC;EACtC,IAAAC,KAAA,CAAAC,OAAA,EAAYH,MAAM,CAAC,CAACI,OAAO,CAAC,UAACC,GAAG,EAAK;IACnC,IAAMC,KAAK,GAAGN,MAAM,CAACK,GAAG,CAAC;IACzB,IAAIC,KAAK,KAAK,IAAI,IAAIA,KAAK,KAAKC,SAAS,IAAID,KAAK,KAAK,EAAE,EAAE;MACzDL,MAAM,CAACI,GAAG,CAAC,GAAGC,KAAK;IACrB;EACF,CAAC,CAAC;EAEF,OAAOL,MAAM;AACf,CAAC","ignoreList":[]}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
# AI Assistant Enable Request
|
|
2
|
-
|
|
3
|
-
The AI Assistant Enable Request feature provides support for requesting and approving the enablement of AI assistant capabilities during a meeting. This feature implements a permission-based workflow where one participant can request to enable the AI assistant, and another participant (typically the host or a cohost) can accept or decline that request.
|
|
4
|
-
|
|
5
|
-
### Structure
|
|
6
|
-
|
|
7
|
-
The AI Enable Request plugin manages the approval workflow for enabling AI assistant functionality in meetings. It handles sending requests, receiving approval events, and processing responses.
|
|
8
|
-
|
|
9
|
-
### Events
|
|
10
|
-
|
|
11
|
-
The plugin emits events when approval requests are received:
|
|
12
|
-
|
|
13
|
-
```javascript
|
|
14
|
-
// Listen for approval request events
|
|
15
|
-
meeting.aiEnableRequest.on('approval-request-arrived', (event) => {
|
|
16
|
-
const {actionType, isApprover, isInitiator, initiatorId, approverId, url} = event;
|
|
17
|
-
|
|
18
|
-
if (isApprover) {
|
|
19
|
-
// This participant received a request
|
|
20
|
-
console.log(`Received ${actionType} from ${initiatorId}`);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
if (isInitiator) {
|
|
24
|
-
// This participant sent a request that was processed
|
|
25
|
-
console.log(`Your ${actionType} request was processed`);
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
### Initiator (requester) functionality
|
|
31
|
-
|
|
32
|
-
The following method is available to participants who want to request AI assistant enablement:
|
|
33
|
-
|
|
34
|
-
```javascript
|
|
35
|
-
// Request to enable AI assistant, specifying the approver's participant ID
|
|
36
|
-
meeting.aiEnableRequest.requestEnableAIAssistant({
|
|
37
|
-
approverId: 'approver-participant-id',
|
|
38
|
-
});
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
### Approver functionality
|
|
42
|
-
|
|
43
|
-
The following methods are available to participants who receive AI assistant enable requests:
|
|
44
|
-
|
|
45
|
-
```javascript
|
|
46
|
-
// Accept an AI assistant enable request
|
|
47
|
-
// url and initiatorId come from the 'approval-request-arrived' event
|
|
48
|
-
meeting.aiEnableRequest.acceptEnableAIAssistantRequest({
|
|
49
|
-
url: approvalUrl,
|
|
50
|
-
initiatorId,
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
// Decline an AI assistant enable request
|
|
54
|
-
meeting.aiEnableRequest.declineEnableAIAssistantRequest({
|
|
55
|
-
url: approvalUrl,
|
|
56
|
-
initiatorId,
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
// Decline all pending AI assistant enable requests
|
|
60
|
-
meeting.aiEnableRequest.declineAllEnableAIAssistantRequests({
|
|
61
|
-
url: approvalUrl,
|
|
62
|
-
initiatorId,
|
|
63
|
-
});
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### Example workflow
|
|
67
|
-
|
|
68
|
-
```javascript
|
|
69
|
-
// Participant A requests to enable AI assistant
|
|
70
|
-
await meeting.aiEnableRequest.requestEnableAIAssistant({
|
|
71
|
-
approverId: participantB.id,
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
// Participant B receives the request via event
|
|
75
|
-
meeting.aiEnableRequest.on('approval-request-arrived', async (event) => {
|
|
76
|
-
if (event.isApprover && event.actionType === 'REQUESTED') {
|
|
77
|
-
// User can now choose to accept or decline
|
|
78
|
-
await meeting.aiEnableRequest.acceptEnableAIAssistantRequest({
|
|
79
|
-
url: event.url,
|
|
80
|
-
initiatorId: event.initiatorId,
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
```
|
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) 2015-2026 Cisco Systems, Inc. See LICENSE file.
|
|
3
|
-
*/
|
|
4
|
-
import {WebexPlugin} from '@webex/webex-core';
|
|
5
|
-
import {AI_ENABLE_REQUEST, HTTP_VERBS, LOCUSEVENT, MEETINGS} from '../constants';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @class AIEnableRequest
|
|
9
|
-
*/
|
|
10
|
-
const AIEnableRequest = WebexPlugin.extend({
|
|
11
|
-
namespace: MEETINGS,
|
|
12
|
-
|
|
13
|
-
props: {
|
|
14
|
-
approvalUrl: 'string',
|
|
15
|
-
selfParticipantId: 'string',
|
|
16
|
-
hasSubscribedToEvents: 'boolean',
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Update the approval url for handoff
|
|
21
|
-
* @param {string} approvalUrl
|
|
22
|
-
* @returns {void}
|
|
23
|
-
*/
|
|
24
|
-
approvalUrlUpdate(approvalUrl) {
|
|
25
|
-
this.set('approvalUrl', approvalUrl);
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Update the self participant id
|
|
30
|
-
* @param {string} selfParticipantId
|
|
31
|
-
* @returns {void}
|
|
32
|
-
*/
|
|
33
|
-
selfParticipantIdUpdate(selfParticipantId) {
|
|
34
|
-
this.set('selfParticipantId', selfParticipantId);
|
|
35
|
-
|
|
36
|
-
if (!this.hasSubscribedToEvents) {
|
|
37
|
-
this.listenToApprovalRequests();
|
|
38
|
-
this.set('hasSubscribedToEvents', true);
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Listen to locus approval request events and trigger a new event with necessary details when an AI enablement approval request is received
|
|
44
|
-
* @returns {void}
|
|
45
|
-
*/
|
|
46
|
-
listenToApprovalRequests() {
|
|
47
|
-
this.listenTo(this.webex.internal.mercury, `event:${LOCUSEVENT.APPROVAL_REQUEST}`, (event) => {
|
|
48
|
-
if (event?.data?.approval?.resourceType === AI_ENABLE_REQUEST.RESOURCE_TYPE) {
|
|
49
|
-
const {receivers, initiator, actionType, url} = event.data.approval;
|
|
50
|
-
const approverId = receivers?.[0]?.participantId;
|
|
51
|
-
const isApprover = !!approverId && approverId === this.selfParticipantId;
|
|
52
|
-
const initiatorId = initiator?.participantId;
|
|
53
|
-
const isInitiator = !!initiatorId && initiatorId === this.selfParticipantId;
|
|
54
|
-
if (
|
|
55
|
-
!isApprover &&
|
|
56
|
-
!isInitiator &&
|
|
57
|
-
// Not just the initiator needs to know about declined all because
|
|
58
|
-
// all future requests will be rejected if the meeting is in the declined all state
|
|
59
|
-
actionType !== AI_ENABLE_REQUEST.ACTION_TYPE.DECLINED_ALL
|
|
60
|
-
) {
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
this.trigger(AI_ENABLE_REQUEST.EVENTS.APPROVAL_REQUEST_ARRIVED, {
|
|
64
|
-
actionType,
|
|
65
|
-
isApprover,
|
|
66
|
-
isInitiator,
|
|
67
|
-
initiatorId,
|
|
68
|
-
approverId,
|
|
69
|
-
url,
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
},
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Helper method to send AI assistant request
|
|
77
|
-
* @param {Object} params
|
|
78
|
-
* @param {string} params.url approval url
|
|
79
|
-
* @param {string} params.actionType the type of action (REQUESTED, ACCEPTED, DECLINED, DECLINED_ALL)
|
|
80
|
-
* @param {string} params.initiatorId
|
|
81
|
-
* @param {string} params.approverId
|
|
82
|
-
* @param {string} params.method HTTP method to use for the request
|
|
83
|
-
* @returns {Promise}
|
|
84
|
-
*/
|
|
85
|
-
sendApprovalRequest({url, actionType, initiatorId, approverId, method}) {
|
|
86
|
-
return this.request({
|
|
87
|
-
method,
|
|
88
|
-
uri: url,
|
|
89
|
-
body: {
|
|
90
|
-
actionType,
|
|
91
|
-
resourceType: AI_ENABLE_REQUEST.RESOURCE_TYPE,
|
|
92
|
-
initiator: {
|
|
93
|
-
participantId: initiatorId,
|
|
94
|
-
},
|
|
95
|
-
approver: {
|
|
96
|
-
participantId: approverId,
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
});
|
|
100
|
-
},
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* Sends a request to enable the AI assistant
|
|
104
|
-
* @param {Object} params
|
|
105
|
-
* @param {string} params.approverId
|
|
106
|
-
* @returns {Promise}
|
|
107
|
-
*/
|
|
108
|
-
requestEnableAIAssistant({approverId}) {
|
|
109
|
-
return this.sendApprovalRequest({
|
|
110
|
-
url: this.approvalUrl,
|
|
111
|
-
actionType: AI_ENABLE_REQUEST.ACTION_TYPE.REQUESTED,
|
|
112
|
-
initiatorId: this.selfParticipantId,
|
|
113
|
-
approverId,
|
|
114
|
-
method: HTTP_VERBS.POST,
|
|
115
|
-
});
|
|
116
|
-
},
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* Sends a request to accept the AI assistant enablement
|
|
120
|
-
* @param {Object} params
|
|
121
|
-
* @param {string} params.url approval url
|
|
122
|
-
* @param {string} params.initiatorId
|
|
123
|
-
* @returns {Promise}
|
|
124
|
-
*/
|
|
125
|
-
acceptEnableAIAssistantRequest({url, initiatorId}) {
|
|
126
|
-
return this.sendApprovalRequest({
|
|
127
|
-
url,
|
|
128
|
-
actionType: AI_ENABLE_REQUEST.ACTION_TYPE.ACCEPTED,
|
|
129
|
-
initiatorId,
|
|
130
|
-
approverId: this.selfParticipantId,
|
|
131
|
-
method: HTTP_VERBS.PUT,
|
|
132
|
-
});
|
|
133
|
-
},
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* Sends a request to decline the AI assistant enablement
|
|
137
|
-
* @param {Object} params
|
|
138
|
-
* @param {string} params.url approval url
|
|
139
|
-
* @param {string} params.initiatorId
|
|
140
|
-
* @returns {Promise}
|
|
141
|
-
*/
|
|
142
|
-
declineEnableAIAssistantRequest({url, initiatorId}) {
|
|
143
|
-
return this.sendApprovalRequest({
|
|
144
|
-
url,
|
|
145
|
-
actionType: AI_ENABLE_REQUEST.ACTION_TYPE.DECLINED,
|
|
146
|
-
initiatorId,
|
|
147
|
-
approverId: this.selfParticipantId,
|
|
148
|
-
method: HTTP_VERBS.PUT,
|
|
149
|
-
});
|
|
150
|
-
},
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* Sends a request to decline all AI assistant enablement requests
|
|
154
|
-
* @param {Object} params
|
|
155
|
-
* @param {string} params.url approval url
|
|
156
|
-
* @param {string} params.initiatorId
|
|
157
|
-
* @returns {Promise}
|
|
158
|
-
*/
|
|
159
|
-
declineAllEnableAIAssistantRequests({url, initiatorId}) {
|
|
160
|
-
return this.sendApprovalRequest({
|
|
161
|
-
url,
|
|
162
|
-
actionType: AI_ENABLE_REQUEST.ACTION_TYPE.DECLINED_ALL,
|
|
163
|
-
initiatorId,
|
|
164
|
-
approverId: this.selfParticipantId,
|
|
165
|
-
method: HTTP_VERBS.PUT,
|
|
166
|
-
});
|
|
167
|
-
},
|
|
168
|
-
});
|
|
169
|
-
|
|
170
|
-
export default AIEnableRequest;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/* eslint-disable import/prefer-default-export */
|
|
2
|
-
import Meeting from '../meeting';
|
|
3
|
-
|
|
4
|
-
export const getAIEnablementApprover = (meeting: Meeting) => {
|
|
5
|
-
const members = Object.values(meeting.members.membersCollection.members);
|
|
6
|
-
|
|
7
|
-
// find the host, if the host has the capability, return the host id
|
|
8
|
-
const host = members.find((member) => member.roles.moderator && member.canApproveAIEnablement);
|
|
9
|
-
|
|
10
|
-
if (host) {
|
|
11
|
-
return host.id;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
// find the cohosts, if the host has the capability, return the host id
|
|
15
|
-
const cohosts = members
|
|
16
|
-
.filter((member) => member.roles.cohost && member.canApproveAIEnablement)
|
|
17
|
-
.sort((a, b) => a.id.localeCompare(b.id));
|
|
18
|
-
|
|
19
|
-
if (cohosts.length > 0) {
|
|
20
|
-
return cohosts[0].id;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
// if no cohost has the capability, return null
|
|
24
|
-
return null;
|
|
25
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export const EMPTY_HASH = '99aa06d3014798d86001c324468d497f';
|
|
2
|
-
|
|
3
|
-
export const DataSetNames = {
|
|
4
|
-
MAIN: 'main', // sent to web client, contains also panelists, over LLM
|
|
5
|
-
ATTENDEES: 'attendees', // NOT SENT to web client, all the attendees in the locus
|
|
6
|
-
ATD_ACTIVE: 'atd-active', // only sent to panelists, over LLM; the attendees that have their hands raised or are allowed to unmute themselves
|
|
7
|
-
ATD_UNMUTED: 'atd-unmuted', // sent to web client, over LLM, not sent to panelists; the attendees that are unmuted
|
|
8
|
-
SELF: 'self', // sent to web client, over Mercury
|
|
9
|
-
UNJOINED: 'unjoined', // sent when you are not joined, but can still see some stuff from the meeting (mutually exclusive with "main")
|
|
10
|
-
};
|