diff --git a/dist/docs/Activity.html b/dist/docs/Activity.html new file mode 100644 index 00000000..23c03165 --- /dev/null +++ b/dist/docs/Activity.html @@ -0,0 +1,1251 @@ + + + + Documentation Class: Activity + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: Activity

+
+ +
+ +

+ Activity +

+ +

An Activity represents a state that a Worker can be in (e.g. Idle, Offline, Busy, ...)

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
accountSid + + +string + + + + +

The sid of the Twilio account

available + + +boolean + + + + +

If the Worker can handle Tasks in this state

dateCreated + + +Date + + + + +

The date this Activity was created

dateUpdated + + +Date + + + + +

The date this Activity was last updated

isCurrent + + +boolean + + + + +

If this particular Activity represents the current state of the Worker

name + + +string + + + + +

The friendly name of this Activity

sid + + +string + + + + +

The sid of this Activity

workspaceSid + + +string + + + + +

The sid of the Workspace owning this Activity

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + +

Members

+ +
+ +
+
+

<readonly> accountSid :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> available :boolean

+ + +
+
+ + + +
Type:
+
    +
  • + +boolean + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> dateCreated :Date

+ + +
+
+ + + +
Type:
+
    +
  • + +Date + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> dateUpdated :Date

+ + +
+
+ + + +
Type:
+
    +
  • + +Date + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

isCurrent

+ + +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> name :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> sid :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> workspaceSid :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ + + +

Methods

+ +
+ +
+
+

setAsCurrent( [options])

+ + +
+
+ + +
+

Make this Activity the current state of the Worker

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
options + + +ActivityUpdateOptions + + + + + + + <optional>
+ + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+
    +
  • Rejected if the Worker's activity state could not be set
  • +
+
+ + + +
+
+ Type +
+
+ +Promise.<this> + + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/Channel.html b/dist/docs/Channel.html new file mode 100644 index 00000000..4e668305 --- /dev/null +++ b/dist/docs/Channel.html @@ -0,0 +1,1826 @@ + + + + Documentation Class: Channel + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: Channel

+
+ +
+ +

+ Channel +

+ +

A Channel distinguishes Tasks into specific types (e.g. Default, Chat, SMS, Video, Voice)

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
accountSid + + +string + + + + +

The sid of the Twilio account

assignedTasks + + +number + + + + +

The number of Tasks assigned to this Channel

available + + +boolean + + + + +

If the Worker should be assigned Tasks of this Channel type

availableCapacityPercentage + + +number + + + + +

The current available capacity of this Worker to handle +Tasks of this Channel type

capacity + + +number + + + + +

The number of Tasks that a Worker can handle of this Channel type

lastReservedTime + + +Date + + + + +

The date when the Channel last saw a Task

dateCreated + + +Date + + + + +

The date this Channel was created

dateUpdated + + +Date + + + + +

The date this Channel was last updated

sid + + +string + + + + +

The sid of this Activity

taskChannelSid + + +string + + + + +

The sid of the TaskChannel associated to this Worker Channel

taskChannelUniqueName + + +string + + + + +

The friendly name of this Channel

workerSid + + +string + + + + +

The sid of the Worker owning this Channel

workspaceSid + + +string + + + + +

The sid of the Workspace owning this Activity

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
Fires:
+ + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + +
    +
  • EventEmitter
  • +
+ + + + + + + + + + + + + +

Members

+ +
+ +
+
+

<readonly> accountSid :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> assignedTasks :number

+ + +
+
+ + + +
Type:
+
    +
  • + +number + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> available :boolean

+ + +
+
+ + + +
Type:
+
    +
  • + +boolean + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> availableCapacityPercentage :number

+ + +
+
+ + + +
Type:
+
    +
  • + +number + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> capacity :number

+ + +
+
+ + + +
Type:
+
    +
  • + +number + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> dateCreated :Date

+ + +
+
+ + + +
Type:
+
    +
  • + +Date + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> dateUpdated :Date

+ + +
+
+ + + +
Type:
+
    +
  • + +Date + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> lastReservedTime :Date

+ + +
+
+ + + +
Type:
+
    +
  • + +Date + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> sid :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> taskChannelSid :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> taskChannelUniqueName :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> workerSid :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> workspaceSid :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ + + + + + + +

Events

+ +
+ +
+
+

availabilityUpdated

+ + +
+
+ + +
+

The availability of this Channel was updated

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
channel + + +Channel + + + + +

The Channel whose availability was updated

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

capacityUpdated

+ + +
+
+ + +
+

The capacity of this Channel was updated

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
channel + + +Channel + + + + +

The Channel whose capacity was updated

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/IncomingTransfer.html b/dist/docs/IncomingTransfer.html new file mode 100644 index 00000000..9b3dc58c --- /dev/null +++ b/dist/docs/IncomingTransfer.html @@ -0,0 +1,735 @@ + + + + Documentation Class: IncomingTransfer + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: IncomingTransfer

+
+ +
+ +

+ IncomingTransfer +

+ +

An IncomingTransfer represents the transfer of work for the Worker via another Worker or queue

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
dateCreated + + +Date + + + + + + + + +

The timestamp when this Transfer was created

dateUpdated + + +Date + + + + + + + + +

The timestamp when this Transfer was last updated

mode + + +string + + + + + + + + +

Transfer mode ['WARM', 'COLD']

queueSid + + +string + + + + + + + + +

The Sid of the TaskQueue the Task belongs to

reservationSid + + +string + + + + + + + + +

The Sid of the initiating Reservation.

to + + +string + + + + + + + + +

The sid of the Worker or TaskQueue this Transfer is intended for

transferFailedReason + + +string + + + + + + + <optional>
+ + + +

The reason, if applicable, for why a transfer failed

type + + +string + + + + + + + + +

The transfer type ['QUEUE', 'WORKER']

sid + + +string + + + + + + + + +

The sid of this Transfer

status + + +string + + + + + + + + +

['INITIATED', 'FAILED', 'COMPLETED', 'CANCELED']

workerSid + + +string + + + + + + + + +

The sid of the initiating Worker

workflowSid + + +string + + + + + + + + +

The Sid of the Workflow the Task was created against

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + +
    +
  • Transfer
  • +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/OutgoingTransfer.html b/dist/docs/OutgoingTransfer.html new file mode 100644 index 00000000..2c35b2fa --- /dev/null +++ b/dist/docs/OutgoingTransfer.html @@ -0,0 +1,1435 @@ + + + + Documentation Class: OutgoingTransfer + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: OutgoingTransfer

+
+ +
+ +

+ OutgoingTransfer +

+ +

An OutgoingTransfer represents the currently active outgoing transfer initiated by the Worker to another Worker or queue

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
dateCreated + + +Date + + + + + + + + +

The timestamp when this Transfer was created

dateUpdated + + +Date + + + + + + + + +

The timestamp when this Transfer was last updated

mode + + +string + + + + + + + + +

Transfer mode ['WARM', 'COLD']

queueSid + + +string + + + + + + + + +

The Sid of the TaskQueue the Task belongs to

reservationSid + + +string + + + + + + + + +

The Sid of the initiating Reservation.

to + + +string + + + + + + + + +

The sid of the Worker or TaskQueue this Transfer is intended for

transferFailedReason + + +string + + + + + + + <optional>
+ + + +

The reason, if applicable, for why a transfer failed

type + + +string + + + + + + + + +

The transfer type ['QUEUE', 'WORKER']

sid + + +string + + + + + + + + +

The sid of this Transfer

status + + +string + + + + + + + + +

['INITIATED', 'FAILED', 'COMPLETED', 'CANCELED']

workerSid + + +string + + + + + + + + +

The sid of the initiating Worker

workflowSid + + +string + + + + + + + + +

The Sid of the Workflow the Task was created against

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + +
    +
  • Transfer
  • +
+ + + + + + + + + + + + + +

Members

+ +
+ +
+
+

taskSid :string

+ + +
+
+ +
+

taskSid

+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ + + +

Methods

+ +
+ +
+
+

<async> cancel()

+ + +
+
+ + +
+

Cancel the ongoing OutgoingTransfer

+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+ +
+ + + +
+
+ Type +
+
+ +Promise.<this> + + + +
+
+ + + + + +
+ +
+ + + + + +

Events

+ +
+ +
+
+

attemptFailed

+ + +
+
+ + +
+

The attempt to transfer the Task to the desired entity failed

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
outgoingTransfer + + +OutgoingTransfer + + + + +

The OutgoingTransfer that had an attempt failure

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

canceled

+ + +
+
+ + +
+

The Task's current OutgoingTransfer has successfully been cancelled

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
outgoingTransfer + + +OutgoingTransfer + + + + +

The OutgoingTransfer that was canceled

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

completed

+ + +
+
+ + +
+

The OutgoingTransfer has successfully been transferred to the desired entity

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
outgoingTransfer + + +OutgoingTransfer + + + + +

The OutgoingTransfer that was completed

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

failed

+ + +
+
+ + +
+

All attempts to transfer the Task to the desired entity have failed. +No more attempts on the OutgoingTransfer will be made.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
outgoingTransfer + + +OutgoingTransfer + + + + +

The OutgoingTransfer that has failed

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/Reservation.html b/dist/docs/Reservation.html new file mode 100644 index 00000000..559713b6 --- /dev/null +++ b/dist/docs/Reservation.html @@ -0,0 +1,4023 @@ + + + + Documentation Class: Reservation + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: Reservation

+
+ +
+ +

+ Reservation +

+ +

A Reservation correlates a Task and a Worker

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
accountSid + + +string + + + + + + + + +

The sid of the Twilio account

dateCreated + + +Date + + + + + + + + +

The date the Reservation was created

dateUpdated + + +Date + + + + + + + + +

The date the Reservation was last updated

canceledReasonCode + + +number + + + + + + + <optional>
+ + + +

The reason code received when Reservation is canceled

sid + + +string + + + + + + + + +

The sid of the Reservation

status + + +string + + + + + + + + +

The current state of the Reservation. +Options: ['pending', 'accepted', 'rejected', 'timeout', 'canceled', 'rescinded', 'wrapping', 'completed'].

task + + +Task + + + + + + + <optional>
+ + + +

The Task tied to the Reservation

transfer + + +IncomingTransfer + + + + + + + <optional>
+ + + +

the IncomingTransfer tied to the Reservation

timeout + + +number + + + + + + + + +

The number of seconds until the Task times out

workerSid + + +string + + + + + + + + +

The sid of the Worker

workspaceSid + + +string + + + + + + + + +

The sid of the Workspace owning this Reservation

version + + +string + + + + + + + + +

The version of this Reservation

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
Fires:
+ + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + +
    +
  • EventEmitter
  • +
+ + + + + + + + + + + + + +

Members

+ +
+ +
+
+

<readonly> accountSid :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> canceledReasonCode :number|undefined

+ + +
+
+ + + +
Type:
+
    +
  • + +number +| + +undefined + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> dateCreated :Date

+ + +
+
+ + + +
Type:
+
    +
  • + +Date + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> dateUpdated :Date

+ + +
+
+ + + +
Type:
+
    +
  • + +Date + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> sid :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> status :"pending"|"accepted"|"rejected"|"timeout"|"canceled"|"rescinded"|"wrapping"|"completed"

+ + +
+
+ + + +
Type:
+
    +
  • + +"pending" +| + +"accepted" +| + +"rejected" +| + +"timeout" +| + +"canceled" +| + +"rescinded" +| + +"wrapping" +| + +"completed" + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> task :Task|Object

+ + +
+
+ + + +
Type:
+
    +
  • + +Task +| + +Object + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> timeout :number

+ + +
+
+ + + +
Type:
+
    +
  • + +number + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> transfer :IncomingTransfer|Object

+ + +
+
+ + + +
Type:
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> version :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> workerSid :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> workspaceSid :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ + + +

Methods

+ +
+ +
+
+

accept()

+ + +
+
+ + +
+

Accept the Reservation

+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+
    +
  • Rejected if unable to issue Accept instruction on the Reservation
  • +
+
+ + + +
+
+ Type +
+
+ +Promise.<this> + + + +
+
+ + + + + +
+ + + +
+
+

call(from, url [, options])

+ + +
+
+ + +
+

Issue a Call to a Worker

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
from + + +string + + + + + + + + + + +

The caller id for the call to a Worker

url + + +string + + + + + + + + + + +

A valid TwiML URI that is executed on the answering Worker's leg

options + + +CallOptions + + + + + + + <optional>
+ + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+
    +
  • Rejected if unable to issue Call instruction on the Reservation
  • +
+
+ + + +
+
+ Type +
+
+ +Promise.<this> + + + +
+
+ + + + + +
+ + + +
+
+

complete()

+ + +
+
+ + +
+

Complete the Reservation

+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+
    +
  • Rejected if unable to issue Complete instruction on the Reservation
  • +
+
+ + + +
+
+ Type +
+
+ +Promise.<this> + + + +
+
+ + + + + +
+ + + +
+
+

conference( [options])

+ + +
+
+ + +
+

Conference the active Call tied to this Reservation to the Worker

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
options + + +ConferenceOptions + + + + + + + <optional>
+ + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+
    +
  • Rejected if unable to issue Conference instruction on the link Reservation
  • +
+
+ + + +
+
+ Type +
+
+ +Promise.<this> + + + +
+
+ + + + + +
+ + + +
+
+

dequeue( [options])

+ + +
+
+ + +
+

Dequeue the Reservation to the Worker. This will perform telephony to dequeue a +Task that was enqueued using the Enqueue TwiML verb. A contact_uri must exist +in the Worker's attributes for this call to go through.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
options + + +DequeueOptions + + + + + + + <optional>
+ + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+
    +
  • Rejected if unable to issue Dequeue instruction on the Reservation
  • +
+
+ + + +
+
+ Type +
+
+ +Promise.<this> + + + +
+
+ + + + + +
+ + + +
+
+

fetchLatestVersion()

+ + +
+
+ + +
+

Fetch the last version of this Reservation

+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +Promise.<Reservation> + + + +
+
+ + + + + +
+ + + +
+
+

redirect(callSid, url [, options])

+ + +
+
+ + +
+

Redirect the active Call tied to this Reservation

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
callSid + + +string + + + + + + + + + + +

The sid of the Call to redirect

url + + +string + + + + + + + + + + +

A valid TwiML URI that is executed on the Caller's leg upon redirecting

options + + +RedirectOptions + + + + + + + <optional>
+ + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+
    +
  • Rejected if unable to issue Redirect instruction on the Reservation
  • +
+
+ + + +
+
+ Type +
+
+ +Promise.<this> + + + +
+
+ + + + + +
+ + + +
+
+

reject( [options])

+ + +
+
+ + +
+

Reject the Reservation

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
options + + +RejectOptions + + + + + + + <optional>
+ + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+
    +
  • Rejected if unable to issue Reject instruction on the Reservation
  • +
+
+ + + +
+
+ Type +
+
+ +Promise.<this> + + + +
+
+ + + + + +
+ + + +
+
+

updateParticipant(options)

+ + +
+
+ + +
+

Update the Worker's leg in the Conference associated to this Reservation

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +ReservationParticipantOptions + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+
    +
  • Rejected if unable to update the Worker's leg in the Conference tied to the Reservation
  • +
+
+ + + +
+
+ Type +
+
+ +Promise.<this> + + + +
+
+ + + + + +
+ + + +
+
+

wrap()

+ + +
+
+ + +
+

Wrap the Reservation

+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+
    +
  • Rejected if unable to issue Wrap instruction on the Reservation
  • +
+
+ + + +
+
+ Type +
+
+ +Promise.<this> + + + +
+
+ + + + + +
+ +
+ + + + + +

Events

+ +
+ +
+
+

accepted

+ + +
+
+ + +
+

Fired when a Reservation has been accepted for this Worker

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
reservation + + +Reservation + + + + +

The accepted Reservation

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

canceled

+ + +
+
+ + +
+

Fired when a Reservation has been canceled for this Worker

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
reservation + + +Reservation + + + + +

The canceled Reservation

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

completed

+ + +
+
+ + +
+

Fired when an accepted Reservation has been completed for this Worker

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
reservation + + +Reservation + + + + +

The completed Reservation

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

rejected

+ + +
+
+ + +
+

Fired when a Reservation has been rejected for this Worker

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
reservation + + +Reservation + + + + +

The rejected Reservation

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

rescinded

+ + +
+
+ + +
+

Fired when a Reservation has been rescinded for the Worker

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
reservation + + +Reservation + + + + +

The rescinded Reservation

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

timeout

+ + +
+
+ + +
+

Fired when a Reservation has been timed out for this Worker

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
reservation + + +Reservation + + + + +

The timed out Reservation

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

wrapup

+ + +
+
+ + +
+

Fired when a Reservation has been wrapped up for the Worker

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
reservation + + +Reservation + + + + +

The wrapped up Reservation

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/Supervisor.html b/dist/docs/Supervisor.html new file mode 100644 index 00000000..1a916601 --- /dev/null +++ b/dist/docs/Supervisor.html @@ -0,0 +1,4845 @@ + + + + Documentation Class: Supervisor + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: Supervisor

+
+ +
+ +

+ Supervisor +

+ +

Create a Supervisor client representing a privileged TaskRouter Worker

+ + +
+ + +
+
+ + +
+
+

new Twilio.TaskRouter.Supervisor(token [, options])

+ + +
+
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
token + + +string + + + + + + + + + + +

The string token

options + + +WorkerOptions + + + + + + + <optional>
+ + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
Fires:
+ + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + +

Members

+ +
+ +
+
+

<readonly> accountSid :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

activities

+ + +
+
+ + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> activity

+ + +
+
+ + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> attributes :Record.<any, any>

+ + +
+
+ + + +
Type:
+
    +
  • + +Record.<any, any> + + + +
  • +
+ + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

channels

+ + +
+
+ + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> dateActivityChanged :Date

+ + +
+
+ + + +
Type:
+
    +
  • + +Date + + + +
  • +
+ + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> dateCreated :Date

+ + +
+
+ + + +
Type:
+
    +
  • + +Date + + + +
  • +
+ + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> dateStatusChanged :Date

+ + +
+
+ + + +
Type:
+
    +
  • + +Date + + + +
  • +
+ + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> dateUpdated :Date

+ + +
+
+ + + +
Type:
+
    +
  • + +Date + + + +
  • +
+ + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> friendlyName :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> name :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

reservations

+ + +
+
+ + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> sid :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

version :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> workerActivitySid :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> workerSid :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> workspaceSid :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ + + +

Methods

+ +
+ +
+
+

_bumpVersion()

+ + +
+
+ + +
+

bumps the worker version

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

createTask(to, from, workflowSid, taskQueueSid [, options])

+ + +
+
+ + +
+

Create a Task

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
to + + +string + + + + + + + + + + +

The contact uri of the customer. Stored in the Task's attributes as "outbound_to"

from + + +string + + + + + + + + + + +

The contact uri of the Worker. Stored in the Task's attributes as "from"

workflowSid + + +string + + + + + + + + + + +

The Sid of the Workflow this Task should belong to

taskQueueSid + + +string + + + + + + + + + + +

The Sid of the TaskQueue this Task should belong to, used for reporting +purposes only

options + + +WorkerTaskOptions + + + + + + + <optional>
+ + + + + +
+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+
    +
  • Rejected if unable to create a Task on behalf of the Worker. Returns the +TaskSid of the created Task.
  • +
+
+ + + +
+
+ Type +
+
+ +Promise.<string> + + + +
+
+ + + + + +
+ + + +
+
+

disconnect()

+ + +
+
+ + +
+

Gracefully disconnect the client.

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +void + + + +
+
+ + + + + +
+ + + +
+
+

fetchLatestVersion()

+ + +
+
+ + +
+

Fetch the last version of this Worker

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +Promise.<this> + + + +
+
+ + + + + +
+ + + +
+
+

getLogger(prefix)

+ + +
+
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
prefix + + +string + + + + +
+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +Logger + + + +
+
+ + + + + +
+ + + +
+
+

getRoutes()

+ + +
+
+ + + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +Routes + + + +
+
+ + + + + +
+ + + +
+
+

monitor(taskSid, reservationSid [, extraParams])

+ + +
+
+ + +
+

Add this Supervisor to an ongoing Reservation by Sid.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
taskSid + + +string + + + + + + + + + + +

The sid of the Task to add a monitor to.

reservationSid + + +string + + + + + + + + + + +

The sid of the Reservation to add a monitor to.

extraParams + + +Record.<any, any> + + + + + + + <optional>
+ + + + + +

An object containing extra params to append to the payload.

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+

Promise

+
+ + + + + + + +
+ + + +
+
+

setAttributes(attributes)

+ + +
+
+ + +
+

Update attributes

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attributes + + +Record.<any, any> + + + + +

A JSON describing the Worker's attributes

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+
    +
  • Rejected if the attributes cannot be set
  • +
+
+ + + +
+
+ Type +
+
+ +Promise.<this> + + + +
+
+ + + + + +
+ + + +
+
+

setWorkerActivity(workerSid, activitySid [, options])

+ + +
+
+ + +
+

Sets the worker activity for a given worker based on the provided workerSid and activitySid.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
workerSid + + +string + + + + + + + + + + +

The SID of the worker.

activitySid + + +string + + + + + + + + + + +

The SID of the activity to set for the worker.

options + + +Object + + + + + + + <optional>
+ + + + + +

An object containing extra params to append to the payload.

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
Throws:
+ + + +
+
+
+

If workerSid or activitySid are not strings.

+
+
+
+
+
+ Type +
+
+ +TypeError + + + +
+
+
+
+ + + + + +
Returns:
+ + +
+

Returns a Worker

+
+ + + +
+
+ Type +
+
+ +Promise.<Worker> + + + +
+
+ + + + + +
+ + + +
+
+

setWorkerAttributes(workerSid, attributes)

+ + +
+
+ + +
+

Sets the attributes of a worker.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
workerSid + + +string + + + + +

The SID of the worker.

attributes + + +Record.<string, any> + + + + +

The attributes to set for the worker.

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
Throws:
+ + + +
+
+
+

If workerSid is not a string or attributes is not an object.

+
+
+
+
+
+ Type +
+
+ +TypeError + + + +
+
+
+
+ + + + + +
Returns:
+ + +
+

Returns a Worker

+
+ + + +
+
+ Type +
+
+ +Promise.<Worker> + + + +
+
+ + + + + +
+ + + +
+
+

updateToken(newToken)

+ + +
+
+ + +
+

Update token

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
newToken + + +string + + + + +

The new token that should be used for authentication

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+
    +
  • Emits error if unable to update token
  • +
+
+ + + +
+
+ Type +
+
+ +void + + + +
+
+ + + + + +
+ +
+ + + + + +

Events

+ +
+ +
+
+

activityUpdated

+ + +
+
+ + +
+

Worker activity has updated

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
worker + + +Worker + + + + +

The updated Worker

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

attributesUpdated

+ + +
+
+ + +
+

Worker attributes have updated

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
worker + + +Worker + + + + +

The updated Worker

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

disconnected

+ + +
+
+ + +
+

The signaling layer has lost the websocket connection

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
reason + + +Object + + + + +

The reason the Worker websocket disconnected

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

error

+ + +
+
+ + +
+

An error has occurred

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
error + + +Error + + + + +

The Error that occurred

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

monitor

+ + +
+
+ + +
+

Add this Supervisor to an ongoing Reservation by Sid.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
taskSid + + +string + + + + + + + + + + +

The sid of the Task to add a monitor to.

reservationSid + + +string + + + + + + + + + + +

The sid of the Reservation to add a monitor to.

extraParams + + +Object + + + + + + + <optional>
+ + + + + +

An object containing extra params to append to the payload.

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

ready

+ + +
+
+ + +
+

Worker is ready to listen for events and take action

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

reservationCreated

+ + +
+
+ + +
+

A Reservation has been created for the Worker

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
reservation + + +Reservation + + + + +

The created Reservation

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

reservationFailed

+ + +
+
+ + +
+

Worker was unable to receive a Reservation for the Task it created

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
task + + +Object + + + + +

The raw Task-like payload that failed to generate a Reservation

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

tokenExpired

+ + +
+
+ + +
+

The Worker token has expired

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

tokenUpdated

+ + +
+
+ + +
+

The Worker token has successfully updated

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/Task.html b/dist/docs/Task.html new file mode 100644 index 00000000..7ff7ed2d --- /dev/null +++ b/dist/docs/Task.html @@ -0,0 +1,4894 @@ + + + + Documentation Class: Task + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: Task

+
+ +
+ +

+ Task +

+ +

A Task represents an item of work

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
addOns + + +Record.<any, any> + + + + +

The addons attached to the Task

age + + +number + + + + +

The age of the Task in seconds

attributes + + +Record.<any, any> + + + + +

The attributes of the Task

dateCreated + + +Date + + + + +

The date the Task was created

dateUpdated + + +Date + + + + +

The date the Task was last updated

priority + + +number + + + + +

The priority of the Task

queueName + + +string + + + + +

The friendly name of the TaskQueue the Task is currently in

queueSid + + +string + + + + +

The sid of the TaskQueue the Task is currently in

reason + + +string + + + + +

The reason the Task was completed or canceled, if applicable

routingTarget + + +string + + + + +

The target Sid of the Worker, TaskQueue, or Workflow this Task will be routed to.

sid + + +string + + + + +

The sid of the Task

status + + +string + + + + +

The status of the Task. Options: ['pending', 'reserved', 'assigned', 'canceled', 'completed', 'wrapping']

taskChannelSid + + +string + + + + +

The sid of the Task Channel associated to the Task in MultiTask mode

taskChannelUniqueName + + +string + + + + +

The unique name of the Task Channel associated to the Task in MultiTask mode

timeout + + +number + + + + +

The number of seconds the Task is allowed to live

transfers + + +Transfers + + + + +

The IncomingTransfer and OutgoingTransfer related to this Task, if applicable

workflowName + + +string + + + + +

The name of the Workflow responsible for routing the Task

workflowSid + + +string + + + + +

The sid of the Workflow responsible for routing the Task

version + + +string + + + + +

The version of this Task

reservationSid + + +string + + + + +

The sid of Reservation

virtualStartTime + + +Date + + + + +

Optionally set starting time of the Task, in cases where +the interaction between the customer and agents spans across multiple tasks. If not +provided, defaults to dateCreated.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
Fires:
+ + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + +
    +
  • EventEmitter
  • +
+ + + + + + + + + + + + + +

Members

+ +
+ +
+
+

<readonly> addOns :Record.<any, any>

+ + +
+
+ + + +
Type:
+
    +
  • + +Record.<any, any> + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> age :number

+ + +
+
+ + + +
Type:
+
    +
  • + +number + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> attributes :Record.<any, any>

+ + +
+
+ + + +
Type:
+
    +
  • + +Record.<any, any> + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> dateCreated :Date

+ + +
+
+ + + +
Type:
+
    +
  • + +Date + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> dateUpdated :Date

+ + +
+
+ + + +
Type:
+
    +
  • + +Date + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> priority :number

+ + +
+
+ + + +
Type:
+
    +
  • + +number + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> queueName :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> queueSid :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> reason :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> reservationSid :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> routingTarget :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> sid :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> status :'pending'|'reserved'|'assigned'|'canceled'|'completed'|'wrapping'

+ + +
+
+ + + +
Type:
+
    +
  • + +'pending' +| + +'reserved' +| + +'assigned' +| + +'canceled' +| + +'completed' +| + +'wrapping' + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> taskChannelSid :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> taskChannelUniqueName :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> timeout :number

+ + +
+
+ + + +
Type:
+
    +
  • + +number + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> transfers :Transfers

+ + +
+
+ + + +
Type:
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> version :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> virtualStartTime :Date

+ + +
+
+ + + +
Type:
+
    +
  • + +Date + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> workflowName :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> workflowSid :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ + + +

Methods

+ +
+ +
+
+

complete(reason)

+ + +
+
+ + +
+

Update the Task status to 'completed'

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
reason + + +string + + + + +

The reason for completing the Task

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+
    +
  • Rejected if the Task state could not be updated to 'completed'
  • +
+
+ + + +
+
+ Type +
+
+ +Promise.<this> + + + +
+
+ + + + + +
+ + + +
+
+

fetchLatestVersion()

+ + +
+
+ + +
+

Fetch the last version of this Task

+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +Promise.<Task> + + + +
+
+ + + + + +
+ + + +
+
+

hold(targetWorkerSid, onHold, options)

+ + +
+
+ + +
+

Hold the worker's call leg in the Conference associated to this Task and specified TargetWorkerSid

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
targetWorkerSid + + +String + + + + +

The target worker's sid which should be put onhold or unhold

onHold + + +boolean + + + + +

Whether to hold or unhold the specified worker's call leg in the Conference referenced by the Task

options + + +TaskHoldOptions + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +Promise.<this> + + + +
+
+ + + + + +
+ + + +
+
+

kick(workerSid)

+ + +
+
+ + +
+

Kick another active Worker participant from the ongoing conference

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
workerSid + + +string + + + + +

The Sid of the Worker who is currently in the conference that should be kicked

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+
    +
  • Rejected if unable to kick the call leg of the targeted Worker in the Conference tied to the Task
  • +
+
+ + + +
+
+ Type +
+
+ +Promise.<this> + + + +
+
+ + + + + +
+ + + +
+
+

setAttributes(attributes)

+ + +
+
+ + +
+

Update the Task attributes to the given attributes.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attributes + + +Record.<any, any> + + + + +

A JSON to update the attributes.

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+
    +
  • Rejected if the attributes cannot be set
  • +
+
+ + + +
+
+ Type +
+
+ +Promise.<this> + + + +
+
+ + + + + +
+ + + +
+
+

setVirtualStartTime(date)

+ + +
+
+ + +
+

Set virtual start time of the Task.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
date + + +Date + + + + +

Virtual start time as a Date.

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+
    +
  • Rejected if fails to set the time.
  • +
+
+ + + +
+
+ Type +
+
+ +Promise.<this> + + + +
+
+ + + + + +
+ + + +
+
+

<async> transfer(to [, options])

+ + +
+
+ + +
+

Transfer the Task to another entity.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
to + + +string + + + + + + + + + + +

The Worker or TaskQueue entity sid to transfer the task to.

options + + +TransferOptions + + + + + + + <optional>
+ + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +Promise.<this> + + + +
+
+ + + + + +
+ + + +
+
+

updateParticipant(options)

+ + +
+
+ + +
+

Update the Customer leg in the Conference associated to this Task

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +TaskParticipantOptions + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+
    +
  • Rejected if unable to update the Customers' leg in the Conference tied to the Task
  • +
+
+ + + +
+
+ Type +
+
+ +Promise.<this> + + + +
+
+ + + + + +
+ + + +
+
+

wrapUp(options)

+ + +
+
+ + +
+

Update the Task status to 'wrapping' in a multi-task enabled Workspace

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +WrappingOptions + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+
    +
  • Rejected if the Task state could not be updated to 'wrapping'
  • +
+
+ + + +
+
+ Type +
+
+ +Promise.<this> + + + +
+
+ + + + + +
+ +
+ + + + + +

Events

+ +
+ +
+
+

canceled

+ + +
+
+ + +
+

The Task was canceled

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
task + + +Task + + + + +

The Task who was canceled

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

completed

+ + +
+
+ + +
+

The Task was completed

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
task + + +Task + + + + +

The Task who was completed

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

transferAttemptFailed

+ + +
+
+ + +
+

An OutgoingTransfer attempt has been failed for Task

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
outgoingTransfer + + +OutgoingTransfer + + + + +

The currently in process OutgoingTransfer

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

transferCanceled

+ + +
+
+ + +
+

An OutgoingTransfer has been canceled for Task

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
outgoingTransfer + + +OutgoingTransfer + + + + +

The currently in process OutgoingTransfer

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

transferCompleted

+ + +
+
+ + +
+

An OutgoingTransfer has been competed for Task

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
outgoingTransfer + + +OutgoingTransfer + + + + +

The currently in process OutgoingTransfer

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

transferFailed

+ + +
+
+ + +
+

An OutgoingTransfer has been failed for Task

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
outgoingTransfer + + +OutgoingTransfer + + + + +

The currently in process OutgoingTransfer

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

transferInitiated

+ + +
+
+ + +
+

An OutgoingTransfer has been initiated for Task

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
outgoingTransfer + + +OutgoingTransfer + + + + +

The currently in process OutgoingTransfer

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

updated

+ + +
+
+ + +
+

The attributes of this Task was updated

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
task + + +Task + + + + +

The Task whose attributes were updated

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

wrapup

+ + +
+
+ + +
+

The Task was wrapped up

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
task + + +Task + + + + +

The Task who was wrapped up

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/TaskQueue.html b/dist/docs/TaskQueue.html new file mode 100644 index 00000000..d5a8727c --- /dev/null +++ b/dist/docs/TaskQueue.html @@ -0,0 +1,1729 @@ + + + + Documentation Class: TaskQueue + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: TaskQueue

+
+ +
+ +

+ TaskQueue +

+ +

A TaskQueue represents a set of Tasks awaiting assignment.

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
sid + + +string + + + + +

The Sid of the TaskQueue

queueSid + + +string + + + + +

The Sid of the TaskQueue

accountSid + + +string + + + + +

The Sid of the owning Account of the TaskQueue}

workspaceSid + + +string + + + + +

The Sid of the Workspace the TaskQueue belongs to

name + + +string + + + + +

The friendly name of the TaskQueue

queueName + + +string + + + + +

The friendly name of the TaskQueue

assignmentActivityName + + +string + + + + +

The Activity name for the reservation of the TaskQueue

reservationActivityName + + +string + + + + +

The Activity name for the assignment of the TaskQueue

assignmentActivitySid + + +string + + + + +

The Sid of the assignment Activity for the TaskQueue

reservationActivitySid + + +string + + + + +

The Sid of the reservation Activity for the TaskQueue

targetWorkers + + +string + + + + +

The expression used to target workers

maxReservedWorkers + + +number + + + + +

The maximum number of reserved workers for the TaskQueue

taskOrder + + +string + + + + +

The task order for the TaskQueue FIFO or LIFO

dateCreated + + +Date + + + + +

The date when the TaskQueue was created

dateUpdated + + +Date + + + + +

The date when the TaskQueue was last updated

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + +

Members

+ +
+ +
+
+

<readonly> accountSid :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> assignmentActivityName :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> assignmentActivitySid :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> dateCreated :Date

+ + +
+
+ + + +
Type:
+
    +
  • + +Date + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> dateUpdated :Date

+ + +
+
+ + + +
Type:
+
    +
  • + +Date + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> maxReservedWorkers :number

+ + +
+
+ + + +
Type:
+
    +
  • + +number + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> name :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> queueName :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> queueSid :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> reservationActivityName :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> reservationActivitySid :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> sid :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> targetWorkers :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> taskOrder :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> workspaceSid :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ + + + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/Transfers.html b/dist/docs/Transfers.html new file mode 100644 index 00000000..1dc04f02 --- /dev/null +++ b/dist/docs/Transfers.html @@ -0,0 +1,841 @@ + + + + Documentation Class: Transfers + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: Transfers

+
+ +
+ +

+ Transfers +

+ +

Transfers contains both the IncomingTransfer and OutgoingTransfer for the Worker

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
incoming + + +IncomingTransfer + + + + +

The IncomingTransfer for the Worker if the related Reservation was initiated via transfer by another agent

outgoing + + +OutgoingTransfer + + + + +

The current active (initiated but not yet finished) OutgoingTransfer initiated by the Worker to another agent or queue

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + +
    +
  • EventEmitter
  • +
+ + + + + + + + + + + + + +

Members

+ +
+ +
+
+

incoming :IncomingTransfer

+ + +
+
+ + + +
Type:
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

outgoing :OutgoingTransfer

+ + +
+
+ + + +
Type:
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ + + +

Methods

+ +
+ +
+
+

_emitEvent(eventType, rawEventData)

+ + +
+
+ + +
+

Emit the transfer event and handle any appropriate clean-up or data modification

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
eventType + + +Object + + + + +

the name of the transfer event

rawEventData + + +Object + + + + +

the raw payload contents of the event

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

_update(latestTransfersData)

+ + +
+
+ + +
+

Update Transfers using the latest transfers data

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
latestTransfersData + + +Object + + + + +

The latest transfers data

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/Worker.html b/dist/docs/Worker.html new file mode 100644 index 00000000..e921ae5b --- /dev/null +++ b/dist/docs/Worker.html @@ -0,0 +1,4243 @@ + + + + Documentation Class: Worker + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: Worker

+
+ +
+ +

+ Worker +

+ +

Create a Worker client representing a TaskRouter Worker

+ + +
+ + +
+
+ + +
+
+

new Twilio.TaskRouter.Worker(token [, options] [, deps])

+ + +
+
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
token + + +string + + + + + + + + + + +

The string token

options + + +WorkerOptions + + + + + + + <optional>
+ + + + + +
deps + + +WorkerDeps + + + + + + + <optional>
+ + + + + +
+ + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
accountSid + + +string + + + + +

The sid of the Twilio account

activities + + +Map.<string, Activity> + + + + +

The list of possible states a Worker can be

activity + + +Activity + + + + +

The current Activity of the Worker

activitySid + + +string + + + + +

The sid of the Activity the Worker is currently in

activityName + + +string + + + + +

The current Activity name the Worker is currently in

attributes + + +Record.<any, any> + + + + +

A JSON representation of the Worker's attributes

available + + +boolean + + + + +

Whether or not the Worker is available to take on Tasks

channels + + +Map.<string, Channel> + + + + +

The list of available Channels

connectActivitySid + + +string + + + + +

The Activity to set the Worker as on connect

dateCreated + + +Date + + + + +

The date this Worker was created

dateStatusChanged + + +Date + + + + +

The date this Worker's activity was last changed

dateUpdated + + +Date + + + + +

The date this Worker was last updated

name + + +string + + + + +

The friendly name of the Worker

reservations + + +Map.<string, Reservation> + + + + +

A list of pending Reservations for the Worker

sid + + +string + + + + +

The sid of the Worker

workspaceSid + + +string + + + + +

The sid of the Workspace owning this Worker

workerSid + + +string + + + + +

The sid of the Worker, duplicates sid field for backwards compatibility

workerActivitySid + + +string + + + + +

The sid of the Activity the Worker is currently in, duplicates activitySid field for backwards compatibility

dateActivityChanged + + +Date + + + + +

The date when the Worker's state was last changed, duplicates dateStatusChanged field for backwards compatibility

friendlyName + + +string + + + + +

The friendly name of the Worker, duplicates name field for backwards compatibility

version + + +string + + + + +

The version of this Worker

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
Fires:
+ + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + +
    +
  • EventEmitter
  • +
+ + + + + + + + + + + + + +

Members

+ +
+ +
+
+

<readonly> accountSid :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

activities

+ + +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> activity

+ + +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> attributes :Record.<any, any>

+ + +
+
+ + + +
Type:
+
    +
  • + +Record.<any, any> + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

channels

+ + +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> dateActivityChanged :Date

+ + +
+
+ + + +
Type:
+
    +
  • + +Date + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> dateCreated :Date

+ + +
+
+ + + +
Type:
+
    +
  • + +Date + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> dateStatusChanged :Date

+ + +
+
+ + + +
Type:
+
    +
  • + +Date + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> dateUpdated :Date

+ + +
+
+ + + +
Type:
+
    +
  • + +Date + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> friendlyName :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> name :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

reservations

+ + +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> sid :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

version :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> workerActivitySid :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> workerSid :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

<readonly> workspaceSid :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ + + +

Methods

+ +
+ +
+
+

_bumpVersion()

+ + +
+
+ + +
+

bumps the worker version

+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

createTask(to, from, workflowSid, taskQueueSid [, options])

+ + +
+
+ + +
+

Create a Task

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
to + + +string + + + + + + + + + + +

The contact uri of the customer. Stored in the Task's attributes as "outbound_to"

from + + +string + + + + + + + + + + +

The contact uri of the Worker. Stored in the Task's attributes as "from"

workflowSid + + +string + + + + + + + + + + +

The Sid of the Workflow this Task should belong to

taskQueueSid + + +string + + + + + + + + + + +

The Sid of the TaskQueue this Task should belong to, used for reporting +purposes only

options + + +WorkerTaskOptions + + + + + + + <optional>
+ + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+
    +
  • Rejected if unable to create a Task on behalf of the Worker. Returns the +TaskSid of the created Task.
  • +
+
+ + + +
+
+ Type +
+
+ +Promise.<string> + + + +
+
+ + + + + +
+ + + +
+
+

disconnect()

+ + +
+
+ + +
+

Gracefully disconnect the client.

+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +void + + + +
+
+ + + + + +
+ + + +
+
+

fetchLatestVersion()

+ + +
+
+ + +
+

Fetch the last version of this Worker

+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +Promise.<this> + + + +
+
+ + + + + +
+ + + +
+
+

getLogger(prefix)

+ + +
+
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
prefix + + +string + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +Logger + + + +
+
+ + + + + +
+ + + +
+
+

getRoutes()

+ + +
+
+ + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +Routes + + + +
+
+ + + + + +
+ + + +
+
+

setAttributes(attributes)

+ + +
+
+ + +
+

Update attributes

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attributes + + +Record.<any, any> + + + + +

A JSON describing the Worker's attributes

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+
    +
  • Rejected if the attributes cannot be set
  • +
+
+ + + +
+
+ Type +
+
+ +Promise.<this> + + + +
+
+ + + + + +
+ + + +
+
+

updateToken(newToken)

+ + +
+
+ + +
+

Update token

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
newToken + + +string + + + + +

The new token that should be used for authentication

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+
    +
  • Emits error if unable to update token
  • +
+
+ + + +
+
+ Type +
+
+ +void + + + +
+
+ + + + + +
+ +
+ + + + + +

Events

+ +
+ +
+
+

activityUpdated

+ + +
+
+ + +
+

Worker activity has updated

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
worker + + +Worker + + + + +

The updated Worker

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

attributesUpdated

+ + +
+
+ + +
+

Worker attributes have updated

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
worker + + +Worker + + + + +

The updated Worker

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

disconnected

+ + +
+
+ + +
+

The signaling layer has lost the websocket connection

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
reason + + +Object + + + + +

The reason the Worker websocket disconnected

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

error

+ + +
+
+ + +
+

An error has occurred

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
error + + +Error + + + + +

The Error that occurred

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

ready

+ + +
+
+ + +
+

Worker is ready to listen for events and take action

+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

reservationCreated

+ + +
+
+ + +
+

A Reservation has been created for the Worker

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
reservation + + +Reservation + + + + +

The created Reservation

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

reservationFailed

+ + +
+
+ + +
+

Worker was unable to receive a Reservation for the Task it created

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
task + + +Object + + + + +

The raw Task-like payload that failed to generate a Reservation

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

tokenExpired

+ + +
+
+ + +
+

The Worker token has expired

+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

tokenUpdated

+ + +
+
+ + +
+

The Worker token has successfully updated

+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/Workspace.html b/dist/docs/Workspace.html new file mode 100644 index 00000000..4ea9ab5b --- /dev/null +++ b/dist/docs/Workspace.html @@ -0,0 +1,1325 @@ + + + + Documentation Class: Workspace + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: Workspace

+
+ +
+ +

+ Workspace +

+ +

Create a Workspace client representing a TaskRouter Workspace

+ + +
+ + +
+
+ + +
+
+

new Twilio.TaskRouter.Workspace(jwt [, options] [, workspaceSid])

+ + +
+
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
jwt + + +string + + + + + + + + + + +

The string token

options + + +WorkspaceOptions + + + + + + + <optional>
+ + + + + +
workspaceSid + + +string + + + + + + + <optional>
+ + + + + +

Sid of this Workspace, has to be provided if JWE token is passed

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
Throws:
+ + + +
+ +

Exception if workspaceSid is not passed with JWE token

+ +
+ + + + + + + +
+ + +
+ + + + + + + + + + + + +

Members

+ +
+ +
+
+

<readonly> workspaceSid :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

workspaceSid :string

+ + +
+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ + + +

Methods

+ +
+ +
+
+

fetchTaskQueue(queueSid)

+ + +
+
+ + +
+

Fetch task queue of this Workspace by given sid

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
queueSid + + +string + + + + +

the sid of the task queue to fetch

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + + + + + +
+ + + +
+
+

fetchTaskQueues( [params])

+ + +
+
+ + +
+

Fetch task queues of this Workspace

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
params + + +FetchTaskQueuesParams + + + + + + + <optional>
+ + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + + + + + +
+ + + +
+
+

fetchWorker(workerSid)

+ + +
+
+ + +
+

Fetch worker of this Workspace by given sid

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
workerSid + + +string + + + + +

the sid of the worker to fetch

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + + + + + +
+ + + +
+
+

fetchWorkers( [params])

+ + +
+
+ + +
+

Fetch workers of this Workspace

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
params + + +FetchWorkersParams + + + + + + + <optional>
+ + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + + + + + +
+ + + +
+
+

updateToken(newToken)

+ + +
+
+ + +
+

Update token

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
newToken + + +string + + + + +

The new token that should be used for authentication

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+
    +
  • throws error if unable to update token
  • +
+
+ + + +
+
+ Type +
+
+ +void + + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/classes.list.html b/dist/docs/classes.list.html new file mode 100644 index 00000000..a98933d8 --- /dev/null +++ b/dist/docs/classes.list.html @@ -0,0 +1,5440 @@ + + + + Documentation Classes + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Classes

+
+ +
+ +

+ +

+ + +
+ + +
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +

Classes

+ +
+
Activity
+
+ +
Channel
+
+ +
IncomingTransfer
+
+ +
OutgoingTransfer
+
+ +
Reservation
+
+ +
Supervisor
+
+ +
Task
+
+ +
TaskQueue
+
+ +
Transfers
+
+ +
Worker
+
+ +
Workspace
+
+
+ + + + + + + + + + + + + +

Events

+ +
+ +
+
+

availabilityUpdated

+ + +
+
+ + +
+

The availability of this Channel was updated

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
channel + + +Channel + + + + +

The Channel whose availability was updated

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

capacityUpdated

+ + +
+
+ + +
+

The capacity of this Channel was updated

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
channel + + +Channel + + + + +

The Channel whose capacity was updated

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

attemptFailed

+ + +
+
+ + +
+

The attempt to transfer the Task to the desired entity failed

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
outgoingTransfer + + +OutgoingTransfer + + + + +

The OutgoingTransfer that had an attempt failure

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

canceled

+ + +
+
+ + +
+

The Task's current OutgoingTransfer has successfully been cancelled

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
outgoingTransfer + + +OutgoingTransfer + + + + +

The OutgoingTransfer that was canceled

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

completed

+ + +
+
+ + +
+

The OutgoingTransfer has successfully been transferred to the desired entity

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
outgoingTransfer + + +OutgoingTransfer + + + + +

The OutgoingTransfer that was completed

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

failed

+ + +
+
+ + +
+

All attempts to transfer the Task to the desired entity have failed. +No more attempts on the OutgoingTransfer will be made.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
outgoingTransfer + + +OutgoingTransfer + + + + +

The OutgoingTransfer that has failed

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

accepted

+ + +
+
+ + +
+

Fired when a Reservation has been accepted for this Worker

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
reservation + + +Reservation + + + + +

The accepted Reservation

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

canceled

+ + +
+
+ + +
+

Fired when a Reservation has been canceled for this Worker

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
reservation + + +Reservation + + + + +

The canceled Reservation

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

completed

+ + +
+
+ + +
+

Fired when an accepted Reservation has been completed for this Worker

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
reservation + + +Reservation + + + + +

The completed Reservation

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

rejected

+ + +
+
+ + +
+

Fired when a Reservation has been rejected for this Worker

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
reservation + + +Reservation + + + + +

The rejected Reservation

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

rescinded

+ + +
+
+ + +
+

Fired when a Reservation has been rescinded for the Worker

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
reservation + + +Reservation + + + + +

The rescinded Reservation

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

timeout

+ + +
+
+ + +
+

Fired when a Reservation has been timed out for this Worker

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
reservation + + +Reservation + + + + +

The timed out Reservation

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

wrapup

+ + +
+
+ + +
+

Fired when a Reservation has been wrapped up for the Worker

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
reservation + + +Reservation + + + + +

The wrapped up Reservation

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

activityUpdated

+ + +
+
+ + +
+

Worker activity has updated

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
worker + + +Worker + + + + +

The updated Worker

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

attributesUpdated

+ + +
+
+ + +
+

Worker attributes have updated

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
worker + + +Worker + + + + +

The updated Worker

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

disconnected

+ + +
+
+ + +
+

The signaling layer has lost the websocket connection

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
reason + + +Object + + + + +

The reason the Worker websocket disconnected

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

error

+ + +
+
+ + +
+

An error has occurred

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
error + + +Error + + + + +

The Error that occurred

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

monitor

+ + +
+
+ + +
+

Add this Supervisor to an ongoing Reservation by Sid.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
taskSid + + +string + + + + + + + + + + +

The sid of the Task to add a monitor to.

reservationSid + + +string + + + + + + + + + + +

The sid of the Reservation to add a monitor to.

extraParams + + +Object + + + + + + + <optional>
+ + + + + +

An object containing extra params to append to the payload.

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

ready

+ + +
+
+ + +
+

Worker is ready to listen for events and take action

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

reservationCreated

+ + +
+
+ + +
+

A Reservation has been created for the Worker

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
reservation + + +Reservation + + + + +

The created Reservation

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

reservationFailed

+ + +
+
+ + +
+

Worker was unable to receive a Reservation for the Task it created

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
task + + +Object + + + + +

The raw Task-like payload that failed to generate a Reservation

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

tokenExpired

+ + +
+
+ + +
+

The Worker token has expired

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

tokenUpdated

+ + +
+
+ + +
+

The Worker token has successfully updated

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

canceled

+ + +
+
+ + +
+

The Task was canceled

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
task + + +Task + + + + +

The Task who was canceled

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

completed

+ + +
+
+ + +
+

The Task was completed

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
task + + +Task + + + + +

The Task who was completed

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

transferAttemptFailed

+ + +
+
+ + +
+

An OutgoingTransfer attempt has been failed for Task

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
outgoingTransfer + + +OutgoingTransfer + + + + +

The currently in process OutgoingTransfer

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

transferCanceled

+ + +
+
+ + +
+

An OutgoingTransfer has been canceled for Task

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
outgoingTransfer + + +OutgoingTransfer + + + + +

The currently in process OutgoingTransfer

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

transferCompleted

+ + +
+
+ + +
+

An OutgoingTransfer has been competed for Task

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
outgoingTransfer + + +OutgoingTransfer + + + + +

The currently in process OutgoingTransfer

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

transferFailed

+ + +
+
+ + +
+

An OutgoingTransfer has been failed for Task

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
outgoingTransfer + + +OutgoingTransfer + + + + +

The currently in process OutgoingTransfer

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

transferInitiated

+ + +
+
+ + +
+

An OutgoingTransfer has been initiated for Task

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
outgoingTransfer + + +OutgoingTransfer + + + + +

The currently in process OutgoingTransfer

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

updated

+ + +
+
+ + +
+

The attributes of this Task was updated

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
task + + +Task + + + + +

The Task whose attributes were updated

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

wrapup

+ + +
+
+ + +
+

The Task was wrapped up

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
task + + +Task + + + + +

The Task who was wrapped up

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

activityUpdated

+ + +
+
+ + +
+

Worker activity has updated

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
worker + + +Worker + + + + +

The updated Worker

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

attributesUpdated

+ + +
+
+ + +
+

Worker attributes have updated

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
worker + + +Worker + + + + +

The updated Worker

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

disconnected

+ + +
+
+ + +
+

The signaling layer has lost the websocket connection

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
reason + + +Object + + + + +

The reason the Worker websocket disconnected

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

error

+ + +
+
+ + +
+

An error has occurred

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
error + + +Error + + + + +

The Error that occurred

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

ready

+ + +
+
+ + +
+

Worker is ready to listen for events and take action

+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

reservationCreated

+ + +
+
+ + +
+

A Reservation has been created for the Worker

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
reservation + + +Reservation + + + + +

The created Reservation

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

reservationFailed

+ + +
+
+ + +
+

Worker was unable to receive a Reservation for the Task it created

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
task + + +Object + + + + +

The raw Task-like payload that failed to generate a Reservation

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

tokenExpired

+ + +
+
+ + +
+

The Worker token has expired

+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

tokenUpdated

+ + +
+
+ + +
+

The Worker token has successfully updated

+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/fonts/glyphicons-halflings-regular.eot b/dist/docs/fonts/glyphicons-halflings-regular.eot new file mode 100644 index 00000000..b93a4953 Binary files /dev/null and b/dist/docs/fonts/glyphicons-halflings-regular.eot differ diff --git a/dist/docs/fonts/glyphicons-halflings-regular.svg b/dist/docs/fonts/glyphicons-halflings-regular.svg new file mode 100644 index 00000000..94fb5490 --- /dev/null +++ b/dist/docs/fonts/glyphicons-halflings-regular.svg @@ -0,0 +1,288 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/fonts/glyphicons-halflings-regular.ttf b/dist/docs/fonts/glyphicons-halflings-regular.ttf new file mode 100644 index 00000000..1413fc60 Binary files /dev/null and b/dist/docs/fonts/glyphicons-halflings-regular.ttf differ diff --git a/dist/docs/fonts/glyphicons-halflings-regular.woff b/dist/docs/fonts/glyphicons-halflings-regular.woff new file mode 100644 index 00000000..9e612858 Binary files /dev/null and b/dist/docs/fonts/glyphicons-halflings-regular.woff differ diff --git a/dist/docs/fonts/glyphicons-halflings-regular.woff2 b/dist/docs/fonts/glyphicons-halflings-regular.woff2 new file mode 100644 index 00000000..64539b54 Binary files /dev/null and b/dist/docs/fonts/glyphicons-halflings-regular.woff2 differ diff --git a/dist/docs/global.html b/dist/docs/global.html new file mode 100644 index 00000000..6f641f0c --- /dev/null +++ b/dist/docs/global.html @@ -0,0 +1,4997 @@ + + + + Documentation Global + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Global

+
+ +
+ +

+ +

+ + +
+ + +
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + +

Type Definitions

+ +
+ +
+
+

ActivityUpdateOptions

+ + +
+
+ + + +
Type:
+
    +
  • + +Object + + + +
  • +
+ + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
rejectPendingReservations + + +boolean + + + + + + + <optional>
+ + + +
+ + false + +

Represents whether all pending reservations should be rejected with the update to an unavailable Activity.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

CallOptions

+ + +
+
+ + + +
Type:
+
    +
  • + +Object + + + +
  • +
+ + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
accept + + +boolean + + + + + + + <optional>
+ + + +
+ + false + +

Represents whether the Task should be +accepted before initiating the call

record + + +string + + + + + + + <optional>
+ + + +
+ + 'do-not-record' + +

To record the call or not

statusCallbackUrl + + +string + + + + + + + <optional>
+ + + +
+ + null + +

A valid status status callback url

to + + +string + + + + + + + <optional>
+ + + +
+ + null + +

The number or endpoint that should be called. +If not provided, the contact_uri defined in the Worker attributes will be used

timeout + + +number + + + + + + + <optional>
+ + + +
+ + 60 + +

The integer number of seconds Twilio should allow the phone associated to "contact_uri" to ring

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

ConferenceOptions

+ + +
+
+ + + +
Type:
+
    +
  • + +Object + + + +
  • +
+ + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
to + + +string + + + + + + + <optional>
+ + + +
+ + null + +

The contact uri of the Worker; can be a phone +number or a client ID. Required, if no contact_uri on the Worker's attributes.

from + + +string + + + + + + + <optional>
+ + + +
+ + null + +

The caller id for the call to the Worker. +Must be a verified Twilio number.

timeout + + +number + + + + + + + <optional>
+ + + +
+ + 60 + +

The integer number of seconds that +Twilio should allow the call to ring before assuming there is no answer.

statusCallback + + +string + + + + + + + <optional>
+ + + +
+ + null + +

The URL endpoint to receive call status events of the Worker leg.

statusCallbackMethod + + +string + + + + + + + <optional>
+ + + +
+ + 'POST' + +

The HTTP method for the Status Callback URL.

statusCallbackEvent + + +string + + + + + + + <optional>
+ + + +
+ + 'completed' + +

A comma separated list of events to subscribe to. +The possible list of events are: ['initiated', 'ringing', 'answered', 'completed'].

record + + +string + + + + + + + <optional>
+ + + +
+ + 'do-not-record' + +

Whether to record the Worker leg of the Conference.

muted + + +boolean + + + + + + + <optional>
+ + + +
+ + false + +

Whether the Worker leg of the Conference is muted.

beep + + +string +| + +boolean + + + + + + + <optional>
+ + + +
+ + true + +

Whether the Worker leg should be when entering the Conference. +The options for beep are: [true, false, 'onEnter', 'onExit'].

startConferenceOnEnter + + +boolean + + + + + + + <optional>
+ + + +
+ + true + +

Whether the Conference should start when the Worker leg enters.

endConferenceOnExit + + +boolean + + + + + + + <optional>
+ + + +
+ + false + +

Whether the Conference should end when the Worker leg exits.

endConferenceOnCustomerExit + + +boolean + + + + + + + <optional>
+ + + +
+ + false + +

Whether the Conference should end when the customer leg exits.

beepOnCustomerEntrance + + +boolean + + + + + + + <optional>
+ + + +
+ + true + +

Whether the Conference should beep when the customer leg enters.

waitUrl + + +string + + + + + + + <optional>
+ + + +
+ + default Twilio hold music + +

The URL endpoint to play when waiting for the Conference to begin.

waitMethod + + +string + + + + + + + <optional>
+ + + +
+ + 'POST' + +

The HTTP method for the Wait URL.

earlyMedia + + +boolean + + + + + + + <optional>
+ + + +
+ + true + +

Whether Twilio should feed early media to be played directly into a Conference.

maxParticipants + + +number + + + + + + + <optional>
+ + + +
+ + 10 + +

The number of max participants allowed in a Conference.

conferenceStatusCallback + + +string + + + + + + + <optional>
+ + + +
+ + null + +

The URL endpoint to receive Conference status events.

conferenceStatusCallbackMethod + + +string + + + + + + + <optional>
+ + + +
+ + 'POST' + +

The HTTP method for the Conference Status Callback URL.

conferenceStatusCallbackEvent + + +string + + + + + + + <optional>
+ + + +
+ + 'start,end' + +

A comma separated list of Conference events to subscribe to. +The possible list of events are: ['start', 'end', 'join', 'leave', 'mute', 'hold', 'speaker'].

conferenceRecord + + +string +| + +boolean + + + + + + + <optional>
+ + + +
+ + false + +

Whether the entire Conference should be recorded. +The possible options for conferenceRecord are: [true, false, 'record-from-start', 'do-not-record'].

conferenceTrim + + +string + + + + + + + <optional>
+ + + +
+ + 'trim-silence' + +

Whether to trim the Conference recording. +The options for conferenceTrim are: ['trim-silence', 'do-not-trim'].

recordingChannels + + +string + + + + + + + <optional>
+ + + +
+ + 'mono' + +

Which channel of the Conference to record. The options are: ['mono', 'dual'].

recordingStatusCallback + + +string + + + + + + + <optional>
+ + + +
+ + null + +

The URL endpoint to receive recording status events.

recordingStatusCallbackMethod + + +string + + + + + + + <optional>
+ + + +
+ + 'POST' + +

The HTTP method for the Recording Status Callback URL.

conferenceRecordingStatusCallback + + +string + + + + + + + <optional>
+ + + +
+ + null + +

The URl endpoint to receive Conference events.

conferenceRecordingStatusCallbackMethod + + +string + + + + + + + <optional>
+ + + +
+ + 'POST' + +

The HTTP method of the Conference Recording Status Callback.

region + + +string + + + + + + + <optional>
+ + + +
+ + null + +

The specific region. The options for region are: ['us1', 'ie1', 'sg1', 'br1', 'au1', 'jp1'].

sipAuthUsername + + +string + + + + + + + <optional>
+ + + +
+ + null + +

The SIP auth username to use.

sipAuthPassword + + +string + + + + + + + <optional>
+ + + +
+ + null + +

The SIP auth password to use.

transcribe + + +boolean + + + + + + + <optional>
+ + + +
+ + false + +

Whether the call recording should be transcribed or not.

transcriptionConfiguration + + +string + + + + + + + <optional>
+ + + +
+ + null + +

The SID or (unique) friendly name of the transcription configuration object to use.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

DequeueOptions

+ + +
+
+ + + +
Type:
+
    +
  • + +Object + + + +
  • +
+ + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
from + + +string + + + + + + + <optional>
+ + + +
+ + null + +

The caller id for the call to the Worker. +Must be a verified Twilio number.

to + + +string + + + + + + + <optional>
+ + + +
+ + null + +

The contact uri of the Worker; can be a phone +number or a client ID. Required, if no contact_uri on the Worker's attributes.

postWorkActivitySid + + +string + + + + + + + <optional>
+ + + +
+ + null + +

The activitySid to update the +Worker to after dequeuing the Reservation.

record + + +string + + + + + + + <optional>
+ + + +
+ + 'do-not-record' + +

Defines which legs of the call +should be recorded.

timeout + + +number + + + + + + + <optional>
+ + + +
+ + 60 + +

The integer number of seconds that +Twilio should allow the call to ring before assuming there is no answer.

statusCallbackUrl + + +string + + + + + + + <optional>
+ + + +
+ + null + +

A URL that Twilio will send +asynchronous webhook this._request. to on a completed call event.

statusCallbackEvents + + +string + + + + + + + <optional>
+ + + +
+ + null + +

A comma separated string of the events to subscribe to

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

FetchTaskQueuesParams

+ + +
+
+ + + +
Type:
+
    +
  • + +Object + + + +
  • +
+ + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
AfterSid + + +string + + + + + + + <optional>
+ + + +
FriendlyName + + +string + + + + + + + <optional>
+ + + +
Ordering + + +"DateUpdated:asc" +| + +"DateUpdated:desc" + + + + + + + <optional>
+ + + +
WorkerSid + + +string + + + + + + + <optional>
+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

FetchWorkersParams

+ + +
+
+ + + +
Type:
+
    +
  • + +Object + + + +
  • +
+ + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
AfterSid + + +string + + + + + + + <optional>
+ + + +
FriendlyName + + +string + + + + + + + <optional>
+ + + +
ActivitySid + + +string + + + + + + + <optional>
+ + + +
ActivityName + + +string + + + + + + + <optional>
+ + + +
TargetWorkersExpression + + +string + + + + + + + <optional>
+ + + +
Ordering + + +"DateStatusChanged:asc" +| + +"DateStatusChanged:desc" + + + + + + + <optional>
+ + + +
MaxWorkers + + +number + + + + + + + <optional>
+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

RedirectOptions

+ + +
+
+ + + +
Type:
+
    +
  • + +Object + + + +
  • +
+ + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
accept + + +boolean + + + + + + + <optional>
+ + + +
+ + false + +

Represents whether the Task should be +accepted before initiating the call

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

RejectOptions

+ + +
+
+ + + +
Type:
+
    +
  • + +Object + + + +
  • +
+ + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
activitySid + + +string + + + + +

The sid of the Activity to update the worker to +upon rejecting the Reservation

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

ReservationParticipantOptions

+ + +
+
+ + + +
Type:
+
    +
  • + +Object + + + +
  • +
+ + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
endConferenceOnExit + + +boolean + + + + +

Whether the Conference should end when this Worker participant leaves the Conference

mute + + +boolean + + + + +

Mute or unmute this Worker participant

beepOnExit + + +boolean + + + + +

Whether there should be a beep sound when this Worker participant leaves the Conference

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

TaskHoldOptions

+ + +
+
+ + + +
Type:
+
    +
  • + +Object + + + +
  • +
+ + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
holdUrl + + +string + + + + + + + <optional>
+ + + +

The URL endpoint to play when participant is on hold.

holdMethod + + +'GET' + + + + + + + <optional>
+ + + +

The HTTP method for the hold URL.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

TaskParticipantOptions

+ + +
+
+ + + +
Type:
+
    +
  • + +Object + + + +
  • +
+ + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
hold + + +boolean + + + + +

Whether to hold the customer leg of the Conference referenced by the Task

holdUrl + + +string + + + + +

The URL endpoint to play when participant is on hold.

holdMethod + + +'GET' + + + + +

The HTTP method for the hold URL.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

TransferOptions

+ + +
+
+ + + +
Type:
+
    +
  • + +Object + + + +
  • +
+ + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefaultDescription
attributes + + +Record.<any, any> + + + + + + +

Updated attributes for the task

mode + + +'WARM' +| + +'COLD' + + + + + + + 'WARM' + +

'WARM' or 'COLD'

priority + + +number + + + + + + +

Updated priority for the task

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

WorkerDeps

+ + +
+
+ + + +
Type:
+
    +
  • + +Object + + + +
  • +
+ + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
Request + + +Request + + + + +
EventBridgeSignaling + + +EventBridgeSignaling + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

WorkerOptions

+ + +
+
+ + + +
Type:
+
    +
  • + +Object + + + +
  • +
+ + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
connectActivitySid + + +string + + + + + + + <optional>
+ + + +
+ + '' + +

The Activity state of the Worker upon connect

closeExistingSessions + + +boolean + + + + + + + <optional>
+ + + +
+ + false + +
    +
  • Whether other open sessions of this Worker +should be terminated
  • +
setWorkerOfflineIfDisconnected + + +boolean + + + + + + + <optional>
+ + + +
+ + true + +

A boolean defining whether if Worker availability set as Offline when the connection is terminated

logLevel + + +string + + + + + + + <optional>
+ + + +
+ + 'error' + +

The level of logging to enable +['error', 'warn', 'info', 'debug', 'trace', 'silent']

region + + +string + + + + + + + <optional>
+ + + +
+ +

the realm for connections (ex. "stage-us1")

enableVersionCheck + + +boolean + + + + + + + <optional>
+ + + +
+ + false + +

To avoid accidentally overwriting objects with outdated data

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

WorkerTaskOptions

+ + +
+
+ + + +
Type:
+
    +
  • + +Object + + + +
  • +
+ + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
attributes + + +Record.<any, any> + + + + + + + <optional>
+ + + +
+ + null + +

Additional attributes for the Task

taskChannelUniqueName + + +string + + + + + + + <optional>
+ + + +
+ + null + +

The friendly name of the Channel this Task +belongs to. If not provided, defaults to 'default' channel.

taskChannelSid + + +string + + + + + + + <optional>
+ + + +
+ + null + +

The Sid of the Channel this Task belongs to. If not +provided, defaults to 'default' channel.

virtualStartTime + + +Date + + + + + + + <optional>
+ + + +
+ + null + +

Optional manually set starting time of the Task, in cases where +the interaction between the customer and agents spans across multiple tasks. If not +provided, defaults to dateCreated.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

WorkspaceOptions

+ + +
+
+ + + +
Type:
+
    +
  • + +Object + + + +
  • +
+ + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
region + + +string + + + + + + + <optional>
+ + + +
+ +

the realm for connections (ex. "stage-us1")

pageSize + + +number + + + + + + + <optional>
+ + + +
+ +

The number of items returned in each request

logLevel + + +string + + + + + + + <optional>
+ + + +
+ + 'error' + +

The level of logging to enable +['error', 'warn', 'info', 'debug', 'trace', 'silent']

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

WrappingOptions

+ + +
+
+ + + +
Type:
+
    +
  • + +Object + + + +
  • +
+ + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefaultDescription
reason + + +string + + + + + + + null + +

The reason for wrapping up the Task

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/img/glyphicons-halflings-white.png b/dist/docs/img/glyphicons-halflings-white.png new file mode 100644 index 00000000..3bf6484a Binary files /dev/null and b/dist/docs/img/glyphicons-halflings-white.png differ diff --git a/dist/docs/img/glyphicons-halflings.png b/dist/docs/img/glyphicons-halflings.png new file mode 100644 index 00000000..a9969993 Binary files /dev/null and b/dist/docs/img/glyphicons-halflings.png differ diff --git a/dist/docs/index.html b/dist/docs/index.html new file mode 100644 index 00000000..7ec9685a --- /dev/null +++ b/dist/docs/index.html @@ -0,0 +1,349 @@ + + + + Documentation Index + + + + + + + + + + + + + +
+
+ + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + +
+

build +Release +npm version

+

twilio-taskrouter.js

+

npm version

+

TaskRouter is Twilio's skills based routing system. With this library, you can manage your Workers in the browser or view the state of your Workspace.

+

This version of TaskRouter SDK can be used with Twilio Flex and TaskRouter standalone instances.

+

Installation

+

NPM

+
npm install twilio-taskrouter
+
+

Usage

+

The following is a simple example showing a Worker waiting for Reservations. +For more information, refer to the +API Docs.

+
const TaskRouter = require("twilio-taskrouter");
+const Twilio = require("twilio");
+const AccessToken = Twilio.jwt.AccessToken;
+const TaskRouterGrant = AccessToken.TaskRouterGrant;
+
+const accountSid = "";
+const signingKeySid = "";
+const signingKeySecret = "";
+const workspaceSid = "";
+const workerSid = "";
+
+const token = createAccessToken(
+  accountSid,
+  signingKeySid,
+  signingKeySecret,
+  workspaceSid,
+  workerSid
+);
+const alice = new TaskRouter.Worker(token);
+
+alice.on("ready", (readyAlice) => {
+  console.log(`Worker ${readyAlice.sid} is now ready for work`);
+});
+
+alice.on("reservationCreated", (reservation) => {
+  console.log(
+    `Reservation ${reservation.sid} has been created for ${alice.sid}`
+  );
+  console.log(`Task attributes are: ${reservation.task.attributes}`);
+
+  reservation.on("accepted", (acceptedReservation) => {
+    console.log(`Reservation ${acceptedReservation.sid} was accepted.`);
+  });
+
+  reservation
+    .accept()
+    .then((acceptedReservation) => {
+      console.log(`Reservation status is ${acceptedReservation.status}`);
+    })
+    .catch((err) => {
+      console.log(`Error: ${err}`);
+    });
+});
+
+function createAccessToken(
+  accountSid,
+  signingKeySid,
+  signingKeySecret,
+  workspaceSid,
+  workerSid
+) {
+  const taskRouterGrant = new TaskRouterGrant({
+    workerSid: workerSid,
+    workspaceSid: workspaceSid,
+    role: "worker",
+  });
+
+  const accessToken = new AccessToken(
+    accountSid,
+    signingKeySid,
+    signingKeySecret
+  );
+  accessToken.addGrant(taskRouterGrant);
+  accessToken.identity = "alice";
+
+  return accessToken.toJwt();
+}
+
+

Changelog

+

See CHANGELOG.md.

+

License

+

See LICENSE.md.

+

Building

+

Fork and clone the repository. Use npm to install node 8 (other versions may run into problems).

+

Then, install dependencies with:

+
yarn install
+
+

Then run the build script:

+
yarn build
+
+

The builds and docs will be placed in the dist/ directory.

+

Before commits, be sure to validate by running:

+
make lint
+
+

Testing

+
    +
  • Create a twilio account
  • +
  • copy ./test/integration_test_setup/.env.example to ./test/integration_test_setup/.env
  • +
  • set ACCOUNT_SID, AUTH_TOKEN, SIGNING_KEY_SID, SIGNING_KEY_SECRET
  • +
  • Run ./test/integration_test_setup/RunIntegrationTestLocal.sh this will create everything needed for running E2E tests and run the tests
  • +
+

Test with Sample App

+ +

Contributing

+

Bug fixes welcome! If you're not familiar with the GitHub pull +request/contribution process, this is a nice tutorial.

+
+ + + + + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/quicksearch.html b/dist/docs/quicksearch.html new file mode 100644 index 00000000..3eb7e904 --- /dev/null +++ b/dist/docs/quicksearch.html @@ -0,0 +1,31 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/scripts/docstrap.lib.js b/dist/docs/scripts/docstrap.lib.js new file mode 100644 index 00000000..09d9272a --- /dev/null +++ b/dist/docs/scripts/docstrap.lib.js @@ -0,0 +1,11 @@ +if(!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b="length"in a&&a.length,c=_.type(a);return"function"!==c&&!_.isWindow(a)&&(!(1!==a.nodeType||!b)||("array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a))}function d(a,b,c){if(_.isFunction(b))return _.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return _.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(ha.test(b))return _.filter(b,a,c);b=_.filter(b,a)}return _.grep(a,function(a){return U.call(b,a)>=0!==c})}function e(a,b){for(;(a=a[b])&&1!==a.nodeType;);return a}function f(a){var b=oa[a]={};return _.each(a.match(na)||[],function(a,c){b[c]=!0}),b}function g(){Z.removeEventListener("DOMContentLoaded",g,!1),a.removeEventListener("load",g,!1),_.ready()}function h(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=_.expando+h.uid++}function i(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(ua,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c||"false"!==c&&("null"===c?null:+c+""===c?+c:ta.test(c)?_.parseJSON(c):c)}catch(a){}sa.set(a,b,c)}else c=void 0;return c}function j(){return!0}function k(){return!1}function l(){try{return Z.activeElement}catch(a){}}function m(a,b){return _.nodeName(a,"table")&&_.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function n(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function o(a){var b=Ka.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function p(a,b){for(var c=0,d=a.length;d>c;c++)ra.set(a[c],"globalEval",!b||ra.get(b[c],"globalEval"))}function q(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(ra.hasData(a)&&(f=ra.access(a),g=ra.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)_.event.add(b,e,j[e][c])}sa.hasData(a)&&(h=sa.access(a),i=_.extend({},h),sa.set(b,i))}}function r(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&_.nodeName(a,b)?_.merge([a],c):c}function s(a,b){var c=b.nodeName.toLowerCase();"input"===c&&ya.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}function t(b,c){var d,e=_(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:_.css(e[0],"display");return e.detach(),f}function u(a){var b=Z,c=Oa[a];return c||(c=t(a,b),"none"!==c&&c||(Na=(Na||_("