@gakr-gakr/msteams 0.1.0
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/api.ts +3 -0
- package/autobot.plugin.json +15 -0
- package/channel-config-api.ts +1 -0
- package/channel-plugin-api.ts +2 -0
- package/config-api.ts +4 -0
- package/contract-api.ts +4 -0
- package/index.ts +20 -0
- package/package.json +72 -0
- package/runtime-api.ts +66 -0
- package/secret-contract-api.ts +5 -0
- package/setup-entry.ts +13 -0
- package/setup-plugin-api.ts +3 -0
- package/src/ai-entity.ts +7 -0
- package/src/approval-auth.ts +44 -0
- package/src/attachments/bot-framework.ts +348 -0
- package/src/attachments/download.ts +328 -0
- package/src/attachments/graph.ts +489 -0
- package/src/attachments/html.ts +122 -0
- package/src/attachments/payload.ts +14 -0
- package/src/attachments/remote-media.ts +86 -0
- package/src/attachments/shared.ts +655 -0
- package/src/attachments/types.ts +47 -0
- package/src/attachments.ts +18 -0
- package/src/channel-api.ts +1 -0
- package/src/channel.runtime.ts +56 -0
- package/src/channel.setup.ts +77 -0
- package/src/channel.ts +1176 -0
- package/src/config-schema.ts +6 -0
- package/src/config-ui-hints.ts +40 -0
- package/src/conversation-store-fs.ts +149 -0
- package/src/conversation-store-helpers.ts +105 -0
- package/src/conversation-store-memory.ts +51 -0
- package/src/conversation-store.ts +71 -0
- package/src/directory-live.ts +111 -0
- package/src/doctor.ts +27 -0
- package/src/errors.ts +270 -0
- package/src/feedback-reflection-prompt.ts +117 -0
- package/src/feedback-reflection-store.ts +113 -0
- package/src/feedback-reflection.ts +271 -0
- package/src/file-consent-helpers.ts +115 -0
- package/src/file-consent-invoke.ts +150 -0
- package/src/file-consent.ts +223 -0
- package/src/graph-chat.ts +36 -0
- package/src/graph-group-management.ts +168 -0
- package/src/graph-members.ts +48 -0
- package/src/graph-messages.ts +534 -0
- package/src/graph-teams.ts +114 -0
- package/src/graph-thread.ts +146 -0
- package/src/graph-upload.ts +531 -0
- package/src/graph-users.ts +29 -0
- package/src/graph.ts +308 -0
- package/src/inbound.ts +148 -0
- package/src/index.ts +4 -0
- package/src/media-helpers.ts +105 -0
- package/src/mentions.ts +114 -0
- package/src/messenger.ts +608 -0
- package/src/monitor-handler/access.ts +136 -0
- package/src/monitor-handler/inbound-media.ts +180 -0
- package/src/monitor-handler/message-handler-mock-support.test-support.ts +28 -0
- package/src/monitor-handler/message-handler.test-support.ts +102 -0
- package/src/monitor-handler/message-handler.ts +1015 -0
- package/src/monitor-handler/reaction-handler.ts +124 -0
- package/src/monitor-handler/thread-session.ts +30 -0
- package/src/monitor-handler.ts +538 -0
- package/src/monitor-handler.types.ts +27 -0
- package/src/monitor-types.ts +6 -0
- package/src/monitor.ts +476 -0
- package/src/oauth.flow.ts +77 -0
- package/src/oauth.shared.ts +37 -0
- package/src/oauth.token.ts +162 -0
- package/src/oauth.ts +130 -0
- package/src/outbound.ts +198 -0
- package/src/pending-uploads-fs.ts +235 -0
- package/src/pending-uploads.ts +121 -0
- package/src/policy.ts +245 -0
- package/src/polls-store-memory.ts +32 -0
- package/src/polls.ts +312 -0
- package/src/presentation.ts +93 -0
- package/src/probe.ts +132 -0
- package/src/reply-dispatcher.ts +523 -0
- package/src/reply-stream-controller.ts +334 -0
- package/src/resolve-allowlist.ts +309 -0
- package/src/revoked-context.ts +17 -0
- package/src/runtime.ts +12 -0
- package/src/sdk-types.ts +59 -0
- package/src/sdk.ts +916 -0
- package/src/secret-contract.ts +49 -0
- package/src/secret-input.ts +7 -0
- package/src/send-context.ts +269 -0
- package/src/send.ts +697 -0
- package/src/sent-message-cache.ts +174 -0
- package/src/session-route.ts +40 -0
- package/src/setup-core.ts +162 -0
- package/src/setup-surface.ts +319 -0
- package/src/sso-token-store.ts +166 -0
- package/src/sso.ts +300 -0
- package/src/storage.ts +25 -0
- package/src/store-fs.ts +42 -0
- package/src/streaming-message.ts +327 -0
- package/src/thread-parent-context.ts +159 -0
- package/src/token-response.ts +11 -0
- package/src/token.ts +194 -0
- package/src/user-agent.ts +53 -0
- package/src/webhook-timeouts.ts +27 -0
- package/src/welcome-card.ts +57 -0
- package/test-api.ts +1 -0
- package/tsconfig.json +16 -0
package/src/sdk-types.ts
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
};
|