Conversation class

A serializable pair of a ConversationReference and the JWT claims needed to authenticate proactive calls on behalf of this agent.

Instances are stored in and retrieved from the proactive storage backend. The identity getter produces the JwtPayload shape expected by adapter.continueConversation().

Constructors

Conversation(ConversationClaims, ConversationReference)

Creates a conversation from explicit claims and a conversation reference.

Conversation(TurnContext)

Creates a conversation from the current turn.

Properties

claims

Identity claims used to authenticate proactive operations.

identity

Returns a JwtPayload-compatible object for passing to adapter.continueConversation() as botAppIdOrIdentity.

reference

Reference used to resume the conversation.

Methods

toJson()

Returns a JSON string of { reference, claims } — suitable for use in HTTP request bodies when passing a conversation to another service.

validate()

Throws if any required field is missing. Called by Proactive.storeConversation() before writing to storage.

Constructor Details

Conversation(ConversationClaims, ConversationReference)

Creates a conversation from explicit claims and a conversation reference.

new Conversation(claims: ConversationClaims, reference: ConversationReference)

Parameters

claims
ConversationClaims

Claims used to authenticate proactive operations.

reference
ConversationReference

Reference used to resume the conversation.

Conversation(TurnContext)

Creates a conversation from the current turn.

new Conversation(context: TurnContext)

Parameters

context
TurnContext

Turn context from which to capture the reference and identity.

Property Details

claims

Identity claims used to authenticate proactive operations.

claims: ConversationClaims

Property Value

identity

Returns a JwtPayload-compatible object for passing to adapter.continueConversation() as botAppIdOrIdentity.

JwtPayload identity

Property Value

JwtPayload

reference

Reference used to resume the conversation.

reference: ConversationReference

Property Value

Method Details

toJson()

Returns a JSON string of { reference, claims } — suitable for use in HTTP request bodies when passing a conversation to another service.

function toJson(): string

Returns

string

validate()

Throws if any required field is missing. Called by Proactive.storeConversation() before writing to storage.

function validate()