@satorijs/adapter-lark 3.10.6 → 3.11.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 (116) hide show
  1. package/lib/index.cjs +2880 -2370
  2. package/lib/internal.d.ts +4 -4
  3. package/lib/types/acs.d.ts +212 -172
  4. package/lib/types/admin.d.ts +331 -291
  5. package/lib/types/aily.d.ts +331 -216
  6. package/lib/types/apaas.d.ts +646 -494
  7. package/lib/types/application.d.ts +559 -458
  8. package/lib/types/approval.d.ts +826 -791
  9. package/lib/types/attendance.d.ts +1094 -994
  10. package/lib/types/auth.d.ts +66 -61
  11. package/lib/types/authen.d.ts +221 -186
  12. package/lib/types/baike.d.ts +258 -233
  13. package/lib/types/base.d.ts +74 -0
  14. package/lib/types/bitable.d.ts +830 -770
  15. package/lib/types/board.d.ts +29 -14
  16. package/lib/types/calendar.d.ts +660 -605
  17. package/lib/types/cardkit.d.ts +149 -134
  18. package/lib/types/compensation.d.ts +84 -49
  19. package/lib/types/contact.d.ts +1279 -1204
  20. package/lib/types/corehr.d.ts +4982 -4526
  21. package/lib/types/directory.d.ts +447 -0
  22. package/lib/types/docs.d.ts +28 -18
  23. package/lib/types/document_ai.d.ts +347 -252
  24. package/lib/types/docx.d.ts +428 -383
  25. package/lib/types/drive.d.ts +1093 -1048
  26. package/lib/types/ehr.d.ts +66 -51
  27. package/lib/types/event.d.ts +16 -6
  28. package/lib/types/helpdesk.d.ts +816 -741
  29. package/lib/types/hire.d.ts +3955 -3589
  30. package/lib/types/human_authentication.d.ts +32 -22
  31. package/lib/types/im.d.ts +1420 -1295
  32. package/lib/types/index.d.ts +1422 -330
  33. package/lib/types/lingo.d.ts +279 -249
  34. package/lib/types/mail.d.ts +1032 -675
  35. package/lib/types/mdm.d.ts +105 -37
  36. package/lib/types/minutes.d.ts +73 -26
  37. package/lib/types/moments.d.ts +23 -13
  38. package/lib/types/okr.d.ts +266 -225
  39. package/lib/types/optical_char_recognition.d.ts +22 -12
  40. package/lib/types/passport.d.ts +58 -48
  41. package/lib/types/payroll.d.ts +210 -53
  42. package/lib/types/performance.d.ts +463 -414
  43. package/lib/types/personal_settings.d.ts +93 -82
  44. package/lib/types/report.d.ts +79 -58
  45. package/lib/types/search.d.ts +265 -235
  46. package/lib/types/security_and_compliance.d.ts +30 -19
  47. package/lib/types/sheets.d.ts +356 -321
  48. package/lib/types/speech_to_text.d.ts +44 -34
  49. package/lib/types/task.d.ts +998 -1087
  50. package/lib/types/tenant.d.ts +25 -15
  51. package/lib/types/translation.d.ts +42 -32
  52. package/lib/types/trust_party.d.ts +81 -0
  53. package/lib/types/vc.d.ts +1218 -1123
  54. package/lib/types/verification.d.ts +11 -6
  55. package/lib/types/wiki.d.ts +270 -235
  56. package/lib/types/workplace.d.ts +58 -38
  57. package/lib/utils.d.ts +2 -2
  58. package/package.json +4 -4
  59. package/src/bot.ts +15 -15
  60. package/src/internal.ts +29 -12
  61. package/src/message.ts +10 -10
  62. package/src/types/acs.ts +234 -186
  63. package/src/types/admin.ts +353 -305
  64. package/src/types/aily.ts +375 -233
  65. package/src/types/apaas.ts +754 -568
  66. package/src/types/application.ts +633 -507
  67. package/src/types/approval.ts +914 -872
  68. package/src/types/attendance.ts +1226 -1104
  69. package/src/types/auth.ts +72 -66
  70. package/src/types/authen.ts +233 -191
  71. package/src/types/baike.ts +276 -246
  72. package/src/types/base.ts +93 -0
  73. package/src/types/bitable.ts +966 -894
  74. package/src/types/board.ts +34 -16
  75. package/src/types/calendar.ts +751 -685
  76. package/src/types/cardkit.ts +164 -146
  77. package/src/types/compensation.ts +97 -55
  78. package/src/types/contact.ts +1465 -1375
  79. package/src/types/corehr.ts +5664 -5077
  80. package/src/types/directory.ts +569 -0
  81. package/src/types/docs.ts +31 -19
  82. package/src/types/document_ai.ts +401 -287
  83. package/src/types/docx.ts +492 -438
  84. package/src/types/drive.ts +1266 -1213
  85. package/src/types/ehr.ts +71 -53
  86. package/src/types/event.ts +19 -7
  87. package/src/types/helpdesk.ts +930 -840
  88. package/src/types/hire.ts +4453 -4019
  89. package/src/types/human_authentication.ts +35 -23
  90. package/src/types/im.ts +1626 -1476
  91. package/src/types/index.ts +1532 -346
  92. package/src/types/lingo.ts +299 -263
  93. package/src/types/mail.ts +1231 -779
  94. package/src/types/mdm.ts +122 -39
  95. package/src/types/minutes.ts +88 -28
  96. package/src/types/moments.ts +26 -14
  97. package/src/types/okr.ts +286 -238
  98. package/src/types/optical_char_recognition.ts +25 -13
  99. package/src/types/passport.ts +62 -50
  100. package/src/types/payroll.ts +254 -57
  101. package/src/types/performance.ts +528 -467
  102. package/src/types/personal_settings.ts +101 -89
  103. package/src/types/report.ts +86 -62
  104. package/src/types/search.ts +285 -249
  105. package/src/types/security_and_compliance.ts +33 -21
  106. package/src/types/sheets.ts +421 -379
  107. package/src/types/speech_to_text.ts +48 -36
  108. package/src/types/task.ts +1152 -1260
  109. package/src/types/tenant.ts +29 -17
  110. package/src/types/translation.ts +46 -34
  111. package/src/types/trust_party.ts +110 -0
  112. package/src/types/vc.ts +1397 -1283
  113. package/src/types/verification.ts +13 -7
  114. package/src/types/wiki.ts +293 -251
  115. package/src/types/workplace.ts +65 -41
  116. package/src/utils.ts +3 -3
@@ -1,139 +1,154 @@
1
- import { Card } from '.';
1
+ import * as Lark from '.';
2
2
  declare module '../internal' {
3
3
  interface Internal {
4
- /**
5
- * 创建卡片实体
6
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card/create
7
- */
8
- createCardkitCard(body: CreateCardkitCardRequest): Promise<CreateCardkitCardResponse>;
9
- /**
10
- * 更新卡片配置
11
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card/settings
12
- */
13
- settingsCardkitCard(card_id: string, body: SettingsCardkitCardRequest): Promise<void>;
14
- /**
15
- * 批量更新卡片实体
16
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card/batch_update
17
- */
18
- batchUpdateCardkitCard(card_id: string, body: BatchUpdateCardkitCardRequest): Promise<void>;
19
- /**
20
- * 全量更新卡片实体
21
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card/update
22
- */
23
- updateCardkitCard(card_id: string, body: UpdateCardkitCardRequest): Promise<void>;
24
- /**
25
- * 转换 ID
26
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card/id_convert
27
- */
28
- idConvertCardkitCard(body: IdConvertCardkitCardRequest): Promise<IdConvertCardkitCardResponse>;
29
- /**
30
- * 新增组件
31
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card-element/create
32
- */
33
- createCardkitCardElement(card_id: string, body: CreateCardkitCardElementRequest): Promise<void>;
34
- /**
35
- * 更新组件
36
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card-element/update
37
- */
38
- updateCardkitCardElement(card_id: string, element_id: string, body: UpdateCardkitCardElementRequest): Promise<void>;
39
- /**
40
- * 更新组件属性
41
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card-element/patch
42
- */
43
- patchCardkitCardElement(card_id: string, element_id: string, body: PatchCardkitCardElementRequest): Promise<void>;
44
- /**
45
- * 流式更新文本
46
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card-element/content
47
- */
48
- contentCardkitCardElement(card_id: string, element_id: string, body: ContentCardkitCardElementRequest): Promise<void>;
49
- /**
50
- * 删除组件
51
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card-element/delete
52
- */
53
- deleteCardkitCardElement(card_id: string, element_id: string, body: DeleteCardkitCardElementRequest): Promise<void>;
4
+ cardkit: Cardkit.Methods;
54
5
  }
55
6
  }
56
- export interface CreateCardkitCardRequest {
57
- /** 卡片数据的类型 */
58
- type: string;
59
- /** 卡片数据内容,与卡片数据的类型相对应 */
60
- data: string;
61
- }
62
- export interface CreateCardkitCardResponse {
63
- /** 卡片ID */
64
- card_id: string;
65
- }
66
- export interface SettingsCardkitCardRequest {
67
- /** 卡片设置 */
68
- settings: string;
69
- /** UUID */
70
- uuid?: string;
71
- /** 卡片处于流式更新模式时,进行卡片操作的顺序序号,用于保证多次更新的时序性。值为正整数,一次流式状态的多次更新操作(streaming_mode 一次从 true 到 false 期间)需要保证 sequence 递增,否则将报错。推荐使用时间戳。 */
72
- sequence: number;
73
- }
74
- export interface BatchUpdateCardkitCardRequest {
75
- /** 幂等 id,最大长度为 64。可通过传入唯一的 uuid 以保证相同批次的操作只进行一次。 */
76
- uuid?: string;
77
- /** 卡片处于流式更新模式时,进行卡片操作的顺序序号,用于保证多次更新的时序性。值为正整数,一次流式状态的多次更新操作(streaming_mode 一次从 true 到 false 期间)需要保证 sequence 递增,否则将报错。推荐使用时间戳。 */
78
- sequence: number;
79
- /** 操作列表,可选值有: partial_update_setting:更新卡片设置,此时 parmas 结构参考更新卡片设置接口请求体的 settings 字段 ;add_elements,此时 parmas 结构参考添加组件接口请求体的 type、target_element_id、elements 字段 ; delete_elements,此时 parmas 结构内仅支持 element_ids 参数,参数值为组件 ID 数组 ; partial_update_element,此时 parmas 结构包括参考局部更新组件接口的路径参数 element_id 和请求体 partial_element 字段 ; update_element,此时 parmas 结构参考全量更新组件接口的路径参数 element_id 和请求体 element 字段 */
80
- actions: string;
81
- }
82
- export interface UpdateCardkitCardRequest {
83
- /** 卡片内容 */
84
- card: Card;
85
- /** 幂等 id,可通过传入唯一的 uuid 以保证相同批次的操作只进行一次。 */
86
- uuid?: string;
87
- /** 卡片处于流式更新模式时,进行卡片操作的顺序序号,用于保证多次更新的时序性。值为正整数,一次流式状态的多次更新操作(streaming_mode 一次从 true 到 false 期间)需要保证 sequence 递增,否则将报错。推荐使用时间戳。 */
88
- sequence: number;
89
- }
90
- export interface IdConvertCardkitCardRequest {
91
- /** 消息ID */
92
- message_id: string;
93
- }
94
- export interface IdConvertCardkitCardResponse {
95
- /** 消息 ID 对应的卡片 ID */
96
- card_id?: string;
97
- }
98
- export interface CreateCardkitCardElementRequest {
99
- /** 添加组件的方式 */
100
- type: 'insert_before' | 'insert_after' | 'append';
101
- /** 目标组件的 ID。 当 type 为 insert_before、insert_after 时,为用于定位的目标组件。 当 type 为 append 时,该字段仅支持容器类组件,为用于指定末尾添加的目标组件,未填写默认为在卡片 body 末尾添加。 */
102
- target_element_id?: string;
103
- /** 幂等 id,可通过传入唯一的 uuid 以保证相同批次的操作只进行一次。 */
104
- uuid?: string;
105
- /** 卡片处于流式更新模式时,进行卡片操作的顺序序号,用于保证多次更新的时序性。值为正整数,一次流式状态的多次更新操作(streaming_mode 一次从 true 到 false 期间)需要保证 sequence 递增,否则将报错。推荐使用时间戳。 */
106
- sequence: number;
107
- /** 组件列表 */
108
- elements: string;
109
- }
110
- export interface UpdateCardkitCardElementRequest {
111
- /** 幂等 id,可通过传入唯一的 uuid 以保证相同批次的操作只进行一次。 */
112
- uuid?: string;
113
- /** 新的组件 */
114
- element: string;
115
- /** 卡片处于流式更新模式时,进行卡片操作的顺序序号,用于保证多次更新的时序性。值为正整数,一次流式状态的多次更新操作(streaming_mode 一次从 true 到 false 期间)需要保证 sequence 递增,否则将报错。推荐使用时间戳。 */
116
- sequence: number;
117
- }
118
- export interface PatchCardkitCardElementRequest {
119
- /** 要更改的组件部分配置内容,传入 id 参数后将对原有组件的 id 进行更新,不支持修改 tag 参数。 */
120
- partial_element: string;
121
- /** 幂等 id,可通过传入唯一的 uuid 以保证相同批次的操作只进行一次。 */
122
- uuid?: string;
123
- /** 卡片处于流式更新模式时,进行卡片操作的顺序序号,用于保证多次更新的时序性。值为正整数,一次流式状态的多次更新操作(streaming_mode 一次从 true 到 false 期间)需要保证 sequence 递增,否则将报错。推荐使用时间戳。 */
124
- sequence: number;
125
- }
126
- export interface ContentCardkitCardElementRequest {
127
- /** 幂等 id,可通过传入唯一的 uuid 以保证相同批次的操作只进行一次。 */
128
- uuid?: string;
129
- /** 更新后的文本内容 */
130
- content: string;
131
- /** 顺序序号,用于保证更新文本内容的时序性。在卡片的单次 streaming 模式周期中(steaming 状态从开始到停止),该值需为递增的正整数,否则将报错。 */
132
- sequence: number;
133
- }
134
- export interface DeleteCardkitCardElementRequest {
135
- /** 幂等 id,可通过传入唯一的 uuid 以保证相同批次的操作只进行一次。 */
136
- uuid?: string;
137
- /** 卡片处于流式更新模式时,进行卡片操作的顺序序号,用于保证多次更新的时序性。值为正整数,一次流式状态的多次更新操作(streaming_mode 一次从 true 到 false 期间)需要保证 sequence 递增,否则将报错。推荐使用时间戳。 */
138
- sequence: number;
7
+ export declare namespace Cardkit {
8
+ interface Methods {
9
+ card: Card.Methods;
10
+ }
11
+ namespace Card {
12
+ interface Methods {
13
+ element: Element.Methods;
14
+ /**
15
+ * 创建卡片实体
16
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card/create
17
+ */
18
+ create(body: CreateRequest): Promise<CreateResponse>;
19
+ /**
20
+ * 更新卡片配置
21
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card/settings
22
+ */
23
+ settings(card_id: string, body: SettingsRequest): Promise<void>;
24
+ /**
25
+ * 批量更新卡片实体
26
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card/batch_update
27
+ */
28
+ batchUpdate(card_id: string, body: BatchUpdateRequest): Promise<void>;
29
+ /**
30
+ * 全量更新卡片实体
31
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card/update
32
+ */
33
+ update(card_id: string, body: UpdateRequest): Promise<void>;
34
+ /**
35
+ * 转换 ID
36
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card/id_convert
37
+ */
38
+ idConvert(body: IdConvertRequest): Promise<IdConvertResponse>;
39
+ }
40
+ interface CreateRequest {
41
+ /** 卡片数据的类型 */
42
+ type: string;
43
+ /** 卡片数据内容,与卡片数据的类型相对应 */
44
+ data: string;
45
+ }
46
+ interface CreateResponse {
47
+ /** 卡片ID */
48
+ card_id: string;
49
+ }
50
+ interface SettingsRequest {
51
+ /** 卡片设置 */
52
+ settings: string;
53
+ /** UUID */
54
+ uuid?: string;
55
+ /** 卡片处于流式更新模式时,进行卡片操作的顺序序号,用于保证多次更新的时序性。值为正整数,一次流式状态的多次更新操作(streaming_mode 一次从 true 到 false 期间)需要保证 sequence 递增,否则将报错。推荐使用时间戳。 */
56
+ sequence: number;
57
+ }
58
+ interface BatchUpdateRequest {
59
+ /** 幂等 id,最大长度为 64。可通过传入唯一的 uuid 以保证相同批次的操作只进行一次。 */
60
+ uuid?: string;
61
+ /** 卡片处于流式更新模式时,进行卡片操作的顺序序号,用于保证多次更新的时序性。值为正整数,一次流式状态的多次更新操作(streaming_mode 一次从 true 到 false 期间)需要保证 sequence 递增,否则将报错。推荐使用时间戳。 */
62
+ sequence: number;
63
+ /** 操作列表,可选值有: partial_update_setting:更新卡片设置,此时 parmas 结构参考更新卡片设置接口请求体的 settings 字段 ;add_elements,此时 parmas 结构参考添加组件接口请求体的 type、target_element_id、elements 字段 ; delete_elements,此时 parmas 结构内仅支持 element_ids 参数,参数值为组件 ID 数组 ; partial_update_element,此时 parmas 结构包括参考局部更新组件接口的路径参数 element_id 和请求体 partial_element 字段 ; update_element,此时 parmas 结构参考全量更新组件接口的路径参数 element_id 和请求体 element 字段 */
64
+ actions: string;
65
+ }
66
+ interface UpdateRequest {
67
+ /** 卡片内容 */
68
+ card: Lark.Card;
69
+ /** 幂等 id,可通过传入唯一的 uuid 以保证相同批次的操作只进行一次。 */
70
+ uuid?: string;
71
+ /** 卡片处于流式更新模式时,进行卡片操作的顺序序号,用于保证多次更新的时序性。值为正整数,一次流式状态的多次更新操作(streaming_mode 一次从 true 到 false 期间)需要保证 sequence 递增,否则将报错。推荐使用时间戳。 */
72
+ sequence: number;
73
+ }
74
+ interface IdConvertRequest {
75
+ /** 消息ID */
76
+ message_id: string;
77
+ }
78
+ interface IdConvertResponse {
79
+ /** 消息 ID 对应的卡片 ID */
80
+ card_id?: string;
81
+ }
82
+ namespace Element {
83
+ interface Methods {
84
+ /**
85
+ * 新增组件
86
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card-element/create
87
+ */
88
+ create(card_id: string, body: CreateRequest): Promise<void>;
89
+ /**
90
+ * 更新组件
91
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card-element/update
92
+ */
93
+ update(card_id: string, element_id: string, body: UpdateRequest): Promise<void>;
94
+ /**
95
+ * 更新组件属性
96
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card-element/patch
97
+ */
98
+ patch(card_id: string, element_id: string, body: PatchRequest): Promise<void>;
99
+ /**
100
+ * 流式更新文本
101
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card-element/content
102
+ */
103
+ content(card_id: string, element_id: string, body: ContentRequest): Promise<void>;
104
+ /**
105
+ * 删除组件
106
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card-element/delete
107
+ */
108
+ delete(card_id: string, element_id: string, body: DeleteRequest): Promise<void>;
109
+ }
110
+ interface CreateRequest {
111
+ /** 添加组件的方式 */
112
+ type: 'insert_before' | 'insert_after' | 'append';
113
+ /** 目标组件的 ID。 当 type 为 insert_before、insert_after 时,为用于定位的目标组件。 当 type 为 append 时,该字段仅支持容器类组件,为用于指定末尾添加的目标组件,未填写默认为在卡片 body 末尾添加。 */
114
+ target_element_id?: string;
115
+ /** 幂等 id,可通过传入唯一的 uuid 以保证相同批次的操作只进行一次。 */
116
+ uuid?: string;
117
+ /** 卡片处于流式更新模式时,进行卡片操作的顺序序号,用于保证多次更新的时序性。值为正整数,一次流式状态的多次更新操作(streaming_mode 一次从 true 到 false 期间)需要保证 sequence 递增,否则将报错。推荐使用时间戳。 */
118
+ sequence: number;
119
+ /** 组件列表 */
120
+ elements: string;
121
+ }
122
+ interface UpdateRequest {
123
+ /** 幂等 id,可通过传入唯一的 uuid 以保证相同批次的操作只进行一次。 */
124
+ uuid?: string;
125
+ /** 新的组件 */
126
+ element: string;
127
+ /** 卡片处于流式更新模式时,进行卡片操作的顺序序号,用于保证多次更新的时序性。值为正整数,一次流式状态的多次更新操作(streaming_mode 一次从 true 到 false 期间)需要保证 sequence 递增,否则将报错。推荐使用时间戳。 */
128
+ sequence: number;
129
+ }
130
+ interface PatchRequest {
131
+ /** 要更改的组件部分配置内容,传入 id 参数后将对原有组件的 id 进行更新,不支持修改 tag 参数。 */
132
+ partial_element: string;
133
+ /** 幂等 id,可通过传入唯一的 uuid 以保证相同批次的操作只进行一次。 */
134
+ uuid?: string;
135
+ /** 卡片处于流式更新模式时,进行卡片操作的顺序序号,用于保证多次更新的时序性。值为正整数,一次流式状态的多次更新操作(streaming_mode 一次从 true 到 false 期间)需要保证 sequence 递增,否则将报错。推荐使用时间戳。 */
136
+ sequence: number;
137
+ }
138
+ interface ContentRequest {
139
+ /** 幂等 id,可通过传入唯一的 uuid 以保证相同批次的操作只进行一次。 */
140
+ uuid?: string;
141
+ /** 更新后的文本内容 */
142
+ content: string;
143
+ /** 顺序序号,用于保证更新文本内容的时序性。在卡片的单次 streaming 模式周期中(steaming 状态从开始到停止),该值需为递增的正整数,否则将报错。 */
144
+ sequence: number;
145
+ }
146
+ interface DeleteRequest {
147
+ /** 幂等 id,可通过传入唯一的 uuid 以保证相同批次的操作只进行一次。 */
148
+ uuid?: string;
149
+ /** 卡片处于流式更新模式时,进行卡片操作的顺序序号,用于保证多次更新的时序性。值为正整数,一次流式状态的多次更新操作(streaming_mode 一次从 true 到 false 期间)需要保证 sequence 递增,否则将报错。推荐使用时间戳。 */
150
+ sequence: number;
151
+ }
152
+ }
153
+ }
139
154
  }
@@ -1,54 +1,89 @@
1
- import { ArchiveDetail, ChangeReason, Indicator, Item, ItemCategory, PlanDetail } from '.';
2
- import { Pagination } from '../internal';
1
+ import * as Lark from '.';
2
+ import { Paginated, Pagination } from '../internal';
3
3
  declare module '../internal' {
4
4
  interface Internal {
5
- /**
6
- * 批量查询员工薪资档案
7
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/compensation-v1/archive/query
8
- */
9
- queryCompensationArchive(body: QueryCompensationArchiveRequest, query?: QueryCompensationArchiveQuery): Paginated<ArchiveDetail>;
10
- /**
11
- * 批量查询薪资项
12
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/compensation-v1/item/list
13
- */
14
- listCompensationItem(query?: ListCompensationItemQuery): Paginated<Item>;
15
- /**
16
- * 批量查询薪资统计指标
17
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/compensation-v1/indicator/list
18
- */
19
- listCompensationIndicator(query?: Pagination): Paginated<Indicator>;
20
- /**
21
- * 批量获取薪资项分类信息
22
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/compensation-v1/item_category/list
23
- */
24
- listCompensationItemCategory(query?: Pagination): Paginated<ItemCategory>;
25
- /**
26
- * 批量查询薪资方案
27
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/compensation-v1/plan/list
28
- */
29
- listCompensationPlan(query?: Pagination): Paginated<PlanDetail>;
30
- /**
31
- * 批量查询定调薪原因
32
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/compensation-v1/change_reason/list
33
- */
34
- listCompensationChangeReason(query?: Pagination): Paginated<ChangeReason>;
5
+ compensation: Compensation.Methods;
35
6
  }
36
7
  }
37
- export interface QueryCompensationArchiveRequest {
38
- /** 用户ID列表 */
39
- user_id_list: string[];
40
- /** 档案Tid列表 */
41
- tid_list?: string[];
42
- /** 生效开始时间 */
43
- effective_start_date?: string;
44
- /** 生效结束时间 */
45
- effective_end_date?: string;
46
- }
47
- export interface QueryCompensationArchiveQuery extends Pagination {
48
- /** 用户ID类型 */
49
- user_id_type: 'user_id' | 'union_id' | 'open_id' | 'people_corehr_id';
50
- }
51
- export interface ListCompensationItemQuery extends Pagination {
52
- /** 薪酬项类型(不传则认为查询所有类型薪酬项) */
53
- item_type?: 'salary' | 'bonus' | 'recurring_payment';
8
+ export declare namespace Compensation {
9
+ interface Methods {
10
+ archive: Archive.Methods;
11
+ item: Item.Methods;
12
+ indicator: Indicator.Methods;
13
+ itemCategory: ItemCategory.Methods;
14
+ plan: Plan.Methods;
15
+ changeReason: ChangeReason.Methods;
16
+ }
17
+ namespace Archive {
18
+ interface Methods {
19
+ /**
20
+ * 批量查询员工薪资档案
21
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/compensation-v1/archive/query
22
+ */
23
+ query(body: QueryRequest, query?: QueryQuery): Paginated<Lark.ArchiveDetail>;
24
+ }
25
+ interface QueryRequest {
26
+ /** 用户ID列表 */
27
+ user_id_list: string[];
28
+ /** 档案Tid列表 */
29
+ tid_list?: string[];
30
+ /** 生效开始时间 */
31
+ effective_start_date?: string;
32
+ /** 生效结束时间 */
33
+ effective_end_date?: string;
34
+ }
35
+ interface QueryQuery extends Pagination {
36
+ /** 用户ID类型 */
37
+ user_id_type: 'user_id' | 'union_id' | 'open_id' | 'people_corehr_id';
38
+ }
39
+ }
40
+ namespace Item {
41
+ interface Methods {
42
+ /**
43
+ * 批量查询薪资项
44
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/compensation-v1/item/list
45
+ */
46
+ list(query?: ListQuery): Paginated<Lark.Item>;
47
+ }
48
+ interface ListQuery extends Pagination {
49
+ /** 薪酬项类型(不传则认为查询所有类型薪酬项) */
50
+ item_type?: 'salary' | 'bonus' | 'recurring_payment';
51
+ }
52
+ }
53
+ namespace Indicator {
54
+ interface Methods {
55
+ /**
56
+ * 批量查询薪资统计指标
57
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/compensation-v1/indicator/list
58
+ */
59
+ list(query?: Pagination): Paginated<Lark.Indicator>;
60
+ }
61
+ }
62
+ namespace ItemCategory {
63
+ interface Methods {
64
+ /**
65
+ * 批量获取薪资项分类信息
66
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/compensation-v1/item_category/list
67
+ */
68
+ list(query?: Pagination): Paginated<Lark.ItemCategory>;
69
+ }
70
+ }
71
+ namespace Plan {
72
+ interface Methods {
73
+ /**
74
+ * 批量查询薪资方案
75
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/compensation-v1/plan/list
76
+ */
77
+ list(query?: Pagination): Paginated<Lark.PlanDetail>;
78
+ }
79
+ }
80
+ namespace ChangeReason {
81
+ interface Methods {
82
+ /**
83
+ * 批量查询定调薪原因
84
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/compensation-v1/change_reason/list
85
+ */
86
+ list(query?: Pagination): Paginated<Lark.ChangeReason>;
87
+ }
88
+ }
54
89
  }