/** * The channel adapters the integrations plugin mounted, and the operations * its routes run on them, so the Channels actions reach the same adapters and * side effects instead of a second copy. The plugin publishes this at init; * an app without the plugin has none, which the actions report as such. */ import type { PlatformAdapter } from "./types.js"; export type ChannelWebhookRegistration = { ok: true; webhookUrl: string; result?: unknown; } | { ok: true; message: string; } | { ok: false; statusCode: number; error: string; }; export interface MountedChannels { readonly adapters: readonly PlatformAdapter[]; /** `{baseUrl}/_agent-native/integrations/{platform}/webhook`. */ webhookUrl(baseUrl: string, platform: string): string; /** * Save the on/off switch and start or stop what the platform runs while on * (the Google Docs poller). `baseUrl` is the app's public URL, when known. */ setEnabled(platform: string, enabled: boolean, options: { actorEmail?: string; baseUrl?: string; }): Promise; /** * Register the webhook with the provider (Telegram's setWebhook). Reads * credentials from the current request context. */ registerWebhook(platform: string, baseUrl: string): Promise; } export declare function setMountedChannels(next: MountedChannels | null): void; export declare function getMountedChannels(): MountedChannels | null;