import DingBot from '@wx-sab/ding-bot-sdk'
const dingBot = new DingBot({
// 机器人密钥
BOT_SECRET: string,
ACCESS_TOKEN: string,
BASE_URL?: string
})
dingBot.sendNotify({
msgtype: string,
at?: {
atMobiles?: Array<string>,
atUserIds?: Array<string>,
isAtAll?: boolean
},
// 文本类型
text?: {
content: string,
},
// 链接类型
link?: {
text: string,
title: string,
picUrl?: string,
messageUrl: string
},
// Markdown 类型
markdown?: {
title: string,
text: string
},
// ActionCard 类型
actionCard?: {
title: string,
text: string,
btnOrientation?: string,
singleTitle?: string,
singleURL?: string,
btns?: Array<actionCardBtns>,
},
// FeedCard 类型
feedCard?: {
links: Array<feedCardLinks>
}
})