import type { SlackAppsConnectionsOpenResult, SlackAuthTestResult, SlackChatDeleteParams, SlackChatDeleteResult, SlackChatPostMessageParams, SlackChatPostMessageResult, SlackChatUpdateParams, SlackChatUpdateResult, SlackConversationMessagesResult, SlackConversationsHistoryParams, SlackConversationsInfoParams, SlackConversationsInfoResult, SlackConversationsRepliesParams, SlackDownloadFileParams, SlackFilesCompleteUploadExternalParams, SlackFilesCompleteUploadExternalResult, SlackFilesGetUploadUrlExternalParams, SlackFilesGetUploadUrlExternalResult, SlackFilesUploadExternalParams, SlackReactionsAddParams, SlackRequestOptions, SlackSetAssistantStatusParams, SlackUsersInfoParams, SlackUsersInfoResult, SlackViewsPublishParams, SlackWebApi } from "./types.js"; export type SlackApiErrorKind = "http" | "slack" | "malformed" | "network" | "aborted"; export interface SlackApiErrorDetails { kind: SlackApiErrorKind; method: string; status?: number; slackError?: string; needed?: string; provided?: string; warning?: string; /** * How long to wait before retrying, in milliseconds. Lifted from a Slack * `Retry-After` response header (seconds) on a rate-limited (HTTP 429) * response. Only the integer is carried — never a raw response body — so bot * tokens cannot leak. */ retryAfterMs?: number; cause?: unknown; } export declare class SlackApiError extends Error { readonly kind: SlackApiErrorKind; readonly method: string; readonly status?: number; readonly slackError?: string; readonly needed?: string; readonly provided?: string; readonly warning?: string; readonly retryAfterMs?: number; readonly cause?: unknown; constructor(message: string, details: SlackApiErrorDetails); } export interface SlackWebApiClientOptions { botToken: string; appToken?: string; apiBaseUrl?: string; fetchImpl?: typeof fetch; requestTimeoutMs?: number; } export declare class SlackWebApiClient implements SlackWebApi { private readonly botToken; private readonly appToken; private readonly apiBaseUrl; private readonly fetchImpl; private readonly requestTimeoutMs; constructor(options: SlackWebApiClientOptions); authTest(options?: SlackRequestOptions): Promise; appsConnectionsOpen(options?: SlackRequestOptions): Promise; chatPostMessage(params: SlackChatPostMessageParams, options?: SlackRequestOptions): Promise; filesGetUploadURLExternal(params: SlackFilesGetUploadUrlExternalParams, options?: SlackRequestOptions): Promise; filesUploadExternal(params: SlackFilesUploadExternalParams, options?: SlackRequestOptions): Promise; filesCompleteUploadExternal(params: SlackFilesCompleteUploadExternalParams, options?: SlackRequestOptions): Promise; private requiredAppToken; chatUpdate(params: SlackChatUpdateParams, options?: SlackRequestOptions): Promise; chatDelete(params: SlackChatDeleteParams, options?: SlackRequestOptions): Promise; reactionsAdd(params: SlackReactionsAddParams, options?: SlackRequestOptions): Promise; setAssistantStatus(params: SlackSetAssistantStatusParams, options?: SlackRequestOptions): Promise; viewsPublish(params: SlackViewsPublishParams, options?: SlackRequestOptions): Promise; conversationsReplies(params: SlackConversationsRepliesParams, options?: SlackRequestOptions): Promise; conversationsHistory(params: SlackConversationsHistoryParams, options?: SlackRequestOptions): Promise; usersInfo(params: SlackUsersInfoParams, options?: SlackRequestOptions): Promise; conversationsInfo(params: SlackConversationsInfoParams, options?: SlackRequestOptions): Promise; /** * Download a private Slack file. Slack serves `url_private` only with an * `Authorization: Bearer ` header. The download is bounded by the * caller's request timeout and any external abort signal, and reads at most * `maxBytes` (rejecting once the cap is exceeded) so a hostile or oversized * file cannot exhaust memory. */ downloadFile(params: SlackDownloadFileParams, options?: SlackRequestOptions): Promise; private request; private query; private executeRequest; } //# sourceMappingURL=slack-client.d.ts.map