@intuitionrobotics/thunderstorm
Version:
34 lines (33 loc) • 1.13 kB
TypeScript
import { Module, OnApplicationError, ServerErrorSeverity } from "@intuitionrobotics/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;
};
export type SlackMessage = string | _SlackMessage;
export declare class SlackModule_Class extends Module<ConfigType> {
private web;
private messageMap;
constructor();
protected init(): void;
postMessage(slackMessage: SlackMessage): Promise<void>;
private postMessageImpl;
}
export declare const SlackModule: SlackModule_Class;
type ApiErrorConfig = {
exclude: string[];
minLevel: ServerErrorSeverity;
};
export declare class Slack_ServerApiError_Class extends Module<ApiErrorConfig> implements OnApplicationError {
constructor();
protected init(): void;
__processApplicationError(errorLevel: ServerErrorSeverity, message: string): Promise<void>;
}
export declare const Slack_ServerApiError: Slack_ServerApiError_Class;
export {};