import { Destination, MessageClient, MessageOptions, SlackMessageClient } from "@atomist/automation-client"; import { SlackMessage } from "@atomist/slack-messages"; import * as marked from "marked"; import { AutomationClientConnectionRequest } from "../../cli/invocation/http/AutomationClientConnectionRequest"; /** * Function used to send output. Useful for testing. Default implementation * writes to stdout. */ export declare type Sender = (msg: string) => Promise; /** * Sender that writes to console using process.stdout. * This works even if console out is rerouted to logging. * @param msg message */ export declare const ProcessStdoutSender: Sender; /** * Message client logging to the console. Uses color and renders markdown */ export declare class ConsoleMessageClient implements MessageClient, SlackMessageClient { private readonly linkedChannel; private readonly sender; private readonly connectionConfig; readonly markedOptions: marked.MarkedOptions; respond(msg: string | SlackMessage, options?: MessageOptions): Promise; send(msg: any, destinations: Destination | Destination[], options?: MessageOptions): Promise; addressChannels(msg: string | SlackMessage, channels: string | string[], options?: MessageOptions): Promise; addressUsers(msg: string | SlackMessage, users: string | string[], options?: MessageOptions): Promise; private renderAction; /** * Apply consistent formatting to mimic writing to a Slack channel * @param {string[] | string} channels * @param {string} markdown */ private writeToChannel; dateString(): string; /** * Construct a new ConsoleMessageClient, supporting actionable messages. * @param {string} linkedChannel * @param {Sender} sender * @param {AutomationClientConnectionRequest} connectionConfig config to use to * format URLs to call back the source SDM * @param {marked.MarkedOptions} markedOptions */ constructor(linkedChannel: string, sender: Sender, connectionConfig: AutomationClientConnectionRequest, markedOptions?: marked.MarkedOptions); }