fix: upload idl split
This commit is contained in:
@@ -21,6 +21,8 @@ include "./resource/resource.thrift"
|
||||
include "./passport/passport.thrift"
|
||||
include "./bot_platform/ocean_cloud_workflow/ocean_cloud_workflow.thrift"
|
||||
include "./bot_open_api/bot_open_api.thrift"
|
||||
include "./upload/upload.thrift"
|
||||
|
||||
|
||||
namespace go coze
|
||||
|
||||
@@ -39,4 +41,5 @@ service ResourceService extends resource.ResourceService {}
|
||||
service PassportService extends passport.PassportService {}
|
||||
service WorkflowService extends ocean_cloud_workflow.WorkflowService {}
|
||||
service KnowledgeService extends flow_dataengine_dataset.DatasetService {}
|
||||
service BotOpenApiService extends bot_open_api.BotOpenApiService {}
|
||||
service BotOpenApiService extends bot_open_api.BotOpenApiService {}
|
||||
service UploadService extends upload.UploadService {}
|
||||
|
||||
@@ -4,48 +4,6 @@ include "../playground/shortcut_command.thrift"
|
||||
|
||||
namespace go ocean.cloud.developer_api
|
||||
|
||||
struct CommonUploadRequest {
|
||||
1: optional binary ByteData (api.raw_body = "")
|
||||
2: optional string uploadID (api.query="uploadID")
|
||||
3: optional string partNumber (api.query="partNumber")
|
||||
}
|
||||
|
||||
struct Meta {
|
||||
1: string ObjectContentType
|
||||
}
|
||||
|
||||
struct Crc32Data {
|
||||
1: string crc32
|
||||
2: string mode
|
||||
3: string hash
|
||||
4: string key
|
||||
5: string uploadid
|
||||
6: string part_number
|
||||
7: string etag
|
||||
8: Meta meta
|
||||
}
|
||||
|
||||
struct Error{
|
||||
1: i32 code,
|
||||
2: string error,
|
||||
3: i32 error_code,
|
||||
4: string message
|
||||
}
|
||||
|
||||
struct Payload{
|
||||
1: string hash,
|
||||
2: string key,
|
||||
3: string uploadID
|
||||
}
|
||||
|
||||
struct CommonUploadResponse {
|
||||
1: string Version
|
||||
2: i32 success
|
||||
3: Error error
|
||||
4: Payload payload
|
||||
}
|
||||
|
||||
|
||||
|
||||
struct DraftBotCreateRequest {
|
||||
1: required i64 space_id (agw.js_conv="str", api.js_conv="true")
|
||||
@@ -915,84 +873,10 @@ struct PublishConnectorListResponse {
|
||||
7: optional PublishTips publish_tips // 发布提醒
|
||||
}
|
||||
|
||||
struct ResponseMetadata {
|
||||
1: required string RequestId,
|
||||
2: required string Action,
|
||||
3: required string Version,
|
||||
4: required string Service,
|
||||
5: required string Region
|
||||
}
|
||||
|
||||
struct StoreInfo {
|
||||
1: required string StoreUri,
|
||||
2: required string Auth,
|
||||
3: required string UploadID
|
||||
}
|
||||
|
||||
struct UploadAddress {
|
||||
1: required list<StoreInfo> StoreInfos,
|
||||
2: required list<string> UploadHosts,
|
||||
3: optional map<string, string> UploadHeader,
|
||||
4: required string SessionKey,
|
||||
5: required string Cloud
|
||||
}
|
||||
|
||||
struct UploadNode {
|
||||
1: required list<StoreInfo> StoreInfos,
|
||||
2: required string UploadHost,
|
||||
3: optional map<string, string> UploadHeader,
|
||||
4: required string SessionKey
|
||||
}
|
||||
|
||||
struct InnerUploadAddress {
|
||||
1: required list<UploadNode> UploadNodes
|
||||
}
|
||||
|
||||
struct UploadResult {
|
||||
1: required string Uri,
|
||||
2: required i32 UriStatus
|
||||
}
|
||||
|
||||
struct PluginResult {
|
||||
1: required string FileName,
|
||||
2: required string SourceUri,
|
||||
3: required string ImageUri,
|
||||
4: required i32 ImageWidth,
|
||||
5: required i32 ImageHeight,
|
||||
6: required string ImageMd5,
|
||||
7: required string ImageFormat,
|
||||
8: required i32 ImageSize,
|
||||
9: required i32 FrameCnt
|
||||
}
|
||||
struct ApplyUploadActionResult {
|
||||
1: optional UploadAddress UploadAddress,
|
||||
2: optional UploadAddress FallbackUploadAddress,
|
||||
3: optional InnerUploadAddress InnerUploadAddress,
|
||||
4: optional string RequestId,
|
||||
5: optional string SDKParam
|
||||
6: optional list<UploadResult> Results,
|
||||
7: optional list<PluginResult> PluginResult
|
||||
}
|
||||
|
||||
struct ApplyUploadActionResponse {
|
||||
1: required ResponseMetadata ResponseMetadata,
|
||||
2: required ApplyUploadActionResult Result
|
||||
}
|
||||
|
||||
struct ApplyUploadActionRequest {
|
||||
1: optional string Action (api.query="Action"),
|
||||
2: optional string Version (api.query="Version"),
|
||||
3: optional string ServiceId (api.query="ServiceId"),
|
||||
4: optional string FileExtension (api.query="FileExtension")
|
||||
5: optional string FileSize (api.query="FileSize")
|
||||
6: optional string s (api.query="s")
|
||||
7: optional binary ByteData (api.raw_body = "")
|
||||
}
|
||||
|
||||
service DeveloperApiService {
|
||||
|
||||
GetUploadAuthTokenResponse GetUploadAuthToken(1: GetUploadAuthTokenRequest request)(api.post = '/api/playground/upload/auth_token', api.category="playground", api.gen_path="playground")
|
||||
CommonUploadResponse CommonUpload(1: CommonUploadRequest request)(api.post = '/api/playground/upload/*tos_uri', api.category="playground", api.gen_path="playground")
|
||||
|
||||
DeleteDraftBotResponse DeleteDraftBot(1:DeleteDraftBotRequest request)(api.post='/api/draftbot/delete', api.category="draftbot", api.gen_path="draftbot")
|
||||
DuplicateDraftBotResponse DuplicateDraftBot(1:DuplicateDraftBotRequest request)(api.post='/api/draftbot/duplicate', api.category="draftbot", api.gen_path="draftbot")
|
||||
CheckDraftBotCommitResponse CheckDraftBotCommit(1:CheckDraftBotCommitRequest request)(api.post='/api/draftbot/commit_check', api.category="draftbot", api.gen_path="draftbot")
|
||||
@@ -1012,6 +896,4 @@ service DeveloperApiService {
|
||||
|
||||
UpdateUserProfileCheckResponse UpdateUserProfileCheck(1: UpdateUserProfileCheckRequest request)(api.post='/api/user/update_profile_check', api.category="user", api.gen_path="user")
|
||||
|
||||
ApplyUploadActionResponse ApplyUploadAction(1: ApplyUploadActionRequest request)(api.get='/api/playground/apply_upload_action', api.post='/api/playground/apply_upload_action', api.category="playground", api.gen_path="playground")
|
||||
|
||||
}
|
||||
|
||||
94
idl/upload/upload.thrift
Normal file
94
idl/upload/upload.thrift
Normal file
@@ -0,0 +1,94 @@
|
||||
include "../base.thrift"
|
||||
include "../bot_common/bot_common.thrift"
|
||||
namespace go file.upload
|
||||
struct CommonUploadRequest {
|
||||
1: optional binary ByteData (api.raw_body = "")
|
||||
2: optional string uploadID (api.query="uploadID")
|
||||
3: optional string partNumber (api.query="partNumber")
|
||||
}
|
||||
struct Error{
|
||||
1: i32 code,
|
||||
2: string error,
|
||||
3: i32 error_code,
|
||||
4: string message
|
||||
}
|
||||
struct Payload{
|
||||
1: string hash,
|
||||
2: string key,
|
||||
3: string uploadID
|
||||
}
|
||||
struct CommonUploadResponse {
|
||||
1: string Version
|
||||
2: i32 success
|
||||
3: Error error
|
||||
4: Payload payload
|
||||
}
|
||||
struct ApplyUploadActionRequest {
|
||||
1: optional string Action (api.query="Action"),
|
||||
2: optional string Version (api.query="Version"),
|
||||
3: optional string ServiceId (api.query="ServiceId"),
|
||||
4: optional string FileExtension (api.query="FileExtension")
|
||||
5: optional string FileSize (api.query="FileSize")
|
||||
6: optional string s (api.query="s")
|
||||
7: optional binary ByteData (api.raw_body = "")
|
||||
}
|
||||
struct ResponseMetadata {
|
||||
1: required string RequestId,
|
||||
2: required string Action,
|
||||
3: required string Version,
|
||||
4: required string Service,
|
||||
5: required string Region
|
||||
}
|
||||
struct StoreInfo {
|
||||
1: required string StoreUri,
|
||||
2: required string Auth,
|
||||
3: required string UploadID
|
||||
}
|
||||
struct UploadAddress {
|
||||
1: required list<StoreInfo> StoreInfos,
|
||||
2: required list<string> UploadHosts,
|
||||
3: optional map<string, string> UploadHeader,
|
||||
4: required string SessionKey,
|
||||
5: required string Cloud
|
||||
}
|
||||
struct UploadNode {
|
||||
1: required list<StoreInfo> StoreInfos,
|
||||
2: required string UploadHost,
|
||||
3: optional map<string, string> UploadHeader,
|
||||
4: required string SessionKey
|
||||
}
|
||||
struct InnerUploadAddress {
|
||||
1: required list<UploadNode> UploadNodes
|
||||
}
|
||||
struct UploadResult {
|
||||
1: required string Uri,
|
||||
2: required i32 UriStatus
|
||||
}
|
||||
struct PluginResult {
|
||||
1: required string FileName,
|
||||
2: required string SourceUri,
|
||||
3: required string ImageUri,
|
||||
4: required i32 ImageWidth,
|
||||
5: required i32 ImageHeight,
|
||||
6: required string ImageMd5,
|
||||
7: required string ImageFormat,
|
||||
8: required i32 ImageSize,
|
||||
9: required i32 FrameCnt
|
||||
}
|
||||
struct ApplyUploadActionResult {
|
||||
1: optional UploadAddress UploadAddress,
|
||||
2: optional UploadAddress FallbackUploadAddress,
|
||||
3: optional InnerUploadAddress InnerUploadAddress,
|
||||
4: optional string RequestId,
|
||||
5: optional string SDKParam
|
||||
6: optional list<UploadResult> Results,
|
||||
7: optional list<PluginResult> PluginResult
|
||||
}
|
||||
struct ApplyUploadActionResponse {
|
||||
1: required ResponseMetadata ResponseMetadata,
|
||||
2: required ApplyUploadActionResult Result
|
||||
}
|
||||
service UploadService {
|
||||
CommonUploadResponse CommonUpload(1: CommonUploadRequest request)(api.post = '/api/common/upload/*tos_uri', api.category="upload", api.gen_path="upload")
|
||||
ApplyUploadActionResponse ApplyUploadAction(1: ApplyUploadActionRequest request)(api.get='/api/common/upload/apply_upload_action', api.post='/api/common/upload/apply_upload_action', api.category="common", api.gen_path="common")
|
||||
}
|
||||
Reference in New Issue
Block a user