@microsoft/agents-hosting-extensions-teams 0.5.1-g2e246ff274

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.
Files changed (317) hide show
  1. package/dist/src/activity-extensions/channelInfo.d.ts +38 -0
  2. package/dist/src/activity-extensions/channelInfo.js +17 -0
  3. package/dist/src/activity-extensions/channelInfo.js.map +1 -0
  4. package/dist/src/activity-extensions/index.d.ts +15 -0
  5. package/dist/src/activity-extensions/index.js +25 -0
  6. package/dist/src/activity-extensions/index.js.map +1 -0
  7. package/dist/src/activity-extensions/notificationInfo.d.ts +38 -0
  8. package/dist/src/activity-extensions/notificationInfo.js +17 -0
  9. package/dist/src/activity-extensions/notificationInfo.js.map +1 -0
  10. package/dist/src/activity-extensions/onBehalfOf.d.ts +45 -0
  11. package/dist/src/activity-extensions/onBehalfOf.js +18 -0
  12. package/dist/src/activity-extensions/onBehalfOf.js.map +1 -0
  13. package/dist/src/activity-extensions/teamInfo.d.ts +38 -0
  14. package/dist/src/activity-extensions/teamInfo.js +17 -0
  15. package/dist/src/activity-extensions/teamInfo.js.map +1 -0
  16. package/dist/src/activity-extensions/teamsChannelAccount.d.ts +34 -0
  17. package/dist/src/activity-extensions/teamsChannelAccount.js +7 -0
  18. package/dist/src/activity-extensions/teamsChannelAccount.js.map +1 -0
  19. package/dist/src/activity-extensions/teamsChannelData.d.ts +230 -0
  20. package/dist/src/activity-extensions/teamsChannelData.js +39 -0
  21. package/dist/src/activity-extensions/teamsChannelData.js.map +1 -0
  22. package/dist/src/activity-extensions/teamsChannelDataParser.d.ts +12 -0
  23. package/dist/src/activity-extensions/teamsChannelDataParser.js +19 -0
  24. package/dist/src/activity-extensions/teamsChannelDataParser.js.map +1 -0
  25. package/dist/src/activity-extensions/teamsChannelDataSettings.d.ts +49 -0
  26. package/dist/src/activity-extensions/teamsChannelDataSettings.js +16 -0
  27. package/dist/src/activity-extensions/teamsChannelDataSettings.js.map +1 -0
  28. package/dist/src/activity-extensions/teamsConversationUpdateEvents.d.ts +58 -0
  29. package/dist/src/activity-extensions/teamsConversationUpdateEvents.js +7 -0
  30. package/dist/src/activity-extensions/teamsConversationUpdateEvents.js.map +1 -0
  31. package/dist/src/activity-extensions/teamsMeetingInfo.d.ts +24 -0
  32. package/dist/src/activity-extensions/teamsMeetingInfo.js +15 -0
  33. package/dist/src/activity-extensions/teamsMeetingInfo.js.map +1 -0
  34. package/dist/src/activity-extensions/teamsMessageEvents.d.ts +5 -0
  35. package/dist/src/activity-extensions/teamsMessageEvents.js +7 -0
  36. package/dist/src/activity-extensions/teamsMessageEvents.js.map +1 -0
  37. package/dist/src/activity-extensions/tenantInfo.d.ts +24 -0
  38. package/dist/src/activity-extensions/tenantInfo.js +15 -0
  39. package/dist/src/activity-extensions/tenantInfo.js.map +1 -0
  40. package/dist/src/client/index.d.ts +6 -0
  41. package/dist/src/client/index.js +23 -0
  42. package/dist/src/client/index.js.map +1 -0
  43. package/dist/src/client/teamsConnectorClient.d.ts +146 -0
  44. package/dist/src/client/teamsConnectorClient.js +313 -0
  45. package/dist/src/client/teamsConnectorClient.js.map +1 -0
  46. package/dist/src/client/teamsConnectorClient.types.d.ts +157 -0
  47. package/dist/src/client/teamsConnectorClient.types.js +7 -0
  48. package/dist/src/client/teamsConnectorClient.types.js.map +1 -0
  49. package/dist/src/compat/readReceipInfo.d.ts +31 -0
  50. package/dist/src/compat/readReceipInfo.js +48 -0
  51. package/dist/src/compat/readReceipInfo.js.map +1 -0
  52. package/dist/src/compat/teamsActivityHandler.d.ts +423 -0
  53. package/dist/src/compat/teamsActivityHandler.js +911 -0
  54. package/dist/src/compat/teamsActivityHandler.js.map +1 -0
  55. package/dist/src/file/fileConsentCardResponse.d.ts +26 -0
  56. package/dist/src/file/fileConsentCardResponse.js +7 -0
  57. package/dist/src/file/fileConsentCardResponse.js.map +1 -0
  58. package/dist/src/file/fileUploadInfo.d.ts +29 -0
  59. package/dist/src/file/fileUploadInfo.js +7 -0
  60. package/dist/src/file/fileUploadInfo.js.map +1 -0
  61. package/dist/src/file/index.d.ts +6 -0
  62. package/dist/src/file/index.js +23 -0
  63. package/dist/src/file/index.js.map +1 -0
  64. package/dist/src/index.d.ts +10 -0
  65. package/dist/src/index.js +27 -0
  66. package/dist/src/index.js.map +1 -0
  67. package/dist/src/meeting/index.d.ts +22 -0
  68. package/dist/src/meeting/index.js +39 -0
  69. package/dist/src/meeting/index.js.map +1 -0
  70. package/dist/src/meeting/meeting.d.ts +115 -0
  71. package/dist/src/meeting/meeting.js +257 -0
  72. package/dist/src/meeting/meeting.js.map +1 -0
  73. package/dist/src/meeting/meetingDetails.d.ts +18 -0
  74. package/dist/src/meeting/meetingDetails.js +7 -0
  75. package/dist/src/meeting/meetingDetails.js.map +1 -0
  76. package/dist/src/meeting/meetingDetailsBase.d.ts +15 -0
  77. package/dist/src/meeting/meetingDetailsBase.js +7 -0
  78. package/dist/src/meeting/meetingDetailsBase.js.map +1 -0
  79. package/dist/src/meeting/meetingEndEventDetails.d.ts +12 -0
  80. package/dist/src/meeting/meetingEndEventDetails.js +7 -0
  81. package/dist/src/meeting/meetingEndEventDetails.js.map +1 -0
  82. package/dist/src/meeting/meetingEventDetails.d.ts +12 -0
  83. package/dist/src/meeting/meetingEventDetails.js +7 -0
  84. package/dist/src/meeting/meetingEventDetails.js.map +1 -0
  85. package/dist/src/meeting/meetingInfo.d.ts +24 -0
  86. package/dist/src/meeting/meetingInfo.js +7 -0
  87. package/dist/src/meeting/meetingInfo.js.map +1 -0
  88. package/dist/src/meeting/meetingNotification.d.ts +9 -0
  89. package/dist/src/meeting/meetingNotification.js +7 -0
  90. package/dist/src/meeting/meetingNotification.js.map +1 -0
  91. package/dist/src/meeting/meetingNotificationBase.d.ts +14 -0
  92. package/dist/src/meeting/meetingNotificationBase.js +7 -0
  93. package/dist/src/meeting/meetingNotificationBase.js.map +1 -0
  94. package/dist/src/meeting/meetingNotificationChannelData.d.ts +12 -0
  95. package/dist/src/meeting/meetingNotificationChannelData.js +7 -0
  96. package/dist/src/meeting/meetingNotificationChannelData.js.map +1 -0
  97. package/dist/src/meeting/meetingNotificationRecipientFailureInfo.d.ts +15 -0
  98. package/dist/src/meeting/meetingNotificationRecipientFailureInfo.js +7 -0
  99. package/dist/src/meeting/meetingNotificationRecipientFailureInfo.js.map +1 -0
  100. package/dist/src/meeting/meetingNotificationResponse.d.ts +14 -0
  101. package/dist/src/meeting/meetingNotificationResponse.js +7 -0
  102. package/dist/src/meeting/meetingNotificationResponse.js.map +1 -0
  103. package/dist/src/meeting/meetingParticipantsEventDetails.d.ts +12 -0
  104. package/dist/src/meeting/meetingParticipantsEventDetails.js +7 -0
  105. package/dist/src/meeting/meetingParticipantsEventDetails.js.map +1 -0
  106. package/dist/src/meeting/meetingStageSurface.d.ts +16 -0
  107. package/dist/src/meeting/meetingStageSurface.js +7 -0
  108. package/dist/src/meeting/meetingStageSurface.js.map +1 -0
  109. package/dist/src/meeting/meetingStartEventDetails.d.ts +14 -0
  110. package/dist/src/meeting/meetingStartEventDetails.js +7 -0
  111. package/dist/src/meeting/meetingStartEventDetails.js.map +1 -0
  112. package/dist/src/meeting/meetingSurface.d.ts +10 -0
  113. package/dist/src/meeting/meetingSurface.js +7 -0
  114. package/dist/src/meeting/meetingSurface.js.map +1 -0
  115. package/dist/src/meeting/meetingTabIconSurface.d.ts +17 -0
  116. package/dist/src/meeting/meetingTabIconSurface.js +7 -0
  117. package/dist/src/meeting/meetingTabIconSurface.js.map +1 -0
  118. package/dist/src/meeting/targetedMeetingNotification.d.ts +20 -0
  119. package/dist/src/meeting/targetedMeetingNotification.js +7 -0
  120. package/dist/src/meeting/targetedMeetingNotification.js.map +1 -0
  121. package/dist/src/meeting/targetedMeetingNotificationValue.d.ts +18 -0
  122. package/dist/src/meeting/targetedMeetingNotificationValue.js +7 -0
  123. package/dist/src/meeting/targetedMeetingNotificationValue.js.map +1 -0
  124. package/dist/src/meeting/teamsMeetingMember.d.ts +19 -0
  125. package/dist/src/meeting/teamsMeetingMember.js +7 -0
  126. package/dist/src/meeting/teamsMeetingMember.js.map +1 -0
  127. package/dist/src/meeting/teamsMeetingParticipant.d.ts +25 -0
  128. package/dist/src/meeting/teamsMeetingParticipant.js +7 -0
  129. package/dist/src/meeting/teamsMeetingParticipant.js.map +1 -0
  130. package/dist/src/meeting/userMeetingDetails.d.ts +17 -0
  131. package/dist/src/meeting/userMeetingDetails.js +7 -0
  132. package/dist/src/meeting/userMeetingDetails.js.map +1 -0
  133. package/dist/src/message-actions-payload/index.d.ts +13 -0
  134. package/dist/src/message-actions-payload/index.js +30 -0
  135. package/dist/src/message-actions-payload/index.js.map +1 -0
  136. package/dist/src/message-actions-payload/messageActionsPayload.d.ts +90 -0
  137. package/dist/src/message-actions-payload/messageActionsPayload.js +7 -0
  138. package/dist/src/message-actions-payload/messageActionsPayload.js.map +1 -0
  139. package/dist/src/message-actions-payload/messageActionsPayloadApp.d.ts +25 -0
  140. package/dist/src/message-actions-payload/messageActionsPayloadApp.js +7 -0
  141. package/dist/src/message-actions-payload/messageActionsPayloadApp.js.map +1 -0
  142. package/dist/src/message-actions-payload/messageActionsPayloadAttachment.d.ts +33 -0
  143. package/dist/src/message-actions-payload/messageActionsPayloadAttachment.js +7 -0
  144. package/dist/src/message-actions-payload/messageActionsPayloadAttachment.js.map +1 -0
  145. package/dist/src/message-actions-payload/messageActionsPayloadBody.d.ts +25 -0
  146. package/dist/src/message-actions-payload/messageActionsPayloadBody.js +7 -0
  147. package/dist/src/message-actions-payload/messageActionsPayloadBody.js.map +1 -0
  148. package/dist/src/message-actions-payload/messageActionsPayloadConversation.d.ts +25 -0
  149. package/dist/src/message-actions-payload/messageActionsPayloadConversation.js +7 -0
  150. package/dist/src/message-actions-payload/messageActionsPayloadConversation.js.map +1 -0
  151. package/dist/src/message-actions-payload/messageActionsPayloadFrom.d.ts +24 -0
  152. package/dist/src/message-actions-payload/messageActionsPayloadFrom.js +7 -0
  153. package/dist/src/message-actions-payload/messageActionsPayloadFrom.js.map +1 -0
  154. package/dist/src/message-actions-payload/messageActionsPayloadMention.d.ts +22 -0
  155. package/dist/src/message-actions-payload/messageActionsPayloadMention.js +7 -0
  156. package/dist/src/message-actions-payload/messageActionsPayloadMention.js.map +1 -0
  157. package/dist/src/message-actions-payload/messageActionsPayloadReaction.d.ts +26 -0
  158. package/dist/src/message-actions-payload/messageActionsPayloadReaction.js +7 -0
  159. package/dist/src/message-actions-payload/messageActionsPayloadReaction.js.map +1 -0
  160. package/dist/src/message-actions-payload/messageActionsPayloadUser.d.ts +29 -0
  161. package/dist/src/message-actions-payload/messageActionsPayloadUser.js +7 -0
  162. package/dist/src/message-actions-payload/messageActionsPayloadUser.js.map +1 -0
  163. package/dist/src/messageExtension/appBasedLinkQuery.d.ts +19 -0
  164. package/dist/src/messageExtension/appBasedLinkQuery.js +7 -0
  165. package/dist/src/messageExtension/appBasedLinkQuery.js.map +1 -0
  166. package/dist/src/messageExtension/index.d.ts +14 -0
  167. package/dist/src/messageExtension/index.js +29 -0
  168. package/dist/src/messageExtension/index.js.map +1 -0
  169. package/dist/src/messageExtension/messageExtension.d.ts +88 -0
  170. package/dist/src/messageExtension/messageExtension.js +283 -0
  171. package/dist/src/messageExtension/messageExtension.js.map +1 -0
  172. package/dist/src/messageExtension/messagingExtensionAction.d.ts +40 -0
  173. package/dist/src/messageExtension/messagingExtensionAction.js +7 -0
  174. package/dist/src/messageExtension/messagingExtensionAction.js.map +1 -0
  175. package/dist/src/messageExtension/messagingExtensionActionResponse.d.ts +23 -0
  176. package/dist/src/messageExtension/messagingExtensionActionResponse.js +7 -0
  177. package/dist/src/messageExtension/messagingExtensionActionResponse.js.map +1 -0
  178. package/dist/src/messageExtension/messagingExtensionAttachment.d.ts +14 -0
  179. package/dist/src/messageExtension/messagingExtensionAttachment.js +7 -0
  180. package/dist/src/messageExtension/messagingExtensionAttachment.js.map +1 -0
  181. package/dist/src/messageExtension/messagingExtensionParameter.d.ts +31 -0
  182. package/dist/src/messageExtension/messagingExtensionParameter.js +16 -0
  183. package/dist/src/messageExtension/messagingExtensionParameter.js.map +1 -0
  184. package/dist/src/messageExtension/messagingExtensionQuery.d.ts +84 -0
  185. package/dist/src/messageExtension/messagingExtensionQuery.js +31 -0
  186. package/dist/src/messageExtension/messagingExtensionQuery.js.map +1 -0
  187. package/dist/src/messageExtension/messagingExtensionQueryOptions.d.ts +31 -0
  188. package/dist/src/messageExtension/messagingExtensionQueryOptions.js +16 -0
  189. package/dist/src/messageExtension/messagingExtensionQueryOptions.js.map +1 -0
  190. package/dist/src/messageExtension/messagingExtensionResponse.d.ts +18 -0
  191. package/dist/src/messageExtension/messagingExtensionResponse.js +7 -0
  192. package/dist/src/messageExtension/messagingExtensionResponse.js.map +1 -0
  193. package/dist/src/messageExtension/messagingExtensionResult.d.ts +50 -0
  194. package/dist/src/messageExtension/messagingExtensionResult.js +7 -0
  195. package/dist/src/messageExtension/messagingExtensionResult.js.map +1 -0
  196. package/dist/src/messageExtension/messagingExtensionSuggestedAction.d.ts +14 -0
  197. package/dist/src/messageExtension/messagingExtensionSuggestedAction.js +7 -0
  198. package/dist/src/messageExtension/messagingExtensionSuggestedAction.js.map +1 -0
  199. package/dist/src/messages/messages.d.ts +40 -0
  200. package/dist/src/messages/messages.js +82 -0
  201. package/dist/src/messages/messages.js.map +1 -0
  202. package/dist/src/taskModule/index.d.ts +11 -0
  203. package/dist/src/taskModule/index.js +28 -0
  204. package/dist/src/taskModule/index.js.map +1 -0
  205. package/dist/src/taskModule/taskModule.d.ts +72 -0
  206. package/dist/src/taskModule/taskModule.js +210 -0
  207. package/dist/src/taskModule/taskModule.js.map +1 -0
  208. package/dist/src/taskModule/taskModuleContinueResponse.d.ts +15 -0
  209. package/dist/src/taskModule/taskModuleContinueResponse.js +7 -0
  210. package/dist/src/taskModule/taskModuleContinueResponse.js.map +1 -0
  211. package/dist/src/taskModule/taskModuleMessageResponse.d.ts +14 -0
  212. package/dist/src/taskModule/taskModuleMessageResponse.js +7 -0
  213. package/dist/src/taskModule/taskModuleMessageResponse.js.map +1 -0
  214. package/dist/src/taskModule/taskModuleRequest.d.ts +22 -0
  215. package/dist/src/taskModule/taskModuleRequest.js +7 -0
  216. package/dist/src/taskModule/taskModuleRequest.js.map +1 -0
  217. package/dist/src/taskModule/taskModuleRequestContext.d.ts +13 -0
  218. package/dist/src/taskModule/taskModuleRequestContext.js +7 -0
  219. package/dist/src/taskModule/taskModuleRequestContext.js.map +1 -0
  220. package/dist/src/taskModule/taskModuleResponse.d.ts +19 -0
  221. package/dist/src/taskModule/taskModuleResponse.js +7 -0
  222. package/dist/src/taskModule/taskModuleResponse.js.map +1 -0
  223. package/dist/src/taskModule/taskModuleResponseBase.d.ts +17 -0
  224. package/dist/src/taskModule/taskModuleResponseBase.js +7 -0
  225. package/dist/src/taskModule/taskModuleResponseBase.js.map +1 -0
  226. package/dist/src/taskModule/taskModuleTaskInfo.d.ts +38 -0
  227. package/dist/src/taskModule/taskModuleTaskInfo.js +7 -0
  228. package/dist/src/taskModule/taskModuleTaskInfo.js.map +1 -0
  229. package/dist/src/teamsAgentExtension.d.ts +30 -0
  230. package/dist/src/teamsAgentExtension.js +184 -0
  231. package/dist/src/teamsAgentExtension.js.map +1 -0
  232. package/dist/src/teamsAttachmentDownloader.d.ts +27 -0
  233. package/dist/src/teamsAttachmentDownloader.js +80 -0
  234. package/dist/src/teamsAttachmentDownloader.js.map +1 -0
  235. package/dist/src/teamsInfo.d.ts +174 -0
  236. package/dist/src/teamsInfo.js +387 -0
  237. package/dist/src/teamsInfo.js.map +1 -0
  238. package/package.json +37 -0
  239. package/src/activity-extensions/channelInfo.ts +33 -0
  240. package/src/activity-extensions/index.ts +16 -0
  241. package/src/activity-extensions/notificationInfo.ts +33 -0
  242. package/src/activity-extensions/onBehalfOf.ts +38 -0
  243. package/src/activity-extensions/teamInfo.ts +33 -0
  244. package/src/activity-extensions/teamsChannelAccount.ts +36 -0
  245. package/src/activity-extensions/teamsChannelData.ts +75 -0
  246. package/src/activity-extensions/teamsChannelDataParser.ts +17 -0
  247. package/src/activity-extensions/teamsChannelDataSettings.ts +28 -0
  248. package/src/activity-extensions/teamsConversationUpdateEvents.ts +61 -0
  249. package/src/activity-extensions/teamsMeetingInfo.ts +23 -0
  250. package/src/activity-extensions/teamsMessageEvents.ts +6 -0
  251. package/src/activity-extensions/tenantInfo.ts +23 -0
  252. package/src/client/index.ts +7 -0
  253. package/src/client/teamsConnectorClient.ts +340 -0
  254. package/src/client/teamsConnectorClient.types.ts +168 -0
  255. package/src/compat/readReceipInfo.ts +54 -0
  256. package/src/compat/teamsActivityHandler.ts +1140 -0
  257. package/src/file/fileConsentCardResponse.ts +31 -0
  258. package/src/file/fileUploadInfo.ts +34 -0
  259. package/src/file/index.ts +7 -0
  260. package/src/index.ts +10 -0
  261. package/src/meeting/index.ts +23 -0
  262. package/src/meeting/meeting.ts +307 -0
  263. package/src/meeting/meetingDetails.ts +20 -0
  264. package/src/meeting/meetingDetailsBase.ts +16 -0
  265. package/src/meeting/meetingEndEventDetails.ts +14 -0
  266. package/src/meeting/meetingEventDetails.ts +14 -0
  267. package/src/meeting/meetingInfo.ts +26 -0
  268. package/src/meeting/meetingNotification.ts +11 -0
  269. package/src/meeting/meetingNotificationBase.ts +15 -0
  270. package/src/meeting/meetingNotificationChannelData.ts +14 -0
  271. package/src/meeting/meetingNotificationRecipientFailureInfo.ts +16 -0
  272. package/src/meeting/meetingNotificationResponse.ts +16 -0
  273. package/src/meeting/meetingParticipantsEventDetails.ts +14 -0
  274. package/src/meeting/meetingStageSurface.ts +17 -0
  275. package/src/meeting/meetingStartEventDetails.ts +16 -0
  276. package/src/meeting/meetingSurface.ts +12 -0
  277. package/src/meeting/meetingTabIconSurface.ts +19 -0
  278. package/src/meeting/targetedMeetingNotification.ts +23 -0
  279. package/src/meeting/targetedMeetingNotificationValue.ts +21 -0
  280. package/src/meeting/teamsMeetingMember.ts +22 -0
  281. package/src/meeting/teamsMeetingParticipant.ts +29 -0
  282. package/src/meeting/userMeetingDetails.ts +19 -0
  283. package/src/message-actions-payload/index.ts +14 -0
  284. package/src/message-actions-payload/messageActionsPayload.ts +93 -0
  285. package/src/message-actions-payload/messageActionsPayloadApp.ts +27 -0
  286. package/src/message-actions-payload/messageActionsPayloadAttachment.ts +34 -0
  287. package/src/message-actions-payload/messageActionsPayloadBody.ts +27 -0
  288. package/src/message-actions-payload/messageActionsPayloadConversation.ts +27 -0
  289. package/src/message-actions-payload/messageActionsPayloadFrom.ts +26 -0
  290. package/src/message-actions-payload/messageActionsPayloadMention.ts +24 -0
  291. package/src/message-actions-payload/messageActionsPayloadReaction.ts +29 -0
  292. package/src/message-actions-payload/messageActionsPayloadUser.ts +31 -0
  293. package/src/messageExtension/appBasedLinkQuery.ts +20 -0
  294. package/src/messageExtension/index.ts +15 -0
  295. package/src/messageExtension/messageExtension.ts +324 -0
  296. package/src/messageExtension/messagingExtensionAction.ts +44 -0
  297. package/src/messageExtension/messagingExtensionActionResponse.ts +25 -0
  298. package/src/messageExtension/messagingExtensionAttachment.ts +16 -0
  299. package/src/messageExtension/messagingExtensionParameter.ts +28 -0
  300. package/src/messageExtension/messagingExtensionQuery.ts +51 -0
  301. package/src/messageExtension/messagingExtensionQueryOptions.ts +28 -0
  302. package/src/messageExtension/messagingExtensionResponse.ts +21 -0
  303. package/src/messageExtension/messagingExtensionResult.ts +60 -0
  304. package/src/messageExtension/messagingExtensionSuggestedAction.ts +16 -0
  305. package/src/messages/messages.ts +91 -0
  306. package/src/taskModule/index.ts +12 -0
  307. package/src/taskModule/taskModule.ts +241 -0
  308. package/src/taskModule/taskModuleContinueResponse.ts +17 -0
  309. package/src/taskModule/taskModuleMessageResponse.ts +16 -0
  310. package/src/taskModule/taskModuleRequest.ts +24 -0
  311. package/src/taskModule/taskModuleRequestContext.ts +14 -0
  312. package/src/taskModule/taskModuleResponse.ts +21 -0
  313. package/src/taskModule/taskModuleResponseBase.ts +19 -0
  314. package/src/taskModule/taskModuleTaskInfo.ts +40 -0
  315. package/src/teamsAgentExtension.ts +201 -0
  316. package/src/teamsAttachmentDownloader.ts +78 -0
  317. package/src/teamsInfo.ts +430 -0
@@ -0,0 +1,313 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TeamsConnectorClient = void 0;
4
+ /**
5
+ * A client for interacting with Microsoft Teams APIs.
6
+ * Extends the ConnectorClient class to provide Teams-specific functionalities.
7
+ */
8
+ class TeamsConnectorClient {
9
+ constructor(client) {
10
+ this.client = client;
11
+ this.axiosInstance = client.axiosInstance;
12
+ }
13
+ /**
14
+ * Retrieves a member from a conversation or team.
15
+ * @param activity - The activity containing the context.
16
+ * @param userId - The ID of the user to retrieve.
17
+ * @returns A TeamsChannelAccount representing the member.
18
+ */
19
+ static async getMember(activity, userId) {
20
+ var _a;
21
+ const teamsChannelData = activity.channelData;
22
+ const teamId = (_a = teamsChannelData.team) === null || _a === void 0 ? void 0 : _a.id;
23
+ if (teamId) {
24
+ return await this.getTeamMember(activity, teamId, userId);
25
+ }
26
+ else {
27
+ const conversationId = (activity.conversation != null) && activity.conversation.id ? activity.conversation.id : undefined;
28
+ return await this.getMemberInternal(activity, conversationId, userId);
29
+ }
30
+ }
31
+ /**
32
+ * Retrieves the team ID from an activity.
33
+ * @param activity - The activity containing the context.
34
+ * @returns The team ID as a string.
35
+ * @throws Error if the activity is missing or invalid.
36
+ */
37
+ static getTeamId(activity) {
38
+ if (!activity) {
39
+ throw new Error('Missing activity parameter');
40
+ }
41
+ const channelData = activity.channelData;
42
+ const team = channelData && (channelData.team != null) ? channelData.team : undefined;
43
+ const teamId = (team != null) && typeof team.id === 'string' ? team.id : undefined;
44
+ return teamId;
45
+ }
46
+ /**
47
+ * Retrieves a member from a team.
48
+ * @param activity - The activity containing the context.
49
+ * @param teamId - The ID of the team.
50
+ * @param userId - The ID of the user to retrieve.
51
+ * @returns A TeamsChannelAccount representing the team member.
52
+ * @throws Error if the teamId or userId is missing.
53
+ */
54
+ static async getTeamMember(activity, teamId, userId) {
55
+ const t = teamId || this.getTeamId(activity);
56
+ if (!t) {
57
+ throw new Error('This method is only valid within the scope of a MS Teams Team.');
58
+ }
59
+ if (!userId) {
60
+ throw new Error('userId is required');
61
+ }
62
+ return await this.getMemberInternal(activity, t, userId);
63
+ }
64
+ /**
65
+ * Retrieves a member from a conversation.
66
+ * @param conversationId - The ID of the conversation.
67
+ * @param userId - The ID of the user to retrieve.
68
+ * @returns A ChannelAccount representing the conversation member.
69
+ */
70
+ async getConversationMember(conversationId, userId) {
71
+ const config = {
72
+ method: 'get',
73
+ url: `/v3/conversations/${conversationId}/members/${userId}`,
74
+ headers: {
75
+ 'Content-Type': 'application/json'
76
+ }
77
+ };
78
+ const response = await this.axiosInstance(config);
79
+ return response.data;
80
+ }
81
+ /**
82
+ * Retrieves a member from a conversation or team internally.
83
+ * @param activity - The activity containing the context.
84
+ * @param conversationId - The ID of the conversation.
85
+ * @param userId - The ID of the user to retrieve.
86
+ * @returns A ChannelAccount representing the member.
87
+ * @throws Error if the conversationId is missing or the client is unavailable.
88
+ */
89
+ static async getMemberInternal(activity, conversationId, userId) {
90
+ var _a;
91
+ if (!conversationId) {
92
+ throw new Error('conversationId is required');
93
+ }
94
+ const client = (_a = activity.turnState) === null || _a === void 0 ? void 0 : _a.get(activity.adapter.ConnectorClientKey);
95
+ if (!client) {
96
+ throw new Error('Client is not available in the context.');
97
+ }
98
+ const teamMember = await client.getConversationMember(conversationId, userId);
99
+ return teamMember;
100
+ }
101
+ /**
102
+ * Retrieves paged members of a conversation.
103
+ * @param conversationId - The ID of the conversation.
104
+ * @param pageSize - The number of members per page.
105
+ * @param continuationToken - The token for pagination.
106
+ * @returns A TeamsPagedMembersResult containing the paged members.
107
+ */
108
+ async getConversationPagedMember(conversationId, pageSize, continuationToken) {
109
+ const config = {
110
+ method: 'get',
111
+ url: `v3/conversations/${conversationId}/pagedMembers`,
112
+ params: {
113
+ pageSize,
114
+ continuationToken
115
+ }
116
+ };
117
+ const response = await this.axiosInstance(config);
118
+ return response.data;
119
+ }
120
+ /**
121
+ * Fetches the list of channels in a team.
122
+ * @param teamId - The ID of the team.
123
+ * @returns An array of ChannelInfo objects representing the channels.
124
+ */
125
+ async fetchChannelList(teamId) {
126
+ const config = {
127
+ method: 'get',
128
+ url: `v3/teams/${teamId}/conversations`
129
+ };
130
+ const response = await this.axiosInstance(config);
131
+ return response.data;
132
+ }
133
+ /**
134
+ * Fetches the details of a team.
135
+ * @param teamId - The ID of the team.
136
+ * @returns A TeamDetails object containing the team details.
137
+ */
138
+ async fetchTeamDetails(teamId) {
139
+ const config = {
140
+ method: 'get',
141
+ url: `v3/teams/${teamId}`
142
+ };
143
+ const response = await this.axiosInstance(config);
144
+ return response.data;
145
+ }
146
+ /**
147
+ * Fetches information about a meeting participant.
148
+ * @param meetingId - The ID of the meeting.
149
+ * @param participantId - The ID of the participant.
150
+ * @param tenantId - The tenant ID.
151
+ * @returns A string containing participant information.
152
+ */
153
+ async fetchMeetingParticipant(meetingId, participantId, tenantId) {
154
+ const config = {
155
+ method: 'get',
156
+ url: `v1/meetings/${meetingId}/participants/${participantId}`,
157
+ params: { tenantId }
158
+ };
159
+ const response = await this.axiosInstance(config);
160
+ return response.data;
161
+ }
162
+ /**
163
+ * Fetches information about a meeting.
164
+ * @param meetingId - The ID of the meeting.
165
+ * @returns A MeetingInfo object containing the meeting information.
166
+ */
167
+ async fetchMeetingInfo(meetingId) {
168
+ const config = {
169
+ method: 'get',
170
+ url: `v1/meetings/${meetingId}`
171
+ };
172
+ const response = await this.axiosInstance(config);
173
+ return response.data;
174
+ }
175
+ /**
176
+ * Sends a notification to a meeting.
177
+ * @param meetingId - The ID of the meeting.
178
+ * @param notification - The notification to send.
179
+ * @returns A MeetingNotificationResponse object containing the response.
180
+ */
181
+ async sendMeetingNotification(meetingId, notification) {
182
+ const config = {
183
+ method: 'post',
184
+ url: `v1/meetings/${meetingId}/notification`,
185
+ data: notification
186
+ };
187
+ const response = await this.axiosInstance(config);
188
+ return response.data;
189
+ }
190
+ /**
191
+ * Sends a message to a list of users.
192
+ * @param activity - The activity to send.
193
+ * @param tenantId - The tenant ID.
194
+ * @param members - The list of members to send the message to.
195
+ * @returns A TeamsBatchOperationResponse object containing the response.
196
+ */
197
+ async sendMessageToListOfUsers(activity, tenantId, members) {
198
+ const content = {
199
+ activity,
200
+ members,
201
+ tenantId
202
+ };
203
+ const config = {
204
+ method: 'post',
205
+ url: 'v3/batch/conversation/users',
206
+ data: content
207
+ };
208
+ const response = await this.axiosInstance(config);
209
+ return response.data;
210
+ }
211
+ /**
212
+ * Sends a message to all users in a tenant.
213
+ * @param activity - The activity to send.
214
+ * @param tenandId - The tenant ID.
215
+ * @returns A TeamsBatchOperationResponse object containing the response.
216
+ */
217
+ async sendMessageToAllUsersInTenant(activity, tenandId) {
218
+ const content = {
219
+ activity,
220
+ tenandId
221
+ };
222
+ const config = {
223
+ method: 'post',
224
+ url: 'v3/batch/conversation/tenant',
225
+ data: content
226
+ };
227
+ const response = await this.axiosInstance(config);
228
+ return response.data;
229
+ }
230
+ /**
231
+ * Sends a message to all users in a team.
232
+ * @param activity - The activity to send.
233
+ * @param tenantId - The tenant ID.
234
+ * @param teamId - The team ID.
235
+ * @returns A TeamsBatchOperationResponse object containing the response.
236
+ */
237
+ async sendMessageToAllUsersInTeam(activity, tenantId, teamId) {
238
+ const content = {
239
+ activity,
240
+ tenantId,
241
+ teamId
242
+ };
243
+ const config = {
244
+ method: 'post',
245
+ url: 'v3/batch/conversation/team',
246
+ data: content
247
+ };
248
+ const response = await this.axiosInstance(config);
249
+ return response.data;
250
+ }
251
+ /**
252
+ * Sends a message to a list of channels.
253
+ * @param activity - The activity to send.
254
+ * @param tenantId - The tenant ID.
255
+ * @param members - The list of members to send the message to.
256
+ * @returns A TeamsBatchOperationResponse object containing the response.
257
+ */
258
+ async sendMessageToListOfChannels(activity, tenantId, members) {
259
+ const content = {
260
+ activity,
261
+ tenantId,
262
+ members
263
+ };
264
+ const config = {
265
+ method: 'post',
266
+ url: 'v3/batch/conversation/channels',
267
+ data: content
268
+ };
269
+ const response = await this.axiosInstance(config);
270
+ return response.data;
271
+ }
272
+ /**
273
+ * Retrieves the state of a batch operation.
274
+ * @param operationId - The ID of the operation.
275
+ * @returns A BatchOperationStateResponse object containing the operation state.
276
+ */
277
+ async getOperationState(operationId) {
278
+ const config = {
279
+ method: 'get',
280
+ url: `v3/batch/conversation/${operationId}`
281
+ };
282
+ const response = await this.axiosInstance(config);
283
+ return response.data;
284
+ }
285
+ /**
286
+ * Retrieves the failed entries of a batch operation.
287
+ * @param operationId - The ID of the operation.
288
+ * @returns A BatchFailedEntriesResponse object containing the failed entries.
289
+ */
290
+ async getFailedEntries(operationId) {
291
+ const config = {
292
+ method: 'get',
293
+ url: `v3/batch/conversation/failedentries/${operationId}`
294
+ };
295
+ const response = await this.axiosInstance(config);
296
+ return response.data;
297
+ }
298
+ /**
299
+ * Cancels a batch operation.
300
+ * @param operationId - The ID of the operation.
301
+ * @returns A CancelOperationResponse object containing the response.
302
+ */
303
+ async cancelOperation(operationId) {
304
+ const config = {
305
+ method: 'delete',
306
+ url: `v3/batch/conversation/${operationId}`
307
+ };
308
+ const response = await this.axiosInstance(config);
309
+ return response.data;
310
+ }
311
+ }
312
+ exports.TeamsConnectorClient = TeamsConnectorClient;
313
+ //# sourceMappingURL=teamsConnectorClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"teamsConnectorClient.js","sourceRoot":"","sources":["../../../src/client/teamsConnectorClient.ts"],"names":[],"mappings":";;;AAYA;;;GAGG;AACH,MAAa,oBAAoB;IAE/B,YAAqB,MAAuB;QAAvB,WAAM,GAAN,MAAM,CAAiB;QAC1C,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,aAAa,CAAA;IAC3C,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,KAAK,CAAC,SAAS,CAAE,QAAkB,EAAE,MAAc;;QACxD,MAAM,gBAAgB,GAAG,QAAQ,CAAC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E;SAC1D,CAAA;QACD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAA;QACjD,OAAO,QAAQ,CAAC,IAAI,CAAA;IACtB,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,eAAe,CAAE,WAAmB;QAC/C,MAAM,MAAM,GAAuB;YACjC,MAAM,EAAE,QAAQ;YAChB,GAAG,EAAE,yBAAyB,WAAW,EAAE;SAC5C,CAAA;QAED,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAA;QACjD,OAAO,QAAQ,CAAC,IAAI,CAAA;IACtB,CAAC;CACF;AAnUD,oDAmUC"}
@@ -0,0 +1,157 @@
1
+ /**
2
+ * Copyright(c) Microsoft Corporation.All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+ import { TeamsChannelAccount } from '../activity-extensions/teamsChannelAccount';
6
+ /**
7
+ * Represents details of a Microsoft Teams team.
8
+ */
9
+ export interface TeamDetails {
10
+ /**
11
+ * Unique identifier of the team.
12
+ */
13
+ id?: string;
14
+ /**
15
+ * Name of the team.
16
+ */
17
+ name?: string;
18
+ /**
19
+ * Azure Active Directory group ID of the team.
20
+ */
21
+ aadGroupId?: string;
22
+ /**
23
+ * Number of channels in the team.
24
+ */
25
+ channelCount?: number;
26
+ /**
27
+ * Number of members in the team.
28
+ */
29
+ memberCount?: number;
30
+ /**
31
+ * Type of the team.
32
+ */
33
+ type?: string;
34
+ }
35
+ /**
36
+ * Represents a member in a Microsoft Teams team.
37
+ */
38
+ export type TeamsMember = {
39
+ /**
40
+ * Unique identifier of the member.
41
+ */
42
+ id: string;
43
+ };
44
+ /**
45
+ * Represents a paged result of Teams members.
46
+ */
47
+ export interface TeamsPagedMembersResult {
48
+ /**
49
+ * Continuation token for fetching the next page of results.
50
+ */
51
+ continuationToken: string;
52
+ /**
53
+ * List of Teams channel accounts.
54
+ */
55
+ members: TeamsChannelAccount[];
56
+ }
57
+ /**
58
+ * Represents a failed entry in a batch operation.
59
+ */
60
+ export interface BatchFailedEntry {
61
+ /**
62
+ * Unique identifier of the failed entry.
63
+ */
64
+ id: string;
65
+ /**
66
+ * Error message associated with the failed entry.
67
+ */
68
+ error: string;
69
+ }
70
+ /**
71
+ * Represents the response for failed entries in a batch operation.
72
+ */
73
+ export interface BatchFailedEntriesResponse {
74
+ /**
75
+ * A token to retrieve the next page of results.
76
+ */
77
+ continuationToken: string;
78
+ /**
79
+ * A list of failed entry responses.
80
+ */
81
+ failedEntryResponses: BatchFailedEntry[];
82
+ }
83
+ /**
84
+ * Represents the response of a batch operation.
85
+ */
86
+ export interface BatchOperationResponse {
87
+ /**
88
+ * Unique identifier of the batch operation.
89
+ */
90
+ operationId: string;
91
+ }
92
+ /**
93
+ * Represents the state of a batch operation.
94
+ */
95
+ export interface BatchOperationStateResponse {
96
+ /**
97
+ * The state of the batch operation.
98
+ */
99
+ state: string;
100
+ /**
101
+ * A map of status codes to their counts.
102
+ */
103
+ statusMap: Record<number, number>;
104
+ /**
105
+ * The retry-after date for the batch operation.
106
+ */
107
+ retryAfter?: Date;
108
+ /**
109
+ * The total number of entries in the batch operation.
110
+ */
111
+ totalEntriesCount: number;
112
+ }
113
+ /**
114
+ * Represents the response from a cancel operation.
115
+ */
116
+ export type CancelOperationResponse = {
117
+ /**
118
+ * The response object.
119
+ */
120
+ _response: Response & {
121
+ /**
122
+ * The response body as text.
123
+ */
124
+ bodyAsText: string;
125
+ /**
126
+ * The parsed response body.
127
+ */
128
+ parsedBody: {};
129
+ };
130
+ };
131
+ /**
132
+ * Represents a response containing a resource ID.
133
+ */
134
+ export interface ResourceResponse {
135
+ /**
136
+ * Unique identifier of the resource.
137
+ */
138
+ id: string;
139
+ }
140
+ /**
141
+ * Represents a response from a batch operation in Teams.
142
+ */
143
+ export type TeamsBatchOperationResponse = BatchOperationResponse & {
144
+ /**
145
+ * The raw response object.
146
+ */
147
+ _response: Response & {
148
+ /**
149
+ * The response body as text.
150
+ */
151
+ bodyAsText: string;
152
+ /**
153
+ * The parsed response body.
154
+ */
155
+ parsedBody: BatchOperationResponse | {};
156
+ };
157
+ };
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright(c) Microsoft Corporation.All rights reserved.
4
+ * Licensed under the MIT License.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ //# sourceMappingURL=teamsConnectorClient.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"teamsConnectorClient.types.js","sourceRoot":"","sources":["../../../src/client/teamsConnectorClient.types.ts"],"names":[],"mappings":";AAAA;;;GAGG"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+ /**
6
+ * Class representing read receipt information.
7
+ */
8
+ export declare class ReadReceiptInfo {
9
+ /**
10
+ * The ID of the last read message.
11
+ */
12
+ lastReadMessageId: string;
13
+ /**
14
+ * Creates an instance of ReadReceiptInfo.
15
+ * @param {string} [lastReadMessageId=''] - The ID of the last read message.
16
+ */
17
+ constructor(lastReadMessageId?: string);
18
+ /**
19
+ * Checks if a message has been read.
20
+ * @param {string} compareMessageId - The ID of the message to compare.
21
+ * @param {string} lastReadMessageId - The ID of the last read message.
22
+ * @returns {boolean} True if the message has been read, false otherwise.
23
+ */
24
+ static isMessageRead(compareMessageId: string, lastReadMessageId: string): boolean;
25
+ /**
26
+ * Checks if a message has been read using the instance's last read message ID.
27
+ * @param {string} compareMessageId - The ID of the message to compare.
28
+ * @returns {boolean} True if the message has been read, false otherwise.
29
+ */
30
+ isMessageRead(compareMessageId: string): boolean;
31
+ }
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright (c) Microsoft Corporation. All rights reserved.
4
+ * Licensed under the MIT License.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.ReadReceiptInfo = void 0;
8
+ /**
9
+ * Class representing read receipt information.
10
+ */
11
+ class ReadReceiptInfo {
12
+ /**
13
+ * Creates an instance of ReadReceiptInfo.
14
+ * @param {string} [lastReadMessageId=''] - The ID of the last read message.
15
+ */
16
+ constructor(lastReadMessageId = '') {
17
+ this.lastReadMessageId = lastReadMessageId;
18
+ }
19
+ /**
20
+ * Checks if a message has been read.
21
+ * @param {string} compareMessageId - The ID of the message to compare.
22
+ * @param {string} lastReadMessageId - The ID of the last read message.
23
+ * @returns {boolean} True if the message has been read, false otherwise.
24
+ */
25
+ static isMessageRead(compareMessageId, lastReadMessageId) {
26
+ if (compareMessageId &&
27
+ compareMessageId.trim().length > 0 &&
28
+ lastReadMessageId &&
29
+ lastReadMessageId.trim().length > 0) {
30
+ const compareMessageIdNum = Number(compareMessageId);
31
+ const lastReadMessageIdNum = Number(lastReadMessageId);
32
+ if (compareMessageIdNum && lastReadMessageIdNum) {
33
+ return compareMessageIdNum <= lastReadMessageIdNum;
34
+ }
35
+ }
36
+ return false;
37
+ }
38
+ /**
39
+ * Checks if a message has been read using the instance's last read message ID.
40
+ * @param {string} compareMessageId - The ID of the message to compare.
41
+ * @returns {boolean} True if the message has been read, false otherwise.
42
+ */
43
+ isMessageRead(compareMessageId) {
44
+ return ReadReceiptInfo.isMessageRead(compareMessageId, this.lastReadMessageId);
45
+ }
46
+ }
47
+ exports.ReadReceiptInfo = ReadReceiptInfo;
48
+ //# sourceMappingURL=readReceipInfo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readReceipInfo.js","sourceRoot":"","sources":["../../../src/compat/readReceipInfo.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;GAEG;AACH,MAAa,eAAe;IAM1B;;;OAGG;IACH,YAAa,oBAA4B,EAAE;QACzC,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAA;IAC5C,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,aAAa,CAAE,gBAAwB,EAAE,iBAAyB;QACvE,IACE,gBAAgB;YACV,gBAAgB,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC;YAClC,iBAAiB;YACjB,iBAAiB,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,EACzC,CAAC;YACD,MAAM,mBAAmB,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAA;YACpD,MAAM,oBAAoB,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAA;YAEtD,IAAI,mBAAmB,IAAI,oBAAoB,EAAE,CAAC;gBAChD,OAAO,mBAAmB,IAAI,oBAAoB,CAAA;YACpD,CAAC;QACH,CAAC;QACD,OAAO,KAAK,CAAA;IACd,CAAC;IAED;;;;OAIG;IACH,aAAa,CAAE,gBAAwB;QACrC,OAAO,eAAe,CAAC,aAAa,CAAC,gBAAgB,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAA;IAChF,CAAC;CACF;AA7CD,0CA6CC"}