@satorijs/adapter-lark 3.10.6 → 3.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/content.d.ts +211 -93
- package/lib/index.cjs +2954 -2474
- package/lib/internal.d.ts +4 -4
- package/lib/message.d.ts +2 -3
- package/lib/types/acs.d.ts +212 -172
- package/lib/types/admin.d.ts +331 -291
- package/lib/types/aily.d.ts +331 -216
- package/lib/types/apaas.d.ts +646 -494
- package/lib/types/application.d.ts +559 -458
- package/lib/types/approval.d.ts +826 -791
- package/lib/types/attendance.d.ts +1094 -994
- package/lib/types/auth.d.ts +66 -61
- package/lib/types/authen.d.ts +221 -186
- package/lib/types/baike.d.ts +258 -233
- package/lib/types/base.d.ts +74 -0
- package/lib/types/bitable.d.ts +830 -770
- package/lib/types/board.d.ts +29 -14
- package/lib/types/calendar.d.ts +660 -605
- package/lib/types/cardkit.d.ts +149 -134
- package/lib/types/compensation.d.ts +84 -49
- package/lib/types/contact.d.ts +1279 -1204
- package/lib/types/corehr.d.ts +4982 -4526
- package/lib/types/directory.d.ts +447 -0
- package/lib/types/docs.d.ts +28 -18
- package/lib/types/document_ai.d.ts +347 -252
- package/lib/types/docx.d.ts +428 -383
- package/lib/types/drive.d.ts +1093 -1048
- package/lib/types/ehr.d.ts +66 -51
- package/lib/types/event.d.ts +16 -6
- package/lib/types/helpdesk.d.ts +816 -741
- package/lib/types/hire.d.ts +3955 -3589
- package/lib/types/human_authentication.d.ts +32 -22
- package/lib/types/im.d.ts +1420 -1295
- package/lib/types/index.d.ts +1422 -330
- package/lib/types/lingo.d.ts +279 -249
- package/lib/types/mail.d.ts +1032 -675
- package/lib/types/mdm.d.ts +105 -37
- package/lib/types/minutes.d.ts +73 -26
- package/lib/types/moments.d.ts +23 -13
- package/lib/types/okr.d.ts +266 -225
- package/lib/types/optical_char_recognition.d.ts +22 -12
- package/lib/types/passport.d.ts +58 -48
- package/lib/types/payroll.d.ts +210 -53
- package/lib/types/performance.d.ts +463 -414
- package/lib/types/personal_settings.d.ts +93 -82
- package/lib/types/report.d.ts +79 -58
- package/lib/types/search.d.ts +265 -235
- package/lib/types/security_and_compliance.d.ts +30 -19
- package/lib/types/sheets.d.ts +356 -321
- package/lib/types/speech_to_text.d.ts +44 -34
- package/lib/types/task.d.ts +998 -1087
- package/lib/types/tenant.d.ts +25 -15
- package/lib/types/translation.d.ts +42 -32
- package/lib/types/trust_party.d.ts +81 -0
- package/lib/types/vc.d.ts +1218 -1123
- package/lib/types/verification.d.ts +11 -6
- package/lib/types/wiki.d.ts +270 -235
- package/lib/types/workplace.d.ts +58 -38
- package/lib/utils.d.ts +2 -2
- package/package.json +4 -4
- package/src/bot.ts +15 -15
- package/src/content.ts +230 -107
- package/src/internal.ts +29 -12
- package/src/message.ts +82 -111
- package/src/types/acs.ts +234 -186
- package/src/types/admin.ts +353 -305
- package/src/types/aily.ts +375 -233
- package/src/types/apaas.ts +754 -568
- package/src/types/application.ts +633 -507
- package/src/types/approval.ts +914 -872
- package/src/types/attendance.ts +1226 -1104
- package/src/types/auth.ts +72 -66
- package/src/types/authen.ts +233 -191
- package/src/types/baike.ts +276 -246
- package/src/types/base.ts +93 -0
- package/src/types/bitable.ts +966 -894
- package/src/types/board.ts +34 -16
- package/src/types/calendar.ts +751 -685
- package/src/types/cardkit.ts +164 -146
- package/src/types/compensation.ts +97 -55
- package/src/types/contact.ts +1465 -1375
- package/src/types/corehr.ts +5664 -5077
- package/src/types/directory.ts +569 -0
- package/src/types/docs.ts +31 -19
- package/src/types/document_ai.ts +401 -287
- package/src/types/docx.ts +492 -438
- package/src/types/drive.ts +1266 -1213
- package/src/types/ehr.ts +71 -53
- package/src/types/event.ts +19 -7
- package/src/types/helpdesk.ts +930 -840
- package/src/types/hire.ts +4453 -4019
- package/src/types/human_authentication.ts +35 -23
- package/src/types/im.ts +1626 -1476
- package/src/types/index.ts +1532 -346
- package/src/types/lingo.ts +299 -263
- package/src/types/mail.ts +1231 -779
- package/src/types/mdm.ts +122 -39
- package/src/types/minutes.ts +88 -28
- package/src/types/moments.ts +26 -14
- package/src/types/okr.ts +286 -238
- package/src/types/optical_char_recognition.ts +25 -13
- package/src/types/passport.ts +62 -50
- package/src/types/payroll.ts +254 -57
- package/src/types/performance.ts +528 -467
- package/src/types/personal_settings.ts +101 -89
- package/src/types/report.ts +86 -62
- package/src/types/search.ts +285 -249
- package/src/types/security_and_compliance.ts +33 -21
- package/src/types/sheets.ts +421 -379
- package/src/types/speech_to_text.ts +48 -36
- package/src/types/task.ts +1152 -1260
- package/src/types/tenant.ts +29 -17
- package/src/types/translation.ts +46 -34
- package/src/types/trust_party.ts +110 -0
- package/src/types/vc.ts +1397 -1283
- package/src/types/verification.ts +13 -7
- package/src/types/wiki.ts +293 -251
- package/src/types/workplace.ts +65 -41
- package/src/utils.ts +3 -3
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as Lark from '.';
|
|
2
2
|
declare module '../internal' {
|
|
3
3
|
interface Internal {
|
|
4
|
+
verification: Verification.Methods;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
export declare namespace Verification {
|
|
8
|
+
interface Methods {
|
|
4
9
|
/**
|
|
5
10
|
* 获取认证信息
|
|
6
11
|
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/verification-v1/verification/get
|
|
7
12
|
*/
|
|
8
|
-
|
|
13
|
+
get(): Promise<GetResponse>;
|
|
14
|
+
}
|
|
15
|
+
interface GetResponse {
|
|
16
|
+
/** 认证信息 */
|
|
17
|
+
verification?: Lark.Verification;
|
|
9
18
|
}
|
|
10
|
-
}
|
|
11
|
-
export interface GetVerificationResponse {
|
|
12
|
-
/** 认证信息 */
|
|
13
|
-
verification?: Verification;
|
|
14
19
|
}
|
package/lib/types/wiki.d.ts
CHANGED
|
@@ -1,240 +1,275 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Pagination } from '../internal';
|
|
1
|
+
import * as Lark from '.';
|
|
2
|
+
import { Paginated, Pagination } from '../internal';
|
|
3
3
|
declare module '../internal' {
|
|
4
4
|
interface Internal {
|
|
5
|
-
|
|
6
|
-
* 获取知识空间列表
|
|
7
|
-
* @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space/list
|
|
8
|
-
*/
|
|
9
|
-
listWikiSpace(query?: ListWikiSpaceQuery): Paginated<Space>;
|
|
10
|
-
/**
|
|
11
|
-
* 获取知识空间信息
|
|
12
|
-
* @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space/get
|
|
13
|
-
*/
|
|
14
|
-
getWikiSpace(space_id: string, query?: GetWikiSpaceQuery): Promise<GetWikiSpaceResponse>;
|
|
15
|
-
/**
|
|
16
|
-
* 创建知识空间
|
|
17
|
-
* @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space/create
|
|
18
|
-
*/
|
|
19
|
-
createWikiSpace(body: CreateWikiSpaceRequest): Promise<CreateWikiSpaceResponse>;
|
|
20
|
-
/**
|
|
21
|
-
* 获取知识空间成员列表
|
|
22
|
-
* @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-member/list
|
|
23
|
-
*/
|
|
24
|
-
listWikiSpaceMember(space_id: string, query?: Pagination): Paginated<Member, 'members'>;
|
|
25
|
-
/**
|
|
26
|
-
* 添加知识空间成员
|
|
27
|
-
* @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-member/create
|
|
28
|
-
*/
|
|
29
|
-
createWikiSpaceMember(space_id: string, body: CreateWikiSpaceMemberRequest, query?: CreateWikiSpaceMemberQuery): Promise<CreateWikiSpaceMemberResponse>;
|
|
30
|
-
/**
|
|
31
|
-
* 删除知识空间成员
|
|
32
|
-
* @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-member/delete
|
|
33
|
-
*/
|
|
34
|
-
deleteWikiSpaceMember(space_id: string, member_id: string, body: DeleteWikiSpaceMemberRequest): Promise<DeleteWikiSpaceMemberResponse>;
|
|
35
|
-
/**
|
|
36
|
-
* 更新知识空间设置
|
|
37
|
-
* @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-setting/update
|
|
38
|
-
*/
|
|
39
|
-
updateWikiSpaceSetting(space_id: string, body: UpdateWikiSpaceSettingRequest): Promise<UpdateWikiSpaceSettingResponse>;
|
|
40
|
-
/**
|
|
41
|
-
* 创建知识空间节点
|
|
42
|
-
* @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-node/create
|
|
43
|
-
*/
|
|
44
|
-
createWikiSpaceNode(space_id: string, body: CreateWikiSpaceNodeRequest): Promise<CreateWikiSpaceNodeResponse>;
|
|
45
|
-
/**
|
|
46
|
-
* 获取知识空间节点信息
|
|
47
|
-
* @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space/get_node
|
|
48
|
-
*/
|
|
49
|
-
getNodeWikiSpace(query?: GetNodeWikiSpaceQuery): Promise<GetNodeWikiSpaceResponse>;
|
|
50
|
-
/**
|
|
51
|
-
* 获取知识空间子节点列表
|
|
52
|
-
* @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-node/list
|
|
53
|
-
*/
|
|
54
|
-
listWikiSpaceNode(space_id: string, query?: ListWikiSpaceNodeQuery): Paginated<Node>;
|
|
55
|
-
/**
|
|
56
|
-
* 移动知识空间节点
|
|
57
|
-
* @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-node/move
|
|
58
|
-
*/
|
|
59
|
-
moveWikiSpaceNode(space_id: string, node_token: string, body: MoveWikiSpaceNodeRequest): Promise<MoveWikiSpaceNodeResponse>;
|
|
60
|
-
/**
|
|
61
|
-
* 更新知识空间节点标题
|
|
62
|
-
* @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-node/update_title
|
|
63
|
-
*/
|
|
64
|
-
updateTitleWikiSpaceNode(space_id: string, node_token: string, body: UpdateTitleWikiSpaceNodeRequest): Promise<void>;
|
|
65
|
-
/**
|
|
66
|
-
* 创建知识空间节点副本
|
|
67
|
-
* @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-node/copy
|
|
68
|
-
*/
|
|
69
|
-
copyWikiSpaceNode(space_id: string, node_token: string, body: CopyWikiSpaceNodeRequest): Promise<CopyWikiSpaceNodeResponse>;
|
|
70
|
-
/**
|
|
71
|
-
* 移动云空间文档至知识空间
|
|
72
|
-
* @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-node/move_docs_to_wiki
|
|
73
|
-
*/
|
|
74
|
-
moveDocsToWikiWikiSpaceNode(space_id: string, body: MoveDocsToWikiWikiSpaceNodeRequest): Promise<MoveDocsToWikiWikiSpaceNodeResponse>;
|
|
75
|
-
/**
|
|
76
|
-
* 获取任务结果
|
|
77
|
-
* @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/task/get
|
|
78
|
-
*/
|
|
79
|
-
getWikiTask(task_id: string, query?: GetWikiTaskQuery): Promise<GetWikiTaskResponse>;
|
|
80
|
-
/**
|
|
81
|
-
* 搜索 Wiki
|
|
82
|
-
* @see https://open.feishu.cn/document/ukTMukTMukTM/uEzN0YjLxcDN24SM3QjN/search_wiki
|
|
83
|
-
*/
|
|
84
|
-
searchWikiNode(body: SearchWikiNodeRequest, query?: Pagination): Paginated<Node>;
|
|
5
|
+
wiki: Wiki.Methods;
|
|
85
6
|
}
|
|
86
7
|
}
|
|
87
|
-
export
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
8
|
+
export declare namespace Wiki {
|
|
9
|
+
interface Methods {
|
|
10
|
+
space: Space.Methods;
|
|
11
|
+
task: Task.Methods;
|
|
12
|
+
node: Node.Methods;
|
|
13
|
+
}
|
|
14
|
+
namespace Space {
|
|
15
|
+
interface Methods {
|
|
16
|
+
member: Member.Methods;
|
|
17
|
+
setting: Setting.Methods;
|
|
18
|
+
node: Node.Methods;
|
|
19
|
+
/**
|
|
20
|
+
* 获取知识空间列表
|
|
21
|
+
* @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space/list
|
|
22
|
+
*/
|
|
23
|
+
list(query?: ListQuery): Paginated<Lark.Space>;
|
|
24
|
+
/**
|
|
25
|
+
* 获取知识空间信息
|
|
26
|
+
* @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space/get
|
|
27
|
+
*/
|
|
28
|
+
get(space_id: string, query?: GetQuery): Promise<GetResponse>;
|
|
29
|
+
/**
|
|
30
|
+
* 创建知识空间
|
|
31
|
+
* @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space/create
|
|
32
|
+
*/
|
|
33
|
+
create(body: CreateRequest): Promise<CreateResponse>;
|
|
34
|
+
/**
|
|
35
|
+
* 获取知识空间节点信息
|
|
36
|
+
* @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space/get_node
|
|
37
|
+
*/
|
|
38
|
+
getNode(query?: GetNodeQuery): Promise<GetNodeResponse>;
|
|
39
|
+
}
|
|
40
|
+
interface ListQuery extends Pagination {
|
|
41
|
+
/** 当查询个人文档库时,指定返回的文档库名称展示语言。可选值有:zh, id, de, en, es, fr, it, pt, vi, ru, hi, th, ko, ja, zh-HK, zh-TW。 */
|
|
42
|
+
lang?: 'zh' | 'id' | 'de' | 'en' | 'es' | 'fr' | 'it' | 'pt' | 'vi' | 'ru' | 'hi' | 'th' | 'ko' | 'ja' | 'zh-HK' | 'zh-TW';
|
|
43
|
+
}
|
|
44
|
+
interface GetQuery {
|
|
45
|
+
/** 当查询个人文档库时,指定返回的文档库名称展示语言。可选值有:zh, id, de, en, es, fr, it, pt, vi, ru, hi, th, ko, ja, zh-HK, zh-TW。 */
|
|
46
|
+
lang?: 'zh' | 'id' | 'de' | 'en' | 'es' | 'fr' | 'it' | 'pt' | 'vi' | 'ru' | 'hi' | 'th' | 'ko' | 'ja' | 'zh-HK' | 'zh-TW';
|
|
47
|
+
}
|
|
48
|
+
interface GetResponse {
|
|
49
|
+
/** 知识空间 */
|
|
50
|
+
space?: Lark.Space;
|
|
51
|
+
}
|
|
52
|
+
interface CreateRequest {
|
|
53
|
+
/** 知识空间名称 */
|
|
54
|
+
name?: string;
|
|
55
|
+
/** 知识空间描述 */
|
|
56
|
+
description?: string;
|
|
57
|
+
/** 表示知识空间的分享状态 */
|
|
58
|
+
open_sharing?: 'open' | 'closed';
|
|
59
|
+
}
|
|
60
|
+
interface CreateResponse {
|
|
61
|
+
/** 知识空间信息 */
|
|
62
|
+
space?: Lark.Space;
|
|
63
|
+
}
|
|
64
|
+
interface GetNodeQuery {
|
|
65
|
+
/** 文档的wiki token */
|
|
66
|
+
token: string;
|
|
67
|
+
/** 文档类型 */
|
|
68
|
+
obj_type?: 'doc' | 'docx' | 'sheet' | 'mindnote' | 'bitable' | 'file' | 'slides' | 'wiki';
|
|
69
|
+
}
|
|
70
|
+
interface GetNodeResponse {
|
|
71
|
+
/** 节点信息 */
|
|
72
|
+
node?: Lark.Node;
|
|
73
|
+
}
|
|
74
|
+
namespace Member {
|
|
75
|
+
interface Methods {
|
|
76
|
+
/**
|
|
77
|
+
* 获取知识空间成员列表
|
|
78
|
+
* @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-member/list
|
|
79
|
+
*/
|
|
80
|
+
list(space_id: string, query?: Pagination): Paginated<Lark.Member, 'members'>;
|
|
81
|
+
/**
|
|
82
|
+
* 添加知识空间成员
|
|
83
|
+
* @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-member/create
|
|
84
|
+
*/
|
|
85
|
+
create(space_id: string, body: CreateRequest, query?: CreateQuery): Promise<CreateResponse>;
|
|
86
|
+
/**
|
|
87
|
+
* 删除知识空间成员
|
|
88
|
+
* @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-member/delete
|
|
89
|
+
*/
|
|
90
|
+
delete(space_id: string, member_id: string, body: DeleteRequest): Promise<DeleteResponse>;
|
|
91
|
+
}
|
|
92
|
+
interface CreateRequest {
|
|
93
|
+
/** 知识库协作者 ID 类型 */
|
|
94
|
+
member_type: string;
|
|
95
|
+
/** 知识库协作者 ID */
|
|
96
|
+
member_id: string;
|
|
97
|
+
/** 知识库协作者角色 */
|
|
98
|
+
member_role: string;
|
|
99
|
+
}
|
|
100
|
+
interface CreateQuery {
|
|
101
|
+
/** 添加权限后是否通知对方 */
|
|
102
|
+
need_notification?: boolean;
|
|
103
|
+
}
|
|
104
|
+
interface CreateResponse {
|
|
105
|
+
/** 知识库协作者 */
|
|
106
|
+
member?: Lark.Member;
|
|
107
|
+
}
|
|
108
|
+
interface DeleteRequest {
|
|
109
|
+
/** 知识库协作者 ID 类型 */
|
|
110
|
+
member_type: string;
|
|
111
|
+
/** 知识库协作者角色 */
|
|
112
|
+
member_role: string;
|
|
113
|
+
/** 知识库协作者类型 */
|
|
114
|
+
type?: 'user' | 'chat' | 'department';
|
|
115
|
+
}
|
|
116
|
+
interface DeleteResponse {
|
|
117
|
+
/** 成员信息 */
|
|
118
|
+
member: Lark.Member;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
namespace Setting {
|
|
122
|
+
interface Methods {
|
|
123
|
+
/**
|
|
124
|
+
* 更新知识空间设置
|
|
125
|
+
* @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-setting/update
|
|
126
|
+
*/
|
|
127
|
+
update(space_id: string, body: UpdateRequest): Promise<UpdateResponse>;
|
|
128
|
+
}
|
|
129
|
+
interface UpdateRequest {
|
|
130
|
+
/** 谁可以创建空间的一级页面: "admin_and_member" = 管理员和成员 "admin" - 仅管理员 */
|
|
131
|
+
create_setting?: string;
|
|
132
|
+
/** 可阅读用户可否创建副本/打印/导出/复制: "allow" - 允许 "not_allow" - 不允许 */
|
|
133
|
+
security_setting?: string;
|
|
134
|
+
/** 可阅读用户可否评论: "allow" - 允许 "not_allow" - 不允许 */
|
|
135
|
+
comment_setting?: string;
|
|
136
|
+
}
|
|
137
|
+
interface UpdateResponse {
|
|
138
|
+
/** 空间设置 */
|
|
139
|
+
setting?: Lark.Setting;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
namespace Node {
|
|
143
|
+
interface Methods {
|
|
144
|
+
/**
|
|
145
|
+
* 创建知识空间节点
|
|
146
|
+
* @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-node/create
|
|
147
|
+
*/
|
|
148
|
+
create(space_id: string, body: CreateRequest): Promise<CreateResponse>;
|
|
149
|
+
/**
|
|
150
|
+
* 获取知识空间子节点列表
|
|
151
|
+
* @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-node/list
|
|
152
|
+
*/
|
|
153
|
+
list(space_id: string, query?: ListQuery): Paginated<Lark.Node>;
|
|
154
|
+
/**
|
|
155
|
+
* 移动知识空间节点
|
|
156
|
+
* @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-node/move
|
|
157
|
+
*/
|
|
158
|
+
move(space_id: string, node_token: string, body: MoveRequest): Promise<MoveResponse>;
|
|
159
|
+
/**
|
|
160
|
+
* 更新知识空间节点标题
|
|
161
|
+
* @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-node/update_title
|
|
162
|
+
*/
|
|
163
|
+
updateTitle(space_id: string, node_token: string, body: UpdateTitleRequest): Promise<void>;
|
|
164
|
+
/**
|
|
165
|
+
* 创建知识空间节点副本
|
|
166
|
+
* @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-node/copy
|
|
167
|
+
*/
|
|
168
|
+
copy(space_id: string, node_token: string, body: CopyRequest): Promise<CopyResponse>;
|
|
169
|
+
/**
|
|
170
|
+
* 移动云空间文档至知识空间
|
|
171
|
+
* @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-node/move_docs_to_wiki
|
|
172
|
+
*/
|
|
173
|
+
moveDocsToWiki(space_id: string, body: MoveDocsToWikiRequest): Promise<MoveDocsToWikiResponse>;
|
|
174
|
+
}
|
|
175
|
+
interface CreateRequest {
|
|
176
|
+
/** 文档类型,对于快捷方式,该字段是对应的实体的obj_type。 */
|
|
177
|
+
obj_type: 'doc' | 'sheet' | 'mindnote' | 'bitable' | 'file' | 'docx' | 'slides';
|
|
178
|
+
/** 父节点 token。若当前节点为一级节点,父节点 token 为空。 */
|
|
179
|
+
parent_node_token?: string;
|
|
180
|
+
/** 节点类型 */
|
|
181
|
+
node_type: 'origin' | 'shortcut';
|
|
182
|
+
/** 快捷方式对应的实体node_token,当节点为快捷方式时,该值不为空。 */
|
|
183
|
+
origin_node_token?: string;
|
|
184
|
+
/** 文档标题 */
|
|
185
|
+
title?: string;
|
|
186
|
+
}
|
|
187
|
+
interface CreateResponse {
|
|
188
|
+
/** 节点 */
|
|
189
|
+
node?: Lark.Node;
|
|
190
|
+
}
|
|
191
|
+
interface ListQuery extends Pagination {
|
|
192
|
+
/** 父节点token */
|
|
193
|
+
parent_node_token?: string;
|
|
194
|
+
}
|
|
195
|
+
interface MoveRequest {
|
|
196
|
+
/** 移动到的父节点token */
|
|
197
|
+
target_parent_token?: string;
|
|
198
|
+
/** 移动到的知识空间ID */
|
|
199
|
+
target_space_id?: string;
|
|
200
|
+
}
|
|
201
|
+
interface MoveResponse {
|
|
202
|
+
/** 移动后的节点信息 */
|
|
203
|
+
node?: Lark.Node;
|
|
204
|
+
}
|
|
205
|
+
interface UpdateTitleRequest {
|
|
206
|
+
/** 节点新标题 */
|
|
207
|
+
title: string;
|
|
208
|
+
}
|
|
209
|
+
interface CopyRequest {
|
|
210
|
+
/** 目标父节点token */
|
|
211
|
+
target_parent_token?: string;
|
|
212
|
+
/** 目标知识空间id */
|
|
213
|
+
target_space_id?: string;
|
|
214
|
+
/** 复制后的新标题。如果填空,则新标题为空。如果不填,则使用原节点标题。 */
|
|
215
|
+
title?: string;
|
|
216
|
+
}
|
|
217
|
+
interface CopyResponse {
|
|
218
|
+
/** copy后的节点 */
|
|
219
|
+
node: Lark.Node;
|
|
220
|
+
}
|
|
221
|
+
interface MoveDocsToWikiRequest {
|
|
222
|
+
/** 节点的父亲token */
|
|
223
|
+
parent_wiki_token?: string;
|
|
224
|
+
/** 文档类型 */
|
|
225
|
+
obj_type: 'doc' | 'sheet' | 'bitable' | 'mindnote' | 'docx' | 'file' | 'slides';
|
|
226
|
+
/** 文档token */
|
|
227
|
+
obj_token: string;
|
|
228
|
+
/** 没有权限时,是否申请迁入文档 */
|
|
229
|
+
apply?: boolean;
|
|
230
|
+
}
|
|
231
|
+
interface MoveDocsToWikiResponse {
|
|
232
|
+
/** 移动后的知识库token */
|
|
233
|
+
wiki_token?: string;
|
|
234
|
+
/** 任务id */
|
|
235
|
+
task_id?: string;
|
|
236
|
+
/** 是否提交了文档迁入申请 */
|
|
237
|
+
applied?: boolean;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
namespace Task {
|
|
242
|
+
interface Methods {
|
|
243
|
+
/**
|
|
244
|
+
* 获取任务结果
|
|
245
|
+
* @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/task/get
|
|
246
|
+
*/
|
|
247
|
+
get(task_id: string, query?: GetQuery): Promise<GetResponse>;
|
|
248
|
+
}
|
|
249
|
+
interface GetQuery {
|
|
250
|
+
/** 任务类型 */
|
|
251
|
+
task_type: 'move';
|
|
252
|
+
}
|
|
253
|
+
interface GetResponse {
|
|
254
|
+
/** 任务结果 */
|
|
255
|
+
task: Lark.TaskResult;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
namespace Node {
|
|
259
|
+
interface Methods {
|
|
260
|
+
/**
|
|
261
|
+
* 搜索 Wiki
|
|
262
|
+
* @see https://open.feishu.cn/document/ukTMukTMukTM/uEzN0YjLxcDN24SM3QjN/search_wiki
|
|
263
|
+
*/
|
|
264
|
+
search(body: SearchRequest, query?: Pagination): Paginated<Lark.Node>;
|
|
265
|
+
}
|
|
266
|
+
interface SearchRequest {
|
|
267
|
+
/** 搜索关键词 */
|
|
268
|
+
query: string;
|
|
269
|
+
/** 文档所属的知识空间ID,为空搜索所有 wiki */
|
|
270
|
+
space_id?: string;
|
|
271
|
+
/** wiki token,不为空搜索该节点及其所有子节点,为空搜索所有 wiki(根据 space_id 选择 space) */
|
|
272
|
+
node_id?: string;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
240
275
|
}
|
package/lib/types/workplace.d.ts
CHANGED
|
@@ -1,43 +1,63 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Pagination } from '../internal';
|
|
1
|
+
import * as Lark from '.';
|
|
2
|
+
import { Paginated, Pagination } from '../internal';
|
|
3
3
|
declare module '../internal' {
|
|
4
4
|
interface Internal {
|
|
5
|
-
|
|
6
|
-
* 获取工作台访问数据
|
|
7
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/workplace-v1/workplace_access_data/search
|
|
8
|
-
*/
|
|
9
|
-
searchWorkplaceWorkplaceAccessData(query?: SearchWorkplaceWorkplaceAccessDataQuery): Paginated<WorkplaceAccessData>;
|
|
10
|
-
/**
|
|
11
|
-
* 获取定制工作台访问数据
|
|
12
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/workplace-v1/custom_workplace_access_data/search
|
|
13
|
-
*/
|
|
14
|
-
searchWorkplaceCustomWorkplaceAccessData(query?: SearchWorkplaceCustomWorkplaceAccessDataQuery): Paginated<CustomWorkplaceAccessData>;
|
|
15
|
-
/**
|
|
16
|
-
* 获取定制工作台小组件访问数据
|
|
17
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/workplace-v1/workplace_block_access_data/search
|
|
18
|
-
*/
|
|
19
|
-
searchWorkplaceWorkplaceBlockAccessData(query?: SearchWorkplaceWorkplaceBlockAccessDataQuery): Paginated<BlockAccessData>;
|
|
5
|
+
workplace: Workplace.Methods;
|
|
20
6
|
}
|
|
21
7
|
}
|
|
22
|
-
export
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
8
|
+
export declare namespace Workplace {
|
|
9
|
+
interface Methods {
|
|
10
|
+
workplaceAccessData: WorkplaceAccessData.Methods;
|
|
11
|
+
customWorkplaceAccessData: CustomWorkplaceAccessData.Methods;
|
|
12
|
+
workplaceBlockAccessData: WorkplaceBlockAccessData.Methods;
|
|
13
|
+
}
|
|
14
|
+
namespace WorkplaceAccessData {
|
|
15
|
+
interface Methods {
|
|
16
|
+
/**
|
|
17
|
+
* 获取工作台访问数据
|
|
18
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/workplace-v1/workplace_access_data/search
|
|
19
|
+
*/
|
|
20
|
+
search(query?: SearchQuery): Paginated<Lark.WorkplaceAccessData>;
|
|
21
|
+
}
|
|
22
|
+
interface SearchQuery extends Pagination {
|
|
23
|
+
/** 数据检索开始时间,精确到日。格式yyyy-MM-dd */
|
|
24
|
+
from_date: string;
|
|
25
|
+
/** 数据检索结束时间,精确到日。格式yyyy-MM-dd。 */
|
|
26
|
+
to_date: string;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
namespace CustomWorkplaceAccessData {
|
|
30
|
+
interface Methods {
|
|
31
|
+
/**
|
|
32
|
+
* 获取定制工作台访问数据
|
|
33
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/workplace-v1/custom_workplace_access_data/search
|
|
34
|
+
*/
|
|
35
|
+
search(query?: SearchQuery): Paginated<Lark.CustomWorkplaceAccessData>;
|
|
36
|
+
}
|
|
37
|
+
interface SearchQuery extends Pagination {
|
|
38
|
+
/** 数据检索开始时间,精确到日。格式yyyy-MM-dd */
|
|
39
|
+
from_date: string;
|
|
40
|
+
/** 数据检索结束时间,精确到日。格式yyyy-MM-dd。 */
|
|
41
|
+
to_date: string;
|
|
42
|
+
/** 定制化工作台id.非必填,不填的时候,返回所有定制化工作台数据。 */
|
|
43
|
+
custom_workplace_id?: string;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
namespace WorkplaceBlockAccessData {
|
|
47
|
+
interface Methods {
|
|
48
|
+
/**
|
|
49
|
+
* 获取定制工作台小组件访问数据
|
|
50
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/workplace-v1/workplace_block_access_data/search
|
|
51
|
+
*/
|
|
52
|
+
search(query?: SearchQuery): Paginated<Lark.BlockAccessData>;
|
|
53
|
+
}
|
|
54
|
+
interface SearchQuery extends Pagination {
|
|
55
|
+
/** 数据检索开始时间,精确到日。格式yyyy-MM-dd。 */
|
|
56
|
+
from_date: string;
|
|
57
|
+
/** 数据检索结束时间,精确到日。格式yyyy-MM-dd。 */
|
|
58
|
+
to_date: string;
|
|
59
|
+
/** 小组件id */
|
|
60
|
+
block_id?: string;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
43
63
|
}
|