import type { ThreadMessage } from './types.js'; declare function graphPost(path: string, body: Record): Promise; declare function graphPatch(path: string, body: Record): Promise; /** Generic GET request to Graph API with 401 retry. */ declare function graphGet(path: string): Promise; /** * Sanitize a channel display name by removing characters that Teams forbids: * ~ # % & * { } + / \ ? < > | ' " : */ declare function sanitizeChannelName(name: string | null | undefined): string; /** * Create a new standard channel in a Team. * Returns the channel id and webUrl. */ export declare function createChannel(teamId: string, displayName: string, description?: string, layoutType?: 'post' | 'chat'): Promise<{ id: string; webUrl: string; }>; /** * Send a message to a channel. * Returns the message id. */ export declare function sendChannelMessage(teamId: string, channelId: string, content: string): Promise; /** * Get replies to a channel message (thread). * * Requires ChannelMessage.Read.All permission on the Managed Identity. * Gracefully returns an empty array if the permission is missing or the call fails. * * @param teamId - The Team ID * @param channelId - The Channel ID * @param threadRootMessageId - The root message ID of the thread * @param top - Max number of replies to fetch (default 50) */ export declare function getThreadReplies(teamId: string, channelId: string, threadRootMessageId: string, top?: number): Promise; export { graphPost, graphPatch, graphGet, sanitizeChannelName }; /** * List all channels in a Team. */ export declare function listChannels(teamId: string): Promise>; /** * Derive a channel name from a task's name. */ export declare function deriveChannelName(task: { name?: string | null; }): string; /** * Find or create a channel by display name. Returns the channel ID. * Serialized per (teamId, channelName) to avoid TOCTOU duplicates. */ export declare function ensureTaskChannel(teamId: string, channelName: string): Promise<{ id: string; created: boolean; }>;