@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,499 +1,651 @@
1
- import { AllowedRollbaclkTaskItemType, AuditLogDetail, AuditLogEsField, Criterion, EnvironmentVariable, EnvironmentVariableFilter, ObjectMeta, RecordGroupByItem, RecordResult, RoleMember, SearchObjectParam, Sort, UserTask } from '.';
1
+ import * as Lark from '.';
2
+ import { Paginated, Pagination } from '../internal';
2
3
  declare module '../internal' {
3
4
  interface Internal {
4
- /**
5
- * 查询审计日志列表
6
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-audit_log/audit_log_list
7
- */
8
- auditLogListApaasApplicationAuditLog(namespace: string, query?: AuditLogListApaasApplicationAuditLogQuery): Promise<AuditLogListApaasApplicationAuditLogResponse>;
9
- /**
10
- * 查询审计日志详情
11
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-audit_log/get
12
- */
13
- getApaasApplicationAuditLog(namespace: string, query?: GetApaasApplicationAuditLogQuery): Promise<GetApaasApplicationAuditLogResponse>;
14
- /**
15
- * 批量删除角色成员授权
16
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-role-member/batch_remove_authorization
17
- */
18
- batchRemoveAuthorizationApaasApplicationRoleMember(namespace: string, role_api_name: string, body: BatchRemoveAuthorizationApaasApplicationRoleMemberRequest): Promise<void>;
19
- /**
20
- * 批量创建角色成员授权
21
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-role-member/batch_create_authorization
22
- */
23
- batchCreateAuthorizationApaasApplicationRoleMember(namespace: string, role_api_name: string, body: BatchCreateAuthorizationApaasApplicationRoleMemberRequest): Promise<void>;
24
- /**
25
- * 查询角色成员信息
26
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-role-member/get
27
- */
28
- getApaasApplicationRoleMember(namespace: string, role_api_name: string, query?: GetApaasApplicationRoleMemberQuery): Promise<GetApaasApplicationRoleMemberResponse>;
29
- /**
30
- * 批量删除记录权限用户授权
31
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-record_permission-member/batch_remove_authorization
32
- */
33
- batchRemoveAuthorizationApaasApplicationRecordPermissionMember(namespace: string, record_permission_api_name: string, body: BatchRemoveAuthorizationApaasApplicationRecordPermissionMemberRequest): Promise<void>;
34
- /**
35
- * 批量创建记录权限用户授权
36
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-record_permission-member/batch_create_authorization
37
- */
38
- batchCreateAuthorizationApaasApplicationRecordPermissionMember(namespace: string, record_permission_api_name: string, body: BatchCreateAuthorizationApaasApplicationRecordPermissionMemberRequest): Promise<void>;
39
- /**
40
- * 执行 OQL
41
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-object/oql_query
42
- */
43
- oqlQueryApaasApplicationObject(namespace: string, body: OqlQueryApaasApplicationObjectRequest): Promise<OqlQueryApaasApplicationObjectResponse>;
44
- /**
45
- * 搜索记录
46
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-object/search
47
- */
48
- searchApaasApplicationObject(namespace: string, body: SearchApaasApplicationObjectRequest): Promise<SearchApaasApplicationObjectResponse>;
49
- /**
50
- * 获取记录详情
51
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-object-record/query
52
- */
53
- queryApaasApplicationObjectRecord(namespace: string, object_api_name: string, id: string, body: QueryApaasApplicationObjectRecordRequest): Promise<QueryApaasApplicationObjectRecordResponse>;
54
- /**
55
- * 编辑记录
56
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-object-record/patch
57
- */
58
- patchApaasApplicationObjectRecord(namespace: string, object_api_name: string, id: string, body: PatchApaasApplicationObjectRecordRequest): Promise<void>;
59
- /**
60
- * 删除记录
61
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-object-record/delete
62
- */
63
- deleteApaasApplicationObjectRecord(namespace: string, object_api_name: string, id: string): Promise<void>;
64
- /**
65
- * 新建记录
66
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-object-record/create
67
- */
68
- createApaasApplicationObjectRecord(namespace: string, object_api_name: string, body: CreateApaasApplicationObjectRecordRequest): Promise<CreateApaasApplicationObjectRecordResponse>;
69
- /**
70
- * 批量编辑记录
71
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-object-record/batch_update
72
- */
73
- batchUpdateApaasApplicationObjectRecord(namespace: string, object_api_name: string, body: BatchUpdateApaasApplicationObjectRecordRequest): Promise<BatchUpdateApaasApplicationObjectRecordResponse>;
74
- /**
75
- * 查询记录列表
76
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-object-record/batch_query
77
- */
78
- batchQueryApaasApplicationObjectRecord(namespace: string, object_api_name: string, body: BatchQueryApaasApplicationObjectRecordRequest): Promise<BatchQueryApaasApplicationObjectRecordResponse>;
79
- /**
80
- * 批量删除记录
81
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-object-record/batch_delete
82
- */
83
- batchDeleteApaasApplicationObjectRecord(namespace: string, object_api_name: string, body: BatchDeleteApaasApplicationObjectRecordRequest): Promise<BatchDeleteApaasApplicationObjectRecordResponse>;
84
- /**
85
- * 批量新建记录
86
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-object-record/batch_create
87
- */
88
- batchCreateApaasApplicationObjectRecord(namespace: string, object_api_name: string, body: BatchCreateApaasApplicationObjectRecordRequest): Promise<BatchCreateApaasApplicationObjectRecordResponse>;
89
- /**
90
- * 执行函数
91
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-function/invoke
92
- */
93
- invokeApaasApplicationFunction(namespace: string, function_api_name: string, body: InvokeApaasApplicationFunctionRequest): Promise<InvokeApaasApplicationFunctionResponse>;
94
- /**
95
- * 查询环境变量列表
96
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-environment_variable/query
97
- */
98
- queryApaasApplicationEnvironmentVariable(namespace: string, body: QueryApaasApplicationEnvironmentVariableRequest): Promise<QueryApaasApplicationEnvironmentVariableResponse>;
99
- /**
100
- * 查询环境变量详情
101
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-environment_variable/get
102
- */
103
- getApaasApplicationEnvironmentVariable(namespace: string, environment_variable_api_name: string): Promise<GetApaasApplicationEnvironmentVariableResponse>;
104
- /**
105
- * 发起流程
106
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-flow/execute
107
- */
108
- executeApaasApplicationFlow(namespace: string, flow_id: string, body: ExecuteApaasApplicationFlowRequest): Promise<ExecuteApaasApplicationFlowResponse>;
109
- /**
110
- * 查询人工任务
111
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/user_task/query
112
- */
113
- queryApaasUserTask(body: QueryApaasUserTaskRequest): Promise<QueryApaasUserTaskResponse>;
114
- /**
115
- * 同意人工任务
116
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/approval_task/agree
117
- */
118
- agreeApaasApprovalTask(approval_task_id: string, body: AgreeApaasApprovalTaskRequest): Promise<void>;
119
- /**
120
- * 拒绝人工任务
121
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/approval_task/reject
122
- */
123
- rejectApaasApprovalTask(approval_task_id: string, body: RejectApaasApprovalTaskRequest): Promise<void>;
124
- /**
125
- * 转交人工任务
126
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/approval_task/transfer
127
- */
128
- transferApaasApprovalTask(approval_task_id: string, body: TransferApaasApprovalTaskRequest): Promise<void>;
129
- /**
130
- * 人工任务加签
131
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/approval_task/add_assignee
132
- */
133
- addAssigneeApaasApprovalTask(approval_task_id: string, body: AddAssigneeApaasApprovalTaskRequest): Promise<void>;
134
- /**
135
- * 抄送人工任务
136
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/user_task/cc
137
- */
138
- ccApaasUserTask(task_id: string, body: CcApaasUserTaskRequest): Promise<void>;
139
- /**
140
- * 催办人工任务
141
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/user_task/expediting
142
- */
143
- expeditingApaasUserTask(task_id: string, body: ExpeditingApaasUserTaskRequest): Promise<void>;
144
- /**
145
- * 撤销人工任务
146
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/approval_instance/cancel
147
- */
148
- cancelApaasApprovalInstance(approval_instance_id: string, body: CancelApaasApprovalInstanceRequest): Promise<void>;
149
- /**
150
- * 查询人工任务可退回的位置
151
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/user_task/rollback_points
152
- */
153
- rollbackPointsApaasUserTask(task_id: string, body: RollbackPointsApaasUserTaskRequest): Promise<RollbackPointsApaasUserTaskResponse>;
154
- /**
155
- * 退回人工任务
156
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/user_task/rollback
157
- */
158
- rollbackApaasUserTask(task_id: string, body: RollbackApaasUserTaskRequest): Promise<void>;
159
- /**
160
- * 基于人工任务发起群聊
161
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/user_task/chat_group
162
- */
163
- chatGroupApaasUserTask(task_id: string, body: ChatGroupApaasUserTaskRequest): Promise<ChatGroupApaasUserTaskResponse>;
5
+ apaas: Apaas.Methods;
164
6
  }
165
7
  }
166
- export interface AuditLogListApaasApplicationAuditLogQuery {
167
- /** 分页大小 */
168
- page_size: string;
169
- /** 翻页数量 */
170
- offset: string;
171
- /** 模糊查询 */
172
- quick_query?: string;
173
- /** 查询时间范围:开始时间 */
174
- from: string;
175
- /** 查询时间范围:结束时间 */
176
- to: string;
177
- /** 日志类型:10001-企业管理日志,10003-应用管理日志,10002-登录日志 */
178
- log_type: string;
179
- /** 日志查询:筛选能力 */
180
- filter?: string;
181
- /** 日志列表:选择展示行信息,例如["opTime","appName","eventName","clientIP","operator","status"] */
182
- columns?: string[];
183
- /** 查询排序字段:可选项为操作时间(opTime) */
184
- sort_by?: string;
185
- /** 查询排序:按时间从小到大使用 asc */
186
- sort_order?: string;
187
- /** 应用类型,0为apaas类型,1为aily类型 */
188
- app_type?: string;
189
- }
190
- export interface AuditLogListApaasApplicationAuditLogResponse {
191
- /** 审计日志查询结果列表详情信息 */
192
- items?: AuditLogEsField[];
193
- /** 审计日志查询总条数 */
194
- total?: string;
195
- }
196
- export interface GetApaasApplicationAuditLogQuery {
197
- /** 审计日志ID信息 */
198
- log_id: string;
199
- }
200
- export interface GetApaasApplicationAuditLogResponse {
201
- /** 审计日志详情信息 */
202
- data?: AuditLogDetail;
203
- }
204
- export interface BatchRemoveAuthorizationApaasApplicationRoleMemberRequest {
205
- /** 需要删除的用户 ID 列表 */
206
- user_ids?: string[];
207
- /** 需要删除的部门 ID 列表 */
208
- department_ids?: string[];
209
- }
210
- export interface BatchCreateAuthorizationApaasApplicationRoleMemberRequest {
211
- /** 需要新增的用户 ID 列表 */
212
- user_ids?: string[];
213
- /** 需要新增的部门 ID 列表 */
214
- department_ids?: string[];
215
- }
216
- export interface GetApaasApplicationRoleMemberQuery {
217
- /** 是否需要公式的展示名称,便于前端展示 */
218
- need_display_name?: boolean;
219
- /** 是否使用 APIID字段作为出入参,默认值为 false */
220
- use_api_id?: boolean;
221
- }
222
- export interface GetApaasApplicationRoleMemberResponse {
223
- /** 角色成员 */
224
- role_member?: RoleMember;
225
- }
226
- export interface BatchRemoveAuthorizationApaasApplicationRecordPermissionMemberRequest {
227
- /** 需要删除的用户 ID 列表 */
228
- user_ids?: string[];
229
- }
230
- export interface BatchCreateAuthorizationApaasApplicationRecordPermissionMemberRequest {
231
- /** 需要新增的用户 ID 列表 */
232
- user_ids?: string[];
233
- }
234
- export interface OqlQueryApaasApplicationObjectRequest {
235
- /** 待执行的 OQL 语句(关于支持的关键词及操作符,详见查看) */
236
- query: string;
237
- /** 用于指定 OQL 语句中匿名参数的具体值 */
238
- args?: string;
239
- /** 用于指定 OQL 语句中具名参数的具体值 */
240
- named_args?: string;
241
- }
242
- export interface OqlQueryApaasApplicationObjectResponse {
243
- /** 每一列的标题 */
244
- columns: string[];
245
- /** 每一行的值,以「key-value」的形式返回 */
246
- rows: string;
247
- }
248
- export interface SearchApaasApplicationObjectRequest {
249
- /** 搜索词 */
250
- q?: string;
251
- /** 搜索对象范围 */
252
- search_objects?: SearchObjectParam[];
253
- /** 分页参数,第一次搜索时为空,需要分页查询时使用 SearchRecordsResponse 中的结果 */
254
- page_token?: string;
255
- /** 返回数量,默认为50,最大不超过2000 */
256
- page_size?: string;
257
- /** 返回元数据枚举值 */
258
- metadata?: 'Label' | 'SearchLayout';
259
- }
260
- export interface SearchApaasApplicationObjectResponse {
261
- /** 搜索结果列表 */
262
- records?: string;
263
- /** 是否还有更多数据 */
264
- has_more?: boolean;
265
- /** 分页标记,当 HasMore 为 true 时,会同时返回新的 NextPageToken */
266
- next_page_token?: string;
267
- /** 对象信息 */
268
- objects?: ObjectMeta[];
269
- }
270
- export interface QueryApaasApplicationObjectRecordRequest {
271
- /** 需要获取的字段,使用字段唯一标识符进行查询,关联字段可使用 . 进行下钻 */
272
- select?: string[];
273
- }
274
- export interface QueryApaasApplicationObjectRecordResponse {
275
- /** 记录详情,格式为 Map<string, ANY> */
276
- item: string;
277
- }
278
- export interface PatchApaasApplicationObjectRecordRequest {
279
- /** 创建对象使用的数据,键为字段 API 名称,值为字段值,格式可参考字段值格式 */
280
- record: string;
281
- }
282
- export interface CreateApaasApplicationObjectRecordRequest {
283
- /** 创建对象使用的数据,键为字段 API 名称,值为字段值,格式可参考字段值格式 */
284
- record: string;
285
- }
286
- export interface CreateApaasApplicationObjectRecordResponse {
287
- /** 记录 ID */
288
- id?: string;
289
- }
290
- export interface BatchUpdateApaasApplicationObjectRecordRequest {
291
- /** 记录详情列表,格式为 List<Map<string, ANY>>,操作记录数上限为 500 条 */
292
- records: string;
293
- }
294
- export interface BatchUpdateApaasApplicationObjectRecordResponse {
295
- /** 处理结果 */
296
- items?: RecordResult[];
297
- }
298
- export interface BatchQueryApaasApplicationObjectRecordRequest {
299
- /** 需要获取的字段,使用字段唯一标识符进行查询,关联字段可使用「.」进行下钻 */
300
- select: string[];
301
- /** 筛选条件,通过 JSON 格式指定条件 */
302
- filter?: Criterion;
303
- /** 排序参数,通过 JSON 格式指定条件。其中, field 为参与排序字段,direction 为排序方向,多个条件按其在数组中的顺序生效。 */
304
- order_by?: Sort[];
305
- /** 聚合参数,通过 JSON 格式指定条件。其中, field 为参与聚合的字段。 */
306
- group_by?: RecordGroupByItem[];
307
- /** 分页的 Token 值,由服务端生成,可从 Response 中的 next_page_token 参数中获取。注意:第一页需填写空字符串 "",且不能与 OFFSET 一起使用。 */
308
- page_token?: string;
309
- /** 是否使用 page_token 功能。为 True 时将使用 page_token 的值作为起始位置查询记录,并且会在 Response 中返回 next_page_token 。默认为 False 。 */
310
- use_page_token?: boolean;
311
- /** 期望服务端返回的记录条数,上限 500 条。不填则取默认值,默认值为 500。 */
312
- page_size?: number;
313
- /** 返回记录的偏移量,默认为 0 ,即从查询到的第一条记录开始返回。offset 较大时查询性能较差,可能引起接口响应超时,拉取全部记录时建议使用 ID 游标分页,具体见 ID 游标分页说明 */
314
- offset?: number;
315
- /** 是否返回符合条件的记录总数(Total)。默认为 False,不返回记录总数。 */
316
- need_total_count?: boolean;
317
- }
318
- export interface BatchQueryApaasApplicationObjectRecordResponse {
319
- /** 符合条件的记录列表 */
320
- items: string;
321
- /** 符合条件的记录数 */
322
- total?: number;
323
- /** 下一页的起始位置 Token ,访问至末尾时不返回 */
324
- next_page_token?: string;
325
- /** 是否还有数据 */
326
- has_more?: boolean;
327
- }
328
- export interface BatchDeleteApaasApplicationObjectRecordRequest {
329
- /** 记录 ID 列表,操作记录数上限为 500 */
330
- ids: string[];
331
- }
332
- export interface BatchDeleteApaasApplicationObjectRecordResponse {
333
- /** 处理结果 */
334
- items?: RecordResult[];
335
- }
336
- export interface BatchCreateApaasApplicationObjectRecordRequest {
337
- /** 记录详情列表,格式为 List<Map<string, ANY>>,操作记录数上限为 500 条 */
338
- records: string;
339
- }
340
- export interface BatchCreateApaasApplicationObjectRecordResponse {
341
- /** 处理结果 */
342
- items?: RecordResult[];
343
- }
344
- export interface InvokeApaasApplicationFunctionRequest {
345
- /** 函数输入参数(JSON 序列化后的字符串) */
346
- params?: string;
347
- }
348
- export interface InvokeApaasApplicationFunctionResponse {
349
- /** 函数执行的返回结果(JSON 序列化后的字符串) */
350
- result?: string;
351
- }
352
- export interface QueryApaasApplicationEnvironmentVariableRequest {
353
- /** 过滤条件 */
354
- filter?: EnvironmentVariableFilter;
355
- /** 限制的条数,默认为 500,不可超过 500 */
356
- limit?: number;
357
- /** 返回记录的偏移量,默认为 0,即从查询到的第一个记录开始返回 */
358
- offset?: number;
359
- }
360
- export interface QueryApaasApplicationEnvironmentVariableResponse {
361
- /** 环境变量列表 */
362
- items?: EnvironmentVariable[];
363
- /** 符合查询条件的环境变量的总数 */
364
- total: number;
365
- }
366
- export interface GetApaasApplicationEnvironmentVariableResponse {
367
- /** 环境变量详情 */
368
- item?: EnvironmentVariable;
369
- }
370
- export interface ExecuteApaasApplicationFlowRequest {
371
- /** 是否异步执行 */
372
- is_async?: boolean;
373
- /** 幂等信息 */
374
- idempotent_key?: string;
375
- /** 循环信息 */
376
- loop_masks?: string[];
377
- /** 流程入参 */
378
- params?: string;
379
- /** 操作人 */
380
- operator: string;
381
- }
382
- export interface ExecuteApaasApplicationFlowResponse {
383
- /** 状态 */
384
- status?: string;
385
- /** 输出参数 */
386
- out_params?: string;
387
- /** 执行id */
388
- execution_id?: string;
389
- /** 错误信息 */
390
- error_msg?: string;
391
- /** code */
392
- code?: string;
393
- }
394
- export interface QueryApaasUserTaskRequest {
395
- /** 类型 */
396
- type?: string;
397
- /** 来源 */
398
- source?: string;
399
- /** 获取条数 */
400
- limit?: string;
401
- /** 起始位置 */
402
- offset?: string;
403
- /** 开始时间 */
404
- start_time?: string;
405
- /** 结束时间 */
406
- end_time?: string;
407
- /** 流程apiid列表 */
408
- api_ids?: string[];
409
- /** kunlunUserID */
410
- kunlun_user_id: string;
411
- }
412
- export interface QueryApaasUserTaskResponse {
413
- /** 总任务条数 */
414
- count?: string;
415
- /** 任务信息 */
416
- tasks?: UserTask[];
417
- }
418
- export interface AgreeApaasApprovalTaskRequest {
419
- /** 操作人id */
420
- user_id: string;
421
- /** 审批意见 */
422
- opinion?: string;
423
- }
424
- export interface RejectApaasApprovalTaskRequest {
425
- /** 操作用户id */
426
- user_id: string;
427
- /** 审批意见 */
428
- opinion?: string;
429
- }
430
- export interface TransferApaasApprovalTaskRequest {
431
- /** 操作人id */
432
- user_id: string;
433
- /** 原审批人id */
434
- from_user_ids?: string[];
435
- /** 新审批人id */
436
- to_user_ids?: string[];
437
- /** 审批意见 */
438
- opinion?: string;
439
- }
440
- export interface AddAssigneeApaasApprovalTaskRequest {
441
- /** 操作人id */
442
- user_id: string;
443
- /** 审批人列表 */
444
- approvers?: string[];
445
- /** 加签类型 */
446
- add_assignee_type?: string;
447
- /** 加签原因 */
448
- opinion?: string;
449
- }
450
- export interface CcApaasUserTaskRequest {
451
- /** 抄送人的kunlunID列表 */
452
- cc_user_ids: string[];
453
- /** 操作人kunlunUserID */
454
- operator_user_id: string;
455
- }
456
- export interface ExpeditingApaasUserTaskRequest {
457
- /** 操作人kunlunUserID */
458
- operator_user_id: string;
459
- /** 催办人的kunlunID列表 */
460
- expediting_user_ids: string[];
461
- /** 催办理由 */
462
- opinion?: string;
463
- }
464
- export interface CancelApaasApprovalInstanceRequest {
465
- /** 操作用户id */
466
- user_id: string;
467
- /** 撤销原因 */
468
- opinion: string;
469
- }
470
- export interface RollbackPointsApaasUserTaskRequest {
471
- /** 操作人kunlunUserID */
472
- operator_user_id: string;
473
- }
474
- export interface RollbackPointsApaasUserTaskResponse {
475
- /** 任务列表 */
476
- tasks?: AllowedRollbaclkTaskItemType[];
477
- }
478
- export interface RollbackApaasUserTaskRequest {
479
- /** 操作人kunlunUserID */
480
- operator_user_id: string;
481
- /** 退回到的任务ID */
482
- to_task_id: string;
483
- /** 退回原因 */
484
- opinion: string;
485
- }
486
- export interface ChatGroupApaasUserTaskRequest {
487
- /** 操作人kunlunUserID */
488
- operator_user_id: string;
489
- /** 要邀请进群用户ID列表 */
490
- invite_user_ids?: string[];
491
- /** 要拉入的群ID,为空则新建群 */
492
- chat_id?: string;
493
- /** 要加入的群名称,当chat_id为空时用该名称创建群聊 */
494
- chat_name?: string;
495
- }
496
- export interface ChatGroupApaasUserTaskResponse {
497
- /** 创建的群聊ID */
498
- chat_id?: string;
8
+ export declare namespace Apaas {
9
+ interface Methods {
10
+ seatAssignment: SeatAssignment.Methods;
11
+ seatActivity: SeatActivity.Methods;
12
+ application: Application.Methods;
13
+ userTask: UserTask.Methods;
14
+ approvalTask: ApprovalTask.Methods;
15
+ approvalInstance: ApprovalInstance.Methods;
16
+ }
17
+ namespace SeatAssignment {
18
+ interface Methods {
19
+ /**
20
+ * 查询席位分配详情
21
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/seat_assignment/list
22
+ */
23
+ list(query?: ListQuery): Paginated<Lark.SeatAssignment>;
24
+ }
25
+ interface ListQuery extends Pagination {
26
+ /** 席位类型,枚举值:1.平台席位 2. 应用访问席位 */
27
+ seat_type: 'per_user' | 'per_user_per_app';
28
+ }
29
+ }
30
+ namespace SeatActivity {
31
+ interface Methods {
32
+ /**
33
+ * 查询席位活跃详情
34
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/seat_activity/list
35
+ */
36
+ list(query?: ListQuery): Paginated<Lark.SeatActivity>;
37
+ }
38
+ interface ListQuery extends Pagination {
39
+ /** 席位类型,枚举值:1. 平台席位2. 应用席位 */
40
+ seat_type: 'per_user' | 'per_user_per_app';
41
+ }
42
+ }
43
+ namespace Application {
44
+ interface Methods {
45
+ auditLog: AuditLog.Methods;
46
+ role: Role.Methods;
47
+ recordPermission: RecordPermission.Methods;
48
+ object: Object.Methods;
49
+ function: Function.Methods;
50
+ environmentVariable: EnvironmentVariable.Methods;
51
+ flow: Flow.Methods;
52
+ }
53
+ namespace AuditLog {
54
+ interface Methods {
55
+ /**
56
+ * 查询审计日志列表
57
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-audit_log/audit_log_list
58
+ */
59
+ auditLogList(namespace: string, query?: AuditLogListQuery): Promise<AuditLogListResponse>;
60
+ /**
61
+ * 查询审计日志详情
62
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-audit_log/get
63
+ */
64
+ get(namespace: string, query?: GetQuery): Promise<GetResponse>;
65
+ /**
66
+ * 查询数据变更日志列表
67
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-audit_log/data_change_logs_list
68
+ */
69
+ dataChangeLogsList(namespace: string, query?: DataChangeLogsListQuery): Promise<DataChangeLogsListResponse>;
70
+ /**
71
+ * 查询数据变更日志详情
72
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-audit_log/data_change_log_detail
73
+ */
74
+ dataChangeLogDetail(namespace: string, query?: DataChangeLogDetailQuery): Promise<DataChangeLogDetailResponse>;
75
+ }
76
+ interface AuditLogListQuery {
77
+ /** 分页大小 */
78
+ page_size: string;
79
+ /** 翻页数量 */
80
+ offset: string;
81
+ /** 模糊查询 */
82
+ quick_query?: string;
83
+ /** 查询时间范围:开始时间 */
84
+ from: string;
85
+ /** 查询时间范围:结束时间 */
86
+ to: string;
87
+ /** 日志类型:10001-企业管理日志,10003-应用管理日志,10002-登录日志 */
88
+ log_type: string;
89
+ /** 日志查询:筛选能力 */
90
+ filter?: string;
91
+ /** 日志列表:选择展示行信息,例如["opTime","appName","eventName","clientIP","operator","status"] */
92
+ columns?: string[];
93
+ /** 查询排序字段:可选项为操作时间(opTime) */
94
+ sort_by?: string;
95
+ /** 查询排序:按时间从小到大使用 asc */
96
+ sort_order?: string;
97
+ /** 应用类型,0为apaas类型,1为aily类型 */
98
+ app_type?: string;
99
+ }
100
+ interface AuditLogListResponse {
101
+ /** 审计日志查询结果列表详情信息 */
102
+ items?: Lark.AuditLogEsField[];
103
+ /** 审计日志查询总条数 */
104
+ total?: string;
105
+ }
106
+ interface GetQuery {
107
+ /** 审计日志ID信息 */
108
+ log_id: string;
109
+ }
110
+ interface GetResponse {
111
+ /** 审计日志详情信息 */
112
+ data?: Lark.AuditLogDetail;
113
+ }
114
+ interface DataChangeLogsListQuery {
115
+ /** 模糊查询 */
116
+ quick_query?: string;
117
+ /** 分页大小 */
118
+ page_size: string;
119
+ /** 翻页数量 */
120
+ offset: string;
121
+ /** 查询时间范围:开始时间 */
122
+ from?: string;
123
+ /** 查询时间范围:结束时间 */
124
+ to?: string;
125
+ /** 日志类型:10007-数据变更日志 */
126
+ log_type: string;
127
+ /** 日志查询:筛选能力 */
128
+ filter?: string;
129
+ /** 日志列表:选择展示行信息,例如["opTime","appName","eventName","clientIP","operator","status"] */
130
+ columns?: string[];
131
+ /** 查询排序字段:可选项为操作时间(opTime) */
132
+ sort_by?: string;
133
+ /** 查询排序:按时间从小到大使用 asc */
134
+ sort_order?: string;
135
+ /** 应用类型,0为apaas类型,1为aily类型 */
136
+ app_type?: string;
137
+ }
138
+ interface DataChangeLogsListResponse {
139
+ /** 数据变更日志查询结果列表详情信息 */
140
+ items?: Lark.AuditLogEsField[];
141
+ /** 数据变更日志查询总条数 */
142
+ total?: string;
143
+ }
144
+ interface DataChangeLogDetailQuery {
145
+ /** 数据变更日志ID信息 */
146
+ log_id: string;
147
+ }
148
+ interface DataChangeLogDetailResponse {
149
+ /** 数据变更日志详情信息 */
150
+ data?: Lark.AuditLogDetail;
151
+ }
152
+ }
153
+ namespace Role {
154
+ interface Methods {
155
+ member: Member.Methods;
156
+ }
157
+ namespace Member {
158
+ interface Methods {
159
+ /**
160
+ * 批量删除角色成员授权
161
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-role-member/batch_remove_authorization
162
+ */
163
+ batchRemoveAuthorization(namespace: string, role_api_name: string, body: BatchRemoveAuthorizationRequest): Promise<void>;
164
+ /**
165
+ * 批量创建角色成员授权
166
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-role-member/batch_create_authorization
167
+ */
168
+ batchCreateAuthorization(namespace: string, role_api_name: string, body: BatchCreateAuthorizationRequest): Promise<void>;
169
+ /**
170
+ * 查询角色成员信息
171
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-role-member/get
172
+ */
173
+ get(namespace: string, role_api_name: string, query?: GetQuery): Promise<GetResponse>;
174
+ }
175
+ interface BatchRemoveAuthorizationRequest {
176
+ /** 需要删除的用户 ID 列表 */
177
+ user_ids?: string[];
178
+ /** 需要删除的部门 ID 列表 */
179
+ department_ids?: string[];
180
+ }
181
+ interface BatchCreateAuthorizationRequest {
182
+ /** 需要新增的用户 ID 列表 */
183
+ user_ids?: string[];
184
+ /** 需要新增的部门 ID 列表 */
185
+ department_ids?: string[];
186
+ }
187
+ interface GetQuery {
188
+ /** 是否需要公式的展示名称,便于前端展示 */
189
+ need_display_name?: boolean;
190
+ /** 是否使用 APIID字段作为出入参,默认值为 false */
191
+ use_api_id?: boolean;
192
+ }
193
+ interface GetResponse {
194
+ /** 角色成员 */
195
+ role_member?: Lark.RoleMember;
196
+ }
197
+ }
198
+ }
199
+ namespace RecordPermission {
200
+ interface Methods {
201
+ member: Member.Methods;
202
+ }
203
+ namespace Member {
204
+ interface Methods {
205
+ /**
206
+ * 批量删除记录权限用户授权
207
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-record_permission-member/batch_remove_authorization
208
+ */
209
+ batchRemoveAuthorization(namespace: string, record_permission_api_name: string, body: BatchRemoveAuthorizationRequest): Promise<void>;
210
+ /**
211
+ * 批量创建记录权限用户授权
212
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-record_permission-member/batch_create_authorization
213
+ */
214
+ batchCreateAuthorization(namespace: string, record_permission_api_name: string, body: BatchCreateAuthorizationRequest): Promise<void>;
215
+ }
216
+ interface BatchRemoveAuthorizationRequest {
217
+ /** 需要删除的用户 ID 列表 */
218
+ user_ids?: string[];
219
+ }
220
+ interface BatchCreateAuthorizationRequest {
221
+ /** 需要新增的用户 ID 列表 */
222
+ user_ids?: string[];
223
+ }
224
+ }
225
+ }
226
+ namespace Object {
227
+ interface Methods {
228
+ record: Record.Methods;
229
+ /**
230
+ * 执行 OQL
231
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-object/oql_query
232
+ */
233
+ oqlQuery(namespace: string, body: OqlQueryRequest): Promise<OqlQueryResponse>;
234
+ /**
235
+ * 搜索记录
236
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-object/search
237
+ */
238
+ search(namespace: string, body: SearchRequest): Promise<SearchResponse>;
239
+ }
240
+ interface OqlQueryRequest {
241
+ /** 待执行的 OQL 语句(关于支持的关键词及操作符,详见查看) */
242
+ query: string;
243
+ /** 用于指定 OQL 语句中匿名参数的具体值 */
244
+ args?: string;
245
+ /** 用于指定 OQL 语句中具名参数的具体值 */
246
+ named_args?: string;
247
+ }
248
+ interface OqlQueryResponse {
249
+ /** 每一列的标题 */
250
+ columns: string[];
251
+ /** 每一行的值,以「key-value」的形式返回 */
252
+ rows: string;
253
+ }
254
+ interface SearchRequest {
255
+ /** 搜索词 */
256
+ q?: string;
257
+ /** 搜索对象范围 */
258
+ search_objects?: Lark.SearchObjectParam[];
259
+ /** 分页参数,第一次搜索时为空,需要分页查询时使用 SearchRecordsResponse 中的结果 */
260
+ page_token?: string;
261
+ /** 返回数量,默认为50,最大不超过2000 */
262
+ page_size?: string;
263
+ /** 返回元数据枚举值 */
264
+ metadata?: 'Label' | 'SearchLayout';
265
+ }
266
+ interface SearchResponse {
267
+ /** 搜索结果列表 */
268
+ records?: string;
269
+ /** 是否还有更多数据 */
270
+ has_more?: boolean;
271
+ /** 分页标记,当 HasMore 为 true 时,会同时返回新的 NextPageToken */
272
+ next_page_token?: string;
273
+ /** 对象信息 */
274
+ objects?: Lark.ObjectMeta[];
275
+ }
276
+ namespace Record {
277
+ interface Methods {
278
+ /**
279
+ * 获取记录详情
280
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-object-record/query
281
+ */
282
+ query(namespace: string, object_api_name: string, id: string, body: QueryRequest): Promise<QueryResponse>;
283
+ /**
284
+ * 编辑记录
285
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-object-record/patch
286
+ */
287
+ patch(namespace: string, object_api_name: string, id: string, body: PatchRequest): Promise<void>;
288
+ /**
289
+ * 删除记录
290
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-object-record/delete
291
+ */
292
+ delete(namespace: string, object_api_name: string, id: string): Promise<void>;
293
+ /**
294
+ * 新建记录
295
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-object-record/create
296
+ */
297
+ create(namespace: string, object_api_name: string, body: CreateRequest): Promise<CreateResponse>;
298
+ /**
299
+ * 批量编辑记录
300
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-object-record/batch_update
301
+ */
302
+ batchUpdate(namespace: string, object_api_name: string, body: BatchUpdateRequest): Promise<BatchUpdateResponse>;
303
+ /**
304
+ * 查询记录列表
305
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-object-record/batch_query
306
+ */
307
+ batchQuery(namespace: string, object_api_name: string, body: BatchQueryRequest): Promise<BatchQueryResponse>;
308
+ /**
309
+ * 批量删除记录
310
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-object-record/batch_delete
311
+ */
312
+ batchDelete(namespace: string, object_api_name: string, body: BatchDeleteRequest): Promise<BatchDeleteResponse>;
313
+ /**
314
+ * 批量新建记录
315
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-object-record/batch_create
316
+ */
317
+ batchCreate(namespace: string, object_api_name: string, body: BatchCreateRequest): Promise<BatchCreateResponse>;
318
+ }
319
+ interface QueryRequest {
320
+ /** 需要获取的字段,使用字段唯一标识符进行查询,关联字段可使用 . 进行下钻 */
321
+ select?: string[];
322
+ }
323
+ interface QueryResponse {
324
+ /** 记录详情,格式为 Map<string, ANY> */
325
+ item: string;
326
+ }
327
+ interface PatchRequest {
328
+ /** 创建对象使用的数据,键为字段 API 名称,值为字段值,格式可参考字段值格式 */
329
+ record: string;
330
+ }
331
+ interface CreateRequest {
332
+ /** 创建对象使用的数据,键为字段 API 名称,值为字段值,格式可参考字段值格式 */
333
+ record: string;
334
+ }
335
+ interface CreateResponse {
336
+ /** 记录 ID */
337
+ id?: string;
338
+ }
339
+ interface BatchUpdateRequest {
340
+ /** 记录详情列表,格式为 List<Map<string, ANY>>,操作记录数上限为 500 条 */
341
+ records: string;
342
+ }
343
+ interface BatchUpdateResponse {
344
+ /** 处理结果 */
345
+ items?: Lark.RecordResult[];
346
+ }
347
+ interface BatchQueryRequest {
348
+ /** 需要获取的字段,使用字段唯一标识符进行查询,关联字段可使用「.」进行下钻 */
349
+ select: string[];
350
+ /** 筛选条件,通过 JSON 格式指定条件 */
351
+ filter?: Lark.Criterion;
352
+ /** 排序参数,通过 JSON 格式指定条件。其中, field 为参与排序字段,direction 为排序方向,多个条件按其在数组中的顺序生效。 */
353
+ order_by?: Lark.Sort[];
354
+ /** 聚合参数,通过 JSON 格式指定条件。其中, field 为参与聚合的字段。 */
355
+ group_by?: Lark.RecordGroupByItem[];
356
+ /** 分页的 Token 值,由服务端生成,可从 Response 中的 next_page_token 参数中获取。注意:第一页需填写空字符串 "",且不能与 OFFSET 一起使用。 */
357
+ page_token?: string;
358
+ /** 是否使用 page_token 功能。为 True 时将使用 page_token 的值作为起始位置查询记录,并且会在 Response 中返回 next_page_token 。默认为 False 。 */
359
+ use_page_token?: boolean;
360
+ /** 期望服务端返回的记录条数,上限 500 条。不填则取默认值,默认值为 500。 */
361
+ page_size?: number;
362
+ /** 返回记录的偏移量,默认为 0 ,即从查询到的第一条记录开始返回。offset 较大时查询性能较差,可能引起接口响应超时,拉取全部记录时建议使用 ID 游标分页,具体见 ID 游标分页说明 */
363
+ offset?: number;
364
+ /** 是否返回符合条件的记录总数(Total)。默认为 False,不返回记录总数。 */
365
+ need_total_count?: boolean;
366
+ }
367
+ interface BatchQueryResponse {
368
+ /** 符合条件的记录列表 */
369
+ items: string;
370
+ /** 符合条件的记录数 */
371
+ total?: number;
372
+ /** 下一页的起始位置 Token ,访问至末尾时不返回 */
373
+ next_page_token?: string;
374
+ /** 是否还有数据 */
375
+ has_more?: boolean;
376
+ }
377
+ interface BatchDeleteRequest {
378
+ /** 记录 ID 列表,操作记录数上限为 500 */
379
+ ids: string[];
380
+ }
381
+ interface BatchDeleteResponse {
382
+ /** 处理结果 */
383
+ items?: Lark.RecordResult[];
384
+ }
385
+ interface BatchCreateRequest {
386
+ /** 记录详情列表,格式为 List<Map<string, ANY>>,操作记录数上限为 500 条 */
387
+ records: string;
388
+ }
389
+ interface BatchCreateResponse {
390
+ /** 处理结果 */
391
+ items?: Lark.RecordResult[];
392
+ }
393
+ }
394
+ }
395
+ namespace Function {
396
+ interface Methods {
397
+ /**
398
+ * 执行函数
399
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-function/invoke
400
+ */
401
+ invoke(namespace: string, function_api_name: string, body: InvokeRequest): Promise<InvokeResponse>;
402
+ }
403
+ interface InvokeRequest {
404
+ /** 函数输入参数(JSON 序列化后的字符串) */
405
+ params?: string;
406
+ }
407
+ interface InvokeResponse {
408
+ /** 函数执行的返回结果(JSON 序列化后的字符串) */
409
+ result?: string;
410
+ }
411
+ }
412
+ namespace EnvironmentVariable {
413
+ interface Methods {
414
+ /**
415
+ * 查询环境变量列表
416
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-environment_variable/query
417
+ */
418
+ query(namespace: string, body: QueryRequest): Promise<QueryResponse>;
419
+ /**
420
+ * 查询环境变量详情
421
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-environment_variable/get
422
+ */
423
+ get(namespace: string, environment_variable_api_name: string): Promise<GetResponse>;
424
+ }
425
+ interface QueryRequest {
426
+ /** 过滤条件 */
427
+ filter?: Lark.EnvironmentVariableFilter;
428
+ /** 限制的条数,默认为 500,不可超过 500 */
429
+ limit?: number;
430
+ /** 返回记录的偏移量,默认为 0,即从查询到的第一个记录开始返回 */
431
+ offset?: number;
432
+ }
433
+ interface QueryResponse {
434
+ /** 环境变量列表 */
435
+ items?: Lark.EnvironmentVariable[];
436
+ /** 符合查询条件的环境变量的总数 */
437
+ total: number;
438
+ }
439
+ interface GetResponse {
440
+ /** 环境变量详情 */
441
+ item?: Lark.EnvironmentVariable;
442
+ }
443
+ }
444
+ namespace Flow {
445
+ interface Methods {
446
+ /**
447
+ * 发起流程
448
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-flow/execute
449
+ */
450
+ execute(namespace: string, flow_id: string, body: ExecuteRequest): Promise<ExecuteResponse>;
451
+ }
452
+ interface ExecuteRequest {
453
+ /** 是否异步执行 */
454
+ is_async?: boolean;
455
+ /** 幂等信息 */
456
+ idempotent_key?: string;
457
+ /** 循环信息 */
458
+ loop_masks?: string[];
459
+ /** 流程入参 */
460
+ params?: string;
461
+ /** 操作人 */
462
+ operator: string;
463
+ }
464
+ interface ExecuteResponse {
465
+ /** 状态 */
466
+ status?: string;
467
+ /** 输出参数 */
468
+ out_params?: string;
469
+ /** 执行id */
470
+ execution_id?: string;
471
+ /** 错误信息 */
472
+ error_msg?: string;
473
+ /** code */
474
+ code?: string;
475
+ }
476
+ }
477
+ }
478
+ namespace UserTask {
479
+ interface Methods {
480
+ /**
481
+ * 查询人工任务
482
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/user_task/query
483
+ */
484
+ query(body: QueryRequest): Promise<QueryResponse>;
485
+ /**
486
+ * 抄送人工任务
487
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/user_task/cc
488
+ */
489
+ cc(task_id: string, body: CcRequest): Promise<void>;
490
+ /**
491
+ * 催办人工任务
492
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/user_task/expediting
493
+ */
494
+ expediting(task_id: string, body: ExpeditingRequest): Promise<void>;
495
+ /**
496
+ * 查询人工任务可退回的位置
497
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/user_task/rollback_points
498
+ */
499
+ rollbackPoints(task_id: string, body: RollbackPointsRequest): Promise<RollbackPointsResponse>;
500
+ /**
501
+ * 退回人工任务
502
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/user_task/rollback
503
+ */
504
+ rollback(task_id: string, body: RollbackRequest): Promise<void>;
505
+ /**
506
+ * 基于人工任务发起群聊
507
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/user_task/chat_group
508
+ */
509
+ chatGroup(task_id: string, body: ChatGroupRequest): Promise<ChatGroupResponse>;
510
+ }
511
+ interface QueryRequest {
512
+ /** 类型 */
513
+ type?: string;
514
+ /** 来源 */
515
+ source?: string;
516
+ /** 获取条数 */
517
+ limit?: string;
518
+ /** 起始位置 */
519
+ offset?: string;
520
+ /** 开始时间 */
521
+ start_time?: string;
522
+ /** 结束时间 */
523
+ end_time?: string;
524
+ /** 流程apiid列表 */
525
+ api_ids?: string[];
526
+ /** kunlunUserID */
527
+ kunlun_user_id: string;
528
+ }
529
+ interface QueryResponse {
530
+ /** 总任务条数 */
531
+ count?: string;
532
+ /** 任务信息 */
533
+ tasks?: Lark.UserTask[];
534
+ }
535
+ interface CcRequest {
536
+ /** 抄送人的kunlunID列表 */
537
+ cc_user_ids: string[];
538
+ /** 操作人kunlunUserID */
539
+ operator_user_id: string;
540
+ }
541
+ interface ExpeditingRequest {
542
+ /** 操作人kunlunUserID */
543
+ operator_user_id: string;
544
+ /** 催办人的kunlunID列表 */
545
+ expediting_user_ids: string[];
546
+ /** 催办理由 */
547
+ opinion?: string;
548
+ }
549
+ interface RollbackPointsRequest {
550
+ /** 操作人kunlunUserID */
551
+ operator_user_id: string;
552
+ }
553
+ interface RollbackPointsResponse {
554
+ /** 任务列表 */
555
+ tasks?: Lark.AllowedRollbaclkTaskItemType[];
556
+ }
557
+ interface RollbackRequest {
558
+ /** 操作人kunlunUserID */
559
+ operator_user_id: string;
560
+ /** 退回到的任务ID */
561
+ to_task_id: string;
562
+ /** 退回原因 */
563
+ opinion: string;
564
+ }
565
+ interface ChatGroupRequest {
566
+ /** 操作人kunlunUserID */
567
+ operator_user_id: string;
568
+ /** 要邀请进群用户ID列表 */
569
+ invite_user_ids?: string[];
570
+ /** 要拉入的群ID,为空则新建群 */
571
+ chat_id?: string;
572
+ /** 要加入的群名称,当chat_id为空时用该名称创建群聊 */
573
+ chat_name?: string;
574
+ }
575
+ interface ChatGroupResponse {
576
+ /** 创建的群聊ID */
577
+ chat_id?: string;
578
+ }
579
+ }
580
+ namespace ApprovalTask {
581
+ interface Methods {
582
+ /**
583
+ * 同意人工任务
584
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/approval_task/agree
585
+ */
586
+ agree(approval_task_id: string, body: AgreeRequest): Promise<void>;
587
+ /**
588
+ * 拒绝人工任务
589
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/approval_task/reject
590
+ */
591
+ reject(approval_task_id: string, body: RejectRequest): Promise<void>;
592
+ /**
593
+ * 转交人工任务
594
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/approval_task/transfer
595
+ */
596
+ transfer(approval_task_id: string, body: TransferRequest): Promise<void>;
597
+ /**
598
+ * 人工任务加签
599
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/approval_task/add_assignee
600
+ */
601
+ addAssignee(approval_task_id: string, body: AddAssigneeRequest): Promise<void>;
602
+ }
603
+ interface AgreeRequest {
604
+ /** 操作人id */
605
+ user_id: string;
606
+ /** 审批意见 */
607
+ opinion?: string;
608
+ }
609
+ interface RejectRequest {
610
+ /** 操作用户id */
611
+ user_id: string;
612
+ /** 审批意见 */
613
+ opinion?: string;
614
+ }
615
+ interface TransferRequest {
616
+ /** 操作人id */
617
+ user_id: string;
618
+ /** 原审批人id */
619
+ from_user_ids?: string[];
620
+ /** 新审批人id */
621
+ to_user_ids?: string[];
622
+ /** 审批意见 */
623
+ opinion?: string;
624
+ }
625
+ interface AddAssigneeRequest {
626
+ /** 操作人id */
627
+ user_id: string;
628
+ /** 审批人列表 */
629
+ approvers?: string[];
630
+ /** 加签类型 */
631
+ add_assignee_type?: string;
632
+ /** 加签原因 */
633
+ opinion?: string;
634
+ }
635
+ }
636
+ namespace ApprovalInstance {
637
+ interface Methods {
638
+ /**
639
+ * 撤销人工任务
640
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/approval_instance/cancel
641
+ */
642
+ cancel(approval_instance_id: string, body: CancelRequest): Promise<void>;
643
+ }
644
+ interface CancelRequest {
645
+ /** 操作用户id */
646
+ user_id: string;
647
+ /** 撤销原因 */
648
+ opinion: string;
649
+ }
650
+ }
499
651
  }