teams-api 0.5.2 → 0.7.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/README.md +1 -14
- package/dist/actions/conversation-resolution.d.ts +26 -0
- package/dist/actions/conversation-resolution.d.ts.map +1 -0
- package/dist/actions/conversation-resolution.js +81 -0
- package/dist/actions/conversation-resolution.js.map +1 -0
- package/dist/actions/definitions.d.ts +16 -0
- package/dist/actions/definitions.d.ts.map +1 -0
- package/dist/{actions.js → actions/definitions.js} +83 -212
- package/dist/actions/definitions.js.map +1 -0
- package/dist/{actions.d.ts → actions/formatters.d.ts} +24 -13
- package/dist/actions/formatters.d.ts.map +1 -0
- package/dist/actions/formatters.js +86 -0
- package/dist/actions/formatters.js.map +1 -0
- package/dist/api/chat-service.d.ts +54 -0
- package/dist/api/chat-service.d.ts.map +1 -0
- package/dist/api/chat-service.js +327 -0
- package/dist/api/chat-service.js.map +1 -0
- package/dist/api/common.d.ts +21 -0
- package/dist/api/common.d.ts.map +1 -0
- package/dist/api/common.js +65 -0
- package/dist/api/common.js.map +1 -0
- package/dist/api/middle-tier.d.ts +15 -0
- package/dist/api/middle-tier.d.ts.map +1 -0
- package/dist/api/middle-tier.js +52 -0
- package/dist/api/middle-tier.js.map +1 -0
- package/dist/api/substrate.d.ts +22 -0
- package/dist/api/substrate.d.ts.map +1 -0
- package/dist/api/substrate.js +162 -0
- package/dist/api/substrate.js.map +1 -0
- package/dist/api/transcripts.d.ts +51 -0
- package/dist/api/transcripts.d.ts.map +1 -0
- package/dist/api/transcripts.js +140 -0
- package/dist/api/transcripts.js.map +1 -0
- package/dist/auth/auto-login.d.ts +23 -0
- package/dist/auth/auto-login.d.ts.map +1 -0
- package/dist/auth/auto-login.js +136 -0
- package/dist/auth/auto-login.js.map +1 -0
- package/dist/auth/debug-session.d.ts +20 -0
- package/dist/auth/debug-session.d.ts.map +1 -0
- package/dist/auth/debug-session.js +121 -0
- package/dist/auth/debug-session.js.map +1 -0
- package/dist/auth/interactive.d.ts +21 -0
- package/dist/auth/interactive.d.ts.map +1 -0
- package/dist/auth/interactive.js +90 -0
- package/dist/auth/interactive.js.map +1 -0
- package/dist/auth/page-diagnostics.d.ts +21 -0
- package/dist/auth/page-diagnostics.d.ts.map +1 -0
- package/dist/auth/page-diagnostics.js +65 -0
- package/dist/auth/page-diagnostics.js.map +1 -0
- package/dist/auth/token-capture.d.ts +24 -0
- package/dist/auth/token-capture.d.ts.map +1 -0
- package/dist/auth/token-capture.js +123 -0
- package/dist/auth/token-capture.js.map +1 -0
- package/dist/cli.d.ts +2 -2
- package/dist/cli.js +21 -7
- package/dist/cli.js.map +1 -1
- package/dist/constants.d.ts +9 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +14 -0
- package/dist/constants.js.map +1 -0
- package/dist/html-utils.d.ts +9 -0
- package/dist/html-utils.d.ts.map +1 -0
- package/dist/html-utils.js +21 -0
- package/dist/html-utils.js.map +1 -0
- package/dist/mcp-server.js +7 -3
- package/dist/mcp-server.js.map +1 -1
- package/dist/server-instructions.d.ts +13 -0
- package/dist/server-instructions.d.ts.map +1 -0
- package/dist/server-instructions.js +60 -0
- package/dist/server-instructions.js.map +1 -0
- package/dist/teams-client.d.ts +17 -8
- package/dist/teams-client.d.ts.map +1 -1
- package/dist/teams-client.js +90 -75
- package/dist/teams-client.js.map +1 -1
- package/dist/types.d.ts +20 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +1 -2
- package/SKILL.md +0 -135
- package/dist/actions.d.ts.map +0 -1
- package/dist/actions.js.map +0 -1
- package/dist/api.d.ts +0 -126
- package/dist/api.d.ts.map +0 -1
- package/dist/api.js +0 -702
- package/dist/api.js.map +0 -1
- package/dist/auth.d.ts +0 -53
- package/dist/auth.d.ts.map +0 -1
- package/dist/auth.js +0 -491
- package/dist/auth.js.map +0 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared constants used across the codebase.
|
|
3
|
+
*/
|
|
4
|
+
/** Message types that represent user-authored text content. */
|
|
5
|
+
export declare const TEXT_MESSAGE_TYPES: readonly ["RichText/Html", "Text"];
|
|
6
|
+
export type TextMessageType = (typeof TEXT_MESSAGE_TYPES)[number];
|
|
7
|
+
/** Check whether a message type represents user-authored text content. */
|
|
8
|
+
export declare function isTextMessageType(messageType: string): messageType is TextMessageType;
|
|
9
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,+DAA+D;AAC/D,eAAO,MAAM,kBAAkB,oCAAqC,CAAC;AAErE,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAElE,0EAA0E;AAC1E,wBAAgB,iBAAiB,CAC/B,WAAW,EAAE,MAAM,GAClB,WAAW,IAAI,eAAe,CAEhC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Shared constants used across the codebase.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.TEXT_MESSAGE_TYPES = void 0;
|
|
7
|
+
exports.isTextMessageType = isTextMessageType;
|
|
8
|
+
/** Message types that represent user-authored text content. */
|
|
9
|
+
exports.TEXT_MESSAGE_TYPES = ["RichText/Html", "Text"];
|
|
10
|
+
/** Check whether a message type represents user-authored text content. */
|
|
11
|
+
function isTextMessageType(messageType) {
|
|
12
|
+
return exports.TEXT_MESSAGE_TYPES.includes(messageType);
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAQH,8CAIC;AAVD,+DAA+D;AAClD,QAAA,kBAAkB,GAAG,CAAC,eAAe,EAAE,MAAM,CAAU,CAAC;AAIrE,0EAA0E;AAC1E,SAAgB,iBAAiB,CAC/B,WAAmB;IAEnB,OAAQ,0BAAwC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;AACzE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared HTML entity decoding utilities.
|
|
3
|
+
*
|
|
4
|
+
* Used by both the VTT transcript parser and the action formatters
|
|
5
|
+
* to convert HTML entities back to plain text.
|
|
6
|
+
*/
|
|
7
|
+
/** Decode common HTML entities to plain text. */
|
|
8
|
+
export declare function decodeHtmlEntities(text: string): string;
|
|
9
|
+
//# sourceMappingURL=html-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"html-utils.d.ts","sourceRoot":"","sources":["../src/html-utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,iDAAiD;AACjD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAWvD"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Shared HTML entity decoding utilities.
|
|
4
|
+
*
|
|
5
|
+
* Used by both the VTT transcript parser and the action formatters
|
|
6
|
+
* to convert HTML entities back to plain text.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.decodeHtmlEntities = decodeHtmlEntities;
|
|
10
|
+
/** Decode common HTML entities to plain text. */
|
|
11
|
+
function decodeHtmlEntities(text) {
|
|
12
|
+
return text
|
|
13
|
+
.replace(/ /g, " ")
|
|
14
|
+
.replace(/"/g, '"')
|
|
15
|
+
.replace(/&/g, "&")
|
|
16
|
+
.replace(/</g, "<")
|
|
17
|
+
.replace(/>/g, ">")
|
|
18
|
+
.replace(/​/g, "") // zero-width space
|
|
19
|
+
.replace(/&#(\d+);/g, (_, code) => String.fromCharCode(Number(code)));
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=html-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"html-utils.js","sourceRoot":"","sources":["../src/html-utils.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAGH,gDAWC;AAZD,iDAAiD;AACjD,SAAgB,kBAAkB,CAAC,IAAY;IAC7C,OAAO,IAAI;SACR,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC;SACvB,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC;SACvB,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC;SACtB,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC;SACrB,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC;SACrB,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,mBAAmB;SAC3C,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE,IAAY,EAAE,EAAE,CACxC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAClC,CAAC;AACN,CAAC"}
|
package/dist/mcp-server.js
CHANGED
|
@@ -36,7 +36,9 @@ const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
|
|
|
36
36
|
const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
|
|
37
37
|
const zod_1 = require("zod");
|
|
38
38
|
const teams_client_js_1 = require("./teams-client.js");
|
|
39
|
-
const
|
|
39
|
+
const definitions_js_1 = require("./actions/definitions.js");
|
|
40
|
+
const formatters_js_1 = require("./actions/formatters.js");
|
|
41
|
+
const server_instructions_js_1 = require("./server-instructions.js");
|
|
40
42
|
let clientInstance = null;
|
|
41
43
|
class NeedsEmailError extends Error {
|
|
42
44
|
constructor() {
|
|
@@ -113,9 +115,11 @@ function parameterToZod(parameter) {
|
|
|
113
115
|
const server = new mcp_js_1.McpServer({
|
|
114
116
|
name: "teams-api",
|
|
115
117
|
version: "0.1.0",
|
|
118
|
+
}, {
|
|
119
|
+
instructions: server_instructions_js_1.serverInstructions,
|
|
116
120
|
});
|
|
117
121
|
// ── Register all actions as MCP tools ─────────────────────────────────
|
|
118
|
-
for (const action of
|
|
122
|
+
for (const action of definitions_js_1.actions) {
|
|
119
123
|
const toolName = `teams_${action.name.replace(/-/g, "_")}`;
|
|
120
124
|
const inputSchema = {};
|
|
121
125
|
for (const parameter of action.parameters) {
|
|
@@ -148,7 +152,7 @@ for (const action of actions_js_1.actions) {
|
|
|
148
152
|
content: [
|
|
149
153
|
{
|
|
150
154
|
type: "text",
|
|
151
|
-
text: (0,
|
|
155
|
+
text: (0, formatters_js_1.formatOutput)(action, result, outputFormat),
|
|
152
156
|
},
|
|
153
157
|
],
|
|
154
158
|
structuredContent,
|
package/dist/mcp-server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-server.js","sourceRoot":"","sources":["../src/mcp-server.ts"],"names":[],"mappings":";;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;;AAEH,oEAAoE;AACpE,wEAAiF;AACjF,6BAAwB;AACxB,uDAAgD;AAChD,
|
|
1
|
+
{"version":3,"file":"mcp-server.js","sourceRoot":"","sources":["../src/mcp-server.ts"],"names":[],"mappings":";;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;;AAEH,oEAAoE;AACpE,wEAAiF;AACjF,6BAAwB;AACxB,uDAAgD;AAChD,6DAAmD;AACnD,2DAAuD;AAEvD,qEAA8D;AAE9D,IAAI,cAAc,GAAuB,IAAI,CAAC;AAE9C,MAAM,eAAgB,SAAQ,KAAK;IACjC;QACE,KAAK,CACH,yDAAyD;YACvD,qDAAqD,CACxD,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;IAChC,CAAC;CACF;AAED,KAAK,UAAU,SAAS,CAAC,SAAkB;IACzC,IAAI,cAAc,EAAE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C,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,KAAK,YAAY,eAAe,EAAE,CAAC;gBACrC,OAAO;oBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC;oBACzD,OAAO,EAAE,IAAI;iBACd,CAAC;YACJ,CAAC;YACD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC;AAED,KAAK,UAAU,IAAI;IACjB,MAAM,SAAS,GAAG,IAAI,+BAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAY,EAAE,EAAE;IAC5B,OAAO,CAAC,KAAK,CAAC,mBAAmB,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAClD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server-level instructions for the Teams API MCP server.
|
|
3
|
+
*
|
|
4
|
+
* This is the single source of truth for workflow guidance, authentication
|
|
5
|
+
* notes, and general tips that help AI agents use the tools effectively.
|
|
6
|
+
* It is served via the MCP `instructions` field on server initialization
|
|
7
|
+
* and also printed by the CLI `guide` command.
|
|
8
|
+
*
|
|
9
|
+
* Per-tool documentation (descriptions, parameters) lives in the action
|
|
10
|
+
* definitions — this file only covers cross-cutting concerns.
|
|
11
|
+
*/
|
|
12
|
+
export declare const serverInstructions: string;
|
|
13
|
+
//# sourceMappingURL=server-instructions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-instructions.d.ts","sourceRoot":"","sources":["../src/server-instructions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,kBAAkB,QA4CvB,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Server-level instructions for the Teams API MCP server.
|
|
4
|
+
*
|
|
5
|
+
* This is the single source of truth for workflow guidance, authentication
|
|
6
|
+
* notes, and general tips that help AI agents use the tools effectively.
|
|
7
|
+
* It is served via the MCP `instructions` field on server initialization
|
|
8
|
+
* and also printed by the CLI `guide` command.
|
|
9
|
+
*
|
|
10
|
+
* Per-tool documentation (descriptions, parameters) lives in the action
|
|
11
|
+
* definitions — this file only covers cross-cutting concerns.
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.serverInstructions = void 0;
|
|
15
|
+
exports.serverInstructions = `
|
|
16
|
+
teams-api: AI-native Microsoft Teams integration.
|
|
17
|
+
|
|
18
|
+
All tools share a unified interface. Every tool accepts an optional "format" parameter (json, text, md, or toon). Default format is toon.
|
|
19
|
+
|
|
20
|
+
## Typical workflows
|
|
21
|
+
|
|
22
|
+
### Read and summarize a conversation
|
|
23
|
+
|
|
24
|
+
Call teams_get_messages with chat: "Chat Name" for group chats, or to: "Person Name" for 1:1 chats. Conversation resolution happens automatically — no need to look up the ID first.
|
|
25
|
+
|
|
26
|
+
### Reply to someone
|
|
27
|
+
|
|
28
|
+
Call teams_send_message with to: "Person Name" and content: "Your reply" for 1:1 chats, or chat: "Chat Name" and content: "Your message" for group chats.
|
|
29
|
+
|
|
30
|
+
### Monitor a conversation for new messages
|
|
31
|
+
|
|
32
|
+
Call teams_get_messages with chat: "Chat Name" and order: "newest-first" and limit: 10 to check recent activity.
|
|
33
|
+
|
|
34
|
+
### Find out who is in a chat
|
|
35
|
+
|
|
36
|
+
Call teams_get_members with chat: "Chat Name" or to: "Person Name".
|
|
37
|
+
|
|
38
|
+
### Look up a conversation ID
|
|
39
|
+
|
|
40
|
+
Call teams_find_conversation with the topic name. For 1:1 chats (which have no topic), use teams_find_one_on_one with the person's name.
|
|
41
|
+
|
|
42
|
+
### Search for people or chats
|
|
43
|
+
|
|
44
|
+
Call teams_find_people to search the organization directory by name. Call teams_find_chats to search chats by name or member.
|
|
45
|
+
|
|
46
|
+
### Get a meeting transcript
|
|
47
|
+
|
|
48
|
+
Call teams_get_transcript with chat: "Meeting Name" to retrieve the parsed transcript, or pass rawVtt: true for the original VTT file.
|
|
49
|
+
|
|
50
|
+
## Important notes
|
|
51
|
+
|
|
52
|
+
- Most tools accept chat, to, or conversationId to identify a conversation. You only need one — the server resolves the rest automatically.
|
|
53
|
+
- Conversation IDs look like "19:abc123@thread.v2" for group chats or "48:notes" for self-chat.
|
|
54
|
+
- 1:1 chats have no topic name — use teams_find_one_on_one or the "to" parameter to find them by person name.
|
|
55
|
+
- Messages include reactions, mentions, followers (thread subscribers), and quoted message references.
|
|
56
|
+
- Content for teams_send_message and teams_edit_message is interpreted as Markdown by default and converted to rich HTML. Use messageFormat: "html" for raw HTML or "text" for plain text.
|
|
57
|
+
- Token lifetime is ~24 hours. The server re-authenticates automatically when using auto-login (TEAMS_AUTO=true).
|
|
58
|
+
- All tools share the same parameters and behavior as the CLI commands and programmatic API.
|
|
59
|
+
`.trim();
|
|
60
|
+
//# sourceMappingURL=server-instructions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-instructions.js","sourceRoot":"","sources":["../src/server-instructions.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAEU,QAAA,kBAAkB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4CjC,CAAC,IAAI,EAAE,CAAC"}
|
package/dist/teams-client.d.ts
CHANGED
|
@@ -30,13 +30,21 @@
|
|
|
30
30
|
* );
|
|
31
31
|
*/
|
|
32
32
|
import type { TeamsToken, AutoLoginOptions, InteractiveLoginOptions, ManualTokenOptions, Conversation, Message, MessageFormat, Member, SentMessage, EditedMessage, DeletedMessage, GetMessagesOptions, ListConversationsOptions, OneOnOneSearchResult, PersonSearchResult, ChatSearchResult, MessagesPage, TranscriptResult } from "./types.js";
|
|
33
|
-
export { acquireTokenViaAutoLogin
|
|
34
|
-
export
|
|
33
|
+
export { acquireTokenViaAutoLogin } from "./auth/auto-login.js";
|
|
34
|
+
export { acquireTokenViaInteractiveLogin } from "./auth/interactive.js";
|
|
35
|
+
export { acquireTokenViaDebugSession } from "./auth/debug-session.js";
|
|
36
|
+
export type { TeamsToken, AutoLoginOptions, InteractiveLoginOptions, ManualTokenOptions, Conversation, Message, MessageFormat, Member, SentMessage, EditedMessage, DeletedMessage, GetMessagesOptions, ListConversationsOptions, OneOnOneSearchResult, MessagesPage, Mention, Reaction, Follower, UserProfile, PersonSearchResult, ChatSearchResult, TranscriptEntry, TranscriptResult, } from "./types.js";
|
|
35
37
|
export { SYSTEM_STREAM_TYPES } from "./types.js";
|
|
36
|
-
export {
|
|
38
|
+
export { isTextMessageType } from "./constants.js";
|
|
39
|
+
export { parseRawMessage } from "./api/chat-service.js";
|
|
40
|
+
export { ApiAuthError, ApiRateLimitError } from "./api/common.js";
|
|
41
|
+
export { fetchProfiles } from "./api/middle-tier.js";
|
|
42
|
+
export { searchPeople, searchChats } from "./api/substrate.js";
|
|
43
|
+
export { fetchTranscript, fetchTranscriptVtt, parseVtt, extractTranscriptUrl, extractMeetingTitle, isSuccessfulRecording, } from "./api/transcripts.js";
|
|
37
44
|
export { saveToken, loadToken, clearToken } from "./token-store.js";
|
|
38
|
-
export { actions
|
|
39
|
-
export
|
|
45
|
+
export { actions } from "./actions/definitions.js";
|
|
46
|
+
export { formatOutput } from "./actions/formatters.js";
|
|
47
|
+
export type { ActionDefinition, ActionParameter, OutputFormat, } from "./actions/formatters.js";
|
|
40
48
|
export declare class TeamsClient {
|
|
41
49
|
private token;
|
|
42
50
|
private autoLoginOptions;
|
|
@@ -138,10 +146,11 @@ export declare class TeamsClient {
|
|
|
138
146
|
*/
|
|
139
147
|
findOneOnOneConversation(personName: string): Promise<OneOnOneSearchResult | null>;
|
|
140
148
|
/**
|
|
141
|
-
* Get
|
|
149
|
+
* Get messages from a conversation.
|
|
142
150
|
*
|
|
143
|
-
* Follows pagination links to fetch
|
|
144
|
-
* Use `
|
|
151
|
+
* Follows pagination links to fetch message history.
|
|
152
|
+
* Use `limit` to cap the total number of messages returned.
|
|
153
|
+
* Use `maxPages` and `pageSize` to fine-tune pagination behaviour.
|
|
145
154
|
*/
|
|
146
155
|
getMessages(conversationId: string, options?: GetMessagesOptions): Promise<Message[]>;
|
|
147
156
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"teams-client.d.ts","sourceRoot":"","sources":["../src/teams-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,KAAK,EACV,UAAU,EACV,gBAAgB,EAChB,uBAAuB,EACvB,kBAAkB,EAClB,YAAY,EACZ,OAAO,EACP,aAAa,EACb,MAAM,EACN,WAAW,EACX,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,wBAAwB,EACxB,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,
|
|
1
|
+
{"version":3,"file":"teams-client.d.ts","sourceRoot":"","sources":["../src/teams-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,KAAK,EACV,UAAU,EACV,gBAAgB,EAChB,uBAAuB,EACvB,kBAAkB,EAClB,YAAY,EACZ,OAAO,EACP,aAAa,EACb,MAAM,EACN,WAAW,EACX,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,wBAAwB,EACxB,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,EACjB,MAAM,YAAY,CAAC;AAsBpB,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,+BAA+B,EAAE,MAAM,uBAAuB,CAAC;A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