@satorijs/adapter-lark 3.11.9 → 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.
- package/lib/bot.d.ts +5 -5
- package/lib/http.d.ts +6 -3
- package/lib/index.cjs +293 -223
- package/lib/types/acs.d.ts +4 -1
- package/lib/types/apaas.d.ts +152 -0
- package/lib/types/application.d.ts +20 -4
- package/lib/types/approval.d.ts +0 -13
- package/lib/types/attendance.d.ts +11 -5
- package/lib/types/authen.d.ts +8 -2
- package/lib/types/bitable.d.ts +25 -4
- package/lib/types/board.d.ts +17 -0
- package/lib/types/calendar.d.ts +16 -5
- package/lib/types/contact.d.ts +55 -12
- package/lib/types/corehr.d.ts +754 -142
- package/lib/types/drive.d.ts +20 -3
- package/lib/types/ehr.d.ts +11 -2
- package/lib/types/helpdesk.d.ts +15 -6
- package/lib/types/hire.d.ts +13 -13
- package/lib/types/human_authentication.d.ts +1 -1
- package/lib/types/im.d.ts +76 -20
- package/lib/types/index.d.ts +712 -115
- package/lib/types/mail.d.ts +106 -16
- package/lib/types/search.d.ts +4 -1
- package/lib/ws.d.ts +30 -0
- package/package.json +6 -3
- package/src/bot.ts +28 -15
- package/src/http.ts +10 -4
- package/src/types/acs.ts +4 -1
- package/src/types/apaas.ts +185 -0
- package/src/types/application.ts +20 -4
- package/src/types/approval.ts +0 -15
- package/src/types/attendance.ts +11 -5
- package/src/types/authen.ts +8 -2
- package/src/types/bitable.ts +25 -4
- package/src/types/board.ts +22 -0
- package/src/types/calendar.ts +16 -5
- package/src/types/contact.ts +55 -12
- package/src/types/corehr.ts +796 -142
- package/src/types/drive.ts +20 -3
- package/src/types/ehr.ts +11 -2
- package/src/types/helpdesk.ts +15 -6
- package/src/types/hire.ts +17 -17
- package/src/types/human_authentication.ts +1 -1
- package/src/types/im.ts +76 -20
- package/src/types/index.ts +738 -115
- package/src/types/mail.ts +106 -16
- package/src/types/search.ts +4 -1
- package/src/ws.ts +183 -0
- package/lib/types/api.d.ts +0 -28510
- package/lib/types/internal.d.ts +0 -21
- package/lib/types/message/content.d.ts +0 -433
- package/lib/types/message/index.d.ts +0 -95
package/src/types/apaas.ts
CHANGED
|
@@ -16,6 +16,7 @@ export namespace Apaas {
|
|
|
16
16
|
userTask: UserTask.Methods
|
|
17
17
|
approvalTask: ApprovalTask.Methods
|
|
18
18
|
approvalInstance: ApprovalInstance.Methods
|
|
19
|
+
workspace: Workspace.Methods
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
export namespace App {
|
|
@@ -731,6 +732,175 @@ export namespace Apaas {
|
|
|
731
732
|
opinion: string
|
|
732
733
|
}
|
|
733
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
|
+
}
|
|
734
904
|
}
|
|
735
905
|
|
|
736
906
|
Internal.define({
|
|
@@ -843,4 +1013,19 @@ Internal.define({
|
|
|
843
1013
|
'/apaas/v1/user_tasks/{task_id}/chat_group': {
|
|
844
1014
|
POST: 'apaas.userTask.chatGroup',
|
|
845
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
|
+
},
|
|
846
1031
|
})
|
package/src/types/application.ts
CHANGED
|
@@ -479,7 +479,12 @@ export namespace Application {
|
|
|
479
479
|
date: string
|
|
480
480
|
/** 活跃周期的统计类型 */
|
|
481
481
|
cycle_type: DepartmentOverviewRequestCycleType
|
|
482
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
623
|
+
/**
|
|
624
|
+
* 查询的结束日期,格式为yyyy-mm-dd。不填默认为当前日期。
|
|
625
|
+
* 只能查询 180 天内的数据。
|
|
626
|
+
*/
|
|
611
627
|
to_date?: string
|
|
612
628
|
/** 反馈类型,不填写则表示查询所有反馈类型。 */
|
|
613
629
|
feedback_type?: ListQueryFeedbackType
|
package/src/types/approval.ts
CHANGED
|
@@ -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',
|
package/src/types/attendance.ts
CHANGED
|
@@ -221,7 +221,7 @@ export namespace Attendance {
|
|
|
221
221
|
export interface BatchCreateRequest {
|
|
222
222
|
/** 班表信息列表 */
|
|
223
223
|
user_daily_shifts: Lark.UserDailyShift[]
|
|
224
|
-
/** 操作人uid,如果您未操作[考勤管理后台“API 接入”流程](/
|
|
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 接入”流程](/
|
|
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
|
-
/**
|
|
662
|
+
/**
|
|
663
|
+
* 结束时间
|
|
664
|
+
* (时间间隔不超过 40 天)
|
|
665
|
+
*/
|
|
663
666
|
end_date: number
|
|
664
|
-
/**
|
|
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)[获取审批通过数据](/
|
|
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
|
package/src/types/authen.ts
CHANGED
|
@@ -105,7 +105,10 @@ export namespace Authen {
|
|
|
105
105
|
export interface CreateRequest {
|
|
106
106
|
/** 授权类型,**固定值**: */
|
|
107
107
|
grant_type: string
|
|
108
|
-
/**
|
|
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
|
-
/**
|
|
202
|
+
/**
|
|
203
|
+
* 刷新 `user_access_token` 需要的凭证
|
|
204
|
+
* 获取user_access_token`接口和本接口均返回 `refresh_token`,**每次请求,请注意使用最新获取到的`refresh_token`**
|
|
205
|
+
*/
|
|
200
206
|
refresh_token: string
|
|
201
207
|
}
|
|
202
208
|
|
package/src/types/bitable.ts
CHANGED
|
@@ -454,15 +454,36 @@ export namespace Bitable {
|
|
|
454
454
|
}
|
|
455
455
|
|
|
456
456
|
export interface ListQuery extends Pagination {
|
|
457
|
-
/**
|
|
457
|
+
/**
|
|
458
|
+
* 视图 id
|
|
459
|
+
* 注意:如 filter 或 sort 有值,view_id 会被忽略。
|
|
460
|
+
*/
|
|
458
461
|
view_id?: string
|
|
459
|
-
/**
|
|
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
|
-
/**
|
|
471
|
+
/**
|
|
472
|
+
* 排序参数
|
|
473
|
+
* 注意:
|
|
474
|
+
* 1.表达式需要不超过1000字符。
|
|
475
|
+
* 2.不支持对带“公式”和“关联字段”的表的使用。
|
|
476
|
+
* 3.使用引号将字段名称和顺序逆序连接起来。
|
|
477
|
+
*/
|
|
462
478
|
sort?: string
|
|
463
479
|
/** 字段名称 */
|
|
464
480
|
field_names?: string
|
|
465
|
-
/**
|
|
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'
|
package/src/types/board.ts
CHANGED
|
@@ -44,6 +44,11 @@ export namespace Board {
|
|
|
44
44
|
|
|
45
45
|
export namespace Node {
|
|
46
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>
|
|
47
52
|
/**
|
|
48
53
|
* 创建节点
|
|
49
54
|
* @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/board-v1/whiteboard-node/create
|
|
@@ -56,6 +61,20 @@ export namespace Board {
|
|
|
56
61
|
list(whiteboard_id: string): Promise<ListResponse>
|
|
57
62
|
}
|
|
58
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
|
+
|
|
59
78
|
export interface CreateRequest {
|
|
60
79
|
/** 子节点数据 */
|
|
61
80
|
nodes?: Lark.WhiteboardNode[]
|
|
@@ -93,6 +112,9 @@ Internal.define({
|
|
|
93
112
|
'/board/v1/whiteboards/{whiteboard_id}/download_as_image': {
|
|
94
113
|
GET: { name: 'board.whiteboard.downloadAsImage', type: 'binary' },
|
|
95
114
|
},
|
|
115
|
+
'/board/v1/whiteboards/{whiteboard_id}/nodes/plantuml': {
|
|
116
|
+
POST: 'board.whiteboard.node.createPlantuml',
|
|
117
|
+
},
|
|
96
118
|
'/board/v1/whiteboards/{whiteboard_id}/nodes': {
|
|
97
119
|
POST: 'board.whiteboard.node.create',
|
|
98
120
|
GET: 'board.whiteboard.node.list',
|
package/src/types/calendar.ts
CHANGED
|
@@ -228,7 +228,7 @@ export namespace Calendar {
|
|
|
228
228
|
time_min: string
|
|
229
229
|
/** 查询时段结束时间,需要url编码 */
|
|
230
230
|
time_max: string
|
|
231
|
-
/** 用户user_id,输入时与 room_id 二选一。参见[用户相关的 ID 概念](/
|
|
231
|
+
/** 用户user_id,输入时与 room_id 二选一。参见[用户相关的 ID 概念](https://open.feishu.cn/document/home/user-identity-introduction/introduction) */
|
|
232
232
|
user_id?: string
|
|
233
233
|
/** 会议室room_id,输入时与 user_id 二选一 */
|
|
234
234
|
room_id?: string
|
|
@@ -631,7 +631,10 @@ export namespace Calendar {
|
|
|
631
631
|
}
|
|
632
632
|
|
|
633
633
|
export interface CreateRequest {
|
|
634
|
-
/**
|
|
634
|
+
/**
|
|
635
|
+
* 新增参与人列表;
|
|
636
|
+
* - 单次请求会议室的数量限制为100。
|
|
637
|
+
*/
|
|
635
638
|
attendees?: Lark.CalendarEventAttendee[]
|
|
636
639
|
/** 是否给参与人发送bot通知 默认为true */
|
|
637
640
|
need_notification?: boolean
|
|
@@ -654,7 +657,7 @@ export namespace Calendar {
|
|
|
654
657
|
}
|
|
655
658
|
|
|
656
659
|
export interface BatchDeleteRequest {
|
|
657
|
-
/** 要移除的参与人 ID 列表。参见[参与人ID说明](/
|
|
660
|
+
/** 要移除的参与人 ID 列表。参见[参与人ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event-attendee/introduction#4998889c) */
|
|
658
661
|
attendee_ids?: string[]
|
|
659
662
|
/** 需要删除的参与人类型实体ID,作为attendee_ids字段的补充。 */
|
|
660
663
|
delete_ids?: Lark.CalendarEventAttendeeId[]
|
|
@@ -720,7 +723,11 @@ export namespace Calendar {
|
|
|
720
723
|
end_time: string
|
|
721
724
|
/** 休假日程标题,可自定义例如:"请假中(全天) / 1-Day Time Off","请假中(半天) / 0.5-Day Time Off","长期休假中 / Leave of Absence","请假中" */
|
|
722
725
|
title?: string
|
|
723
|
-
/**
|
|
726
|
+
/**
|
|
727
|
+
* 休假日程描述,可自定义,例如:
|
|
728
|
+
* "若拒绝或删除此日程,飞书中相应的“请假”标签将自动消失,而请假系统中的休假申请不会被撤销。
|
|
729
|
+
* If the event is rejected or deleted, corresponding "On Leave" tag in Feishu will disappear, while the leave request in the time off system will not be revoked."
|
|
730
|
+
*/
|
|
724
731
|
description?: string
|
|
725
732
|
}
|
|
726
733
|
|
|
@@ -742,7 +749,11 @@ export namespace Calendar {
|
|
|
742
749
|
end_time: string
|
|
743
750
|
/** 休假日程标题,可自定义例如:"请假中(全天) / 1-Day Time Off","请假中(半天) / 0.5-Day Time Off","长期休假中 / Leave of Absence","请假中" */
|
|
744
751
|
title?: string
|
|
745
|
-
/**
|
|
752
|
+
/**
|
|
753
|
+
* 休假日程描述,可自定义,例如:
|
|
754
|
+
* "若拒绝或删除此日程,飞书中相应的“请假”标签将自动消失,而请假系统中的休假申请不会被撤销。
|
|
755
|
+
* If the event is rejected or deleted, corresponding "On Leave" tag in Feishu will disappear, while the leave request in the time off system will not be revoked."
|
|
756
|
+
*/
|
|
746
757
|
description?: string
|
|
747
758
|
}
|
|
748
759
|
}
|
package/src/types/contact.ts
CHANGED
|
@@ -181,7 +181,10 @@ export namespace Contact {
|
|
|
181
181
|
export interface CreateQuery {
|
|
182
182
|
/** 此次调用中使用的用户ID的类型 */
|
|
183
183
|
user_id_type?: 'user_id' | 'union_id' | 'open_id'
|
|
184
|
-
/**
|
|
184
|
+
/**
|
|
185
|
+
* 此次调用中使用的部门ID的类型。
|
|
186
|
+
* 不同 ID 的说明参见[部门ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/field-overview#23857fe0)
|
|
187
|
+
*/
|
|
185
188
|
department_id_type?: 'department_id' | 'open_department_id'
|
|
186
189
|
/** 用于幂等判断是否为同一请求,避免重复创建。字符串类型,自行生成。 */
|
|
187
190
|
client_token?: string
|
|
@@ -279,7 +282,10 @@ export namespace Contact {
|
|
|
279
282
|
export interface GetQuery {
|
|
280
283
|
/** 此次调用中使用的用户ID的类型 */
|
|
281
284
|
user_id_type?: 'user_id' | 'union_id' | 'open_id'
|
|
282
|
-
/**
|
|
285
|
+
/**
|
|
286
|
+
* 此次调用中使用的部门ID的类型
|
|
287
|
+
* 不同 ID 的说明 [部门ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/field-overview#23857fe0)
|
|
288
|
+
*/
|
|
283
289
|
department_id_type?: 'department_id' | 'open_department_id'
|
|
284
290
|
}
|
|
285
291
|
|
|
@@ -304,16 +310,32 @@ export namespace Contact {
|
|
|
304
310
|
export interface FindByDepartmentQuery extends Pagination {
|
|
305
311
|
/** 此次调用中使用的用户ID的类型 */
|
|
306
312
|
user_id_type?: 'user_id' | 'union_id' | 'open_id'
|
|
307
|
-
/**
|
|
313
|
+
/**
|
|
314
|
+
* 此次调用中使用的部门ID的类型
|
|
315
|
+
* 部门ID类型的区别参见[部门ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/field-overview#23857fe0)
|
|
316
|
+
*/
|
|
308
317
|
department_id_type?: 'department_id' | 'open_department_id'
|
|
309
|
-
/**
|
|
318
|
+
/**
|
|
319
|
+
* 填写该字段表示获取该部门下用户,必填。根部门的部门ID为0。
|
|
320
|
+
* ID值与查询参数中的department_id_type 对应。
|
|
321
|
+
* 不同 ID 的说明与department_id的获取方式参见 [部门ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/field-overview#23857fe0)
|
|
322
|
+
*/
|
|
310
323
|
department_id: string
|
|
311
324
|
}
|
|
312
325
|
|
|
313
326
|
export interface BatchGetIdRequest {
|
|
314
|
-
/**
|
|
327
|
+
/**
|
|
328
|
+
* 要查询的用户邮箱,最多 50 条。
|
|
329
|
+
* 注意,emails与mobiles相互独立,每条用户邮箱返回对应的用户ID。
|
|
330
|
+
* 本接口返回的用户ID数量为emails数量与mobiles数量的和。
|
|
331
|
+
*/
|
|
315
332
|
emails?: string[]
|
|
316
|
-
/**
|
|
333
|
+
/**
|
|
334
|
+
* 要查询的用户手机号,最多 50 条。
|
|
335
|
+
* 注意
|
|
336
|
+
* 1. emails与mobiles相互独立,每条用户手机号返回对应的用户ID。
|
|
337
|
+
* 2. 非中国大陆地区的手机号需要添加以 “+” 开头的国家 / 地区代码。
|
|
338
|
+
*/
|
|
317
339
|
mobiles?: string[]
|
|
318
340
|
/** 查询结果包含离职员工,可查询离职用户的ID */
|
|
319
341
|
include_resigned?: boolean
|
|
@@ -495,7 +517,12 @@ export namespace Contact {
|
|
|
495
517
|
description?: string
|
|
496
518
|
/** 用户组的类型。默认为1表示普通用户组 */
|
|
497
519
|
type?: CreateRequestType
|
|
498
|
-
/**
|
|
520
|
+
/**
|
|
521
|
+
* 自定义用户组ID,可在创建时自定义,不自定义则由系统自动生成,已创建用户组不允许修改 group_id 。
|
|
522
|
+
* 自定义group_id数据校验规则:
|
|
523
|
+
* 最大长度:64 字符
|
|
524
|
+
* 校验规则:数字、大小写字母的组合,不能包含空格
|
|
525
|
+
*/
|
|
499
526
|
group_id?: string
|
|
500
527
|
}
|
|
501
528
|
|
|
@@ -514,7 +541,10 @@ export namespace Contact {
|
|
|
514
541
|
export interface PatchRequest {
|
|
515
542
|
/** 用户组的名字,企业内唯一,最大长度:100 字符 */
|
|
516
543
|
name?: string
|
|
517
|
-
/**
|
|
544
|
+
/**
|
|
545
|
+
* 用户组描述信息
|
|
546
|
+
* 最大长度:500 字
|
|
547
|
+
*/
|
|
518
548
|
description?: string
|
|
519
549
|
}
|
|
520
550
|
|
|
@@ -614,7 +644,11 @@ export namespace Contact {
|
|
|
614
644
|
}
|
|
615
645
|
|
|
616
646
|
export interface SimplelistQuery extends Pagination {
|
|
617
|
-
/**
|
|
647
|
+
/**
|
|
648
|
+
* 欲获取成员ID类型。
|
|
649
|
+
* 当member_type=user时候,member_id_type表示user_id_type,枚举值open_id, union_id和user_id。
|
|
650
|
+
* 当member_type=department时候,member_id_type表示department_id_type,枚举值open_id和department_id。
|
|
651
|
+
*/
|
|
618
652
|
member_id_type?: 'open_id' | 'union_id' | 'user_id' | 'department_id'
|
|
619
653
|
/** 欲获取的用户组成员类型。 */
|
|
620
654
|
member_type?: 'user' | 'department'
|
|
@@ -820,7 +854,10 @@ export namespace Contact {
|
|
|
820
854
|
export interface CreateQuery {
|
|
821
855
|
/** 此次调用中使用的用户ID的类型 */
|
|
822
856
|
user_id_type?: 'user_id' | 'union_id' | 'open_id'
|
|
823
|
-
/**
|
|
857
|
+
/**
|
|
858
|
+
* 此次调用中使用的部门ID的类型
|
|
859
|
+
* 不同 ID 的说明参见[部门ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/field-overview#23857fe0)
|
|
860
|
+
*/
|
|
824
861
|
department_id_type?: 'department_id' | 'open_department_id'
|
|
825
862
|
/** 用于幂等判断是否为同一请求,避免重复创建。字符串类型,自行生成。 */
|
|
826
863
|
client_token?: string
|
|
@@ -915,7 +952,10 @@ export namespace Contact {
|
|
|
915
952
|
export interface GetQuery {
|
|
916
953
|
/** 此次调用中使用的用户ID的类型 */
|
|
917
954
|
user_id_type?: 'user_id' | 'union_id' | 'open_id'
|
|
918
|
-
/**
|
|
955
|
+
/**
|
|
956
|
+
* 此次调用中使用的部门ID的类型
|
|
957
|
+
* 不同 ID 的说明 [部门ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/field-overview#23857fe0)
|
|
958
|
+
*/
|
|
919
959
|
department_id_type?: 'department_id' | 'open_department_id'
|
|
920
960
|
}
|
|
921
961
|
|
|
@@ -940,7 +980,10 @@ export namespace Contact {
|
|
|
940
980
|
export interface ChildrenQuery extends Pagination {
|
|
941
981
|
/** 此次调用中使用的用户ID的类型 */
|
|
942
982
|
user_id_type?: 'user_id' | 'union_id' | 'open_id'
|
|
943
|
-
/**
|
|
983
|
+
/**
|
|
984
|
+
* 此次调用中使用的部门ID的类型
|
|
985
|
+
* 不同 ID 的说明与department_id的获取方式参见 [部门ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/field-overview#23857fe0)
|
|
986
|
+
*/
|
|
944
987
|
department_id_type?: 'department_id' | 'open_department_id'
|
|
945
988
|
/** 是否递归获取子部门 */
|
|
946
989
|
fetch_child?: boolean
|