@microsoft/teams.api package
Classes
Interfaces
Type Aliases
| $MessageActivity | |
| AIMessageEntity | |
| Account | |
| Action |
Defines values for Action. Possible values include: 'accept', 'decline' |
| Activity | |
| ActivityLike |
represents anything that can be transformed into an activity in an automated way |
| ActivityParams | |
| AdaptiveCardActionCardResponse |
The request was successfully processed, and the response includes an Adaptive Card that the client should display in place of the current one |
| AdaptiveCardActionErrorResponse |
|
| AdaptiveCardActionIncorrectAuthCodeResponse |
The authentication state passed by the client was incorrect and authentication failed |
| AdaptiveCardActionLoginResponse |
The client needs to prompt the user to authenticate |
| AdaptiveCardActionMessageResponse |
The request was successfully processed, and the response includes a message that the client should display |
| AdaptiveCardActionPreconditionFailedResponse |
The SSO authentication flow failed |
| AdaptiveCardActionResponse |
Defines the structure that is returned as the result of an Invoke activity with Name of 'adaptiveCard/action'. https://learn.microsoft.com/en-us/adaptive-cards/authoring-cards/universal-action-model#response-format |
| AdaptiveCardAuthentication |
Defines the structure that arrives in the Activity.Value.Authentication for Invoke activity with Name of 'adaptiveCard/action'. |
| AdaptiveCardInvokeAction |
Defines the structure that arrives in the Activity.Value.Action for Invoke activity with Name of 'adaptiveCard/action'. |
| AdaptiveCardInvokeActivity | |
| AdaptiveCardInvokeValue |
Defines the structure that arrives in the Activity.Value for Invoke activity with Name of 'adaptiveCard/action'. |
| AddMentionOptions |
options for adding a mention to an activity |
| AnimationCard |
An animation card (Ex: gif or short video clip) |
| AppBasedLinkQuery |
An interface representing AppBasedLinkQuery. Invoke request body type for app-based link query. |
| Attachment | |
| AttachmentLayout | |
| AudioCard |
Audio card |
| BaseTaskModuleTaskInfo |
An interface representing BaseTaskModuleTaskInfo. |
| BasicCard |
A basic card |
| CacheInfo |
A cache info object which notifies Teams how long an object should be cached for. |
| CardAction | |
| CardActionType | |
| CardAttachmentType | |
| CardAttachmentTypes | |
| CardImage |
An image on a card |
| CardTaskModuleTaskInfo |
An interface representing CardTaskModuleTaskInfo. |
| ChannelData |
An interface representing ChannelData. Channel data specific to messages received in Microsoft Teams |
| ChannelDataSettings |
Settings within teams channel data specific to messages received in Microsoft Teams. |
| ChannelID | |
| ChannelInfo |
An interface representing ChannelInfo. A channel info object which decribes the channel. |
| CitationAppearance | |
| CitationEntity | |
| CitationIconName | |
| CitationUsageInfo | |
| Claim | |
| ClientCredentials |
credentials for authentication
of an app via |
| ClientInfoEntity | |
| CommandActivity | |
| CommandResultValue |
The value field of a ICommandResultActivity contains metadata related to a command result. An optional extensible data payload may be included if defined by the command activity name. The presence of an error field indicates that the original command failed to complete. |
| CommandValue |
The value field of a ICommandActivity contains metadata related to a command. An optional extensible data payload may be included if defined by the command activity name. |
| ConfigAuth |
An interface the bot's authentication config for SuggestedActions |
| ConfigInvokeActivity | |
| ConfigResponse |
An interface container for the Config response payload |
| Conversation |
Conversation and its members |
| ConversationAccount | |
| ConversationActivity | |
| ConversationReference |
An object relating to a particular point in a conversation |
| ConversationResource |
A response containing a resource |
| CreateConversationParams | |
| Credentials |
credentials for app authentication |
| DeliveryMode | |
| EndOfConversationCode | |
| Entity | |
| ErrorResponse |
An HTTP API response |
| EventActivity | |
| ExchangeUserTokenParams | |
| FileConsentCard |
An interface representing FileConsentCard. File consent card attachment. |
| FileConsentCardResponse |
An interface representing FileConsentCardResponse. Represents the value of the invoke activity sent when the user acts on a file consent card |
| FileInfoCard |
An interface representing FileInfoCard. File info card. |
| FileUploadInfo |
An interface representing FileUploadInfo. Information about the file to be uploaded. |
| GetBotSignInResourceParams | |
| GetBotSignInUrlParams | |
| GetBotTokenResponse | |
| GetConversationsParams | |
| GetConversationsResponse | |
| GetUserAADTokenParams | |
| GetUserTokenParams | |
| GetUserTokenStatusParams | |
| HeroCard |
A Hero card (card with a single, large image) |
| HttpError |
Object representing error information |
| Importance | |
| InnerHttpError |
Object representing inner http error |
| InputHint | |
| InstallUpdateActivity | |
| InvokeActivity | |
| InvokeResponse |
Represents a response returned by a bot when it receives an This interface supports the framework and is not intended to be called directly for your code. |
| JsonWebTokenPayload | |
| MediaCard |
Media card |
| MediaUrl |
Media URL |
| Meeting |
An interface representing a Meeting. Meeting details. |
| MeetingDetails | |
| MeetingInfo |
General information about a Teams meeting. |
| MeetingParticipant |
An interface representing TeamsMeetingParticipant. Teams meeting participant detailing user Azure Active Directory details. |
| MembershipSource |
Interface representing a membership source. |
| MembershipSourceTypes |
The type of roster the user is a member of. |
| MembershipTypes |
The users relationship to the current channel. |
| MentionEntity | |
| Message |
An interface representing MessageActionsPayload. Represents the individual message within a chat or channel where a message actions is taken. |
| MessageApp |
An interface representing MessageActionsPayloadApp. Represents an application entity. |
| MessageBody |
An interface representing MessageActionsPayloadBody. Plaintext/HTML representation of the content of the message. |
| MessageConversation |
An interface representing MessageActionsPayloadConversation. Represents a team or channel entity. |
| MessageEntity | |
| MessageExtensionInvokeActivity | |
| MessageFrom |
An interface representing MessageActionsPayloadFrom. Represents a user, application, or conversation type that either sent or was referenced in a message. |
| MessageInvokeActivity | |
| MessageMention |
An interface representing MessageActionsPayloadMention. Represents the entity that was mentioned in the message. |
| MessageReaction | |
| MessageReactionType |
Defines values for ReactionType. Possible values include: 'like', 'heart', 'laugh', 'surprised', 'sad', 'angry' |
| MessageUser |
An interface representing MessageActionsPayloadUser. Represents a user entity. |
| MessagingExtensionAction |
An interface representing MessagingExtensionAction. Messaging extension action |
| MessagingExtensionActionResponse |
An interface representing MessagingExtensionActionResponse. Response of messaging extension action |
| MessagingExtensionAttachment |
An interface representing MessagingExtensionAttachment. Messaging extension attachment. |
| MessagingExtensionParameter |
An interface representing MessagingExtensionParameter. Messaging extension query parameters |
| MessagingExtensionQuery |
An interface representing MessagingExtensionQuery. Messaging extension query |
| MessagingExtensionQueryOptions |
An interface representing MessagingExtensionQueryOptions. Messaging extension query options |
| MessagingExtensionResponse |
An interface representing MessagingExtensionResponse. Messaging extension response |
| MessagingExtensionResult |
An interface representing MessagingExtensionResult. Messaging extension result |
| MessagingExtensionResultType |
Defines values for MessagingExtensionResultType. Possible values include: 'result', 'auth', 'config', 'message', 'botMessagePreview', 'silentAuth'. |
| MessagingExtensionSuggestedAction |
An interface representing MessagingExtensionSuggestedAction. Messaging extension Actions (Only when type is auth or config) |
| NotificationInfo |
An interface representing NotificationInfo. Specifies if a notification is to be sent for the mentions. |
| O365ConnectorCardActionQuery |
An interface representing O365ConnectorCardActionQuery. O365 connector card HttpPOST invoke query |
| OAuthCard |
A card representing a request to perform a sign in via OAuth |
| OnBehalfOf |
Represents information about a user on behalf of whom an action is performed. |
| Resource |
A response containing a resource ID |
| Role | |
| SensitiveUsage | |
| SensitiveUsageEntity | |
| SentActivity |
represents an activity that was sent |
| SignInExchangeToken | |
| SignInInvokeActivity | |
| SignInUrlResponse |
An interface representing SignInUrlResponse. |
| SignOutUserParams | |
| SigninCard |
A card representing a request to sign in |
| SigninStateVerifyQuery |
An interface representing SigninStateVerificationQuery. Signin state (part of signin action auth flow) verification invoke query |
| StreamInfoEntity | |
| StripMentionsTextOptions | |
| SuggestedActions | |
| TabContext |
Current tab request context, i.e., the current theme. |
| TabEntityContext |
Current TabRequest entity context, or 'tabEntityId'. |
| TabInvokeActivity | |
| TabRequest |
Invoke ('tab/fetch') request value payload. |
| TabResponse |
Envelope for Card Tab Response Payload. |
| TabResponseCard |
Envelope for cards for a Tab request. |
| TabResponseCards |
Envelope for cards for a TabResponse. |
| TabResponsePayload |
Payload for Tab Response. |
| TabSubmit |
Invoke ('tab/submit') request value payload. |
| TabSubmitData |
Invoke ('tab/submit') request value payload data. |
| TabSuggestedActions |
Tab SuggestedActions (Only when type is 'auth' or 'silentAuth'). |
| TaskInvokeActivity | |
| TaskModuleCardResponse |
Tab response to 'task/submit'. |
| TaskModuleContinueResponse |
An interface representing TaskModuleContinueResponse. Task Module Response with continue action. |
| TaskModuleMessageResponse |
An interface representing TaskModuleMessageResponse. Task Module response with message action. |
| TaskModuleRequest |
An interface representing TaskModuleRequest. Task module invoke request value payload |
| TaskModuleRequestContext |
An interface representing TaskModuleRequestContext. Current user context, i.e., the current theme |
| TaskModuleResponse |
An interface representing TaskModuleResponse. Envelope for Task Module Response. |
| TaskModuleTaskInfo |
An interface representing TaskModuleTaskInfo. Metadata for a Task Module. |
| TeamDetails |
An interface representing TeamDetails. Details related to a team |
| TeamInfo |
An interface representing TeamInfo. Describes a team |
| TenantInfo |
An interface representing TenantInfo. Describes a tenant |
| TextFormat | |
| ThumbnailCard |
A thumbnail card (card with a single, small thumbnail image) |
| ThumbnailUrl |
Thumbnail URL |
| TokenCredentials |
credentials for authentication of an app via any external auth method |
| TokenExchangeInvokeRequest |
A request to exchange a token. |
| TokenExchangeInvokeResponse |
The response object of a token exchange invoke. |
| TokenExchangeRequest |
An interface representing TokenExchangeRequest. |
| TokenExchangeResource |
An interface representing TokenExchangeResource. |
| TokenExchangeState |
State object passed to the bot token service. |
| TokenPostResource |
An interface representing TokenPostResource. |
| TokenRequest |
A request to receive a user token |
| TokenResponse |
A response that includes a user token |
| TokenStatus |
The status of a particular token. |
| UrlTaskModuleTaskInfo |
An interface representing UrlTaskModuleTaskInfo. |
| VideoCard |
Video card |
Functions
| card |
|
| strip |
remove "<at>...</at>" text from an activity |
Function Details
cardAttachment<T>(T, CardAttachmentTypes[T]["content"])
function cardAttachment<T>(type: T, content: CardAttachmentTypes[T]["content"]): CardAttachmentTypes[T]
Parameters
- type
-
T
- content
-
CardAttachmentTypes[T]["content"]
Returns
CardAttachmentTypes[T]
stripMentionsText<TActivity>(TActivity, StripMentionsTextOptions)
remove "<at>...</at>" text from an activity
function stripMentionsText<TActivity>(activity: TActivity, __namedParameters?: StripMentionsTextOptions): TActivity["text"]
Parameters
- activity
-
TActivity
the activity
- __namedParameters
- StripMentionsTextOptions
Returns
TActivity["text"]