@microsoft/teams.api
Version:
<p> <a href="https://www.npmjs.com/package/@microsoft/teams.api" target="_blank"> <img src="https://img.shields.io/npm/v/@microsoft/teams.api/latest" /> </a> <a href="https://www.npmjs.com/package/@microsoft/teams.api?activeTab=code" t
1 lines • 30.5 kB
Source Map (JSON)
{"version":3,"sources":["../../../src/activities/message/message.ts"],"names":[],"mappings":";;;;AAiKO,MAAM,6BAA6B,aAAA,CAA0D;AAAA;AAAA;AAAA;AAAA,EAIlG,IAAA;AAAA;AAAA;AAAA;AAAA,EAKA,UAAA;AAAA;AAAA;AAAA;AAAA,EAKA,gBAAA;AAAA;AAAA;AAAA;AAAA,EAKA,WAAA;AAAA;AAAA;AAAA;AAAA,EAKA,gBAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,WAAA,CAAY,IAAA,GAAe,EAAA,EAAI,KAAA,GAAqC,EAAC,EAAG;AACtE,IAAA,KAAA,CAAM,SAAS,CAAA;AAEf,IAAA,MAAM,EAAE,IAAA,EAAM,KAAA,EAAO,MAAM,KAAA,EAAO,GAAG,QAAO,GAAI,KAAA;AAEhD,IAAA,MAAA,CAAO,MAAA,CAAO,IAAA,EAAM,MAAA,EAAQ,EAAE,MAAM,CAAA;AAAA,EACtC;AAAA,EASA,OAAO,KAAK,QAAA,EAAoD;AAC9D,IAAA,MAAM,IAAA,GAAO,SAAS,IAAA,IAAQ,EAAA;AAC9B,IAAA,MAAM;AAAA,MACJ,IAAA,EAAM,KAAA;AAAA,MACN,IAAA,EAAM,KAAA;AAAA,MACN,IAAA,EAAM,KAAA;AAAA,MACN,YAAA,EAAc,aAAA;AAAA,MACd,SAAA,EAAW,UAAA;AAAA,MACX,UAAA,EAAY,WAAA;AAAA,MACZ,SAAA,EAAW,UAAA;AAAA,MACX,cAAA,EAAgB,eAAA;AAAA,MAChB,SAAA,EAAW,UAAA;AAAA,MACX,iBAAA,EAAmB,kBAAA;AAAA,MACnB,oBAAA,EAAsB,qBAAA;AAAA,MACtB,iBAAA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;AAClC,IAAA,IAAA,CAAK,OAAO,OAAA,GAAU,CAAA,EAAG,WAAW,CAAA,CAAA,EAAI,IAAA,CAAK,IAAI,CAAA,CAAA,GAAK,WAAA;AACtD,IAAA,OAAO,IAAA;AAAA,EACT;AACF","file":"message.mjs","sourcesContent":["import {\n Account,\n Attachment,\n AttachmentLayout,\n cardAttachment,\n CardAttachmentType,\n CardAttachmentTypes,\n DeliveryMode,\n Importance,\n InputHint,\n MentionEntity,\n QuotedReplyEntity,\n SuggestedActions,\n TextFormat,\n} from '../../models';\nimport { Activity, ActivityInput, IActivity, IActivityInput } from '../activity';\nimport { stripMentionsText, StripMentionsTextOptions } from '../utils';\n\nexport interface IMessageActivity extends IActivity<'message'> {\n /**\n * The text content of the message.\n */\n text: string;\n\n /**\n * The text to speak.\n * @deprecated This will be removed by end of summer 2026.\n */\n speak?: string;\n\n /**\n * Indicates whether your bot is accepting,\n * expecting, or ignoring user input after the message is delivered to the client. Possible\n * values include: 'acceptingInput', 'ignoringInput', 'expectingInput'\n * @deprecated This will be removed by end of summer 2026.\n */\n inputHint?: InputHint;\n\n /**\n * The text to display if the channel cannot render cards.\n */\n summary?: string;\n\n /**\n * Format of text fields Default:markdown. Possible values include: 'markdown', 'plain', 'xml', 'extendedmarkdown'. See {@link TextFormat} for all values\n */\n textFormat?: TextFormat;\n\n /**\n * The layout hint for multiple attachments. Default: list. Possible values include: 'list',\n * 'carousel'\n */\n attachmentLayout?: AttachmentLayout;\n\n /**\n * Attachments\n */\n attachments?: Attachment[];\n\n /**\n * The suggested actions for the activity.\n */\n suggestedActions?: SuggestedActions;\n\n /**\n * The importance of the activity. Possible values include: 'low', 'normal', 'high'\n * @deprecated This will be removed by end of summer 2026.\n */\n importance?: Importance;\n\n /**\n * A delivery hint to signal to the recipient alternate delivery paths for the activity.\n * The default delivery mode is \"default\". Possible values include: 'normal', 'notification'\n */\n deliveryMode?: DeliveryMode;\n\n /**\n * The time at which the activity should be considered to be \"expired\" and should not be\n * presented to the recipient.\n * @deprecated This will be removed by end of summer 2026.\n */\n expiration?: Date;\n\n /**\n * A value that is associated with the activity.\n */\n value?: any;\n\n /**\n * remove \"\\<at>...\\</at>\" text from an activity\n */\n stripMentionsText(options?: StripMentionsTextOptions): IMessageActivity;\n\n /**\n * is the recipient account mentioned\n */\n isRecipientMentioned(): boolean;\n\n /**\n * get a mention by the account id if exists\n */\n getAccountMention(accountId: string): MentionEntity | undefined;\n\n /**\n * get all quoted reply entities from this message\n */\n getQuotedMessages(): QuotedReplyEntity[];\n}\n\n/**\n * OUTBOUND message activity — what the app SENDS.\n *\n * All server-populated base fields optional (via {@link IActivityInput}) and the\n * message-specific fields optional too, so both a plain `{ type: 'message', text }`\n * literal and a {@link MessageActivityInput} builder instance are assignable. The message\n * fields are copied here instead of derived from {@link IMessageActivity}, keeping the\n * outbound input shape independent from the inbound activity interface. Use\n * {@link MessageActivityInputOptions} to include unmodeled extension fields when constructing\n * a {@link MessageActivityInput}.\n */\nexport interface IMessageActivityInput extends IActivityInput<'message'> {\n /**\n * Message text.\n */\n text?: string;\n\n /**\n * Format of the message text.\n */\n textFormat?: TextFormat;\n\n /**\n * Layout hint for multiple attachments.\n */\n attachmentLayout?: AttachmentLayout;\n\n /**\n * Attachments sent with the message.\n */\n attachments?: Attachment[];\n\n /**\n * Suggested actions presented with the message.\n */\n suggestedActions?: SuggestedActions;\n}\n\n/**\n * Constructor fields for {@link MessageActivityInput}.\n *\n * This accepts modeled outbound message fields plus channel/service extension fields that\n * should serialize at the top level of the outbound activity payload. The constructor owns\n * the `type` discriminator and message `text`; pass text as the first constructor argument\n * or set it with {@link MessageActivityInput.withText}.\n */\nexport type MessageActivityInputOptions = Omit<Partial<IMessageActivityInput>, 'type' | 'text'> &\n Record<string, unknown>;\n\n/**\n * Builder for outbound message activities.\n */\nexport class MessageActivityInput extends ActivityInput<'message'> implements IMessageActivityInput {\n /**\n * Message text.\n */\n text?: string;\n\n /**\n * Format of the message text.\n */\n textFormat?: TextFormat;\n\n /**\n * Layout hint for multiple attachments.\n */\n attachmentLayout?: AttachmentLayout;\n\n /**\n * Attachments sent with the message.\n */\n attachments?: Attachment[];\n\n /**\n * Suggested actions presented with the message.\n */\n suggestedActions?: SuggestedActions;\n\n /**\n * Create an outbound message activity input.\n * @param text - Initial message text.\n * @param value - Initial modeled input fields and unmodeled extension fields to serialize.\n */\n constructor(text: string = '', value: MessageActivityInputOptions = {}) {\n super('message');\n\n const { type: _type, text: _text, ...fields } = value;\n\n Object.assign(this, fields, { text });\n }\n\n /**\n * Copy outbound-safe fields from a message-like activity input.\n * @param activity - Message input to copy.\n */\n static from(activity: IMessageActivity): MessageActivityInput;\n static from(activity: IMessageActivityInput): MessageActivityInput;\n static from(activity: IMessageActivity | IMessageActivityInput): MessageActivityInput;\n static from(activity: IMessageActivity | IMessageActivityInput) {\n const text = activity.text ?? '';\n const {\n type: _type,\n text: _text,\n from: _from,\n conversation: _conversation,\n channelId: _channelId,\n serviceUrl: _serviceUrl,\n timestamp: _timestamp,\n localTimestamp: _localTimestamp,\n relatesTo: _relatesTo,\n stripMentionsText: _stripMentionsText,\n isRecipientMentioned: _isRecipientMentioned,\n getAccountMention: _getAccountMention,\n getQuotedMessages: _getQuotedMessages,\n ...value\n } = activity as Partial<IMessageActivity> & Record<string, unknown>;\n\n return new MessageActivityInput(text, value);\n }\n\n /**\n * Set the message text.\n * @param value - Message text.\n */\n withText(value: string) {\n this.text = value;\n return this;\n }\n\n /**\n * Append text to the message.\n * @param value - Text to append.\n */\n addText(value: string) {\n this.text = `${this.text || ''}${value}`;\n return this;\n }\n\n /**\n * Set the message text format.\n * @param value - Text format.\n */\n withTextFormat(value: TextFormat) {\n this.textFormat = value;\n return this;\n }\n\n /**\n * Set the attachment layout.\n * @param value - Attachment layout.\n */\n withAttachmentLayout(value: AttachmentLayout) {\n this.attachmentLayout = value;\n return this;\n }\n\n /**\n * Set suggested actions for the message.\n * @param value - Suggested actions.\n */\n withSuggestedActions(value: SuggestedActions) {\n this.suggestedActions = value;\n return this;\n }\n\n /**\n * Add attachments to the message.\n * @param value - Attachments to add.\n */\n addAttachments(...value: Attachment[]) {\n if (!this.attachments) {\n this.attachments = [];\n }\n\n this.attachments.push(...value);\n return this;\n }\n\n /**\n * Add a card attachment to the message.\n * @param type - Card attachment type.\n * @param content - Card content.\n */\n addCard<T extends CardAttachmentType>(type: T, content: CardAttachmentTypes[T]['content']) {\n return this.addAttachments(cardAttachment(type, content));\n }\n\n /**\n * Add a mention entity and optionally append mention text.\n * @param account - Account being mentioned.\n * @param options - Mention options.\n */\n addMention(account: Account, options: AddMentionOptions = {}) {\n const text = options.text || account.name;\n\n if (options.addText !== false) {\n this.addText(`<at>${text}</at>`);\n }\n\n return this.addEntity({\n type: 'mention',\n mentioned: account,\n text: `<at>${text}</at>`,\n });\n }\n\n /**\n * Mark the message as the final activity in a stream.\n *\n * The final carries no `streamSequence`. Teams documents the sequence as required on every streaming\n * request except this one: \"For the final message, `streamSequence` must not be set.\"\n * https://learn.microsoft.com/en-us/microsoftteams/platform/bots/streaming-ux#stream-message-through-rest-api\n */\n addStreamFinal() {\n if (!this.channelData) {\n this.channelData = {};\n }\n\n const streamId = this.channelData.streamId || this.id || '';\n\n this.channelData.streamId = streamId;\n this.channelData.streamType = 'final';\n delete this.channelData.streamSequence;\n\n this.addEntity({\n type: 'streaminfo',\n streamId,\n streamType: 'final',\n });\n\n return this;\n }\n\n /**\n * Add a quoted message reference and append a `<quoted messageId=\"...\"/>` placeholder to text.\n * Teams renders the quoted message as a preview bubble above the response text.\n * If text is provided, it is appended to the quoted message placeholder.\n * @param messageId - The ID of the message to quote\n * @param text - Optional text, appended to the quoted message placeholder\n * @returns this instance for chaining\n */\n addQuote(messageId: string, text?: string): this {\n if (!this.entities) {\n this.entities = [];\n }\n this.entities.push({\n type: 'quotedReply',\n quotedReply: { messageId },\n });\n this.addText(`<quoted messageId=\"${messageId}\"/>`);\n if (text) {\n this.addText(` ${text}`);\n }\n return this;\n }\n\n /**\n * Prepend a quotedReply entity and `<quoted messageId=\"...\"/>` placeholder\n * before existing text. Used by reply()/quote() for quote-above-response.\n * @param messageId - The IC3 message ID of the message to quote\n */\n prependQuote(messageId: string): this {\n if (!this.entities) {\n this.entities = [];\n }\n this.entities.push({\n type: 'quotedReply',\n quotedReply: { messageId },\n });\n const placeholder = `<quoted messageId=\"${messageId}\"/>`;\n const hasText = !!this.text?.trim();\n this.text = hasText ? `${placeholder} ${this.text}` : placeholder;\n return this;\n }\n}\n\n// Extends the full inbound Activity shape for backcompat; send() converts instances to MessageActivityInput.\nexport class MessageActivity extends Activity<'message'> implements IMessageActivity {\n /**\n * The text content of the message.\n */\n text!: string;\n\n /**\n * The text to speak.\n * @deprecated This will be removed by end of summer 2026.\n */\n speak?: string;\n\n /**\n * Indicates whether your bot is accepting,\n * expecting, or ignoring user input after the message is delivered to the client. Possible\n * values include: 'acceptingInput', 'ignoringInput', 'expectingInput'\n * @deprecated This will be removed by end of summer 2026.\n */\n inputHint?: InputHint;\n\n /**\n * The text to display if the channel cannot render cards.\n */\n summary?: string;\n\n /**\n * Format of text fields Default:markdown. Possible values include: 'markdown', 'plain', 'xml', 'extendedmarkdown'. See {@link TextFormat} for all values\n */\n textFormat?: TextFormat;\n\n /**\n * The layout hint for multiple attachments. Default: list. Possible values include: 'list',\n * 'carousel'\n */\n attachmentLayout?: AttachmentLayout;\n\n /**\n * Attachments\n */\n attachments?: Attachment[];\n\n /**\n * The suggested actions for the activity.\n */\n suggestedActions?: SuggestedActions;\n\n /**\n * The importance of the activity. Possible values include: 'low', 'normal', 'high'\n * @deprecated This will be removed by end of summer 2026.\n */\n importance?: Importance;\n\n /**\n * A delivery hint to signal to the recipient alternate delivery paths for the activity.\n * The default delivery mode is \"default\". Possible values include: 'normal', 'notification'\n */\n deliveryMode?: DeliveryMode;\n\n /**\n * The time at which the activity should be considered to be \"expired\" and should not be\n * presented to the recipient.\n * @deprecated This will be removed by end of summer 2026.\n */\n expiration?: Date;\n\n /**\n * A value that is associated with the activity.\n */\n value?: any;\n\n constructor(text: string = '', value: Omit<Partial<IMessageActivity>, 'type'> = {}) {\n super({\n ...value,\n type: 'message',\n });\n\n Object.assign(this, { text, ...value });\n }\n\n /**\n * initialize from interface\n */\n static from(activity: IMessageActivity) {\n return new MessageActivity(activity.text, activity);\n }\n\n /**\n * convert to interface\n */\n toInterface(): IMessageActivity {\n return Object.assign(\n {\n stripMentionsText: this.stripMentionsText.bind(this),\n isRecipientMentioned: this.isRecipientMentioned.bind(this),\n getAccountMention: this.getAccountMention.bind(this),\n getQuotedMessages: this.getQuotedMessages.bind(this),\n },\n this\n );\n }\n\n /**\n * copy to a new instance\n */\n clone(options: Omit<Partial<IMessageActivity>, 'type'> = {}) {\n return new MessageActivity(this.text, {\n ...this.toInterface(),\n ...options,\n });\n }\n\n /**\n * The text content of the message.\n */\n withText(value: string) {\n this.text = value;\n return this;\n }\n\n /**\n * The text to speak.\n * @deprecated This will be removed by end of summer 2026.\n */\n withSpeak(value: string) {\n this.speak = value;\n return this;\n }\n\n /**\n * Indicates whether your bot is accepting,\n * expecting, or ignoring user input after the message is delivered to the client. Possible\n * values include: 'acceptingInput', 'ignoringInput', 'expectingInput'\n * @deprecated This will be removed by end of summer 2026.\n */\n withInputHint(value: InputHint) {\n this.inputHint = value;\n return this;\n }\n\n /**\n * The text to display if the channel cannot render cards.\n */\n withSummary(value: string) {\n this.summary = value;\n return this;\n }\n\n /**\n * Format of text fields Default:markdown. Possible values include: 'markdown', 'plain', 'xml', 'extendedmarkdown'. See {@link TextFormat} for all values\n */\n withTextFormat(value: TextFormat) {\n this.textFormat = value;\n return this;\n }\n\n /**\n * The layout hint for multiple attachments. Default: list. Possible values include: 'list',\n * 'carousel'\n */\n withAttachmentLayout(value: AttachmentLayout) {\n this.attachmentLayout = value;\n return this;\n }\n\n /**\n * The suggested actions for the activity.\n */\n withSuggestedActions(value: SuggestedActions) {\n this.suggestedActions = value;\n return this;\n }\n\n /**\n * The importance of the activity. Possible values include: 'low', 'normal', 'high'\n * @deprecated This will be removed by end of summer 2026.\n */\n withImportance(value: Importance) {\n this.importance = value;\n return this;\n }\n\n /**\n * A delivery hint to signal to the recipient alternate delivery paths for the activity.\n * The default delivery mode is \"default\". Possible values include: 'normal', 'notification'\n */\n withDeliveryMode(value: DeliveryMode) {\n this.deliveryMode = value;\n return this;\n }\n\n /**\n * The time at which the activity should be considered to be \"expired\" and should not be\n * presented to the recipient.\n * @deprecated This will be removed by end of summer 2026.\n */\n withExpiration(value: Date) {\n this.expiration = value;\n return this;\n }\n\n /**\n * Append text\n */\n addText(text: string) {\n this.text += text;\n return this;\n }\n\n /**\n * Attachments\n */\n addAttachments(...value: Attachment[]) {\n if (!this.attachments) {\n this.attachments = [];\n }\n\n this.attachments.push(...value);\n return this;\n }\n\n /**\n * `@mention` an account\n * @param account the account to mention\n * @param options options to customize the mention\n */\n addMention(account: Account, options: AddMentionOptions = {}) {\n const text = options.text || account.name;\n const addText = options.addText ?? true;\n\n if (addText) {\n this.addText(`<at>${text}</at>`);\n }\n\n return this.addEntity({\n type: 'mention',\n mentioned: account,\n text: `<at>${text}</at>`,\n });\n }\n\n /**\n * Add a card attachment\n */\n addCard<T extends CardAttachmentType>(type: T, content: CardAttachmentTypes[T]['content']) {\n return this.addAttachments(cardAttachment(type, content));\n }\n\n /**\n * remove \"\\<at>...\\</at>\" text from an activity\n */\n stripMentionsText(options: StripMentionsTextOptions = {}) {\n this.text = stripMentionsText(this, options);\n return this;\n }\n\n /**\n * is the recipient account mentioned\n */\n isRecipientMentioned() {\n return (this.entities || [])\n .filter((e) => e.type === 'mention')\n .some((e) => e.mentioned.id === this.recipient.id);\n }\n\n /**\n * get a mention by the account id if exists\n */\n getAccountMention(accountId: string) {\n return (this.entities || [])\n .filter((e) => e.type === 'mention')\n .find((e) => e.mentioned.id === accountId);\n }\n\n /**\n * get all quoted reply entities from this message\n */\n getQuotedMessages(): QuotedReplyEntity[] {\n return (this.entities ?? []).filter(\n (e): e is QuotedReplyEntity => e.type === 'quotedReply'\n );\n }\n\n /**\n * Add stream info, making\n * this a final stream message\n */\n addStreamFinal() {\n if (!this.channelData) {\n this.channelData = {};\n }\n\n this.channelData.streamId = this.id;\n this.channelData.streamType = 'final';\n\n return this.addEntity({\n type: 'streaminfo',\n streamId: this.id,\n streamType: 'final',\n });\n }\n\n /**\n * Set the recipient of this message, optionally marking it as a targeted (ephemeral) message.\n * Targeted messages are only visible to the specified recipient in a shared conversation.\n * @param account - The recipient account\n * @param isTargeted - If true, marks this as a targeted message visible only to the recipient\n * @returns this instance for chaining\n */\n withRecipient(account: Account, isTargeted: boolean = false): this {\n super.withRecipient(account, isTargeted);\n return this;\n }\n\n /**\n * Add a quoted message reference and append a `<quoted messageId=\"...\"/>` placeholder to text.\n * Teams renders the quoted message as a preview bubble above the response text.\n * If text is provided, it is appended to the quoted message placeholder.\n * @param messageId - The ID of the message to quote\n * @param text - Optional text, appended to the quoted message placeholder\n * @returns this instance for chaining\n */\n addQuote(messageId: string, text?: string): this {\n if (!this.entities) {\n this.entities = [];\n }\n this.entities.push({\n type: 'quotedReply',\n quotedReply: { messageId },\n });\n this.addText(`<quoted messageId=\"${messageId}\"/>`);\n if (text) {\n this.addText(` ${text}`);\n }\n return this;\n }\n\n /**\n * Prepend a quotedReply entity and `<quoted messageId=\"...\"/>` placeholder\n * before existing text. Used by reply()/quote() for quote-above-response.\n * @param messageId - The IC3 message ID of the message to quote\n */\n prependQuote(messageId: string): this {\n if (!this.entities) {\n this.entities = [];\n }\n this.entities.push({\n type: 'quotedReply',\n quotedReply: { messageId },\n });\n const placeholder = `<quoted messageId=\"${messageId}\"/>`;\n const hasText = !!this.text?.trim();\n this.text = hasText ? `${placeholder} ${this.text}` : placeholder;\n return this;\n }\n}\n\n/**\n * options for adding a mention\n * to an activity\n */\nexport type AddMentionOptions = {\n /**\n * if `true`, append the mention `text` to the `activity.text`\n * @default true\n */\n readonly addText?: boolean;\n\n /**\n * the `text` to use for the mention\n *\n * @default `account.name`\n * @remark\n * this text should not include `<at>` or `</at>`\n */\n readonly text?: string;\n};\n"]}