feat(outlook): 添加 Outlook MCP 集成支持并优化分页功能
- 新增 NANO_OUTLOOK_MCP_URL 和 NANO_OUTLOOK_MCP_SERVER_ID 环境变量配置 - 实现 Outlook 邮件和日历的分页查询功能,添加安全参数验证 - 为 app-instance 创建脚本添加 Outlook MCP 服务器 ID 参数 - 更新前端 Outlook 页面实现邮件列表和日历事件的分页浏览 - 添加 Git 忽略文件配置和 Docker 挂载路径修复 BREAKING CHANGE: Outlook 集成现在需要配置 MCP URL 和服务器 ID 环境变量
This commit is contained in:
@ -21,7 +21,9 @@ import type {
|
||||
OutlookConnectionPayload,
|
||||
OutlookConnectionTestResult,
|
||||
OutlookConnectResult,
|
||||
OutlookEventListResponse,
|
||||
OutlookMessageDetail,
|
||||
OutlookMessageListResponse,
|
||||
OutlookOverview,
|
||||
OutlookStatus,
|
||||
UiAgentDescriptor,
|
||||
@ -838,6 +840,44 @@ export async function getOutlookOverview(): Promise<OutlookOverview> {
|
||||
});
|
||||
}
|
||||
|
||||
export async function getOutlookMessages(
|
||||
folder: string,
|
||||
options?: {
|
||||
top?: number;
|
||||
skip?: number;
|
||||
unreadOnly?: boolean;
|
||||
}
|
||||
): Promise<OutlookMessageListResponse> {
|
||||
const params = new URLSearchParams({
|
||||
folder,
|
||||
top: String(options?.top ?? 20),
|
||||
skip: String(options?.skip ?? 0),
|
||||
});
|
||||
if (options?.unreadOnly) {
|
||||
params.set('unread_only', 'true');
|
||||
}
|
||||
return fetchJSON(`/api/integrations/outlook/messages?${params.toString()}`, {
|
||||
timeoutMs: OUTLOOK_REQUEST_TIMEOUT_MS,
|
||||
});
|
||||
}
|
||||
|
||||
export async function getOutlookEvents(options: {
|
||||
startTime: string;
|
||||
endTime: string;
|
||||
top?: number;
|
||||
skip?: number;
|
||||
}): Promise<OutlookEventListResponse> {
|
||||
const params = new URLSearchParams({
|
||||
start_time: options.startTime,
|
||||
end_time: options.endTime,
|
||||
top: String(options.top ?? 20),
|
||||
skip: String(options.skip ?? 0),
|
||||
});
|
||||
return fetchJSON(`/api/integrations/outlook/events?${params.toString()}`, {
|
||||
timeoutMs: OUTLOOK_REQUEST_TIMEOUT_MS,
|
||||
});
|
||||
}
|
||||
|
||||
export async function getOutlookMessageDetail(
|
||||
messageId: string,
|
||||
changekey?: string | null
|
||||
|
||||
Reference in New Issue
Block a user