@webex/plugin-meetings 3.0.0-beta.10 → 3.0.0-beta.11
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/meeting/index.js +41 -0
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/request.js +28 -0
- package/dist/meeting/request.js.map +1 -1
- package/dist/reactions/reactions.js +111 -0
- package/dist/reactions/reactions.js.map +1 -0
- package/dist/reactions/reactions.type.js +40 -0
- package/dist/reactions/reactions.type.js.map +1 -0
- package/package.json +18 -18
- package/src/meeting/index.ts +34 -2
- package/src/meeting/request.ts +23 -0
- package/src/reactions/reactions.ts +104 -0
- package/src/reactions/reactions.type.ts +36 -0
- package/test/unit/spec/meeting/index.js +87 -0
- package/test/unit/spec/meeting/request.js +25 -1
package/dist/meeting/request.js
CHANGED
|
@@ -797,6 +797,34 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
797
797
|
uri: keepAliveUrl
|
|
798
798
|
});
|
|
799
799
|
}
|
|
800
|
+
/**
|
|
801
|
+
* Make a network request to send a reaction.
|
|
802
|
+
* @param {Object} options
|
|
803
|
+
* @param {Url} options.reactionChannelUrl
|
|
804
|
+
* @param {Reaction} options.reaction
|
|
805
|
+
* @param {string} options.senderID
|
|
806
|
+
* @returns {Promise}
|
|
807
|
+
*/
|
|
808
|
+
|
|
809
|
+
}, {
|
|
810
|
+
key: "sendReaction",
|
|
811
|
+
value: function sendReaction(_ref10) {
|
|
812
|
+
var reactionChannelUrl = _ref10.reactionChannelUrl,
|
|
813
|
+
reaction = _ref10.reaction,
|
|
814
|
+
participantId = _ref10.participantId;
|
|
815
|
+
var uri = reactionChannelUrl; // @ts-ignore
|
|
816
|
+
|
|
817
|
+
return this.request({
|
|
818
|
+
method: _constants.HTTP_VERBS.POST,
|
|
819
|
+
uri: uri,
|
|
820
|
+
body: {
|
|
821
|
+
sender: {
|
|
822
|
+
participantId: participantId
|
|
823
|
+
},
|
|
824
|
+
reaction: reaction
|
|
825
|
+
}
|
|
826
|
+
});
|
|
827
|
+
}
|
|
800
828
|
}]);
|
|
801
829
|
return MeetingRequest;
|
|
802
830
|
}(_webexCore.StatelessWebexPlugin);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MeetingRequest","attrs","options","changeVideoLayoutDebounced","changeVideoLayout","leading","trailing","asResourceOccupant","inviteeAddress","meetingNumber","permissionToken","deviceUrl","locusUrl","resourceId","correlationId","ensureConversation","moderator","pin","moveToResource","roapMessage","preferTranscoding","LoggerProxy","logger","info","url","body","device","deviceType","config","meetings","usingResource","moveMediaToResource","respOnlySdp","allowMultiDevice","supportsNativeLobby","clientMediaPreferences","webex","clientRegion","countryCode","regionCode","undefined","PARTICIPANT","internal","services","waitForCatalog","get","LOCI","CALL","invitee","address","error","concat","ALTERNATE_REDIRECT_TRUE","callPreferences","requestedMedia","_SLIDES_","localMedias","request","method","HTTP_VERBS","POST","uri","captchaRefreshUrl","captchaId","catch","err","dialInUrl","clientUrl","PROVISIONAL","provisionalType","PROVISIONAL_TYPE_DIAL_IN","dialOutUrl","phoneNumber","PROVISIONAL_TYPE_DIAL_OUT","dialoutAddress","desync","syncUrl","split","LOCUS","SYNCDEBUG","GET","reject","phoneUrl","selfId","LEAVE","PUT","ALERT","CONTROLS","record","recording","paused","PATCH","lock","locked","DECLINE","reason","MEDIA","floorReq","disposition","FLOOR_ACTION","GRANTED","beneficiary","personUrl","devices","requester","floor","resourceUrl","resourceToken","tones","SEND_DTMF_ENDPOINT","dtmf","uuid","v4","layoutType","main","content","width","height","Error","renderInfoMain","renderInfoContent","layoutParams","renderInfo","layout","type","END","keepAliveUrl","StatelessWebexPlugin"],"sources":["request.ts"],"sourcesContent":["import uuid from 'uuid';\nimport {debounce} from 'lodash';\n// @ts-ignore\nimport {StatelessWebexPlugin} from '@webex/webex-core';\n// @ts-ignore\nimport {deviceType} from '@webex/common';\n\nimport LoggerProxy from '../common/logs/logger-proxy';\nimport {\n ALERT,\n ALTERNATE_REDIRECT_TRUE,\n CALL,\n CONTROLS,\n DECLINE,\n END,\n FLOOR_ACTION,\n HTTP_VERBS,\n LEAVE,\n LOCI,\n LOCUS,\n MEDIA,\n PARTICIPANT,\n PROVISIONAL_TYPE_DIAL_IN,\n PROVISIONAL_TYPE_DIAL_OUT,\n SEND_DTMF_ENDPOINT,\n _SLIDES_\n} from '../constants';\n\n/**\n * @class MeetingRequest\n */\nexport default class MeetingRequest extends StatelessWebexPlugin {\n changeVideoLayoutDebounced: any;\n\n constructor(attrs: any, options: any) {\n super(attrs, options);\n this.changeVideoLayoutDebounced = debounce(this.changeVideoLayout, 2000, {leading: true, trailing: true});\n }\n\n /**\n * Make a network request to join a meeting\n * @param {Object} options\n * @param {String} options.sipUri\n * @param {String} options.deviceUrl\n * @param {String} options.locusUrl\n * @param {String} options.resourceId,\n * @param {String} options.correlationId\n * @param {boolean} options.ensureConversation\n * @param {boolean} options.moderator\n * @param {boolean} options.pin\n * @param {boolean} options.moveToResource\n * @param {Object} options.roapMessage\n * @returns {Promise}\n */\n async joinMeeting(options: {\n sipUri: string;\n deviceUrl: string;\n locusUrl: string;\n resourceId: string;\n correlationId: string;\n ensureConversation: boolean;\n moderator: boolean;\n pin: boolean;\n moveToResource: boolean;\n roapMessage: any;\n asResourceOccupant: any;\n inviteeAddress: any;\n meetingNumber: any;\n permissionToken: any;\n preferTranscoding: any;\n }) {\n const {\n asResourceOccupant,\n inviteeAddress,\n meetingNumber,\n permissionToken,\n deviceUrl,\n locusUrl,\n resourceId,\n correlationId,\n ensureConversation,\n moderator,\n pin,\n moveToResource,\n roapMessage,\n preferTranscoding\n } = options;\n\n LoggerProxy.logger.info(\n 'Meeting:request#joinMeeting --> Joining a meeting',\n correlationId\n );\n\n let url = '';\n\n const body: any = {\n asResourceOccupant,\n device: {\n url: deviceUrl,\n // @ts-ignore - config comes from registerPlugin\n deviceType: this.config.meetings.deviceType\n },\n usingResource: resourceId || null,\n moveMediaToResource: resourceId && moveToResource || false,\n correlationId,\n respOnlySdp: true,\n allowMultiDevice: true,\n ensureConversation: ensureConversation || false,\n supportsNativeLobby: 1,\n clientMediaPreferences: {\n preferTranscoding: preferTranscoding ?? true\n }\n };\n\n // @ts-ignore\n if (this.webex.meetings.clientRegion) {\n // @ts-ignore\n body.device.countryCode = this.webex.meetings.clientRegion.countryCode;\n // @ts-ignore\n body.device.regionCode = this.webex.meetings.clientRegion.regionCode;\n }\n\n if (moderator !== undefined) {\n body.moderator = moderator;\n }\n\n if (permissionToken) {\n body.permissionToken = permissionToken;\n }\n\n if (pin !== undefined) {\n body.pin = pin;\n }\n\n if (locusUrl) {\n url = `${locusUrl}/${PARTICIPANT}`;\n }\n else if (inviteeAddress || meetingNumber) {\n try {\n // @ts-ignore\n await this.webex.internal.services.waitForCatalog('postauth');\n // @ts-ignore\n url = `${this.webex.internal.services.get('locus')}/${LOCI}/${CALL}`;\n body.invitee = {\n address: inviteeAddress || `wbxmn:${meetingNumber}`\n };\n }\n catch (e) {\n LoggerProxy.logger.error(`Meeting:request#joinMeeting Error Joining ${inviteeAddress || meetingNumber} --> ${e}`);\n throw (e);\n }\n }\n\n\n // TODO: -- this will be resolved in SDK request\n url = url.concat(`?${ALTERNATE_REDIRECT_TRUE}`);\n\n if (resourceId === inviteeAddress) {\n body.callPreferences = {\n requestedMedia: [_SLIDES_]\n };\n }\n\n if (roapMessage) {\n body.localMedias = roapMessage.localMedias;\n }\n\n /// @ts-ignore\n return this.request({\n method: HTTP_VERBS.POST,\n uri: url,\n body\n });\n }\n\n /**\n * Send a request to refresh the captcha\n * @param {Object} options\n * @param {String} options.captchaRefreshUrl\n * @param {String} options.captchaId\n * @returns {Promise}\n * @private\n */\n private refreshCaptcha({ captchaRefreshUrl, captchaId }: { captchaRefreshUrl: string; captchaId: string }) {\n const body = {\n captchaId\n };\n\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.POST,\n uri: captchaRefreshUrl,\n body\n }).catch((err) => {\n LoggerProxy.logger.error(`Meeting:request#refreshCaptcha --> Error: ${err}`);\n\n throw err;\n });\n }\n\n /**\n * Make a network request to add a dial in device\n * @param {Object} options\n * @param {String} options.correlationId\n * @param {String} options.locusUrl url for the meeting\n * @param {String} options.dialInUrl identifier for the to-be provisioned device\n * @param {String} options.clientUrl identifier for the web device\n * @returns {Promise}\n * @private\n */\n private dialIn({\n locusUrl,\n dialInUrl,\n clientUrl,\n correlationId,\n }: {\n correlationId: string;\n locusUrl: string;\n dialInUrl: string;\n clientUrl: string;\n }) {\n LoggerProxy.logger.info(\n 'Meeting:request#dialIn --> Provisioning a dial in device',\n correlationId\n );\n const uri = `${locusUrl}/${PARTICIPANT}`;\n\n const body = {\n device: {\n deviceType: deviceType.PROVISIONAL,\n provisionalType: PROVISIONAL_TYPE_DIAL_IN,\n url: dialInUrl,\n clientUrl\n },\n correlationId\n };\n\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.POST,\n uri,\n body\n }).catch((err) => {\n LoggerProxy.logger.error(`Meeting:request#dialIn --> Error provisioning a dial in device, error ${err}`);\n\n throw err;\n });\n }\n\n /**\n * Make a network request to add a dial out device\n * @param {Object} options\n * @param {String} options.correlationId\n * @param {String} options.locusUrl url for the meeting\n * @param {String} options.dialOutUrl identifier for the to-be provisioned device\n * @param {String} options.phoneNumber phone number to dial out to\n * @param {String} options.clientUrl identifier for the web device\n * @returns {Promise}\n * @private\n */\n private dialOut({\n locusUrl,\n dialOutUrl,\n phoneNumber,\n clientUrl,\n correlationId,\n }: {\n correlationId: string;\n locusUrl: string;\n dialOutUrl: string;\n phoneNumber: string;\n clientUrl: string;\n }) {\n LoggerProxy.logger.info(\n 'Meeting:request#dialOut --> Provisioning a dial out device',\n correlationId\n );\n const uri = `${locusUrl}/${PARTICIPANT}`;\n\n const body = {\n device: {\n deviceType: deviceType.PROVISIONAL,\n provisionalType: PROVISIONAL_TYPE_DIAL_OUT,\n url: dialOutUrl,\n dialoutAddress: phoneNumber,\n clientUrl\n },\n correlationId\n };\n\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.POST,\n uri,\n body\n }).catch((err) => {\n LoggerProxy.logger.error(`Meeting:request#dialOut --> Error provisioning a dial out device, error ${err}`);\n\n throw err;\n });\n }\n\n /**\n * Syns the missed delta event\n * @param {Object} options\n * @param {boolean} options.desync flag to get partial or whole locus object\n * @param {String} options.syncUrl sync url to get ht elatest locus delta\n * @returns {Promise}\n */\n syncMeeting(options: { desync: boolean; syncUrl: string }) {\n /* eslint-disable no-else-return */\n const {desync} = options;\n let {syncUrl} = options;\n\n /* istanbul ignore else */\n if (desync) {\n // check for existing URL parameters\n syncUrl = syncUrl.concat(syncUrl.split('?')[1] ? '&' : '?').concat(`${LOCUS.SYNCDEBUG}=${desync}`);\n }\n\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.GET,\n uri: syncUrl\n }) // TODO: Handle if delta sync failed . Get the full locus object\n .catch((err) => {\n LoggerProxy.logger.error(`Meeting:request#syncMeeting --> Error syncing meeting, error ${err}`);\n\n return err;\n });\n }\n\n /**\n * Request to get the complete locus object\n * @param {Object} options\n * @param {boolean} options.desync flag to get partial or whole locus object\n * @param {String} options.locusUrl sync url to get ht elatest locus delta\n * @returns {Promise}\n */\n getFullLocus(options: { desync: boolean; locusUrl: string }) {\n let {locusUrl} = options;\n const {desync} = options;\n\n if (locusUrl) {\n if (desync) {\n locusUrl += `?${LOCUS.SYNCDEBUG}=${desync}`;\n }\n\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.GET,\n uri: locusUrl\n }).catch((err) => {\n LoggerProxy.logger.error(`Meeting:request#getFullLocus --> Error getting full locus, error ${err}`);\n\n return err;\n });\n }\n\n return Promise.reject();\n }\n\n /**\n * Make a network request to make a provisioned phone leave the meeting\n * @param {Object} options\n * @param {String} options.locusUrl\n * @param {String} options.phoneUrl\n * @param {String} options.correlationId\n * @param {String} options.selfId\n * @returns {Promise}\n * @private\n */\n private disconnectPhoneAudio({\n locusUrl,\n phoneUrl,\n correlationId,\n selfId,\n }: {\n locusUrl: string;\n phoneUrl: string;\n correlationId: string;\n selfId: string;\n }) {\n LoggerProxy.logger.info(\n `Meeting:request#disconnectPhoneAudio --> request phone ${phoneUrl} to leave`,\n correlationId\n );\n const uri = `${locusUrl}/${PARTICIPANT}/${selfId}/${LEAVE}`;\n\n const body = {\n device: {\n deviceType: deviceType.PROVISIONAL,\n url: phoneUrl\n },\n correlationId\n };\n\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.PUT,\n uri,\n body\n }).catch((err) => {\n LoggerProxy.logger.error(\n `Meeting:request#disconnectPhoneAudio --> Error when requesting phone ${phoneUrl} to leave, error ${err}`\n );\n\n throw err;\n });\n }\n\n /**\n * Make a network request to leave a meeting\n * @param {Object} options\n * @param {Url} options.locusUrl\n * @param {String} options.selfId\n * @param {Url} options.deviceUrl\n * @param {String} options.resourceId,\n * @param {String} options.correlationId\n * @returns {Promise}\n */\n leaveMeeting({\n locusUrl,\n selfId,\n deviceUrl: url,\n resourceId,\n correlationId,\n }: {\n locusUrl: string;\n selfId: string;\n deviceUrl: string;\n resourceId: string;\n correlationId: string;\n }) {\n LoggerProxy.logger.info(\n 'Meeting:request#leaveMeeting --> Leaving a meeting',\n correlationId\n );\n\n const uri = `${locusUrl}/${PARTICIPANT}/${selfId}/${LEAVE}`;\n const body = {\n device: {\n // @ts-ignore\n deviceType: this.config.meetings.deviceType,\n url\n },\n usingResource: resourceId || null,\n correlationId\n };\n\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.PUT,\n uri,\n body\n });\n }\n\n /**\n * Make a network request to acknowledge a meeting\n * @param {Object} options\n * @param {String} options.locusUrl\n * @param {String} options.deviceUrl\n * @param {String} options.correlationId\n * @returns {Promise}\n */\n acknowledgeMeeting(options: { locusUrl: string; deviceUrl: string; correlationId: string }) {\n const uri = `${options.locusUrl}/${PARTICIPANT}/${ALERT}`;\n const body = {\n device: {\n // @ts-ignore\n deviceType: this.config.meetings.deviceType,\n url: options.deviceUrl\n },\n correlationId: options.correlationId\n };\n\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.PUT,\n uri,\n body\n });\n }\n\n /**\n * Make a network request to acknowledge a meeting\n * @param {Object} options\n * @param {String} options.locusUrl\n * @param {String} options.deviceUrl\n * @param {String} options.id\n * @returns {Promise}\n */\n recordMeeting(options: { locusUrl: string; deviceUrl: string; id: string, recording: any, paused: any }) {\n const uri = `${options.locusUrl}/${CONTROLS}`;\n const body = {\n record: {\n recording: options.recording,\n paused: options.paused\n }\n };\n\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.PATCH,\n uri,\n body\n });\n }\n\n lockMeeting(options) {\n const uri = `${options.locusUrl}/${CONTROLS}`;\n const body = {\n lock: {\n locked: options.lock\n }\n };\n\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.PATCH,\n uri,\n body\n });\n }\n\n /**\n * Make a network request to decline a meeting\n * @param {Object} options\n * @param {String} options.locusUrl\n * @param {String} options.deviceUrl\n * @param {String} options.reason\n * @returns {Promise}\n */\n declineMeeting(options: { locusUrl: string; deviceUrl: string; reason: string }) {\n const uri = `${options.locusUrl}/${PARTICIPANT}/${DECLINE}`;\n const body = {\n device: {\n // @ts-ignore\n deviceType: this.config.meetings.deviceType,\n url: options.deviceUrl\n },\n ...(options.reason && {reason: options.reason}),\n };\n\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.PUT,\n uri,\n body\n });\n }\n\n /**\n * Toggle remote audio and/or video\n * @param {Object} options options for toggling\n * @param {String} options.selfId Locus self id??\n * @param {String} options.locusUrl Locus url\n * @param {String} options.deviceUrl Url of a device\n * @param {String} options.resourceId Populated if you are paired to a device\n * @param {String} options.localMedias local sdps\n * @param {Boolean} options.preferTranscoding false for multistream (Homer), true for transcoded media (Edonus)\n * @returns {Promise}\n */\n remoteAudioVideoToggle(options: {\n selfId: string;\n locusUrl: string;\n deviceUrl: string;\n resourceId: string;\n localMedias: string;\n } | any) {\n const uri = `${options.locusUrl}/${PARTICIPANT}/${options.selfId}/${MEDIA}`;\n const body = {\n device: {\n // @ts-ignore\n deviceType: this.config.meetings.deviceType,\n url: options.deviceUrl\n },\n usingResource: options.resourceId || null,\n correlationId: options.correlationId,\n respOnlySdp: true,\n localMedias: options.localMedias,\n clientMediaPreferences: {\n preferTranscoding: options.preferTranscoding ?? true\n }\n };\n\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.PUT,\n uri,\n body\n });\n }\n\n /**\n * change the content floor grant\n * @param {Object} options options for floor grant\n * @param {String} options.disposition floor action (granted/released)\n * @param {String} options.personUrl personUrl who is requesting floor\n * @param {String} options.deviceUrl Url of a device\n * @param {String} options.resourceId Populated if you are paired to a device\n * @param {String} options.uri floor grant uri\n * @returns {Promise}\n */\n changeMeetingFloor(options: {\n disposition: string;\n personUrl: string;\n deviceUrl: string;\n resourceId: string;\n uri: string;\n } | any) {\n let floorReq: any = {disposition: options.disposition};\n\n /* istanbul ignore else */\n if (options.disposition === FLOOR_ACTION.GRANTED) {\n floorReq = {\n beneficiary: {\n url: options.personUrl,\n devices: [\n {\n // @ts-ignore\n deviceType: this.config.meetings.deviceType,\n url: options.deviceUrl\n }\n ]\n },\n disposition: options.disposition,\n requester: {\n url: options.personUrl\n }\n };\n }\n\n const body: any = {\n floor: floorReq,\n resourceUrl: options.resourceUrl\n };\n\n if (options?.resourceToken) {\n body.resourceToken = options?.resourceToken;\n }\n\n // @ts-ignore\n return this.request({\n uri: options.uri,\n method: HTTP_VERBS.PUT,\n body\n });\n }\n\n /**\n * Sends a request to the DTMF endpoint to send tones\n * @param {Object} options\n * @param {String} options.locusUrl\n * @param {String} options.deviceUrl\n * @param {String} options.tones a string of one or more DTMF tones to send\n * @returns {Promise}\n */\n sendDTMF({ locusUrl, deviceUrl, tones }: { locusUrl: string; deviceUrl: string; tones: string }) {\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.POST,\n uri: `${locusUrl}/${SEND_DTMF_ENDPOINT}`,\n body: {\n deviceUrl,\n dtmf: {\n correlationId: uuid.v4(),\n tones\n }\n }\n });\n }\n\n /**\n * Sends a request to the controls endpoint to set the video layout\n * @param {Object} options\n * @param {String} options.locusUrl\n * @param {String} options.deviceUrl\n * @param {String} options.layoutType a layout type that should be available in meeting constants {@link #layout_types}\n * @param {Object} options.main preferred dimensions for the remote main video stream\n * @param {Number} options.main.width preferred width of main video stream\n * @param {Number} options.main.height preferred height of main video stream\n * @param {Object} options.content preferred dimensions for the remote content share stream\n * @param {Number} options.content.width preferred width of content share stream\n * @param {Number} options.content.height preferred height of content share stream\n * @returns {Promise}\n */\n changeVideoLayout({\n locusUrl,\n deviceUrl,\n layoutType,\n main,\n content,\n }: {\n locusUrl: string;\n deviceUrl: string;\n layoutType: string;\n main: {\n width: number;\n height: number;\n };\n content: {\n width: number;\n height: number;\n };\n }) {\n // send main/content renderInfo only if both width and height are specified\n if (main && (!main.width || !main.height)) {\n return Promise.reject(new Error(`Both width and height must be specified. One of them is missing for main: ${JSON.stringify(main)}`));\n }\n\n if (content && (!content.width || !content.height)) {\n return Promise.reject(new Error(`Both width and height must be specified. One of them is missing for content: ${JSON.stringify(content)}`));\n }\n\n const renderInfoMain = (main) ? {width: main.width, height: main.height} : undefined;\n const renderInfoContent = (content) ? {width: content.width, height: content.height} : undefined;\n\n const layoutParams = (renderInfoMain || renderInfoContent) ?\n {\n renderInfo:\n {\n main: renderInfoMain,\n content: renderInfoContent\n }\n } : undefined;\n\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.PUT,\n uri: `${locusUrl}/${CONTROLS}`,\n body: {\n layout: {\n deviceUrl,\n type: layoutType,\n layoutParams\n }\n }\n });\n }\n\n /**\n * Make a network request to end meeting for all\n * @param {Object} options\n * @param {Url} options.locusUrl\n * @returns {Promise}\n */\n endMeetingForAll({ locusUrl }: { locusUrl: string }) {\n const uri = `${locusUrl}/${END}`;\n\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.POST,\n uri\n });\n }\n\n /**\n * Send a locus keepAlive (used in lobby)\n * @param {Object} options\n * @param {Url} options.keepAliveUrl\n * @returns {Promise}\n */\n keepAlive({ keepAliveUrl }: { keepAliveUrl: string }) {\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.GET,\n uri: keepAliveUrl\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAGA;;AAEA;;AAEA;;AACA;;;;;;;;;;AAoBA;AACA;AACA;IACqBA,c;;;;;EAGnB,wBAAYC,KAAZ,EAAwBC,OAAxB,EAAsC;IAAA;;IAAA;IACpC,0BAAMD,KAAN,EAAaC,OAAb;IADoC;IAEpC,MAAKC,0BAAL,GAAkC,wBAAS,MAAKC,iBAAd,EAAiC,IAAjC,EAAuC;MAACC,OAAO,EAAE,IAAV;MAAgBC,QAAQ,EAAE;IAA1B,CAAvC,CAAlC;IAFoC;EAGrC;EAED;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;iGACE,iBAAkBJ,OAAlB;QAAA;QAAA;UAAA;YAAA;cAAA;gBAkBIK,kBAlBJ,GAgCML,OAhCN,CAkBIK,kBAlBJ,EAmBIC,cAnBJ,GAgCMN,OAhCN,CAmBIM,cAnBJ,EAoBIC,aApBJ,GAgCMP,OAhCN,CAoBIO,aApBJ,EAqBIC,eArBJ,GAgCMR,OAhCN,CAqBIQ,eArBJ,EAsBIC,SAtBJ,GAgCMT,OAhCN,CAsBIS,SAtBJ,EAuBIC,QAvBJ,GAgCMV,OAhCN,CAuBIU,QAvBJ,EAwBIC,UAxBJ,GAgCMX,OAhCN,CAwBIW,UAxBJ,EAyBIC,aAzBJ,GAgCMZ,OAhCN,CAyBIY,aAzBJ,EA0BIC,kBA1BJ,GAgCMb,OAhCN,CA0BIa,kBA1BJ,EA2BIC,SA3BJ,GAgCMd,OAhCN,CA2BIc,SA3BJ,EA4BIC,GA5BJ,GAgCMf,OAhCN,CA4BIe,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Aa;QAClBC,MAAM,EAAEC,qBAAA,CAAWqB,GADD;QAElBnB,GAAG,EAAEiE;MAFa,CAAb,CAAP;IAID;;;EAnuByCC,+B"}
|
|
1
|
+
{"version":3,"names":["MeetingRequest","attrs","options","changeVideoLayoutDebounced","changeVideoLayout","leading","trailing","asResourceOccupant","inviteeAddress","meetingNumber","permissionToken","deviceUrl","locusUrl","resourceId","correlationId","ensureConversation","moderator","pin","moveToResource","roapMessage","preferTranscoding","LoggerProxy","logger","info","url","body","device","deviceType","config","meetings","usingResource","moveMediaToResource","respOnlySdp","allowMultiDevice","supportsNativeLobby","clientMediaPreferences","webex","clientRegion","countryCode","regionCode","undefined","PARTICIPANT","internal","services","waitForCatalog","get","LOCI","CALL","invitee","address","error","concat","ALTERNATE_REDIRECT_TRUE","callPreferences","requestedMedia","_SLIDES_","localMedias","request","method","HTTP_VERBS","POST","uri","captchaRefreshUrl","captchaId","catch","err","dialInUrl","clientUrl","PROVISIONAL","provisionalType","PROVISIONAL_TYPE_DIAL_IN","dialOutUrl","phoneNumber","PROVISIONAL_TYPE_DIAL_OUT","dialoutAddress","desync","syncUrl","split","LOCUS","SYNCDEBUG","GET","reject","phoneUrl","selfId","LEAVE","PUT","ALERT","CONTROLS","record","recording","paused","PATCH","lock","locked","DECLINE","reason","MEDIA","floorReq","disposition","FLOOR_ACTION","GRANTED","beneficiary","personUrl","devices","requester","floor","resourceUrl","resourceToken","tones","SEND_DTMF_ENDPOINT","dtmf","uuid","v4","layoutType","main","content","width","height","Error","renderInfoMain","renderInfoContent","layoutParams","renderInfo","layout","type","END","keepAliveUrl","reactionChannelUrl","reaction","participantId","sender","StatelessWebexPlugin"],"sources":["request.ts"],"sourcesContent":["import uuid from 'uuid';\nimport {debounce} from 'lodash';\n// @ts-ignore\nimport {StatelessWebexPlugin} from '@webex/webex-core';\n// @ts-ignore\nimport {deviceType} from '@webex/common';\n\nimport LoggerProxy from '../common/logs/logger-proxy';\nimport {\n ALERT,\n ALTERNATE_REDIRECT_TRUE,\n CALL,\n CONTROLS,\n DECLINE,\n END,\n FLOOR_ACTION,\n HTTP_VERBS,\n LEAVE,\n LOCI,\n LOCUS,\n MEDIA,\n PARTICIPANT,\n PROVISIONAL_TYPE_DIAL_IN,\n PROVISIONAL_TYPE_DIAL_OUT,\n SEND_DTMF_ENDPOINT,\n _SLIDES_\n} from '../constants';\nimport {Reaction} from '../reactions/reactions.type';\n\n/**\n * @class MeetingRequest\n */\nexport default class MeetingRequest extends StatelessWebexPlugin {\n changeVideoLayoutDebounced: any;\n\n constructor(attrs: any, options: any) {\n super(attrs, options);\n this.changeVideoLayoutDebounced = debounce(this.changeVideoLayout, 2000, {leading: true, trailing: true});\n }\n\n /**\n * Make a network request to join a meeting\n * @param {Object} options\n * @param {String} options.sipUri\n * @param {String} options.deviceUrl\n * @param {String} options.locusUrl\n * @param {String} options.resourceId,\n * @param {String} options.correlationId\n * @param {boolean} options.ensureConversation\n * @param {boolean} options.moderator\n * @param {boolean} options.pin\n * @param {boolean} options.moveToResource\n * @param {Object} options.roapMessage\n * @returns {Promise}\n */\n async joinMeeting(options: {\n sipUri: string;\n deviceUrl: string;\n locusUrl: string;\n resourceId: string;\n correlationId: string;\n ensureConversation: boolean;\n moderator: boolean;\n pin: boolean;\n moveToResource: boolean;\n roapMessage: any;\n asResourceOccupant: any;\n inviteeAddress: any;\n meetingNumber: any;\n permissionToken: any;\n preferTranscoding: any;\n }) {\n const {\n asResourceOccupant,\n inviteeAddress,\n meetingNumber,\n permissionToken,\n deviceUrl,\n locusUrl,\n resourceId,\n correlationId,\n ensureConversation,\n moderator,\n pin,\n moveToResource,\n roapMessage,\n preferTranscoding\n } = options;\n\n LoggerProxy.logger.info(\n 'Meeting:request#joinMeeting --> Joining a meeting',\n correlationId\n );\n\n let url = '';\n\n const body: any = {\n asResourceOccupant,\n device: {\n url: deviceUrl,\n // @ts-ignore - config comes from registerPlugin\n deviceType: this.config.meetings.deviceType\n },\n usingResource: resourceId || null,\n moveMediaToResource: resourceId && moveToResource || false,\n correlationId,\n respOnlySdp: true,\n allowMultiDevice: true,\n ensureConversation: ensureConversation || false,\n supportsNativeLobby: 1,\n clientMediaPreferences: {\n preferTranscoding: preferTranscoding ?? true\n }\n };\n\n // @ts-ignore\n if (this.webex.meetings.clientRegion) {\n // @ts-ignore\n body.device.countryCode = this.webex.meetings.clientRegion.countryCode;\n // @ts-ignore\n body.device.regionCode = this.webex.meetings.clientRegion.regionCode;\n }\n\n if (moderator !== undefined) {\n body.moderator = moderator;\n }\n\n if (permissionToken) {\n body.permissionToken = permissionToken;\n }\n\n if (pin !== undefined) {\n body.pin = pin;\n }\n\n if (locusUrl) {\n url = `${locusUrl}/${PARTICIPANT}`;\n }\n else if (inviteeAddress || meetingNumber) {\n try {\n // @ts-ignore\n await this.webex.internal.services.waitForCatalog('postauth');\n // @ts-ignore\n url = `${this.webex.internal.services.get('locus')}/${LOCI}/${CALL}`;\n body.invitee = {\n address: inviteeAddress || `wbxmn:${meetingNumber}`\n };\n }\n catch (e) {\n LoggerProxy.logger.error(`Meeting:request#joinMeeting Error Joining ${inviteeAddress || meetingNumber} --> ${e}`);\n throw (e);\n }\n }\n\n\n // TODO: -- this will be resolved in SDK request\n url = url.concat(`?${ALTERNATE_REDIRECT_TRUE}`);\n\n if (resourceId === inviteeAddress) {\n body.callPreferences = {\n requestedMedia: [_SLIDES_]\n };\n }\n\n if (roapMessage) {\n body.localMedias = roapMessage.localMedias;\n }\n\n /// @ts-ignore\n return this.request({\n method: HTTP_VERBS.POST,\n uri: url,\n body\n });\n }\n\n /**\n * Send a request to refresh the captcha\n * @param {Object} options\n * @param {String} options.captchaRefreshUrl\n * @param {String} options.captchaId\n * @returns {Promise}\n * @private\n */\n private refreshCaptcha({ captchaRefreshUrl, captchaId }: { captchaRefreshUrl: string; captchaId: string }) {\n const body = {\n captchaId\n };\n\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.POST,\n uri: captchaRefreshUrl,\n body\n }).catch((err) => {\n LoggerProxy.logger.error(`Meeting:request#refreshCaptcha --> Error: ${err}`);\n\n throw err;\n });\n }\n\n /**\n * Make a network request to add a dial in device\n * @param {Object} options\n * @param {String} options.correlationId\n * @param {String} options.locusUrl url for the meeting\n * @param {String} options.dialInUrl identifier for the to-be provisioned device\n * @param {String} options.clientUrl identifier for the web device\n * @returns {Promise}\n * @private\n */\n private dialIn({\n locusUrl,\n dialInUrl,\n clientUrl,\n correlationId,\n }: {\n correlationId: string;\n locusUrl: string;\n dialInUrl: string;\n clientUrl: string;\n }) {\n LoggerProxy.logger.info(\n 'Meeting:request#dialIn --> Provisioning a dial in device',\n correlationId\n );\n const uri = `${locusUrl}/${PARTICIPANT}`;\n\n const body = {\n device: {\n deviceType: deviceType.PROVISIONAL,\n provisionalType: PROVISIONAL_TYPE_DIAL_IN,\n url: dialInUrl,\n clientUrl\n },\n correlationId\n };\n\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.POST,\n uri,\n body\n }).catch((err) => {\n LoggerProxy.logger.error(`Meeting:request#dialIn --> Error provisioning a dial in device, error ${err}`);\n\n throw err;\n });\n }\n\n /**\n * Make a network request to add a dial out device\n * @param {Object} options\n * @param {String} options.correlationId\n * @param {String} options.locusUrl url for the meeting\n * @param {String} options.dialOutUrl identifier for the to-be provisioned device\n * @param {String} options.phoneNumber phone number to dial out to\n * @param {String} options.clientUrl identifier for the web device\n * @returns {Promise}\n * @private\n */\n private dialOut({\n locusUrl,\n dialOutUrl,\n phoneNumber,\n clientUrl,\n correlationId,\n }: {\n correlationId: string;\n locusUrl: string;\n dialOutUrl: string;\n phoneNumber: string;\n clientUrl: string;\n }) {\n LoggerProxy.logger.info(\n 'Meeting:request#dialOut --> Provisioning a dial out device',\n correlationId\n );\n const uri = `${locusUrl}/${PARTICIPANT}`;\n\n const body = {\n device: {\n deviceType: deviceType.PROVISIONAL,\n provisionalType: PROVISIONAL_TYPE_DIAL_OUT,\n url: dialOutUrl,\n dialoutAddress: phoneNumber,\n clientUrl\n },\n correlationId\n };\n\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.POST,\n uri,\n body\n }).catch((err) => {\n LoggerProxy.logger.error(`Meeting:request#dialOut --> Error provisioning a dial out device, error ${err}`);\n\n throw err;\n });\n }\n\n /**\n * Syns the missed delta event\n * @param {Object} options\n * @param {boolean} options.desync flag to get partial or whole locus object\n * @param {String} options.syncUrl sync url to get ht elatest locus delta\n * @returns {Promise}\n */\n syncMeeting(options: { desync: boolean; syncUrl: string }) {\n /* eslint-disable no-else-return */\n const {desync} = options;\n let {syncUrl} = options;\n\n /* istanbul ignore else */\n if (desync) {\n // check for existing URL parameters\n syncUrl = syncUrl.concat(syncUrl.split('?')[1] ? '&' : '?').concat(`${LOCUS.SYNCDEBUG}=${desync}`);\n }\n\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.GET,\n uri: syncUrl\n }) // TODO: Handle if delta sync failed . Get the full locus object\n .catch((err) => {\n LoggerProxy.logger.error(`Meeting:request#syncMeeting --> Error syncing meeting, error ${err}`);\n\n return err;\n });\n }\n\n /**\n * Request to get the complete locus object\n * @param {Object} options\n * @param {boolean} options.desync flag to get partial or whole locus object\n * @param {String} options.locusUrl sync url to get ht elatest locus delta\n * @returns {Promise}\n */\n getFullLocus(options: { desync: boolean; locusUrl: string }) {\n let {locusUrl} = options;\n const {desync} = options;\n\n if (locusUrl) {\n if (desync) {\n locusUrl += `?${LOCUS.SYNCDEBUG}=${desync}`;\n }\n\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.GET,\n uri: locusUrl\n }).catch((err) => {\n LoggerProxy.logger.error(`Meeting:request#getFullLocus --> Error getting full locus, error ${err}`);\n\n return err;\n });\n }\n\n return Promise.reject();\n }\n\n /**\n * Make a network request to make a provisioned phone leave the meeting\n * @param {Object} options\n * @param {String} options.locusUrl\n * @param {String} options.phoneUrl\n * @param {String} options.correlationId\n * @param {String} options.selfId\n * @returns {Promise}\n * @private\n */\n private disconnectPhoneAudio({\n locusUrl,\n phoneUrl,\n correlationId,\n selfId,\n }: {\n locusUrl: string;\n phoneUrl: string;\n correlationId: string;\n selfId: string;\n }) {\n LoggerProxy.logger.info(\n `Meeting:request#disconnectPhoneAudio --> request phone ${phoneUrl} to leave`,\n correlationId\n );\n const uri = `${locusUrl}/${PARTICIPANT}/${selfId}/${LEAVE}`;\n\n const body = {\n device: {\n deviceType: deviceType.PROVISIONAL,\n url: phoneUrl\n },\n correlationId\n };\n\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.PUT,\n uri,\n body\n }).catch((err) => {\n LoggerProxy.logger.error(\n `Meeting:request#disconnectPhoneAudio --> Error when requesting phone ${phoneUrl} to leave, error ${err}`\n );\n\n throw err;\n });\n }\n\n /**\n * Make a network request to leave a meeting\n * @param {Object} options\n * @param {Url} options.locusUrl\n * @param {String} options.selfId\n * @param {Url} options.deviceUrl\n * @param {String} options.resourceId,\n * @param {String} options.correlationId\n * @returns {Promise}\n */\n leaveMeeting({\n locusUrl,\n selfId,\n deviceUrl: url,\n resourceId,\n correlationId,\n }: {\n locusUrl: string;\n selfId: string;\n deviceUrl: string;\n resourceId: string;\n correlationId: string;\n }) {\n LoggerProxy.logger.info(\n 'Meeting:request#leaveMeeting --> Leaving a meeting',\n correlationId\n );\n\n const uri = `${locusUrl}/${PARTICIPANT}/${selfId}/${LEAVE}`;\n const body = {\n device: {\n // @ts-ignore\n deviceType: this.config.meetings.deviceType,\n url\n },\n usingResource: resourceId || null,\n correlationId\n };\n\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.PUT,\n uri,\n body\n });\n }\n\n /**\n * Make a network request to acknowledge a meeting\n * @param {Object} options\n * @param {String} options.locusUrl\n * @param {String} options.deviceUrl\n * @param {String} options.correlationId\n * @returns {Promise}\n */\n acknowledgeMeeting(options: { locusUrl: string; deviceUrl: string; correlationId: string }) {\n const uri = `${options.locusUrl}/${PARTICIPANT}/${ALERT}`;\n const body = {\n device: {\n // @ts-ignore\n deviceType: this.config.meetings.deviceType,\n url: options.deviceUrl\n },\n correlationId: options.correlationId\n };\n\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.PUT,\n uri,\n body\n });\n }\n\n /**\n * Make a network request to acknowledge a meeting\n * @param {Object} options\n * @param {String} options.locusUrl\n * @param {String} options.deviceUrl\n * @param {String} options.id\n * @returns {Promise}\n */\n recordMeeting(options: { locusUrl: string; deviceUrl: string; id: string, recording: any, paused: any }) {\n const uri = `${options.locusUrl}/${CONTROLS}`;\n const body = {\n record: {\n recording: options.recording,\n paused: options.paused\n }\n };\n\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.PATCH,\n uri,\n body\n });\n }\n\n lockMeeting(options) {\n const uri = `${options.locusUrl}/${CONTROLS}`;\n const body = {\n lock: {\n locked: options.lock\n }\n };\n\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.PATCH,\n uri,\n body\n });\n }\n\n /**\n * Make a network request to decline a meeting\n * @param {Object} options\n * @param {String} options.locusUrl\n * @param {String} options.deviceUrl\n * @param {String} options.reason\n * @returns {Promise}\n */\n declineMeeting(options: { locusUrl: string; deviceUrl: string; reason: string }) {\n const uri = `${options.locusUrl}/${PARTICIPANT}/${DECLINE}`;\n const body = {\n device: {\n // @ts-ignore\n deviceType: this.config.meetings.deviceType,\n url: options.deviceUrl\n },\n ...(options.reason && {reason: options.reason}),\n };\n\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.PUT,\n uri,\n body\n });\n }\n\n /**\n * Toggle remote audio and/or video\n * @param {Object} options options for toggling\n * @param {String} options.selfId Locus self id??\n * @param {String} options.locusUrl Locus url\n * @param {String} options.deviceUrl Url of a device\n * @param {String} options.resourceId Populated if you are paired to a device\n * @param {String} options.localMedias local sdps\n * @param {Boolean} options.preferTranscoding false for multistream (Homer), true for transcoded media (Edonus)\n * @returns {Promise}\n */\n remoteAudioVideoToggle(options: {\n selfId: string;\n locusUrl: string;\n deviceUrl: string;\n resourceId: string;\n localMedias: string;\n } | any) {\n const uri = `${options.locusUrl}/${PARTICIPANT}/${options.selfId}/${MEDIA}`;\n const body = {\n device: {\n // @ts-ignore\n deviceType: this.config.meetings.deviceType,\n url: options.deviceUrl\n },\n usingResource: options.resourceId || null,\n correlationId: options.correlationId,\n respOnlySdp: true,\n localMedias: options.localMedias,\n clientMediaPreferences: {\n preferTranscoding: options.preferTranscoding ?? true\n }\n };\n\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.PUT,\n uri,\n body\n });\n }\n\n /**\n * change the content floor grant\n * @param {Object} options options for floor grant\n * @param {String} options.disposition floor action (granted/released)\n * @param {String} options.personUrl personUrl who is requesting floor\n * @param {String} options.deviceUrl Url of a device\n * @param {String} options.resourceId Populated if you are paired to a device\n * @param {String} options.uri floor grant uri\n * @returns {Promise}\n */\n changeMeetingFloor(options: {\n disposition: string;\n personUrl: string;\n deviceUrl: string;\n resourceId: string;\n uri: string;\n } | any) {\n let floorReq: any = {disposition: options.disposition};\n\n /* istanbul ignore else */\n if (options.disposition === FLOOR_ACTION.GRANTED) {\n floorReq = {\n beneficiary: {\n url: options.personUrl,\n devices: [\n {\n // @ts-ignore\n deviceType: this.config.meetings.deviceType,\n url: options.deviceUrl\n }\n ]\n },\n disposition: options.disposition,\n requester: {\n url: options.personUrl\n }\n };\n }\n\n const body: any = {\n floor: floorReq,\n resourceUrl: options.resourceUrl\n };\n\n if (options?.resourceToken) {\n body.resourceToken = options?.resourceToken;\n }\n\n // @ts-ignore\n return this.request({\n uri: options.uri,\n method: HTTP_VERBS.PUT,\n body\n });\n }\n\n /**\n * Sends a request to the DTMF endpoint to send tones\n * @param {Object} options\n * @param {String} options.locusUrl\n * @param {String} options.deviceUrl\n * @param {String} options.tones a string of one or more DTMF tones to send\n * @returns {Promise}\n */\n sendDTMF({ locusUrl, deviceUrl, tones }: { locusUrl: string; deviceUrl: string; tones: string }) {\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.POST,\n uri: `${locusUrl}/${SEND_DTMF_ENDPOINT}`,\n body: {\n deviceUrl,\n dtmf: {\n correlationId: uuid.v4(),\n tones\n }\n }\n });\n }\n\n /**\n * Sends a request to the controls endpoint to set the video layout\n * @param {Object} options\n * @param {String} options.locusUrl\n * @param {String} options.deviceUrl\n * @param {String} options.layoutType a layout type that should be available in meeting constants {@link #layout_types}\n * @param {Object} options.main preferred dimensions for the remote main video stream\n * @param {Number} options.main.width preferred width of main video stream\n * @param {Number} options.main.height preferred height of main video stream\n * @param {Object} options.content preferred dimensions for the remote content share stream\n * @param {Number} options.content.width preferred width of content share stream\n * @param {Number} options.content.height preferred height of content share stream\n * @returns {Promise}\n */\n changeVideoLayout({\n locusUrl,\n deviceUrl,\n layoutType,\n main,\n content,\n }: {\n locusUrl: string;\n deviceUrl: string;\n layoutType: string;\n main: {\n width: number;\n height: number;\n };\n content: {\n width: number;\n height: number;\n };\n }) {\n // send main/content renderInfo only if both width and height are specified\n if (main && (!main.width || !main.height)) {\n return Promise.reject(new Error(`Both width and height must be specified. One of them is missing for main: ${JSON.stringify(main)}`));\n }\n\n if (content && (!content.width || !content.height)) {\n return Promise.reject(new Error(`Both width and height must be specified. One of them is missing for content: ${JSON.stringify(content)}`));\n }\n\n const renderInfoMain = (main) ? {width: main.width, height: main.height} : undefined;\n const renderInfoContent = (content) ? {width: content.width, height: content.height} : undefined;\n\n const layoutParams = (renderInfoMain || renderInfoContent) ?\n {\n renderInfo:\n {\n main: renderInfoMain,\n content: renderInfoContent\n }\n } : undefined;\n\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.PUT,\n uri: `${locusUrl}/${CONTROLS}`,\n body: {\n layout: {\n deviceUrl,\n type: layoutType,\n layoutParams\n }\n }\n });\n }\n\n /**\n * Make a network request to end meeting for all\n * @param {Object} options\n * @param {Url} options.locusUrl\n * @returns {Promise}\n */\n endMeetingForAll({ locusUrl }: { locusUrl: string }) {\n const uri = `${locusUrl}/${END}`;\n\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.POST,\n uri\n });\n }\n\n /**\n * Send a locus keepAlive (used in lobby)\n * @param {Object} options\n * @param {Url} options.keepAliveUrl\n * @returns {Promise}\n */\n keepAlive({ keepAliveUrl }: { keepAliveUrl: string }) {\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.GET,\n uri: keepAliveUrl\n });\n }\n\n /**\n * Make a network request to send a reaction.\n * @param {Object} options\n * @param {Url} options.reactionChannelUrl\n * @param {Reaction} options.reaction\n * @param {string} options.senderID\n * @returns {Promise}\n */\n sendReaction({ reactionChannelUrl, reaction, participantId }: { reactionChannelUrl: string, reaction: Reaction, participantId: string }) {\n const uri = reactionChannelUrl;\n\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.POST,\n uri,\n body: {\n sender: {participantId},\n reaction,\n }\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAGA;;AAEA;;AAEA;;AACA;;;;;;;;;;AAqBA;AACA;AACA;IACqBA,c;;;;;EAGnB,wBAAYC,KAAZ,EAAwBC,OAAxB,EAAsC;IAAA;;IAAA;IACpC,0BAAMD,KAAN,EAAaC,OAAb;IADoC;IAEpC,MAAKC,0BAAL,GAAkC,wBAAS,MAAKC,iBAAd,EAAiC,IAAjC,EAAuC;MAACC,OAAO,EAAE,IAAV;MAAgBC,QAAQ,EAAE;IAA1B,CAAvC,CAAlC;IAFoC;EAGrC;EAED;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;iGACE,iBAAkBJ,OAAlB;QAAA;QAAA;UAAA;YAAA;cAAA;gBAkBIK,kBAlBJ,GAgCML,OAhCN,CAkBIK,kBAlBJ,EAmBIC,cAnBJ,GAgCMN,OAhCN,CAmBIM,cAnBJ,EAoBIC,aApBJ,GAgCMP,OAhCN,CAoBIO,aApBJ,EAqBIC,eArBJ,GAgCMR,OAhCN,CAqBIQ,eArBJ,EAsBIC,SAtBJ,GAgCMT,OAhCN,CAsBIS,SAtBJ,EAuBIC,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AMjD,QAAN,cAAkBiH,cAAlB,CAAT,CADmD,CAGnD;;MACA,OAAO,KAAKpE,OAAL,CAAa;QAClBC,MAAM,EAAEC,qBAAA,CAAWC,IADD;QAElBC,GAAG,EAAHA;MAFkB,CAAb,CAAP;IAID;IAED;AACF;AACA;AACA;AACA;AACA;;;;WACE,0BAAsD;MAAA,IAA1CiE,YAA0C,SAA1CA,YAA0C;MACpD;MACA,OAAO,KAAKrE,OAAL,CAAa;QAClBC,MAAM,EAAEC,qBAAA,CAAWqB,GADD;QAElBnB,GAAG,EAAEiE;MAFa,CAAb,CAAP;IAID;IAED;AACF;AACA;AACA;AACA;AACA;AACA;AACA;;;;WACE,8BAAyI;MAAA,IAA1HC,kBAA0H,UAA1HA,kBAA0H;MAAA,IAAtGC,QAAsG,UAAtGA,QAAsG;MAAA,IAA5FC,aAA4F,UAA5FA,aAA4F;MACvI,IAAMpE,GAAG,GAAGkE,kBAAZ,CADuI,CAGvI;;MACA,OAAO,KAAKtE,OAAL,CAAa;QAClBC,MAAM,EAAEC,qBAAA,CAAWC,IADD;QAElBC,GAAG,EAAHA,GAFkB;QAGlBpC,IAAI,EAAE;UACJyG,MAAM,EAAE;YAACD,aAAa,EAAbA;UAAD,CADJ;UAEJD,QAAQ,EAARA;QAFI;MAHY,CAAb,CAAP;IAQD;;;EAzvByCG,+B"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
4
|
+
|
|
5
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
exports.SkinTones = exports.Reactions = void 0;
|
|
10
|
+
var Reactions = {
|
|
11
|
+
smile: {
|
|
12
|
+
type: 'smile',
|
|
13
|
+
codepoints: '1F642',
|
|
14
|
+
shortcodes: ':slightly_smiling_face:'
|
|
15
|
+
},
|
|
16
|
+
sad: {
|
|
17
|
+
type: 'sad',
|
|
18
|
+
codepoints: '1F625',
|
|
19
|
+
shortcodes: ':sad_but_relieved_face:'
|
|
20
|
+
},
|
|
21
|
+
wow: {
|
|
22
|
+
type: 'wow',
|
|
23
|
+
codepoints: '1F62E',
|
|
24
|
+
shortcodes: ':open_mouth:'
|
|
25
|
+
},
|
|
26
|
+
haha: {
|
|
27
|
+
type: 'haha',
|
|
28
|
+
codepoints: '1F603',
|
|
29
|
+
shortcodes: ':smiley:'
|
|
30
|
+
},
|
|
31
|
+
celebrate: {
|
|
32
|
+
type: 'celebrate',
|
|
33
|
+
codepoints: '1F389',
|
|
34
|
+
shortcodes: ':party_popper:'
|
|
35
|
+
},
|
|
36
|
+
clap: {
|
|
37
|
+
type: 'clap',
|
|
38
|
+
codepoints: '1F44F',
|
|
39
|
+
shortcodes: ':clap:'
|
|
40
|
+
},
|
|
41
|
+
thumbs_up: {
|
|
42
|
+
type: 'thumb_up',
|
|
43
|
+
codepoints: '1F44D',
|
|
44
|
+
shortcodes: ':thumbsup:'
|
|
45
|
+
},
|
|
46
|
+
thumbs_down: {
|
|
47
|
+
type: 'thumb_down',
|
|
48
|
+
codepoints: '1F44E',
|
|
49
|
+
shortcodes: ':thumbsdown:'
|
|
50
|
+
},
|
|
51
|
+
heart: {
|
|
52
|
+
type: 'heart',
|
|
53
|
+
codepoints: '2764',
|
|
54
|
+
shortcodes: ':heart:'
|
|
55
|
+
},
|
|
56
|
+
fire: {
|
|
57
|
+
type: 'fire',
|
|
58
|
+
codepoints: '1F525',
|
|
59
|
+
shortcodes: ':fire:'
|
|
60
|
+
},
|
|
61
|
+
prayer: {
|
|
62
|
+
type: 'prayer',
|
|
63
|
+
codepoints: '1F64F',
|
|
64
|
+
shortcodes: ':pray:'
|
|
65
|
+
},
|
|
66
|
+
speed_up: {
|
|
67
|
+
type: 'speed_up',
|
|
68
|
+
codepoints: '1F407',
|
|
69
|
+
shortcodes: ':rabbit:'
|
|
70
|
+
},
|
|
71
|
+
slow_down: {
|
|
72
|
+
type: 'slow_down',
|
|
73
|
+
codepoints: '1F422',
|
|
74
|
+
shortcodes: ':turtle:'
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
exports.Reactions = Reactions;
|
|
78
|
+
var SkinTones = {
|
|
79
|
+
normal: {
|
|
80
|
+
type: 'normal_skin_tone',
|
|
81
|
+
codepoints: '',
|
|
82
|
+
shortcodes: ''
|
|
83
|
+
},
|
|
84
|
+
light: {
|
|
85
|
+
type: 'light_skin_tone',
|
|
86
|
+
codepoints: '1F3FB',
|
|
87
|
+
shortcodes: ':skin-tone-2:'
|
|
88
|
+
},
|
|
89
|
+
medium_light: {
|
|
90
|
+
type: 'medium_light_skin_tone',
|
|
91
|
+
codepoints: '1F3FC',
|
|
92
|
+
shortcodes: ':skin-tone-3:'
|
|
93
|
+
},
|
|
94
|
+
medium: {
|
|
95
|
+
type: 'medium_skin_tone',
|
|
96
|
+
codepoints: '1F3FD',
|
|
97
|
+
shortcodes: ':skin-tone-4:'
|
|
98
|
+
},
|
|
99
|
+
medium_dark: {
|
|
100
|
+
type: 'medium_dark_skin_tone',
|
|
101
|
+
codepoints: '1F3FE',
|
|
102
|
+
shortcodes: ':skin-tone-5:'
|
|
103
|
+
},
|
|
104
|
+
dark: {
|
|
105
|
+
type: 'dark_skin_tone',
|
|
106
|
+
codepoints: '1F3FF',
|
|
107
|
+
shortcodes: ':skin-tone-6:'
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
exports.SkinTones = SkinTones;
|
|
111
|
+
//# sourceMappingURL=reactions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Reactions","smile","type","codepoints","shortcodes","sad","wow","haha","celebrate","clap","thumbs_up","thumbs_down","heart","fire","prayer","speed_up","slow_down","SkinTones","normal","light","medium_light","medium","medium_dark","dark"],"sources":["reactions.ts"],"sourcesContent":["import {Reaction, ReactionType, SkinTone, SkinToneType} from './reactions.type';\n\nconst Reactions: Record<ReactionType, Reaction> = {\n smile: {\n type: 'smile',\n codepoints: '1F642',\n shortcodes: ':slightly_smiling_face:'\n },\n sad: {\n type: 'sad',\n codepoints: '1F625',\n shortcodes: ':sad_but_relieved_face:',\n },\n wow: {\n type: 'wow',\n codepoints: '1F62E',\n shortcodes: ':open_mouth:',\n },\n haha: {\n type: 'haha',\n codepoints: '1F603',\n shortcodes: ':smiley:'\n },\n celebrate: {\n type: 'celebrate',\n codepoints: '1F389',\n shortcodes: ':party_popper:',\n },\n clap: {\n type: 'clap',\n codepoints: '1F44F',\n shortcodes: ':clap:',\n },\n thumbs_up: {\n type: 'thumb_up',\n codepoints: '1F44D',\n shortcodes: ':thumbsup:',\n },\n thumbs_down: {\n type: 'thumb_down',\n codepoints: '1F44E',\n shortcodes: ':thumbsdown:',\n },\n heart: {\n type: 'heart',\n codepoints: '2764',\n shortcodes: ':heart:',\n },\n fire: {\n type: 'fire',\n codepoints: '1F525',\n shortcodes: ':fire:',\n },\n prayer: {\n type: 'prayer',\n codepoints: '1F64F',\n shortcodes: ':pray:',\n },\n speed_up: {\n type: 'speed_up',\n codepoints: '1F407',\n shortcodes: ':rabbit:',\n },\n slow_down: {\n type: 'slow_down',\n codepoints: '1F422',\n shortcodes: ':turtle:',\n }\n};\n\nconst SkinTones: Record<SkinToneType, SkinTone> = {\n normal: {\n type: 'normal_skin_tone',\n codepoints: '',\n shortcodes: '',\n },\n light: {\n type: 'light_skin_tone',\n codepoints: '1F3FB',\n shortcodes: ':skin-tone-2:',\n },\n medium_light: {\n type: 'medium_light_skin_tone',\n codepoints: '1F3FC',\n shortcodes: ':skin-tone-3:',\n },\n medium: {\n type: 'medium_skin_tone',\n codepoints: '1F3FD',\n shortcodes: ':skin-tone-4:',\n },\n medium_dark: {\n type: 'medium_dark_skin_tone',\n codepoints: '1F3FE',\n shortcodes: ':skin-tone-5:',\n },\n dark: {\n type: 'dark_skin_tone',\n codepoints: '1F3FF',\n shortcodes: ':skin-tone-6:',\n }\n};\n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E;IAERC,UAAU,EAAE,OAFJ;IAGRC,UAAU,EAAE;EAHJ,CAxDsC;EA6DhDY,SAAS,EAAE;IACTd,IAAI,EAAE,WADG;IAETC,UAAU,EAAE,OAFH;IAGTC,UAAU,EAAE;EAHH;AA7DqC,CAAlD;;AAoEA,IAAMa,SAAyC,GAAG;EAChDC,MAAM,EAAE;IACNhB,IAAI,EAAE,kBADA;IAENC,UAAU,EAAE,EAFN;IAGNC,UAAU,EAAE;EAHN,CADwC;EAMhDe,KAAK,EAAE;IACLjB,IAAI,EAAE,iBADD;IAELC,UAAU,EAAE,OAFP;IAGLC,UAAU,EAAE;EAHP,CANyC;EAWhDgB,YAAY,EAAE;IACZlB,IAAI,EAAE,wBADM;IAEZC,UAAU,EAAE,OAFA;IAGZC,UAAU,EAAE;EAHA,CAXkC;EAgBhDiB,MAAM,EAAE;IACNnB,IAAI,EAAE,kBADA;IAENC,UAAU,EAAE,OAFN;IAGNC,UAAU,EAAE;EAHN,CAhBwC;EAqBhDkB,WAAW,EAAE;IACXpB,IAAI,EAAE,uBADK;IAEXC,UAAU,EAAE,OAFD;IAGXC,UAAU,EAAE;EAHD,CArBmC;EA0BhDmB,IAAI,EAAE;IACJrB,IAAI,EAAE,gBADF;IAEJC,UAAU,EAAE,OAFR;IAGJC,UAAU,EAAE;EAHR;AA1B0C,CAAlD"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
4
|
+
|
|
5
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
exports.SkinToneType = exports.ReactionType = void 0;
|
|
10
|
+
var ReactionType;
|
|
11
|
+
exports.ReactionType = ReactionType;
|
|
12
|
+
|
|
13
|
+
(function (ReactionType) {
|
|
14
|
+
ReactionType["smile"] = "smile";
|
|
15
|
+
ReactionType["sad"] = "sad";
|
|
16
|
+
ReactionType["wow"] = "wow";
|
|
17
|
+
ReactionType["haha"] = "haha";
|
|
18
|
+
ReactionType["celebrate"] = "celebrate";
|
|
19
|
+
ReactionType["clap"] = "clap";
|
|
20
|
+
ReactionType["thumbs_up"] = "thumbs_up";
|
|
21
|
+
ReactionType["thumbs_down"] = "thumbs_down";
|
|
22
|
+
ReactionType["heart"] = "heart";
|
|
23
|
+
ReactionType["fire"] = "fire";
|
|
24
|
+
ReactionType["prayer"] = "prayer";
|
|
25
|
+
ReactionType["speed_up"] = "speed_up";
|
|
26
|
+
ReactionType["slow_down"] = "slow_down";
|
|
27
|
+
})(ReactionType || (exports.ReactionType = ReactionType = {}));
|
|
28
|
+
|
|
29
|
+
var SkinToneType;
|
|
30
|
+
exports.SkinToneType = SkinToneType;
|
|
31
|
+
|
|
32
|
+
(function (SkinToneType) {
|
|
33
|
+
SkinToneType["normal"] = "normal";
|
|
34
|
+
SkinToneType["light"] = "light";
|
|
35
|
+
SkinToneType["medium_light"] = "medium_light";
|
|
36
|
+
SkinToneType["medium"] = "medium";
|
|
37
|
+
SkinToneType["medium_dark"] = "medium_dark";
|
|
38
|
+
SkinToneType["dark"] = "dark";
|
|
39
|
+
})(SkinToneType || (exports.SkinToneType = SkinToneType = {}));
|
|
40
|
+
//# sourceMappingURL=reactions.type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ReactionType","SkinToneType"],"sources":["reactions.type.ts"],"sourcesContent":["\nexport type EmoticonData = {\n type: string;\n codepoints?: string;\n shortcodes?: string;\n}\n\nexport type SkinTone = EmoticonData;\nexport type Reaction = EmoticonData & {\n tone?: SkinTone;\n}\n\nexport enum ReactionType {\n smile = 'smile',\n sad = 'sad',\n wow = 'wow',\n haha = 'haha',\n celebrate = 'celebrate',\n clap = 'clap',\n thumbs_up = 'thumbs_up',\n thumbs_down = 'thumbs_down',\n heart = 'heart',\n fire = 'fire',\n prayer = 'prayer',\n speed_up = 'speed_up',\n slow_down = 'slow_down',\n}\n\nexport enum SkinToneType {\n normal = 'normal',\n light = 'light',\n medium_light = 'medium_light',\n medium = 'medium',\n medium_dark = 'medium_dark',\n dark = 'dark',\n}\n"],"mappings":";;;;;;;;;IAYYA,Y;;;WAAAA,Y;EAAAA,Y;EAAAA,Y;EAAAA,Y;EAAAA,Y;EAAAA,Y;EAAAA,Y;EAAAA,Y;EAAAA,Y;EAAAA,Y;EAAAA,Y;EAAAA,Y;EAAAA,Y;EAAAA,Y;GAAAA,Y,4BAAAA,Y;;IAgBAC,Y;;;WAAAA,Y;EAAAA,Y;EAAAA,Y;EAAAA,Y;EAAAA,Y;EAAAA,Y;EAAAA,Y;GAAAA,Y,4BAAAA,Y"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webex/plugin-meetings",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.11",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Cisco EULA (https://www.cisco.com/c/en/us/products/end-user-license-agreement.html)",
|
|
6
6
|
"contributors": [
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
]
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@webex/plugin-meetings": "3.0.0-beta.
|
|
32
|
-
"@webex/test-helper-chai": "3.0.0-beta.
|
|
33
|
-
"@webex/test-helper-mocha": "3.0.0-beta.
|
|
34
|
-
"@webex/test-helper-mock-webex": "3.0.0-beta.
|
|
35
|
-
"@webex/test-helper-retry": "3.0.0-beta.
|
|
36
|
-
"@webex/test-helper-test-users": "3.0.0-beta.
|
|
31
|
+
"@webex/plugin-meetings": "3.0.0-beta.11",
|
|
32
|
+
"@webex/test-helper-chai": "3.0.0-beta.11",
|
|
33
|
+
"@webex/test-helper-mocha": "3.0.0-beta.11",
|
|
34
|
+
"@webex/test-helper-mock-webex": "3.0.0-beta.11",
|
|
35
|
+
"@webex/test-helper-retry": "3.0.0-beta.11",
|
|
36
|
+
"@webex/test-helper-test-users": "3.0.0-beta.11",
|
|
37
37
|
"chai": "^4.3.4",
|
|
38
38
|
"chai-as-promised": "^7.1.1",
|
|
39
39
|
"jsdom-global": "3.0.2",
|
|
@@ -41,18 +41,18 @@
|
|
|
41
41
|
"typed-emitter": "^2.1.0"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@webex/common": "3.0.0-beta.
|
|
44
|
+
"@webex/common": "3.0.0-beta.11",
|
|
45
45
|
"@webex/internal-media-core": "^0.0.17-beta",
|
|
46
|
-
"@webex/internal-plugin-conversation": "3.0.0-beta.
|
|
47
|
-
"@webex/internal-plugin-device": "3.0.0-beta.
|
|
48
|
-
"@webex/internal-plugin-llm": "3.0.0-beta.
|
|
49
|
-
"@webex/internal-plugin-mercury": "3.0.0-beta.
|
|
50
|
-
"@webex/internal-plugin-metrics": "3.0.0-beta.
|
|
51
|
-
"@webex/internal-plugin-support": "3.0.0-beta.
|
|
52
|
-
"@webex/internal-plugin-user": "3.0.0-beta.
|
|
53
|
-
"@webex/plugin-people": "3.0.0-beta.
|
|
54
|
-
"@webex/plugin-rooms": "3.0.0-beta.
|
|
55
|
-
"@webex/webex-core": "3.0.0-beta.
|
|
46
|
+
"@webex/internal-plugin-conversation": "3.0.0-beta.11",
|
|
47
|
+
"@webex/internal-plugin-device": "3.0.0-beta.11",
|
|
48
|
+
"@webex/internal-plugin-llm": "3.0.0-beta.11",
|
|
49
|
+
"@webex/internal-plugin-mercury": "3.0.0-beta.11",
|
|
50
|
+
"@webex/internal-plugin-metrics": "3.0.0-beta.11",
|
|
51
|
+
"@webex/internal-plugin-support": "3.0.0-beta.11",
|
|
52
|
+
"@webex/internal-plugin-user": "3.0.0-beta.11",
|
|
53
|
+
"@webex/plugin-people": "3.0.0-beta.11",
|
|
54
|
+
"@webex/plugin-rooms": "3.0.0-beta.11",
|
|
55
|
+
"@webex/webex-core": "3.0.0-beta.11",
|
|
56
56
|
"bowser": "^2.11.0",
|
|
57
57
|
"btoa": "^1.2.1",
|
|
58
58
|
"dotenv": "^4.0.0",
|
package/src/meeting/index.ts
CHANGED
|
@@ -75,6 +75,8 @@ import {ReceiveSlotManager} from '../multistream/receiveSlotManager';
|
|
|
75
75
|
import {MediaRequestManager} from '../multistream/mediaRequestManager';
|
|
76
76
|
import {RemoteMediaManager, Event as RemoteMediaManagerEvent} from '../multistream/remoteMediaManager';
|
|
77
77
|
import {MultistreamMedia} from '../multistream/multistreamMedia';
|
|
78
|
+
import {SkinTones, Reactions} from '../reactions/reactions';
|
|
79
|
+
import {Reaction, ReactionType, SkinToneType} from '../reactions/reactions.type';
|
|
78
80
|
|
|
79
81
|
import InMeetingActions from './in-meeting-actions';
|
|
80
82
|
|
|
@@ -408,7 +410,7 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
408
410
|
mediaId?: string;
|
|
409
411
|
meetingFiniteStateMachine: any;
|
|
410
412
|
meetingInfo: object;
|
|
411
|
-
meetingRequest:
|
|
413
|
+
meetingRequest: MeetingRequest;
|
|
412
414
|
members: Members;
|
|
413
415
|
options: object;
|
|
414
416
|
orgId: string;
|
|
@@ -477,7 +479,6 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
477
479
|
resourceUrl: string;
|
|
478
480
|
selfId: string;
|
|
479
481
|
state: any;
|
|
480
|
-
|
|
481
482
|
namespace = MEETINGS;
|
|
482
483
|
|
|
483
484
|
/**
|
|
@@ -6523,4 +6524,35 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
6523
6524
|
clearInterval(this.keepAliveTimerId);
|
|
6524
6525
|
this.keepAliveTimerId = null;
|
|
6525
6526
|
};
|
|
6527
|
+
|
|
6528
|
+
/**
|
|
6529
|
+
* Send a reaction inside the meeting.
|
|
6530
|
+
*
|
|
6531
|
+
* @param {ReactionType} reactionType - type of reaction to be sent. Example: "thumbs_up"
|
|
6532
|
+
* @param {SkinToneType} skinToneType - skin tone for the reaction. Example: "medium_dark"
|
|
6533
|
+
* @returns {Promise}
|
|
6534
|
+
* @public
|
|
6535
|
+
* @memberof Meeting
|
|
6536
|
+
*/
|
|
6537
|
+
public sendReaction(reactionType: ReactionType, skinToneType?: SkinToneType) {
|
|
6538
|
+
const reactionChannelUrl = this.locusInfo?.controls?.reactions?.reactionChannelUrl as string;
|
|
6539
|
+
const participantId = this.members.selfId;
|
|
6540
|
+
|
|
6541
|
+
const reactionData = Reactions[reactionType];
|
|
6542
|
+
|
|
6543
|
+
if (!reactionData) {
|
|
6544
|
+
return Promise.reject(new Error(`${reactionType} is not a valid reaction.`));
|
|
6545
|
+
}
|
|
6546
|
+
const skinToneData = SkinTones[skinToneType] || SkinTones.normal;
|
|
6547
|
+
const reaction: Reaction = {
|
|
6548
|
+
...reactionData,
|
|
6549
|
+
tone: skinToneData
|
|
6550
|
+
};
|
|
6551
|
+
|
|
6552
|
+
if (reactionChannelUrl) {
|
|
6553
|
+
return this.meetingRequest.sendReaction({reactionChannelUrl, reaction, participantId});
|
|
6554
|
+
}
|
|
6555
|
+
|
|
6556
|
+
return Promise.reject(new Error('Error sending reaction, service url not found.'));
|
|
6557
|
+
}
|
|
6526
6558
|
}
|
package/src/meeting/request.ts
CHANGED
|
@@ -25,6 +25,7 @@ import {
|
|
|
25
25
|
SEND_DTMF_ENDPOINT,
|
|
26
26
|
_SLIDES_
|
|
27
27
|
} from '../constants';
|
|
28
|
+
import {Reaction} from '../reactions/reactions.type';
|
|
28
29
|
|
|
29
30
|
/**
|
|
30
31
|
* @class MeetingRequest
|
|
@@ -769,4 +770,26 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
769
770
|
uri: keepAliveUrl
|
|
770
771
|
});
|
|
771
772
|
}
|
|
773
|
+
|
|
774
|
+
/**
|
|
775
|
+
* Make a network request to send a reaction.
|
|
776
|
+
* @param {Object} options
|
|
777
|
+
* @param {Url} options.reactionChannelUrl
|
|
778
|
+
* @param {Reaction} options.reaction
|
|
779
|
+
* @param {string} options.senderID
|
|
780
|
+
* @returns {Promise}
|
|
781
|
+
*/
|
|
782
|
+
sendReaction({ reactionChannelUrl, reaction, participantId }: { reactionChannelUrl: string, reaction: Reaction, participantId: string }) {
|
|
783
|
+
const uri = reactionChannelUrl;
|
|
784
|
+
|
|
785
|
+
// @ts-ignore
|
|
786
|
+
return this.request({
|
|
787
|
+
method: HTTP_VERBS.POST,
|
|
788
|
+
uri,
|
|
789
|
+
body: {
|
|
790
|
+
sender: {participantId},
|
|
791
|
+
reaction,
|
|
792
|
+
}
|
|
793
|
+
});
|
|
794
|
+
}
|
|
772
795
|
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import {Reaction, ReactionType, SkinTone, SkinToneType} from './reactions.type';
|
|
2
|
+
|
|
3
|
+
const Reactions: Record<ReactionType, Reaction> = {
|
|
4
|
+
smile: {
|
|
5
|
+
type: 'smile',
|
|
6
|
+
codepoints: '1F642',
|
|
7
|
+
shortcodes: ':slightly_smiling_face:'
|
|
8
|
+
},
|
|
9
|
+
sad: {
|
|
10
|
+
type: 'sad',
|
|
11
|
+
codepoints: '1F625',
|
|
12
|
+
shortcodes: ':sad_but_relieved_face:',
|
|
13
|
+
},
|
|
14
|
+
wow: {
|
|
15
|
+
type: 'wow',
|
|
16
|
+
codepoints: '1F62E',
|
|
17
|
+
shortcodes: ':open_mouth:',
|
|
18
|
+
},
|
|
19
|
+
haha: {
|
|
20
|
+
type: 'haha',
|
|
21
|
+
codepoints: '1F603',
|
|
22
|
+
shortcodes: ':smiley:'
|
|
23
|
+
},
|
|
24
|
+
celebrate: {
|
|
25
|
+
type: 'celebrate',
|
|
26
|
+
codepoints: '1F389',
|
|
27
|
+
shortcodes: ':party_popper:',
|
|
28
|
+
},
|
|
29
|
+
clap: {
|
|
30
|
+
type: 'clap',
|
|
31
|
+
codepoints: '1F44F',
|
|
32
|
+
shortcodes: ':clap:',
|
|
33
|
+
},
|
|
34
|
+
thumbs_up: {
|
|
35
|
+
type: 'thumb_up',
|
|
36
|
+
codepoints: '1F44D',
|
|
37
|
+
shortcodes: ':thumbsup:',
|
|
38
|
+
},
|
|
39
|
+
thumbs_down: {
|
|
40
|
+
type: 'thumb_down',
|
|
41
|
+
codepoints: '1F44E',
|
|
42
|
+
shortcodes: ':thumbsdown:',
|
|
43
|
+
},
|
|
44
|
+
heart: {
|
|
45
|
+
type: 'heart',
|
|
46
|
+
codepoints: '2764',
|
|
47
|
+
shortcodes: ':heart:',
|
|
48
|
+
},
|
|
49
|
+
fire: {
|
|
50
|
+
type: 'fire',
|
|
51
|
+
codepoints: '1F525',
|
|
52
|
+
shortcodes: ':fire:',
|
|
53
|
+
},
|
|
54
|
+
prayer: {
|
|
55
|
+
type: 'prayer',
|
|
56
|
+
codepoints: '1F64F',
|
|
57
|
+
shortcodes: ':pray:',
|
|
58
|
+
},
|
|
59
|
+
speed_up: {
|
|
60
|
+
type: 'speed_up',
|
|
61
|
+
codepoints: '1F407',
|
|
62
|
+
shortcodes: ':rabbit:',
|
|
63
|
+
},
|
|
64
|
+
slow_down: {
|
|
65
|
+
type: 'slow_down',
|
|
66
|
+
codepoints: '1F422',
|
|
67
|
+
shortcodes: ':turtle:',
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const SkinTones: Record<SkinToneType, SkinTone> = {
|
|
72
|
+
normal: {
|
|
73
|
+
type: 'normal_skin_tone',
|
|
74
|
+
codepoints: '',
|
|
75
|
+
shortcodes: '',
|
|
76
|
+
},
|
|
77
|
+
light: {
|
|
78
|
+
type: 'light_skin_tone',
|
|
79
|
+
codepoints: '1F3FB',
|
|
80
|
+
shortcodes: ':skin-tone-2:',
|
|
81
|
+
},
|
|
82
|
+
medium_light: {
|
|
83
|
+
type: 'medium_light_skin_tone',
|
|
84
|
+
codepoints: '1F3FC',
|
|
85
|
+
shortcodes: ':skin-tone-3:',
|
|
86
|
+
},
|
|
87
|
+
medium: {
|
|
88
|
+
type: 'medium_skin_tone',
|
|
89
|
+
codepoints: '1F3FD',
|
|
90
|
+
shortcodes: ':skin-tone-4:',
|
|
91
|
+
},
|
|
92
|
+
medium_dark: {
|
|
93
|
+
type: 'medium_dark_skin_tone',
|
|
94
|
+
codepoints: '1F3FE',
|
|
95
|
+
shortcodes: ':skin-tone-5:',
|
|
96
|
+
},
|
|
97
|
+
dark: {
|
|
98
|
+
type: 'dark_skin_tone',
|
|
99
|
+
codepoints: '1F3FF',
|
|
100
|
+
shortcodes: ':skin-tone-6:',
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
export {Reactions, SkinTones};
|