zhaoyingbo 6e65581bbf
All checks were successful
Egg CI/CD / build-image (push) Successful in 32s
Egg CI/CD / deploy (push) Successful in 37s
feat: 接入lint 和 husky
2024-07-25 01:48:22 +00:00

26 lines
714 B
TypeScript

import { LarkServer } from "../../types/larkServer"
import larkNetTool from "./larkNetTool"
/**
* 向电子表格中插入行。
* @param appName - 应用程序的名称(可选)。
* @returns 一个函数,该函数接受表格令牌、范围和要插入的值。
*/
const insertRows =
(appName?: string) =>
async (sheetToken: string, range: string, values: string[][]) => {
const URL = `https://open.f.mioffice.cn/open-apis/sheets/v2/spreadsheets/${sheetToken}/values_append?insertDataOption=INSERT_ROWS`
return larkNetTool.post(appName)<LarkServer.BaseRes>(URL, {
valueRange: {
range,
values,
},
})
}
const sheet = {
insertRows,
}
export default sheet