/** * The paginated attachment-listing GET, shared by every path that needs to know * what a message carries. * * Extracted from tools/mail-attachment.ts so the draft removal path in * draft-edit resolves against the same call the inbound list tool uses, rather * than a second implementation of the same endpoint that could drift on * pagination — which the inbound path already had to fix once. * * A draft is a message in the same collection, so one GET serves both. The * id/name pair returned here is the handle a removal addresses. * * Logs nothing on purpose: each caller emits its own line in its own idiom (the * inbound tool an `op: "list"`, draft-edit a per-file `op: "detach"`). `pages` * is returned rather than logged so the inbound tool's existing line is * unchanged by the extraction. */ import type { GraphClientConfig } from "./graph-client.js"; /** Graph attachment @odata.type → a short kind the agent reads. */ export type AttachmentKind = "file" | "item" | "reference" | "unknown"; export interface AttachmentListItem { id: string; name: string | null; contentType: string | null; size: number; isInline: boolean; kind: AttachmentKind; } export declare function attachmentKind(odataType: string | undefined): AttachmentKind; /** * List a message's attachments. Metadata only — `$select` omits `contentBytes`, * so no file bytes are downloaded. * * Follows @odata.nextLink to completion so a message with more attachments than * one Graph page is never silently truncated (matching mail-list / mail-search, * which paginate). The first request builds the path + $select; each nextLink is * a full URL that already encodes the select and skiptoken. */ export declare function listMessageAttachments(config: GraphClientConfig, messageId: string, tool: string): Promise<{ items: AttachmentListItem[]; pages: number; }>; //# sourceMappingURL=attachment-list.d.ts.map