2020-03-22 22:09:33 +00:00
|
|
|
process.env.NTBA_FIX_319 = 'junk';
|
|
|
|
import SendMessage from './flows/send_message';
|
|
|
|
import TaskMessage from './flows/task_message';
|
2020-03-25 22:40:18 +00:00
|
|
|
import { ITaskConfig as TaskConfig, IMessageConfig as MessageConfig } from './config/config';
|
2020-03-22 22:09:33 +00:00
|
|
|
import { ISimpleMessageOptions, ITaskOptions } from './utils';
|
|
|
|
|
|
|
|
export default class Telme {
|
2020-03-25 22:40:18 +00:00
|
|
|
static async sendMessage(config: MessageConfig, msg: string) {
|
|
|
|
await SendMessage.send(config, msg);
|
2020-03-22 22:09:33 +00:00
|
|
|
return true;
|
|
|
|
}
|
2020-03-25 22:40:18 +00:00
|
|
|
static async runTask(config: TaskConfig, options: ITaskOptions) {
|
2020-03-22 22:09:33 +00:00
|
|
|
await TaskMessage.run(config, options);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
export namespace Interfaces {
|
2020-03-25 22:40:18 +00:00
|
|
|
export interface IMessageConfig extends MessageConfig { };
|
|
|
|
export interface ITaskConfig extends TaskConfig { };
|
2020-03-22 22:09:33 +00:00
|
|
|
export interface IMessageOptions extends ISimpleMessageOptions { };
|
|
|
|
export interface ITaskMessageOptions extends ITaskOptions { };
|
|
|
|
}
|