import type { Body, PathParams, RouteResponse } from '../route-types.generated.js'; import type { ClientOptions } from '../types.js'; import { BaseResource } from './base.js'; export type ChannelPlatformInfo = RouteResponse<'GET /channels/platforms'>[number]; export type ChannelInstallationInfo = RouteResponse<'GET /channels/:platform/installations'>[number]; export type ChannelConnectResult = RouteResponse<'POST /channels/:platform/connect'>; export type ChannelConnectOAuth = Extract; export type ChannelConnectDeepLink = Extract; export type ChannelConnectImmediate = Extract; export declare class Channels extends BaseResource { constructor(options: ClientOptions); /** * Lists all registered channel platforms and their configuration status. * @returns Array of available platforms */ listPlatforms(): Promise; /** * Lists installations for a given platform, optionally filtered by agent. * @param platform - Platform identifier (e.g., "slack") * @param agentId - Optional agent ID to filter by (client-side) * @returns Array of installations */ listInstallations(platform: PathParams<'GET /channels/:platform/installations'>['platform'], agentId?: string): Promise; /** * Connects an agent to a channel platform. * @param platform - Platform identifier (e.g., "slack") * @param agentId - Agent to connect * @param options - Platform-specific connection options * @returns Discriminated connect result — check `type` for the authorization flow */ connect(platform: PathParams<'POST /channels/:platform/connect'>['platform'], agentId: Body<'POST /channels/:platform/connect'>['agentId'], options?: Body<'POST /channels/:platform/connect'>['options']): Promise; /** * Reconciles an agent's installation with platform state — activates a * pending installation whose connect flow completed out-of-band (e.g. a * Discord bot invite finished in another tab). No-op (returns null) on * platforms without reconciliation. * @param platform - Platform identifier (e.g., "discord") * @param agentId - Agent whose installation to reconcile * @returns The (possibly updated) installation, or null */ reconcileInstallation(platform: PathParams<'POST /channels/:platform/:agentId/reconcile'>['platform'], agentId: PathParams<'POST /channels/:platform/:agentId/reconcile'>['agentId']): Promise>; /** * Disconnects an agent from a channel platform. * @param platform - Platform identifier (e.g., "slack") * @param agentId - Agent to disconnect */ disconnect(platform: PathParams<'POST /channels/:platform/:agentId/disconnect'>['platform'], agentId: PathParams<'POST /channels/:platform/:agentId/disconnect'>['agentId']): Promise>; } //# sourceMappingURL=channels.d.ts.map