feat(net-tool): 添加 LarkWikiService 以获取知识空间节点信息
All checks were successful
/ release (push) Successful in 27s
All checks were successful
/ release (push) Successful in 27s
This commit is contained in:
parent
da784166ea
commit
75fa57b914
16
packages/net-tool/src/larkServer/wiki.ts
Normal file
16
packages/net-tool/src/larkServer/wiki.ts
Normal file
@ -0,0 +1,16 @@
|
||||
import { Lark } from "../types"
|
||||
import LarkBaseService from "./base"
|
||||
|
||||
class LarkWikiService extends LarkBaseService {
|
||||
/**
|
||||
* 获取知识空间节点信息
|
||||
* @param token 文档的token
|
||||
* @returns
|
||||
*/
|
||||
async getNodeInfo(token: string) {
|
||||
const path = `/wiki/v2/spaces/get_node`
|
||||
return this.post<Lark.WikiNodeData>(path, { token })
|
||||
}
|
||||
}
|
||||
|
||||
export default LarkWikiService
|
@ -130,6 +130,24 @@ export namespace Lark {
|
||||
chat_mode: "group" | "p2p" | "topic"
|
||||
}
|
||||
|
||||
export interface WikiNodeData {
|
||||
space_id: string
|
||||
node_token: string
|
||||
obj_token: string
|
||||
obj_type: string
|
||||
parent_node_token: string
|
||||
node_type: string
|
||||
origin_node_token: string
|
||||
origin_space_id: string
|
||||
has_child: boolean
|
||||
title: string
|
||||
obj_create_time: string
|
||||
obj_edit_time: string
|
||||
node_create_time: string
|
||||
creator: string
|
||||
owner: string
|
||||
}
|
||||
|
||||
export interface BaseRes<T = any> {
|
||||
code: number
|
||||
data: T
|
||||
|
Loading…
x
Reference in New Issue
Block a user