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