@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.
Files changed (119) hide show
  1. package/lib/content.d.ts +211 -93
  2. package/lib/index.cjs +2954 -2474
  3. package/lib/internal.d.ts +4 -4
  4. package/lib/message.d.ts +2 -3
  5. package/lib/types/acs.d.ts +212 -172
  6. package/lib/types/admin.d.ts +331 -291
  7. package/lib/types/aily.d.ts +331 -216
  8. package/lib/types/apaas.d.ts +646 -494
  9. package/lib/types/application.d.ts +559 -458
  10. package/lib/types/approval.d.ts +826 -791
  11. package/lib/types/attendance.d.ts +1094 -994
  12. package/lib/types/auth.d.ts +66 -61
  13. package/lib/types/authen.d.ts +221 -186
  14. package/lib/types/baike.d.ts +258 -233
  15. package/lib/types/base.d.ts +74 -0
  16. package/lib/types/bitable.d.ts +830 -770
  17. package/lib/types/board.d.ts +29 -14
  18. package/lib/types/calendar.d.ts +660 -605
  19. package/lib/types/cardkit.d.ts +149 -134
  20. package/lib/types/compensation.d.ts +84 -49
  21. package/lib/types/contact.d.ts +1279 -1204
  22. package/lib/types/corehr.d.ts +4982 -4526
  23. package/lib/types/directory.d.ts +447 -0
  24. package/lib/types/docs.d.ts +28 -18
  25. package/lib/types/document_ai.d.ts +347 -252
  26. package/lib/types/docx.d.ts +428 -383
  27. package/lib/types/drive.d.ts +1093 -1048
  28. package/lib/types/ehr.d.ts +66 -51
  29. package/lib/types/event.d.ts +16 -6
  30. package/lib/types/helpdesk.d.ts +816 -741
  31. package/lib/types/hire.d.ts +3955 -3589
  32. package/lib/types/human_authentication.d.ts +32 -22
  33. package/lib/types/im.d.ts +1420 -1295
  34. package/lib/types/index.d.ts +1422 -330
  35. package/lib/types/lingo.d.ts +279 -249
  36. package/lib/types/mail.d.ts +1032 -675
  37. package/lib/types/mdm.d.ts +105 -37
  38. package/lib/types/minutes.d.ts +73 -26
  39. package/lib/types/moments.d.ts +23 -13
  40. package/lib/types/okr.d.ts +266 -225
  41. package/lib/types/optical_char_recognition.d.ts +22 -12
  42. package/lib/types/passport.d.ts +58 -48
  43. package/lib/types/payroll.d.ts +210 -53
  44. package/lib/types/performance.d.ts +463 -414
  45. package/lib/types/personal_settings.d.ts +93 -82
  46. package/lib/types/report.d.ts +79 -58
  47. package/lib/types/search.d.ts +265 -235
  48. package/lib/types/security_and_compliance.d.ts +30 -19
  49. package/lib/types/sheets.d.ts +356 -321
  50. package/lib/types/speech_to_text.d.ts +44 -34
  51. package/lib/types/task.d.ts +998 -1087
  52. package/lib/types/tenant.d.ts +25 -15
  53. package/lib/types/translation.d.ts +42 -32
  54. package/lib/types/trust_party.d.ts +81 -0
  55. package/lib/types/vc.d.ts +1218 -1123
  56. package/lib/types/verification.d.ts +11 -6
  57. package/lib/types/wiki.d.ts +270 -235
  58. package/lib/types/workplace.d.ts +58 -38
  59. package/lib/utils.d.ts +2 -2
  60. package/package.json +4 -4
  61. package/src/bot.ts +15 -15
  62. package/src/content.ts +230 -107
  63. package/src/internal.ts +29 -12
  64. package/src/message.ts +82 -111
  65. package/src/types/acs.ts +234 -186
  66. package/src/types/admin.ts +353 -305
  67. package/src/types/aily.ts +375 -233
  68. package/src/types/apaas.ts +754 -568
  69. package/src/types/application.ts +633 -507
  70. package/src/types/approval.ts +914 -872
  71. package/src/types/attendance.ts +1226 -1104
  72. package/src/types/auth.ts +72 -66
  73. package/src/types/authen.ts +233 -191
  74. package/src/types/baike.ts +276 -246
  75. package/src/types/base.ts +93 -0
  76. package/src/types/bitable.ts +966 -894
  77. package/src/types/board.ts +34 -16
  78. package/src/types/calendar.ts +751 -685
  79. package/src/types/cardkit.ts +164 -146
  80. package/src/types/compensation.ts +97 -55
  81. package/src/types/contact.ts +1465 -1375
  82. package/src/types/corehr.ts +5664 -5077
  83. package/src/types/directory.ts +569 -0
  84. package/src/types/docs.ts +31 -19
  85. package/src/types/document_ai.ts +401 -287
  86. package/src/types/docx.ts +492 -438
  87. package/src/types/drive.ts +1266 -1213
  88. package/src/types/ehr.ts +71 -53
  89. package/src/types/event.ts +19 -7
  90. package/src/types/helpdesk.ts +930 -840
  91. package/src/types/hire.ts +4453 -4019
  92. package/src/types/human_authentication.ts +35 -23
  93. package/src/types/im.ts +1626 -1476
  94. package/src/types/index.ts +1532 -346
  95. package/src/types/lingo.ts +299 -263
  96. package/src/types/mail.ts +1231 -779
  97. package/src/types/mdm.ts +122 -39
  98. package/src/types/minutes.ts +88 -28
  99. package/src/types/moments.ts +26 -14
  100. package/src/types/okr.ts +286 -238
  101. package/src/types/optical_char_recognition.ts +25 -13
  102. package/src/types/passport.ts +62 -50
  103. package/src/types/payroll.ts +254 -57
  104. package/src/types/performance.ts +528 -467
  105. package/src/types/personal_settings.ts +101 -89
  106. package/src/types/report.ts +86 -62
  107. package/src/types/search.ts +285 -249
  108. package/src/types/security_and_compliance.ts +33 -21
  109. package/src/types/sheets.ts +421 -379
  110. package/src/types/speech_to_text.ts +48 -36
  111. package/src/types/task.ts +1152 -1260
  112. package/src/types/tenant.ts +29 -17
  113. package/src/types/translation.ts +46 -34
  114. package/src/types/trust_party.ts +110 -0
  115. package/src/types/vc.ts +1397 -1283
  116. package/src/types/verification.ts +13 -7
  117. package/src/types/wiki.ts +293 -251
  118. package/src/types/workplace.ts +65 -41
  119. package/src/utils.ts +3 -3
@@ -0,0 +1,569 @@
1
+ import * as Lark from '.'
2
+ import { Internal, Paginated, Pagination } from '../internal'
3
+
4
+ declare module '../internal' {
5
+ interface Internal {
6
+ directory: Directory.Methods
7
+ }
8
+ }
9
+
10
+ export namespace Directory {
11
+ export interface Methods {
12
+ employee: Employee.Methods
13
+ department: Department.Methods
14
+ collborationShareEntity: CollborationShareEntity.Methods
15
+ collaborationTenant: CollaborationTenant.Methods
16
+ collaborationRule: CollaborationRule.Methods
17
+ }
18
+
19
+ export namespace Employee {
20
+ export interface Methods {
21
+ /**
22
+ * 创建员工
23
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/employee/create
24
+ */
25
+ create(body: CreateRequest, query?: CreateQuery): Promise<CreateResponse>
26
+ /**
27
+ * 更新员工
28
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/employee/patch
29
+ */
30
+ patch(employee_id: string, body: PatchRequest, query?: PatchQuery): Promise<void>
31
+ /**
32
+ * 离职员工
33
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/employee/delete
34
+ */
35
+ delete(employee_id: string, body: DeleteRequest, query?: DeleteQuery): Promise<void>
36
+ /**
37
+ * 恢复离职员工
38
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/employee/resurrect
39
+ */
40
+ resurrect(employee_id: string, body: ResurrectRequest, query?: ResurrectQuery): Promise<void>
41
+ /**
42
+ * 更新在职员工为待离职
43
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/employee/to_be_resigned
44
+ */
45
+ toBeResigned(employee_id: string, body: ToBeResignedRequest, query?: ToBeResignedQuery): Promise<void>
46
+ /**
47
+ * 更新待离职成员为在职
48
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/employee/regular
49
+ */
50
+ regular(employee_id: string, query?: RegularQuery): Promise<void>
51
+ /**
52
+ * 批量获取员工信息
53
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/employee/mget
54
+ */
55
+ mget(body: MgetRequest, query?: MgetQuery): Promise<MgetResponse>
56
+ /**
57
+ * 批量获取员工列表
58
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/employee/filter
59
+ */
60
+ filter(body: FilterRequest, query?: FilterQuery): Promise<FilterResponse>
61
+ /**
62
+ * 搜索员工
63
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/employee/search
64
+ */
65
+ search(body: SearchRequest, query?: SearchQuery): Promise<SearchResponse>
66
+ /**
67
+ * 转换员工 ID
68
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/employee/idconvert
69
+ */
70
+ idconvert(body: IdconvertRequest, query?: IdconvertQuery): Promise<IdconvertResponse>
71
+ }
72
+
73
+ export interface CreateRequest {
74
+ /** 创建员工对象 */
75
+ employee: Lark.CreateEmployee
76
+ /** 接口拓展选项 */
77
+ options?: Lark.CreateEmployeeOptions
78
+ }
79
+
80
+ export interface CreateQuery {
81
+ /** 此次调用中使用的用户ID的类型 */
82
+ employee_id_type?: 'open_id' | 'employee_id' | 'union_id'
83
+ /** 此次调用中使用的部门ID的类型 */
84
+ department_id_type?: 'department_id' | 'open_department_id'
85
+ }
86
+
87
+ export interface CreateResponse {
88
+ /** 员工ID */
89
+ employee_id?: string
90
+ }
91
+
92
+ export interface PatchRequest {
93
+ /** 更新员工对象 */
94
+ employee: Lark.UpdateEmployee
95
+ }
96
+
97
+ export interface PatchQuery {
98
+ /** 此次调用中使用的用户ID的类型 */
99
+ employee_id_type?: 'open_id' | 'union_id' | 'employee_id'
100
+ /** 部门ID类型 */
101
+ department_id_type?: 'department_id' | 'open_department_id'
102
+ }
103
+
104
+ export interface DeleteRequest {
105
+ /** 接口拓展选项 */
106
+ options?: Lark.DeleteEmployeeOptions
107
+ }
108
+
109
+ export interface DeleteQuery {
110
+ /** 此次调用中使用的用户ID的类型 */
111
+ employee_id_type?: 'open_id' | 'employee_id' | 'union_id'
112
+ }
113
+
114
+ export interface ResurrectRequest {
115
+ /** 部门信息 */
116
+ employee_order_in_departments?: Lark.UpsertUserDepartmentSortInfo[]
117
+ /** 选项 */
118
+ options?: Lark.ResurrectEmployeeOptions
119
+ }
120
+
121
+ export interface ResurrectQuery {
122
+ /** 此次调用中使用的用户ID的类型 */
123
+ employee_id_type?: 'open_id' | 'employee_id' | 'union_id'
124
+ /** 部门ID类型 */
125
+ department_id_type?: 'department_id' | 'open_department_id'
126
+ }
127
+
128
+ export interface ToBeResignedRequest {
129
+ /** 在职员工流转到待离职 */
130
+ employee: Lark.SetEmployeePreResigned
131
+ }
132
+
133
+ export interface ToBeResignedQuery {
134
+ /** 员工ID类型 */
135
+ employee_id_type?: 'open_id' | 'union_id' | 'employee_id'
136
+ /** 部门ID类型 */
137
+ department_id_type?: 'department_id' | 'open_department_id'
138
+ }
139
+
140
+ export interface RegularQuery {
141
+ /** 员工ID类型 */
142
+ employee_id_type?: 'open_id' | 'union_id' | 'employee_id'
143
+ /** 部门ID类型 */
144
+ department_id_type?: 'department_id' | 'open_department_id'
145
+ }
146
+
147
+ export interface MgetRequest {
148
+ /** 员工id */
149
+ employee_ids: string[]
150
+ /** 字段枚举 */
151
+ required_fields: string[]
152
+ }
153
+
154
+ export interface MgetQuery {
155
+ /** 此次调用中使用的用户ID的类型 */
156
+ employee_id_type?: 'open_id' | 'employee_id' | 'union_id'
157
+ /** 此次调用中使用的部门ID的类型 */
158
+ department_id_type?: 'department_id' | 'open_department_id'
159
+ }
160
+
161
+ export interface MgetResponse {
162
+ /** 员工信息 */
163
+ employees?: Lark.EmployeeEntity[]
164
+ /** 字段异常信息 */
165
+ abnormals?: Lark.AbnormalRecord[]
166
+ }
167
+
168
+ export interface FilterRequest {
169
+ /** 查询条件 */
170
+ filter: Lark.MultiFilterCondition
171
+ /** 需要查询的字段列表。将按照传递的字段列表返回有权限的行、列数据。不传则不会返回任何字段 */
172
+ required_fields: string[]
173
+ /** 分页参数 */
174
+ page_request: Lark.PageCondition
175
+ }
176
+
177
+ export interface FilterQuery {
178
+ /** 此次调用中使用的用户ID的类型 */
179
+ employee_id_type?: 'open_id' | 'union_id' | 'employee_id'
180
+ /** 此次调用中使用的部门ID的类型 */
181
+ department_id_type?: 'department_id' | 'open_department_id'
182
+ }
183
+
184
+ export interface FilterResponse {
185
+ /** 员工信息 */
186
+ employees?: Lark.EmployeeEntity[]
187
+ /** 分页结果 */
188
+ page_response?: Lark.PageResponse
189
+ /** 异常信息 */
190
+ abnormals?: Lark.AbnormalRecord[]
191
+ }
192
+
193
+ export interface SearchRequest {
194
+ /** 搜索关键词。支持员工ID、员工名称、员工手机号、员工邮箱的搜索。其中员工ID、员工手机号支持精确搜索,员工名称、员工邮箱支持模糊搜索,员工名称支持国际化名称的搜索。 */
195
+ query: string
196
+ /** 分页信息 */
197
+ page_request: Lark.PageCondition
198
+ /** 需要查询的字段列表。将按照传递的字段列表返回有权限的行、列数据。不传则不会返回任何字段 */
199
+ required_fields: string[]
200
+ }
201
+
202
+ export interface SearchQuery {
203
+ /** 此次调用中使用的用户ID的类型 */
204
+ employee_id_type?: 'open_id' | 'union_id' | 'employee_id'
205
+ /** 此次调用中使用的部门ID的类型 */
206
+ department_id_type?: 'open_department_id' | 'department_id'
207
+ }
208
+
209
+ export interface SearchResponse {
210
+ /** 员工信息 */
211
+ employees?: Lark.EmployeeEntity[]
212
+ /** 分页结果 */
213
+ page_response?: Lark.PageResponse
214
+ /** 字段异常信息 */
215
+ abnormals?: Lark.AbnormalRecord[]
216
+ }
217
+
218
+ export interface IdconvertRequest {
219
+ /** 用户ID列表 */
220
+ employee_ids: string[]
221
+ }
222
+
223
+ export interface IdconvertQuery {
224
+ /** 员工ID类型 */
225
+ employee_id_type?: 'open_id' | 'union_id' | 'employee_id'
226
+ }
227
+
228
+ export interface IdconvertResponse {
229
+ /** id转换结果列表 */
230
+ id_convert_results?: Lark.EmployeeIdConvertResult[]
231
+ /** 异常信息列表 */
232
+ abnormals?: Lark.AbnormalRecord[]
233
+ }
234
+ }
235
+
236
+ export namespace Department {
237
+ export interface Methods {
238
+ /**
239
+ * 创建部门
240
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/department/create
241
+ */
242
+ create(body: CreateRequest, query?: CreateQuery): Promise<CreateResponse>
243
+ /**
244
+ * 更新部门
245
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/department/patch
246
+ */
247
+ patch(department_id: string, body: PatchRequest, query?: PatchQuery): Promise<void>
248
+ /**
249
+ * 删除部门
250
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/department/delete
251
+ */
252
+ delete(department_id: string, query?: DeleteQuery): Promise<void>
253
+ /**
254
+ * 批量获取部门信息
255
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/department/mget
256
+ */
257
+ mget(body: MgetRequest, query?: MgetQuery): Promise<MgetResponse>
258
+ /**
259
+ * 批量获取部门列表
260
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/department/filter
261
+ */
262
+ filter(body: FilterRequest, query?: FilterQuery): Promise<FilterResponse>
263
+ /**
264
+ * 搜索部门
265
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/department/search
266
+ */
267
+ search(body: SearchRequest, query?: SearchQuery): Promise<SearchResponse>
268
+ /**
269
+ * 转换部门 ID
270
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/department/idconvert
271
+ */
272
+ idconvert(body: IdconvertRequest, query?: IdconvertQuery): Promise<IdconvertResponse>
273
+ }
274
+
275
+ export interface CreateRequest {
276
+ /** 创建部门 */
277
+ department: Lark.CreateDepartment
278
+ }
279
+
280
+ export interface CreateQuery {
281
+ /** 此次调用中使用的用户ID的类型 */
282
+ employee_id_type?: 'open_id' | 'union_id' | 'employee_id'
283
+ /** 此次调用中使用的部门ID的类型 */
284
+ department_id_type?: 'department_id' | 'open_department_id'
285
+ }
286
+
287
+ export interface CreateResponse {
288
+ /** 部门ID */
289
+ department_id?: string
290
+ }
291
+
292
+ export interface PatchRequest {
293
+ /** 更新部门 */
294
+ department: Lark.UpdateDepartment
295
+ }
296
+
297
+ export interface PatchQuery {
298
+ /** 此次调用中使用的用户ID的类型 */
299
+ employee_id_type?: 'open_id' | 'union_id' | 'employee_id'
300
+ /** 此次调用中使用的部门ID的类型 */
301
+ department_id_type?: 'open_department_id' | 'department_id'
302
+ }
303
+
304
+ export interface DeleteQuery {
305
+ /** 此次调用中使用的部门ID的类型 */
306
+ department_id_type?: 'department_id' | 'open_department_id'
307
+ }
308
+
309
+ export interface MgetRequest {
310
+ /** 部门id */
311
+ department_ids: string[]
312
+ /** 字段枚举 */
313
+ required_fields: string[]
314
+ }
315
+
316
+ export interface MgetQuery {
317
+ /** 此次调用中使用的用户ID的类型 */
318
+ employee_id_type?: 'open_id' | 'employee_id' | 'union_id'
319
+ /** 此次调用中使用的部门ID的类型 */
320
+ department_id_type?: 'department_id' | 'open_department_id'
321
+ }
322
+
323
+ export interface MgetResponse {
324
+ /** 部门信息 */
325
+ departments?: Lark.Department[]
326
+ /** 字段异常信息 */
327
+ abnormals?: Lark.AbnormalRecord[]
328
+ }
329
+
330
+ export interface FilterRequest {
331
+ /** 查询条件 */
332
+ filter: Lark.MultiFilterCondition
333
+ /** 需要查询的字段列表。将按照传递的字段列表返回有权限的行、列数据。不传则不会返回任何字段 */
334
+ required_fields: string[]
335
+ /** 分页信息 */
336
+ page_request: Lark.PageCondition
337
+ }
338
+
339
+ export interface FilterQuery {
340
+ /** 此次调用中使用的用户ID的类型 */
341
+ employee_id_type?: 'open_id' | 'employee_id' | 'union_id'
342
+ /** 此次调用中使用的部门ID的类型 */
343
+ department_id_type?: 'open_department_id' | 'department_id'
344
+ }
345
+
346
+ export interface FilterResponse {
347
+ /** 部门信息 */
348
+ departments?: Lark.Department[]
349
+ /** 分页结果 */
350
+ page_response?: Lark.PageResponse
351
+ /** 异常信息 */
352
+ abnormals?: Lark.AbnormalRecord[]
353
+ }
354
+
355
+ export interface SearchRequest {
356
+ /** 搜索关键词。支持部门名称的搜索 */
357
+ query: string
358
+ /** 分页信息 */
359
+ page_request: Lark.PageCondition
360
+ /** 需要查询的字段列表。将按照传递的字段列表返回有权限的行、列数据。不传则不会返回任何字段 */
361
+ required_fields: string[]
362
+ }
363
+
364
+ export interface SearchQuery {
365
+ /** 此次调用中使用的用户ID的类型 */
366
+ employee_id_type?: 'open_id' | 'employee_id' | 'union_id'
367
+ /** 此次调用中使用的部门ID的类型 */
368
+ department_id_type?: 'open_department_id' | 'department_id'
369
+ }
370
+
371
+ export interface SearchResponse {
372
+ /** 部门信息 */
373
+ departments?: Lark.Department[]
374
+ /** 分页结果 */
375
+ page_response?: Lark.PageResponse
376
+ /** 字段异常信息 */
377
+ abnormals?: Lark.AbnormalRecord[]
378
+ }
379
+
380
+ export interface IdconvertRequest {
381
+ /** 部门ID列表 */
382
+ department_ids: string[]
383
+ }
384
+
385
+ export interface IdconvertQuery {
386
+ /** 部门ID类型 */
387
+ department_id_type?: 'department_id' | 'open_department_id'
388
+ }
389
+
390
+ export interface IdconvertResponse {
391
+ /** id转换结果列表 */
392
+ id_convert_results?: Lark.DepartmentIdConvertResult[]
393
+ /** 异常信息列表 */
394
+ abnormals?: Lark.AbnormalRecord[]
395
+ }
396
+ }
397
+
398
+ export namespace CollborationShareEntity {
399
+ export interface Methods {
400
+ /**
401
+ * 获取关联组织双方共享成员范围
402
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/collboration_share_entity/list
403
+ */
404
+ list(query?: ListQuery): Promise<ListResponse>
405
+ }
406
+
407
+ export interface ListQuery extends Pagination {
408
+ /** 对方租户的tenant key */
409
+ target_tenant_key: string
410
+ /** 不填写该参数为租户的分享范围,可填写该字段继续下钻查看指定部门下的子部门+成员。填写0分为两种情况,若租户分享的为全员则展示一级部门,否则展示分享的部门+成员。 */
411
+ target_department_id?: string
412
+ /** 获取用户组下的成员,填写该值后忽略target_department_id */
413
+ target_group_id?: string
414
+ /** 是否主体租户分享范围,默认是客体租户的分享范围 */
415
+ is_select_subject?: boolean
416
+ }
417
+
418
+ export interface ListResponse {
419
+ /** 分页标记,第一次请求不填,表示从头开始遍历;分页查询结果还有更多项时会同时返回新的 page_token,下次遍历可采用该 page_token 获取查询结果 */
420
+ page_token?: string
421
+ /** 是否还有更多项 */
422
+ has_more?: boolean
423
+ /** 分享的部门信息 */
424
+ share_departments?: Lark.ShareDepartment[]
425
+ /** 分享的用户组信息 */
426
+ share_groups?: Lark.ShareGroup[]
427
+ /** 分享的用户信息 */
428
+ share_users?: Lark.ShareUser[]
429
+ }
430
+ }
431
+
432
+ export namespace CollaborationTenant {
433
+ export interface Methods {
434
+ /**
435
+ * 管理员获取所有关联组织列表
436
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/collaboration_tenant/list
437
+ */
438
+ list(query?: Pagination): Paginated<Lark.CollaborationTenant>
439
+ }
440
+ }
441
+
442
+ export namespace CollaborationRule {
443
+ export interface Methods {
444
+ /**
445
+ * 新增可搜可见规则
446
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/collaboration_rule/create
447
+ */
448
+ create(body: CreateRequest, query?: CreateQuery): Promise<CreateResponse>
449
+ /**
450
+ * 更新可搜可见规则
451
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/collaboration_rule/update
452
+ */
453
+ update(collaboration_rule_id: string, body: UpdateRequest, query?: UpdateQuery): Promise<void>
454
+ /**
455
+ * 查询可搜可见规则
456
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/collaboration_rule/list
457
+ */
458
+ list(query?: ListQuery): Paginated<Lark.CollaborationRule>
459
+ /**
460
+ * 删除可搜可见规则
461
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/directory-v1/collaboration_rule/delete
462
+ */
463
+ delete(collaboration_rule_id: string, query?: DeleteQuery): Promise<void>
464
+ }
465
+
466
+ export interface CreateRequest {
467
+ /** 实体数量之和需要小于100 */
468
+ subjects: Lark.CollaborationRuleEntities
469
+ /** 实体数量之和需要小于100 */
470
+ objects: Lark.CollaborationRuleEntities
471
+ }
472
+
473
+ export interface CreateQuery {
474
+ /** 对方租户的tenant key */
475
+ target_tenant_key: string
476
+ }
477
+
478
+ export interface CreateResponse {
479
+ /** 添加的规则ID */
480
+ add_rule_id?: string
481
+ }
482
+
483
+ export interface UpdateRequest {
484
+ /** 实体数量之和需要小于100 */
485
+ subjects: Lark.CollaborationRuleEntities
486
+ /** 实体数量之和需要小于100 */
487
+ objects: Lark.CollaborationRuleEntities
488
+ }
489
+
490
+ export interface UpdateQuery {
491
+ /** 对方租户的tenant key */
492
+ target_tenant_key: string
493
+ }
494
+
495
+ export interface ListQuery extends Pagination {
496
+ /** 对方租户的tenant key */
497
+ target_tenant_key: string
498
+ }
499
+
500
+ export interface DeleteQuery {
501
+ /** 对方租户的tenant key */
502
+ target_tenant_key: string
503
+ }
504
+ }
505
+ }
506
+
507
+ Internal.define({
508
+ '/directory/v1/employees': {
509
+ POST: 'directory.employee.create',
510
+ },
511
+ '/directory/v1/employees/{employee_id}': {
512
+ PATCH: 'directory.employee.patch',
513
+ DELETE: 'directory.employee.delete',
514
+ },
515
+ '/directory/v1/employees/{employee_id}/resurrect': {
516
+ POST: 'directory.employee.resurrect',
517
+ },
518
+ '/directory/v1/employees/{employee_id}/to_be_resigned': {
519
+ PATCH: 'directory.employee.toBeResigned',
520
+ },
521
+ '/directory/v1/employees/{employee_id}/regular': {
522
+ PATCH: 'directory.employee.regular',
523
+ },
524
+ '/directory/v1/employees/mget': {
525
+ POST: 'directory.employee.mget',
526
+ },
527
+ '/directory/v1/employees/filter': {
528
+ POST: 'directory.employee.filter',
529
+ },
530
+ '/directory/v1/employees/search': {
531
+ POST: 'directory.employee.search',
532
+ },
533
+ '/directory/v1/employees/idconvert': {
534
+ POST: 'directory.employee.idconvert',
535
+ },
536
+ '/directory/v1/departments': {
537
+ POST: 'directory.department.create',
538
+ },
539
+ '/directory/v1/departments/{department_id}': {
540
+ PATCH: 'directory.department.patch',
541
+ DELETE: 'directory.department.delete',
542
+ },
543
+ '/directory/v1/departments/mget': {
544
+ POST: 'directory.department.mget',
545
+ },
546
+ '/directory/v1/departments/filter': {
547
+ POST: 'directory.department.filter',
548
+ },
549
+ '/directory/v1/departments/search': {
550
+ POST: 'directory.department.search',
551
+ },
552
+ '/directory/v1/departments/idconvert': {
553
+ POST: 'directory.department.idconvert',
554
+ },
555
+ '/directory/v1/share_entities': {
556
+ GET: 'directory.collborationShareEntity.list',
557
+ },
558
+ '/directory/v1/collaboration_tenants': {
559
+ GET: { name: 'directory.collaborationTenant.list', pagination: { argIndex: 0 } },
560
+ },
561
+ '/directory/v1/collaboration_rules': {
562
+ POST: 'directory.collaborationRule.create',
563
+ GET: { name: 'directory.collaborationRule.list', pagination: { argIndex: 0 } },
564
+ },
565
+ '/directory/v1/collaboration_rules/{collaboration_rule_id}': {
566
+ PUT: 'directory.collaborationRule.update',
567
+ DELETE: 'directory.collaborationRule.delete',
568
+ },
569
+ })
package/src/types/docs.ts CHANGED
@@ -2,32 +2,44 @@ import { Internal } from '../internal'
2
2
 
3
3
  declare module '../internal' {
4
4
  interface Internal {
5
- /**
6
- * 获取云文档内容
7
- * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/docs-v1/content/get
8
- */
9
- getDocsContent(query?: GetDocsContentQuery): Promise<GetDocsContentResponse>
5
+ docs: Docs.Methods
10
6
  }
11
7
  }
12
8
 
13
- export interface GetDocsContentQuery {
14
- /** 文档唯一标识 */
15
- doc_token: string
16
- /** 文档类型 */
17
- doc_type: 'docx'
18
- /** 内容类型 */
19
- content_type: 'markdown'
20
- /** 语言 */
21
- lang?: 'zh' | 'en' | 'ja'
22
- }
9
+ export namespace Docs {
10
+ export interface Methods {
11
+ content: Content.Methods
12
+ }
13
+
14
+ export namespace Content {
15
+ export interface Methods {
16
+ /**
17
+ * 获取云文档内容
18
+ * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/docs-v1/content/get
19
+ */
20
+ get(query?: GetQuery): Promise<GetResponse>
21
+ }
23
22
 
24
- export interface GetDocsContentResponse {
25
- /** 内容 */
26
- content?: string
23
+ export interface GetQuery {
24
+ /** 文档唯一标识 */
25
+ doc_token: string
26
+ /** 文档类型 */
27
+ doc_type: 'docx'
28
+ /** 内容类型 */
29
+ content_type: 'markdown'
30
+ /** 语言 */
31
+ lang?: 'zh' | 'en' | 'ja'
32
+ }
33
+
34
+ export interface GetResponse {
35
+ /** 内容 */
36
+ content?: string
37
+ }
38
+ }
27
39
  }
28
40
 
29
41
  Internal.define({
30
42
  '/docs/v1/content': {
31
- GET: 'getDocsContent',
43
+ GET: 'docs.content.get',
32
44
  },
33
45
  })