/** * Slack WebClient singleton — wraps @slack/web-api with env-based auth. * * Token resolution order (default): * 1. SLACK_TOKEN / SLACK_BOT_TOKEN / SLACK_USER_TOKEN from the environment * 2. ~/.config/elnora-slack/.env (or $SLACK_CONFIG_DIR/.env) * 3. .env next to the installed CLI (repo-local dev convenience) * * The env files are parsed with a strict 3-key allowlist; nothing outside the * config directory or the CLI's own folder is ever read. No credentials leave * the machine except to Slack's own API hosts. * * For methods that require a user token (e.g. search.messages, search.files, * search.all), pass `{ requireUserToken: true }` to `getClient()`. This forces * resolution to SLACK_USER_TOKEN and rejects bot tokens with a clear error. * * Security: SSRF guard, request timeout, auth validation. */ import { WebClient } from "@slack/web-api"; export declare function validateSlackHost(url: string): void; export interface GetClientOptions { /** * When true, resolve to SLACK_USER_TOKEN (xoxp-) only. Required for * search.* methods and other endpoints that reject bot tokens. */ requireUserToken?: boolean; } export declare function getClient(opts?: GetClientOptions): WebClient; //# sourceMappingURL=client.d.ts.map