new Queue()
Implements ININ.Addins.IC.ISubscription
Represents a subscription to a queue and its interactions.
Example
var queue = new ININ.Addins.IC.Queues.Queue();
queue.on("interactionAdded", function(addedInteraction) {
console.log("The ", addedInteraction.getAttribute(ININ.Addins.IC.Interactions.attributeNames.interactionType),
"interaction with ID", addedInteraction.interactionId, "was added to the queue.");
});
queue.on("interactionChanged", function(changedInteraction) {
console.log("The interaction with ID", changedInteraction.interactionId, "was changed.");
});
queue.on("interactionRemoved", function(removedEvent) {
console.log("The interaction with ID", removedEvent.interactionId, "was removed.");
});
queue.subscribe({
queueIds: [{
type: ININ.Addins.IC.Queues.queueTypes.system,
name: ININ.Addins.IC.sessionInfo.userId
}],
attributeNames: [
"CUSTOM_ATTRIBUTE",
ININ.Addins.IC.Interactions.attributeNames.interactionType
]
});
Members
interactions :ININ.Addins.IC.Interactions.IReadOnlyInteractionCollection
The interactions that belong to the queue.
Methods
subscribe(request) :IPromise
Implements ININ.Addins.IC.ISubscription#subscribe
Creates or updates the subscription to the specified queue.
The application must be connected to Interaction Center. Callers can verify the connection by inspecting
the ININ.Addins.IC.sessionInfo
object.
Parameters
Name | Type | Description |
---|---|---|
request | ININ.Addins.IC.Queues.IQueueSubscribeRequest |
The request. |
Returns
A promise to the subscription being created or updated.
- Type
- IPromise
unsubscribe() :IPromise
Implements ININ.Addins.IC.ISubscription#unsubscribe
Deletes the subscription to the specified queue.
Returns
A promise to the subscription being deleted.
- Type
- IPromise
Events
changed
The queue was changed.
Parameters
Name | Type | Description |
---|---|---|
queue | ININ.Addins.IC.Queues.Queue |
The |
interactionAdded
The specified queue interaction was added.
Parameters
Name | Type | Description |
---|---|---|
interaction | ININ.Addins.IC.Interactions.IInteraction |
The interaction that was added. |
queue | ININ.Addins.IC.Queues.Queue |
The |
interactionChanged
The specified queue interaction was updated.
Parameters
Name | Type | Description |
---|---|---|
interaction | ININ.Addins.IC.Interactions.IInteraction |
The interaction that was updated. |
queue | ININ.Addins.IC.Queues.Queue |
The |
interactionRemoved
The specified queue interaction was removed.
Parameters
Name | Type | Description |
---|---|---|
removedInteraction | ININ.Addins.IC.Queues.IQueueInteractionRemovedEvent |
The interaction that was removed. |
queue | ININ.Addins.IC.Queues.Queue |
The |