update refactor

This commit is contained in:
KienVT9 2025-07-08 18:03:36 +07:00
parent 01abc7e446
commit 55ad0607f3
39 changed files with 4304 additions and 584 deletions

View file

@ -0,0 +1,22 @@
import { Client } from '@larksuiteoapi/node-sdk';
export async function sendLarkMessage(receiveId: string, message: string): Promise<any> {
console.log(process.env.LARK_APP_ID!, process.env.LARK_APP_SECRET!);
const lark = new Client({
appId: process.env.LARK_APP_ID!,
appSecret: process.env.LARK_APP_SECRET!
});
const res = await lark.im.message.create({
params: {
receive_id_type: 'chat_id',
},
data: {
receive_id: receiveId,
content: JSON.stringify({text: message}),
msg_type: 'text'
}
});
return { success: true, data: res.data };
}