ConversationReferenceBuilder class
Fluent builder for ConversationReference.
Methods
| build() | Builds and returns the |
| create(string, string, string) | Creates a new builder seeded with the agent identity and channel.
On Teams, the agent id is prefixed with |
| service |
Returns the default service URL for a channel.
Teams returns the public global endpoint; all other channels use the
|
| with |
Sets |
| with |
Sets |
| with |
Sets |
| with |
Sets |
| with |
Sets |
| with |
Sets |
| with |
Sets |
| with |
Sets |
Method Details
build()
Builds and returns the ConversationReference.
function build(): ConversationReference
Returns
create(string, string, string)
Creates a new builder seeded with the agent identity and channel.
On Teams, the agent id is prefixed with 28: automatically.
static function create(agentClientId: string, channelId: string, serviceUrl?: string): ConversationReferenceBuilder
Parameters
- agentClientId
-
string
The agent's client (app) ID.
- channelId
-
string
The target channel (e.g. 'msteams', 'webchat').
- serviceUrl
-
string
Optional override. If omitted, build() fills in the
channel default via serviceUrlForChannel().
Returns
serviceUrlForChannel(string)
Returns the default service URL for a channel.
Teams returns the public global endpoint; all other channels use the
https://{channelId}.botframework.com/ pattern (matching C# behavior).
static function serviceUrlForChannel(channelId: string): string
Parameters
- channelId
-
string
Returns
string
withActivityId(string)
Sets reference.activityId.
function withActivityId(activityId: string): ConversationReferenceBuilder
Parameters
- activityId
-
string
Returns
withAgent(ChannelAccount)
Sets reference.agent from a full ChannelAccount.
function withAgent(account: ChannelAccount): ConversationReferenceBuilder
Parameters
- account
- ChannelAccount
Returns
withAgent(string, string)
Sets reference.agent from an id + optional name. Role defaults to RoleTypes.Agent. On Teams, id is prefixed with 28:.
function withAgent(agentClientId: string, agentName?: string): ConversationReferenceBuilder
Parameters
- agentClientId
-
string
- agentName
-
string
Returns
withConversationId(string)
Sets reference.conversation.id.
function withConversationId(id: string): ConversationReferenceBuilder
Parameters
- id
-
string
Returns
withLocale(string)
Sets reference.locale.
function withLocale(locale: string): ConversationReferenceBuilder
Parameters
- locale
-
string
Returns
withServiceUrl(string)
Sets reference.serviceUrl.
function withServiceUrl(serviceUrl: string): ConversationReferenceBuilder
Parameters
- serviceUrl
-
string
Returns
withUser(ChannelAccount)
Sets reference.user from a full ChannelAccount.
function withUser(account: ChannelAccount): ConversationReferenceBuilder
Parameters
- account
- ChannelAccount
Returns
withUser(string, string)
Sets reference.user from an id + optional name. Role defaults to RoleTypes.User.
function withUser(userId: string, userName?: string): ConversationReferenceBuilder
Parameters
- userId
-
string
- userName
-
string