Activity class
Represents an activity in a conversation.
Constructors
| Activity(string) | Creates a new Activity instance. | 
Properties
| action | The action associated with the activity. | 
| attachment | The attachment layout of the activity. | 
| attachments | The attachments of the activity. | 
| caller | The caller ID of the activity. | 
| channel | The channel-specific data for the activity. | 
| channel | The channel ID where the activity originated. | 
| code | The end-of-conversation code for the activity. | 
| conversation | The conversation account associated with the activity. | 
| delivery | The delivery mode of the activity. | 
| entities | The entities associated with the activity. | 
| expiration | The expiration time of the activity. | 
| from | The account of the sender of the activity. | 
| history | Indicates whether the history is disclosed. | 
| id | The unique identifier of the activity. | 
| importance | The importance of the activity. | 
| input | The input hint for the activity. | 
| label | The label for the activity. | 
| listen | The list of keywords to listen for in the activity. | 
| locale | The locale of the activity. | 
| local | The local timestamp of the activity. | 
| local | The local timezone of the activity. | 
| members | The members added to the conversation. | 
| members | The members removed from the conversation. | 
| name | The name of the activity event. | 
| raw | The raw expiration time of the activity. | 
| raw | The raw local timestamp of the activity. | 
| raw | The raw timestamp of the activity. | 
| reactions | The reactions added to the activity. | 
| reactions | The reactions removed from the activity. | 
| recipient | The recipient of the activity. | 
| relates | The conversation reference for the activity. | 
| reply | The ID of the activity being replied to. | 
| semantic | The semantic action associated with the activity. | 
| service | The service URL of the activity. | 
| speak | The speech text of the activity. | 
| suggested | The suggested actions for the activity. | 
| summary | The summary of the activity. | 
| text | The text content of the activity. | 
| text | The text format of the activity. | 
| text | The text highlights in the activity. | 
| timestamp | The timestamp of the activity. | 
| topic | The topic name of the activity. | 
| type | The type of the activity. | 
| value | The value associated with the activity. | 
| value | The value type of the activity. | 
Methods
| apply | Applies a conversation reference to the activity. | 
| clone() | |
| from | Creates an Activity instance from a JSON string. | 
| from | Creates an Activity instance from an object. | 
| get | Creates a continuation activity from a conversation reference. | 
| get | Gets the conversation reference for the activity. | 
| get | Gets the mentions in the activity. | 
| get | Gets the conversation reference for a reply. | 
| normalize | Normalizes mentions in the activity by removing mention tags and optionally removing recipient mention. | 
| remove | Removes the mention text for a given ID. | 
| remove | Removes the recipient mention from the activity text. | 
| to | 
Constructor Details
Activity(string)
Creates a new Activity instance.
new Activity(t: string)Parameters
- t
- 
				string 
The type of the activity.
Property Details
action
The action associated with the activity.
action?: stringProperty Value
string
		attachmentLayout
	 
	The attachment layout of the activity.
attachmentLayout?: stringProperty Value
string
attachments
		callerId
	 
	The caller ID of the activity.
callerId?: stringProperty Value
string
		channelData
	 
	The channel-specific data for the activity.
channelData?: anyProperty Value
any
		channelId
	 
	The channel ID where the activity originated.
channelId?: stringProperty Value
string
code
The end-of-conversation code for the activity.
code?: stringProperty Value
string
conversation
The conversation account associated with the activity.
conversation?: ConversationAccountProperty Value
		deliveryMode
	 
	The delivery mode of the activity.
deliveryMode?: stringProperty Value
string
entities
expiration
The expiration time of the activity.
expiration?: string | DateProperty Value
string | Date
from
		historyDisclosed
	 
	Indicates whether the history is disclosed.
historyDisclosed?: booleanProperty Value
boolean
id
The unique identifier of the activity.
id?: stringProperty Value
string
importance
The importance of the activity.
importance?: stringProperty Value
string
		inputHint
	 
	The input hint for the activity.
inputHint?: stringProperty Value
string
label
The label for the activity.
label?: stringProperty Value
string
		listenFor
	 
	The list of keywords to listen for in the activity.
listenFor?: string[]Property Value
string[]
locale
The locale of the activity.
locale?: stringProperty Value
string
		localTimestamp
	 
	The local timestamp of the activity.
localTimestamp?: string | DateProperty Value
string | Date
		localTimezone
	 
	The local timezone of the activity.
localTimezone?: stringProperty Value
string
		membersAdded
	 
	The members added to the conversation.
membersAdded?: ChannelAccount[]Property Value
		membersRemoved
	 
	The members removed from the conversation.
membersRemoved?: ChannelAccount[]Property Value
name
The name of the activity event.
name?: stringProperty Value
string
		rawExpiration
	 
	The raw expiration time of the activity.
rawExpiration?: stringProperty Value
string
		rawLocalTimestamp
	  
	The raw local timestamp of the activity.
rawLocalTimestamp?: stringProperty Value
string
		rawTimestamp
	 
	The raw timestamp of the activity.
rawTimestamp?: stringProperty Value
string
		reactionsAdded
	 
	The reactions added to the activity.
reactionsAdded?: MessageReaction[]Property Value
		reactionsRemoved
	 
	The reactions removed from the activity.
reactionsRemoved?: MessageReaction[]Property Value
recipient
		relatesTo
	 
	The conversation reference for the activity.
relatesTo?: ConversationReferenceProperty Value
		replyToId
	 
	The ID of the activity being replied to.
replyToId?: stringProperty Value
string
		semanticAction
	 
	The semantic action associated with the activity.
semanticAction?: SemanticActionProperty Value
		serviceUrl
	 
	The service URL of the activity.
serviceUrl?: stringProperty Value
string
speak
The speech text of the activity.
speak?: stringProperty Value
string
		suggestedActions
	 
	The suggested actions for the activity.
suggestedActions?: SuggestedActionsProperty Value
summary
The summary of the activity.
summary?: stringProperty Value
string
text
The text content of the activity.
text?: stringProperty Value
string
		textFormat
	 
	The text format of the activity.
textFormat?: stringProperty Value
string
		textHighlights
	 
	The text highlights in the activity.
textHighlights?: TextHighlight[]Property Value
timestamp
The timestamp of the activity.
timestamp?: string | DateProperty Value
string | Date
		topicName
	 
	The topic name of the activity.
topicName?: stringProperty Value
string
type
The type of the activity.
type: stringProperty Value
string
value
The value associated with the activity.
value?: unknownProperty Value
unknown
		valueType
	 
	The value type of the activity.
valueType?: stringProperty Value
string
Method Details
		applyConversationReference(ConversationReference, boolean)
	   
	Applies a conversation reference to the activity.
function applyConversationReference(reference: ConversationReference, isIncoming?: boolean): ActivityParameters
- reference
- ConversationReference
The conversation reference.
- isIncoming
- 
				boolean 
Whether the activity is incoming.
Returns
The updated activity.
clone()
		fromJson(string)
	 
	Creates an Activity instance from a JSON string.
static function fromJson(json: string): ActivityParameters
- json
- 
				string 
The JSON string representing the activity.
Returns
The created Activity instance.
		fromObject(object)
	 
	Creates an Activity instance from an object.
static function fromObject(o: object): ActivityParameters
- o
- 
				object 
The object representing the activity.
Returns
The created Activity instance.
		getContinuationActivity(ConversationReference)
	   
	Creates a continuation activity from a conversation reference.
static function getContinuationActivity(reference: ConversationReference): ActivityParameters
- reference
- ConversationReference
The conversation reference.
Returns
The created continuation activity.
		getConversationReference()
	  
	Gets the conversation reference for the activity.
function getConversationReference(): ConversationReferenceReturns
The conversation reference.
		getMentions(Activity)
	 
	
		getReplyConversationReference(string)
	   
	Gets the conversation reference for a reply.
function getReplyConversationReference(replyId: string): ConversationReferenceParameters
- replyId
- 
				string 
The ID of the reply.
Returns
The conversation reference.
		normalizeMentions(boolean)
	 
	Normalizes mentions in the activity by removing mention tags and optionally removing recipient mention.
function normalizeMentions(removeMention?: boolean)Parameters
- removeMention
- 
				boolean 
Whether to remove the recipient mention from the activity.
		removeMentionText(string)
	  
	Removes the mention text for a given ID.
function removeMentionText(id: string): stringParameters
- id
- 
				string 
The ID of the mention to remove.
Returns
string
The updated text.
		removeRecipientMention()
	  
	Removes the recipient mention from the activity text.
function removeRecipientMention(): stringReturns
string
The updated text.
		toJsonString()
	  
	function toJsonString(): stringReturns
string