t-comm
Version:
专业、稳定、纯粹的工具库
31 lines (30 loc) • 993 B
TypeScript
import type { ICheckAuditResultOptions } from './types';
/**
* 统一审核结果检查
*
* 检查审核结果,通过则 resolve,驳回则发送企微通知并 reject。
* 适用于 H5 发布、组件库发布等所有需要审核的流水线。
*
* @example H5 发布
* ```ts
* const { batchSendWxRobotMarkdown, checkAuditResult } = require('t-comm');
*
* await checkAuditResult({
* resultInfo,
* title: '【H5发布】',
* contentLines: [`项目: \`my-project\``, `子工程:\`my-sub\``],
* creator: 'novlan1',
* auditDesc: '需求发布',
* webhookUrl: '0482249e-bf24-4168-b3e2-f72d012840c2',
* sendMarkdown: batchSendWxRobotMarkdown,
* });
* ```
*/
export declare function checkAuditResult(options: ICheckAuditResultOptions & {
/** 发送企微 Markdown 消息的函数,由调用方传入 */
sendMarkdown: (params: {
content: string;
chatId: string[];
webhookUrl: string;
}) => Promise<any>;
}): Promise<void>;