import { BaseConnector } from '../../base/base.connector'; import type { IChatOptions, IChatProvider, ISendMessageSuccessResponse, WithPassthrough, ChatSendResult, IChatConnector } from '../../types'; import { ChannelTypeEnum } from '../../types'; import type { SlackConfig } from './slack.config'; import type { SlackNarrowedInput } from './slack.types'; /** * Webhook-URL-as-auth. No Authorization header; the webhookUrl IS the credential. * * Slack Incoming Webhooks return plain text `"ok"` on success (HTTP 200) and * an error string on failure — non-JSON body parsing throughout. No message_id * is returned, so `providerMessageId` is always `null`. */ export declare class SlackChatConnector extends BaseConnector implements IChatProvider, IChatConnector { private config; readonly id: "slack"; readonly channelType: ChannelTypeEnum.CHAT; constructor(config: SlackConfig, fetchImpl?: typeof fetch); /** * Thinwrap-native send. Implements `IChatConnector`. * * `to` is intentionally absent from `SlackNarrowedInput` — the webhook URL * targets the channel directly. All snake_case wire keys * (`icon_emoji`, `icon_url`, `thread_ts`, `unfurl_links`, `unfurl_media`, * `link_names`) are written explicitly; no `Casing` helper * is invoked. */ send(input: SlackNarrowedInput): Promise; /** * HTTP-layer mapping. ConnectorError carries no * `retryAfterSeconds` field — retry is consumer policy: * parsed seconds embedded in `providerMessage` text, raw header preserved on * `cause.retryAfter`. Wrapper performs no retry. * * 401/403/404 all map to `auth_failed` — invalid, revoked, or * deleted webhook URLs are all credential failures. */ private mapVendorError; sendMessage(options: IChatOptions, bridgeProviderData?: WithPassthrough>): Promise; }