@nu-art/storm
Version:
Storm - Express & Typescript based backend framework
32 lines (31 loc) • 868 B
TypeScript
/**
* Created by AlanBen on 29/08/2019.
*/
import { Module } from '@nu-art/ts-common';
import { WebClientOptions } from '@slack/web-api';
type ConfigType = {
token: string;
defaultChannel: string;
throttlingTime?: number;
slackConfig?: Partial<WebClientOptions>;
};
type _SlackMessage = {
text: string;
channel?: string;
messageId?: string;
};
export type SlackMessage = string | _SlackMessage;
export type ThreadPointer = {
ts: string;
channel: string;
};
export declare class ModuleBE_Slack_Class extends Module<ConfigType, any> {
private web;
private messageMap;
constructor();
protected init(): void;
postMessage(slackMessage: SlackMessage, messageId?: ThreadPointer): Promise<ThreadPointer | undefined>;
private postMessageImpl;
}
export declare const ModuleBE_Slack: ModuleBE_Slack_Class;
export {};