The Cisco Webex JS SDK
All of the examples in these API docs assume you've gotten an authenticated Webex instance (unless otherwise specified) using one of the methods below.
webex
has three basic modes of operation:
This is the quickest way to get up and running with our JavaScript SDK. Simply set the environment variable WEBEX_ACCESS_TOKEN
to your access token and add the following line at the top of your JavaScript file to get a ready-to-use instance.
You can get your
WEBEX_ACCESS_TOKEN
from the Cisco Webex for Developers portal.
webex/env
is also a great way to get started with bots.
Our JavaScript SDK provides out-of-the-box support for the OAuth 2.0 Implicit Grant Flow.
You'll need to register an OAuth Client to get your "authorization string"
Use the steps under Bundling (or something similar) to get the SDK into your browser, then use the following JavaScript to get started:
You'll need to bundle the SDK to use it in a web browser. Right now, we do all our SDK testing with Browserify, but our Cisco Webex Widgets use webpack.
The following snippet is the bare minimum to get our code into a form suitable for a web browser. You'll probably want to additionally pipe it through a minifier like UglifyJS before going to production.
Then, just load your bundle using:
Though the implicit flow is great for single page apps, it's not ideal for integrations that might need to do things on your users' behalf months in the future. We additionally support the OAuth 2.0 Authorization Code Grant flow, but due to its complexity, there's a bit you'll need to wire up in your app to take advantage of it. The following is an example of how an Express app might do authentication.
See Browser Guide and Server Guide
Create a new Webex instance
Webex
:
Create a new Webex instance configured for your OAuth client
const webex = Webex.init({
config: {
credentials: {
authorizationString: `<AUTHORIZATION URL FROM DEVELOPER PORTAL>`
}
}
});
Create a new Webex instance configured for a Bot
const webex = Webex.init({
credentials: `<BOT TOKEN FROM DEVELOPER PORTAL>`
});
Browser support for OAuth2. Automatically parses the URL hash for an access token
Alias of AuthorizationBrowser#isAuthorizing
Type: boolean
Initiates the OAuth flow for user authentication. This function determines the type of OAuth flow to use based on the client type configuration. If the client is configured as "confidential", it will initiate the Authorization Code Grant flow; otherwise, it will initiate the Implicit Grant flow.
(Object
= {}
)
The options to configure the OAuth flow.
Name | Description |
---|---|
options.state Object?
|
An optional state object that can be used to include additional information such as security tokens. A CSRF token will be automatically generated and added to this state object. |
options.separateWindow (boolean | Object)?
|
Determines if the login should open in a separate window.
This can be a boolean or an object specifying window features:
|
Promise<void>
:
A promise that resolves when the appropriate OAuth flow has been initiated.
The promise does not necessarily indicate the completion of the login process.
Initiates the Implicit Grant flow for authorization. This function constructs the login URL and either opens it in a new window or in the current window based on the provided options. Typically called via AuthorizationBrowser#initiateLogin.
(Object)
The options to configure the login flow.
Name | Description |
---|---|
options.separateWindow Object?
|
Determines if the login should open in a separate window.
This can be a boolean or an object specifying window features:
|
Promise<void>
:
A promise that resolves immediately after initiating the login flow.
This promise does not indicate the completion of the login process.
Kicks off the Implicit Code grant flow. Typically called via AuthorizationBrowser#initiateLogin
(Object)
Promise
:
Requests a Webex access token for a user already authenticated into your product.
Note: You'll need to supply a jwtRefreshCallback of the form
Promise<jwt> = jwtRefreshCallback(webex)
for automatic token refresh to
work.
Promise
:
Called by WebexCore#logout(). Redirects to the logout page
Promise
:
NodeJS support for OAuth2
Alias of AuthorizationNode#isAuthorizing
Type: boolean
Maintain a cache of meetings and sync with services.
Extends WebexPlugin
(...any)
Explicitly sets up the meetings plugin by registering the device, connecting to mercury, and listening for locus events.
(DeviceRegistrationOptions?)
The options for registering the device (optional)
Promise
:
Creates a noise reduction effect
(INoiseReductionEffect)
optional custom effect options
Promise<effect>
:
noise reduction effect.
Creates a virtual background effect
(IVirtualBackgroundEffect)
optional custom effect options
Promise<effect>
:
virtual background effect.
gets the reachability instance for Meetings
Reachability
:
gets the personal meeting room instance, for saved PMR values for this user
PersonalMeetingRoom
:
Create a meeting or return an existing meeting.
When meeting info passed it should be complete, e.g.: fetched after password or captcha provided
(string)
sipURL, phonenumber, or locus object}
(DESTINATION_TYPE?
= null
)
the optional specified type, such as locusId
(Boolean
= false
)
whether a random delay should be added to fetching meeting info
(Object
= {}
)
extra parameters to be provided when fetching meeting info
(string
= undefined
)
the optional specified correlationId (callStateForMetrics.correlationId can be provided instead)
(Boolean
= false
)
whether to throw an error if meeting info fails to fetch (for calls that are not 1:1 or content share)
(CallStateForMetrics
= undefined
)
information about call state for metrics
(Object?
= undefined
)
Pre-fetched complete meeting info
(String?
= undefined
)
meeting info prefetch url
(string
= undefined
)
the optional specified sessionCorrelationId (callStateForMetrics.sessionCorrelationId) can be provided instead
Promise<Meeting>
:
A new Meeting.
Syncs all the meetings from server. Does nothing and returns immediately if unverified guest.
(boolean
= {}
)
whether the sync should keep only locus meetings or any other meeting in meetingCollection
Name | Description |
---|---|
keepOnlyLocusMeetings.keepOnlyLocusMeetings any
(default true )
|
Promise<void>
:
The PersonalMeetingRoom object to interact with server
Type: Object
If the meetings plugin has been registered and listening via Meetings#register
Type: Boolean
Uploads logs to the webex services for tracking
String
:
feedback ID logs were submitted under
Returns basic information about a meeting that exists or used to exist in the MeetingCollection
(string)
(BasicMeetingInformation | undefined)
:
The property name for what collection will be stored, i.e., this.meetingInfos, this.meetings, etc.
Type: String
Meetings Ready Event Emitted when the meetings instance on webex is ready
Meetings Network Disconnected Event Emitted when the meetings instance is disconnected from the internal mercury server
Meetings Registered Event Emitted when the meetings instance has been registered and listening
Meeting Removed Event Emitted when a meeting was removed from the cache of meetings
Type: Object
Meeting is the crux of the plugin
Checks if the supplied password/host key is correct. It returns a promise with information whether the password and captcha code were correct or not.
(String)
this can be either a password or a host key, can be undefined if only captcha was required
(String)
can be undefined if captcha was not required by the server
(Boolean
= false
)
whether Call Analyzer events should be sent when fetching meeting information
Promise<{isPasswordValid: boolean, requiredCaptcha: boolean, failureReason: MEETING_INFO_FAILURE_REASON}>
:
Checks if the supplied registrationId is correct. It returns a promise with information whether the registrationId and captcha code were correct or not.
(Boolean
= false
)
whether Call Analyzer events should be sent when fetching meeting information
Promise<{isRegistrationIdValid: boolean, requiredCaptcha: boolean, failureReason: MEETING_INFO_FAILURE_REASON}>
:
Admit the guest(s) to the call once they are waiting. If the host/cohost is in a breakout session, the locus url of the session must be provided as the authorizingLocusUrl. Regardless of host/cohost location, the locus Id (lid) in the path should be the locus Id of the main, which means the locus url of the api call must be from the main session. If these loucs urls are not provided, the function will do the check.
Promise
:
see #members.admitMembers
Shorthand function to join AND set up media
(Object
= {}
)
options to join with media
Name | Description |
---|---|
options.joinOptions JoinOptions?
|
see #join() |
options.mediaOptions AddMediaOptions?
|
see #addMedia() |
Promise
:
-- {join: see join(), media: see addMedia(), multistreamEnabled: flag to indicate if we managed to join in multistream mode}
joinWithMedia({
joinOptions: {resourceId: 'resourceId' },
mediaOptions: {
localStreams: { microphone: microphoneStream, camera: cameraStream }
}
})
Internal version of addMedia() with some more arguments for finer control of its behavior
(Function)
callback to determine the icePhase for CA "client.ice.end" failure events
(TurnServerInfo)
TURN server information
(boolean)
if true, TURN discovery will be done
(AddMediaOptions
= {}
)
same as options of the public addMedia() method
Promise<void>
:
Checks if there are any queued media updates and runs the first one from the queue if we are in a state that allows doing that.
undefined
:
Updates the media connection - it allows to enable/disable all audio/video/share in the meeting. This does not affect the published tracks, so for example if a microphone track is published and updateMedia({audioEnabled: false}) is called, the audio will not be sent or received anymore, but the track's "published" state is not changed and when updateMedia({audioEnabled: true}) is called, the sending of the audio from the same track will resume.
(Object)
Name | Description |
---|---|
options.audioEnabled boolean
|
[optional] enables/disables receiving and sending of main audio in the meeting |
options.videoEnabled boolean
|
[optional] enables/disables receiving and sending of main video in the meeting |
options.shareEnabled boolean
|
[optional] enables/disables receiving and sending of screen share in the meeting |
Promise
:
Leave the current meeting
(Object
= {}as any
)
leave options
Name | Description |
---|---|
options.resourceId String?
|
the device with which to leave from, empty if just the computer |
options.clientEventLeaveReason String?
|
the leaveReason to include in the Call Analyzer event. Must be one of: 'paired-leave' | 'one-to-one' | 'ended-by-locus' (defaults to no reason) https://sqbu-github.cisco.com/WebExSquared/event-dictionary/blob/main/diagnostic-events.raml#L796 |
options.reason String?
|
only used for logging |
Promise
:
Sends request to change layout type for the current meeting for the specific participant/device only
(Object
= {}as any
)
preferred dimensions for the remote main and content streams (server can ignore it)
Name | Description |
---|---|
renderInfo.main Object
|
preferred dimensions for the remote main video stream |
renderInfo.main.width Number
|
preferred width of main video stream |
renderInfo.main.height Number
|
preferred height of main video stream |
renderInfo.content Object
|
preferred dimensions for the remote content share stream |
renderInfo.content.width Number
|
preferred width of content share stream |
renderInfo.content.height Number
|
preferred height of content share stream |
Promise
:
Send a reaction inside the meeting.
(ReactionServerType)
type of reaction to be sent. Example: "thumbs_up"
(SkinToneType)
skin tone for the reaction. Example: "medium_dark"
Promise
:
Call state used for metrics
Type: CallStateForMetrics
Type: Annotation
helper class for managing receive slots (for multistream media connections)
Object containing helper classes for managing media requests for audio/video/screenshare (for multistream media connections) All multistream media requests sent out for this meeting have to go through them.
Type: MeetingStateMachine
If true, then media is sent over multiple separate streams. If false, then media is transcoded by the server into a single stream.
Passing only info as we send basic info for meeting added event
Type: MediaProperties
Type: InMeetingActions
Password status. If it's PASSWORD_STATUS.REQUIRED then verifyPassword() needs to be called with the correct password before calling join()
Type: PASSWORD_STATUS
registrationId status. If it's REGISTRATIONID_STATUS.REQUIRED then verifyRegistrationId() needs to be called with the correct registrationId before calling join()
Type: REGISTRATION_ID_STATUS
Information about required captcha. If null, then no captcha is required. status. If it's PASSWORD_STATUS.REQUIRED then verifyPassword() needs to be called with the correct password before calling join()
Type: Object
The class that helps to control recording functions: start, stop, pause, resume, etc
Type: RecordingController
The class that helps to control recording functions: start, stop, pause, resume, etc
Type: ControlsOptionsManager
helper class for managing remote streams
Reason why TURN discovery is skipped.
Type: string
Setter - sets isoLocalClientMeetingJoinTime This will be set once on meeting join, and not updated again this will always produce an ISO string If the iso string is invalid, it will fallback to the current system time
Getter - Returns callStateForMetrics.sessionCorrelationId
string
:
Add pre-fetched meeting info
The passed meeting info should be be complete, e.g.: fetched after password or captcha provided
(Object)
Complete meeting info
(FetchMeetingInfoParams)
Fetch parameters for validation
Promise<void>
:
Manages be right back status updates for the current participant.
(boolean)
Indicates whether the user enabled brb or not.
Promise<void>
:
resolves when the brb status is updated or does nothing if not in a multistream meeting.
Sets the self user policies based on the contents of the permission token
void
:
Removes references to local streams. This function should be called on cleanup when we leave the meeting etc.
void
:
This method stops receiving transcription for the current meeting
void
:
Handles ROAP_FAILURE event from the webrtc media connection
(Error)
void
:
Handles an incoming Roap message
(RoapMessage)
roap message
undefined
:
This function makes sure we send the right metrics when local and remote SDPs are processed/generated
undefined
:
Returns a promise that will resolve to fetch options for leaving a meeting.
This is to support quickly submitting a leave request when the browser/tab is closing. Calling meeting.leave will not work because there are some async steps that will not complete before the browser is closed. Instead, we pre-gather all the information/options needed for the request(s), and then simply and quickly fire the fetch(es) when pagehide is triggered.
We must use fetch instead of request because fetch has a keepalive option that allows the request it to outlive the page.
Note: the $timings values will be wrong, but setRequestTimingsAndFetch() will properly adjust them before submitting.
Promise
:
resolves to options to be used with fetch
Gets permission token expiry information including timeLeft, expiryTime, currentTime (from the time the function has been fired)
object
:
permissionTokenExpiryInfo
number
:
permissionTokenExpiryInfo.timeLeft The time left for token to expire
number
:
permissionTokenExpiryInfo.expiryTime The expiry time of permission token from the server
number
:
permissionTokenExpiryInfo.currentTime The current time of the local machine
Meeting State Change Event Emitted when ever there is a meeting state change
Type: Object
Meeting Ringing Event Emitted when this client should play a ringing sound, because this member is getting an incoming meeting or sending out an incoming meeting
Type: Object
Meeting Started Sharing Local Event Emitted when this member starts sharing
Type: Object
Meeting Stopped Sharing Local Event Emitted when this member stops sharing
Type: Object
Meeting Started Sharing Remote Event Emitted when remote sharing starts
Type: Object
Meeting Stopped Sharing Remote Event Emitted when remote screen sharing ends
Type: Object
Meeting Actions Update Event Emitted when a user can take actions on a meeting such as lock, unlock, assign host
Type: Object
Meeting Muted By Others Event Emitted when a member is muted by another member
Type: Object
Reconnection Starting Event Emitted when reconnection of media to the active meeting was successful
Messages are how people communicate in rooms. Each message timestamped and represented in Webex as a distinct block of content. Messages can contain plain text and a single file attachment. See the Message Attachments Guide for a list of supported media types.
Register to listen for incoming attachmentAction events
This is an alternate approach to registering for attachmentAction webhooks.
The events passed to any registered handlers will be similar to the webhook JSON,
but will omit webhook specific fields such as name, secret, url, etc.
The attachmentActions.listen() event objects can also include additional fields not
available in the webhook's JSON payload, specifically: inputs
.
To utilize the listen()
method, the authorization token used
will need to have spark:all
and spark:kms
scopes enabled.
Note that by configuring your application to enable or disable spark:all
via its configuration page will also enable or disable spark:kms
.
See the Sample App
for more details.
Promise
:
webex.attachmentActions.listen()
.then(() => {
console.log('listening to attachmentActions events');
webex.attachmentActions.on('created', (event) => console.log(`Got an attachmentActions:created event:\n${event}`));
})
.catch((e) => console.error(`Unable to register for attachmentAction events: ${e}`));
// Some app logic...
// WHen it is time to cleanup
webex.attachmentActions.stopListening();
webex.attachmentActions.off('created');
Register to listen for incoming messages events
This is an alternate approach to registering for messages webhooks.
The events passed to any registered handlers will be similar to the webhook JSON,
but will omit webhook specific fields such as name, secret, url, etc.
The messages.listen() event objects can also include additional fields not
available in the webhook's JSON payload: text
, markdown
, and files
.
These fields are available when their details are included in the web socket's
activity
object. Retrieving other fields, such as the html
field,
will require a manual request to get the corresponding message object.
To utilize the listen()
method, the authorization token used
will need to have spark:all
and spark:kms
scopes enabled.
Note that by configuring your application to enable or disable spark:all
via its configuration page will also enable or disable spark:kms
.
See the Sample App
for more details.
Promise
:
webex.messages.listen()
.then(() => {
console.log('listening to message events');
webex.messages.on('created', (event) => console.log(`Got a message:created event:\n${event}`));
webex.messages.on('deleted', (event) => console.log(`Got a message:deleted event:\n${event}`));
})
.catch((e) => console.error(`Unable to register for message events: ${e}`));
// Some app logic...
// When it is time to cleanup
webex.messages.stopListening();
webex.messages.off('created');
webex.messages.off('deleted');
Post a new message and/or media content into a room.
(MessageObject)
Promise<MessageObject>
:
webex.rooms.create({title: 'Create Message Example'})
.then(function(room) {
return webex.messages.create({
text: 'Howdy!',
roomId: room.id
});
})
.then(function(message) {
var assert = require('assert');
assert(message.id);
assert(message.personId);
assert(message.personEmail);
assert(message.roomId);
assert(message.created);
return 'success';
});
// => success
Put an updated message and/or media content into a room instead of existing message.
(MessageObject)
(MessageObject)
Promise<MessageObject>
:
webex.rooms.create({title: 'Create Message Example'})
.then(function(room) {
return webex.messages.create({
text: 'Howdy!',
roomId: room.id
});
})
.then(function(m) {
message = m;
return webex.messages.update(message,{markdown:`**What up**`});
})
.then(function(m) {
message = m;
return webex.messages.update(message.id,{roomId:message.roomId,text:'Howdy!'});
})
.then(function(message) {
var assert = require('assert');
assert(message.id);
assert(message.personId);
assert(message.personEmail);
assert(message.roomId);
assert(message.created);
return 'success';
});
// => success
Returns a single message.
((RoomObject | string))
Promise<MessageObject>
:
var message;
webex.rooms.create({title: 'Get Message Example'})
.then(function(room) {
return webex.messages.create({
text: 'Howdy!',
roomId: room.id
});
})
.then(function(m) {
message = m;
return webex.messages.get(message.id);
})
.then(function(message2) {
var assert = require('assert');
assert.deepEqual(message2, message);
return 'success';
});
// => success
Returns a list of messages. In most cases the results will only contain messages posted in rooms that the authenticated user is a member of.
Promise<Page<MessageObject>>
:
var message1, message2, room;
webex.rooms.create({title: 'List Messages Example'})
.then(function(r) {
room = r;
return webex.messages.create({
text: 'Howdy!',
roomId: room.id
});
})
.then(function(m) {
message1 = m;
return webex.messages.create({
text: 'How are you?',
roomId: room.id
});
})
.then(function(m) {
message2 = m;
return webex.messages.list({roomId: room.id});
})
.then(function(messages) {
var assert = require('assert');
assert.equal(messages.length, 2);
assert.equal(messages.items[0].id, message2.id);
assert.equal(messages.items[1].id, message1.id);
return 'success';
});
// => success
Deletes a single message. Deleting a message will notify all members of the room that the authenticated user deleted the message. Generally, users can only delete their own messages except for the case of Moderated Rooms and Org Administrators.
((MessageObject | uuid))
Promise
:
}
var message1, room;
webex.rooms.create({title: 'Messages Example'})
.then(function(r) {
room = r;
return webex.messages.create({
text: 'Howdy!',
roomId: room.id
});
})
.then(function(m) {
message1 = m;
return webex.messages.create({
text: 'How are you?',
roomId: room.id
});
})
.then(function() {
return webex.messages.remove(message1);
})
.then(function() {
return webex.messages.list({roomId: room.id});
})
.then(function(messages) {
var assert = require('assert');
assert.equal(messages.items.length, 1);
assert(messages.items[0].id !== message1.id);
return 'success';
});
// => success
These are the resources provided by Webex instances for interacting with our developer API
Memberships represent a person's relationship to a room. Use this API to list members of any room that you're in or create memberships to invite someone to a room. Memberships can also be updated to make someone a moderator or deleted to remove them from the room.
Register to listen for incoming membership events
This is an alternate approach to registering for membership webhooks.
The events passed to any registered handlers will be similar to the webhook JSON,
but will omit webhook specific fields such as name, secret, url, etc.
To utilize the listen()
method, the authorization token used
will need to have spark:all
and spark:kms
scopes enabled.
Note that by configuring your application to enable or disable spark:all
via its configuration page will also enable or disable spark:kms
.
See the Sample App
for more details.
Promise
:
webex.memberships.listen()
.then(() => {
console.log('listening to membership events');
webex.memberships.on('created', (event) => {
console.log(`Got a membership:created event:\n${event}`);
}
webex.memberships.on('updated', (event) => {
console.log(`Got a membership:updated event:\n${event}`);
}
webex.memberships.on('seen', (event) => {
// This represents a "read receipt" and will include a
// lastSeenId for the message this member has just "read",
// There is currently no equivalent webhook for this event.
console.log(`Got a membership:seen event:\n${event}`);
}
webex.memberships.on('deleted', (event) => => {
console.log(`Got a membership:created event:\n${event}`);
}
})
.catch((e) => console.error(`Unable to register for membership events: ${e}`));
// App logic goes here...
// Later when it is time to clean up
webex.memberships.stopListening();
webex.memberships.off('created');
webex.memberships.off('updated');
webex.memberships.off('seen');
webex.memberships.off('deleted');
Adds a person to a room. The person can be added by ID (personId
) or by
Email Address (personEmail
). The person can be optionally added to the room
as a moderator.
(MembershipObject)
Promise<MembershipObject>
:
webex.rooms.create({title: 'Create Membership Example'})
.then(function(room) {
return webex.memberships.create({
personEmail: 'alice@example.com',
roomId: room.id
});
})
.then(function(membership) {
var assert = require('assert');
assert(membership.id);
assert(membership.roomId);
assert(membership.personId);
assert(membership.personEmail);
assert('isModerator' in membership);
assert('isMonitor' in membership);
assert(membership.created);
return 'success';
});
// => success
Returns a single membership.
((MembershipObject | uuid))
Promise<MembershipObject>
:
var membership;
webex.rooms.create({title: 'Get Membership Example'})
.then(function(room) {
return webex.memberships.create({
personEmail: 'alice@example.com',
roomId: room.id
});
})
.then(function(m) {
membership = m;
return webex.memberships.get(m.id);
})
.then(function(m) {
var assert = require('assert');
assert.deepEqual(m, membership);
return 'success';
});
// => success
Returns a list of memberships. In most cases the results will only contain rooms that the authenticated user is a member of. You can filter the results by room to list people in a room or by person to find rooms that a specific person is a member of.
Promise<Page<MembershipObject>>
:
var room;
webex.rooms.create({title: 'List Membership Example'})
.then(function(r) {
room = r;
return webex.memberships.create({
personEmail: 'alice@example.com',
roomId: room.id
});
})
.then(function() {
return webex.memberships.list({roomId: room.id});
})
.then(function(memberships) {
var assert = require('assert');
assert.equal(memberships.length, 2);
for (var i = 0; i < memberships.length; i+= 1) {
assert.equal(memberships.items[i].roomId, room.id);
}
return 'success';
});
// => success
Returns a list of memberships with details about the lastSeenId for each user, allowing a client to indicate "read status" in a space GUI
This differs from the memberships.list() function in the following ways: -- it accepts only a room or object with a valid roomId -- no other options, eg: max, are considered -- results are not paginated -- memberships in the return do not include the "created", "isRoomHidden", fields -- memberships in the return do include the new "lastSeenId", and "lastSeenDate" fields these will not exist if the member has never "seen" the space
In general this function should be used only when the client needs to access read status info.
This function may be deprecated when this info is provided in the membership objects returned in the list function.
Promise<MembershipObjectList>
:
Deletes a single membership.
((MembershipObject | uuid))
Promise
:
var membership, room;
webex.rooms.create({title: 'Remove Membership Example'})
.then(function(r) {
room = r;
return webex.memberships.create({
personEmail: 'alice@example.com',
roomId: room.id
});
})
.then(function(m) {
membership = m;
return webex.memberships.list({roomId: room.id});
})
.then(function(memberships) {
var assert = require('assert');
assert.equal(memberships.length, 2);
return webex.memberships.remove(membership);
})
.then(function() {
return webex.memberships.list({roomId: room.id});
})
.then(function(memberships) {
var assert = require('assert');
assert.equal(memberships.length, 1);
return 'success';
});
// => success
Used to update a single membership's properties
((MembershipObject | uuid))
Promise<MembershipObject>
:
// Change membership to make user a moderator
var membership, room;
webex.rooms.create({title: 'Memberships Example'})
.then(function(r) {
room = r;
return webex.memberships.list({roomId: room.id});
})
.then(function(memberships) {
membership = memberships.items[0];
var assert = require('assert');
assert.equal(membership.isModerator, false);
membership.isModerator = true;
return webex.memberships.update(membership);
})
.then(function() {
return webex.memberships.get(membership.id);
})
.then(function(membership) {
var assert = require('assert');
assert.equal(membership.isModerator, true);
return 'success';
});
// => success
// Hide a one on one space
var assert = require('assert');
var membership, myId;
webex.people.get('me')
.then(function(person) {
myId = personId;
return webex.messages.create({
toPersonEmail: 'otherUser@acme.com',
text: 'This message will create a 1-1 space'
});
})
then(function(message) {
return webex.memberships.list({
roomId: message.roomId,
personId: myId
});
})
.then((memberships) => {
membership = memberships.items[0];
assert.equal(membership.isRoomHidden, false);
membership.isRoomHidden = true;
// This will generate a memberships:updated event
// that will only be seen by this user
return webex.memberships.update(membership);
})
.then(function(membership) {
assert.equal(membership.isRoomHidden, true);
return 'success';
});
// => success
Updates the lastSeenId attribute of a membership. Call this method to send a "read receipt" for a given message. This will update the lastSeenId for the user's membership in space where the message is.
(string)
Promise<MembershipObject>
:
Returns a single person by ID
((PersonObject | uuid | string))
Promise<PersonObject>
:
webex.rooms.create({title: 'Get Person Example'})
.then(function(room) {
return webex.memberships.create({
personEmail: 'alice@example.com',
roomId: room.id
});
})
.then(function(membership) {
return webex.people.get(membership.personId);
})
.then(function(alice) {
var assert = require('assert');
assert(alice.id);
assert(Array.isArray(alice.emails));
assert.equal(alice.emails.filter(function(email) {
return email === 'alice@example.com';
}).length, 1);
assert(alice.displayName);
assert(alice.created);
return 'success';
});
// => success
Returns a list of people
Name | Description |
---|---|
options.email email
|
Returns people with an email that contains this string |
options.displayName string
|
Returns people with a name that contains this string |
(bool)
optional flag that requires Hydra to send every type field,
even if the type is not "person" (e.g.: SX10, webhook_integration, etc.)
Promise<Page<PersonObject>>
:
var room;
webex.rooms.create({title: 'List People Example'})
.then(function(r) {
room = r;
return webex.memberships.create({
personEmail: 'alice@example.com',
roomId: room.id
});
})
.then(function() {
return webex.memberships.create({
personEmail: 'bob@example.com',
roomId: room.id
});
})
.then(function() {
return webex.people.list({email: 'alice@example.com'});
})
.then(function(people) {
var assert = require('assert');
assert.equal(people.length, 1);
var person = people.items[0];
assert(person.id);
assert(Array.isArray(person.emails));
assert(person.displayName);
assert(person.created);
return 'success';
});
// => success
Example usage of array method
var room;
var aliceId;
var bobId;
webex.rooms.create({title: 'List People Array Example'})
.then(function(r) {
room = r;
return webex.memberships.create({
personEmail: 'alice@example.com',
roomId: room.id
});
})
.then(function(membership) {
aliceId = membership.personId;
})
.then(function() {
return webex.memberships.create({
personEmail: 'bob@example.com',
roomId: room.id
});
})
.then(function(membership) {
bobId = membership.personId;
})
.then(function() {
return webex.people.list([aliceId, bobId]);
})
.then(function(people) {
var assert = require('assert');
assert.equal(people.length, 2);
var person = people.items[0];
assert(person.id);
assert(Array.isArray(person.emails));
assert(person.displayName);
assert(person.created);
return 'success';
});
// => success
Rooms are virtual meeting places for getting stuff done. This resource represents the room itself. Check out the Memberships API to learn how to add and remove people from rooms and the Messages API for posting and managing content.
Register to listen for incoming rooms events
This is an alternate approach to registering for rooms webhooks.
The events passed to any registered handlers will be similar to the webhook JSON,
but will omit webhook specific fields such as name, secret, url, etc.
To utilize the listen()
method, the authorization token used
will need to have spark:all
and spark:kms
scopes enabled.
Note that by configuring your application to enable or disable spark:all
via its configuration page will also enable or disable spark:kms
.
See the Sample App
for more details.
Promise
:
webex.rooms.listen()
.then(() => {
console.log('listening to room events');
webex.rooms.on('created', (event) => console.log(`Got a room:created event:\n${event}`);
webex.rooms.on('updated', (event) => console.log(`Got a room:updated event:\n${event}`);
})
.catch((e) => console.error(`Unable to register for room events: ${e}`));
// Some app logic...
// WHen it is time to cleanup
webex.rooms.stopListening();
webex.rooms.off('created');
webex.rooms.off('updated');
Creates a new room. The authenticated user is automatically added as a member of the room. See the Memberships API to learn how to add more people to the room.
(RoomObject)
Promise<RoomObject>
:
webex.rooms.create({title: 'Create Room Example'})
.then(function(room) {
var assert = require('assert')
assert(typeof room.created === 'string');
assert(typeof room.id === 'string');
assert(room.title === 'Create Room Example');
console.log(room.title);
return 'success';
});
// => success
Returns a single room.
((RoomObject | string))
(Object)
Promise<RoomObject>
:
var room;
webex.rooms.create({title: 'Get Room Example'})
.then(function(r) {
room = r
return webex.rooms.get(room.id)
})
.then(function(r) {
var assert = require('assert');
assert.deepEqual(r, room);
return 'success';
});
// => success
Returns a list of rooms. In most cases the results will only contain rooms that the authenticated user is a member of.
Promise<Page<RoomObject>>
:
var createdRooms;
Promise.all([
webex.rooms.create({title: 'List Rooms Example 1'}),
webex.rooms.create({title: 'List Rooms Example 2'}),
webex.rooms.create({title: 'List Rooms Example 3'})
])
.then(function(r) {
createdRooms = r;
return webex.rooms.list({max: 3})
.then(function(rooms) {
var assert = require('assert');
assert(rooms.length === 3);
for (var i = 0; i < rooms.items.length; i+= 1) {
assert(createdRooms.filter(function(room) {
return room.id === rooms.items[i].id;
}).length === 1);
}
return 'success';
});
});
// => success
Returns a list of rooms with details about the data of the last activity in the room, and the date of the users last presences in the room. The list is sorted with this with most recent activity first
For rooms where lastActivityDate > lastSeenDate the space can be considered to be "unread"
This differs from the rooms.list() function in the following ways: -- when called with no parameters it returns an array of all spaces, up to 1000, that the user is a member of -- pagination is not supported. ALL rooms are returned which can result in a large payload -- For users with hundreds of spaces, this API can take some time to to return, for this reason it supports an optional maxRecent parameter. If set this will return only the specified number of spaces with activity in the last two weeks. Recommended value is 30. Max supported is 100. -- only "id", "type", "lastActivityDate", and "lastSeenDate" are guaranteed to be available for each room in the list -- "title" is usually returned, but not guaranteed
In general this function should be used only when the client needs to access read status info, for example on startup. After startup, clients should track message and membership:seen events to maintain read status client side.
Since this API can take some time to return up to 1000 spaces, it is recommended that custom clients call this first with the maxRecent parameter set to 30, so that they can display some of the more recents spaces. Calling this API a second time with no parameters will return all the spaces.
Not all spaces may be returned, for example when users in more than 1000 spaces, or when a new spaces is added after this function is called, but before it returns. Custom clients should be prepared to gracefully handle cases where an event occurs in a space not returned by this call, by querying rooms.getWithReadStatus() with the id of the room in question
This function may be deprecated when this info is provided in the membership objects returned in the list function.
(int
= 0
)
Promise<RoomInfoObjectList>
:
Returns a single room object with details about the data of the last activity in the room, and the date of the users last presence in the room.
For rooms where lastActivityDate > lastSeenDate the room can be considered to be "unread"
This differs from the rooms.get() function in the following ways: -- it takes a single roomId parameter to fetch -- no other options are considered -- only "id", "type", "lastActivityDate", and "lastSeenDate" are guaranteed to be available in the return object -- "title" is usually returned, but not guaranteed
In general clients should use the listWithReadStatus() method on startup to get the initial roomStatus and then update their client side copy by responding to message, membership and room events.
This function allows a custom client to be "nimble" if it is responding to an event with a roomId that was not in the original fetch. The anticipated behavior is that getWithReadStats is called "just in time", with the resulting room object being added to the list of cached room objects on the client side.
This function may be deprecated when this info is provided in the room object returned in the get function.
(string)
Promise<RoomInfoObject>
:
Deletes a single room.
((RoomObject | string))
Promise
:
var room;
webex.rooms.create({title: 'Remove Room Example'})
.then(function(r) {
room = r;
return webex.rooms.remove(room.id);
})
.then(function() {
return webex.rooms.get(room.id);
})
.then(function() {
var assert = require('assert');
assert(false, 'the previous get should have failed');
})
.catch(function(reason) {
var assert = require('assert');
assert.equal(reason.statusCode, 404);
return 'success'
});
// => success
Used to update a single room's properties.
(RoomObject)
Promise<RoomObject>
:
var room;
webex.rooms.update({title: 'Update Room Example'})
.then(function(r) {
room = r;
room.title = 'Update Room Example (Updated Title)';
return webex.rooms.update(room);
})
.then(function() {
return webex.rooms.get(room.id);
})
.then(function(room) {
var assert = require('assert');
assert.equal(room.title, 'Update Room Example (Updated Title)');
return 'success';
});
// => success
Create a new team.
(TeamObject)
Promise<TeamObject>
:
webex.teams.create({name: 'Create Team Example'})
.then(function(team) {
var assert = require('assert');
assert(team.id);
assert(team.name);
assert(team.created);
return 'success';
});
// => success
Returns a single team
((TeamObject | string))
(Object)
Promise<TeamObject>
:
var team;
webex.teams.create({name: 'Get Team Example'})
.then(function(r) {
team = r;
return webex.teams.get(team.id);
})
.then(function(team2) {
var assert = require('assert');
assert.equal(team2.id, team.id);
return 'success';
});
// => success
List teams.
Promise<Page<TeamObject>>
:
var createdRooms;
Promise.all([
webex.teams.create({name: 'List Teams Example 1'}),
webex.teams.create({name: 'List Teams Example 2'}),
webex.teams.create({name: 'List Teams Example 3'})
])
.then(function(r) {
createdRooms = r;
return webex.teams.list({max: 3});
})
.then(function(teams) {
var assert = require('assert');
assert(teams.length === 3);
for (var i = 0; i < teams.items.length; i+= 1) {
assert(createdRooms.filter(function(room) {
return room.id === teams.items[i].id;
}).length === 1);
}
return 'success';
});
// => success
Update a team.
(TeamObject)
Promise<TeamObject>
:
var teams;
webex.teams.create({name: 'Update Team Example'})
.then(function(r) {
teams = r;
teams.name = 'Teams Example (Updated Title)';
return webex.teams.update(teams);
})
.then(function() {
return webex.teams.get(teams.id);
})
.then(function(teams) {
var assert = require('assert');
assert.equal(teams.name, 'Teams Example (Updated Title)');
return 'success';
});
// => success
Team Memberships represent a person's relationship to a team. Use this API to list members of any team that you're in or create memberships to invite someone to a team. Team memberships can also be updated to make someone a moderator or deleted to remove them from the team.
Just like in the Webex app, you must be a member of the team in order to list its memberships or invite people.
Add someone to a team by Person ID or email address; optionally making them a moderator.
(TeamMembershipObject)
Promise<TeamMembershipObject>
:
webex.teams.create({name: 'Create Team Membership Example'})
.then(function(team) {
return webex.teamMemberships.create({
personEmail: 'alice@example.com',
teamId: team.id
});
})
.then(function(membership) {
var assert = require('assert');
assert(membership.id);
assert(membership.teamId);
assert(membership.personId);
assert(membership.personEmail);
assert('isModerator' in membership);
assert(membership.created);
return 'success';
});
// => success
Get details for a membership by ID.
((TeamMembershipObject | string))
Promise<TeamMembershipObject>
:
var membership;
webex.teams.create({name: 'Get Team Memberships Example'})
.then(function(team) {
return webex.teamMemberships.create({
personEmail: 'alice@example.com',
teamId: team.id
});
})
.then(function(m) {
membership = m;
return webex.teamMemberships.get(m.id);
})
.then(function(m) {
var assert = require('assert');
assert.deepEqual(m, membership);
return 'success';
});
// => success
Lists all team memberships. By default, lists memberships for teams to which the authenticated user belongs.
[type]
:
var team;
webex.teams.create({name: 'List Team Memberships Example'})
.then(function(t) {
team = t;
return webex.teamMemberships.create({
personEmail: 'alice@example.com',
teamId: team.id
});
})
.then(function() {
return webex.teamMemberships.list({teamId: team.id});
})
.then(function(teamMemberships) {
var assert = require('assert');
assert.equal(teamMemberships.length, 2);
for (var i = 0; i < teamMemberships.length; i+= 1) {
assert.equal(teamMemberships.items[i].teamId, team.id);
}
return 'success';
});
// => success
Deletes a membership by ID.
((TeamMembershipObject | string))
Promise
:
var membership, team;
webex.teams.create({name: 'Remove Team Memberships Example'})
.then(function(t) {
team = t;
return webex.teamMemberships.create({
personEmail: 'alice@example.com',
teamId: team.id
});
})
.then(function(m) {
membership = m;
return webex.teamMemberships.list({teamId: team.id});
})
.then(function(teamMemberships) {
var assert = require('assert');
assert.equal(teamMemberships.length, 2);
return webex.teamMemberships.remove(membership);
})
.then(function() {
return webex.teamMemberships.list({teamId: team.id});
})
.then(function(teamMemberships) {
var assert = require('assert');
assert.equal(teamMemberships.length, 1);
return 'success';
});
// => success
Updates properties for a membership.
(TeamMembershipObject)
Promise<TeamMembershipObject>
:
Webhooks allow your app to be notified via HTTP when a specific event occurs on Webex. For example, your app can register a webhook to be notified when a new message is posted into a specific room.
Posts a webhook.
(WebhookObject)
Promise<Webhook>
:
webex.rooms.create({title: 'Create Webhook Example'})
.then(function(room) {
return webex.webhooks.create({
resource: 'messages',
event: 'created',
filter: 'roomId=' + room.id,
targetUrl: 'https://example.com/webhook',
name: 'Test Webhook'
});
})
.then(function(webhook) {
var assert = require('assert');
assert(webhook.id);
assert(webhook.resource);
assert(webhook.event);
assert(webhook.filter);
assert(webhook.targetUrl);
assert(webhook.name);
return 'success';
});
// => success
Shows details for a webhook.
((Webhook | string))
Promise<Webhook>
:
var webhook;
webex.rooms.create({title: 'Get Webhook Example'})
.then(function(room) {
return webex.webhooks.create({
resource: 'messages',
event: 'created',
filter: 'roomId=' + room.id,
targetUrl: 'https://example.com/webhook',
name: 'Test Webhook'
});
})
.then(function(w) {
webhook = w;
return webex.webhooks.get(webhook.id);
})
.then(function(webhook2) {
var assert = require('assert');
assert.deepEqual(webhook2, webhook);
return 'success';
});
// => success
Lists all webhooks.
(Object)
Name | Description |
---|---|
options.max integer
|
Limit the maximum number of webhooks in the response. |
Promise<Array<Webhook>>
:
var room, webhook;
webex.rooms.create({title: 'List Webhooks Example'})
.then(function(r) {
room = r;
return webex.webhooks.create({
resource: 'messages',
event: 'created',
filter: 'roomId=' + room.id,
targetUrl: 'https://example.com/webhook',
name: 'Test Webhook'
});
})
.then(function(w) {
webhook = w;
return webex.webhooks.list();
})
.then(function(webhooks) {
var assert = require('assert');
assert.equal(webhooks.items.filter(function(w) {
return w.id === webhook.id;
}).length, 1);
return 'success';
});
// => success
Delete a webhook.
((Webhook | string))
Promise
:
var room, webhook;
webex.rooms.create({title: 'Remove Webhook Example'})
.then(function(r) {
room = r;
return webex.webhooks.create({
resource: 'messages',
event: 'created',
filter: 'roomId=' + room.id,
targetUrl: 'https://example.com/webhook',
name: 'Test Webhook'
});
})
.then(function(w) {
webhook = w;
return webex.webhooks.remove(webhook);
})
.then(function() {
return webex.webhooks.list();
})
.then(function(webhooks) {
var assert = require('assert');
assert.equal(webhooks.items.filter(function(w) {
return w.id === webhook.id;
}).length, 0);
return 'success';
});
// => success
Update a webhook.
(Webhook)
Promise<Webhook>
:
var webhook;
webex.rooms.create({title: 'Webhook Example'})
.then(function(room) {
return webex.webhooks.create({
resource: 'messages',
event: 'created',
filter: 'roomId=' + room.id,
targetUrl: 'https://example.com/webhook',
name: 'Test Webhook'
});
})
.then(function(w) {
webhook = w;
webhook.targetUrl = 'https://example.com/webhook/newtarget';
return webex.webhooks.update(webhook);
})
.then(function() {
return webex.webhooks.get(webhook);
})
.then(function(webhook) {
var assert = require('assert');
assert.equal(webhook.targetUrl, 'https://example.com/webhook/newtarget');
return 'success';
});
// => success
Logging related types
Type: {log: function (payload: string): void, error: function (payload: string): void, warn: function (payload: string): void, info: function (payload: string): void, trace: function (payload: string): void, debug: function (payload: string): void}
(function (payload: string): void)
(function (payload: string): void)
(function (payload: string): void)
(function (payload: string): void)
(function (payload: string): void)
(function (payload: string): void)
Type: Object
(string?)
: Maximum log level that
should be printed to the console. One of
silent|error|warn|log|info|debug|trace
(number?)
: Maximum number of entries to store in the log buffer.
{
level: process.env.WEBEX_LOG_LEVEL,
historyLength: 1000
}
The following typedefs describes the responses of the various API calls.
Type: Object
(string)
: Unique identifier for the membership
(string)
: The room ID
(string)
: The person ID
(email)
: The email address of the person / room member
(boolean)
: Indicates whether the specified person should be a room moderator
(boolean)
: Indicates whether the specified member is a room monitor
(isoDate)
: The date and time that this membership was created
Type: Object
(string)
: (server generated) Unique identifier for the message
(string)
: The ID for the author of the message
(email)
: The email for the author of the message
(string)
: The ID for the room of the message
(string)
: The message posted to the room in plain text
(string)
: The message posted to the room in markdown
(Array<string>)
: The source URL(s) for the message attachment(s).
See the
Message Attachments
Guide for a list of supported media types.
(isoDate)
: (server generated) The date and time that the message was created
Type: Object
Type: Object
(string)
: (server generated) Unique identifier for the room
(string)
: The display name for the room. All room members
will see the title so make it something good
(string)
: (optional) The ID of the team to which the room
belongs
(isoDate)
: (server generated) The date and time that the
room was created
Type: Object
Type: Object
Type: Object
(string)
: (server generated) Unique identifier for the webhook
(string)
: The resource type for the webhook
(string)
: The event type for the webhook
(string)
: The filter that defines the webhook scope
(string)
: The URL that receives POST requests for each event
(string)
: A user-friendly name for this webhook
(string)
: (server generated) The date and time that the webhook was created
An email address, as a string.
Type: string
The date and time, specified in ISO 8601 extended offset date/time
format (e.g. 2015-10-18T14:26:16+00:00
).
Type: string
Type: Object
(string)
: (server generated) Unique identifier for the attachment action
(string)
: The ID of the message in which attachment action is to be performed
(string)
: The type of attachment action eg., submit
(Object)
: The inputs for form fields in attachment message
(string)
: (server generated) The ID for the author of the attachment action
(string)
: (server generated) The ID for the room of the message
(isoDate)
: (server generated) The date and time that the message was created
AttachmentActions are events that communicate information when a user clicks on an Action.Submit button in a card displayed in Webex Information conveyed in an AttachmentAction includes details about the user that clicked the button along with any card specific inputs. See the Attachments Actions API Documentation for more details
Post a new attachment action for a message with attachment.
(AttachmentActionObject)
Promise<AttachmentActionObject>
:
webex.rooms.create({title: 'Create Message with card Example'})
.then(function(room) {
return webex.messages.create({
text: 'Howdy!',
roomId: room.id,
attachments:[ {
contentType: 'application/vnd.microsoft.card.adaptive',
content: {
type: 'AdaptiveCard',
version: '1.0',
body: [
{
type: 'TextBlock',
text: '',
size: 'large'
},
{
type: 'TextBlock',
text: 'Adaptive Cards',
separation: 'none'
}
{
type: 'Input.Date',
id: 'dueDate'
}
],
actions: [
{
type: 'Action.Submit',
title: 'Due Date'
}
]
}
}]
});
})
.then(function(message) {
return webex.attachmentActions.create({
type: 'submit',
messageId: message.id,
inputs:{
dueDate: '26/06/1995'
}
})
.then(function(attachmentAction)){
var assert = require('assert');
assert(attachmentAction.id);
assert(attachmentAction.type);
assert(attachmentAction.personId);
assert(attachmentAction.inputs);
assert(attachmentAction.messageId);
assert(attachmentAction.roomId);
assert(attachmentAction.created);
return 'success';
}
});
// => success
Returns a single attachment action.
(string)
Promise<AttachmentActionObject>
:
var attachmentAction;
webex.rooms.create({title: 'Get Message Example'})
.then(function(room) {
return webex.messages.create({
text: 'Howdy!',
roomId: room.id,
attachments:[ {
contentType: 'application/vnd.microsoft.card.adaptive',
content: {
type: 'AdaptiveCard',
version: '1.0',
body: [
{
type: 'TextBlock',
text: '',
size: 'large'
},
{
type: 'TextBlock',
text: 'Adaptive Cards',
separation: 'none'
},
{
type: 'Input.Date',
id: 'dueDate'
}
],
actions: [
{
type: 'Action.Submit',
title: 'Due Date'
}
]
}
}]
});
})
.then(function(message) {
return webex.attachmentActions.create({
type: 'submit',
messageId: message.id,
inputs:{
dueDate: '26/06/1995'
});
})
.then(function(attachmentAction) {
return webex.attachmentActions.get(attachmentAction.id)
})
.then(function(attachmentAction){
var assert = require('assert');
assert.deepEqual(attachmentAction, attachmentAction);
return 'success';
})
// => success
Authorization plugin events
QR code login events
ContactCenter is the main plugin class for Webex Contact Center integration
Task class represents a contact center task that can be managed by an agent
Agent routing service for Contact Center operations
Task Events for Contact Center operations
Type: string
Triggered when a new task is received by the system
Type: string
```typescript
task.on(TASK_EVENTS.TASK_INCOMING, (task: ITask) => {
console.log('New task received:', task.data.interactionId);
// Handle incoming task
});
```
Triggered when a task is successfully assigned to an agent
Type: string
```typescript
task.on(TASK_EVENTS.TASK_ASSIGNED, (task: ITask) => {
console.log('Task assigned:', task.data.interactionId);
// Begin handling the assigned task
});
```
Triggered when the media state of a task changes
Type: string
```typescript
task.on(TASK_EVENTS.TASK_MEDIA, (track: MediaStreamTrack) => {
// Handle media track updates
});
```
Triggered when a task is removed from an agent
Type: string
```typescript
task.on(TASK_EVENTS.TASK_UNASSIGNED, (task: ITask) => {
console.log('Task unassigned:', task.data.interactionId);
// Clean up task resources
});
```
Triggered when a task is placed on hold
Type: string
```typescript
task.on(TASK_EVENTS.TASK_HOLD, (task: ITask) => {
console.log('Task placed on hold:', task.data.interactionId);
// Update UI to show hold state
});
```
Triggered when a task is resumed from hold
Type: string
```typescript
task.on(TASK_EVENTS.TASK_UNHOLD, (task: ITask) => {
console.log('Task resumed from hold:', task.data.interactionId);
// Update UI to show active state
});
```
Triggered when a consultation session ends
Type: string
```typescript
task.on(TASK_EVENTS.TASK_CONSULT_END, (task: ITask) => {
console.log('Consultation ended:', task.data.interactionId);
// Clean up consultation resources
});
```
Triggered when a queue consultation is cancelled
Type: string
```typescript
task.on(TASK_EVENTS.TASK_CONSULT_QUEUE_CANCELLED, (task: ITask) => {
console.log('Queue consultation cancelled:', task.data.interactionId);
// Handle consultation cancellation
});
```
Triggered when a queue consultation fails
Type: string
```typescript
task.on(TASK_EVENTS.TASK_CONSULT_QUEUE_FAILED, (task: ITask) => {
console.log('Queue consultation failed:', task.data.interactionId);
// Handle consultation failure
});
```
Triggered when a consultation request is accepted
Type: string
```typescript
task.on(TASK_EVENTS.TASK_CONSULT_ACCEPTED, (task: ITask) => {
console.log('Consultation accepted:', task.data.interactionId);
// Begin consultation
});
```
Triggered when consultation is in progress
Type: string
```typescript
task.on(TASK_EVENTS.TASK_CONSULTING, (task: ITask) => {
console.log('Consulting in progress:', task.data.interactionId);
// Handle ongoing consultation
});
```
Triggered when a new consultation is created
Type: string
```typescript
task.on(TASK_EVENTS.TASK_CONSULT_CREATED, (task: ITask) => {
console.log('Consultation created:', task.data.interactionId);
// Initialize consultation
});
```
Triggered when a consultation is offered
Type: string
```typescript
task.on(TASK_EVENTS.TASK_OFFER_CONSULT, (task: ITask) => {
console.log('Consultation offered:', task.data.interactionId);
// Handle consultation offer
});
```
Triggered when a task is completed/terminated
Type: string
```typescript
task.on(TASK_EVENTS.TASK_END, (task: ITask) => {
console.log('Task ended:', task.data.interactionId);
// Clean up and finalize task
});
```
Triggered when a task enters wrap-up state
Type: string
```typescript
task.on(TASK_EVENTS.TASK_WRAPUP, (task: ITask) => {
console.log('Task in wrap-up:', task.data.interactionId);
// Begin wrap-up process
});
```
Triggered when task wrap-up is completed
Type: string
```typescript
task.on(TASK_EVENTS.TASK_WRAPPEDUP, (task: ITask) => {
console.log('Task wrapped up:', task.data.interactionId);
// Finalize task completion
});
```
Triggered when recording is paused
Type: string
```typescript
task.on(TASK_EVENTS.TASK_RECORDING_PAUSED, (task: ITask) => {
console.log('Recording paused:', task.data.interactionId);
// Update recording state
});
```
Triggered when recording pause attempt fails
Type: string
```typescript
task.on(TASK_EVENTS.TASK_RECORDING_PAUSE_FAILED, (task: ITask) => {
console.log('Recording pause failed:', task.data.interactionId);
// Handle pause failure
});
```
Triggered when recording is resumed
Type: string
```typescript
task.on(TASK_EVENTS.TASK_RECORDING_RESUMED, (task: ITask) => {
console.log('Recording resumed:', task.data.interactionId);
// Update recording state
});
```
Triggered when recording resume attempt fails
Type: string
```typescript
task.on(TASK_EVENTS.TASK_RECORDING_RESUME_FAILED, (task: ITask) => {
console.log('Recording resume failed:', task.data.interactionId);
// Handle resume failure
});
```
Triggered when a task is rejected/unanswered
Type: string
```typescript
task.on(TASK_EVENTS.TASK_REJECT, (task: ITask) => {
console.log('Task rejected:', task.data.interactionId);
// Handle task rejection
});
```
Triggered when a task is populated with data
Type: string
```typescript
task.on(TASK_EVENTS.TASK_HYDRATE, (task: ITask) => {
console.log('Task hydrated:', task.data.interactionId);
// Process task data
});
```
Enumeration of all task-related events that can occur in the contact center system These events represent different states and actions in the task lifecycle
Triggered when a new task is received by the system
Type: string
```typescript
task.on(TASK_EVENTS.TASK_INCOMING, (task: ITask) => {
console.log('New task received:', task.data.interactionId);
// Handle incoming task
});
```
Triggered when a task is successfully assigned to an agent
Type: string
```typescript
task.on(TASK_EVENTS.TASK_ASSIGNED, (task: ITask) => {
console.log('Task assigned:', task.data.interactionId);
// Begin handling the assigned task
});
```
Triggered when the media state of a task changes
Type: string
```typescript
task.on(TASK_EVENTS.TASK_MEDIA, (track: MediaStreamTrack) => {
// Handle media track updates
});
```
Triggered when a task is removed from an agent
Type: string
```typescript
task.on(TASK_EVENTS.TASK_UNASSIGNED, (task: ITask) => {
console.log('Task unassigned:', task.data.interactionId);
// Clean up task resources
});
```
Triggered when a task is placed on hold
Type: string
```typescript
task.on(TASK_EVENTS.TASK_HOLD, (task: ITask) => {
console.log('Task placed on hold:', task.data.interactionId);
// Update UI to show hold state
});
```
Triggered when a task is resumed from hold
Type: string
```typescript
task.on(TASK_EVENTS.TASK_UNHOLD, (task: ITask) => {
console.log('Task resumed from hold:', task.data.interactionId);
// Update UI to show active state
});
```
Triggered when a consultation session ends
Type: string
```typescript
task.on(TASK_EVENTS.TASK_CONSULT_END, (task: ITask) => {
console.log('Consultation ended:', task.data.interactionId);
// Clean up consultation resources
});
```
Triggered when a queue consultation is cancelled
Type: string
```typescript
task.on(TASK_EVENTS.TASK_CONSULT_QUEUE_CANCELLED, (task: ITask) => {
console.log('Queue consultation cancelled:', task.data.interactionId);
// Handle consultation cancellation
});
```
Triggered when a queue consultation fails
Type: string
```typescript
task.on(TASK_EVENTS.TASK_CONSULT_QUEUE_FAILED, (task: ITask) => {
console.log('Queue consultation failed:', task.data.interactionId);
// Handle consultation failure
});
```
Triggered when a consultation request is accepted
Type: string
```typescript
task.on(TASK_EVENTS.TASK_CONSULT_ACCEPTED, (task: ITask) => {
console.log('Consultation accepted:', task.data.interactionId);
// Begin consultation
});
```
Triggered when consultation is in progress
Type: string
```typescript
task.on(TASK_EVENTS.TASK_CONSULTING, (task: ITask) => {
console.log('Consulting in progress:', task.data.interactionId);
// Handle ongoing consultation
});
```
Triggered when a new consultation is created
Type: string
```typescript
task.on(TASK_EVENTS.TASK_CONSULT_CREATED, (task: ITask) => {
console.log('Consultation created:', task.data.interactionId);
// Initialize consultation
});
```
Triggered when a consultation is offered
Type: string
```typescript
task.on(TASK_EVENTS.TASK_OFFER_CONSULT, (task: ITask) => {
console.log('Consultation offered:', task.data.interactionId);
// Handle consultation offer
});
```
Triggered when a task is completed/terminated
Type: string
```typescript
task.on(TASK_EVENTS.TASK_END, (task: ITask) => {
console.log('Task ended:', task.data.interactionId);
// Clean up and finalize task
});
```
Triggered when a task enters wrap-up state
Type: string
```typescript
task.on(TASK_EVENTS.TASK_WRAPUP, (task: ITask) => {
console.log('Task in wrap-up:', task.data.interactionId);
// Begin wrap-up process
});
```
Triggered when task wrap-up is completed
Type: string
```typescript
task.on(TASK_EVENTS.TASK_WRAPPEDUP, (task: ITask) => {
console.log('Task wrapped up:', task.data.interactionId);
// Finalize task completion
});
```
Triggered when recording is paused
Type: string
```typescript
task.on(TASK_EVENTS.TASK_RECORDING_PAUSED, (task: ITask) => {
console.log('Recording paused:', task.data.interactionId);
// Update recording state
});
```
Triggered when recording pause attempt fails
Type: string
```typescript
task.on(TASK_EVENTS.TASK_RECORDING_PAUSE_FAILED, (task: ITask) => {
console.log('Recording pause failed:', task.data.interactionId);
// Handle pause failure
});
```
Triggered when recording is resumed
Type: string
```typescript
task.on(TASK_EVENTS.TASK_RECORDING_RESUMED, (task: ITask) => {
console.log('Recording resumed:', task.data.interactionId);
// Update recording state
});
```
Triggered when recording resume attempt fails
Type: string
```typescript
task.on(TASK_EVENTS.TASK_RECORDING_RESUME_FAILED, (task: ITask) => {
console.log('Recording resume failed:', task.data.interactionId);
// Handle resume failure
});
```
Triggered when a task is rejected/unanswered
Type: string
```typescript
task.on(TASK_EVENTS.TASK_REJECT, (task: ITask) => {
console.log('Task rejected:', task.data.interactionId);
// Handle task rejection
});
```
Triggered when a task is populated with data
Type: string
```typescript
task.on(TASK_EVENTS.TASK_HYDRATE, (task: ITask) => {
console.log('Task hydrated:', task.data.interactionId);
// Process task data
});
```
Agent Events for Contact Center operations
Type: string
Emitted when an agent's state changes (e.g., Available to Idle)
Type: string
Emitted when multiple logins are detected for the same agent
Type: string
Emitted when an agent successfully logs into their station
Type: string
Emitted when station login attempt fails
Type: string
Emitted when an agent successfully logs out
Type: string
Emitted when an agent's directory number is successfully registered
Type: string
Emitted when an agent successfully re-authenticates
Type: string
Emitted when agent state change is successful
Type: string
Events emitted by the agent service for various state changes and actions
Emitted when an agent's state changes (e.g., Available to Idle)
Type: string
Emitted when multiple logins are detected for the same agent
Type: string
Emitted when an agent successfully logs into their station
Type: string
Emitted when station login attempt fails
Type: string
Emitted when an agent successfully logs out
Type: string
Emitted when an agent's directory number is successfully registered
Type: string
Emitted when an agent successfully re-authenticates
Type: string
Emitted when agent state change is successful
Type: string
Contact Center Task Events
Type: string
Event emitted when assigning contact to agent fails
Event emitted when agent does not respond to contact offer
Event emitted when contact is put on hold
Event emitted when putting contact on hold fails
Event emitted when contact is taken off hold
Event emitted when taking contact off hold fails
Event emitted when consultation is created
Event emitted when consultation is offered
Event emitted when agent is consulting
Event emitted when consultation fails
Event emitted when consulting to queue (CTQ) fails
Event emitted when CTQ is cancelled
Event emitted when CTQ cancellation fails
Event emitted when consultation ends
Event emitted when ending consultation fails
Event emitted when consultation conference ends
Event emitted when contact is blind transferred
Event emitted when blind transfer fails
Event emitted when contact is transferred to virtual team
Event emitted when virtual team transfer fails
Event emitted when consultation transfer is in progress
Event emitted when consultation transfer completes
Event emitted when consultation transfer fails
Event emitted when contact recording is paused
Event emitted when pausing contact recording fails
Event emitted when contact recording is resumed
Event emitted when resuming contact recording fails
Event emitted when contact ends
Event emitted when ending contact fails
Event emitted when agent enters wrap-up state
Event emitted when agent completes wrap-up
Event emitted when wrap-up fails
Event emitted when outbound call fails
Event emitted for general agent contact events
Event emitted when contact is offered to agent
Event emitted when contact is assigned to agent
Event emitted when contact is unassigned from agent
Event emitted when inviting agent fails
Contact Center Agent Events
Type: string
Welcome event when agent connects to websocket/backend
Event emitted when agent re-login is successful
Event emitted when agent re-login fails
Event emitted when agent DN registration completes
Event emitted when agent initiates logout
Event emitted when agent logout is successful
Event emitted when agent logout fails
Event emitted when agent initiates station login
Event emitted when agent station login is successful
Event emitted when agent station login fails
Event emitted when agent's state changes
Event emitted when multiple logins detected for same agent
Event emitted when agent state change is successful
Event emitted when agent state change fails
Event emitted when requesting buddy agents list
Event emitted when buddy agents list is successfully retrieved
Event emitted when retrieving buddy agents list fails
Event emitted when contact is reserved for agent
Combined Contact Center Events
Type: string
Combined Contact Center events including both agent and task events
Type: string
Type representing the union of all possible Contact Center events
Type: Enum<any>
Main types and interfaces for Contact Center functionality
Interface for Contact Center plugin
Name of the client for metrics
Type: string
Type of client for metrics
Type: string
Whether to enable logging
Type: boolean
Whether to log verbose events
Type: boolean
Configuration options for Contact Center plugin
Whether to allow multiple logins from different devices
Type: boolean
Whether to automatically attempt relogin on connection loss
Type: boolean
Metrics configuration
Logging configuration
Configuration for the calling client
Type: CallingClientConfig
Configuration options for the Contact Center Plugin.
const config: CCPluginConfig = {
allowMultiLogin: true,
allowAutomatedRelogin: false,
clientType: 'browser',
isKeepAliveEnabled: true,
force: false,
metrics: { clientName: 'myClient', clientType: 'browser' },
logging: { enable: true, verboseEvents: false },
callingClientConfig: { ... }
};
Whether to allow multiple logins from different devices
Type: boolean
Whether to automatically attempt relogin on connection loss
Type: boolean
Metrics configuration
Logging configuration
Configuration for the calling client
Type: CallingClientConfig
Get the user token for authentication
Get the organization ID
Type: function (): string
WebexSDK interface
Make a request to the Webex APIs
Type: function (payload: WebexRequestPayload): Promise<T>
Register a one-time event handler
Type: function (event: string, callBack: function (): void): void
Internal plugins and services
Type: IWebexInternal
Agent related types
Login options for agents
Available options for agent login methods
Type:
("AGENT_DN"
| "EXTENSION"
| "BROWSER"
)
Available login options for voice channel access 'AGENT_DN' - Login using agent's DN 'EXTENSION' - Login using extension number 'BROWSER' - Login using browser-based WebRTC
Type:
("AGENT_DN"
| "EXTENSION"
| "BROWSER"
)
Agent login information
A dialNumber field contains the number to dial such as a route point or extension. Required for AGENT_DN and EXTENSION login options.
Type: string
The unique ID representing a team of users. The agent must belong to this team.
Type: string
The loginOption field specifies the type of login method. Controls how calls are delivered to the agent.
Type: LoginOption
Represents the request to perform agent login.
Type: {dialNumber: string?, teamId: string, loginOption: LoginOption}
const login: AgentLogin = { dialNumber: '1234', teamId: 'team1', loginOption: LoginOption.AGENT_DN };
A dialNumber field contains the number to dial such as a route point or extension. Required for AGENT_DN and EXTENSION login options.
Type: string
The unique ID representing a team of users. The agent must belong to this team.
Type: string
The loginOption field specifies the type of login method. Controls how calls are delivered to the agent.
Type: LoginOption
Agent device update information
Represents the request to update agent profile settings.
Type:
Pick<AgentLogin, ("loginOption"
| "dialNumber"
| "teamId"
)>
const update: AgentProfileUpdate = { loginOption: LoginOption.BROWSER, dialNumber: '5678' };
Station login response
Response type for station login operations. Either a success response with agent details or an error.
Type: (Agent.StationLoginSuccessResponse | Error)
function handleLogin(resp: StationLoginResponse) { ... }
Station logout response
Response type for station logout operations. Either a success response with logout details or an error.
Type: (Agent.LogoutSuccess | Error)
function handleLogout(resp: StationLogoutResponse) { ... }
Buddy agents response
Response type for buddy agents query operations. Either a success response with list of buddy agents or an error.
Type: (Agent.BuddyAgentsSuccess | Error)
function handleBuddyAgents(resp: BuddyAgentsResponse) { ... }
Buddy agents information
Optional filter for agent state. If specified, returns only agents in that state. If omitted, returns both available and idle agents.
Type:
("Available"
| "Idle"
)
The media type channel to filter buddy agents. Determines which channel capability the returned agents must have.
Type:
("telephony"
| "chat"
| "social"
| "email"
)
Parameters for retrieving buddy agent information
Type: {agentProfileId: string, mediaType: string, state: string?}
Optional filter for agent state. If specified, returns only agents in that state. If omitted, returns both available and idle agents.
Type:
("Available"
| "Idle"
)
The media type channel to filter buddy agents. Determines which channel capability the returned agents must have.
Type:
("telephony"
| "chat"
| "social"
| "email"
)
Subscribe request parameters
Upload logs response
Response from uploading logs to the server.
Type: {trackingid: string?, url: string?, userId: string?, feedbackId: string?, correlationId: string?}
const response: UploadLogsResponse = { trackingid: 'track123', url: 'https://...', userId: 'user1' };
Update device type response
Response type for device type update operations. Either a success response with update confirmation or an error.
Type: (Agent.DeviceTypeUpdateSuccess | Error)
function handleUpdateDeviceType(resp: UpdateDeviceTypeResponse) { ... }
Error type identifier
Type: string
Organization ID where the error occurred
Type: string
Unique tracking ID for the error
Type: string
Additional error context data
Type: Record<string, any>
Generic error interface
Set state response
Task related types
Media resource identifier for consult operations
Type: string
Detailed interaction information including media and participant data
Type: Interaction
Identifier for child interaction in case of consult/transfer
Type: string
Code indicating the reason for an action
Task details including media and state information
Type: Interaction
Identifier for reservation interaction
Type: string
Identifier for the reserved agent channel
Type: string
Type representing an agent contact message within the contact center system Contains comprehensive interaction and task related details for agent operations
Type: Msg<{mediaResourceId: string, eventType: string, eventTime: number?, agentId: string, destAgentId: string, trackingId: string, consultMediaResourceId: string, interaction: Interaction, participantId: string?, fromOwner: boolean?, toOwner: boolean?, childInteractionId: string?, interactionId: string, orgId: string, owner: string, queueMgr: string, queueName: string?, type: string, ronaTimeout: number?, isConsulted: boolean?, isConferencing: boolean, updatedBy: string?, destinationType: string?, autoResumed: boolean?, reasonCode: (string | number)?, reason: string?, consultingAgentId: string?, taskId: string?, task: Interaction?, supervisorId: string?, monitorType: string?, supervisorDN: string?, id: string?, isWebCallMute: boolean?, reservationInteractionId: string?, reservedAgentChannelId: string?, monitoringState: {type: string}?, supervisorName: string?}>
Media resource identifier for consult operations
Type: string
Detailed interaction information including media and participant data
Type: Interaction
Identifier for child interaction in case of consult/transfer
Type: string
Code indicating the reason for an action
Task details including media and state information
Type: Interaction
Identifier for reservation interaction
Type: string
Identifier for the reserved agent channel
Type: string
Task interface
Map associating tasks with their corresponding call identifiers.
Type: Record<TaskId, CallId>
Answers or accepts an incoming task. Once accepted, the task will be assigned to the agent and trigger a TASK_EVENTS.TASK_ASSIGNED event. The response will contain updated agent contact information as defined in AgentContact.
Promise<TaskResponse>
:
Promise
```typescript
task.accept();
```
Declines an incoming task for Browser Login
Promise<TaskResponse>
:
Promise
```typescript
task.decline();
```
Places the current task on hold
Promise<TaskResponse>
:
Promise
```typescript
task.hold();
```
Resumes a task that was previously on hold
Promise<TaskResponse>
:
Promise
```typescript
task.resume();
```
Ends/terminates the current task
Promise<TaskResponse>
:
Promise
```typescript
task.end();
```
Initiates wrap-up process for the task with specified details
(WrapupPayLoad)
Wrap-up details including reason and auxiliary code
Promise<TaskResponse>
:
Promise
```typescript
task.wrapup({
wrapUpReason: "Customer issue resolved",
auxCodeId: "RESOLVED"
});
```
Pauses the recording for current task
Promise<TaskResponse>
:
Promise
```typescript
task.pauseRecording();
```
Resumes a previously paused recording
(ResumeRecordingPayload)
Parameters for resuming the recording
Promise<TaskResponse>
:
Promise
```typescript
task.resumeRecording({
autoResumed: false
});
```
Interface for managing task-related operations in the contact center Extends EventEmitter to support event-driven task updates
Extends EventEmitter
Map associating tasks with their corresponding call identifiers.
Type: Record<TaskId, CallId>
Answers or accepts an incoming task. Once accepted, the task will be assigned to the agent and trigger a TASK_EVENTS.TASK_ASSIGNED event. The response will contain updated agent contact information as defined in AgentContact.
Promise<TaskResponse>
:
Promise
```typescript
task.accept();
```
Declines an incoming task for Browser Login
Promise<TaskResponse>
:
Promise
```typescript
task.decline();
```
Places the current task on hold
Promise<TaskResponse>
:
Promise
```typescript
task.hold();
```
Resumes a task that was previously on hold
Promise<TaskResponse>
:
Promise
```typescript
task.resume();
```
Ends/terminates the current task
Promise<TaskResponse>
:
Promise
```typescript
task.end();
```
Initiates wrap-up process for the task with specified details
(WrapupPayLoad)
Wrap-up details including reason and auxiliary code
Promise<TaskResponse>
:
Promise
```typescript
task.wrapup({
wrapUpReason: "Customer issue resolved",
auxCodeId: "RESOLVED"
});
```
Pauses the recording for current task
Promise<TaskResponse>
:
Promise
```typescript
task.pauseRecording();
```
Resumes a previously paused recording
(ResumeRecordingPayload)
Parameters for resuming the recording
Promise<TaskResponse>
:
Promise
```typescript
task.resumeRecording({
autoResumed: false
});
```
Task response
Response type for task public methods Can be an AgentContact object containing updated task state, an Error in case of failure, or void for operations that don't return data
Type: (AgentContact | Error | void)
Dialer payload
A valid customer DN, on which the response is expected, maximum length 36 characters
Type: string
The direction of the call
Type:
"OUTBOUND"
Schema-free data tuples to pass specific data based on outboundType (max 30 tuples)
Type: {: string}
The media type for the request
Type:
("telephony"
| "chat"
| "social"
| "email"
)
The outbound type for the task
Type:
("OUTDIAL"
| "CALLBACK"
| "EXECUTE_FLOW"
)
Configuration parameters for initiating outbound dialer tasks
Type:
{entryPointId: string, destination: string, direction: "OUTBOUND"
, attributes: {: string}, mediaType: ("telephony"
| "chat"
| "social"
| "email"
), outboundType: ("OUTDIAL"
| "CALLBACK"
| "EXECUTE_FLOW"
)}
(string)
(string)
("OUTBOUND"
)
({: string})
(("telephony"
| "chat"
| "social"
| "email"
))
(("OUTDIAL"
| "CALLBACK"
| "EXECUTE_FLOW"
))
A valid customer DN, on which the response is expected, maximum length 36 characters
Type: string
The direction of the call
Type:
"OUTBOUND"
Schema-free data tuples to pass specific data based on outboundType (max 30 tuples)
Type: {: string}
The media type for the request
Type:
("telephony"
| "chat"
| "social"
| "email"
)
The outbound type for the task
Type:
("OUTDIAL"
| "CALLBACK"
| "EXECUTE_FLOW"
)
Agent related types
New state to transition the agent to
Type: AgentState
State change interface
New state to transition the agent to
Type: AgentState
Parameters required for changing an agent's state
Type: {state: AgentState, auxCodeId: string, lastStateChangeReason: string?, agentId: string?}
New state to transition the agent to
Type: AgentState
Logout interface
Reason for the logout action
Type:
("User requested logout"
| "Inactivity Logout"
| "User requested agent device change"
)
Parameters required for initiating an agent logout
Type:
{logoutReason: ("User requested logout"
| "Inactivity Logout"
| "User requested agent device change"
)?}
(("User requested logout"
| "Inactivity Logout"
| "User requested agent device change"
)?)
Reason for the logout action
Type:
("User requested logout"
| "Inactivity Logout"
| "User requested agent device change"
)
State change success response
Message type identifier for agent desktop events
Type:
"AgentDesktopMessage"
Detailed status indicating availability
Type:
("Available"
| "Idle"
)
Timestamp of last idle code change
Type: number
Type identifier for state change success event
Type:
"AgentStateChangeSuccess"
Response type received when an agent's state is successfully changed
Type:
Msg<{eventType: "AgentDesktopMessage"
, agentId: string, trackingId: string, auxCodeId: string, agentSessionId: string, orgId: string, status: string, subStatus: ("Available"
| "Idle"
), lastIdleCodeChangeTimestamp: number, lastStateChangeTimestamp: number, type: "AgentStateChangeSuccess"
, changedBy: (string | null), changedById: (string | null), changedByName: (string | null), lastStateChangeReason: string}>
Message type identifier for agent desktop events
Type:
"AgentDesktopMessage"
Detailed status indicating availability
Type:
("Available"
| "Idle"
)
Timestamp of last idle code change
Type: number
Type identifier for state change success event
Type:
"AgentStateChangeSuccess"
Station login success response
Message type identifier for agent desktop events
Type:
"AgentDesktopMessage"
List of active interaction IDs
Current availability status
Type:
("Available"
| "Idle"
)
Timestamp of last idle code change
Type: number
Map of channel types to channel IDs
List of roles assigned to the agent
Session ID of the supervising agent if applicable
Type: string
Type identifier for station login success event
Type:
"AgentStationLoginSuccess"
Response type received when an agent successfully logs into their station
Type:
Msg<{eventType: "AgentDesktopMessage"
, agentId: string, trackingId: string, auxCodeId: string, teamId: string, agentSessionId: string, orgId: string, interactionIds: Array<string>, status: string, subStatus: ("Available"
| "Idle"
), siteId: string, lastIdleCodeChangeTimestamp: number, lastStateChangeTimestamp: number, profileType: string, channelsMap: Record<string, Array<string>>, dialNumber: string?, roles: Array<string>?, supervisorSessionId: string?, type: "AgentStationLoginSuccess"
}>
Message type identifier for agent desktop events
Type:
"AgentDesktopMessage"
List of active interaction IDs
Current availability status
Type:
("Available"
| "Idle"
)
Timestamp of last idle code change
Type: number
Map of channel types to channel IDs
List of roles assigned to the agent
Session ID of the supervising agent if applicable
Type: string
Type identifier for station login success event
Type:
"AgentStationLoginSuccess"
Extended station login success response with notification tracking
Message type identifier for agent desktop events
Type:
"AgentDesktopMessage"
List of active interaction IDs
Current availability status
Type:
("Available"
| "Idle"
)
Timestamp of last idle code change
Type: number
Multimedia profile capacity settings
Type: {chat: number, email: number, social: number, telephony: number}
List of roles assigned to the agent
Session ID of the supervising agent if applicable
Type: string
Type identifier for station login success event
Type:
"AgentStationLoginSuccess"
Extended response type for station login success that includes notification tracking
Type:
{eventType: "AgentDesktopMessage"
, agentId: string, trackingId: string, auxCodeId: string, teamId: string, agentSessionId: string, orgId: string, interactionIds: Array<string>, status: string, subStatus: ("Available"
| "Idle"
), siteId: string, lastIdleCodeChangeTimestamp: number, lastStateChangeTimestamp: number, profileType: string, mmProfile: {chat: number, email: number, social: number, telephony: number}, dialNumber: string?, roles: Array<string>?, supervisorSessionId: string?, type: "AgentStationLoginSuccess"
, notifsTrackingId: string}
("AgentDesktopMessage"
)
(string)
(string)
(string)
(string)
(string)
(string)
(string)
(("Available"
| "Idle"
))
(string)
(number)
(number)
(string)
(string?)
(string?)
("AgentStationLoginSuccess"
)
(string)
Message type identifier for agent desktop events
Type:
"AgentDesktopMessage"
List of active interaction IDs
Current availability status
Type:
("Available"
| "Idle"
)
Timestamp of last idle code change
Type: number
Multimedia profile capacity settings
Type: {chat: number, email: number, social: number, telephony: number}
List of roles assigned to the agent
Session ID of the supervising agent if applicable
Type: string
Type identifier for station login success event
Type:
"AgentStationLoginSuccess"
Device type update success response
Extended response type for agent device type update success
Type: any
Agent login success response
Message type identifier for agent desktop events
Type:
"AgentDesktopMessage"
Identity of who initiated the logout if not the agent themselves
Type: string
List of roles assigned to the agent
Type identifier for logout success event
Type:
"AgentLogoutSuccess"
Response type received when an agent successfully logs out from the system
Type:
Msg<{eventType: "AgentDesktopMessage"
, agentId: string, trackingId: string, agentSessionId: string, orgId: string, status: string, subStatus: string, loggedOutBy: string?, roles: Array<string>?, type: "AgentLogoutSuccess"
}>
Message type identifier for agent desktop events
Type:
"AgentDesktopMessage"
Identity of who initiated the logout if not the agent themselves
Type: string
List of roles assigned to the agent
Type identifier for logout success event
Type:
"AgentLogoutSuccess"
Agent relogin success response
Message type identifier for agent desktop events
Type:
"AgentDesktopMessage"
List of active interaction IDs
Current login status
Type:
"LoggedIn"
Current sub-status
Type:
"Idle"
Timestamp of last idle code change
Type: number
Map of channel types to channel IDs
List of roles assigned to the agent
Type of device being used
Type: DeviceType
Flag indicating if emergency modal was shown
Type: boolean
Type identifier for relogin success event
Type:
"AgentReloginSuccess"
Response type received when an agent successfully relogins to the system
Type:
Msg<{eventType: "AgentDesktopMessage"
, agentId: string, trackingId: string, auxCodeId: string, teamId: string, agentSessionId: string, dn: string, orgId: string, interactionIds: Array<string>, isExtension: boolean, status: "LoggedIn"
, subStatus: "Idle"
, siteId: string, lastIdleCodeChangeTimestamp: number, lastStateChangeTimestamp: number, lastStateChangeReason: string?, profileType: string, channelsMap: Record<string, Array<string>>, dialNumber: string?, roles: Array<string>?, deviceType: DeviceType?, deviceId: (string | null)?, isEmergencyModalAlreadyDisplayed: boolean?, type: "AgentReloginSuccess"
}>
Message type identifier for agent desktop events
Type:
"AgentDesktopMessage"
List of active interaction IDs
Current login status
Type:
"LoggedIn"
Current sub-status
Type:
"Idle"
Timestamp of last idle code change
Type: number
Map of channel types to channel IDs
List of roles assigned to the agent
Type of device being used
Type: DeviceType
Flag indicating if emergency modal was shown
Type: boolean
Type identifier for relogin success event
Type:
"AgentReloginSuccess"
Agent state type
Represents the possible states an agent can be in
Type:
("Available"
| "Idle"
| "RONA"
| string)
User station login parameters
List of roles assigned to the agent
Indicates if agent uses a different DN than their assigned one
Type: boolean
Type of device being used
Type: DeviceType
Parameters required for agent station login
Type: {dialNumber: (string | null)?, dn: (string | null)?, teamId: (string | null), teamName: (string | null), roles: Array<string>?, siteId: string, usesOtherDN: boolean, skillProfileId: string?, auxCodeId: string, isExtension: boolean?, deviceType: DeviceType?, deviceId: (string | null)?, isEmergencyModalAlreadyDisplayed: boolean?}
((string | null)?)
((string | null)?)
((string | null))
((string | null))
(string)
(boolean)
(string?)
(string)
(boolean?)
(DeviceType?)
((string | null)?)
(boolean?)
List of roles assigned to the agent
Indicates if agent uses a different DN than their assigned one
Type: boolean
Type of device being used
Type: DeviceType
Device type for agent login
Type of device used for agent login
Type: (LoginOption | string)
Buddy agent details
Detailed information about a buddy agent
Type: {agentId: string, state: string, teamId: string, dn: string, agentName: string, siteId: string}
Buddy agents success response
Message type identifier for agent desktop events
Type:
"AgentDesktopMessage"
Type identifier for buddy agents response
Type:
"BuddyAgents"
List of buddy agents and their details
Type: Array<BuddyDetails>
Response type received when successfully retrieving buddy agent information
Type:
Msg<{eventType: "AgentDesktopMessage"
, agentId: string, trackingId: string, agentSessionId: string, orgId: string, type: "BuddyAgents"
, agentList: Array<BuddyDetails>}>
Message type identifier for agent desktop events
Type:
"AgentDesktopMessage"
Type identifier for buddy agents response
Type:
"BuddyAgents"
List of buddy agents and their details
Type: Array<BuddyDetails>
Config related types
Microsoft Teams integration configuration
Type: {showUserDetailsMS: boolean?, stateSynchronizationMS: boolean?}
Webex integration configuration
Type: {showUserDetailsWebex: boolean?, stateSynchronizationWebex: boolean?}
List of teams the agent belongs to
Whether default DN is enforced for this agent
Type: boolean
Regex pattern for US phone number validation
Regex pattern for international phone number validation
Multimedia profile defining channel capabilities
Type: string
Available idle codes
List of specific idle codes
Access control for idle codes
Type:
("ALL"
| "SPECIFIC"
)
Available wrap-up codes
Agent-specific wrap-up codes
Type: agentWrapUpCodes
Default wrap-up code for agent
Type: agentDefaultWrapupCode
Wrap-up configuration data
Type: WrapupData
Whether outbound is enabled at tenant level
Type: boolean
Whether outbound is enabled for this agent
Type: boolean
Whether agent becomes available after outdial
Type: boolean
Whether campaign management is enabled
Type: boolean
Additional campaign manager information
Type: string
Whether personal statistics are enabled
Type: boolean
Whether mid-call monitoring is enabled
Type: boolean
Whether managed teams feature is enabled
Type: boolean
Whether managed queues feature is enabled
Type: boolean
Whether agent state changes are enabled
Type: boolean
Integration URL mappings
Type: URLMappings
Whether desktop inactivity timeout is enabled
Type: boolean
Desktop inactivity timeout in minutes
Type: number
Available voice login options
Type: Array<LoginOption>
Current login device type
Type: LoginOption
Organization-wide idle codes
Whether recording management is enabled
Type: boolean
Connection recovery timeout in milliseconds
Type: number
Profile interface
Microsoft Teams integration configuration
Type: {showUserDetailsMS: boolean?, stateSynchronizationMS: boolean?}
Webex integration configuration
Type: {showUserDetailsWebex: boolean?, stateSynchronizationWebex: boolean?}
List of teams the agent belongs to
Whether default DN is enforced for this agent
Type: boolean
Regex pattern for US phone number validation
Regex pattern for international phone number validation
Multimedia profile defining channel capabilities
Type: string
Available idle codes
List of specific idle codes
Access control for idle codes
Type:
("ALL"
| "SPECIFIC"
)
Available wrap-up codes
Agent-specific wrap-up codes
Type: agentWrapUpCodes
Default wrap-up code for agent
Type: agentDefaultWrapupCode
Wrap-up configuration data
Type: WrapupData
Whether outbound is enabled at tenant level
Type: boolean
Whether outbound is enabled for this agent
Type: boolean
Whether agent becomes available after outdial
Type: boolean
Whether campaign management is enabled
Type: boolean
Additional campaign manager information
Type: string
Whether personal statistics are enabled
Type: boolean
Whether mid-call monitoring is enabled
Type: boolean
Whether managed teams feature is enabled
Type: boolean
Whether managed queues feature is enabled
Type: boolean
Whether agent state changes are enabled
Type: boolean
Integration URL mappings
Type: URLMappings
Whether desktop inactivity timeout is enabled
Type: boolean
Desktop inactivity timeout in minutes
Type: number
Available voice login options
Type: Array<LoginOption>
Current login device type
Type: LoginOption
Organization-wide idle codes
Whether recording management is enabled
Type: boolean
Connection recovery timeout in milliseconds
Type: number
Comprehensive agent profile configuration in the contact center system Contains all settings and capabilities for an agent
Type:
{microsoftConfig: {showUserDetailsMS: boolean?, stateSynchronizationMS: boolean?}?, webexConfig: {showUserDetailsWebex: boolean?, stateSynchronizationWebex: boolean?}?, teams: Array<Team>, defaultDn: string, dn: string?, forceDefaultDn: boolean, forceDefaultDnForAgent: boolean, regexUS: (RegExp | string), regexOther: (RegExp | string), agentId: string, agentName: string, agentMailId: string, agentProfileID: string, dialPlan: DialPlan, multimediaProfileId: string, skillProfileId: string, siteId: string, enterpriseId: string, privacyShieldVisible: boolean, idleCodes: Array<Entity>, idleCodesList: Array<string>?, idleCodesAccess: ("ALL"
| "SPECIFIC"
)?, wrapupCodes: Array<Entity>, agentWrapUpCodes: agentWrapUpCodes?, agentDefaultWrapUpCode: agentDefaultWrapupCode?, defaultWrapupCode: string, wrapUpData: WrapupData, orgId: string?, isOutboundEnabledForTenant: boolean, isOutboundEnabledForAgent: boolean, isAdhocDialingEnabled: boolean, isAgentAvailableAfterOutdial: boolean, isCampaignManagementEnabled: boolean, outDialEp: string, isEndCallEnabled: boolean, isEndConsultEnabled: boolean, lcmUrl: string?, agentDbId: string, agentAnalyzerId: string?, allowConsultToQueue: boolean, campaignManagerAdditionalInfo: string?, agentPersonalStatsEnabled: boolean, addressBookId: string?, outdialANIId: string?, analyserUserId: string?, isCallMonitoringEnabled: boolean?, isMidCallMonitoringEnabled: boolean?, isBargeInEnabled: boolean?, isManagedTeamsEnabled: boolean?, isManagedQueuesEnabled: boolean?, isSendMessageEnabled: boolean?, isAgentStateChangeEnabled: boolean?, isSignOutAgentsEnabled: boolean?, urlMappings: URLMappings?, isTimeoutDesktopInactivityEnabled: boolean, timeoutDesktopInactivityMins: number?, isAnalyzerEnabled: boolean?, tenantTimezone: string?, loginVoiceOptions: Array<LoginOption>?, deviceType: LoginOption?, currentTeamId: string?, webRtcEnabled: boolean, organizationIdleCodes: Array<Entity>?, isRecordingManagementEnabled: boolean?, lostConnectionRecoveryTimeout: number, maskSensitiveData: boolean?, isAgentLoggedIn: boolean?, lastStateAuxCodeId: string?, lastStateChangeTimestamp: number?, lastIdleCodeChangeTimestamp: number?}
(string)
(string?)
(boolean)
(boolean)
(string)
(string)
(string)
(string)
(DialPlan)
(string)
(string)
(string)
(string)
(boolean)
(("ALL"
| "SPECIFIC"
)?)
(agentWrapUpCodes?)
(agentDefaultWrapupCode?)
(string)
(WrapupData)
(string?)
(boolean)
(boolean)
(boolean)
(boolean)
(boolean)
(string)
(boolean)
(boolean)
(string?)
(string)
(string?)
(boolean)
(string?)
(boolean)
(string?)
(string?)
(string?)
(boolean?)
(boolean?)
(boolean?)
(boolean?)
(boolean?)
(boolean?)
(boolean?)
(boolean?)
(URLMappings?)
(boolean)
(number?)
(boolean?)
(string?)
(Array<LoginOption>?)
(LoginOption?)
(string?)
(boolean)
(boolean?)
(number)
(boolean?)
(boolean?)
(string?)
(number?)
(number?)
Microsoft Teams integration configuration
Type: {showUserDetailsMS: boolean?, stateSynchronizationMS: boolean?}
Webex integration configuration
Type: {showUserDetailsWebex: boolean?, stateSynchronizationWebex: boolean?}
List of teams the agent belongs to
Whether default DN is enforced for this agent
Type: boolean
Regex pattern for US phone number validation
Regex pattern for international phone number validation
Multimedia profile defining channel capabilities
Type: string
Available idle codes
List of specific idle codes
Access control for idle codes
Type:
("ALL"
| "SPECIFIC"
)
Available wrap-up codes
Agent-specific wrap-up codes
Type: agentWrapUpCodes
Default wrap-up code for agent
Type: agentDefaultWrapupCode
Wrap-up configuration data
Type: WrapupData
Whether outbound is enabled at tenant level
Type: boolean
Whether outbound is enabled for this agent
Type: boolean
Whether agent becomes available after outdial
Type: boolean
Whether campaign management is enabled
Type: boolean
Additional campaign manager information
Type: string
Whether personal statistics are enabled
Type: boolean
Whether mid-call monitoring is enabled
Type: boolean
Whether managed teams feature is enabled
Type: boolean
Whether managed queues feature is enabled
Type: boolean
Whether agent state changes are enabled
Type: boolean
Integration URL mappings
Type: URLMappings
Whether desktop inactivity timeout is enabled
Type: boolean
Desktop inactivity timeout in minutes
Type: number
Available voice login options
Type: Array<LoginOption>
Current login device type
Type: LoginOption
Organization-wide idle codes
Whether recording management is enabled
Type: boolean
Connection recovery timeout in milliseconds
Type: number
Contact service queue interface
Whether to check agent availability before routing
Type: boolean
Default music on hold media file ID
Type: string
Whether outbound campaign routing is enabled
Type: boolean
Whether recording all calls is permitted
Type: boolean
Whether pausing recordings is permitted
Type: boolean
Maximum recording pause duration in seconds
Type: number
Queue skill requirements for routing
Associated agents
Call distribution group configurations
Type: Array<CallDistributionGroup>
Associated resource links
Comprehensive configuration for a contact service queue
Type: {id: string, name: string, description: string, queueType: string, checkAgentAvailability: boolean, channelType: string, serviceLevelThreshold: number, maxActiveContacts: number, maxTimeInQueue: number, defaultMusicInQueueMediaFileId: string, timezone: string, active: boolean, outdialCampaignEnabled: boolean, monitoringPermitted: boolean, parkingPermitted: boolean, recordingPermitted: boolean, recordingAllCallsPermitted: boolean, pauseRecordingPermitted: boolean, recordingPauseDuration: number, controlFlowScriptUrl: string, ivrRequeueUrl: string, routingType: string, queueRoutingType: string, queueSkillRequirements: Array<object>, agents: Array<object>, callDistributionGroups: Array<CallDistributionGroup>, links: Array<string>, createdTime: string, lastUpdatedTime: string}
(string)
(string)
(string)
(string)
(boolean)
(string)
(number)
(number)
(number)
(string)
(string)
(boolean)
(boolean)
(boolean)
(boolean)
(boolean)
(boolean)
(boolean)
(number)
(string)
(string)
(string)
(string)
(Array<CallDistributionGroup>)
(string)
(string)
Whether to check agent availability before routing
Type: boolean
Default music on hold media file ID
Type: string
Whether outbound campaign routing is enabled
Type: boolean
Whether recording all calls is permitted
Type: boolean
Whether pausing recordings is permitted
Type: boolean
Maximum recording pause duration in seconds
Type: number
Queue skill requirements for routing
Associated agents
Call distribution group configurations
Type: Array<CallDistributionGroup>
Associated resource links
Response type from getUserUsingCI method
Team IDs assigned to the agent.
Multimedia profile ID associated with the agent.
Type: string
Represents the response from getUserUsingCI method.
Type: {id: string, ciUserId: string, firstName: string, lastName: string, agentProfileId: string, email: string, teamIds: Array<string>, multimediaProfileId: string, skillProfileId: string, siteId: string, dbId: string?, defaultDialledNumber: string?}
(string)
(string)
(string)
(string)
(string)
(string)
(string)
(string)
(string)
(string?)
(string?)
Team IDs assigned to the agent.
Multimedia profile ID associated with the agent.
Type: string
Response from getDesktopProfileById
Represents the voice options of an agent.
Type: Array<LoginOption>
Wrap-up codes that the agents can select when they wrap up a contact. It can take one of these values: ALL - To make all wrap-up codes available. SPECIFIC - To make specific codes available.
Type: string
Idle codes that the agents can select in Agent Desktop. It can take one of these values: ALL - To make all idle codes available. SPECIFIC - To make specific codes available.
Type: string
Wrap-up codes list that the agents can select when they wrap up a contact.
Idle codes list that the agents can select in Agent Desktop.
Agent available after outdial.
Type: boolean
Dial plans of the agent.
Timeout desktop inactivity custom enabled.
Type: boolean
Timeout desktop inactivity minutes.
Type: number
State synchronization in Microsoft enabled or not.
Type: boolean
Show user details in Webex enabled or not.
Type: boolean
Represents the response from getDesktopProfileById method.
Type: {loginVoiceOptions: Array<LoginOption>, accessWrapUpCode: string, accessIdleCode: string, wrapUpCodes: Array<string>, idleCodes: Array<string>, dialPlanEnabled: boolean, lastAgentRouting: boolean, autoWrapUp: boolean, autoAnswer: boolean, autoWrapAfterSeconds: number, agentAvailableAfterOutdial: boolean, allowAutoWrapUpExtension: boolean, outdialEnabled: boolean, outdialEntryPointId: string, outdialANIId: string, consultToQueue: boolean, addressBookId: string, viewableStatistics: {id: string, agentStats: boolean, accessQueueStats: string, contactServiceQueues: Array<string>, loggedInTeamStats: boolean, accessTeamStats: string, teams: Array<string>}, agentDNValidation: string, dialPlans: Array<string>, timeoutDesktopInactivityCustomEnabled: boolean, timeoutDesktopInactivityMins: number, showUserDetailsMS: boolean, stateSynchronizationMS: boolean, showUserDetailsWebex: boolean, stateSynchronizationWebex: boolean}
(Array<LoginOption>)
(string)
(string)
(boolean)
(boolean)
(boolean)
(boolean)
(number)
(boolean)
(boolean)
(boolean)
(string)
(string)
(boolean)
(string)
({id: string, agentStats: boolean, accessQueueStats: string, contactServiceQueues: Array<string>, loggedInTeamStats: boolean, accessTeamStats: string, teams: Array<string>})
(string)
(boolean)
(number)
(boolean)
(boolean)
(boolean)
(boolean)
Represents the voice options of an agent.
Type: Array<LoginOption>
Wrap-up codes that the agents can select when they wrap up a contact. It can take one of these values: ALL - To make all wrap-up codes available. SPECIFIC - To make specific codes available.
Type: string
Idle codes that the agents can select in Agent Desktop. It can take one of these values: ALL - To make all idle codes available. SPECIFIC - To make specific codes available.
Type: string
Wrap-up codes list that the agents can select when they wrap up a contact.
Idle codes list that the agents can select in Agent Desktop.
Agent available after outdial.
Type: boolean
Dial plans of the agent.
Timeout desktop inactivity custom enabled.
Type: boolean
Timeout desktop inactivity minutes.
Type: number
State synchronization in Microsoft enabled or not.
Type: boolean
Show user details in Webex enabled or not.
Type: boolean
Response from getMultimediaProfileById
Response from getListOfTeams
Array of team configurations
Pagination metadata
Type: {page: number, pageSize: number, totalPages: number, totalRecords: number}
Response from getListOfAuxCodes
Response from getSiteInfo
Response from getOrgInfo
Response from getOrganizationSetting
Response from getTenantData
Desktop inactivity timeout in minutes
Type: number
Whether call variables are suppressed
Type: boolean
Whether desktop inactivity timeout is enabled
Type: boolean
Response from getURLMapping
URL mapping configuration for external integrations
Type: {id: string, name: string, url: string, links: Array<string>, createdTime: number, lastUpdatedTime: number}
Response from getDialPlanData
Dial plan entity definition containing number manipulation rules
Type: {id: string, regularExpression: string, prefix: string, strippedChars: string, name: string}
Auxiliary code information
Indicates whether this is the default code (true) or not (false).
Type: boolean
Indicates whether this is the system default code (true) or not (false).
Type: boolean
Team information
List of user IDs belonging to team
Ordered list of queue rankings
Wrap-up reason information
Wrap-up reason configuration used to classify completed interactions
Type: {isSystem: boolean, name: string, id: string, isDefault: boolean}
WebSocket event data
Event payload data
Type: (WelcomeEvent | Agent.StationLoginSuccess | Agent.LogoutSuccess | Agent.ReloginSuccess | Agent.StateChangeSuccess | Agent.BuddyAgentsSuccess)
WebSocket event structure for Contact Center events
Type: {type: CC_EVENTS, data: (WelcomeEvent | Agent.StationLoginSuccess | Agent.LogoutSuccess | Agent.ReloginSuccess | Agent.StateChangeSuccess | Agent.BuddyAgentsSuccess)}
(CC_EVENTS)
((WelcomeEvent | Agent.StationLoginSuccess | Agent.LogoutSuccess | Agent.ReloginSuccess | Agent.StateChangeSuccess | Agent.BuddyAgentsSuccess))
Event payload data
Type: (WelcomeEvent | Agent.StationLoginSuccess | Agent.LogoutSuccess | Agent.ReloginSuccess | Agent.StateChangeSuccess | Agent.BuddyAgentsSuccess)
Wrap-up configuration data
Wrap-up configuration properties
Type:
{autoWrapup: boolean?, autoWrapupInterval: number?, lastAgentRoute: boolean?, wrapUpReasonList: Array<WrapUpReason>, wrapUpCodesList: Array<string>?, idleCodesAccess: ("ALL"
| "SPECIFIC"
)?, interactionId: string?, allowCancelAutoWrapup: boolean?}
List of available wrap-up reasons
Type: Array<WrapUpReason>
List of available wrap-up codes
Access control for idle codes ('ALL' or 'SPECIFIC')
Type:
("ALL"
| "SPECIFIC"
)
Wrap-up configuration data containing settings and available options
Type:
{wrapUpProps: {autoWrapup: boolean?, autoWrapupInterval: number?, lastAgentRoute: boolean?, wrapUpReasonList: Array<WrapUpReason>, wrapUpCodesList: Array<string>?, idleCodesAccess: ("ALL"
| "SPECIFIC"
)?, interactionId: string?, allowCancelAutoWrapup: boolean?}}
Wrap-up configuration properties
Type:
{autoWrapup: boolean?, autoWrapupInterval: number?, lastAgentRoute: boolean?, wrapUpReasonList: Array<WrapUpReason>, wrapUpCodesList: Array<string>?, idleCodesAccess: ("ALL"
| "SPECIFIC"
)?, interactionId: string?, allowCancelAutoWrapup: boolean?}
List of available wrap-up reasons
Type: Array<WrapUpReason>
List of available wrap-up codes
Access control for idle codes ('ALL' or 'SPECIFIC')
Type:
("ALL"
| "SPECIFIC"
)
Base entity type
Basic entity information used throughout the system
Type: {isSystem: boolean, name: string, id: string, isDefault: boolean}
Dial plan configuration
List of dial plan entities with transformation rules
Type: Array<{regex: string, prefix: string, strippedChars: string, name: string}>
Complete dial plan configuration for number handling
Type: {type: string, dialPlanEntity: Array<{regex: string, prefix: string, strippedChars: string, name: string}>}
(string)
List of dial plan entities with transformation rules
Type: Array<{regex: string, prefix: string, strippedChars: string, name: string}>
Auxiliary code type (IDLE_CODE or WRAP_UP_CODE)
Type representing the possible auxiliary code types
Type: (any | any)
Idle code constant
Type: string
Wrap up code constant
Type: string
The Contact Center plugin default export
Features:
Agent State Events:
agent:stateChange
- Agent's state has changed (Available, Idle, etc.)agent:stateChangeSuccess
- Agent state change was successfulagent:stateChangeFailed
- Agent state change failedSession Events:
agent:stationLoginSuccess
- Agent login was successfulagent:stationLoginFailed
- Agent login failedagent:logoutSuccess
- Agent logout was successfulagent:logoutFailed
- Agent logout failedTask Events:
task:incoming
- New task is being offeredtask:hydrate
- Task data has been updatedtask:established
- Task/call has been connectedtask:ended
- Task/call has endedtask:error
- An error occurred during task handlingExtends WebexPlugin
```typescript
import Webex from 'webex';
// Initialize SDK with access token
const webex = new Webex({
credentials: 'YOUR_ACCESS_TOKEN'
});
// Get Contact Center plugin instance
const cc = webex.cc;
// Setup event handlers
cc.on('agent:stateChange', (event) => {
console.log('Agent state changed:', event.state);
});
cc.on('task:incoming', (task) => {
console.log('New task received:', task.interactionId);
});
// Initialize agent session
async function initializeAgent() {
try {
// Register with contact center
const profile = await cc.register();
// Login with browser-based calling
await cc.stationLogin({
teamId: profile.teams[0].teamId,
loginOption: 'BROWSER'
});
// Set agent to Available state
await cc.setAgentState({
state: 'Available',
auxCodeId: '0'
});
console.log('Agent initialized and ready');
} catch (error) {
console.error('Initialization failed:', error);
await cc.uploadLogs(); // Upload logs for troubleshooting
}
}
initializeAgent();
```
The plugin's unique namespace identifier in the Webex SDK. Used to access the plugin via webex.cc
Type: string
Logger utility for Contact Center plugin Provides consistent logging across the plugin
Type: LoggerProxy
Initializes the Contact Center SDK by setting up the web socket connections. This method must be called before performing any agent operations such as login, state change, or handling tasks.
Promise<Profile>
:
Agent profile information after successful registration.
The returned
Profile
object contains details such as:
agentId
: The unique identifier for the agent.defaultDn
: The default dial number associated with the agent.teams
: Array of teams the agent belongs to.webRtcEnabled
: Indicates if WebRTC (browser calling) is enabled.loginVoiceOptions
: Supported login options for the agent (e.g., BROWSER, EXTENSION).```typescript
import Webex from 'webex';
const webex = Webex.init({ credentials: 'YOUR_ACCESS_TOKEN' });
const cc = webex.cc;
// Register the SDK and fetch agent profile
const profile = await cc.register();
console.log('Agent ID:', profile.agentId);
console.log('Default DN:', profile.defaultDn);
console.log('Teams:', profile.teams.map(t => t.teamId));
console.log('WebRTC Enabled:', profile.webRtcEnabled);
console.log('Supported Login Options:', profile.loginVoiceOptions);
// Now you can proceed with station login, state changes, etc.
await cc.stationLogin({ teamId: profile.teams[0].teamId, loginOption: 'BROWSER' });
```
Unregisters the Contact Center SDK by closing all web socket connections, removing event listeners, and cleaning up internal state.
Promise<void>
:
Resolves when deregistration and cleanup are complete.
// Typical usage: clean up SDK before application exit or user logout
import Webex from 'webex';
const webex = Webex.init({ credentials: 'YOUR_ACCESS_TOKEN' });
const cc = webex.cc;
await cc.register();
await cc.stationLogin({ teamId: 'team123', loginOption: 'BROWSER' });
// ... perform agent operations ...
// If you want to log out the agent as well, call:
// await cc.stationLogout({ logoutReason: 'User signed out' });
// On application shutdown or user sign-out:
await cc.deregister();
Returns the list of buddy agents who are in the given user state and media type based on their agent profile settings
(BuddyAgents)
The data required to fetch buddy agents
Promise<BuddyAgentsResponse>
:
A promise resolving to the buddy agents information
```typescript
// Get list of available agents for consultation or transfer
const cc = webex.cc;
// First ensure you're registered and logged in
await cc.register();
await cc.stationLogin({ teamId: 'team123', loginOption: 'BROWSER' });
// Get buddy agents filtered by state and media type
const response = await cc.getBuddyAgents({
state: 'Available', // Filter by agent state ('Available', 'Idle', etc.)
mediaType: 'telephony' // Filter by media type ('telephony', 'chat', 'email', 'social')
});
// Process the buddy agents list
if (response.data.agentList.length > 0) {
const buddyAgents = response.data.agentList;
console.log(`Found ${buddyAgents.length} available agents`);
// Access agent details
buddyAgents.forEach(agent => {
console.log(`Agent ID: ${agent.agentId}`);
console.log(`Name: ${agent.firstName} ${agent.lastName}`);
console.log(`State: ${agent.state}`);
console.log(`Team: ${agent.teamName}`);
});
}
```
Performs agent login with specified credentials and device type
(AgentLogin)
Login parameters including teamId, loginOption and dialNumber
Promise<StationLoginResponse>
:
Response containing login status and profile
```typescript
const cc = webex.cc;
await cc.register();
// Primary usage: using Promise response
try {
const response = await cc.stationLogin({
teamId: 'team123',
loginOption: 'EXTENSION',
dialNumber: '1002'
});
console.log('Login successful:', response);
} catch (error) {
console.error('Login failed:', error);
}
// Optional: Also listen for events elsewhere in your application
// cc.on('agent:stationLoginSuccess', (data) => { ... });
// cc.on('agent:stationLoginFailed', (error) => { ... });
```
Performs a station logout operation for the agent
(Logout)
Logout parameters with logoutReason - a string explaining why the agent is logging out
Promise<StationLogoutResponse>
:
Response indicating logout status
```typescript
// Basic logout
try {
await cc.stationLogout({
logoutReason: 'End of shift'
});
console.log('Logged out successfully');
} catch (error) {
console.error('Logout failed:', error);
}
```
Sets the state of the agent to Available or any of the Idle states. After a state change attempt, one of the following events will be emitted:
(StateChange)
State change parameters including the new state
Promise<SetStateResponse>
:
Response with updated state information
```typescript
const cc = webex.cc;
await cc.register();
await cc.stationLogin({ teamId: 'team123', loginOption: 'BROWSER' });
// Using promise-based approach
try {
await cc.setAgentState({
state: 'Available',
auxCodeId: '12345',
lastStateChangeReason: 'Manual state change',
agentId: 'agent123',
});
} catch (error) {
console.error('State change failed:', error);
}
// Optionally, listen for events
cc.on('agent:stateChange', (eventData) => {
// Triggered for both local and remote state changes
console.log('State changed:', eventData);
});
cc.on('agent:stateChangeSuccess', (eventData) => {
console.log('State change succeeded:', eventData);
});
cc.on('agent:stateChangeFailed', (error) => {
console.error('State change failed:', error);
});
```
Makes an outbound call to a specified phone number.
(string)
The phone number to dial (e.g., '+1234567890').
Should include country code and be in E.164 format.
Promise<TaskResponse>
:
Resolves with the task response containing:
```typescript
// Initialize and prepare agent
const cc = webex.cc;
await cc.register();
await cc.stationLogin({
teamId: 'team123',
loginOption: 'BROWSER'
});
// Set Available state before outbound call
await cc.setAgentState({
state: 'Available',
auxCodeId: '0'
});
// Make outbound call with full error handling
try {
// Verify agent is properly configured for outdial
if (!cc.agentConfig.isOutboundEnabledForAgent) {
throw new Error('Agent not configured for outbound calls');
}
// Start the outbound call
const destination = '+1234567890';
const task = await cc.startOutdial(destination);
// Listen for all relevant task events
task.on('task:ringing', () => {
console.log('Call is ringing');
updateCallStatus('Ringing...');
});
task.on('task:established', () => {
console.log('Call connected');
updateCallStatus('Connected');
enableCallControls(); // Show mute, hold, transfer buttons
});
task.on('task:hold', () => {
console.log('Call placed on hold');
updateCallStatus('On Hold');
});
task.on('task:error', (error) => {
console.error('Call error:', error);
updateCallStatus('Error');
showErrorDialog(error.message);
});
task.on('task:ended', () => {
console.log('Call ended');
updateCallStatus('Call Ended');
resetCallControls();
// Handle wrap-up if required
if (task.data.wrapUpRequired) {
showWrapupForm();
}
});
// Example call control usage
function handleMuteToggle() {
await task.toggleMute();
}
function handleHoldToggle() {
if (task.data.isOnHold) {
await task.resume();
} else {
await task.hold();
}
}
async function handleTransfer() {
// Get available queues for transfer
const queues = await cc.getQueues();
// Transfer to first available queue
if (queues.length > 0) {
await task.transfer({
to: queues[0].queueId,
destinationType: 'QUEUE'
});
}
}
} catch (error) {
console.error('Outdial failed:', error);
showErrorNotification('Failed to place call: ' + error.message);
}
```
This is used for getting the list of queues to which a task can be consulted or transferred.
(string?)
Optional search string to filter queues by name
(string?)
Optional OData filter expression (e.g., 'teamId eq "team123"')
(number
= 0
)
Page number for paginated results, starting at 0
(number
= 100
)
Number of queues to return per page
Promise<Array<ContactServiceQueue>>
:
Promise<ContactServiceQueue[]> Resolves with the list of queues
```typescript
const cc = webex.cc;
await cc.register();
await cc.stationLogin({ teamId: 'team123', loginOption: 'BROWSER' });
// Basic usage - get all queues
const allQueues = await cc.getQueues();
// Search for specific queues
const salesQueues = await cc.getQueues('sales'); // Search for 'sales' in queue names
// Use filtering and pagination
const filteredQueues = await cc.getQueues(
'', // No search term
'teamId eq "team123"', // Filter by team
0, // First page
50 // 50 items per page
);
// Process queue results
queues.forEach(queue => {
console.log('Queue:', {
id: queue.queueId,
name: queue.queueName,
channelType: queue.channelType,
isActive: queue.isActive,
description: queue.description
});
});
```
Uploads logs to help troubleshoot SDK issues.
This method collects the current SDK logs including network requests, WebSocket messages, and client-side events, then securely submits them to Webex's diagnostics service. The returned tracking ID, feedbackID can be provided to Webex support for faster issue resolution.
Promise<UploadLogsResponse>
:
Promise
Resolves with the upload logs response
```typescript
const cc = webex.cc;
try {
await cc.register();
} catch (error) {
console.error('Error:', error);
const result = await cc.uploadLogs();
console.log('Logs uploaded. Tracking ID:', result.trackingId);
}
```
Updates the agent device type and login configuration. Use this method to change how an agent connects to the contact center system (e.g., switching from browser-based calling to a desk phone extension).
(AgentDeviceUpdate)
Configuration containing:
Promise<UpdateDeviceTypeResponse>
:
Promise
Resolves with the device type update response
```typescript
const cc = webex.cc;
// Switch from browser to extension
try {
await cc.updateAgentProfile({
loginOption: 'EXTENSION',
dialNumber: '1234', // Required for EXTENSION
teamId: 'currentTeam' // Optional: uses current team if not specified
});
} catch (error) {
console.error('Failed to update device:', error.message);
}
```
This is used for handling the async requests by sending webex.request and wait for corresponding websocket event.
Fetches the agent configuration data for the given orgId and agentId.
(string)
organization ID for which the agent configuration is to be fetched.
(string)
agent ID for which the configuration is to be fetched.
Promise<Profile>
:
A promise that resolves to the agent configuration profile.
Get the URL mapping for the given name
(Array<URLMapping>)
(string)
string
:
Get the MSFT and Webex configuration
(DesktopProfileResponse)
Object
:
Get the Webex configuration
(DesktopProfileResponse)
Object
:
Get the default agent DN
(string)
boolean
:
Get the filtered dialplan entries
(Array<DialPlanEntity>)
Array<Entity>
:
Get the filtered aux codes
Array<Entity>
:
Get the default wrapup code
Entity
:
Parse the agent configurations
(Object)
Profile
:
This is used for uploading the logs to backend/mats.
(LogsMetaData
= {}
)
meta data to be uploaded.
Promise<UploadLogsResponse>
Maps API endpoint names to functions that generate endpoint URLs for various organization resources.
const url = endPointMap.userByCI('org123', 'agent456');
Extends EventEmitter
(ReturnType<any>)
Routing Contact layer. Talks to AQMReq layer to convert events to promises
(WebCallingService)
Webrtc Service Layer
(WebSocketManager)
Websocket Manager to maintain websocket connection and keepalives
(ReturnType<any>)
Routing Contact layer. Talks to AQMReq layer to convert events to promises
(WebCallingService)
Webrtc Service Layer
(WebSocketManager)
Websocket Manager to maintain websocket connection and keepalives
TaskManager
WebCallingService provides WebRTC calling functionality for Contact Center agents. It handles registration, call management, and media operations for voice interactions.
Extends EventEmitter
(WebexSDK)
The Webex SDK instance
The login option selected for this session
Type: LoginOption
Sets the login option for the current session
(LoginOption)
The login option to use
void
Cleans up resources associated with the current call Removes event listeners and clears the call-task mapping
void
Answers an incoming call with the provided audio stream
(LocalMicrophoneStream)
The local microphone stream to use
(string)
The task ID associated with this call
void
Toggles the mute state of the current call
(LocalMicrophoneStream)
The local microphone stream to control
void
Maps a call ID to a task ID for correlation
void
Represents the possible metric event names used within the metrics system.
This type is derived from the keys of the METRIC_EVENT_NAMES
constant, ensuring
type safety and consistency when referring to metric event names throughout the codebase.
Type: Enum<any>
Task class represents a contact center task/interaction that can be managed by an agent. This class provides all the necessary methods to manage tasks in a contact center environment, handling various call control operations and task lifecycle management.
Key events emitted by Task instances (see TASK_EVENTS for details):
Task Lifecycle:
Media & Controls:
Consultation & Transfer:
Recording:
Extends EventEmitter
(ReturnType<any>)
The routing contact service instance
(WebCallingService)
The web calling service instance
(TaskData)
Initial task data
```typescript
// 1. Initialize task
const task = new Task(contact, webCallingService, taskData);
// 2. Set up event listeners
task.on('task:media', (track) => {
// Handle voice call media
const audioElement = document.getElementById('remote-audio');
audioElement.srcObject = new MediaStream([track]);
});
task.on('task:hold', () => {
console.log('Task is on hold');
// Update UI to show hold state
});
task.on('task:end', () => {
console.log('Task ended');
if (task.data.wrapUpRequired) {
// Show wrap-up form
}
});
// 3. Example task operations
await task.accept(); // Accept incoming task
await task.hold(); // Place on hold
await task.resume(); // Resume from hold
await task.end(); // End task
// 4. Handle wrap-up if required
await task.wrapup({
auxCodeId: 'RESOLVED',
wrapUpReason: 'Customer issue resolved'
});
```
Updates the task data with new information
(TaskData)
New task data to merge with existing data
(any
= false
)
If true, completely replace data instead of merging
any
:
The updated task instance
```typescript
task.updateTaskData(newData);
task.updateTaskData(newData, true); // completely replace data
```
Agent accepts the incoming task. After accepting, the task will emit task:assigned event and for voice calls, a task:media event with the audio stream.
Promise<TaskResponse>
:
Promise
```typescript
// Set up event handlers before accepting
task.on(TASK_EVENTS.TASK_ASSIGNED, () => {
console.log('Task assigned, ID:', task.data.interactionId);
// Update UI to show active task
});
// For voice calls, handle media
task.on(TASK_EVENTS.TASK_MEDIA, (track) => {
const audioElement = document.getElementById('remote-audio');
audioElement.srcObject = new MediaStream([track]);
});
// Accept the task
try {
await task.accept();
console.log('Successfully accepted task');
} catch (error) {
console.error('Failed to accept task:', error);
// Handle error (e.g., show error message to agent)
}
```
Agent can mute/unmute their microphone during a WebRTC task. This method toggles between muted and unmuted states for the local audio stream.
any
:
Promise
- Resolves when mute/unmute operation completes
```typescript
// Toggle mute state
task.toggleMute()
.then(() => console.log('Mute state toggled successfully'))
.catch(error => console.error('Failed to toggle mute:', error));
```
Declines the incoming task. This will reject the task and notify the routing system. For voice calls, this is equivalent to declining the incoming call.
Promise<TaskResponse>
:
Promise
```typescript
// Decline an incoming task
task.decline()
.then(() => console.log('Task declined successfully'))
.catch(error => console.error('Failed to decline task:', error));
```
Puts the current task/interaction on hold. Emits task:hold event when successful. For voice tasks, this mutes the audio.
Promise<TaskResponse>
:
Promise
```typescript
// Set up hold event handler
task.on(TASK_EVENTS.TASK_HOLD, () => {
console.log('Task is now on hold');
// Update UI to show hold state (e.g., enable resume button, show hold indicator)
document.getElementById('resume-btn').disabled = false;
document.getElementById('hold-indicator').style.display = 'block';
});
// Place task on hold
try {
await task.hold();
console.log('Successfully placed task on hold');
} catch (error) {
console.error('Failed to place task on hold:', error);
// Handle error (e.g., show error message, reset UI state)
}
```
Resumes the task/interaction that was previously put on hold. Emits task:unhold event when successful. For voice tasks, this restores the audio.
Promise<TaskResponse>
:
Promise
```typescript
// Set up unhold event handler
task.on(TASK_EVENTS.TASK_UNHOLD, () => {
console.log('Task resumed from hold');
// Update UI to show active state
document.getElementById('hold-btn').disabled = false;
document.getElementById('hold-indicator').style.display = 'none';
});
// Resume task from hold
try {
await task.resume();
console.log('Successfully resumed task from hold');
} catch (error) {
console.error('Failed to resume task:', error);
// Handle error (e.g., show error message)
}
```
Ends the task/interaction with the customer. Emits task:end event when successful. If task requires wrap-up, this will be indicated in the task:end event data.
Promise<TaskResponse>
:
Promise
```typescript
// Set up task end event handler
task.on(TASK_EVENTS.TASK_END, (data) => {
console.log('Task ended:', task.data.interactionId);
if (data.wrapUpRequired) {
// Show wrap-up form
showWrapupForm();
} else {
// Clean up and prepare for next task
cleanupTask();
}
});
// End the task
try {
await task.end();
console.log('Task end request successful');
} catch (error) {
console.error('Failed to end task:', error);
// Handle error (e.g., show error message, retry option)
}
function showWrapupForm() {
// Show wrap-up UI with required codes
document.getElementById('wrapup-form').style.display = 'block';
}
function cleanupTask() {
// Reset UI state
document.getElementById('active-task').style.display = 'none';
document.getElementById('controls').style.display = 'none';
}
```
Wraps up the task/interaction with the customer. This is called after task:end event if wrapUpRequired is true. Emits task:wrappedup event when successful.
(WrapupPayLoad)
WrapupPayLoad containing:
Promise<TaskResponse>
:
Promise
```typescript
// Set up wrap-up events
task.on(TASK_EVENTS.TASK_WRAPUP, () => {
console.log('Task ready for wrap-up');
// Show wrap-up form
document.getElementById('wrapup-form').style.display = 'block';
});
task.on(TASK_EVENTS.TASK_WRAPPEDUP, () => {
console.log('Task wrap-up completed');
// Clean up UI
document.getElementById('wrapup-form').style.display = 'none';
});
// Submit wrap-up
try {
const wrapupPayload = {
auxCodeId: selectedCode, // e.g., 'ISSUE_RESOLVED'
wrapUpReason: 'Customer issue resolved successfully'
};
await task.wrapup(wrapupPayload);
console.log('Successfully submitted wrap-up');
} catch (error) {
console.error('Failed to submit wrap-up:', error);
// Handle validation errors
if (error.message.includes('required')) {
// Show validation error to agent
}
}
```
Pauses the recording for the current voice task. Emits task:recordingPaused event when successful.
Promise<TaskResponse>
:
Promise
```typescript
// Set up recording events
task.on(TASK_EVENTS.TASK_RECORDING_PAUSED, () => {
console.log('Recording paused');
// Update UI to show recording paused state
document.getElementById('recording-status').textContent = 'Recording Paused';
document.getElementById('pause-recording-btn').style.display = 'none';
document.getElementById('resume-recording-btn').style.display = 'block';
});
task.on(TASK_EVENTS.TASK_RECORDING_PAUSE_FAILED, (error) => {
console.error('Failed to pause recording:', error);
// Show error to agent
});
// Pause recording
try {
await task.pauseRecording();
console.log('Pause recording request sent');
} catch (error) {
console.error('Error sending pause recording request:', error);
// Handle error
}
```
Resumes the recording for the voice task that was previously paused. Emits task:recordingResumed event when successful.
(ResumeRecordingPayload)
Configuration for resuming recording:
Promise<TaskResponse>
:
Promise
```typescript
// Set up recording resume events
task.on(TASK_EVENTS.TASK_RECORDING_RESUMED, () => {
console.log('Recording resumed');
// Update UI to show active recording state
document.getElementById('recording-status').textContent = 'Recording Active';
document.getElementById('pause-recording-btn').style.display = 'block';
document.getElementById('resume-recording-btn').style.display = 'none';
});
task.on(TASK_EVENTS.TASK_RECORDING_RESUME_FAILED, (error) => {
console.error('Failed to resume recording:', error);
// Show error to agent
});
// Resume recording
try {
const resumePayload = {
autoResumed: false // Set to true if triggered by system
};
await task.resumeRecording(resumePayload);
console.log('Resume recording request sent');
} catch (error) {
console.error('Error sending resume recording request:', error);
// Handle error
}
```
Consults another agent or queue on an ongoing task for further assistance. During consultation, the original customer is typically placed on hold while the agent seeks guidance from another agent or queue.
(ConsultPayload)
Configuration for the consultation containing:
Promise<TaskResponse>
:
Promise
- Resolves with consultation result
```typescript
// Consult with another agent
const consultPayload = {
to: 'agentId123',
destinationType: DESTINATION_TYPE.AGENT,
holdParticipants: true
};
task.consult(consultPayload)
.then(response => console.log('Consultation started successfully'))
.catch(error => console.error('Failed to start consultation:', error));
// Consult with a queue
const queueConsultPayload = {
to: 'salesQueue123',
destinationType: DESTINATION_TYPE.QUEUE
};
task.consult(queueConsultPayload)
.then(response => console.log('Queue consultation started'))
.catch(error => console.error('Failed to start queue consultation:', error));
```
Ends an ongoing consultation session for the task. This terminates the consultation while maintaining the original customer connection.
(ConsultEndPayload)
Configuration for ending the consultation containing:
Promise<TaskResponse>
:
Promise
- Resolves when consultation is ended
```typescript
// End a direct agent consultation
const consultEndPayload = {
isConsult: true,
taskId: 'task123'
};
task.endConsult(consultEndPayload)
.then(response => console.log('Consultation ended successfully'))
.catch(error => console.error('Failed to end consultation:', error));
// End a queue consultation
const queueConsultEndPayload = {
isConsult: true,
taskId: 'task123',
queueId: 'queue123'
};
task.endConsult(queueConsultEndPayload)
.then(response => console.log('Queue consultation ended'))
.catch(error => console.error('Failed to end queue consultation:', error));
```
Transfer the task to an agent directly or to a queue. This is a blind transfer that immediately redirects the task to the specified destination.
(TransferPayLoad)
Transfer configuration containing:
Promise<TaskResponse>
:
Promise
- Resolves when transfer is completed
```typescript
// Transfer to a queue
const queueTransferPayload = {
to: 'salesQueue123',
destinationType: DESTINATION_TYPE.QUEUE
};
task.transfer(queueTransferPayload)
.then(response => console.log('Task transferred to queue successfully'))
.catch(error => console.error('Failed to transfer to queue:', error));
// Transfer to an agent
const agentTransferPayload = {
to: 'agentId123',
destinationType: DESTINATION_TYPE.AGENT
};
task.transfer(agentTransferPayload)
.then(response => console.log('Task transferred to agent successfully'))
.catch(error => console.error('Failed to transfer to agent:', error));
```
Transfer the task to the party that was consulted. This completes a consultative transfer where the agent first consulted with the target before transferring the task. For queue consultations, the transfer is automatically directed to the agent who accepted the consultation.
(ConsultTransferPayLoad)
Configuration for the consultation transfer containing:
Promise<TaskResponse>
:
Promise
- Resolves when consultation transfer is completed
```typescript
// Complete consultation transfer to an agent
const agentConsultTransfer = {
to: 'agentId123',
destinationType: CONSULT_TRANSFER_DESTINATION_TYPE.AGENT
};
task.consultTransfer(agentConsultTransfer)
.then(response => console.log('Consultation transfer to agent completed'))
.catch(error => console.error('Failed to complete agent consultation transfer:', error));
// Complete consultation transfer to a queue agent
const queueConsultTransfer = {
to: 'queue123',
destinationType: CONSULT_TRANSFER_DESTINATION_TYPE.QUEUE
};
task.consultTransfer(queueConsultTransfer)
.then(response => console.log('Consultation transfer to queue agent completed'))
.catch(error => console.error('Failed to complete queue consultation transfer:', error));
```
Reloads the agent session
Logs out the agent
Logs in the agent to a station
Changes the agent's state
Retrieves list of buddy agents
Unique identifier for a task in the contact center system
Type: string
Helper type for creating enum-like objects with type safety
Type: any
Generic type for converting a const enum object into a union type of its values
Type: any
Defines the valid destination types for routing tasks within the contact center Used to specify where a task should be directed
Type representing valid destination types for task routing Derived from the DESTINATION_TYPE constant
Type: Enum<any>
Defines the valid destination types for consult transfer operations Used when transferring a task after consultation
Type representing valid destination types for consult transfers Derived from the CONSULT_TRANSFER_DESTINATION_TYPE constant
Type: Enum<any>
Defines all supported media channel types for customer interactions These represent the different ways customers can communicate with agents
Email-based communication channel
Web-based chat communication channel
Voice/phone communication channel
Social media platform communication channel
SMS text messaging communication channel
Facebook Messenger communication channel
WhatsApp messaging communication channel
Type representing valid media channels Derived from the MEDIA_CHANNEL constant
Type: Enum<any>
Email-based communication channel
Web-based chat communication channel
Voice/phone communication channel
Social media platform communication channel
SMS text messaging communication channel
Facebook Messenger communication channel
WhatsApp messaging communication channel
Represents a customer interaction within the contact center system Contains comprehensive details about an ongoing customer interaction
Type: {isFcManaged: boolean, isTerminated: boolean, mediaType: MEDIA_CHANNEL, previousVTeams: Array<string>, state: string, currentVTeam: string, participants: any, interactionId: string, orgId: string, createdTimestamp: number?, isWrapUpAssist: boolean?, callProcessingDetails: {QMgrName: string, taskToBeSelfServiced: string, ani: string, displayAni: string, dnis: string, tenantId: string, QueueId: string, vteamId: string, pauseResumeEnabled: string?, pauseDuration: string?, isPaused: string?, recordInProgress: string?, recordingStarted: string?, ctqInProgress: string?, outdialTransferToQueueEnabled: string?, convIvrTranscript: string?, customerName: string, virtualTeamName: string, ronaTimeout: string, category: string, reason: string, sourceNumber: string, sourcePage: string, appUser: string, customerNumber: string, reasonCode: string, IvrPath: string, pathId: string, fromAddress: string, parentInteractionId: string?, childInteractionId: string?, relationshipType: string?, parent_ANI: string?, parent_DNIS: string?, consultDestinationAgentJoined: (boolean | string)?, consultDestinationAgentName: string?, parent_Agent_DN: string?, parent_Agent_Name: string?, parent_Agent_TeamName: string?, isConferencing: string?, monitorType: string?, workflowName: string?, workflowId: string?, monitoringInvisibleMode: string?, monitoringRequestId: string?, participantInviteTimeout: string?, mohFileName: string?, CONTINUE_RECORDING_ON_TRANSFER: string?, EP_ID: string?, ROUTING_TYPE: string?, fceRegisteredEvents: string?, isParked: string?, priority: string?, routingStrategyId: string?, monitoringState: string?, BLIND_TRANSFER_IN_PROGRESS: boolean?, fcDesktopView: string?}, mainInteractionId: string?, media: Record<string, {mediaResourceId: string, mediaType: MEDIA_CHANNEL, mediaMgr: string, participants: Array<string>, mType: string, isHold: boolean, holdTimestamp: (number | null)}>, owner: string, mediaChannel: MEDIA_CHANNEL, contactDirection: {type: string}, outboundType: string?, callFlowParams: Record<string, {name: string, qualifier: string, description: string, valueDataType: string, value: string}>}
(boolean)
(boolean)
(MEDIA_CHANNEL)
(string)
(string)
(any)
(string)
(string)
(number?)
(boolean?)
({QMgrName: string, taskToBeSelfServiced: string, ani: string, displayAni: string, dnis: string, tenantId: string, QueueId: string, vteamId: string, pauseResumeEnabled: string?, pauseDuration: string?, isPaused: string?, recordInProgress: string?, recordingStarted: string?, ctqInProgress: string?, outdialTransferToQueueEnabled: string?, convIvrTranscript: string?, customerName: string, virtualTeamName: string, ronaTimeout: string, category: string, reason: string, sourceNumber: string, sourcePage: string, appUser: string, customerNumber: string, reasonCode: string, IvrPath: string, pathId: string, fromAddress: string, parentInteractionId: string?, childInteractionId: string?, relationshipType: string?, parent_ANI: string?, parent_DNIS: string?, consultDestinationAgentJoined: (boolean | string)?, consultDestinationAgentName: string?, parent_Agent_DN: string?, parent_Agent_Name: string?, parent_Agent_TeamName: string?, isConferencing: string?, monitorType: string?, workflowName: string?, workflowId: string?, monitoringInvisibleMode: string?, monitoringRequestId: string?, participantInviteTimeout: string?, mohFileName: string?, CONTINUE_RECORDING_ON_TRANSFER: string?, EP_ID: string?, ROUTING_TYPE: string?, fceRegisteredEvents: string?, isParked: string?, priority: string?, routingStrategyId: string?, monitoringState: string?, BLIND_TRANSFER_IN_PROGRESS: boolean?, fcDesktopView: string?})
(string?)
(Record<string, {mediaResourceId: string, mediaType: MEDIA_CHANNEL, mediaMgr: string, participants: Array<string>, mType: string, isHold: boolean, holdTimestamp: (number | null)}>)
(string)
(MEDIA_CHANNEL)
({type: string})
(string?)
The type of media channel for this interaction
Type: MEDIA_CHANNEL
List of previous virtual teams that handled this interaction
List of participants in the interaction
Type: any
Detailed call processing information and metadata
Type: {QMgrName: string, taskToBeSelfServiced: string, ani: string, displayAni: string, dnis: string, tenantId: string, QueueId: string, vteamId: string, pauseResumeEnabled: string?, pauseDuration: string?, isPaused: string?, recordInProgress: string?, recordingStarted: string?, ctqInProgress: string?, outdialTransferToQueueEnabled: string?, convIvrTranscript: string?, customerName: string, virtualTeamName: string, ronaTimeout: string, category: string, reason: string, sourceNumber: string, sourcePage: string, appUser: string, customerNumber: string, reasonCode: string, IvrPath: string, pathId: string, fromAddress: string, parentInteractionId: string?, childInteractionId: string?, relationshipType: string?, parent_ANI: string?, parent_DNIS: string?, consultDestinationAgentJoined: (boolean | string)?, consultDestinationAgentName: string?, parent_Agent_DN: string?, parent_Agent_Name: string?, parent_Agent_TeamName: string?, isConferencing: string?, monitorType: string?, workflowName: string?, workflowId: string?, monitoringInvisibleMode: string?, monitoringRequestId: string?, participantInviteTimeout: string?, mohFileName: string?, CONTINUE_RECORDING_ON_TRANSFER: string?, EP_ID: string?, ROUTING_TYPE: string?, fceRegisteredEvents: string?, isParked: string?, priority: string?, routingStrategyId: string?, monitoringState: string?, BLIND_TRANSFER_IN_PROGRESS: boolean?, fcDesktopView: string?}
Indicates if the task should be self-serviced
Type: string
Indicates if pause/resume functionality is enabled
Type: string
Indicates if outdial transfer to queue is enabled
Type: string
Email address or contact point that initiated the interaction
Type: string
Identifier of the parent interaction for related interactions
Type: string
Identifier of the child interaction for related interactions
Type: string
Type of relationship between parent and child interactions
Type: string
Indicates if the consulted destination agent has joined
Name of the destination agent for consultation
Type: string
Team name of the parent interaction's agent
Type: string
Indicates if monitoring is in invisible mode
Type: string
Flag for continuing recording during transfer
Type: string
Indicates if blind transfer is in progress
Type: boolean
Main interaction identifier for related interactions
Type: string
Media-specific information for the interaction
Type: Record<string, {mediaResourceId: string, mediaType: MEDIA_CHANNEL, mediaMgr: string, participants: Array<string>, mType: string, isHold: boolean, holdTimestamp: (number | null)}>
Type of media channel
Type: MEDIA_CHANNEL
List of participant identifiers
Primary media channel for the interaction
Type: MEDIA_CHANNEL
Parameters passed through the call flow
Type: Record<string, {name: string, qualifier: string, description: string, valueDataType: string, value: string}>
Task payload containing detailed information about a contact center task This structure encapsulates all relevant data for task management
Type: {mediaResourceId: string, eventType: string, eventTime: number?, agentId: string, destAgentId: string, trackingId: string, consultMediaResourceId: string, interaction: Interaction, participantId: string?, fromOwner: boolean?, toOwner: boolean?, childInteractionId: string?, interactionId: string, orgId: string, owner: string, queueMgr: string, queueName: string?, type: string, ronaTimeout: number?, isConsulted: boolean?, isConferencing: boolean, updatedBy: string?, destinationType: string?, autoResumed: boolean?, reasonCode: (string | number)?, reason: string?, consultingAgentId: string?, taskId: string?, task: Interaction?, id: string?, isWebCallMute: boolean?, reservationInteractionId: string?, wrapUpRequired: boolean?}
(string)
(string)
(number?)
(string)
(string)
(string)
(string)
(Interaction)
(string?)
(boolean?)
(boolean?)
(string?)
(string)
(string)
(string)
(string)
(string?)
(string)
(number?)
(boolean?)
(boolean)
(string?)
(string?)
(boolean?)
(string?)
(string?)
(string?)
(Interaction?)
(string?)
(boolean?)
(string?)
(boolean?)
Unique identifier for the media resource handling this task
Type: string
Media resource identifier for consultation operations
Type: string
Detailed interaction information
Type: Interaction
Identifier for child interaction in consult/transfer scenarios
Type: string
Code indicating the reason for an action
Task details including state and media information
Type: Interaction
Identifier for reservation interaction
Type: string
Parameters for putting a task on hold or resuming from hold
Type: {mediaResourceId: string}
(string)
Parameters for resuming a task's recording
Type: {autoResumed: boolean}
(boolean)
Parameters for transferring a task to another destination
Type: {to: string, destinationType: DestinationType}
(string)
(DestinationType)
Type of the destination (queue, agent, etc.)
Type: DestinationType
Parameters for initiating a consultative transfer
Type: {to: string, destinationType: ConsultTransferDestinationType}
(string)
(ConsultTransferDestinationType)
Parameters for initiating a consultation with another agent or queue
Type: {to: (string | undefined), destinationType: DestinationType, holdParticipants: boolean?}
Destination identifier for the consultation
Type of the consultation destination (agent, queue, etc.)
Type: DestinationType
Parameters for ending a consultation task
Type: {isConsult: boolean, isSecondaryEpDnAgent: boolean?, queueId: string?, taskId: string}
Indicates if this involves a secondary entry point or DN agent
Type: boolean
Parameters for transferring a task to another destination
Type: {to: (string | undefined), destinationType: DestinationType}
(DestinationType)
Destination identifier where the task will be transferred
Type of the transfer destination
Type: DestinationType
API payload for ending a consultation This is the actual payload that is sent to the developer API
Type: {queueId: string?}
(string?)
Data required for consulting and conferencing operations
Type: {agentId: string?, to: (string | undefined), destinationType: string}
Parameters required for cancelling a consult to queue operation
Type: {agentId: string, queueId: string}
Parameters required for declining a task
Type: {mediaResourceId: string}
(string)
Parameters for wrapping up a task with relevant completion details
Type: {wrapUpReason: string, auxCodeId: string}
Data structure for cleaning up contact resources
Type: {type: string, orgId: string, agentId: string, data: {eventType: string, interactionId: string, orgId: string, mediaMgr: string, trackingId: string, mediaType: string, destination: string?, broadcast: boolean, type: string}}
Detailed data about the cleanup operation
Type: {eventType: string, interactionId: string, orgId: string, mediaMgr: string, trackingId: string, mediaType: string, destination: string?, broadcast: boolean, type: string}
Event data received when agent connects to the system
Type: {agentId: string}
(string)
Response type for welcome events which can be either success or error
Type: (WelcomeEvent | Error)
Response from subscription requests containing WebSocket connection details
Type: {statusCode: number, body: {webSocketUrl: string?, subscriptionId: string?}, message: (string | null)}
Sort order configuration for queries
Type: {property: string, order: string}
Search query configuration
Type: {properties: string, value: string}
Parameters for querying Contact Center resources
Type: {pageNumber: number?, pageSize: number?, attributes: Array<string>?, ids: Array<string>?, queueType: string?, entryPointType: string?, channelType: string?, isActive: boolean?, workTypeCode: AuxCodeType?, names: Array<string>?, sortOrder: SortOrder?, searchQuery: SearchQuery?, defaultCode: boolean?, search: string?, desktopProfileFilter: boolean?}
(number?)
(number?)
(string?)
(string?)
(string?)
(boolean?)
(AuxCodeType?)
(SortOrder?)
(SearchQuery?)
(boolean?)
(string?)
(boolean?)
Agent wrap-up codes configuration with pagination metadata
Type: {data: Array<Entity>, meta: {links: {first: string, last: string, next: string, self: string}, orgid: string, page: number, pageSize: number, totalPages: number, totalRecords: number}}
Array of wrap-up code entities
Pagination and navigation metadata
Type: {links: {first: string, last: string, next: string, self: string}, orgid: string, page: number, pageSize: number, totalPages: number, totalRecords: number}
Default wrap-up code configuration for an agent
Type: {id: string, name: string}
Team configuration information
Type: {teamId: string, teamName: string, desktopLayoutId: string?}
Associated desktop layout ID for the team. Controls how the agent desktop is displayed for team members.
Type: string
Basic queue configuration information
Type: {queueId: string, queueName: string}
URL mappings for external system integrations
Type: {acqueonApiUrl: string, acqueonConsoleUrl: string}
Contact distribution group configuration for routing logic
Type: {agentGroups: Array<{teamId: string}>, order: number, duration: number}
Register an event listener
Type: Listener
Remove an event listener
Type: ListenerOff
Establish a connection to the Mercury service
Type: function (): Promise<void>
Disconnect from the Mercury service
Type: function (): Promise<void>
Whether Mercury is currently connected
Type: boolean
Whether Mercury is in the process of connecting
Type: boolean
Current WDM URL
Type: string
Current user's ID
Type: string
Current organization ID
Type: string
Device version
Type: string
Calling behavior configuration
Type: string
Get a service URL by name
Wait for service catalog to be loaded
Host catalog for service discovery
Service URLs cache
Type: {mobius: string, identity: string, janus: string, wdm: string, broadworksIdpProxy: string, hydra: string, mercuryApi: string, ucmgmt-gateway: string, contactsService: string}
Mobius calling service
Type: string
Identity service
Type: string
Janus media server
Type: string
WDM (WebEx Device Management) service
Type: string
BroadWorks IDP proxy service
Type: string
Hydra API service
Type: string
Mercury API service
Type: string
UC Management gateway service
Type: string
Contacts service
Type: string
Submit behavioral events (user actions)
Type: SubmitBehavioralEvent
Submit operational events (system operations)
Type: SubmitOperationalEvent
Submit business events (business outcomes)
Type: SubmitBusinessEvent
Submit logs to server
Type:
function (metaData: LogsMetaData, logs: string, options: {type: ("diff"
| "full"
)}): Promise<UploadLogsResponse>
Whether to submit full logs or just differences
Type:
("diff"
| "full"
)
Gets a list of all recent devices associated with the user the device list gets populated from Redis
Promise<Device>
:
Gets a list of all recent devices associated with the user the device list gets populated from Redis
Promise<Device>
:
Search for a device by name
Promise<Device>
:
Caches the device info and also registers to Redis for subsequent fetches
deviceInfo
:
Retreives device info of a particular device
(string)
Promise<deviceInfo>
:
Unregisters the device from Redis, will not fetch in subsequent loads, similar to space.deleteBinding()
(string)
Promise<deviceInfo>
:
Requests to display PIN on the device
Promise<deviceInfo>
:
pairs the device with the user (manual pairing), also adds it to user's recents list for subsequent fetches. similar to space.join()
Promise<deviceInfo>
:
unpairs the device with the user (manual/ultrasonic pairing), but still keeps in the recents list/does not remove from Redis options.removeAllDevices will remove all associated devices to user similar to space.leave()
Promise<deviceInfo>
:
binds the space to the paired device (if supported) similar to space.bindConversation()
Promise<deviceInfo>
:
unbinds the space to the paired device (if supported) similar to space.unbindConversation()
Promise<deviceInfo>
:
Gets the audio state of the paired device similar to device.getAudioState()
Promise<audioState>
:
Updates audio state of the paired device, should be called every 10 minutes or when mic or volume state is changed similar to device.putAudioState()
Promise<audioState>
:
Mutes paired device similar to device.mute()
Promise<audioState>
:
Unmutes paired device similar to device.unmute()
Promise<audioState>
:
Increases paired device's volume similar to device.increaseVolume()
Promise<audioState>
:
Decreases paired device's volume similar to device.decreaseVolume()
Promise<audioState>
:
Sets paired device's volume but should use increase and decrease api instead similar to device.setVolume()
(number
= 0
)
Promise<audioState>
:
Utility function to update decrypted device name on device object
(Array
= []
)
device
:
Utility function to update decrypted device name on device object
(object
= {}
)
device
:
Utility function to update device info on mercury updates
(object)
device
:
Encryption APIs for KMS
Extends WebexPlugin
(...Array<any>)
The arguments to pass to the superclass constructor.
Downloads and decrypts a file from the given URI.
(string)
The URI of the file to be decrypted.
(FileDownloadOptions
= {}
)
The options for file download.
Name | Description |
---|---|
options.useFileService any
(default false )
|
|
options.options ...any
|
Promise<ArrayBuffer>
:
A promise that resolves to the decrypted ArrayBuffer.
```typescript
const attachmentURL = 'https:/myfileurl.xyz/zzz/fileid?keyUri=somekeyuri&JWE=somejwe';
const options: FileDownloadOptions = {
useFileService: false,
jwe: somejwe, // Provide the JWE here if not already present in the attachmentURL
keyUri: someKeyUri, // Provide the keyURI here if not already present in the attachmentURL
};
const decryptedBuf = await webex.cypher.downloadAndDecryptFile(attachmentURL, options);
const file = new File([decryptedBuf], "myFileName.jpeg", {type: 'image/jpeg'});
```
Options for downloading a file with encryption.
Indicates whether to use the file service for downloading. If true, the webex files service will be used. If false or undefined, the file will be downloaded directly from the URL.
Type: boolean
The JSON Web Encryption (JWE) string used for decrypting the file. This is a required parameter if the url does not contain the JWE.
Type: string
Object containing only the most basic information about a meeting. This is the information that is kept even after the meeting is deleted from the MeetingCollection
Type: {allowMediaInLobby: boolean, correlationId: string, environment: string, id: string, locusUrl: string, locusInfo: {url: string, fullState: {lastActive: string, sessionId: string}}, meetingInfo: any, sessionCorrelationId: string, roles: Array<string>, getCurUserType: function (): (string | null), callStateForMetrics: CallStateForMetrics}
MediaDirection
Type: Object
MediaDirection
Type: Object
SendOptions
Type: Object
(Object)
Type: any
make a browser call to get the media
(SendOptions)
(Object)
SDK Configuration for meetings plugin
Promise
:
creates a webrtc media connection with provided tracks and mediaDirection configuration
(boolean)
(string)
string useful for debugging (will appear in media connection logs)
(string)
id for the meeting using this connection
(Object)
Name | Description |
---|---|
options.mediaProperties Object?
|
contains mediaDirection and local tracks: audioTrack, videoTrack, shareVideoTrack, and shareAudioTrack |
options.remoteQualityLevel string?
|
LOW|MEDIUM|HIGH applicable only to non-multistream connections |
options.enableRtx boolean?
|
applicable only to non-multistream connections |
options.enableExtmap boolean?
|
applicable only to non-multistream connections |
options.turnServerInfo Object?
|
|
options.bundlePolicy BundlePolicy?
|
(RoapMediaConnection | MultistreamRoapMediaConnection)
:
generates share streams
(Object)
parameter
Name | Description |
---|---|
options.sendAudio Boolean
|
send audio from the display share |
options.sendShare Boolean
|
send video from the display share |
options.sharePreferences Object
|
|
options.sharePreferences.shareConstraints MediaTrackConstraints
|
constraints to apply to video |
options.sharePreferences.highFrameRate Boolean
|
if shareConstraints isn't provided, set default values based off of this boolean |
(Object
= {}
)
SDK Configuration for meetings plugin
Promise<MediaStream>
:
Toggle a specific stream noop as of now, does nothing
null
:
Stop input stream
(LocalStream)
A local stream
null
:
generates streams for audio video and share
(object)
parameter
Name | Description |
---|---|
mediaSetting.sendAudio Object
|
sendAudio: {Boolean} sendAudio constraints |
mediaSetting.sendVideo Object
|
sendVideo: {Boolean} sendVideo constraints |
mediaSetting.sendShare Object
|
sendShare: {Boolean} sendShare constraints |
mediaSetting.isSharing Object
|
isSharing: {Boolean} isSharing constraints |
(Object)
parameter
Name | Description |
---|---|
audioVideo.audio Object
|
{deviceId: {String}} |
audioVideo.video Object
|
{deviceId: {String}} |
(Object)
parameter
Name | Description |
---|---|
sharePreferences.shareConstraints Object
|
parameter |
sharePreferences.highFrameRate Boolean
|
parameter |
(Object)
SDK Config
Array
:
[localStream, shareStream]
Returns the current state of knowledge about whether we are on an ipv4-only or ipv6-only or mixed (ipv4 and ipv6) network. The return value matches the possible values of "ipver" parameter used by the backend APIs.
(Object)
webex instance
(IP_VERSION | undefined)
:
ipver value to be passed to the backend APIs or undefined if we should not pass any value to the backend
Returns options for leaving a meeting.
(any)
(any
= {}
)
any
:
leave options
Returns request options for leaving a meeting.
(any)
(any
= {}
)
any
:
request options
Adds the current locus sequence information to a request body
void
:
Updates the locus info for the meeting with the delta locus returned from requests that include the sequence information Returns the original response object
Object
:
Returns a CA-recognized error payload for the specified raw error message/reason.
New errors can be added to this function for handling in the future
(String)
the raw error message
Array<object>
:
an array of payload objects
null
:
Fetches meeting info from the server
(String)
one of many different types of destinations to look up info for
(DESTINATION_TYPE?
= null
)
to match up with the destination value
(String?
= null
)
meeting password
(Object?
= null
)
captcha code and id
(String?
= null
)
(String?
= null
)
(Object?
= {}
)
(Boolean?
= {}
)
meeting Id and whether Call Analyzer events should be sent
Promise
:
returns a meeting info object
Fetches meeting info from the server
(String)
one of many different types of destinations to look up info for
(DESTINATION_TYPE?
= null
)
to match up with the destination value
(String
= null
)
(String
= null
)
org ID of user's machine
(String
= null
)
(Object
= {}
)
(Object
= {}
)
(String
= null
)
(String
= null
)
Promise
:
returns a meeting info object
helper function to either create an adhoc space meeting or enable static meeting link
(String)
conversationUrl to start adhoc meeting on
(String)
org ID of user's machine
(Boolean
= false
)
whether or not to enable static meeting link
Promise
:
returns a meeting info object
null
:
Fetches meeting info from the server
(String)
one of many different types of destinations to look up info for
(DESTINATION_TYPE?
= null
)
to match up with the destination value
(String?
= null
)
meeting password
(Object?
= null
)
captcha code and id
(String?
= null
)
(String?
= null
)
(Object?
= {}
)
(Boolean?
= {}
)
meeting Id and whether Call Analyzer events should be sent
Promise
:
returns a meeting info object
Fetches meeting info from the server
(String)
one of many different types of destinations to look up info for
(DESTINATION_TYPE?
= null
)
to match up with the destination value
(String
= null
)
(String
= null
)
org ID of user's machine
(String
= null
)
(Object
= {}
)
(Object
= {}
)
(String
= null
)
(String
= null
)
Promise
:
returns a meeting info object
helper function to either create an adhoc space meeting or enable static meeting link
(String)
conversationUrl to start adhoc meeting on
(String)
org ID of user's machine
(Boolean
= false
)
whether or not to enable static meeting link
Promise
:
returns a meeting info object
(String)
ID of the meeting info you wish to retreive
MeetingInfo
:
returns a meeting info instance
(Object)
with format of {type: String, desintation: String}
where type is PERSONAL_ROOM, SIP_URI, CONVERSATION_URL, and destination is userId, sipUri, conversationUrl respectively
type can also be specified as an option and be of the list SIP_URI,MEETING_ID,LOCUS_ID,PERSONAL_ROOM,MEETING_LINK,ONE_ON_ONE,MEDIA_SIP_URI,CONVERSATION_URL,TEMP_SIP_URI
with the desination matching
Promise
:
returns a promise that resolves/rejects the result of the request
(Object)
with format of {type: String, desintation: String}
where type is PERSONAL_ROOM, SIP_URI, CONVERSATION_URL, and destination is userId, sipUri, conversationUrl respectively
type can also be specified as an option and be of the list SIP_URI,MEETING_ID,LOCUS_ID,PERSONAL_ROOM,MEETING_LINK,ONE_ON_ONE,MEDIA_SIP_URI,CONVERSATION_URL,TEMP_SIP_URI
with the desination matching
Promise
:
returns a promise that resolves/rejects the result of the request
Helper function to build up a correct locus url depending on the value passed
(DESTINATION_TYPE)
One of [SIP_URI, PERSONAL_ROOM, MEETING_ID, CONVERSATION_URL, LOCUS_ID, MEETING_LINK]
(Object)
?? value.value
Object
:
returns an object with {resource, method}
Helper function to build up a correct locus url depending on the value passed
(Object)
type and value to fetch meeting info
Name | Description |
---|---|
options.type DESTINATION_TYPE
|
One of [SIP_URI, PERSONAL_ROOM, MEETING_ID, CONVERSATION_URL, LOCUS_ID, MEETING_LINK] |
options.installedOrgID String
|
org ID of user's machine |
options.destination Object
|
?? value.value |
Object
:
returns an object with {resource, method}
Helper function to parse the webex site/host from a URI string.
String
:
the site/host part of the URI string (e.g. 'convergedats.webex.com')
Helper function to build up a correct locus url depending on the value passed
(DESTINATION_TYPE)
One of [SIP_URI, PERSONAL_ROOM, MEETING_ID, CONVERSATION_URL, LOCUS_ID, MEETING_LINK]
(Object)
?? value.value
Object
:
returns an object with {resource, method}
Helper function to build up a correct locus url depending on the value passed
(Object)
type and value to fetch meeting info
Name | Description |
---|---|
options.type DESTINATION_TYPE
|
One of [SIP_URI, PERSONAL_ROOM, MEETING_ID, CONVERSATION_URL, LOCUS_ID, MEETING_LINK] |
options.installedOrgID String
|
org ID of user's machine |
options.destination Object
|
?? value.value |
Object
:
returns an object with {resource, method}
Helper function to parse the webex site/host from a URI string.
String
:
the site/host part of the URI string (e.g. 'convergedats.webex.com')
(Object)
with format of {userId, passcode, meetingAddress, preferred}
Promise
:
returns a promise that resolves/rejects the result of the request
This method is called when we don't succeed in reaching the minimum number of clusters required by Orpheus. It sends the results to Orpheus and gets a new list that it tries to reach again.
Promise<ReachabilityResults>
:
reachability results
Stops all reachability checks that are in progress
void
:
Reachability results as an object in the format that backend expects
any
:
reachability results that need to be sent to the backend
Returns true only if ALL protocols (UDP, TCP and TLS) have been tested and none of the media clusters where reachable with any of the protocols. This is done irrespective of the config, so for example: if config.meetings.experimental.enableTlsReachability === false, it will return false, because TLS reachability won't be tested, so we can't say for sure that media backend is unreachable over TLS.
boolean
:
Returns the clientMediaPreferences object that needs to be sent to the backend when joining a meeting
(boolean)
(IP_VERSION)
Object
:
Returns the reachability report that needs to be attached to the ROAP messages that we send to the backend. It may return undefined, if reachability is not needed to be attached to ROAP messages (that's the case for v1 or Orpheus API)
Promise<ReachabilityReportV0>
:
object that needs to be attached to Roap messages
Gets the cluster information
(string)
that's passed to Orpheus
(IP_VERSION)
information about current ip network we're on
(Object)
last reachability result
Promise
:
A class that handles reachability checks for a single cluster. It emits events from Events enum
Extends EventsScope
(string)
cluster name
(ClusterNode)
information about the media cluster
ClusterReachabilityResult
:
reachability result for this cluster
Aborts the cluster reachability checks by closing the peer connection
void
:
Converts a stun url to a turn url
(string)
url of a stun server
(("tcp"
| "udp"
))
what protocol to use for the turn server
string
:
url of a turn server
Converts a stun url to a turns url
(string)
url of a stun server
string
:
url of a turns server
Make a network request to join a meeting
(Object)
Name | Description |
---|---|
options.sipUri String
|
|
options.deviceUrl String
|
|
options.locusUrl String
|
|
options.resourceId String
|
, |
options.correlationId String
|
|
options.ensureConversation boolean
|
|
options.moderator boolean
|
|
options.pin boolean
|
|
options.moveToResource boolean
|
|
options.roapMessage Object
|
|
options.breakoutsSupported boolean
|
|
options.locale String
|
, |
options.deviceCapabilities Array
|
|
options.liveAnnotationSupported boolean
|
|
options.alias String
|
Promise
:
Sends a requests to get the latest locus DTO, it might be a full Locus or a delta, depending on the url provided
Promise
:
Prepares request options to to leave a meeting
Object
:
request options
change the content floor grant
(Object)
options for floor grant
Name | Description |
---|---|
options.disposition String
|
floor action (granted/released) |
options.personUrl String
|
personUrl who is requesting floor |
options.deviceUrl String
|
Url of a device |
options.resourceId String
|
Populated if you are paired to a device |
options.uri String
|
floor grant uri |
options.shareInstanceId String
|
id for current share |
Promise
:
Sends a request to the controls endpoint to set the video layout
(Object)
Name | Description |
---|---|
options.locusUrl String
|
|
options.deviceUrl String
|
|
options.layoutType String
|
a layout type that should be available in meeting constants #layout_types |
options.main Object
|
preferred dimensions for the remote main video stream |
options.main.width Number
|
preferred width of main video stream |
options.main.height Number
|
preferred height of main video stream |
options.content Object
|
preferred dimensions for the remote content share stream |
options.content.width Number
|
preferred width of content share stream |
options.content.height Number
|
preferred height of content share stream |
Promise
:
Sends a request to set post meeting data consent.
(Object)
The options for post meeting data consent request.
Name | Description |
---|---|
options.locusUrl string
|
The URL of the locus. |
options.deviceUrl string
|
The URL of the device. |
options.selfId string
|
The ID of the participant. |
options.consent boolean
|
Whether accepted or declined. |
options.postMeetingDataConsent any
|
Promise
:
Make a network request to join a meeting
(Object)
Name | Description |
---|---|
options.sipUri String
|
|
options.deviceUrl String
|
|
options.locusUrl String
|
|
options.resourceId String
|
, |
options.correlationId String
|
|
options.ensureConversation boolean
|
|
options.moderator boolean
|
|
options.pin boolean
|
|
options.moveToResource boolean
|
|
options.roapMessage Object
|
|
options.breakoutsSupported boolean
|
|
options.locale String
|
, |
options.deviceCapabilities Array
|
|
options.liveAnnotationSupported boolean
|
|
options.alias String
|
Promise
:
Sends a requests to get the latest locus DTO, it might be a full Locus or a delta, depending on the url provided
Promise
:
Prepares request options to to leave a meeting
Object
:
request options
change the content floor grant
(Object)
options for floor grant
Name | Description |
---|---|
options.disposition String
|
floor action (granted/released) |
options.personUrl String
|
personUrl who is requesting floor |
options.deviceUrl String
|
Url of a device |
options.resourceId String
|
Populated if you are paired to a device |
options.uri String
|
floor grant uri |
options.shareInstanceId String
|
id for current share |
Promise
:
Sends a request to the controls endpoint to set the video layout
(Object)
Name | Description |
---|---|
options.locusUrl String
|
|
options.deviceUrl String
|
|
options.layoutType String
|
a layout type that should be available in meeting constants #layout_types |
options.main Object
|
preferred dimensions for the remote main video stream |
options.main.width Number
|
preferred width of main video stream |
options.main.height Number
|
preferred height of main video stream |
options.content Object
|
preferred dimensions for the remote content share stream |
options.content.width Number
|
preferred width of content share stream |
options.content.height Number
|
preferred height of content share stream |
Promise
:
Sends a request to set post meeting data consent.
(Object)
The options for post meeting data consent request.
Name | Description |
---|---|
options.locusUrl string
|
The URL of the locus. |
options.deviceUrl string
|
The URL of the device. |
options.selfId string
|
The ID of the participant. |
options.consent boolean
|
Whether accepted or declined. |
options.postMeetingDataConsent any
|
Promise
:
Meetings Media Codec Missing Event Emitted when H.264 codec is not found in the browser.
Meetings Media Codec Loaded Event Emitted when H.264 codec has been loaded in the browser.
get device from locus data
Object
:
get self device joined status from locus data
(Object)
current meeting data
(Object)
new locus data
(String)
current device url
Object
:
Extended Error object for general parameter errors
Extends Error
Error occurred while join the meeting
Extends Error
Extends Interceptor
Extended Error object to signify captcha related errors
Extends Error
Extended Error object to signify the intent to join for unclaimed PMR scenarios
Extends Error
Extended Error object to signify password related errors
Extends Error
Extended Error object for general parameter errors
Extends Error
Error occurred while join the webinar
Extends Error
Extended Error object for reclaim host role empty or wrong key
Extends Error
Extended Error object for reclaim host role not supported
Extends Error
Extended Error object for reclaim host role not allowed for other participants
Extends Error
Extended Error object for reclaim host role when user is host already
Extends Error
SharePreferences
Type: Object
JoinOptions
Type: Object
Recording
Type: Object
The meeting instance to execute all state changes on
Specify joining via audio (option: pstn), video, screenshare
(JoinOptions
= {}
)
A configurable options object for joining a meeting
Promise
:
the join response
Roap options
Type: Object
Type: Object
Handles the process of finding out TURN server information from Linus. This is achieved by sending a TURN_DISCOVERY_REQUEST.
(RoapRequest)
Generates TURN_DISCOVERY_REQUEST roap message. When this method returns a roapMessage, it means that a TURN discovery process has started. It needs be ended by calling handleTurnDiscoveryHttpResponse() once you get a response from the backend. If you don't get any response or want to abort, you need to call abort().
Object
:
Aborts current TURN discovery. This method needs to be called if you called generateTurnDiscoveryRequestMessage(), but then never got any response from the server.
void
:
Retrieves TURN server information from the backend by doing a roap message exchange: client server | -----TURN_DISCOVERY_REQUEST-----> | | <----TURN_DISCOVERY_RESPONSE----- | | --------------OK----------------> |
This TURN discovery roap exchange is always done with seq=0. The RoapMediaConnection SDP exchange always starts with seq=1, so it works fine no matter if TURN discovery is done or not.
(Meeting)
(Boolean?)
should be set to true if this is a new
media connection just after a reconnection
(Boolean?)
Promise
:
Sets the remote audio stream
(RemoteStream)
RemoteStream to save
void
:
Sets the remote video stream
(RemoteStream)
RemoteStream to save
void
:
Removes both remote audio and video from class instance
void
:
Unsets all remote streams
void
:
On connection state change.
void
:
Listener for peer connection state change.
void
:
Listener for ICE connection state change.
void
:
Listener for ICE gathering state change.
void
:
Function called when the timeout is reached.
void
:
Initializes the StateMachine for the meeting
(Meeting)
A reference to a meeting instance
StateMachine
:
String
:
Ring stop transition, to end the ring event for the meeting, and transition the state to ANSWERED OR DECLINED, only for outgoing meetings
(Object)
-- FiniteStateMachine automatically passed, not used
(Object)
-- {remoteAnswered: {Boolean}, remoteDeclined: {Boolean}}
Boolean
:
Ring transition, to cause the ring event for the meeting, and transition the state to RINGING, for both incoming, and outgoing meetings
(Object)
-- FiniteStateMachine automatically passed, not used
(String)
-- incoming call === INCOMING / or other meetings have a ring type of JOIN
Boolean
:
handle the entry to error state
Boolean
:
After ANY transition occurs, we want to know what state the meeting moved to for debugging
(Object)
Boolean
:
The purpose of this class is to manage the local and remote mute state and make sure that the server state always matches the last requested state by the client.
More info about Locus muting API: https://sqbu-github.cisco.com/pages/WebExSquared/locus/guides/mute.html#
This class is exported only for unit tests. It should never be instantiated directly with new MuteState(), instead createMuteState() should be called
(String)
audio or video
(Object)
the meeting object (used for reading current remote mute status)
(boolean)
whether the client audio/video is enabled at all
Applies the current mute state to the local stream (by enabling or disabling it accordingly)
(Object?)
the meeting object
(ServerMuteReason)
reason why we're applying our client state to the local stream
void
:
This method should be called whenever the server remote mute state is changed
(Meeting)
(Boolean?)
true if user is remotely muted, false otherwise
(Boolean?)
indicates if user is allowed to unmute self (false when "hard mute" feature is used)
undefined
:
This method needs to be called whenever the local audio/video stream has changed. It reapplies the remote mute state onto the new stream and also reads the current local mute state from the stream and updates the internal state machine and sends any required requests to the server.
(Object)
the meeting object
void
:
Stores the delta values for a changed participant.
Type: Object
handles when the locus.host is updated
(Object)
the locus.host property
undefined
:
handles when the locus.mediaShares is updated
(Object)
the locus.mediaShares property
(boolean
= false
)
force to update the mediaShares
undefined
:
handles when the locus.self is updated
(Object)
the new locus.self
undefined
:
parses the relevant values for self: muted, guest, moderator, mediaStatus, state, joinedWith, pstnDevices, creator, id
undefined
:
Checks if user has joined the meeting
(Object)
boolean
:
isJoined
Validate if the Meeting Layout Controls Layout has changed.
boolean
:
If the Meeting Layout Controls Layout has changed.
get the id from the self object
(Object)
String
:
get the "remote video mute" property from the self object
(Object)
Boolean
:
get the "remote mute" property from the self object
(Object)
Boolean
:
Boolean
:
(any)
device that user has joined with
(any)
device that user is paired with
(Boolean | undefined)
:
true if user is in lobby, false if not, undefined if it cannot be determined
(any)
device that user has joined with
(any)
device that user is paired with
Boolean
:
Boolean
:
true if user has just been placed in the lobby
determine whether the roles of self is changed or not
Boolean
:
Boolean
:
Boolean
:
true if the user has just been admitted from lobby into the meeting
extract the sipUrl from the partner
Object
:
parse the relevant host values that we care about: id
(Object)
Object
:
parsed host or null if host was undefined
get the previous and current host values parsed, as well as the boolean updates
Object
:
previous: {Object} old host, current: {Object} new host, updates: {isNewHost: {boolean}} boolean update values
determine by id if 2 hosts are different
Boolean
:
Extract the id from the host object
(Object)
String
:
Controls
Type: Object
parse the relevant host values that we care about: id
(LocusControls)
Object
:
parsedObject - parsed host or null if host was undefined
String
:
parsedObject.recordingId
parses and returns previous state vs current state and triggers the changes.
(LocusControls)
previous state
(LocusControls)
current state
Object
:
combination of state plus the changes
Extract the id from the record controls object
(LocusControls)
(String | null)
:
check whether to replace the meeting's members or not. For case joined breakout session, need replace meeting's members
(LocusControls)
(LocusControls)
Boolean
:
determine the switch status between breakout session and main session.
(LocusInfo)
(LocusInfo)
Object
:
Parse the relevant values that we care about
(Object)
raw embedded app object
Object
:
parsedObject - parsed embedded app object
Determines if two embedded apps arrays are similar. NOTE: This is a simple test for performance reasons.
boolean
:
true if the arrays are different
Parse the array of embedded apps
(array)
array
:
result - new array of parsed embedded app objects
parses the relevant values for mediaShares: contentId, disposition
(Object)
undefined
:
get the previous and current mediaShares values parsed, as well as the boolean updates
Object
:
previous: {Object} old share, current: {Object} new share,
get the content floor disposition (released, granted)
(Object)
Boolean
:
disposition
get the whiteboard floor disposition (released, granted)
(Object)
Boolean
:
disposition
extract the content property from media shares
(Object)
Object
:
extract the whiteboard property from media shares
(Object)
Object
:
extract the media stream floor property from content object
(Object)
Object
:
extract the content's floor from media shares
(Object)
Object
:
extract the whiteboard's floor from media shares
(Object)
Object
:
get who is sharing from media shares (content)
(Object)
Object
:
get live annotation is sharing from media shares (content)
(Object)
Object
:
get live resourceType is sharing from media shares (content)
(Object)
Object
:
get url is sharing from media shares (content)
(Object)
Object
:
get shareInstanceId is sharing from media shares (content)
(Object)
Object
:
get deviceUrl that is requesting the floor for media shares (content)
(Object)
Object
:
get who is sharing from media shares (whiteboard)
(Object)
Object
:
get the which whiteboard is being shared via resource url
(Object)
Object
:
Compares two loci to determine which one contains the most recent state
(Types~Locus)
(Types~Locus)
string
:
loci comparison state
Type: object
Simple queue in which the elements are always sorted
(Function)
comparison function used for sorting the elements of the queue
Used to indicate that the reconnect logic needs to be retried.
Extends Error
Used to indicate that the meeting needs to be rejoined, not just media reconnected
Extends Error
void
:
Initiates a media reconnect for the active meeting
(Object
= {}
)
Name | Description |
---|---|
reconnectOptions.networkDisconnect boolean
(default false )
|
indicates if a network disconnect event happened |
reconnectOptions.networkRetry boolean
(default false )
|
indicates if we are retrying the reconnect |
(Function?
= undefined
)
callback that gets called when reconnection is started successfully
Promise
:
Error object for cases when new reconnection cannot be started
Extends ReconnectionError
Extended Error object to signify the intent to join for unclaimed PMR scenarios
Extends Error
Members Update Event Emitted when something in the roster list needs to be updated
Members Content Update Event Emitted when who is sharing changes
Members Host Update Event Emitted when who is the host changes
Members Self Update Event Emitted when who is the self changes
Sends a request to raise or lower a member's hand
Promise
:
Object
:
the format object
Object
:
the format object
(Object)
with {invitee: {emailAddress, email, phoneNumber}, alertIfActive}
Object
:
with {invitees: [{address}], alertIfActive}
(Object)
with {memberIds, authorizingLocusUrl}
Object
:
admit with {memberIds}
(Object)
with {memberIds, locusUrl, sessionLocusUrls}
Object
:
the request parameters (method, uri, body) needed to make a admitMember request
if a host/cohost is in a breakout session, the locus url should be the main session locus url
(Object)
with {invitee {emailAddress, email, phoneNumber}, locusUrl, alertIfActive}
Object
:
the request parameters (method, uri, body) needed to make a addMember request
RoleAssignmentOptions
:
(String)
id of the participant who is receiving request
(String)
id of the participant who is sending request (optional)
(String)
alias name
(String)
url
Object
:
consists of {memberID: string, requestingParticipantId: string, alias: string, locusUrl: string}
(ServerRoleShape)
ServerRoleShape
:
the role shape to be added to the body
(RoleAssignmentOptions)
RoleAssignmentRequest
:
the request parameters (method, uri, body) needed to make a addMember request
(Object)
with format of {locusUrl: string, requestingParticipantId: string}
Object
:
request parameters (method, uri, body) needed to make a editDisplayName request
The Controls Options Manager utilities
Validate if disabling mute on entry can be set.
boolean
:
True if the action is allowed.
Validate an array of hints are allowed based on a full collection of hints.
boolean
:
True if all of the actions are allowed.
Validate that the self policy object contains the required policies.
boolean
:
True if all of the actions are allowed.
Validate if an audio-scoped control is allowed to be sent to the service.
(ControlConfig<AudioProperties>)
Audio control config to validate.
boolean
:
True if all of the actions are allowed.
Validate if an reactions-scoped control is allowed to be sent to the service.
(ControlConfig<ReactionsProperties>)
Reaction control config to validate.
boolean
:
True if all of the actions are allowed.
Validate if an share-control-scoped control is allowed to be sent to the service.
boolean
:
True if all of the actions are allowed.
Validate if an view-the-participants-list-scoped control is allowed to be sent to the service.
(ControlConfig<ViewTheParticipantListProperties>)
View Participants List control config to validate.
boolean
:
True if all of the actions are allowed.
Validate if a video-scoped control is allowed to be sent to the service.
(ControlConfig<VideoProperties>)
Video control config to validate.
boolean
:
True if all of the actions are allowed.
Validate if a annotation-scoped control is allowed to be sent to the service.
(ControlConfig<AnnotationProperties>)
Annotation control config to validate
boolean
:
True if all of the actions are allowed.
Validate if a rdc-scoped control is allowed to be sent to the service.
(ControlConfig<RemoteDesktopControlProperties>)
Remote Desktop Control config to validate
boolean
:
True if all of the actions are allowed.
A list of additional properties that apply to various specific settings.
The scope of the control within this object.
Type: Control
The properties to assign to this control.
Type: Props
Manages all receive slots used by a meeting. WMCE receive slots cannot be ever deleted, so this manager has a pool in order to re-use the slots that were released earlier.
(CreateSlotCallback)
(FindMemberIdCallback)
(Meeting)
Creates a new receive slot or returns one from the existing pool of free slots
(MediaType)
Promise<ReceiveSlot>
:
Releases the slot back to the pool so it can be re-used by others in the future
(ReceiveSlot)
Resets the slot manager - this method should be called when the media connection is torn down
Tries to find the member id on all allocated receive slots This function should be called when new members are added to the meeting.
Find a receive slot by a ssrc.
(number)
The ssrc of the receive slot to find.
(ReceiveSlot | undefined)
:
The receive slot with this ssrc, undefined if not found.
This method is used to create a sendSlot for the given mediaType and returns the created sendSlot
(MultistreamRoapMediaConnection)
MultistreamRoapMediaConnection for which a sendSlot needs to be created
(MediaType)
MediaType for which a sendSlot needs to be created (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
(boolean
= true
)
This is optional boolean to set the active state of the sendSlot. Default is true
SendSlot
:
slot The created sendSlot
This method is used to retrieve the sendSlot for the given mediaType
(MediaType)
of which the slot needs to be retrieved
SendSlot
:
Allow users to specify 'namedMediaGroups' to indicate which named media group its audio should be sent to.
(MediaType)
MediaType of the sendSlot to which the audio stream needs to be send to the media group
([])
Allow users to specify 'namedMediaGroups'.If the value of 'namedMediaGroups' is zero,
named media group will be canceled and the audio stream will be sent to the floor.
void
:
Sets the source state override for the given media type.
(MediaType)
The type of media (must be MediaType.VideoMain to apply source state changes).
((StreamState | null))
The state to set or null to clear the override value.
void
:
This method publishes the given stream to the sendSlot for the given mediaType
(MediaType)
MediaType of the sendSlot to which a stream needs to be published (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
(LocalStream)
LocalStream to be published
Promise<void>
:
This method unpublishes the stream from the sendSlot of the given mediaType
(MediaType)
MediaType of the sendSlot from which a stream needs to be unpublished (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
Promise<void>
:
This method is used to set the active state of the sendSlot for the given mediaType
(MediaType)
The MediaType of the sendSlot for which the active state needs to be set (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
(boolean
= true
)
The boolean to set the active state of the sendSlot. Default is true
void
:
This method is used to set the codec parameters for the sendSlot of the given mediaType
(MediaType)
MediaType of the sendSlot for which the codec parameters needs to be set (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
(Object)
Promise<void>
:
This method is used to delete the codec parameters for the sendSlot of the given mediaType
(MediaType)
MediaType of the sendSlot for which the codec parameters needs to be deleted (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
Promise<void>
:
This method is used to reset the SendSlotsManager by deleting all the sendSlots
undefined
:
Default configuration:
Type: Configuration
A helper class that manages all remote audio/video streams in order to achieve a predefined set of layouts. It also creates a fixed number of audio streams and these don't change during the meeting.
Things that RemoteMediaManager does:
Extends EventsScope
(ReceiveSlotManager)
({audio: MediaRequestManager, video: mediaRequestManagers})
(Configuration
= DefaultConfiguration
)
Configuration describing what video layouts to use during the meeting
Releases all the used resources (like allocated receive slots). This function needs to be called when we leave the meeting, etc.
Returns the currently selected layout id
LayoutId
:
Sets CSIs for multiple RemoteMedia instances belonging to RemoteMediaGroup. For each entry in the remoteMediaCsis array:
(Array<{remoteMedia: RemoteMedia, csi: number?}>)
Logs all current receive slots
Set multiple remote video CSIs at once
(Array<{remoteMedia: RemoteMedia, csi: (CSI | null)?}>)
The remote medias and CSIs to set them to
void
:
Sets a new CSI on a given remote media object
(RemoteMedia)
remote Media object to modify
(CSI)
new CSI value, can be null if we want to stop receiving media
Adds a new member video pane to the currently selected layout.
Changes to the layout are lost after a layout change.
(MemberVideoPane)
Promise<RemoteMedia>
:
Pins an active speaker remote media object to the given CSI value. From that moment onwards the remote media will only play audio/video from that specific CSI until unpinActiveSpeakerVideoPane() is called or current layout is changed.
(RemoteMedia)
remote media object reference
(CSI)
CSI value to pin to, if undefined, then current CSI value is used
void
Unpins a remote media object from the fixed CSI value it was pinned to.
(RemoteMedia)
remote media object reference
Returns true if a given remote media object belongs to an active speaker group and has been pinned. Throws an error if the remote media object doesn't belong to any active speaker remote media group.
(RemoteMedia)
remote media object
boolean
:
Gets the array of remote media elements from the group
(string
= 'all'
)
'all' (default) returns both pinned and unpinned
Array<RemoteMedia>
:
Sets CSIs for multiple RemoteMedia instances belonging to this RemoteMediaGroup. For each entry in the remoteMediaCsis array:
(Array<{remoteMedia: RemoteMedia, csi: number?}>)
(any
= true
)
void
Pins a specific remote media instance to a specfic CSI, so the media will no longer come from active speaker, but from that CSI. If no CSI is given, the current CSI value is used.
(RemoteMedia)
(CSI?)
void
Unpins a remote media instance, so that it will again provide media from active speakers
(RemoteMedia)
setPreferLiveVideo - sets preferLiveVideo to true/false
setNamedMediaGroup - sets named media group type and value
(NamedMediaGroup)
(boolean)
Invalidates the remote media group by clearing the references to the receive slots used by all remote media from that group and cancelling all media requests. After this call the remote media group is unusable.
(boolean
= true
)
whether to commit the cancellation of media requests
Checks if a given RemoteMedia instance belongs to this group.
(RemoteMedia)
RemoteMedia instance to check
(("all"
| "pinned"
| "unpinned"
)
= 'all'
)
controls which remote media from the group to check
boolean
:
true if remote media is found
Returns true if the user is in the main session
boolean
:
Returns true if the breakout status is active
boolean
:
Returns the active group id
boolean
:
Returns the breakout status
boolean
:
Returns should query preAssignments or not
boolean
:
initialize for the breakouts
void
:
Calls this to clean up listeners
void
:
The initial roster lists need to be queried because you don't get a breakout.roster event when you join the meeting
void
:
Sets up listener for currentBreakoutSession sessionType changed
void
:
Sets up listener for broadcast messages sent to the breakout session
void
:
Sets up a listener for roster messags from mecury
void
:
Sets up a listener for ask help notify from mecury
void
:
clear breakouts collection
void
:
enable and edit lock breakout
void
:
send breakout edit lock
void
:
keep edit lock alive
void
:
unlock edit breakout
void
:
query preAssignments
void
:
Move participants to main session lobby
void
:
If the breakout has no name, assume it is the main session
boolean
:
initializer for the Breakout class
void
:
inits the members object
void
:
Broadcast message to all breakout session's participants
Name | Description |
---|---|
$0.url any
|
|
$0.message any
|
|
$0.options any
|
|
$0.groupId any
|
|
$0.sessionId any
|
(String)
(String)
(Object)
(string)
(string)
Promise
:
Deals with all kinds of errors of breakout service
(object)
// one of the breakout service error
(string)
// position of the error occur
object
:
boolean
:
Extended Error object to signify breakout related errors
Extends Error
Returns should query support languages or not
boolean
:
initialize for interpretation
void
:
Calls this to clean up listeners
void
:
Update whether the meeting support SI feature or not from meeting info
void
:
Sets up a listener for handoff requests from mercury
void
:
Annotation to handle LLM and Mercury message and locus API
Extends WebexPlugin
(...any)
Sends stroke data to presenter
(StrokeData)
void
:
(String)
Member
:
IInMeetingActions Type for In-Meeting Actions
(Partial<IInMeetingActions>)
(Object)
void
:
(string)
void
:
(Array)
void
:
(Object)
void
:
(string)
void
:
(string)
void
:
string
:
string
:
string
:
string
:
Array
:
Promise
:
Promise
:
Promise
:
Promise
:
docs https://sqbu-github.cisco.com/pages/WebExSquared/locus/guides/mute.html https://confluence-eng-gpk2.cisco.com/conf/display/LOCUS/Hard+Mute+and+Audio+Privacy#HardMuteandAudioPrivacy-SelfMuteonEntry https://confluence-eng-gpk2.cisco.com/conf/pages/viewpage.action?spaceKey=UC&title=WEBEX-124454%3A+UCF%3A+Hard+mute+support+for+Teams+joining+Webex+meeting https://jira-eng-gpk2.cisco.com/jira/browse/SPARK-180867 https://jira-eng-gpk2.cisco.com/jira/browse/SPARK-393351
(MeetingRequest)
Class representing a single /media request being sent to Locus
(Request)
(Defer)
Returns the list of pending promises associated with this request
Returns true if the request is triggering confluence creation in the server
(Request)
boolean
This class manages all /media API requests to Locus. Every call to that Locus API has to go through this class.
Extends WebexPlugin
(Config)
(any)
Returns true if a confluence on the server is already created
This method needs to be called when we downgrade from multistream to transcoded connection.
Current overall connection state
Type: ConnectionState
Is this member associated to another user by way of pairing (typical of devices)
Type: String
Type: IExternalRoles
Type: IMediaStatus
{audio: MediaStatus.RECVONLY, video: MediaStatus.SENDRECV}
(Object)
The locus participant object.
Boolean
:
(Object)
The locus participant object.
[ServerRoleShape]
:
Checks if the participant has the brb status enabled.
(ParticipantWithBrb)
The locus participant object.
boolean
:
True if the participant has brb enabled, false otherwise.
(Object)
The locus participant object.
(ServerRoles)
the search role
Boolean
:
(Object)
The locus participant object.
Boolean
:
(Object)
The locus participant object.
Boolean
:
(Object)
The locus participant object.
Boolean
:
(Object)
The locus participant object.
IExternalRoles
:
(Object)
The locus participant object.
Boolean
:
(Object)
The locus participant object.
Boolean
:
(Object)
The locus participant object.
Boolean
:
checks to see if the participant id is the same as the passed id there are multiple ids that can be used
Boolean
:
checks to see if the participant id is the same as the passed id for associated devices there are multiple ids that can be used
Boolean
:
Boolean
:
(Object)
The locus participant object.
Boolean
:
(Object)
The locus participant object.
Boolean
:
(Object)
The locus participant object.
Boolean
:
(Object)
The locus participant object.
Boolean
:
(Object)
The locus participant object.
Boolean
:
(Object)
The locus participant object.
Boolean
:
utility method for audio/video muted status
(Boolean | undefined)
:
utility method for getting the recording member for later comparison
(Object)
(String | null)
:
(Object)
The locus participant object.
Boolean
:
(Object)
The locus participant object.
String
:
(Object)
The locus participant object.
String
:
extracts the media status from nested participant object
(Object)
The locus participant object.
Object
:
(Object)
The locus participant object.
String
:
The purpose of this class is to manage the local and remote brb state and make sure that the server state always matches the last requested state by the client.
(Meeting)
the meeting object
(boolean)
whether the client audio/video is enabled at all
Error thrown when we try to do multistream, but fail. This error is not exported outside of plugin-meetings, because it's handled internally.
Extends Error
This is the type that matches what backend expects us to send to them. It is a bit weird, because it uses strings instead of booleans and numbers, but that's what they require.
Type:
{reachable: ("true"
| "false"
)?, latencyInMilliseconds: string?, clientMediaIPs: Array<string>?, untested: "true"
?}
Extended Error object for general parameter errors
Extends Error
Extends WebexMeetingsError
Extends WebexMeetingsError
Extends WebexMeetingsError
Extends WebexMeetingsError
Extends WebexMeetingsError
(number)
: 30105
(string)
: Using the space ID as a destination is no longer supported. Please refer to the
migration guide
to migrate to use the meeting ID or SIP address.'
Extends WebexMeetingsError
Extends WebexMeetingsError
Extends Error
(number)
Error code
(...Array<any>)
(string?)
Error message
(string?)
Name of the script file where error was generated
(number?)
Line number of the script file where error was generated
(number)
: Error code
Extended Error object to signify a join meeting error
Extends Error
@description Layout type for remote video participants. Allowed values are: Single, Equal, ActivePresence, Prominent, OnePlusN
Type: array
the values for IP_VERSION are fixed and defined in Orpheus API
Type for an StrokeData Object
Type: {deviceId: string, toUserId: string, requesterId: string, content: string, shareInstanceId: string, encryptionKeyUrl: string, version: string}
Type for an annotation Object include annotation version and privilege
Type: {version: string, policy: ANNOTATION_POLICY}
(string)
(ANNOTATION_POLICY)
403021 - Meeting registration is required 403022 - Meeting registration is still pending 403024 - Meeting registration have been rejected 403137 - Registration ID verified failure 423007 - Registration ID input too many time,please input captcha code 403026 - Need to join meeting via webcast 403037 - Meeting join required registration ID 403137 - Registration ID verified failure
Error to indicate that wbxappapi requires a password
Extends Error
Error generating a adhoc space meeting
Extends Error
Error preventing join because of a meeting policy
Extends Error
Error to indicate that preferred webex site not present to start adhoc meeting
Extends Error
Error preventing join because of a webinar have some error
Extends Error
Error preventing join because of a forbidden error
Extends Error
Error fetching static link for a conversation when it does not exist
Extends Error
Error enabling/disabling static meeting link
Extends Error
Error enabling/disabling static meeting link
Extends Error
Raises a MeetingInfoV2PolicyError for policy error codes
(any)
the error from the request
void
:
Raises a handleJoinWebinarError for join webinar error codes
(any)
the error from the request
void
:
Raises a handleForbiddenError for join meeting forbidden error
(any)
the error from the request
void
:
Metrics handles all the call metrics events
Uploads given metric to the Metrics service as an Behavioral metric. Metadata about the environment such as browser, OS, SDK and their versions are automatically added when the metric is sent.
The Metrics service will send an Behavioral metric to InfluxDB for aggregation. See https://confluence-eng-gpk2.cisco.com/conf/display/WBXT/Getting+started+with+Metrics+Service.
(string)
Name of the metric (measurement) to send
(Object
= {}
)
Key-valye pairs of data or values about this metric
(Object
= {}
)
Key-value pairs of metric metadata
void
:
Flattens an object into one that has no nested properties. Each level of nesting is represented by "_" in the flattened object property names. This function is needed, because Amplitude doesn't allow passing nested objects as metricFields. Use this function for metricFields before calling sendBehavioralMetric() if you want to send nested objects in your metrics.
If the function is called with a literal, it returns an object with a single property "value" and the literal value in it.
(any
= {}
)
object you want to flatten
(string
= ''
)
string prefix prepended to any property names in flatten object
Object
:
Converts pane size into h264 maxFs
(PaneSize)
number
:
Class representing a remote audio/video stream.
Internally it is associated with a specific receive slot and a media request for it.
Extends EventsScope
Supply the width and height of the video element to restrict the requested resolution to this size
(any)
width of the video element
(any)
height of the video element
Sends a new media request. This method can only be used for receiver-selected policy, because only in that policy we have a 1-1 relationship between RemoteMedia and MediaRequest and the request id is then stored in this RemoteMedia instance. For active-speaker policy, the same request is shared among many RemoteMedia instances, so it's managed through RemoteMediaGroup
(CSI)
(boolean)
Getter for mediaType
Type: MediaType
MediaType
Getter for memberId
Getter for csi
Getter for source state
Type: StreamState
StreamState
Getter for remote media stream
ReceiveSlot
:
Events plugin-meetings local Used to emit events internally between modules specific to an object
Extends ChildEmitter
Returns true if two stream requests are the same, false otherwise.
(StreamRequest)
Stream request A for comparison.
(StreamRequest)
Stream request B for comparison.
boolean
:
Whether they are equal.
Clears the previous stream requests.
void
:
Class representing a receive slot. A single receive slot is able to receive a single track for example some participant's main video or audio
Extends EventsScope
(MediaType)
(ReceiveSlot)
(FindMemberIdCallback)
callback for finding memberId for given CSI
Getter for memberId
Getter for csi
Set the max frame size for this slot
(any)
frame size
Getter for sourceState
Tries to find the member id for this receive slot if it hasn't got one
The MediaStream object associated with this slot.
Type: MediaStream
MediaStream
:
The MediaStreamTrack.
The underlying WCME receive slot
Type: WcmeReceiveSlot
WcmeReceiveSlot
Type: IPresence
Extends WebexPlugin
Gets the current presence status of a given person id
(string)
Promise<PresenceStatusObject>
:
resolves with status object of person
Gets the current presence statuses of an array of people ids
(Array)
Promise<PresenceStatusesObject>
:
resolves with an object with key of
statusList
array
The status object
Type: Object
(string)
: : Public resource identifier for presence
(string)
: : User ID for the user the returned composed presence represents
(string)
: : Current composed presence state
(string)
: : DateTime in RFC3339 format that the current status began
(string)
: : DateTime in RFC3339 format that the service last saw activity from the user.
(string)
: : DEPRECATED - DateTime in RFC3339 format that represents when the current
status will expire. Will not exist if expiresTTL is -1.
(Number)
: : TTL in seconds until the status will expire. If TTL is -1 the current
status has no known expiration.
(string)
: : DateTime in RFC3339 format that the current status will expire. Missing
field means no known expiration.
(Object)
: : Used for packet ordering and tracking.
(Boolean)
: : Indicates if notification suppression is recommended for this status.
(string)
: : Resource Identifier of the last device to post presence activity for
this user.
Type: Object
(Array<PresenceStatusObject>)
Presence Worker Manages fetches and subscriptions for presence
Helper method to build a roomInfo object from a conversation object
(Object)
sdk object
(Conversation~ConversationObject)
Promise<RoomInfoObject>
:
Helper method to build a list of roomInfo object from conversation list
(Object)
sdk object
(Conversation~ConversationObjectList)
Promise<RoomInfoList>
: