mirror of
https://github.com/ThearchyHelios/AgentLab.git
synced 2026-11-22 20:32:04 +00:00
合入 W1-b 已知遗留:人工驳回记成已取消 + end_reason=rejected(不重试、不被出错时继续吞掉),各处照实写「被驳回」;个人渠道「我发起的实例完成 / 失败」生效;导入清单如实记「是否认证」;使用者选人按候选池、开登录时服务端核对;自由形蓝图按导入的图列「谁来做」;tick 按 id 断言
This commit is contained in:
@@ -54,6 +54,25 @@ export interface Directory {
|
||||
groups: { name: string; label: string }[]
|
||||
}
|
||||
|
||||
/**
|
||||
* 使用者选人的候选从哪个池取(GET /api/directory/candidates,05-已知遗留 (b)):form 是表单里的选人控件(入口表单带 app_id、
|
||||
* entry,待办表单带 task_id,都带 field),review 是个人应用提交审核
|
||||
*/
|
||||
export type CandidateSource =
|
||||
| { purpose: 'form'; app_id?: string; entry?: string; task_id?: string; field: string }
|
||||
| { purpose: 'review' }
|
||||
|
||||
/**
|
||||
* 候选池给的那一份:只有用户名和显示名(不给是否停用、角色、邮箱,停用的不列)。needs_query:应用授权给了所有人,
|
||||
* 不输入开头不列;truncated:符合的超过了上限(最多 50 位)
|
||||
*/
|
||||
export interface Candidates {
|
||||
users: { username: string; display_name: string }[]
|
||||
groups: { name: string; label: string }[]
|
||||
truncated: boolean
|
||||
needs_query?: boolean
|
||||
}
|
||||
|
||||
export interface AuditRow {
|
||||
id: string
|
||||
at: string
|
||||
@@ -100,6 +119,11 @@ export interface FormField {
|
||||
'x-widget'?: FormWidget
|
||||
/** 文件控件的限制,只配 x-widget: file */
|
||||
'x-file'?: FileLimits
|
||||
/**
|
||||
* 选人控件的候选池,只配 x-widget: principal:app(能用这个应用的人,缺省)、group:<组>、slot:<岗位>
|
||||
* (服务端 auth/directory.pool_problem,05-已知遗留 (b))
|
||||
*/
|
||||
'x-principal'?: { pool: string }
|
||||
}
|
||||
|
||||
export interface FormSchema {
|
||||
@@ -113,11 +137,12 @@ export interface FormSchema {
|
||||
|
||||
/**
|
||||
* 前后端同一种错误格式(服务端 apps/spec.FORM_ERROR_CODES)。file:文件控件的值不是上传后拿回的引用、类型或大小不合
|
||||
* x-file 的限制,或提交时核对引用没过(不是这个人传的、已经用过)
|
||||
* x-file 的限制,或提交时核对引用没过(不是这个人传的、已经用过);principal:开了登录时选人控件的值不在候选池里
|
||||
* (服务端 auth/directory.principal_errors,05-已知遗留 (b))
|
||||
*/
|
||||
export interface FormError {
|
||||
path: string
|
||||
code: 'required' | 'type' | 'enum' | 'minimum' | 'maximum' | 'min_length' | 'max_length' | 'max_items' | 'format' | 'file'
|
||||
code: 'required' | 'type' | 'enum' | 'minimum' | 'maximum' | 'min_length' | 'max_length' | 'max_items' | 'format' | 'file' | 'principal'
|
||||
message: string
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user