t-comm
Version:
专业、稳定、纯粹的工具库
95 lines (94 loc) • 2.25 kB
TypeScript
import type { SecretInfoType } from '../types';
/**
* 生成多个图片并发送机器人
* @param {object} options 配置
*
* @example
*
* const requestMultiImgDate = Date.now() - 1 * 24 * 60 * 60 * 1000;
*
* const tamGroupIdList = [1, 2, 3];
*
* const summaryScoreTableHeaderMap = {
* ProjectName: {
* name: '项目名称',
* tableWidth: 95,
* },
* PagePv: {
* name: 'PV',
* tableWidth: 65,
* },
* };
*
* const eventProjectMap = {
* 62659: {
* name: 'aaaaa',
* },
* 57706: {
* name: 'bbbbb',
* extraProjectId: 66379,
* },
* };
*
* const eventMap = {
* WX_SUC: {
* // 总和
* type: 'SUMMARY',
* target: ['ENTER_GAME_WX_SUC', 'LAUNCH_GAME_SUC_WX'],
* },
* WX_FAIL: {
* // 总和
* type: 'SUMMARY',
* target: ['ENTER_GAME_WX_FAIL', 'LAUNCH_GAME_FAIL_WX'],
* },
* };
*
* const eventTableHeaderMap = {
* ProjectName: {
* name: '项目名称',
* tableWidth: 95,
* },
* ALL_SUMMARY: {
* name: '拉起总数',
* tableWidth: 65,
* },
* };
*
* await genMultiImgAndSendRobot({
* date: requestMultiImgDate,
* secretInfo: {
* getPwdCode,
* encrypt,
* apiKey: process.env.AEGIS_APP_KEY,
* loginName: 'lee',
* },
* webhookUrl: tamRobotWebhook,
* chatId: tamRobotChatId,
*
* groupIdList: tamGroupIdList,
* eventProjectIdMap: eventProjectMap,
* tableHeaderMap: summaryScoreTableHeaderMap,
*
* eventMap,
* eventTableHeaderMap,
* });
*
*
*/
export declare function genMultiImgAndSendRobot({ date, groupIdList, secretInfo, extraDataMap, ignoreProjectIdList, tableHeaderMap, webhookUrl, chatId, env, eventMap, eventProjectIdMap, eventTableHeaderMap, }: {
date: number;
groupIdList: Array<number>;
secretInfo: SecretInfoType;
extraDataMap?: Record<string, any>;
ignoreProjectIdList?: Array<string | number>;
tableHeaderMap?: Record<string, any>;
webhookUrl: string;
chatId: string;
env?: string;
eventMap: Record<string, any>;
eventProjectIdMap: Record<string, any>;
eventTableHeaderMap: Record<string, any>;
}): Promise<{
data: import("../types").ScoreInfoType[];
projectIdList: number[];
} | undefined>;