Class

EngagementRequest

EngagementRequest

Classes

EngagementRequest

Members

Promise

# engagementPromise

Fulfilled with Engagement

If the request is successful and an operator accepts the request then this promise will be fulfilled with the resulting Engagement.

Rejected with Error

If the request is unsuccessful for any reason then the promise will be rejected with an Error. The Error may have one of the following causes:

  • INVALID_INPUT
  • OPERATOR_DECLINED
  • OPERATOR_UNAVAILABLE
  • ALREADY_ENGAGED
  • CANCEL
  • TIMEOUT
  • INTERNAL_ERROR
  • NETWORK_TIMEOUT
Promise

# operatorPromise

Fulfilled with Operator

If the request is successful and an operator is chosen either by requester or by Glia platform promise will be fulfilled with the resulting Operator.

Rejected with Error

If the request is unsuccessful for any reason then the promise will be rejected with an Error. The Error may have one of the following causes:

  • INVALID_INPUT
  • OPERATOR_UNAVAILABLE
  • ALREADY_ENGAGED
  • CANCEL
  • INTERNAL_ERROR
number

# timeout

The amount of time in milliseconds the operator has to respond to this engagement request.

Methods

# cancel() → {Promise}

Cancels this engagement request.
Fulfilled with an empty object or rejected with an Error if the process fails for any reason. The Error may have one of the following causes: INTERNAL_ERROR, NETWORK_TIMEOUT.
Promise