feat(net-tool): 添加获取数据表记录的 getMetaInfo 方法及相关类型定义
All checks were successful
/ release (push) Successful in 26s

This commit is contained in:
zhaoyingbo 2025-01-28 09:22:36 +00:00
parent b70d040b4e
commit 1d6931d10b
3 changed files with 22 additions and 0 deletions

View File

@ -2,6 +2,7 @@
"cSpell.words": [
"cloudml",
"commitlint",
"metainfo",
"tseslint",
"unapproval",
"Xauthor",

View File

@ -98,6 +98,16 @@ class LarkSheetService extends LarkBaseService {
const path = `/bitable/v1/apps/${appToken}/tables/${tableId}/records`
return this.get<Lark.BaseRes>(path)
}
/**
*
* @param sheetToken
* @returns
*/
async getMetaInfo(sheetToken: string) {
const path = `/sheets/v2/spreadsheets/${sheetToken}/metainfo`
return this.get<Lark.SheetMetaInfoRes>(path)
}
}
export default LarkSheetService

View File

@ -148,6 +148,13 @@ export namespace Lark {
owner: string
}
export interface SheetMetaInfo {
sheets: {
sheetId: string
index: number
}[]
}
export interface BaseRes<T = any> {
code: number
data: T
@ -164,6 +171,10 @@ export namespace Lark {
}
}
export interface SheetMetaInfoRes extends BaseRes {
data: SheetMetaInfo
}
export interface WikiNodeRes extends BaseRes {
data: WikiNodeData
}