diff --git a/dist/docs/Activity.html b/dist/docs/Activity.html new file mode 100644 index 000000000..41970da1e --- /dev/null +++ b/dist/docs/Activity.html @@ -0,0 +1,857 @@ + + + + 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

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

Methods

+ +
+ +
+
+

setAsCurrent( [options])

+ + +
+
+ + +
+

Make this Activity the current state of the Worker

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
options + + +Activity.UpdateOptions + + + + + + + <optional>
+ + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+
    +
  • Rejected if the Worker's activity state could not be set
  • +
+
+ + + +
+
+ Type +
+
+ +Promise.<this> + + + +
+
+ + + + + +
+ +
+ + + +

Type Definitions

+ +
+ +
+
+

UpdateOptions

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

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

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/Channel.html b/dist/docs/Channel.html new file mode 100644 index 000000000..c465e48c1 --- /dev/null +++ b/dist/docs/Channel.html @@ -0,0 +1,933 @@ + + + + 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 + + +int + + + + +

The number of Tasks assigned to this Channel

available + + +boolean + + + + +

If the Worker should be assigned Tasks of this Channel type

availableCapacityPercentage + + +int + + + + +

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

capacity + + +int + + + + +

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:
+ + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + +

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 000000000..b49f16980 --- /dev/null +++ b/dist/docs/IncomingTransfer.html @@ -0,0 +1,569 @@ + + + + Documentation Class: IncomingTransfer + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: IncomingTransfer

+
+ +
+ +

+ IncomingTransfer +

+ +

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

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
dateCreated + + +Date + + + + +

The timestamp when this IncomingTransfer was created

dateUpdated + + +Date + + + + +

The timestamp when this IncomingTransfer was last updated

mode + + +string + + + + +

Transfer mode ['WARM', 'COLD']

reservationSid + + +string + + + + +

The sid of the initiating Reservation.

sid + + +string + + + + +

The sid of this IncomingTransfer

status + + +string + + + + +

['INITIATED', 'FAILED', 'COMPLETE', 'CANCELED']

to + + +string + + + + +

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

type + + +string + + + + +

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

workerSid + + +string + + + + +

The sid of the initiating Worker

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/OutgoingTransfer.html b/dist/docs/OutgoingTransfer.html new file mode 100644 index 000000000..dd18f3195 --- /dev/null +++ b/dist/docs/OutgoingTransfer.html @@ -0,0 +1,1218 @@ + + + + Documentation Class: OutgoingTransfer + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: OutgoingTransfer

+
+ +
+ +

+ OutgoingTransfer +

+ +

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

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
dateCreated + + +Date + + + + +

The timestamp when this OutgoingTransfer was created

dateUpdated + + +Date + + + + +

The timestamp when this OutgoingTransfer was last updated

mode + + +string + + + + +

Transfer mode ['WARM', 'COLD']

reservationSid + + +string + + + + +

The sid of the initiating Reservation.

sid + + +string + + + + +

The sid of this OutgoingTransfer

status + + +string + + + + +

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

to + + +string + + + + +

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

transferFailedReason + + +string + + + + +

The reason, if applicable, for why the transfer failed

type + + +string + + + + +

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

workerSid + + +string + + + + +

The sid of the initiating Worker

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

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 000000000..153dd6da1 --- /dev/null +++ b/dist/docs/Reservation.html @@ -0,0 +1,5473 @@ + + + + Documentation Class: Reservation + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: Reservation

+
+ +
+ +

+ Reservation +

+ +

A Reservation correlates a Task and a Worker

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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 + + +int + + + + +

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 + + + + +

The Task tied to the Reservation

timeout + + +int + + + + +

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:
+ + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + +

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 + + +Reservation.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 + + +Reservation.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 + + +Reservation.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 + + +Reservation.RedirectOptions + + + + + + + <optional>
+ + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+
    +
  • Rejected if unable to issue Redirect instruction on the Reservation
  • +
+
+ + + +
+
+ Type +
+
+ +Promise.<this> + + + +
+
+ + + + + +
+ + + +
+
+

reject( [options])

+ + +
+
+ + +
+

Reject the Reservation

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
options + + +Reservation.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:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
options + + +Reservation.ParticipantOptions + + + + + + + <optional>
+ + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
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> + + + +
+
+ + + + + +
+ +
+ + + +

Type Definitions

+ +
+ +
+
+

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 + + +int + + + + + + + <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 + + +int + + + + + + + <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.

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

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 + + +int + + + + + + + <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

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

ParticipantOptions

+ + +
+
+ + + +
Type:
+
    +
  • + +Object + + + +
  • +
+ + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
endConferenceOnExit + + +boolean + + + + + + + <optional>
+ + + +
+ + null + +

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

mute + + +boolean + + + + + + + <optional>
+ + + +
+ + null + +

Mute or unmute this Worker participant

beepOnExit + + +boolean + + + + + + + <optional>
+ + + +
+ + null + +

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

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

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

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

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/Task.html b/dist/docs/Task.html new file mode 100644 index 000000000..ffca13a48 --- /dev/null +++ b/dist/docs/Task.html @@ -0,0 +1,3446 @@ + + + + Documentation Class: Task + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: Task

+
+ +
+ +

+ Task +

+ +

A Task represents an item of work

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
addOns + + +Object + + + + +

The addons attached to the Task

age + + +int + + + + +

The age of the Task in seconds

attributes + + +Object + + + + +

The attributes of the Task

dateCreated + + +Date + + + + +

The date the Task was created

dateUpdated + + +Date + + + + +

The date the Task was last updated

priority + + +int + + + + +

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: ['reserved', 'assigned', 'canceled', 'wrapping', 'completed', 'transferring']

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 + + +int + + + + +

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

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

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:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
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 + + +Task.HoldOptions + + + + + + + <optional>
+ + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

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 + + +Object + + + + +

A JSON to update the attributes.

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

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 + + +Task.TransferOptions + + + + + + + <optional>
+ + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +Promise.<this> + + + +
+
+ + + + + +
+ + + +
+
+

updateParticipant( [options])

+ + +
+
+ + +
+

Update the Customer leg in the Conference associated to this Task

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

wrapUp()

+ + +
+
+ + +
+

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

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

Type Definitions

+ +
+ +
+
+

HoldOptions

+ + +
+
+ + + +
Type:
+
    +
  • + +Object + + + +
  • +
+ + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
holdUrl + + +string + + + + + + + <optional>
+ + + +
+ + default Twilio hold music + +

The URL endpoint to play when participant is on hold.

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

The HTTP method for the hold URL.

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

ParticipantOptions

+ + +
+
+ + + +
Type:
+
    +
  • + +Object + + + +
  • +
+ + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
hold + + +boolean + + + + + + + <optional>
+ + + +
+ + null + +

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

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

The URL endpoint to play when participant is on hold.

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

The HTTP method for the hold URL.

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

TransferOptions

+ + +
+
+ + + +
Type:
+
    +
  • + +Object + + + +
  • +
+ + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
attributes + + +Object + + + + + + + <optional>
+ + + +
+ +

Updated attributes for the task

mode + + +string + + + + + + + <optional>
+ + + +
+ + 'WARM' + +

'WARM' or 'COLD'

priority + + +number + + + + + + + <optional>
+ + + +
+ +

Updated priority for the task

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

WrappingOptions

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

The reason for wrapping up the Task

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

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

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

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 000000000..96b87b3bf --- /dev/null +++ b/dist/docs/TaskQueue.html @@ -0,0 +1,713 @@ + + + + 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 + + +int + + + + +

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

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/Transfers.html b/dist/docs/Transfers.html new file mode 100644 index 000000000..fec59fa86 --- /dev/null +++ b/dist/docs/Transfers.html @@ -0,0 +1,401 @@ + + + + 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

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

Class: Worker

+
+ +
+ +

+ Worker +

+ +

Create a Worker client representing a TaskRouter Worker

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

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

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

The string token

options + + +Worker.Options + + + + + + + <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 + + +Object + + + + +

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:
+ + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+
+

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 + + +Worker.TaskOptions + + + + + + + <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.<Worker> + + + +
+
+ + + + + +
+ + + +
+
+

setAttributes(attributes)

+ + +
+
+ + +
+

Update attributes

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attributes + + +Object + + + + +

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 + + + +
+
+ + + + + +
+ +
+ + + +

Type Definitions

+ +
+ +
+
+

Options

+ + +
+
+ + + +
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
  • +
logLevel + + +string + + + + + + + <optional>
+ + + +
+ + 'error' + +

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

region + + +string + + + + + + + + + + +

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

edge + + +string + + + + + + + + + + +

the ingress for connections (ex. "sydney")

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

TaskOptions

+ + +
+
+ + + +
Type:
+
    +
  • + +Object + + + +
  • +
+ + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
attributes + + +object + + + + + + + <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.

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

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 000000000..4f847217e --- /dev/null +++ b/dist/docs/Workspace.html @@ -0,0 +1,2079 @@ + + + + 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 + + +Workspace.Options + + + + + + + <optional>
+ + + + + +
workspaceSid + + +string + + + + + + + + + + +

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

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

Exception if workspaceSid is not passed with JWE token

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

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:
+ + +
+
    +
  • A task queue with given sid
  • +
+
+ + + +
+
+ Type +
+
+ +Promise.<TaskQueue> + + + +
+
+ + + + + +
+ + + +
+
+

fetchTaskQueues( [options])

+ + +
+
+ + +
+

Fetch task queues of this Workspace

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
options + + +Workspace.FetchTaskQueuesParams + + + + + + + <optional>
+ + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+
    +
  • A map with the task queues
  • +
+
+ + + +
+
+ Type +
+
+ +Promise.<Map.<string, TaskQueue>> + + + +
+
+ + + + + +
+ + + +
+
+

fetchWorker(workerSid)

+ + +
+
+ + +
+

Fetch worker of this Workspace by given sid

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

the sid of the worker to fetch

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+
    +
  • A worker with given sid
  • +
+
+ + + +
+
+ Type +
+
+ +Promise.<Worker> + + + +
+
+ + + + + +
+ + + +
+
+

fetchWorkers( [options])

+ + +
+
+ + +
+

Fetch workers of this Workspace

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
options + + +Workspace.FetchWorkersParams + + + + + + + <optional>
+ + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+
    +
  • A map with the workers
  • +
+
+ + + +
+
+ Type +
+
+ +Promise.<Map.<string, Worker>> + + + +
+
+ + + + + +
+ + + +
+
+

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 + + + +
+
+ + + + + +
+ +
+ + + +

Type Definitions

+ +
+ +
+
+

FetchTaskQueuesParams

+ + +
+
+ + + +
Type:
+
    +
  • + +Object + + + +
  • +
+ + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
AfterSid + + +string + + + + + + + <optional>
+ + + +
+ + null + +
FriendlyName + + +string + + + + + + + <optional>
+ + + +
+ + null + +
Ordering + + +string + + + + + + + <optional>
+ + + +
+ + null + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

FetchWorkersParams

+ + +
+
+ + + +
Type:
+
    +
  • + +Object + + + +
  • +
+ + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
AfterSid + + +string + + + + + + + <optional>
+ + + +
+ + null + +
FriendlyName + + +string + + + + + + + <optional>
+ + + +
+ + null + +
ActivitySid + + +string + + + + + + + <optional>
+ + + +
+ + null + +
ActivityName + + +string + + + + + + + <optional>
+ + + +
+ + null + +
Ordering + + +string + + + + + + + <optional>
+ + + +
+ + null + +
TargetWorkersExpression + + +string + + + + + + + <optional>
+ + + +
+ + null + +
maxWorkers + + +number + + + + + + + <optional>
+ + + +
+ + null + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

Options

+ + +
+
+ + + +
Type:
+
    +
  • + +Object + + + +
  • +
+ + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
region + + +string + + + + + + + + + + +

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

edge + + +string + + + + + + + + + + +

the ingress for connections (ex. "sydney")

pageSize + + +string + + + + + + + + + + +

The number of items returned in each request

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

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

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ 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 000000000..0ed0c60f5 --- /dev/null +++ b/dist/docs/classes.list.html @@ -0,0 +1,3631 @@ + + + + Documentation Classes + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Classes

+
+ +
+ +

+ +

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

Classes

+ +
+
Activity
+
+ +
Channel
+
+ +
IncomingTransfer
+
+ +
OutgoingTransfer
+
+ +
Reservation
+
+ +
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

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

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

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

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 000000000..b93a4953f 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 000000000..94fb5490a --- /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 000000000..1413fc609 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 000000000..9e612858f 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 000000000..64539b54c Binary files /dev/null and b/dist/docs/fonts/glyphicons-halflings-regular.woff2 differ diff --git a/dist/docs/img/glyphicons-halflings-white.png b/dist/docs/img/glyphicons-halflings-white.png new file mode 100644 index 000000000..3bf6484a2 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 000000000..a99699932 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 000000000..3f2448a8c --- /dev/null +++ b/dist/docs/index.html @@ -0,0 +1,317 @@ + + + + Documentation Index + + + + + + + + + + + + + +
+
+ + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + +
+

Build Status +npm version

+

twilio-taskrouter.js

+

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.

+

NOTE: This SDK is in a Developer Preview Release. This version of TaskRouter is intended for Twilio Flex. If you are using it outside of Twilio Flex, you may encounter bugs and instability, and +the underlying APIs available in this release may change in subsequent releases.

+

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
  • +
+

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 000000000..d8b370438 --- /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 000000000..09d9272a0 --- /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||_("