@microsoft/teams.api 2.0.6-preview.1 → 2.0.6-preview.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/activities/activity.d.mts +15 -1
- package/dist/activities/activity.d.ts +15 -1
- package/dist/activities/activity.js +12 -1
- package/dist/activities/activity.js.map +1 -1
- package/dist/activities/activity.mjs +12 -1
- package/dist/activities/activity.mjs.map +1 -1
- package/dist/activities/index.d.mts +2 -2
- package/dist/activities/index.d.ts +2 -2
- package/dist/activities/invoke/index.d.mts +2 -2
- package/dist/activities/invoke/index.d.ts +2 -2
- package/dist/activities/invoke/message-extension/fetch-task.d.mts +2 -2
- package/dist/activities/invoke/message-extension/fetch-task.d.ts +2 -2
- package/dist/activities/invoke/message-extension/index.d.mts +2 -2
- package/dist/activities/invoke/message-extension/index.d.ts +2 -2
- package/dist/activities/invoke/message-extension/submit-action.d.mts +2 -2
- package/dist/activities/invoke/message-extension/submit-action.d.ts +2 -2
- package/dist/activities/message/index.d.mts +2 -2
- package/dist/activities/message/index.d.ts +2 -2
- package/dist/activities/message/message.d.mts +1 -1
- package/dist/activities/message/message.d.ts +1 -1
- package/dist/activities/message/message.js +5 -14
- package/dist/activities/message/message.js.map +1 -1
- package/dist/activities/message/message.mjs +5 -14
- package/dist/activities/message/message.mjs.map +1 -1
- package/dist/activities/utils/index.d.mts +2 -2
- package/dist/activities/utils/index.d.ts +2 -2
- package/dist/activities/utils/strip-mentions-text.d.mts +1 -1
- package/dist/activities/utils/strip-mentions-text.d.ts +1 -1
- package/dist/activities/utils/to-activity-params.d.mts +2 -2
- package/dist/activities/utils/to-activity-params.d.ts +2 -2
- package/dist/{activity-BXTVWTDe.d.ts → activity-C1r0B_9_.d.ts} +1 -1
- package/dist/{activity-DJwv7Dt6.d.mts → activity-C_Apu8i6.d.mts} +1 -1
- package/dist/clients/conversation/activity.d.mts +2 -2
- package/dist/clients/conversation/activity.d.ts +2 -2
- package/dist/clients/conversation/index.d.mts +2 -2
- package/dist/clients/conversation/index.d.ts +2 -2
- package/dist/clients/index.d.mts +2 -2
- package/dist/clients/index.d.ts +2 -2
- package/dist/clients/meeting.d.mts +12 -1
- package/dist/clients/meeting.d.ts +12 -1
- package/dist/clients/meeting.js +14 -3
- package/dist/clients/meeting.js.map +1 -1
- package/dist/clients/meeting.mjs +14 -3
- package/dist/clients/meeting.mjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/{message-C7JDFGmD.d.mts → message-BfRVRgDX.d.mts} +4 -14
- package/dist/{message-DyL99RbG.d.ts → message-Dahma92e.d.ts} +4 -14
- package/dist/models/activity-like.d.mts +2 -2
- package/dist/models/activity-like.d.ts +2 -2
- package/dist/models/index.d.mts +2 -2
- package/dist/models/index.d.ts +2 -2
- package/dist/models/invoke-response.d.mts +2 -2
- package/dist/models/invoke-response.d.ts +2 -2
- package/dist/models/meeting/meeting-participant.d.mts +5 -1
- package/dist/models/meeting/meeting-participant.d.ts +5 -1
- package/dist/models/meeting/meeting.d.mts +2 -3
- package/dist/models/meeting/meeting.d.ts +2 -3
- package/dist/models/messaging-extension/index.d.mts +2 -2
- package/dist/models/messaging-extension/index.d.ts +2 -2
- package/dist/models/messaging-extension/messaging-extension-action-response.d.mts +2 -2
- package/dist/models/messaging-extension/messaging-extension-action-response.d.ts +2 -2
- package/dist/models/messaging-extension/messaging-extension-action.d.mts +2 -2
- package/dist/models/messaging-extension/messaging-extension-action.d.ts +2 -2
- package/dist/models/messaging-extension/messaging-extension-response.d.mts +2 -2
- package/dist/models/messaging-extension/messaging-extension-response.d.ts +2 -2
- package/dist/models/messaging-extension/messaging-extension-result.d.mts +2 -2
- package/dist/models/messaging-extension/messaging-extension-result.d.ts +2 -2
- package/package.json +5 -5
|
@@ -56,10 +56,6 @@ class MessageActivity extends Activity {
|
|
|
56
56
|
* A value that is associated with the activity.
|
|
57
57
|
*/
|
|
58
58
|
value;
|
|
59
|
-
/**
|
|
60
|
-
* Indicates if this is a targeted message visible only to a specific recipient.
|
|
61
|
-
*/
|
|
62
|
-
isTargeted;
|
|
63
59
|
constructor(text = "", value = {}) {
|
|
64
60
|
super({
|
|
65
61
|
...value,
|
|
@@ -246,18 +242,13 @@ class MessageActivity extends Activity {
|
|
|
246
242
|
});
|
|
247
243
|
}
|
|
248
244
|
/**
|
|
249
|
-
*
|
|
250
|
-
* @param
|
|
251
|
-
*
|
|
245
|
+
* Set the recipient of this message, optionally marking it as a targeted message.
|
|
246
|
+
* @param account - The recipient account
|
|
247
|
+
* @param isTargeted - If true, marks this as a targeted message visible only to the recipient. Defaults to false.
|
|
252
248
|
* @returns this instance for chaining
|
|
253
|
-
* @remarks When using `true`, this must be sent within an activity context (not proactively).
|
|
254
|
-
* For proactive sends, you must provide an explicit recipient ID.
|
|
255
249
|
*/
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
if (typeof recipientOrFlag === "string") {
|
|
259
|
-
this.recipient = { id: recipientOrFlag, name: "", role: "user" };
|
|
260
|
-
}
|
|
250
|
+
withRecipient(account, isTargeted = false) {
|
|
251
|
+
super.withRecipient(account, isTargeted);
|
|
261
252
|
return this;
|
|
262
253
|
}
|
|
263
254
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/activities/message/message.ts"],"names":[],"mappings":";;;;AAwGO,MAAM,wBAAwB,QAAgD,CAAA;AAAA;AAAA;AAAA;AAAA,EAInF,IAAA;AAAA;AAAA;AAAA;AAAA,EAKA,KAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,SAAA;AAAA;AAAA;AAAA;AAAA,EAKA,OAAA;AAAA;AAAA;AAAA;AAAA,EAKA,UAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,gBAAA;AAAA;AAAA;AAAA;AAAA,EAKA,WAAA;AAAA;AAAA;AAAA;AAAA,EAKA,gBAAA;AAAA;AAAA;AAAA;AAAA,EAKA,UAAA;AAAA;AAAA;AA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AAC,CAAM,KAAA,CAAA,CAAE,UAAU,EAAO,KAAA,IAAA,CAAK,UAAU,EAAE,CAAA;AAAA;AACrD;AAAA;AAAA;AAAA,EAKA,kBAAkB,SAAmB,EAAA;AACnC,IAAA,OAAA,CAAQ,KAAK,QAAY,IAAA,EACtB,EAAA,MAAA,CAAO,CAAC,CAAM,KAAA,CAAA,CAAE,IAAS,KAAA,SAAS,EAClC,IAAK,CAAA,CAAC,MAAM,CAAE,CAAA,SAAA,CAAU,OAAO,SAAS,CAAA;AAAA;AAC7C;AAAA;AAAA;AAAA;AAAA,EAMA,cAAiB,GAAA;AACf,IAAI,IAAA,CAAC,KAAK,WAAa,EAAA;AACrB,MAAA,IAAA,CAAK,cAAc,EAAC;AAAA;AAGtB,IAAK,IAAA,CAAA,WAAA,CAAY,WAAW,IAAK,CAAA,EAAA;AACjC,IAAA,IAAA,CAAK,YAAY,UAAa,GAAA,OAAA;AAE9B,IAAA,OAAO,KAAK,SAAU,CAAA;AAAA,MACpB,IAAM,EAAA,YAAA;AAAA,MACN,UAAU,IAAK,CAAA,EAAA;AAAA,MACf,UAAY,EAAA;AAAA,KACb,CAAA;AAAA;AACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,sBAAsB,eAAgC,EAAA;AACpD,IAAA,IAAA,CAAK,UAAa,GAAA,IAAA;AAClB,IAAI,IAAA,OAAO,oBAAoB,QAAU,EAAA;AACvC,MAAA,IAAA,CAAK,YAAY,EAAE,EAAA,EAAI,iBAAiB,IAAM,EAAA,EAAA,EAAI,MAAM,MAAO,EAAA;AAAA;AAEjE,IAAO,OAAA,IAAA;AAAA;AAEX","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 SuggestedActions,\n TextFormat,\n} from '../../models';\nimport { Activity, IActivity } 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 */\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 */\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'\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 */\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 */\n expiration?: Date;\n\n /**\n * A value that is associated with the activity.\n */\n value?: any;\n\n /**\n * Indicates if this is a targeted message visible only to a specific recipient.\n */\n isTargeted?: boolean;\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\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 */\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 */\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'\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 */\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 */\n expiration?: Date;\n\n /**\n * A value that is associated with the activity.\n */\n value?: any;\n\n /**\n * Indicates if this is a targeted message visible only to a specific recipient.\n */\n isTargeted?: boolean;\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 },\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 */\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 */\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'\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 */\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 */\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 * 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 * Mark this message as a targeted message visible only to a specific recipient.\n * @param recipientOrFlag - If `true`, the recipient will be inferred from the incoming activity context.\n * If a string, it specifies the explicit recipient ID.\n * @returns this instance for chaining\n * @remarks When using `true`, this must be sent within an activity context (not proactively).\n * For proactive sends, you must provide an explicit recipient ID.\n */\n withTargetedRecipient(recipientOrFlag: true | string) {\n this.isTargeted = true;\n if (typeof recipientOrFlag === 'string') {\n this.recipient = { id: recipientOrFlag, name: '', role: 'user' };\n }\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"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/activities/message/message.ts"],"names":[],"mappings":";;;;AAmGO,MAAM,wBAAwB,QAAgD,CAAA;AAAA;AAAA;AAAA;AAAA,EAInF,IAAA;AAAA;AAAA;AAAA;AAAA,EAKA,KAAA;AAAA;AAAA;AAAA;AAAA;A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Mode,\n Importance,\n InputHint,\n MentionEntity,\n SuggestedActions,\n TextFormat,\n} from '../../models';\nimport { Activity, IActivity } 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 */\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 */\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'\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 */\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 */\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\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 */\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 */\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'\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 */\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 */\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 },\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 */\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 */\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'\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 */\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 */\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 * 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 message.\n * @param account - The recipient account\n * @param isTargeted - If true, marks this as a targeted message visible only to the recipient. Defaults to false.\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/**\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"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { S as StripMentionsTextOptions, s as stripMentionsText } from '../../message-
|
|
2
|
-
export { t as toActivityParams } from '../../activity-
|
|
1
|
+
export { S as StripMentionsTextOptions, s as stripMentionsText } from '../../message-BfRVRgDX.mjs';
|
|
2
|
+
export { t as toActivityParams } from '../../activity-C_Apu8i6.mjs';
|
|
3
3
|
import '../../models/account.mjs';
|
|
4
4
|
import '../../models/membership-source.mjs';
|
|
5
5
|
import '../../models/membership-source-types.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { S as StripMentionsTextOptions, s as stripMentionsText } from '../../message-
|
|
2
|
-
export { t as toActivityParams } from '../../activity-
|
|
1
|
+
export { S as StripMentionsTextOptions, s as stripMentionsText } from '../../message-Dahma92e.js';
|
|
2
|
+
export { t as toActivityParams } from '../../activity-C1r0B_9_.js';
|
|
3
3
|
import '../../models/account.js';
|
|
4
4
|
import '../../models/membership-source.js';
|
|
5
5
|
import '../../models/membership-source-types.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { S as StripMentionsTextOptions, s as stripMentionsText } from '../../message-
|
|
1
|
+
export { S as StripMentionsTextOptions, s as stripMentionsText } from '../../message-BfRVRgDX.mjs';
|
|
2
2
|
import '../typing.mjs';
|
|
3
3
|
import '../message/message-update.mjs';
|
|
4
4
|
import '../../models/account.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { S as StripMentionsTextOptions, s as stripMentionsText } from '../../message-
|
|
1
|
+
export { S as StripMentionsTextOptions, s as stripMentionsText } from '../../message-Dahma92e.js';
|
|
2
2
|
import '../typing.js';
|
|
3
3
|
import '../message/message-update.js';
|
|
4
4
|
import '../../models/account.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { t as toActivityParams } from '../../activity-
|
|
2
|
-
import '../../message-
|
|
1
|
+
export { t as toActivityParams } from '../../activity-C_Apu8i6.mjs';
|
|
2
|
+
import '../../message-BfRVRgDX.mjs';
|
|
3
3
|
import '../../models/account.mjs';
|
|
4
4
|
import '../../models/membership-source.mjs';
|
|
5
5
|
import '../../models/membership-source-types.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { t as toActivityParams } from '../../activity-
|
|
2
|
-
import '../../message-
|
|
1
|
+
export { t as toActivityParams } from '../../activity-C1r0B_9_.js';
|
|
2
|
+
import '../../message-Dahma92e.js';
|
|
3
3
|
import '../../models/account.js';
|
|
4
4
|
import '../../models/membership-source.js';
|
|
5
5
|
import '../../models/membership-source-types.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './message-
|
|
1
|
+
import './message-Dahma92e.js';
|
|
2
2
|
import { Client, ClientOptions } from '@microsoft/teams.common/http';
|
|
3
3
|
import { CommandActivity } from './activities/command/index.js';
|
|
4
4
|
import { ConversationActivity } from './activities/conversation/index.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './message-
|
|
1
|
+
import './message-BfRVRgDX.mjs';
|
|
2
2
|
import { Client, ClientOptions } from '@microsoft/teams.common/http';
|
|
3
3
|
import { CommandActivity } from './activities/command/index.mjs';
|
|
4
4
|
import { ConversationActivity } from './activities/conversation/index.mjs';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import '@microsoft/teams.common/http';
|
|
2
|
-
export { A as ActivityParams, C as ConversationActivityClient } from '../../activity-
|
|
2
|
+
export { A as ActivityParams, C as ConversationActivityClient } from '../../activity-C_Apu8i6.mjs';
|
|
3
3
|
import '../../models/account.mjs';
|
|
4
4
|
import '../../models/resource.mjs';
|
|
5
5
|
import '../api-client-settings.mjs';
|
|
6
|
-
import '../../message-
|
|
6
|
+
import '../../message-BfRVRgDX.mjs';
|
|
7
7
|
import '../../models/entity/mention-entity.mjs';
|
|
8
8
|
import '../../models/membership-source.mjs';
|
|
9
9
|
import '../../models/membership-source-types.mjs';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import '@microsoft/teams.common/http';
|
|
2
|
-
export { A as ActivityParams, C as ConversationActivityClient } from '../../activity-
|
|
2
|
+
export { A as ActivityParams, C as ConversationActivityClient } from '../../activity-C1r0B_9_.js';
|
|
3
3
|
import '../../models/account.js';
|
|
4
4
|
import '../../models/resource.js';
|
|
5
5
|
import '../api-client-settings.js';
|
|
6
|
-
import '../../message-
|
|
6
|
+
import '../../message-Dahma92e.js';
|
|
7
7
|
import '../../models/entity/mention-entity.js';
|
|
8
8
|
import '../../models/membership-source.js';
|
|
9
9
|
import '../../models/membership-source-types.js';
|
|
@@ -4,13 +4,13 @@ import { Conversation } from '../../models/conversation/conversation.mjs';
|
|
|
4
4
|
import { Account, TeamsChannelAccount } from '../../models/account.mjs';
|
|
5
5
|
import { ConversationResource } from '../../models/conversation/conversation-resource.mjs';
|
|
6
6
|
import { Resource } from '../../models/resource.mjs';
|
|
7
|
-
import { A as ActivityParams, C as ConversationActivityClient } from '../../activity-
|
|
7
|
+
import { A as ActivityParams, C as ConversationActivityClient } from '../../activity-C_Apu8i6.mjs';
|
|
8
8
|
import { ConversationMemberClient } from './member.mjs';
|
|
9
9
|
import '../../models/membership-source.mjs';
|
|
10
10
|
import '../../models/membership-source-types.mjs';
|
|
11
11
|
import '../../models/membership-types.mjs';
|
|
12
12
|
import '../../models/role.mjs';
|
|
13
|
-
import '../../message-
|
|
13
|
+
import '../../message-BfRVRgDX.mjs';
|
|
14
14
|
import '../../models/entity/mention-entity.mjs';
|
|
15
15
|
import '../../models/input-hint.mjs';
|
|
16
16
|
import '../../models/text-format.mjs';
|
|
@@ -4,13 +4,13 @@ import { Conversation } from '../../models/conversation/conversation.js';
|
|
|
4
4
|
import { Account, TeamsChannelAccount } from '../../models/account.js';
|
|
5
5
|
import { ConversationResource } from '../../models/conversation/conversation-resource.js';
|
|
6
6
|
import { Resource } from '../../models/resource.js';
|
|
7
|
-
import { A as ActivityParams, C as ConversationActivityClient } from '../../activity-
|
|
7
|
+
import { A as ActivityParams, C as ConversationActivityClient } from '../../activity-C1r0B_9_.js';
|
|
8
8
|
import { ConversationMemberClient } from './member.js';
|
|
9
9
|
import '../../models/membership-source.js';
|
|
10
10
|
import '../../models/membership-source-types.js';
|
|
11
11
|
import '../../models/membership-types.js';
|
|
12
12
|
import '../../models/role.js';
|
|
13
|
-
import '../../message-
|
|
13
|
+
import '../../message-Dahma92e.js';
|
|
14
14
|
import '../../models/entity/mention-entity.js';
|
|
15
15
|
import '../../models/input-hint.js';
|
|
16
16
|
import '../../models/text-format.js';
|
package/dist/clients/index.d.mts
CHANGED
|
@@ -9,7 +9,7 @@ import { TeamClient } from './team.mjs';
|
|
|
9
9
|
import { UserClient } from './user/index.mjs';
|
|
10
10
|
export { ExchangeUserTokenParams, GetUserAADTokenParams, GetUserTokenParams, GetUserTokenStatusParams, SignOutUserParams, USER_TOKEN_ENDPOINTS, UserTokenClient } from './user/token.mjs';
|
|
11
11
|
export { BOT_SIGNIN_ENDPOINTS, BotSignInClient, GetBotSignInResourceParams, GetBotSignInUrlParams } from './bot/sign-in.mjs';
|
|
12
|
-
export { A as ActivityParams, C as ConversationActivityClient } from '../activity-
|
|
12
|
+
export { A as ActivityParams, C as ConversationActivityClient } from '../activity-C_Apu8i6.mjs';
|
|
13
13
|
export { ConversationMemberClient } from './conversation/member.mjs';
|
|
14
14
|
import '../models/conversation/conversation.mjs';
|
|
15
15
|
import '../models/account.mjs';
|
|
@@ -32,7 +32,7 @@ import '../models/token-exchange/token-exchange-request.mjs';
|
|
|
32
32
|
import '../models/sign-in/sign-in-url-response.mjs';
|
|
33
33
|
import '../models/token/token-post-resource.mjs';
|
|
34
34
|
import '../models/token-exchange/token-exchange-resource.mjs';
|
|
35
|
-
import '../message-
|
|
35
|
+
import '../message-BfRVRgDX.mjs';
|
|
36
36
|
import '../models/entity/mention-entity.mjs';
|
|
37
37
|
import '../models/input-hint.mjs';
|
|
38
38
|
import '../models/text-format.mjs';
|
package/dist/clients/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { TeamClient } from './team.js';
|
|
|
9
9
|
import { UserClient } from './user/index.js';
|
|
10
10
|
export { ExchangeUserTokenParams, GetUserAADTokenParams, GetUserTokenParams, GetUserTokenStatusParams, SignOutUserParams, USER_TOKEN_ENDPOINTS, UserTokenClient } from './user/token.js';
|
|
11
11
|
export { BOT_SIGNIN_ENDPOINTS, BotSignInClient, GetBotSignInResourceParams, GetBotSignInUrlParams } from './bot/sign-in.js';
|
|
12
|
-
export { A as ActivityParams, C as ConversationActivityClient } from '../activity-
|
|
12
|
+
export { A as ActivityParams, C as ConversationActivityClient } from '../activity-C1r0B_9_.js';
|
|
13
13
|
export { ConversationMemberClient } from './conversation/member.js';
|
|
14
14
|
import '../models/conversation/conversation.js';
|
|
15
15
|
import '../models/account.js';
|
|
@@ -32,7 +32,7 @@ import '../models/token-exchange/token-exchange-request.js';
|
|
|
32
32
|
import '../models/sign-in/sign-in-url-response.js';
|
|
33
33
|
import '../models/token/token-post-resource.js';
|
|
34
34
|
import '../models/token-exchange/token-exchange-resource.js';
|
|
35
|
-
import '../message-
|
|
35
|
+
import '../message-Dahma92e.js';
|
|
36
36
|
import '../models/entity/mention-entity.js';
|
|
37
37
|
import '../models/input-hint.js';
|
|
38
38
|
import '../models/text-format.js';
|
|
@@ -17,8 +17,19 @@ declare class MeetingClient {
|
|
|
17
17
|
protected _http: Client;
|
|
18
18
|
protected _apiClientSettings: Partial<ApiClientSettings>;
|
|
19
19
|
constructor(serviceUrl: string, options?: Client | ClientOptions, apiClientSettings?: Partial<ApiClientSettings>);
|
|
20
|
+
/**
|
|
21
|
+
* Retrieves meeting information including details, organizer, and conversation.
|
|
22
|
+
* @param id - The meeting ID.
|
|
23
|
+
*/
|
|
20
24
|
getById(id: string): Promise<MeetingInfo>;
|
|
21
|
-
|
|
25
|
+
/**
|
|
26
|
+
* Retrieves information about a specific participant in a meeting.
|
|
27
|
+
* @param meetingId - The meeting ID.
|
|
28
|
+
* @param id - The user AAD object ID
|
|
29
|
+
* @param tenantId - The tenant ID of the meeting and user.
|
|
30
|
+
* @returns {MeetingParticipant} The meeting participant information.
|
|
31
|
+
*/
|
|
32
|
+
getParticipant(meetingId: string, id: string, tenantId: string): Promise<MeetingParticipant>;
|
|
22
33
|
}
|
|
23
34
|
|
|
24
35
|
export { MeetingClient };
|
|
@@ -17,8 +17,19 @@ declare class MeetingClient {
|
|
|
17
17
|
protected _http: Client;
|
|
18
18
|
protected _apiClientSettings: Partial<ApiClientSettings>;
|
|
19
19
|
constructor(serviceUrl: string, options?: Client | ClientOptions, apiClientSettings?: Partial<ApiClientSettings>);
|
|
20
|
+
/**
|
|
21
|
+
* Retrieves meeting information including details, organizer, and conversation.
|
|
22
|
+
* @param id - The meeting ID.
|
|
23
|
+
*/
|
|
20
24
|
getById(id: string): Promise<MeetingInfo>;
|
|
21
|
-
|
|
25
|
+
/**
|
|
26
|
+
* Retrieves information about a specific participant in a meeting.
|
|
27
|
+
* @param meetingId - The meeting ID.
|
|
28
|
+
* @param id - The user AAD object ID
|
|
29
|
+
* @param tenantId - The tenant ID of the meeting and user.
|
|
30
|
+
* @returns {MeetingParticipant} The meeting participant information.
|
|
31
|
+
*/
|
|
32
|
+
getParticipant(meetingId: string, id: string, tenantId: string): Promise<MeetingParticipant>;
|
|
22
33
|
}
|
|
23
34
|
|
|
24
35
|
export { MeetingClient };
|
package/dist/clients/meeting.js
CHANGED
|
@@ -24,13 +24,24 @@ class MeetingClient {
|
|
|
24
24
|
}
|
|
25
25
|
this._apiClientSettings = apiClientSettings.mergeApiClientSettings(apiClientSettings$1);
|
|
26
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Retrieves meeting information including details, organizer, and conversation.
|
|
29
|
+
* @param id - The meeting ID.
|
|
30
|
+
*/
|
|
27
31
|
async getById(id) {
|
|
28
|
-
const res = await this.http.get(`${this.serviceUrl}/v1/meetings/${id}`);
|
|
32
|
+
const res = await this.http.get(`${this.serviceUrl}/v1/meetings/${encodeURIComponent(id)}`);
|
|
29
33
|
return res.data;
|
|
30
34
|
}
|
|
31
|
-
|
|
35
|
+
/**
|
|
36
|
+
* Retrieves information about a specific participant in a meeting.
|
|
37
|
+
* @param meetingId - The meeting ID.
|
|
38
|
+
* @param id - The user AAD object ID
|
|
39
|
+
* @param tenantId - The tenant ID of the meeting and user.
|
|
40
|
+
* @returns {MeetingParticipant} The meeting participant information.
|
|
41
|
+
*/
|
|
42
|
+
async getParticipant(meetingId, id, tenantId) {
|
|
32
43
|
const res = await this.http.get(
|
|
33
|
-
`${this.serviceUrl}/v1/meetings/${meetingId}/participants/${id}`
|
|
44
|
+
`${this.serviceUrl}/v1/meetings/${encodeURIComponent(meetingId)}/participants/${encodeURIComponent(id)}?tenantId=${encodeURIComponent(tenantId)}`
|
|
34
45
|
);
|
|
35
46
|
return res.data;
|
|
36
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/clients/meeting.ts"],"names":["apiClientSettings","Client","mergeApiClientSettings"],"mappings":";;;;;AAMO,MAAM,aAAc,CAAA;AAAA,EAChB,UAAA;AAAA,EAET,IAAI,IAAO,GAAA;AACT,IAAA,OAAO,IAAK,CAAA,KAAA;AAAA;AACd,EACA,IAAI,KAAK,CAAG,EAAA;AACV,IAAA,IAAA,CAAK,KAAQ,GAAA,CAAA;AAAA;AACf,EACU,KAAA;AAAA,EACA,kBAAA;AAAA,EAEV,WAAA,CAAY,UAAoB,EAAA,OAAA,EAAkCA,mBAAgD,EAAA;AAChH,IAAA,IAAA,CAAK,UAAa,GAAA,UAAA;AAElB,IAAA,IAAI,CAAC,OAAS,EAAA;AACZ,MAAK,IAAA,CAAA,KAAA,GAAQ,IAAIC,WAAO,EAAA;AAAA,KAC1B,MAAA,IAAW,aAAa,OAAS,EAAA;AAC/B,MAAA,IAAA,CAAK,KAAQ,GAAA,OAAA;AAAA,KACR,MAAA;AACL,MAAK,IAAA,CAAA,KAAA,GAAQ,IAAIA,WAAA,CAAO,OAAO,CAAA;AAAA;AAGjC,IAAK,IAAA,CAAA,kBAAA,GAAqBC,yCAAuBF,mBAAiB,CAAA;AAAA;AACpE,
|
|
1
|
+
{"version":3,"sources":["../../src/clients/meeting.ts"],"names":["apiClientSettings","Client","mergeApiClientSettings"],"mappings":";;;;;AAMO,MAAM,aAAc,CAAA;AAAA,EAChB,UAAA;AAAA,EAET,IAAI,IAAO,GAAA;AACT,IAAA,OAAO,IAAK,CAAA,KAAA;AAAA;AACd,EACA,IAAI,KAAK,CAAG,EAAA;AACV,IAAA,IAAA,CAAK,KAAQ,GAAA,CAAA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\nimport { MeetingInfo, MeetingParticipant } from '../models';\n\nimport { ApiClientSettings, mergeApiClientSettings } from './api-client-settings';\n\nexport class MeetingClient {\n readonly serviceUrl: string;\n\n get http() {\n return this._http;\n }\n set http(v) {\n this._http = v;\n }\n protected _http: Client;\n protected _apiClientSettings: Partial<ApiClientSettings>;\n\n constructor(serviceUrl: string, options?: Client | ClientOptions, apiClientSettings?: Partial<ApiClientSettings>) {\n this.serviceUrl = serviceUrl;\n\n if (!options) {\n this._http = new Client();\n } else if ('request' in options) {\n this._http = options;\n } else {\n this._http = new Client(options);\n }\n\n this._apiClientSettings = mergeApiClientSettings(apiClientSettings);\n }\n\n /**\n * Retrieves meeting information including details, organizer, and conversation.\n * @param id - The meeting ID.\n */\n async getById(id: string) {\n const res = await this.http.get<MeetingInfo>(`${this.serviceUrl}/v1/meetings/${encodeURIComponent(id)}`);\n return res.data;\n }\n\n /**\n * Retrieves information about a specific participant in a meeting.\n * @param meetingId - The meeting ID.\n * @param id - The user AAD object ID\n * @param tenantId - The tenant ID of the meeting and user.\n * @returns {MeetingParticipant} The meeting participant information.\n */\n async getParticipant(meetingId: string, id: string, tenantId: string) {\n const res = await this.http.get<MeetingParticipant>(\n `${this.serviceUrl}/v1/meetings/${encodeURIComponent(meetingId)}/participants/${encodeURIComponent(id)}?tenantId=${encodeURIComponent(tenantId)}`\n );\n return res.data;\n }\n}\n"]}
|
package/dist/clients/meeting.mjs
CHANGED
|
@@ -22,13 +22,24 @@ class MeetingClient {
|
|
|
22
22
|
}
|
|
23
23
|
this._apiClientSettings = mergeApiClientSettings(apiClientSettings);
|
|
24
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Retrieves meeting information including details, organizer, and conversation.
|
|
27
|
+
* @param id - The meeting ID.
|
|
28
|
+
*/
|
|
25
29
|
async getById(id) {
|
|
26
|
-
const res = await this.http.get(`${this.serviceUrl}/v1/meetings/${id}`);
|
|
30
|
+
const res = await this.http.get(`${this.serviceUrl}/v1/meetings/${encodeURIComponent(id)}`);
|
|
27
31
|
return res.data;
|
|
28
32
|
}
|
|
29
|
-
|
|
33
|
+
/**
|
|
34
|
+
* Retrieves information about a specific participant in a meeting.
|
|
35
|
+
* @param meetingId - The meeting ID.
|
|
36
|
+
* @param id - The user AAD object ID
|
|
37
|
+
* @param tenantId - The tenant ID of the meeting and user.
|
|
38
|
+
* @returns {MeetingParticipant} The meeting participant information.
|
|
39
|
+
*/
|
|
40
|
+
async getParticipant(meetingId, id, tenantId) {
|
|
30
41
|
const res = await this.http.get(
|
|
31
|
-
`${this.serviceUrl}/v1/meetings/${meetingId}/participants/${id}`
|
|
42
|
+
`${this.serviceUrl}/v1/meetings/${encodeURIComponent(meetingId)}/participants/${encodeURIComponent(id)}?tenantId=${encodeURIComponent(tenantId)}`
|
|
32
43
|
);
|
|
33
44
|
return res.data;
|
|
34
45
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/clients/meeting.ts"],"names":[],"mappings":";;;AAMO,MAAM,aAAc,CAAA;AAAA,EAChB,UAAA;AAAA,EAET,IAAI,IAAO,GAAA;AACT,IAAA,OAAO,IAAK,CAAA,KAAA;AAAA;AACd,EACA,IAAI,KAAK,CAAG,EAAA;AACV,IAAA,IAAA,CAAK,KAAQ,GAAA,CAAA;AAAA;AACf,EACU,KAAA;AAAA,EACA,kBAAA;AAAA,EAEV,WAAA,CAAY,UAAoB,EAAA,OAAA,EAAkC,iBAAgD,EAAA;AAChH,IAAA,IAAA,CAAK,UAAa,GAAA,UAAA;AAElB,IAAA,IAAI,CAAC,OAAS,EAAA;AACZ,MAAK,IAAA,CAAA,KAAA,GAAQ,IAAI,MAAO,EAAA;AAAA,KAC1B,MAAA,IAAW,aAAa,OAAS,EAAA;AAC/B,MAAA,IAAA,CAAK,KAAQ,GAAA,OAAA;AAAA,KACR,MAAA;AACL,MAAK,IAAA,CAAA,KAAA,GAAQ,IAAI,MAAA,CAAO,OAAO,CAAA;AAAA;AAGjC,IAAK,IAAA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;AAAA,MAC1B,CAAG,EAAA,IAAA,CAAK,UAAU,CAAA,aAAA,EAAgB,mBAAmB,SAAS,CAAC,CAAiB,cAAA,EAAA,kBAAA,CAAmB,EAAE,CAAC,CAAa,UAAA,EAAA,kBAAA,CAAmB,QAAQ,CAAC,CAAA;AAAA,KACjJ;AACA,IAAA,OAAO,GAAI,CAAA,IAAA;AAAA;AAEf","file":"meeting.mjs","sourcesContent":["import { Client, ClientOptions } from '@microsoft/teams.common/http';\n\nimport { MeetingInfo, MeetingParticipant } from '../models';\n\nimport { ApiClientSettings, mergeApiClientSettings } from './api-client-settings';\n\nexport class MeetingClient {\n readonly serviceUrl: string;\n\n get http() {\n return this._http;\n }\n set http(v) {\n this._http = v;\n }\n protected _http: Client;\n protected _apiClientSettings: Partial<ApiClientSettings>;\n\n constructor(serviceUrl: string, options?: Client | ClientOptions, apiClientSettings?: Partial<ApiClientSettings>) {\n this.serviceUrl = serviceUrl;\n\n if (!options) {\n this._http = new Client();\n } else if ('request' in options) {\n this._http = options;\n } else {\n this._http = new Client(options);\n }\n\n this._apiClientSettings = mergeApiClientSettings(apiClientSettings);\n }\n\n /**\n * Retrieves meeting information including details, organizer, and conversation.\n * @param id - The meeting ID.\n */\n async getById(id: string) {\n const res = await this.http.get<MeetingInfo>(`${this.serviceUrl}/v1/meetings/${encodeURIComponent(id)}`);\n return res.data;\n }\n\n /**\n * Retrieves information about a specific participant in a meeting.\n * @param meetingId - The meeting ID.\n * @param id - The user AAD object ID\n * @param tenantId - The tenant ID of the meeting and user.\n * @returns {MeetingParticipant} The meeting participant information.\n */\n async getParticipant(meetingId: string, id: string, tenantId: string) {\n const res = await this.http.get<MeetingParticipant>(\n `${this.serviceUrl}/v1/meetings/${encodeURIComponent(meetingId)}/participants/${encodeURIComponent(id)}?tenantId=${encodeURIComponent(tenantId)}`\n );\n return res.data;\n }\n}\n"]}
|
package/dist/index.d.mts
CHANGED
|
@@ -51,7 +51,7 @@ export { MessagingExtensionResult, MessagingExtensionResultType } from './models
|
|
|
51
51
|
export { MessagingExtensionSuggestedAction } from './models/messaging-extension/messaging-extension-suggested-action.mjs';
|
|
52
52
|
export { MessagingExtensionParameter } from './models/messaging-extension/messaging-extension-parameter.mjs';
|
|
53
53
|
export { MessagingExtensionQuery, MessagingExtensionQueryOptions } from './models/messaging-extension/messaging-extension-query.mjs';
|
|
54
|
-
export { b as Activity, a as ActivityLike, A as ActivityParams, C as ConversationActivityClient, d as IMessageExtensionFetchTaskInvokeActivity, e as IMessageExtensionSubmitActionInvokeActivity, I as InvokeActivity, c as MessageExtensionInvokeActivity, M as MessagingExtensionAction, S as SentActivity, t as toActivityParams } from './activity-
|
|
54
|
+
export { b as Activity, a as ActivityLike, A as ActivityParams, C as ConversationActivityClient, d as IMessageExtensionFetchTaskInvokeActivity, e as IMessageExtensionSubmitActionInvokeActivity, I as InvokeActivity, c as MessageExtensionInvokeActivity, M as MessagingExtensionAction, S as SentActivity, t as toActivityParams } from './activity-C_Apu8i6.mjs';
|
|
55
55
|
export { MessagingExtensionActionResponse } from './models/messaging-extension/messaging-extension-action-response.mjs';
|
|
56
56
|
export { MessagingExtensionAttachmentLayout } from './models/messaging-extension/messaging-extension-attachment-layout.mjs';
|
|
57
57
|
export { Message } from './models/message/message.mjs';
|
|
@@ -123,7 +123,7 @@ export { TeamInfo } from './models/channel-data/team-info.mjs';
|
|
|
123
123
|
export { TenantInfo } from './models/channel-data/tenant-info.mjs';
|
|
124
124
|
export { Activity as $Activity, IActivity } from './activities/activity.mjs';
|
|
125
125
|
export { IMessageDeleteActivity, MessageDeleteActivity } from './activities/message/message-delete.mjs';
|
|
126
|
-
export { A as AddMentionOptions, I as IMessageActivity, M as MessageActivity, S as StripMentionsTextOptions, s as stripMentionsText } from './message-
|
|
126
|
+
export { A as AddMentionOptions, I as IMessageActivity, M as MessageActivity, S as StripMentionsTextOptions, s as stripMentionsText } from './message-BfRVRgDX.mjs';
|
|
127
127
|
export { IMessageUpdateActivity, MessageUpdateActivity } from './activities/message/message-update.mjs';
|
|
128
128
|
export { IMessageReactionActivity, MessageReactionActivity } from './activities/message/message-reaction.mjs';
|
|
129
129
|
export { $MessageActivity } from './activities/message/index.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -51,7 +51,7 @@ export { MessagingExtensionResult, MessagingExtensionResultType } from './models
|
|
|
51
51
|
export { MessagingExtensionSuggestedAction } from './models/messaging-extension/messaging-extension-suggested-action.js';
|
|
52
52
|
export { MessagingExtensionParameter } from './models/messaging-extension/messaging-extension-parameter.js';
|
|
53
53
|
export { MessagingExtensionQuery, MessagingExtensionQueryOptions } from './models/messaging-extension/messaging-extension-query.js';
|
|
54
|
-
export { b as Activity, a as ActivityLike, A as ActivityParams, C as ConversationActivityClient, d as IMessageExtensionFetchTaskInvokeActivity, e as IMessageExtensionSubmitActionInvokeActivity, I as InvokeActivity, c as MessageExtensionInvokeActivity, M as MessagingExtensionAction, S as SentActivity, t as toActivityParams } from './activity-
|
|
54
|
+
export { b as Activity, a as ActivityLike, A as ActivityParams, C as ConversationActivityClient, d as IMessageExtensionFetchTaskInvokeActivity, e as IMessageExtensionSubmitActionInvokeActivity, I as InvokeActivity, c as MessageExtensionInvokeActivity, M as MessagingExtensionAction, S as SentActivity, t as toActivityParams } from './activity-C1r0B_9_.js';
|
|
55
55
|
export { MessagingExtensionActionResponse } from './models/messaging-extension/messaging-extension-action-response.js';
|
|
56
56
|
export { MessagingExtensionAttachmentLayout } from './models/messaging-extension/messaging-extension-attachment-layout.js';
|
|
57
57
|
export { Message } from './models/message/message.js';
|
|
@@ -123,7 +123,7 @@ export { TeamInfo } from './models/channel-data/team-info.js';
|
|
|
123
123
|
export { TenantInfo } from './models/channel-data/tenant-info.js';
|
|
124
124
|
export { Activity as $Activity, IActivity } from './activities/activity.js';
|
|
125
125
|
export { IMessageDeleteActivity, MessageDeleteActivity } from './activities/message/message-delete.js';
|
|
126
|
-
export { A as AddMentionOptions, I as IMessageActivity, M as MessageActivity, S as StripMentionsTextOptions, s as stripMentionsText } from './message-
|
|
126
|
+
export { A as AddMentionOptions, I as IMessageActivity, M as MessageActivity, S as StripMentionsTextOptions, s as stripMentionsText } from './message-Dahma92e.js';
|
|
127
127
|
export { IMessageUpdateActivity, MessageUpdateActivity } from './activities/message/message-update.js';
|
|
128
128
|
export { IMessageReactionActivity, MessageReactionActivity } from './activities/message/message-reaction.js';
|
|
129
129
|
export { $MessageActivity } from './activities/message/index.js';
|
|
@@ -90,10 +90,6 @@ interface IMessageActivity extends IActivity<'message'> {
|
|
|
90
90
|
* A value that is associated with the activity.
|
|
91
91
|
*/
|
|
92
92
|
value?: any;
|
|
93
|
-
/**
|
|
94
|
-
* Indicates if this is a targeted message visible only to a specific recipient.
|
|
95
|
-
*/
|
|
96
|
-
isTargeted?: boolean;
|
|
97
93
|
/**
|
|
98
94
|
* remove "\<at>...\</at>" text from an activity
|
|
99
95
|
*/
|
|
@@ -161,10 +157,6 @@ declare class MessageActivity extends Activity<'message'> implements IMessageAct
|
|
|
161
157
|
* A value that is associated with the activity.
|
|
162
158
|
*/
|
|
163
159
|
value?: any;
|
|
164
|
-
/**
|
|
165
|
-
* Indicates if this is a targeted message visible only to a specific recipient.
|
|
166
|
-
*/
|
|
167
|
-
isTargeted?: boolean;
|
|
168
160
|
constructor(text?: string, value?: Omit<Partial<IMessageActivity>, 'type'>);
|
|
169
161
|
/**
|
|
170
162
|
* initialize from interface
|
|
@@ -259,14 +251,12 @@ declare class MessageActivity extends Activity<'message'> implements IMessageAct
|
|
|
259
251
|
*/
|
|
260
252
|
addStreamFinal(): this;
|
|
261
253
|
/**
|
|
262
|
-
*
|
|
263
|
-
* @param
|
|
264
|
-
*
|
|
254
|
+
* Set the recipient of this message, optionally marking it as a targeted message.
|
|
255
|
+
* @param account - The recipient account
|
|
256
|
+
* @param isTargeted - If true, marks this as a targeted message visible only to the recipient. Defaults to false.
|
|
265
257
|
* @returns this instance for chaining
|
|
266
|
-
* @remarks When using `true`, this must be sent within an activity context (not proactively).
|
|
267
|
-
* For proactive sends, you must provide an explicit recipient ID.
|
|
268
258
|
*/
|
|
269
|
-
|
|
259
|
+
withRecipient(account: Account, isTargeted?: boolean): this;
|
|
270
260
|
}
|
|
271
261
|
/**
|
|
272
262
|
* options for adding a mention
|
|
@@ -90,10 +90,6 @@ interface IMessageActivity extends IActivity<'message'> {
|
|
|
90
90
|
* A value that is associated with the activity.
|
|
91
91
|
*/
|
|
92
92
|
value?: any;
|
|
93
|
-
/**
|
|
94
|
-
* Indicates if this is a targeted message visible only to a specific recipient.
|
|
95
|
-
*/
|
|
96
|
-
isTargeted?: boolean;
|
|
97
93
|
/**
|
|
98
94
|
* remove "\<at>...\</at>" text from an activity
|
|
99
95
|
*/
|
|
@@ -161,10 +157,6 @@ declare class MessageActivity extends Activity<'message'> implements IMessageAct
|
|
|
161
157
|
* A value that is associated with the activity.
|
|
162
158
|
*/
|
|
163
159
|
value?: any;
|
|
164
|
-
/**
|
|
165
|
-
* Indicates if this is a targeted message visible only to a specific recipient.
|
|
166
|
-
*/
|
|
167
|
-
isTargeted?: boolean;
|
|
168
160
|
constructor(text?: string, value?: Omit<Partial<IMessageActivity>, 'type'>);
|
|
169
161
|
/**
|
|
170
162
|
* initialize from interface
|
|
@@ -259,14 +251,12 @@ declare class MessageActivity extends Activity<'message'> implements IMessageAct
|
|
|
259
251
|
*/
|
|
260
252
|
addStreamFinal(): this;
|
|
261
253
|
/**
|
|
262
|
-
*
|
|
263
|
-
* @param
|
|
264
|
-
*
|
|
254
|
+
* Set the recipient of this message, optionally marking it as a targeted message.
|
|
255
|
+
* @param account - The recipient account
|
|
256
|
+
* @param isTargeted - If true, marks this as a targeted message visible only to the recipient. Defaults to false.
|
|
265
257
|
* @returns this instance for chaining
|
|
266
|
-
* @remarks When using `true`, this must be sent within an activity context (not proactively).
|
|
267
|
-
* For proactive sends, you must provide an explicit recipient ID.
|
|
268
258
|
*/
|
|
269
|
-
|
|
259
|
+
withRecipient(account: Account, isTargeted?: boolean): this;
|
|
270
260
|
}
|
|
271
261
|
/**
|
|
272
262
|
* options for adding a mention
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '@microsoft/teams.cards';
|
|
2
|
-
export { a as ActivityLike, S as SentActivity } from '../activity-
|
|
3
|
-
import '../message-
|
|
2
|
+
export { a as ActivityLike, S as SentActivity } from '../activity-C_Apu8i6.mjs';
|
|
3
|
+
import '../message-BfRVRgDX.mjs';
|
|
4
4
|
import './account.mjs';
|
|
5
5
|
import './membership-source.mjs';
|
|
6
6
|
import './membership-source-types.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '@microsoft/teams.cards';
|
|
2
|
-
export { a as ActivityLike, S as SentActivity } from '../activity-
|
|
3
|
-
import '../message-
|
|
2
|
+
export { a as ActivityLike, S as SentActivity } from '../activity-C1r0B_9_.js';
|
|
3
|
+
import '../message-Dahma92e.js';
|
|
4
4
|
import './account.js';
|
|
5
5
|
import './membership-source.js';
|
|
6
6
|
import './membership-source-types.js';
|
package/dist/models/index.d.mts
CHANGED
|
@@ -50,7 +50,7 @@ export { MessagingExtensionResult, MessagingExtensionResultType } from './messag
|
|
|
50
50
|
export { MessagingExtensionSuggestedAction } from './messaging-extension/messaging-extension-suggested-action.mjs';
|
|
51
51
|
export { MessagingExtensionParameter } from './messaging-extension/messaging-extension-parameter.mjs';
|
|
52
52
|
export { MessagingExtensionQuery, MessagingExtensionQueryOptions } from './messaging-extension/messaging-extension-query.mjs';
|
|
53
|
-
export { a as ActivityLike, M as MessagingExtensionAction, S as SentActivity } from '../activity-
|
|
53
|
+
export { a as ActivityLike, M as MessagingExtensionAction, S as SentActivity } from '../activity-C_Apu8i6.mjs';
|
|
54
54
|
export { MessagingExtensionActionResponse } from './messaging-extension/messaging-extension-action-response.mjs';
|
|
55
55
|
export { MessagingExtensionAttachmentLayout } from './messaging-extension/messaging-extension-attachment-layout.mjs';
|
|
56
56
|
export { Message } from './message/message.mjs';
|
|
@@ -110,7 +110,7 @@ export { TeamInfo } from './channel-data/team-info.mjs';
|
|
|
110
110
|
export { TenantInfo } from './channel-data/tenant-info.mjs';
|
|
111
111
|
import '@microsoft/teams.cards';
|
|
112
112
|
import './task-module/task-module-response-base.mjs';
|
|
113
|
-
import '../message-
|
|
113
|
+
import '../message-BfRVRgDX.mjs';
|
|
114
114
|
import '../activities/activity.mjs';
|
|
115
115
|
import '../activities/typing.mjs';
|
|
116
116
|
import '../activities/message/message-update.mjs';
|
package/dist/models/index.d.ts
CHANGED
|
@@ -50,7 +50,7 @@ export { MessagingExtensionResult, MessagingExtensionResultType } from './messag
|
|
|
50
50
|
export { MessagingExtensionSuggestedAction } from './messaging-extension/messaging-extension-suggested-action.js';
|
|
51
51
|
export { MessagingExtensionParameter } from './messaging-extension/messaging-extension-parameter.js';
|
|
52
52
|
export { MessagingExtensionQuery, MessagingExtensionQueryOptions } from './messaging-extension/messaging-extension-query.js';
|
|
53
|
-
export { a as ActivityLike, M as MessagingExtensionAction, S as SentActivity } from '../activity-
|
|
53
|
+
export { a as ActivityLike, M as MessagingExtensionAction, S as SentActivity } from '../activity-C1r0B_9_.js';
|
|
54
54
|
export { MessagingExtensionActionResponse } from './messaging-extension/messaging-extension-action-response.js';
|
|
55
55
|
export { MessagingExtensionAttachmentLayout } from './messaging-extension/messaging-extension-attachment-layout.js';
|
|
56
56
|
export { Message } from './message/message.js';
|
|
@@ -110,7 +110,7 @@ export { TeamInfo } from './channel-data/team-info.js';
|
|
|
110
110
|
export { TenantInfo } from './channel-data/tenant-info.js';
|
|
111
111
|
import '@microsoft/teams.cards';
|
|
112
112
|
import './task-module/task-module-response-base.js';
|
|
113
|
-
import '../message-
|
|
113
|
+
import '../message-Dahma92e.js';
|
|
114
114
|
import '../activities/activity.js';
|
|
115
115
|
import '../activities/typing.js';
|
|
116
116
|
import '../activities/message/message-update.js';
|