@satorijs/adapter-lark 3.12.3 → 3.12.5

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.
@@ -15,6 +15,7 @@ export declare namespace Bitable {
15
15
  dashboard: Dashboard.Methods;
16
16
  role: Role.Methods;
17
17
  workflow: Workflow.Methods;
18
+ blockWorkflow: BlockWorkflow.Methods;
18
19
  /**
19
20
  * 创建多维表格
20
21
  * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app/create
@@ -77,6 +78,7 @@ export declare namespace Bitable {
77
78
  view: View.Methods;
78
79
  record: Record.Methods;
79
80
  field: Field.Methods;
81
+ fieldGroup: FieldGroup.Methods;
80
82
  form: Form.Methods;
81
83
  /**
82
84
  * 新增一个数据表
@@ -614,9 +616,31 @@ export declare namespace Bitable {
614
616
  deleted?: boolean;
615
617
  }
616
618
  }
619
+ namespace FieldGroup {
620
+ interface Methods {
621
+ /**
622
+ * 创建字段编组
623
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-field_group/create
624
+ */
625
+ create(app_token: string, table_id: string, body: CreateRequest): Promise<CreateResponse>;
626
+ }
627
+ interface CreateRequest {
628
+ /** 要新增字段编组列表 */
629
+ field_groups: Lark.FieldGroup[];
630
+ }
631
+ interface CreateResponse {
632
+ /** 字段编组的内容 */
633
+ field_groups?: string;
634
+ }
635
+ }
617
636
  namespace Form {
618
637
  interface Methods {
619
638
  field: Field.Methods;
639
+ /**
640
+ * 升级表单
641
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-form/upgrade
642
+ */
643
+ upgrade(app_token: string, table_id: string, form_id: string, body: UpgradeRequest): Promise<UpgradeResponse>;
620
644
  /**
621
645
  * 更新表单元数据
622
646
  * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-form/patch
@@ -628,6 +652,20 @@ export declare namespace Bitable {
628
652
  */
629
653
  get(app_token: string, table_id: string, form_id: string): Promise<GetResponse>;
630
654
  }
655
+ interface UpgradeRequest {
656
+ /** 升级后的表单名称 */
657
+ form_name: string;
658
+ /**
659
+ * 表单布局模式。可选值
660
+ * - traditional:传统布局
661
+ * - one_question_per_page:一页一题布局:
662
+ */
663
+ display_mode: Lark.FormDisplayMode;
664
+ }
665
+ interface UpgradeResponse {
666
+ /** 升级后的表单 */
667
+ form?: Lark.UpgradedForm;
668
+ }
631
669
  interface PatchRequest {
632
670
  /** 表单名称 */
633
671
  name?: string;
@@ -852,5 +890,18 @@ export declare namespace Bitable {
852
890
  status: string;
853
891
  }
854
892
  }
893
+ namespace BlockWorkflow {
894
+ interface Methods {
895
+ /**
896
+ * 列出工作流
897
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-block_workflow/list
898
+ */
899
+ list(app_token: string): Promise<ListResponse>;
900
+ }
901
+ interface ListResponse {
902
+ /** 工作流列表 */
903
+ workflows?: Lark.BlockWorkflow[];
904
+ }
905
+ }
855
906
  }
856
907
  }
@@ -69,6 +69,11 @@ export declare namespace Contact {
69
69
  * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/user/get
70
70
  */
71
71
  get(user_id: string, query?: GetQuery): Promise<GetResponse>;
72
+ /**
73
+ * 通过 ID 获取用户姓名
74
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/user/basic_batch
75
+ */
76
+ basicBatch(body: BasicBatchRequest, query?: BasicBatchQuery): Promise<BasicBatchResponse>;
72
77
  /**
73
78
  * 批量获取用户信息
74
79
  * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/user/batch
@@ -274,6 +279,18 @@ export declare namespace Contact {
274
279
  interface GetResponse {
275
280
  user?: Lark.User;
276
281
  }
282
+ interface BasicBatchRequest {
283
+ /** 用户ID */
284
+ user_ids: string[];
285
+ }
286
+ interface BasicBatchQuery {
287
+ /** 此次调用中使用的用户ID的类型 */
288
+ user_id_type?: 'user_id' | 'union_id' | 'open_id';
289
+ }
290
+ interface BasicBatchResponse {
291
+ /** 用户信息 */
292
+ users?: Lark.BasicUser[];
293
+ }
277
294
  interface BatchQuery {
278
295
  /** 要查询的用户ID列表 */
279
296
  user_ids: string[];
@@ -57,6 +57,7 @@ export declare namespace Corehr {
57
57
  bp: Bp.Methods;
58
58
  assignedUser: AssignedUser.Methods;
59
59
  process: Process.Methods;
60
+ processStart: ProcessStart.Methods;
60
61
  processRevoke: ProcessRevoke.Methods;
61
62
  processWithdraw: ProcessWithdraw.Methods;
62
63
  approver: Approver.Methods;
@@ -703,6 +704,7 @@ export declare namespace Corehr {
703
704
  }
704
705
  namespace Employee {
705
706
  interface Methods {
707
+ customOrg: CustomOrg.Methods;
706
708
  /**
707
709
  * 批量查询员工信息
708
710
  * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/employee/batch_get
@@ -922,6 +924,127 @@ export declare namespace Corehr {
922
924
  /** 任职信息 ID */
923
925
  job_data_id?: string;
924
926
  }
927
+ namespace CustomOrg {
928
+ interface Methods {
929
+ /**
930
+ * 新增人员自定义组织变更记录
931
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/employee-custom_org/create_emp_custom_org
932
+ */
933
+ createEmpCustomOrg(body: CreateEmpCustomOrgRequest, query?: CreateEmpCustomOrgQuery): Promise<CreateEmpCustomOrgResponse>;
934
+ /**
935
+ * 更新人员自定义组织变更记录
936
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/employee-custom_org/edit_emp_custom_org
937
+ */
938
+ editEmpCustomOrg(body: EditEmpCustomOrgRequest, query?: EditEmpCustomOrgQuery): Promise<EditEmpCustomOrgResponse>;
939
+ /**
940
+ * 查询单个人员自定义组织变更记录
941
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/employee-custom_org/querybyid
942
+ */
943
+ querybyid(query?: QuerybyidQuery): Promise<QuerybyidResponse>;
944
+ /**
945
+ * 批量查询人员自定义组织变更记录
946
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/employee-custom_org/employment_custom_org_record
947
+ */
948
+ employmentCustomOrgRecord(query?: EmploymentCustomOrgRecordQuery): Promise<EmploymentCustomOrgRecordResponse>;
949
+ /**
950
+ * 删除人员自定义组织变更记录
951
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/employee-custom_org/del
952
+ */
953
+ del(body: DelRequest, query?: DelQuery): Promise<DelResponse>;
954
+ }
955
+ interface CreateEmpCustomOrgRequest {
956
+ /** 用户ID */
957
+ user_id: string;
958
+ /** 自定义组织类型编码 */
959
+ object_api_name: string;
960
+ /** 自定义组织列表 */
961
+ custom_org_with_rates: Lark.CustomOrgWithRate[];
962
+ /** 变更原因 */
963
+ start_reason?: string;
964
+ /** 生效时间 */
965
+ effective_time: string;
966
+ }
967
+ interface CreateEmpCustomOrgQuery {
968
+ /** 此次调用中使用的用户ID的类型 */
969
+ user_id_type: 'people_corehr_id' | 'open_id' | 'union_id' | 'user_id';
970
+ }
971
+ interface CreateEmpCustomOrgResponse {
972
+ /** 自定义组织ID */
973
+ job_data_custom_org_id: string;
974
+ /** 版本ID */
975
+ version_id: string;
976
+ }
977
+ interface EditEmpCustomOrgRequest {
978
+ /** 用户ID */
979
+ user_id: string;
980
+ /** 自定义组织类型编码 */
981
+ object_api_name: string;
982
+ /** 自定义组织ID */
983
+ job_data_custom_org_id: string;
984
+ /** 版本ID */
985
+ version_id: string;
986
+ /** 自定义组织列表 */
987
+ custom_org_with_rates: Lark.CustomOrgWithRate[];
988
+ /** 生效时间 */
989
+ effective_time: string;
990
+ /** 变更原因 */
991
+ start_reason?: string;
992
+ }
993
+ interface EditEmpCustomOrgQuery {
994
+ /** 此次调用中使用的用户ID的类型 */
995
+ user_id_type: 'open_id' | 'union_id' | 'user_id' | 'people_corehr_id';
996
+ }
997
+ interface EditEmpCustomOrgResponse {
998
+ /** 添加成功 */
999
+ data?: string;
1000
+ }
1001
+ interface QuerybyidQuery {
1002
+ /** 自定义组织ID */
1003
+ job_data_custom_org_id: string;
1004
+ /** 版本IDs 。为空是查 全部的版本记录 */
1005
+ version_id?: string[];
1006
+ /** 自定义组织类型编码 */
1007
+ object_api_name: string;
1008
+ /** 用户ID标识 */
1009
+ user_id_type: 'people_corehr_id' | 'open_id' | 'union_id' | 'user_id';
1010
+ }
1011
+ interface QuerybyidResponse {
1012
+ /** 详情 */
1013
+ custom_org: Lark.EmpCustomOrgList[];
1014
+ /** 用户编码 */
1015
+ user_id?: string;
1016
+ }
1017
+ interface EmploymentCustomOrgRecordQuery {
1018
+ /** 用户ID */
1019
+ user_ids: string[];
1020
+ /** 用户 ID 类型 */
1021
+ user_id_type: 'open_id' | 'union_id' | 'user_id' | 'people_corehr_id';
1022
+ /** 组织类型编码,可在「飞书人事-设置-组织设置」中相应的自定义组织目录下查看 */
1023
+ object_api_names: string[];
1024
+ }
1025
+ interface EmploymentCustomOrgRecordResponse {
1026
+ /** 自定义组织列表 */
1027
+ custom_org_list?: Lark.EmpCustomOrgList[];
1028
+ }
1029
+ interface DelRequest {
1030
+ /** 用户ID */
1031
+ user_id: string;
1032
+ /** 自定义组织ID */
1033
+ job_data_custom_org_id: string;
1034
+ /** 版本ID */
1035
+ version_id: string;
1036
+ /** 自定义组织类型编码 */
1037
+ object_api_name: string;
1038
+ }
1039
+ interface DelQuery {
1040
+ /** 此次调用中使用的用户ID的类型 */
1041
+ user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_corehr_id';
1042
+ }
1043
+ interface DelResponse {
1044
+ /** 返回值 */
1045
+ data: string;
1046
+ }
1047
+ }
925
1048
  }
926
1049
  namespace Person {
927
1050
  interface Methods {
@@ -2622,6 +2745,11 @@ export declare namespace Corehr {
2622
2745
  * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/location/query_recent_change
2623
2746
  */
2624
2747
  queryRecentChange(query?: QueryRecentChangeQuery): Promise<QueryRecentChangeResponse>;
2748
+ /**
2749
+ * 查询指定时间范围地点版本
2750
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/location/query_multi_timeline
2751
+ */
2752
+ queryMultiTimeline(body: QueryMultiTimelineRequest): Promise<QueryMultiTimelineResponse>;
2625
2753
  /**
2626
2754
  * 通过地点 ID 批量获取地点信息
2627
2755
  * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/location/batch_get
@@ -2716,6 +2844,20 @@ export declare namespace Corehr {
2716
2844
  /** 删除的地点 ID 列表 */
2717
2845
  deleted_location_ids?: string[];
2718
2846
  }
2847
+ interface QueryMultiTimelineRequest {
2848
+ /** 地点 ID 列表 */
2849
+ location_ids: string[];
2850
+ /** 查询开始时间(包含) */
2851
+ start_date?: string;
2852
+ /** 查询结束时间(包含) */
2853
+ end_date?: string;
2854
+ /** 返回数据的字段列表,可选["location_name", "code", "active", "parent_location_id", "description", "effective_date"] */
2855
+ fields?: string[];
2856
+ }
2857
+ interface QueryMultiTimelineResponse {
2858
+ /** 地点信息 */
2859
+ items?: Lark.LocationTimeline[];
2860
+ }
2719
2861
  interface BatchGetRequest {
2720
2862
  /** 地点 ID 列表 */
2721
2863
  location_ids: string[];
@@ -2865,6 +3007,11 @@ export declare namespace Corehr {
2865
3007
  * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/company/list
2866
3008
  */
2867
3009
  list(query?: Pagination): Paginated<Lark.Company>;
3010
+ /**
3011
+ * 查询指定时间范围公司版本
3012
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/company/query_multi_timeline
3013
+ */
3014
+ queryMultiTimeline(body: QueryMultiTimelineRequest): Promise<QueryMultiTimelineResponse>;
2868
3015
  /**
2869
3016
  * 查询当前生效信息变更公司
2870
3017
  * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/company/query_recent_change
@@ -2975,6 +3122,20 @@ export declare namespace Corehr {
2975
3122
  /** 公司信息 */
2976
3123
  company?: Lark.Company;
2977
3124
  }
3125
+ interface QueryMultiTimelineRequest {
3126
+ /** 公司 ID 列表 */
3127
+ company_ids: string[];
3128
+ /** 查询开始时间(包含) */
3129
+ start_date?: string;
3130
+ /** 查询结束时间(包含) */
3131
+ end_date?: string;
3132
+ /** 返回数据的字段列表,可选["company_name", "code", "active", "description", "effective_date", "expiration_date"] */
3133
+ fields?: string[];
3134
+ }
3135
+ interface QueryMultiTimelineResponse {
3136
+ /** 公司信息 */
3137
+ items?: Lark.CompanyTimeline[];
3138
+ }
2978
3139
  interface QueryRecentChangeQuery extends Pagination {
2979
3140
  /** 查询的开始时间,支持"yyyy-MM-dd HH:MM:SS" */
2980
3141
  start_date: string;
@@ -4406,6 +4567,11 @@ export declare namespace Corehr {
4406
4567
  namespace Probation {
4407
4568
  interface Methods {
4408
4569
  assessment: Assessment.Methods;
4570
+ /**
4571
+ * 编辑试用期
4572
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/probation/edit
4573
+ */
4574
+ edit(body: EditRequest, query?: EditQuery): Promise<void>;
4409
4575
  /**
4410
4576
  * 启用/停用试用期考核功能
4411
4577
  * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/probation/enable_disable_assessment
@@ -4427,6 +4593,34 @@ export declare namespace Corehr {
4427
4593
  */
4428
4594
  withdraw(body: WithdrawRequest, query?: WithdrawQuery): Promise<void>;
4429
4595
  }
4596
+ interface EditRequest {
4597
+ /** 试用期人员的雇佣 ID */
4598
+ employment_id: string;
4599
+ /** 试用期开始日期,格式:"YYYY-MM-DD",填写时满足以下规则 - 「试用期开始日期」和「试用期预计结束日期」需要一同填写。 - 若该员工存在试用期记录,且同时填写「试用期开始日期」和「试用期预计结束日期」为空串,则删除该试用期记录。 - 若该员工不存在试用期记录,且填写「试用期开始日期」和「试用期预计结束日期」,则新增试用期记录。 - 若该员工不存在试用期记录,且未填写「试用期开始日期」和「试用期预计结束日期」,则试用期记录不会创建,其他写入数据不会生效。 - 入职日期 <= 试用期开始日期 <= 试用期预计结束日期 */
4600
+ probation_start_date?: string;
4601
+ /** 试用期预计结束日期,格式:"YYYY-MM-DD",填写时满足以下规则 - 「试用期开始日期」和「试用期预计结束日期」需要一同填写。 - 若该员工存在试用期记录,且同时填写「试用期开始日期」和「试用期预计结束日期」为空串,则删除该试用期记录。 - 若该员工不存在试用期记录,且填写「试用期开始日期」和「试用期预计结束日期」,则新增试用期记录。 - 若该员工不存在试用期记录,且未填写「试用期开始日期」和「试用期预计结束日期」,则试用期记录不会创建,其他写入数据不会生效。 - 试用期开始日期 <= 试用期预计结束日期 */
4602
+ probation_expected_end_date?: string;
4603
+ /** 试用期结果,填写时满足以下规则 - 填写「通过」时,必填「试用期实际结束日期」。 - 填写「延长」时,「延长后试用期预计结束日期」和「试用期预计延长时长」至少填写一项。 */
4604
+ probation_outcome?: 'passed' | 'failed' | 'delayed';
4605
+ /** 试用期实际结束日期,格式:"YYYY-MM-DD",填写时满足以下规则 - 需同时指定试用期结果为「通过」。 - 在试用期结果为空时,填写后将自动赋值试用期结果为「通过」。 - 试用期开始时间 <= 试用期实际结束日期 <= 试用期预计结束日期。 */
4606
+ actual_probation_end_date?: string;
4607
+ /** 延长后试用期预计结束日期,格式:"YYYY-MM-DD",填写时满足以下规则 - 需同时指定「试用期结果」为「延期」。 - 若同时填写「试用期预计延长时长」,需保持两者数据一致。 - 延长后试用期预计结束日期 > 试用期预计结束日期。 */
4608
+ probation_extend_expected_end_date?: string;
4609
+ /** 试用期预计延长时长,填写时满足以下规则 - 需同时指定「试用期结果」为「延期」。 - 填写时需要指定「试用期延长时长单位」。 - 若同时填写「延长后试用期预计结束日期」,需保持两者数据一致。 - 试用期预计延长时长 > 0。 */
4610
+ extended_probation_period_duration?: number;
4611
+ /** 试用期延长时长单位,填写时满足以下规则 - 需要和「试用期预计延长时长」一同填写。 - 需同时指定「试用期结果」为「延期」。 */
4612
+ extended_probation_period_unit?: 'day' | 'week' | 'month';
4613
+ /** 备注 */
4614
+ notes?: string;
4615
+ /** 员工自评 */
4616
+ self_review?: string;
4617
+ /** 自定义字段(当前不支持附件类型字段写入) */
4618
+ custom_fields?: Lark.CustomFieldData[];
4619
+ }
4620
+ interface EditQuery {
4621
+ /** 用户 ID 类型 */
4622
+ user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_corehr_id';
4623
+ }
4430
4624
  interface EnableDisableAssessmentRequest {
4431
4625
  /** 启用 / 停用状态。启用后可在试用期管理页面中可见试用期考核相关的字段。 */
4432
4626
  active: boolean;
@@ -5760,6 +5954,7 @@ export declare namespace Corehr {
5760
5954
  namespace Process {
5761
5955
  interface Methods {
5762
5956
  formVariableData: FormVariableData.Methods;
5957
+ queryFlowDataTemplate: QueryFlowDataTemplate.Methods;
5763
5958
  approver: Approver.Methods;
5764
5959
  extra: Extra.Methods;
5765
5960
  transfer: Transfer.Methods;
@@ -5892,6 +6087,31 @@ export declare namespace Corehr {
5892
6087
  process_id?: string;
5893
6088
  }
5894
6089
  }
6090
+ namespace QueryFlowDataTemplate {
6091
+ interface Methods {
6092
+ /**
6093
+ * 查询流程数据参数模板
6094
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/process-query_flow_data_template/create
6095
+ */
6096
+ create(body: CreateRequest, query?: CreateQuery): Promise<CreateResponse>;
6097
+ }
6098
+ interface CreateRequest {
6099
+ /** 流程定义ID */
6100
+ flow_definition_id: string;
6101
+ /** 需要传入的变量的ApiName。如果是多级下钻变量用"."分割 */
6102
+ variable_api_names: string[];
6103
+ }
6104
+ interface CreateQuery {
6105
+ /** 此次调用中使用的用户ID的类型 */
6106
+ user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_corehr_id';
6107
+ }
6108
+ interface CreateResponse {
6109
+ /** 流程参数模板 */
6110
+ field_values: Lark.ProcessFormVariableV2[];
6111
+ /** 错误信息 */
6112
+ error_info?: string;
6113
+ }
6114
+ }
5895
6115
  namespace Approver {
5896
6116
  interface Methods {
5897
6117
  /**
@@ -6002,6 +6222,35 @@ export declare namespace Corehr {
6002
6222
  }
6003
6223
  }
6004
6224
  }
6225
+ namespace ProcessStart {
6226
+ interface Methods {
6227
+ /**
6228
+ * 发起流程
6229
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/process_start/create
6230
+ */
6231
+ create(body: CreateRequest, query?: CreateQuery): Promise<CreateResponse>;
6232
+ }
6233
+ interface CreateRequest {
6234
+ /** 流程定义ID */
6235
+ flow_definition_id: string;
6236
+ /** 发起人用户ID,按user_id_type类型传递。如果system_initiator为false,则必填;为true时非必填。 */
6237
+ initiator_id?: string;
6238
+ /** 是否为系统身份发起流程。 true - 使用系统身份发起,若使用系统身份;false - 按照所传的人员身份审批 */
6239
+ system_initiator?: boolean;
6240
+ /** 业务数据 */
6241
+ flow_data?: Lark.ProcessFormVariableV2[];
6242
+ }
6243
+ interface CreateQuery {
6244
+ /** 用户 ID 类型 */
6245
+ user_id_type?: 'open_id' | 'union_id' | 'user_id' | 'people_corehr_id';
6246
+ /** 此次调用中使用的部门 ID 类型 */
6247
+ department_id_type?: 'open_department_id' | 'department_id' | 'people_corehr_department_id';
6248
+ }
6249
+ interface CreateResponse {
6250
+ /** 流程实例id */
6251
+ process_id?: string;
6252
+ }
6253
+ }
6005
6254
  namespace ProcessRevoke {
6006
6255
  interface Methods {
6007
6256
  /**
@@ -12,7 +12,9 @@ export declare namespace Drive {
12
12
  importTask: ImportTask.Methods;
13
13
  exportTask: ExportTask.Methods;
14
14
  media: Media.Methods;
15
+ user: User.Methods;
15
16
  permission: Permission.Methods;
17
+ commentReaction: CommentReaction.Methods;
16
18
  }
17
19
  namespace File {
18
20
  interface Methods {
@@ -545,6 +547,11 @@ export declare namespace Drive {
545
547
  }
546
548
  namespace Reply {
547
549
  interface Methods {
550
+ /**
551
+ * 添加回复
552
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment-reply/create
553
+ */
554
+ create(file_token: string, comment_id: string, body: CreateRequest, query?: CreateQuery): Promise<CreateResponse>;
548
555
  /**
549
556
  * 获取回复信息
550
557
  * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment-reply/list
@@ -561,6 +568,32 @@ export declare namespace Drive {
561
568
  */
562
569
  delete(file_token: string, comment_id: string, reply_id: string, query?: DeleteQuery): Promise<void>;
563
570
  }
571
+ interface CreateRequest {
572
+ /** 回复内容 */
573
+ content: Lark.ReplyContent;
574
+ }
575
+ interface CreateQuery {
576
+ /** 文档类型 */
577
+ file_type: 'doc' | 'sheet' | 'file' | 'docx';
578
+ /** 此次调用中使用的用户ID的类型 */
579
+ user_id_type?: 'user_id' | 'union_id' | 'open_id';
580
+ }
581
+ interface CreateResponse {
582
+ /** 回复内容 */
583
+ content: Lark.ReplyContent;
584
+ /** 回复 ID */
585
+ reply_id?: string;
586
+ /** 用户 ID */
587
+ user_id?: string;
588
+ /** 创建时间 */
589
+ create_time?: number;
590
+ /** 更新时间 */
591
+ update_time?: number;
592
+ /** 回复的其他内容,图片 Token 等 */
593
+ extra?: Lark.ReplyExtra;
594
+ /** 评论回复卡片上对应的表情回复信息 */
595
+ reactions?: Lark.FileCommentV2BatchQueryReactionData[];
596
+ }
564
597
  interface ListQuery extends Pagination {
565
598
  /** 文档类型 */
566
599
  file_type: 'doc' | 'sheet' | 'file' | 'docx';
@@ -859,6 +892,41 @@ export declare namespace Drive {
859
892
  tmp_download_urls?: Lark.TmpDownloadUrl[];
860
893
  }
861
894
  }
895
+ namespace User {
896
+ interface Methods {
897
+ /**
898
+ * 订阅用户云文档事件
899
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/user/subscription
900
+ */
901
+ subscription(body: SubscriptionRequest): Promise<void>;
902
+ /**
903
+ * 取消用户云文档事件订阅
904
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/user/remove_subscription
905
+ */
906
+ removeSubscription(query?: RemoveSubscriptionQuery): Promise<void>;
907
+ /**
908
+ * 查询用户云文档事件订阅状态
909
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/user/subscription_status
910
+ */
911
+ subscriptionStatus(query?: SubscriptionStatusQuery): Promise<SubscriptionStatusResponse>;
912
+ }
913
+ interface SubscriptionRequest {
914
+ /** 事件类型 */
915
+ event_type: string;
916
+ }
917
+ interface RemoveSubscriptionQuery {
918
+ /** 事件类型 */
919
+ event_type: string;
920
+ }
921
+ interface SubscriptionStatusQuery {
922
+ /** 事件类型 */
923
+ event_type: string;
924
+ }
925
+ interface SubscriptionStatusResponse {
926
+ /** 订阅状态 */
927
+ data: string;
928
+ }
929
+ }
862
930
  namespace Permission {
863
931
  interface Methods {
864
932
  member: Member.Methods;
@@ -1112,4 +1180,25 @@ export declare namespace Drive {
1112
1180
  }
1113
1181
  }
1114
1182
  }
1183
+ namespace CommentReaction {
1184
+ interface Methods {
1185
+ /**
1186
+ * 添加/取消表情回应
1187
+ * @see https://open.feishu.cn/document/ukTMukTMukTM/uIzNzUjLyczM14iM3MTN/drive-v2/comment_reaction/update_reaction
1188
+ */
1189
+ updateReaction(file_token: string, body: UpdateReactionRequest, query?: UpdateReactionQuery): Promise<void>;
1190
+ }
1191
+ interface UpdateReactionRequest {
1192
+ /** 操作类型: add/delete */
1193
+ action: 'add' | 'delete';
1194
+ /** 回复 ID */
1195
+ reply_id: string;
1196
+ /** reaction 类型 */
1197
+ reaction_type: string;
1198
+ }
1199
+ interface UpdateReactionQuery {
1200
+ /** 文件类型,用于区分不同类型的云文档,可选值需参考开放平台文件类型枚举规范。 */
1201
+ file_type: string;
1202
+ }
1203
+ }
1115
1204
  }
package/lib/types/im.d.ts CHANGED
@@ -61,7 +61,7 @@ export declare namespace Im {
61
61
  */
62
62
  pushFollowUp(message_id: string, body: PushFollowUpRequest): Promise<void>;
63
63
  /**
64
- * 查询消息已读信息
64
+ * 消息发送者查询消息已读状态
65
65
  * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/read_users
66
66
  */
67
67
  readUsers(message_id: string, query?: ReadUsersQuery): Paginated<Lark.ReadUser>;
@@ -372,6 +372,11 @@ export declare namespace Im {
372
372
  * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message-reaction/list
373
373
  */
374
374
  list(message_id: string, query?: ListQuery): Paginated<Lark.MessageReaction>;
375
+ /**
376
+ * 批量获取消息表情回复
377
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message-reaction/batch_query
378
+ */
379
+ batchQuery(body: BatchQueryRequest, query?: BatchQueryQuery): Promise<BatchQueryResponse>;
375
380
  /**
376
381
  * 删除消息表情回复
377
382
  * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message-reaction/delete
@@ -401,6 +406,26 @@ export declare namespace Im {
401
406
  /** 当操作人为用户时返回用户ID的类型 */
402
407
  user_id_type?: 'open_id' | 'union_id' | 'user_id';
403
408
  }
409
+ interface BatchQueryRequest {
410
+ /** 要查询的消息 */
411
+ queries: Lark.MessageQuery[];
412
+ /** 每个消息最多返回多少个表情 */
413
+ page_size_per_message?: number;
414
+ /** 表情类型 */
415
+ reaction_type?: string;
416
+ }
417
+ interface BatchQueryQuery {
418
+ /** 用户 ID 类型,控制接口返回值中表情添加者的ID */
419
+ user_id_type?: 'user_id' | 'union_id' | 'open_id';
420
+ }
421
+ interface BatchQueryResponse {
422
+ /** 成功获取到的表情列表 */
423
+ success_msg_reaction_details?: Lark.SuccessMsgReactionDetails[];
424
+ /** 成功获取到的表情数量统计 */
425
+ success_msg_reaction_counts?: Lark.SuccessMsgReactionCount[];
426
+ /** 未成功获取的消息 */
427
+ fail_msg_reaction_details?: Lark.FailMsgReactionDetails[];
428
+ }
404
429
  interface DeleteResponse {
405
430
  /** reaction资源ID */
406
431
  reaction_id?: string;