Global

Type Definitions


ActivityUpdateOptions

Type:
  • Object
Properties:
Name Type Argument Default Description
rejectPendingReservations boolean <optional>
false

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


CallOptions

Type:
  • Object
Properties:
Name Type Argument Default Description
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:
Name Type Argument Default Description
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:
Name Type Argument Default Description
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:
Name Type Argument Description
AfterSid string <optional>
FriendlyName string <optional>
Ordering "DateUpdated:asc" | "DateUpdated:desc" <optional>
WorkerSid string <optional>

FetchWorkersParams

Type:
  • Object
Properties:
Name Type Argument Description
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:
Name Type Argument Default Description
accept boolean <optional>
false

Represents whether the Task should be accepted before initiating the call


RejectOptions

Type:
  • Object
Properties:
Name Type Description
activitySid string

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


ReservationParticipantOptions

Type:
  • Object
Properties:
Name Type Description
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:
Name Type Argument Description
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:
Name Type Description
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:
Name Type Default Description
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:
Name Type Description
Request Request
EventBridgeSignaling EventBridgeSignaling

WorkerOptions

Type:
  • Object
Properties:
Name Type Argument Default Description
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 <optional>

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


WorkerTaskOptions

Type:
  • Object
Properties:
Name Type Argument Default Description
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:
Name Type Argument Default Description
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:
Name Type Default Description
reason string null

The reason for wrapping up the Task