refactor: IDL structure modification (#475)
This commit is contained in:
93
idl/app/common_struct/common_struct.thrift
Normal file
93
idl/app/common_struct/common_struct.thrift
Normal file
@@ -0,0 +1,93 @@
|
||||
namespace go app.intelligence.common
|
||||
|
||||
struct UserLabel {
|
||||
1: string label_id ,
|
||||
2: string label_name ,
|
||||
3: string icon_uri ,
|
||||
4: string icon_url ,
|
||||
5: string jump_link ,
|
||||
}
|
||||
|
||||
struct User {
|
||||
1: i64 user_id (agw.js_conv="str", api.js_conv="true"),
|
||||
2: string nickname, // user nickname
|
||||
3: string avatar_url, // user avatar
|
||||
4: string user_unique_name, // user name
|
||||
5: UserLabel user_label, // user tag
|
||||
}
|
||||
|
||||
|
||||
/****************************** audit **********************************/
|
||||
enum AuditStatus {
|
||||
Auditing = 0, // Under review.
|
||||
Success = 1, // approved
|
||||
Failed = 2, // audit failed
|
||||
}
|
||||
|
||||
struct AuditInfo {
|
||||
1: optional AuditStatus audit_status,
|
||||
2: optional string publish_id,
|
||||
3: optional string commit_version,
|
||||
}
|
||||
|
||||
// Audit results
|
||||
struct AuditData {
|
||||
1: bool check_not_pass // True: The machine audit verification failed
|
||||
2: optional string check_not_pass_msg // The machine audit verification failed the copy.
|
||||
}
|
||||
|
||||
|
||||
/****************************** publish **********************************/
|
||||
enum ConnectorDynamicStatus {
|
||||
Normal = 0
|
||||
Offline = 1
|
||||
TokenDisconnect = 2
|
||||
}
|
||||
|
||||
struct ConnectorInfo {
|
||||
1: string id
|
||||
2: string name
|
||||
3: string icon
|
||||
4: ConnectorDynamicStatus connector_status
|
||||
5: optional string share_link
|
||||
}
|
||||
|
||||
struct IntelligencePublishInfo {
|
||||
1: string publish_time,
|
||||
2: bool has_published,
|
||||
3: list<ConnectorInfo> connectors,
|
||||
}
|
||||
|
||||
enum ResourceType {
|
||||
Plugin = 1
|
||||
Workflow = 2
|
||||
Imageflow = 3
|
||||
Knowledge = 4
|
||||
UI = 5
|
||||
Prompt = 6
|
||||
Database = 7
|
||||
Variable = 8
|
||||
}
|
||||
|
||||
enum OrderByType {
|
||||
Asc = 1
|
||||
Desc = 2
|
||||
}
|
||||
|
||||
enum PermissionType {
|
||||
NoDetail = 1 //Can't view details
|
||||
Detail = 2 //You can check the details.
|
||||
Operate = 3 //Can be viewed and operated
|
||||
}
|
||||
|
||||
enum SpaceStatus {
|
||||
Valid = 1
|
||||
Invalid = 2
|
||||
}
|
||||
|
||||
struct Space {
|
||||
1: i64 id,
|
||||
2: i64 owner_id,
|
||||
3: SpaceStatus status,
|
||||
4: string name,
|
||||
}
|
||||
32
idl/app/common_struct/intelligence_common_struct.thrift
Normal file
32
idl/app/common_struct/intelligence_common_struct.thrift
Normal file
@@ -0,0 +1,32 @@
|
||||
namespace go app.intelligence.common
|
||||
|
||||
enum IntelligenceStatus {
|
||||
Using = 1,
|
||||
Deleted = 2,
|
||||
Banned = 3,
|
||||
MoveFailed = 4, // Migration failed
|
||||
|
||||
Copying = 5, // Copying
|
||||
CopyFailed = 6, // Copy failed
|
||||
}
|
||||
|
||||
enum IntelligenceType {
|
||||
Bot = 1
|
||||
Project = 2
|
||||
}
|
||||
|
||||
struct IntelligenceBasicInfo {
|
||||
1: i64 id (agw.js_conv="str", api.js_conv="true"),
|
||||
2: string name,
|
||||
3: string description,
|
||||
4: string icon_uri,
|
||||
5: string icon_url,
|
||||
6: i64 space_id (agw.js_conv="str", api.js_conv="true"),
|
||||
7: i64 owner_id (agw.js_conv="str", api.js_conv="true"),
|
||||
8: i64 create_time (agw.js_conv="str", api.js_conv="true"),
|
||||
9: i64 update_time (agw.js_conv="str", api.js_conv="true"),
|
||||
10: IntelligenceStatus status,
|
||||
11: i64 publish_time (agw.js_conv="str", api.js_conv="true"),
|
||||
12: optional string enterprise_id,
|
||||
13: optional i64 organization_id,
|
||||
}
|
||||
5
idl/app/common_struct/task_struct.thrift
Normal file
5
idl/app/common_struct/task_struct.thrift
Normal file
@@ -0,0 +1,5 @@
|
||||
namespace go app.intelligence.common
|
||||
|
||||
struct ProjectInnerTaskInfo {
|
||||
1: i64 task_id (agw.js_conv="str",api.js_conv="true") // Task ID
|
||||
}
|
||||
Reference in New Issue
Block a user