import { AnyObject, CommonLogger, CommonLogLevel } from '@naturalcycles/js-lib'; import { SlackAttachmentField, SlackMessage, SlackServiceCfg } from './slack.service.model'; /** * Has 2 main methods: * * 1. .send({ items: any, channel: ..., ... }) * Low-level method with all possible options available. * * 2. .log(...items: any[]) * Shortcut method to "just log a bunch of things", everything is "by default" there. * * .send method has a shortcut: * .send(string, ctx?: CTX) */ export declare class SlackService { constructor(cfg: Partial>); cfg: SlackServiceCfg; /** * Allows to "log" many things at once, similar to `console.log(one, two, three). */ log(...items: any[]): Promise; send(input: SlackMessage | string, ctx?: CTX): Promise; kvToFields(kv: AnyObject): SlackAttachmentField[]; /** * Returns a CommonLogger implementation based on this SlackService instance. */ getCommonLogger(opt: { minLogLevel: CommonLogLevel; logChannel?: string; warnChannel?: string; errorChannel?: string; }): CommonLogger; } export declare function slackDefaultMessagePrefixHook(msg: SlackMessage): string[];