import { StatelessWebexPlugin } from '@webex/webex-core'; import { SendReactionOptions, BrbOptions, ToggleReactionsOptions, PostMeetingDataConsentOptions, SynchronizeVideoLayout, fetchDataChannelTokenOptions } from './request.type'; import { AnnotationInfo } from '../annotation/annotation.types'; import { ClientMediaPreferences } from '../reachability/reachability.types'; /** * @class MeetingRequest */ export default class MeetingRequest extends StatelessWebexPlugin { changeVideoLayoutDebounced: any; meetingRef: WeakRef; locusDeltaRequest: (options: object) => Promise; buildLocusDeltaRequestOptions: (options: object) => Promise; /** * Constructor * @param {Object} attrs * @param {Object} options */ constructor(attrs: any, options: any); /** * Returns joinCookie from boundedStorage if present. * @returns {Object} joinCookie */ private getJoinCookie; /** * Make a network request to join a meeting * @param {Object} options * @param {String} options.sipUri * @param {String} options.deviceUrl * @param {String} options.locusUrl * @param {String} options.resourceId, * @param {String} options.correlationId * @param {boolean} options.ensureConversation * @param {boolean} options.moderator * @param {boolean} options.pin * @param {boolean} options.moveToResource * @param {Object} options.roapMessage * @param {boolean} options.breakoutsSupported * @param {String} options.locale, * @param {Array} options.deviceCapabilities * @param {boolean} options.liveAnnotationSupported * @param {String} options.alias * @returns {Promise} */ joinMeeting(options: { sipUri: string; deviceUrl: string; locusUrl: string; locusClusterUrl: string; resourceId: string; correlationId: string; ensureConversation: boolean; moderator: boolean; pin: boolean; moveToResource: boolean; roapMessage: any; asResourceOccupant: any; inviteeAddress: any; meetingNumber: any; permissionToken: any; preferTranscoding: any; reachability: any; breakoutsSupported: boolean; locale?: string; deviceCapabilities?: Array; liveAnnotationSupported: boolean; alias?: string; clientMediaPreferences: ClientMediaPreferences; }): Promise; /** * Send a request to refresh the captcha * @param {Object} options * @param {String} options.captchaRefreshUrl * @param {String} options.captchaId * @returns {Promise} * @private */ private refreshCaptcha; /** * Make a network request to add a dial in device * @param {Object} options * @param {String} options.correlationId * @param {String} options.locusUrl url for the meeting * @param {String} options.dialInUrl identifier for the to-be provisioned device * @param {String} options.clientUrl identifier for the web device * @returns {Promise} * @private */ private dialIn; /** * Make a network request to add a dial out device * @param {Object} options * @param {String} options.correlationId * @param {String} options.locusUrl url for the meeting * @param {String} options.dialOutUrl identifier for the to-be provisioned device * @param {String} options.phoneNumber phone number to dial out to * @param {String} options.clientUrl identifier for the web device * @returns {Promise} * @private */ private dialOut; /** * Sends a requests to get the latest locus DTO, it might be a full Locus or a delta, depending on the url provided * @param {Object} options * @param {String} options.locusUrl sync url to get ht elatest locus delta * @returns {Promise} */ getLocusDTO(options: { url: string; }): any; /** * Make a network request to make a provisioned phone leave the meeting * @param {Object} options * @param {String} options.locusUrl * @param {String} options.phoneUrl * @param {String} options.correlationId * @param {String} options.selfId * @returns {Promise} * @private */ private disconnectPhoneAudio; /** * Prepares request options to to leave a meeting * @param {Object} options * @param {Url} options.locusUrl * @param {String} options.selfId * @param {Url} options.deviceUrl * @param {String} options.resourceId, * @param {String} options.correlationId * @returns {Object} request options */ prepareLeaveMeetingRequestOptions({ locusUrl, selfId, deviceUrl: url, resourceId, correlationId, }: { locusUrl: string; selfId: string; deviceUrl: string; resourceId: string; correlationId: string; }): { method: string; uri: string; body: { device: { deviceType: any; url: string; }; usingResource: string; correlationId: string; }; }; /** * Make a network request to leave a meeting * @param {Object} options * @returns {Promise} */ leaveMeeting({ locusUrl, selfId, deviceUrl: url, resourceId, correlationId, }: { locusUrl: string; selfId: string; deviceUrl: string; resourceId: string; correlationId: string; }): Promise; /** * Builds request options to leave a meeting * @param {Object} options * @returns {Object} request options */ buildLeaveMeetingRequestOptions(options: any): Promise; /** * Make a network request to acknowledge a meeting * @param {Object} options * @param {String} options.locusUrl * @param {String} options.deviceUrl * @param {String} options.correlationId * @returns {Promise} */ acknowledgeMeeting(options: { locusUrl: string; deviceUrl: string; correlationId: string; }): Promise; /** * Makes a network request to lock the meeting * @param {Object} options * @param {Boolean} options.lock Whether it is locked or not * @returns {Promise} */ lockMeeting(options: any): Promise; /** * Make a network request to decline a meeting * @param {Object} options * @param {String} options.locusUrl * @param {String} options.deviceUrl * @param {String} options.reason * @returns {Promise} */ declineMeeting(options: { locusUrl: string; deviceUrl: string; reason: string; }): Promise; /** * change the content floor grant * @param {Object} options options for floor grant * @param {String} options.disposition floor action (granted/released) * @param {String} options.personUrl personUrl who is requesting floor * @param {String} options.deviceUrl Url of a device * @param {String} options.resourceId Populated if you are paired to a device * @param {String} options.uri floor grant uri * @param {String} options.shareInstanceId id for current share * @returns {Promise} */ changeMeetingFloor(options: { disposition: string; personUrl: string; deviceUrl: string; resourceId: string; uri: string; annotationInfo: AnnotationInfo; shareInstanceId: string; } | any): any; /** * Sends a request to the DTMF endpoint to send tones * @param {Object} options * @param {String} options.locusUrl * @param {String} options.deviceUrl * @param {String} options.tones a string of one or more DTMF tones to send * @returns {Promise} */ sendDTMF({ locusUrl, deviceUrl, tones }: { locusUrl: string; deviceUrl: string; tones: string; }): Promise; /** * Sends a request to the controls endpoint to set the video layout * @param {Object} options * @param {String} options.locusUrl * @param {String} options.deviceUrl * @param {String} options.layoutType a layout type that should be available in meeting constants {@link #layout_types} * @param {Object} options.main preferred dimensions for the remote main video stream * @param {Number} options.main.width preferred width of main video stream * @param {Number} options.main.height preferred height of main video stream * @param {Object} options.content preferred dimensions for the remote content share stream * @param {Number} options.content.width preferred width of content share stream * @param {Number} options.content.height preferred height of content share stream * @returns {Promise} */ changeVideoLayout({ locusUrl, deviceUrl, layoutType, main, content, }: { locusUrl: string; deviceUrl: string; layoutType: string; main: { width: number; height: number; }; content: { width: number; height: number; }; }): Promise; /** * Make a network request to end meeting for all * @param {Object} options * @param {Url} options.locusUrl * @returns {Promise} */ endMeetingForAll({ locusUrl }: { locusUrl: string; }): Promise; /** * Send a locus keepAlive (used in lobby) * @param {Object} options * @param {Url} options.keepAliveUrl * @returns {Promise} */ keepAlive({ keepAliveUrl }: { keepAliveUrl: string; }): any; /** * Make a network request to send a reaction. * @param {Object} options * @param {Url} options.reactionChannelUrl * @param {Reaction} options.reaction * @param {string} options.senderID * @returns {Promise} */ sendReaction({ reactionChannelUrl, reaction, participantId }: SendReactionOptions): any; /** * Extend the current meeting duration. * * @param {Object} params - Parameters for extending the meeting. * @param {string} params.meetingInstanceId - The unique ID of the meeting instance. * @param {string} params.participantId - The ID of the participant requesting the extension. * @param {number} params.extensionMinutes - The number of minutes to extend the meeting by. * @param {string} params.meetingPolicyUrl - The base URL for meeting policy service (dynamic, from locus links) * @returns {Promise} A promise that resolves with the server response. */ extendMeeting({ meetingInstanceId, participantId, extensionMinutes, meetingPolicyUrl, }: { meetingInstanceId: string; participantId: string; extensionMinutes: number; meetingPolicyUrl: string; }): any; /** * Make a network request to enable or disable reactions. * @param {boolean} options.enable - determines if we need to enable or disable. * @param {locusUrl} options.locusUrl * @returns {Promise} */ toggleReactions({ enable, locusUrl, requestingParticipantId }: ToggleReactionsOptions): Promise; getLocusStatusByUrl(locusUrl: string): any; /** * Sends a request to set be right back status. * * @param {Object} options - The options for brb request. * @param {boolean} options.enabled - Whether brb status is enabled. * @param {string} options.locusUrl - The URL of the locus. * @param {string} options.deviceUrl - The URL of the device. * @param {string} options.selfId - The ID of the participant. * @returns {Promise} */ setBrb({ enabled, locusUrl, deviceUrl, selfId }: BrbOptions): Promise; /** * Sends a request to set post meeting data consent. * * @param {Object} options - The options for post meeting data consent request. * @param {boolean} options.consent - Whether accepted or declined. * @param {string} options.locusUrl - The URL of the locus. * @param {string} options.deviceUrl - The URL of the device. * @param {string} options.selfId - The ID of the participant. * @returns {Promise} */ setPostMeetingDataConsent({ postMeetingDataConsent, locusUrl, deviceUrl, selfId, }: PostMeetingDataConsentOptions): Promise; /** * Synchronize the stage for a meeting * * @param {LocusUrl} locusUrl The locus URL * @param {SetStageVideoLayout} videoLayout The video layout to synchronize * @returns {Promise} The locus request */ synchronizeStage(locusUrl: string, videoLayout: SynchronizeVideoLayout): Promise; /** * Sends a request to notify the host of a meeting. * @param {string} siteFullUrl - The site URL. * @param {string} locusId - The locus ID. * @param {string} meetingUuid - The meeting UUID. * @param {Array} displayName - The display names to notify the host about. * @returns {Promise} */ notifyHost(siteFullUrl: string, locusId: string, meetingUuid: string, displayName: string[]): any; /** * Call out to a SIP participant * * @param {any} meetingId - The meeting ID. * @param {any} meetingNumber - The meeting number. * @param {string} address - The SIP address to call out. * @param {string} displayName - The display name for the participant. * @returns {Promise} The API response */ sipCallOut(meetingId: any, meetingNumber: any, address: any, displayName: any): Promise; /** * Cancel an ongoing SIP call-out * * @param {string} participantId - The ID of the participant whose SIP call-out should be cancelled. * @returns {Promise} The API response */ cancelSipCallOut(participantId: any): Promise; /** * Sends a request to retrieve the datachannel authorization token for a participant. * * For regular meeting data channel: * GET /locus/api/v1/loci/{uuid:lid}/participant/{uuid:pid}/datachannel/token * * For practice session data channel: * GET /locus/api/v1/loci/{uuid:lid}/participant/{uuid:pid}/practiceSession/datachannel/token * * @param {string} locusUrl - The locus url. * @param {string} requestingParticipantId - The participant UUID. * @param {boolean} [isPracticeSession=false] - Whether to get the practice session token. * @returns {Promise<{datachannelToken: string}>} */ fetchDatachannelToken({ locusUrl, requestingParticipantId, isPracticeSession, }: fetchDataChannelTokenOptions): Promise; }