UNPKG

slack-logs

Version:

slack-logs

31 lines (30 loc) 841 B
interface Slack { log(label: string, data: any): Promise<null | undefined>; logBlockMessage(label: string, objectData: BlocksInterface[], error_type?: LogLevel): Promise<null | undefined>; rawBody(payload: Record<string, any>): Promise<null | undefined>; } export interface SlackLogConfigOptions { webhookUrl: string; enableAlerts: boolean; } interface BlocksInterface { title: string; value: any; } export declare enum LogLevel { DEFAULT = "DEFAULT", SUCCESS = "SUCCESS", INFO = "INFO", WARN = "WARN", ERROR = "ERROR" } export declare enum LogColor { DEFAULT = "#B4B4B8", SUCCESS = "#65B741", INFO = "#40A2D8", WARN = "#E3651D", ERROR = "#FF0000" } export declare function slackLogConfig(config: SlackLogConfigOptions): void; export declare const slack: Slack; export {};