@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
|
@@ -0,0 +1,447 @@
|
|
|
1
|
+
import * as Lark from '.';
|
|
2
|
+
import { Paginated, Pagination } from '../internal';
|
|
3
|
+
declare module '../internal' {
|
|
4
|
+
interface Internal {
|
|
5
|
+
directory: Directory.Methods;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export declare namespace Directory {
|
|
9
|
+
interface Methods {
|
|
10
|
+
employee: Employee.Methods;
|
|
11
|
+
department: Department.Methods;
|
|
12
|
+
collborationShareEntity: CollborationShareEntity.Methods;
|
|
13
|
+
collaborationTenant: CollaborationTenant.Methods;
|
|
14
|
+
collaborationRule: CollaborationRule.Methods;
|
|
15
|
+
}
|
|
16
|
+
namespace Employee {
|
|
17
|
+
interface Methods {
|
|
18
|
+
/**
|
|
19
|
+
* 创建员工
|
|
20
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/employee/create
|
|
21
|
+
*/
|
|
22
|
+
create(body: CreateRequest, query?: CreateQuery): Promise<CreateResponse>;
|
|
23
|
+
/**
|
|
24
|
+
* 更新员工
|
|
25
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/employee/patch
|
|
26
|
+
*/
|
|
27
|
+
patch(employee_id: string, body: PatchRequest, query?: PatchQuery): Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* 离职员工
|
|
30
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/employee/delete
|
|
31
|
+
*/
|
|
32
|
+
delete(employee_id: string, body: DeleteRequest, query?: DeleteQuery): Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* 恢复离职员工
|
|
35
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/employee/resurrect
|
|
36
|
+
*/
|
|
37
|
+
resurrect(employee_id: string, body: ResurrectRequest, query?: ResurrectQuery): Promise<void>;
|
|
38
|
+
/**
|
|
39
|
+
* 更新在职员工为待离职
|
|
40
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/employee/to_be_resigned
|
|
41
|
+
*/
|
|
42
|
+
toBeResigned(employee_id: string, body: ToBeResignedRequest, query?: ToBeResignedQuery): Promise<void>;
|
|
43
|
+
/**
|
|
44
|
+
* 更新待离职成员为在职
|
|
45
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/employee/regular
|
|
46
|
+
*/
|
|
47
|
+
regular(employee_id: string, query?: RegularQuery): Promise<void>;
|
|
48
|
+
/**
|
|
49
|
+
* 批量获取员工信息
|
|
50
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/employee/mget
|
|
51
|
+
*/
|
|
52
|
+
mget(body: MgetRequest, query?: MgetQuery): Promise<MgetResponse>;
|
|
53
|
+
/**
|
|
54
|
+
* 批量获取员工列表
|
|
55
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/employee/filter
|
|
56
|
+
*/
|
|
57
|
+
filter(body: FilterRequest, query?: FilterQuery): Promise<FilterResponse>;
|
|
58
|
+
/**
|
|
59
|
+
* 搜索员工
|
|
60
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/employee/search
|
|
61
|
+
*/
|
|
62
|
+
search(body: SearchRequest, query?: SearchQuery): Promise<SearchResponse>;
|
|
63
|
+
/**
|
|
64
|
+
* 转换员工 ID
|
|
65
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/employee/idconvert
|
|
66
|
+
*/
|
|
67
|
+
idconvert(body: IdconvertRequest, query?: IdconvertQuery): Promise<IdconvertResponse>;
|
|
68
|
+
}
|
|
69
|
+
interface CreateRequest {
|
|
70
|
+
/** 创建员工对象 */
|
|
71
|
+
employee: Lark.CreateEmployee;
|
|
72
|
+
/** 接口拓展选项 */
|
|
73
|
+
options?: Lark.CreateEmployeeOptions;
|
|
74
|
+
}
|
|
75
|
+
interface CreateQuery {
|
|
76
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
77
|
+
employee_id_type?: 'open_id' | 'employee_id' | 'union_id';
|
|
78
|
+
/** 此次调用中使用的部门ID的类型 */
|
|
79
|
+
department_id_type?: 'department_id' | 'open_department_id';
|
|
80
|
+
}
|
|
81
|
+
interface CreateResponse {
|
|
82
|
+
/** 员工ID */
|
|
83
|
+
employee_id?: string;
|
|
84
|
+
}
|
|
85
|
+
interface PatchRequest {
|
|
86
|
+
/** 更新员工对象 */
|
|
87
|
+
employee: Lark.UpdateEmployee;
|
|
88
|
+
}
|
|
89
|
+
interface PatchQuery {
|
|
90
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
91
|
+
employee_id_type?: 'open_id' | 'union_id' | 'employee_id';
|
|
92
|
+
/** 部门ID类型 */
|
|
93
|
+
department_id_type?: 'department_id' | 'open_department_id';
|
|
94
|
+
}
|
|
95
|
+
interface DeleteRequest {
|
|
96
|
+
/** 接口拓展选项 */
|
|
97
|
+
options?: Lark.DeleteEmployeeOptions;
|
|
98
|
+
}
|
|
99
|
+
interface DeleteQuery {
|
|
100
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
101
|
+
employee_id_type?: 'open_id' | 'employee_id' | 'union_id';
|
|
102
|
+
}
|
|
103
|
+
interface ResurrectRequest {
|
|
104
|
+
/** 部门信息 */
|
|
105
|
+
employee_order_in_departments?: Lark.UpsertUserDepartmentSortInfo[];
|
|
106
|
+
/** 选项 */
|
|
107
|
+
options?: Lark.ResurrectEmployeeOptions;
|
|
108
|
+
}
|
|
109
|
+
interface ResurrectQuery {
|
|
110
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
111
|
+
employee_id_type?: 'open_id' | 'employee_id' | 'union_id';
|
|
112
|
+
/** 部门ID类型 */
|
|
113
|
+
department_id_type?: 'department_id' | 'open_department_id';
|
|
114
|
+
}
|
|
115
|
+
interface ToBeResignedRequest {
|
|
116
|
+
/** 在职员工流转到待离职 */
|
|
117
|
+
employee: Lark.SetEmployeePreResigned;
|
|
118
|
+
}
|
|
119
|
+
interface ToBeResignedQuery {
|
|
120
|
+
/** 员工ID类型 */
|
|
121
|
+
employee_id_type?: 'open_id' | 'union_id' | 'employee_id';
|
|
122
|
+
/** 部门ID类型 */
|
|
123
|
+
department_id_type?: 'department_id' | 'open_department_id';
|
|
124
|
+
}
|
|
125
|
+
interface RegularQuery {
|
|
126
|
+
/** 员工ID类型 */
|
|
127
|
+
employee_id_type?: 'open_id' | 'union_id' | 'employee_id';
|
|
128
|
+
/** 部门ID类型 */
|
|
129
|
+
department_id_type?: 'department_id' | 'open_department_id';
|
|
130
|
+
}
|
|
131
|
+
interface MgetRequest {
|
|
132
|
+
/** 员工id */
|
|
133
|
+
employee_ids: string[];
|
|
134
|
+
/** 字段枚举 */
|
|
135
|
+
required_fields: string[];
|
|
136
|
+
}
|
|
137
|
+
interface MgetQuery {
|
|
138
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
139
|
+
employee_id_type?: 'open_id' | 'employee_id' | 'union_id';
|
|
140
|
+
/** 此次调用中使用的部门ID的类型 */
|
|
141
|
+
department_id_type?: 'department_id' | 'open_department_id';
|
|
142
|
+
}
|
|
143
|
+
interface MgetResponse {
|
|
144
|
+
/** 员工信息 */
|
|
145
|
+
employees?: Lark.EmployeeEntity[];
|
|
146
|
+
/** 字段异常信息 */
|
|
147
|
+
abnormals?: Lark.AbnormalRecord[];
|
|
148
|
+
}
|
|
149
|
+
interface FilterRequest {
|
|
150
|
+
/** 查询条件 */
|
|
151
|
+
filter: Lark.MultiFilterCondition;
|
|
152
|
+
/** 需要查询的字段列表。将按照传递的字段列表返回有权限的行、列数据。不传则不会返回任何字段 */
|
|
153
|
+
required_fields: string[];
|
|
154
|
+
/** 分页参数 */
|
|
155
|
+
page_request: Lark.PageCondition;
|
|
156
|
+
}
|
|
157
|
+
interface FilterQuery {
|
|
158
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
159
|
+
employee_id_type?: 'open_id' | 'union_id' | 'employee_id';
|
|
160
|
+
/** 此次调用中使用的部门ID的类型 */
|
|
161
|
+
department_id_type?: 'department_id' | 'open_department_id';
|
|
162
|
+
}
|
|
163
|
+
interface FilterResponse {
|
|
164
|
+
/** 员工信息 */
|
|
165
|
+
employees?: Lark.EmployeeEntity[];
|
|
166
|
+
/** 分页结果 */
|
|
167
|
+
page_response?: Lark.PageResponse;
|
|
168
|
+
/** 异常信息 */
|
|
169
|
+
abnormals?: Lark.AbnormalRecord[];
|
|
170
|
+
}
|
|
171
|
+
interface SearchRequest {
|
|
172
|
+
/** 搜索关键词。支持员工ID、员工名称、员工手机号、员工邮箱的搜索。其中员工ID、员工手机号支持精确搜索,员工名称、员工邮箱支持模糊搜索,员工名称支持国际化名称的搜索。 */
|
|
173
|
+
query: string;
|
|
174
|
+
/** 分页信息 */
|
|
175
|
+
page_request: Lark.PageCondition;
|
|
176
|
+
/** 需要查询的字段列表。将按照传递的字段列表返回有权限的行、列数据。不传则不会返回任何字段 */
|
|
177
|
+
required_fields: string[];
|
|
178
|
+
}
|
|
179
|
+
interface SearchQuery {
|
|
180
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
181
|
+
employee_id_type?: 'open_id' | 'union_id' | 'employee_id';
|
|
182
|
+
/** 此次调用中使用的部门ID的类型 */
|
|
183
|
+
department_id_type?: 'open_department_id' | 'department_id';
|
|
184
|
+
}
|
|
185
|
+
interface SearchResponse {
|
|
186
|
+
/** 员工信息 */
|
|
187
|
+
employees?: Lark.EmployeeEntity[];
|
|
188
|
+
/** 分页结果 */
|
|
189
|
+
page_response?: Lark.PageResponse;
|
|
190
|
+
/** 字段异常信息 */
|
|
191
|
+
abnormals?: Lark.AbnormalRecord[];
|
|
192
|
+
}
|
|
193
|
+
interface IdconvertRequest {
|
|
194
|
+
/** 用户ID列表 */
|
|
195
|
+
employee_ids: string[];
|
|
196
|
+
}
|
|
197
|
+
interface IdconvertQuery {
|
|
198
|
+
/** 员工ID类型 */
|
|
199
|
+
employee_id_type?: 'open_id' | 'union_id' | 'employee_id';
|
|
200
|
+
}
|
|
201
|
+
interface IdconvertResponse {
|
|
202
|
+
/** id转换结果列表 */
|
|
203
|
+
id_convert_results?: Lark.EmployeeIdConvertResult[];
|
|
204
|
+
/** 异常信息列表 */
|
|
205
|
+
abnormals?: Lark.AbnormalRecord[];
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
namespace Department {
|
|
209
|
+
interface Methods {
|
|
210
|
+
/**
|
|
211
|
+
* 创建部门
|
|
212
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/department/create
|
|
213
|
+
*/
|
|
214
|
+
create(body: CreateRequest, query?: CreateQuery): Promise<CreateResponse>;
|
|
215
|
+
/**
|
|
216
|
+
* 更新部门
|
|
217
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/department/patch
|
|
218
|
+
*/
|
|
219
|
+
patch(department_id: string, body: PatchRequest, query?: PatchQuery): Promise<void>;
|
|
220
|
+
/**
|
|
221
|
+
* 删除部门
|
|
222
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/department/delete
|
|
223
|
+
*/
|
|
224
|
+
delete(department_id: string, query?: DeleteQuery): Promise<void>;
|
|
225
|
+
/**
|
|
226
|
+
* 批量获取部门信息
|
|
227
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/department/mget
|
|
228
|
+
*/
|
|
229
|
+
mget(body: MgetRequest, query?: MgetQuery): Promise<MgetResponse>;
|
|
230
|
+
/**
|
|
231
|
+
* 批量获取部门列表
|
|
232
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/department/filter
|
|
233
|
+
*/
|
|
234
|
+
filter(body: FilterRequest, query?: FilterQuery): Promise<FilterResponse>;
|
|
235
|
+
/**
|
|
236
|
+
* 搜索部门
|
|
237
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/department/search
|
|
238
|
+
*/
|
|
239
|
+
search(body: SearchRequest, query?: SearchQuery): Promise<SearchResponse>;
|
|
240
|
+
/**
|
|
241
|
+
* 转换部门 ID
|
|
242
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/department/idconvert
|
|
243
|
+
*/
|
|
244
|
+
idconvert(body: IdconvertRequest, query?: IdconvertQuery): Promise<IdconvertResponse>;
|
|
245
|
+
}
|
|
246
|
+
interface CreateRequest {
|
|
247
|
+
/** 创建部门 */
|
|
248
|
+
department: Lark.CreateDepartment;
|
|
249
|
+
}
|
|
250
|
+
interface CreateQuery {
|
|
251
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
252
|
+
employee_id_type?: 'open_id' | 'union_id' | 'employee_id';
|
|
253
|
+
/** 此次调用中使用的部门ID的类型 */
|
|
254
|
+
department_id_type?: 'department_id' | 'open_department_id';
|
|
255
|
+
}
|
|
256
|
+
interface CreateResponse {
|
|
257
|
+
/** 部门ID */
|
|
258
|
+
department_id?: string;
|
|
259
|
+
}
|
|
260
|
+
interface PatchRequest {
|
|
261
|
+
/** 更新部门 */
|
|
262
|
+
department: Lark.UpdateDepartment;
|
|
263
|
+
}
|
|
264
|
+
interface PatchQuery {
|
|
265
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
266
|
+
employee_id_type?: 'open_id' | 'union_id' | 'employee_id';
|
|
267
|
+
/** 此次调用中使用的部门ID的类型 */
|
|
268
|
+
department_id_type?: 'open_department_id' | 'department_id';
|
|
269
|
+
}
|
|
270
|
+
interface DeleteQuery {
|
|
271
|
+
/** 此次调用中使用的部门ID的类型 */
|
|
272
|
+
department_id_type?: 'department_id' | 'open_department_id';
|
|
273
|
+
}
|
|
274
|
+
interface MgetRequest {
|
|
275
|
+
/** 部门id */
|
|
276
|
+
department_ids: string[];
|
|
277
|
+
/** 字段枚举 */
|
|
278
|
+
required_fields: string[];
|
|
279
|
+
}
|
|
280
|
+
interface MgetQuery {
|
|
281
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
282
|
+
employee_id_type?: 'open_id' | 'employee_id' | 'union_id';
|
|
283
|
+
/** 此次调用中使用的部门ID的类型 */
|
|
284
|
+
department_id_type?: 'department_id' | 'open_department_id';
|
|
285
|
+
}
|
|
286
|
+
interface MgetResponse {
|
|
287
|
+
/** 部门信息 */
|
|
288
|
+
departments?: Lark.Department[];
|
|
289
|
+
/** 字段异常信息 */
|
|
290
|
+
abnormals?: Lark.AbnormalRecord[];
|
|
291
|
+
}
|
|
292
|
+
interface FilterRequest {
|
|
293
|
+
/** 查询条件 */
|
|
294
|
+
filter: Lark.MultiFilterCondition;
|
|
295
|
+
/** 需要查询的字段列表。将按照传递的字段列表返回有权限的行、列数据。不传则不会返回任何字段 */
|
|
296
|
+
required_fields: string[];
|
|
297
|
+
/** 分页信息 */
|
|
298
|
+
page_request: Lark.PageCondition;
|
|
299
|
+
}
|
|
300
|
+
interface FilterQuery {
|
|
301
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
302
|
+
employee_id_type?: 'open_id' | 'employee_id' | 'union_id';
|
|
303
|
+
/** 此次调用中使用的部门ID的类型 */
|
|
304
|
+
department_id_type?: 'open_department_id' | 'department_id';
|
|
305
|
+
}
|
|
306
|
+
interface FilterResponse {
|
|
307
|
+
/** 部门信息 */
|
|
308
|
+
departments?: Lark.Department[];
|
|
309
|
+
/** 分页结果 */
|
|
310
|
+
page_response?: Lark.PageResponse;
|
|
311
|
+
/** 异常信息 */
|
|
312
|
+
abnormals?: Lark.AbnormalRecord[];
|
|
313
|
+
}
|
|
314
|
+
interface SearchRequest {
|
|
315
|
+
/** 搜索关键词。支持部门名称的搜索 */
|
|
316
|
+
query: string;
|
|
317
|
+
/** 分页信息 */
|
|
318
|
+
page_request: Lark.PageCondition;
|
|
319
|
+
/** 需要查询的字段列表。将按照传递的字段列表返回有权限的行、列数据。不传则不会返回任何字段 */
|
|
320
|
+
required_fields: string[];
|
|
321
|
+
}
|
|
322
|
+
interface SearchQuery {
|
|
323
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
324
|
+
employee_id_type?: 'open_id' | 'employee_id' | 'union_id';
|
|
325
|
+
/** 此次调用中使用的部门ID的类型 */
|
|
326
|
+
department_id_type?: 'open_department_id' | 'department_id';
|
|
327
|
+
}
|
|
328
|
+
interface SearchResponse {
|
|
329
|
+
/** 部门信息 */
|
|
330
|
+
departments?: Lark.Department[];
|
|
331
|
+
/** 分页结果 */
|
|
332
|
+
page_response?: Lark.PageResponse;
|
|
333
|
+
/** 字段异常信息 */
|
|
334
|
+
abnormals?: Lark.AbnormalRecord[];
|
|
335
|
+
}
|
|
336
|
+
interface IdconvertRequest {
|
|
337
|
+
/** 部门ID列表 */
|
|
338
|
+
department_ids: string[];
|
|
339
|
+
}
|
|
340
|
+
interface IdconvertQuery {
|
|
341
|
+
/** 部门ID类型 */
|
|
342
|
+
department_id_type?: 'department_id' | 'open_department_id';
|
|
343
|
+
}
|
|
344
|
+
interface IdconvertResponse {
|
|
345
|
+
/** id转换结果列表 */
|
|
346
|
+
id_convert_results?: Lark.DepartmentIdConvertResult[];
|
|
347
|
+
/** 异常信息列表 */
|
|
348
|
+
abnormals?: Lark.AbnormalRecord[];
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
namespace CollborationShareEntity {
|
|
352
|
+
interface Methods {
|
|
353
|
+
/**
|
|
354
|
+
* 获取关联组织双方共享成员范围
|
|
355
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/collboration_share_entity/list
|
|
356
|
+
*/
|
|
357
|
+
list(query?: ListQuery): Promise<ListResponse>;
|
|
358
|
+
}
|
|
359
|
+
interface ListQuery extends Pagination {
|
|
360
|
+
/** 对方租户的tenant key */
|
|
361
|
+
target_tenant_key: string;
|
|
362
|
+
/** 不填写该参数为租户的分享范围,可填写该字段继续下钻查看指定部门下的子部门+成员。填写0分为两种情况,若租户分享的为全员则展示一级部门,否则展示分享的部门+成员。 */
|
|
363
|
+
target_department_id?: string;
|
|
364
|
+
/** 获取用户组下的成员,填写该值后忽略target_department_id */
|
|
365
|
+
target_group_id?: string;
|
|
366
|
+
/** 是否主体租户分享范围,默认是客体租户的分享范围 */
|
|
367
|
+
is_select_subject?: boolean;
|
|
368
|
+
}
|
|
369
|
+
interface ListResponse {
|
|
370
|
+
/** 分页标记,第一次请求不填,表示从头开始遍历;分页查询结果还有更多项时会同时返回新的 page_token,下次遍历可采用该 page_token 获取查询结果 */
|
|
371
|
+
page_token?: string;
|
|
372
|
+
/** 是否还有更多项 */
|
|
373
|
+
has_more?: boolean;
|
|
374
|
+
/** 分享的部门信息 */
|
|
375
|
+
share_departments?: Lark.ShareDepartment[];
|
|
376
|
+
/** 分享的用户组信息 */
|
|
377
|
+
share_groups?: Lark.ShareGroup[];
|
|
378
|
+
/** 分享的用户信息 */
|
|
379
|
+
share_users?: Lark.ShareUser[];
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
namespace CollaborationTenant {
|
|
383
|
+
interface Methods {
|
|
384
|
+
/**
|
|
385
|
+
* 管理员获取所有关联组织列表
|
|
386
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/collaboration_tenant/list
|
|
387
|
+
*/
|
|
388
|
+
list(query?: Pagination): Paginated<Lark.CollaborationTenant>;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
namespace CollaborationRule {
|
|
392
|
+
interface Methods {
|
|
393
|
+
/**
|
|
394
|
+
* 新增可搜可见规则
|
|
395
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/collaboration_rule/create
|
|
396
|
+
*/
|
|
397
|
+
create(body: CreateRequest, query?: CreateQuery): Promise<CreateResponse>;
|
|
398
|
+
/**
|
|
399
|
+
* 更新可搜可见规则
|
|
400
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/collaboration_rule/update
|
|
401
|
+
*/
|
|
402
|
+
update(collaboration_rule_id: string, body: UpdateRequest, query?: UpdateQuery): Promise<void>;
|
|
403
|
+
/**
|
|
404
|
+
* 查询可搜可见规则
|
|
405
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/collaboration_rule/list
|
|
406
|
+
*/
|
|
407
|
+
list(query?: ListQuery): Paginated<Lark.CollaborationRule>;
|
|
408
|
+
/**
|
|
409
|
+
* 删除可搜可见规则
|
|
410
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/collaboration_rule/delete
|
|
411
|
+
*/
|
|
412
|
+
delete(collaboration_rule_id: string, query?: DeleteQuery): Promise<void>;
|
|
413
|
+
}
|
|
414
|
+
interface CreateRequest {
|
|
415
|
+
/** 实体数量之和需要小于100 */
|
|
416
|
+
subjects: Lark.CollaborationRuleEntities;
|
|
417
|
+
/** 实体数量之和需要小于100 */
|
|
418
|
+
objects: Lark.CollaborationRuleEntities;
|
|
419
|
+
}
|
|
420
|
+
interface CreateQuery {
|
|
421
|
+
/** 对方租户的tenant key */
|
|
422
|
+
target_tenant_key: string;
|
|
423
|
+
}
|
|
424
|
+
interface CreateResponse {
|
|
425
|
+
/** 添加的规则ID */
|
|
426
|
+
add_rule_id?: string;
|
|
427
|
+
}
|
|
428
|
+
interface UpdateRequest {
|
|
429
|
+
/** 实体数量之和需要小于100 */
|
|
430
|
+
subjects: Lark.CollaborationRuleEntities;
|
|
431
|
+
/** 实体数量之和需要小于100 */
|
|
432
|
+
objects: Lark.CollaborationRuleEntities;
|
|
433
|
+
}
|
|
434
|
+
interface UpdateQuery {
|
|
435
|
+
/** 对方租户的tenant key */
|
|
436
|
+
target_tenant_key: string;
|
|
437
|
+
}
|
|
438
|
+
interface ListQuery extends Pagination {
|
|
439
|
+
/** 对方租户的tenant key */
|
|
440
|
+
target_tenant_key: string;
|
|
441
|
+
}
|
|
442
|
+
interface DeleteQuery {
|
|
443
|
+
/** 对方租户的tenant key */
|
|
444
|
+
target_tenant_key: string;
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
}
|
package/lib/types/docs.d.ts
CHANGED
|
@@ -1,23 +1,33 @@
|
|
|
1
1
|
declare module '../internal' {
|
|
2
2
|
interface Internal {
|
|
3
|
-
|
|
4
|
-
* 获取云文档内容
|
|
5
|
-
* @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/docs-v1/content/get
|
|
6
|
-
*/
|
|
7
|
-
getDocsContent(query?: GetDocsContentQuery): Promise<GetDocsContentResponse>;
|
|
3
|
+
docs: Docs.Methods;
|
|
8
4
|
}
|
|
9
5
|
}
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
6
|
+
export declare namespace Docs {
|
|
7
|
+
interface Methods {
|
|
8
|
+
content: Content.Methods;
|
|
9
|
+
}
|
|
10
|
+
namespace Content {
|
|
11
|
+
interface Methods {
|
|
12
|
+
/**
|
|
13
|
+
* 获取云文档内容
|
|
14
|
+
* @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/docs-v1/content/get
|
|
15
|
+
*/
|
|
16
|
+
get(query?: GetQuery): Promise<GetResponse>;
|
|
17
|
+
}
|
|
18
|
+
interface GetQuery {
|
|
19
|
+
/** 文档唯一标识 */
|
|
20
|
+
doc_token: string;
|
|
21
|
+
/** 文档类型 */
|
|
22
|
+
doc_type: 'docx';
|
|
23
|
+
/** 内容类型 */
|
|
24
|
+
content_type: 'markdown';
|
|
25
|
+
/** 语言 */
|
|
26
|
+
lang?: 'zh' | 'en' | 'ja';
|
|
27
|
+
}
|
|
28
|
+
interface GetResponse {
|
|
29
|
+
/** 内容 */
|
|
30
|
+
content?: string;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
23
33
|
}
|