feat(net-tool): 添加获取数据表记录的 getMetaInfo 方法及相关类型定义
All checks were successful
/ release (push) Successful in 26s
All checks were successful
/ release (push) Successful in 26s
This commit is contained in:
parent
b70d040b4e
commit
1d6931d10b
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
@ -2,6 +2,7 @@
|
|||||||
"cSpell.words": [
|
"cSpell.words": [
|
||||||
"cloudml",
|
"cloudml",
|
||||||
"commitlint",
|
"commitlint",
|
||||||
|
"metainfo",
|
||||||
"tseslint",
|
"tseslint",
|
||||||
"unapproval",
|
"unapproval",
|
||||||
"Xauthor",
|
"Xauthor",
|
||||||
|
@ -98,6 +98,16 @@ class LarkSheetService extends LarkBaseService {
|
|||||||
const path = `/bitable/v1/apps/${appToken}/tables/${tableId}/records`
|
const path = `/bitable/v1/apps/${appToken}/tables/${tableId}/records`
|
||||||
return this.get<Lark.BaseRes>(path)
|
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
|
export default LarkSheetService
|
||||||
|
@ -148,6 +148,13 @@ export namespace Lark {
|
|||||||
owner: string
|
owner: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface SheetMetaInfo {
|
||||||
|
sheets: {
|
||||||
|
sheetId: string
|
||||||
|
index: number
|
||||||
|
}[]
|
||||||
|
}
|
||||||
|
|
||||||
export interface BaseRes<T = any> {
|
export interface BaseRes<T = any> {
|
||||||
code: number
|
code: number
|
||||||
data: T
|
data: T
|
||||||
@ -164,6 +171,10 @@ export namespace Lark {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface SheetMetaInfoRes extends BaseRes {
|
||||||
|
data: SheetMetaInfo
|
||||||
|
}
|
||||||
|
|
||||||
export interface WikiNodeRes extends BaseRes {
|
export interface WikiNodeRes extends BaseRes {
|
||||||
data: WikiNodeData
|
data: WikiNodeData
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user