@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
package/src/types/mail.ts CHANGED
@@ -458,7 +458,13 @@ export namespace Mail {
458
458
  name?: string
459
459
  /** The mail group's description */
460
460
  description?: string
461
- /** Who can send mail to this mail group. Possible values are:- ANYONE: Any Internet user can send mail to this mail group- ALL_INTERNAL_USERS: Anyone in the team can send mail to this mail group- ALL_GROUP_MEMBERS: Any group member can send mail to this mail group- CUSTOM_MEMBERS: Only custom members can send mail to this mail group, define in mailgroup.permission_members resoure */
461
+ /**
462
+ * Who can send mail to this mail group. Possible values are:
463
+ * - ANYONE: Any Internet user can send mail to this mail group
464
+ * - ALL_INTERNAL_USERS: Anyone in the team can send mail to this mail group
465
+ * - ALL_GROUP_MEMBERS: Any group member can send mail to this mail group
466
+ * - CUSTOM_MEMBERS: Only custom members can send mail to this mail group, define in mailgroup.permission_members resoure
467
+ */
462
468
  who_can_send_mail?: 'ANYONE' | 'ALL_INTERNAL_USERS' | 'ALL_GROUP_MEMBERS' | 'CUSTOM_MEMBERS'
463
469
  }
464
470
 
@@ -477,7 +483,13 @@ export namespace Mail {
477
483
  include_external_member?: boolean
478
484
  /** Value is true if all company members are in this mail group */
479
485
  include_all_company_member?: boolean
480
- /** Who can send mail to this mail group. Possible values are:- ANYONE: Any Internet user can send mail to this mail group- ALL_INTERNAL_USERS: Anyone in the team can send mail to this mail group- ALL_GROUP_MEMBERS: Any group member can send mail to this mail group- CUSTOM_MEMBERS: Only custom members can send mail to this mail group, define in mailgroup.permission_members resoure */
486
+ /**
487
+ * Who can send mail to this mail group. Possible values are:
488
+ * - ANYONE: Any Internet user can send mail to this mail group
489
+ * - ALL_INTERNAL_USERS: Anyone in the team can send mail to this mail group
490
+ * - ALL_GROUP_MEMBERS: Any group member can send mail to this mail group
491
+ * - CUSTOM_MEMBERS: Only custom members can send mail to this mail group, define in mailgroup.permission_members resoure
492
+ */
481
493
  who_can_send_mail?: 'ANYONE' | 'ALL_INTERNAL_USERS' | 'ALL_GROUP_MEMBERS' | 'CUSTOM_MEMBERS'
482
494
  }
483
495
 
@@ -488,7 +500,13 @@ export namespace Mail {
488
500
  name?: string
489
501
  /** The mail group's description */
490
502
  description?: string
491
- /** Who can send mail to this mail group. Possible values are:- ANYONE: Any Internet user can send mail to this mail group- ALL_INTERNAL_USERS: Anyone in the team can send mail to this mail group- ALL_GROUP_MEMBERS: Any group member can send mail to this mail group- CUSTOM_MEMBERS: Only custom members can send mail to this mail group, define in mailgroup.permission_members resoure */
503
+ /**
504
+ * Who can send mail to this mail group. Possible values are:
505
+ * - ANYONE: Any Internet user can send mail to this mail group
506
+ * - ALL_INTERNAL_USERS: Anyone in the team can send mail to this mail group
507
+ * - ALL_GROUP_MEMBERS: Any group member can send mail to this mail group
508
+ * - CUSTOM_MEMBERS: Only custom members can send mail to this mail group, define in mailgroup.permission_members resoure
509
+ */
492
510
  who_can_send_mail?: 'ANYONE' | 'ALL_INTERNAL_USERS' | 'ALL_GROUP_MEMBERS' | 'CUSTOM_MEMBERS'
493
511
  }
494
512
 
@@ -507,7 +525,13 @@ export namespace Mail {
507
525
  include_external_member?: boolean
508
526
  /** Value is true if all company members are in this mail group */
509
527
  include_all_company_member?: boolean
510
- /** Who can send mail to this mail group. Possible values are:- ANYONE: Any Internet user can send mail to this mail group- ALL_INTERNAL_USERS: Anyone in the team can send mail to this mail group- ALL_GROUP_MEMBERS: Any group member can send mail to this mail group- CUSTOM_MEMBERS: Only custom members can send mail to this mail group, define in mailgroup.permission_members resoure */
528
+ /**
529
+ * Who can send mail to this mail group. Possible values are:
530
+ * - ANYONE: Any Internet user can send mail to this mail group
531
+ * - ALL_INTERNAL_USERS: Anyone in the team can send mail to this mail group
532
+ * - ALL_GROUP_MEMBERS: Any group member can send mail to this mail group
533
+ * - CUSTOM_MEMBERS: Only custom members can send mail to this mail group, define in mailgroup.permission_members resoure
534
+ */
511
535
  who_can_send_mail?: 'ANYONE' | 'ALL_INTERNAL_USERS' | 'ALL_GROUP_MEMBERS' | 'CUSTOM_MEMBERS'
512
536
  }
513
537
 
@@ -518,7 +542,13 @@ export namespace Mail {
518
542
  name?: string
519
543
  /** The mail group's description */
520
544
  description?: string
521
- /** Who can send mail to this mail group. Possible values are:- ANYONE: Any Internet user can send mail to this mail group- ALL_INTERNAL_USERS: Anyone in the team can send mail to this mail group- ALL_GROUP_MEMBERS: Any group member can send mail to this mail group- CUSTOM_MEMBERS: Only custom members can send mail to this mail group, define in mailgroup.permission_members resoure */
545
+ /**
546
+ * Who can send mail to this mail group. Possible values are:
547
+ * - ANYONE: Any Internet user can send mail to this mail group
548
+ * - ALL_INTERNAL_USERS: Anyone in the team can send mail to this mail group
549
+ * - ALL_GROUP_MEMBERS: Any group member can send mail to this mail group
550
+ * - CUSTOM_MEMBERS: Only custom members can send mail to this mail group, define in mailgroup.permission_members resoure
551
+ */
522
552
  who_can_send_mail?: 'ANYONE' | 'ALL_INTERNAL_USERS' | 'ALL_GROUP_MEMBERS' | 'CUSTOM_MEMBERS'
523
553
  }
524
554
 
@@ -537,7 +567,13 @@ export namespace Mail {
537
567
  include_external_member?: boolean
538
568
  /** Value is true if all company members are in this mail group */
539
569
  include_all_company_member?: boolean
540
- /** Who can send mail to this mail group. Possible values are:- ANYONE: Any Internet user can send mail to this mail group- ALL_INTERNAL_USERS: Anyone in the team can send mail to this mail group- ALL_GROUP_MEMBERS: Any group member can send mail to this mail group- CUSTOM_MEMBERS: Only custom members can send mail to this mail group, define in mailgroup.permission_members resoure */
570
+ /**
571
+ * Who can send mail to this mail group. Possible values are:
572
+ * - ANYONE: Any Internet user can send mail to this mail group
573
+ * - ALL_INTERNAL_USERS: Anyone in the team can send mail to this mail group
574
+ * - ALL_GROUP_MEMBERS: Any group member can send mail to this mail group
575
+ * - CUSTOM_MEMBERS: Only custom members can send mail to this mail group, define in mailgroup.permission_members resoure
576
+ */
541
577
  who_can_send_mail?: 'ANYONE' | 'ALL_INTERNAL_USERS' | 'ALL_GROUP_MEMBERS' | 'CUSTOM_MEMBERS'
542
578
  }
543
579
 
@@ -556,7 +592,13 @@ export namespace Mail {
556
592
  include_external_member?: boolean
557
593
  /** Value is true if all company members are in this mail group */
558
594
  include_all_company_member?: boolean
559
- /** Who can send mail to this mail group. Possible values are:- ANYONE: Any Internet user can send mail to this mail group- ALL_INTERNAL_USERS: Anyone in the team can send mail to this mail group- ALL_GROUP_MEMBERS: Any group member can send mail to this mail group- CUSTOM_MEMBERS: Only custom members can send mail to this mail group, define in mailgroup.permission_members resoure */
595
+ /**
596
+ * Who can send mail to this mail group. Possible values are:
597
+ * - ANYONE: Any Internet user can send mail to this mail group
598
+ * - ALL_INTERNAL_USERS: Anyone in the team can send mail to this mail group
599
+ * - ALL_GROUP_MEMBERS: Any group member can send mail to this mail group
600
+ * - CUSTOM_MEMBERS: Only custom members can send mail to this mail group, define in mailgroup.permission_members resoure
601
+ */
560
602
  who_can_send_mail?: 'ANYONE' | 'ALL_INTERNAL_USERS' | 'ALL_GROUP_MEMBERS' | 'CUSTOM_MEMBERS'
561
603
  }
562
604
 
@@ -653,7 +695,16 @@ export namespace Mail {
653
695
  user_id?: string
654
696
  /** The member's department id. Value is valid when type is DEPARTMENT */
655
697
  department_id?: string
656
- /** The type of member. Possible values are:- USER: internal user in the team- DEPARTMENT: member is a department- COMPANY: member is the company- EXTERNAL_USER: internet user outside the organization- MAIL_GROUP: member is another mail group- PUBLIC_MAILBOX: member is a public mailbox- OTHER_MEMBER: other internal member */
698
+ /**
699
+ * The type of member. Possible values are:
700
+ * - USER: internal user in the team
701
+ * - DEPARTMENT: member is a department
702
+ * - COMPANY: member is the company
703
+ * - EXTERNAL_USER: internet user outside the organization
704
+ * - MAIL_GROUP: member is another mail group
705
+ * - PUBLIC_MAILBOX: member is a public mailbox
706
+ * - OTHER_MEMBER: other internal member
707
+ */
657
708
  type?: 'USER' | 'DEPARTMENT' | 'COMPANY' | 'EXTERNAL_USER' | 'MAIL_GROUP' | 'PUBLIC_MAILBOX' | 'OTHER_MEMBER'
658
709
  }
659
710
 
@@ -673,7 +724,16 @@ export namespace Mail {
673
724
  user_id?: string
674
725
  /** The member's department id. Value is valid when type is DEPARTMENT */
675
726
  department_id?: string
676
- /** The type of member. Possible values are:- USER: internal user in the team- DEPARTMENT: member is a department- COMPANY: member is the company- EXTERNAL_USER: internet user outside the organization- MAIL_GROUP: member is another mail group- PUBLIC_MAILBOX: member is a public mailbox- OTHER_MEMBER: other internal member */
727
+ /**
728
+ * The type of member. Possible values are:
729
+ * - USER: internal user in the team
730
+ * - DEPARTMENT: member is a department
731
+ * - COMPANY: member is the company
732
+ * - EXTERNAL_USER: internet user outside the organization
733
+ * - MAIL_GROUP: member is another mail group
734
+ * - PUBLIC_MAILBOX: member is a public mailbox
735
+ * - OTHER_MEMBER: other internal member
736
+ */
677
737
  type?: 'USER' | 'DEPARTMENT' | 'COMPANY' | 'EXTERNAL_USER' | 'MAIL_GROUP' | 'PUBLIC_MAILBOX' | 'OTHER_MEMBER'
678
738
  }
679
739
 
@@ -693,7 +753,16 @@ export namespace Mail {
693
753
  user_id?: string
694
754
  /** The member's department id. Value is valid when type is DEPARTMENT */
695
755
  department_id?: string
696
- /** The type of member. Possible values are:- USER: internal user in the team- DEPARTMENT: member is a department- COMPANY: member is the company- EXTERNAL_USER: internet user outside the organization- MAIL_GROUP: member is another mail group- PUBLIC_MAILBOX: member is a public mailbox- OTHER_MEMBER: other internal member */
756
+ /**
757
+ * The type of member. Possible values are:
758
+ * - USER: internal user in the team
759
+ * - DEPARTMENT: member is a department
760
+ * - COMPANY: member is the company
761
+ * - EXTERNAL_USER: internet user outside the organization
762
+ * - MAIL_GROUP: member is another mail group
763
+ * - PUBLIC_MAILBOX: member is a public mailbox
764
+ * - OTHER_MEMBER: other internal member
765
+ */
697
766
  type?: 'USER' | 'DEPARTMENT' | 'COMPANY' | 'EXTERNAL_USER' | 'MAIL_GROUP' | 'PUBLIC_MAILBOX' | 'OTHER_MEMBER'
698
767
  }
699
768
 
@@ -803,7 +872,11 @@ export namespace Mail {
803
872
  department_id?: string
804
873
  /** The member's email address. Value is valid when type is MAIL_GROUP/PUBLIC_MAILBOX */
805
874
  email?: string
806
- /** The type of member. Possible values are:- USER: internal user in the team- DEPARTMENT: member is a department */
875
+ /**
876
+ * The type of member. Possible values are:
877
+ * - USER: internal user in the team
878
+ * - DEPARTMENT: member is a department
879
+ */
807
880
  type?: 'USER' | 'DEPARTMENT' | 'MAIL_GROUP' | 'PUBLIC_MAILBOX'
808
881
  }
809
882
 
@@ -823,7 +896,11 @@ export namespace Mail {
823
896
  department_id?: string
824
897
  /** The member's email address. Value is valid when type is MAIL_GROUP/PUBLIC_MAILBOX */
825
898
  email?: string
826
- /** The type of member. Possible values are:- USER: internal user in the team- DEPARTMENT: member is a department */
899
+ /**
900
+ * The type of member. Possible values are:
901
+ * - USER: internal user in the team
902
+ * - DEPARTMENT: member is a department
903
+ */
827
904
  type?: 'USER' | 'DEPARTMENT' | 'MAIL_GROUP' | 'PUBLIC_MAILBOX'
828
905
  }
829
906
 
@@ -843,7 +920,11 @@ export namespace Mail {
843
920
  department_id?: string
844
921
  /** The member's email address. Value is valid when type is MAIL_GROUP/PUBLIC_MAILBOX */
845
922
  email?: string
846
- /** The type of member. Possible values are:- USER: internal user in the team- DEPARTMENT: member is a department */
923
+ /**
924
+ * The type of member. Possible values are:
925
+ * - USER: internal user in the team
926
+ * - DEPARTMENT: member is a department
927
+ */
847
928
  type?: 'USER' | 'DEPARTMENT' | 'MAIL_GROUP' | 'PUBLIC_MAILBOX'
848
929
  }
849
930
 
@@ -1029,7 +1110,10 @@ export namespace Mail {
1029
1110
  export interface CreateRequest {
1030
1111
  /** The member's user id. Value is valid when type is USER */
1031
1112
  user_id?: string
1032
- /** The type of member. Possible values are:- USER: internal user in the team */
1113
+ /**
1114
+ * The type of member. Possible values are:
1115
+ * - USER: internal user in the team
1116
+ */
1033
1117
  type?: 'USER'
1034
1118
  }
1035
1119
 
@@ -1043,7 +1127,10 @@ export namespace Mail {
1043
1127
  member_id?: string
1044
1128
  /** The member's user id. Value is valid when type is USER */
1045
1129
  user_id?: string
1046
- /** The type of member. Possible values are:- USER: internal user in the team */
1130
+ /**
1131
+ * The type of member. Possible values are:
1132
+ * - USER: internal user in the team
1133
+ */
1047
1134
  type?: 'USER'
1048
1135
  }
1049
1136
 
@@ -1057,7 +1144,10 @@ export namespace Mail {
1057
1144
  member_id?: string
1058
1145
  /** The member's user id. Value is valid when type is USER */
1059
1146
  user_id?: string
1060
- /** The type of member. Possible values are:- USER: internal user in the team */
1147
+ /**
1148
+ * The type of member. Possible values are:
1149
+ * - USER: internal user in the team
1150
+ */
1061
1151
  type?: 'USER'
1062
1152
  }
1063
1153
 
@@ -9,15 +9,111 @@ declare module '../internal' {
9
9
 
10
10
  export namespace Payroll {
11
11
  export interface Methods {
12
+ acctItem: AcctItem.Methods
13
+ paygroup: Paygroup.Methods
14
+ datasource: Datasource.Methods
15
+ datasourceRecord: DatasourceRecord.Methods
16
+ paymentActivity: PaymentActivity.Methods
12
17
  paymentActivityDetail: PaymentActivityDetail.Methods
13
18
  paymentDetail: PaymentDetail.Methods
14
- paymentActivity: PaymentActivity.Methods
15
- datasourceRecord: DatasourceRecord.Methods
16
- datasource: Datasource.Methods
17
- acctItem: AcctItem.Methods
19
+ costAllocationDetail: CostAllocationDetail.Methods
18
20
  costAllocationReport: CostAllocationReport.Methods
19
21
  costAllocationPlan: CostAllocationPlan.Methods
20
- paygroup: Paygroup.Methods
22
+ }
23
+
24
+ export namespace AcctItem {
25
+ export interface Methods {
26
+ /**
27
+ * 批量查询算薪项
28
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/payroll-v1/acct_item/list
29
+ */
30
+ list(query?: Pagination): Paginated<Lark.AcctItem>
31
+ }
32
+ }
33
+
34
+ export namespace Paygroup {
35
+ export interface Methods {
36
+ /**
37
+ * 获取薪资组基本信息
38
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/payroll-v1/paygroup/list
39
+ */
40
+ list(query?: Pagination): Paginated<Lark.Paygroup>
41
+ }
42
+ }
43
+
44
+ export namespace Datasource {
45
+ export interface Methods {
46
+ /**
47
+ * 获取外部数据源配置信息
48
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/payroll-v1/datasource/list
49
+ */
50
+ list(query?: Pagination): Paginated<Lark.Datasource, 'datasources'>
51
+ }
52
+ }
53
+
54
+ export namespace DatasourceRecord {
55
+ export interface Methods {
56
+ /**
57
+ * 创建 / 更新外部算薪数据
58
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/payroll-v1/datasource_record/save
59
+ */
60
+ save(body: SaveRequest): Promise<SaveResponse>
61
+ /**
62
+ * 批量查询外部算薪数据记录
63
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/payroll-v1/datasource_record/query
64
+ */
65
+ query(body: QueryRequest, query?: Pagination): Paginated<Lark.DatasourceRecord, 'records'>
66
+ }
67
+
68
+ export interface SaveRequest {
69
+ /** 数据源code */
70
+ source_code: string
71
+ /** 需保存的记录列表 */
72
+ records: Lark.DatasourceRecord[]
73
+ }
74
+
75
+ export interface SaveResponse {
76
+ /** 更新的记录条数 */
77
+ affect_counts: string
78
+ }
79
+
80
+ export interface QueryRequest {
81
+ /** 数据源编码 */
82
+ source_code: string
83
+ /** 指定查询的数据源字段。如不传,默认返回所有数据源字段 */
84
+ selected_fields?: string[]
85
+ /** 查询过滤器列表,多个过滤器之间为And关系。本期员工月维度汇总类型数据源,只支持employment_id、payroll_period fieldKey的查询,其中payroll_period必传 */
86
+ field_filters?: Lark.DatasourceRecordFieldFilter[]
87
+ }
88
+ }
89
+
90
+ export namespace PaymentActivity {
91
+ export interface Methods {
92
+ /**
93
+ * 封存发薪活动
94
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/payroll-v1/payment_activity/archive
95
+ */
96
+ archive(body: ArchiveRequest): Promise<void>
97
+ /**
98
+ * 查询发薪活动列表
99
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/payroll-v1/payment_activity/list
100
+ */
101
+ list(query?: ListQuery): Paginated<Lark.PaymentActivity, 'payment_activitys'>
102
+ }
103
+
104
+ export interface ArchiveRequest {
105
+ /** 发薪活动ID */
106
+ activity_id: string
107
+ }
108
+
109
+ export interface ListQuery extends Pagination {
110
+ /** 发薪日开始时间,格式:YYYY-MM-dd,[pay_period_start_date, pay_period_end_date] 是一个左闭右闭区间。 */
111
+ pay_period_start_date: string
112
+ /** 发薪日结束时间,格式:YYYY-MM-dd,[pay_period_start_date, pay_period_end_date] 是一个左闭右闭区间。 */
113
+ pay_period_end_date: string
114
+ /** 发薪活动审批状态列表,其中:100-待确认发薪名单;150-待提交审批;200-审批中;300-审批被拒绝;350-审批被撤回;360-审批被撤销;375-审批通过;400-已封存。 */
115
+ statuses?: number[]
116
+ }
21
117
  }
22
118
 
23
119
  export namespace PaymentActivityDetail {
@@ -86,88 +182,42 @@ export namespace Payroll {
86
182
  }
87
183
  }
88
184
 
89
- export namespace PaymentActivity {
185
+ export namespace CostAllocationDetail {
90
186
  export interface Methods {
91
187
  /**
92
- * 封存发薪活动
93
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/payroll-v1/payment_activity/archive
94
- */
95
- archive(body: ArchiveRequest): Promise<void>
96
- /**
97
- * 查询发薪活动列表
98
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/payroll-v1/payment_activity/list
188
+ * 查询成本分摊报表明细
189
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/payroll-v1/cost_allocation_detail/list
99
190
  */
100
- list(query?: ListQuery): Paginated<Lark.PaymentActivity, 'payment_activitys'>
191
+ list(query?: ListQuery): Promise<ListResponse>
101
192
  }
102
193
 
103
- export interface ArchiveRequest {
104
- /** 发薪活动ID */
105
- activity_id: string
194
+ export const enum ListQueryReportType {
195
+ /** 默认 */
196
+ Default = 0,
197
+ /** 计提 */
198
+ Accrued = 1,
199
+ /** 实发 */
200
+ Paid = 2,
106
201
  }
107
202
 
108
203
  export interface ListQuery extends Pagination {
109
- /** 发薪日开始时间,格式:YYYY-MM-dd,[pay_period_start_date, pay_period_end_date] 是一个左闭右闭区间。 */
110
- pay_period_start_date: string
111
- /** 发薪日结束时间,格式:YYYY-MM-dd,[pay_period_start_date, pay_period_end_date] 是一个左闭右闭区间。 */
112
- pay_period_end_date: string
113
- /** 发薪活动审批状态列表,其中:100-待确认发薪名单;150-待提交审批;200-审批中;300-审批被拒绝;350-审批被撤回;360-审批被撤销;375-审批通过;400-已封存。 */
114
- statuses?: number[]
115
- }
116
- }
117
-
118
- export namespace DatasourceRecord {
119
- export interface Methods {
120
- /**
121
- * 创建 / 更新外部算薪数据
122
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/payroll-v1/datasource_record/save
123
- */
124
- save(body: SaveRequest): Promise<SaveResponse>
125
- /**
126
- * 批量查询外部算薪数据记录
127
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/payroll-v1/datasource_record/query
128
- */
129
- query(body: QueryRequest, query?: Pagination): Paginated<Lark.DatasourceRecord, 'records'>
130
- }
131
-
132
- export interface SaveRequest {
133
- /** 数据源code */
134
- source_code: string
135
- /** 需保存的记录列表 */
136
- records: Lark.DatasourceRecord[]
137
- }
138
-
139
- export interface SaveResponse {
140
- /** 更新的记录条数 */
141
- affect_counts: string
142
- }
143
-
144
- export interface QueryRequest {
145
- /** 数据源编码 */
146
- source_code: string
147
- /** 指定查询的数据源字段。如不传,默认返回所有数据源字段 */
148
- selected_fields?: string[]
149
- /** 查询过滤器列表,多个过滤器之间为And关系。本期员工月维度汇总类型数据源,只支持employment_id、payroll_period fieldKey的查询,其中payroll_period必传 */
150
- field_filters?: Lark.DatasourceRecordFieldFilter[]
151
- }
152
- }
153
-
154
- export namespace Datasource {
155
- export interface Methods {
156
- /**
157
- * 获取外部数据源配置信息
158
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/payroll-v1/datasource/list
159
- */
160
- list(query?: Pagination): Paginated<Lark.Datasource, 'datasources'>
204
+ /** 成本分摊方案ID */
205
+ cost_allocation_plan_id: string
206
+ /** 期间 */
207
+ pay_period: string
208
+ /** 报表类型 */
209
+ report_type: ListQueryReportType
161
210
  }
162
- }
163
211
 
164
- export namespace AcctItem {
165
- export interface Methods {
166
- /**
167
- * 批量查询算薪项
168
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/payroll-v1/acct_item/list
169
- */
170
- list(query?: Pagination): Paginated<Lark.AcctItem>
212
+ export interface ListResponse {
213
+ /** 报表明细数据 */
214
+ cost_allocation_report_datas?: Lark.CostAllocationReportData[]
215
+ /** 报表名称 */
216
+ cost_allocation_report_names?: Lark.I18nContent[]
217
+ /** 期间 */
218
+ pay_period?: string
219
+ page_token?: string
220
+ has_more?: boolean
171
221
  }
172
222
  }
173
223
 
@@ -226,30 +276,17 @@ export namespace Payroll {
226
276
  pay_period: string
227
277
  }
228
278
  }
229
-
230
- export namespace Paygroup {
231
- export interface Methods {
232
- /**
233
- * 获取薪资组基本信息
234
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/payroll-v1/paygroup/list
235
- */
236
- list(query?: Pagination): Paginated<Lark.Paygroup>
237
- }
238
- }
239
279
  }
240
280
 
241
281
  Internal.define({
242
- '/payroll/v1/payment_activity_details': {
243
- GET: 'payroll.paymentActivityDetail.list',
244
- },
245
- '/payroll/v1/payment_detail/query': {
246
- POST: 'payroll.paymentDetail.query',
282
+ '/payroll/v1/acct_items': {
283
+ GET: { name: 'payroll.acctItem.list', pagination: { argIndex: 0 } },
247
284
  },
248
- '/payroll/v1/payment_activitys/archive': {
249
- POST: 'payroll.paymentActivity.archive',
285
+ '/payroll/v1/paygroups': {
286
+ GET: { name: 'payroll.paygroup.list', pagination: { argIndex: 0 } },
250
287
  },
251
- '/payroll/v1/payment_activitys': {
252
- GET: { name: 'payroll.paymentActivity.list', pagination: { argIndex: 0, itemsKey: 'payment_activitys' } },
288
+ '/payroll/v1/datasources': {
289
+ GET: { name: 'payroll.datasource.list', pagination: { argIndex: 0, itemsKey: 'datasources' } },
253
290
  },
254
291
  '/payroll/v1/datasource_records/save': {
255
292
  POST: 'payroll.datasourceRecord.save',
@@ -257,11 +294,20 @@ Internal.define({
257
294
  '/payroll/v1/datasource_records/query': {
258
295
  POST: { name: 'payroll.datasourceRecord.query', pagination: { argIndex: 1, itemsKey: 'records' } },
259
296
  },
260
- '/payroll/v1/datasources': {
261
- GET: { name: 'payroll.datasource.list', pagination: { argIndex: 0, itemsKey: 'datasources' } },
297
+ '/payroll/v1/payment_activitys/archive': {
298
+ POST: 'payroll.paymentActivity.archive',
262
299
  },
263
- '/payroll/v1/acct_items': {
264
- GET: { name: 'payroll.acctItem.list', pagination: { argIndex: 0 } },
300
+ '/payroll/v1/payment_activitys': {
301
+ GET: { name: 'payroll.paymentActivity.list', pagination: { argIndex: 0, itemsKey: 'payment_activitys' } },
302
+ },
303
+ '/payroll/v1/payment_activity_details': {
304
+ GET: 'payroll.paymentActivityDetail.list',
305
+ },
306
+ '/payroll/v1/payment_detail/query': {
307
+ POST: 'payroll.paymentDetail.query',
308
+ },
309
+ '/payroll/v1/cost_allocation_details': {
310
+ GET: 'payroll.costAllocationDetail.list',
265
311
  },
266
312
  '/payroll/v1/cost_allocation_reports': {
267
313
  GET: 'payroll.costAllocationReport.list',
@@ -269,7 +315,4 @@ Internal.define({
269
315
  '/payroll/v1/cost_allocation_plans': {
270
316
  GET: { name: 'payroll.costAllocationPlan.list', pagination: { argIndex: 0 } },
271
317
  },
272
- '/payroll/v1/paygroups': {
273
- GET: { name: 'payroll.paygroup.list', pagination: { argIndex: 0 } },
274
- },
275
318
  })
@@ -242,7 +242,7 @@ export namespace Performance {
242
242
  export namespace ReviewTemplate {
243
243
  export interface Methods {
244
244
  /**
245
- * 获取评估模板配置
245
+ * 获取绩效模板配置
246
246
  * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/review_template/query
247
247
  */
248
248
  query(body: QueryRequest, query?: Pagination): Paginated<Lark.ReviewTemplate, 'review_templates'>
@@ -193,7 +193,10 @@ export namespace Search {
193
193
  }
194
194
 
195
195
  export interface ListQuery extends Pagination {
196
- /** 回包数据格式,0-全量数据;1-摘要数据。**注**:摘要数据仅包含"id","name","state"。 */
196
+ /**
197
+ * 回包数据格式,0-全量数据;1-摘要数据。
198
+ * **注**:摘要数据仅包含"id","name","state"。
199
+ */
197
200
  view?: ListQueryView
198
201
  }
199
202