@satorijs/adapter-lark 3.11.8 → 3.12.0

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 (68) hide show
  1. package/lib/bot.d.ts +5 -5
  2. package/lib/http.d.ts +6 -3
  3. package/lib/index.cjs +634 -261
  4. package/lib/types/acs.d.ts +4 -1
  5. package/lib/types/aily.d.ts +3 -3
  6. package/lib/types/apaas.d.ts +190 -28
  7. package/lib/types/application.d.ts +20 -4
  8. package/lib/types/approval.d.ts +0 -13
  9. package/lib/types/attendance.d.ts +11 -5
  10. package/lib/types/authen.d.ts +8 -2
  11. package/lib/types/bitable.d.ts +25 -4
  12. package/lib/types/board.d.ts +56 -0
  13. package/lib/types/calendar.d.ts +71 -5
  14. package/lib/types/cardkit.d.ts +2 -2
  15. package/lib/types/compensation.d.ts +400 -0
  16. package/lib/types/contact.d.ts +55 -12
  17. package/lib/types/corehr.d.ts +1287 -79
  18. package/lib/types/directory.d.ts +3 -41
  19. package/lib/types/docx.d.ts +23 -0
  20. package/lib/types/drive.d.ts +107 -90
  21. package/lib/types/ehr.d.ts +11 -2
  22. package/lib/types/helpdesk.d.ts +15 -6
  23. package/lib/types/hire.d.ts +52 -3
  24. package/lib/types/human_authentication.d.ts +1 -1
  25. package/lib/types/im.d.ts +77 -21
  26. package/lib/types/index.d.ts +1670 -105
  27. package/lib/types/mail.d.ts +106 -16
  28. package/lib/types/payroll.d.ts +117 -81
  29. package/lib/types/performance.d.ts +1 -1
  30. package/lib/types/search.d.ts +4 -1
  31. package/lib/types/security_and_compliance.d.ts +254 -1
  32. package/lib/ws.d.ts +30 -0
  33. package/package.json +6 -3
  34. package/src/bot.ts +28 -15
  35. package/src/http.ts +10 -4
  36. package/src/types/acs.ts +4 -1
  37. package/src/types/aily.ts +3 -3
  38. package/src/types/apaas.ts +237 -38
  39. package/src/types/application.ts +20 -4
  40. package/src/types/approval.ts +0 -15
  41. package/src/types/attendance.ts +11 -5
  42. package/src/types/authen.ts +8 -2
  43. package/src/types/bitable.ts +25 -4
  44. package/src/types/board.ts +75 -2
  45. package/src/types/calendar.ts +88 -5
  46. package/src/types/cardkit.ts +2 -2
  47. package/src/types/compensation.ts +485 -0
  48. package/src/types/contact.ts +55 -12
  49. package/src/types/corehr.ts +1480 -123
  50. package/src/types/directory.ts +3 -53
  51. package/src/types/docx.ts +29 -0
  52. package/src/types/drive.ts +129 -112
  53. package/src/types/ehr.ts +11 -2
  54. package/src/types/helpdesk.ts +15 -6
  55. package/src/types/hire.ts +66 -3
  56. package/src/types/human_authentication.ts +1 -1
  57. package/src/types/im.ts +77 -21
  58. package/src/types/index.ts +1751 -107
  59. package/src/types/mail.ts +106 -16
  60. package/src/types/payroll.ts +146 -103
  61. package/src/types/performance.ts +1 -1
  62. package/src/types/search.ts +4 -1
  63. package/src/types/security_and_compliance.ts +292 -1
  64. package/src/ws.ts +183 -0
  65. package/lib/types/api.d.ts +0 -28510
  66. package/lib/types/internal.d.ts +0 -21
  67. package/lib/types/message/content.d.ts +0 -433
  68. package/lib/types/message/index.d.ts +0 -95
@@ -9,12 +9,24 @@ declare module '../internal' {
9
9
 
10
10
  export namespace Apaas {
11
11
  export interface Methods {
12
+ app: App.Methods
12
13
  seatAssignment: SeatAssignment.Methods
13
14
  seatActivity: SeatActivity.Methods
14
15
  application: Application.Methods
15
16
  userTask: UserTask.Methods
16
17
  approvalTask: ApprovalTask.Methods
17
18
  approvalInstance: ApprovalInstance.Methods
19
+ workspace: Workspace.Methods
20
+ }
21
+
22
+ export namespace App {
23
+ export interface Methods {
24
+ /**
25
+ * 查看应用基本信息
26
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/app/list
27
+ */
28
+ list(query?: Pagination): Paginated<Lark.App>
29
+ }
18
30
  }
19
31
 
20
32
  export namespace SeatAssignment {
@@ -50,8 +62,8 @@ export namespace Apaas {
50
62
  export namespace Application {
51
63
  export interface Methods {
52
64
  auditLog: AuditLog.Methods
53
- role: Role.Methods
54
65
  recordPermission: RecordPermission.Methods
66
+ role: Role.Methods
55
67
  object: Object.Methods
56
68
  function: Function.Methods
57
69
  environmentVariable: EnvironmentVariable.Methods
@@ -167,6 +179,37 @@ export namespace Apaas {
167
179
  }
168
180
  }
169
181
 
182
+ export namespace RecordPermission {
183
+ export interface Methods {
184
+ member: Member.Methods
185
+ }
186
+
187
+ export namespace Member {
188
+ export interface Methods {
189
+ /**
190
+ * 批量删除记录权限用户授权
191
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-record_permission-member/batch_remove_authorization
192
+ */
193
+ batchRemoveAuthorization(namespace: string, record_permission_api_name: string, body: BatchRemoveAuthorizationRequest): Promise<void>
194
+ /**
195
+ * 批量创建记录权限用户授权
196
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-record_permission-member/batch_create_authorization
197
+ */
198
+ batchCreateAuthorization(namespace: string, record_permission_api_name: string, body: BatchCreateAuthorizationRequest): Promise<void>
199
+ }
200
+
201
+ export interface BatchRemoveAuthorizationRequest {
202
+ /** 需要删除的用户 ID 列表 */
203
+ user_ids?: string[]
204
+ }
205
+
206
+ export interface BatchCreateAuthorizationRequest {
207
+ /** 需要新增的用户 ID 列表 */
208
+ user_ids?: string[]
209
+ }
210
+ }
211
+ }
212
+
170
213
  export namespace Role {
171
214
  export interface Methods {
172
215
  member: Member.Methods
@@ -219,37 +262,6 @@ export namespace Apaas {
219
262
  }
220
263
  }
221
264
 
222
- export namespace RecordPermission {
223
- export interface Methods {
224
- member: Member.Methods
225
- }
226
-
227
- export namespace Member {
228
- export interface Methods {
229
- /**
230
- * 批量删除记录权限用户授权
231
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-record_permission-member/batch_remove_authorization
232
- */
233
- batchRemoveAuthorization(namespace: string, record_permission_api_name: string, body: BatchRemoveAuthorizationRequest): Promise<void>
234
- /**
235
- * 批量创建记录权限用户授权
236
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-record_permission-member/batch_create_authorization
237
- */
238
- batchCreateAuthorization(namespace: string, record_permission_api_name: string, body: BatchCreateAuthorizationRequest): Promise<void>
239
- }
240
-
241
- export interface BatchRemoveAuthorizationRequest {
242
- /** 需要删除的用户 ID 列表 */
243
- user_ids?: string[]
244
- }
245
-
246
- export interface BatchCreateAuthorizationRequest {
247
- /** 需要新增的用户 ID 列表 */
248
- user_ids?: string[]
249
- }
250
- }
251
- }
252
-
253
265
  export namespace Object {
254
266
  export interface Methods {
255
267
  record: Record.Methods
@@ -720,9 +732,181 @@ export namespace Apaas {
720
732
  opinion: string
721
733
  }
722
734
  }
735
+
736
+ export namespace Workspace {
737
+ export interface Methods {
738
+ table: Table.Methods
739
+ view: View.Methods
740
+ /**
741
+ * 执行SQL
742
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/workspace/sql_commands
743
+ */
744
+ sqlCommands(workspace_id: string, body: SqlCommandsRequest): Promise<SqlCommandsResponse>
745
+ }
746
+
747
+ export interface SqlCommandsRequest {
748
+ /** 要执行的 SQL 语句 */
749
+ sql: string
750
+ }
751
+
752
+ export interface SqlCommandsResponse {
753
+ /** 如果是 SELECT 命令,返回的是查询结果的 JSON 序列化字符串。如果是其他无返回的命令,如 DELETE 等,result 为空。 */
754
+ result: string
755
+ }
756
+
757
+ export namespace Table {
758
+ export interface Methods {
759
+ /**
760
+ * 查询数据表数据记录
761
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/workspace-table/records_get
762
+ */
763
+ recordsGet(workspace_id: string, table_name: string, query?: RecordsGetQuery): Promise<RecordsGetResponse>
764
+ /**
765
+ * 向数据表中添加或更新记录
766
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/workspace-table/records_post
767
+ */
768
+ recordsPost(workspace_id: string, table_name: string, body: RecordsPostRequest, query?: RecordsPostQuery): Promise<RecordsPostResponse>
769
+ /**
770
+ * 按条件更新数据表中的记录
771
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/workspace-table/records_patch
772
+ */
773
+ recordsPatch(workspace_id: string, table_name: string, body: RecordsPatchRequest, query?: RecordsPatchQuery): Promise<RecordsPatchResponse>
774
+ /**
775
+ * 批量更新数据表中的记录
776
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/workspace-table/records_batch_update
777
+ */
778
+ recordsBatchUpdate(workspace_id: string, table_name: string, body: RecordsBatchUpdateRequest): Promise<RecordsBatchUpdateResponse>
779
+ /**
780
+ * 删除数据表中的记录
781
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/workspace-table/records_delete
782
+ */
783
+ recordsDelete(workspace_id: string, table_name: string, query?: RecordsDeleteQuery): Promise<void>
784
+ }
785
+
786
+ export interface RecordsGetQuery extends Pagination {
787
+ /**
788
+ * 返回的列,默认为 *,即返回所有列。
789
+ * 遵循 PostgREST 语法,详情可查看 https://docs.postgrest.org/en/v13/references/api/tables_views.html#vertical-filtering
790
+ */
791
+ select?: string
792
+ /** 筛选条件,尊许 PostgREST 语法,详情可查看 https://docs.postgrest.org/en/v13/references/api/tables_views.html#horizontal-filtering */
793
+ filter?: string
794
+ /**
795
+ * 排序条件,如果没指定 asc/desc,默认为 asc,null 值可排在最前或最后。
796
+ * 尊许 PostgREST 语法,详情可查看
797
+ * https://docs.postgrest.org/en/v13/references/api/tables_views.html#ordering
798
+ */
799
+ order?: string
800
+ }
801
+
802
+ export interface RecordsGetResponse {
803
+ /** 是否还有更多项 */
804
+ has_more: boolean
805
+ /** 分页标记,当 has_more 为 true 时,会同时返回新的 page_token,否则不返回 page_token */
806
+ page_token: string
807
+ /** 符合条件的记录总数 */
808
+ total: number
809
+ /** 数据记录列表,格式为数组序列化后的 JSONString */
810
+ items: string
811
+ }
812
+
813
+ export interface RecordsPostRequest {
814
+ /** 要插入的数据记录列表,单次支持最多 500 条 */
815
+ records: string
816
+ }
817
+
818
+ export interface RecordsPostQuery {
819
+ /** UPSERT 时使用,指定列,多列英文逗号拼接 */
820
+ columns?: string
821
+ /**
822
+ * UPSERT 时使用,指定使用哪一个或多个具有唯一约束的字段作为冲突判断依据,默认为表主键。
823
+ * 假设 user_products 表有一个由 user_id 和 product_id 组成的复合唯一约束。
824
+ */
825
+ on_conflict?: string
826
+ }
827
+
828
+ export interface RecordsPostResponse {
829
+ /** 按照记录顺序创建或更新的记录 ID 列表 */
830
+ record_ids: Lark.Uuid[]
831
+ }
832
+
833
+ export interface RecordsPatchRequest {
834
+ /** 要更新的数据记录信息 */
835
+ record: string
836
+ }
837
+
838
+ export interface RecordsPatchQuery {
839
+ /** 筛选条件,尊许 PostgREST 语法,详情可查看 https://docs.postgrest.org/en/v13/references/api/tables_views.html#horizontal-filtering */
840
+ filter: string
841
+ }
842
+
843
+ export interface RecordsPatchResponse {
844
+ /** 更新的记录唯一ID列表 */
845
+ record_ids: Lark.Uuid[]
846
+ }
847
+
848
+ export interface RecordsBatchUpdateRequest {
849
+ /** 要更新的数据记录列表,单次支持最多 500条,每行 record 都必须包含主键 _id,且不同行要更新的字段需保持一致 */
850
+ records: string
851
+ }
852
+
853
+ export interface RecordsBatchUpdateResponse {
854
+ /** 更新的记录唯一ID列表 */
855
+ record_ids: Lark.Uuid[]
856
+ }
857
+
858
+ export interface RecordsDeleteQuery {
859
+ /**
860
+ * 筛选条件,尊许 PostgREST 语法,详情可查看 https://docs.postgrest.org/en/v13/references/api/tables_views.html#horizontal-filtering
861
+ * 此处用法和查询数据记录一致
862
+ */
863
+ filter: string
864
+ }
865
+ }
866
+
867
+ export namespace View {
868
+ export interface Methods {
869
+ /**
870
+ * 查询视图数据记录
871
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/workspace-view/views_get
872
+ */
873
+ viewsGet(workspace_id: string, view_name: string, query?: ViewsGetQuery): Promise<ViewsGetResponse>
874
+ }
875
+
876
+ export interface ViewsGetQuery extends Pagination {
877
+ /**
878
+ * 返回的列,默认为 *,即返回所有列。
879
+ * 遵循 PostgREST 语法,详情可查看 https://docs.postgrest.org/en/v13/references/api/tables_views.html#vertical-filtering
880
+ */
881
+ select?: string
882
+ /** 筛选条件,尊许 PostgREST 语法,详情可查看 https://docs.postgrest.org/en/v13/references/api/tables_views.html#horizontal-filtering */
883
+ filter?: string
884
+ /**
885
+ * 排序条件,如果没指定 asc/desc,默认为 asc,null 值可排在最前或最后。
886
+ * 尊许 PostgREST 语法,详情可查看
887
+ * https://docs.postgrest.org/en/v13/references/api/tables_views.html#ordering
888
+ */
889
+ order?: string
890
+ }
891
+
892
+ export interface ViewsGetResponse {
893
+ /** 是否还有更多项 */
894
+ has_more: boolean
895
+ /** 分页标记,当 has_more 为 true 时,会同时返回新的 page_token,否则不返回 page_token */
896
+ page_token: string
897
+ /** 符合条件的记录总数 */
898
+ total: number
899
+ /** 数据记录列表,格式为数组序列化后的 JSONString */
900
+ items: string
901
+ }
902
+ }
903
+ }
723
904
  }
724
905
 
725
906
  Internal.define({
907
+ '/apaas/v1/apps': {
908
+ GET: { name: 'apaas.app.list', pagination: { argIndex: 0 } },
909
+ },
726
910
  '/apaas/v1/seat_assignments': {
727
911
  GET: { name: 'apaas.seatAssignment.list', pagination: { argIndex: 0 } },
728
912
  },
@@ -741,6 +925,12 @@ Internal.define({
741
925
  '/apaas/v1/applications/{namespace}/audit_log/data_change_log_detail': {
742
926
  GET: 'apaas.application.auditLog.dataChangeLogDetail',
743
927
  },
928
+ '/apaas/v1/applications/{namespace}/record_permissions/{record_permission_api_name}/member/batch_remove_authorization': {
929
+ POST: 'apaas.application.recordPermission.member.batchRemoveAuthorization',
930
+ },
931
+ '/apaas/v1/applications/{namespace}/record_permissions/{record_permission_api_name}/member/batch_create_authorization': {
932
+ POST: 'apaas.application.recordPermission.member.batchCreateAuthorization',
933
+ },
744
934
  '/apaas/v1/applications/{namespace}/roles/{role_api_name}/member/batch_remove_authorization': {
745
935
  POST: 'apaas.application.role.member.batchRemoveAuthorization',
746
936
  },
@@ -750,12 +940,6 @@ Internal.define({
750
940
  '/apaas/v1/applications/{namespace}/roles/{role_api_name}/member': {
751
941
  GET: 'apaas.application.role.member.get',
752
942
  },
753
- '/apaas/v1/applications/{namespace}/record_permissions/{record_permission_api_name}/member/batch_remove_authorization': {
754
- POST: 'apaas.application.recordPermission.member.batchRemoveAuthorization',
755
- },
756
- '/apaas/v1/applications/{namespace}/record_permissions/{record_permission_api_name}/member/batch_create_authorization': {
757
- POST: 'apaas.application.recordPermission.member.batchCreateAuthorization',
758
- },
759
943
  '/apaas/v1/applications/{namespace}/objects/oql_query': {
760
944
  POST: 'apaas.application.object.oqlQuery',
761
945
  },
@@ -829,4 +1013,19 @@ Internal.define({
829
1013
  '/apaas/v1/user_tasks/{task_id}/chat_group': {
830
1014
  POST: 'apaas.userTask.chatGroup',
831
1015
  },
1016
+ '/apaas/v1/workspaces/{workspace_id}/tables/{table_name}/records': {
1017
+ GET: 'apaas.workspace.table.recordsGet',
1018
+ POST: 'apaas.workspace.table.recordsPost',
1019
+ PATCH: 'apaas.workspace.table.recordsPatch',
1020
+ DELETE: 'apaas.workspace.table.recordsDelete',
1021
+ },
1022
+ '/apaas/v1/workspaces/{workspace_id}/tables/{table_name}/records_batch_update': {
1023
+ PATCH: 'apaas.workspace.table.recordsBatchUpdate',
1024
+ },
1025
+ '/apaas/v1/workspaces/{workspace_id}/views/{view_name}/records': {
1026
+ GET: 'apaas.workspace.view.viewsGet',
1027
+ },
1028
+ '/apaas/v1/workspaces/{workspace_id}/sql_commands': {
1029
+ POST: 'apaas.workspace.sqlCommands',
1030
+ },
832
1031
  })
@@ -479,7 +479,12 @@ export namespace Application {
479
479
  date: string
480
480
  /** 活跃周期的统计类型 */
481
481
  cycle_type: DepartmentOverviewRequestCycleType
482
- /** 查询的部门id,获取方法可参考[部门ID概述](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/field-overview)- 若部门id为空,则返回当前租户的使用数据;若填写部门id,则返回当前部门的使用数据(包含子部门的用户) 以及多级子部门的使用数据。- 若路径参数中department_id_type为空或者为open_department_id,则此处应该填写部门的 open_department_id;若路径参数中department_id_type为department_id,则此处应该填写部门的 department_id。- 若不填写则返回整个租户的数据 */
482
+ /**
483
+ * 查询的部门id,获取方法可参考[部门ID概述](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/field-overview)
484
+ * - 若部门id为空,则返回当前租户的使用数据;若填写部门id,则返回当前部门的使用数据(包含子部门的用户) 以及多级子部门的使用数据。
485
+ * - 若路径参数中department_id_type为空或者为open_department_id,则此处应该填写部门的 open_department_id;若路径参数中department_id_type为department_id,则此处应该填写部门的 department_id。
486
+ * - 若不填写则返回整个租户的数据
487
+ */
483
488
  department_id?: string
484
489
  /** 是否需要查询部门下多层子部门的数据。未设置或为0时,仅查询department_id对应的部门。设置为n时,查询department_id及其n级子部门的数据。仅在department_id参数传递时有效,最大值为4。 */
485
490
  recursion?: number
@@ -508,7 +513,11 @@ export namespace Application {
508
513
  date: string
509
514
  /** 枚举值:day,week,month;week指自然周,返回当前日期所在周的数据;不满一周则从周一到当前日期算。month指自然月,返回当前日期所在月的数据。 */
510
515
  cycle_type: MessagePushOverviewRequestCycleType
511
- /** 需要查询的部门id,获取方法可参考[部门ID概述](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/field-overview)- 若部门id为空,则返回当前租户的使用数据;若填写部门id,则返回当前部门的使用数据(包含子部门的用户); - 若路径参数中department_id_type为空或者为open_department_id,则此处应该填写部门的 open_department_id;若路径参数中department_id_type为department_id,则此处应该填写部门的 department_id。返回当前部门的使用数据; 若不填写,则返回当前租户的使用数据 */
516
+ /**
517
+ * 需要查询的部门id,获取方法可参考[部门ID概述](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/field-overview)
518
+ * - 若部门id为空,则返回当前租户的使用数据;若填写部门id,则返回当前部门的使用数据(包含子部门的用户);
519
+ * - 若路径参数中department_id_type为空或者为open_department_id,则此处应该填写部门的 open_department_id;若路径参数中department_id_type为department_id,则此处应该填写部门的 department_id。返回当前部门的使用数据; 若不填写,则返回当前租户的使用数据
520
+ */
512
521
  department_id?: string
513
522
  }
514
523
 
@@ -536,7 +545,11 @@ export namespace Application {
536
545
  date: string
537
546
  /** 活跃周期的统计类型 */
538
547
  cycle_type: OverviewRequestCycleType
539
- /** 查询的部门id,获取方法可参考[部门ID概述](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/field-overview)- 若部门id为空,则返回当前租户的使用数据;若填写部门id,则返回当前部门的使用数据(包含子部门的用户); - 若路径参数中department_id_type为空或者为open_department_id,则此处应该填写部门的 open_department_id;若路径参数中department_id_type为department_id,则此处应该填写部门的 department_id。 */
548
+ /**
549
+ * 查询的部门id,获取方法可参考[部门ID概述](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/field-overview)
550
+ * - 若部门id为空,则返回当前租户的使用数据;若填写部门id,则返回当前部门的使用数据(包含子部门的用户);
551
+ * - 若路径参数中department_id_type为空或者为open_department_id,则此处应该填写部门的 open_department_id;若路径参数中department_id_type为department_id,则此处应该填写部门的 department_id。
552
+ */
540
553
  department_id?: string
541
554
  /** 能力类型,按能力类型进行筛选,返回对应能力的活跃数据 */
542
555
  ability: 'app' | 'mp' | 'h5' | 'bot'
@@ -607,7 +620,10 @@ export namespace Application {
607
620
  export interface ListQuery extends Pagination {
608
621
  /** 查询的起始日期,格式为yyyy-mm-dd。不填则默认为当前日期减去180天。 */
609
622
  from_date?: string
610
- /** 查询的结束日期,格式为yyyy-mm-dd。不填默认为当前日期。只能查询 180 天内的数据。 */
623
+ /**
624
+ * 查询的结束日期,格式为yyyy-mm-dd。不填默认为当前日期。
625
+ * 只能查询 180 天内的数据。
626
+ */
611
627
  to_date?: string
612
628
  /** 反馈类型,不填写则表示查询所有反馈类型。 */
613
629
  feedback_type?: ListQueryFeedbackType
@@ -129,11 +129,6 @@ export namespace Approval {
129
129
  * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/get
130
130
  */
131
131
  get(instance_id: string, query?: GetQuery): Promise<GetResponse>
132
- /**
133
- * 批量获取审批实例 ID
134
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/list
135
- */
136
- list(query?: ListQuery): Paginated<string, 'instance_code_list'>
137
132
  /**
138
133
  * 退回审批任务
139
134
  * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/specified_rollback
@@ -314,15 +309,6 @@ export namespace Approval {
314
309
  instance_code: string
315
310
  }
316
311
 
317
- export interface ListQuery extends Pagination {
318
- /** 审批定义唯一标识 */
319
- approval_code: string
320
- /** 审批实例创建时间区间(毫秒) */
321
- start_time: string
322
- /** 审批实例创建时间区间(毫秒) */
323
- end_time: string
324
- }
325
-
326
312
  export interface SpecifiedRollbackRequest {
327
313
  /** 用户ID */
328
314
  user_id: string
@@ -924,7 +910,6 @@ Internal.define({
924
910
  },
925
911
  '/approval/v4/instances': {
926
912
  POST: 'approval.instance.create',
927
- GET: { name: 'approval.instance.list', pagination: { argIndex: 0, itemsKey: 'instance_code_list' } },
928
913
  },
929
914
  '/approval/v4/instances/cancel': {
930
915
  POST: 'approval.instance.cancel',
@@ -221,7 +221,7 @@ export namespace Attendance {
221
221
  export interface BatchCreateRequest {
222
222
  /** 班表信息列表 */
223
223
  user_daily_shifts: Lark.UserDailyShift[]
224
- /** 操作人uid,如果您未操作[考勤管理后台“API 接入”流程](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/attendance-development-guidelines),则此字段为必填字段 */
224
+ /** 操作人uid,如果您未操作[考勤管理后台“API 接入”流程](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/attendance-development-guidelines),则此字段为必填字段 */
225
225
  operator_id?: string
226
226
  }
227
227
 
@@ -318,7 +318,7 @@ export namespace Attendance {
318
318
  export interface CreateRequest {
319
319
  /** 6921319402260496386 */
320
320
  group: Lark.Group
321
- /** 操作人uid,如果您未操作[考勤管理后台“API 接入”流程](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/attendance-development-guidelines),则此字段为必填字段 */
321
+ /** 操作人uid,如果您未操作[考勤管理后台“API 接入”流程](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/attendance-development-guidelines),则此字段为必填字段 */
322
322
  operator_id?: string
323
323
  }
324
324
 
@@ -659,9 +659,15 @@ export namespace Attendance {
659
659
  stats_type: 'daily' | 'month'
660
660
  /** 开始时间 */
661
661
  start_date: number
662
- /** 结束时间(时间间隔不超过 40 天) */
662
+ /**
663
+ * 结束时间
664
+ * (时间间隔不超过 40 天)
665
+ */
663
666
  end_date: number
664
- /** 查询的用户 ID 列表(用户数量不超过 200) */
667
+ /**
668
+ * 查询的用户 ID 列表
669
+ * (用户数量不超过 200)
670
+ */
665
671
  user_ids?: string[]
666
672
  /** 是否需要历史数据 */
667
673
  need_history?: boolean
@@ -764,7 +770,7 @@ export namespace Attendance {
764
770
  }
765
771
 
766
772
  export interface ProcessRequest {
767
- /** 审批实例 ID,获取方式:1)[获取审批通过数据](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_approval/query) 2)[写入审批结果](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_approval/create) 3)[通知补卡审批发起(补卡情况下)](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_task_remedy/create) */
773
+ /** 审批实例 ID,获取方式:1)[获取审批通过数据](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_approval/query) 2)[写入审批结果](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_approval/create) 3)[通知补卡审批发起(补卡情况下)](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_task_remedy/create) */
768
774
  approval_id: string
769
775
  /** 审批类型,leave:请假,out:外出,overtime:加班,trip:出差,remedy:补卡 */
770
776
  approval_type: string
@@ -105,7 +105,10 @@ export namespace Authen {
105
105
  export interface CreateRequest {
106
106
  /** 授权类型,**固定值**: */
107
107
  grant_type: string
108
- /** 刷新 `user_access_token` 需要的凭证<br>获取user_access_token`接口和本接口均返回 `refresh_token`,**每次请求,请注意使用最新获取到的`refresh_token`** */
108
+ /**
109
+ * 刷新 `user_access_token` 需要的凭证
110
+ * 获取user_access_token`接口和本接口均返回 `refresh_token`,**每次请求,请注意使用最新获取到的`refresh_token`**
111
+ */
109
112
  refresh_token: string
110
113
  }
111
114
 
@@ -196,7 +199,10 @@ export namespace Authen {
196
199
  export interface CreateRequest {
197
200
  /** 授权类型,**固定值**: */
198
201
  grant_type: string
199
- /** 刷新 `user_access_token` 需要的凭证<br>获取user_access_token`接口和本接口均返回 `refresh_token`,**每次请求,请注意使用最新获取到的`refresh_token`** */
202
+ /**
203
+ * 刷新 `user_access_token` 需要的凭证
204
+ * 获取user_access_token`接口和本接口均返回 `refresh_token`,**每次请求,请注意使用最新获取到的`refresh_token`**
205
+ */
200
206
  refresh_token: string
201
207
  }
202
208
 
@@ -454,15 +454,36 @@ export namespace Bitable {
454
454
  }
455
455
 
456
456
  export interface ListQuery extends Pagination {
457
- /** 视图 id注意:如 filter 或 sort 有值,view_id 会被忽略。 */
457
+ /**
458
+ * 视图 id
459
+ * 注意:如 filter 或 sort 有值,view_id 会被忽略。
460
+ */
458
461
  view_id?: string
459
- /** 筛选参数注意:1.筛选记录的表达式不超过2000个字符。2.不支持对“人员”以及“关联字段”的属性进行过滤筛选,如人员的 OpenID。3.仅支持字段在页面展示字符值进行筛选。详细请参考[记录筛选开发指南](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/filter) */
462
+ /**
463
+ * 筛选参数
464
+ * 注意:
465
+ * 1.筛选记录的表达式不超过2000个字符。
466
+ * 2.不支持对“人员”以及“关联字段”的属性进行过滤筛选,如人员的 OpenID。
467
+ * 3.仅支持字段在页面展示字符值进行筛选。
468
+ * 详细请参考[记录筛选开发指南](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/filter)
469
+ */
460
470
  filter?: string
461
- /** 排序参数注意:1.表达式需要不超过1000字符。2.不支持对带“公式”和“关联字段”的表的使用。3.使用引号将字段名称和顺序逆序连接起来。 */
471
+ /**
472
+ * 排序参数
473
+ * 注意:
474
+ * 1.表达式需要不超过1000字符。
475
+ * 2.不支持对带“公式”和“关联字段”的表的使用。
476
+ * 3.使用引号将字段名称和顺序逆序连接起来。
477
+ */
462
478
  sort?: string
463
479
  /** 字段名称 */
464
480
  field_names?: string
465
- /** 控制多行文本字段数据的返回格式,true 表示以数组形式返回。注意:1.多行文本中如果有超链接部分,则会返回链接的 URL。2.目前可以返回多行文本中 URL 类型为多维表格链接、飞书 doc、飞书 sheet的URL类型以及@人员的数据结构。 */
481
+ /**
482
+ * 控制多行文本字段数据的返回格式,true 表示以数组形式返回。
483
+ * 注意:
484
+ * 1.多行文本中如果有超链接部分,则会返回链接的 URL。
485
+ * 2.目前可以返回多行文本中 URL 类型为多维表格链接、飞书 doc、飞书 sheet的URL类型以及@人员的数据结构。
486
+ */
466
487
  text_field_as_array?: boolean
467
488
  /** 此次调用中使用的用户ID的类型 */
468
489
  user_id_type?: 'user_id' | 'union_id' | 'open_id'
@@ -15,6 +15,16 @@ export namespace Board {
15
15
  export namespace Whiteboard {
16
16
  export interface Methods {
17
17
  node: Node.Methods
18
+ /**
19
+ * 获取画板主题
20
+ * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/board-v1/whiteboard/theme
21
+ */
22
+ theme(whiteboard_id: string): Promise<ThemeResponse>
23
+ /**
24
+ * 更新画板主题
25
+ * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/board-v1/whiteboard/update_theme
26
+ */
27
+ updateTheme(whiteboard_id: string, body: UpdateThemeRequest): Promise<void>
18
28
  /**
19
29
  * 获取画板缩略图片
20
30
  * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/board-v1/whiteboard/download_as_image
@@ -22,8 +32,28 @@ export namespace Board {
22
32
  downloadAsImage(whiteboard_id: string): Promise<ArrayBuffer>
23
33
  }
24
34
 
35
+ export interface ThemeResponse {
36
+ /** 主题 */
37
+ theme: 'classic' | 'minimalist_gray' | 'retro' | 'vibrant_color' | 'minimalist_blue' | 'default'
38
+ }
39
+
40
+ export interface UpdateThemeRequest {
41
+ /** 主题名称 */
42
+ theme?: string
43
+ }
44
+
25
45
  export namespace Node {
26
46
  export interface Methods {
47
+ /**
48
+ * 解析画板语法
49
+ * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/board-v1/whiteboard-node/create_plantuml
50
+ */
51
+ createPlantuml(whiteboard_id: string, body: CreatePlantumlRequest): Promise<CreatePlantumlResponse>
52
+ /**
53
+ * 创建节点
54
+ * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/board-v1/whiteboard-node/create
55
+ */
56
+ create(whiteboard_id: string, body: CreateRequest, query?: CreateQuery): Promise<CreateResponse>
27
57
  /**
28
58
  * 获取所有节点
29
59
  * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/board-v1/whiteboard-node/list
@@ -31,6 +61,39 @@ export namespace Board {
31
61
  list(whiteboard_id: string): Promise<ListResponse>
32
62
  }
33
63
 
64
+ export interface CreatePlantumlRequest {
65
+ /** plant uml 代码 */
66
+ plant_uml_code: string
67
+ style_type?: Lark.StyleType
68
+ /** 语法类型 */
69
+ syntax_type?: Lark.SyntaxType
70
+ diagram_type?: Lark.DiagramType
71
+ }
72
+
73
+ export interface CreatePlantumlResponse {
74
+ /** 创建生成的plant uml节点id */
75
+ node_id?: string
76
+ }
77
+
78
+ export interface CreateRequest {
79
+ /** 子节点数据 */
80
+ nodes?: Lark.WhiteboardNode[]
81
+ }
82
+
83
+ export interface CreateQuery {
84
+ /** 操作的唯一标识,与接口返回值的 client_token 相对应,用于幂等的进行更新操作。此值为空表示将发起一次新的请求,此值非空表示幂等的进行更新操作 */
85
+ client_token?: string
86
+ /** 此次调用中使用的用户ID的类型 */
87
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
88
+ }
89
+
90
+ export interface CreateResponse {
91
+ /** 所创建的节点 id 列表 */
92
+ ids: string[]
93
+ /** 操作的唯一标识,更新请求中使用此值表示幂等的进行此次更新 */
94
+ client_token?: string
95
+ }
96
+
34
97
  export interface ListResponse {
35
98
  /** 查询结果 */
36
99
  nodes?: Lark.WhiteboardNode[]
@@ -40,10 +103,20 @@ export namespace Board {
40
103
  }
41
104
 
42
105
  Internal.define({
43
- '/board/v1/whiteboards/{whiteboard_id}/nodes': {
44
- GET: 'board.whiteboard.node.list',
106
+ '/board/v1/whiteboards/{whiteboard_id}/theme': {
107
+ GET: 'board.whiteboard.theme',
108
+ },
109
+ '/board/v1/whiteboards/{whiteboard_id}/update_theme': {
110
+ POST: 'board.whiteboard.updateTheme',
45
111
  },
46
112
  '/board/v1/whiteboards/{whiteboard_id}/download_as_image': {
47
113
  GET: { name: 'board.whiteboard.downloadAsImage', type: 'binary' },
48
114
  },
115
+ '/board/v1/whiteboards/{whiteboard_id}/nodes/plantuml': {
116
+ POST: 'board.whiteboard.node.createPlantuml',
117
+ },
118
+ '/board/v1/whiteboards/{whiteboard_id}/nodes': {
119
+ POST: 'board.whiteboard.node.create',
120
+ GET: 'board.whiteboard.node.list',
121
+ },
49
122
  })