@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,531 +1,592 @@
1
- import { Activity, AdditionalInformation, Field, ImportedMetric, Indicator, MetricField, MetricInLibrary, MetricTag, MetricTemplate, Question, Reviewee, RevieweeMetric, ReviewProfile, ReviewTemplate, Semester, SemesterBaseInfo, StageTask, Template, Unit, WriteUserGroupScopeData } from '.'
2
- import { Internal, Pagination } from '../internal'
1
+ import * as Lark from '.'
2
+ import { Internal, Paginated, Pagination } from '../internal'
3
3
 
4
4
  declare module '../internal' {
5
5
  interface Internal {
6
- /**
7
- * 获取周期列表
8
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v1/semester/list
9
- */
10
- listPerformanceV1Semester(query?: ListPerformanceV1SemesterQuery): Promise<ListPerformanceV1SemesterResponse>
11
- /**
12
- * 获取项目列表
13
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/activity/query
14
- */
15
- queryPerformanceV2Activity(body: QueryPerformanceV2ActivityRequest, query?: QueryPerformanceV2ActivityQuery): Promise<QueryPerformanceV2ActivityResponse>
16
- /**
17
- * 批量查询补充信息
18
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/additional_information/query
19
- */
20
- queryPerformanceV2AdditionalInformation(body: QueryPerformanceV2AdditionalInformationRequest, query?: QueryPerformanceV2AdditionalInformationQuery): Paginated<AdditionalInformation, 'additional_informations'>
21
- /**
22
- * 批量导入补充信息
23
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/additional_information/import
24
- */
25
- importPerformanceV2AdditionalInformation(body: ImportPerformanceV2AdditionalInformationRequest, query?: ImportPerformanceV2AdditionalInformationQuery): Promise<ImportPerformanceV2AdditionalInformationResponse>
26
- /**
27
- * 批量删除补充信息
28
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/additional_informations-batch/delete
29
- */
30
- deletePerformanceV2AdditionalInformationsBatch(body: DeletePerformanceV2AdditionalInformationsBatchRequest, query?: DeletePerformanceV2AdditionalInformationsBatchQuery): Promise<DeletePerformanceV2AdditionalInformationsBatchResponse>
31
- /**
32
- * 更新人员组成员
33
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/user_group_user_rel/write
34
- */
35
- writePerformanceV2UserGroupUserRel(body: WritePerformanceV2UserGroupUserRelRequest, query?: WritePerformanceV2UserGroupUserRelQuery): Promise<WritePerformanceV2UserGroupUserRelResponse>
36
- /**
37
- * 获取被评估人信息
38
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/reviewee/query
39
- */
40
- queryPerformanceV2Reviewee(body: QueryPerformanceV2RevieweeRequest, query?: QueryPerformanceV2RevieweeQuery): Promise<QueryPerformanceV2RevieweeResponse>
41
- /**
42
- * 获取评估模板配置
43
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/review_template/query
44
- */
45
- queryPerformanceV2ReviewTemplate(body: QueryPerformanceV2ReviewTemplateRequest, query?: Pagination): Paginated<ReviewTemplate, 'review_templates'>
46
- /**
47
- * 获取评估项列表
48
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/indicator/query
49
- */
50
- queryPerformanceV2Indicator(body: QueryPerformanceV2IndicatorRequest, query?: Pagination): Paginated<Indicator, 'indicators'>
51
- /**
52
- * 获取标签填写题配置
53
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/question/query
54
- */
55
- queryPerformanceV2Question(body: QueryPerformanceV2QuestionRequest, query?: Pagination): Paginated<Question, 'tag_based_questions'>
56
- /**
57
- * 获取指标列表
58
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/metric_lib/query
59
- */
60
- queryPerformanceV2MetricLib(body: QueryPerformanceV2MetricLibRequest, query?: QueryPerformanceV2MetricLibQuery): Paginated<MetricInLibrary>
61
- /**
62
- * 获取指标模板列表
63
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/metric_template/query
64
- */
65
- queryPerformanceV2MetricTemplate(body: QueryPerformanceV2MetricTemplateRequest, query?: QueryPerformanceV2MetricTemplateQuery): Paginated<MetricTemplate>
66
- /**
67
- * 获取指标字段列表
68
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/metric_field/query
69
- */
70
- queryPerformanceV2MetricField(body: QueryPerformanceV2MetricFieldRequest): Promise<QueryPerformanceV2MetricFieldResponse>
71
- /**
72
- * 获取指标标签列表
73
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/metric_tag/list
74
- */
75
- listPerformanceV2MetricTag(query?: ListPerformanceV2MetricTagQuery): Paginated<MetricTag>
76
- /**
77
- * 获取周期任务(指定用户)
78
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v1/stage_task/find_by_user_list
79
- */
80
- findByUserListPerformanceV1StageTask(body: FindByUserListPerformanceV1StageTaskRequest, query?: FindByUserListPerformanceV1StageTaskQuery): Promise<FindByUserListPerformanceV1StageTaskResponse>
81
- /**
82
- * 获取周期任务(全部用户)
83
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v1/stage_task/find_by_page
84
- */
85
- findByPagePerformanceV1StageTask(body: FindByPagePerformanceV1StageTaskRequest, query?: FindByPagePerformanceV1StageTaskQuery): Promise<FindByPagePerformanceV1StageTaskResponse>
86
- /**
87
- * 获取被评估人关键指标结果
88
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/metric_detail/query
89
- */
90
- queryPerformanceV2MetricDetail(body: QueryPerformanceV2MetricDetailRequest, query?: QueryPerformanceV2MetricDetailQuery): Promise<QueryPerformanceV2MetricDetailResponse>
91
- /**
92
- * 录入被评估人关键指标数据
93
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/metric_detail/import
94
- */
95
- importPerformanceV2MetricDetail(body: ImportPerformanceV2MetricDetailRequest, query?: ImportPerformanceV2MetricDetailQuery): Promise<ImportPerformanceV2MetricDetailResponse>
96
- /**
97
- * 获取绩效结果
98
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v1/review_data/query
99
- */
100
- queryPerformanceV1ReviewData(body: QueryPerformanceV1ReviewDataRequest, query?: QueryPerformanceV1ReviewDataQuery): Promise<QueryPerformanceV1ReviewDataResponse>
101
- /**
102
- * 获取绩效详情数据
103
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/review_data/query
104
- */
105
- queryPerformanceV2ReviewData(body: QueryPerformanceV2ReviewDataRequest, query?: QueryPerformanceV2ReviewDataQuery): Promise<QueryPerformanceV2ReviewDataResponse>
6
+ performance: Performance.Methods
106
7
  }
107
8
  }
108
9
 
109
- export interface ListPerformanceV1SemesterQuery {
110
- /** 周期开始时间 */
111
- start_time?: string
112
- /** 周期结束时间 */
113
- end_time?: string
114
- /** 年份 */
115
- year?: number
116
- /** 周期类型分组 */
117
- type_group?: 'Annual' | 'Semi-annual' | 'Quarter' | 'Bimonth' | 'Month' | 'Non-standard'
118
- /** 周期类型 */
119
- type?: 'Annual' | 'H1' | 'H2' | 'Q1' | 'Q2' | 'Q3' | 'Q4' | 'January-February' | 'March-April' | 'May-June' | 'July-August' | 'September-October' | 'November-December' | 'January' | 'February' | 'March' | 'April' | 'May' | 'June' | 'July' | 'August' | 'September' | 'October' | 'November' | 'December' | 'Custom'
120
- /** 此次调用中使用的用户ID的类型 */
121
- user_id_type?: 'user_id' | 'union_id' | 'open_id'
122
- }
123
-
124
- export interface ListPerformanceV1SemesterResponse {
125
- /** 周期meta信息列表 */
126
- items?: Semester[]
127
- }
128
-
129
- export interface QueryPerformanceV2ActivityRequest {
130
- /** 评估周期 ID 列表,获取指定评估周期的项目 ID,semester_id 可通过【获取周期】接口获得 */
131
- semester_ids?: string[]
132
- /** 项目 ID 列表,如果同时传了「semester_ids」,则优先以「activity_ids」进行查询 */
133
- activity_ids?: string[]
134
- }
135
-
136
- export interface QueryPerformanceV2ActivityQuery {
137
- user_id_type?: 'user_id' | 'union_id' | 'open_id'
138
- }
139
-
140
- export interface QueryPerformanceV2ActivityResponse {
141
- /** 绩效评估项目列表。 */
142
- activities?: Activity[]
143
- }
144
-
145
- export interface QueryPerformanceV2AdditionalInformationRequest {
146
- /** 评估周期 ID 列表,semester_id 可通过【获取周期】接口获得 */
147
- semester_id: string
148
- /** 事项 ID 列表,获取指定事项 ID 的信息。以下请求参数中「item_ids」、「external_ids」、「reviewee_user_ids」均为空时,返回该评估周期的所有补充信息。若单次请求中多个请求参数有值,按照【item_ids > external_ids > reviewee_user_ids】的顺序只识别第一个有值的请求参数 */
149
- item_ids?: string[]
150
- /** 外部系统的事项 ID 列表,获取对应的飞书绩效事项 ID。「item_ids」参数有值时该参数不生效 */
151
- external_ids?: string[]
152
- /** 被评估人 ID 列表,获取周期下被评估人的事项信息。「item_ids」、「external_ids」参数有值时该参数不生效 */
153
- reviewee_user_ids?: string[]
154
- }
155
-
156
- export interface QueryPerformanceV2AdditionalInformationQuery extends Pagination {
157
- user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id'
158
- }
159
-
160
- export interface ImportPerformanceV2AdditionalInformationRequest {
161
- /** 评估周期 ID 列表,semester_id 可通过【获取周期】接口获得 */
162
- semester_id: string
163
- /** 补充信息列表,一次最多 1000 个 */
164
- additional_informations?: AdditionalInformation[]
165
- /** 导入记录名称,管理员可在补充信息管理的导入记录中查看。不传则默认为 API 导入。 */
166
- import_record_name?: string
167
- }
168
-
169
- export interface ImportPerformanceV2AdditionalInformationQuery {
170
- /** 根据 client_token 是否一致来判断是否为同一请求 */
171
- client_token: string
172
- user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id'
173
- }
174
-
175
- export interface ImportPerformanceV2AdditionalInformationResponse {
176
- /** 导入记录 ID */
177
- import_record_id?: string
178
- /** 成功导入后的补充信息列表 */
179
- additional_informations?: AdditionalInformation[]
180
- }
181
-
182
- export interface DeletePerformanceV2AdditionalInformationsBatchRequest {
183
- /** 评估周期 ID 列表,semester_id 可通过【获取周期】接口获得 */
184
- semester_id: string
185
- /** 补充信息列表,一次最多 100 个 */
186
- additional_informations: string[]
187
- }
188
-
189
- export interface DeletePerformanceV2AdditionalInformationsBatchQuery {
190
- user_id_type?: 'user_id' | 'union_id' | 'open_id'
191
- }
192
-
193
- export interface DeletePerformanceV2AdditionalInformationsBatchResponse {
194
- /** 被删除的补充信息列表 */
195
- additional_informations?: string[]
196
- }
197
-
198
- export const enum WritePerformanceV2UserGroupUserRelRequestScopeVisibleSetting {
199
- /** 无限制 */
200
- NotLimit = 0,
201
- /** 后台管理员不可见 */
202
- BackendAdminNotVisible = 1,
203
- }
204
-
205
- export interface WritePerformanceV2UserGroupUserRelRequest {
206
- /** 分组id key */
207
- group_id?: string
208
- /** 人员组查看人员名单可见性配置 */
209
- scope_visible_setting?: WritePerformanceV2UserGroupUserRelRequestScopeVisibleSetting
210
- /** 人员列表 */
211
- user_ids?: string[]
212
- }
213
-
214
- export interface WritePerformanceV2UserGroupUserRelQuery {
215
- /** 根据 client_token 是否一致来判断是否为同一请求 */
216
- client_token: string
217
- /** 用户ID类型 */
218
- user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id'
219
- }
220
-
221
- export interface WritePerformanceV2UserGroupUserRelResponse {
222
- /** 写入员工范围响应 */
223
- data?: WriteUserGroupScopeData
224
- }
225
-
226
- export interface QueryPerformanceV2RevieweeRequest {
227
- /** 周期 ID,1 次只允许查询 1 个周期,semester_id 可通过【获取周期】接口获得 */
228
- semester_id: string
229
- /** 用户 ID,类型需要与查询参数中的user_id_type保持一致。不传则默认返回该周期所有被评估人的信息。 */
230
- user_ids?: string[]
231
- /** 项目 ID 列表,查询指定的项目下的被评估人数据 */
232
- activity_ids?: string[]
233
- }
234
-
235
- export interface QueryPerformanceV2RevieweeQuery extends Pagination {
236
- user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id'
237
- }
238
-
239
- export interface QueryPerformanceV2RevieweeResponse {
240
- /** 周期ID */
241
- semester_id?: string
242
- /** 被评估人列表 */
243
- reviewees?: Reviewee[]
244
- /** 是否还有更多项 */
245
- has_more?: boolean
246
- /** 分页标记,当 has_more 为 true 时,会同时返回新的 page_token,否则不返回 page_token */
247
- page_token?: string
248
- }
249
-
250
- export interface QueryPerformanceV2ReviewTemplateRequest {
251
- /** 评估模板 ID 列表,获取指定评估模板的配置数据。如果不传则返回所有 */
252
- review_template_ids?: string[]
253
- }
254
-
255
- export interface QueryPerformanceV2IndicatorRequest {
256
- /** 评估项 ID 列表,获取指定评估项的配置数据 */
257
- indicator_ids?: string[]
258
- }
259
-
260
- export interface QueryPerformanceV2QuestionRequest {
261
- /** 标签填写题 ID 列表,获取指定标签填写题的配置数据。如果不传则返回所有 */
262
- tag_based_question_ids?: string[]
263
- }
264
-
265
- export interface QueryPerformanceV2MetricLibRequest {
266
- /** 状态是否为启用 */
267
- is_active?: boolean
268
- /** 指标所属的标签 ID */
269
- tag_ids?: string[]
270
- /** 所属的指标类型 ID */
271
- type_ids?: string[]
272
- /** 可用范围 */
273
- range_of_availability?: 'admins_and_reviewees' | 'only_admins'
274
- /** 评分设置类型 */
275
- scoring_setting_type?: 'score_manually' | 'score_by_formula'
276
- }
277
-
278
- export interface QueryPerformanceV2MetricLibQuery extends Pagination {
279
- user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id'
280
- }
281
-
282
- export interface QueryPerformanceV2MetricTemplateRequest {
283
- /** 指标模板 ID 列表,metrics_template_id 可以通过指标模板的后台配置详情页的 url 获取,也可通过本接口的返回值获取。不填写则默认返回所有指标模板 */
284
- metrics_template_ids?: string[]
285
- /** 状态 */
286
- status?: 'to_be_configured' | 'to_be_activated' | 'enabled' | 'disabled'
287
- }
288
-
289
- export interface QueryPerformanceV2MetricTemplateQuery extends Pagination {
290
- user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id'
291
- }
292
-
293
- export interface QueryPerformanceV2MetricFieldRequest {
294
- /** 指标的字段 ID,不传则默认获取全部字段信息 */
295
- field_ids?: string[]
296
- }
297
-
298
- export interface QueryPerformanceV2MetricFieldResponse {
299
- /** 指标字段信息 */
300
- items?: MetricField[]
301
- }
302
-
303
- export interface ListPerformanceV2MetricTagQuery extends Pagination {
304
- /** 指标标签 ID 列表 */
305
- tag_ids?: string[]
306
- }
307
-
308
- export interface FindByUserListPerformanceV1StageTaskRequest {
309
- /** 周期ID,可以通过「查询周期」接口获得 */
310
- semester_id: string
311
- /** 用户ID列表 */
312
- user_id_lists: string[]
313
- /** 任务分类(不传默认包含所有) */
314
- task_option_lists?: number[]
315
- /** 查询晚于当前时间截止的环节 */
316
- after_time?: string
317
- /** 查询早于当前时间截止的环节 */
318
- before_time?: string
319
- }
320
-
321
- export interface FindByUserListPerformanceV1StageTaskQuery {
322
- /** 此次调用中使用的用户ID的类型 */
323
- user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id'
324
- }
10
+ export namespace Performance {
11
+ export interface Methods {
12
+ semester: Semester.Methods
13
+ activity: Activity.Methods
14
+ additionalInformation: AdditionalInformation.Methods
15
+ additionalInformations: AdditionalInformations.Methods
16
+ userGroupUserRel: UserGroupUserRel.Methods
17
+ reviewee: Reviewee.Methods
18
+ reviewTemplate: ReviewTemplate.Methods
19
+ indicator: Indicator.Methods
20
+ question: Question.Methods
21
+ metricLib: MetricLib.Methods
22
+ metricTemplate: MetricTemplate.Methods
23
+ metricField: MetricField.Methods
24
+ metricTag: MetricTag.Methods
25
+ stageTask: StageTask.Methods
26
+ metricDetail: MetricDetail.Methods
27
+ reviewData: ReviewData.Methods
28
+ }
325
29
 
326
- export interface FindByUserListPerformanceV1StageTaskResponse {
327
- /** 周期基础信息 */
328
- base?: SemesterBaseInfo
329
- /** 周期环节信息列表 */
330
- items?: StageTask[]
331
- }
30
+ export namespace Semester {
31
+ export interface Methods {
32
+ /**
33
+ * 获取周期列表
34
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v1/semester/list
35
+ */
36
+ list(query?: ListQuery): Promise<ListResponse>
37
+ }
38
+
39
+ export interface ListQuery {
40
+ /** 周期开始时间 */
41
+ start_time?: string
42
+ /** 周期结束时间 */
43
+ end_time?: string
44
+ /** 年份 */
45
+ year?: number
46
+ /** 周期类型分组 */
47
+ type_group?: 'Annual' | 'Semi-annual' | 'Quarter' | 'Bimonth' | 'Month' | 'Non-standard'
48
+ /** 周期类型 */
49
+ type?: 'Annual' | 'H1' | 'H2' | 'Q1' | 'Q2' | 'Q3' | 'Q4' | 'January-February' | 'March-April' | 'May-June' | 'July-August' | 'September-October' | 'November-December' | 'January' | 'February' | 'March' | 'April' | 'May' | 'June' | 'July' | 'August' | 'September' | 'October' | 'November' | 'December' | 'Custom'
50
+ /** 此次调用中使用的用户ID的类型 */
51
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
52
+ }
53
+
54
+ export interface ListResponse {
55
+ /** 周期meta信息列表 */
56
+ items?: Lark.Semester[]
57
+ }
58
+ }
332
59
 
333
- export interface FindByPagePerformanceV1StageTaskRequest {
334
- /** 周期ID,可以通过「查询周期」接口获得 */
335
- semester_id: string
336
- /** 任务分类(不传默认包含所有) */
337
- task_option_lists?: number[]
338
- /** 查询晚于当前时间截止的环节 */
339
- after_time?: string
340
- /** 查询早于当前时间截止的环节 */
341
- before_time?: string
342
- /** 分页标记,第一次请求不填,表示从头开始遍历;分页查询结果还有更多项时会同时返回新的 page_token,下次遍历可采用该 page_token 获取查询结果 */
343
- page_token?: string
344
- /** 分页大小 */
345
- page_size?: number
346
- }
60
+ export namespace Activity {
61
+ export interface Methods {
62
+ /**
63
+ * 获取项目列表
64
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/activity/query
65
+ */
66
+ query(body: QueryRequest, query?: QueryQuery): Promise<QueryResponse>
67
+ }
68
+
69
+ export interface QueryRequest {
70
+ /** 评估周期 ID 列表,获取指定评估周期的项目 ID,semester_id 可通过【获取周期】接口获得 */
71
+ semester_ids?: string[]
72
+ /** 项目 ID 列表,如果同时传了「semester_ids」,则优先以「activity_ids」进行查询 */
73
+ activity_ids?: string[]
74
+ }
75
+
76
+ export interface QueryQuery {
77
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
78
+ }
79
+
80
+ export interface QueryResponse {
81
+ /** 绩效评估项目列表。 */
82
+ activities?: Lark.Activity[]
83
+ }
84
+ }
347
85
 
348
- export interface FindByPagePerformanceV1StageTaskQuery {
349
- /** 调用结果中用户ID的类型 */
350
- user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id'
351
- }
86
+ export namespace AdditionalInformation {
87
+ export interface Methods {
88
+ /**
89
+ * 批量查询补充信息
90
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/additional_information/query
91
+ */
92
+ query(body: QueryRequest, query?: QueryQuery): Paginated<Lark.AdditionalInformation, 'additional_informations'>
93
+ /**
94
+ * 批量导入补充信息
95
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/additional_information/import
96
+ */
97
+ import(body: ImportRequest, query?: ImportQuery): Promise<ImportResponse>
98
+ }
99
+
100
+ export interface QueryRequest {
101
+ /** 评估周期 ID 列表,semester_id 可通过【获取周期】接口获得 */
102
+ semester_id: string
103
+ /** 事项 ID 列表,获取指定事项 ID 的信息。以下请求参数中「item_ids」、「external_ids」、「reviewee_user_ids」均为空时,返回该评估周期的所有补充信息。若单次请求中多个请求参数有值,按照【item_ids > external_ids > reviewee_user_ids】的顺序只识别第一个有值的请求参数 */
104
+ item_ids?: string[]
105
+ /** 外部系统的事项 ID 列表,获取对应的飞书绩效事项 ID。「item_ids」参数有值时该参数不生效 */
106
+ external_ids?: string[]
107
+ /** 被评估人 ID 列表,获取周期下被评估人的事项信息。「item_ids」、「external_ids」参数有值时该参数不生效 */
108
+ reviewee_user_ids?: string[]
109
+ }
110
+
111
+ export interface QueryQuery extends Pagination {
112
+ user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id'
113
+ }
114
+
115
+ export interface ImportRequest {
116
+ /** 评估周期 ID 列表,semester_id 可通过【获取周期】接口获得 */
117
+ semester_id: string
118
+ /** 补充信息列表,一次最多 1000 个 */
119
+ additional_informations?: Lark.AdditionalInformation[]
120
+ /** 导入记录名称,管理员可在补充信息管理的导入记录中查看。不传则默认为 API 导入。 */
121
+ import_record_name?: string
122
+ }
123
+
124
+ export interface ImportQuery {
125
+ /** 根据 client_token 是否一致来判断是否为同一请求 */
126
+ client_token: string
127
+ user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id'
128
+ }
129
+
130
+ export interface ImportResponse {
131
+ /** 导入记录 ID */
132
+ import_record_id?: string
133
+ /** 成功导入后的补充信息列表 */
134
+ additional_informations?: Lark.AdditionalInformation[]
135
+ }
136
+ }
352
137
 
353
- export interface FindByPagePerformanceV1StageTaskResponse {
354
- /** 周期基础信息 */
355
- base?: SemesterBaseInfo
356
- /** 周期环节信息列表 */
357
- items?: StageTask[]
358
- /** 是否有下一页数据 */
359
- has_more?: boolean
360
- /** 下一页分页的token */
361
- page_token?: string
362
- }
138
+ export namespace AdditionalInformations {
139
+ export interface Methods {
140
+ batch: Batch.Methods
141
+ }
142
+
143
+ export namespace Batch {
144
+ export interface Methods {
145
+ /**
146
+ * 批量删除补充信息
147
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/additional_informations-batch/delete
148
+ */
149
+ delete(body: DeleteRequest, query?: DeleteQuery): Promise<DeleteResponse>
150
+ }
151
+
152
+ export interface DeleteRequest {
153
+ /** 评估周期 ID 列表,semester_id 可通过【获取周期】接口获得 */
154
+ semester_id: string
155
+ /** 补充信息列表,一次最多 100 个 */
156
+ additional_informations: string[]
157
+ }
158
+
159
+ export interface DeleteQuery {
160
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
161
+ }
162
+
163
+ export interface DeleteResponse {
164
+ /** 被删除的补充信息列表 */
165
+ additional_informations?: string[]
166
+ }
167
+ }
168
+ }
363
169
 
364
- export interface QueryPerformanceV2MetricDetailRequest {
365
- /** 周期 ID,1 次只允许查询 1 个周期,semester_id 可通过【获取周期】接口获得 */
366
- semester_id: string
367
- /** 被评估人 ID 列表。如果不传则返回该周期所有参与的被评估人的关键指标详情 */
368
- reviewee_user_ids: string[]
369
- }
170
+ export namespace UserGroupUserRel {
171
+ export interface Methods {
172
+ /**
173
+ * 更新人员组成员
174
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/user_group_user_rel/write
175
+ */
176
+ write(body: WriteRequest, query?: WriteQuery): Promise<WriteResponse>
177
+ }
178
+
179
+ export const enum WriteRequestScopeVisibleSetting {
180
+ /** 无限制 */
181
+ NotLimit = 0,
182
+ /** 后台管理员不可见 */
183
+ BackendAdminNotVisible = 1,
184
+ }
185
+
186
+ export interface WriteRequest {
187
+ /** 分组id key */
188
+ group_id?: string
189
+ /** 人员组查看人员名单可见性配置 */
190
+ scope_visible_setting?: WriteRequestScopeVisibleSetting
191
+ /** 人员列表 */
192
+ user_ids?: string[]
193
+ }
194
+
195
+ export interface WriteQuery {
196
+ /** 根据 client_token 是否一致来判断是否为同一请求 */
197
+ client_token: string
198
+ /** 用户ID类型 */
199
+ user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id'
200
+ }
201
+
202
+ export interface WriteResponse {
203
+ /** 写入员工范围响应 */
204
+ data?: Lark.WriteUserGroupScopeData
205
+ }
206
+ }
370
207
 
371
- export interface QueryPerformanceV2MetricDetailQuery {
372
- user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id'
373
- }
208
+ export namespace Reviewee {
209
+ export interface Methods {
210
+ /**
211
+ * 获取被评估人信息
212
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/reviewee/query
213
+ */
214
+ query(body: QueryRequest, query?: QueryQuery): Promise<QueryResponse>
215
+ }
216
+
217
+ export interface QueryRequest {
218
+ /** 周期 ID,1 次只允许查询 1 个周期,semester_id 可通过【获取周期】接口获得 */
219
+ semester_id: string
220
+ /** 用户 ID,类型需要与查询参数中的user_id_type保持一致。不传则默认返回该周期所有被评估人的信息。 */
221
+ user_ids?: string[]
222
+ /** 项目 ID 列表,查询指定的项目下的被评估人数据 */
223
+ activity_ids?: string[]
224
+ }
225
+
226
+ export interface QueryQuery extends Pagination {
227
+ user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id'
228
+ }
229
+
230
+ export interface QueryResponse {
231
+ /** 周期ID */
232
+ semester_id?: string
233
+ /** 被评估人列表 */
234
+ reviewees?: Lark.Reviewee[]
235
+ /** 是否还有更多项 */
236
+ has_more?: boolean
237
+ /** 分页标记,当 has_more 为 true 时,会同时返回新的 page_token,否则不返回 page_token */
238
+ page_token?: string
239
+ }
240
+ }
374
241
 
375
- export interface QueryPerformanceV2MetricDetailResponse {
376
- /** 周期ID */
377
- semester_id?: string
378
- /** 指标明细列表 */
379
- reviewee_metrics?: RevieweeMetric[]
380
- }
242
+ export namespace ReviewTemplate {
243
+ export interface Methods {
244
+ /**
245
+ * 获取评估模板配置
246
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/review_template/query
247
+ */
248
+ query(body: QueryRequest, query?: Pagination): Paginated<Lark.ReviewTemplate, 'review_templates'>
249
+ }
250
+
251
+ export interface QueryRequest {
252
+ /** 评估模板 ID 列表,获取指定评估模板的配置数据。如果不传则返回所有 */
253
+ review_template_ids?: string[]
254
+ }
255
+ }
381
256
 
382
- export interface ImportPerformanceV2MetricDetailRequest {
383
- /** 周期 ID,semester_id 可通过【获取周期】接口获得 */
384
- semester_id: string
385
- /** 录入记录名称,数据源录入人在录入记录页面可以查看该记录名称。如果不传则默认为「API 录入」 */
386
- import_record_name?: string
387
- /** 指标明细列表,一次最多50个 */
388
- imported_metrics: ImportedMetric[]
389
- }
257
+ export namespace Indicator {
258
+ export interface Methods {
259
+ /**
260
+ * 获取评估项列表
261
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/indicator/query
262
+ */
263
+ query(body: QueryRequest, query?: Pagination): Paginated<Lark.Indicator, 'indicators'>
264
+ }
265
+
266
+ export interface QueryRequest {
267
+ /** 评估项 ID 列表,获取指定评估项的配置数据 */
268
+ indicator_ids?: string[]
269
+ }
270
+ }
390
271
 
391
- export interface ImportPerformanceV2MetricDetailQuery {
392
- /** 根据 client_token 是否一致来判断是否为同一请求 */
393
- client_token: string
394
- /** 用户ID类型 */
395
- user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id'
396
- }
272
+ export namespace Question {
273
+ export interface Methods {
274
+ /**
275
+ * 获取标签填写题配置
276
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/question/query
277
+ */
278
+ query(body: QueryRequest, query?: Pagination): Paginated<Lark.Question, 'tag_based_questions'>
279
+ }
280
+
281
+ export interface QueryRequest {
282
+ /** 标签填写题 ID 列表,获取指定标签填写题的配置数据。如果不传则返回所有 */
283
+ tag_based_question_ids?: string[]
284
+ }
285
+ }
397
286
 
398
- export interface ImportPerformanceV2MetricDetailResponse {
399
- /** 成功时返回导入记录 ID,失败时则为 null */
400
- import_record_id?: string
401
- }
287
+ export namespace MetricLib {
288
+ export interface Methods {
289
+ /**
290
+ * 获取指标列表
291
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/metric_lib/query
292
+ */
293
+ query(body: QueryRequest, query?: QueryQuery): Paginated<Lark.MetricInLibrary>
294
+ }
295
+
296
+ export interface QueryRequest {
297
+ /** 状态是否为启用 */
298
+ is_active?: boolean
299
+ /** 指标所属的标签 ID */
300
+ tag_ids?: string[]
301
+ /** 所属的指标类型 ID */
302
+ type_ids?: string[]
303
+ /** 可用范围 */
304
+ range_of_availability?: 'admins_and_reviewees' | 'only_admins'
305
+ /** 评分设置类型 */
306
+ scoring_setting_type?: 'score_manually' | 'score_by_formula'
307
+ }
308
+
309
+ export interface QueryQuery extends Pagination {
310
+ user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id'
311
+ }
312
+ }
402
313
 
403
- export interface QueryPerformanceV1ReviewDataRequest {
404
- /** 查询范围的开始日期,毫秒级时间戳,开始日期不能晚于截止日期 */
405
- start_time: string
406
- /** 查询范围的截止日期,毫秒级时间戳,截止日期不能早于开始日期 */
407
- end_time: string
408
- /** 评估环节类型,目前仅支持上级评估环节和结果沟通环节(不传默认包含所有的环节)**可选值有**:- `leader_review`:上级评估环节- `communication_and_open_result`:结果沟通环节 */
409
- stage_types: ('leader_review' | 'communication_and_open_result' | 'view_result')[]
410
- /** 评估环节状态(不传默认包含所有的状态)**可选值有**:- `0`:未开始,任务的开始时间未到达- `1`:待完成,任务的开始时间到达而截止时间未到达,且任务未完成- `2`:已截止,任务的截止时间已到达,且任务未完成- `3`:已完成,任务已完成 */
411
- stage_progress?: (0 | 1 | 2 | 3 | 4)[]
412
- /** 评估周期 ID 列表,semester_id 是一个评估周期的唯一标识,可以通过「我的评估」页面 url 获取,也可通过本接口的返回值获取 */
413
- semester_id_list?: string[]
414
- /** 被评估人 ID 列表 */
415
- reviewee_user_id_list: string[]
416
- /** 环节更新时间晚于,可筛选出在此时间之后,有内容提交的环节数据 */
417
- updated_later_than?: string
418
- }
314
+ export namespace MetricTemplate {
315
+ export interface Methods {
316
+ /**
317
+ * 获取指标模板列表
318
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/metric_template/query
319
+ */
320
+ query(body: QueryRequest, query?: QueryQuery): Paginated<Lark.MetricTemplate>
321
+ }
322
+
323
+ export interface QueryRequest {
324
+ /** 指标模板 ID 列表,metrics_template_id 可以通过指标模板的后台配置详情页的 url 获取,也可通过本接口的返回值获取。不填写则默认返回所有指标模板 */
325
+ metrics_template_ids?: string[]
326
+ /** 状态 */
327
+ status?: 'to_be_configured' | 'to_be_activated' | 'enabled' | 'disabled'
328
+ }
329
+
330
+ export interface QueryQuery extends Pagination {
331
+ user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id'
332
+ }
333
+ }
419
334
 
420
- export interface QueryPerformanceV1ReviewDataQuery {
421
- /** 此次调用中使用的用户ID的类型 */
422
- user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id'
423
- }
335
+ export namespace MetricField {
336
+ export interface Methods {
337
+ /**
338
+ * 获取指标字段列表
339
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/metric_field/query
340
+ */
341
+ query(body: QueryRequest): Promise<QueryResponse>
342
+ }
343
+
344
+ export interface QueryRequest {
345
+ /** 指标的字段 ID,不传则默认获取全部字段信息 */
346
+ field_ids?: string[]
347
+ }
348
+
349
+ export interface QueryResponse {
350
+ /** 指标字段信息 */
351
+ items?: Lark.MetricField[]
352
+ }
353
+ }
424
354
 
425
- export interface QueryPerformanceV1ReviewDataResponse {
426
- /** 绩效评估周期列表 */
427
- semesters?: Semester[]
428
- /** 绩效评估项目列表 */
429
- activities?: Activity[]
430
- /** 评估项列表 */
431
- indicators?: Indicator[]
432
- /** 评估模板列表 */
433
- templates?: Template[]
434
- /** 评估内容列表 */
435
- units?: Unit[]
436
- /** 填写项列表 */
437
- fields?: Field[]
438
- /** 评估数据列表 */
439
- datas?: ReviewProfile[]
440
- }
355
+ export namespace MetricTag {
356
+ export interface Methods {
357
+ /**
358
+ * 获取指标标签列表
359
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/metric_tag/list
360
+ */
361
+ list(query?: ListQuery): Paginated<Lark.MetricTag>
362
+ }
363
+
364
+ export interface ListQuery extends Pagination {
365
+ /** 指标标签 ID 列表 */
366
+ tag_ids?: string[]
367
+ }
368
+ }
441
369
 
442
- export interface QueryPerformanceV2ReviewDataRequest {
443
- /** 评估周期 ID 列表,semester_id 可通过【获取周期】 */
444
- semester_ids: string[]
445
- /** 被评估人 ID 列表 */
446
- reviewee_user_ids: string[]
447
- /** 环节类型 */
448
- stage_types?: ('summarize_key_outputs' | 'review' | 'communication_and_open_result' | 'view_result' | 'reconsideration' | 'leader_review')[]
449
- /** 评估型环节的执行人角色,不传默认包含所有的执行人角色。当传入的环节类型中有评估型环节时,返回指定执行人角色的评估型环节数据 */
450
- review_stage_roles?: ('reviewee' | 'invited_reviewer' | 'solid_line_leader' | 'dotted_line_leader' | 'secondary_solid_line_leader' | 'direct_project_leader' | 'custom_review_role' | 'metric_reviewer')[]
451
- /** 环节 ID,如果同时传了环节 ID 和环节类型,优先返回环节 ID 对应的绩效数据 */
452
- stage_ids?: string[]
453
- /** 当要获取的绩效数据的环节类型包含终评环节时,可指定是否需要返回绩效终评数据的具体环节来源。不填则默认不返回 返回的来源枚举值为: 枚举值: review 产生终评结果的评估型环节 calibaration 校准环节 reconsideration 结果复议环节 */
454
- need_leader_review_data_source?: boolean
455
- /** 环节更新时间晚于,可筛选出在此时间之后,有内容提交的环节数据 */
456
- updated_later_than?: string
457
- /** 环节状态,不传默认包含所有状态。各类型的环节分别有以下环节状态: 绩效结果查看环节状态 可选值: 0:已开通,绩效结果已开通,未发起复议也无需确认结果 1:待确认,绩效结果已开通但被评估人还未确认结果,确认的截止时间还未到达 2:已截止,绩效结果已开通但被评估人还未确认结果,确认的截止时间已到达 3:已确认,绩效结果已开通,被评估人已确认结果 4:已复议,绩效结果已开通,且被评估人已发起 绩效结果复议环节状态 可选值: 1:待完成,任务未完成 2:已截止,任务的截止时间已到达,且任务未完成 3:已完成,任务已完成 除上述类型外的其他环节类型状态 可选值: 0:未开始,任务的开始时间未到达 1:待完成,任务的开始时间到达而截止时间未到达,且任务未完成 2:已截止,任务的截止时间已到达,且任务未完成 3:已完成,任务已完成 */
458
- stage_progresses?: number[]
459
- }
370
+ export namespace StageTask {
371
+ export interface Methods {
372
+ /**
373
+ * 获取周期任务(指定用户)
374
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v1/stage_task/find_by_user_list
375
+ */
376
+ findByUserList(body: FindByUserListRequest, query?: FindByUserListQuery): Promise<FindByUserListResponse>
377
+ /**
378
+ * 获取周期任务(全部用户)
379
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v1/stage_task/find_by_page
380
+ */
381
+ findByPage(body: FindByPageRequest, query?: FindByPageQuery): Promise<FindByPageResponse>
382
+ }
383
+
384
+ export interface FindByUserListRequest {
385
+ /** 周期ID,可以通过「查询周期」接口获得 */
386
+ semester_id: string
387
+ /** 用户ID列表 */
388
+ user_id_lists: string[]
389
+ /** 任务分类(不传默认包含所有) */
390
+ task_option_lists?: number[]
391
+ /** 查询晚于当前时间截止的环节 */
392
+ after_time?: string
393
+ /** 查询早于当前时间截止的环节 */
394
+ before_time?: string
395
+ }
396
+
397
+ export interface FindByUserListQuery {
398
+ /** 此次调用中使用的用户ID的类型 */
399
+ user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id'
400
+ }
401
+
402
+ export interface FindByUserListResponse {
403
+ /** 周期基础信息 */
404
+ base?: Lark.SemesterBaseInfo
405
+ /** 周期环节信息列表 */
406
+ items?: Lark.StageTask[]
407
+ }
408
+
409
+ export interface FindByPageRequest {
410
+ /** 周期ID,可以通过「查询周期」接口获得 */
411
+ semester_id: string
412
+ /** 任务分类(不传默认包含所有) */
413
+ task_option_lists?: number[]
414
+ /** 查询晚于当前时间截止的环节 */
415
+ after_time?: string
416
+ /** 查询早于当前时间截止的环节 */
417
+ before_time?: string
418
+ /** 分页标记,第一次请求不填,表示从头开始遍历;分页查询结果还有更多项时会同时返回新的 page_token,下次遍历可采用该 page_token 获取查询结果 */
419
+ page_token?: string
420
+ /** 分页大小 */
421
+ page_size?: number
422
+ }
423
+
424
+ export interface FindByPageQuery {
425
+ /** 调用结果中用户ID的类型 */
426
+ user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id'
427
+ }
428
+
429
+ export interface FindByPageResponse {
430
+ /** 周期基础信息 */
431
+ base?: Lark.SemesterBaseInfo
432
+ /** 周期环节信息列表 */
433
+ items?: Lark.StageTask[]
434
+ /** 是否有下一页数据 */
435
+ has_more?: boolean
436
+ /** 下一页分页的token */
437
+ page_token?: string
438
+ }
439
+ }
460
440
 
461
- export interface QueryPerformanceV2ReviewDataQuery {
462
- user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id'
463
- }
441
+ export namespace MetricDetail {
442
+ export interface Methods {
443
+ /**
444
+ * 获取被评估人关键指标结果
445
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/metric_detail/query
446
+ */
447
+ query(body: QueryRequest, query?: QueryQuery): Promise<QueryResponse>
448
+ /**
449
+ * 录入被评估人关键指标数据
450
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/metric_detail/import
451
+ */
452
+ import(body: ImportRequest, query?: ImportQuery): Promise<ImportResponse>
453
+ }
454
+
455
+ export interface QueryRequest {
456
+ /** 周期 ID,1 次只允许查询 1 个周期,semester_id 可通过【获取周期】接口获得 */
457
+ semester_id: string
458
+ /** 被评估人 ID 列表。如果不传则返回该周期所有参与的被评估人的关键指标详情 */
459
+ reviewee_user_ids: string[]
460
+ }
461
+
462
+ export interface QueryQuery {
463
+ user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id'
464
+ }
465
+
466
+ export interface QueryResponse {
467
+ /** 周期ID */
468
+ semester_id?: string
469
+ /** 指标明细列表 */
470
+ reviewee_metrics?: Lark.RevieweeMetric[]
471
+ }
472
+
473
+ export interface ImportRequest {
474
+ /** 周期 ID,semester_id 可通过【获取周期】接口获得 */
475
+ semester_id: string
476
+ /** 录入记录名称,数据源录入人在录入记录页面可以查看该记录名称。如果不传则默认为「API 录入」 */
477
+ import_record_name?: string
478
+ /** 指标明细列表,一次最多50个 */
479
+ imported_metrics: Lark.ImportedMetric[]
480
+ }
481
+
482
+ export interface ImportQuery {
483
+ /** 根据 client_token 是否一致来判断是否为同一请求 */
484
+ client_token: string
485
+ /** 用户ID类型 */
486
+ user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id'
487
+ }
488
+
489
+ export interface ImportResponse {
490
+ /** 成功时返回导入记录 ID,失败时则为 null */
491
+ import_record_id?: string
492
+ }
493
+ }
464
494
 
465
- export interface QueryPerformanceV2ReviewDataResponse {
466
- /** 评估数据列表 */
467
- datas?: ReviewProfile[]
495
+ export namespace ReviewData {
496
+ export interface Methods {
497
+ /**
498
+ * 获取绩效详情数据
499
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/review_data/query
500
+ */
501
+ query(body: QueryRequest, query?: QueryQuery): Promise<QueryResponse>
502
+ }
503
+
504
+ export interface QueryRequest {
505
+ /** 评估周期 ID 列表,semester_id 可通过【获取周期】 */
506
+ semester_ids: string[]
507
+ /** 被评估人 ID 列表 */
508
+ reviewee_user_ids: string[]
509
+ /** 环节类型 */
510
+ stage_types?: ('summarize_key_outputs' | 'review' | 'communication_and_open_result' | 'view_result' | 'reconsideration' | 'leader_review')[]
511
+ /** 评估型环节的执行人角色,不传默认包含所有的执行人角色。当传入的环节类型中有评估型环节时,返回指定执行人角色的评估型环节数据 */
512
+ review_stage_roles?: ('reviewee' | 'invited_reviewer' | 'solid_line_leader' | 'dotted_line_leader' | 'secondary_solid_line_leader' | 'direct_project_leader' | 'custom_review_role' | 'metric_reviewer')[]
513
+ /** 环节 ID,如果同时传了环节 ID 和环节类型,优先返回环节 ID 对应的绩效数据 */
514
+ stage_ids?: string[]
515
+ /** 当要获取的绩效数据的环节类型包含终评环节时,可指定是否需要返回绩效终评数据的具体环节来源。不填则默认不返回 返回的来源枚举值为: 枚举值: review 产生终评结果的评估型环节 calibaration 校准环节 reconsideration 结果复议环节 */
516
+ need_leader_review_data_source?: boolean
517
+ /** 环节更新时间晚于,可筛选出在此时间之后,有内容提交的环节数据 */
518
+ updated_later_than?: string
519
+ /** 环节状态,不传默认包含所有状态。各类型的环节分别有以下环节状态: 绩效结果查看环节状态 可选值: 0:已开通,绩效结果已开通,未发起复议也无需确认结果 1:待确认,绩效结果已开通但被评估人还未确认结果,确认的截止时间还未到达 2:已截止,绩效结果已开通但被评估人还未确认结果,确认的截止时间已到达 3:已确认,绩效结果已开通,被评估人已确认结果 4:已复议,绩效结果已开通,且被评估人已发起 绩效结果复议环节状态 可选值: 1:待完成,任务未完成 2:已截止,任务的截止时间已到达,且任务未完成 3:已完成,任务已完成 除上述类型外的其他环节类型状态 可选值: 0:未开始,任务的开始时间未到达 1:待完成,任务的开始时间到达而截止时间未到达,且任务未完成 2:已截止,任务的截止时间已到达,且任务未完成 3:已完成,任务已完成 */
520
+ stage_progresses?: number[]
521
+ }
522
+
523
+ export interface QueryQuery {
524
+ user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id'
525
+ }
526
+
527
+ export interface QueryResponse {
528
+ /** 评估数据列表 */
529
+ datas?: Lark.ReviewProfile[]
530
+ }
531
+ }
468
532
  }
469
533
 
470
534
  Internal.define({
471
535
  '/performance/v1/semesters': {
472
- GET: 'listPerformanceV1Semester',
536
+ GET: 'performance.semester.list',
473
537
  },
474
538
  '/performance/v2/activity/query': {
475
- POST: 'queryPerformanceV2Activity',
539
+ POST: 'performance.activity.query',
476
540
  },
477
541
  '/performance/v2/additional_informations/query': {
478
- POST: { name: 'queryPerformanceV2AdditionalInformation', pagination: { argIndex: 1, itemsKey: 'additional_informations' } },
542
+ POST: { name: 'performance.additionalInformation.query', pagination: { argIndex: 1, itemsKey: 'additional_informations' } },
479
543
  },
480
544
  '/performance/v2/additional_informations/import': {
481
- POST: 'importPerformanceV2AdditionalInformation',
545
+ POST: 'performance.additionalInformation.import',
482
546
  },
483
547
  '/performance/v2/additional_informations/batch': {
484
- DELETE: 'deletePerformanceV2AdditionalInformationsBatch',
548
+ DELETE: 'performance.additionalInformations.batch.delete',
485
549
  },
486
550
  '/performance/v2/user_group_user_rels/write': {
487
- POST: 'writePerformanceV2UserGroupUserRel',
551
+ POST: 'performance.userGroupUserRel.write',
488
552
  },
489
553
  '/performance/v2/reviewees/query': {
490
- POST: 'queryPerformanceV2Reviewee',
554
+ POST: 'performance.reviewee.query',
491
555
  },
492
556
  '/performance/v2/review_templates/query': {
493
- POST: { name: 'queryPerformanceV2ReviewTemplate', pagination: { argIndex: 1, itemsKey: 'review_templates' } },
557
+ POST: { name: 'performance.reviewTemplate.query', pagination: { argIndex: 1, itemsKey: 'review_templates' } },
494
558
  },
495
559
  '/performance/v2/indicators/query': {
496
- POST: { name: 'queryPerformanceV2Indicator', pagination: { argIndex: 1, itemsKey: 'indicators' } },
560
+ POST: { name: 'performance.indicator.query', pagination: { argIndex: 1, itemsKey: 'indicators' } },
497
561
  },
498
562
  '/performance/v2/questions/query': {
499
- POST: { name: 'queryPerformanceV2Question', pagination: { argIndex: 1, itemsKey: 'tag_based_questions' } },
563
+ POST: { name: 'performance.question.query', pagination: { argIndex: 1, itemsKey: 'tag_based_questions' } },
500
564
  },
501
565
  '/performance/v2/metric_libs/query': {
502
- POST: { name: 'queryPerformanceV2MetricLib', pagination: { argIndex: 1 } },
566
+ POST: { name: 'performance.metricLib.query', pagination: { argIndex: 1 } },
503
567
  },
504
568
  '/performance/v2/metric_templates/query': {
505
- POST: { name: 'queryPerformanceV2MetricTemplate', pagination: { argIndex: 1 } },
569
+ POST: { name: 'performance.metricTemplate.query', pagination: { argIndex: 1 } },
506
570
  },
507
571
  '/performance/v2/metric_fields/query': {
508
- POST: 'queryPerformanceV2MetricField',
572
+ POST: 'performance.metricField.query',
509
573
  },
510
574
  '/performance/v2/metric_tags': {
511
- GET: { name: 'listPerformanceV2MetricTag', pagination: { argIndex: 0 } },
575
+ GET: { name: 'performance.metricTag.list', pagination: { argIndex: 0 } },
512
576
  },
513
577
  '/performance/v1/stage_tasks/find_by_user_list': {
514
- POST: 'findByUserListPerformanceV1StageTask',
578
+ POST: 'performance.stageTask.findByUserList',
515
579
  },
516
580
  '/performance/v1/stage_tasks/find_by_page': {
517
- POST: 'findByPagePerformanceV1StageTask',
581
+ POST: 'performance.stageTask.findByPage',
518
582
  },
519
583
  '/performance/v2/metric_details/query': {
520
- POST: 'queryPerformanceV2MetricDetail',
584
+ POST: 'performance.metricDetail.query',
521
585
  },
522
586
  '/performance/v2/metric_details/import': {
523
- POST: 'importPerformanceV2MetricDetail',
524
- },
525
- '/performance/v1/review_datas/query': {
526
- POST: 'queryPerformanceV1ReviewData',
587
+ POST: 'performance.metricDetail.import',
527
588
  },
528
589
  '/performance/v2/review_datas/query': {
529
- POST: 'queryPerformanceV2ReviewData',
590
+ POST: 'performance.reviewData.query',
530
591
  },
531
592
  })