@kodelyth/msteams 2026.5.42 → 2026.6.2

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 (177) hide show
  1. package/klaw.plugin.json +726 -2
  2. package/package.json +18 -6
  3. package/api.ts +0 -3
  4. package/channel-config-api.ts +0 -1
  5. package/channel-plugin-api.ts +0 -2
  6. package/config-api.ts +0 -4
  7. package/contract-api.ts +0 -4
  8. package/index.ts +0 -20
  9. package/runtime-api.ts +0 -66
  10. package/secret-contract-api.ts +0 -5
  11. package/setup-entry.ts +0 -13
  12. package/setup-plugin-api.ts +0 -3
  13. package/src/ai-entity.ts +0 -7
  14. package/src/approval-auth.ts +0 -44
  15. package/src/attachments/bot-framework.test.ts +0 -506
  16. package/src/attachments/bot-framework.ts +0 -348
  17. package/src/attachments/download.ts +0 -328
  18. package/src/attachments/graph.test.ts +0 -441
  19. package/src/attachments/graph.ts +0 -489
  20. package/src/attachments/html.ts +0 -122
  21. package/src/attachments/payload.ts +0 -14
  22. package/src/attachments/remote-media.test.ts +0 -187
  23. package/src/attachments/remote-media.ts +0 -86
  24. package/src/attachments/shared.test.ts +0 -547
  25. package/src/attachments/shared.ts +0 -655
  26. package/src/attachments/types.ts +0 -47
  27. package/src/attachments.graph.test.ts +0 -414
  28. package/src/attachments.helpers.test.ts +0 -245
  29. package/src/attachments.test-helpers.ts +0 -17
  30. package/src/attachments.test.ts +0 -754
  31. package/src/attachments.ts +0 -18
  32. package/src/block-streaming-config.test.ts +0 -61
  33. package/src/channel-api.ts +0 -1
  34. package/src/channel.actions.test.ts +0 -797
  35. package/src/channel.directory.test.ts +0 -176
  36. package/src/channel.message-adapter.test.ts +0 -227
  37. package/src/channel.runtime.ts +0 -56
  38. package/src/channel.setup.ts +0 -77
  39. package/src/channel.test.ts +0 -136
  40. package/src/channel.ts +0 -1176
  41. package/src/config-schema.ts +0 -6
  42. package/src/config-ui-hints.ts +0 -40
  43. package/src/conversation-store-fs.test.ts +0 -81
  44. package/src/conversation-store-fs.ts +0 -149
  45. package/src/conversation-store-helpers.test.ts +0 -202
  46. package/src/conversation-store-helpers.ts +0 -105
  47. package/src/conversation-store-memory.ts +0 -51
  48. package/src/conversation-store.shared.test.ts +0 -260
  49. package/src/conversation-store.ts +0 -71
  50. package/src/directory-live.test.ts +0 -156
  51. package/src/directory-live.ts +0 -111
  52. package/src/doctor.ts +0 -27
  53. package/src/errors.test.ts +0 -154
  54. package/src/errors.ts +0 -270
  55. package/src/feedback-reflection-prompt.ts +0 -117
  56. package/src/feedback-reflection-store.ts +0 -113
  57. package/src/feedback-reflection.test.ts +0 -237
  58. package/src/feedback-reflection.ts +0 -268
  59. package/src/file-consent-helpers.test.ts +0 -328
  60. package/src/file-consent-helpers.ts +0 -115
  61. package/src/file-consent-invoke.ts +0 -150
  62. package/src/file-consent.test.ts +0 -378
  63. package/src/file-consent.ts +0 -223
  64. package/src/graph-chat.ts +0 -36
  65. package/src/graph-group-management.test.ts +0 -332
  66. package/src/graph-group-management.ts +0 -168
  67. package/src/graph-members.test.ts +0 -89
  68. package/src/graph-members.ts +0 -48
  69. package/src/graph-messages.actions.test.ts +0 -253
  70. package/src/graph-messages.read.test.ts +0 -391
  71. package/src/graph-messages.search.test.ts +0 -227
  72. package/src/graph-messages.test-helpers.ts +0 -50
  73. package/src/graph-messages.ts +0 -534
  74. package/src/graph-teams.test.ts +0 -222
  75. package/src/graph-teams.ts +0 -114
  76. package/src/graph-thread.test.ts +0 -252
  77. package/src/graph-thread.ts +0 -146
  78. package/src/graph-upload.test.ts +0 -253
  79. package/src/graph-upload.ts +0 -531
  80. package/src/graph-users.ts +0 -29
  81. package/src/graph.test.ts +0 -540
  82. package/src/graph.ts +0 -308
  83. package/src/inbound.test.ts +0 -221
  84. package/src/inbound.ts +0 -148
  85. package/src/index.ts +0 -4
  86. package/src/media-helpers.test.ts +0 -220
  87. package/src/media-helpers.ts +0 -105
  88. package/src/mentions.test.ts +0 -254
  89. package/src/mentions.ts +0 -114
  90. package/src/messenger.test.ts +0 -961
  91. package/src/messenger.ts +0 -608
  92. package/src/monitor-handler/access.ts +0 -136
  93. package/src/monitor-handler/inbound-media.test.ts +0 -314
  94. package/src/monitor-handler/inbound-media.ts +0 -180
  95. package/src/monitor-handler/message-handler-mock-support.test-support.ts +0 -28
  96. package/src/monitor-handler/message-handler.authz.test.ts +0 -739
  97. package/src/monitor-handler/message-handler.dm-media.test.ts +0 -54
  98. package/src/monitor-handler/message-handler.test-support.ts +0 -99
  99. package/src/monitor-handler/message-handler.thread-parent.test.ts +0 -225
  100. package/src/monitor-handler/message-handler.thread-session.test.ts +0 -132
  101. package/src/monitor-handler/message-handler.ts +0 -1003
  102. package/src/monitor-handler/reaction-handler.test.ts +0 -325
  103. package/src/monitor-handler/reaction-handler.ts +0 -122
  104. package/src/monitor-handler/thread-session.ts +0 -30
  105. package/src/monitor-handler.adaptive-card.test.ts +0 -158
  106. package/src/monitor-handler.feedback-authz.test.ts +0 -357
  107. package/src/monitor-handler.file-consent.test.ts +0 -443
  108. package/src/monitor-handler.sso.test.ts +0 -576
  109. package/src/monitor-handler.test-helpers.ts +0 -181
  110. package/src/monitor-handler.ts +0 -538
  111. package/src/monitor-handler.types.ts +0 -27
  112. package/src/monitor-types.ts +0 -6
  113. package/src/monitor.lifecycle.test.ts +0 -457
  114. package/src/monitor.test.ts +0 -119
  115. package/src/monitor.ts +0 -476
  116. package/src/oauth.flow.ts +0 -77
  117. package/src/oauth.shared.ts +0 -37
  118. package/src/oauth.test.ts +0 -350
  119. package/src/oauth.token.ts +0 -162
  120. package/src/oauth.ts +0 -130
  121. package/src/outbound.test.ts +0 -400
  122. package/src/outbound.ts +0 -198
  123. package/src/pending-uploads-fs.test.ts +0 -261
  124. package/src/pending-uploads-fs.ts +0 -235
  125. package/src/pending-uploads.test.ts +0 -186
  126. package/src/pending-uploads.ts +0 -121
  127. package/src/policy.test.ts +0 -156
  128. package/src/policy.ts +0 -245
  129. package/src/polls-store-memory.ts +0 -32
  130. package/src/polls.test.ts +0 -169
  131. package/src/polls.ts +0 -312
  132. package/src/presentation.ts +0 -93
  133. package/src/probe.test.ts +0 -79
  134. package/src/probe.ts +0 -132
  135. package/src/reply-dispatcher.test.ts +0 -543
  136. package/src/reply-dispatcher.ts +0 -523
  137. package/src/reply-stream-controller.test.ts +0 -424
  138. package/src/reply-stream-controller.ts +0 -334
  139. package/src/resolve-allowlist.test.ts +0 -253
  140. package/src/resolve-allowlist.ts +0 -309
  141. package/src/revoked-context.ts +0 -17
  142. package/src/runtime.ts +0 -12
  143. package/src/sdk-types.ts +0 -59
  144. package/src/sdk.test.ts +0 -727
  145. package/src/sdk.ts +0 -916
  146. package/src/secret-contract.ts +0 -49
  147. package/src/secret-input.ts +0 -7
  148. package/src/send-context.test.ts +0 -93
  149. package/src/send-context.ts +0 -269
  150. package/src/send.test.ts +0 -588
  151. package/src/send.ts +0 -697
  152. package/src/sent-message-cache.test.ts +0 -106
  153. package/src/sent-message-cache.ts +0 -174
  154. package/src/session-route.ts +0 -40
  155. package/src/setup-core.ts +0 -162
  156. package/src/setup-surface.test.ts +0 -175
  157. package/src/setup-surface.ts +0 -319
  158. package/src/sso-token-store.test.ts +0 -74
  159. package/src/sso-token-store.ts +0 -166
  160. package/src/sso.ts +0 -300
  161. package/src/storage.ts +0 -25
  162. package/src/store-fs.ts +0 -42
  163. package/src/streaming-message.test.ts +0 -323
  164. package/src/streaming-message.ts +0 -327
  165. package/src/test-runtime.ts +0 -16
  166. package/src/thread-parent-context.test.ts +0 -224
  167. package/src/thread-parent-context.ts +0 -159
  168. package/src/token-response.ts +0 -11
  169. package/src/token.test.ts +0 -268
  170. package/src/token.ts +0 -194
  171. package/src/user-agent.test.ts +0 -121
  172. package/src/user-agent.ts +0 -53
  173. package/src/webhook-timeouts.ts +0 -27
  174. package/src/welcome-card.test.ts +0 -104
  175. package/src/welcome-card.ts +0 -57
  176. package/test-api.ts +0 -1
  177. package/tsconfig.json +0 -16
@@ -1,309 +0,0 @@
1
- import { mapAllowlistResolutionInputs } from "klaw/plugin-sdk/allow-from";
2
- import {
3
- normalizeLowercaseStringOrEmpty,
4
- normalizeOptionalLowercaseString,
5
- } from "klaw/plugin-sdk/string-coerce-runtime";
6
- import { searchGraphUsers } from "./graph-users.js";
7
- import {
8
- listChannelsForTeam,
9
- listTeamsByName,
10
- normalizeQuery,
11
- resolveGraphToken,
12
- } from "./graph.js";
13
-
14
- type MSTeamsChannelResolution = {
15
- input: string;
16
- resolved: boolean;
17
- teamId?: string;
18
- teamName?: string;
19
- channelId?: string;
20
- channelName?: string;
21
- note?: string;
22
- };
23
-
24
- type MSTeamsUserResolution = {
25
- input: string;
26
- resolved: boolean;
27
- id?: string;
28
- name?: string;
29
- note?: string;
30
- };
31
-
32
- function stripProviderPrefix(raw: string): string {
33
- return raw.replace(/^(msteams|teams):/i, "");
34
- }
35
-
36
- export function normalizeMSTeamsMessagingTarget(raw: string): string | undefined {
37
- let trimmed = raw.trim();
38
- if (!trimmed) {
39
- return undefined;
40
- }
41
- trimmed = stripProviderPrefix(trimmed).trim();
42
- if (/^conversation:/i.test(trimmed)) {
43
- const id = trimmed.slice("conversation:".length).trim();
44
- return id ? `conversation:${id}` : undefined;
45
- }
46
- if (/^user:/i.test(trimmed)) {
47
- const id = trimmed.slice("user:".length).trim();
48
- return id ? `user:${id}` : undefined;
49
- }
50
- return trimmed || undefined;
51
- }
52
-
53
- export function normalizeMSTeamsUserInput(raw: string): string {
54
- return stripProviderPrefix(raw)
55
- .replace(/^(user|conversation):/i, "")
56
- .trim();
57
- }
58
-
59
- export function parseMSTeamsConversationId(raw: string): string | null {
60
- const trimmed = stripProviderPrefix(raw).trim();
61
- if (!/^conversation:/i.test(trimmed)) {
62
- return null;
63
- }
64
- const id = trimmed.slice("conversation:".length).trim();
65
- return id;
66
- }
67
-
68
- /**
69
- * Detect whether a raw target string looks like a Microsoft Teams conversation
70
- * or user id that cron announce delivery and other explicit-target paths can
71
- * forward verbatim to the channel adapter.
72
- *
73
- * Accepts both prefixed and bare formats:
74
- * - `conversation:<id>` — explicit conversation prefix
75
- * - `user:<aad-guid>` — user id (16+ hex chars, UUID-like)
76
- * - `19:abc@thread.tacv2` / `19:abc@thread.skype` — channel / legacy group
77
- * - `19:{userId}_{appId}@unq.gbl.spaces` — Graph 1:1 chat thread format
78
- * - `a:1xxx` — Bot Framework personal (1:1) chat id
79
- * - `8:orgid:xxx` — Bot Framework org-scoped personal chat id
80
- * - `29:xxx` — Bot Framework user id
81
- *
82
- * Display-name user targets such as `user:John Smith` intentionally return
83
- * false so that the Graph API directory lookup still runs for them.
84
- */
85
- export function looksLikeMSTeamsTargetId(raw: string): boolean {
86
- const trimmed = raw.trim();
87
- if (!trimmed) {
88
- return false;
89
- }
90
- if (/^conversation:/i.test(trimmed)) {
91
- return true;
92
- }
93
- if (/^user:/i.test(trimmed)) {
94
- // Only treat as an id when the value after `user:` looks like a UUID;
95
- // display names must fall through to directory lookup.
96
- const id = trimmed.slice("user:".length).trim();
97
- return /^[0-9a-fA-F-]{16,}$/.test(id);
98
- }
99
- // Bare Bot Framework / Graph conversation id formats.
100
- // Channel / group ids always start with `19:` and include an `@thread.*`
101
- // suffix (`@thread.tacv2` or the legacy `@thread.skype`). Personal chat
102
- // ids come in three shapes: `a:1...` (Bot Framework), `8:orgid:...`
103
- // (org-scoped Bot Framework), and `19:{userId}_{appId}@unq.gbl.spaces`
104
- // (Graph API 1:1 chat thread). Bot Framework user ids use `29:...`.
105
- if (/^19:.+@thread\.(tacv2|skype)$/i.test(trimmed)) {
106
- return true;
107
- }
108
- if (/^19:.+@unq\.gbl\.spaces$/i.test(trimmed)) {
109
- return true;
110
- }
111
- if (/^a:1[A-Za-z0-9_-]+$/i.test(trimmed)) {
112
- return true;
113
- }
114
- if (/^8:orgid:[A-Za-z0-9-]+$/i.test(trimmed)) {
115
- return true;
116
- }
117
- if (/^29:[A-Za-z0-9_-]+$/i.test(trimmed)) {
118
- return true;
119
- }
120
- // Fallback: anything containing @thread is still treated as a conversation
121
- // id so the current matches for tenant-specific suffixes remain accepted.
122
- return /@thread\b/i.test(trimmed);
123
- }
124
-
125
- function normalizeMSTeamsTeamKey(raw: string): string | undefined {
126
- const trimmed = stripProviderPrefix(raw)
127
- .replace(/^team:/i, "")
128
- .trim();
129
- return trimmed || undefined;
130
- }
131
-
132
- function normalizeMSTeamsChannelKey(raw?: string | null): string | undefined {
133
- const trimmed = raw?.trim().replace(/^#/, "").trim() ?? "";
134
- return trimmed || undefined;
135
- }
136
-
137
- function normalizeMSTeamsConversationTargetId(raw: string): string {
138
- const trimmed = stripProviderPrefix(raw).trim();
139
- return parseMSTeamsConversationId(trimmed) ?? trimmed;
140
- }
141
-
142
- function looksLikeMSTeamsThreadConversationId(raw: string): boolean {
143
- const normalized = normalizeMSTeamsConversationTargetId(raw);
144
- return /^19:.+@thread\./i.test(normalized);
145
- }
146
-
147
- export function parseMSTeamsTeamChannelInput(raw: string): { team?: string; channel?: string } {
148
- const trimmed = stripProviderPrefix(raw).trim();
149
- if (!trimmed) {
150
- return {};
151
- }
152
- const parts = trimmed.split("/");
153
- const team = normalizeMSTeamsTeamKey(parts[0] ?? "");
154
- const channel =
155
- parts.length > 1 ? normalizeMSTeamsChannelKey(parts.slice(1).join("/")) : undefined;
156
- return {
157
- ...(team ? { team } : {}),
158
- ...(channel ? { channel } : {}),
159
- };
160
- }
161
-
162
- export function parseMSTeamsTeamEntry(
163
- raw: string,
164
- ): { teamKey: string; channelKey?: string } | null {
165
- const { team, channel } = parseMSTeamsTeamChannelInput(raw);
166
- if (!team) {
167
- return null;
168
- }
169
- return {
170
- teamKey: team,
171
- ...(channel ? { channelKey: channel } : {}),
172
- };
173
- }
174
-
175
- export async function resolveMSTeamsChannelAllowlist(params: {
176
- cfg: unknown;
177
- entries: string[];
178
- }): Promise<MSTeamsChannelResolution[]> {
179
- let tokenPromise: Promise<string> | undefined;
180
- const getToken = () => {
181
- tokenPromise ??= resolveGraphToken(params.cfg);
182
- return tokenPromise;
183
- };
184
- return await mapAllowlistResolutionInputs({
185
- inputs: params.entries,
186
- mapInput: async (input): Promise<MSTeamsChannelResolution> => {
187
- const { team, channel } = parseMSTeamsTeamChannelInput(input);
188
- if (!team) {
189
- return { input, resolved: false };
190
- }
191
- if (looksLikeMSTeamsThreadConversationId(team)) {
192
- const teamId = normalizeMSTeamsConversationTargetId(team);
193
- if (!channel) {
194
- return { input, resolved: true, teamId, teamName: teamId };
195
- }
196
- if (!looksLikeMSTeamsThreadConversationId(channel)) {
197
- return {
198
- input,
199
- resolved: false,
200
- teamId,
201
- teamName: teamId,
202
- note: "channel id required for conversation-id team",
203
- };
204
- }
205
- const channelId = normalizeMSTeamsConversationTargetId(channel);
206
- return {
207
- input,
208
- resolved: true,
209
- teamId,
210
- teamName: teamId,
211
- channelId,
212
- channelName: channelId,
213
- };
214
- }
215
- const token = await getToken();
216
- const teams = /^[0-9a-fA-F-]{16,}$/.test(team)
217
- ? [{ id: team, displayName: team }]
218
- : await listTeamsByName(token, team);
219
- if (teams.length === 0) {
220
- return { input, resolved: false, note: "team not found" };
221
- }
222
- const teamMatch = teams[0];
223
- const graphTeamId = teamMatch.id?.trim();
224
- const teamName = teamMatch.displayName?.trim() || team;
225
- if (!graphTeamId) {
226
- return { input, resolved: false, note: "team id missing" };
227
- }
228
- // Bot Framework sends the General channel's conversation ID as
229
- // channelData.team.id at runtime, NOT the Graph API group GUID.
230
- // Fetch channels upfront so we can resolve the correct key format for
231
- // runtime matching and reuse the list for channel lookups.
232
- let teamChannels: Awaited<ReturnType<typeof listChannelsForTeam>> = [];
233
- try {
234
- teamChannels = await listChannelsForTeam(token, graphTeamId);
235
- } catch {
236
- // API failure (rate limit, network error) — fall back to Graph GUID as team key
237
- }
238
- const generalChannel = teamChannels.find(
239
- (ch) => normalizeOptionalLowercaseString(ch.displayName) === "general",
240
- );
241
- // Use the General channel's conversation ID as the team key — this
242
- // matches what Bot Framework sends at runtime. Fall back to the Graph
243
- // GUID if the General channel isn't found (renamed or deleted).
244
- const teamId = generalChannel?.id?.trim() || graphTeamId;
245
- if (!channel) {
246
- return {
247
- input,
248
- resolved: true,
249
- teamId,
250
- teamName,
251
- note: teams.length > 1 ? "multiple teams; chose first" : undefined,
252
- };
253
- }
254
- // Reuse teamChannels — already fetched above
255
- const normalizedChannel = normalizeOptionalLowercaseString(channel);
256
- const channelMatch =
257
- teamChannels.find((item) => item.id === channel) ??
258
- teamChannels.find(
259
- (item) => normalizeOptionalLowercaseString(item.displayName) === normalizedChannel,
260
- ) ??
261
- teamChannels.find((item) =>
262
- normalizeLowercaseStringOrEmpty(item.displayName ?? "").includes(normalizedChannel ?? ""),
263
- );
264
- if (!channelMatch?.id) {
265
- return { input, resolved: false, note: "channel not found" };
266
- }
267
- return {
268
- input,
269
- resolved: true,
270
- teamId,
271
- teamName,
272
- channelId: channelMatch.id,
273
- channelName: channelMatch.displayName ?? channel,
274
- note: teamChannels.length > 1 ? "multiple channels; chose first" : undefined,
275
- };
276
- },
277
- });
278
- }
279
-
280
- export async function resolveMSTeamsUserAllowlist(params: {
281
- cfg: unknown;
282
- entries: string[];
283
- }): Promise<MSTeamsUserResolution[]> {
284
- const token = await resolveGraphToken(params.cfg);
285
- return await mapAllowlistResolutionInputs({
286
- inputs: params.entries,
287
- mapInput: async (input): Promise<MSTeamsUserResolution> => {
288
- const query = normalizeQuery(normalizeMSTeamsUserInput(input));
289
- if (!query) {
290
- return { input, resolved: false };
291
- }
292
- if (/^[0-9a-fA-F-]{16,}$/.test(query)) {
293
- return { input, resolved: true, id: query };
294
- }
295
- const users = await searchGraphUsers({ token, query, top: 10 });
296
- const match = users[0];
297
- if (!match?.id) {
298
- return { input, resolved: false };
299
- }
300
- return {
301
- input,
302
- resolved: true,
303
- id: match.id,
304
- name: match.displayName ?? undefined,
305
- note: users.length > 1 ? "multiple matches; chose first" : undefined,
306
- };
307
- },
308
- });
309
- }
@@ -1,17 +0,0 @@
1
- import { isRevokedProxyError } from "./errors.js";
2
-
3
- export async function withRevokedProxyFallback<T>(params: {
4
- run: () => Promise<T>;
5
- onRevoked: () => Promise<T>;
6
- onRevokedLog?: () => void;
7
- }): Promise<T> {
8
- try {
9
- return await params.run();
10
- } catch (err) {
11
- if (!isRevokedProxyError(err)) {
12
- throw err;
13
- }
14
- params.onRevokedLog?.();
15
- return await params.onRevoked();
16
- }
17
- }
package/src/runtime.ts DELETED
@@ -1,12 +0,0 @@
1
- import { createPluginRuntimeStore } from "klaw/plugin-sdk/runtime-store";
2
- import type { PluginRuntime } from "klaw/plugin-sdk/runtime-store";
3
-
4
- const {
5
- setRuntime: setMSTeamsRuntime,
6
- getRuntime: getMSTeamsRuntime,
7
- tryGetRuntime: getOptionalMSTeamsRuntime,
8
- } = createPluginRuntimeStore<PluginRuntime>({
9
- pluginId: "msteams",
10
- errorMessage: "MSTeams runtime not initialized",
11
- });
12
- export { getMSTeamsRuntime, getOptionalMSTeamsRuntime, setMSTeamsRuntime };
package/src/sdk-types.ts DELETED
@@ -1,59 +0,0 @@
1
- /**
2
- * Minimal public surface we depend on from the Microsoft SDK types.
3
- *
4
- * Note: we intentionally avoid coupling to SDK classes with private members
5
- * (like TurnContext) in our own public signatures. The SDK's TS surface is also
6
- * stricter than what the runtime accepts (e.g. it allows plain activity-like
7
- * objects), so we model the minimal structural shape we rely on.
8
- */
9
-
10
- type MSTeamsActivity = {
11
- type: string;
12
- id?: string;
13
- timestamp?: string;
14
- localTimestamp?: string;
15
- channelId?: string;
16
- from?: { id?: string; name?: string; aadObjectId?: string; role?: string };
17
- conversation?: {
18
- id?: string;
19
- conversationType?: string;
20
- tenantId?: string;
21
- name?: string;
22
- isGroup?: boolean;
23
- };
24
- recipient?: { id?: string; name?: string };
25
- text?: string;
26
- textFormat?: string;
27
- locale?: string;
28
- serviceUrl?: string;
29
- channelData?: {
30
- team?: { id?: string; name?: string };
31
- channel?: { id?: string; name?: string };
32
- tenant?: { id?: string };
33
- [key: string]: unknown;
34
- };
35
- attachments?: Array<{
36
- contentType?: string;
37
- contentUrl?: string;
38
- content?: unknown;
39
- name?: string;
40
- thumbnailUrl?: string;
41
- }>;
42
- entities?: Array<Record<string, unknown>>;
43
- value?: unknown;
44
- name?: string;
45
- membersAdded?: Array<{ id?: string; name?: string }>;
46
- membersRemoved?: Array<{ id?: string; name?: string }>;
47
- replyToId?: string;
48
- [key: string]: unknown;
49
- };
50
-
51
- export type MSTeamsTurnContext = {
52
- activity: MSTeamsActivity;
53
- sendActivity: (textOrActivity: string | object) => Promise<unknown>;
54
- sendActivities: (
55
- activities: Array<{ type: string } & Record<string, unknown>>,
56
- ) => Promise<unknown>;
57
- updateActivity: (activity: object) => Promise<{ id?: string } | void>;
58
- deleteActivity: (activityId: string) => Promise<void>;
59
- };