/** * Error classes for the Slack connector * * Provides typed errors for Slack connection and message handling failures. */ /** * Error codes for Slack connector operations */ export declare enum SlackErrorCode { CONNECTION_FAILED = "SLACK_CONNECTION_FAILED", ALREADY_CONNECTED = "SLACK_ALREADY_CONNECTED", MISSING_TOKEN = "SLACK_MISSING_TOKEN", INVALID_TOKEN = "SLACK_INVALID_TOKEN", MESSAGE_SEND_FAILED = "SLACK_MESSAGE_SEND_FAILED", SOCKET_MODE_ERROR = "SLACK_SOCKET_MODE_ERROR" } /** * Base error class for Slack connector operations */ export declare class SlackConnectorError extends Error { readonly code: SlackErrorCode; constructor(message: string, code: SlackErrorCode, options?: { cause?: Error; }); } /** * Error thrown when connection to Slack fails */ export declare class SlackConnectionError extends SlackConnectorError { constructor(message: string, options?: { cause?: Error; }); } /** * Error thrown when attempting to connect while already connected */ export declare class AlreadyConnectedError extends SlackConnectorError { constructor(); } /** * Error thrown when bot or app token is missing */ export declare class MissingTokenError extends SlackConnectorError { readonly tokenType: "bot" | "app"; constructor(tokenType: "bot" | "app", envVar: string); } /** * Error thrown when a token is invalid */ export declare class InvalidTokenError extends SlackConnectorError { constructor(message: string, options?: { cause?: Error; }); } /** * Type guard to check if an error is a SlackConnectorError */ export declare function isSlackConnectorError(error: unknown): error is SlackConnectorError; //# sourceMappingURL=errors.d.ts.map