Class

ConsumerWebsocketConnection

ConsumerWebsocketConnection()

Represents a consumer side websocket connection to UMS.

Constructor

# new ConsumerWebsocketConnection()

View Source connection/connection-websocket-consumer.js, line 46

Methods

# async protected _consumerRequestConversation(args) → {Promise.<uuid>}

Represents how consumers create conversation

Parameters:
Name Type Description
args
skillId
context

View Source connection/connection-websocket-consumer.js, line 413

conversationId of the created conversation

Promise.<uuid>

# async createConversation(argsopt) → {Promise.<Conversation>}

Makes a request to UMS for a new conversation. Constructs a conversation object with the response information.

Parameters:
Name Type Attributes Description
args object <optional>
skillId string <optional>

creates this conversation in the specified skillId

context object <optional>

this data will be passed back in the notifications as conversationDetails.context

View Source connection/connection-websocket-consumer.js, line 381

  • the conversation object
Promise.<Conversation>

# async getToken() → {Promise.<(string|null)>}

Returns the token from this connection

View Source connection/connection-websocket-consumer.js, line 98

JWT token

Promise.<(string|null)>

# async mockStepUp(authConnectorId, customerName)

Trigger a mock step up on this connection. Only available in test environments.

Parameters:
Name Type Description
authConnectorId

the authenticated connectorId

customerName

the name to be included in the auth SDEs

View Source connection/connection-websocket-consumer.js, line 241

# async setUserProfile(data) → {Promise.<void>}

Allows an update of a subset of user profile fields

Parameters:
Name Type Attributes Description
data object
firstName string <optional>
lastName string <optional>
nickName string <optional>

View Source connection/connection-websocket-consumer.js, line 447

Promise.<void>

# async stepUp(authConnectorId, jwtClaimsSet)

Trigger a mock step up on this connection. Only available in test environments.

Parameters:
Name Type Description
authConnectorId

the authenticated connectorId

jwtClaimsSet Object

jwtClaimsSet created by createJwtClaimsSet

View Source connection/connection-websocket-consumer.js, line 260