/**
 * Slack-specific types and constants for the Socket Mode ingestor.
 *
 * @see https://docs.slack.dev/apis/events-api/using-socket-mode
 */
/** Top-level message types received over the Socket Mode WebSocket. */
export type SlackMessageType = 'hello' | 'events_api' | 'slash_commands' | 'interactive' | 'disconnect';
/** Reasons a Socket Mode disconnect message may be sent. */
export type SlackDisconnectReason = 'link_disabled' | 'warning' | 'refresh_requested';
/**
 * Envelope wrapper for all Socket Mode messages.
 * Every non-hello/disconnect message has an `envelope_id` that must be acknowledged.
 */
export interface SlackEnvelope {
    /** Message type — determines how to process the payload. */
    type: SlackMessageType;
    /** Unique ID for this envelope. Send it back to acknowledge receipt. */
    envelope_id?: string;
    /** The actual event/command/interaction payload. */
    payload?: unknown;
    /** Whether Slack accepts a response payload in the acknowledgment. */
    accepts_response_payload?: boolean;
}
/** Hello message received immediately after WebSocket connection. */
export interface SlackHello {
    type: 'hello';
    connection_info: {
        app_id: string;
    };
    num_connections: number;
    debug_info: {
        host: string;
        started: string;
        build_number: number;
        /** Approximate seconds until this connection will be refreshed. */
        approximate_connection_time: number;
    };
}
/** Disconnect message sent by Slack before closing the connection. */
export interface SlackDisconnect {
    type: 'disconnect';
    reason: SlackDisconnectReason;
    debug_info: {
        host: string;
    };
}
/** Shape of the `apps.connections.open` API response. */
export interface SlackConnectionsOpenResponse {
    ok: boolean;
    url?: string;
    error?: string;
}
/**
 * Extract the Slack event type from an envelope payload.
 * For `events_api` envelopes, the event type is at `payload.event.type`.
 * For `slash_commands`, we use the command name.
 * For `interactive`, we use the interaction type.
 */
export declare function extractSlackEventType(envelope: SlackEnvelope): string;
/**
 * Extract a channel ID from a Slack envelope payload.
 * Checks `payload.event.channel`, `payload.channel_id`, and `payload.channel.id`.
 */
export declare function extractSlackChannelId(envelope: SlackEnvelope): string | undefined;
/**
 * Extract a user ID from a Slack envelope payload.
 * Checks `payload.event.user`, `payload.user_id`, and `payload.user.id`.
 */
export declare function extractSlackUserId(envelope: SlackEnvelope): string | undefined;
//# sourceMappingURL=types.d.ts.map